@skyworx/dynamic-ui 1.0.7 → 1.0.8

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 (262) hide show
  1. package/dist/dynamic-ui.css +1 -1
  2. package/dist/dynamic-ui.es.js +1 -1
  3. package/dist/dynamic-ui.umd.js +4 -4
  4. package/dist/{index-DDXdc0nQ.js → index-B1OvNFeR.js} +5 -5
  5. package/dist/index.d.ts +196 -0
  6. package/dist/types/components/base/DCodeAutoComplete.vue.d.ts +87 -0
  7. package/dist/types/components/base/DCodeBadge.vue.d.ts +33 -0
  8. package/dist/types/components/base/DCodeBarCustom.vue.d.ts +28 -0
  9. package/dist/types/components/base/DCodeBeforeAfter.vue.d.ts +21 -0
  10. package/dist/types/components/base/DCodeButton.vue.d.ts +45 -0
  11. package/dist/types/components/base/DCodeButtonGroup.vue.d.ts +79 -0
  12. package/dist/types/components/base/DCodeCard.vue.d.ts +30 -0
  13. package/dist/types/components/base/DCodeCardCheckboxList.vue.d.ts +64 -0
  14. package/dist/types/components/base/DCodeCardList.vue.d.ts +147 -0
  15. package/dist/types/components/base/DCodeCardSelect.vue.d.ts +39 -0
  16. package/dist/types/components/base/DCodeChart.vue.d.ts +46 -0
  17. package/dist/types/components/base/DCodeCheckbox.vue.d.ts +27 -0
  18. package/dist/types/components/base/DCodeClearButton.vue.d.ts +15 -0
  19. package/dist/types/components/base/DCodeColorPicker.vue.d.ts +50 -0
  20. package/dist/types/components/base/DCodeCurrencyField.vue.d.ts +34 -0
  21. package/dist/types/components/base/DCodeDatePicker.backup.vue.d.ts +55 -0
  22. package/dist/types/components/base/DCodeDatePicker.vue.d.ts +59 -0
  23. package/dist/types/components/base/DCodeDateTimePicker.backup.vue.d.ts +52 -0
  24. package/dist/types/components/base/DCodeDateTimePicker.vue.d.ts +60 -0
  25. package/dist/types/components/base/DCodeDialog.vue.d.ts +45 -0
  26. package/dist/types/components/base/DCodeDialogCloseBtn.vue.d.ts +9 -0
  27. package/dist/types/components/base/DCodeDrawer.vue.d.ts +31 -0
  28. package/dist/types/components/base/DCodeDropzone.vue.d.ts +35 -0
  29. package/dist/types/components/base/DCodeDynamicCollapse.vue.d.ts +190 -0
  30. package/dist/types/components/base/DCodeDynamicUploadList.vue.d.ts +155 -0
  31. package/dist/types/components/base/DCodeFieldDiff.vue.d.ts +7 -0
  32. package/dist/types/components/base/DCodeFileField.vue.d.ts +48 -0
  33. package/dist/types/components/base/DCodeFileResult.vue.d.ts +38 -0
  34. package/dist/types/components/base/DCodeIconDropdown.vue.d.ts +32 -0
  35. package/dist/types/components/base/DCodeImageCropperDialog.vue.d.ts +33 -0
  36. package/dist/types/components/base/DCodeImageField.vue.d.ts +71 -0
  37. package/dist/types/components/base/DCodeImageResult.vue.d.ts +32 -0
  38. package/dist/types/components/base/DCodeInfiniteAutoComplete.vue.d.ts +98 -0
  39. package/dist/types/components/base/DCodeLabel.vue.d.ts +11 -0
  40. package/dist/types/components/base/DCodeListLabels.vue.d.ts +6 -0
  41. package/dist/types/components/base/DCodeMapField.vue.d.ts +50 -0
  42. package/dist/types/components/base/DCodeMonthPicker.vue.d.ts +49 -0
  43. package/dist/types/components/base/DCodeMultiSelect.vue.d.ts +71 -0
  44. package/dist/types/components/base/DCodeOtpInput.vue.d.ts +43 -0
  45. package/dist/types/components/base/DCodePagination.vue.d.ts +24 -0
  46. package/dist/types/components/base/DCodePdfViewer.vue.d.ts +19 -0
  47. package/dist/types/components/base/DCodePercentField.vue.d.ts +39 -0
  48. package/dist/types/components/base/DCodePercentage.vue.d.ts +27 -0
  49. package/dist/types/components/base/DCodePermissionMenu.vue.d.ts +83 -0
  50. package/dist/types/components/base/DCodeProgress.vue.d.ts +33 -0
  51. package/dist/types/components/base/DCodeProgressBar.vue.d.ts +9 -0
  52. package/dist/types/components/base/DCodeRadio.vue.d.ts +47 -0
  53. package/dist/types/components/base/DCodeRadioCustom.vue.d.ts +56 -0
  54. package/dist/types/components/base/DCodeRangeField.vue.d.ts +43 -0
  55. package/dist/types/components/base/DCodeRiskEvaluation.vue.d.ts +12 -0
  56. package/dist/types/components/base/DCodeRobotList.vue.d.ts +68 -0
  57. package/dist/types/components/base/DCodeSearchDialog.vue.d.ts +94 -0
  58. package/dist/types/components/base/DCodeSegment.vue.d.ts +42 -0
  59. package/dist/types/components/base/DCodeSegmentGroup.vue.d.ts +36 -0
  60. package/dist/types/components/base/DCodeSelect.vue.d.ts +54 -0
  61. package/dist/types/components/base/DCodeSlider.vue.d.ts +58 -0
  62. package/dist/types/components/base/DCodeStaticImage.vue.d.ts +75 -0
  63. package/dist/types/components/base/DCodeStaticLabel.vue.d.ts +43 -0
  64. package/dist/types/components/base/DCodeSwitch.vue.d.ts +38 -0
  65. package/dist/types/components/base/DCodeTextEditor.vue.d.ts +29 -0
  66. package/dist/types/components/base/DCodeTextField.vue.d.ts +76 -0
  67. package/dist/types/components/base/DCodeTextarea.vue.d.ts +42 -0
  68. package/dist/types/components/base/DCodeTimePicker.vue.d.ts +51 -0
  69. package/dist/types/components/base/DCodeTimelineWithIcons.vue.d.ts +55 -0
  70. package/dist/types/components/base/DCodeTreePermissions.vue.d.ts +18 -0
  71. package/dist/types/components/base/DCodeUploadFile.vue.d.ts +12 -0
  72. package/dist/types/components/base/DCodeWizard.vue.d.ts +109 -0
  73. package/dist/types/components/base/DCodeWorkflowBpmn.vue.d.ts +79 -0
  74. package/dist/types/components/base/DCodeWorkflowDiagram.vue.d.ts +30 -0
  75. package/dist/types/components/base/datatable/DataTable.vue.d.ts +170 -0
  76. package/dist/types/components/base/datatable/DynamicFilterField.vue.d.ts +52 -0
  77. package/dist/types/components/dynamic/DynamicForm.vue.d.ts +41 -0
  78. package/dist/types/components/dynamic/DynamicFormField.vue.d.ts +36 -0
  79. package/dist/types/components/dynamic/DynamicWizard.vue.d.ts +42 -0
  80. package/dist/types/components/dynamic/NavigationBackButton.vue.d.ts +21 -0
  81. package/dist/types/components/dynamic/dialogs/DynamicFormDialogs.vue.d.ts +2 -0
  82. package/dist/types/components/dynamic/sections/DynamicFormSection.vue.d.ts +10 -0
  83. package/dist/types/components/dynamic/sections/DynamicTableSection.vue.d.ts +10 -0
  84. package/dist/types/components/dynamic/sections/DynamicWizardSection.vue.d.ts +6 -0
  85. package/dist/types/components/dynamic/sections/SectionSkeleton.vue.d.ts +9 -0
  86. package/dist/types/components/features/AutoLayoutSkeleton.vue.d.ts +2 -0
  87. package/dist/types/components/features/Breadcrumb.vue.d.ts +23 -0
  88. package/dist/types/components/features/CardSummary.vue.d.ts +15 -0
  89. package/dist/types/components/features/DashboardActivityCard.vue.d.ts +20 -0
  90. package/dist/types/components/features/DashboardFeaturesCard.vue.d.ts +19 -0
  91. package/dist/types/components/features/DashboardInsightsCard.vue.d.ts +21 -0
  92. package/dist/types/components/features/DataFilterSheet.vue.d.ts +24 -0
  93. package/dist/types/components/features/LanguageSwitcher.vue.d.ts +2 -0
  94. package/dist/types/components/features/Modal.vue.d.ts +29 -0
  95. package/dist/types/components/features/Pagination.vue.d.ts +12 -0
  96. package/dist/types/components/features/ScrollToTop.vue.d.ts +2 -0
  97. package/dist/types/components/features/SessionTimeoutModal.vue.d.ts +12 -0
  98. package/dist/types/components/features/ThemeSwitcher.vue.d.ts +2 -0
  99. package/dist/types/components/ui/alert/Alert.vue.d.ts +18 -0
  100. package/dist/types/components/ui/alert/AlertDescription.vue.d.ts +16 -0
  101. package/dist/types/components/ui/alert/AlertTitle.vue.d.ts +16 -0
  102. package/dist/types/components/ui/alert/index.d.ts +8 -0
  103. package/dist/types/components/ui/avatar/Avatar.vue.d.ts +22 -0
  104. package/dist/types/components/ui/avatar/AvatarFallback.vue.d.ts +13 -0
  105. package/dist/types/components/ui/avatar/AvatarImage.vue.d.ts +13 -0
  106. package/dist/types/components/ui/avatar/index.d.ts +9 -0
  107. package/dist/types/components/ui/badge/Badge.vue.d.ts +18 -0
  108. package/dist/types/components/ui/badge/index.d.ts +6 -0
  109. package/dist/types/components/ui/button/Button.vue.d.ts +22 -0
  110. package/dist/types/components/ui/button/index.d.ts +7 -0
  111. package/dist/types/components/ui/button-group/ButtonGroup.vue.d.ts +18 -0
  112. package/dist/types/components/ui/button-group/ButtonGroupSeparator.vue.d.ts +9 -0
  113. package/dist/types/components/ui/button-group/ButtonGroupText.vue.d.ts +21 -0
  114. package/dist/types/components/ui/button-group/index.d.ts +8 -0
  115. package/dist/types/components/ui/calendar/Calendar.vue.d.ts +13 -0
  116. package/dist/types/components/ui/calendar/CalendarCell.vue.d.ts +17 -0
  117. package/dist/types/components/ui/calendar/CalendarCellTrigger.vue.d.ts +17 -0
  118. package/dist/types/components/ui/calendar/CalendarGrid.vue.d.ts +17 -0
  119. package/dist/types/components/ui/calendar/CalendarGridBody.vue.d.ts +13 -0
  120. package/dist/types/components/ui/calendar/CalendarGridHead.vue.d.ts +17 -0
  121. package/dist/types/components/ui/calendar/CalendarGridRow.vue.d.ts +17 -0
  122. package/dist/types/components/ui/calendar/CalendarHeadCell.vue.d.ts +17 -0
  123. package/dist/types/components/ui/calendar/CalendarHeader.vue.d.ts +17 -0
  124. package/dist/types/components/ui/calendar/CalendarHeading.vue.d.ts +18 -0
  125. package/dist/types/components/ui/calendar/CalendarNextButton.vue.d.ts +17 -0
  126. package/dist/types/components/ui/calendar/CalendarPrevButton.vue.d.ts +17 -0
  127. package/dist/types/components/ui/calendar/index.d.ts +12 -0
  128. package/dist/types/components/ui/card/Card.vue.d.ts +16 -0
  129. package/dist/types/components/ui/card/CardContent.vue.d.ts +16 -0
  130. package/dist/types/components/ui/card/CardDescription.vue.d.ts +16 -0
  131. package/dist/types/components/ui/card/CardFooter.vue.d.ts +16 -0
  132. package/dist/types/components/ui/card/CardHeader.vue.d.ts +16 -0
  133. package/dist/types/components/ui/card/CardTitle.vue.d.ts +16 -0
  134. package/dist/types/components/ui/card/index.d.ts +6 -0
  135. package/dist/types/components/ui/checkbox/Checkbox.vue.d.ts +21 -0
  136. package/dist/types/components/ui/checkbox/index.d.ts +1 -0
  137. package/dist/types/components/ui/dialog/Dialog.vue.d.ts +17 -0
  138. package/dist/types/components/ui/dialog/DialogClose.vue.d.ts +13 -0
  139. package/dist/types/components/ui/dialog/DialogContent.vue.d.ts +34 -0
  140. package/dist/types/components/ui/dialog/DialogDescription.vue.d.ts +17 -0
  141. package/dist/types/components/ui/dialog/DialogFooter.vue.d.ts +16 -0
  142. package/dist/types/components/ui/dialog/DialogHeader.vue.d.ts +16 -0
  143. package/dist/types/components/ui/dialog/DialogScrollContent.vue.d.ts +31 -0
  144. package/dist/types/components/ui/dialog/DialogTitle.vue.d.ts +17 -0
  145. package/dist/types/components/ui/dialog/DialogTrigger.vue.d.ts +13 -0
  146. package/dist/types/components/ui/dialog/index.d.ts +9 -0
  147. package/dist/types/components/ui/input/Input.vue.d.ts +12 -0
  148. package/dist/types/components/ui/input/index.d.ts +1 -0
  149. package/dist/types/components/ui/label/Label.vue.d.ts +17 -0
  150. package/dist/types/components/ui/label/index.d.ts +1 -0
  151. package/dist/types/components/ui/pagination/Pagination.vue.d.ts +24 -0
  152. package/dist/types/components/ui/pagination/PaginationContent.vue.d.ts +24 -0
  153. package/dist/types/components/ui/pagination/PaginationEllipsis.vue.d.ts +17 -0
  154. package/dist/types/components/ui/pagination/PaginationFirst.vue.d.ts +21 -0
  155. package/dist/types/components/ui/pagination/PaginationItem.vue.d.ts +22 -0
  156. package/dist/types/components/ui/pagination/PaginationLast.vue.d.ts +21 -0
  157. package/dist/types/components/ui/pagination/PaginationNext.vue.d.ts +21 -0
  158. package/dist/types/components/ui/pagination/PaginationPrevious.vue.d.ts +21 -0
  159. package/dist/types/components/ui/pagination/index.d.ts +8 -0
  160. package/dist/types/components/ui/popover/Popover.vue.d.ts +17 -0
  161. package/dist/types/components/ui/popover/PopoverContent.vue.d.ts +34 -0
  162. package/dist/types/components/ui/popover/PopoverTrigger.vue.d.ts +13 -0
  163. package/dist/types/components/ui/popover/index.d.ts +4 -0
  164. package/dist/types/components/ui/range-calendar/RangeCalendar.vue.d.ts +17 -0
  165. package/dist/types/components/ui/range-calendar/RangeCalendarCell.vue.d.ts +17 -0
  166. package/dist/types/components/ui/range-calendar/RangeCalendarCellTrigger.vue.d.ts +17 -0
  167. package/dist/types/components/ui/range-calendar/RangeCalendarGrid.vue.d.ts +17 -0
  168. package/dist/types/components/ui/range-calendar/RangeCalendarGridBody.vue.d.ts +13 -0
  169. package/dist/types/components/ui/range-calendar/RangeCalendarGridHead.vue.d.ts +13 -0
  170. package/dist/types/components/ui/range-calendar/RangeCalendarGridRow.vue.d.ts +17 -0
  171. package/dist/types/components/ui/range-calendar/RangeCalendarHeadCell.vue.d.ts +17 -0
  172. package/dist/types/components/ui/range-calendar/RangeCalendarHeader.vue.d.ts +17 -0
  173. package/dist/types/components/ui/range-calendar/RangeCalendarHeading.vue.d.ts +18 -0
  174. package/dist/types/components/ui/range-calendar/RangeCalendarNextButton.vue.d.ts +17 -0
  175. package/dist/types/components/ui/range-calendar/RangeCalendarPrevButton.vue.d.ts +17 -0
  176. package/dist/types/components/ui/range-calendar/index.d.ts +12 -0
  177. package/dist/types/components/ui/select/Select.vue.d.ts +20 -0
  178. package/dist/types/components/ui/select/SelectContent.vue.d.ts +27 -0
  179. package/dist/types/components/ui/select/SelectGroup.vue.d.ts +17 -0
  180. package/dist/types/components/ui/select/SelectItem.vue.d.ts +17 -0
  181. package/dist/types/components/ui/select/SelectItemText.vue.d.ts +13 -0
  182. package/dist/types/components/ui/select/SelectLabel.vue.d.ts +17 -0
  183. package/dist/types/components/ui/select/SelectScrollDownButton.vue.d.ts +17 -0
  184. package/dist/types/components/ui/select/SelectScrollUpButton.vue.d.ts +17 -0
  185. package/dist/types/components/ui/select/SelectSeparator.vue.d.ts +7 -0
  186. package/dist/types/components/ui/select/SelectTrigger.vue.d.ts +17 -0
  187. package/dist/types/components/ui/select/SelectValue.vue.d.ts +13 -0
  188. package/dist/types/components/ui/select/index.d.ts +11 -0
  189. package/dist/types/components/ui/separator/Separator.vue.d.ts +10 -0
  190. package/dist/types/components/ui/separator/index.d.ts +1 -0
  191. package/dist/types/components/ui/sheet/Sheet.vue.d.ts +17 -0
  192. package/dist/types/components/ui/sheet/SheetClose.vue.d.ts +13 -0
  193. package/dist/types/components/ui/sheet/SheetContent.vue.d.ts +33 -0
  194. package/dist/types/components/ui/sheet/SheetDescription.vue.d.ts +17 -0
  195. package/dist/types/components/ui/sheet/SheetFooter.vue.d.ts +16 -0
  196. package/dist/types/components/ui/sheet/SheetHeader.vue.d.ts +16 -0
  197. package/dist/types/components/ui/sheet/SheetTitle.vue.d.ts +17 -0
  198. package/dist/types/components/ui/sheet/SheetTrigger.vue.d.ts +13 -0
  199. package/dist/types/components/ui/sheet/index.d.ts +13 -0
  200. package/dist/types/components/ui/stepper/Stepper.vue.d.ts +33 -0
  201. package/dist/types/components/ui/stepper/StepperDescription.vue.d.ts +17 -0
  202. package/dist/types/components/ui/stepper/StepperIndicator.vue.d.ts +19 -0
  203. package/dist/types/components/ui/stepper/StepperItem.vue.d.ts +19 -0
  204. package/dist/types/components/ui/stepper/StepperSeparator.vue.d.ts +7 -0
  205. package/dist/types/components/ui/stepper/StepperTitle.vue.d.ts +17 -0
  206. package/dist/types/components/ui/stepper/StepperTrigger.vue.d.ts +17 -0
  207. package/dist/types/components/ui/stepper/index.d.ts +7 -0
  208. package/dist/types/components/ui/switch/Switch.vue.d.ts +21 -0
  209. package/dist/types/components/ui/switch/index.d.ts +1 -0
  210. package/dist/types/components/ui/tab-wizard/TabWizard.vue.d.ts +82 -0
  211. package/dist/types/components/ui/tab-wizard/TabWizardContent.vue.d.ts +22 -0
  212. package/dist/types/components/ui/tab-wizard/TabWizardForm.vue.d.ts +16 -0
  213. package/dist/types/components/ui/tab-wizard/index.d.ts +4 -0
  214. package/dist/types/components/ui/textarea/Textarea.vue.d.ts +12 -0
  215. package/dist/types/components/ui/textarea/index.d.ts +1 -0
  216. package/dist/types/components/ui/tooltip/Tooltip.vue.d.ts +17 -0
  217. package/dist/types/components/ui/tooltip/TooltipContent.vue.d.ts +25 -0
  218. package/dist/types/components/ui/tooltip/TooltipProvider.vue.d.ts +13 -0
  219. package/dist/types/components/ui/tooltip/TooltipTrigger.vue.d.ts +13 -0
  220. package/dist/types/components/ui/tooltip/index.d.ts +4 -0
  221. package/dist/types/composables/dynamic-form/actions/useFormActions.d.ts +10 -0
  222. package/dist/types/composables/dynamic-form/logic/operators.d.ts +1 -0
  223. package/dist/types/composables/dynamic-form/logic/useFormLogic.d.ts +28 -0
  224. package/dist/types/composables/dynamic-form/mapping/useFormMapping.d.ts +3 -0
  225. package/dist/types/composables/dynamic-form/navigation/navigation.types.d.ts +80 -0
  226. package/dist/types/composables/dynamic-form/navigation/useFormNavigation.d.ts +93 -0
  227. package/dist/types/composables/dynamic-form/state/useFormState.d.ts +2 -0
  228. package/dist/types/composables/dynamic-form/table/useFormTable.d.ts +43 -0
  229. package/dist/types/composables/dynamic-form/types/form.types.d.ts +202 -0
  230. package/dist/types/composables/dynamic-form/useDynamicForm.d.ts +228 -0
  231. package/dist/types/composables/dynamic-form/utils/form.utils.d.ts +21 -0
  232. package/dist/types/composables/dynamic-form/validation/useFormValidation.d.ts +3 -0
  233. package/dist/types/composables/dynamic-form/watcher/useFormWatcher.d.ts +4 -0
  234. package/dist/types/composables/useMenuMetadata.d.ts +7 -0
  235. package/dist/types/composables/useSmoothCaret.d.ts +21 -0
  236. package/dist/types/composables/useTemplateDownload.d.ts +40 -0
  237. package/dist/types/composables/useToast.d.ts +14 -0
  238. package/dist/types/lib/utils.d.ts +2 -0
  239. package/dist/types/locales/en.d.ts +609 -0
  240. package/dist/types/locales/id.d.ts +894 -0
  241. package/dist/types/locales/kr.d.ts +611 -0
  242. package/dist/types/pages/AutoLayoutDatatable.vue.d.ts +34 -0
  243. package/dist/types/pages/AutoLayoutForm.vue.d.ts +31 -0
  244. package/dist/types/stores/ui.d.ts +26 -0
  245. package/dist/types/types/api-request.d.ts +5 -0
  246. package/dist/types/types/base-props.d.ts +12 -0
  247. package/dist/types/types/dynamic.types.d.ts +43 -0
  248. package/dist/types/types/form.d.ts +797 -0
  249. package/dist/types/types/index.d.ts +149 -0
  250. package/dist/types/utils/action.utils.d.ts +1 -0
  251. package/dist/types/utils/action.utils.test.d.ts +1 -0
  252. package/dist/types/utils/datePIckerColor.d.ts +8 -0
  253. package/dist/types/utils/download.utils.d.ts +30 -0
  254. package/dist/types/utils/download.utils.test.d.ts +1 -0
  255. package/dist/types/utils/formdata.utils.d.ts +32 -0
  256. package/dist/types/utils/formdata.utils.test.d.ts +1 -0
  257. package/dist/types/utils/helpers.d.ts +38 -0
  258. package/dist/types/utils/permission.d.ts +17 -0
  259. package/dist/types/utils/range.utils.d.ts +22 -0
  260. package/dist/types/utils/range.utils.test.d.ts +1 -0
  261. package/dist/{viewer-CZARhy-c.js → viewer-CiqlALNW.js} +1 -1
  262. package/package.json +2 -2
@@ -1,4 +1,4 @@
1
- (function(Ke,r){typeof exports=="object"&&typeof module<"u"?r(exports,require("vue"),require("lucide-vue-next"),require("reka-ui"),require("@vueuse/core"),require("vue-i18n"),require("@vuepic/vue-datepicker"),require("vue-router"),require("@uppy/core"),require("@uppy/dashboard"),require("@uppy/image-editor"),require("vue3-lottie")):typeof define=="function"&&define.amd?define(["exports","vue","lucide-vue-next","reka-ui","@vueuse/core","vue-i18n","@vuepic/vue-datepicker","vue-router","@uppy/core","@uppy/dashboard","@uppy/image-editor","vue3-lottie"],r):(Ke=typeof globalThis<"u"?globalThis:Ke||self,r(Ke.DynamicUI={},Ke.Vue,Ke.LucideIcons,Ke.rekaUi,Ke.core,Ke.VueI18n,Ke.VueDatePicker,Ke.VueRouter,Ke.Uppy,Ke.UppyDashboard,Ke.UppyImageEditor,Ke.Vue3Lottie))})(this,(function(Ke,r,Ae,Lt,Lo,In,LR,zs,FR,C1,$R,zR){"use strict";function S1(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const A1=S1(r),Yt=S1(Ae),Zc=Math.min,js=Math.max,bm=Math.round,ym=Math.floor,Us=e=>({x:e,y:e}),jR={left:"right",right:"left",bottom:"top",top:"bottom"};function UR(e,t,n){return js(e,Zc(t,n))}function Iu(e,t){return typeof e=="function"?e(t):e}function Il(e){return e.split("-")[0]}function Ou(e){return e.split("-")[1]}function T1(e){return e==="x"?"y":"x"}function B1(e){return e==="y"?"height":"width"}function Ws(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function P1(e){return T1(Ws(e))}function WR(e,t,n){n===void 0&&(n=!1);const o=Ou(e),i=P1(e),s=B1(i);let a=i==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(a=vm(a)),[a,vm(a)]}function HR(e){const t=vm(e);return[zb(e),t,zb(t)]}function zb(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const N1=["left","right"],D1=["right","left"],qR=["top","bottom"],KR=["bottom","top"];function GR(e,t,n){switch(e){case"top":case"bottom":return n?t?D1:N1:t?N1:D1;case"left":case"right":return t?qR:KR;default:return[]}}function YR(e,t,n,o){const i=Ou(e);let s=GR(Il(e),n==="start",o);return i&&(s=s.map(a=>a+"-"+i),t&&(s=s.concat(s.map(zb)))),s}function vm(e){const t=Il(e);return jR[t]+e.slice(t.length)}function ZR(e){var t,n,o,i;return{top:(t=e.top)!=null?t:0,right:(n=e.right)!=null?n:0,bottom:(o=e.bottom)!=null?o:0,left:(i=e.left)!=null?i:0}}function XR(e){return typeof e!="number"?ZR(e):{top:e,right:e,bottom:e,left:e}}function wm(e){const{x:t,y:n,width:o,height:i}=e;return{width:o,height:i,top:n,left:t,right:t+o,bottom:n+i,x:t,y:n}}function M1(e,t,n){let{reference:o,floating:i}=e;const s=Ws(t),a=P1(t),l=B1(a),c=Il(t),d=s==="y",f=o.x+o.width/2-i.width/2,h=o.y+o.height/2-i.height/2,p=o[l]/2-i[l]/2;let g;switch(c){case"top":g={x:f,y:o.y-i.height};break;case"bottom":g={x:f,y:o.y+o.height};break;case"right":g={x:o.x+o.width,y:h};break;case"left":g={x:o.x-i.width,y:h};break;default:g={x:o.x,y:o.y}}const y=Ou(t);return y&&(g[a]+=p*(y==="end"?1:-1)*(n&&d?-1:1)),g}async function JR(e,t){var n;t===void 0&&(t={});const{x:o,y:i,platform:s,rects:a,elements:l,strategy:c}=e,{boundary:d="clippingAncestors",rootBoundary:f="viewport",elementContext:h="floating",altBoundary:p=!1,padding:g=0}=Iu(t,e),y=XR(g),_=l[p?h==="floating"?"reference":"floating":h],x=wm(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(_)))==null||n?_:_.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(l.floating)),boundary:d,rootBoundary:f,strategy:c})),B=h==="floating"?{x:o,y:i,width:a.floating.width,height:a.floating.height}:a.reference,R=await(s.getOffsetParent==null?void 0:s.getOffsetParent(l.floating)),S=await(s.isElement==null?void 0:s.isElement(R))&&await(s.getScale==null?void 0:s.getScale(R))||{x:1,y:1},O=wm(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:B,offsetParent:R,strategy:c}):B);return{top:(x.top-O.top+y.top)/S.y,bottom:(O.bottom-x.bottom+y.bottom)/S.y,left:(x.left-O.left+y.left)/S.x,right:(O.right-x.right+y.right)/S.x}}const QR=50,VR=async(e,t,n)=>{const{placement:o="bottom",strategy:i="absolute",middleware:s=[],platform:a}=n,l=a.detectOverflow?a:{...a,detectOverflow:JR},c=await(a.isRTL==null?void 0:a.isRTL(t));let d=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:f,y:h}=M1(d,o,c),p=o,g=0;const y={};for(let b=0;b<s.length;b++){const _=s[b];if(!_)continue;const{name:x,fn:B}=_,{x:R,y:S,data:O,reset:I}=await B({x:f,y:h,initialPlacement:o,placement:p,strategy:i,middlewareData:y,rects:d,platform:l,elements:{reference:e,floating:t}});f=R??f,h=S??h,y[x]={...y[x],...O},I&&g<QR&&(g++,typeof I=="object"&&(I.placement&&(p=I.placement),I.rects&&(d=I.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:i}):I.rects),{x:f,y:h}=M1(d,p,c)),b=-1)}return{x:f,y:h,placement:p,strategy:i,middlewareData:y}},eI=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:i,middlewareData:s,rects:a,initialPlacement:l,platform:c,elements:d}=t,{mainAxis:f=!0,crossAxis:h=!0,fallbackPlacements:p,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:b=!0,..._}=Iu(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const x=Il(i),B=Ws(l),R=Il(l)===l,S=await(c.isRTL==null?void 0:c.isRTL(d.floating)),O=p||(R||!b?[vm(l)]:HR(l)),I=y!=="none";!p&&I&&O.push(...YR(l,b,y,S));const D=[l,...O],w=await c.detectOverflow(t,_),E=[];let F=((o=s.flip)==null?void 0:o.overflows)||[];if(f&&E.push(w[x]),h){const Q=WR(i,a,S);E.push(w[Q[0]],w[Q[1]])}if(F=[...F,{placement:i,overflows:E}],!E.every(Q=>Q<=0)){var A,P;const Q=(((A=s.flip)==null?void 0:A.index)||0)+1,re=D[Q];if(re&&(!(h==="alignment"?B!==Ws(re):!1)||F.every(X=>Ws(X.placement)===B?X.overflows[0]>0:!0)))return{data:{index:Q,overflows:F},reset:{placement:re}};let ie=(P=F.filter(le=>le.overflows[0]<=0).sort((le,X)=>le.overflows[1]-X.overflows[1])[0])==null?void 0:P.placement;if(!ie)switch(g){case"bestFit":{var q;const le=(q=F.filter(X=>{if(I){const K=Ws(X.placement);return K===B||K==="y"}return!0}).map(X=>[X.placement,X.overflows.filter(K=>K>0).reduce((K,W)=>K+W,0)]).sort((X,K)=>X[1]-K[1])[0])==null?void 0:q[0];le&&(ie=le);break}case"initialPlacement":ie=l;break}if(i!==ie)return{reset:{placement:ie}}}return{}}}},tI=new Set(["left","top"]);async function nI(e,t){const{placement:n,platform:o,elements:i}=e,s=await(o.isRTL==null?void 0:o.isRTL(i.floating)),a=Il(n),l=Ou(n),c=Ws(n)==="y",d=tI.has(a)?-1:1,f=s&&c?-1:1,h=Iu(t,e);let{mainAxis:p,crossAxis:g,alignmentAxis:y}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return l&&typeof y=="number"&&(g=l==="end"?y*-1:y),c?{x:g*f,y:p*d}:{x:p*d,y:g*f}}const oI=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:i,y:s,placement:a,middlewareData:l}=t,c=await nI(t,e);return a===((n=l.offset)==null?void 0:n.placement)&&(o=l.arrow)!=null&&o.alignmentOffset?{}:{x:i+c.x,y:s+c.y,data:{...c,placement:a}}}}},rI=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:i,platform:s}=t,{mainAxis:a=!0,crossAxis:l=!1,limiter:c={fn:B=>{let{x:R,y:S}=B;return{x:R,y:S}}},...d}=Iu(e,t),f={x:n,y:o},h=await s.detectOverflow(t,d),p=Ws(i),g=T1(p);let y=f[g],b=f[p];const _=(B,R)=>UR(R+h[B==="y"?"top":"left"],R,R-h[B==="y"?"bottom":"right"]);a&&(y=_(g,y)),l&&(b=_(p,b));const x=c.fn({...t,[g]:y,[p]:b});return{...x,data:{x:x.x-n,y:x.y-o,enabled:{[g]:a,[p]:l}}}}}},iI=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:o,platform:i,elements:s}=t,{apply:a=()=>{},...l}=Iu(e,t),c=await i.detectOverflow(t,l),d=Il(n),f=Ou(n),h=Ws(n)==="y",{width:p,height:g}=o.floating;let y,b;d==="top"||d==="bottom"?(y=d,b=f===(await(i.isRTL==null?void 0:i.isRTL(s.floating))?"start":"end")?"left":"right"):(b=d,y=f==="end"?"top":"bottom");const _=g-c.top-c.bottom,x=p-c.left-c.right,B=Zc(g-c[y],_),R=Zc(p-c[b],x),S=t.middlewareData.shift,O=!S;let I=B,D=R;S!=null&&S.enabled.x&&(D=x),S!=null&&S.enabled.y&&(I=_),O&&!f&&(h?D=p-2*js(c.left,c.right):I=g-2*js(c.top,c.bottom)),await a({...t,availableWidth:D,availableHeight:I});const w=await i.getDimensions(s.floating);return p!==w.width||g!==w.height?{reset:{rects:!0}}:{}}}};function km(){return typeof window<"u"}function Ol(e){return jb(e)?(e.nodeName||"").toLowerCase():"#document"}function vr(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Hs(e){var t;return(t=(jb(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function jb(e){return km()?e instanceof Node||e instanceof vr(e).Node:!1}function es(e){return km()?e instanceof Element||e instanceof vr(e).Element:!1}function Ia(e){return km()?e instanceof HTMLElement||e instanceof vr(e).HTMLElement:!1}function R1(e){return!km()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof vr(e).ShadowRoot}function _m(e){const{overflow:t,overflowX:n,overflowY:o,display:i}=ts(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&i!=="inline"&&i!=="contents"}function sI(e){return/^(table|td|th)$/.test(Ol(e))}function xm(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const aI=/transform|translate|scale|rotate|perspective|filter/,lI=/paint|layout|strict|content/,Ll=e=>!!e&&e!=="none";let Ub;function Wb(e){const t=es(e)?ts(e):e;return Ll(t.transform)||Ll(t.translate)||Ll(t.scale)||Ll(t.rotate)||Ll(t.perspective)||!Hb()&&(Ll(t.backdropFilter)||Ll(t.filter))||aI.test(t.willChange||"")||lI.test(t.contain||"")}function cI(e){let t=Fl(e);for(;Ia(t)&&!Lu(t);){if(Wb(t))return t;if(xm(t))return null;t=Fl(t)}return null}function Hb(){return Ub==null&&(Ub=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Ub}function Lu(e){return/^(html|body|#document)$/.test(Ol(e))}function ts(e){return vr(e).getComputedStyle(e)}function Em(e){return es(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Fl(e){if(Ol(e)==="html")return e;const t=e.assignedSlot||e.parentNode||R1(e)&&e.host||Hs(e);return R1(t)?t.host:t}function I1(e){const t=Fl(e);return Lu(t)?(e.ownerDocument||e).body:Ia(t)&&_m(t)?t:I1(t)}function Fu(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=I1(e),s=i===((o=e.ownerDocument)==null?void 0:o.body),a=vr(i);if(s){const l=qb(a);return t.concat(a,a.visualViewport||[],_m(i)?i:[],l&&n?Fu(l):[])}else return t.concat(i,Fu(i,[],n))}function qb(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function O1(e){const t=ts(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const i=Ia(e),s=i?e.offsetWidth:n,a=i?e.offsetHeight:o,l=bm(n)!==s||bm(o)!==a;return l&&(n=s,o=a),{width:n,height:o,$:l}}function Kb(e){return es(e)?e:e.contextElement}function Xc(e){const t=Kb(e);if(!Ia(t))return Us(1);const n=t.getBoundingClientRect(),{width:o,height:i,$:s}=O1(t);let a=(s?bm(n.width):n.width)/o,l=(s?bm(n.height):n.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!l||!Number.isFinite(l))&&(l=1),{x:a,y:l}}const dI=Us(0);function L1(e){const t=vr(e);return!Hb()||!t.visualViewport?dI:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function uI(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===vr(e)}function $l(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),s=Kb(e);let a=Us(1);t&&(o?es(o)&&(a=Xc(o)):a=Xc(e));const l=uI(s,n,o)?L1(s):Us(0);let c=(i.left+l.x)/a.x,d=(i.top+l.y)/a.y,f=i.width/a.x,h=i.height/a.y;if(s&&o){const p=vr(s),g=es(o)?vr(o):o;let y=p,b=qb(y);for(;b&&g!==y;){const _=Xc(b),x=b.getBoundingClientRect(),B=ts(b),R=x.left+(b.clientLeft+parseFloat(B.paddingLeft))*_.x,S=x.top+(b.clientTop+parseFloat(B.paddingTop))*_.y;c*=_.x,d*=_.y,f*=_.x,h*=_.y,c+=R,d+=S,y=vr(b),b=qb(y)}}return wm({width:f,height:h,x:c,y:d})}function Cm(e,t){const n=Em(e).scrollLeft;return t?t.left+n:$l(Hs(e)).left+n}function F1(e,t){const n=e.getBoundingClientRect(),o=n.left+t.scrollLeft-Cm(e,n),i=n.top+t.scrollTop;return{x:o,y:i}}function fI(e){let{elements:t,rect:n,offsetParent:o,strategy:i}=e;const s=i==="fixed",a=Hs(o),l=t?xm(t.floating):!1;if(o===a||l&&s)return n;let c={scrollLeft:0,scrollTop:0},d=Us(1);const f=Us(0),h=Ia(o);if((h||!s)&&((Ol(o)!=="body"||_m(a))&&(c=Em(o)),h)){const g=$l(o);d=Xc(o),f.x=g.x+o.clientLeft,f.y=g.y+o.clientTop}const p=a&&!h&&!s?F1(a,c):Us(0);return{width:n.width*d.x,height:n.height*d.y,x:n.x*d.x-c.scrollLeft*d.x+f.x+p.x,y:n.y*d.y-c.scrollTop*d.y+f.y+p.y}}function hI(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function mI(e){const t=Em(e),n=e.ownerDocument.body,o=js(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=js(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let s=-t.scrollLeft+Cm(e);const a=-t.scrollTop;return ts(n).direction==="rtl"&&(s+=js(e.clientWidth,n.clientWidth)-o),{width:o,height:i,x:s,y:a}}const pI=25;function gI(e,t,n){n===void 0&&(n="viewport");const o=n==="layoutViewport",i=vr(e),s=Hs(e),a=i.visualViewport;let l=s.clientWidth,c=s.clientHeight,d=0,f=0;if(a){const p=!Hb()||t==="fixed";o?p||(d=-a.offsetLeft,f=-a.offsetTop):(l=a.width,c=a.height,p&&(d=a.offsetLeft,f=a.offsetTop))}if(Cm(s)<=0){const p=s.ownerDocument,g=p.body,y=getComputedStyle(g),b=p.compatMode==="CSS1Compat"&&parseFloat(y.marginLeft)+parseFloat(y.marginRight)||0,_=Math.abs(s.clientWidth-g.clientWidth-b),x=getComputedStyle(s).scrollbarGutter==="stable both-edges"?_/2:_;x<=pI&&(l-=x)}return{width:l,height:c,x:d,y:f}}function bI(e,t){const n=$l(e,!0,t==="fixed"),o=n.top+e.clientTop,i=n.left+e.clientLeft,s=Xc(e),a=e.clientWidth*s.x,l=e.clientHeight*s.y,c=i*s.x,d=o*s.y;return{width:a,height:l,x:c,y:d}}function $1(e,t,n){let o;if(t==="viewport"||t==="layoutViewport")o=gI(e,n,t);else if(t==="document")o=mI(Hs(e));else if(es(t))o=bI(t,n);else{const i=L1(e);o={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return wm(o)}function yI(e,t){const n=t.get(e);if(n)return n;let o=Fu(e,[],!1).filter(l=>es(l)&&Ol(l)!=="body"),i=null;const s=ts(e).position==="fixed";let a=s?Fl(e):e;for(;es(a)&&!Lu(a);){const l=ts(a),c=Wb(a),d=i?i.position:s?"fixed":"";!c&&(d==="fixed"||d==="absolute"&&l.position==="static")?o=o.filter(h=>h!==a):i=l,a=Fl(a)}return t.set(e,o),o}function vI(e){let{element:t,boundary:n,rootBoundary:o,strategy:i}=e;const a=[...n==="clippingAncestors"?xm(t)?[]:yI(t,this._c):[].concat(n),o],l=$1(t,a[0],i);let c=l.top,d=l.right,f=l.bottom,h=l.left;for(let p=1;p<a.length;p++){const g=$1(t,a[p],i);c=js(g.top,c),d=Zc(g.right,d),f=Zc(g.bottom,f),h=js(g.left,h)}return{width:d-h,height:f-c,x:h,y:c}}function wI(e){const{width:t,height:n}=O1(e);return{width:t,height:n}}function kI(e,t,n){const o=Ia(t),i=Hs(t),s=n==="fixed",a=$l(e,!0,s,t);let l={scrollLeft:0,scrollTop:0};const c=Us(0);if((o||!s)&&((Ol(t)!=="body"||_m(i))&&(l=Em(t)),o)){const p=$l(t,!0,s,t);c.x=p.x+t.clientLeft,c.y=p.y+t.clientTop}!o&&i&&(c.x=Cm(i));const d=i&&!o&&!s?F1(i,l):Us(0),f=a.left+l.scrollLeft-c.x-d.x,h=a.top+l.scrollTop-c.y-d.y;return{x:f,y:h,width:a.width,height:a.height}}function Gb(e){return ts(e).position==="static"}function z1(e,t){if(!Ia(e)||ts(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Hs(e)===n&&(n=n.ownerDocument.body),n}function j1(e,t){const n=vr(e);if(xm(e))return n;if(!Ia(e)){let i=Fl(e);for(;i&&!Lu(i);){if(es(i)&&!Gb(i))return i;i=Fl(i)}return n}let o=z1(e,t);for(;o&&sI(o)&&Gb(o);)o=z1(o,t);return o&&Lu(o)&&Gb(o)&&!Wb(o)?n:o||cI(e)||n}const _I=async function(e){const t=this.getOffsetParent||j1,n=this.getDimensions,o=await n(e.floating);return{reference:kI(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function xI(e){return ts(e).direction==="rtl"}const EI={convertOffsetParentRelativeRectToViewportRelativeRect:fI,getDocumentElement:Hs,getClippingRect:vI,getOffsetParent:j1,getElementRects:_I,getClientRects:hI,getDimensions:wI,getScale:Xc,isElement:es,isRTL:xI};function U1(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function CI(e,t,n){let o=null,i;const s=Hs(e);function a(){var f;clearTimeout(i),(f=o)==null||f.disconnect(),o=null}function l(f,h){f===void 0&&(f=!1),h===void 0&&(h=1),a();const p=e.getBoundingClientRect(),{left:g,top:y,width:b,height:_}=p;if(f||t(),!b||!_)return;const x=ym(y),B=ym(s.clientWidth-(g+b)),R=ym(s.clientHeight-(y+_)),S=ym(g),I={rootMargin:-x+"px "+-B+"px "+-R+"px "+-S+"px",threshold:js(0,Zc(1,h))||1};let D=!0;function w(E){const F=E[0].intersectionRatio;if(!U1(p,e.getBoundingClientRect()))return l();if(F!==h){if(!D)return l();F?l(!1,F):i=setTimeout(()=>{l(!1,1e-7)},1e3)}D=!1}try{o=new IntersectionObserver(w,{...I,root:s.ownerDocument})}catch{o=new IntersectionObserver(w,I)}o.observe(e)}const c=vr(e),d=()=>l(n);return c.addEventListener("resize",d),l(!0),()=>{c.removeEventListener("resize",d),a()}}function Jc(e,t,n,o){o===void 0&&(o={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:c=!1}=o,d=Kb(e),f=i||s?[...d?Fu(d):[],...t?Fu(t):[]]:[];f.forEach(x=>{i&&x.addEventListener("scroll",n),s&&x.addEventListener("resize",n)});const h=d&&l?CI(d,n,s):null;let p=-1,g=null;a&&(g=new ResizeObserver(x=>{let[B]=x;B&&B.target===d&&g&&t&&(g.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var R;(R=g)==null||R.observe(t)})),n()}),d&&!c&&g.observe(d),t&&g.observe(t));let y,b=c?$l(e):null;c&&_();function _(){const x=$l(e);b&&!U1(b,x)&&n(),b=x,y=requestAnimationFrame(_)}return n(),()=>{var x;f.forEach(B=>{i&&B.removeEventListener("scroll",n),s&&B.removeEventListener("resize",n)}),h?.(),(x=g)==null||x.disconnect(),g=null,c&&cancelAnimationFrame(y)}}const Qc=oI,Vc=rI,ed=eI,Sm=iI,SI=(e,t,n)=>{const o=new Map,i=n??{},s={...EI,...i.platform,_c:o};return VR(e,t,{...i,platform:s})};function AI(e){return e!=null&&typeof e=="object"&&"$el"in e}function W1(e){if(AI(e)){const t=e.$el;return jb(t)&&Ol(t)==="#comment"?null:t}return e}function $u(e){return typeof e=="function"?e():r.unref(e)}function H1(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function q1(e,t){const n=H1(e);return Math.round(t*n)/n}function td(e,t,n){n===void 0&&(n={});const o=n.whileElementsMounted,i=r.computed(()=>{var D;return(D=$u(n.open))!=null?D:!0}),s=r.computed(()=>$u(n.middleware)),a=r.computed(()=>{var D;return(D=$u(n.placement))!=null?D:"bottom"}),l=r.computed(()=>{var D;return(D=$u(n.strategy))!=null?D:"absolute"}),c=r.computed(()=>{var D;return(D=$u(n.transform))!=null?D:!0}),d=r.computed(()=>W1(e.value)),f=r.computed(()=>W1(t.value)),h=r.ref(0),p=r.ref(0),g=r.ref(l.value),y=r.ref(a.value),b=r.shallowRef({}),_=r.ref(!1),x=r.computed(()=>{const D={position:g.value,left:"0",top:"0"};if(!f.value)return D;const w=q1(f.value,h.value),E=q1(f.value,p.value);return c.value?{...D,transform:"translate("+w+"px, "+E+"px)",...H1(f.value)>=1.5&&{willChange:"transform"}}:{position:g.value,left:w+"px",top:E+"px"}});let B;function R(){if(d.value==null||f.value==null)return;const D=i.value;SI(d.value,f.value,{middleware:s.value,placement:a.value,strategy:l.value}).then(w=>{h.value=w.x,p.value=w.y,g.value=w.strategy,y.value=w.placement,b.value=w.middlewareData,_.value=D!==!1})}function S(){typeof B=="function"&&(B(),B=void 0)}function O(){if(S(),o===void 0){R();return}if(d.value!=null&&f.value!=null){B=o(d.value,f.value,R);return}}function I(){i.value||(_.value=!1)}return r.watch([s,a,l,i],R,{flush:"sync"}),r.watch([d,f],O,{flush:"sync"}),r.watch(i,I,{flush:"sync"}),r.getCurrentScope()&&r.onScopeDispose(S),{x:r.shallowReadonly(h),y:r.shallowReadonly(p),strategy:r.shallowReadonly(g),placement:r.shallowReadonly(y),middlewareData:r.shallowReadonly(b),isPositioned:r.shallowReadonly(_),floatingStyles:x,update:R}}const TI=["aria-label","disabled"],Lr=r.defineComponent({name:"DCodeClearButton",__name:"DCodeClearButton",props:{disabled:{type:Boolean,default:!1},size:{default:"md"},ariaLabel:{default:"Clear input"}},emits:["clear"],setup(e,{emit:t}){const n=t,o=i=>{n("clear",i)};return(i,s)=>(r.openBlock(),r.createElementBlock("button",{type:"button",tabindex:"-1","aria-label":e.ariaLabel,disabled:e.disabled,class:r.normalizeClass(["shrink-0 flex items-center justify-center rounded-md text-gray-400 hover:text-gray-600 dark:hover:text-gray-200 hover:bg-gray-100 dark:hover:bg-neutral-700/50 active:scale-95 transition-all focus:outline-none disabled:opacity-40 disabled:pointer-events-none",e.size==="sm"?"w-6 h-6 p-0.5":"w-7 h-7 p-1"]),onMousedown:s[0]||(s[0]=r.withModifiers(()=>{},["prevent"])),onClick:r.withModifiers(o,["stop"])},[r.createVNode(r.unref(Ae.X),{class:r.normalizeClass(e.size==="sm"?"w-3.5 h-3.5":"w-4 h-4"),"stroke-width":"3"},null,8,["class"])],42,TI))}});var BI={symbol:"$",separator:",",decimal:".",errorOnInvalid:!1,precision:2,pattern:"!#",negativePattern:"-!#",format:MI,fromCents:!1},K1=function(t){return Math.round(t)},Yb=function(t){return Math.pow(10,t)},PI=function(t,n){return K1(t/n)*n},NI=/(\d)(?=(\d{3})+\b)/g,DI=/(\d)(?=(\d\d)+\d\b)/g;function rn(e,t){var n=this;if(!(n instanceof rn))return new rn(e,t);var o=Object.assign({},BI,t),i=Yb(o.precision),s=Am(e,o);n.intValue=s,n.value=s/i,o.increment=o.increment||1/i,o.useVedic?o.groups=DI:o.groups=NI,this.s=o,this.p=i}function Am(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=0,i=t.decimal,s=t.errorOnInvalid,a=t.precision,l=t.fromCents,c=Yb(a),d=typeof e=="number",f=e instanceof rn;if(f&&l)return e.intValue;if(d||f)o=f?e.value:e;else if(typeof e=="string"){var h=new RegExp("[^-\\d"+i+"]","g"),p=new RegExp("\\"+i,"g");o=e.replace(/\((.*)\)/,"-$1").replace(h,"").replace(p,"."),o=o||0}else{if(s)throw Error("Invalid Input");o=0}return l||(o*=c,o=o.toFixed(4)),n?K1(o):o}function MI(e,t){var n=t.pattern,o=t.negativePattern,i=t.symbol,s=t.separator,a=t.decimal,l=t.groups,c=(""+e).replace(/^-/,"").split("."),d=c[0],f=c[1];return(e.value>=0?n:o).replace("!",i).replace("#",d.replace(l,"$1"+s)+(f?a+f:""))}rn.prototype={add:function(t){var n=this.intValue,o=this.s,i=this.p;return rn((n+=Am(t,o))/(o.fromCents?1:i),o)},subtract:function(t){var n=this.intValue,o=this.s,i=this.p;return rn((n-=Am(t,o))/(o.fromCents?1:i),o)},multiply:function(t){var n=this.intValue,o=this.s;return rn((n*=t)/(o.fromCents?1:Yb(o.precision)),o)},divide:function(t){var n=this.intValue,o=this.s;return rn(n/=Am(t,o,!1),o)},distribute:function(t){for(var n=this.intValue,o=this.p,i=this.s,s=[],a=Math[n>=0?"floor":"ceil"](n/t),l=Math.abs(n-a*t),c=i.fromCents?1:o;t!==0;t--){var d=rn(a/c,i);l-- >0&&(d=d[n>=0?"add":"subtract"](1/c)),s.push(d)}return s},dollars:function(){return~~this.value},cents:function(){var t=this.intValue,n=this.p;return~~(t%n)},format:function(t){var n=this.s;return typeof t=="function"?t(this,n):n.format(this,Object.assign({},n,t))},toString:function(){var t=this.intValue,n=this.p,o=this.s;return PI(t/n,o.increment).toFixed(o.precision)},toJSON:function(){return this.value}};const RI=e=>new Intl.NumberFormat("id-ID",{style:"currency",currency:"IDR",minimumFractionDigits:0,maximumFractionDigits:0}).format(e),Zb=(e,t="IDR")=>{const n=Number(e);if(isNaN(n))return"-";switch(t.toUpperCase()){case"USD":return rn(n,{symbol:"$",separator:",",decimal:".",precision:2}).format();case"EUR":return rn(n,{symbol:"€",separator:".",decimal:",",precision:2}).format();case"IDR":return rn(n,{symbol:"Rp",separator:".",decimal:",",precision:0}).format();case"JPY":return rn(n,{symbol:"¥",separator:",",decimal:".",precision:0}).format();case"GBP":return rn(n,{symbol:"£",separator:",",decimal:".",precision:2}).format();case"CNY":return rn(n,{symbol:"¥",separator:",",decimal:".",precision:2}).format();case"KRW":return rn(n,{symbol:"₩",separator:",",decimal:".",precision:0}).format();case"SGD":return rn(n,{symbol:"$",separator:",",decimal:".",precision:2}).format();case"AUD":return rn(n,{symbol:"$",separator:",",decimal:".",precision:2}).format();case"CAD":return rn(n,{symbol:"$",separator:",",decimal:".",precision:2}).format();case"CHF":return rn(n,{symbol:"Fr",separator:",",decimal:".",precision:2}).format();case"NZD":return rn(n,{symbol:"$",separator:",",decimal:".",precision:2}).format();case"SEK":return rn(n,{symbol:"kr",separator:",",decimal:".",precision:2}).format();case"NOK":return rn(n,{symbol:"kr",separator:",",decimal:".",precision:2}).format();case"DKK":return rn(n,{symbol:"kr",separator:",",decimal:".",precision:2}).format();case"BRL":return rn(n,{symbol:"R$",separator:",",decimal:".",precision:2}).format();case"INR":return rn(n,{symbol:"₹",separator:",",decimal:".",precision:2}).format();case"TRY":return rn(n,{symbol:"₺",separator:",",decimal:".",precision:2}).format();case"ZAR":return rn(n,{symbol:"R",separator:",",decimal:".",precision:2}).format();case"RUB":return rn(n,{symbol:"₽",separator:",",decimal:".",precision:2}).format();case"PLN":return rn(n,{symbol:"zł",separator:",",decimal:".",precision:2}).format();case"HUF":return rn(n,{symbol:"Ft",separator:",",decimal:".",precision:2}).format();case"CZK":return rn(n,{symbol:"Kč",separator:",",decimal:".",precision:2}).format();case"THB":return rn(n,{symbol:"฿",separator:",",decimal:".",precision:2}).format();case"MYR":return rn(n,{symbol:"RM",separator:",",decimal:".",precision:2}).format();case"PHP":return rn(n,{symbol:"₱",separator:",",decimal:".",precision:2}).format();case"VND":return rn(n,{symbol:"₫",separator:",",decimal:".",precision:2}).format();default:return rn(n).format()}},nd=(e,t="short",n="id-ID")=>{let o;if(e instanceof Date)o=e;else if(Array.isArray(e)){const[c,d,f,h=0,p=0,g=0]=e;o=new Date(c,d-1,f,h,p,g)}else if(typeof e=="string"||typeof e=="number")o=new Date(e);else return"-";if(isNaN(o.getTime()))return"-";const i=c=>String(c).padStart(2,"0"),s=c=>`${i(c.getHours())}:${i(c.getMinutes())}:${i(c.getSeconds())}`,l={id:"id-ID",en:"en-GB"}[n]||n;return t==="time"?s(o):t==="datetime"?new Intl.DateTimeFormat(l,{day:"2-digit",month:"long",year:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(o):t==="long"?new Intl.DateTimeFormat(l,{day:"2-digit",month:"long",year:"numeric",hour:"2-digit",minute:"2-digit"}).format(o):new Intl.DateTimeFormat(l,{day:"2-digit",month:"short",year:"numeric"}).format(o)},II=(e,t)=>{let n;if(e instanceof Date)n=e;else if(typeof e=="string"||typeof e=="number")n=new Date(e);else return"-";if(isNaN(n.getTime()))return"-";const o=p=>p.toString().padStart(2,"0"),i=n.getDate(),s=n.getMonth()+1,a=n.getFullYear(),l=o(n.getHours()),c=o(n.getMinutes()),d=o(n.getSeconds()),f=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];return{"DD-MM-YYYY":`${o(i)}-${o(s)}-${a}`,"DD MMM YYYY":`${o(i)} ${f[s-1]} ${a}`,"YYYY-MM-DD":`${a}-${o(s)}-${o(i)}`,"MM/DD/YYYY":`${o(s)}/${o(i)}/${a}`,"DD/MM/YYYY":`${o(i)}/${o(s)}/${a}`,"DD-MMM-YYYY":`${o(i)}-${f[s-1]}-${a}`,"DD-MM-YYYY HH:mm":`${o(i)}-${o(s)}-${a} ${l}:${c}`,"DD MMM YYYY HH:mm":`${o(i)} ${f[s-1]} ${a} ${l}:${c}`,"YYYY-MM-DD HH:mm":`${a}-${o(s)}-${o(i)} ${l}:${c}`,"YYYY-MM-DD HH:mm:ss":`${a}-${o(s)}-${o(i)} ${l}:${c}:${d}`}[t]||nd(e,"long")},OI=(e,t)=>{let n;return(...o)=>{clearTimeout(n),n=setTimeout(()=>e(...o),t)}},LI=e=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e),FI=e=>new Promise((t,n)=>{const o=document.createElement("textarea");o.value=e,o.style.top="0",o.style.left="0",o.style.position="fixed",document.body.appendChild(o),o.focus(),o.select();try{document.execCommand("copy")?t():n(new Error("Copy command was unsuccessful"))}catch(i){n(i)}finally{document.body.removeChild(o)}}),$I=async e=>navigator.clipboard&&window.isSecureContext?navigator.clipboard.writeText(e):FI(e),zI={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl","2xl":"rounded-2xl","3xl":"rounded-3xl",full:"rounded-full"},sn=e=>e?e.startsWith("rounded")?e:zI[e]||`rounded-${e}`:"",Zn=e=>{switch(e){case"sm":return"h-8 px-2.5 text-sm";case"lg":return"h-11 px-3.5 text-base";default:return"h-10 px-3 text-sm"}},Ti=(e,t)=>{if(!e)return null;if(t[e])return t[e];const n=e.split(/[-_]/).map(o=>o.charAt(0).toUpperCase()+o.slice(1).toLowerCase()).join("");return t[n]||null},G1={"mdi-view-dashboard":"LayoutDashboard","mdi-dashboard":"LayoutDashboard","mdi-account-group":"Users","mdi-account-multiple":"Users","mdi-account":"User","mdi-account-cog":"UserCog","mdi-account-star":"UserStar","mdi-square-rounded-badge-outline":"Badge","mdi-robot-happy-outline":"Bot","mdi-poll":"Vote","mdi-monitor-eye":"MonitorCheck","mdi-file-excel-outline":"FileSpreadsheet","mdi-book-settings-outline":"BookOpenCheck","mdi-airplane-check":"PlaneTakeoff","mdi-scoreboard-outline":"Trophy","mdi-playlist-check":"ListChecks","mdi-page-layout-sidebar-left":"PanelLeft"},jI=e=>e.split(/[-_]/).filter(Boolean).map(t=>t.charAt(0).toUpperCase()+t.slice(1).toLowerCase()).join(""),UI=(e,t)=>{if(!e)return null;const n=e.trim().replace(/^(mdi-light|mdi|fa|fas|far)\s+/,""),o=G1[n]||G1[n.replace(/-outline$/,"")];if(o&&t[o])return t[o];const i=Ti(n,t);if(i)return i;const s=jI(n.replace(/^mdi-/,"").replace(/-outline$/,""));return t[s]||t[`${s}Icon`]||null},WI=["aria-busy"],HI=["for"],qI={key:0,class:"ml-1 text-destructive"},KI={class:"relative w-full flex-1"},GI={key:0,class:"flex items-center self-stretch px-3 bg-gray-50 dark:bg-neutral-800 border-r border-gray-300 dark:border-gray-700 flex-shrink-0"},YI={class:"text-sm font-semibold text-gray-500 dark:text-gray-400 whitespace-nowrap select-none"},ZI={key:1,class:"flex items-center text-gray-500 gap-2 pl-3"},XI=["id","placeholder","disabled","readonly","value"],JI={class:"flex items-center"},QI={key:0,class:"h-5 w-5 animate-spin text-gray-500",viewBox:"0 0 24 24",fill:"none"},VI=["disabled"],eO={key:2,class:"flex items-center self-stretch px-3 bg-gray-50 dark:bg-neutral-800 border-l border-gray-300 dark:border-gray-700 flex-shrink-0"},tO={class:"text-sm font-semibold text-gray-500 dark:text-gray-400 whitespace-nowrap select-none"},nO=["aria-selected","onMouseenter","onClick"],oO={key:0},rO={key:0,class:"px-3 py-2 text-xs text-center text-gray-400 dark:text-gray-500 flex items-center justify-center gap-2 border-t border-gray-100 dark:border-neutral-700/50"},iO={class:"px-3 py-2 text-sm text-gray-500 dark:text-gray-400 h-10 flex items-center"},sO={key:0},aO={key:1},lO={key:2},cO={key:0,class:"mt-1 text-xs text-red-600"},zu=r.defineComponent({name:"DCodeAutoComplete",inheritAttrs:!1,__name:"DCodeAutoComplete",props:{modelValue:{},label:{default:""},placeholder:{},clearable:{type:Boolean,default:!1},required:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},visible:{type:Boolean,default:!0},skeleton:{type:Boolean,default:!1},error:{default:null},apiOptions:{},apiModule:{},apiAction:{},autoFetchOnOpen:{type:Boolean,default:!0},autoFetchOnMount:{type:Boolean,default:!1},itemTitle:{type:[String,Function],default:"name"},itemValue:{type:[String,Function],default:"id"},options:{},items:{},returnObject:{type:Boolean,default:!1},endpoint:{},apiParams:{default:()=>({})},fetchItems:{},icon:{},openOnFocus:{type:Boolean,default:!1},pageSize:{default:20},threshold:{default:100},searchParamName:{default:"keyword"},debounceMs:{default:300},labelPosition:{default:"top"},labelWidth:{default:"150px"},prefix:{},suffix:{},size:{default:"default"},rounded:{default:"lg"},searchable:{type:Boolean,default:!0}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,o=t,i=r.useAttrs(),s=r.computed(()=>i.label??n.label),a=Se=>{const Ie=i[Se];return Ie===""||Ie===!0||Ie==="true"||Ie===1||Ie==="1"},l=r.ref(!1),c=r.computed(()=>n.itemTitle||i["item-title"]||i.itemTitle||"name"),d=r.computed(()=>n.itemValue||i["item-value"]||i.itemValue||"id"),f=r.computed(()=>n.disabled),h=r.computed(()=>a("required")||n.required),p=r.computed(()=>n.readonly||a("readonly")),g=r.computed(()=>{const Se=n.searchable===void 0?i.searchable:n.searchable;return Se==null?!0:Se!==!1&&Se!=="false"&&Se!=="0"&&Se!==0}),y=r.computed(()=>`${Zn(n.size)} ${sn(n.rounded)}`),b=r.computed(()=>n.returnObject||a("return-object")||a("returnObject")),_=r.computed(()=>h.value||a("aria-required")),x=r.computed(()=>n.error||i["error-message"]),B=r.computed(()=>n.placeholder??i.placeholder??""),R=r.computed(()=>{const Se=i.minChars??i["min-chars"];if(Se==null||Se==="")return 0;const Ie=typeof Se=="number"?Se:Number.parseInt(String(Se),10);return Number.isFinite(Ie)&&Ie>0?Ie:0}),S=r.computed(()=>{const Se=i.rules;return Array.isArray(Se)?Se:[]}),O=r.computed(()=>{const Se=i.id||i.label;return Se?`app-autocomplete-${Se}-${Math.random().toString(36).slice(2,7)}`:void 0}),I=r.ref(n.modelValue),{DCodeApi:D}=r.inject("externalApi")||{},w=r.ref([]),E=r.ref([]),F=Se=>{E.value=[...E.value,...Se].filter((Ie,Je,wt)=>wt.findIndex(gt=>se(gt)===se(Ie))===Je)},A=r.ref(!1),P=r.ref(!1),q=r.ref(1),Q=r.ref(!0),re=r.ref(0),ie=r.ref(),le=r.computed(()=>n.options||n.items||i.items||i.options),X=r.computed(()=>{const Se=k.value;return!!(Se.apiModule&&Se.apiAction||Se.apiUrl||n.fetchItems)}),K=r.ref(""),W=Se=>{if(Se==null)return"";if(typeof Se=="string"||typeof Se=="number")return String(Se);const Ie=c.value;return typeof Ie=="function"?Ie(Se):Se?.[Ie]??Se?.name??Se?.nama??Se?.label??Se?.title??"-"},se=Se=>{if(Se==null)return null;if(typeof Se=="string"||typeof Se=="number")return Se;const Ie=d.value;return typeof Ie=="function"?Ie(Se):Se?.[Ie]??Se?.id??Se?.value??Se?.code??null},H=r.computed(()=>{const Se=I.value;if(Se==null||Se==="")return"";const Ie=(gt,Re)=>{if(gt==null||Re==null)return!1;const Le=se(Re),ve=Re?.id,Ne=Re?.code,Ge=W(Re);return String(gt)===String(Le)||ve!=null&&String(gt)===String(ve)||Ne!=null&&String(gt)===String(Ne)||Ge!=null&&String(gt)===String(Ge)},Je=[...E.value||[],...le.value||[]];if(Array.isArray(Se))return Se.length?Se.map(Re=>{if(b.value&&typeof Re=="object"||typeof Re=="object")return W(Re);const Le=Je.find(ve=>Ie(Re,ve));return Le?W(Le):String(Re)}).join(", "):"";if(typeof Se=="object")return W(Se);const wt=Je.find(gt=>Ie(Se,gt));return wt?W(wt):String(Se)}),N=r.computed(()=>{const Se=le.value??[],Ie=(K.value||"").trim();return X.value&&g.value&&!!Ie&&Ie.toLowerCase()!==(H.value||"").toLowerCase()?w.value:Se.length>0?Se:X.value&&(w.value.length>0||P.value)?w.value:Se}),j=r.computed(()=>!!i.loading),Y=r.computed(()=>j.value||A.value),J=r.computed(()=>{const{label:Se,items:Ie,options:Je,loading:wt,rules:gt,"item-title":Re,"item-value":Le,itemTitle:ve,itemValue:Ne,minChars:Ge,"min-chars":pt,clearable:Tt,required:At,"aria-required":rt,disabled:ht,readonly:Nt,visible:wn,"return-object":qn,returnObject:Ro,class:kt,"fetch-items":Mr,fetchItems:Ea,error:jn,errorMessage:Zi,"error-message":Al,...lr}=i||{};return lr}),U=()=>{if(n.apiOptions)return typeof n.apiOptions=="function"?n.apiOptions():n.apiOptions},k=r.computed(()=>{const Se=n.endpoint||{};return{apiModule:n.apiModule||Se.apiModule,apiAction:n.apiAction||Se.apiAction,apiUrl:Se.apiUrl,apiMethod:Se.apiMethod||"GET"}}),C=r.ref(null),T=r.ref(null),M=r.ref(null),{floatingStyles:$,update:ne}=td(T,M,{placement:"bottom-start",whileElementsMounted:Jc,middleware:[Qc(4),ed({padding:8,rootBoundary:"viewport",altBoundary:!0}),Vc({padding:8}),Sm({padding:5,apply({rects:Se,elements:Ie,availableHeight:Je}){Object.assign(Ie.floating.style,{width:`${Se.reference.width}px`,maxHeight:`${Je}px`})}})]});r.watch(N,()=>{te.value&&setTimeout(()=>{ne()},0)});const te=r.ref(!1),ce=r.ref(-1),ke=r.ref(null),we=r.computed(()=>!R.value||(K.value||"").trim().length>=R.value?"":`Ketik minimal ${R.value} karakter`),_e=r.computed(()=>{const Se=N.value||[],Ie=(K.value||"").trim().toLowerCase(),Je=(H.value||"").toLowerCase(),wt=!Ie||Ie===Je;let gt=Se;if(!wt&&!X.value&&g.value&&(gt=Se.filter(Re=>W(Re).toLowerCase().includes(Ie))),gt.length>0){const Re=Le=>{const ve=se(Le);return Array.isArray(I.value)?I.value.some(Ne=>Ne==ve):I.value==ve};gt=[...gt].sort((Le,ve)=>{const Ne=Re(Le),Ge=Re(ve);return Ne&&!Ge?-1:!Ne&&Ge?1:0})}return gt}),fe=Se=>Array.isArray(Se)?Se.length===0:Se==null||Se==="",de=Se=>{if(ke.value=null,h.value&&fe(Se)&&!S.value.length)return ke.value="This field is required",!1;for(const Ie of S.value){const Je=Ie(Se);if(Je===!1)return ke.value="Invalid value",!1;if(typeof Je=="string")return ke.value=Je,!1}return!0},Z=async()=>{if(f.value||p.value)return;te.value=!0,ce.value=_e.value.length?0:-1,K.value=H.value||"";const Se=k.value,Ie=Se.apiModule&&Se.apiAction||Se.apiUrl||n.fetchItems;n.autoFetchOnOpen&&Ie&&(await Ue(!0),ce.value=_e.value.length?0:-1)},ee=()=>{te.value=!1,ce.value=-1,K.value=H.value||""},pe=Se=>{const Ie=b.value?Se:se(Se);let Je=Ie;const wt=a("multiple");Array.isArray(I.value)&&wt&&(Je=[Ie]),I.value=Je,o("update:modelValue",Je),ke.value=null,de(Je),K.value=W(Se),ee()},Be=(Se=!0)=>{w.value=[],P.value=!1,q.value=1,Q.value=!0,Se&&(I.value=Array.isArray(I.value)?[]:null,o("update:modelValue",I.value),K.value=""),ke.value=null},Te=()=>{l.value=!0,Be(),ee(),setTimeout(()=>{l.value=!1},0)},Oe=Se=>{if(f.value||p.value||!g.value)return;K.value=Se.target.value,ke.value&&(ke.value=null),te.value||(te.value=!0),ce.value=_e.value.length?0:-1,(k.value.apiModule&&k.value.apiAction||k.value.apiUrl||n.fetchItems)&&(ie.value&&clearTimeout(ie.value),ie.value=setTimeout(()=>{Ue(!0)},n.debounceMs??300))},Fe=Se=>{if(f.value||p.value)return;({ArrowDown:()=>{if(Se.preventDefault(),!te.value){Z();return}_e.value.length&&(ce.value=Math.min(ce.value+1,_e.value.length-1))},ArrowUp:()=>{!te.value||!_e.value.length||(Se.preventDefault(),ce.value=Math.max(ce.value-1,0))},Enter:()=>{if(!te.value)return;Se.preventDefault();const Je=_e.value[ce.value];Je&&pe(Je)},Escape:()=>{Se.preventDefault(),ee()},Tab:()=>{ee()}})[Se.key]?.()},Ue=async(Se=!0)=>{const Ie=k.value;if(!(Ie.apiModule&&Ie.apiAction||Ie.apiUrl||n.fetchItems)||(Se&&(q.value=1,Q.value=!0),!Q.value||A.value))return;A.value=!0;const wt=++re.value;try{let gt;const Re=n.pageSize??20,ve=!K.value||K.value===H.value?"":K.value.trim();if(n.fetchItems){const Ge=U()||{},pt={page:Se?1:q.value,perPage:Re,search:ve,[n.searchParamName??"keyword"]:ve,...Ge,...n.apiParams},Tt=await n.fetchItems(pt),At=Tt?.data??Tt;gt=At?.data??At}else{if(typeof D!="function"){console.error("[DCodeAutoComplete] useApi() must expose DCodeApi()");return}const Ge=U()||{},pt={page:Se?1:q.value,perPage:Re,[n.searchParamName??"keyword"]:ve,...Ge,...n.apiParams};let Tt;Ie.apiUrl?Tt=await D("","",pt,{_url:Ie.apiUrl,_method:Ie.apiMethod||"POST"}):Tt=await D(Ie.apiModule,Ie.apiAction,pt);const At=Tt?.data??Tt;gt=At?.data??At}if(wt!==re.value)return;const Ne=Array.isArray(gt)?gt:[];F(Ne),Se?(w.value=Ne,q.value=2):(w.value=[...w.value,...Ne],q.value++),Q.value=Ne.length>=Re,P.value=!0}catch(gt){console.error("[DCodeAutoComplete][fetchOptions] ERROR:",gt),ke.value=`[DCodeAutoComplete][fetchOptions] ERROR: Error: ${gt?.message||gt?.toString()||"Failed to load options"}`,Se&&(w.value=[]),P.value=!0}finally{A.value=!1}},Qe=Se=>{if(!Q.value||A.value)return;const Ie=Se.target,{scrollTop:Je,scrollHeight:wt,clientHeight:gt}=Ie;Je+gt>=wt-(n.threshold??100)&&Ue(!1)},Ve=Se=>{const Ie=se(Se),Je=Se?.id,wt=Se?.code,gt=W(Se),Re=Le=>Le==null?!1:String(Le)===String(Ie)||Je!=null&&String(Le)===String(Je)||wt!=null&&String(Le)===String(wt)||gt!=null&&String(Le)===String(gt);return b.value?I.value?Array.isArray(I.value)?I.value.some(Le=>Re(Le)):Re(I.value):!1:Array.isArray(I.value)?I.value.some(Le=>Re(Le)):Re(I.value)};r.watch(()=>[U(),k.value,n.apiParams],([Se,Ie,Je],[wt,gt,Re])=>{const Le=k.value;if(!(Le.apiModule&&Le.apiAction||Le.apiUrl||n.fetchItems)){(!le.value||le.value.length===0)&&Be();return}const Ne=JSON.stringify(Se??null)===JSON.stringify(wt??null),Ge=JSON.stringify(Je??null)===JSON.stringify(Re??null);if(Ne&&Ge)return;const pt=P.value&&Je!=null;Be(pt),!Ge&&Je!=null&&Ue()},{deep:!0}),r.watch(()=>n.modelValue,(Se,Ie)=>{I.value=Se,!l.value&&(Se==null||Se==="")&&Ie!=null&&n.apiModule&&n.apiAction&&(w.value=[],P.value=!1),K.value=H.value||""},{immediate:!0}),r.watch(()=>[N.value,I.value],([Se,Ie])=>{if(!Se||Se.length===0||Ie==null||Ie==="")return;let Je=!1,wt=Ie;const gt=Re=>{const Le=Se.find(ve=>{const Ne=se(ve),Ge=ve?.id,pt=ve?.code,Tt=W(ve);return String(Re)===String(Ne)||Ge!=null&&String(Re)===String(Ge)||pt!=null&&String(Re)===String(pt)||Tt!=null&&String(Re)===String(Tt)});if(Le){const ve=b.value?Le:se(Le);if(String(Re)!==String(ve)&&typeof Re!="object")return{updated:!0,value:ve}}return{updated:!1,value:Re}};if(Array.isArray(Ie)){const Re=Ie.map(Le=>gt(Le));Re.some(Le=>Le.updated)&&(Je=!0,wt=Re.map(Le=>Le.value))}else{const Re=gt(Ie);Re.updated&&(Je=!0,wt=Re.value)}Je&&(I.value=wt,o("update:modelValue",wt),setTimeout(()=>{K.value=H.value||""},0))},{immediate:!0,deep:!0});const Xe=k.value;(Xe.apiModule&&Xe.apiAction||Xe.apiUrl||n.fetchItems)&&(n.autoFetchOnMount||!fe(n.modelValue))&&Ue();const Ce=Se=>{const Ie=C.value,Je=M.value,wt=Se.target;Ie&&Ie.contains(wt)||Je&&Je.contains(wt)||te.value&&ee()},Pe=r.computed(()=>{const Se=n.modelValue;return Se==null?!1:typeof Se=="string"?Se.trim().length>0:Array.isArray(Se)?Se.length>0:typeof Se=="object"?Object.keys(Se).length>0:!0}),qe=r.computed(()=>!!n.clearable&&Pe.value&&!n.disabled);return r.onMounted(()=>{document.addEventListener("mousedown",Ce)}),r.onBeforeUnmount(()=>{document.removeEventListener("mousedown",Ce),ie.value&&clearTimeout(ie.value)}),(Se,Ie)=>r.withDirectives((r.openBlock(),r.createElementBlock("div",{ref_key:"rootEl",ref:C,class:r.normalizeClass(["flex flex-col gap-1 w-full",[r.unref(i).class,f.value?"cursor-not-allowed":""]]),"aria-busy":e.skeleton},[e.skeleton?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(["flex flex-1 w-full",[n.labelPosition==="left"?"flex-row items-center gap-3":"",n.labelPosition==="right"?"flex-row-reverse items-center gap-3":"",n.labelPosition==="top"?"flex-col gap-1":"",n.labelPosition==="bottom"?"flex-col-reverse gap-1":""]])},[s.value?(r.openBlock(),r.createElementBlock("div",{key:0,class:"h-4 rounded bg-gray-200 dark:bg-gray-700 animate-shimmer shrink-0",style:r.normalizeStyle(n.labelPosition==="left"||n.labelPosition==="right"?{width:n.labelWidth}:{width:"8rem"})},null,4)):r.createCommentVNode("",!0),r.createElementVNode("div",{class:r.normalizeClass(["w-full flex-1 bg-gray-200 dark:bg-gray-700 animate-shimmer",[r.unref(Zn)(n.size),r.unref(sn)(n.rounded)]])},null,2)],2)):(r.openBlock(),r.createElementBlock(r.Fragment,{key:1},[r.createElementVNode("div",{class:r.normalizeClass(["flex flex-1 w-full",[n.labelPosition==="left"?"flex-row items-center gap-3":"",n.labelPosition==="right"?"flex-row-reverse items-center gap-3":"",n.labelPosition==="top"?"flex-col gap-1":"",n.labelPosition==="bottom"?"flex-col-reverse gap-1":""]])},[s.value?(r.openBlock(),r.createElementBlock("label",{key:0,for:O.value,class:"text-sm font-medium shrink-0",style:r.normalizeStyle(n.labelPosition==="left"||n.labelPosition==="right"?{width:n.labelWidth}:{})},[r.createTextVNode(r.toDisplayString(s.value)+" ",1),_.value?(r.openBlock(),r.createElementBlock("span",qI,"*")):r.createCommentVNode("",!0)],12,HI)):r.createCommentVNode("",!0),r.createElementVNode("div",KI,[r.createElementVNode("div",{ref_key:"reference",ref:T,class:r.normalizeClass(["flex items-center w-full gap-2 border bg-white dark:bg-neutral-800 border-gray-300 dark:border-neutral-700/50 focus-within:ring-1 focus-within:ring-gray-700 dark:focus-within:ring-gray-300",y.value,f.value||p.value?"opacity-60 cursor-not-allowed":"",g.value?"":"cursor-pointer",ke.value||x.value?"border-red-500 focus-within:ring-red-500":""])},[n.prefix?(r.openBlock(),r.createElementBlock("div",GI,[r.createElementVNode("span",YI,r.toDisplayString(n.prefix),1)])):r.createCommentVNode("",!0),n.icon||Se.$slots["prepend-inner"]?(r.openBlock(),r.createElementBlock("div",ZI,[r.renderSlot(Se.$slots,"prepend-inner",{},()=>[n.icon?(r.openBlock(),r.createBlock(r.resolveDynamicComponent(n.icon),{key:0,class:"h-4 w-4"})):r.createCommentVNode("",!0)])])):r.createCommentVNode("",!0),r.createElementVNode("input",r.mergeProps(J.value,{id:O.value,type:"text",class:["flex-1 min-w-0 h-full bg-transparent outline-none text-sm text-gray-900 dark:text-gray-100 placeholder:text-gray-400",f.value||p.value?"cursor-not-allowed":g.value?"cursor-text":"cursor-pointer"],placeholder:B.value,disabled:f.value,readonly:p.value||!g.value,value:te.value?K.value:H.value||K.value,onFocus:Ie[0]||(Ie[0]=()=>{n.openOnFocus&&!te.value&&Z()}),onClick:Ie[1]||(Ie[1]=()=>{te.value?g.value||ee():Z()}),onInput:Oe,onKeydown:Fe,onBlur:Ie[2]||(Ie[2]=()=>de(I.value))}),null,16,XI),r.createElementVNode("div",JI,[Y.value?(r.openBlock(),r.createElementBlock("svg",QI,[...Ie[5]||(Ie[5]=[r.createElementVNode("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"},null,-1),r.createElementVNode("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8v4a4 4 0 00-4 4H4z"},null,-1)])])):qe.value?(r.openBlock(),r.createBlock(Lr,{key:1,disabled:f.value||p.value,onClear:Te},null,8,["disabled"])):(r.openBlock(),r.createElementBlock("button",{key:2,type:"button",class:"p-1.5 text-gray-500 hover:text-gray-700 dark:hover:text-gray-300 disabled:opacity-50 disabled:cursor-not-allowed transition-colors",disabled:f.value||p.value,onClick:Ie[3]||(Ie[3]=Je=>te.value?ee():Z()),"aria-label":"Toggle"},[r.createVNode(r.unref(Ae.ChevronDown),{class:r.normalizeClass(["h-4 w-4 transition-transform duration-200 ease-in-out",{"rotate-180":te.value}])},null,8,["class"])],8,VI))]),n.suffix?(r.openBlock(),r.createElementBlock("div",eO,[r.createElementVNode("span",tO,r.toDisplayString(n.suffix),1)])):r.createCommentVNode("",!0)],2),(r.openBlock(),r.createBlock(r.Teleport,{to:"body"},[te.value?(r.openBlock(),r.createElementBlock("div",{key:0,ref_key:"floating",ref:M,style:r.normalizeStyle(r.unref($)),role:"listbox","data-dcode-floating":"true",class:"z-[9999] pointer-events-auto overflow-hidden rounded-lg border bg-white shadow-lg border-gray-200 dark:border-neutral-700/50 dark:bg-neutral-800"},[r.createElementVNode("div",{class:"overflow-y-auto overflow-x-hidden",style:{"max-height":"350px"},onScroll:Qe},[_e.value.length?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(_e.value,(Je,wt)=>(r.openBlock(),r.createElementBlock("button",{key:se(Je)??wt,type:"button",role:"option","aria-selected":Ve(Je),class:r.normalizeClass(["w-full flex justify-between text-left px-3 py-2 text-sm hover:bg-neutral-100 dark:hover:bg-neutral-800",wt===ce.value?"bg-neutral-100 dark:bg-neutral-800":""]),onMouseenter:gt=>ce.value=wt,onMousedown:Ie[4]||(Ie[4]=r.withModifiers(()=>{},["prevent"])),onClick:r.withModifiers(gt=>pe(Je),["stop"])},[r.renderSlot(Se.$slots,"option",{option:Je,selected:Ve(Je),index:wt},()=>[r.createTextVNode(r.toDisplayString(W(Je)),1)]),Ve(Je)?(r.openBlock(),r.createElementBlock("span",oO,[r.createVNode(r.unref(Ae.Check),{class:"h-4 w-4"})])):r.createCommentVNode("",!0)],42,nO))),128)),A.value?(r.openBlock(),r.createElementBlock("div",rO,[...Ie[6]||(Ie[6]=[r.createElementVNode("svg",{class:"h-4 w-4 animate-spin text-gray-400",viewBox:"0 0 24 24",fill:"none"},[r.createElementVNode("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}),r.createElementVNode("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8v4a4 4 0 00-4 4H4z"})],-1),r.createElementVNode("span",null,"Loading more…",-1)])])):r.createCommentVNode("",!0)],64)):r.renderSlot(Se.$slots,"no-data",{},()=>[r.createElementVNode("div",iO,[Y.value?(r.openBlock(),r.createElementBlock("span",sO,"Loading data…")):we.value?(r.openBlock(),r.createElementBlock("span",aO,r.toDisplayString(we.value),1)):(r.openBlock(),r.createElementBlock("span",lO,"No data available"))])],void 0,1)],32)],4)):r.createCommentVNode("",!0)]))])],2),ke.value||x.value?(r.openBlock(),r.createElementBlock("p",cO,r.toDisplayString(ke.value||x.value),1)):r.createCommentVNode("",!0)],64))],10,WI)),[[r.vShow,e.visible]])}}),dO=["aria-busy"],uO={key:0,class:"mb-1 h-4 w-32 rounded bg-gray-200 dark:bg-gray-700 animate-pulse"},fO=["for"],hO={key:0,class:"ml-1 text-destructive"},mO={class:"relative"},pO={key:0,class:"flex items-center text-gray-500 gap-2"},gO=["id","placeholder","disabled","readonly","value"],bO={key:1,class:"h-6 w-6 animate-spin text-gray-500",viewBox:"0 0 24 24",fill:"none"},yO=["disabled"],vO={key:0,class:"px-3 py-2 text-sm text-gray-500 dark:text-gray-400"},wO=["onMouseenter","onClick"],kO={class:"flex items-center space-x-3"},_O={class:"flex-1"},xO={class:"text-sm font-medium text-gray-900 dark:text-gray-100"},EO={key:0,class:"text-xs text-gray-500 dark:text-gray-400"},CO={key:0},SO={class:"text-[10px] text-gray-300 font-light select-none"},AO={key:3,class:"px-3 py-2 text-sm text-gray-500 dark:text-gray-400"},TO={key:1,class:"mt-1 text-xs text-red-600"},BO={key:2,class:"mt-1 text-xs text-gray-500"},Tm=r.defineComponent({name:"DCodeInfiniteAutoComplete",inheritAttrs:!1,__name:"DCodeInfiniteAutoComplete",props:{modelValue:{},label:{default:""},placeholder:{default:"Select an option"},clearable:{type:Boolean,default:!1},required:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},visible:{type:Boolean,default:!0},skeleton:{type:Boolean,default:!1},error:{default:null},apiModule:{},apiAction:{},apiOptions:{},autoFetchOnOpen:{type:Boolean,default:!0},refreshOnOpen:{type:Boolean,default:!1},autoFetchOnMount:{type:Boolean,default:!1},itemTitle:{type:[String,Function],default:"name"},itemValue:{type:[String,Function],default:"id"},itemSubtitle:{},returnObject:{type:Boolean,default:!1},endpoint:{},apiUrl:{},apiMethod:{},apiParams:{},fetchItems:{},icon:{},inputType:{default:"text"},helperText:{default:""},noResultsText:{default:"No data available"},loadingText:{default:"Loading data…"},pageSize:{default:7},searchParamName:{default:"keyword"},threshold:{default:100},debounceMs:{default:300},pageSizeParamName:{default:"perPage"},size:{default:"default"},rounded:{default:"lg"}},emits:["update:modelValue","focus","blur","select","search","load-more","end-of-results","error"],setup(e,{emit:t}){const n=e,o=t,i=r.useAttrs(),s=r.computed(()=>`${Zn(n.size)} ${sn(n.rounded)}`),a=r.ref(),l=r.ref(),c=r.ref(),d=r.ref(),f=r.ref(),h=r.computed(()=>{const T=n.label||n.placeholder;return T?`app-infinite-autocomplete-${T}-${Math.random().toString(36).slice(2,7)}`:void 0}),p=r.computed(()=>{const M=n.pageSize*36;return`${Math.min(M-4,300)}px`}),g=r.ref(""),y=r.ref([]),b=r.ref(!1),_=r.ref(!1),x=r.ref(-1),B=r.ref(1),R=r.ref(!0),S=r.ref(0),O=r.ref(!1),I=r.ref(""),D=r.inject("externalApi")||{},w=r.ref(0),E=r.ref(),F=r.ref(!1),{floatingStyles:A}=td(d,f,{placement:"bottom-start",whileElementsMounted:Jc,middleware:[Qc(4),ed({padding:5}),Vc({padding:5}),Sm({padding:5,apply({rects:T,elements:M}){Object.assign(M.floating.style,{width:`${T.reference.width}px`})}})]});r.computed(()=>({"opacity-50 pointer-events-none":n.disabled,relative:!0}));const P=r.computed(()=>!!n.error),q=r.computed(()=>y.value),Q=r.ref(""),re=()=>{_.value=!0},ie=()=>{_.value=!1},le=T=>typeof n.itemTitle=="function"?n.itemTitle(T):T[n.itemTitle]||"",X=T=>typeof n.itemValue=="function"?n.itemValue(T):T[n.itemValue]||T,K=T=>n.itemSubtitle?typeof n.itemSubtitle=="function"?n.itemSubtitle(T):T[n.itemSubtitle]||"":"",W=T=>{if(!n.modelValue)return!1;const M=X(T),$=T?.id,ne=T?.code,te=ce=>{if(ce==null)return!1;const ke=n.returnObject&&typeof ce=="object"&&ce!==null?X(ce):ce;return String(ke)===String(M)||$!=null&&String(ke)===String($)||ne!=null&&String(ke)===String(ne)};return Array.isArray(n.modelValue)?n.modelValue.some(ce=>te(ce)):te(n.modelValue)},se=T=>{const M=le(T);I.value=M,g.value=M,Q.value=M,o("update:modelValue",n.returnObject?T:X(T)),o("select",T),_.value=!1,O.value=!1},H=()=>{o("update:modelValue",null),g.value="",I.value="",Q.value="",_.value=!1,O.value=!1},N=()=>{if(n.disabled||n.readonly||_.value)return;_.value=!0;const T=I.value||"";g.value=T,Q.value=T,O.value=!0,n.autoFetchOnOpen&&!b.value&&C(!0,!0)},j=T=>{if(n.disabled||n.readonly)return;const M=_.value;if(_.value=!0,!M){const $=I.value||"";g.value=$,Q.value=$,O.value=!0,n.autoFetchOnOpen&&!b.value&&C(!0,!0)}o("focus",T)},Y=T=>{setTimeout(()=>{_.value=!1,O.value=!1,Q.value=I.value||"",g.value=I.value||"",o("blur",T)},200)},J=T=>{const M=T.target;O.value=!0,g.value=M.value,Q.value=M.value,_.value||(_.value=!0),E.value&&clearTimeout(E.value),E.value=setTimeout(()=>{o("search",g.value),B.value=1,R.value=!0,C(!0)},n.debounceMs)},U=T=>{if(_.value)switch(T.key){case"ArrowDown":T.preventDefault(),x.value=Math.min(x.value+1,q.value.length-1);break;case"ArrowUp":T.preventDefault(),x.value=Math.max(x.value-1,0);break;case"Enter":T.preventDefault(),x.value>=0&&q.value[x.value]&&se(q.value[x.value]);break;case"Escape":_.value=!1;break}},k=T=>{if(!R.value||b.value)return;const M=T.target,{scrollTop:$,scrollHeight:ne,clientHeight:te}=M;$+te>=ne-n.threshold&&C()},C=async(T=!1,M=!1)=>{if(b.value)return;b.value=!0;const $=++w.value;try{let ne=[];if(n.fetchItems)ne=await n.fetchItems();else if(D?.apiUrl){const te=n.endpoint||{},ce=te.apiModule||n.apiModule,ke=te.apiAction||n.apiAction,we=te.apiUrl||n.apiUrl,_e=te.apiMethod||n.apiMethod||"GET",fe={page:T?1:B.value,[n.pageSizeParamName]:n.pageSize,[n.searchParamName]:M?"":g.value,...n.apiParams};let de;if(we)de=await D.apiUrl(we,_e,fe,{_url:we,_method:_e});else{if(!ce||!ke)throw new Error("API module and action or apiUrl are required");de=await D.apiUrl(`/${ce}/${ke}`,_e,fe)}ne=de.data||de.items||de||[],S.value=de.total||de.totalItems||de.totalData||(Array.isArray(de)?de.length:0)}if($!==w.value)return;T?(y.value=ne,B.value=2):(y.value.push(...ne),B.value++),S.value>0?R.value=y.value.length<S.value:R.value=ne.length>=n.pageSize,R.value||o("end-of-results"),o("load-more",{items:ne,page:B.value,hasMore:R.value,total:S.value})}catch(ne){console.error("Error fetching items:",ne),o("error",ne)}finally{b.value=!1,F.value=!0}};return r.watch(()=>n.apiParams,(T,M)=>{if(JSON.stringify(T)===JSON.stringify(M))return;y.value=[],B.value=1,R.value=!0,F.value&&T!=null&&(o("update:modelValue",null),I.value="",g.value=""),T!=null&&C(!0)},{deep:!0}),r.onMounted(()=>{n.autoFetchOnMount&&C()}),r.onUnmounted(()=>{E.value&&clearTimeout(E.value)}),r.watch(()=>n.modelValue,T=>{if(!T){g.value="",I.value="",Q.value="";return}if(n.returnObject&&typeof T=="object"){const M=le(T);I.value=M,Q.value=M}else if(!I.value||!O.value){const M=y.value.find($=>X($)===T);if(M){const $=le(M);I.value=$,Q.value=$}}},{immediate:!0}),(T,M)=>r.withDirectives((r.openBlock(),r.createElementBlock("div",{ref_key:"rootEl",ref:c,class:r.normalizeClass(["w-full",r.unref(i).class]),"aria-busy":e.skeleton},[e.skeleton?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[e.label?(r.openBlock(),r.createElementBlock("div",uO)):r.createCommentVNode("",!0),r.createElementVNode("div",{class:r.normalizeClass(["w-full rounded-lg bg-gray-200 dark:bg-gray-700 animate-pulse",[r.unref(Zn)(r.unref(Sm)),r.unref(sn)(e.rounded)]])},null,2)],64)):(r.openBlock(),r.createElementBlock(r.Fragment,{key:1},[e.label?(r.openBlock(),r.createElementBlock("label",{key:0,for:h.value,class:"mb-1 block text-sm font-medium text-gray-900 dark:text-gray-100"},[r.createTextVNode(r.toDisplayString(e.label)+" ",1),e.required?(r.openBlock(),r.createElementBlock("span",hO,"*")):r.createCommentVNode("",!0)],8,fO)):r.createCommentVNode("",!0),r.createElementVNode("div",mO,[r.createElementVNode("div",{ref_key:"reference",ref:d,class:r.normalizeClass(["flex items-center gap-2 border bg-white dark:bg-neutral-800 border-gray-300 dark:border-neutral-700/50 focus-within:ring-1 focus-within:ring-gray-700 dark:focus-within:ring-gray-300",[s.value,e.disabled||e.readonly?"opacity-60 cursor-not-allowed":"",P.value?"border-red-500 focus-within:ring-red-500":""]])},[n.icon?(r.openBlock(),r.createElementBlock("div",pO,[n.icon?(r.openBlock(),r.createBlock(r.resolveDynamicComponent(n.icon),{key:0,class:"h-4 w-4"})):r.createCommentVNode("",!0)])):r.createCommentVNode("",!0),r.createElementVNode("input",r.mergeProps({ref_key:"inputRef",ref:a},T.$attrs,{id:h.value,type:"text",class:["w-full bg-transparent outline-none text-sm text-gray-900 dark:text-gray-100 placeholder:text-gray-400",e.disabled||e.readonly?"cursor-not-allowed":"cursor-text"],placeholder:e.placeholder,disabled:e.disabled,readonly:e.readonly,value:Q.value,onFocus:j,onBlur:Y,onInput:J,onKeydown:U,onClick:N}),null,16,gO),b.value?(r.openBlock(),r.createElementBlock("svg",bO,[...M[4]||(M[4]=[r.createElementVNode("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"},null,-1),r.createElementVNode("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8v4a4 4 0 00-4 4H4z"},null,-1)])])):e.clearable&&e.modelValue?(r.openBlock(),r.createElementBlock("button",{key:2,type:"button",class:"shrink-0 rounded-md px-1 text-gray-500 hover:text-gray-700 dark:hover:text-gray-300",onMousedown:M[0]||(M[0]=r.withModifiers(()=>{},["prevent"])),onClick:r.withModifiers(H,["stop"]),"aria-label":"Clear"}," ✕ ",32)):(r.openBlock(),r.createElementBlock("button",{key:3,type:"button",class:"shrink-0 rounded-md px-1 text-gray-500 hover:text-gray-700 dark:hover:text-gray-300 disabled:opacity-50 disabled:cursor-not-allowed",disabled:e.disabled||e.readonly,onClick:M[1]||(M[1]=$=>_.value?ie():re()),"aria-label":"Toggle"},[r.createVNode(r.unref(Ae.ChevronDown),{class:r.normalizeClass(["h-4 w-4 transition-transform duration-200 ease-in-out",{"rotate-180":_.value}])},null,8,["class"])],8,yO))],2),(r.openBlock(),r.createBlock(r.Teleport,{to:"body"},[_.value?(r.openBlock(),r.createElementBlock("div",{key:0,ref_key:"floating",ref:f,style:r.normalizeStyle(r.unref(A)),role:"listbox","data-dcode-floating":"true",class:"z-[50] pointer-events-auto overflow-hidden rounded-lg border bg-white shadow-lg border-gray-200 dark:border-neutral-700/50 dark:bg-neutral-800"},[r.createElementVNode("div",{ref_key:"scrollContainer",ref:l,style:r.normalizeStyle({maxHeight:p.value}),class:"overflow-auto",onScroll:k},[b.value&&y.value.length===0&&!F.value?(r.openBlock(),r.createElementBlock("div",vO,r.toDisplayString(e.loadingText),1)):q.value.length?(r.openBlock(!0),r.createElementBlock(r.Fragment,{key:1},r.renderList(q.value,($,ne)=>(r.openBlock(),r.createElementBlock("button",{key:X($)??ne,type:"button",class:r.normalizeClass(["w-full flex justify-between text-left px-3 py-2 text-sm hover:bg-neutral-100 dark:hover:bg-neutral-800",ne===x.value?"bg-neutral-100 dark:bg-neutral-800":""]),onMouseenter:te=>x.value=ne,onMousedown:M[2]||(M[2]=r.withModifiers(()=>{},["prevent"])),onClick:te=>se($)},[r.renderSlot(T.$slots,"item",{item:$,index:ne},()=>[r.createElementVNode("div",kO,[r.createElementVNode("div",_O,[r.createElementVNode("div",xO,r.toDisplayString(le($)),1),e.itemSubtitle?(r.openBlock(),r.createElementBlock("div",EO,r.toDisplayString(K($)),1)):r.createCommentVNode("",!0)])])]),W($)?(r.openBlock(),r.createElementBlock("span",CO," ✓ ")):r.createCommentVNode("",!0)],42,wO))),128)):R.value&&y.value.length>0?(r.openBlock(),r.createElementBlock("div",{key:2,class:"h-10 flex items-center px-3 cursor-pointer",onClick:M[3]||(M[3]=$=>C())},[r.createElementVNode("div",SO,r.toDisplayString(e.loadingText),1)])):!b.value&&y.value.length===0?(r.openBlock(),r.createElementBlock("div",AO,r.toDisplayString(e.noResultsText),1)):r.createCommentVNode("",!0)],36)],4)):r.createCommentVNode("",!0)]))]),P.value?(r.openBlock(),r.createElementBlock("p",TO,r.toDisplayString(n.error),1)):e.helperText?(r.openBlock(),r.createElementBlock("p",BO,r.toDisplayString(e.helperText),1)):r.createCommentVNode("",!0)],64))],10,dO)),[[r.vShow,e.visible]])}});function Y1(e){var t,n,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Y1(e[t]))&&(o&&(o+=" "),o+=n)}else for(n in e)e[n]&&(o&&(o+=" "),o+=n);return o}function Z1(){for(var e,t,n=0,o="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Y1(e))&&(o&&(o+=" "),o+=t);return o}const PO=(e,t)=>{const n=new Array(e.length+t.length);for(let o=0;o<e.length;o++)n[o]=e[o];for(let o=0;o<t.length;o++)n[e.length+o]=t[o];return n},NO=(e,t)=>({classGroupId:e,validator:t}),X1=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Bm="-",J1=[],DO="arbitrary..",MO=e=>{const t=IO(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:a=>{if(a.startsWith("[")&&a.endsWith("]"))return RO(a);const l=a.split(Bm),c=l[0]===""&&l.length>1?1:0;return Q1(l,c,t)},getConflictingClassGroupIds:(a,l)=>{if(l){const c=o[a],d=n[a];return c?d?PO(d,c):c:d||J1}return n[a]||J1}}},Q1=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const i=e[t],s=n.nextPart.get(i);if(s){const d=Q1(e,t+1,s);if(d)return d}const a=n.validators;if(a===null)return;const l=t===0?e.join(Bm):e.slice(t).join(Bm),c=a.length;for(let d=0;d<c;d++){const f=a[d];if(f.validator(l))return f.classGroupId}},RO=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),o=t.slice(0,n);return o?DO+o:void 0})(),IO=e=>{const{theme:t,classGroups:n}=e;return OO(n,t)},OO=(e,t)=>{const n=X1();for(const o in e){const i=e[o];Xb(i,n,o,t)}return n},Xb=(e,t,n,o)=>{const i=e.length;for(let s=0;s<i;s++){const a=e[s];LO(a,t,n,o)}},LO=(e,t,n,o)=>{if(typeof e=="string"){FO(e,t,n);return}if(typeof e=="function"){$O(e,t,n,o);return}zO(e,t,n,o)},FO=(e,t,n)=>{const o=e===""?t:V1(t,e);o.classGroupId=n},$O=(e,t,n,o)=>{if(jO(e)){Xb(e(o),t,n,o);return}t.validators===null&&(t.validators=[]),t.validators.push(NO(n,e))},zO=(e,t,n,o)=>{const i=Object.entries(e),s=i.length;for(let a=0;a<s;a++){const[l,c]=i[a];Xb(c,V1(t,l),n,o)}},V1=(e,t)=>{let n=e;const o=t.split(Bm),i=o.length;for(let s=0;s<i;s++){const a=o[s];let l=n.nextPart.get(a);l||(l=X1(),n.nextPart.set(a,l)),n=l}return n},jO=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,UO=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),o=Object.create(null);const i=(s,a)=>{n[s]=a,t++,t>e&&(t=0,o=n,n=Object.create(null))};return{get(s){let a=n[s];if(a!==void 0)return a;if((a=o[s])!==void 0)return i(s,a),a},set(s,a){s in n?n[s]=a:i(s,a)}}},Jb="!",ex=":",WO=[],tx=(e,t,n,o,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:o,isExternal:i}),HO=e=>{const{prefix:t,experimentalParseClassName:n}=e;let o=i=>{const s=[];let a=0,l=0,c=0,d;const f=i.length;for(let b=0;b<f;b++){const _=i[b];if(a===0&&l===0){if(_===ex){s.push(i.slice(c,b)),c=b+1;continue}if(_==="/"){d=b;continue}}_==="["?a++:_==="]"?a--:_==="("?l++:_===")"&&l--}const h=s.length===0?i:i.slice(c);let p=h,g=!1;h.endsWith(Jb)?(p=h.slice(0,-1),g=!0):h.startsWith(Jb)&&(p=h.slice(1),g=!0);const y=d&&d>c?d-c:void 0;return tx(s,g,p,y)};if(t){const i=t+ex,s=o;o=a=>a.startsWith(i)?s(a.slice(i.length)):tx(WO,!1,a,void 0,!0)}if(n){const i=o;o=s=>n({className:s,parseClassName:i})}return o},qO=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,o)=>{t.set(n,1e6+o)}),n=>{const o=[];let i=[];for(let s=0;s<n.length;s++){const a=n[s],l=a[0]==="[",c=t.has(a);l||c?(i.length>0&&(i.sort(),o.push(...i),i=[]),o.push(a)):i.push(a)}return i.length>0&&(i.sort(),o.push(...i)),o}},KO=e=>({cache:UO(e.cacheSize),parseClassName:HO(e),sortModifiers:qO(e),postfixLookupClassGroupIds:GO(e),...MO(e)}),GO=e=>{const t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let o=0;o<n.length;o++)t[n[o]]=!0;return t},YO=/\s+/,ZO=(e,t)=>{const{parseClassName:n,getClassGroupId:o,getConflictingClassGroupIds:i,sortModifiers:s,postfixLookupClassGroupIds:a}=t,l=[],c=e.trim().split(YO);let d="";for(let f=c.length-1;f>=0;f-=1){const h=c[f],{isExternal:p,modifiers:g,hasImportantModifier:y,baseClassName:b,maybePostfixModifierPosition:_}=n(h);if(p){d=h+(d.length>0?" "+d:d);continue}let x=!!_,B;if(x){const D=b.substring(0,_);B=o(D);const w=B&&a[B]?o(b):void 0;w&&w!==B&&(B=w,x=!1)}else B=o(b);if(!B){if(!x){d=h+(d.length>0?" "+d:d);continue}if(B=o(b),!B){d=h+(d.length>0?" "+d:d);continue}x=!1}const R=g.length===0?"":g.length===1?g[0]:s(g).join(":"),S=y?R+Jb:R,O=S+B;if(l.indexOf(O)>-1)continue;l.push(O);const I=i(B,x);for(let D=0;D<I.length;++D){const w=I[D];l.push(S+w)}d=h+(d.length>0?" "+d:d)}return d},XO=(...e)=>{let t=0,n,o,i="";for(;t<e.length;)(n=e[t++])&&(o=nx(n))&&(i&&(i+=" "),i+=o);return i},nx=e=>{if(typeof e=="string")return e;let t,n="";for(let o=0;o<e.length;o++)e[o]&&(t=nx(e[o]))&&(n&&(n+=" "),n+=t);return n},JO=(e,...t)=>{let n,o,i,s;const a=c=>{const d=t.reduce((f,h)=>h(f),e());return n=KO(d),o=n.cache.get,i=n.cache.set,s=l,l(c)},l=c=>{const d=o(c);if(d)return d;const f=ZO(c,n);return i(c,f),f};return s=a,(...c)=>s(XO(...c))},QO=[],No=e=>{const t=n=>n[e]||QO;return t.isThemeGetter=!0,t.themeKey=e,t},ox=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,rx=/^\((?:(\w[\w-]*):)?(.+)\)$/i,VO=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,e4=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,t4=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,n4=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix|color|light-dark)\(.+\)$/,o4=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,r4=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Oa=e=>VO.test(e),Qt=e=>!!e&&!Number.isNaN(Number(e)),ns=e=>!!e&&Number.isInteger(Number(e)),Qb=e=>e.endsWith("%")&&Qt(e.slice(0,-1)),qs=e=>e4.test(e),ix=()=>!0,i4=e=>t4.test(e)&&!n4.test(e),Vb=()=>!1,s4=e=>o4.test(e),a4=e=>r4.test(e),l4=e=>!bt(e)&&!yt(e),c4=e=>e.startsWith("@container")&&(e[10]==="/"&&e[11]!==void 0||e[11]==="s"&&e[16]!==void 0&&e.startsWith("-size/",10)||e[11]==="n"&&e[18]!==void 0&&e.startsWith("-normal/",10)),d4=e=>La(e,ux,Vb),bt=e=>ox.test(e),zl=e=>La(e,fx,i4),sx=e=>La(e,y4,Qt),u4=e=>La(e,mx,ix),f4=e=>La(e,hx,Vb),ax=e=>La(e,cx,Vb),h4=e=>La(e,dx,a4),Pm=e=>La(e,px,s4),yt=e=>rx.test(e),ju=e=>jl(e,fx),m4=e=>jl(e,hx),lx=e=>jl(e,cx),p4=e=>jl(e,ux),g4=e=>jl(e,dx),Nm=e=>jl(e,px,!0),b4=e=>jl(e,mx,!0),La=(e,t,n)=>{const o=ox.exec(e);return o?o[1]?t(o[1]):n(o[2]):!1},jl=(e,t,n=!1)=>{const o=rx.exec(e);return o?o[1]?t(o[1]):n:!1},cx=e=>e==="position"||e==="percentage",dx=e=>e==="image"||e==="url",ux=e=>e==="length"||e==="size"||e==="bg-size",fx=e=>e==="length",y4=e=>e==="number",hx=e=>e==="family-name",mx=e=>e==="number"||e==="weight",px=e=>e==="shadow",v4=JO(()=>{const e=No("color"),t=No("font"),n=No("text"),o=No("font-weight"),i=No("tracking"),s=No("leading"),a=No("breakpoint"),l=No("container"),c=No("spacing"),d=No("radius"),f=No("shadow"),h=No("inset-shadow"),p=No("text-shadow"),g=No("drop-shadow"),y=No("blur"),b=No("perspective"),_=No("aspect"),x=No("ease"),B=No("animate"),R=()=>["auto","avoid","all","avoid-page","page","left","right","column"],S=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],O=()=>[...S(),yt,bt],I=()=>["auto","hidden","clip","visible","scroll"],D=()=>["auto","contain","none"],w=()=>[yt,bt,c],E=()=>[Oa,"full","auto",...w()],F=()=>[ns,"none","subgrid",yt,bt],A=()=>["auto",{span:["full",ns,yt,bt]},ns,yt,bt],P=()=>[ns,"auto",yt,bt],q=()=>["auto","min","max","fr",yt,bt],Q=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],re=()=>["start","end","center","stretch","center-safe","end-safe"],ie=()=>["auto",...w()],le=()=>[Oa,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...w()],X=()=>[l,Oa,"screen","full","dvw","lvw","svw","min","max","fit",...w()],K=()=>[Oa,"screen","full","lh","dvh","lvh","svh","min","max","fit",...w()],W=()=>[e,yt,bt],se=()=>[...S(),lx,ax,{position:[yt,bt]}],H=()=>["no-repeat",{repeat:["","x","y","space","round"]}],N=()=>["auto","cover","contain",p4,d4,{size:[yt,bt]}],j=()=>[Qb,ju,zl],Y=()=>["","none","full",d,yt,bt],J=()=>["",Qt,ju,zl],U=()=>["solid","dashed","dotted","double"],k=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],C=()=>[Qt,Qb,lx,ax],T=()=>["","none",y,yt,bt],M=()=>["none",Qt,yt,bt],$=()=>["none",Qt,yt,bt],ne=()=>[Qt,yt,bt],te=()=>[Oa,"full",...w()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[qs],breakpoint:[qs],color:[ix],container:[qs],"drop-shadow":[qs],ease:["in","out","in-out"],font:[l4],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[qs],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[qs],shadow:[qs],spacing:["px",Qt],text:[qs],"text-shadow":[qs],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Oa,bt,yt,_]}],container:["container"],"container-type":[{"@container":["","normal","size",yt,bt]}],"container-named":[c4],columns:[{columns:[Qt,"auto",bt,yt,l]}],"break-after":[{"break-after":R()}],"break-before":[{"break-before":R()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:O()}],overflow:[{overflow:I()}],"overflow-x":[{"overflow-x":I()}],"overflow-y":[{"overflow-y":I()}],overscroll:[{overscroll:D()}],"overscroll-x":[{"overscroll-x":D()}],"overscroll-y":[{"overscroll-y":D()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:E()}],"inset-x":[{"inset-x":E()}],"inset-y":[{"inset-y":E()}],start:[{"inset-s":E(),start:E()}],end:[{"inset-e":E(),end:E()}],"inset-bs":[{"inset-bs":E()}],"inset-be":[{"inset-be":E()}],top:[{top:E()}],right:[{right:E()}],bottom:[{bottom:E()}],left:[{left:E()}],visibility:["visible","invisible","collapse"],z:[{z:[ns,"auto",yt,bt]}],basis:[{basis:[Oa,"full","auto",l,...w()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Qt,Oa,"auto","initial","none",bt]}],grow:[{grow:["",Qt,yt,bt]}],shrink:[{shrink:["",Qt,yt,bt]}],order:[{order:[ns,"first","last","none",yt,bt]}],"grid-cols":[{"grid-cols":F()}],"col-start-end":[{col:A()}],"col-start":[{"col-start":P()}],"col-end":[{"col-end":P()}],"grid-rows":[{"grid-rows":F()}],"row-start-end":[{row:A()}],"row-start":[{"row-start":P()}],"row-end":[{"row-end":P()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":q()}],"auto-rows":[{"auto-rows":q()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...Q(),"normal"]}],"justify-items":[{"justify-items":[...re(),"normal"]}],"justify-self":[{"justify-self":["auto",...re()]}],"align-content":[{content:["normal",...Q()]}],"align-items":[{items:[...re(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...re(),{baseline:["","last"]}]}],"place-content":[{"place-content":Q()}],"place-items":[{"place-items":[...re(),"baseline"]}],"place-self":[{"place-self":["auto",...re()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pbs:[{pbs:w()}],pbe:[{pbe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:ie()}],mx:[{mx:ie()}],my:[{my:ie()}],ms:[{ms:ie()}],me:[{me:ie()}],mbs:[{mbs:ie()}],mbe:[{mbe:ie()}],mt:[{mt:ie()}],mr:[{mr:ie()}],mb:[{mb:ie()}],ml:[{ml:ie()}],"space-x":[{"space-x":w()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":w()}],"space-y-reverse":["space-y-reverse"],size:[{size:le()}],"inline-size":[{inline:["auto",...X()]}],"min-inline-size":[{"min-inline":["auto",...X()]}],"max-inline-size":[{"max-inline":["none",...X()]}],"block-size":[{block:["auto",...K()]}],"min-block-size":[{"min-block":["auto",...K()]}],"max-block-size":[{"max-block":["none",...K()]}],w:[{w:[l,"screen",...le()]}],"min-w":[{"min-w":[l,"screen","none",...le()]}],"max-w":[{"max-w":[l,"screen","none","prose",{screen:[a]},...le()]}],h:[{h:["screen","lh",...le()]}],"min-h":[{"min-h":["screen","lh","none",...le()]}],"max-h":[{"max-h":["screen","lh","none",...le()]}],"font-size":[{text:["base",n,ju,zl]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[o,b4,u4]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Qb,bt]}],"font-family":[{font:[m4,f4,t]}],"font-features":[{"font-features":[bt]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[i,yt,bt]}],"line-clamp":[{"line-clamp":[Qt,"none",yt,sx]}],leading:[{leading:["none",s,...w()]}],"list-image":[{"list-image":["none",yt,bt]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",yt,bt]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:W()}],"text-color":[{text:W()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...U(),"wavy"]}],"text-decoration-thickness":[{decoration:[Qt,"from-font","auto",yt,zl]}],"text-decoration-color":[{decoration:W()}],"underline-offset":[{"underline-offset":[Qt,"auto",yt,bt]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:w()}],"tab-size":[{tab:[ns,yt,bt]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",yt,bt]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",yt,bt]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:se()}],"bg-repeat":[{bg:H()}],"bg-size":[{bg:N()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},ns,yt,bt],radial:["",yt,bt],conic:["",ns,yt,bt]},g4,h4]}],"bg-color":[{bg:W()}],"gradient-from-pos":[{from:j()}],"gradient-via-pos":[{via:j()}],"gradient-to-pos":[{to:j()}],"gradient-from":[{from:W()}],"gradient-via":[{via:W()}],"gradient-to":[{to:W()}],rounded:[{rounded:Y()}],"rounded-s":[{"rounded-s":Y()}],"rounded-e":[{"rounded-e":Y()}],"rounded-t":[{"rounded-t":Y()}],"rounded-r":[{"rounded-r":Y()}],"rounded-b":[{"rounded-b":Y()}],"rounded-l":[{"rounded-l":Y()}],"rounded-ss":[{"rounded-ss":Y()}],"rounded-se":[{"rounded-se":Y()}],"rounded-ee":[{"rounded-ee":Y()}],"rounded-es":[{"rounded-es":Y()}],"rounded-tl":[{"rounded-tl":Y()}],"rounded-tr":[{"rounded-tr":Y()}],"rounded-br":[{"rounded-br":Y()}],"rounded-bl":[{"rounded-bl":Y()}],"border-w":[{border:J()}],"border-w-x":[{"border-x":J()}],"border-w-y":[{"border-y":J()}],"border-w-s":[{"border-s":J()}],"border-w-e":[{"border-e":J()}],"border-w-bs":[{"border-bs":J()}],"border-w-be":[{"border-be":J()}],"border-w-t":[{"border-t":J()}],"border-w-r":[{"border-r":J()}],"border-w-b":[{"border-b":J()}],"border-w-l":[{"border-l":J()}],"divide-x":[{"divide-x":J()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":J()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...U(),"hidden","none"]}],"divide-style":[{divide:[...U(),"hidden","none"]}],"border-color":[{border:W()}],"border-color-x":[{"border-x":W()}],"border-color-y":[{"border-y":W()}],"border-color-s":[{"border-s":W()}],"border-color-e":[{"border-e":W()}],"border-color-bs":[{"border-bs":W()}],"border-color-be":[{"border-be":W()}],"border-color-t":[{"border-t":W()}],"border-color-r":[{"border-r":W()}],"border-color-b":[{"border-b":W()}],"border-color-l":[{"border-l":W()}],"divide-color":[{divide:W()}],"outline-style":[{outline:[...U(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Qt,yt,bt]}],"outline-w":[{outline:["",Qt,ju,zl]}],"outline-color":[{outline:W()}],shadow:[{shadow:["","inner","none",f,Nm,Pm]}],"shadow-color":[{shadow:W()}],"inset-shadow":[{"inset-shadow":["none",h,Nm,Pm]}],"inset-shadow-color":[{"inset-shadow":W()}],"ring-w":[{ring:J()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:W()}],"ring-offset-w":[{"ring-offset":[Qt,zl]}],"ring-offset-color":[{"ring-offset":W()}],"inset-ring-w":[{"inset-ring":J()}],"inset-ring-color":[{"inset-ring":W()}],"text-shadow":[{"text-shadow":["none",p,Nm,Pm]}],"text-shadow-color":[{"text-shadow":W()}],opacity:[{opacity:[Qt,yt,bt]}],"mix-blend":[{"mix-blend":[...k(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":k()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Qt]}],"mask-image-linear-from-pos":[{"mask-linear-from":C()}],"mask-image-linear-to-pos":[{"mask-linear-to":C()}],"mask-image-linear-from-color":[{"mask-linear-from":W()}],"mask-image-linear-to-color":[{"mask-linear-to":W()}],"mask-image-t-from-pos":[{"mask-t-from":C()}],"mask-image-t-to-pos":[{"mask-t-to":C()}],"mask-image-t-from-color":[{"mask-t-from":W()}],"mask-image-t-to-color":[{"mask-t-to":W()}],"mask-image-r-from-pos":[{"mask-r-from":C()}],"mask-image-r-to-pos":[{"mask-r-to":C()}],"mask-image-r-from-color":[{"mask-r-from":W()}],"mask-image-r-to-color":[{"mask-r-to":W()}],"mask-image-b-from-pos":[{"mask-b-from":C()}],"mask-image-b-to-pos":[{"mask-b-to":C()}],"mask-image-b-from-color":[{"mask-b-from":W()}],"mask-image-b-to-color":[{"mask-b-to":W()}],"mask-image-l-from-pos":[{"mask-l-from":C()}],"mask-image-l-to-pos":[{"mask-l-to":C()}],"mask-image-l-from-color":[{"mask-l-from":W()}],"mask-image-l-to-color":[{"mask-l-to":W()}],"mask-image-x-from-pos":[{"mask-x-from":C()}],"mask-image-x-to-pos":[{"mask-x-to":C()}],"mask-image-x-from-color":[{"mask-x-from":W()}],"mask-image-x-to-color":[{"mask-x-to":W()}],"mask-image-y-from-pos":[{"mask-y-from":C()}],"mask-image-y-to-pos":[{"mask-y-to":C()}],"mask-image-y-from-color":[{"mask-y-from":W()}],"mask-image-y-to-color":[{"mask-y-to":W()}],"mask-image-radial":[{"mask-radial":[yt,bt]}],"mask-image-radial-from-pos":[{"mask-radial-from":C()}],"mask-image-radial-to-pos":[{"mask-radial-to":C()}],"mask-image-radial-from-color":[{"mask-radial-from":W()}],"mask-image-radial-to-color":[{"mask-radial-to":W()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":S()}],"mask-image-conic-pos":[{"mask-conic":[Qt]}],"mask-image-conic-from-pos":[{"mask-conic-from":C()}],"mask-image-conic-to-pos":[{"mask-conic-to":C()}],"mask-image-conic-from-color":[{"mask-conic-from":W()}],"mask-image-conic-to-color":[{"mask-conic-to":W()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:se()}],"mask-repeat":[{mask:H()}],"mask-size":[{mask:N()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",yt,bt]}],filter:[{filter:["","none",yt,bt]}],blur:[{blur:T()}],brightness:[{brightness:[Qt,yt,bt]}],contrast:[{contrast:[Qt,yt,bt]}],"drop-shadow":[{"drop-shadow":["","none",g,Nm,Pm]}],"drop-shadow-color":[{"drop-shadow":W()}],grayscale:[{grayscale:["",Qt,yt,bt]}],"hue-rotate":[{"hue-rotate":[Qt,yt,bt]}],invert:[{invert:["",Qt,yt,bt]}],saturate:[{saturate:[Qt,yt,bt]}],sepia:[{sepia:["",Qt,yt,bt]}],"backdrop-filter":[{"backdrop-filter":["","none",yt,bt]}],"backdrop-blur":[{"backdrop-blur":T()}],"backdrop-brightness":[{"backdrop-brightness":[Qt,yt,bt]}],"backdrop-contrast":[{"backdrop-contrast":[Qt,yt,bt]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Qt,yt,bt]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Qt,yt,bt]}],"backdrop-invert":[{"backdrop-invert":["",Qt,yt,bt]}],"backdrop-opacity":[{"backdrop-opacity":[Qt,yt,bt]}],"backdrop-saturate":[{"backdrop-saturate":[Qt,yt,bt]}],"backdrop-sepia":[{"backdrop-sepia":["",Qt,yt,bt]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",yt,bt]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Qt,"initial",yt,bt]}],ease:[{ease:["linear","initial",x,yt,bt]}],delay:[{delay:[Qt,yt,bt]}],animate:[{animate:["none",B,yt,bt]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[b,yt,bt]}],"perspective-origin":[{"perspective-origin":O()}],rotate:[{rotate:M()}],"rotate-x":[{"rotate-x":M()}],"rotate-y":[{"rotate-y":M()}],"rotate-z":[{"rotate-z":M()}],scale:[{scale:$()}],"scale-x":[{"scale-x":$()}],"scale-y":[{"scale-y":$()}],"scale-z":[{"scale-z":$()}],"scale-3d":["scale-3d"],skew:[{skew:ne()}],"skew-x":[{"skew-x":ne()}],"skew-y":[{"skew-y":ne()}],transform:[{transform:[yt,bt,"","none","gpu","cpu"]}],"transform-origin":[{origin:O()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:te()}],"translate-x":[{"translate-x":te()}],"translate-y":[{"translate-y":te()}],"translate-z":[{"translate-z":te()}],"translate-none":["translate-none"],zoom:[{zoom:[ns,yt,bt]}],accent:[{accent:W()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:W()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",yt,bt]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":W()}],"scrollbar-track-color":[{"scrollbar-track":W()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mbs":[{"scroll-mbs":w()}],"scroll-mbe":[{"scroll-mbe":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pbs":[{"scroll-pbs":w()}],"scroll-pbe":[{"scroll-pbe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",yt,bt]}],fill:[{fill:["none",...W()]}],"stroke-w":[{stroke:[Qt,ju,zl,sx]}],stroke:[{stroke:["none",...W()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["start","end","right","left"],"inset-y":["inset-bs","inset-be","top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["ps","pe","pr","pl"],py:["pbs","pbe","pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["ms","me","mr","ml"],my:["mbs","mbe","mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-s","border-w-e","border-w-r","border-w-l"],"border-w-y":["border-w-bs","border-w-be","border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-s","border-color-e","border-color-r","border-color-l"],"border-color-y":["border-color-bs","border-color-be","border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-ms","scroll-me","scroll-mr","scroll-ml"],"scroll-my":["scroll-mbs","scroll-mbe","scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-ps","scroll-pe","scroll-pr","scroll-pl"],"scroll-py":["scroll-pbs","scroll-pbe","scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}});function _n(...e){return v4(Z1(e))}function Dm(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ey={},ty={},Mm={exports:{}},gx;function w4(){if(gx)return Mm.exports;gx=1;var e=String,t=function(){return{isColorSupported:!1,reset:e,bold:e,dim:e,italic:e,underline:e,inverse:e,hidden:e,strikethrough:e,black:e,red:e,green:e,yellow:e,blue:e,magenta:e,cyan:e,white:e,gray:e,bgBlack:e,bgRed:e,bgGreen:e,bgYellow:e,bgBlue:e,bgMagenta:e,bgCyan:e,bgWhite:e,blackBright:e,redBright:e,greenBright:e,yellowBright:e,blueBright:e,magentaBright:e,cyanBright:e,whiteBright:e,bgBlackBright:e,bgRedBright:e,bgGreenBright:e,bgYellowBright:e,bgBlueBright:e,bgMagentaBright:e,bgCyanBright:e,bgWhiteBright:e}};return Mm.exports=t(),Mm.exports.createColors=t,Mm.exports}var bx;function k4(){return bx||(bx=1,(function(e){var t={};Object.defineProperty(e,"__esModule",{value:!0});function n(d,f){for(var h in f)Object.defineProperty(d,h,{enumerable:!0,get:f[h]})}n(e,{dim:function(){return l},default:function(){return c}});const o=i(w4());function i(d){return d&&d.__esModule?d:{default:d}}let s=new Set;function a(d,f,h){typeof process<"u"&&t.JEST_WORKER_ID||h&&s.has(h)||(h&&s.add(h),console.warn(""),f.forEach(p=>console.warn(d,"-",p)))}function l(d){return o.default.dim(d)}const c={info(d,f){a(o.default.bold(o.default.cyan("info")),...Array.isArray(d)?[d]:[f,d])},warn(d,f){a(o.default.bold(o.default.yellow("warn")),...Array.isArray(d)?[d]:[f,d])},risk(d,f){a(o.default.bold(o.default.magenta("risk")),...Array.isArray(d)?[d]:[f,d])}}})(ty)),ty}var yx;function _4(){return yx||(yx=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return i}});const t=n(k4());function n(s){return s&&s.__esModule?s:{default:s}}function o({version:s,from:a,to:l}){t.default.warn(`${a}-color-renamed`,[`As of Tailwind CSS ${s}, \`${a}\` has been renamed to \`${l}\`.`,"Update your configuration file to silence this warning."])}const i={inherit:"inherit",current:"currentColor",transparent:"transparent",black:"#000",white:"#fff",slate:{50:"#f8fafc",100:"#f1f5f9",200:"#e2e8f0",300:"#cbd5e1",400:"#94a3b8",500:"#64748b",600:"#475569",700:"#334155",800:"#1e293b",900:"#0f172a",950:"#020617"},gray:{50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#1f2937",900:"#111827",950:"#030712"},zinc:{50:"#fafafa",100:"#f4f4f5",200:"#e4e4e7",300:"#d4d4d8",400:"#a1a1aa",500:"#71717a",600:"#52525b",700:"#3f3f46",800:"#27272a",900:"#18181b",950:"#09090b"},neutral:{50:"#fafafa",100:"#f5f5f5",200:"#e5e5e5",300:"#d4d4d4",400:"#a3a3a3",500:"#737373",600:"#525252",700:"#404040",800:"#262626",900:"#171717",950:"#0a0a0a"},stone:{50:"#fafaf9",100:"#f5f5f4",200:"#e7e5e4",300:"#d6d3d1",400:"#a8a29e",500:"#78716c",600:"#57534e",700:"#44403c",800:"#292524",900:"#1c1917",950:"#0c0a09"},red:{50:"#fef2f2",100:"#fee2e2",200:"#fecaca",300:"#fca5a5",400:"#f87171",500:"#ef4444",600:"#dc2626",700:"#b91c1c",800:"#991b1b",900:"#7f1d1d",950:"#450a0a"},orange:{50:"#fff7ed",100:"#ffedd5",200:"#fed7aa",300:"#fdba74",400:"#fb923c",500:"#f97316",600:"#ea580c",700:"#c2410c",800:"#9a3412",900:"#7c2d12",950:"#431407"},amber:{50:"#fffbeb",100:"#fef3c7",200:"#fde68a",300:"#fcd34d",400:"#fbbf24",500:"#f59e0b",600:"#d97706",700:"#b45309",800:"#92400e",900:"#78350f",950:"#451a03"},yellow:{50:"#fefce8",100:"#fef9c3",200:"#fef08a",300:"#fde047",400:"#facc15",500:"#eab308",600:"#ca8a04",700:"#a16207",800:"#854d0e",900:"#713f12",950:"#422006"},lime:{50:"#f7fee7",100:"#ecfccb",200:"#d9f99d",300:"#bef264",400:"#a3e635",500:"#84cc16",600:"#65a30d",700:"#4d7c0f",800:"#3f6212",900:"#365314",950:"#1a2e05"},green:{50:"#f0fdf4",100:"#dcfce7",200:"#bbf7d0",300:"#86efac",400:"#4ade80",500:"#22c55e",600:"#16a34a",700:"#15803d",800:"#166534",900:"#14532d",950:"#052e16"},emerald:{50:"#ecfdf5",100:"#d1fae5",200:"#a7f3d0",300:"#6ee7b7",400:"#34d399",500:"#10b981",600:"#059669",700:"#047857",800:"#065f46",900:"#064e3b",950:"#022c22"},teal:{50:"#f0fdfa",100:"#ccfbf1",200:"#99f6e4",300:"#5eead4",400:"#2dd4bf",500:"#14b8a6",600:"#0d9488",700:"#0f766e",800:"#115e59",900:"#134e4a",950:"#042f2e"},cyan:{50:"#ecfeff",100:"#cffafe",200:"#a5f3fc",300:"#67e8f9",400:"#22d3ee",500:"#06b6d4",600:"#0891b2",700:"#0e7490",800:"#155e75",900:"#164e63",950:"#083344"},sky:{50:"#f0f9ff",100:"#e0f2fe",200:"#bae6fd",300:"#7dd3fc",400:"#38bdf8",500:"#0ea5e9",600:"#0284c7",700:"#0369a1",800:"#075985",900:"#0c4a6e",950:"#082f49"},blue:{50:"#eff6ff",100:"#dbeafe",200:"#bfdbfe",300:"#93c5fd",400:"#60a5fa",500:"#3b82f6",600:"#2563eb",700:"#1d4ed8",800:"#1e40af",900:"#1e3a8a",950:"#172554"},indigo:{50:"#eef2ff",100:"#e0e7ff",200:"#c7d2fe",300:"#a5b4fc",400:"#818cf8",500:"#6366f1",600:"#4f46e5",700:"#4338ca",800:"#3730a3",900:"#312e81",950:"#1e1b4b"},violet:{50:"#f5f3ff",100:"#ede9fe",200:"#ddd6fe",300:"#c4b5fd",400:"#a78bfa",500:"#8b5cf6",600:"#7c3aed",700:"#6d28d9",800:"#5b21b6",900:"#4c1d95",950:"#2e1065"},purple:{50:"#faf5ff",100:"#f3e8ff",200:"#e9d5ff",300:"#d8b4fe",400:"#c084fc",500:"#a855f7",600:"#9333ea",700:"#7e22ce",800:"#6b21a8",900:"#581c87",950:"#3b0764"},fuchsia:{50:"#fdf4ff",100:"#fae8ff",200:"#f5d0fe",300:"#f0abfc",400:"#e879f9",500:"#d946ef",600:"#c026d3",700:"#a21caf",800:"#86198f",900:"#701a75",950:"#4a044e"},pink:{50:"#fdf2f8",100:"#fce7f3",200:"#fbcfe8",300:"#f9a8d4",400:"#f472b6",500:"#ec4899",600:"#db2777",700:"#be185d",800:"#9d174d",900:"#831843",950:"#500724"},rose:{50:"#fff1f2",100:"#ffe4e6",200:"#fecdd3",300:"#fda4af",400:"#fb7185",500:"#f43f5e",600:"#e11d48",700:"#be123c",800:"#9f1239",900:"#881337",950:"#4c0519"},get lightBlue(){return o({version:"v2.2",from:"lightBlue",to:"sky"}),this.sky},get warmGray(){return o({version:"v3.0",from:"warmGray",to:"stone"}),this.stone},get trueGray(){return o({version:"v3.0",from:"trueGray",to:"neutral"}),this.neutral},get coolGray(){return o({version:"v3.0",from:"coolGray",to:"gray"}),this.gray},get blueGray(){return o({version:"v3.0",from:"blueGray",to:"slate"}),this.slate}}})(ey)),ey}var ny,vx;function x4(){if(vx)return ny;vx=1;let e=_4();return ny=(e.__esModule?e:{default:e}).default,ny}var E4=x4();const C4=Dm(E4),wx=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,kx=Z1,Rm=(e,t)=>n=>{var o;if(t?.variants==null)return kx(e,n?.class,n?.className);const{variants:i,defaultVariants:s}=t,a=Object.keys(i).map(d=>{const f=n?.[d],h=s?.[d];if(f===null)return null;const p=wx(f)||wx(h);return i[d][p]}),l=n&&Object.entries(n).reduce((d,f)=>{let[h,p]=f;return p===void 0||(d[h]=p),d},{}),c=t==null||(o=t.compoundVariants)===null||o===void 0?void 0:o.reduce((d,f)=>{let{class:h,className:p,...g}=f;return Object.entries(g).every(y=>{let[b,_]=y;return Array.isArray(_)?_.includes({...s,...l}[b]):{...s,...l}[b]===_})?[...d,h,p]:d},[]);return kx(e,a,c,n?.class,n?.className)},Bi=r.defineComponent({__name:"Button",props:{variant:{},size:{},class:{type:[Boolean,null,String,Object,Array]},asChild:{type:Boolean},as:{default:"button"}},setup(e){const t=e;return(n,o)=>(r.openBlock(),r.createBlock(r.unref(Lt.Primitive),{as:e.as,"as-child":e.asChild,class:r.normalizeClass(r.unref(_n)(r.unref(S4)({variant:e.variant,size:e.size}),t.class))},{default:r.withCtx(()=>[r.renderSlot(n.$slots,"default")]),_:3},8,["as","as-child","class"]))}}),S4=Rm("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",xs:"h-7 rounded px-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-8 w-8","icon-sm":"size-7","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}}),od=r.defineComponent({name:"Tooltip",__name:"Tooltip",props:{defaultOpen:{type:Boolean},open:{type:Boolean},delayDuration:{},disableHoverableContent:{type:Boolean},disableClosingTrigger:{type:Boolean},disabled:{type:Boolean},ignoreNonKeyboardFocus:{type:Boolean}},emits:["update:open"],setup(e,{emit:t}){const n=e,o=t,i=Lt.useForwardPropsEmits(n,o);return(s,a)=>(r.openBlock(),r.createBlock(r.unref(Lt.TooltipRoot),r.normalizeProps(r.guardReactiveProps(r.unref(i))),{default:r.withCtx(()=>[r.renderSlot(s.$slots,"default")]),_:3},16))}}),rd=r.defineComponent({name:"TooltipContent",inheritAttrs:!1,__name:"TooltipContent",props:{forceMount:{type:Boolean},ariaLabel:{},asChild:{type:Boolean},as:{},side:{},sideOffset:{default:4},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},positionStrategy:{},updatePositionStrategy:{},class:{type:[Boolean,null,String,Object,Array]}},emits:["escapeKeyDown","pointerDownOutside"],setup(e,{emit:t}){const n=e,o=t,i=Lo.reactiveOmit(n,"class"),s=Lt.useForwardPropsEmits(i,o);return(a,l)=>(r.openBlock(),r.createBlock(r.unref(Lt.TooltipPortal),null,{default:r.withCtx(()=>[r.createVNode(r.unref(Lt.TooltipContent),r.mergeProps({...r.unref(s),...a.$attrs},{class:r.unref(_n)("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",n.class)}),{default:r.withCtx(()=>[r.renderSlot(a.$slots,"default")]),_:3},16,["class"])]),_:3}))}}),id=r.defineComponent({name:"TooltipProvider",__name:"TooltipProvider",props:{delayDuration:{},skipDelayDuration:{},disableHoverableContent:{type:Boolean},disableClosingTrigger:{type:Boolean},disabled:{type:Boolean},ignoreNonKeyboardFocus:{type:Boolean},content:{}},setup(e){const t=e;return(n,o)=>(r.openBlock(),r.createBlock(r.unref(Lt.TooltipProvider),r.normalizeProps(r.guardReactiveProps(t)),{default:r.withCtx(()=>[r.renderSlot(n.$slots,"default")]),_:3},16))}}),sd=r.defineComponent({name:"TooltipTrigger",__name:"TooltipTrigger",props:{reference:{},asChild:{type:Boolean},as:{}},setup(e){const t=e;return(n,o)=>(r.openBlock(),r.createBlock(r.unref(Lt.TooltipTrigger),r.normalizeProps(r.guardReactiveProps(t)),{default:r.withCtx(()=>[r.renderSlot(n.$slots,"default")]),_:3},16))}}),A4={class:"relative z-10"},T4="font-medium transition-all duration-300 ease-in-out hover:-translate-y-0.5 hover:scale-[1.02] active:translate-y-0 active:scale-[0.98] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:brightness-90 disabled:cursor-not-allowed disabled:shadow-none disabled:translate-y-0 disabled:scale-100 relative overflow-hidden before:absolute before:inset-0 before:bg-white/20 before:translate-y-full before:transition-transform before:duration-300 hover:before:translate-y-0",B4=r.defineComponent({name:"DCodeButton",inheritAttrs:!1,__name:"DCodeButton",props:{icon:{},text:{default:""},variant:{default:"default"},size:{default:"default"},tooltip:{default:""},bgColor:{default:""},textColor:{default:""},borderColor:{default:""},rounded:{default:"lg"},borderStyle:{default:"solid"},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},type:{default:"button"},visible:{type:Boolean,default:!0},skeleton:{type:Boolean,default:!1}},setup(e){const t=r.useAttrs(),n=e,o=r.computed(()=>Ti(n.icon,Yt)),i=r.computed(()=>!!n.tooltip),s=r.computed(()=>n.visible??!0),a=r.computed(()=>{const j=String(n.variant||"default").toLowerCase();return j==="tonal"?"secondary":j==="elevated"?"default":j==="text"?"ghost":j}),l=r.computed(()=>String(n.bgColor||"").toLowerCase()),c=r.computed(()=>String(n.type||"button").toLowerCase()),d=r.ref(!1),f=r.computed(()=>n.loading||d.value),h=r.computed(()=>{const{class:j,onClick:Y,...J}=t;return Y&&(J.onClick=async(...U)=>{if(!(n.disabled||f.value)){d.value=!0;try{if(Array.isArray(Y)){const k=Y.map(C=>C(...U));await Promise.all(k)}else{const k=Y(...U);k instanceof Promise&&await k}}finally{d.value=!1}}}),J}),p=r.computed(()=>_n(t.class)),g=r.computed(()=>((p.value??"").match(/\b(?:w|h|min-w|min-h|max-w|max-h)-[^\s]+\b/g)??[]).join(" ")),y=r.computed(()=>n.size==="sm"?"h-9":n.size==="lg"?"h-11":n.size==="icon"?"h-10 w-10":"h-10"),b=r.computed(()=>n.size==="icon"?"":!n.text&&n.icon?"w-10":"w-28"),_=r.computed(()=>{const j=String(n.borderStyle||"solid").toLowerCase();return j==="none"?"border-0":j==="dashed"?"border-2 border-dashed":j==="dotted"?"border-2 border-dotted":j==="double"?"border-4 border-double":"border-2 border-solid"}),x=r.computed(()=>_n("inline-flex items-center justify-center bg-gray-200 dark:bg-gray-700 animate-pulse",sn(n.rounded),y.value,b.value,g.value)),B=r.computed(()=>{const Y=(p.value??"").match(/\bbg-(?!gradient)([a-z-]+)(?:-(\d{2,3}))?\b/u);return Y?Y[0]:null}),R=r.computed(()=>{const Y=(p.value??"").match(/\bhover:bg-(?!gradient)([a-z-]+)(?:-(\d{2,3}))?\b/u);return Y?Y[0]:null}),S=r.computed(()=>!!B.value),O=r.computed(()=>/\bborder-/.test(p.value??"")),I=r.computed(()=>/\bhover:/.test(p.value??"")),D=r.computed(()=>{const j=p.value??"";return a.value!=="outline"?j:j.replaceAll(/\bbg-(?!gradient)[^\s]+\b/gu,"").replaceAll(/\bhover:bg-(?!gradient)[^\s]+\b/gu,"").replaceAll(/\s+/gu," ").trim()}),w=r.ref(null),E=j=>{const Y=j.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*([0-9.]+))?\)/u);return Y?{r:Number(Y[1]),g:Number(Y[2]),b:Number(Y[3]),a:Y[4]?Number(Y[4]):1}:null},F=(j,Y)=>{const J=E(j);if(!J)return j;const U=k=>Math.max(0,Math.min(255,Math.round(k)));return`rgba(${U(J.r*(1-Y))}, ${U(J.g*(1-Y))}, ${U(J.b*(1-Y))}, ${J.a})`},A=j=>{if(globalThis.window===void 0)return null;const Y=document.createElement("div");Y.className=j,Y.style.position="absolute",Y.style.visibility="hidden",Y.style.pointerEvents="none",Y.style.width="1px",Y.style.height="1px",document.body.appendChild(Y);const J=globalThis.getComputedStyle(Y).backgroundColor;return Y.remove(),!J||J==="transparent"||J==="rgba(0, 0, 0, 0)"?null:J},P=[50,100,200,300,400,500,600,700,800,900,950],q=j=>{const Y=P.indexOf(j);return Y===-1?j:P[Math.min(P.length-1,Y+2)]},Q=(j,Y)=>{const J=C4[j];if(!J)return null;if(typeof J=="string")return J;if(!Y)return null;const U=J[Y];return typeof U=="string"?U:null},re=(j,Y=!1)=>{if(!j)return null;const J=Y?/\bhover:bg-(?!gradient)([a-z-]+)(?:-(\d{2,3}))?\b/u:/\bbg-(?!gradient)([a-z-]+)(?:-(\d{2,3}))?\b/u,U=j.match(J);return U?{colorName:U[1],shade:U[2]?Number.parseInt(U[2],10):null}:null},ie=()=>{const j=B.value;if(!j){w.value=null;return}const Y=re(j),J=Y?.colorName,U=Y?.shade??null,k=(J?Q(J,U):null)??A(j);if(!k){w.value=null;return}let C;const T=re(R.value,!0),M=T?Q(T.colorName,T.shade??null):null;if(M)C=M;else if(J&&U){const $=q(U);C=Q(J,$)??F(k,.2)}else C=F(k,.2);w.value={"--btn-color":k,"--btn-color-hover":C}};r.onMounted(()=>{ie()}),r.watch([B,R],async()=>{await r.nextTick(),ie()});const le=r.computed(()=>{const j=/\bdark:bg-/.test(p.value??"");return!S.value||a.value==="outline"||j?"":w.value?"dcode-btn--fill dcode-btn--fill-hover":I.value?"":"hover:brightness-90"}),X=r.computed(()=>{if(!S.value||a.value!=="outline")return"";const j=["dcode-btn--outline","dcode-btn--outline-hover"];return O.value||j.push("border"),!w.value&&!I.value&&j.push("hover:brightness-90"),j.join(" ")}),K=r.computed(()=>w.value??void 0),W={primary:{bg:"bg-primary",border:"border-primary",text:"text-primary-foreground",hoverBg:"hover:bg-primary/90",hoverBorder:"hover:border-primary/90",hoverText:"hover:text-primary-foreground",toneText:"text-primary",tonalBg:"bg-primary/10",tonalHover:"hover:bg-primary/20",subtleHover:"hover:bg-primary/10"},success:{bg:"bg-green-600 dark:bg-green-500",border:"border-green-600 dark:border-green-500",text:"text-white",hoverBg:"hover:bg-green-700 dark:hover:bg-green-600",hoverBorder:"hover:border-green-700 dark:hover:border-green-600",hoverText:"hover:text-white",toneText:"text-green-600 dark:text-green-400",tonalBg:"bg-green-500/10 dark:bg-green-500/20",tonalHover:"hover:bg-green-500/20 dark:hover:bg-green-500/30",subtleHover:"hover:bg-green-500/10 dark:hover:bg-green-500/20"},warning:{bg:"bg-yellow-500 dark:bg-yellow-400",border:"border-yellow-500 dark:border-yellow-400",text:"text-white",hoverBg:"hover:bg-yellow-600 dark:hover:bg-yellow-500",hoverBorder:"hover:border-yellow-600 dark:hover:border-yellow-500",hoverText:"hover:text-white",toneText:"text-yellow-600 dark:text-yellow-400",tonalBg:"bg-yellow-500/10 dark:bg-yellow-500/20",tonalHover:"hover:bg-yellow-500/20 dark:hover:bg-yellow-500/30",subtleHover:"hover:bg-yellow-500/10 dark:hover:bg-yellow-500/20"},danger:{bg:"bg-red-600 dark:bg-red-500",border:"border-red-600 dark:border-red-500",text:"text-white",hoverBg:"hover:bg-red-700 dark:hover:bg-red-600",hoverBorder:"hover:border-red-700 dark:hover:border-red-600",hoverText:"hover:text-white",toneText:"text-red-600 dark:text-red-400",tonalBg:"bg-red-500/10 dark:bg-red-500/20",tonalHover:"hover:bg-red-500/20 dark:hover:bg-red-500/30",subtleHover:"hover:bg-red-500/10 dark:hover:bg-red-500/20"},info:{bg:"bg-cyan-600 dark:bg-cyan-500",border:"border-cyan-600 dark:border-cyan-500",text:"text-white",hoverBg:"hover:bg-cyan-700 dark:hover:bg-cyan-600",hoverBorder:"hover:border-cyan-700 dark:hover:border-cyan-600",hoverText:"hover:text-white",toneText:"text-cyan-600 dark:text-cyan-400",tonalBg:"bg-cyan-500/10 dark:bg-cyan-500/20",tonalHover:"hover:bg-cyan-500/20 dark:hover:bg-cyan-500/30",subtleHover:"hover:bg-cyan-500/10 dark:hover:bg-cyan-500/20"},secondary:{bg:"bg-gray-600 dark:bg-gray-500",border:"border-gray-600 dark:border-gray-500",text:"text-white",hoverBg:"hover:bg-gray-700 dark:hover:bg-gray-600",hoverBorder:"hover:border-gray-700 dark:hover:border-gray-600",hoverText:"hover:text-white",toneText:"text-gray-600 dark:text-gray-300",tonalBg:"bg-gray-500/10 dark:bg-gray-500/20",tonalHover:"hover:bg-gray-500/20 dark:hover:bg-gray-500/30",subtleHover:"hover:bg-gray-500/10 dark:hover:bg-gray-500/20"},purple:{bg:"bg-purple-600 dark:bg-purple-500",border:"border-purple-600 dark:border-purple-500",text:"text-white",hoverBg:"hover:bg-purple-700 dark:hover:bg-purple-600",hoverBorder:"hover:border-purple-700 dark:hover:border-purple-600",hoverText:"hover:text-white",toneText:"text-purple-600 dark:text-purple-400",tonalBg:"bg-purple-500/10 dark:bg-purple-500/20",tonalHover:"hover:bg-purple-500/20 dark:hover:bg-purple-500/30",subtleHover:"hover:bg-purple-500/10 dark:hover:bg-purple-500/20"},pink:{bg:"bg-pink-600 dark:bg-pink-500",border:"border-pink-600 dark:border-pink-500",text:"text-white",hoverBg:"hover:bg-pink-700 dark:hover:bg-pink-600",hoverBorder:"hover:border-pink-700 dark:hover:border-pink-600",hoverText:"hover:text-white",toneText:"text-pink-600 dark:text-pink-400",tonalBg:"bg-pink-500/10 dark:bg-pink-500/20",tonalHover:"hover:bg-pink-500/20 dark:hover:bg-pink-500/30",subtleHover:"hover:bg-pink-500/10 dark:hover:bg-pink-500/20"},dark:{bg:"bg-gray-900 dark:bg-gray-800",border:"border-gray-900 dark:border-gray-700",text:"text-white",hoverBg:"hover:bg-black dark:hover:bg-gray-950",hoverBorder:"hover:border-black dark:hover:border-gray-600",hoverText:"hover:text-white",toneText:"text-gray-900 dark:text-gray-100",tonalBg:"bg-gray-900/10 dark:bg-gray-100/10",tonalHover:"hover:bg-gray-900/20 dark:hover:bg-gray-100/20",subtleHover:"hover:bg-gray-900/10 dark:hover:bg-gray-100/10"},light:{bg:"bg-gray-100 dark:bg-gray-800",border:"border-gray-300 dark:border-gray-600",text:"text-gray-900 dark:text-gray-100",hoverBg:"hover:bg-gray-200 dark:hover:bg-gray-700",hoverBorder:"hover:border-gray-400 dark:hover:border-gray-500",hoverText:"hover:text-gray-900 dark:hover:text-gray-100",toneText:"text-gray-800 dark:text-gray-200",tonalBg:"bg-gray-200/50 dark:bg-gray-700/50",tonalHover:"hover:bg-gray-300/60 dark:hover:bg-gray-600/60",subtleHover:"hover:bg-gray-200/50 dark:hover:bg-gray-700/50"}},se={"gradient-blue":{bg:"bg-gradient-to-r from-blue-500 to-cyan-500",text:"text-white",hover:"hover:from-blue-600 hover:to-cyan-600"},"gradient-purple":{bg:"bg-gradient-to-r from-purple-500 to-pink-500",text:"text-white",hover:"hover:from-purple-600 hover:to-pink-600"},"gradient-sunset":{bg:"bg-gradient-to-r from-orange-500 to-red-500",text:"text-white",hover:"hover:from-orange-600 hover:to-red-600"},"gradient-emerald":{bg:"bg-gradient-to-r from-emerald-500 to-teal-500",text:"text-white",hover:"hover:from-emerald-600 hover:to-teal-600"}},H=r.computed(()=>{const j=[],Y=l.value,J=String(n.borderColor||"").toLowerCase(),U=a.value,k=String(n.variant||"default").toLowerCase(),C=Y?W[Y]:null,T=Y?se[Y]:null,M=J?W[J]:null;return C?U==="outline"?(j.push("bg-transparent",C.subtleHover),n.textColor||j.push(C.toneText)):U==="ghost"?(j.push("bg-transparent border-transparent",C.subtleHover),n.textColor||j.push(C.toneText)):k==="tonal"?(j.push(C.tonalBg,C.tonalHover),n.textColor||j.push(C.toneText)):U==="link"?(j.push("bg-transparent border-transparent"),n.textColor||j.push(C.toneText,"underline-offset-4 hover:underline")):(j.push(C.bg,C.hoverBg),n.textColor||j.push(C.text,C.hoverText),k==="elevated"&&j.push("shadow-md hover:shadow-lg shadow-black/10 dark:shadow-black/30")):T?U==="outline"||U==="ghost"?j.push("bg-transparent"):(j.push(T.bg,T.hover),n.textColor||j.push(T.text)):Y==="transparent"?j.push("bg-transparent hover:bg-black/5 dark:hover:bg-white/5"):Y&&j.push(Y),J?M?j.push(M.border,M.hoverBorder):j.push(J):C&&U!=="ghost"&&U!=="link"&&j.push(C.border),n.textColor&&j.push(n.textColor),j.join(" ")}),N=r.computed(()=>_n(T4,sn(n.rounded),_.value,D.value,le.value,X.value,H.value));return(j,Y)=>s.value?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[e.skeleton?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(x.value),"aria-hidden":"true"},null,2)):(r.openBlock(),r.createBlock(r.unref(id),{key:1,"delay-duration":0},{default:r.withCtx(()=>[i.value?(r.openBlock(),r.createBlock(r.unref(od),{key:0},{default:r.withCtx(()=>[r.createVNode(r.unref(sd),{"as-child":""},{default:r.withCtx(()=>[r.createVNode(r.unref(Bi),r.mergeProps({variant:a.value,size:n.size,disabled:n.disabled||f.value,type:c.value,class:N.value,style:K.value},h.value),{default:r.withCtx(()=>[f.value?(r.openBlock(),r.createBlock(Yt.Loader2,{key:0,class:"h-[18px] w-[18px] animate-spin"})):o.value?(r.openBlock(),r.createBlock(r.resolveDynamicComponent(o.value),{key:1,class:"h-[18px] w-[18px]"})):r.createCommentVNode("",!0),n.text?(r.openBlock(),r.createElementBlock("span",{key:2,class:r.normalizeClass(f.value||o.value?"ml-1":"")},r.toDisplayString(n.text),3)):r.createCommentVNode("",!0)]),_:1},16,["variant","size","disabled","type","class","style"])]),_:1}),r.createVNode(r.unref(rd),{side:"top","side-offset":8,class:"z-[100] animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 bg-gray-900 dark:bg-gray-100 text-white dark:text-gray-900 px-3 py-2 rounded-lg text-sm font-medium shadow-xl border-0"},{default:r.withCtx(()=>[r.createElementVNode("span",A4,r.toDisplayString(n.tooltip),1)]),_:1})]),_:1})):(r.openBlock(),r.createBlock(r.unref(Bi),r.mergeProps({key:1,variant:a.value,size:n.size,disabled:n.disabled||f.value,type:c.value,class:N.value,style:K.value},h.value),{default:r.withCtx(()=>[r.renderSlot(j.$slots,"default",{},()=>[f.value?(r.openBlock(),r.createBlock(Yt.Loader2,{key:0,class:"h-[18px] w-[18px] animate-spin"})):o.value?(r.openBlock(),r.createBlock(r.resolveDynamicComponent(o.value),{key:1,class:"h-[18px] w-[18px]"})):r.createCommentVNode("",!0),n.text?(r.openBlock(),r.createElementBlock("span",{key:2,class:r.normalizeClass(f.value||o.value?"ml-1":"")},r.toDisplayString(n.text),3)):r.createCommentVNode("",!0)],!0)]),_:3},16,["variant","size","disabled","type","class","style"]))]),_:3}))],64)):r.createCommentVNode("",!0)}}),Sn=(e,t)=>{const n=e.__vccOpts||e;for(const[o,i]of t)n[o]=i;return n},Ut=Sn(B4,[["__scopeId","data-v-03d1417d"]]),P4={key:0,class:"animate-pulse"},N4={key:1,class:"inline-flex items-center"},D4={class:"truncate"},M4={class:"flex flex-col"},R4={key:0,class:"mx-2 border-t border-slate-100 dark:border-neutral-800"},I4=["disabled","onClick"],O4={class:"flex-1 whitespace-nowrap text-left"},Fa=r.defineComponent({name:"DCodeButtonGroup",inheritAttrs:!1,__name:"DCodeButtonGroup",props:{text:{default:""},label:{default:""},labelID:{default:""},labelEN:{default:""},labelKR:{default:""},icon:{},buttons:{default:()=>[]},items:{default:()=>[]},variant:{default:"default"},size:{default:"default"},bgColor:{default:""},textColor:{default:""},borderColor:{default:""},rounded:{default:"md"},borderStyle:{default:"solid"},orientation:{default:"horizontal"},disabled:{type:Boolean,default:!1},visible:{type:Boolean,default:!0},skeleton:{type:Boolean,default:!1},class:{},menuAlign:{default:"right"}},emits:["button-click","action","click"],setup(e,{emit:t}){const n=e,o=t;let i=null;try{const{locale:b}=In.useI18n();i=b}catch{}const s=r.ref(!1),a=r.ref(null),l=r.computed(()=>(n.buttons?.length?n.buttons:n.items||[]).filter(_=>_.visible!==!1)),c=r.computed(()=>{const b=String(i?.value||"id").toLowerCase();return b==="kr"||b==="ko"?n.labelKR||n.labelEN||n.labelID||n.label||n.text||"Group Buttons":b==="en"?n.labelEN||n.labelID||n.label||n.text||"Group Buttons":n.labelID||n.labelEN||n.label||n.text||"Group Buttons"}),d=b=>{const _=String(i?.value||"id").toLowerCase(),x=b.propsActionGlobal||b.propsActionCustom||b.props||{};return _==="kr"||_==="ko"?b.labelKR||x.labelKR||b.labelEN||x.labelEN||b.labelID||x.labelID||b.label||x.label||b.text||x.text||"":_==="en"?b.labelEN||x.labelEN||b.labelID||x.labelID||b.label||x.label||b.text||x.text||"":b.labelID||x.labelID||b.labelEN||x.labelEN||b.label||x.label||b.text||x.text||""},f=b=>b?Ti(b,Yt):null,h=b=>{b.stopPropagation(),!n.disabled&&(s.value=!s.value)},p=(b,_)=>{_.stopPropagation(),!(n.disabled||b.disabled)&&(s.value=!1,o("button-click",b,_),o("action",b,_),o("click",b,_))},g=b=>{a.value&&!a.value.contains(b.target)&&(s.value=!1)},y=b=>{b.key==="Escape"&&s.value&&(s.value=!1)};return r.onMounted(()=>{document.addEventListener("click",g),document.addEventListener("keydown",y)}),r.onBeforeUnmount(()=>{document.removeEventListener("click",g),document.removeEventListener("keydown",y)}),(b,_)=>e.visible?(r.openBlock(),r.createElementBlock("div",{key:0,ref_key:"dropdownRef",ref:a,class:r.normalizeClass(["relative inline-flex flex-col",n.class])},[e.skeleton?(r.openBlock(),r.createElementBlock("div",P4,[..._[0]||(_[0]=[r.createElementVNode("div",{class:"h-9 w-28 bg-muted rounded-md"},null,-1)])])):(r.openBlock(),r.createElementBlock("div",N4,[r.createVNode(Ut,{text:c.value,icon:n.icon,variant:e.variant,size:e.size,"bg-color":e.bgColor,"text-color":e.textColor,"border-color":e.borderColor,"border-style":e.borderStyle,rounded:e.rounded,disabled:e.disabled,type:"button",class:r.normalizeClass(["group/btn gap-1.5 inline-flex items-center select-none",{"ring-2 ring-indigo-300/40 dark:ring-indigo-500/30":s.value}]),onClick:h},{default:r.withCtx(()=>[r.createElementVNode("span",D4,r.toDisplayString(c.value),1),_[1]||(_[1]=r.createElementVNode("span",{class:"w-px h-3.5 bg-current opacity-20 mx-0.5 shrink-0"},null,-1)),r.createVNode(r.unref(Ae.ChevronDown),{class:r.normalizeClass(["w-3.5 h-3.5 transition-transform duration-200 shrink-0 opacity-70 group-hover/btn:opacity-100",{"rotate-180":s.value}])},null,8,["class"])]),_:1},8,["text","icon","variant","size","bg-color","text-color","border-color","border-style","rounded","disabled","class"])])),r.createVNode(r.Transition,{"enter-active-class":"transition duration-200 ease-out origin-top","enter-from-class":"transform scale-y-95 opacity-0 -translate-y-1","enter-to-class":"transform scale-y-100 opacity-100 translate-y-0","leave-active-class":"transition duration-150 ease-in origin-top","leave-from-class":"transform scale-y-100 opacity-100 translate-y-0","leave-to-class":"transform scale-y-95 opacity-0 -translate-y-1"},{default:r.withCtx(()=>[s.value&&l.value.length>0?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(["absolute top-full mt-1.5 z-50 min-w-[200px] w-max max-w-[360px] overflow-hidden rounded-xl border border-slate-200/80 dark:border-neutral-700/80 bg-white dark:bg-neutral-900 py-1.5 shadow-2xl shadow-black/15 dark:shadow-black/60 ring-1 ring-black/[0.06] dark:ring-white/[0.08] backdrop-blur-xl",e.menuAlign==="left"?"left-0":"right-0"])},[r.createElementVNode("div",M4,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(l.value,(x,B)=>(r.openBlock(),r.createElementBlock(r.Fragment,{key:x.id||x.key||x.value||B},[B>0?(r.openBlock(),r.createElementBlock("div",R4)):r.createCommentVNode("",!0),r.createElementVNode("button",{type:"button",disabled:x.disabled,class:"group/item relative flex w-full items-center gap-2.5 rounded-md mx-1 px-3 py-2 text-[13px] font-medium text-slate-700 dark:text-neutral-300 outline-none transition-all duration-150 hover:bg-indigo-50 dark:hover:bg-indigo-500/10 hover:text-indigo-700 dark:hover:text-indigo-300 focus-visible:bg-indigo-50 dark:focus-visible:bg-indigo-500/10 focus-visible:text-indigo-700 dark:focus-visible:text-indigo-300 focus-visible:outline-none disabled:pointer-events-none disabled:opacity-40 text-left cursor-pointer",style:{width:"calc(100% - 0.5rem)"},onClick:R=>p(x,R)},[x.icon||x.propsActionGlobal?.icon||x.propsActionCustom?.icon||x.props?.icon?(r.openBlock(),r.createBlock(r.resolveDynamicComponent(f(x.icon||x.propsActionGlobal?.icon||x.propsActionCustom?.icon||x.props?.icon)),{key:0,class:"w-4 h-4 shrink-0 text-slate-400 group-hover/item:text-indigo-500 dark:text-neutral-500 dark:group-hover/item:text-indigo-400 transition-colors duration-150"})):r.createCommentVNode("",!0),r.createElementVNode("span",O4,r.toDisplayString(d(x)||x.value||"Option"),1),_[2]||(_[2]=r.createElementVNode("span",{class:"w-1.5 h-1.5 rounded-full bg-indigo-400/0 group-hover/item:bg-indigo-400 dark:group-hover/item:bg-indigo-500 transition-all duration-200 shrink-0"},null,-1))],8,I4)],64))),128))])],2)):r.createCommentVNode("",!0)]),_:1})],2)):r.createCommentVNode("",!0)}}),L4={class:"flex flex-col gap-1"},F4={key:0,class:"flex items-center gap-2"},$4={name:"DCodeCard"},Pi=r.defineComponent({...$4,props:{level:{default:1},title:{},subtitle:{},shadow:{type:Boolean,default:!1},border:{type:Boolean,default:!0},padding:{default:"p-6"},headerTheme:{default:"neutral"}},setup(e){const t=e,n=r.useSlots(),o=d=>{if(!d)return!1;const f=d(),h=p=>p.some(g=>g.type===r.Comment?!1:g.type===r.Fragment?Array.isArray(g.children)&&h(g.children):g.type===r.Text?typeof g.children=="string"&&g.children.trim()!=="":!(g.dirs&&g.dirs.some(b=>(b.dir===r.vShow||b.dir?.name==="show")&&b.value===!1)));return h(f)},i=r.computed(()=>!!(t.title||n.header||n.actions)),s=r.computed(()=>o(n.default)),a=r.computed(()=>o(n.footer)),l=r.computed(()=>i.value||s.value||a.value),c=r.computed(()=>{switch(t.level){case 2:return"bg-neutral-50 dark:bg-neutral-800";case 3:return"bg-neutral-100 dark:bg-neutral-700";default:return"bg-white dark:bg-neutral-900"}});return(d,f)=>l.value?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(["transition-shadow duration-300 dcode-card",[c.value,{"shadow-md":e.shadow},{"border-transparent":!e.border},{"border border-neutral-200 dark:border-neutral-800":e.border&&e.level===1},{"border border-neutral-300 dark:border-neutral-700":e.border&&e.level!==1},"overflow-hidden"]])},[i.value?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(["flex items-center justify-between backdrop-blur-sm transition-colors duration-300 px-4 py-3",[e.title||d.$slots.header?e.headerTheme==="primary"?"bg-primary-700 dark:bg-primary-900 border-b border-primary-500/30 dark:border-primary-900/50":"bg-neutral-200/50 dark:bg-neutral-950/40 border-b border-neutral-200 dark:border-neutral-800/50":"bg-transparent border-b-transparent"]])},[r.createElementVNode("div",L4,[r.renderSlot(d.$slots,"header",{},()=>[e.title?(r.openBlock(),r.createElementBlock("h3",{key:0,class:r.normalizeClass(["text-sm font-semibold leading-tight",e.headerTheme==="primary"?"text-white dark:text-neutral-100":"text-neutral-900 dark:text-neutral-100"])},r.toDisplayString(e.title),3)):r.createCommentVNode("",!0),e.subtitle?(r.openBlock(),r.createElementBlock("p",{key:1,class:r.normalizeClass(["text-xs",e.headerTheme==="primary"?"text-white/80 dark:text-neutral-300":"text-neutral-500 dark:text-neutral-400"])},r.toDisplayString(e.subtitle),3)):r.createCommentVNode("",!0)])]),d.$slots.actions?(r.openBlock(),r.createElementBlock("div",F4,[r.renderSlot(d.$slots,"actions")])):r.createCommentVNode("",!0)],2)):r.createCommentVNode("",!0),s.value?(r.openBlock(),r.createElementBlock("div",{key:1,class:r.normalizeClass(["relative z-10",e.padding])},[r.renderSlot(d.$slots,"default")],2)):r.createCommentVNode("",!0),a.value?(r.openBlock(),r.createElementBlock("div",{key:2,class:r.normalizeClass(["mt-6 pt-6 border-t border-neutral-200/60 dark:border-neutral-700/50",e.padding])},[r.renderSlot(d.$slots,"footer")],2)):r.createCommentVNode("",!0)],2)):r.createCommentVNode("",!0)}}),Ul=r.defineComponent({name:"DCodeLabel",inheritAttrs:!1,__name:"DCodeLabel",props:{label:{},text:{},textSize:{},textType:{},icon:{},iconClass:{}},setup(e){const t=r.useAttrs(),n=e,o=r.computed(()=>Ti(n.icon,Yt)),i=r.computed(()=>n.textSize?`text-${n.textSize}`:"text-xs"),s={xs:"w-3 h-3",sm:"w-3.5 h-3.5",base:"w-4 h-4",lg:"w-5 h-5",xl:"w-5 h-5","2xl":"w-6 h-6","3xl":"w-7 h-7","4xl":"w-8 h-8","5xl":"w-10 h-10","6xl":"w-12 h-12"},a=r.computed(()=>s[n.textSize??"xs"]??"w-3 h-3"),l=r.computed(()=>n.textType==="BOLD"?"font-bold":n.textType==="ITALIC"?"italic font-normal":"font-normal"),c=r.computed(()=>{const f=`${i.value} ${l.value} text-zinc-700 dark:text-zinc-400 ml-1 inline-flex items-center gap-1`,h=t.class??"";return[f,h].filter(Boolean).join(" ")}),d=r.computed(()=>{const{class:f,...h}=t;return h});return(f,h)=>(r.openBlock(),r.createElementBlock("span",r.mergeProps({class:c.value},d.value),[o.value?(r.openBlock(),r.createBlock(r.resolveDynamicComponent(o.value),{key:0,class:r.normalizeClass(["shrink-0",a.value,e.iconClass])},null,8,["class"])):r.createCommentVNode("",!0),r.createTextVNode(" "+r.toDisplayString(e.label||e.text),1)],16))}}),z4=["aria-busy"],j4=["title"],U4=["href"],W4={class:"truncate max-w-[150px]"},H4=["title"],Uu=r.defineComponent({name:"DCodeStaticLabel",__name:"DCodeStaticLabel",props:{label:{},modelValue:{},value:{},icon:{},color:{},valueType:{},prefix:{},suffix:{},type:{},locale:{default:"id-ID"},badgeColor:{default:"secondary"},placeholder:{default:"-"},skeleton:{type:Boolean,default:!1},dummyMode:{type:Boolean,default:!1},align:{default:"start"}},setup(e){const t=e,n=r.ref(!1),o=r.computed(()=>t.modelValue??t.value),i={start:"start",left:"start",center:"center",middle:"center",end:"end",right:"end"},s=r.computed(()=>i[String(t.align).toLowerCase()]??"end"),a=r.computed(()=>s.value==="start"?"w-1/2 min-w-0 overflow-hidden":"shrink-0"),l=r.computed(()=>({start:"justify-start text-left",center:"justify-center text-center",end:"justify-end text-right"})[s.value]),c=r.computed(()=>(t.valueType||t.type||"text").toUpperCase()),d=r.computed(()=>{const p=t.color||"secondary",g={primary:"border-blue-200 text-blue-700 dark:text-blue-400 dark:border-blue-900/50",success:"border-green-200 text-green-700 dark:text-green-400 dark:border-green-900/50",warning:"border-yellow-200 text-yellow-700 dark:text-yellow-400 dark:border-yellow-900/50",danger:"border-red-200 text-red-700 dark:text-red-400 dark:border-red-900/50",info:"border-cyan-200 text-cyan-700 dark:text-cyan-400 dark:border-cyan-900/50",secondary:"border-slate-200 text-slate-700 dark:border-slate-700/50 dark:text-slate-200",dark:"border-b border-gray-300 text-gray-900 dark:text-gray-100 dark:border-gray-700"};return g[p]||g.secondary}),f=r.computed(()=>{const p=t.badgeColor||"secondary",g={primary:"bg-blue-50 border-blue-200 text-blue-700 dark:bg-blue-950/20 dark:border-blue-900/50 dark:text-blue-400",success:"bg-green-50 border-green-200 text-green-700 dark:bg-green-950/20 dark:border-green-900/50 dark:text-green-400",warning:"bg-yellow-50 border-yellow-200 text-yellow-700 dark:bg-yellow-950/20 dark:border-yellow-900/50 dark:text-yellow-400",danger:"bg-red-50 border-red-200 text-red-700 dark:bg-red-950/20 dark:border-red-900/50 dark:text-red-400",info:"bg-cyan-50 border-cyan-200 text-cyan-700 dark:bg-cyan-950/20 dark:border-cyan-900/50 dark:text-cyan-400",secondary:"bg-slate-50 border-slate-200 text-slate-700 dark:bg-slate-900/20 dark:border-slate-800 dark:text-slate-200",dark:"bg-neutral-100 border-neutral-300 text-neutral-900 dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-100"};return g[p]||g.secondary}),h=r.computed(()=>{const p=o.value;if(p==null||p==="")return t.dummyMode?t.placeholder:"-";let g="";switch(c.value){case"DATE":g=nd(p,"short",t.locale);break;case"DATETIME":g=nd(p,"datetime",t.locale);break;case"CURRENCY":const _=t.prefix||"IDR";g=Zb(p,_);break;case"BOOLEAN":typeof p=="boolean"?g=t.locale.startsWith("id")?p?"Ya":"Tidak":p?"Yes":"No":g=String(p);break;case"NUMBER":const x=Number(p);g=isNaN(x)?String(p):new Intl.NumberFormat(t.locale).format(x);break;case"PASSWORD":g=n.value?String(p):"•".repeat(String(p).length||8);break;case"FILE":typeof p=="string"?g=p.split("/").pop()||"Attachment":g=p.name??p.label??"Attachment";break;default:typeof p=="object"&&p!==null?g=p.name??p.label??p.code??p.value??p.id??JSON.stringify(p):g=String(p);break}const y=c.value!=="CURRENCY"&&t.prefix?t.prefix:"",b=t.suffix||"";return`${y}${g}${b}`});return(p,g)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["flex flex-row justify-between items-center gap-4 py-3 px-0 border-b transition-all duration-300 rounded-none bg-transparent",d.value]),"aria-busy":e.skeleton},[e.skeleton?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[r.createElementVNode("div",{class:r.normalizeClass(["h-4 rounded bg-gray-200 dark:bg-gray-700 animate-shimmer",s.value==="start"?"w-1/2":"w-32"])},null,2),r.createElementVNode("div",{class:r.normalizeClass(["h-4 rounded bg-gray-200 dark:bg-gray-700 animate-shimmer",s.value==="start"?"w-1/2":"w-24"])},null,2)],64)):(r.openBlock(),r.createElementBlock(r.Fragment,{key:1},[r.createElementVNode("div",{class:r.normalizeClass(["flex items-center gap-2",a.value])},[r.createVNode(Ul,{label:e.label,icon:e.icon,class:"text-xs font-bold text-neutral-500 dark:text-neutral-400 uppercase tracking-wider"},null,8,["label","icon"])],2),r.createElementVNode("div",{class:r.normalizeClass(["flex-1 overflow-hidden flex items-center gap-2",l.value])},[r.renderSlot(p.$slots,"value",{},()=>[c.value==="PASSWORD"?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[r.createElementVNode("span",{class:"text-sm font-mono font-medium truncate block",title:String(o.value||"")},r.toDisplayString(h.value),9,j4),r.createElementVNode("button",{type:"button",class:"p-1 hover:bg-neutral-100 dark:hover:bg-neutral-800 rounded transition-colors text-neutral-500 hover:text-neutral-800 dark:hover:text-neutral-200",onClick:g[0]||(g[0]=y=>n.value=!n.value)},[n.value?(r.openBlock(),r.createBlock(r.unref(Ae.EyeOff),{key:1,class:"w-4 h-4"})):(r.openBlock(),r.createBlock(r.unref(Ae.Eye),{key:0,class:"w-4 h-4"}))])],64)):c.value==="BADGE"?(r.openBlock(),r.createElementBlock("span",{key:1,class:r.normalizeClass(["inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-semibold border transition-all duration-200",f.value])},r.toDisplayString(h.value),3)):c.value==="FILE"&&o.value&&o.value!==e.placeholder?(r.openBlock(),r.createElementBlock("a",{key:2,href:String(o.value),target:"_blank",class:"inline-flex items-center gap-1.5 text-xs font-semibold text-blue-600 dark:text-blue-400 hover:underline transition-all"},[r.createVNode(r.unref(Ae.FileText),{class:"w-3.5 h-3.5"}),r.createElementVNode("span",W4,r.toDisplayString(h.value),1),r.createVNode(r.unref(Ae.Download),{class:"w-3 h-3 text-neutral-400"})],8,U4)):(r.openBlock(),r.createElementBlock("span",{key:3,class:"text-sm font-medium truncate block",title:h.value},r.toDisplayString(h.value),9,H4))])],2)],64))],10,z4))}}),q4={key:0,class:"inline-block"},os=Sn(r.defineComponent({name:"DCodeBadge",inheritAttrs:!1,__name:"DCodeBadge",props:{text:{default:""},variant:{default:"default"},size:{default:"sm"},icon:{},dot:{type:Boolean,default:!1},pill:{type:Boolean,default:!1},color:{},skeleton:{type:Boolean,default:!1},visible:{type:Boolean,default:!0},class:{}},setup(e){const t=e,n=r.computed(()=>Ti(t.icon,Yt)),o=r.computed(()=>t.visible??!0),i=r.computed(()=>{const h={xs:"px-1.5 py-0.5 text-[10px] gap-1",sm:"px-2.5 py-0.5 text-xs gap-1.5",md:"px-3 py-1 text-sm gap-2",lg:"px-4 py-1.5 text-base gap-2.5"};return h[t.size]||h.sm}),s=r.computed(()=>{const h={xs:"w-1 h-1",sm:"w-1.5 h-1.5",md:"w-2 h-2",lg:"w-2.5 h-2.5"};return h[t.size]||h.sm}),a=r.computed(()=>{const h={xs:"w-2.5 h-2.5",sm:"w-3 h-3",md:"w-4 h-4",lg:"w-5 h-5"};return h[t.size]||h.sm}),l=r.computed(()=>{const h={default:"bg-primary text-primary-foreground border-transparent shadow hover:bg-primary/80",DEFAULT:"bg-primary text-primary-foreground border-transparent shadow hover:bg-primary/80",secondary:"bg-secondary text-secondary-foreground border-transparent hover:bg-secondary/80",SECONDARY:"bg-secondary text-secondary-foreground border-transparent hover:bg-secondary/80",destructive:"bg-destructive text-destructive-foreground border-transparent shadow hover:bg-destructive/80",DESTRUCTIVE:"bg-destructive text-destructive-foreground border-transparent shadow hover:bg-destructive/80",success:"bg-success-500 text-white border-transparent shadow-sm hover:bg-success-600",SUCCESS:"bg-success-500 text-white border-transparent shadow-sm hover:bg-success-600",warning:"bg-warning-500 text-white border-transparent shadow-sm hover:bg-warning-600",WARNING:"bg-warning-500 text-white border-transparent shadow-sm hover:bg-warning-600",info:"bg-blue-500 text-white border-transparent shadow-sm hover:bg-blue-600",INFO:"bg-blue-500 text-white border-transparent shadow-sm hover:bg-blue-600",danger:"bg-red-500 text-white border-transparent shadow-sm hover:bg-red-600",DANGER:"bg-red-500 text-white border-transparent shadow-sm hover:bg-red-600",outline:"bg-transparent border-border text-foreground",OUTLINE:"bg-transparent border-border text-foreground",tonal:"bg-primary/10 text-primary border-transparent hover:bg-primary/20",TONAL:"bg-primary/10 text-primary border-transparent hover:bg-primary/20",ghost:"bg-transparent text-muted-foreground border-transparent hover:bg-accent hover:text-accent-foreground",GHOST:"bg-transparent text-muted-foreground border-transparent hover:bg-accent hover:text-accent-foreground",purple:"bg-purple-600 text-white border-transparent shadow-sm hover:bg-purple-700",PURPLE:"bg-purple-600 text-white border-transparent shadow-sm hover:bg-purple-700",pink:"bg-pink-600 text-white border-transparent shadow-sm hover:bg-pink-700",PINK:"bg-pink-600 text-white border-transparent shadow-sm hover:bg-pink-700",dark:"bg-gray-900 text-white border-transparent shadow-sm hover:bg-gray-950",light:"bg-gray-100 text-gray-900 border-gray-200 hover:bg-gray-200 dark:bg-gray-800 dark:text-gray-100 dark:border-gray-700",link:"bg-transparent text-blue-600 border-transparent hover:underline hover:text-blue-700",LINK:"bg-transparent text-blue-600 border-transparent hover:underline hover:text-blue-700",elevated:"bg-white text-gray-900 border-gray-200 shadow-md hover:shadow-lg dark:bg-gray-800 dark:text-gray-100 dark:border-gray-700",ELEVATED:"bg-white text-gray-900 border-gray-200 shadow-md hover:shadow-lg dark:bg-gray-800 dark:text-gray-100 dark:border-gray-700"};let p=h[t.variant]||h.default;if(t.color){const g=t.color.toLowerCase().replace(/_/g,"-"),y=t.variant?.toLowerCase()||"default",_={primary:{bg:"bg-primary",text:"text-primary-foreground",border:"border-transparent",hover:"hover:bg-primary/80"},success:{bg:"bg-success-500",text:"text-white",border:"border-transparent",hover:"hover:bg-success-600"},warning:{bg:"bg-warning-500",text:"text-white",border:"border-transparent",hover:"hover:bg-warning-600"},danger:{bg:"bg-red-500",text:"text-white",border:"border-transparent",hover:"hover:bg-red-600"},info:{bg:"bg-blue-500",text:"text-white",border:"border-transparent",hover:"hover:bg-blue-600"},purple:{bg:"bg-purple-600",text:"text-white",border:"border-transparent",hover:"hover:bg-purple-700"},pink:{bg:"bg-pink-600",text:"text-white",border:"border-transparent",hover:"hover:bg-pink-700"},"gradient-blue":{bg:"bg-gradient-to-r from-blue-500 to-cyan-500",text:"text-white",border:"border-transparent",hover:"hover:from-blue-600 hover:to-cyan-600"},"gradient-purple":{bg:"bg-gradient-to-r from-purple-500 to-pink-500",text:"text-white",border:"border-transparent",hover:"hover:from-purple-600 hover:to-pink-600"},"gradient-sunset":{bg:"bg-gradient-to-r from-orange-500 to-red-500",text:"text-white",border:"border-transparent",hover:"hover:from-orange-600 hover:to-red-600"},"gradient-emerald":{bg:"bg-gradient-to-r from-emerald-500 to-teal-500",text:"text-white",border:"border-transparent",hover:"hover:from-emerald-600 hover:to-teal-600"}}[g];if(_)switch(y){case"outline":return`${_.border} ${_.text} ${_.hover.replace("hover:bg-","hover:bg-").replace("500","50").replace("600","50")}`;case"tonal":return`${_.bg}/10 ${_.text} ${_.border} ${_.hover.replace("hover:bg-","hover:bg-").replace("500","20").replace("600","20")}`;case"ghost":return`bg-transparent ${_.text} border-transparent hover:bg-accent hover:text-accent-foreground`;case"link":return`bg-transparent ${_.text} border-transparent hover:underline hover:${_.text.replace("text-","text-").replace("-600","-700").replace("-500","-600")}`;case"elevated":return`bg-white ${_.text} border-gray-200 shadow-md hover:shadow-lg dark:bg-gray-800 dark:border-gray-700`;default:return`${_.bg} ${_.text} ${_.border} shadow-sm ${_.hover}`}}return p}),c=r.computed(()=>{const h={default:"bg-primary-foreground",DEFAULT:"bg-primary-foreground",secondary:"bg-secondary-foreground",SECONDARY:"bg-secondary-foreground",destructive:"bg-destructive-foreground",DESTRUCTIVE:"bg-destructive-foreground",success:"bg-white",SUCCESS:"bg-white",warning:"bg-white",WARNING:"bg-white",info:"bg-white",INFO:"bg-white",danger:"bg-white",DANGER:"bg-white",outline:"bg-primary",OUTLINE:"bg-primary",tonal:"bg-primary",TONAL:"bg-primary",ghost:"bg-muted-foreground",GHOST:"bg-muted-foreground",purple:"bg-white",PURPLE:"bg-white",pink:"bg-white",PINK:"bg-white",dark:"bg-white",light:"bg-gray-900",link:"bg-blue-600",LINK:"bg-blue-600",elevated:"bg-gray-900",ELEVATED:"bg-gray-900"};if(t.color){const p=t.color.toLowerCase().replace(/_/g,"-"),g={primary:"bg-primary-foreground",success:"bg-white",warning:"bg-white",danger:"bg-white",info:"bg-white",purple:"bg-white",pink:"bg-white","gradient-blue":"bg-white","gradient-purple":"bg-white","gradient-sunset":"bg-white","gradient-emerald":"bg-white"};if(g[p])return g[p]}return h[t.variant]||"bg-current"}),d=r.computed(()=>{const h={xs:"h-4 w-10",sm:"h-5 w-14",md:"h-6 w-18",lg:"h-7 w-24"};return _n(h[t.size]||h.sm,"rounded animate-pulse bg-muted")}),f=r.computed(()=>_n("inline-flex items-center font-semibold border transition-all duration-300 select-none focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 max-w-full whitespace-normal break-words text-left",t.pill?"rounded-full":"rounded-md",i.value,l.value,t.class));return(h,p)=>o.value?(r.openBlock(),r.createElementBlock("div",q4,[e.skeleton?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(d.value)},null,2)):(r.openBlock(),r.createElementBlock("div",{key:1,class:r.normalizeClass(f.value)},[e.dot?(r.openBlock(),r.createElementBlock("span",{key:0,class:r.normalizeClass(["rounded-full animate-pulse flex-shrink-0",s.value,c.value])},null,2)):r.createCommentVNode("",!0),n.value?(r.openBlock(),r.createBlock(r.resolveDynamicComponent(n.value),{key:1,class:r.normalizeClass(["flex-shrink-0",a.value]),"stroke-width":"2.5"},null,8,["class"])):r.createCommentVNode("",!0),r.renderSlot(h.$slots,"default",{},()=>[r.createElementVNode("span",null,r.toDisplayString(e.text),1)],!0)],2))])):r.createCommentVNode("",!0)}}),[["__scopeId","data-v-4aca395e"]]),K4=r.defineComponent({__name:"Pagination",props:{page:{},defaultPage:{},itemsPerPage:{},total:{},siblingCount:{},disabled:{type:Boolean},showEdges:{type:Boolean},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},emits:["update:page"],setup(e,{emit:t}){const n=e,o=t,i=Lo.reactiveOmit(n,"class"),s=Lt.useForwardPropsEmits(i,o);return(a,l)=>(r.openBlock(),r.createBlock(r.unref(Lt.PaginationRoot),r.mergeProps({"data-slot":"pagination"},r.unref(s),{class:n.class}),{default:r.withCtx(c=>[r.renderSlot(a.$slots,"default",r.normalizeProps(r.guardReactiveProps(c)))]),_:3},16,["class"]))}}),G4=r.defineComponent({__name:"PaginationContent",props:{asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,n=Lo.reactiveOmit(t,"class");return(o,i)=>(r.openBlock(),r.createBlock(r.unref(Lt.PaginationList),r.mergeProps({"data-slot":"pagination-content"},r.unref(n),{class:r.unref(_n)("flex flex-row items-center gap-1",t.class)}),{default:r.withCtx(s=>[r.renderSlot(o.$slots,"default",r.normalizeProps(r.guardReactiveProps(s)))]),_:3},16,["class"]))}}),Y4=r.defineComponent({__name:"PaginationEllipsis",props:{asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,n=Lo.reactiveOmit(t,"class");return(o,i)=>(r.openBlock(),r.createBlock(r.unref(Lt.PaginationEllipsis),r.mergeProps({"data-slot":"pagination-ellipsis"},r.unref(n),{class:r.unref(_n)("flex size-9 items-center justify-center",t.class)}),{default:r.withCtx(()=>[r.renderSlot(o.$slots,"default",{},()=>[r.createVNode(r.unref(Ae.MoreHorizontal),{class:"size-4"}),i[0]||(i[0]=r.createElementVNode("span",{class:"sr-only"},"More pages",-1))])]),_:3},16,["class"]))}}),Z4=r.defineComponent({__name:"Select",props:{open:{type:Boolean},defaultOpen:{type:Boolean},defaultValue:{},modelValue:{},nullableValue:{},by:{type:[String,Function]},dir:{},multiple:{type:Boolean},autocomplete:{},disabled:{type:Boolean},name:{},required:{type:Boolean}},emits:["update:modelValue","update:open"],setup(e,{emit:t}){const n=e,o=t,i=Lt.useForwardPropsEmits(n,o);return(s,a)=>(r.openBlock(),r.createBlock(r.unref(Lt.SelectRoot),r.normalizeProps(r.guardReactiveProps(r.unref(i))),{default:r.withCtx(()=>[r.renderSlot(s.$slots,"default")]),_:3},16))}}),X4=r.defineComponent({inheritAttrs:!1,__name:"SelectContent",props:{forceMount:{type:Boolean},position:{default:"popper"},bodyLock:{type:Boolean},memoDependencies:{},side:{},sideOffset:{},sideFlip:{type:Boolean},align:{},alignOffset:{},alignFlip:{type:Boolean},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},hideShiftedArrow:{type:Boolean},sticky:{},hideWhenDetached:{type:Boolean},positionStrategy:{},updatePositionStrategy:{},disableUpdateOnLayoutShift:{type:Boolean},prioritizePosition:{type:Boolean},reference:{},dir:{},asChild:{type:Boolean},as:{},disableOutsidePointerEvents:{type:Boolean},class:{type:[Boolean,null,String,Object,Array]}},emits:["closeAutoFocus","escapeKeyDown","pointerDownOutside"],setup(e,{emit:t}){const n=e,o=t,i=Lo.reactiveOmit(n,"class"),s=Lt.useForwardPropsEmits(i,o);return(a,l)=>(r.openBlock(),r.createBlock(r.unref(Lt.SelectPortal),null,{default:r.withCtx(()=>[r.createVNode(r.unref(Lt.SelectContent),r.mergeProps({...r.unref(s),...a.$attrs},{class:r.unref(_n)("relative z-50 max-h-96 min-w-32 overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e.position==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",n.class)}),{default:r.withCtx(()=>[r.createVNode(r.unref(e3)),r.createVNode(r.unref(Lt.SelectViewport),{class:r.normalizeClass(r.unref(_n)("p-1",e.position==="popper"&&"h-[--reka-select-trigger-height] w-full min-w-[--reka-select-trigger-width]"))},{default:r.withCtx(()=>[r.renderSlot(a.$slots,"default")]),_:3},8,["class"]),r.createVNode(r.unref(V4))]),_:3},16,["class"])]),_:3}))}}),J4={class:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center"},Q4=r.defineComponent({__name:"SelectItem",props:{value:{},disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,n=Lo.reactiveOmit(t,"class"),o=Lt.useForwardProps(n);return(i,s)=>(r.openBlock(),r.createBlock(r.unref(Lt.SelectItem),r.mergeProps(r.unref(o),{class:r.unref(_n)("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t.class)}),{default:r.withCtx(()=>[r.createElementVNode("span",J4,[r.createVNode(r.unref(Lt.SelectItemIndicator),null,{default:r.withCtx(()=>[r.createVNode(r.unref(Ae.Check),{class:"h-4 w-4"})]),_:1})]),r.createVNode(r.unref(Lt.SelectItemText),null,{default:r.withCtx(()=>[r.renderSlot(i.$slots,"default")]),_:3})]),_:3},16,["class"]))}}),V4=r.defineComponent({__name:"SelectScrollDownButton",props:{asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,n=Lo.reactiveOmit(t,"class"),o=Lt.useForwardProps(n);return(i,s)=>(r.openBlock(),r.createBlock(r.unref(Lt.SelectScrollDownButton),r.mergeProps(r.unref(o),{class:r.unref(_n)("flex cursor-default items-center justify-center py-1",t.class)}),{default:r.withCtx(()=>[r.renderSlot(i.$slots,"default",{},()=>[r.createVNode(r.unref(Ae.ChevronDown))])]),_:3},16,["class"]))}}),e3=r.defineComponent({__name:"SelectScrollUpButton",props:{asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,n=Lo.reactiveOmit(t,"class"),o=Lt.useForwardProps(n);return(i,s)=>(r.openBlock(),r.createBlock(r.unref(Lt.SelectScrollUpButton),r.mergeProps(r.unref(o),{class:r.unref(_n)("flex cursor-default items-center justify-center py-1",t.class)}),{default:r.withCtx(()=>[r.renderSlot(i.$slots,"default",{},()=>[r.createVNode(r.unref(Ae.ChevronUp))])]),_:3},16,["class"]))}}),t3=r.defineComponent({__name:"SelectTrigger",props:{disabled:{type:Boolean},reference:{},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,n=Lo.reactiveOmit(t,"class"),o=Lt.useForwardProps(n);return(i,s)=>(r.openBlock(),r.createBlock(r.unref(Lt.SelectTrigger),r.mergeProps(r.unref(o),{class:r.unref(_n)("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background data-[placeholder]:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:truncate text-start",t.class)}),{default:r.withCtx(()=>[r.renderSlot(i.$slots,"default"),r.createVNode(r.unref(Lt.SelectIcon),{"as-child":""},{default:r.withCtx(()=>[r.createVNode(r.unref(Ae.ChevronDown),{class:"w-4 h-4 opacity-50 shrink-0"})]),_:1})]),_:3},16,["class"]))}}),n3=r.defineComponent({__name:"SelectValue",props:{placeholder:{},asChild:{type:Boolean},as:{}},setup(e){const t=e;return(n,o)=>(r.openBlock(),r.createBlock(r.unref(Lt.SelectValue),r.normalizeProps(r.guardReactiveProps(t)),{default:r.withCtx(()=>[r.renderSlot(n.$slots,"default")]),_:3},16))}}),o3={class:"px-4 py-3 bg-zinc-50/50 dark:bg-zinc-800/30 border-t border-neutral-200 dark:border-neutral-700 flex flex-col sm:flex-row items-center justify-between gap-4 w-full"},r3={class:"flex items-center gap-4"},i3={key:1,class:"text-xs text-neutral-500 dark:text-neutral-400 font-medium"},s3={class:"text-neutral-900 dark:text-neutral-100 font-medium"},a3={class:"text-neutral-900 dark:text-neutral-100 font-medium"},l3={class:"text-neutral-900 dark:text-neutral-100 font-medium"},c3={class:"flex-shrink-0"},Im=r.defineComponent({name:"DCodePagination",__name:"DCodePagination",props:{totalItems:{},currentPage:{},perPage:{},perPageOptions:{default:()=>[10,25,50,100]},showPerPage:{type:Boolean,default:!0},showInfo:{type:Boolean,default:!0},showEdges:{type:Boolean,default:!0},loading:{type:Boolean,default:!1}},emits:["update:page","update:perPage"],setup(e,{emit:t}){const n=e,o=t,{t:i}=In.useI18n(),s=r.computed(()=>Math.max(1,Math.ceil(n.totalItems/n.perPage))),a=r.computed(()=>n.totalItems===0?0:(n.currentPage-1)*n.perPage+1),l=r.computed(()=>{const f=n.currentPage*n.perPage;return Math.min(f,n.totalItems)}),c=f=>{f<1||f>s.value||f===n.currentPage||o("update:page",f)},d=f=>{o("update:perPage",f)};return(f,h)=>(r.openBlock(),r.createElementBlock("div",o3,[r.createElementVNode("div",r3,[e.showPerPage?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[r.createVNode(r.unref(Z4),{"model-value":String(e.perPage),"onUpdate:modelValue":h[0]||(h[0]=p=>d(Number(p))),disabled:e.loading},{default:r.withCtx(()=>[r.createVNode(r.unref(t3),{class:"h-8 w-[70px] bg-white dark:bg-zinc-800 border-neutral-200 dark:border-neutral-700"},{default:r.withCtx(()=>[r.createVNode(r.unref(n3),{placeholder:String(e.perPage)},null,8,["placeholder"])]),_:1}),r.createVNode(r.unref(X4),null,{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(e.perPageOptions,p=>(r.openBlock(),r.createBlock(r.unref(Q4),{key:p,value:String(p)},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(p),1)]),_:2},1032,["value"]))),128))]),_:1})]),_:1},8,["model-value","disabled"]),h[5]||(h[5]=r.createElementVNode("div",{class:"h-5 w-px bg-zinc-300 dark:bg-zinc-600"},null,-1))],64)):r.createCommentVNode("",!0),e.showInfo?(r.openBlock(),r.createElementBlock("span",i3,[r.createTextVNode(r.toDisplayString(r.unref(i)("dataTable.showing"))+" ",1),r.createElementVNode("span",s3,r.toDisplayString(a.value),1),r.createTextVNode(" "+r.toDisplayString(r.unref(i)("dataTable.to"))+" ",1),r.createElementVNode("span",a3,r.toDisplayString(l.value),1),r.createTextVNode(" "+r.toDisplayString(r.unref(i)("dataTable.of"))+" ",1),r.createElementVNode("span",l3,r.toDisplayString(e.totalItems),1),r.createTextVNode(" "+r.toDisplayString(r.unref(i)("dataTable.data")),1)])):r.createCommentVNode("",!0)]),r.createElementVNode("div",c3,[r.createVNode(r.unref(K4),{total:e.totalItems,"items-per-page":e.perPage,"sibling-count":1,"show-edges":e.showEdges,page:e.currentPage,"onUpdate:page":c,disabled:e.loading},{default:r.withCtx(()=>[r.createVNode(r.unref(G4),{class:"flex items-center gap-1"},{default:r.withCtx(({items:p})=>[r.createVNode(Ut,{size:"icon",icon:"ChevronsLeft",variant:"outline",disabled:e.currentPage===1||e.loading,class:"w-8 h-8 p-0",onClick:h[1]||(h[1]=g=>c(1))},null,8,["disabled"]),r.createVNode(Ut,{size:"icon",icon:"ChevronLeft",variant:"outline",disabled:e.currentPage===1||e.loading,class:"w-8 h-8 p-0",onClick:h[2]||(h[2]=g=>c(e.currentPage-1))},null,8,["disabled"]),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(p,(g,y)=>(r.openBlock(),r.createElementBlock(r.Fragment,null,[g.type==="page"?(r.openBlock(),r.createBlock(Ut,{key:y,text:String(g.value),size:"icon",variant:g.value===e.currentPage?"default":"outline",disabled:g.value===e.currentPage||e.loading,"aria-current":g.value===e.currentPage?"page":void 0,class:"w-8 h-8 p-0 text-sm",onClick:b=>c(g.value)},null,8,["text","variant","disabled","aria-current","onClick"])):(r.openBlock(),r.createBlock(r.unref(Y4),{key:g.type,index:y},null,8,["index"]))],64))),256)),r.createVNode(Ut,{size:"icon",icon:"ChevronRight",variant:"outline",disabled:e.currentPage>=s.value||e.loading,class:"w-8 h-8 p-0",onClick:h[3]||(h[3]=g=>c(e.currentPage+1))},null,8,["disabled"]),r.createVNode(Ut,{size:"icon",icon:"ChevronsRight",variant:"outline",disabled:e.currentPage>=s.value||e.loading,class:"w-8 h-8 p-0",onClick:h[4]||(h[4]=g=>c(s.value))},null,8,["disabled"])]),_:1})]),_:1},8,["total","items-per-page","show-edges","page","disabled"])])]))}}),Om={common:{rangeField:{orderError:"Nilai dari tidak boleh lebih besar dari nilai sampai"}},cardList:{statusLabel:"STATUS:",noRek:"No. Rek",mulai:"Mulai",plafon:"Plafon",bakiDebet:"Baki Debet",jatuhTempo:"Jatuh Tempo",sifat:"Sifat",sukuBunga:"Suku Bunga",tunggakan:"Tunggakan",fixedRate:"Suku Bunga Fixed",floatingRate:"Suku Bunga Floating",historyPart1:"Riwayat Kepatuhan (Bulan 1-12)",historyPart2:"Riwayat Kepatuhan (Bulan 13-24)",collateralLegality:"Legalitas Agunan",collateral:"Agunan",appraisalValue:"Nilai Taksasi",binding:"Pengikatan",emptyCreditData:"Belum ada data fasilitas kredit",noHistoryData:"Tidak ada data riwayat",defaultFacility:"Fasilitas",defaultSectionTitle:"Rincian Fasilitas",days:"Hari",statusLancar:"Lancar",statusDpk:"Dalam Perhatian Khusus",statusKurangLancar:"Kurang Lancar",statusDiragukan:"Diragukan",statusMacet:"Macet",sortFirst:"Urutan Awal",sortLast:"Urutan Akhir",filterAll:"Semua Status",noFilterResult:"Tidak ada data yang sesuai filter",showing:"Menampilkan",of:"dari",page:"Halaman",perPageSuffix:"data per halaman",items:"data",prevPage:"Sebelumnya",nextPage:"Berikutnya"}},_x={common:{rangeField:{orderError:"Lower bound must not be greater than upper bound"}},cardList:{statusLabel:"STATUS:",noRek:"Account No.",mulai:"Start Date",plafon:"Credit Limit",bakiDebet:"Outstanding",jatuhTempo:"Maturity Date",sifat:"Nature of Credit",sukuBunga:"Interest Rate",tunggakan:"Past Due",fixedRate:"Fixed Interest Rate",floatingRate:"Floating Interest Rate",historyPart1:"Compliance History (Months 1-12)",historyPart2:"Compliance History (Months 13-24)",collateralLegality:"Collateral Legality",collateral:"Collateral",appraisalValue:"Appraisal Value",binding:"Binding",emptyCreditData:"No credit facility data available",noHistoryData:"No history data",defaultFacility:"Facility",defaultSectionTitle:"Facility Details",days:"Days",statusLancar:"Current",statusDpk:"Special Mention",statusKurangLancar:"Substandard",statusDiragukan:"Doubtful",statusMacet:"Loss",sortFirst:"First Order",sortLast:"Last Order",filterAll:"All Status",noFilterResult:"No data matches the filter",showing:"Showing",of:"of",page:"Page",perPageSuffix:"items per page",items:"entries",prevPage:"Previous",nextPage:"Next"}},xx={common:{rangeField:{orderError:"시작 값은 끝 값보다 클 수 없습니다"}},cardList:{statusLabel:"상태:",noRek:"계좌번호",mulai:"시작일",plafon:"한도액",bakiDebet:"대출잔액",jatuhTempo:"만기일",sifat:"여신성격",sukuBunga:"금리",tunggakan:"연체액",fixedRate:"고정금리",floatingRate:"변동금리",historyPart1:"상환이력 (1-12개월)",historyPart2:"상환이력 (13-24개월)",collateralLegality:"담보 적법성",collateral:"담보",appraisalValue:"감정평가액",binding:"담보설정",emptyCreditData:"신용 공여 내역이 없습니다",noHistoryData:"이력 데이터가 없습니다",defaultFacility:"여신",defaultSectionTitle:"여신 상세 내역",days:"일",statusLancar:"정상",statusDpk:"요주의",statusKurangLancar:"고정이하",statusDiragukan:"회수의문",statusMacet:"추정손실",sortFirst:"처음 순서",sortLast:"마지막 순서",filterAll:"모든 상태",noFilterResult:"필터와 일치하는 데이터가 없습니다",showing:"표시 중",of:"/",page:"페이지",perPageSuffix:"개씩 보기",items:"개",prevPage:"이전",nextPage:"다음"}},d3={class:"dcode-card-list w-full space-y-4"},u3={key:0,class:"flex items-center justify-between gap-4 pb-1 flex-wrap"},f3={class:"flex flex-col gap-0.5"},h3={key:0,class:"flex items-center gap-2"},m3={class:"font-bold text-base text-neutral-900 dark:text-neutral-100 tracking-tight"},p3={key:0,class:"flex items-center gap-2 shrink-0 flex-wrap"},g3={key:1,class:"space-y-4"},b3={class:"p-5 grid grid-cols-2 gap-4"},y3={key:2,class:"p-8 text-center border border-dashed border-neutral-300 dark:border-neutral-700 rounded-xl bg-neutral-50/50 dark:bg-neutral-900/50 flex flex-col items-center justify-center gap-2.5"},v3={class:"h-10 w-10 rounded-full bg-neutral-100 dark:bg-neutral-800 flex items-center justify-center text-neutral-400"},w3={class:"text-sm font-medium text-neutral-700 dark:text-neutral-300"},k3=["onClick"],_3={class:"font-bold text-sm tracking-tight flex items-baseline gap-1.5 flex-wrap"},x3={class:"font-extrabold text-primary-600 dark:text-primary-400"},E3={class:"font-bold text-neutral-900 dark:text-neutral-100"},C3={key:0,class:"font-medium text-neutral-600 dark:text-neutral-400 text-xs sm:text-sm"},S3={class:"flex items-center gap-2 shrink-0"},A3={class:"space-y-2.5"},T3={class:"grid grid-cols-2 md:grid-cols-4 gap-x-6 gap-y-2 py-2 border-t border-neutral-100 dark:border-neutral-800 text-xs"},B3={class:"flex items-baseline gap-1.5 min-w-0"},P3={class:"text-neutral-500 dark:text-neutral-400 shrink-0 w-24"},N3={class:"font-semibold text-neutral-900 dark:text-neutral-100 truncate"},D3={class:"flex items-baseline gap-1.5 min-w-0"},M3={class:"text-neutral-500 dark:text-neutral-400 shrink-0 w-24"},R3={class:"font-semibold text-neutral-900 dark:text-neutral-100 truncate"},I3={class:"flex items-baseline gap-1.5 min-w-0"},O3={class:"text-neutral-500 dark:text-neutral-400 shrink-0 w-24"},L3={class:"font-semibold text-neutral-900 dark:text-neutral-100 truncate"},F3={class:"flex items-baseline gap-1.5 min-w-0"},$3={class:"text-neutral-500 dark:text-neutral-400 shrink-0 w-24"},z3={class:"font-semibold text-neutral-900 dark:text-neutral-100 truncate"},j3={class:"flex items-baseline gap-1.5 min-w-0"},U3={class:"text-neutral-500 dark:text-neutral-400 shrink-0 w-24"},W3={class:"font-semibold text-neutral-900 dark:text-neutral-100 truncate"},H3={class:"flex items-baseline gap-1.5 min-w-0"},q3={class:"text-neutral-500 dark:text-neutral-400 shrink-0 w-24"},K3={class:"font-semibold text-neutral-900 dark:text-neutral-100 truncate"},G3={class:"flex items-baseline gap-1.5 min-w-0"},Y3={class:"text-neutral-500 dark:text-neutral-400 shrink-0 w-24"},Z3={class:"font-semibold text-neutral-900 dark:text-neutral-100 truncate"},X3={class:"flex items-baseline gap-1.5 min-w-0"},J3={class:"text-neutral-500 dark:text-neutral-400 shrink-0 w-24"},Q3={class:"font-semibold text-neutral-900 dark:text-neutral-100 truncate"},V3={class:"text-xs space-y-1 py-1 border-t border-neutral-100 dark:border-neutral-800/60"},eL={class:"text-neutral-500 dark:text-neutral-400 font-medium"},tL={class:"space-y-0.5 pl-2"},nL={class:"font-semibold text-neutral-900 dark:text-neutral-100"},oL={key:1,class:"flex items-baseline gap-1.5"},rL={class:"text-neutral-500 dark:text-neutral-400 font-medium shrink-0 w-24"},iL={class:"overflow-x-auto rounded border border-neutral-200 dark:border-neutral-800 shadow-xs"},sL={class:"w-full text-center border-collapse text-[10px] leading-tight"},aL={class:"text-white dark:text-neutral-100 font-bold"},lL=["colspan"],cL=["colspan"],dL={class:"text-white/90 dark:text-neutral-200 font-medium"},uL={key:0,class:"pt-2 space-y-3"},fL={class:"flex items-center gap-1.5"},hL={class:"text-xs font-bold text-neutral-700 dark:text-neutral-200 uppercase tracking-wide"},mL={class:"rounded-lg border border-neutral-200 dark:border-neutral-700/80 overflow-x-auto shadow-xs"},pL={class:"min-w-full text-xs text-left divide-y divide-neutral-200 dark:divide-neutral-700/80"},gL={class:"bg-neutral-50 dark:bg-neutral-800/80 text-neutral-600 dark:text-neutral-300 font-semibold"},bL={class:"divide-y divide-neutral-100 dark:divide-neutral-800/60 bg-white dark:bg-neutral-900"},yL={key:1},vL=["colspan"],wL=["onClick"],kL={class:"flex items-center gap-2.5 min-w-0"},_L={class:"p-1.5 rounded-lg bg-primary-50 dark:bg-primary-950/60 text-primary-600 dark:text-primary-400 shrink-0"},xL={class:"font-semibold text-sm text-neutral-800 dark:text-neutral-100 truncate"},EL={class:"flex items-center gap-2"},CL={key:0,class:"text-xs px-2 py-0.5 rounded-md font-medium bg-neutral-200/60 dark:bg-neutral-700 text-neutral-600 dark:text-neutral-300"},SL={class:"transition-all duration-200"},AL={class:"flex items-center gap-2 pt-2"},TL={class:"text-xs font-bold text-neutral-700 dark:text-neutral-200 uppercase tracking-wide"},BL={class:"rounded-lg border border-neutral-200 dark:border-neutral-700/80 overflow-x-auto shadow-xs"},PL={class:"min-w-full text-xs text-left divide-y divide-neutral-200 dark:divide-neutral-700/80"},NL={class:"bg-neutral-50 dark:bg-neutral-800/80 text-neutral-600 dark:text-neutral-300 font-semibold"},DL={class:"divide-y divide-neutral-100 dark:divide-neutral-800/60 bg-white dark:bg-neutral-900"},ML={key:1},RL=["colspan"],IL={key:2,class:"px-5 pb-4 pt-2 border-t border-neutral-100 dark:border-neutral-800/60"},OL={name:"DCodeCardList"},oy=r.defineComponent({...OL,name:"DCodeCardList",props:{items:{},modelValue:{},formData:{},model:{},titleTemplate:{},fields:{},subTables:{},columns:{default:2},title:{},titleID:{},titleEN:{},titleKR:{},label:{},labelID:{},labelEN:{},labelKR:{},description:{},descriptionID:{},descriptionEN:{},endpoint:{},apiUrl:{},apiMethod:{},apiParams:{},dataPath:{},loading:{type:Boolean},emptyText:{},emptyIcon:{},cardBorder:{type:Boolean,default:!0},collapsible:{type:Boolean,default:!1},showIndex:{type:Boolean,default:!0},maxHeight:{},dummyMode:{type:Boolean,default:!1},locale:{default:"id"},showPagination:{type:Boolean,default:!0}},emits:["update:modelValue","card-click"],setup(e,{emit:t}){const n=e,o=t,i=r.inject("externalApi",null),s={id:Om.cardList,en:_x.cardList,kr:xx.cardList};let a=null;try{a=In.useI18n()}catch{}const l=r.computed(()=>{const Z=n.locale||a?.locale?.value||"id",ee=String(Z).toLowerCase();return ee.startsWith("kr")||ee.startsWith("ko")?"kr":ee.startsWith("en")?"en":"id"});function c(Z){return a?.te&&a.te(`cardList.${Z}`)?a.t(`cardList.${Z}`):(s[l.value]||Om.cardList)?.[Z]||Om.cardList?.[Z]||Z}const d=r.ref([]),f=r.ref(!1),h=r.ref(new Set),p=r.ref(5),g=r.ref(1),y=[5,10,20,50,100],b=["24/10","24/11","24/12","25/01","25/02","25/03","25/04","25/05","25/06","25/07","25/08","25/09","25/10","25/11","25/12","26/01","26/02","26/03","26/04","26/05","26/06","26/07","26/08","26/09"];function _(Z="1"){return b.map(ee=>({bulanTahun:ee,statusKol:Z,hariTunggakan:"0"}))}const x=[{ljk:"PT Bank Example 1",jenisKredit:"Kredit atau Pembiayaan yang Diberikan",status:"Lancar",noRekening:"123456789001",mulai:"2015-08-13",jatuhTempo:"2017-08-13",plafon:"0",bakiDebet:"0",sifatKredit:"Lainnya",sukuBunga:"0% Suku Bunga Fixed",tunggakan:"0 (DPD: 0)",matriks24Bulan:_("1")},{ljk:"PT Bank Example 2",jenisKredit:"Kredit atau Pembiayaan kepada Pihak Ketiga Melalui Lembaga Lain Secara Channeling",status:"Lancar",noRekening:"123456789002",mulai:"2017-09-14",jatuhTempo:"2019-06-03",plafon:"469.069.175",bakiDebet:"0",sifatKredit:"Lainnya",sukuBunga:"13.87% Suku Bunga Fixed",tunggakan:"0 (DPD: 0)",matriks24Bulan:_("1")},{ljk:"PT Bank Example 3",jenisKredit:"Kredit atau Pembiayaan yang Diberikan",status:"Lancar",noRekening:"123456789003",mulai:"2018-05-17",jatuhTempo:"2021-05-17",plafon:"871.256.762",bakiDebet:"0",sifatKredit:"Lainnya",sukuBunga:"21.01% Suku Bunga Floating",tunggakan:"0 (DPD: 0)",matriks24Bulan:_("1")},{ljk:"PT Bank Example 4",jenisKredit:"Kredit atau Pembiayaan kepada Pihak Ketiga Melalui Lembaga Lain Secara Channeling",status:"Lancar",noRekening:"123456789004",mulai:"2017-05-26",jatuhTempo:"2019-06-03",plafon:"0",bakiDebet:"0",sifatKredit:"Lainnya",sukuBunga:"15.87% Suku Bunga Fixed",tunggakan:"0 (DPD: 0)",matriks24Bulan:_("1")},{ljk:"PT Bank Example 5",jenisKredit:"Lainnya (Dengan Perjanjian)",status:"Lancar",noRekening:"123456789005",mulai:"2019-05-24",jatuhTempo:"2025-04-25",plafon:"0",bakiDebet:"0",sifatKredit:"Kredit atau pembiayaan yang direstrukturisasi dalam rangka kebijakan stimulus",sukuBunga:"19.24% Suku Bunga Floating",tunggakan:"0 (DPD: 0)",matriks24Bulan:_("1")}],B=[{model:"bankName",label:"Nama Bank / LJK",column:"HALF"},{model:"accountNo",label:"Nomor Rekening",column:"HALF"},{model:"plafon",label:"Plafon Pinjaman",prefix:"Rp ",column:"HALF"},{model:"bakiDebet",label:"Baki Debet",prefix:"Rp ",column:"HALF"},{model:"tunggakan",label:"Tunggakan Pokok",prefix:"Rp ",column:"HALF"},{model:"status",label:"Status Kolektibilitas",column:"HALF"}];function R(Z,ee){if(!Z||typeof Z!="object")return null;{const Te=te(Z,ee);if(Array.isArray(Te)&&Te.length>0)return Te;if(Array.isArray(Z.data)&&Z.data[0]){const Oe=te(Z.data[0],ee);if(Array.isArray(Oe)&&Oe.length>0)return Oe}if(Array.isArray(Z)&&Z[0]){const Oe=te(Z[0],ee);if(Array.isArray(Oe)&&Oe.length>0)return Oe}}const pe=[ee,"rincianFasilitas","fasilitas","facilities","cards","items"].filter(Boolean);for(const Te of pe){if(Array.isArray(Z[Te])&&Z[Te].length>0)return Z[Te];if(Array.isArray(Z.data)&&Z.data[0]&&Array.isArray(Z.data[0][Te])&&Z.data[0][Te].length>0)return Z.data[0][Te];if(Array.isArray(Z)&&Z[0]&&Array.isArray(Z[0][Te])&&Z[0][Te].length>0)return Z[0][Te]}const Be=Array.isArray(Z.data)?Z.data[0]:Array.isArray(Z)?Z[0]:Z;if(Be&&typeof Be=="object"){for(const[,Te]of Object.entries(Be))if(Array.isArray(Te)&&Te.length>0&&typeof Te[0]=="object"&&(Te[0].noRekening||Te[0].ljk||Te[0].matriks24Bulan||Te[0].bakiDebet||Te[0].plafon))return Te}return null}const S=r.computed(()=>{if(Array.isArray(n.items)&&n.items.length>0)return n.items;if(Array.isArray(n.modelValue)&&n.modelValue.length>0)return n.modelValue;if(d.value.length>0)return d.value;if(n.formData){const Z=R(n.formData,n.model||n.dataPath||"rincianFasilitas");if(Array.isArray(Z)&&Z.length>0)return Z}return n.dummyMode?x:Array.isArray(n.items)?n.items:Array.isArray(n.modelValue)?n.modelValue:x}),O=r.computed(()=>{const Z=(g.value-1)*p.value,ee=Z+p.value;return S.value.slice(Z,ee)});function I(Z){return(g.value-1)*p.value+Z}r.watch(p,()=>{g.value=1}),r.watch(S,()=>{g.value=1});const D=r.computed(()=>Math.max(1,Math.ceil(S.value.length/p.value)));r.watch(D,Z=>{g.value>Z&&(g.value=Z)});const w=r.computed(()=>{if(n.fields&&n.fields.length>0)return n.fields;if(n.dummyMode)return B;const Z=S.value[0];return Z&&typeof Z=="object"?Object.keys(Z).filter(ee=>!Array.isArray(Z[ee])&&typeof Z[ee]!="object").slice(0,10).map(ee=>({model:ee,label:ee.replace(/([A-Z])/g," $1").replace(/^./,pe=>pe.toUpperCase()),column:"HALF"})):[]}),E=r.computed(()=>n.loading!==void 0?n.loading:f.value),F=r.computed(()=>{const Z=l.value;return n.title||n.label?n.title||n.label||"":Z==="kr"?n.titleKR||n.labelKR||n.titleEN||n.labelEN||n.titleID||n.labelID||"":Z==="en"?n.titleEN||n.labelEN||n.titleID||n.labelID||"":n.titleID||n.labelID||n.titleEN||n.labelEN||""}),A=r.computed(()=>{const Z=l.value;return n.description?n.description:Z==="en"?n.descriptionEN||n.descriptionID||"":n.descriptionID||n.descriptionEN||""}),P=r.computed(()=>{switch(n.columns){case 1:return"grid-cols-1";case 3:return"grid-cols-1 sm:grid-cols-2 lg:grid-cols-3";case 4:return"grid-cols-1 sm:grid-cols-2 lg:grid-cols-4";default:return"grid-cols-1 sm:grid-cols-2"}}),q=r.computed(()=>n.emptyText?n.emptyText:c("emptyCreditData"));function Q(Z){return!Z||typeof Z!="object"?!1:!!(Z.ljk||Z.noRekening||Z.matriks24Bulan||Z.legalitasAgunan||Z.sifatKredit!==void 0||Z.jenisKredit!==void 0||Z.plafon!==void 0||Z.bakiDebet!==void 0||Z.bankName)}function re(Z){return!Z||!Array.isArray(Z.legalitasAgunan)||Z.legalitasAgunan.length===0?!1:Z.legalitasAgunan.some(ee=>ee&&(ee.agunan||ee.nilaiTaksasi||ee.pengikatan))}function ie(Z){const ee=Z&&Array.isArray(Z.matriks24Bulan)&&Z.matriks24Bulan.length>0&&Z.matriks24Bulan||Z&&Array.isArray(Z.matriks24BulanTerakhir)&&Z.matriks24BulanTerakhir.length>0&&Z.matriks24BulanTerakhir||Z&&Array.isArray(Z.riwayatKepatuhan)&&Z.riwayatKepatuhan.length>0&&Z.riwayatKepatuhan||Z&&Array.isArray(Z.riwayat24Bulan)&&Z.riwayat24Bulan.length>0&&Z.riwayat24Bulan||null;return ee?ee.map(pe=>{const Be=pe.bulanTahun||pe.tahunBulan||pe.periode||pe.bulan||pe.blnThn||(typeof pe=="string"?pe:""),Te=pe.statusKol!==void 0&&pe.statusKol!==null?pe.statusKol:pe.kol??pe.kolektibilitas??pe.status??(typeof pe=="object"?"":pe),Oe=pe.hariTunggakan??pe.tunggakanHari??pe.dpd??"0";return{...pe,bulanTahun:C(Be),statusKol:Te!=null?String(Te).trim():"",hariTunggakan:Oe!=null?String(Oe).trim():"0"}}):_("1")}function le(Z){const ee=ie(Z);return Math.min(12,ee.length)}function X(Z){const ee=ie(Z);return Math.max(0,ee.length-12)}function K(Z){if(Z==null)return!0;const ee=String(Z).trim();return ee===""||ee==="-"||ee.toLowerCase()==="null"||ee.toLowerCase()==="undefined"}function W(Z){if(K(Z))return!1;const ee=String(Z).trim().toLowerCase();return ee==="1"||ee==="lancar"||ee==="•"}function se(Z){if(K(Z))return"bg-neutral-50/50 dark:bg-neutral-900/50";if(W(Z))return"bg-emerald-50 dark:bg-emerald-950/40";const ee=String(Z).toLowerCase();return ee==="2"||ee.includes("perhatian")||ee.includes("dpk")?"bg-amber-50 dark:bg-amber-950/40":"bg-rose-50 dark:bg-rose-950/40"}function H(Z){if(K(Z))return"text-neutral-400 dark:text-neutral-500";if(W(Z))return"text-emerald-700 dark:text-emerald-400";const ee=String(Z).toLowerCase();return ee==="2"||ee.includes("perhatian")||ee.includes("dpk")?"text-amber-700 dark:text-amber-400":"text-rose-700 dark:text-rose-400"}function N(Z){if(!Z||K(Z.statusKol))return"-";const ee=Z.hariTunggakan!==void 0&&Z.hariTunggakan!==null&&String(Z.hariTunggakan).trim()!==""?String(Z.hariTunggakan).trim():"0",pe=c("days")?c("days").toLowerCase():"hari";return`${Z.statusKol} - ${ee} ${pe}`}function j(Z){if(!Z)return"text-emerald-600 dark:text-emerald-400";const ee=String(Z).toLowerCase();return ee.includes("lancar")||ee.includes("kol 1")||ee==="1"?"text-emerald-600 dark:text-emerald-400":ee.includes("perhatian")||ee.includes("dpk")||ee.includes("kol 2")||ee==="2"?"text-amber-600 dark:text-amber-400":"text-red-600 dark:text-red-400"}function Y(Z){if(!Z)return c("statusLancar");const ee=String(Z).toLowerCase();return ee.includes("lancar")||ee==="1"?c("statusLancar"):ee.includes("dpk")||ee.includes("perhatian")||ee==="2"?c("statusDpk"):ee.includes("kurang")||ee==="3"?c("statusKurangLancar"):ee.includes("ragu")||ee==="4"?c("statusDiragukan"):ee.includes("macet")||ee==="5"?c("statusMacet"):String(Z)}function J(Z){if(Z==null||Z==="")return"Rp 0";const ee=String(Z).trim();if(ee.startsWith("Rp"))return ee;if(/^\d{1,3}(\.\d{3})+$/.test(ee))return`Rp ${ee}`;const pe=Number(ee.replace(/[^0-9.-]+/g,""));return isNaN(pe)?ee:`Rp ${pe.toLocaleString("id-ID")}`}function U(Z){if(Z==null||Z==="")return`0% ${c("fixedRate")}`;const pe=String(Z).trim().replace(/(suku bunga\s*)+/gi,"Suku Bunga ").trim();return/suku bunga fixed/i.test(pe)?pe.replace(/suku bunga fixed/i,c("fixedRate")):/suku bunga floating/i.test(pe)?pe.replace(/suku bunga floating/i,c("floatingRate")):/fixed/i.test(pe)?pe.replace(/fixed/i,c("fixedRate")):/floating/i.test(pe)?pe.replace(/floating/i,c("floatingRate")):pe.includes("%")||pe.toLowerCase().includes("bunga")?pe:`${pe}% ${c("fixedRate")}`}function k(Z){if(Z==null||Z===""||Z==="0"||Z===0)return`Rp 0 (DPD: 0 ${c("days")})`;const ee=String(Z).trim();return ee.includes("DPD")?ee.startsWith("Rp")?ee:`Rp ${ee}`:`${J(Z)} (DPD: 0 ${c("days")})`}function C(Z){if(!Z)return"";const ee=String(Z).trim();return/^\d{6}$/.test(ee)?/^(19|20)\d{4}$/.test(ee)?`${ee.slice(2,4)}/${ee.slice(4,6)}`:/^\d{2}(19|20)\d{2}$/.test(ee)?`${ee.slice(4,6)}/${ee.slice(0,2)}`:`${ee.slice(2,4)}/${ee.slice(4,6)}`:/^\d{8}$/.test(ee)?`${ee.slice(2,4)}/${ee.slice(4,6)}`:/^\d{4}-\d{2}/.test(ee)?`${ee.slice(2,4)}/${ee.slice(5,7)}`:/^\d{4}\/\d{2}/.test(ee)?`${ee.slice(2,4)}/${ee.slice(5,7)}`:/^\d{2}\/\d{2}$/.test(ee)?ee:/^\d{2}\/\d{4}$/.test(ee)?`${ee.slice(5,7)}/${ee.slice(0,2)}`:ee}function T(Z){if(!Z)return"-";const ee=String(Z).trim();return/^\d{8}$/.test(ee)?`${ee.slice(0,4)}-${ee.slice(4,6)}-${ee.slice(6,8)}`:ee}function M(Z){if(Z.label)return Z.label;const ee=l.value;return ee==="kr"?Z.labelKR||Z.labelEN||Z.labelID||"":ee==="en"?Z.labelEN||Z.labelID||"":Z.labelID||Z.labelEN||""}function $(Z){if(Z.title)return Z.title;const ee=l.value;return ee==="kr"?Z.titleKR||Z.titleEN||Z.titleID||"":ee==="en"?Z.titleEN||Z.titleID||"":Z.titleID||Z.titleEN||""}function ne(Z,ee){const pe=n.titleTemplate;return pe?pe.replace(/\{(\w+)\}/g,(Be,Te)=>{if(Te==="index")return String(ee+1);const Oe=te(Z,Te);return Oe==null?"":String(Oe)}):`Item #${ee+1}`}function te(Z,ee){if(!(!Z||!ee))return ee.split(".").reduce((pe,Be)=>pe?.[Be],Z)}function ce(Z){const ee=(Z.column||"HALF").toUpperCase();return ee==="FULL"?"sm:col-span-2 lg:col-span-full":""}function ke(Z,ee){const pe=te(Z,ee.modelKey);return Array.isArray(pe)?pe:[]}function we(Z){h.value.has(Z)?h.value.delete(Z):h.value.add(Z)}function _e(Z){return h.value.has(Z)}function fe(Z,ee){return te(Z,ee.model)}async function de(){const Z=n.endpoint?.apiUrl||n.apiUrl;if(Z){f.value=!0;try{const ee=n.endpoint?.apiMethod||n.apiMethod||"GET",pe=String(ee).toUpperCase(),Be=n.endpoint?.keyParam||n.apiParams||{};let Te;i&&(typeof i.apiUrl=="function"?Te=await i.apiUrl(Z,pe,Be):typeof i.get=="function"||typeof i.post=="function"?Te=pe==="POST"?await i.post(Z,Be):await i.get(Z,{params:Be}):typeof i=="function"&&(Te=await i(Z,pe,Be))),!Te&&typeof fetch<"u"&&(Te=await fetch(Z,{method:pe}).then(Ue=>Ue.json()));const Oe=n.endpoint?.dataKey||n.dataPath||"data";let Fe=Te?.data!==void 0?Te.data:Te;Oe&&Oe!=="data"&&(Fe=te(Te,Oe)||te(Te?.data,Oe)||Fe),Array.isArray(Fe)?(d.value=Fe,o("update:modelValue",Fe)):console.warn("[DCodeCardList] Data response is not an array:",Fe)}catch(ee){console.warn("[DCodeCardList] Fetch error:",ee),d.value=[]}finally{f.value=!1}}}return r.onMounted(()=>{(n.endpoint?.apiUrl||n.apiUrl)&&de()}),r.watch(()=>n.endpoint?.apiUrl||n.apiUrl,Z=>{Z&&de()}),(Z,ee)=>(r.openBlock(),r.createElementBlock("div",d3,[F.value||A.value||Z.$slots["header-actions"]?(r.openBlock(),r.createElementBlock("div",u3,[r.createElementVNode("div",f3,[F.value?(r.openBlock(),r.createElementBlock("div",h3,[ee[2]||(ee[2]=r.createElementVNode("div",{class:"h-4.5 w-1.5 bg-primary rounded-full shrink-0"},null,-1)),r.createElementVNode("span",m3,r.toDisplayString(F.value),1),S.value.length>0?(r.openBlock(),r.createBlock(os,{key:0,text:String(S.value.length),variant:"tonal",size:"xs",pill:""},null,8,["text"])):r.createCommentVNode("",!0)])):r.createCommentVNode("",!0),A.value?(r.openBlock(),r.createElementBlock("span",{key:1,class:r.normalizeClass(["text-xs text-neutral-500 dark:text-neutral-400",{"pl-3.5":F.value}])},r.toDisplayString(A.value),3)):r.createCommentVNode("",!0)]),Z.$slots["header-actions"]?(r.openBlock(),r.createElementBlock("div",p3,[r.renderSlot(Z.$slots,"header-actions")])):r.createCommentVNode("",!0)])):r.createCommentVNode("",!0),E.value?(r.openBlock(),r.createElementBlock("div",g3,[(r.openBlock(),r.createElementBlock(r.Fragment,null,r.renderList(2,pe=>r.createElementVNode("div",{key:`skeleton-${pe}`,class:"bg-white dark:bg-neutral-900 border border-neutral-200 dark:border-neutral-800 rounded-xl overflow-hidden animate-pulse"},[ee[4]||(ee[4]=r.createElementVNode("div",{class:"px-5 py-3.5 bg-neutral-50/80 dark:bg-neutral-800/60 border-b border-neutral-200/80 dark:border-neutral-800"},[r.createElementVNode("div",{class:"h-4 w-48 rounded bg-neutral-200 dark:bg-neutral-700"})],-1)),r.createElementVNode("div",b3,[(r.openBlock(),r.createElementBlock(r.Fragment,null,r.renderList(4,Be=>r.createElementVNode("div",{key:Be,class:"space-y-2"},[...ee[3]||(ee[3]=[r.createElementVNode("div",{class:"h-3 w-20 rounded bg-neutral-200 dark:bg-neutral-700"},null,-1),r.createElementVNode("div",{class:"h-4 w-32 rounded bg-neutral-100 dark:bg-neutral-800"},null,-1)])])),64))])])),64))])):S.value.length===0?(r.openBlock(),r.createElementBlock("div",y3,[r.renderSlot(Z.$slots,"empty",{},()=>[r.createElementVNode("div",v3,[r.createVNode(r.unref(Ae.Layers),{class:"h-5 w-5"})]),r.createElementVNode("div",w3,r.toDisplayString(q.value),1)])])):(r.openBlock(),r.createElementBlock("div",{key:3,class:"space-y-3.5",style:r.normalizeStyle(e.maxHeight?{maxHeight:e.maxHeight,overflowY:"auto"}:void 0)},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(O.value,(pe,Be)=>(r.openBlock(),r.createElementBlock("div",{key:Be,class:r.normalizeClass(["bg-white dark:bg-neutral-900 transition-all",[Q(pe)?"border border-neutral-200 dark:border-neutral-800 rounded-xl p-4 shadow-xs hover:border-neutral-300 dark:hover:border-neutral-700":e.cardBorder?"border border-neutral-200 dark:border-neutral-800 rounded-xl overflow-hidden shadow-xs hover:border-neutral-300 dark:hover:border-neutral-700":"rounded-lg overflow-hidden"]])},[Q(pe)?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[r.createElementVNode("div",{class:r.normalizeClass(["flex items-start justify-between gap-3 pb-2",{"cursor-pointer select-none":e.collapsible}]),onClick:Te=>e.collapsible?we(I(Be)):o("card-click",pe,I(Be))},[r.createElementVNode("div",_3,[r.createElementVNode("span",x3,r.toDisplayString(I(Be)+1)+".",1),r.createElementVNode("span",E3,r.toDisplayString(pe.ljk||pe.bankName||c("defaultFacility")),1),pe.jenisKredit?(r.openBlock(),r.createElementBlock("span",C3," • "+r.toDisplayString(pe.jenisKredit),1)):r.createCommentVNode("",!0)]),r.createElementVNode("div",S3,[r.createElementVNode("div",{class:r.normalizeClass(["text-xs font-bold whitespace-nowrap",j(pe.status)])},r.toDisplayString(c("statusLabel"))+" "+r.toDisplayString(Y(pe.status)),3),e.collapsible?(r.openBlock(),r.createBlock(r.unref(Ae.ChevronDown),{key:0,class:r.normalizeClass(["h-4 w-4 text-neutral-400 transition-transform duration-200",{"rotate-180":!_e(I(Be))}])},null,8,["class"])):r.createCommentVNode("",!0)])],10,k3),r.withDirectives(r.createElementVNode("div",A3,[r.createElementVNode("div",T3,[r.createElementVNode("div",B3,[r.createElementVNode("span",P3,r.toDisplayString(c("noRek")),1),r.createElementVNode("span",N3,": "+r.toDisplayString(pe.noRekening||pe.accountNo||"-"),1)]),r.createElementVNode("div",D3,[r.createElementVNode("span",M3,r.toDisplayString(c("mulai")),1),r.createElementVNode("span",R3,": "+r.toDisplayString(T(pe.mulai||pe.tglMulai||pe.tanggalMulai)),1)]),r.createElementVNode("div",I3,[r.createElementVNode("span",O3,r.toDisplayString(c("plafon")),1),r.createElementVNode("span",L3,": "+r.toDisplayString(J(pe.plafon)),1)]),r.createElementVNode("div",F3,[r.createElementVNode("span",$3,r.toDisplayString(c("bakiDebet")),1),r.createElementVNode("span",z3,": "+r.toDisplayString(J(pe.bakiDebet)),1)]),r.createElementVNode("div",j3,[r.createElementVNode("span",U3,r.toDisplayString(c("jatuhTempo")),1),r.createElementVNode("span",W3,": "+r.toDisplayString(T(pe.jatuhTempo||pe.tglJatuhTempo||pe.tanggalJatuhTempo)),1)]),r.createElementVNode("div",H3,[r.createElementVNode("span",q3,r.toDisplayString(c("sifat")),1),r.createElementVNode("span",K3,": "+r.toDisplayString(pe.sifatKredit||pe.sifat||"-"),1)]),r.createElementVNode("div",G3,[r.createElementVNode("span",Y3,r.toDisplayString(c("sukuBunga")),1),r.createElementVNode("span",Z3,": "+r.toDisplayString(U(pe.sukuBunga)),1)]),r.createElementVNode("div",X3,[r.createElementVNode("span",J3,r.toDisplayString(c("tunggakan")),1),r.createElementVNode("span",Q3,": "+r.toDisplayString(k(pe.tunggakan)),1)])]),r.createElementVNode("div",V3,[re(pe)?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[r.createElementVNode("div",eL,r.toDisplayString(c("collateral"))+": ",1),r.createElementVNode("div",tL,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(pe.legalitasAgunan,(Te,Oe)=>(r.openBlock(),r.createElementBlock("div",{key:Oe,class:"text-neutral-800 dark:text-neutral-200 leading-relaxed"},[ee[5]||(ee[5]=r.createElementVNode("span",{class:"text-neutral-400 dark:text-neutral-500 mr-1"},"•",-1)),r.createElementVNode("span",null,r.toDisplayString(Te.agunan||"-"),1),ee[6]||(ee[6]=r.createElementVNode("span",{class:"text-neutral-400 dark:text-neutral-500 mx-1.5"},"-",-1)),r.createElementVNode("span",nL,r.toDisplayString(J(Te.nilaiTaksasi)),1),ee[7]||(ee[7]=r.createElementVNode("span",{class:"text-neutral-400 dark:text-neutral-500 mx-1.5"},"-",-1)),r.createElementVNode("span",null,r.toDisplayString(Te.pengikatan||"-"),1)]))),128))])],64)):(r.openBlock(),r.createElementBlock("div",oL,[r.createElementVNode("span",rL,r.toDisplayString(c("collateral")),1),ee[8]||(ee[8]=r.createElementVNode("span",{class:"font-semibold text-neutral-900 dark:text-neutral-100"},": -",-1))]))]),r.createElementVNode("div",iL,[r.createElementVNode("table",sL,[r.createElementVNode("thead",null,[r.createElementVNode("tr",aL,[r.createElementVNode("th",{colspan:le(pe),class:"py-1 px-1 border-r-2 border-white/20 whitespace-nowrap tracking-tight bg-primary-700 dark:bg-primary-900"},r.toDisplayString(c("historyPart1")),9,lL),X(pe)>0?(r.openBlock(),r.createElementBlock("th",{key:0,colspan:X(pe),class:"py-1 px-1 whitespace-nowrap tracking-tight bg-sky-800 dark:bg-sky-950"},r.toDisplayString(c("historyPart2")),9,cL)):r.createCommentVNode("",!0)]),r.createElementVNode("tr",dL,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(ie(pe),(Te,Oe)=>(r.openBlock(),r.createElementBlock("th",{key:Oe,class:r.normalizeClass(["py-0.5 px-1 whitespace-nowrap min-w-[55px]",[Oe<12?"bg-primary-800 dark:bg-primary-800/80 border-r border-white/10 dark:border-white/10":"bg-sky-900 dark:bg-sky-950/80 border-r last:border-r-0 border-white/10 dark:border-white/10",Oe===11?"!border-r-2 !border-r-white/25":""]])},r.toDisplayString(Te.bulanTahun),3))),128))])]),r.createElementVNode("tbody",null,[r.createElementVNode("tr",null,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(ie(pe),(Te,Oe)=>(r.openBlock(),r.createElementBlock("td",{key:Oe,class:r.normalizeClass(["py-1 px-1 border-r last:border-r-0 border-neutral-200/80 dark:border-neutral-800/80 text-center font-bold whitespace-nowrap",[se(Te.statusKol),Oe===11?"!border-r-2 !border-r-neutral-300 dark:!border-r-neutral-700":""]])},[r.createElementVNode("span",{class:r.normalizeClass(["text-[10px] font-bold",H(Te.statusKol)])},r.toDisplayString(N(Te)),3)],2))),128))])])])]),e.subTables&&e.subTables.length>0?(r.openBlock(),r.createElementBlock("div",uL,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(e.subTables,(Te,Oe)=>(r.openBlock(),r.createElementBlock("div",{key:Te.key||Oe,class:"space-y-1.5"},[r.createElementVNode("div",fL,[ee[9]||(ee[9]=r.createElementVNode("span",{class:"w-1.5 h-1.5 rounded-full bg-primary"},null,-1)),r.createElementVNode("span",hL,r.toDisplayString($(Te)),1)]),r.createElementVNode("div",mL,[r.createElementVNode("table",pL,[r.createElementVNode("thead",gL,[r.createElementVNode("tr",null,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(Te.headers,(Fe,Ue)=>(r.openBlock(),r.createElementBlock("th",{key:Ue,class:"px-3.5 py-2 whitespace-nowrap border-r last:border-r-0 border-neutral-200/60 dark:border-neutral-700/60",style:r.normalizeStyle({width:Fe.width?typeof Fe.width=="number"?`${Fe.width}px`:Fe.width:void 0,textAlign:Fe.align||"left"})},r.toDisplayString(M(Fe)),5))),128))])]),r.createElementVNode("tbody",bL,[ke(pe,Te).length>0?(r.openBlock(!0),r.createElementBlock(r.Fragment,{key:0},r.renderList(ke(pe,Te),(Fe,Ue)=>(r.openBlock(),r.createElementBlock("tr",{key:Ue,class:"hover:bg-neutral-50/60 dark:hover:bg-neutral-800/40 transition-colors"},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(Te.headers,(Qe,Ve)=>(r.openBlock(),r.createElementBlock("td",{key:Ve,class:"px-3.5 py-1.5 whitespace-nowrap text-neutral-700 dark:text-neutral-200 border-r last:border-r-0 border-neutral-100 dark:border-neutral-800/60",style:r.normalizeStyle({textAlign:Qe.align||"left"})},r.toDisplayString(te(Fe,Qe.key)??Fe[Qe.key]??"-"),5))),128))]))),128)):(r.openBlock(),r.createElementBlock("tr",yL,[r.createElementVNode("td",{colspan:Te.headers.length,class:"px-3.5 py-3 text-center text-neutral-400 dark:text-neutral-500 italic"},r.toDisplayString(c("noHistoryData")),9,vL)]))])])])]))),128))])):r.createCommentVNode("",!0)],512),[[r.vShow,!e.collapsible||!_e(I(Be))]])],64)):(r.openBlock(),r.createElementBlock(r.Fragment,{key:1},[r.createElementVNode("div",{class:r.normalizeClass(["px-5 py-3.5 bg-neutral-50/80 dark:bg-neutral-800/60 border-b border-neutral-200/80 dark:border-neutral-800 flex items-center justify-between",{"cursor-pointer select-none":e.collapsible}]),onClick:Te=>e.collapsible?we(I(Be)):o("card-click",pe,I(Be))},[r.renderSlot(Z.$slots,"card-header",{item:pe,index:I(Be)},()=>[r.createElementVNode("div",kL,[r.createElementVNode("div",_L,[r.createVNode(r.unref(Ae.CreditCard),{class:"h-4 w-4"})]),r.createElementVNode("span",xL,r.toDisplayString(ne(pe,I(Be))),1)])]),r.createElementVNode("div",EL,[r.renderSlot(Z.$slots,"card-actions",{item:pe,index:I(Be)}),e.showIndex?(r.openBlock(),r.createElementBlock("span",CL," #"+r.toDisplayString(I(Be)+1),1)):r.createCommentVNode("",!0),e.collapsible?(r.openBlock(),r.createBlock(r.unref(Ae.ChevronDown),{key:1,class:r.normalizeClass(["h-4 w-4 text-neutral-400 transition-transform duration-200",{"rotate-180":!_e(I(Be))}])},null,8,["class"])):r.createCommentVNode("",!0)])],10,wL),r.withDirectives(r.createElementVNode("div",SL,[w.value&&w.value.length>0?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(["p-5 grid gap-x-6 gap-y-0",P.value])},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(w.value,Te=>(r.openBlock(),r.createElementBlock("div",{key:Te.key||Te.model,class:r.normalizeClass(ce(Te))},[r.createVNode(Uu,{label:M(Te),"model-value":fe(pe,Te),"value-type":Te.valueType,prefix:Te.prefix,suffix:Te.suffix,"badge-color":Te.badgeColor,locale:e.locale==="id"?"id-ID":e.locale==="en"?"en-GB":"ko-KR"},null,8,["label","model-value","value-type","prefix","suffix","badge-color","locale"])],2))),128))],2)):r.createCommentVNode("",!0),e.subTables&&e.subTables.length>0?(r.openBlock(),r.createElementBlock("div",{key:1,class:r.normalizeClass(["px-5 pb-5 space-y-4",{"pt-0":e.fields&&e.fields.length>0,"pt-5":!e.fields||e.fields.length===0}])},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(e.subTables,(Te,Oe)=>(r.openBlock(),r.createElementBlock("div",{key:Te.key||Oe,class:"space-y-2"},[r.createElementVNode("div",AL,[ee[10]||(ee[10]=r.createElementVNode("div",{class:"h-3.5 w-1 bg-primary-600 dark:bg-primary-500 rounded-full"},null,-1)),r.createElementVNode("span",TL,r.toDisplayString($(Te)),1)]),r.createElementVNode("div",BL,[r.createElementVNode("table",PL,[r.createElementVNode("thead",NL,[r.createElementVNode("tr",null,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(Te.headers,(Fe,Ue)=>(r.openBlock(),r.createElementBlock("th",{key:Ue,class:"px-3.5 py-2.5 whitespace-nowrap border-r last:border-r-0 border-neutral-200/60 dark:border-neutral-700/60",style:r.normalizeStyle({width:Fe.width?typeof Fe.width=="number"?`${Fe.width}px`:Fe.width:void 0,textAlign:Fe.align||"left"})},r.toDisplayString(M(Fe)),5))),128))])]),r.createElementVNode("tbody",DL,[ke(pe,Te).length>0?(r.openBlock(!0),r.createElementBlock(r.Fragment,{key:0},r.renderList(ke(pe,Te),(Fe,Ue)=>(r.openBlock(),r.createElementBlock("tr",{key:Ue,class:"hover:bg-neutral-50/60 dark:hover:bg-neutral-800/40 transition-colors"},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(Te.headers,(Qe,Ve)=>(r.openBlock(),r.createElementBlock("td",{key:Ve,class:"px-3.5 py-2 whitespace-nowrap text-neutral-700 dark:text-neutral-200 border-r last:border-r-0 border-neutral-100 dark:border-neutral-800/60",style:r.normalizeStyle({textAlign:Qe.align||"left"})},r.toDisplayString(te(Fe,Qe.key)??Fe[Qe.key]??"-"),5))),128))]))),128)):(r.openBlock(),r.createElementBlock("tr",ML,[r.createElementVNode("td",{colspan:Te.headers.length,class:"px-3.5 py-4 text-center text-neutral-400 dark:text-neutral-500 italic"},r.toDisplayString(e.locale==="en"?"No history data":"Tidak ada data riwayat"),9,RL)]))])])])]))),128))],2)):r.createCommentVNode("",!0),Z.$slots["card-footer"]?(r.openBlock(),r.createElementBlock("div",IL,[r.renderSlot(Z.$slots,"card-footer",{item:pe,index:I(Be)})])):r.createCommentVNode("",!0)],512),[[r.vShow,!e.collapsible||!_e(I(Be))]])],64))],2))),128))],4)),S.value.length>0&&e.showPagination?(r.openBlock(),r.createBlock(Im,{key:4,"total-items":S.value.length,"current-page":g.value,"per-page":p.value,"per-page-options":y,loading:E.value,class:"rounded-xl border border-neutral-200 dark:border-neutral-800 overflow-hidden shadow-xs","onUpdate:page":ee[0]||(ee[0]=pe=>g.value=pe),"onUpdate:perPage":ee[1]||(ee[1]=pe=>{p.value=pe,g.value=1})},null,8,["total-items","current-page","per-page","loading"])):r.createCommentVNode("",!0)]))}});(function(){try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(".code-diff-view[theme=light] pre code.hljs{display:block;overflow-x:auto;padding:1em}.code-diff-view[theme=light] code.hljs{padding:3px 5px}.code-diff-view[theme=light] .hljs{color:#24292e;background:#fff}.code-diff-view[theme=light] .hljs-doctag,.code-diff-view[theme=light] .hljs-keyword,.code-diff-view[theme=light] .hljs-meta .hljs-keyword,.code-diff-view[theme=light] .hljs-template-tag,.code-diff-view[theme=light] .hljs-template-variable,.code-diff-view[theme=light] .hljs-type,.code-diff-view[theme=light] .hljs-variable.language_{color:#d73a49}.code-diff-view[theme=light] .hljs-title,.code-diff-view[theme=light] .hljs-title.class_,.code-diff-view[theme=light] .hljs-title.class_.inherited__,.code-diff-view[theme=light] .hljs-title.function_{color:#6f42c1}.code-diff-view[theme=light] .hljs-attr,.code-diff-view[theme=light] .hljs-attribute,.code-diff-view[theme=light] .hljs-literal,.code-diff-view[theme=light] .hljs-meta,.code-diff-view[theme=light] .hljs-number,.code-diff-view[theme=light] .hljs-operator,.code-diff-view[theme=light] .hljs-variable,.code-diff-view[theme=light] .hljs-selector-attr,.code-diff-view[theme=light] .hljs-selector-class,.code-diff-view[theme=light] .hljs-selector-id{color:#005cc5}.code-diff-view[theme=light] .hljs-regexp,.code-diff-view[theme=light] .hljs-string,.code-diff-view[theme=light] .hljs-meta .hljs-string{color:#032f62}.code-diff-view[theme=light] .hljs-built_in,.code-diff-view[theme=light] .hljs-symbol{color:#e36209}.code-diff-view[theme=light] .hljs-comment,.code-diff-view[theme=light] .hljs-code,.code-diff-view[theme=light] .hljs-formula{color:#6a737d}.code-diff-view[theme=light] .hljs-name,.code-diff-view[theme=light] .hljs-quote,.code-diff-view[theme=light] .hljs-selector-tag,.code-diff-view[theme=light] .hljs-selector-pseudo{color:#22863a}.code-diff-view[theme=light] .hljs-subst{color:#24292e}.code-diff-view[theme=light] .hljs-section{color:#005cc5;font-weight:700}.code-diff-view[theme=light] .hljs-bullet{color:#735c0f}.code-diff-view[theme=light] .hljs-emphasis{color:#24292e;font-style:italic}.code-diff-view[theme=light] .hljs-strong{color:#24292e;font-weight:700}.code-diff-view[theme=light] .hljs-addition{color:#22863a;background-color:#f0fff4}.code-diff-view[theme=light] .hljs-deletion{color:#b31d28;background-color:#ffeef0}.code-diff-view[theme=light]{color:var(--fgColor-default, var(--color-fg-default));background-color:var(--bgColor-default, var(--color-canvas-default));--color-canvas-default-transparent: rgba(255,255,255,0);--color-page-header-bg: #f6f8fa;--color-marketing-icon-primary: #218bff;--color-marketing-icon-secondary: #54aeff;--color-diff-blob-addition-num-text: #1F2328;--color-diff-blob-addition-fg: #1F2328;--color-diff-blob-addition-num-bg: #ccffd8;--color-diff-blob-addition-line-bg: #e6ffec;--color-diff-blob-addition-word-bg: #abf2bc;--color-diff-blob-deletion-num-text: #1F2328;--color-diff-blob-deletion-fg: #1F2328;--color-diff-blob-deletion-num-bg: #ffd7d5;--color-diff-blob-deletion-line-bg: #ffebe9;--color-diff-blob-deletion-word-bg: rgba(255,129,130,.4);--color-diff-blob-hunk-num-bg: rgba(84,174,255,.4);--color-diff-blob-expander-icon: #656d76;--color-diff-blob-selected-line-highlight-mix-blend-mode: multiply;--color-diffstat-deletion-border: rgba(31,35,40,.15);--color-diffstat-addition-border: rgba(31,35,40,.15);--color-diffstat-addition-bg: #1f883d;--color-search-keyword-hl: #fff8c5;--color-prettylights-syntax-comment: #6e7781;--color-prettylights-syntax-constant: #0550ae;--color-prettylights-syntax-entity: #6639ba;--color-prettylights-syntax-storage-modifier-import: #24292f;--color-prettylights-syntax-entity-tag: #116329;--color-prettylights-syntax-keyword: #cf222e;--color-prettylights-syntax-string: #0a3069;--color-prettylights-syntax-variable: #953800;--color-prettylights-syntax-brackethighlighter-unmatched: #82071e;--color-prettylights-syntax-invalid-illegal-text: #f6f8fa;--color-prettylights-syntax-invalid-illegal-bg: #82071e;--color-prettylights-syntax-carriage-return-text: #f6f8fa;--color-prettylights-syntax-carriage-return-bg: #cf222e;--color-prettylights-syntax-string-regexp: #116329;--color-prettylights-syntax-markup-list: #3b2300;--color-prettylights-syntax-markup-heading: #0550ae;--color-prettylights-syntax-markup-italic: #24292f;--color-prettylights-syntax-markup-bold: #24292f;--color-prettylights-syntax-markup-deleted-text: #82071e;--color-prettylights-syntax-markup-deleted-bg: #ffebe9;--color-prettylights-syntax-markup-inserted-text: #116329;--color-prettylights-syntax-markup-inserted-bg: #dafbe1;--color-prettylights-syntax-markup-changed-text: #953800;--color-prettylights-syntax-markup-changed-bg: #ffd8b5;--color-prettylights-syntax-markup-ignored-text: #eaeef2;--color-prettylights-syntax-markup-ignored-bg: #0550ae;--color-prettylights-syntax-meta-diff-range: #8250df;--color-prettylights-syntax-brackethighlighter-angle: #57606a;--color-prettylights-syntax-sublimelinter-gutter-mark: #8c959f;--color-prettylights-syntax-constant-other-reference-link: #0a3069;--color-codemirror-text: #1F2328;--color-codemirror-bg: #ffffff;--color-codemirror-gutters-bg: #ffffff;--color-codemirror-guttermarker-text: #ffffff;--color-codemirror-guttermarker-subtle-text: #6e7781;--color-codemirror-linenumber-text: #656d76;--color-codemirror-cursor: #1F2328;--color-codemirror-selection-bg: rgba(84,174,255,.4);--color-codemirror-activeline-bg: rgba(234,238,242,.5);--color-codemirror-matchingbracket-text: #1F2328;--color-codemirror-lines-bg: #ffffff;--color-codemirror-syntax-comment: #24292f;--color-codemirror-syntax-constant: #0550ae;--color-codemirror-syntax-entity: #8250df;--color-codemirror-syntax-keyword: #cf222e;--color-codemirror-syntax-storage: #cf222e;--color-codemirror-syntax-string: #0a3069;--color-codemirror-syntax-support: #0550ae;--color-codemirror-syntax-variable: #953800;--color-checks-bg: #24292f;--color-checks-run-border-width: 0px;--color-checks-container-border-width: 0px;--color-checks-text-primary: #f6f8fa;--color-checks-text-secondary: #8c959f;--color-checks-text-link: #54aeff;--color-checks-btn-icon: #afb8c1;--color-checks-btn-hover-icon: #f6f8fa;--color-checks-btn-hover-bg: rgba(255,255,255,.125);--color-checks-input-text: #eaeef2;--color-checks-input-placeholder-text: #8c959f;--color-checks-input-focus-text: #8c959f;--color-checks-input-bg: #32383f;--color-checks-input-shadow: none;--color-checks-donut-error: #fa4549;--color-checks-donut-pending: #bf8700;--color-checks-donut-success: #1f883d;--color-checks-donut-neutral: #afb8c1;--color-checks-dropdown-text: #afb8c1;--color-checks-dropdown-bg: #32383f;--color-checks-dropdown-border: #424a53;--color-checks-dropdown-shadow: rgba(31,35,40,.3);--color-checks-dropdown-hover-text: #f6f8fa;--color-checks-dropdown-hover-bg: #424a53;--color-checks-dropdown-btn-hover-text: #f6f8fa;--color-checks-dropdown-btn-hover-bg: #32383f;--color-checks-scrollbar-thumb-bg: #57606a;--color-checks-header-label-text: #d0d7de;--color-checks-header-label-open-text: #f6f8fa;--color-checks-header-border: #32383f;--color-checks-header-icon: #8c959f;--color-checks-line-text: #d0d7de;--color-checks-line-num-text: rgba(140,149,159,.75);--color-checks-line-timestamp-text: #8c959f;--color-checks-line-hover-bg: #32383f;--color-checks-line-selected-bg: rgba(33,139,255,.15);--color-checks-line-selected-num-text: #54aeff;--color-checks-line-dt-fm-text: #24292f;--color-checks-line-dt-fm-bg: #9a6700;--color-checks-gate-bg: rgba(125,78,0,.15);--color-checks-gate-text: #d0d7de;--color-checks-gate-waiting-text: #d4a72c;--color-checks-step-header-open-bg: #32383f;--color-checks-step-error-text: #ff8182;--color-checks-step-warning-text: #d4a72c;--color-checks-logline-text: #8c959f;--color-checks-logline-num-text: rgba(140,149,159,.75);--color-checks-logline-debug-text: #c297ff;--color-checks-logline-error-text: #d0d7de;--color-checks-logline-error-num-text: #ff8182;--color-checks-logline-error-bg: rgba(164,14,38,.15);--color-checks-logline-warning-text: #d0d7de;--color-checks-logline-warning-num-text: #d4a72c;--color-checks-logline-warning-bg: rgba(125,78,0,.15);--color-checks-logline-command-text: #54aeff;--color-checks-logline-section-text: #4ac26b;--color-checks-ansi-black: #24292f;--color-checks-ansi-black-bright: #32383f;--color-checks-ansi-white: #d0d7de;--color-checks-ansi-white-bright: #d0d7de;--color-checks-ansi-gray: #8c959f;--color-checks-ansi-red: #ff8182;--color-checks-ansi-red-bright: #ffaba8;--color-checks-ansi-green: #4ac26b;--color-checks-ansi-green-bright: #6fdd8b;--color-checks-ansi-yellow: #d4a72c;--color-checks-ansi-yellow-bright: #eac54f;--color-checks-ansi-blue: #54aeff;--color-checks-ansi-blue-bright: #80ccff;--color-checks-ansi-magenta: #c297ff;--color-checks-ansi-magenta-bright: #d8b9ff;--color-checks-ansi-cyan: #76e3ea;--color-checks-ansi-cyan-bright: #b3f0ff;--color-project-header-bg: #24292f;--color-project-sidebar-bg: #ffffff;--color-project-gradient-in: #ffffff;--color-project-gradient-out: rgba(255,255,255,0);--color-mktg-btn-bg: #1b1f23;--color-mktg-btn-shadow-outline: rgb(0 0 0 / 15%) 0 0 0 1px inset;--color-mktg-btn-shadow-focus: rgb(0 0 0 / 15%) 0 0 0 4px;--color-mktg-btn-shadow-hover: 0 3px 2px rgba(0, 0, 0, .07), 0 7px 5px rgba(0, 0, 0, .04), 0 12px 10px rgba(0, 0, 0, .03), 0 22px 18px rgba(0, 0, 0, .03), 0 42px 33px rgba(0, 0, 0, .02), 0 100px 80px rgba(0, 0, 0, .02);--color-mktg-btn-shadow-hover-muted: rgb(0 0 0 / 70%) 0 0 0 2px inset;--color-control-border-color-emphasis: #858F99;--color-avatar-bg: #ffffff;--color-avatar-border: rgba(31,35,40,.15);--color-avatar-stack-fade: #afb8c1;--color-avatar-stack-fade-more: #d0d7de;--color-avatar-child-shadow: 0 0 0 2px rgba(255,255,255,.8);--color-topic-tag-border: rgba(0,0,0,0);--color-counter-border: rgba(0,0,0,0);--color-select-menu-backdrop-border: rgba(0,0,0,0);--color-select-menu-tap-highlight: rgba(175,184,193,.5);--color-select-menu-tap-focus-bg: #b6e3ff;--color-overlay-shadow: 0 1px 3px rgba(31,35,40,.12), 0 8px 24px rgba(66,74,83,.12);--color-overlay-backdrop: rgba(140,149,159,.2);--color-header-text: rgba(255,255,255,.7);--color-header-bg: #24292f;--color-header-divider: #57606a;--color-header-logo: #ffffff;--color-header-search-bg: #24292f;--color-header-search-border: #57606a;--color-sidenav-selected-bg: #ffffff;--color-menu-bg-active: rgba(0,0,0,0);--color-input-disabled-bg: rgba(175,184,193,.2);--color-timeline-badge-bg: #eaeef2;--color-ansi-black: #24292f;--color-ansi-black-bright: #57606a;--color-ansi-white: #6e7781;--color-ansi-white-bright: #8c959f;--color-ansi-gray: #6e7781;--color-ansi-red: #cf222e;--color-ansi-red-bright: #a40e26;--color-ansi-green: #116329;--color-ansi-green-bright: #1a7f37;--color-ansi-yellow: #4d2d00;--color-ansi-yellow-bright: #633c01;--color-ansi-blue: #0969da;--color-ansi-blue-bright: #218bff;--color-ansi-magenta: #8250df;--color-ansi-magenta-bright: #a475f9;--color-ansi-cyan: #1b7c83;--color-ansi-cyan-bright: #3192aa;--color-btn-text: #24292f;--color-btn-bg: #f6f8fa;--color-btn-border: rgba(31,35,40,.15);--color-btn-shadow: 0 1px 0 rgba(31,35,40,.04);--color-btn-inset-shadow: inset 0 1px 0 rgba(255,255,255,.25);--color-btn-hover-bg: #f3f4f6;--color-btn-hover-border: rgba(31,35,40,.15);--color-btn-active-bg: hsla(220,14%,93%,1);--color-btn-active-border: rgba(31,35,40,.15);--color-btn-selected-bg: hsla(220,14%,94%,1);--color-btn-counter-bg: rgba(31,35,40,.08);--color-btn-primary-text: #ffffff;--color-btn-primary-bg: #1f883d;--color-btn-primary-border: rgba(31,35,40,.15);--color-btn-primary-shadow: 0 1px 0 rgba(31,35,40,.1);--color-btn-primary-inset-shadow: inset 0 1px 0 rgba(255,255,255,.03);--color-btn-primary-hover-bg: #1a7f37;--color-btn-primary-hover-border: rgba(31,35,40,.15);--color-btn-primary-selected-bg: hsla(137,66%,28%,1);--color-btn-primary-selected-shadow: inset 0 1px 0 rgba(0,45,17,.2);--color-btn-primary-disabled-text: rgba(255,255,255,.8);--color-btn-primary-disabled-bg: #94d3a2;--color-btn-primary-disabled-border: rgba(31,35,40,.15);--color-btn-primary-icon: rgba(255,255,255,.8);--color-btn-primary-counter-bg: rgba(0,45,17,.2);--color-btn-outline-text: #0969da;--color-btn-outline-hover-text: #ffffff;--color-btn-outline-hover-bg: #0969da;--color-btn-outline-hover-border: rgba(31,35,40,.15);--color-btn-outline-hover-shadow: 0 1px 0 rgba(31,35,40,.1);--color-btn-outline-hover-inset-shadow: inset 0 1px 0 rgba(255,255,255,.03);--color-btn-outline-hover-counter-bg: rgba(255,255,255,.2);--color-btn-outline-selected-text: #ffffff;--color-btn-outline-selected-bg: hsla(212,92%,42%,1);--color-btn-outline-selected-border: rgba(31,35,40,.15);--color-btn-outline-selected-shadow: inset 0 1px 0 rgba(0,33,85,.2);--color-btn-outline-disabled-text: rgba(9,105,218,.5);--color-btn-outline-disabled-bg: #f6f8fa;--color-btn-outline-disabled-counter-bg: rgba(9,105,218,.05);--color-btn-outline-counter-bg: #0969da1a;--color-btn-outline-counter-fg: #0550ae;--color-btn-outline-hover-counter-fg: #ffffff;--color-btn-outline-disabled-counter-fg: rgba(9,105,218,.5);--color-btn-danger-text: #cf222e;--color-btn-danger-hover-text: #ffffff;--color-btn-danger-hover-bg: #a40e26;--color-btn-danger-hover-border: rgba(31,35,40,.15);--color-btn-danger-hover-shadow: 0 1px 0 rgba(31,35,40,.1);--color-btn-danger-hover-inset-shadow: inset 0 1px 0 rgba(255,255,255,.03);--color-btn-danger-hover-counter-bg: rgba(255,255,255,.2);--color-btn-danger-selected-text: #ffffff;--color-btn-danger-selected-bg: hsla(356,72%,44%,1);--color-btn-danger-selected-border: rgba(31,35,40,.15);--color-btn-danger-selected-shadow: inset 0 1px 0 rgba(76,0,20,.2);--color-btn-danger-disabled-text: rgba(207,34,46,.5);--color-btn-danger-disabled-bg: #f6f8fa;--color-btn-danger-disabled-counter-bg: rgba(207,34,46,.05);--color-btn-danger-counter-bg: rgba(207,34,46,.1);--color-btn-danger-icon: #cf222e;--color-btn-danger-hover-icon: #ffffff;--color-btn-danger-counter-fg: #a40e26;--color-btn-danger-hover-counter-fg: #ffffff;--color-btn-danger-disabled-counter-fg: rgba(207,34,46,.5);--color-underlinenav-icon: #6e7781;--color-underlinenav-border-hover: rgba(175,184,193,.2);--color-action-list-item-inline-divider: rgba(208,215,222,.48);--color-action-list-item-default-hover-bg: rgba(208,215,222,.32);--color-action-list-item-default-hover-border: rgba(0,0,0,0);--color-action-list-item-default-active-bg: rgba(208,215,222,.48);--color-action-list-item-default-active-border: rgba(0,0,0,0);--color-action-list-item-default-selected-bg: rgba(208,215,222,.24);--color-action-list-item-danger-hover-bg: rgba(255,235,233,.64);--color-action-list-item-danger-active-bg: #ffebe9;--color-action-list-item-danger-hover-text: #d1242f;--color-switch-track-bg: #eaeef2;--color-switch-track-hover-bg: hsla(210,24%,90%,1);--color-switch-track-active-bg: hsla(210,24%,88%,1);--color-switch-track-disabled-bg: #8c959f;--color-switch-track-fg: #656d76;--color-switch-track-disabled-fg: #ffffff;--color-switch-track-border: rgba(0,0,0,0);--color-switch-track-checked-bg: #0969da;--color-switch-track-checked-hover-bg: #0860CA;--color-switch-track-checked-active-bg: #0757BA;--color-switch-track-checked-fg: #ffffff;--color-switch-track-checked-disabled-fg: #ffffff;--color-switch-track-checked-border: rgba(0,0,0,0);--color-switch-knob-bg: #ffffff;--color-switch-knob-disabled-bg: #f6f8fa;--color-switch-knob-border: #858F99;--color-switch-knob-checked-bg: #ffffff;--color-switch-knob-checked-disabled-bg: #f6f8fa;--color-switch-knob-checked-border: #0969da;--color-segmented-control-bg: #eaeef2;--color-segmented-control-button-bg: #ffffff;--color-segmented-control-button-hover-bg: rgba(175,184,193,.2);--color-segmented-control-button-active-bg: rgba(175,184,193,.4);--color-segmented-control-button-selected-border: #8c959f;--color-tree-view-item-chevron-hover-bg: rgba(208,215,222,.32);--color-tree-view-item-directory-fill: #54aeff;--color-fg-default: #1F2328;--color-fg-muted: #656d76;--color-fg-subtle: #6e7781;--color-fg-on-emphasis: #ffffff;--color-canvas-default: #ffffff;--color-canvas-overlay: #ffffff;--color-canvas-inset: #f6f8fa;--color-canvas-subtle: #f6f8fa;--color-border-default: #d0d7de;--color-border-muted: hsla(210,18%,87%,1);--color-border-subtle: rgba(31,35,40,.15);--color-shadow-small: 0 1px 0 rgba(31,35,40,.04);--color-shadow-medium: 0 3px 6px rgba(140,149,159,.15);--color-shadow-large: 0 8px 24px rgba(140,149,159,.2);--color-shadow-extra-large: 0 12px 28px rgba(140,149,159,.3);--color-neutral-emphasis-plus: #24292f;--color-neutral-emphasis: #6e7781;--color-neutral-muted: rgba(175,184,193,.2);--color-neutral-subtle: rgba(234,238,242,.5);--color-accent-fg: #0969da;--color-accent-emphasis: #0969da;--color-accent-muted: rgba(84,174,255,.4);--color-accent-subtle: #ddf4ff;--color-success-fg: #1a7f37;--color-success-emphasis: #1f883d;--color-success-muted: rgba(74,194,107,.4);--color-success-subtle: #dafbe1;--color-attention-fg: #9a6700;--color-attention-emphasis: #9a6700;--color-attention-muted: rgba(212,167,44,.4);--color-attention-subtle: #fff8c5;--color-severe-fg: #bc4c00;--color-severe-emphasis: #bc4c00;--color-severe-muted: rgba(251,143,68,.4);--color-severe-subtle: #fff1e5;--color-danger-fg: #d1242f;--color-danger-emphasis: #cf222e;--color-danger-muted: rgba(255,129,130,.4);--color-danger-subtle: #ffebe9;--color-open-fg: #1a7f37;--color-open-emphasis: #1f883d;--color-open-muted: rgba(74,194,107,.4);--color-open-subtle: #dafbe1;--color-closed-fg: #d1242f;--color-closed-emphasis: #cf222e;--color-closed-muted: rgba(255,129,130,.4);--color-closed-subtle: #ffebe9;--color-done-fg: #8250df;--color-done-emphasis: #8250df;--color-done-muted: rgba(194,151,255,.4);--color-done-subtle: #fbefff;--color-sponsors-fg: #bf3989;--color-sponsors-emphasis: #bf3989;--color-sponsors-muted: rgba(255,128,200,.4);--color-sponsors-subtle: #ffeff7;--color-primer-fg-disabled: #8c959f;--color-primer-canvas-backdrop: rgba(31,35,40,.5);--color-primer-canvas-sticky: rgba(255,255,255,.95);--color-primer-border-active: #fd8c73;--color-primer-border-contrast: rgba(31,35,40,.1);--color-primer-shadow-highlight: inset 0 1px 0 rgba(255,255,255,.25);--color-primer-shadow-inset: inset 0 1px 0 rgba(208,215,222,.2);--color-scale-black: #1F2328;--color-scale-white: #ffffff;--color-scale-gray-0: #f6f8fa;--color-scale-gray-1: #eaeef2;--color-scale-gray-2: #d0d7de;--color-scale-gray-3: #afb8c1;--color-scale-gray-4: #8c959f;--color-scale-gray-5: #6e7781;--color-scale-gray-6: #57606a;--color-scale-gray-7: #424a53;--color-scale-gray-8: #32383f;--color-scale-gray-9: #24292f;--color-scale-blue-0: #ddf4ff;--color-scale-blue-1: #b6e3ff;--color-scale-blue-2: #80ccff;--color-scale-blue-3: #54aeff;--color-scale-blue-4: #218bff;--color-scale-blue-5: #0969da;--color-scale-blue-6: #0550ae;--color-scale-blue-7: #033d8b;--color-scale-blue-8: #0a3069;--color-scale-blue-9: #002155;--color-scale-green-0: #dafbe1;--color-scale-green-1: #aceebb;--color-scale-green-2: #6fdd8b;--color-scale-green-3: #4ac26b;--color-scale-green-4: #2da44e;--color-scale-green-5: #1a7f37;--color-scale-green-6: #116329;--color-scale-green-7: #044f1e;--color-scale-green-8: #003d16;--color-scale-green-9: #002d11;--color-scale-yellow-0: #fff8c5;--color-scale-yellow-1: #fae17d;--color-scale-yellow-2: #eac54f;--color-scale-yellow-3: #d4a72c;--color-scale-yellow-4: #bf8700;--color-scale-yellow-5: #9a6700;--color-scale-yellow-6: #7d4e00;--color-scale-yellow-7: #633c01;--color-scale-yellow-8: #4d2d00;--color-scale-yellow-9: #3b2300;--color-scale-orange-0: #fff1e5;--color-scale-orange-1: #ffd8b5;--color-scale-orange-2: #ffb77c;--color-scale-orange-3: #fb8f44;--color-scale-orange-4: #e16f24;--color-scale-orange-5: #bc4c00;--color-scale-orange-6: #953800;--color-scale-orange-7: #762c00;--color-scale-orange-8: #5c2200;--color-scale-orange-9: #471700;--color-scale-red-0: #ffebe9;--color-scale-red-1: #ffcecb;--color-scale-red-2: #ffaba8;--color-scale-red-3: #ff8182;--color-scale-red-4: #fa4549;--color-scale-red-5: #cf222e;--color-scale-red-6: #a40e26;--color-scale-red-7: #82071e;--color-scale-red-8: #660018;--color-scale-red-9: #4c0014;--color-scale-purple-0: #fbefff;--color-scale-purple-1: #ecd8ff;--color-scale-purple-2: #d8b9ff;--color-scale-purple-3: #c297ff;--color-scale-purple-4: #a475f9;--color-scale-purple-5: #8250df;--color-scale-purple-6: #6639ba;--color-scale-purple-7: #512a97;--color-scale-purple-8: #3e1f79;--color-scale-purple-9: #2e1461;--color-scale-pink-0: #ffeff7;--color-scale-pink-1: #ffd3eb;--color-scale-pink-2: #ffadda;--color-scale-pink-3: #ff80c8;--color-scale-pink-4: #e85aad;--color-scale-pink-5: #bf3989;--color-scale-pink-6: #99286e;--color-scale-pink-7: #772057;--color-scale-pink-8: #611347;--color-scale-pink-9: #4d0336;--color-scale-coral-0: #fff0eb;--color-scale-coral-1: #ffd6cc;--color-scale-coral-2: #ffb4a1;--color-scale-coral-3: #fd8c73;--color-scale-coral-4: #ec6547;--color-scale-coral-5: #c4432b;--color-scale-coral-6: #9e2f1c;--color-scale-coral-7: #801f0f;--color-scale-coral-8: #691105;--color-scale-coral-9: #510901}.code-diff-view[theme=dark] pre code.hljs{display:block;overflow-x:auto;padding:1em}.code-diff-view[theme=dark] code.hljs{padding:3px 5px}.code-diff-view[theme=dark] .hljs{color:#c9d1d9;background:#0d1117}.code-diff-view[theme=dark] .hljs-doctag,.code-diff-view[theme=dark] .hljs-keyword,.code-diff-view[theme=dark] .hljs-meta .hljs-keyword,.code-diff-view[theme=dark] .hljs-template-tag,.code-diff-view[theme=dark] .hljs-template-variable,.code-diff-view[theme=dark] .hljs-type,.code-diff-view[theme=dark] .hljs-variable.language_{color:#ff7b72}.code-diff-view[theme=dark] .hljs-title,.code-diff-view[theme=dark] .hljs-title.class_,.code-diff-view[theme=dark] .hljs-title.class_.inherited__,.code-diff-view[theme=dark] .hljs-title.function_{color:#d2a8ff}.code-diff-view[theme=dark] .hljs-attr,.code-diff-view[theme=dark] .hljs-attribute,.code-diff-view[theme=dark] .hljs-literal,.code-diff-view[theme=dark] .hljs-meta,.code-diff-view[theme=dark] .hljs-number,.code-diff-view[theme=dark] .hljs-operator,.code-diff-view[theme=dark] .hljs-variable,.code-diff-view[theme=dark] .hljs-selector-attr,.code-diff-view[theme=dark] .hljs-selector-class,.code-diff-view[theme=dark] .hljs-selector-id{color:#79c0ff}.code-diff-view[theme=dark] .hljs-regexp,.code-diff-view[theme=dark] .hljs-string,.code-diff-view[theme=dark] .hljs-meta .hljs-string{color:#a5d6ff}.code-diff-view[theme=dark] .hljs-built_in,.code-diff-view[theme=dark] .hljs-symbol{color:#ffa657}.code-diff-view[theme=dark] .hljs-comment,.code-diff-view[theme=dark] .hljs-code,.code-diff-view[theme=dark] .hljs-formula{color:#8b949e}.code-diff-view[theme=dark] .hljs-name,.code-diff-view[theme=dark] .hljs-quote,.code-diff-view[theme=dark] .hljs-selector-tag,.code-diff-view[theme=dark] .hljs-selector-pseudo{color:#7ee787}.code-diff-view[theme=dark] .hljs-subst{color:#c9d1d9}.code-diff-view[theme=dark] .hljs-section{color:#1f6feb;font-weight:700}.code-diff-view[theme=dark] .hljs-bullet{color:#f2cc60}.code-diff-view[theme=dark] .hljs-emphasis{color:#c9d1d9;font-style:italic}.code-diff-view[theme=dark] .hljs-strong{color:#c9d1d9;font-weight:700}.code-diff-view[theme=dark] .hljs-addition{color:#aff5b4;background-color:#033a16}.code-diff-view[theme=dark] .hljs-deletion{color:#ffdcd7;background-color:#67060c}.code-diff-view[theme=dark]{color:var(--fgColor-default, var(--color-fg-default));background-color:var(--bgColor-default, var(--color-canvas-default));--color-canvas-default-transparent: rgba(13,17,23,0);--color-page-header-bg: #0d1117;--color-marketing-icon-primary: #79c0ff;--color-marketing-icon-secondary: #1f6feb;--color-diff-blob-addition-num-text: #e6edf3;--color-diff-blob-addition-fg: #e6edf3;--color-diff-blob-addition-num-bg: rgba(63,185,80,.3);--color-diff-blob-addition-line-bg: rgba(46,160,67,.15);--color-diff-blob-addition-word-bg: rgba(46,160,67,.4);--color-diff-blob-deletion-num-text: #e6edf3;--color-diff-blob-deletion-fg: #e6edf3;--color-diff-blob-deletion-num-bg: rgba(248,81,73,.3);--color-diff-blob-deletion-line-bg: rgba(248,81,73,.1);--color-diff-blob-deletion-word-bg: rgba(248,81,73,.4);--color-diff-blob-hunk-num-bg: rgba(56,139,253,.4);--color-diff-blob-expander-icon: #7d8590;--color-diff-blob-selected-line-highlight-mix-blend-mode: screen;--color-diffstat-deletion-border: rgba(240,246,252,.1);--color-diffstat-addition-border: rgba(240,246,252,.1);--color-diffstat-addition-bg: #3fb950;--color-search-keyword-hl: rgba(210,153,34,.4);--color-prettylights-syntax-comment: #8b949e;--color-prettylights-syntax-constant: #79c0ff;--color-prettylights-syntax-entity: #d2a8ff;--color-prettylights-syntax-storage-modifier-import: #c9d1d9;--color-prettylights-syntax-entity-tag: #7ee787;--color-prettylights-syntax-keyword: #ff7b72;--color-prettylights-syntax-string: #a5d6ff;--color-prettylights-syntax-variable: #ffa657;--color-prettylights-syntax-brackethighlighter-unmatched: #f85149;--color-prettylights-syntax-invalid-illegal-text: #f0f6fc;--color-prettylights-syntax-invalid-illegal-bg: #8e1519;--color-prettylights-syntax-carriage-return-text: #f0f6fc;--color-prettylights-syntax-carriage-return-bg: #b62324;--color-prettylights-syntax-string-regexp: #7ee787;--color-prettylights-syntax-markup-list: #f2cc60;--color-prettylights-syntax-markup-heading: #1f6feb;--color-prettylights-syntax-markup-italic: #c9d1d9;--color-prettylights-syntax-markup-bold: #c9d1d9;--color-prettylights-syntax-markup-deleted-text: #ffdcd7;--color-prettylights-syntax-markup-deleted-bg: #67060c;--color-prettylights-syntax-markup-inserted-text: #aff5b4;--color-prettylights-syntax-markup-inserted-bg: #033a16;--color-prettylights-syntax-markup-changed-text: #ffdfb6;--color-prettylights-syntax-markup-changed-bg: #5a1e02;--color-prettylights-syntax-markup-ignored-text: #c9d1d9;--color-prettylights-syntax-markup-ignored-bg: #1158c7;--color-prettylights-syntax-meta-diff-range: #d2a8ff;--color-prettylights-syntax-brackethighlighter-angle: #8b949e;--color-prettylights-syntax-sublimelinter-gutter-mark: #484f58;--color-prettylights-syntax-constant-other-reference-link: #a5d6ff;--color-codemirror-text: #e6edf3;--color-codemirror-bg: #0d1117;--color-codemirror-gutters-bg: #0d1117;--color-codemirror-guttermarker-text: #0d1117;--color-codemirror-guttermarker-subtle-text: #6e7681;--color-codemirror-linenumber-text: #7d8590;--color-codemirror-cursor: #e6edf3;--color-codemirror-selection-bg: rgba(56,139,253,.4);--color-codemirror-activeline-bg: rgba(110,118,129,.1);--color-codemirror-matchingbracket-text: #e6edf3;--color-codemirror-lines-bg: #0d1117;--color-codemirror-syntax-comment: #8b949e;--color-codemirror-syntax-constant: #79c0ff;--color-codemirror-syntax-entity: #d2a8ff;--color-codemirror-syntax-keyword: #ff7b72;--color-codemirror-syntax-storage: #ff7b72;--color-codemirror-syntax-string: #a5d6ff;--color-codemirror-syntax-support: #79c0ff;--color-codemirror-syntax-variable: #ffa657;--color-checks-bg: #010409;--color-checks-run-border-width: 1px;--color-checks-container-border-width: 1px;--color-checks-text-primary: #e6edf3;--color-checks-text-secondary: #7d8590;--color-checks-text-link: #2f81f7;--color-checks-btn-icon: #7d8590;--color-checks-btn-hover-icon: #e6edf3;--color-checks-btn-hover-bg: rgba(110,118,129,.1);--color-checks-input-text: #7d8590;--color-checks-input-placeholder-text: #6e7681;--color-checks-input-focus-text: #e6edf3;--color-checks-input-bg: #161b22;--color-checks-donut-error: #f85149;--color-checks-donut-pending: #d29922;--color-checks-donut-success: #2ea043;--color-checks-donut-neutral: #8b949e;--color-checks-dropdown-text: #e6edf3;--color-checks-dropdown-bg: #161b22;--color-checks-dropdown-border: #30363d;--color-checks-dropdown-shadow: rgba(1,4,9,.3);--color-checks-dropdown-hover-text: #e6edf3;--color-checks-dropdown-hover-bg: rgba(110,118,129,.1);--color-checks-dropdown-btn-hover-text: #e6edf3;--color-checks-dropdown-btn-hover-bg: rgba(110,118,129,.1);--color-checks-scrollbar-thumb-bg: rgba(110,118,129,.4);--color-checks-header-label-text: #7d8590;--color-checks-header-label-open-text: #e6edf3;--color-checks-header-border: #21262d;--color-checks-header-icon: #7d8590;--color-checks-line-text: #7d8590;--color-checks-line-num-text: #6e7681;--color-checks-line-timestamp-text: #6e7681;--color-checks-line-hover-bg: rgba(110,118,129,.1);--color-checks-line-selected-bg: rgba(56,139,253,.1);--color-checks-line-selected-num-text: #2f81f7;--color-checks-line-dt-fm-text: #ffffff;--color-checks-line-dt-fm-bg: #9e6a03;--color-checks-gate-bg: rgba(187,128,9,.15);--color-checks-gate-text: #7d8590;--color-checks-gate-waiting-text: #d29922;--color-checks-step-header-open-bg: #161b22;--color-checks-step-error-text: #f85149;--color-checks-step-warning-text: #d29922;--color-checks-logline-text: #7d8590;--color-checks-logline-num-text: #6e7681;--color-checks-logline-debug-text: #a371f7;--color-checks-logline-error-text: #7d8590;--color-checks-logline-error-num-text: #6e7681;--color-checks-logline-error-bg: rgba(248,81,73,.1);--color-checks-logline-warning-text: #7d8590;--color-checks-logline-warning-num-text: #d29922;--color-checks-logline-warning-bg: rgba(187,128,9,.15);--color-checks-logline-command-text: #2f81f7;--color-checks-logline-section-text: #3fb950;--color-checks-ansi-black: #0d1117;--color-checks-ansi-black-bright: #161b22;--color-checks-ansi-white: #b1bac4;--color-checks-ansi-white-bright: #b1bac4;--color-checks-ansi-gray: #6e7681;--color-checks-ansi-red: #ff7b72;--color-checks-ansi-red-bright: #ffa198;--color-checks-ansi-green: #3fb950;--color-checks-ansi-green-bright: #56d364;--color-checks-ansi-yellow: #d29922;--color-checks-ansi-yellow-bright: #e3b341;--color-checks-ansi-blue: #58a6ff;--color-checks-ansi-blue-bright: #79c0ff;--color-checks-ansi-magenta: #bc8cff;--color-checks-ansi-magenta-bright: #d2a8ff;--color-checks-ansi-cyan: #76e3ea;--color-checks-ansi-cyan-bright: #b3f0ff;--color-project-header-bg: #0d1117;--color-project-sidebar-bg: #161b22;--color-project-gradient-in: #161b22;--color-project-gradient-out: rgba(22,27,34,0);--color-mktg-btn-bg: #f6f8fa;--color-mktg-btn-shadow-outline: rgb(255 255 255 / 25%) 0 0 0 1px inset;--color-mktg-btn-shadow-focus: rgb(255 255 255 / 25%) 0 0 0 4px;--color-mktg-btn-shadow-hover: 0 4px 7px rgba(0, 0, 0, .15), 0 100px 80px rgba(255, 255, 255, .02), 0 42px 33px rgba(255, 255, 255, .024), 0 22px 18px rgba(255, 255, 255, .028), 0 12px 10px rgba(255, 255, 255, .034), 0 7px 5px rgba(255, 255, 255, .04), 0 3px 2px rgba(255, 255, 255, .07);--color-mktg-btn-shadow-hover-muted: rgb(255 255 255) 0 0 0 2px inset;--color-control-border-color-emphasis: #606771;--color-avatar-bg: rgba(255,255,255,.1);--color-avatar-border: rgba(240,246,252,.1);--color-avatar-stack-fade: #30363d;--color-avatar-stack-fade-more: #21262d;--color-avatar-child-shadow: 0 0 0 2px #0d1117;--color-topic-tag-border: rgba(0,0,0,0);--color-counter-border: rgba(0,0,0,0);--color-select-menu-backdrop-border: #484f58;--color-select-menu-tap-highlight: rgba(48,54,61,.5);--color-select-menu-tap-focus-bg: #0c2d6b;--color-overlay-shadow: 0 0 0 1px #30363d, 0 16px 32px rgba(1,4,9,.85);--color-overlay-backdrop: rgba(22,27,34,.4);--color-header-text: rgba(255,255,255,.7);--color-header-bg: #161b22;--color-header-divider: #8b949e;--color-header-logo: #f0f6fc;--color-header-search-bg: #0d1117;--color-header-search-border: #30363d;--color-sidenav-selected-bg: #21262d;--color-menu-bg-active: #161b22;--color-input-disabled-bg: rgba(110,118,129,0);--color-timeline-badge-bg: #21262d;--color-ansi-black: #484f58;--color-ansi-black-bright: #6e7681;--color-ansi-white: #b1bac4;--color-ansi-white-bright: #ffffff;--color-ansi-gray: #6e7681;--color-ansi-red: #ff7b72;--color-ansi-red-bright: #ffa198;--color-ansi-green: #3fb950;--color-ansi-green-bright: #56d364;--color-ansi-yellow: #d29922;--color-ansi-yellow-bright: #e3b341;--color-ansi-blue: #58a6ff;--color-ansi-blue-bright: #79c0ff;--color-ansi-magenta: #bc8cff;--color-ansi-magenta-bright: #d2a8ff;--color-ansi-cyan: #39c5cf;--color-ansi-cyan-bright: #56d4dd;--color-btn-text: #c9d1d9;--color-btn-bg: #21262d;--color-btn-border: rgba(240,246,252,.1);--color-btn-shadow: 0 0 transparent;--color-btn-inset-shadow: 0 0 transparent;--color-btn-hover-bg: #30363d;--color-btn-hover-border: #8b949e;--color-btn-active-bg: hsla(212,12%,18%,1);--color-btn-active-border: #6e7681;--color-btn-selected-bg: #161b22;--color-btn-counter-bg: #30363d;--color-btn-primary-text: #ffffff;--color-btn-primary-bg: #238636;--color-btn-primary-border: rgba(240,246,252,.1);--color-btn-primary-shadow: 0 0 transparent;--color-btn-primary-inset-shadow: 0 0 transparent;--color-btn-primary-hover-bg: #2ea043;--color-btn-primary-hover-border: rgba(240,246,252,.1);--color-btn-primary-selected-bg: #238636;--color-btn-primary-selected-shadow: 0 0 transparent;--color-btn-primary-disabled-text: rgba(255,255,255,.5);--color-btn-primary-disabled-bg: rgba(35,134,54,.6);--color-btn-primary-disabled-border: rgba(240,246,252,.1);--color-btn-primary-icon: #ffffff;--color-btn-primary-counter-bg: rgba(4,38,15,.2);--color-btn-outline-text: #388bfd;--color-btn-outline-hover-text: #58a6ff;--color-btn-outline-hover-bg: #30363d;--color-btn-outline-hover-border: rgba(240,246,252,.1);--color-btn-outline-hover-shadow: 0 1px 0 rgba(1,4,9,.1);--color-btn-outline-hover-inset-shadow: inset 0 1px 0 rgba(255,255,255,.03);--color-btn-outline-hover-counter-bg: rgba(5,29,77,.2);--color-btn-outline-selected-text: #ffffff;--color-btn-outline-selected-bg: #0d419d;--color-btn-outline-selected-border: rgba(240,246,252,.1);--color-btn-outline-selected-shadow: 0 0 transparent;--color-btn-outline-disabled-text: rgba(88,166,255,.5);--color-btn-outline-disabled-bg: #0d1117;--color-btn-outline-disabled-counter-bg: rgba(31,111,235,.05);--color-btn-outline-counter-bg: rgba(5,29,77,.2);--color-btn-outline-hover-counter-fg: #58a6ff;--color-btn-outline-disabled-counter-fg: rgba(47,129,247,.5);--color-btn-outline-counter-fg: #388bfd;--color-btn-danger-text: #f85149;--color-btn-danger-hover-text: #ffffff;--color-btn-danger-hover-bg: #da3633;--color-btn-danger-hover-border: #f85149;--color-btn-danger-hover-shadow: 0 0 transparent;--color-btn-danger-hover-inset-shadow: 0 0 transparent;--color-btn-danger-hover-icon: #ffffff;--color-btn-danger-hover-counter-bg: rgba(255,255,255,.2);--color-btn-danger-selected-text: #ffffff;--color-btn-danger-selected-bg: #b62324;--color-btn-danger-selected-border: #ff7b72;--color-btn-danger-selected-shadow: 0 0 transparent;--color-btn-danger-disabled-text: rgba(248,81,73,.5);--color-btn-danger-disabled-bg: #0d1117;--color-btn-danger-disabled-counter-bg: rgba(218,54,51,.05);--color-btn-danger-counter-bg: rgba(73,2,2,.2);--color-btn-danger-icon: #f85149;--color-btn-danger-counter-fg: #f85149;--color-btn-danger-disabled-counter-fg: rgba(248,81,73,.5);--color-btn-danger-hover-counter-fg: #ffffff;--color-underlinenav-icon: #6e7681;--color-underlinenav-border-hover: rgba(110,118,129,.4);--color-action-list-item-inline-divider: rgba(48,54,61,.48);--color-action-list-item-default-hover-bg: rgba(177,186,196,.12);--color-action-list-item-default-hover-border: rgba(0,0,0,0);--color-action-list-item-default-active-bg: rgba(177,186,196,.2);--color-action-list-item-default-active-border: rgba(0,0,0,0);--color-action-list-item-default-selected-bg: rgba(177,186,196,.08);--color-action-list-item-danger-hover-bg: rgba(248,81,73,.16);--color-action-list-item-danger-active-bg: rgba(248,81,73,.24);--color-action-list-item-danger-hover-text: #ff7b72;--color-switch-track-bg: rgba(110,118,129,.1);--color-switch-track-hover-bg: hsla(215,8%,72%,.1);--color-switch-track-active-bg: rgba(110,118,129,.4);--color-switch-track-disabled-bg: #21262d;--color-switch-track-fg: #7d8590;--color-switch-track-disabled-fg: #010409;--color-switch-track-border: rgba(0,0,0,0);--color-switch-track-checked-bg: rgba(31,111,235,.35);--color-switch-track-checked-hover-bg: rgba(31,111,235,.5);--color-switch-track-checked-active-bg: rgba(31,111,235,.65);--color-switch-track-checked-fg: #ffffff;--color-switch-track-checked-disabled-fg: #010409;--color-switch-track-checked-border: rgba(0,0,0,0);--color-switch-knob-bg: #0d1117;--color-switch-knob-border: #606771;--color-switch-knob-disabled-bg: #161b22;--color-switch-knob-checked-bg: #0d1117;--color-switch-knob-checked-disabled-bg: #161b22;--color-switch-knob-checked-border: rgba(31,111,235,.35);--color-segmented-control-bg: rgba(110,118,129,.1);--color-segmented-control-button-bg: #0d1117;--color-segmented-control-button-hover-bg: #30363d;--color-segmented-control-button-active-bg: #21262d;--color-segmented-control-button-selected-border: #6e7681;--color-tree-view-item-chevron-hover-bg: rgba(177,186,196,.12);--color-tree-view-item-directory-fill: #7d8590;--color-fg-default: #e6edf3;--color-fg-muted: #7d8590;--color-fg-subtle: #6e7681;--color-fg-on-emphasis: #ffffff;--color-canvas-default: #0d1117;--color-canvas-overlay: #161b22;--color-canvas-inset: #010409;--color-canvas-subtle: #161b22;--color-border-default: #30363d;--color-border-muted: #21262d;--color-border-subtle: rgba(240,246,252,.1);--color-shadow-small: 0 0 transparent;--color-shadow-medium: 0 3px 6px #010409;--color-shadow-large: 0 8px 24px #010409;--color-shadow-extra-large: 0 12px 48px #010409;--color-neutral-emphasis-plus: #6e7681;--color-neutral-emphasis: #6e7681;--color-neutral-muted: rgba(110,118,129,.4);--color-neutral-subtle: rgba(110,118,129,.1);--color-accent-fg: #2f81f7;--color-accent-emphasis: #1f6feb;--color-accent-muted: rgba(56,139,253,.4);--color-accent-subtle: rgba(56,139,253,.1);--color-success-fg: #3fb950;--color-success-emphasis: #238636;--color-success-muted: rgba(46,160,67,.4);--color-success-subtle: rgba(46,160,67,.15);--color-attention-fg: #d29922;--color-attention-emphasis: #9e6a03;--color-attention-muted: rgba(187,128,9,.4);--color-attention-subtle: rgba(187,128,9,.15);--color-severe-fg: #db6d28;--color-severe-emphasis: #bd561d;--color-severe-muted: rgba(219,109,40,.4);--color-severe-subtle: rgba(219,109,40,.1);--color-danger-fg: #f85149;--color-danger-emphasis: #da3633;--color-danger-muted: rgba(248,81,73,.4);--color-danger-subtle: rgba(248,81,73,.1);--color-open-fg: #3fb950;--color-open-emphasis: #238636;--color-open-muted: rgba(46,160,67,.4);--color-open-subtle: rgba(46,160,67,.15);--color-closed-fg: #f85149;--color-closed-emphasis: #da3633;--color-closed-muted: rgba(248,81,73,.4);--color-closed-subtle: rgba(248,81,73,.15);--color-done-fg: #a371f7;--color-done-emphasis: #8957e5;--color-done-muted: rgba(163,113,247,.4);--color-done-subtle: rgba(163,113,247,.1);--color-sponsors-fg: #db61a2;--color-sponsors-emphasis: #bf4b8a;--color-sponsors-muted: rgba(219,97,162,.4);--color-sponsors-subtle: rgba(219,97,162,.1);--color-primer-fg-disabled: #484f58;--color-primer-canvas-backdrop: rgba(1,4,9,.8);--color-primer-canvas-sticky: rgba(13,17,23,.95);--color-primer-border-active: #f78166;--color-primer-border-contrast: rgba(255,255,255,.2);--color-primer-shadow-highlight: 0 0 transparent;--color-primer-shadow-inset: 0 0 transparent;--color-scale-black: #010409;--color-scale-white: #ffffff;--color-scale-gray-0: #f0f6fc;--color-scale-gray-1: #c9d1d9;--color-scale-gray-2: #b1bac4;--color-scale-gray-3: #8b949e;--color-scale-gray-4: #6e7681;--color-scale-gray-5: #484f58;--color-scale-gray-6: #30363d;--color-scale-gray-7: #21262d;--color-scale-gray-8: #161b22;--color-scale-gray-9: #0d1117;--color-scale-blue-0: #cae8ff;--color-scale-blue-1: #a5d6ff;--color-scale-blue-2: #79c0ff;--color-scale-blue-3: #58a6ff;--color-scale-blue-4: #388bfd;--color-scale-blue-5: #1f6feb;--color-scale-blue-6: #1158c7;--color-scale-blue-7: #0d419d;--color-scale-blue-8: #0c2d6b;--color-scale-blue-9: #051d4d;--color-scale-green-0: #aff5b4;--color-scale-green-1: #7ee787;--color-scale-green-2: #56d364;--color-scale-green-3: #3fb950;--color-scale-green-4: #2ea043;--color-scale-green-5: #238636;--color-scale-green-6: #196c2e;--color-scale-green-7: #0f5323;--color-scale-green-8: #033a16;--color-scale-green-9: #04260f;--color-scale-yellow-0: #f8e3a1;--color-scale-yellow-1: #f2cc60;--color-scale-yellow-2: #e3b341;--color-scale-yellow-3: #d29922;--color-scale-yellow-4: #bb8009;--color-scale-yellow-5: #9e6a03;--color-scale-yellow-6: #845306;--color-scale-yellow-7: #693e00;--color-scale-yellow-8: #4b2900;--color-scale-yellow-9: #341a00;--color-scale-orange-0: #ffdfb6;--color-scale-orange-1: #ffc680;--color-scale-orange-2: #ffa657;--color-scale-orange-3: #f0883e;--color-scale-orange-4: #db6d28;--color-scale-orange-5: #bd561d;--color-scale-orange-6: #9b4215;--color-scale-orange-7: #762d0a;--color-scale-orange-8: #5a1e02;--color-scale-orange-9: #3d1300;--color-scale-red-0: #ffdcd7;--color-scale-red-1: #ffc1ba;--color-scale-red-2: #ffa198;--color-scale-red-3: #ff7b72;--color-scale-red-4: #f85149;--color-scale-red-5: #da3633;--color-scale-red-6: #b62324;--color-scale-red-7: #8e1519;--color-scale-red-8: #67060c;--color-scale-red-9: #490202;--color-scale-purple-0: #eddeff;--color-scale-purple-1: #e2c5ff;--color-scale-purple-2: #d2a8ff;--color-scale-purple-3: #bc8cff;--color-scale-purple-4: #a371f7;--color-scale-purple-5: #8957e5;--color-scale-purple-6: #6e40c9;--color-scale-purple-7: #553098;--color-scale-purple-8: #3c1e70;--color-scale-purple-9: #271052;--color-scale-pink-0: #ffdaec;--color-scale-pink-1: #ffbedd;--color-scale-pink-2: #ff9bce;--color-scale-pink-3: #f778ba;--color-scale-pink-4: #db61a2;--color-scale-pink-5: #bf4b8a;--color-scale-pink-6: #9e3670;--color-scale-pink-7: #7d2457;--color-scale-pink-8: #5e103e;--color-scale-pink-9: #42062a;--color-scale-coral-0: #ffddd2;--color-scale-coral-1: #ffc2b2;--color-scale-coral-2: #ffa28b;--color-scale-coral-3: #f78166;--color-scale-coral-4: #ea6045;--color-scale-coral-5: #cf462d;--color-scale-coral-6: #ac3220;--color-scale-coral-7: #872012;--color-scale-coral-8: #640d04;--color-scale-coral-9: #460701}.code-diff-view *{position:static;box-sizing:border-box}.code-diff-view{position:relative;margin-top:16px;margin-bottom:16px;border:1px solid var(--color-border-default, #ddd);border-radius:6px;overflow-y:auto}.code-diff-view .file-header{position:sticky;top:0;z-index:1;background-color:var(--color-canvas-subtle);border-bottom:1px solid var(--color-border-default);padding:8px 16px;font-size:12px;font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace}.code-diff-view .file-header .file-info{display:flex;justify-content:space-between;align-items:center;margin-left:8px;height:24px}.code-diff-view .file-header .file-info .info-left{color:var(--color-fg-default)}.code-diff-view .file-header .file-info .info-right{display:flex;justify-content:space-between;align-items:center;width:50%}.code-diff-view .file-header .file-info .diff-stat{display:inline-flex;align-items:center;gap:8px}.code-diff-view .file-header .file-info .diff-stat .diff-stat-added{color:var(--color-diffstat-addition-bg)}.code-diff-view .file-header .file-info .diff-stat .diff-stat-deleted{color:var(--color-danger-emphasis)}.code-diff-view .file-header .file-info .diff-stat .diff-stat-ignored{color:var(--color-fg-subtle)}.code-diff-view .file-header .file-info .diff-commandbar{margin-left:auto;margin-right:1rem}.code-diff-view .file-header .file-info .diff-commandbar .command-item-button{background-color:transparent;color:var(--color-fg-subtle);border:none}.code-diff-view .file-header .file-info .diff-commandbar .command-item-button svg{fill:var(--color-fg-subtle)}.code-diff-view .file-header .file-info .diff-commandbar .command-item-button:hover{background-color:var(--color-btn-outline-hover-border)}.code-diff-view table{border-spacing:0}.code-diff-view .diff-table{width:100%}.code-diff-view .diff-table .blob-num{position:relative;width:1%;min-width:50px;padding-right:10px;padding-left:10px;font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace;font-size:12px;line-height:20px;color:var(--color-fg-subtle);text-align:right;white-space:nowrap;vertical-align:top;cursor:pointer;-webkit-user-select:none;user-select:none}.code-diff-view .diff-table .blob-num-deletion{color:var(--color-diff-blob-deletion-num-text);background-color:var(--color-diff-blob-deletion-num-bg);border-color:var(--color-danger-emphasis)}.code-diff-view .diff-table .blob-num-addition{color:var(--color-diff-blob-addition-num-text);background-color:var(--color-diff-blob-addition-num-bg);border-color:var(--color-success-emphasis)}.code-diff-view .diff-table .blob-code{position:relative;padding-right:10px;padding-left:10px;line-height:20px;vertical-align:top}.code-diff-view .diff-table .blob-code .blob-code-inner{display:table-cell;overflow:visible;font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace;font-size:12px;color:var(--color-fg-default);word-wrap:anywhere;white-space:pre-wrap}.code-diff-view .diff-table .blob-code-deletion{background-color:var(--color-diff-blob-deletion-line-bg);outline:1px dashed transparent}.code-diff-view .diff-table .blob-code-deletion .x{color:var(--color-diff-blob-deletion-fg);background-color:var(--color-diff-blob-deletion-word-bg)}.code-diff-view .diff-table .blob-code-addition{background-color:var(--color-diff-blob-addition-line-bg);outline:1px dotted transparent}.code-diff-view .diff-table .blob-code-addition .x{color:var(--color-diff-blob-addition-fg);background-color:var(--color-diff-blob-addition-word-bg)}.code-diff-view .diff-table .current-diff{border:1px solid var(--color-border-muted)}.code-diff-view .diff-table .blob-code-context,.code-diff-view .diff-table .blob-code-addition,.code-diff-view .diff-table .blob-code-deletion{padding-left:22px!important}.code-diff-view .diff-table .blob-code-marker:before{position:absolute;top:1px;left:8px;padding-right:8px;content:attr(data-code-marker)}.code-diff-view .diff-table .blob-num-hunk{background-color:var(--color-diff-blob-hunk-num-bg)}.code-diff-view .diff-table .blob-code-hunk{background-color:var(--color-accent-subtle)}.code-diff-view .diff-table .load-more{padding:8px;text-align:center}.code-diff-view .diff-table .load-more-button{padding:4px 12px;color:var(--color-accent-fg);background:transparent;border:1px solid var(--color-border-default);border-radius:4px;cursor:pointer}.code-diff-view .diff-table .load-more-button:hover{background-color:var(--color-accent-muted)}.code-diff-view .file-diff-split{table-layout:fixed}.code-diff-view .file-diff-split .blob-code+.blob-num{border-left:1px solid var(--color-border-muted)}.code-diff-view .file-diff-split .no-select{user-select:none}.code-diff-view .empty-cell{cursor:default;background-color:var(--color-neutral-subtle);border-right-color:var(--color-border-muted)}.code-diff-view[data-v-0c5adc58] td:nth-child(1){display:none}")),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();function Ks(){}Ks.prototype={diff:function(e,t){var n,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=o.callback;typeof o=="function"&&(i=o,o={}),this.options=o;var s=this;function a(R){return i?(setTimeout(function(){i(void 0,R)},0),!0):R}e=this.castInput(e),t=this.castInput(t),e=this.removeEmpty(this.tokenize(e)),t=this.removeEmpty(this.tokenize(t));var l=t.length,c=e.length,d=1,f=l+c;o.maxEditLength&&(f=Math.min(f,o.maxEditLength));var h=(n=o.timeout)!==null&&n!==void 0?n:1/0,p=Date.now()+h,g=[{oldPos:-1,lastComponent:void 0}],y=this.extractCommon(g[0],t,e,0);if(g[0].oldPos+1>=c&&y+1>=l)return a([{value:this.join(t),count:t.length}]);var b=-1/0,_=1/0;function x(){for(var R=Math.max(b,-d);R<=Math.min(_,d);R+=2){var S=void 0,O=g[R-1],I=g[R+1];O&&(g[R-1]=void 0);var D=!1;if(I){var w=I.oldPos-R;D=I&&0<=w&&w<l}var E=O&&O.oldPos+1<c;if(!D&&!E){g[R]=void 0;continue}if(!E||D&&O.oldPos+1<I.oldPos?S=s.addToPath(I,!0,void 0,0):S=s.addToPath(O,void 0,!0,1),y=s.extractCommon(S,t,e,R),S.oldPos+1>=c&&y+1>=l)return a(LL(s,S.lastComponent,t,e,s.useLongestToken));g[R]=S,S.oldPos+1>=c&&(_=Math.min(_,R-1)),y+1>=l&&(b=Math.max(b,R+1))}d++}if(i)(function R(){setTimeout(function(){if(d>f||Date.now()>p)return i();x()||R()},0)})();else for(;d<=f&&Date.now()<=p;){var B=x();if(B)return B}},addToPath:function(e,t,n,o){var i=e.lastComponent;return i&&i.added===t&&i.removed===n?{oldPos:e.oldPos+o,lastComponent:{count:i.count+1,added:t,removed:n,previousComponent:i.previousComponent}}:{oldPos:e.oldPos+o,lastComponent:{count:1,added:t,removed:n,previousComponent:i}}},extractCommon:function(e,t,n,o){for(var i=t.length,s=n.length,a=e.oldPos,l=a-o,c=0;l+1<i&&a+1<s&&this.equals(t[l+1],n[a+1]);)l++,a++,c++;return c&&(e.lastComponent={count:c,previousComponent:e.lastComponent}),e.oldPos=a,l},equals:function(e,t){return this.options.comparator?this.options.comparator(e,t):e===t||this.options.ignoreCase&&e.toLowerCase()===t.toLowerCase()},removeEmpty:function(e){for(var t=[],n=0;n<e.length;n++)e[n]&&t.push(e[n]);return t},castInput:function(e){return e},tokenize:function(e){return e.split("")},join:function(e){return e.join("")}};function LL(e,t,n,o,i){for(var s=[],a;t;)s.push(t),a=t.previousComponent,delete t.previousComponent,t=a;s.reverse();for(var l=0,c=s.length,d=0,f=0;l<c;l++){var h=s[l];if(h.removed){if(h.value=e.join(o.slice(f,f+h.count)),f+=h.count,l&&s[l-1].added){var p=s[l-1];s[l-1]=s[l],s[l]=p}}else{if(!h.added&&i){var g=n.slice(d,d+h.count);g=g.map(function(b,_){var x=o[f+_];return x.length>b.length?x:b}),h.value=e.join(g)}else h.value=e.join(n.slice(d,d+h.count));d+=h.count,h.added||(f+=h.count)}}var y=s[c-1];return c>1&&typeof y.value=="string"&&(y.added||y.removed)&&e.equals("",y.value)&&(s[c-2].value+=y.value,s.pop()),s}var FL=new Ks;function $L(e,t,n){return FL.diff(e,t,n)}function zL(e,t){if(typeof e=="function")t.callback=e;else if(e)for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}var Ex=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,Cx=/\S/,ry=new Ks;ry.equals=function(e,t){return this.options.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e===t||this.options.ignoreWhitespace&&!Cx.test(e)&&!Cx.test(t)},ry.tokenize=function(e){for(var t=e.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/),n=0;n<t.length-1;n++)!t[n+1]&&t[n+2]&&Ex.test(t[n])&&Ex.test(t[n+2])&&(t[n]+=t[n+2],t.splice(n+1,2),n--);return t};function jL(e,t,n){return n=zL(n,{ignoreWhitespace:!0}),ry.diff(e,t,n)}var iy=new Ks;iy.tokenize=function(e){this.options.stripTrailingCr&&(e=e.replace(/\r\n/g,`
1
+ (function(Ke,r){typeof exports=="object"&&typeof module<"u"?r(exports,require("vue"),require("lucide-vue-next"),require("reka-ui"),require("@vueuse/core"),require("vue-i18n"),require("@vuepic/vue-datepicker"),require("vue-router"),require("@uppy/core"),require("@uppy/dashboard"),require("@uppy/image-editor"),require("vue3-lottie")):typeof define=="function"&&define.amd?define(["exports","vue","lucide-vue-next","reka-ui","@vueuse/core","vue-i18n","@vuepic/vue-datepicker","vue-router","@uppy/core","@uppy/dashboard","@uppy/image-editor","vue3-lottie"],r):(Ke=typeof globalThis<"u"?globalThis:Ke||self,r(Ke.DynamicUI={},Ke.Vue,Ke.LucideIcons,Ke.rekaUi,Ke.core,Ke.VueI18n,Ke.VueDatePicker,Ke.VueRouter,Ke.Uppy,Ke.UppyDashboard,Ke.UppyImageEditor,Ke.Vue3Lottie))})(this,(function(Ke,r,Ae,Lt,Lo,In,LR,zs,FR,C1,$R,zR){"use strict";function S1(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const A1=S1(r),Yt=S1(Ae),Zc=Math.min,js=Math.max,bm=Math.round,ym=Math.floor,Us=e=>({x:e,y:e}),jR={left:"right",right:"left",bottom:"top",top:"bottom"};function UR(e,t,n){return js(e,Zc(t,n))}function Iu(e,t){return typeof e=="function"?e(t):e}function Il(e){return e.split("-")[0]}function Ou(e){return e.split("-")[1]}function T1(e){return e==="x"?"y":"x"}function B1(e){return e==="y"?"height":"width"}function Ws(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function P1(e){return T1(Ws(e))}function WR(e,t,n){n===void 0&&(n=!1);const o=Ou(e),i=P1(e),s=B1(i);let a=i==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(a=vm(a)),[a,vm(a)]}function HR(e){const t=vm(e);return[zb(e),t,zb(t)]}function zb(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const N1=["left","right"],D1=["right","left"],qR=["top","bottom"],KR=["bottom","top"];function GR(e,t,n){switch(e){case"top":case"bottom":return n?t?D1:N1:t?N1:D1;case"left":case"right":return t?qR:KR;default:return[]}}function YR(e,t,n,o){const i=Ou(e);let s=GR(Il(e),n==="start",o);return i&&(s=s.map(a=>a+"-"+i),t&&(s=s.concat(s.map(zb)))),s}function vm(e){const t=Il(e);return jR[t]+e.slice(t.length)}function ZR(e){var t,n,o,i;return{top:(t=e.top)!=null?t:0,right:(n=e.right)!=null?n:0,bottom:(o=e.bottom)!=null?o:0,left:(i=e.left)!=null?i:0}}function XR(e){return typeof e!="number"?ZR(e):{top:e,right:e,bottom:e,left:e}}function wm(e){const{x:t,y:n,width:o,height:i}=e;return{width:o,height:i,top:n,left:t,right:t+o,bottom:n+i,x:t,y:n}}function M1(e,t,n){let{reference:o,floating:i}=e;const s=Ws(t),a=P1(t),l=B1(a),c=Il(t),d=s==="y",f=o.x+o.width/2-i.width/2,h=o.y+o.height/2-i.height/2,p=o[l]/2-i[l]/2;let g;switch(c){case"top":g={x:f,y:o.y-i.height};break;case"bottom":g={x:f,y:o.y+o.height};break;case"right":g={x:o.x+o.width,y:h};break;case"left":g={x:o.x-i.width,y:h};break;default:g={x:o.x,y:o.y}}const y=Ou(t);return y&&(g[a]+=p*(y==="end"?1:-1)*(n&&d?-1:1)),g}async function JR(e,t){var n;t===void 0&&(t={});const{x:o,y:i,platform:s,rects:a,elements:l,strategy:c}=e,{boundary:d="clippingAncestors",rootBoundary:f="viewport",elementContext:h="floating",altBoundary:p=!1,padding:g=0}=Iu(t,e),y=XR(g),_=l[p?h==="floating"?"reference":"floating":h],x=wm(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(_)))==null||n?_:_.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(l.floating)),boundary:d,rootBoundary:f,strategy:c})),B=h==="floating"?{x:o,y:i,width:a.floating.width,height:a.floating.height}:a.reference,R=await(s.getOffsetParent==null?void 0:s.getOffsetParent(l.floating)),S=await(s.isElement==null?void 0:s.isElement(R))&&await(s.getScale==null?void 0:s.getScale(R))||{x:1,y:1},O=wm(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:B,offsetParent:R,strategy:c}):B);return{top:(x.top-O.top+y.top)/S.y,bottom:(O.bottom-x.bottom+y.bottom)/S.y,left:(x.left-O.left+y.left)/S.x,right:(O.right-x.right+y.right)/S.x}}const QR=50,VR=async(e,t,n)=>{const{placement:o="bottom",strategy:i="absolute",middleware:s=[],platform:a}=n,l=a.detectOverflow?a:{...a,detectOverflow:JR},c=await(a.isRTL==null?void 0:a.isRTL(t));let d=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:f,y:h}=M1(d,o,c),p=o,g=0;const y={};for(let b=0;b<s.length;b++){const _=s[b];if(!_)continue;const{name:x,fn:B}=_,{x:R,y:S,data:O,reset:I}=await B({x:f,y:h,initialPlacement:o,placement:p,strategy:i,middlewareData:y,rects:d,platform:l,elements:{reference:e,floating:t}});f=R??f,h=S??h,y[x]={...y[x],...O},I&&g<QR&&(g++,typeof I=="object"&&(I.placement&&(p=I.placement),I.rects&&(d=I.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:i}):I.rects),{x:f,y:h}=M1(d,p,c)),b=-1)}return{x:f,y:h,placement:p,strategy:i,middlewareData:y}},eI=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:i,middlewareData:s,rects:a,initialPlacement:l,platform:c,elements:d}=t,{mainAxis:f=!0,crossAxis:h=!0,fallbackPlacements:p,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:b=!0,..._}=Iu(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const x=Il(i),B=Ws(l),R=Il(l)===l,S=await(c.isRTL==null?void 0:c.isRTL(d.floating)),O=p||(R||!b?[vm(l)]:HR(l)),I=y!=="none";!p&&I&&O.push(...YR(l,b,y,S));const D=[l,...O],w=await c.detectOverflow(t,_),E=[];let F=((o=s.flip)==null?void 0:o.overflows)||[];if(f&&E.push(w[x]),h){const Q=WR(i,a,S);E.push(w[Q[0]],w[Q[1]])}if(F=[...F,{placement:i,overflows:E}],!E.every(Q=>Q<=0)){var A,P;const Q=(((A=s.flip)==null?void 0:A.index)||0)+1,re=D[Q];if(re&&(!(h==="alignment"?B!==Ws(re):!1)||F.every(X=>Ws(X.placement)===B?X.overflows[0]>0:!0)))return{data:{index:Q,overflows:F},reset:{placement:re}};let ie=(P=F.filter(le=>le.overflows[0]<=0).sort((le,X)=>le.overflows[1]-X.overflows[1])[0])==null?void 0:P.placement;if(!ie)switch(g){case"bestFit":{var q;const le=(q=F.filter(X=>{if(I){const K=Ws(X.placement);return K===B||K==="y"}return!0}).map(X=>[X.placement,X.overflows.filter(K=>K>0).reduce((K,W)=>K+W,0)]).sort((X,K)=>X[1]-K[1])[0])==null?void 0:q[0];le&&(ie=le);break}case"initialPlacement":ie=l;break}if(i!==ie)return{reset:{placement:ie}}}return{}}}},tI=new Set(["left","top"]);async function nI(e,t){const{placement:n,platform:o,elements:i}=e,s=await(o.isRTL==null?void 0:o.isRTL(i.floating)),a=Il(n),l=Ou(n),c=Ws(n)==="y",d=tI.has(a)?-1:1,f=s&&c?-1:1,h=Iu(t,e);let{mainAxis:p,crossAxis:g,alignmentAxis:y}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return l&&typeof y=="number"&&(g=l==="end"?y*-1:y),c?{x:g*f,y:p*d}:{x:p*d,y:g*f}}const oI=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:i,y:s,placement:a,middlewareData:l}=t,c=await nI(t,e);return a===((n=l.offset)==null?void 0:n.placement)&&(o=l.arrow)!=null&&o.alignmentOffset?{}:{x:i+c.x,y:s+c.y,data:{...c,placement:a}}}}},rI=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:i,platform:s}=t,{mainAxis:a=!0,crossAxis:l=!1,limiter:c={fn:B=>{let{x:R,y:S}=B;return{x:R,y:S}}},...d}=Iu(e,t),f={x:n,y:o},h=await s.detectOverflow(t,d),p=Ws(i),g=T1(p);let y=f[g],b=f[p];const _=(B,R)=>UR(R+h[B==="y"?"top":"left"],R,R-h[B==="y"?"bottom":"right"]);a&&(y=_(g,y)),l&&(b=_(p,b));const x=c.fn({...t,[g]:y,[p]:b});return{...x,data:{x:x.x-n,y:x.y-o,enabled:{[g]:a,[p]:l}}}}}},iI=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:o,platform:i,elements:s}=t,{apply:a=()=>{},...l}=Iu(e,t),c=await i.detectOverflow(t,l),d=Il(n),f=Ou(n),h=Ws(n)==="y",{width:p,height:g}=o.floating;let y,b;d==="top"||d==="bottom"?(y=d,b=f===(await(i.isRTL==null?void 0:i.isRTL(s.floating))?"start":"end")?"left":"right"):(b=d,y=f==="end"?"top":"bottom");const _=g-c.top-c.bottom,x=p-c.left-c.right,B=Zc(g-c[y],_),R=Zc(p-c[b],x),S=t.middlewareData.shift,O=!S;let I=B,D=R;S!=null&&S.enabled.x&&(D=x),S!=null&&S.enabled.y&&(I=_),O&&!f&&(h?D=p-2*js(c.left,c.right):I=g-2*js(c.top,c.bottom)),await a({...t,availableWidth:D,availableHeight:I});const w=await i.getDimensions(s.floating);return p!==w.width||g!==w.height?{reset:{rects:!0}}:{}}}};function km(){return typeof window<"u"}function Ol(e){return jb(e)?(e.nodeName||"").toLowerCase():"#document"}function vr(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Hs(e){var t;return(t=(jb(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function jb(e){return km()?e instanceof Node||e instanceof vr(e).Node:!1}function es(e){return km()?e instanceof Element||e instanceof vr(e).Element:!1}function Ia(e){return km()?e instanceof HTMLElement||e instanceof vr(e).HTMLElement:!1}function R1(e){return!km()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof vr(e).ShadowRoot}function _m(e){const{overflow:t,overflowX:n,overflowY:o,display:i}=ts(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&i!=="inline"&&i!=="contents"}function sI(e){return/^(table|td|th)$/.test(Ol(e))}function xm(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const aI=/transform|translate|scale|rotate|perspective|filter/,lI=/paint|layout|strict|content/,Ll=e=>!!e&&e!=="none";let Ub;function Wb(e){const t=es(e)?ts(e):e;return Ll(t.transform)||Ll(t.translate)||Ll(t.scale)||Ll(t.rotate)||Ll(t.perspective)||!Hb()&&(Ll(t.backdropFilter)||Ll(t.filter))||aI.test(t.willChange||"")||lI.test(t.contain||"")}function cI(e){let t=Fl(e);for(;Ia(t)&&!Lu(t);){if(Wb(t))return t;if(xm(t))return null;t=Fl(t)}return null}function Hb(){return Ub==null&&(Ub=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Ub}function Lu(e){return/^(html|body|#document)$/.test(Ol(e))}function ts(e){return vr(e).getComputedStyle(e)}function Em(e){return es(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Fl(e){if(Ol(e)==="html")return e;const t=e.assignedSlot||e.parentNode||R1(e)&&e.host||Hs(e);return R1(t)?t.host:t}function I1(e){const t=Fl(e);return Lu(t)?(e.ownerDocument||e).body:Ia(t)&&_m(t)?t:I1(t)}function Fu(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=I1(e),s=i===((o=e.ownerDocument)==null?void 0:o.body),a=vr(i);if(s){const l=qb(a);return t.concat(a,a.visualViewport||[],_m(i)?i:[],l&&n?Fu(l):[])}else return t.concat(i,Fu(i,[],n))}function qb(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function O1(e){const t=ts(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const i=Ia(e),s=i?e.offsetWidth:n,a=i?e.offsetHeight:o,l=bm(n)!==s||bm(o)!==a;return l&&(n=s,o=a),{width:n,height:o,$:l}}function Kb(e){return es(e)?e:e.contextElement}function Xc(e){const t=Kb(e);if(!Ia(t))return Us(1);const n=t.getBoundingClientRect(),{width:o,height:i,$:s}=O1(t);let a=(s?bm(n.width):n.width)/o,l=(s?bm(n.height):n.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!l||!Number.isFinite(l))&&(l=1),{x:a,y:l}}const dI=Us(0);function L1(e){const t=vr(e);return!Hb()||!t.visualViewport?dI:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function uI(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===vr(e)}function $l(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),s=Kb(e);let a=Us(1);t&&(o?es(o)&&(a=Xc(o)):a=Xc(e));const l=uI(s,n,o)?L1(s):Us(0);let c=(i.left+l.x)/a.x,d=(i.top+l.y)/a.y,f=i.width/a.x,h=i.height/a.y;if(s&&o){const p=vr(s),g=es(o)?vr(o):o;let y=p,b=qb(y);for(;b&&g!==y;){const _=Xc(b),x=b.getBoundingClientRect(),B=ts(b),R=x.left+(b.clientLeft+parseFloat(B.paddingLeft))*_.x,S=x.top+(b.clientTop+parseFloat(B.paddingTop))*_.y;c*=_.x,d*=_.y,f*=_.x,h*=_.y,c+=R,d+=S,y=vr(b),b=qb(y)}}return wm({width:f,height:h,x:c,y:d})}function Cm(e,t){const n=Em(e).scrollLeft;return t?t.left+n:$l(Hs(e)).left+n}function F1(e,t){const n=e.getBoundingClientRect(),o=n.left+t.scrollLeft-Cm(e,n),i=n.top+t.scrollTop;return{x:o,y:i}}function fI(e){let{elements:t,rect:n,offsetParent:o,strategy:i}=e;const s=i==="fixed",a=Hs(o),l=t?xm(t.floating):!1;if(o===a||l&&s)return n;let c={scrollLeft:0,scrollTop:0},d=Us(1);const f=Us(0),h=Ia(o);if((h||!s)&&((Ol(o)!=="body"||_m(a))&&(c=Em(o)),h)){const g=$l(o);d=Xc(o),f.x=g.x+o.clientLeft,f.y=g.y+o.clientTop}const p=a&&!h&&!s?F1(a,c):Us(0);return{width:n.width*d.x,height:n.height*d.y,x:n.x*d.x-c.scrollLeft*d.x+f.x+p.x,y:n.y*d.y-c.scrollTop*d.y+f.y+p.y}}function hI(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function mI(e){const t=Em(e),n=e.ownerDocument.body,o=js(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=js(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let s=-t.scrollLeft+Cm(e);const a=-t.scrollTop;return ts(n).direction==="rtl"&&(s+=js(e.clientWidth,n.clientWidth)-o),{width:o,height:i,x:s,y:a}}const pI=25;function gI(e,t,n){n===void 0&&(n="viewport");const o=n==="layoutViewport",i=vr(e),s=Hs(e),a=i.visualViewport;let l=s.clientWidth,c=s.clientHeight,d=0,f=0;if(a){const p=!Hb()||t==="fixed";o?p||(d=-a.offsetLeft,f=-a.offsetTop):(l=a.width,c=a.height,p&&(d=a.offsetLeft,f=a.offsetTop))}if(Cm(s)<=0){const p=s.ownerDocument,g=p.body,y=getComputedStyle(g),b=p.compatMode==="CSS1Compat"&&parseFloat(y.marginLeft)+parseFloat(y.marginRight)||0,_=Math.abs(s.clientWidth-g.clientWidth-b),x=getComputedStyle(s).scrollbarGutter==="stable both-edges"?_/2:_;x<=pI&&(l-=x)}return{width:l,height:c,x:d,y:f}}function bI(e,t){const n=$l(e,!0,t==="fixed"),o=n.top+e.clientTop,i=n.left+e.clientLeft,s=Xc(e),a=e.clientWidth*s.x,l=e.clientHeight*s.y,c=i*s.x,d=o*s.y;return{width:a,height:l,x:c,y:d}}function $1(e,t,n){let o;if(t==="viewport"||t==="layoutViewport")o=gI(e,n,t);else if(t==="document")o=mI(Hs(e));else if(es(t))o=bI(t,n);else{const i=L1(e);o={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return wm(o)}function yI(e,t){const n=t.get(e);if(n)return n;let o=Fu(e,[],!1).filter(l=>es(l)&&Ol(l)!=="body"),i=null;const s=ts(e).position==="fixed";let a=s?Fl(e):e;for(;es(a)&&!Lu(a);){const l=ts(a),c=Wb(a),d=i?i.position:s?"fixed":"";!c&&(d==="fixed"||d==="absolute"&&l.position==="static")?o=o.filter(h=>h!==a):i=l,a=Fl(a)}return t.set(e,o),o}function vI(e){let{element:t,boundary:n,rootBoundary:o,strategy:i}=e;const a=[...n==="clippingAncestors"?xm(t)?[]:yI(t,this._c):[].concat(n),o],l=$1(t,a[0],i);let c=l.top,d=l.right,f=l.bottom,h=l.left;for(let p=1;p<a.length;p++){const g=$1(t,a[p],i);c=js(g.top,c),d=Zc(g.right,d),f=Zc(g.bottom,f),h=js(g.left,h)}return{width:d-h,height:f-c,x:h,y:c}}function wI(e){const{width:t,height:n}=O1(e);return{width:t,height:n}}function kI(e,t,n){const o=Ia(t),i=Hs(t),s=n==="fixed",a=$l(e,!0,s,t);let l={scrollLeft:0,scrollTop:0};const c=Us(0);if((o||!s)&&((Ol(t)!=="body"||_m(i))&&(l=Em(t)),o)){const p=$l(t,!0,s,t);c.x=p.x+t.clientLeft,c.y=p.y+t.clientTop}!o&&i&&(c.x=Cm(i));const d=i&&!o&&!s?F1(i,l):Us(0),f=a.left+l.scrollLeft-c.x-d.x,h=a.top+l.scrollTop-c.y-d.y;return{x:f,y:h,width:a.width,height:a.height}}function Gb(e){return ts(e).position==="static"}function z1(e,t){if(!Ia(e)||ts(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Hs(e)===n&&(n=n.ownerDocument.body),n}function j1(e,t){const n=vr(e);if(xm(e))return n;if(!Ia(e)){let i=Fl(e);for(;i&&!Lu(i);){if(es(i)&&!Gb(i))return i;i=Fl(i)}return n}let o=z1(e,t);for(;o&&sI(o)&&Gb(o);)o=z1(o,t);return o&&Lu(o)&&Gb(o)&&!Wb(o)?n:o||cI(e)||n}const _I=async function(e){const t=this.getOffsetParent||j1,n=this.getDimensions,o=await n(e.floating);return{reference:kI(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function xI(e){return ts(e).direction==="rtl"}const EI={convertOffsetParentRelativeRectToViewportRelativeRect:fI,getDocumentElement:Hs,getClippingRect:vI,getOffsetParent:j1,getElementRects:_I,getClientRects:hI,getDimensions:wI,getScale:Xc,isElement:es,isRTL:xI};function U1(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function CI(e,t,n){let o=null,i;const s=Hs(e);function a(){var f;clearTimeout(i),(f=o)==null||f.disconnect(),o=null}function l(f,h){f===void 0&&(f=!1),h===void 0&&(h=1),a();const p=e.getBoundingClientRect(),{left:g,top:y,width:b,height:_}=p;if(f||t(),!b||!_)return;const x=ym(y),B=ym(s.clientWidth-(g+b)),R=ym(s.clientHeight-(y+_)),S=ym(g),I={rootMargin:-x+"px "+-B+"px "+-R+"px "+-S+"px",threshold:js(0,Zc(1,h))||1};let D=!0;function w(E){const F=E[0].intersectionRatio;if(!U1(p,e.getBoundingClientRect()))return l();if(F!==h){if(!D)return l();F?l(!1,F):i=setTimeout(()=>{l(!1,1e-7)},1e3)}D=!1}try{o=new IntersectionObserver(w,{...I,root:s.ownerDocument})}catch{o=new IntersectionObserver(w,I)}o.observe(e)}const c=vr(e),d=()=>l(n);return c.addEventListener("resize",d),l(!0),()=>{c.removeEventListener("resize",d),a()}}function Jc(e,t,n,o){o===void 0&&(o={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:c=!1}=o,d=Kb(e),f=i||s?[...d?Fu(d):[],...t?Fu(t):[]]:[];f.forEach(x=>{i&&x.addEventListener("scroll",n),s&&x.addEventListener("resize",n)});const h=d&&l?CI(d,n,s):null;let p=-1,g=null;a&&(g=new ResizeObserver(x=>{let[B]=x;B&&B.target===d&&g&&t&&(g.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var R;(R=g)==null||R.observe(t)})),n()}),d&&!c&&g.observe(d),t&&g.observe(t));let y,b=c?$l(e):null;c&&_();function _(){const x=$l(e);b&&!U1(b,x)&&n(),b=x,y=requestAnimationFrame(_)}return n(),()=>{var x;f.forEach(B=>{i&&B.removeEventListener("scroll",n),s&&B.removeEventListener("resize",n)}),h?.(),(x=g)==null||x.disconnect(),g=null,c&&cancelAnimationFrame(y)}}const Qc=oI,Vc=rI,ed=eI,Sm=iI,SI=(e,t,n)=>{const o=new Map,i=n??{},s={...EI,...i.platform,_c:o};return VR(e,t,{...i,platform:s})};function AI(e){return e!=null&&typeof e=="object"&&"$el"in e}function W1(e){if(AI(e)){const t=e.$el;return jb(t)&&Ol(t)==="#comment"?null:t}return e}function $u(e){return typeof e=="function"?e():r.unref(e)}function H1(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function q1(e,t){const n=H1(e);return Math.round(t*n)/n}function td(e,t,n){n===void 0&&(n={});const o=n.whileElementsMounted,i=r.computed(()=>{var D;return(D=$u(n.open))!=null?D:!0}),s=r.computed(()=>$u(n.middleware)),a=r.computed(()=>{var D;return(D=$u(n.placement))!=null?D:"bottom"}),l=r.computed(()=>{var D;return(D=$u(n.strategy))!=null?D:"absolute"}),c=r.computed(()=>{var D;return(D=$u(n.transform))!=null?D:!0}),d=r.computed(()=>W1(e.value)),f=r.computed(()=>W1(t.value)),h=r.ref(0),p=r.ref(0),g=r.ref(l.value),y=r.ref(a.value),b=r.shallowRef({}),_=r.ref(!1),x=r.computed(()=>{const D={position:g.value,left:"0",top:"0"};if(!f.value)return D;const w=q1(f.value,h.value),E=q1(f.value,p.value);return c.value?{...D,transform:"translate("+w+"px, "+E+"px)",...H1(f.value)>=1.5&&{willChange:"transform"}}:{position:g.value,left:w+"px",top:E+"px"}});let B;function R(){if(d.value==null||f.value==null)return;const D=i.value;SI(d.value,f.value,{middleware:s.value,placement:a.value,strategy:l.value}).then(w=>{h.value=w.x,p.value=w.y,g.value=w.strategy,y.value=w.placement,b.value=w.middlewareData,_.value=D!==!1})}function S(){typeof B=="function"&&(B(),B=void 0)}function O(){if(S(),o===void 0){R();return}if(d.value!=null&&f.value!=null){B=o(d.value,f.value,R);return}}function I(){i.value||(_.value=!1)}return r.watch([s,a,l,i],R,{flush:"sync"}),r.watch([d,f],O,{flush:"sync"}),r.watch(i,I,{flush:"sync"}),r.getCurrentScope()&&r.onScopeDispose(S),{x:r.shallowReadonly(h),y:r.shallowReadonly(p),strategy:r.shallowReadonly(g),placement:r.shallowReadonly(y),middlewareData:r.shallowReadonly(b),isPositioned:r.shallowReadonly(_),floatingStyles:x,update:R}}const TI=["aria-label","disabled"],Lr=r.defineComponent({name:"DCodeClearButton",__name:"DCodeClearButton",props:{disabled:{type:Boolean,default:!1},size:{default:"md"},ariaLabel:{default:"Clear input"}},emits:["clear"],setup(e,{emit:t}){const n=t,o=i=>{n("clear",i)};return(i,s)=>(r.openBlock(),r.createElementBlock("button",{type:"button",tabindex:"-1","aria-label":e.ariaLabel,disabled:e.disabled,class:r.normalizeClass(["shrink-0 flex items-center justify-center rounded-md text-gray-400 hover:text-gray-600 dark:hover:text-gray-200 hover:bg-gray-100 dark:hover:bg-neutral-700/50 active:scale-95 transition-all focus:outline-none disabled:opacity-40 disabled:pointer-events-none",e.size==="sm"?"w-6 h-6 p-0.5":"w-7 h-7 p-1"]),onMousedown:s[0]||(s[0]=r.withModifiers(()=>{},["prevent"])),onClick:r.withModifiers(o,["stop"])},[r.createVNode(r.unref(Ae.X),{class:r.normalizeClass(e.size==="sm"?"w-3.5 h-3.5":"w-4 h-4"),"stroke-width":"3"},null,8,["class"])],42,TI))}});var BI={symbol:"$",separator:",",decimal:".",errorOnInvalid:!1,precision:2,pattern:"!#",negativePattern:"-!#",format:MI,fromCents:!1},K1=function(t){return Math.round(t)},Yb=function(t){return Math.pow(10,t)},PI=function(t,n){return K1(t/n)*n},NI=/(\d)(?=(\d{3})+\b)/g,DI=/(\d)(?=(\d\d)+\d\b)/g;function rn(e,t){var n=this;if(!(n instanceof rn))return new rn(e,t);var o=Object.assign({},BI,t),i=Yb(o.precision),s=Am(e,o);n.intValue=s,n.value=s/i,o.increment=o.increment||1/i,o.useVedic?o.groups=DI:o.groups=NI,this.s=o,this.p=i}function Am(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=0,i=t.decimal,s=t.errorOnInvalid,a=t.precision,l=t.fromCents,c=Yb(a),d=typeof e=="number",f=e instanceof rn;if(f&&l)return e.intValue;if(d||f)o=f?e.value:e;else if(typeof e=="string"){var h=new RegExp("[^-\\d"+i+"]","g"),p=new RegExp("\\"+i,"g");o=e.replace(/\((.*)\)/,"-$1").replace(h,"").replace(p,"."),o=o||0}else{if(s)throw Error("Invalid Input");o=0}return l||(o*=c,o=o.toFixed(4)),n?K1(o):o}function MI(e,t){var n=t.pattern,o=t.negativePattern,i=t.symbol,s=t.separator,a=t.decimal,l=t.groups,c=(""+e).replace(/^-/,"").split("."),d=c[0],f=c[1];return(e.value>=0?n:o).replace("!",i).replace("#",d.replace(l,"$1"+s)+(f?a+f:""))}rn.prototype={add:function(t){var n=this.intValue,o=this.s,i=this.p;return rn((n+=Am(t,o))/(o.fromCents?1:i),o)},subtract:function(t){var n=this.intValue,o=this.s,i=this.p;return rn((n-=Am(t,o))/(o.fromCents?1:i),o)},multiply:function(t){var n=this.intValue,o=this.s;return rn((n*=t)/(o.fromCents?1:Yb(o.precision)),o)},divide:function(t){var n=this.intValue,o=this.s;return rn(n/=Am(t,o,!1),o)},distribute:function(t){for(var n=this.intValue,o=this.p,i=this.s,s=[],a=Math[n>=0?"floor":"ceil"](n/t),l=Math.abs(n-a*t),c=i.fromCents?1:o;t!==0;t--){var d=rn(a/c,i);l-- >0&&(d=d[n>=0?"add":"subtract"](1/c)),s.push(d)}return s},dollars:function(){return~~this.value},cents:function(){var t=this.intValue,n=this.p;return~~(t%n)},format:function(t){var n=this.s;return typeof t=="function"?t(this,n):n.format(this,Object.assign({},n,t))},toString:function(){var t=this.intValue,n=this.p,o=this.s;return PI(t/n,o.increment).toFixed(o.precision)},toJSON:function(){return this.value}};const RI=e=>new Intl.NumberFormat("id-ID",{style:"currency",currency:"IDR",minimumFractionDigits:0,maximumFractionDigits:0}).format(e),Zb=(e,t="IDR")=>{const n=Number(e);if(isNaN(n))return"-";switch(t.toUpperCase()){case"USD":return rn(n,{symbol:"$",separator:",",decimal:".",precision:2}).format();case"EUR":return rn(n,{symbol:"€",separator:".",decimal:",",precision:2}).format();case"IDR":return rn(n,{symbol:"Rp",separator:".",decimal:",",precision:0}).format();case"JPY":return rn(n,{symbol:"¥",separator:",",decimal:".",precision:0}).format();case"GBP":return rn(n,{symbol:"£",separator:",",decimal:".",precision:2}).format();case"CNY":return rn(n,{symbol:"¥",separator:",",decimal:".",precision:2}).format();case"KRW":return rn(n,{symbol:"₩",separator:",",decimal:".",precision:0}).format();case"SGD":return rn(n,{symbol:"$",separator:",",decimal:".",precision:2}).format();case"AUD":return rn(n,{symbol:"$",separator:",",decimal:".",precision:2}).format();case"CAD":return rn(n,{symbol:"$",separator:",",decimal:".",precision:2}).format();case"CHF":return rn(n,{symbol:"Fr",separator:",",decimal:".",precision:2}).format();case"NZD":return rn(n,{symbol:"$",separator:",",decimal:".",precision:2}).format();case"SEK":return rn(n,{symbol:"kr",separator:",",decimal:".",precision:2}).format();case"NOK":return rn(n,{symbol:"kr",separator:",",decimal:".",precision:2}).format();case"DKK":return rn(n,{symbol:"kr",separator:",",decimal:".",precision:2}).format();case"BRL":return rn(n,{symbol:"R$",separator:",",decimal:".",precision:2}).format();case"INR":return rn(n,{symbol:"₹",separator:",",decimal:".",precision:2}).format();case"TRY":return rn(n,{symbol:"₺",separator:",",decimal:".",precision:2}).format();case"ZAR":return rn(n,{symbol:"R",separator:",",decimal:".",precision:2}).format();case"RUB":return rn(n,{symbol:"₽",separator:",",decimal:".",precision:2}).format();case"PLN":return rn(n,{symbol:"zł",separator:",",decimal:".",precision:2}).format();case"HUF":return rn(n,{symbol:"Ft",separator:",",decimal:".",precision:2}).format();case"CZK":return rn(n,{symbol:"Kč",separator:",",decimal:".",precision:2}).format();case"THB":return rn(n,{symbol:"฿",separator:",",decimal:".",precision:2}).format();case"MYR":return rn(n,{symbol:"RM",separator:",",decimal:".",precision:2}).format();case"PHP":return rn(n,{symbol:"₱",separator:",",decimal:".",precision:2}).format();case"VND":return rn(n,{symbol:"₫",separator:",",decimal:".",precision:2}).format();default:return rn(n).format()}},nd=(e,t="short",n="id-ID")=>{let o;if(e instanceof Date)o=e;else if(Array.isArray(e)){const[c,d,f,h=0,p=0,g=0]=e;o=new Date(c,d-1,f,h,p,g)}else if(typeof e=="string"||typeof e=="number")o=new Date(e);else return"-";if(isNaN(o.getTime()))return"-";const i=c=>String(c).padStart(2,"0"),s=c=>`${i(c.getHours())}:${i(c.getMinutes())}:${i(c.getSeconds())}`,l={id:"id-ID",en:"en-GB"}[n]||n;return t==="time"?s(o):t==="datetime"?new Intl.DateTimeFormat(l,{day:"2-digit",month:"long",year:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(o):t==="long"?new Intl.DateTimeFormat(l,{day:"2-digit",month:"long",year:"numeric",hour:"2-digit",minute:"2-digit"}).format(o):new Intl.DateTimeFormat(l,{day:"2-digit",month:"short",year:"numeric"}).format(o)},II=(e,t)=>{let n;if(e instanceof Date)n=e;else if(typeof e=="string"||typeof e=="number")n=new Date(e);else return"-";if(isNaN(n.getTime()))return"-";const o=p=>p.toString().padStart(2,"0"),i=n.getDate(),s=n.getMonth()+1,a=n.getFullYear(),l=o(n.getHours()),c=o(n.getMinutes()),d=o(n.getSeconds()),f=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];return{"DD-MM-YYYY":`${o(i)}-${o(s)}-${a}`,"DD MMM YYYY":`${o(i)} ${f[s-1]} ${a}`,"YYYY-MM-DD":`${a}-${o(s)}-${o(i)}`,"MM/DD/YYYY":`${o(s)}/${o(i)}/${a}`,"DD/MM/YYYY":`${o(i)}/${o(s)}/${a}`,"DD-MMM-YYYY":`${o(i)}-${f[s-1]}-${a}`,"DD-MM-YYYY HH:mm":`${o(i)}-${o(s)}-${a} ${l}:${c}`,"DD MMM YYYY HH:mm":`${o(i)} ${f[s-1]} ${a} ${l}:${c}`,"YYYY-MM-DD HH:mm":`${a}-${o(s)}-${o(i)} ${l}:${c}`,"YYYY-MM-DD HH:mm:ss":`${a}-${o(s)}-${o(i)} ${l}:${c}:${d}`}[t]||nd(e,"long")},OI=(e,t)=>{let n;return(...o)=>{clearTimeout(n),n=setTimeout(()=>e(...o),t)}},LI=e=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e),FI=e=>new Promise((t,n)=>{const o=document.createElement("textarea");o.value=e,o.style.top="0",o.style.left="0",o.style.position="fixed",document.body.appendChild(o),o.focus(),o.select();try{document.execCommand("copy")?t():n(new Error("Copy command was unsuccessful"))}catch(i){n(i)}finally{document.body.removeChild(o)}}),$I=async e=>navigator.clipboard&&window.isSecureContext?navigator.clipboard.writeText(e):FI(e),zI={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl","2xl":"rounded-2xl","3xl":"rounded-3xl",full:"rounded-full"},sn=e=>e?e.startsWith("rounded")?e:zI[e]||`rounded-${e}`:"",Zn=e=>{switch(e){case"sm":return"h-8 px-2.5 text-sm";case"lg":return"h-11 px-3.5 text-base";default:return"h-10 px-3 text-sm"}},Ti=(e,t)=>{if(!e)return null;if(t[e])return t[e];const n=e.split(/[-_]/).map(o=>o.charAt(0).toUpperCase()+o.slice(1).toLowerCase()).join("");return t[n]||null},G1={"mdi-view-dashboard":"LayoutDashboard","mdi-dashboard":"LayoutDashboard","mdi-account-group":"Users","mdi-account-multiple":"Users","mdi-account":"User","mdi-account-cog":"UserCog","mdi-account-star":"UserStar","mdi-square-rounded-badge-outline":"Badge","mdi-robot-happy-outline":"Bot","mdi-poll":"Vote","mdi-monitor-eye":"MonitorCheck","mdi-file-excel-outline":"FileSpreadsheet","mdi-book-settings-outline":"BookOpenCheck","mdi-airplane-check":"PlaneTakeoff","mdi-scoreboard-outline":"Trophy","mdi-playlist-check":"ListChecks","mdi-page-layout-sidebar-left":"PanelLeft"},jI=e=>e.split(/[-_]/).filter(Boolean).map(t=>t.charAt(0).toUpperCase()+t.slice(1).toLowerCase()).join(""),UI=(e,t)=>{if(!e)return null;const n=e.trim().replace(/^(mdi-light|mdi|fa|fas|far)\s+/,""),o=G1[n]||G1[n.replace(/-outline$/,"")];if(o&&t[o])return t[o];const i=Ti(n,t);if(i)return i;const s=jI(n.replace(/^mdi-/,"").replace(/-outline$/,""));return t[s]||t[`${s}Icon`]||null},WI=["aria-busy"],HI=["for"],qI={key:0,class:"ml-1 text-destructive"},KI={class:"relative w-full flex-1"},GI={key:0,class:"flex items-center self-stretch px-3 bg-gray-50 dark:bg-neutral-800 border-r border-gray-300 dark:border-gray-700 flex-shrink-0"},YI={class:"text-sm font-semibold text-gray-500 dark:text-gray-400 whitespace-nowrap select-none"},ZI={key:1,class:"flex items-center text-gray-500 gap-2 pl-3"},XI=["id","placeholder","disabled","readonly","value"],JI={class:"flex items-center"},QI={key:0,class:"h-5 w-5 animate-spin text-gray-500",viewBox:"0 0 24 24",fill:"none"},VI=["disabled"],eO={key:2,class:"flex items-center self-stretch px-3 bg-gray-50 dark:bg-neutral-800 border-l border-gray-300 dark:border-gray-700 flex-shrink-0"},tO={class:"text-sm font-semibold text-gray-500 dark:text-gray-400 whitespace-nowrap select-none"},nO=["aria-selected","onMouseenter","onClick"],oO={key:0},rO={key:0,class:"px-3 py-2 text-xs text-center text-gray-400 dark:text-gray-500 flex items-center justify-center gap-2 border-t border-gray-100 dark:border-neutral-700/50"},iO={class:"px-3 py-2 text-sm text-gray-500 dark:text-gray-400 h-10 flex items-center"},sO={key:0},aO={key:1},lO={key:2},cO={key:0,class:"mt-1 text-xs text-red-600"},zu=r.defineComponent({name:"DCodeAutoComplete",inheritAttrs:!1,__name:"DCodeAutoComplete",props:{modelValue:{},label:{default:""},placeholder:{},clearable:{type:Boolean,default:!1},required:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},visible:{type:Boolean,default:!0},skeleton:{type:Boolean,default:!1},error:{default:null},apiOptions:{},apiModule:{},apiAction:{},autoFetchOnOpen:{type:Boolean,default:!0},autoFetchOnMount:{type:Boolean,default:!1},itemTitle:{type:[String,Function],default:"name"},itemValue:{type:[String,Function],default:"id"},options:{},items:{},returnObject:{type:Boolean,default:!1},endpoint:{},apiParams:{default:()=>({})},fetchItems:{},icon:{},openOnFocus:{type:Boolean,default:!1},pageSize:{default:20},threshold:{default:100},searchParamName:{default:"keyword"},debounceMs:{default:300},labelPosition:{default:"top"},labelWidth:{default:"150px"},prefix:{},suffix:{},size:{default:"default"},rounded:{default:"lg"},searchable:{type:Boolean,default:!0}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,o=t,i=r.useAttrs(),s=r.computed(()=>i.label??n.label),a=Se=>{const Ie=i[Se];return Ie===""||Ie===!0||Ie==="true"||Ie===1||Ie==="1"},l=r.ref(!1),c=r.computed(()=>n.itemTitle||i["item-title"]||i.itemTitle||"name"),d=r.computed(()=>n.itemValue||i["item-value"]||i.itemValue||"id"),f=r.computed(()=>n.disabled),h=r.computed(()=>a("required")||n.required),p=r.computed(()=>n.readonly||a("readonly")),g=r.computed(()=>{const Se=n.searchable===void 0?i.searchable:n.searchable;return Se==null?!0:Se!==!1&&Se!=="false"&&Se!=="0"&&Se!==0}),y=r.computed(()=>`${Zn(n.size)} ${sn(n.rounded)}`),b=r.computed(()=>n.returnObject||a("return-object")||a("returnObject")),_=r.computed(()=>h.value||a("aria-required")),x=r.computed(()=>n.error||i["error-message"]),B=r.computed(()=>n.placeholder??i.placeholder??""),R=r.computed(()=>{const Se=i.minChars??i["min-chars"];if(Se==null||Se==="")return 0;const Ie=typeof Se=="number"?Se:Number.parseInt(String(Se),10);return Number.isFinite(Ie)&&Ie>0?Ie:0}),S=r.computed(()=>{const Se=i.rules;return Array.isArray(Se)?Se:[]}),O=r.computed(()=>{const Se=i.id||i.label;return Se?`app-autocomplete-${Se}-${Math.random().toString(36).slice(2,7)}`:void 0}),I=r.ref(n.modelValue),{DCodeApi:D}=r.inject("externalApi")||{},w=r.ref([]),E=r.ref([]),F=Se=>{E.value=[...E.value,...Se].filter((Ie,Je,wt)=>wt.findIndex(gt=>se(gt)===se(Ie))===Je)},A=r.ref(!1),P=r.ref(!1),q=r.ref(1),Q=r.ref(!0),re=r.ref(0),ie=r.ref(),le=r.computed(()=>n.options||n.items||i.items||i.options),X=r.computed(()=>{const Se=k.value;return!!(Se.apiModule&&Se.apiAction||Se.apiUrl||n.fetchItems)}),K=r.ref(""),W=Se=>{if(Se==null)return"";if(typeof Se=="string"||typeof Se=="number")return String(Se);const Ie=c.value;return typeof Ie=="function"?Ie(Se):Se?.[Ie]??Se?.name??Se?.nama??Se?.label??Se?.title??"-"},se=Se=>{if(Se==null)return null;if(typeof Se=="string"||typeof Se=="number")return Se;const Ie=d.value;return typeof Ie=="function"?Ie(Se):Se?.[Ie]??Se?.id??Se?.value??Se?.code??null},H=r.computed(()=>{const Se=I.value;if(Se==null||Se==="")return"";const Ie=(gt,Re)=>{if(gt==null||Re==null)return!1;const Le=se(Re),ve=Re?.id,Ne=Re?.code,Ge=W(Re);return String(gt)===String(Le)||ve!=null&&String(gt)===String(ve)||Ne!=null&&String(gt)===String(Ne)||Ge!=null&&String(gt)===String(Ge)},Je=[...E.value||[],...le.value||[]];if(Array.isArray(Se))return Se.length?Se.map(Re=>{if(b.value&&typeof Re=="object"||typeof Re=="object")return W(Re);const Le=Je.find(ve=>Ie(Re,ve));return Le?W(Le):String(Re)}).join(", "):"";if(typeof Se=="object")return W(Se);const wt=Je.find(gt=>Ie(Se,gt));return wt?W(wt):String(Se)}),N=r.computed(()=>{const Se=le.value??[],Ie=(K.value||"").trim();return X.value&&g.value&&!!Ie&&Ie.toLowerCase()!==(H.value||"").toLowerCase()?w.value:Se.length>0?Se:X.value&&(w.value.length>0||P.value)?w.value:Se}),j=r.computed(()=>!!i.loading),Y=r.computed(()=>j.value||A.value),J=r.computed(()=>{const{label:Se,items:Ie,options:Je,loading:wt,rules:gt,"item-title":Re,"item-value":Le,itemTitle:ve,itemValue:Ne,minChars:Ge,"min-chars":pt,clearable:Tt,required:At,"aria-required":rt,disabled:ht,readonly:Nt,visible:wn,"return-object":qn,returnObject:Ro,class:kt,"fetch-items":Mr,fetchItems:Ea,error:jn,errorMessage:Zi,"error-message":Al,...lr}=i||{};return lr}),U=()=>{if(n.apiOptions)return typeof n.apiOptions=="function"?n.apiOptions():n.apiOptions},k=r.computed(()=>{const Se=n.endpoint||{};return{apiModule:n.apiModule||Se.apiModule,apiAction:n.apiAction||Se.apiAction,apiUrl:Se.apiUrl,apiMethod:Se.apiMethod||"GET"}}),C=r.ref(null),T=r.ref(null),M=r.ref(null),{floatingStyles:$,update:ne}=td(T,M,{placement:"bottom-start",whileElementsMounted:Jc,middleware:[Qc(4),ed({padding:8,rootBoundary:"viewport",altBoundary:!0}),Vc({padding:8}),Sm({padding:5,apply({rects:Se,elements:Ie,availableHeight:Je}){Object.assign(Ie.floating.style,{width:`${Se.reference.width}px`,maxHeight:`${Je}px`})}})]});r.watch(N,()=>{te.value&&setTimeout(()=>{ne()},0)});const te=r.ref(!1),ce=r.ref(-1),ke=r.ref(null),we=r.computed(()=>!R.value||(K.value||"").trim().length>=R.value?"":`Ketik minimal ${R.value} karakter`),_e=r.computed(()=>{const Se=N.value||[],Ie=(K.value||"").trim().toLowerCase(),Je=(H.value||"").toLowerCase(),wt=!Ie||Ie===Je;let gt=Se;if(!wt&&!X.value&&g.value&&(gt=Se.filter(Re=>W(Re).toLowerCase().includes(Ie))),gt.length>0){const Re=Le=>{const ve=se(Le);return Array.isArray(I.value)?I.value.some(Ne=>Ne==ve):I.value==ve};gt=[...gt].sort((Le,ve)=>{const Ne=Re(Le),Ge=Re(ve);return Ne&&!Ge?-1:!Ne&&Ge?1:0})}return gt}),fe=Se=>Array.isArray(Se)?Se.length===0:Se==null||Se==="",de=Se=>{if(ke.value=null,h.value&&fe(Se)&&!S.value.length)return ke.value="This field is required",!1;for(const Ie of S.value){const Je=Ie(Se);if(Je===!1)return ke.value="Invalid value",!1;if(typeof Je=="string")return ke.value=Je,!1}return!0},Z=async()=>{if(f.value||p.value)return;te.value=!0,ce.value=_e.value.length?0:-1,K.value=H.value||"";const Se=k.value,Ie=Se.apiModule&&Se.apiAction||Se.apiUrl||n.fetchItems;n.autoFetchOnOpen&&Ie&&(await Ue(!0),ce.value=_e.value.length?0:-1)},ee=()=>{te.value=!1,ce.value=-1,K.value=H.value||""},pe=Se=>{const Ie=b.value?Se:se(Se);let Je=Ie;const wt=a("multiple");Array.isArray(I.value)&&wt&&(Je=[Ie]),I.value=Je,o("update:modelValue",Je),ke.value=null,de(Je),K.value=W(Se),ee()},Be=(Se=!0)=>{w.value=[],P.value=!1,q.value=1,Q.value=!0,Se&&(I.value=Array.isArray(I.value)?[]:null,o("update:modelValue",I.value),K.value=""),ke.value=null},Te=()=>{l.value=!0,Be(),ee(),setTimeout(()=>{l.value=!1},0)},Oe=Se=>{if(f.value||p.value||!g.value)return;K.value=Se.target.value,ke.value&&(ke.value=null),te.value||(te.value=!0),ce.value=_e.value.length?0:-1,(k.value.apiModule&&k.value.apiAction||k.value.apiUrl||n.fetchItems)&&(ie.value&&clearTimeout(ie.value),ie.value=setTimeout(()=>{Ue(!0)},n.debounceMs??300))},Fe=Se=>{if(f.value||p.value)return;({ArrowDown:()=>{if(Se.preventDefault(),!te.value){Z();return}_e.value.length&&(ce.value=Math.min(ce.value+1,_e.value.length-1))},ArrowUp:()=>{!te.value||!_e.value.length||(Se.preventDefault(),ce.value=Math.max(ce.value-1,0))},Enter:()=>{if(!te.value)return;Se.preventDefault();const Je=_e.value[ce.value];Je&&pe(Je)},Escape:()=>{Se.preventDefault(),ee()},Tab:()=>{ee()}})[Se.key]?.()},Ue=async(Se=!0)=>{const Ie=k.value;if(!(Ie.apiModule&&Ie.apiAction||Ie.apiUrl||n.fetchItems)||(Se&&(q.value=1,Q.value=!0),!Q.value||A.value))return;A.value=!0;const wt=++re.value;try{let gt;const Re=n.pageSize??20,ve=!K.value||K.value===H.value?"":K.value.trim();if(n.fetchItems){const Ge=U()||{},pt={page:Se?1:q.value,perPage:Re,search:ve,[n.searchParamName??"keyword"]:ve,...Ge,...n.apiParams},Tt=await n.fetchItems(pt),At=Tt?.data??Tt;gt=At?.data??At}else{if(typeof D!="function"){console.error("[DCodeAutoComplete] useApi() must expose DCodeApi()");return}const Ge=U()||{},pt={page:Se?1:q.value,perPage:Re,[n.searchParamName??"keyword"]:ve,...Ge,...n.apiParams};let Tt;Ie.apiUrl?Tt=await D("","",pt,{_url:Ie.apiUrl,_method:Ie.apiMethod||"POST"}):Tt=await D(Ie.apiModule,Ie.apiAction,pt);const At=Tt?.data??Tt;gt=At?.data??At}if(wt!==re.value)return;const Ne=Array.isArray(gt)?gt:[];F(Ne),Se?(w.value=Ne,q.value=2):(w.value=[...w.value,...Ne],q.value++),Q.value=Ne.length>=Re,P.value=!0}catch(gt){console.error("[DCodeAutoComplete][fetchOptions] ERROR:",gt),ke.value=`[DCodeAutoComplete][fetchOptions] ERROR: Error: ${gt?.message||gt?.toString()||"Failed to load options"}`,Se&&(w.value=[]),P.value=!0}finally{A.value=!1}},Qe=Se=>{if(!Q.value||A.value)return;const Ie=Se.target,{scrollTop:Je,scrollHeight:wt,clientHeight:gt}=Ie;Je+gt>=wt-(n.threshold??100)&&Ue(!1)},Ve=Se=>{const Ie=se(Se),Je=Se?.id,wt=Se?.code,gt=W(Se),Re=Le=>Le==null?!1:String(Le)===String(Ie)||Je!=null&&String(Le)===String(Je)||wt!=null&&String(Le)===String(wt)||gt!=null&&String(Le)===String(gt);return b.value?I.value?Array.isArray(I.value)?I.value.some(Le=>Re(Le)):Re(I.value):!1:Array.isArray(I.value)?I.value.some(Le=>Re(Le)):Re(I.value)};r.watch(()=>[U(),k.value,n.apiParams],([Se,Ie,Je],[wt,gt,Re])=>{const Le=k.value;if(!(Le.apiModule&&Le.apiAction||Le.apiUrl||n.fetchItems)){(!le.value||le.value.length===0)&&Be();return}const Ne=JSON.stringify(Se??null)===JSON.stringify(wt??null),Ge=JSON.stringify(Je??null)===JSON.stringify(Re??null);if(Ne&&Ge)return;const pt=P.value&&Je!=null;Be(pt),!Ge&&Je!=null&&Ue()},{deep:!0}),r.watch(()=>n.modelValue,(Se,Ie)=>{I.value=Se,!l.value&&(Se==null||Se==="")&&Ie!=null&&n.apiModule&&n.apiAction&&(w.value=[],P.value=!1),K.value=H.value||""},{immediate:!0}),r.watch(()=>[N.value,I.value],([Se,Ie])=>{if(!Se||Se.length===0||Ie==null||Ie==="")return;let Je=!1,wt=Ie;const gt=Re=>{const Le=Se.find(ve=>{const Ne=se(ve),Ge=ve?.id,pt=ve?.code,Tt=W(ve);return String(Re)===String(Ne)||Ge!=null&&String(Re)===String(Ge)||pt!=null&&String(Re)===String(pt)||Tt!=null&&String(Re)===String(Tt)});if(Le){const ve=b.value?Le:se(Le);if(String(Re)!==String(ve)&&typeof Re!="object")return{updated:!0,value:ve}}return{updated:!1,value:Re}};if(Array.isArray(Ie)){const Re=Ie.map(Le=>gt(Le));Re.some(Le=>Le.updated)&&(Je=!0,wt=Re.map(Le=>Le.value))}else{const Re=gt(Ie);Re.updated&&(Je=!0,wt=Re.value)}Je&&(I.value=wt,o("update:modelValue",wt),setTimeout(()=>{K.value=H.value||""},0))},{immediate:!0,deep:!0});const Xe=k.value;(Xe.apiModule&&Xe.apiAction||Xe.apiUrl||n.fetchItems)&&(n.autoFetchOnMount||!fe(n.modelValue))&&Ue();const Ce=Se=>{const Ie=C.value,Je=M.value,wt=Se.target;Ie&&Ie.contains(wt)||Je&&Je.contains(wt)||te.value&&ee()},Pe=r.computed(()=>{const Se=n.modelValue;return Se==null?!1:typeof Se=="string"?Se.trim().length>0:Array.isArray(Se)?Se.length>0:typeof Se=="object"?Object.keys(Se).length>0:!0}),qe=r.computed(()=>!!n.clearable&&Pe.value&&!n.disabled);return r.onMounted(()=>{document.addEventListener("mousedown",Ce)}),r.onBeforeUnmount(()=>{document.removeEventListener("mousedown",Ce),ie.value&&clearTimeout(ie.value)}),(Se,Ie)=>r.withDirectives((r.openBlock(),r.createElementBlock("div",{ref_key:"rootEl",ref:C,class:r.normalizeClass(["flex flex-col gap-1 w-full",[r.unref(i).class,f.value?"cursor-not-allowed":""]]),"aria-busy":e.skeleton},[e.skeleton?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(["flex flex-1 w-full",[n.labelPosition==="left"?"flex-row items-center gap-3":"",n.labelPosition==="right"?"flex-row-reverse items-center gap-3":"",n.labelPosition==="top"?"flex-col gap-1":"",n.labelPosition==="bottom"?"flex-col-reverse gap-1":""]])},[s.value?(r.openBlock(),r.createElementBlock("div",{key:0,class:"h-4 rounded bg-gray-200 dark:bg-gray-700 animate-shimmer shrink-0",style:r.normalizeStyle(n.labelPosition==="left"||n.labelPosition==="right"?{width:n.labelWidth}:{width:"8rem"})},null,4)):r.createCommentVNode("",!0),r.createElementVNode("div",{class:r.normalizeClass(["w-full flex-1 bg-gray-200 dark:bg-gray-700 animate-shimmer",[r.unref(Zn)(n.size),r.unref(sn)(n.rounded)]])},null,2)],2)):(r.openBlock(),r.createElementBlock(r.Fragment,{key:1},[r.createElementVNode("div",{class:r.normalizeClass(["flex flex-1 w-full",[n.labelPosition==="left"?"flex-row items-center gap-3":"",n.labelPosition==="right"?"flex-row-reverse items-center gap-3":"",n.labelPosition==="top"?"flex-col gap-1":"",n.labelPosition==="bottom"?"flex-col-reverse gap-1":""]])},[s.value?(r.openBlock(),r.createElementBlock("label",{key:0,for:O.value,class:"text-sm font-medium shrink-0",style:r.normalizeStyle(n.labelPosition==="left"||n.labelPosition==="right"?{width:n.labelWidth}:{})},[r.createTextVNode(r.toDisplayString(s.value)+" ",1),_.value?(r.openBlock(),r.createElementBlock("span",qI,"*")):r.createCommentVNode("",!0)],12,HI)):r.createCommentVNode("",!0),r.createElementVNode("div",KI,[r.createElementVNode("div",{ref_key:"reference",ref:T,class:r.normalizeClass(["flex items-center w-full gap-2 border bg-white dark:bg-neutral-800 border-gray-300 dark:border-neutral-700/50 focus-within:ring-1 focus-within:ring-gray-700 dark:focus-within:ring-gray-300",y.value,f.value||p.value?"opacity-60 cursor-not-allowed":"",g.value?"":"cursor-pointer",ke.value||x.value?"border-red-500 focus-within:ring-red-500":""])},[n.prefix?(r.openBlock(),r.createElementBlock("div",GI,[r.createElementVNode("span",YI,r.toDisplayString(n.prefix),1)])):r.createCommentVNode("",!0),n.icon||Se.$slots["prepend-inner"]?(r.openBlock(),r.createElementBlock("div",ZI,[r.renderSlot(Se.$slots,"prepend-inner",{},()=>[n.icon?(r.openBlock(),r.createBlock(r.resolveDynamicComponent(n.icon),{key:0,class:"h-4 w-4"})):r.createCommentVNode("",!0)])])):r.createCommentVNode("",!0),r.createElementVNode("input",r.mergeProps(J.value,{id:O.value,type:"text",class:["flex-1 min-w-0 h-full bg-transparent outline-none text-sm text-gray-900 dark:text-gray-100 placeholder:text-gray-400",f.value||p.value?"cursor-not-allowed":g.value?"cursor-text":"cursor-pointer"],placeholder:B.value,disabled:f.value,readonly:p.value||!g.value,value:te.value?K.value:H.value||K.value,onFocus:Ie[0]||(Ie[0]=()=>{n.openOnFocus&&!te.value&&Z()}),onClick:Ie[1]||(Ie[1]=()=>{te.value?g.value||ee():Z()}),onInput:Oe,onKeydown:Fe,onBlur:Ie[2]||(Ie[2]=()=>de(I.value))}),null,16,XI),r.createElementVNode("div",JI,[Y.value?(r.openBlock(),r.createElementBlock("svg",QI,[...Ie[5]||(Ie[5]=[r.createElementVNode("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"},null,-1),r.createElementVNode("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8v4a4 4 0 00-4 4H4z"},null,-1)])])):qe.value?(r.openBlock(),r.createBlock(Lr,{key:1,disabled:f.value||p.value,onClear:Te},null,8,["disabled"])):(r.openBlock(),r.createElementBlock("button",{key:2,type:"button",class:"p-1.5 text-gray-500 hover:text-gray-700 dark:hover:text-gray-300 disabled:opacity-50 disabled:cursor-not-allowed transition-colors",disabled:f.value||p.value,onClick:Ie[3]||(Ie[3]=Je=>te.value?ee():Z()),"aria-label":"Toggle"},[r.createVNode(r.unref(Ae.ChevronDown),{class:r.normalizeClass(["h-4 w-4 transition-transform duration-200 ease-in-out",{"rotate-180":te.value}])},null,8,["class"])],8,VI))]),n.suffix?(r.openBlock(),r.createElementBlock("div",eO,[r.createElementVNode("span",tO,r.toDisplayString(n.suffix),1)])):r.createCommentVNode("",!0)],2),(r.openBlock(),r.createBlock(r.Teleport,{to:"body"},[te.value?(r.openBlock(),r.createElementBlock("div",{key:0,ref_key:"floating",ref:M,style:r.normalizeStyle(r.unref($)),role:"listbox","data-dcode-floating":"true",class:"z-[9999] pointer-events-auto overflow-hidden rounded-lg border bg-white shadow-lg border-gray-200 dark:border-neutral-700/50 dark:bg-neutral-800"},[r.createElementVNode("div",{class:"overflow-y-auto overflow-x-hidden",style:{"max-height":"350px"},onScroll:Qe},[_e.value.length?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(_e.value,(Je,wt)=>(r.openBlock(),r.createElementBlock("button",{key:se(Je)??wt,type:"button",role:"option","aria-selected":Ve(Je),class:r.normalizeClass(["w-full flex justify-between text-left px-3 py-2 text-sm hover:bg-neutral-100 dark:hover:bg-neutral-800",wt===ce.value?"bg-neutral-100 dark:bg-neutral-800":""]),onMouseenter:gt=>ce.value=wt,onMousedown:Ie[4]||(Ie[4]=r.withModifiers(()=>{},["prevent"])),onClick:r.withModifiers(gt=>pe(Je),["stop"])},[r.renderSlot(Se.$slots,"option",{option:Je,selected:Ve(Je),index:wt},()=>[r.createTextVNode(r.toDisplayString(W(Je)),1)]),Ve(Je)?(r.openBlock(),r.createElementBlock("span",oO,[r.createVNode(r.unref(Ae.Check),{class:"h-4 w-4"})])):r.createCommentVNode("",!0)],42,nO))),128)),A.value?(r.openBlock(),r.createElementBlock("div",rO,[...Ie[6]||(Ie[6]=[r.createElementVNode("svg",{class:"h-4 w-4 animate-spin text-gray-400",viewBox:"0 0 24 24",fill:"none"},[r.createElementVNode("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}),r.createElementVNode("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8v4a4 4 0 00-4 4H4z"})],-1),r.createElementVNode("span",null,"Loading more…",-1)])])):r.createCommentVNode("",!0)],64)):r.renderSlot(Se.$slots,"no-data",{},()=>[r.createElementVNode("div",iO,[Y.value?(r.openBlock(),r.createElementBlock("span",sO,"Loading data…")):we.value?(r.openBlock(),r.createElementBlock("span",aO,r.toDisplayString(we.value),1)):(r.openBlock(),r.createElementBlock("span",lO,"No data available"))])],void 0,1)],32)],4)):r.createCommentVNode("",!0)]))])],2),ke.value||x.value?(r.openBlock(),r.createElementBlock("p",cO,r.toDisplayString(ke.value||x.value),1)):r.createCommentVNode("",!0)],64))],10,WI)),[[r.vShow,e.visible]])}}),dO=["aria-busy"],uO={key:0,class:"mb-1 h-4 w-32 rounded bg-gray-200 dark:bg-gray-700 animate-pulse"},fO=["for"],hO={key:0,class:"ml-1 text-destructive"},mO={class:"relative"},pO={key:0,class:"flex items-center text-gray-500 gap-2"},gO=["id","placeholder","disabled","readonly","value"],bO={key:1,class:"h-6 w-6 animate-spin text-gray-500",viewBox:"0 0 24 24",fill:"none"},yO=["disabled"],vO={key:0,class:"px-3 py-2 text-sm text-gray-500 dark:text-gray-400"},wO=["onMouseenter","onClick"],kO={class:"flex items-center space-x-3"},_O={class:"flex-1"},xO={class:"text-sm font-medium text-gray-900 dark:text-gray-100"},EO={key:0,class:"text-xs text-gray-500 dark:text-gray-400"},CO={key:0},SO={class:"text-[10px] text-gray-300 font-light select-none"},AO={key:3,class:"px-3 py-2 text-sm text-gray-500 dark:text-gray-400"},TO={key:1,class:"mt-1 text-xs text-red-600"},BO={key:2,class:"mt-1 text-xs text-gray-500"},Tm=r.defineComponent({name:"DCodeInfiniteAutoComplete",inheritAttrs:!1,__name:"DCodeInfiniteAutoComplete",props:{modelValue:{},label:{default:""},placeholder:{default:"Select an option"},clearable:{type:Boolean,default:!1},required:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},visible:{type:Boolean,default:!0},skeleton:{type:Boolean,default:!1},error:{default:null},apiModule:{},apiAction:{},apiOptions:{},autoFetchOnOpen:{type:Boolean,default:!0},refreshOnOpen:{type:Boolean,default:!1},autoFetchOnMount:{type:Boolean,default:!1},itemTitle:{type:[String,Function],default:"name"},itemValue:{type:[String,Function],default:"id"},itemSubtitle:{},returnObject:{type:Boolean,default:!1},endpoint:{},apiUrl:{},apiMethod:{},apiParams:{},fetchItems:{},icon:{},inputType:{default:"text"},helperText:{default:""},noResultsText:{default:"No data available"},loadingText:{default:"Loading data…"},pageSize:{default:7},searchParamName:{default:"keyword"},threshold:{default:100},debounceMs:{default:300},pageSizeParamName:{default:"perPage"},size:{default:"default"},rounded:{default:"lg"}},emits:["update:modelValue","focus","blur","select","search","load-more","end-of-results","error"],setup(e,{emit:t}){const n=e,o=t,i=r.useAttrs(),s=r.computed(()=>`${Zn(n.size)} ${sn(n.rounded)}`),a=r.ref(),l=r.ref(),c=r.ref(),d=r.ref(),f=r.ref(),h=r.computed(()=>{const T=n.label||n.placeholder;return T?`app-infinite-autocomplete-${T}-${Math.random().toString(36).slice(2,7)}`:void 0}),p=r.computed(()=>{const M=n.pageSize*36;return`${Math.min(M-4,300)}px`}),g=r.ref(""),y=r.ref([]),b=r.ref(!1),_=r.ref(!1),x=r.ref(-1),B=r.ref(1),R=r.ref(!0),S=r.ref(0),O=r.ref(!1),I=r.ref(""),D=r.inject("externalApi")||{},w=r.ref(0),E=r.ref(),F=r.ref(!1),{floatingStyles:A}=td(d,f,{placement:"bottom-start",whileElementsMounted:Jc,middleware:[Qc(4),ed({padding:5}),Vc({padding:5}),Sm({padding:5,apply({rects:T,elements:M}){Object.assign(M.floating.style,{width:`${T.reference.width}px`})}})]});r.computed(()=>({"opacity-50 pointer-events-none":n.disabled,relative:!0}));const P=r.computed(()=>!!n.error),q=r.computed(()=>y.value),Q=r.ref(""),re=()=>{_.value=!0},ie=()=>{_.value=!1},le=T=>typeof n.itemTitle=="function"?n.itemTitle(T):T[n.itemTitle]||"",X=T=>typeof n.itemValue=="function"?n.itemValue(T):T[n.itemValue]||T,K=T=>n.itemSubtitle?typeof n.itemSubtitle=="function"?n.itemSubtitle(T):T[n.itemSubtitle]||"":"",W=T=>{if(!n.modelValue)return!1;const M=X(T),$=T?.id,ne=T?.code,te=ce=>{if(ce==null)return!1;const ke=n.returnObject&&typeof ce=="object"&&ce!==null?X(ce):ce;return String(ke)===String(M)||$!=null&&String(ke)===String($)||ne!=null&&String(ke)===String(ne)};return Array.isArray(n.modelValue)?n.modelValue.some(ce=>te(ce)):te(n.modelValue)},se=T=>{const M=le(T);I.value=M,g.value=M,Q.value=M,o("update:modelValue",n.returnObject?T:X(T)),o("select",T),_.value=!1,O.value=!1},H=()=>{o("update:modelValue",null),g.value="",I.value="",Q.value="",_.value=!1,O.value=!1},N=()=>{if(n.disabled||n.readonly||_.value)return;_.value=!0;const T=I.value||"";g.value=T,Q.value=T,O.value=!0,n.autoFetchOnOpen&&!b.value&&C(!0,!0)},j=T=>{if(n.disabled||n.readonly)return;const M=_.value;if(_.value=!0,!M){const $=I.value||"";g.value=$,Q.value=$,O.value=!0,n.autoFetchOnOpen&&!b.value&&C(!0,!0)}o("focus",T)},Y=T=>{setTimeout(()=>{_.value=!1,O.value=!1,Q.value=I.value||"",g.value=I.value||"",o("blur",T)},200)},J=T=>{const M=T.target;O.value=!0,g.value=M.value,Q.value=M.value,_.value||(_.value=!0),E.value&&clearTimeout(E.value),E.value=setTimeout(()=>{o("search",g.value),B.value=1,R.value=!0,C(!0)},n.debounceMs)},U=T=>{if(_.value)switch(T.key){case"ArrowDown":T.preventDefault(),x.value=Math.min(x.value+1,q.value.length-1);break;case"ArrowUp":T.preventDefault(),x.value=Math.max(x.value-1,0);break;case"Enter":T.preventDefault(),x.value>=0&&q.value[x.value]&&se(q.value[x.value]);break;case"Escape":_.value=!1;break}},k=T=>{if(!R.value||b.value)return;const M=T.target,{scrollTop:$,scrollHeight:ne,clientHeight:te}=M;$+te>=ne-n.threshold&&C()},C=async(T=!1,M=!1)=>{if(b.value)return;b.value=!0;const $=++w.value;try{let ne=[];if(n.fetchItems)ne=await n.fetchItems();else if(D?.apiUrl){const te=n.endpoint||{},ce=te.apiModule||n.apiModule,ke=te.apiAction||n.apiAction,we=te.apiUrl||n.apiUrl,_e=te.apiMethod||n.apiMethod||"GET",fe={page:T?1:B.value,[n.pageSizeParamName]:n.pageSize,[n.searchParamName]:M?"":g.value,...n.apiParams};let de;if(we)de=await D.apiUrl(we,_e,fe,{_url:we,_method:_e});else{if(!ce||!ke)throw new Error("API module and action or apiUrl are required");de=await D.apiUrl(`/${ce}/${ke}`,_e,fe)}ne=de.data||de.items||de||[],S.value=de.total||de.totalItems||de.totalData||(Array.isArray(de)?de.length:0)}if($!==w.value)return;T?(y.value=ne,B.value=2):(y.value.push(...ne),B.value++),S.value>0?R.value=y.value.length<S.value:R.value=ne.length>=n.pageSize,R.value||o("end-of-results"),o("load-more",{items:ne,page:B.value,hasMore:R.value,total:S.value})}catch(ne){console.error("Error fetching items:",ne),o("error",ne)}finally{b.value=!1,F.value=!0}};return r.watch(()=>n.apiParams,(T,M)=>{if(JSON.stringify(T)===JSON.stringify(M))return;y.value=[],B.value=1,R.value=!0,F.value&&T!=null&&(o("update:modelValue",null),I.value="",g.value=""),T!=null&&C(!0)},{deep:!0}),r.onMounted(()=>{n.autoFetchOnMount&&C()}),r.onUnmounted(()=>{E.value&&clearTimeout(E.value)}),r.watch(()=>n.modelValue,T=>{if(!T){g.value="",I.value="",Q.value="";return}if(n.returnObject&&typeof T=="object"){const M=le(T);I.value=M,Q.value=M}else if(!I.value||!O.value){const M=y.value.find($=>X($)===T);if(M){const $=le(M);I.value=$,Q.value=$}}},{immediate:!0}),(T,M)=>r.withDirectives((r.openBlock(),r.createElementBlock("div",{ref_key:"rootEl",ref:c,class:r.normalizeClass(["w-full",r.unref(i).class]),"aria-busy":e.skeleton},[e.skeleton?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[e.label?(r.openBlock(),r.createElementBlock("div",uO)):r.createCommentVNode("",!0),r.createElementVNode("div",{class:r.normalizeClass(["w-full rounded-lg bg-gray-200 dark:bg-gray-700 animate-pulse",[r.unref(Zn)(r.unref(Sm)),r.unref(sn)(e.rounded)]])},null,2)],64)):(r.openBlock(),r.createElementBlock(r.Fragment,{key:1},[e.label?(r.openBlock(),r.createElementBlock("label",{key:0,for:h.value,class:"mb-1 block text-sm font-medium text-gray-900 dark:text-gray-100"},[r.createTextVNode(r.toDisplayString(e.label)+" ",1),e.required?(r.openBlock(),r.createElementBlock("span",hO,"*")):r.createCommentVNode("",!0)],8,fO)):r.createCommentVNode("",!0),r.createElementVNode("div",mO,[r.createElementVNode("div",{ref_key:"reference",ref:d,class:r.normalizeClass(["flex items-center gap-2 border bg-white dark:bg-neutral-800 border-gray-300 dark:border-neutral-700/50 focus-within:ring-1 focus-within:ring-gray-700 dark:focus-within:ring-gray-300",[s.value,e.disabled||e.readonly?"opacity-60 cursor-not-allowed":"",P.value?"border-red-500 focus-within:ring-red-500":""]])},[n.icon?(r.openBlock(),r.createElementBlock("div",pO,[n.icon?(r.openBlock(),r.createBlock(r.resolveDynamicComponent(n.icon),{key:0,class:"h-4 w-4"})):r.createCommentVNode("",!0)])):r.createCommentVNode("",!0),r.createElementVNode("input",r.mergeProps({ref_key:"inputRef",ref:a},T.$attrs,{id:h.value,type:"text",class:["w-full bg-transparent outline-none text-sm text-gray-900 dark:text-gray-100 placeholder:text-gray-400",e.disabled||e.readonly?"cursor-not-allowed":"cursor-text"],placeholder:e.placeholder,disabled:e.disabled,readonly:e.readonly,value:Q.value,onFocus:j,onBlur:Y,onInput:J,onKeydown:U,onClick:N}),null,16,gO),b.value?(r.openBlock(),r.createElementBlock("svg",bO,[...M[4]||(M[4]=[r.createElementVNode("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"},null,-1),r.createElementVNode("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8v4a4 4 0 00-4 4H4z"},null,-1)])])):e.clearable&&e.modelValue?(r.openBlock(),r.createElementBlock("button",{key:2,type:"button",class:"shrink-0 rounded-md px-1 text-gray-500 hover:text-gray-700 dark:hover:text-gray-300",onMousedown:M[0]||(M[0]=r.withModifiers(()=>{},["prevent"])),onClick:r.withModifiers(H,["stop"]),"aria-label":"Clear"}," ✕ ",32)):(r.openBlock(),r.createElementBlock("button",{key:3,type:"button",class:"shrink-0 rounded-md px-1 text-gray-500 hover:text-gray-700 dark:hover:text-gray-300 disabled:opacity-50 disabled:cursor-not-allowed",disabled:e.disabled||e.readonly,onClick:M[1]||(M[1]=$=>_.value?ie():re()),"aria-label":"Toggle"},[r.createVNode(r.unref(Ae.ChevronDown),{class:r.normalizeClass(["h-4 w-4 transition-transform duration-200 ease-in-out",{"rotate-180":_.value}])},null,8,["class"])],8,yO))],2),(r.openBlock(),r.createBlock(r.Teleport,{to:"body"},[_.value?(r.openBlock(),r.createElementBlock("div",{key:0,ref_key:"floating",ref:f,style:r.normalizeStyle(r.unref(A)),role:"listbox","data-dcode-floating":"true",class:"z-[50] pointer-events-auto overflow-hidden rounded-lg border bg-white shadow-lg border-gray-200 dark:border-neutral-700/50 dark:bg-neutral-800"},[r.createElementVNode("div",{ref_key:"scrollContainer",ref:l,style:r.normalizeStyle({maxHeight:p.value}),class:"overflow-auto",onScroll:k},[b.value&&y.value.length===0&&!F.value?(r.openBlock(),r.createElementBlock("div",vO,r.toDisplayString(e.loadingText),1)):q.value.length?(r.openBlock(!0),r.createElementBlock(r.Fragment,{key:1},r.renderList(q.value,($,ne)=>(r.openBlock(),r.createElementBlock("button",{key:X($)??ne,type:"button",class:r.normalizeClass(["w-full flex justify-between text-left px-3 py-2 text-sm hover:bg-neutral-100 dark:hover:bg-neutral-800",ne===x.value?"bg-neutral-100 dark:bg-neutral-800":""]),onMouseenter:te=>x.value=ne,onMousedown:M[2]||(M[2]=r.withModifiers(()=>{},["prevent"])),onClick:te=>se($)},[r.renderSlot(T.$slots,"item",{item:$,index:ne},()=>[r.createElementVNode("div",kO,[r.createElementVNode("div",_O,[r.createElementVNode("div",xO,r.toDisplayString(le($)),1),e.itemSubtitle?(r.openBlock(),r.createElementBlock("div",EO,r.toDisplayString(K($)),1)):r.createCommentVNode("",!0)])])]),W($)?(r.openBlock(),r.createElementBlock("span",CO," ✓ ")):r.createCommentVNode("",!0)],42,wO))),128)):R.value&&y.value.length>0?(r.openBlock(),r.createElementBlock("div",{key:2,class:"h-10 flex items-center px-3 cursor-pointer",onClick:M[3]||(M[3]=$=>C())},[r.createElementVNode("div",SO,r.toDisplayString(e.loadingText),1)])):!b.value&&y.value.length===0?(r.openBlock(),r.createElementBlock("div",AO,r.toDisplayString(e.noResultsText),1)):r.createCommentVNode("",!0)],36)],4)):r.createCommentVNode("",!0)]))]),P.value?(r.openBlock(),r.createElementBlock("p",TO,r.toDisplayString(n.error),1)):e.helperText?(r.openBlock(),r.createElementBlock("p",BO,r.toDisplayString(e.helperText),1)):r.createCommentVNode("",!0)],64))],10,dO)),[[r.vShow,e.visible]])}});function Y1(e){var t,n,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Y1(e[t]))&&(o&&(o+=" "),o+=n)}else for(n in e)e[n]&&(o&&(o+=" "),o+=n);return o}function Z1(){for(var e,t,n=0,o="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Y1(e))&&(o&&(o+=" "),o+=t);return o}const PO=(e,t)=>{const n=new Array(e.length+t.length);for(let o=0;o<e.length;o++)n[o]=e[o];for(let o=0;o<t.length;o++)n[e.length+o]=t[o];return n},NO=(e,t)=>({classGroupId:e,validator:t}),X1=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Bm="-",J1=[],DO="arbitrary..",MO=e=>{const t=IO(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:a=>{if(a.startsWith("[")&&a.endsWith("]"))return RO(a);const l=a.split(Bm),c=l[0]===""&&l.length>1?1:0;return Q1(l,c,t)},getConflictingClassGroupIds:(a,l)=>{if(l){const c=o[a],d=n[a];return c?d?PO(d,c):c:d||J1}return n[a]||J1}}},Q1=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const i=e[t],s=n.nextPart.get(i);if(s){const d=Q1(e,t+1,s);if(d)return d}const a=n.validators;if(a===null)return;const l=t===0?e.join(Bm):e.slice(t).join(Bm),c=a.length;for(let d=0;d<c;d++){const f=a[d];if(f.validator(l))return f.classGroupId}},RO=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),o=t.slice(0,n);return o?DO+o:void 0})(),IO=e=>{const{theme:t,classGroups:n}=e;return OO(n,t)},OO=(e,t)=>{const n=X1();for(const o in e){const i=e[o];Xb(i,n,o,t)}return n},Xb=(e,t,n,o)=>{const i=e.length;for(let s=0;s<i;s++){const a=e[s];LO(a,t,n,o)}},LO=(e,t,n,o)=>{if(typeof e=="string"){FO(e,t,n);return}if(typeof e=="function"){$O(e,t,n,o);return}zO(e,t,n,o)},FO=(e,t,n)=>{const o=e===""?t:V1(t,e);o.classGroupId=n},$O=(e,t,n,o)=>{if(jO(e)){Xb(e(o),t,n,o);return}t.validators===null&&(t.validators=[]),t.validators.push(NO(n,e))},zO=(e,t,n,o)=>{const i=Object.entries(e),s=i.length;for(let a=0;a<s;a++){const[l,c]=i[a];Xb(c,V1(t,l),n,o)}},V1=(e,t)=>{let n=e;const o=t.split(Bm),i=o.length;for(let s=0;s<i;s++){const a=o[s];let l=n.nextPart.get(a);l||(l=X1(),n.nextPart.set(a,l)),n=l}return n},jO=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,UO=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),o=Object.create(null);const i=(s,a)=>{n[s]=a,t++,t>e&&(t=0,o=n,n=Object.create(null))};return{get(s){let a=n[s];if(a!==void 0)return a;if((a=o[s])!==void 0)return i(s,a),a},set(s,a){s in n?n[s]=a:i(s,a)}}},Jb="!",ex=":",WO=[],tx=(e,t,n,o,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:o,isExternal:i}),HO=e=>{const{prefix:t,experimentalParseClassName:n}=e;let o=i=>{const s=[];let a=0,l=0,c=0,d;const f=i.length;for(let b=0;b<f;b++){const _=i[b];if(a===0&&l===0){if(_===ex){s.push(i.slice(c,b)),c=b+1;continue}if(_==="/"){d=b;continue}}_==="["?a++:_==="]"?a--:_==="("?l++:_===")"&&l--}const h=s.length===0?i:i.slice(c);let p=h,g=!1;h.endsWith(Jb)?(p=h.slice(0,-1),g=!0):h.startsWith(Jb)&&(p=h.slice(1),g=!0);const y=d&&d>c?d-c:void 0;return tx(s,g,p,y)};if(t){const i=t+ex,s=o;o=a=>a.startsWith(i)?s(a.slice(i.length)):tx(WO,!1,a,void 0,!0)}if(n){const i=o;o=s=>n({className:s,parseClassName:i})}return o},qO=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,o)=>{t.set(n,1e6+o)}),n=>{const o=[];let i=[];for(let s=0;s<n.length;s++){const a=n[s],l=a[0]==="[",c=t.has(a);l||c?(i.length>0&&(i.sort(),o.push(...i),i=[]),o.push(a)):i.push(a)}return i.length>0&&(i.sort(),o.push(...i)),o}},KO=e=>({cache:UO(e.cacheSize),parseClassName:HO(e),sortModifiers:qO(e),postfixLookupClassGroupIds:GO(e),...MO(e)}),GO=e=>{const t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let o=0;o<n.length;o++)t[n[o]]=!0;return t},YO=/\s+/,ZO=(e,t)=>{const{parseClassName:n,getClassGroupId:o,getConflictingClassGroupIds:i,sortModifiers:s,postfixLookupClassGroupIds:a}=t,l=[],c=e.trim().split(YO);let d="";for(let f=c.length-1;f>=0;f-=1){const h=c[f],{isExternal:p,modifiers:g,hasImportantModifier:y,baseClassName:b,maybePostfixModifierPosition:_}=n(h);if(p){d=h+(d.length>0?" "+d:d);continue}let x=!!_,B;if(x){const D=b.substring(0,_);B=o(D);const w=B&&a[B]?o(b):void 0;w&&w!==B&&(B=w,x=!1)}else B=o(b);if(!B){if(!x){d=h+(d.length>0?" "+d:d);continue}if(B=o(b),!B){d=h+(d.length>0?" "+d:d);continue}x=!1}const R=g.length===0?"":g.length===1?g[0]:s(g).join(":"),S=y?R+Jb:R,O=S+B;if(l.indexOf(O)>-1)continue;l.push(O);const I=i(B,x);for(let D=0;D<I.length;++D){const w=I[D];l.push(S+w)}d=h+(d.length>0?" "+d:d)}return d},XO=(...e)=>{let t=0,n,o,i="";for(;t<e.length;)(n=e[t++])&&(o=nx(n))&&(i&&(i+=" "),i+=o);return i},nx=e=>{if(typeof e=="string")return e;let t,n="";for(let o=0;o<e.length;o++)e[o]&&(t=nx(e[o]))&&(n&&(n+=" "),n+=t);return n},JO=(e,...t)=>{let n,o,i,s;const a=c=>{const d=t.reduce((f,h)=>h(f),e());return n=KO(d),o=n.cache.get,i=n.cache.set,s=l,l(c)},l=c=>{const d=o(c);if(d)return d;const f=ZO(c,n);return i(c,f),f};return s=a,(...c)=>s(XO(...c))},QO=[],No=e=>{const t=n=>n[e]||QO;return t.isThemeGetter=!0,t.themeKey=e,t},ox=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,rx=/^\((?:(\w[\w-]*):)?(.+)\)$/i,VO=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,e4=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,t4=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,n4=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix|color|light-dark)\(.+\)$/,o4=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,r4=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Oa=e=>VO.test(e),Qt=e=>!!e&&!Number.isNaN(Number(e)),ns=e=>!!e&&Number.isInteger(Number(e)),Qb=e=>e.endsWith("%")&&Qt(e.slice(0,-1)),qs=e=>e4.test(e),ix=()=>!0,i4=e=>t4.test(e)&&!n4.test(e),Vb=()=>!1,s4=e=>o4.test(e),a4=e=>r4.test(e),l4=e=>!bt(e)&&!yt(e),c4=e=>e.startsWith("@container")&&(e[10]==="/"&&e[11]!==void 0||e[11]==="s"&&e[16]!==void 0&&e.startsWith("-size/",10)||e[11]==="n"&&e[18]!==void 0&&e.startsWith("-normal/",10)),d4=e=>La(e,ux,Vb),bt=e=>ox.test(e),zl=e=>La(e,fx,i4),sx=e=>La(e,y4,Qt),u4=e=>La(e,mx,ix),f4=e=>La(e,hx,Vb),ax=e=>La(e,cx,Vb),h4=e=>La(e,dx,a4),Pm=e=>La(e,px,s4),yt=e=>rx.test(e),ju=e=>jl(e,fx),m4=e=>jl(e,hx),lx=e=>jl(e,cx),p4=e=>jl(e,ux),g4=e=>jl(e,dx),Nm=e=>jl(e,px,!0),b4=e=>jl(e,mx,!0),La=(e,t,n)=>{const o=ox.exec(e);return o?o[1]?t(o[1]):n(o[2]):!1},jl=(e,t,n=!1)=>{const o=rx.exec(e);return o?o[1]?t(o[1]):n:!1},cx=e=>e==="position"||e==="percentage",dx=e=>e==="image"||e==="url",ux=e=>e==="length"||e==="size"||e==="bg-size",fx=e=>e==="length",y4=e=>e==="number",hx=e=>e==="family-name",mx=e=>e==="number"||e==="weight",px=e=>e==="shadow",v4=JO(()=>{const e=No("color"),t=No("font"),n=No("text"),o=No("font-weight"),i=No("tracking"),s=No("leading"),a=No("breakpoint"),l=No("container"),c=No("spacing"),d=No("radius"),f=No("shadow"),h=No("inset-shadow"),p=No("text-shadow"),g=No("drop-shadow"),y=No("blur"),b=No("perspective"),_=No("aspect"),x=No("ease"),B=No("animate"),R=()=>["auto","avoid","all","avoid-page","page","left","right","column"],S=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],O=()=>[...S(),yt,bt],I=()=>["auto","hidden","clip","visible","scroll"],D=()=>["auto","contain","none"],w=()=>[yt,bt,c],E=()=>[Oa,"full","auto",...w()],F=()=>[ns,"none","subgrid",yt,bt],A=()=>["auto",{span:["full",ns,yt,bt]},ns,yt,bt],P=()=>[ns,"auto",yt,bt],q=()=>["auto","min","max","fr",yt,bt],Q=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],re=()=>["start","end","center","stretch","center-safe","end-safe"],ie=()=>["auto",...w()],le=()=>[Oa,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...w()],X=()=>[l,Oa,"screen","full","dvw","lvw","svw","min","max","fit",...w()],K=()=>[Oa,"screen","full","lh","dvh","lvh","svh","min","max","fit",...w()],W=()=>[e,yt,bt],se=()=>[...S(),lx,ax,{position:[yt,bt]}],H=()=>["no-repeat",{repeat:["","x","y","space","round"]}],N=()=>["auto","cover","contain",p4,d4,{size:[yt,bt]}],j=()=>[Qb,ju,zl],Y=()=>["","none","full",d,yt,bt],J=()=>["",Qt,ju,zl],U=()=>["solid","dashed","dotted","double"],k=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],C=()=>[Qt,Qb,lx,ax],T=()=>["","none",y,yt,bt],M=()=>["none",Qt,yt,bt],$=()=>["none",Qt,yt,bt],ne=()=>[Qt,yt,bt],te=()=>[Oa,"full",...w()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[qs],breakpoint:[qs],color:[ix],container:[qs],"drop-shadow":[qs],ease:["in","out","in-out"],font:[l4],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[qs],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[qs],shadow:[qs],spacing:["px",Qt],text:[qs],"text-shadow":[qs],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Oa,bt,yt,_]}],container:["container"],"container-type":[{"@container":["","normal","size",yt,bt]}],"container-named":[c4],columns:[{columns:[Qt,"auto",bt,yt,l]}],"break-after":[{"break-after":R()}],"break-before":[{"break-before":R()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:O()}],overflow:[{overflow:I()}],"overflow-x":[{"overflow-x":I()}],"overflow-y":[{"overflow-y":I()}],overscroll:[{overscroll:D()}],"overscroll-x":[{"overscroll-x":D()}],"overscroll-y":[{"overscroll-y":D()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:E()}],"inset-x":[{"inset-x":E()}],"inset-y":[{"inset-y":E()}],start:[{"inset-s":E(),start:E()}],end:[{"inset-e":E(),end:E()}],"inset-bs":[{"inset-bs":E()}],"inset-be":[{"inset-be":E()}],top:[{top:E()}],right:[{right:E()}],bottom:[{bottom:E()}],left:[{left:E()}],visibility:["visible","invisible","collapse"],z:[{z:[ns,"auto",yt,bt]}],basis:[{basis:[Oa,"full","auto",l,...w()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Qt,Oa,"auto","initial","none",bt]}],grow:[{grow:["",Qt,yt,bt]}],shrink:[{shrink:["",Qt,yt,bt]}],order:[{order:[ns,"first","last","none",yt,bt]}],"grid-cols":[{"grid-cols":F()}],"col-start-end":[{col:A()}],"col-start":[{"col-start":P()}],"col-end":[{"col-end":P()}],"grid-rows":[{"grid-rows":F()}],"row-start-end":[{row:A()}],"row-start":[{"row-start":P()}],"row-end":[{"row-end":P()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":q()}],"auto-rows":[{"auto-rows":q()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...Q(),"normal"]}],"justify-items":[{"justify-items":[...re(),"normal"]}],"justify-self":[{"justify-self":["auto",...re()]}],"align-content":[{content:["normal",...Q()]}],"align-items":[{items:[...re(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...re(),{baseline:["","last"]}]}],"place-content":[{"place-content":Q()}],"place-items":[{"place-items":[...re(),"baseline"]}],"place-self":[{"place-self":["auto",...re()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pbs:[{pbs:w()}],pbe:[{pbe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:ie()}],mx:[{mx:ie()}],my:[{my:ie()}],ms:[{ms:ie()}],me:[{me:ie()}],mbs:[{mbs:ie()}],mbe:[{mbe:ie()}],mt:[{mt:ie()}],mr:[{mr:ie()}],mb:[{mb:ie()}],ml:[{ml:ie()}],"space-x":[{"space-x":w()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":w()}],"space-y-reverse":["space-y-reverse"],size:[{size:le()}],"inline-size":[{inline:["auto",...X()]}],"min-inline-size":[{"min-inline":["auto",...X()]}],"max-inline-size":[{"max-inline":["none",...X()]}],"block-size":[{block:["auto",...K()]}],"min-block-size":[{"min-block":["auto",...K()]}],"max-block-size":[{"max-block":["none",...K()]}],w:[{w:[l,"screen",...le()]}],"min-w":[{"min-w":[l,"screen","none",...le()]}],"max-w":[{"max-w":[l,"screen","none","prose",{screen:[a]},...le()]}],h:[{h:["screen","lh",...le()]}],"min-h":[{"min-h":["screen","lh","none",...le()]}],"max-h":[{"max-h":["screen","lh","none",...le()]}],"font-size":[{text:["base",n,ju,zl]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[o,b4,u4]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Qb,bt]}],"font-family":[{font:[m4,f4,t]}],"font-features":[{"font-features":[bt]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[i,yt,bt]}],"line-clamp":[{"line-clamp":[Qt,"none",yt,sx]}],leading:[{leading:["none",s,...w()]}],"list-image":[{"list-image":["none",yt,bt]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",yt,bt]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:W()}],"text-color":[{text:W()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...U(),"wavy"]}],"text-decoration-thickness":[{decoration:[Qt,"from-font","auto",yt,zl]}],"text-decoration-color":[{decoration:W()}],"underline-offset":[{"underline-offset":[Qt,"auto",yt,bt]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:w()}],"tab-size":[{tab:[ns,yt,bt]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",yt,bt]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",yt,bt]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:se()}],"bg-repeat":[{bg:H()}],"bg-size":[{bg:N()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},ns,yt,bt],radial:["",yt,bt],conic:["",ns,yt,bt]},g4,h4]}],"bg-color":[{bg:W()}],"gradient-from-pos":[{from:j()}],"gradient-via-pos":[{via:j()}],"gradient-to-pos":[{to:j()}],"gradient-from":[{from:W()}],"gradient-via":[{via:W()}],"gradient-to":[{to:W()}],rounded:[{rounded:Y()}],"rounded-s":[{"rounded-s":Y()}],"rounded-e":[{"rounded-e":Y()}],"rounded-t":[{"rounded-t":Y()}],"rounded-r":[{"rounded-r":Y()}],"rounded-b":[{"rounded-b":Y()}],"rounded-l":[{"rounded-l":Y()}],"rounded-ss":[{"rounded-ss":Y()}],"rounded-se":[{"rounded-se":Y()}],"rounded-ee":[{"rounded-ee":Y()}],"rounded-es":[{"rounded-es":Y()}],"rounded-tl":[{"rounded-tl":Y()}],"rounded-tr":[{"rounded-tr":Y()}],"rounded-br":[{"rounded-br":Y()}],"rounded-bl":[{"rounded-bl":Y()}],"border-w":[{border:J()}],"border-w-x":[{"border-x":J()}],"border-w-y":[{"border-y":J()}],"border-w-s":[{"border-s":J()}],"border-w-e":[{"border-e":J()}],"border-w-bs":[{"border-bs":J()}],"border-w-be":[{"border-be":J()}],"border-w-t":[{"border-t":J()}],"border-w-r":[{"border-r":J()}],"border-w-b":[{"border-b":J()}],"border-w-l":[{"border-l":J()}],"divide-x":[{"divide-x":J()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":J()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...U(),"hidden","none"]}],"divide-style":[{divide:[...U(),"hidden","none"]}],"border-color":[{border:W()}],"border-color-x":[{"border-x":W()}],"border-color-y":[{"border-y":W()}],"border-color-s":[{"border-s":W()}],"border-color-e":[{"border-e":W()}],"border-color-bs":[{"border-bs":W()}],"border-color-be":[{"border-be":W()}],"border-color-t":[{"border-t":W()}],"border-color-r":[{"border-r":W()}],"border-color-b":[{"border-b":W()}],"border-color-l":[{"border-l":W()}],"divide-color":[{divide:W()}],"outline-style":[{outline:[...U(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Qt,yt,bt]}],"outline-w":[{outline:["",Qt,ju,zl]}],"outline-color":[{outline:W()}],shadow:[{shadow:["","inner","none",f,Nm,Pm]}],"shadow-color":[{shadow:W()}],"inset-shadow":[{"inset-shadow":["none",h,Nm,Pm]}],"inset-shadow-color":[{"inset-shadow":W()}],"ring-w":[{ring:J()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:W()}],"ring-offset-w":[{"ring-offset":[Qt,zl]}],"ring-offset-color":[{"ring-offset":W()}],"inset-ring-w":[{"inset-ring":J()}],"inset-ring-color":[{"inset-ring":W()}],"text-shadow":[{"text-shadow":["none",p,Nm,Pm]}],"text-shadow-color":[{"text-shadow":W()}],opacity:[{opacity:[Qt,yt,bt]}],"mix-blend":[{"mix-blend":[...k(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":k()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Qt]}],"mask-image-linear-from-pos":[{"mask-linear-from":C()}],"mask-image-linear-to-pos":[{"mask-linear-to":C()}],"mask-image-linear-from-color":[{"mask-linear-from":W()}],"mask-image-linear-to-color":[{"mask-linear-to":W()}],"mask-image-t-from-pos":[{"mask-t-from":C()}],"mask-image-t-to-pos":[{"mask-t-to":C()}],"mask-image-t-from-color":[{"mask-t-from":W()}],"mask-image-t-to-color":[{"mask-t-to":W()}],"mask-image-r-from-pos":[{"mask-r-from":C()}],"mask-image-r-to-pos":[{"mask-r-to":C()}],"mask-image-r-from-color":[{"mask-r-from":W()}],"mask-image-r-to-color":[{"mask-r-to":W()}],"mask-image-b-from-pos":[{"mask-b-from":C()}],"mask-image-b-to-pos":[{"mask-b-to":C()}],"mask-image-b-from-color":[{"mask-b-from":W()}],"mask-image-b-to-color":[{"mask-b-to":W()}],"mask-image-l-from-pos":[{"mask-l-from":C()}],"mask-image-l-to-pos":[{"mask-l-to":C()}],"mask-image-l-from-color":[{"mask-l-from":W()}],"mask-image-l-to-color":[{"mask-l-to":W()}],"mask-image-x-from-pos":[{"mask-x-from":C()}],"mask-image-x-to-pos":[{"mask-x-to":C()}],"mask-image-x-from-color":[{"mask-x-from":W()}],"mask-image-x-to-color":[{"mask-x-to":W()}],"mask-image-y-from-pos":[{"mask-y-from":C()}],"mask-image-y-to-pos":[{"mask-y-to":C()}],"mask-image-y-from-color":[{"mask-y-from":W()}],"mask-image-y-to-color":[{"mask-y-to":W()}],"mask-image-radial":[{"mask-radial":[yt,bt]}],"mask-image-radial-from-pos":[{"mask-radial-from":C()}],"mask-image-radial-to-pos":[{"mask-radial-to":C()}],"mask-image-radial-from-color":[{"mask-radial-from":W()}],"mask-image-radial-to-color":[{"mask-radial-to":W()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":S()}],"mask-image-conic-pos":[{"mask-conic":[Qt]}],"mask-image-conic-from-pos":[{"mask-conic-from":C()}],"mask-image-conic-to-pos":[{"mask-conic-to":C()}],"mask-image-conic-from-color":[{"mask-conic-from":W()}],"mask-image-conic-to-color":[{"mask-conic-to":W()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:se()}],"mask-repeat":[{mask:H()}],"mask-size":[{mask:N()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",yt,bt]}],filter:[{filter:["","none",yt,bt]}],blur:[{blur:T()}],brightness:[{brightness:[Qt,yt,bt]}],contrast:[{contrast:[Qt,yt,bt]}],"drop-shadow":[{"drop-shadow":["","none",g,Nm,Pm]}],"drop-shadow-color":[{"drop-shadow":W()}],grayscale:[{grayscale:["",Qt,yt,bt]}],"hue-rotate":[{"hue-rotate":[Qt,yt,bt]}],invert:[{invert:["",Qt,yt,bt]}],saturate:[{saturate:[Qt,yt,bt]}],sepia:[{sepia:["",Qt,yt,bt]}],"backdrop-filter":[{"backdrop-filter":["","none",yt,bt]}],"backdrop-blur":[{"backdrop-blur":T()}],"backdrop-brightness":[{"backdrop-brightness":[Qt,yt,bt]}],"backdrop-contrast":[{"backdrop-contrast":[Qt,yt,bt]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Qt,yt,bt]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Qt,yt,bt]}],"backdrop-invert":[{"backdrop-invert":["",Qt,yt,bt]}],"backdrop-opacity":[{"backdrop-opacity":[Qt,yt,bt]}],"backdrop-saturate":[{"backdrop-saturate":[Qt,yt,bt]}],"backdrop-sepia":[{"backdrop-sepia":["",Qt,yt,bt]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",yt,bt]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Qt,"initial",yt,bt]}],ease:[{ease:["linear","initial",x,yt,bt]}],delay:[{delay:[Qt,yt,bt]}],animate:[{animate:["none",B,yt,bt]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[b,yt,bt]}],"perspective-origin":[{"perspective-origin":O()}],rotate:[{rotate:M()}],"rotate-x":[{"rotate-x":M()}],"rotate-y":[{"rotate-y":M()}],"rotate-z":[{"rotate-z":M()}],scale:[{scale:$()}],"scale-x":[{"scale-x":$()}],"scale-y":[{"scale-y":$()}],"scale-z":[{"scale-z":$()}],"scale-3d":["scale-3d"],skew:[{skew:ne()}],"skew-x":[{"skew-x":ne()}],"skew-y":[{"skew-y":ne()}],transform:[{transform:[yt,bt,"","none","gpu","cpu"]}],"transform-origin":[{origin:O()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:te()}],"translate-x":[{"translate-x":te()}],"translate-y":[{"translate-y":te()}],"translate-z":[{"translate-z":te()}],"translate-none":["translate-none"],zoom:[{zoom:[ns,yt,bt]}],accent:[{accent:W()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:W()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",yt,bt]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":W()}],"scrollbar-track-color":[{"scrollbar-track":W()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mbs":[{"scroll-mbs":w()}],"scroll-mbe":[{"scroll-mbe":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pbs":[{"scroll-pbs":w()}],"scroll-pbe":[{"scroll-pbe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",yt,bt]}],fill:[{fill:["none",...W()]}],"stroke-w":[{stroke:[Qt,ju,zl,sx]}],stroke:[{stroke:["none",...W()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["start","end","right","left"],"inset-y":["inset-bs","inset-be","top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["ps","pe","pr","pl"],py:["pbs","pbe","pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["ms","me","mr","ml"],my:["mbs","mbe","mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-s","border-w-e","border-w-r","border-w-l"],"border-w-y":["border-w-bs","border-w-be","border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-s","border-color-e","border-color-r","border-color-l"],"border-color-y":["border-color-bs","border-color-be","border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-ms","scroll-me","scroll-mr","scroll-ml"],"scroll-my":["scroll-mbs","scroll-mbe","scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-ps","scroll-pe","scroll-pr","scroll-pl"],"scroll-py":["scroll-pbs","scroll-pbe","scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}});function _n(...e){return v4(Z1(e))}function Dm(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ey={},ty={},Mm={exports:{}},gx;function w4(){if(gx)return Mm.exports;gx=1;var e=String,t=function(){return{isColorSupported:!1,reset:e,bold:e,dim:e,italic:e,underline:e,inverse:e,hidden:e,strikethrough:e,black:e,red:e,green:e,yellow:e,blue:e,magenta:e,cyan:e,white:e,gray:e,bgBlack:e,bgRed:e,bgGreen:e,bgYellow:e,bgBlue:e,bgMagenta:e,bgCyan:e,bgWhite:e,blackBright:e,redBright:e,greenBright:e,yellowBright:e,blueBright:e,magentaBright:e,cyanBright:e,whiteBright:e,bgBlackBright:e,bgRedBright:e,bgGreenBright:e,bgYellowBright:e,bgBlueBright:e,bgMagentaBright:e,bgCyanBright:e,bgWhiteBright:e}};return Mm.exports=t(),Mm.exports.createColors=t,Mm.exports}var bx;function k4(){return bx||(bx=1,(function(e){var t={};Object.defineProperty(e,"__esModule",{value:!0});function n(d,f){for(var h in f)Object.defineProperty(d,h,{enumerable:!0,get:f[h]})}n(e,{dim:function(){return l},default:function(){return c}});const o=i(w4());function i(d){return d&&d.__esModule?d:{default:d}}let s=new Set;function a(d,f,h){typeof process<"u"&&t.JEST_WORKER_ID||h&&s.has(h)||(h&&s.add(h),console.warn(""),f.forEach(p=>console.warn(d,"-",p)))}function l(d){return o.default.dim(d)}const c={info(d,f){a(o.default.bold(o.default.cyan("info")),...Array.isArray(d)?[d]:[f,d])},warn(d,f){a(o.default.bold(o.default.yellow("warn")),...Array.isArray(d)?[d]:[f,d])},risk(d,f){a(o.default.bold(o.default.magenta("risk")),...Array.isArray(d)?[d]:[f,d])}}})(ty)),ty}var yx;function _4(){return yx||(yx=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return i}});const t=n(k4());function n(s){return s&&s.__esModule?s:{default:s}}function o({version:s,from:a,to:l}){t.default.warn(`${a}-color-renamed`,[`As of Tailwind CSS ${s}, \`${a}\` has been renamed to \`${l}\`.`,"Update your configuration file to silence this warning."])}const i={inherit:"inherit",current:"currentColor",transparent:"transparent",black:"#000",white:"#fff",slate:{50:"#f8fafc",100:"#f1f5f9",200:"#e2e8f0",300:"#cbd5e1",400:"#94a3b8",500:"#64748b",600:"#475569",700:"#334155",800:"#1e293b",900:"#0f172a",950:"#020617"},gray:{50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#1f2937",900:"#111827",950:"#030712"},zinc:{50:"#fafafa",100:"#f4f4f5",200:"#e4e4e7",300:"#d4d4d8",400:"#a1a1aa",500:"#71717a",600:"#52525b",700:"#3f3f46",800:"#27272a",900:"#18181b",950:"#09090b"},neutral:{50:"#fafafa",100:"#f5f5f5",200:"#e5e5e5",300:"#d4d4d4",400:"#a3a3a3",500:"#737373",600:"#525252",700:"#404040",800:"#262626",900:"#171717",950:"#0a0a0a"},stone:{50:"#fafaf9",100:"#f5f5f4",200:"#e7e5e4",300:"#d6d3d1",400:"#a8a29e",500:"#78716c",600:"#57534e",700:"#44403c",800:"#292524",900:"#1c1917",950:"#0c0a09"},red:{50:"#fef2f2",100:"#fee2e2",200:"#fecaca",300:"#fca5a5",400:"#f87171",500:"#ef4444",600:"#dc2626",700:"#b91c1c",800:"#991b1b",900:"#7f1d1d",950:"#450a0a"},orange:{50:"#fff7ed",100:"#ffedd5",200:"#fed7aa",300:"#fdba74",400:"#fb923c",500:"#f97316",600:"#ea580c",700:"#c2410c",800:"#9a3412",900:"#7c2d12",950:"#431407"},amber:{50:"#fffbeb",100:"#fef3c7",200:"#fde68a",300:"#fcd34d",400:"#fbbf24",500:"#f59e0b",600:"#d97706",700:"#b45309",800:"#92400e",900:"#78350f",950:"#451a03"},yellow:{50:"#fefce8",100:"#fef9c3",200:"#fef08a",300:"#fde047",400:"#facc15",500:"#eab308",600:"#ca8a04",700:"#a16207",800:"#854d0e",900:"#713f12",950:"#422006"},lime:{50:"#f7fee7",100:"#ecfccb",200:"#d9f99d",300:"#bef264",400:"#a3e635",500:"#84cc16",600:"#65a30d",700:"#4d7c0f",800:"#3f6212",900:"#365314",950:"#1a2e05"},green:{50:"#f0fdf4",100:"#dcfce7",200:"#bbf7d0",300:"#86efac",400:"#4ade80",500:"#22c55e",600:"#16a34a",700:"#15803d",800:"#166534",900:"#14532d",950:"#052e16"},emerald:{50:"#ecfdf5",100:"#d1fae5",200:"#a7f3d0",300:"#6ee7b7",400:"#34d399",500:"#10b981",600:"#059669",700:"#047857",800:"#065f46",900:"#064e3b",950:"#022c22"},teal:{50:"#f0fdfa",100:"#ccfbf1",200:"#99f6e4",300:"#5eead4",400:"#2dd4bf",500:"#14b8a6",600:"#0d9488",700:"#0f766e",800:"#115e59",900:"#134e4a",950:"#042f2e"},cyan:{50:"#ecfeff",100:"#cffafe",200:"#a5f3fc",300:"#67e8f9",400:"#22d3ee",500:"#06b6d4",600:"#0891b2",700:"#0e7490",800:"#155e75",900:"#164e63",950:"#083344"},sky:{50:"#f0f9ff",100:"#e0f2fe",200:"#bae6fd",300:"#7dd3fc",400:"#38bdf8",500:"#0ea5e9",600:"#0284c7",700:"#0369a1",800:"#075985",900:"#0c4a6e",950:"#082f49"},blue:{50:"#eff6ff",100:"#dbeafe",200:"#bfdbfe",300:"#93c5fd",400:"#60a5fa",500:"#3b82f6",600:"#2563eb",700:"#1d4ed8",800:"#1e40af",900:"#1e3a8a",950:"#172554"},indigo:{50:"#eef2ff",100:"#e0e7ff",200:"#c7d2fe",300:"#a5b4fc",400:"#818cf8",500:"#6366f1",600:"#4f46e5",700:"#4338ca",800:"#3730a3",900:"#312e81",950:"#1e1b4b"},violet:{50:"#f5f3ff",100:"#ede9fe",200:"#ddd6fe",300:"#c4b5fd",400:"#a78bfa",500:"#8b5cf6",600:"#7c3aed",700:"#6d28d9",800:"#5b21b6",900:"#4c1d95",950:"#2e1065"},purple:{50:"#faf5ff",100:"#f3e8ff",200:"#e9d5ff",300:"#d8b4fe",400:"#c084fc",500:"#a855f7",600:"#9333ea",700:"#7e22ce",800:"#6b21a8",900:"#581c87",950:"#3b0764"},fuchsia:{50:"#fdf4ff",100:"#fae8ff",200:"#f5d0fe",300:"#f0abfc",400:"#e879f9",500:"#d946ef",600:"#c026d3",700:"#a21caf",800:"#86198f",900:"#701a75",950:"#4a044e"},pink:{50:"#fdf2f8",100:"#fce7f3",200:"#fbcfe8",300:"#f9a8d4",400:"#f472b6",500:"#ec4899",600:"#db2777",700:"#be185d",800:"#9d174d",900:"#831843",950:"#500724"},rose:{50:"#fff1f2",100:"#ffe4e6",200:"#fecdd3",300:"#fda4af",400:"#fb7185",500:"#f43f5e",600:"#e11d48",700:"#be123c",800:"#9f1239",900:"#881337",950:"#4c0519"},get lightBlue(){return o({version:"v2.2",from:"lightBlue",to:"sky"}),this.sky},get warmGray(){return o({version:"v3.0",from:"warmGray",to:"stone"}),this.stone},get trueGray(){return o({version:"v3.0",from:"trueGray",to:"neutral"}),this.neutral},get coolGray(){return o({version:"v3.0",from:"coolGray",to:"gray"}),this.gray},get blueGray(){return o({version:"v3.0",from:"blueGray",to:"slate"}),this.slate}}})(ey)),ey}var ny,vx;function x4(){if(vx)return ny;vx=1;let e=_4();return ny=(e.__esModule?e:{default:e}).default,ny}var E4=x4();const C4=Dm(E4),wx=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,kx=Z1,Rm=(e,t)=>n=>{var o;if(t?.variants==null)return kx(e,n?.class,n?.className);const{variants:i,defaultVariants:s}=t,a=Object.keys(i).map(d=>{const f=n?.[d],h=s?.[d];if(f===null)return null;const p=wx(f)||wx(h);return i[d][p]}),l=n&&Object.entries(n).reduce((d,f)=>{let[h,p]=f;return p===void 0||(d[h]=p),d},{}),c=t==null||(o=t.compoundVariants)===null||o===void 0?void 0:o.reduce((d,f)=>{let{class:h,className:p,...g}=f;return Object.entries(g).every(y=>{let[b,_]=y;return Array.isArray(_)?_.includes({...s,...l}[b]):{...s,...l}[b]===_})?[...d,h,p]:d},[]);return kx(e,a,c,n?.class,n?.className)},Bi=r.defineComponent({__name:"Button",props:{variant:{},size:{},class:{type:[Boolean,null,String,Object,Array]},asChild:{type:Boolean},as:{default:"button"}},setup(e){const t=e;return(n,o)=>(r.openBlock(),r.createBlock(r.unref(Lt.Primitive),{as:e.as,"as-child":e.asChild,class:r.normalizeClass(r.unref(_n)(r.unref(S4)({variant:e.variant,size:e.size}),t.class))},{default:r.withCtx(()=>[r.renderSlot(n.$slots,"default")]),_:3},8,["as","as-child","class"]))}}),S4=Rm("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",xs:"h-7 rounded px-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-8 w-8","icon-sm":"size-7","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}}),od=r.defineComponent({name:"Tooltip",__name:"Tooltip",props:{defaultOpen:{type:Boolean},open:{type:Boolean},delayDuration:{},disableHoverableContent:{type:Boolean},disableClosingTrigger:{type:Boolean},disabled:{type:Boolean},ignoreNonKeyboardFocus:{type:Boolean}},emits:["update:open"],setup(e,{emit:t}){const n=e,o=t,i=Lt.useForwardPropsEmits(n,o);return(s,a)=>(r.openBlock(),r.createBlock(r.unref(Lt.TooltipRoot),r.normalizeProps(r.guardReactiveProps(r.unref(i))),{default:r.withCtx(()=>[r.renderSlot(s.$slots,"default")]),_:3},16))}}),rd=r.defineComponent({name:"TooltipContent",inheritAttrs:!1,__name:"TooltipContent",props:{forceMount:{type:Boolean},ariaLabel:{},asChild:{type:Boolean},as:{},side:{},sideOffset:{default:4},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},positionStrategy:{},updatePositionStrategy:{},class:{type:[Boolean,null,String,Object,Array]}},emits:["escapeKeyDown","pointerDownOutside"],setup(e,{emit:t}){const n=e,o=t,i=Lo.reactiveOmit(n,"class"),s=Lt.useForwardPropsEmits(i,o);return(a,l)=>(r.openBlock(),r.createBlock(r.unref(Lt.TooltipPortal),null,{default:r.withCtx(()=>[r.createVNode(r.unref(Lt.TooltipContent),r.mergeProps({...r.unref(s),...a.$attrs},{class:r.unref(_n)("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",n.class)}),{default:r.withCtx(()=>[r.renderSlot(a.$slots,"default")]),_:3},16,["class"])]),_:3}))}}),id=r.defineComponent({name:"TooltipProvider",__name:"TooltipProvider",props:{delayDuration:{},skipDelayDuration:{},disableHoverableContent:{type:Boolean},disableClosingTrigger:{type:Boolean},disabled:{type:Boolean},ignoreNonKeyboardFocus:{type:Boolean},content:{}},setup(e){const t=e;return(n,o)=>(r.openBlock(),r.createBlock(r.unref(Lt.TooltipProvider),r.normalizeProps(r.guardReactiveProps(t)),{default:r.withCtx(()=>[r.renderSlot(n.$slots,"default")]),_:3},16))}}),sd=r.defineComponent({name:"TooltipTrigger",__name:"TooltipTrigger",props:{reference:{},asChild:{type:Boolean},as:{}},setup(e){const t=e;return(n,o)=>(r.openBlock(),r.createBlock(r.unref(Lt.TooltipTrigger),r.normalizeProps(r.guardReactiveProps(t)),{default:r.withCtx(()=>[r.renderSlot(n.$slots,"default")]),_:3},16))}}),A4={class:"relative z-10"},T4="font-medium transition-all duration-300 ease-in-out hover:-translate-y-0.5 hover:scale-[1.02] active:translate-y-0 active:scale-[0.98] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:brightness-90 disabled:cursor-not-allowed disabled:shadow-none disabled:translate-y-0 disabled:scale-100 relative overflow-hidden before:absolute before:inset-0 before:bg-white/20 before:translate-y-full before:transition-transform before:duration-300 hover:before:translate-y-0",B4=r.defineComponent({name:"DCodeButton",inheritAttrs:!1,__name:"DCodeButton",props:{icon:{},text:{default:""},variant:{default:"default"},size:{default:"default"},tooltip:{default:""},bgColor:{default:""},textColor:{default:""},borderColor:{default:""},rounded:{default:"lg"},borderStyle:{default:"solid"},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},type:{default:"button"},visible:{type:Boolean,default:!0},skeleton:{type:Boolean,default:!1}},setup(e){const t=r.useAttrs(),n=e,o=r.computed(()=>Ti(n.icon,Yt)),i=r.computed(()=>!!n.tooltip),s=r.computed(()=>n.visible??!0),a=r.computed(()=>{const j=String(n.variant||"default").toLowerCase();return j==="tonal"?"secondary":j==="elevated"?"default":j==="text"?"ghost":j}),l=r.computed(()=>String(n.bgColor||"").toLowerCase()),c=r.computed(()=>String(n.type||"button").toLowerCase()),d=r.ref(!1),f=r.computed(()=>n.loading||d.value),h=r.computed(()=>{const{class:j,onClick:Y,...J}=t;return Y&&(J.onClick=async(...U)=>{if(!(n.disabled||f.value)){d.value=!0;try{if(Array.isArray(Y)){const k=Y.map(C=>C(...U));await Promise.all(k)}else{const k=Y(...U);k instanceof Promise&&await k}}finally{d.value=!1}}}),J}),p=r.computed(()=>_n(t.class)),g=r.computed(()=>((p.value??"").match(/\b(?:w|h|min-w|min-h|max-w|max-h)-[^\s]+\b/g)??[]).join(" ")),y=r.computed(()=>n.size==="sm"?"h-9":n.size==="lg"?"h-11":n.size==="icon"?"h-10 w-10":"h-10"),b=r.computed(()=>n.size==="icon"?"":!n.text&&n.icon?"w-10":"w-28"),_=r.computed(()=>{const j=String(n.borderStyle||"solid").toLowerCase();return j==="none"?"border-0":j==="dashed"?"border-2 border-dashed":j==="dotted"?"border-2 border-dotted":j==="double"?"border-4 border-double":"border-2 border-solid"}),x=r.computed(()=>_n("inline-flex items-center justify-center bg-gray-200 dark:bg-gray-700 animate-pulse",sn(n.rounded),y.value,b.value,g.value)),B=r.computed(()=>{const Y=(p.value??"").match(/\bbg-(?!gradient)([a-z-]+)(?:-(\d{2,3}))?\b/u);return Y?Y[0]:null}),R=r.computed(()=>{const Y=(p.value??"").match(/\bhover:bg-(?!gradient)([a-z-]+)(?:-(\d{2,3}))?\b/u);return Y?Y[0]:null}),S=r.computed(()=>!!B.value),O=r.computed(()=>/\bborder-/.test(p.value??"")),I=r.computed(()=>/\bhover:/.test(p.value??"")),D=r.computed(()=>{const j=p.value??"";return a.value!=="outline"?j:j.replaceAll(/\bbg-(?!gradient)[^\s]+\b/gu,"").replaceAll(/\bhover:bg-(?!gradient)[^\s]+\b/gu,"").replaceAll(/\s+/gu," ").trim()}),w=r.ref(null),E=j=>{const Y=j.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*([0-9.]+))?\)/u);return Y?{r:Number(Y[1]),g:Number(Y[2]),b:Number(Y[3]),a:Y[4]?Number(Y[4]):1}:null},F=(j,Y)=>{const J=E(j);if(!J)return j;const U=k=>Math.max(0,Math.min(255,Math.round(k)));return`rgba(${U(J.r*(1-Y))}, ${U(J.g*(1-Y))}, ${U(J.b*(1-Y))}, ${J.a})`},A=j=>{if(globalThis.window===void 0)return null;const Y=document.createElement("div");Y.className=j,Y.style.position="absolute",Y.style.visibility="hidden",Y.style.pointerEvents="none",Y.style.width="1px",Y.style.height="1px",document.body.appendChild(Y);const J=globalThis.getComputedStyle(Y).backgroundColor;return Y.remove(),!J||J==="transparent"||J==="rgba(0, 0, 0, 0)"?null:J},P=[50,100,200,300,400,500,600,700,800,900,950],q=j=>{const Y=P.indexOf(j);return Y===-1?j:P[Math.min(P.length-1,Y+2)]},Q=(j,Y)=>{const J=C4[j];if(!J)return null;if(typeof J=="string")return J;if(!Y)return null;const U=J[Y];return typeof U=="string"?U:null},re=(j,Y=!1)=>{if(!j)return null;const J=Y?/\bhover:bg-(?!gradient)([a-z-]+)(?:-(\d{2,3}))?\b/u:/\bbg-(?!gradient)([a-z-]+)(?:-(\d{2,3}))?\b/u,U=j.match(J);return U?{colorName:U[1],shade:U[2]?Number.parseInt(U[2],10):null}:null},ie=()=>{const j=B.value;if(!j){w.value=null;return}const Y=re(j),J=Y?.colorName,U=Y?.shade??null,k=(J?Q(J,U):null)??A(j);if(!k){w.value=null;return}let C;const T=re(R.value,!0),M=T?Q(T.colorName,T.shade??null):null;if(M)C=M;else if(J&&U){const $=q(U);C=Q(J,$)??F(k,.2)}else C=F(k,.2);w.value={"--btn-color":k,"--btn-color-hover":C}};r.onMounted(()=>{ie()}),r.watch([B,R],async()=>{await r.nextTick(),ie()});const le=r.computed(()=>{const j=/\bdark:bg-/.test(p.value??"");return!S.value||a.value==="outline"||j?"":w.value?"dcode-btn--fill dcode-btn--fill-hover":I.value?"":"hover:brightness-90"}),X=r.computed(()=>{if(!S.value||a.value!=="outline")return"";const j=["dcode-btn--outline","dcode-btn--outline-hover"];return O.value||j.push("border"),!w.value&&!I.value&&j.push("hover:brightness-90"),j.join(" ")}),K=r.computed(()=>w.value??void 0),W={primary:{bg:"bg-primary",border:"border-primary",text:"text-primary-foreground",hoverBg:"hover:bg-primary/90",hoverBorder:"hover:border-primary/90",hoverText:"hover:text-primary-foreground",toneText:"text-primary",tonalBg:"bg-primary/10",tonalHover:"hover:bg-primary/20",subtleHover:"hover:bg-primary/10"},success:{bg:"bg-green-600 dark:bg-green-500",border:"border-green-600 dark:border-green-500",text:"text-white",hoverBg:"hover:bg-green-700 dark:hover:bg-green-600",hoverBorder:"hover:border-green-700 dark:hover:border-green-600",hoverText:"hover:text-white",toneText:"text-green-600 dark:text-green-400",tonalBg:"bg-green-500/10 dark:bg-green-500/20",tonalHover:"hover:bg-green-500/20 dark:hover:bg-green-500/30",subtleHover:"hover:bg-green-500/10 dark:hover:bg-green-500/20"},warning:{bg:"bg-yellow-500 dark:bg-yellow-400",border:"border-yellow-500 dark:border-yellow-400",text:"text-white",hoverBg:"hover:bg-yellow-600 dark:hover:bg-yellow-500",hoverBorder:"hover:border-yellow-600 dark:hover:border-yellow-500",hoverText:"hover:text-white",toneText:"text-yellow-600 dark:text-yellow-400",tonalBg:"bg-yellow-500/10 dark:bg-yellow-500/20",tonalHover:"hover:bg-yellow-500/20 dark:hover:bg-yellow-500/30",subtleHover:"hover:bg-yellow-500/10 dark:hover:bg-yellow-500/20"},danger:{bg:"bg-red-600 dark:bg-red-500",border:"border-red-600 dark:border-red-500",text:"text-white",hoverBg:"hover:bg-red-700 dark:hover:bg-red-600",hoverBorder:"hover:border-red-700 dark:hover:border-red-600",hoverText:"hover:text-white",toneText:"text-red-600 dark:text-red-400",tonalBg:"bg-red-500/10 dark:bg-red-500/20",tonalHover:"hover:bg-red-500/20 dark:hover:bg-red-500/30",subtleHover:"hover:bg-red-500/10 dark:hover:bg-red-500/20"},info:{bg:"bg-cyan-600 dark:bg-cyan-500",border:"border-cyan-600 dark:border-cyan-500",text:"text-white",hoverBg:"hover:bg-cyan-700 dark:hover:bg-cyan-600",hoverBorder:"hover:border-cyan-700 dark:hover:border-cyan-600",hoverText:"hover:text-white",toneText:"text-cyan-600 dark:text-cyan-400",tonalBg:"bg-cyan-500/10 dark:bg-cyan-500/20",tonalHover:"hover:bg-cyan-500/20 dark:hover:bg-cyan-500/30",subtleHover:"hover:bg-cyan-500/10 dark:hover:bg-cyan-500/20"},secondary:{bg:"bg-gray-600 dark:bg-gray-500",border:"border-gray-600 dark:border-gray-500",text:"text-white",hoverBg:"hover:bg-gray-700 dark:hover:bg-gray-600",hoverBorder:"hover:border-gray-700 dark:hover:border-gray-600",hoverText:"hover:text-white",toneText:"text-gray-600 dark:text-gray-300",tonalBg:"bg-gray-500/10 dark:bg-gray-500/20",tonalHover:"hover:bg-gray-500/20 dark:hover:bg-gray-500/30",subtleHover:"hover:bg-gray-500/10 dark:hover:bg-gray-500/20"},purple:{bg:"bg-purple-600 dark:bg-purple-500",border:"border-purple-600 dark:border-purple-500",text:"text-white",hoverBg:"hover:bg-purple-700 dark:hover:bg-purple-600",hoverBorder:"hover:border-purple-700 dark:hover:border-purple-600",hoverText:"hover:text-white",toneText:"text-purple-600 dark:text-purple-400",tonalBg:"bg-purple-500/10 dark:bg-purple-500/20",tonalHover:"hover:bg-purple-500/20 dark:hover:bg-purple-500/30",subtleHover:"hover:bg-purple-500/10 dark:hover:bg-purple-500/20"},pink:{bg:"bg-pink-600 dark:bg-pink-500",border:"border-pink-600 dark:border-pink-500",text:"text-white",hoverBg:"hover:bg-pink-700 dark:hover:bg-pink-600",hoverBorder:"hover:border-pink-700 dark:hover:border-pink-600",hoverText:"hover:text-white",toneText:"text-pink-600 dark:text-pink-400",tonalBg:"bg-pink-500/10 dark:bg-pink-500/20",tonalHover:"hover:bg-pink-500/20 dark:hover:bg-pink-500/30",subtleHover:"hover:bg-pink-500/10 dark:hover:bg-pink-500/20"},dark:{bg:"bg-gray-900 dark:bg-gray-800",border:"border-gray-900 dark:border-gray-700",text:"text-white",hoverBg:"hover:bg-black dark:hover:bg-gray-950",hoverBorder:"hover:border-black dark:hover:border-gray-600",hoverText:"hover:text-white",toneText:"text-gray-900 dark:text-gray-100",tonalBg:"bg-gray-900/10 dark:bg-gray-100/10",tonalHover:"hover:bg-gray-900/20 dark:hover:bg-gray-100/20",subtleHover:"hover:bg-gray-900/10 dark:hover:bg-gray-100/10"},light:{bg:"bg-gray-100 dark:bg-gray-800",border:"border-gray-300 dark:border-gray-600",text:"text-gray-900 dark:text-gray-100",hoverBg:"hover:bg-gray-200 dark:hover:bg-gray-700",hoverBorder:"hover:border-gray-400 dark:hover:border-gray-500",hoverText:"hover:text-gray-900 dark:hover:text-gray-100",toneText:"text-gray-800 dark:text-gray-200",tonalBg:"bg-gray-200/50 dark:bg-gray-700/50",tonalHover:"hover:bg-gray-300/60 dark:hover:bg-gray-600/60",subtleHover:"hover:bg-gray-200/50 dark:hover:bg-gray-700/50"}},se={"gradient-blue":{bg:"bg-gradient-to-r from-blue-500 to-cyan-500",text:"text-white",hover:"hover:from-blue-600 hover:to-cyan-600"},"gradient-purple":{bg:"bg-gradient-to-r from-purple-500 to-pink-500",text:"text-white",hover:"hover:from-purple-600 hover:to-pink-600"},"gradient-sunset":{bg:"bg-gradient-to-r from-orange-500 to-red-500",text:"text-white",hover:"hover:from-orange-600 hover:to-red-600"},"gradient-emerald":{bg:"bg-gradient-to-r from-emerald-500 to-teal-500",text:"text-white",hover:"hover:from-emerald-600 hover:to-teal-600"}},H=r.computed(()=>{const j=[],Y=l.value,J=String(n.borderColor||"").toLowerCase(),U=a.value,k=String(n.variant||"default").toLowerCase(),C=Y?W[Y]:null,T=Y?se[Y]:null,M=J?W[J]:null;return C?U==="outline"?(j.push("bg-transparent",C.subtleHover),n.textColor||j.push(C.toneText)):U==="ghost"?(j.push("bg-transparent border-transparent",C.subtleHover),n.textColor||j.push(C.toneText)):k==="tonal"?(j.push(C.tonalBg,C.tonalHover),n.textColor||j.push(C.toneText)):U==="link"?(j.push("bg-transparent border-transparent"),n.textColor||j.push(C.toneText,"underline-offset-4 hover:underline")):(j.push(C.bg,C.hoverBg),n.textColor||j.push(C.text,C.hoverText),k==="elevated"&&j.push("shadow-md hover:shadow-lg shadow-black/10 dark:shadow-black/30")):T?U==="outline"||U==="ghost"?j.push("bg-transparent"):(j.push(T.bg,T.hover),n.textColor||j.push(T.text)):Y==="transparent"?j.push("bg-transparent hover:bg-black/5 dark:hover:bg-white/5"):Y&&j.push(Y),J?M?j.push(M.border,M.hoverBorder):j.push(J):C&&U!=="ghost"&&U!=="link"&&j.push(C.border),n.textColor&&j.push(n.textColor),j.join(" ")}),N=r.computed(()=>_n(T4,sn(n.rounded),_.value,D.value,le.value,X.value,H.value));return(j,Y)=>s.value?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[e.skeleton?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(x.value),"aria-hidden":"true"},null,2)):(r.openBlock(),r.createBlock(r.unref(id),{key:1,"delay-duration":0},{default:r.withCtx(()=>[i.value?(r.openBlock(),r.createBlock(r.unref(od),{key:0},{default:r.withCtx(()=>[r.createVNode(r.unref(sd),{"as-child":""},{default:r.withCtx(()=>[r.createVNode(r.unref(Bi),r.mergeProps({variant:a.value,size:n.size,disabled:n.disabled||f.value,type:c.value,class:N.value,style:K.value},h.value),{default:r.withCtx(()=>[f.value?(r.openBlock(),r.createBlock(Yt.Loader2,{key:0,class:"h-[18px] w-[18px] animate-spin"})):o.value?(r.openBlock(),r.createBlock(r.resolveDynamicComponent(o.value),{key:1,class:"h-[18px] w-[18px]"})):r.createCommentVNode("",!0),n.text?(r.openBlock(),r.createElementBlock("span",{key:2,class:r.normalizeClass(f.value||o.value?"ml-1":"")},r.toDisplayString(n.text),3)):r.createCommentVNode("",!0)]),_:1},16,["variant","size","disabled","type","class","style"])]),_:1}),r.createVNode(r.unref(rd),{side:"top","side-offset":8,class:"z-[100] animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 bg-gray-900 dark:bg-gray-100 text-white dark:text-gray-900 px-3 py-2 rounded-lg text-sm font-medium shadow-xl border-0"},{default:r.withCtx(()=>[r.createElementVNode("span",A4,r.toDisplayString(n.tooltip),1)]),_:1})]),_:1})):(r.openBlock(),r.createBlock(r.unref(Bi),r.mergeProps({key:1,variant:a.value,size:n.size,disabled:n.disabled||f.value,type:c.value,class:N.value,style:K.value},h.value),{default:r.withCtx(()=>[r.renderSlot(j.$slots,"default",{},()=>[f.value?(r.openBlock(),r.createBlock(Yt.Loader2,{key:0,class:"h-[18px] w-[18px] animate-spin"})):o.value?(r.openBlock(),r.createBlock(r.resolveDynamicComponent(o.value),{key:1,class:"h-[18px] w-[18px]"})):r.createCommentVNode("",!0),n.text?(r.openBlock(),r.createElementBlock("span",{key:2,class:r.normalizeClass(f.value||o.value?"ml-1":"")},r.toDisplayString(n.text),3)):r.createCommentVNode("",!0)],!0)]),_:3},16,["variant","size","disabled","type","class","style"]))]),_:3}))],64)):r.createCommentVNode("",!0)}}),Sn=(e,t)=>{const n=e.__vccOpts||e;for(const[o,i]of t)n[o]=i;return n},Ut=Sn(B4,[["__scopeId","data-v-2e698b35"]]),P4={key:0,class:"animate-pulse"},N4={key:1,class:"inline-flex items-center"},D4={class:"truncate"},M4={class:"flex flex-col"},R4={key:0,class:"mx-2 border-t border-slate-100 dark:border-neutral-800"},I4=["disabled","onClick"],O4={class:"flex-1 whitespace-nowrap text-left"},Fa=r.defineComponent({name:"DCodeButtonGroup",inheritAttrs:!1,__name:"DCodeButtonGroup",props:{text:{default:""},label:{default:""},labelID:{default:""},labelEN:{default:""},labelKR:{default:""},icon:{},buttons:{default:()=>[]},items:{default:()=>[]},variant:{default:"default"},size:{default:"default"},bgColor:{default:""},textColor:{default:""},borderColor:{default:""},rounded:{default:"md"},borderStyle:{default:"solid"},orientation:{default:"horizontal"},disabled:{type:Boolean,default:!1},visible:{type:Boolean,default:!0},skeleton:{type:Boolean,default:!1},class:{},menuAlign:{default:"right"}},emits:["button-click","action","click"],setup(e,{emit:t}){const n=e,o=t;let i=null;try{const{locale:b}=In.useI18n();i=b}catch{}const s=r.ref(!1),a=r.ref(null),l=r.computed(()=>(n.buttons?.length?n.buttons:n.items||[]).filter(_=>_.visible!==!1)),c=r.computed(()=>{const b=String(i?.value||"id").toLowerCase();return b==="kr"||b==="ko"?n.labelKR||n.labelEN||n.labelID||n.label||n.text||"Group Buttons":b==="en"?n.labelEN||n.labelID||n.label||n.text||"Group Buttons":n.labelID||n.labelEN||n.label||n.text||"Group Buttons"}),d=b=>{const _=String(i?.value||"id").toLowerCase(),x=b.propsActionGlobal||b.propsActionCustom||b.props||{};return _==="kr"||_==="ko"?b.labelKR||x.labelKR||b.labelEN||x.labelEN||b.labelID||x.labelID||b.label||x.label||b.text||x.text||"":_==="en"?b.labelEN||x.labelEN||b.labelID||x.labelID||b.label||x.label||b.text||x.text||"":b.labelID||x.labelID||b.labelEN||x.labelEN||b.label||x.label||b.text||x.text||""},f=b=>b?Ti(b,Yt):null,h=b=>{b.stopPropagation(),!n.disabled&&(s.value=!s.value)},p=(b,_)=>{_.stopPropagation(),!(n.disabled||b.disabled)&&(s.value=!1,o("button-click",b,_),o("action",b,_),o("click",b,_))},g=b=>{a.value&&!a.value.contains(b.target)&&(s.value=!1)},y=b=>{b.key==="Escape"&&s.value&&(s.value=!1)};return r.onMounted(()=>{document.addEventListener("click",g),document.addEventListener("keydown",y)}),r.onBeforeUnmount(()=>{document.removeEventListener("click",g),document.removeEventListener("keydown",y)}),(b,_)=>e.visible?(r.openBlock(),r.createElementBlock("div",{key:0,ref_key:"dropdownRef",ref:a,class:r.normalizeClass(["relative inline-flex flex-col",n.class])},[e.skeleton?(r.openBlock(),r.createElementBlock("div",P4,[..._[0]||(_[0]=[r.createElementVNode("div",{class:"h-9 w-28 bg-muted rounded-md"},null,-1)])])):(r.openBlock(),r.createElementBlock("div",N4,[r.createVNode(Ut,{text:c.value,icon:n.icon,variant:e.variant,size:e.size,"bg-color":e.bgColor,"text-color":e.textColor,"border-color":e.borderColor,"border-style":e.borderStyle,rounded:e.rounded,disabled:e.disabled,type:"button",class:r.normalizeClass(["group/btn gap-1.5 inline-flex items-center select-none",{"ring-2 ring-indigo-300/40 dark:ring-indigo-500/30":s.value}]),onClick:h},{default:r.withCtx(()=>[r.createElementVNode("span",D4,r.toDisplayString(c.value),1),_[1]||(_[1]=r.createElementVNode("span",{class:"w-px h-3.5 bg-current opacity-20 mx-0.5 shrink-0"},null,-1)),r.createVNode(r.unref(Ae.ChevronDown),{class:r.normalizeClass(["w-3.5 h-3.5 transition-transform duration-200 shrink-0 opacity-70 group-hover/btn:opacity-100",{"rotate-180":s.value}])},null,8,["class"])]),_:1},8,["text","icon","variant","size","bg-color","text-color","border-color","border-style","rounded","disabled","class"])])),r.createVNode(r.Transition,{"enter-active-class":"transition duration-200 ease-out origin-top","enter-from-class":"transform scale-y-95 opacity-0 -translate-y-1","enter-to-class":"transform scale-y-100 opacity-100 translate-y-0","leave-active-class":"transition duration-150 ease-in origin-top","leave-from-class":"transform scale-y-100 opacity-100 translate-y-0","leave-to-class":"transform scale-y-95 opacity-0 -translate-y-1"},{default:r.withCtx(()=>[s.value&&l.value.length>0?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(["absolute top-full mt-1.5 z-50 min-w-[200px] w-max max-w-[360px] overflow-hidden rounded-xl border border-slate-200/80 dark:border-neutral-700/80 bg-white dark:bg-neutral-900 py-1.5 shadow-2xl shadow-black/15 dark:shadow-black/60 ring-1 ring-black/[0.06] dark:ring-white/[0.08] backdrop-blur-xl",e.menuAlign==="left"?"left-0":"right-0"])},[r.createElementVNode("div",M4,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(l.value,(x,B)=>(r.openBlock(),r.createElementBlock(r.Fragment,{key:x.id||x.key||x.value||B},[B>0?(r.openBlock(),r.createElementBlock("div",R4)):r.createCommentVNode("",!0),r.createElementVNode("button",{type:"button",disabled:x.disabled,class:"group/item relative flex w-full items-center gap-2.5 rounded-md mx-1 px-3 py-2 text-[13px] font-medium text-slate-700 dark:text-neutral-300 outline-none transition-all duration-150 hover:bg-indigo-50 dark:hover:bg-indigo-500/10 hover:text-indigo-700 dark:hover:text-indigo-300 focus-visible:bg-indigo-50 dark:focus-visible:bg-indigo-500/10 focus-visible:text-indigo-700 dark:focus-visible:text-indigo-300 focus-visible:outline-none disabled:pointer-events-none disabled:opacity-40 text-left cursor-pointer",style:{width:"calc(100% - 0.5rem)"},onClick:R=>p(x,R)},[x.icon||x.propsActionGlobal?.icon||x.propsActionCustom?.icon||x.props?.icon?(r.openBlock(),r.createBlock(r.resolveDynamicComponent(f(x.icon||x.propsActionGlobal?.icon||x.propsActionCustom?.icon||x.props?.icon)),{key:0,class:"w-4 h-4 shrink-0 text-slate-400 group-hover/item:text-indigo-500 dark:text-neutral-500 dark:group-hover/item:text-indigo-400 transition-colors duration-150"})):r.createCommentVNode("",!0),r.createElementVNode("span",O4,r.toDisplayString(d(x)||x.value||"Option"),1),_[2]||(_[2]=r.createElementVNode("span",{class:"w-1.5 h-1.5 rounded-full bg-indigo-400/0 group-hover/item:bg-indigo-400 dark:group-hover/item:bg-indigo-500 transition-all duration-200 shrink-0"},null,-1))],8,I4)],64))),128))])],2)):r.createCommentVNode("",!0)]),_:1})],2)):r.createCommentVNode("",!0)}}),L4={class:"flex flex-col gap-1"},F4={key:0,class:"flex items-center gap-2"},$4={name:"DCodeCard"},Pi=r.defineComponent({...$4,props:{level:{default:1},title:{},subtitle:{},shadow:{type:Boolean,default:!1},border:{type:Boolean,default:!0},padding:{default:"p-6"},headerTheme:{default:"neutral"}},setup(e){const t=e,n=r.useSlots(),o=d=>{if(!d)return!1;const f=d(),h=p=>p.some(g=>g.type===r.Comment?!1:g.type===r.Fragment?Array.isArray(g.children)&&h(g.children):g.type===r.Text?typeof g.children=="string"&&g.children.trim()!=="":!(g.dirs&&g.dirs.some(b=>(b.dir===r.vShow||b.dir?.name==="show")&&b.value===!1)));return h(f)},i=r.computed(()=>!!(t.title||n.header||n.actions)),s=r.computed(()=>o(n.default)),a=r.computed(()=>o(n.footer)),l=r.computed(()=>i.value||s.value||a.value),c=r.computed(()=>{switch(t.level){case 2:return"bg-neutral-50 dark:bg-neutral-800";case 3:return"bg-neutral-100 dark:bg-neutral-700";default:return"bg-white dark:bg-neutral-900"}});return(d,f)=>l.value?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(["transition-shadow duration-300 dcode-card",[c.value,{"shadow-md":e.shadow},{"border-transparent":!e.border},{"border border-neutral-200 dark:border-neutral-800":e.border&&e.level===1},{"border border-neutral-300 dark:border-neutral-700":e.border&&e.level!==1},"overflow-hidden"]])},[i.value?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(["flex items-center justify-between backdrop-blur-sm transition-colors duration-300 px-4 py-3",[e.title||d.$slots.header?e.headerTheme==="primary"?"bg-primary-700 dark:bg-primary-900 border-b border-primary-500/30 dark:border-primary-900/50":"bg-neutral-200/50 dark:bg-neutral-950/40 border-b border-neutral-200 dark:border-neutral-800/50":"bg-transparent border-b-transparent"]])},[r.createElementVNode("div",L4,[r.renderSlot(d.$slots,"header",{},()=>[e.title?(r.openBlock(),r.createElementBlock("h3",{key:0,class:r.normalizeClass(["text-sm font-semibold leading-tight",e.headerTheme==="primary"?"text-white dark:text-neutral-100":"text-neutral-900 dark:text-neutral-100"])},r.toDisplayString(e.title),3)):r.createCommentVNode("",!0),e.subtitle?(r.openBlock(),r.createElementBlock("p",{key:1,class:r.normalizeClass(["text-xs",e.headerTheme==="primary"?"text-white/80 dark:text-neutral-300":"text-neutral-500 dark:text-neutral-400"])},r.toDisplayString(e.subtitle),3)):r.createCommentVNode("",!0)])]),d.$slots.actions?(r.openBlock(),r.createElementBlock("div",F4,[r.renderSlot(d.$slots,"actions")])):r.createCommentVNode("",!0)],2)):r.createCommentVNode("",!0),s.value?(r.openBlock(),r.createElementBlock("div",{key:1,class:r.normalizeClass(["relative z-10",e.padding])},[r.renderSlot(d.$slots,"default")],2)):r.createCommentVNode("",!0),a.value?(r.openBlock(),r.createElementBlock("div",{key:2,class:r.normalizeClass(["mt-6 pt-6 border-t border-neutral-200/60 dark:border-neutral-700/50",e.padding])},[r.renderSlot(d.$slots,"footer")],2)):r.createCommentVNode("",!0)],2)):r.createCommentVNode("",!0)}}),Ul=r.defineComponent({name:"DCodeLabel",inheritAttrs:!1,__name:"DCodeLabel",props:{label:{},text:{},textSize:{},textType:{},icon:{},iconClass:{}},setup(e){const t=r.useAttrs(),n=e,o=r.computed(()=>Ti(n.icon,Yt)),i=r.computed(()=>n.textSize?`text-${n.textSize}`:"text-xs"),s={xs:"w-3 h-3",sm:"w-3.5 h-3.5",base:"w-4 h-4",lg:"w-5 h-5",xl:"w-5 h-5","2xl":"w-6 h-6","3xl":"w-7 h-7","4xl":"w-8 h-8","5xl":"w-10 h-10","6xl":"w-12 h-12"},a=r.computed(()=>s[n.textSize??"xs"]??"w-3 h-3"),l=r.computed(()=>n.textType==="BOLD"?"font-bold":n.textType==="ITALIC"?"italic font-normal":"font-normal"),c=r.computed(()=>{const f=`${i.value} ${l.value} text-zinc-700 dark:text-zinc-400 ml-1 inline-flex items-center gap-1`,h=t.class??"";return[f,h].filter(Boolean).join(" ")}),d=r.computed(()=>{const{class:f,...h}=t;return h});return(f,h)=>(r.openBlock(),r.createElementBlock("span",r.mergeProps({class:c.value},d.value),[o.value?(r.openBlock(),r.createBlock(r.resolveDynamicComponent(o.value),{key:0,class:r.normalizeClass(["shrink-0",a.value,e.iconClass])},null,8,["class"])):r.createCommentVNode("",!0),r.createTextVNode(" "+r.toDisplayString(e.label||e.text),1)],16))}}),z4=["aria-busy"],j4=["title"],U4=["href"],W4={class:"truncate max-w-[150px]"},H4=["title"],Uu=r.defineComponent({name:"DCodeStaticLabel",__name:"DCodeStaticLabel",props:{label:{},modelValue:{},value:{},icon:{},color:{},valueType:{},prefix:{},suffix:{},type:{},locale:{default:"id-ID"},badgeColor:{default:"secondary"},placeholder:{default:"-"},skeleton:{type:Boolean,default:!1},dummyMode:{type:Boolean,default:!1},align:{default:"start"}},setup(e){const t=e,n=r.ref(!1),o=r.computed(()=>t.modelValue??t.value),i={start:"start",left:"start",center:"center",middle:"center",end:"end",right:"end"},s=r.computed(()=>i[String(t.align).toLowerCase()]??"end"),a=r.computed(()=>s.value==="start"?"w-1/2 min-w-0 overflow-hidden":"shrink-0"),l=r.computed(()=>({start:"justify-start text-left",center:"justify-center text-center",end:"justify-end text-right"})[s.value]),c=r.computed(()=>(t.valueType||t.type||"text").toUpperCase()),d=r.computed(()=>{const p=t.color||"secondary",g={primary:"border-blue-200 text-blue-700 dark:text-blue-400 dark:border-blue-900/50",success:"border-green-200 text-green-700 dark:text-green-400 dark:border-green-900/50",warning:"border-yellow-200 text-yellow-700 dark:text-yellow-400 dark:border-yellow-900/50",danger:"border-red-200 text-red-700 dark:text-red-400 dark:border-red-900/50",info:"border-cyan-200 text-cyan-700 dark:text-cyan-400 dark:border-cyan-900/50",secondary:"border-slate-200 text-slate-700 dark:border-slate-700/50 dark:text-slate-200",dark:"border-b border-gray-300 text-gray-900 dark:text-gray-100 dark:border-gray-700"};return g[p]||g.secondary}),f=r.computed(()=>{const p=t.badgeColor||"secondary",g={primary:"bg-blue-50 border-blue-200 text-blue-700 dark:bg-blue-950/20 dark:border-blue-900/50 dark:text-blue-400",success:"bg-green-50 border-green-200 text-green-700 dark:bg-green-950/20 dark:border-green-900/50 dark:text-green-400",warning:"bg-yellow-50 border-yellow-200 text-yellow-700 dark:bg-yellow-950/20 dark:border-yellow-900/50 dark:text-yellow-400",danger:"bg-red-50 border-red-200 text-red-700 dark:bg-red-950/20 dark:border-red-900/50 dark:text-red-400",info:"bg-cyan-50 border-cyan-200 text-cyan-700 dark:bg-cyan-950/20 dark:border-cyan-900/50 dark:text-cyan-400",secondary:"bg-slate-50 border-slate-200 text-slate-700 dark:bg-slate-900/20 dark:border-slate-800 dark:text-slate-200",dark:"bg-neutral-100 border-neutral-300 text-neutral-900 dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-100"};return g[p]||g.secondary}),h=r.computed(()=>{const p=o.value;if(p==null||p==="")return t.dummyMode?t.placeholder:"-";let g="";switch(c.value){case"DATE":g=nd(p,"short",t.locale);break;case"DATETIME":g=nd(p,"datetime",t.locale);break;case"CURRENCY":const _=t.prefix||"IDR";g=Zb(p,_);break;case"BOOLEAN":typeof p=="boolean"?g=t.locale.startsWith("id")?p?"Ya":"Tidak":p?"Yes":"No":g=String(p);break;case"NUMBER":const x=Number(p);g=isNaN(x)?String(p):new Intl.NumberFormat(t.locale).format(x);break;case"PASSWORD":g=n.value?String(p):"•".repeat(String(p).length||8);break;case"FILE":typeof p=="string"?g=p.split("/").pop()||"Attachment":g=p.name??p.label??"Attachment";break;default:typeof p=="object"&&p!==null?g=p.name??p.label??p.code??p.value??p.id??JSON.stringify(p):g=String(p);break}const y=c.value!=="CURRENCY"&&t.prefix?t.prefix:"",b=t.suffix||"";return`${y}${g}${b}`});return(p,g)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["flex flex-row justify-between items-center gap-4 py-3 px-0 border-b transition-all duration-300 rounded-none bg-transparent",d.value]),"aria-busy":e.skeleton},[e.skeleton?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[r.createElementVNode("div",{class:r.normalizeClass(["h-4 rounded bg-gray-200 dark:bg-gray-700 animate-shimmer",s.value==="start"?"w-1/2":"w-32"])},null,2),r.createElementVNode("div",{class:r.normalizeClass(["h-4 rounded bg-gray-200 dark:bg-gray-700 animate-shimmer",s.value==="start"?"w-1/2":"w-24"])},null,2)],64)):(r.openBlock(),r.createElementBlock(r.Fragment,{key:1},[r.createElementVNode("div",{class:r.normalizeClass(["flex items-center gap-2",a.value])},[r.createVNode(Ul,{label:e.label,icon:e.icon,class:"text-xs font-bold text-neutral-500 dark:text-neutral-400 uppercase tracking-wider"},null,8,["label","icon"])],2),r.createElementVNode("div",{class:r.normalizeClass(["flex-1 overflow-hidden flex items-center gap-2",l.value])},[r.renderSlot(p.$slots,"value",{},()=>[c.value==="PASSWORD"?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[r.createElementVNode("span",{class:"text-sm font-mono font-medium truncate block",title:String(o.value||"")},r.toDisplayString(h.value),9,j4),r.createElementVNode("button",{type:"button",class:"p-1 hover:bg-neutral-100 dark:hover:bg-neutral-800 rounded transition-colors text-neutral-500 hover:text-neutral-800 dark:hover:text-neutral-200",onClick:g[0]||(g[0]=y=>n.value=!n.value)},[n.value?(r.openBlock(),r.createBlock(r.unref(Ae.EyeOff),{key:1,class:"w-4 h-4"})):(r.openBlock(),r.createBlock(r.unref(Ae.Eye),{key:0,class:"w-4 h-4"}))])],64)):c.value==="BADGE"?(r.openBlock(),r.createElementBlock("span",{key:1,class:r.normalizeClass(["inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-semibold border transition-all duration-200",f.value])},r.toDisplayString(h.value),3)):c.value==="FILE"&&o.value&&o.value!==e.placeholder?(r.openBlock(),r.createElementBlock("a",{key:2,href:String(o.value),target:"_blank",class:"inline-flex items-center gap-1.5 text-xs font-semibold text-blue-600 dark:text-blue-400 hover:underline transition-all"},[r.createVNode(r.unref(Ae.FileText),{class:"w-3.5 h-3.5"}),r.createElementVNode("span",W4,r.toDisplayString(h.value),1),r.createVNode(r.unref(Ae.Download),{class:"w-3 h-3 text-neutral-400"})],8,U4)):(r.openBlock(),r.createElementBlock("span",{key:3,class:"text-sm font-medium truncate block",title:h.value},r.toDisplayString(h.value),9,H4))])],2)],64))],10,z4))}}),q4={key:0,class:"inline-block"},os=Sn(r.defineComponent({name:"DCodeBadge",inheritAttrs:!1,__name:"DCodeBadge",props:{text:{default:""},variant:{default:"default"},size:{default:"sm"},icon:{},dot:{type:Boolean,default:!1},pill:{type:Boolean,default:!1},color:{},skeleton:{type:Boolean,default:!1},visible:{type:Boolean,default:!0},class:{}},setup(e){const t=e,n=r.computed(()=>Ti(t.icon,Yt)),o=r.computed(()=>t.visible??!0),i=r.computed(()=>{const h={xs:"px-1.5 py-0.5 text-[10px] gap-1",sm:"px-2.5 py-0.5 text-xs gap-1.5",md:"px-3 py-1 text-sm gap-2",lg:"px-4 py-1.5 text-base gap-2.5"};return h[t.size]||h.sm}),s=r.computed(()=>{const h={xs:"w-1 h-1",sm:"w-1.5 h-1.5",md:"w-2 h-2",lg:"w-2.5 h-2.5"};return h[t.size]||h.sm}),a=r.computed(()=>{const h={xs:"w-2.5 h-2.5",sm:"w-3 h-3",md:"w-4 h-4",lg:"w-5 h-5"};return h[t.size]||h.sm}),l=r.computed(()=>{const h={default:"bg-primary text-primary-foreground border-transparent shadow hover:bg-primary/80",DEFAULT:"bg-primary text-primary-foreground border-transparent shadow hover:bg-primary/80",secondary:"bg-secondary text-secondary-foreground border-transparent hover:bg-secondary/80",SECONDARY:"bg-secondary text-secondary-foreground border-transparent hover:bg-secondary/80",destructive:"bg-destructive text-destructive-foreground border-transparent shadow hover:bg-destructive/80",DESTRUCTIVE:"bg-destructive text-destructive-foreground border-transparent shadow hover:bg-destructive/80",success:"bg-success-500 text-white border-transparent shadow-sm hover:bg-success-600",SUCCESS:"bg-success-500 text-white border-transparent shadow-sm hover:bg-success-600",warning:"bg-warning-500 text-white border-transparent shadow-sm hover:bg-warning-600",WARNING:"bg-warning-500 text-white border-transparent shadow-sm hover:bg-warning-600",info:"bg-blue-500 text-white border-transparent shadow-sm hover:bg-blue-600",INFO:"bg-blue-500 text-white border-transparent shadow-sm hover:bg-blue-600",danger:"bg-red-500 text-white border-transparent shadow-sm hover:bg-red-600",DANGER:"bg-red-500 text-white border-transparent shadow-sm hover:bg-red-600",outline:"bg-transparent border-border text-foreground",OUTLINE:"bg-transparent border-border text-foreground",tonal:"bg-primary/10 text-primary border-transparent hover:bg-primary/20",TONAL:"bg-primary/10 text-primary border-transparent hover:bg-primary/20",ghost:"bg-transparent text-muted-foreground border-transparent hover:bg-accent hover:text-accent-foreground",GHOST:"bg-transparent text-muted-foreground border-transparent hover:bg-accent hover:text-accent-foreground",purple:"bg-purple-600 text-white border-transparent shadow-sm hover:bg-purple-700",PURPLE:"bg-purple-600 text-white border-transparent shadow-sm hover:bg-purple-700",pink:"bg-pink-600 text-white border-transparent shadow-sm hover:bg-pink-700",PINK:"bg-pink-600 text-white border-transparent shadow-sm hover:bg-pink-700",dark:"bg-gray-900 text-white border-transparent shadow-sm hover:bg-gray-950",light:"bg-gray-100 text-gray-900 border-gray-200 hover:bg-gray-200 dark:bg-gray-800 dark:text-gray-100 dark:border-gray-700",link:"bg-transparent text-blue-600 border-transparent hover:underline hover:text-blue-700",LINK:"bg-transparent text-blue-600 border-transparent hover:underline hover:text-blue-700",elevated:"bg-white text-gray-900 border-gray-200 shadow-md hover:shadow-lg dark:bg-gray-800 dark:text-gray-100 dark:border-gray-700",ELEVATED:"bg-white text-gray-900 border-gray-200 shadow-md hover:shadow-lg dark:bg-gray-800 dark:text-gray-100 dark:border-gray-700"};let p=h[t.variant]||h.default;if(t.color){const g=t.color.toLowerCase().replace(/_/g,"-"),y=t.variant?.toLowerCase()||"default",_={primary:{bg:"bg-primary",text:"text-primary-foreground",border:"border-transparent",hover:"hover:bg-primary/80"},success:{bg:"bg-success-500",text:"text-white",border:"border-transparent",hover:"hover:bg-success-600"},warning:{bg:"bg-warning-500",text:"text-white",border:"border-transparent",hover:"hover:bg-warning-600"},danger:{bg:"bg-red-500",text:"text-white",border:"border-transparent",hover:"hover:bg-red-600"},info:{bg:"bg-blue-500",text:"text-white",border:"border-transparent",hover:"hover:bg-blue-600"},purple:{bg:"bg-purple-600",text:"text-white",border:"border-transparent",hover:"hover:bg-purple-700"},pink:{bg:"bg-pink-600",text:"text-white",border:"border-transparent",hover:"hover:bg-pink-700"},"gradient-blue":{bg:"bg-gradient-to-r from-blue-500 to-cyan-500",text:"text-white",border:"border-transparent",hover:"hover:from-blue-600 hover:to-cyan-600"},"gradient-purple":{bg:"bg-gradient-to-r from-purple-500 to-pink-500",text:"text-white",border:"border-transparent",hover:"hover:from-purple-600 hover:to-pink-600"},"gradient-sunset":{bg:"bg-gradient-to-r from-orange-500 to-red-500",text:"text-white",border:"border-transparent",hover:"hover:from-orange-600 hover:to-red-600"},"gradient-emerald":{bg:"bg-gradient-to-r from-emerald-500 to-teal-500",text:"text-white",border:"border-transparent",hover:"hover:from-emerald-600 hover:to-teal-600"}}[g];if(_)switch(y){case"outline":return`${_.border} ${_.text} ${_.hover.replace("hover:bg-","hover:bg-").replace("500","50").replace("600","50")}`;case"tonal":return`${_.bg}/10 ${_.text} ${_.border} ${_.hover.replace("hover:bg-","hover:bg-").replace("500","20").replace("600","20")}`;case"ghost":return`bg-transparent ${_.text} border-transparent hover:bg-accent hover:text-accent-foreground`;case"link":return`bg-transparent ${_.text} border-transparent hover:underline hover:${_.text.replace("text-","text-").replace("-600","-700").replace("-500","-600")}`;case"elevated":return`bg-white ${_.text} border-gray-200 shadow-md hover:shadow-lg dark:bg-gray-800 dark:border-gray-700`;default:return`${_.bg} ${_.text} ${_.border} shadow-sm ${_.hover}`}}return p}),c=r.computed(()=>{const h={default:"bg-primary-foreground",DEFAULT:"bg-primary-foreground",secondary:"bg-secondary-foreground",SECONDARY:"bg-secondary-foreground",destructive:"bg-destructive-foreground",DESTRUCTIVE:"bg-destructive-foreground",success:"bg-white",SUCCESS:"bg-white",warning:"bg-white",WARNING:"bg-white",info:"bg-white",INFO:"bg-white",danger:"bg-white",DANGER:"bg-white",outline:"bg-primary",OUTLINE:"bg-primary",tonal:"bg-primary",TONAL:"bg-primary",ghost:"bg-muted-foreground",GHOST:"bg-muted-foreground",purple:"bg-white",PURPLE:"bg-white",pink:"bg-white",PINK:"bg-white",dark:"bg-white",light:"bg-gray-900",link:"bg-blue-600",LINK:"bg-blue-600",elevated:"bg-gray-900",ELEVATED:"bg-gray-900"};if(t.color){const p=t.color.toLowerCase().replace(/_/g,"-"),g={primary:"bg-primary-foreground",success:"bg-white",warning:"bg-white",danger:"bg-white",info:"bg-white",purple:"bg-white",pink:"bg-white","gradient-blue":"bg-white","gradient-purple":"bg-white","gradient-sunset":"bg-white","gradient-emerald":"bg-white"};if(g[p])return g[p]}return h[t.variant]||"bg-current"}),d=r.computed(()=>{const h={xs:"h-4 w-10",sm:"h-5 w-14",md:"h-6 w-18",lg:"h-7 w-24"};return _n(h[t.size]||h.sm,"rounded animate-pulse bg-muted")}),f=r.computed(()=>_n("inline-flex items-center font-semibold border transition-all duration-300 select-none focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 max-w-full whitespace-normal break-words text-left",t.pill?"rounded-full":"rounded-md",i.value,l.value,t.class));return(h,p)=>o.value?(r.openBlock(),r.createElementBlock("div",q4,[e.skeleton?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(d.value)},null,2)):(r.openBlock(),r.createElementBlock("div",{key:1,class:r.normalizeClass(f.value)},[e.dot?(r.openBlock(),r.createElementBlock("span",{key:0,class:r.normalizeClass(["rounded-full animate-pulse flex-shrink-0",s.value,c.value])},null,2)):r.createCommentVNode("",!0),n.value?(r.openBlock(),r.createBlock(r.resolveDynamicComponent(n.value),{key:1,class:r.normalizeClass(["flex-shrink-0",a.value]),"stroke-width":"2.5"},null,8,["class"])):r.createCommentVNode("",!0),r.renderSlot(h.$slots,"default",{},()=>[r.createElementVNode("span",null,r.toDisplayString(e.text),1)],!0)],2))])):r.createCommentVNode("",!0)}}),[["__scopeId","data-v-4aca395e"]]),K4=r.defineComponent({__name:"Pagination",props:{page:{},defaultPage:{},itemsPerPage:{},total:{},siblingCount:{},disabled:{type:Boolean},showEdges:{type:Boolean},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},emits:["update:page"],setup(e,{emit:t}){const n=e,o=t,i=Lo.reactiveOmit(n,"class"),s=Lt.useForwardPropsEmits(i,o);return(a,l)=>(r.openBlock(),r.createBlock(r.unref(Lt.PaginationRoot),r.mergeProps({"data-slot":"pagination"},r.unref(s),{class:n.class}),{default:r.withCtx(c=>[r.renderSlot(a.$slots,"default",r.normalizeProps(r.guardReactiveProps(c)))]),_:3},16,["class"]))}}),G4=r.defineComponent({__name:"PaginationContent",props:{asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,n=Lo.reactiveOmit(t,"class");return(o,i)=>(r.openBlock(),r.createBlock(r.unref(Lt.PaginationList),r.mergeProps({"data-slot":"pagination-content"},r.unref(n),{class:r.unref(_n)("flex flex-row items-center gap-1",t.class)}),{default:r.withCtx(s=>[r.renderSlot(o.$slots,"default",r.normalizeProps(r.guardReactiveProps(s)))]),_:3},16,["class"]))}}),Y4=r.defineComponent({__name:"PaginationEllipsis",props:{asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,n=Lo.reactiveOmit(t,"class");return(o,i)=>(r.openBlock(),r.createBlock(r.unref(Lt.PaginationEllipsis),r.mergeProps({"data-slot":"pagination-ellipsis"},r.unref(n),{class:r.unref(_n)("flex size-9 items-center justify-center",t.class)}),{default:r.withCtx(()=>[r.renderSlot(o.$slots,"default",{},()=>[r.createVNode(r.unref(Ae.MoreHorizontal),{class:"size-4"}),i[0]||(i[0]=r.createElementVNode("span",{class:"sr-only"},"More pages",-1))])]),_:3},16,["class"]))}}),Z4=r.defineComponent({__name:"Select",props:{open:{type:Boolean},defaultOpen:{type:Boolean},defaultValue:{},modelValue:{},nullableValue:{},by:{type:[String,Function]},dir:{},multiple:{type:Boolean},autocomplete:{},disabled:{type:Boolean},name:{},required:{type:Boolean}},emits:["update:modelValue","update:open"],setup(e,{emit:t}){const n=e,o=t,i=Lt.useForwardPropsEmits(n,o);return(s,a)=>(r.openBlock(),r.createBlock(r.unref(Lt.SelectRoot),r.normalizeProps(r.guardReactiveProps(r.unref(i))),{default:r.withCtx(()=>[r.renderSlot(s.$slots,"default")]),_:3},16))}}),X4=r.defineComponent({inheritAttrs:!1,__name:"SelectContent",props:{forceMount:{type:Boolean},position:{default:"popper"},bodyLock:{type:Boolean},memoDependencies:{},side:{},sideOffset:{},sideFlip:{type:Boolean},align:{},alignOffset:{},alignFlip:{type:Boolean},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},hideShiftedArrow:{type:Boolean},sticky:{},hideWhenDetached:{type:Boolean},positionStrategy:{},updatePositionStrategy:{},disableUpdateOnLayoutShift:{type:Boolean},prioritizePosition:{type:Boolean},reference:{},dir:{},asChild:{type:Boolean},as:{},disableOutsidePointerEvents:{type:Boolean},class:{type:[Boolean,null,String,Object,Array]}},emits:["closeAutoFocus","escapeKeyDown","pointerDownOutside"],setup(e,{emit:t}){const n=e,o=t,i=Lo.reactiveOmit(n,"class"),s=Lt.useForwardPropsEmits(i,o);return(a,l)=>(r.openBlock(),r.createBlock(r.unref(Lt.SelectPortal),null,{default:r.withCtx(()=>[r.createVNode(r.unref(Lt.SelectContent),r.mergeProps({...r.unref(s),...a.$attrs},{class:r.unref(_n)("relative z-50 max-h-96 min-w-32 overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e.position==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",n.class)}),{default:r.withCtx(()=>[r.createVNode(r.unref(e3)),r.createVNode(r.unref(Lt.SelectViewport),{class:r.normalizeClass(r.unref(_n)("p-1",e.position==="popper"&&"h-[--reka-select-trigger-height] w-full min-w-[--reka-select-trigger-width]"))},{default:r.withCtx(()=>[r.renderSlot(a.$slots,"default")]),_:3},8,["class"]),r.createVNode(r.unref(V4))]),_:3},16,["class"])]),_:3}))}}),J4={class:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center"},Q4=r.defineComponent({__name:"SelectItem",props:{value:{},disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,n=Lo.reactiveOmit(t,"class"),o=Lt.useForwardProps(n);return(i,s)=>(r.openBlock(),r.createBlock(r.unref(Lt.SelectItem),r.mergeProps(r.unref(o),{class:r.unref(_n)("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t.class)}),{default:r.withCtx(()=>[r.createElementVNode("span",J4,[r.createVNode(r.unref(Lt.SelectItemIndicator),null,{default:r.withCtx(()=>[r.createVNode(r.unref(Ae.Check),{class:"h-4 w-4"})]),_:1})]),r.createVNode(r.unref(Lt.SelectItemText),null,{default:r.withCtx(()=>[r.renderSlot(i.$slots,"default")]),_:3})]),_:3},16,["class"]))}}),V4=r.defineComponent({__name:"SelectScrollDownButton",props:{asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,n=Lo.reactiveOmit(t,"class"),o=Lt.useForwardProps(n);return(i,s)=>(r.openBlock(),r.createBlock(r.unref(Lt.SelectScrollDownButton),r.mergeProps(r.unref(o),{class:r.unref(_n)("flex cursor-default items-center justify-center py-1",t.class)}),{default:r.withCtx(()=>[r.renderSlot(i.$slots,"default",{},()=>[r.createVNode(r.unref(Ae.ChevronDown))])]),_:3},16,["class"]))}}),e3=r.defineComponent({__name:"SelectScrollUpButton",props:{asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,n=Lo.reactiveOmit(t,"class"),o=Lt.useForwardProps(n);return(i,s)=>(r.openBlock(),r.createBlock(r.unref(Lt.SelectScrollUpButton),r.mergeProps(r.unref(o),{class:r.unref(_n)("flex cursor-default items-center justify-center py-1",t.class)}),{default:r.withCtx(()=>[r.renderSlot(i.$slots,"default",{},()=>[r.createVNode(r.unref(Ae.ChevronUp))])]),_:3},16,["class"]))}}),t3=r.defineComponent({__name:"SelectTrigger",props:{disabled:{type:Boolean},reference:{},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,n=Lo.reactiveOmit(t,"class"),o=Lt.useForwardProps(n);return(i,s)=>(r.openBlock(),r.createBlock(r.unref(Lt.SelectTrigger),r.mergeProps(r.unref(o),{class:r.unref(_n)("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background data-[placeholder]:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:truncate text-start",t.class)}),{default:r.withCtx(()=>[r.renderSlot(i.$slots,"default"),r.createVNode(r.unref(Lt.SelectIcon),{"as-child":""},{default:r.withCtx(()=>[r.createVNode(r.unref(Ae.ChevronDown),{class:"w-4 h-4 opacity-50 shrink-0"})]),_:1})]),_:3},16,["class"]))}}),n3=r.defineComponent({__name:"SelectValue",props:{placeholder:{},asChild:{type:Boolean},as:{}},setup(e){const t=e;return(n,o)=>(r.openBlock(),r.createBlock(r.unref(Lt.SelectValue),r.normalizeProps(r.guardReactiveProps(t)),{default:r.withCtx(()=>[r.renderSlot(n.$slots,"default")]),_:3},16))}}),o3={class:"px-4 py-3 bg-zinc-50/50 dark:bg-zinc-800/30 border-t border-neutral-200 dark:border-neutral-700 flex flex-col sm:flex-row items-center justify-between gap-4 w-full"},r3={class:"flex items-center gap-4"},i3={key:1,class:"text-xs text-neutral-500 dark:text-neutral-400 font-medium"},s3={class:"text-neutral-900 dark:text-neutral-100 font-medium"},a3={class:"text-neutral-900 dark:text-neutral-100 font-medium"},l3={class:"text-neutral-900 dark:text-neutral-100 font-medium"},c3={class:"flex-shrink-0"},Im=r.defineComponent({name:"DCodePagination",__name:"DCodePagination",props:{totalItems:{},currentPage:{},perPage:{},perPageOptions:{default:()=>[10,25,50,100]},showPerPage:{type:Boolean,default:!0},showInfo:{type:Boolean,default:!0},showEdges:{type:Boolean,default:!0},loading:{type:Boolean,default:!1}},emits:["update:page","update:perPage"],setup(e,{emit:t}){const n=e,o=t,{t:i}=In.useI18n(),s=r.computed(()=>Math.max(1,Math.ceil(n.totalItems/n.perPage))),a=r.computed(()=>n.totalItems===0?0:(n.currentPage-1)*n.perPage+1),l=r.computed(()=>{const f=n.currentPage*n.perPage;return Math.min(f,n.totalItems)}),c=f=>{f<1||f>s.value||f===n.currentPage||o("update:page",f)},d=f=>{o("update:perPage",f)};return(f,h)=>(r.openBlock(),r.createElementBlock("div",o3,[r.createElementVNode("div",r3,[e.showPerPage?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[r.createVNode(r.unref(Z4),{"model-value":String(e.perPage),"onUpdate:modelValue":h[0]||(h[0]=p=>d(Number(p))),disabled:e.loading},{default:r.withCtx(()=>[r.createVNode(r.unref(t3),{class:"h-8 w-[70px] bg-white dark:bg-zinc-800 border-neutral-200 dark:border-neutral-700"},{default:r.withCtx(()=>[r.createVNode(r.unref(n3),{placeholder:String(e.perPage)},null,8,["placeholder"])]),_:1}),r.createVNode(r.unref(X4),null,{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(e.perPageOptions,p=>(r.openBlock(),r.createBlock(r.unref(Q4),{key:p,value:String(p)},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(p),1)]),_:2},1032,["value"]))),128))]),_:1})]),_:1},8,["model-value","disabled"]),h[5]||(h[5]=r.createElementVNode("div",{class:"h-5 w-px bg-zinc-300 dark:bg-zinc-600"},null,-1))],64)):r.createCommentVNode("",!0),e.showInfo?(r.openBlock(),r.createElementBlock("span",i3,[r.createTextVNode(r.toDisplayString(r.unref(i)("dataTable.showing"))+" ",1),r.createElementVNode("span",s3,r.toDisplayString(a.value),1),r.createTextVNode(" "+r.toDisplayString(r.unref(i)("dataTable.to"))+" ",1),r.createElementVNode("span",a3,r.toDisplayString(l.value),1),r.createTextVNode(" "+r.toDisplayString(r.unref(i)("dataTable.of"))+" ",1),r.createElementVNode("span",l3,r.toDisplayString(e.totalItems),1),r.createTextVNode(" "+r.toDisplayString(r.unref(i)("dataTable.data")),1)])):r.createCommentVNode("",!0)]),r.createElementVNode("div",c3,[r.createVNode(r.unref(K4),{total:e.totalItems,"items-per-page":e.perPage,"sibling-count":1,"show-edges":e.showEdges,page:e.currentPage,"onUpdate:page":c,disabled:e.loading},{default:r.withCtx(()=>[r.createVNode(r.unref(G4),{class:"flex items-center gap-1"},{default:r.withCtx(({items:p})=>[r.createVNode(Ut,{size:"icon",icon:"ChevronsLeft",variant:"outline",disabled:e.currentPage===1||e.loading,class:"w-8 h-8 p-0",onClick:h[1]||(h[1]=g=>c(1))},null,8,["disabled"]),r.createVNode(Ut,{size:"icon",icon:"ChevronLeft",variant:"outline",disabled:e.currentPage===1||e.loading,class:"w-8 h-8 p-0",onClick:h[2]||(h[2]=g=>c(e.currentPage-1))},null,8,["disabled"]),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(p,(g,y)=>(r.openBlock(),r.createElementBlock(r.Fragment,null,[g.type==="page"?(r.openBlock(),r.createBlock(Ut,{key:y,text:String(g.value),size:"icon",variant:g.value===e.currentPage?"default":"outline",disabled:g.value===e.currentPage||e.loading,"aria-current":g.value===e.currentPage?"page":void 0,class:"w-8 h-8 p-0 text-sm",onClick:b=>c(g.value)},null,8,["text","variant","disabled","aria-current","onClick"])):(r.openBlock(),r.createBlock(r.unref(Y4),{key:g.type,index:y},null,8,["index"]))],64))),256)),r.createVNode(Ut,{size:"icon",icon:"ChevronRight",variant:"outline",disabled:e.currentPage>=s.value||e.loading,class:"w-8 h-8 p-0",onClick:h[3]||(h[3]=g=>c(e.currentPage+1))},null,8,["disabled"]),r.createVNode(Ut,{size:"icon",icon:"ChevronsRight",variant:"outline",disabled:e.currentPage>=s.value||e.loading,class:"w-8 h-8 p-0",onClick:h[4]||(h[4]=g=>c(s.value))},null,8,["disabled"])]),_:1})]),_:1},8,["total","items-per-page","show-edges","page","disabled"])])]))}}),Om={common:{rangeField:{orderError:"Nilai dari tidak boleh lebih besar dari nilai sampai"}},cardList:{statusLabel:"STATUS:",noRek:"No. Rek",mulai:"Mulai",plafon:"Plafon",bakiDebet:"Baki Debet",jatuhTempo:"Jatuh Tempo",sifat:"Sifat",sukuBunga:"Suku Bunga",tunggakan:"Tunggakan",fixedRate:"Suku Bunga Fixed",floatingRate:"Suku Bunga Floating",historyPart1:"Riwayat Kepatuhan (Bulan 1-12)",historyPart2:"Riwayat Kepatuhan (Bulan 13-24)",collateralLegality:"Legalitas Agunan",collateral:"Agunan",appraisalValue:"Nilai Taksasi",binding:"Pengikatan",emptyCreditData:"Belum ada data fasilitas kredit",noHistoryData:"Tidak ada data riwayat",defaultFacility:"Fasilitas",defaultSectionTitle:"Rincian Fasilitas",days:"Hari",statusLancar:"Lancar",statusDpk:"Dalam Perhatian Khusus",statusKurangLancar:"Kurang Lancar",statusDiragukan:"Diragukan",statusMacet:"Macet",sortFirst:"Urutan Awal",sortLast:"Urutan Akhir",filterAll:"Semua Status",noFilterResult:"Tidak ada data yang sesuai filter",showing:"Menampilkan",of:"dari",page:"Halaman",perPageSuffix:"data per halaman",items:"data",prevPage:"Sebelumnya",nextPage:"Berikutnya"}},_x={common:{rangeField:{orderError:"Lower bound must not be greater than upper bound"}},cardList:{statusLabel:"STATUS:",noRek:"Account No.",mulai:"Start Date",plafon:"Credit Limit",bakiDebet:"Outstanding",jatuhTempo:"Maturity Date",sifat:"Nature of Credit",sukuBunga:"Interest Rate",tunggakan:"Past Due",fixedRate:"Fixed Interest Rate",floatingRate:"Floating Interest Rate",historyPart1:"Compliance History (Months 1-12)",historyPart2:"Compliance History (Months 13-24)",collateralLegality:"Collateral Legality",collateral:"Collateral",appraisalValue:"Appraisal Value",binding:"Binding",emptyCreditData:"No credit facility data available",noHistoryData:"No history data",defaultFacility:"Facility",defaultSectionTitle:"Facility Details",days:"Days",statusLancar:"Current",statusDpk:"Special Mention",statusKurangLancar:"Substandard",statusDiragukan:"Doubtful",statusMacet:"Loss",sortFirst:"First Order",sortLast:"Last Order",filterAll:"All Status",noFilterResult:"No data matches the filter",showing:"Showing",of:"of",page:"Page",perPageSuffix:"items per page",items:"entries",prevPage:"Previous",nextPage:"Next"}},xx={common:{rangeField:{orderError:"시작 값은 끝 값보다 클 수 없습니다"}},cardList:{statusLabel:"상태:",noRek:"계좌번호",mulai:"시작일",plafon:"한도액",bakiDebet:"대출잔액",jatuhTempo:"만기일",sifat:"여신성격",sukuBunga:"금리",tunggakan:"연체액",fixedRate:"고정금리",floatingRate:"변동금리",historyPart1:"상환이력 (1-12개월)",historyPart2:"상환이력 (13-24개월)",collateralLegality:"담보 적법성",collateral:"담보",appraisalValue:"감정평가액",binding:"담보설정",emptyCreditData:"신용 공여 내역이 없습니다",noHistoryData:"이력 데이터가 없습니다",defaultFacility:"여신",defaultSectionTitle:"여신 상세 내역",days:"일",statusLancar:"정상",statusDpk:"요주의",statusKurangLancar:"고정이하",statusDiragukan:"회수의문",statusMacet:"추정손실",sortFirst:"처음 순서",sortLast:"마지막 순서",filterAll:"모든 상태",noFilterResult:"필터와 일치하는 데이터가 없습니다",showing:"표시 중",of:"/",page:"페이지",perPageSuffix:"개씩 보기",items:"개",prevPage:"이전",nextPage:"다음"}},d3={class:"dcode-card-list w-full space-y-4"},u3={key:0,class:"flex items-center justify-between gap-4 pb-1 flex-wrap"},f3={class:"flex flex-col gap-0.5"},h3={key:0,class:"flex items-center gap-2"},m3={class:"font-bold text-base text-neutral-900 dark:text-neutral-100 tracking-tight"},p3={key:0,class:"flex items-center gap-2 shrink-0 flex-wrap"},g3={key:1,class:"space-y-4"},b3={class:"p-5 grid grid-cols-2 gap-4"},y3={key:2,class:"p-8 text-center border border-dashed border-neutral-300 dark:border-neutral-700 rounded-xl bg-neutral-50/50 dark:bg-neutral-900/50 flex flex-col items-center justify-center gap-2.5"},v3={class:"h-10 w-10 rounded-full bg-neutral-100 dark:bg-neutral-800 flex items-center justify-center text-neutral-400"},w3={class:"text-sm font-medium text-neutral-700 dark:text-neutral-300"},k3=["onClick"],_3={class:"font-bold text-sm tracking-tight flex items-baseline gap-1.5 flex-wrap"},x3={class:"font-extrabold text-primary-600 dark:text-primary-400"},E3={class:"font-bold text-neutral-900 dark:text-neutral-100"},C3={key:0,class:"font-medium text-neutral-600 dark:text-neutral-400 text-xs sm:text-sm"},S3={class:"flex items-center gap-2 shrink-0"},A3={class:"space-y-2.5"},T3={class:"grid grid-cols-2 md:grid-cols-4 gap-x-6 gap-y-2 py-2 border-t border-neutral-100 dark:border-neutral-800 text-xs"},B3={class:"flex items-baseline gap-1.5 min-w-0"},P3={class:"text-neutral-500 dark:text-neutral-400 shrink-0 w-24"},N3={class:"font-semibold text-neutral-900 dark:text-neutral-100 truncate"},D3={class:"flex items-baseline gap-1.5 min-w-0"},M3={class:"text-neutral-500 dark:text-neutral-400 shrink-0 w-24"},R3={class:"font-semibold text-neutral-900 dark:text-neutral-100 truncate"},I3={class:"flex items-baseline gap-1.5 min-w-0"},O3={class:"text-neutral-500 dark:text-neutral-400 shrink-0 w-24"},L3={class:"font-semibold text-neutral-900 dark:text-neutral-100 truncate"},F3={class:"flex items-baseline gap-1.5 min-w-0"},$3={class:"text-neutral-500 dark:text-neutral-400 shrink-0 w-24"},z3={class:"font-semibold text-neutral-900 dark:text-neutral-100 truncate"},j3={class:"flex items-baseline gap-1.5 min-w-0"},U3={class:"text-neutral-500 dark:text-neutral-400 shrink-0 w-24"},W3={class:"font-semibold text-neutral-900 dark:text-neutral-100 truncate"},H3={class:"flex items-baseline gap-1.5 min-w-0"},q3={class:"text-neutral-500 dark:text-neutral-400 shrink-0 w-24"},K3={class:"font-semibold text-neutral-900 dark:text-neutral-100 truncate"},G3={class:"flex items-baseline gap-1.5 min-w-0"},Y3={class:"text-neutral-500 dark:text-neutral-400 shrink-0 w-24"},Z3={class:"font-semibold text-neutral-900 dark:text-neutral-100 truncate"},X3={class:"flex items-baseline gap-1.5 min-w-0"},J3={class:"text-neutral-500 dark:text-neutral-400 shrink-0 w-24"},Q3={class:"font-semibold text-neutral-900 dark:text-neutral-100 truncate"},V3={class:"text-xs space-y-1 py-1 border-t border-neutral-100 dark:border-neutral-800/60"},eL={class:"text-neutral-500 dark:text-neutral-400 font-medium"},tL={class:"space-y-0.5 pl-2"},nL={class:"font-semibold text-neutral-900 dark:text-neutral-100"},oL={key:1,class:"flex items-baseline gap-1.5"},rL={class:"text-neutral-500 dark:text-neutral-400 font-medium shrink-0 w-24"},iL={class:"overflow-x-auto rounded border border-neutral-200 dark:border-neutral-800 shadow-xs"},sL={class:"w-full text-center border-collapse text-[10px] leading-tight"},aL={class:"text-white dark:text-neutral-100 font-bold"},lL=["colspan"],cL=["colspan"],dL={class:"text-white/90 dark:text-neutral-200 font-medium"},uL={key:0,class:"pt-2 space-y-3"},fL={class:"flex items-center gap-1.5"},hL={class:"text-xs font-bold text-neutral-700 dark:text-neutral-200 uppercase tracking-wide"},mL={class:"rounded-lg border border-neutral-200 dark:border-neutral-700/80 overflow-x-auto shadow-xs"},pL={class:"min-w-full text-xs text-left divide-y divide-neutral-200 dark:divide-neutral-700/80"},gL={class:"bg-neutral-50 dark:bg-neutral-800/80 text-neutral-600 dark:text-neutral-300 font-semibold"},bL={class:"divide-y divide-neutral-100 dark:divide-neutral-800/60 bg-white dark:bg-neutral-900"},yL={key:1},vL=["colspan"],wL=["onClick"],kL={class:"flex items-center gap-2.5 min-w-0"},_L={class:"p-1.5 rounded-lg bg-primary-50 dark:bg-primary-950/60 text-primary-600 dark:text-primary-400 shrink-0"},xL={class:"font-semibold text-sm text-neutral-800 dark:text-neutral-100 truncate"},EL={class:"flex items-center gap-2"},CL={key:0,class:"text-xs px-2 py-0.5 rounded-md font-medium bg-neutral-200/60 dark:bg-neutral-700 text-neutral-600 dark:text-neutral-300"},SL={class:"transition-all duration-200"},AL={class:"flex items-center gap-2 pt-2"},TL={class:"text-xs font-bold text-neutral-700 dark:text-neutral-200 uppercase tracking-wide"},BL={class:"rounded-lg border border-neutral-200 dark:border-neutral-700/80 overflow-x-auto shadow-xs"},PL={class:"min-w-full text-xs text-left divide-y divide-neutral-200 dark:divide-neutral-700/80"},NL={class:"bg-neutral-50 dark:bg-neutral-800/80 text-neutral-600 dark:text-neutral-300 font-semibold"},DL={class:"divide-y divide-neutral-100 dark:divide-neutral-800/60 bg-white dark:bg-neutral-900"},ML={key:1},RL=["colspan"],IL={key:2,class:"px-5 pb-4 pt-2 border-t border-neutral-100 dark:border-neutral-800/60"},OL={name:"DCodeCardList"},oy=r.defineComponent({...OL,name:"DCodeCardList",props:{items:{},modelValue:{},formData:{},model:{},titleTemplate:{},fields:{},subTables:{},columns:{default:2},title:{},titleID:{},titleEN:{},titleKR:{},label:{},labelID:{},labelEN:{},labelKR:{},description:{},descriptionID:{},descriptionEN:{},endpoint:{},apiUrl:{},apiMethod:{},apiParams:{},dataPath:{},loading:{type:Boolean},emptyText:{},emptyIcon:{},cardBorder:{type:Boolean,default:!0},collapsible:{type:Boolean,default:!1},showIndex:{type:Boolean,default:!0},maxHeight:{},dummyMode:{type:Boolean,default:!1},locale:{default:"id"},showPagination:{type:Boolean,default:!0}},emits:["update:modelValue","card-click"],setup(e,{emit:t}){const n=e,o=t,i=r.inject("externalApi",null),s={id:Om.cardList,en:_x.cardList,kr:xx.cardList};let a=null;try{a=In.useI18n()}catch{}const l=r.computed(()=>{const Z=n.locale||a?.locale?.value||"id",ee=String(Z).toLowerCase();return ee.startsWith("kr")||ee.startsWith("ko")?"kr":ee.startsWith("en")?"en":"id"});function c(Z){return a?.te&&a.te(`cardList.${Z}`)?a.t(`cardList.${Z}`):(s[l.value]||Om.cardList)?.[Z]||Om.cardList?.[Z]||Z}const d=r.ref([]),f=r.ref(!1),h=r.ref(new Set),p=r.ref(5),g=r.ref(1),y=[5,10,20,50,100],b=["24/10","24/11","24/12","25/01","25/02","25/03","25/04","25/05","25/06","25/07","25/08","25/09","25/10","25/11","25/12","26/01","26/02","26/03","26/04","26/05","26/06","26/07","26/08","26/09"];function _(Z="1"){return b.map(ee=>({bulanTahun:ee,statusKol:Z,hariTunggakan:"0"}))}const x=[{ljk:"PT Bank Example 1",jenisKredit:"Kredit atau Pembiayaan yang Diberikan",status:"Lancar",noRekening:"123456789001",mulai:"2015-08-13",jatuhTempo:"2017-08-13",plafon:"0",bakiDebet:"0",sifatKredit:"Lainnya",sukuBunga:"0% Suku Bunga Fixed",tunggakan:"0 (DPD: 0)",matriks24Bulan:_("1")},{ljk:"PT Bank Example 2",jenisKredit:"Kredit atau Pembiayaan kepada Pihak Ketiga Melalui Lembaga Lain Secara Channeling",status:"Lancar",noRekening:"123456789002",mulai:"2017-09-14",jatuhTempo:"2019-06-03",plafon:"469.069.175",bakiDebet:"0",sifatKredit:"Lainnya",sukuBunga:"13.87% Suku Bunga Fixed",tunggakan:"0 (DPD: 0)",matriks24Bulan:_("1")},{ljk:"PT Bank Example 3",jenisKredit:"Kredit atau Pembiayaan yang Diberikan",status:"Lancar",noRekening:"123456789003",mulai:"2018-05-17",jatuhTempo:"2021-05-17",plafon:"871.256.762",bakiDebet:"0",sifatKredit:"Lainnya",sukuBunga:"21.01% Suku Bunga Floating",tunggakan:"0 (DPD: 0)",matriks24Bulan:_("1")},{ljk:"PT Bank Example 4",jenisKredit:"Kredit atau Pembiayaan kepada Pihak Ketiga Melalui Lembaga Lain Secara Channeling",status:"Lancar",noRekening:"123456789004",mulai:"2017-05-26",jatuhTempo:"2019-06-03",plafon:"0",bakiDebet:"0",sifatKredit:"Lainnya",sukuBunga:"15.87% Suku Bunga Fixed",tunggakan:"0 (DPD: 0)",matriks24Bulan:_("1")},{ljk:"PT Bank Example 5",jenisKredit:"Lainnya (Dengan Perjanjian)",status:"Lancar",noRekening:"123456789005",mulai:"2019-05-24",jatuhTempo:"2025-04-25",plafon:"0",bakiDebet:"0",sifatKredit:"Kredit atau pembiayaan yang direstrukturisasi dalam rangka kebijakan stimulus",sukuBunga:"19.24% Suku Bunga Floating",tunggakan:"0 (DPD: 0)",matriks24Bulan:_("1")}],B=[{model:"bankName",label:"Nama Bank / LJK",column:"HALF"},{model:"accountNo",label:"Nomor Rekening",column:"HALF"},{model:"plafon",label:"Plafon Pinjaman",prefix:"Rp ",column:"HALF"},{model:"bakiDebet",label:"Baki Debet",prefix:"Rp ",column:"HALF"},{model:"tunggakan",label:"Tunggakan Pokok",prefix:"Rp ",column:"HALF"},{model:"status",label:"Status Kolektibilitas",column:"HALF"}];function R(Z,ee){if(!Z||typeof Z!="object")return null;{const Te=te(Z,ee);if(Array.isArray(Te)&&Te.length>0)return Te;if(Array.isArray(Z.data)&&Z.data[0]){const Oe=te(Z.data[0],ee);if(Array.isArray(Oe)&&Oe.length>0)return Oe}if(Array.isArray(Z)&&Z[0]){const Oe=te(Z[0],ee);if(Array.isArray(Oe)&&Oe.length>0)return Oe}}const pe=[ee,"rincianFasilitas","fasilitas","facilities","cards","items"].filter(Boolean);for(const Te of pe){if(Array.isArray(Z[Te])&&Z[Te].length>0)return Z[Te];if(Array.isArray(Z.data)&&Z.data[0]&&Array.isArray(Z.data[0][Te])&&Z.data[0][Te].length>0)return Z.data[0][Te];if(Array.isArray(Z)&&Z[0]&&Array.isArray(Z[0][Te])&&Z[0][Te].length>0)return Z[0][Te]}const Be=Array.isArray(Z.data)?Z.data[0]:Array.isArray(Z)?Z[0]:Z;if(Be&&typeof Be=="object"){for(const[,Te]of Object.entries(Be))if(Array.isArray(Te)&&Te.length>0&&typeof Te[0]=="object"&&(Te[0].noRekening||Te[0].ljk||Te[0].matriks24Bulan||Te[0].bakiDebet||Te[0].plafon))return Te}return null}const S=r.computed(()=>{if(Array.isArray(n.items)&&n.items.length>0)return n.items;if(Array.isArray(n.modelValue)&&n.modelValue.length>0)return n.modelValue;if(d.value.length>0)return d.value;if(n.formData){const Z=R(n.formData,n.model||n.dataPath||"rincianFasilitas");if(Array.isArray(Z)&&Z.length>0)return Z}return n.dummyMode?x:Array.isArray(n.items)?n.items:Array.isArray(n.modelValue)?n.modelValue:x}),O=r.computed(()=>{const Z=(g.value-1)*p.value,ee=Z+p.value;return S.value.slice(Z,ee)});function I(Z){return(g.value-1)*p.value+Z}r.watch(p,()=>{g.value=1}),r.watch(S,()=>{g.value=1});const D=r.computed(()=>Math.max(1,Math.ceil(S.value.length/p.value)));r.watch(D,Z=>{g.value>Z&&(g.value=Z)});const w=r.computed(()=>{if(n.fields&&n.fields.length>0)return n.fields;if(n.dummyMode)return B;const Z=S.value[0];return Z&&typeof Z=="object"?Object.keys(Z).filter(ee=>!Array.isArray(Z[ee])&&typeof Z[ee]!="object").slice(0,10).map(ee=>({model:ee,label:ee.replace(/([A-Z])/g," $1").replace(/^./,pe=>pe.toUpperCase()),column:"HALF"})):[]}),E=r.computed(()=>n.loading!==void 0?n.loading:f.value),F=r.computed(()=>{const Z=l.value;return n.title||n.label?n.title||n.label||"":Z==="kr"?n.titleKR||n.labelKR||n.titleEN||n.labelEN||n.titleID||n.labelID||"":Z==="en"?n.titleEN||n.labelEN||n.titleID||n.labelID||"":n.titleID||n.labelID||n.titleEN||n.labelEN||""}),A=r.computed(()=>{const Z=l.value;return n.description?n.description:Z==="en"?n.descriptionEN||n.descriptionID||"":n.descriptionID||n.descriptionEN||""}),P=r.computed(()=>{switch(n.columns){case 1:return"grid-cols-1";case 3:return"grid-cols-1 sm:grid-cols-2 lg:grid-cols-3";case 4:return"grid-cols-1 sm:grid-cols-2 lg:grid-cols-4";default:return"grid-cols-1 sm:grid-cols-2"}}),q=r.computed(()=>n.emptyText?n.emptyText:c("emptyCreditData"));function Q(Z){return!Z||typeof Z!="object"?!1:!!(Z.ljk||Z.noRekening||Z.matriks24Bulan||Z.legalitasAgunan||Z.sifatKredit!==void 0||Z.jenisKredit!==void 0||Z.plafon!==void 0||Z.bakiDebet!==void 0||Z.bankName)}function re(Z){return!Z||!Array.isArray(Z.legalitasAgunan)||Z.legalitasAgunan.length===0?!1:Z.legalitasAgunan.some(ee=>ee&&(ee.agunan||ee.nilaiTaksasi||ee.pengikatan))}function ie(Z){const ee=Z&&Array.isArray(Z.matriks24Bulan)&&Z.matriks24Bulan.length>0&&Z.matriks24Bulan||Z&&Array.isArray(Z.matriks24BulanTerakhir)&&Z.matriks24BulanTerakhir.length>0&&Z.matriks24BulanTerakhir||Z&&Array.isArray(Z.riwayatKepatuhan)&&Z.riwayatKepatuhan.length>0&&Z.riwayatKepatuhan||Z&&Array.isArray(Z.riwayat24Bulan)&&Z.riwayat24Bulan.length>0&&Z.riwayat24Bulan||null;return ee?ee.map(pe=>{const Be=pe.bulanTahun||pe.tahunBulan||pe.periode||pe.bulan||pe.blnThn||(typeof pe=="string"?pe:""),Te=pe.statusKol!==void 0&&pe.statusKol!==null?pe.statusKol:pe.kol??pe.kolektibilitas??pe.status??(typeof pe=="object"?"":pe),Oe=pe.hariTunggakan??pe.tunggakanHari??pe.dpd??"0";return{...pe,bulanTahun:C(Be),statusKol:Te!=null?String(Te).trim():"",hariTunggakan:Oe!=null?String(Oe).trim():"0"}}):_("1")}function le(Z){const ee=ie(Z);return Math.min(12,ee.length)}function X(Z){const ee=ie(Z);return Math.max(0,ee.length-12)}function K(Z){if(Z==null)return!0;const ee=String(Z).trim();return ee===""||ee==="-"||ee.toLowerCase()==="null"||ee.toLowerCase()==="undefined"}function W(Z){if(K(Z))return!1;const ee=String(Z).trim().toLowerCase();return ee==="1"||ee==="lancar"||ee==="•"}function se(Z){if(K(Z))return"bg-neutral-50/50 dark:bg-neutral-900/50";if(W(Z))return"bg-emerald-50 dark:bg-emerald-950/40";const ee=String(Z).toLowerCase();return ee==="2"||ee.includes("perhatian")||ee.includes("dpk")?"bg-amber-50 dark:bg-amber-950/40":"bg-rose-50 dark:bg-rose-950/40"}function H(Z){if(K(Z))return"text-neutral-400 dark:text-neutral-500";if(W(Z))return"text-emerald-700 dark:text-emerald-400";const ee=String(Z).toLowerCase();return ee==="2"||ee.includes("perhatian")||ee.includes("dpk")?"text-amber-700 dark:text-amber-400":"text-rose-700 dark:text-rose-400"}function N(Z){if(!Z||K(Z.statusKol))return"-";const ee=Z.hariTunggakan!==void 0&&Z.hariTunggakan!==null&&String(Z.hariTunggakan).trim()!==""?String(Z.hariTunggakan).trim():"0",pe=c("days")?c("days").toLowerCase():"hari";return`${Z.statusKol} - ${ee} ${pe}`}function j(Z){if(!Z)return"text-emerald-600 dark:text-emerald-400";const ee=String(Z).toLowerCase();return ee.includes("lancar")||ee.includes("kol 1")||ee==="1"?"text-emerald-600 dark:text-emerald-400":ee.includes("perhatian")||ee.includes("dpk")||ee.includes("kol 2")||ee==="2"?"text-amber-600 dark:text-amber-400":"text-red-600 dark:text-red-400"}function Y(Z){if(!Z)return c("statusLancar");const ee=String(Z).toLowerCase();return ee.includes("lancar")||ee==="1"?c("statusLancar"):ee.includes("dpk")||ee.includes("perhatian")||ee==="2"?c("statusDpk"):ee.includes("kurang")||ee==="3"?c("statusKurangLancar"):ee.includes("ragu")||ee==="4"?c("statusDiragukan"):ee.includes("macet")||ee==="5"?c("statusMacet"):String(Z)}function J(Z){if(Z==null||Z==="")return"Rp 0";const ee=String(Z).trim();if(ee.startsWith("Rp"))return ee;if(/^\d{1,3}(\.\d{3})+$/.test(ee))return`Rp ${ee}`;const pe=Number(ee.replace(/[^0-9.-]+/g,""));return isNaN(pe)?ee:`Rp ${pe.toLocaleString("id-ID")}`}function U(Z){if(Z==null||Z==="")return`0% ${c("fixedRate")}`;const pe=String(Z).trim().replace(/(suku bunga\s*)+/gi,"Suku Bunga ").trim();return/suku bunga fixed/i.test(pe)?pe.replace(/suku bunga fixed/i,c("fixedRate")):/suku bunga floating/i.test(pe)?pe.replace(/suku bunga floating/i,c("floatingRate")):/fixed/i.test(pe)?pe.replace(/fixed/i,c("fixedRate")):/floating/i.test(pe)?pe.replace(/floating/i,c("floatingRate")):pe.includes("%")||pe.toLowerCase().includes("bunga")?pe:`${pe}% ${c("fixedRate")}`}function k(Z){if(Z==null||Z===""||Z==="0"||Z===0)return`Rp 0 (DPD: 0 ${c("days")})`;const ee=String(Z).trim();return ee.includes("DPD")?ee.startsWith("Rp")?ee:`Rp ${ee}`:`${J(Z)} (DPD: 0 ${c("days")})`}function C(Z){if(!Z)return"";const ee=String(Z).trim();return/^\d{6}$/.test(ee)?/^(19|20)\d{4}$/.test(ee)?`${ee.slice(2,4)}/${ee.slice(4,6)}`:/^\d{2}(19|20)\d{2}$/.test(ee)?`${ee.slice(4,6)}/${ee.slice(0,2)}`:`${ee.slice(2,4)}/${ee.slice(4,6)}`:/^\d{8}$/.test(ee)?`${ee.slice(2,4)}/${ee.slice(4,6)}`:/^\d{4}-\d{2}/.test(ee)?`${ee.slice(2,4)}/${ee.slice(5,7)}`:/^\d{4}\/\d{2}/.test(ee)?`${ee.slice(2,4)}/${ee.slice(5,7)}`:/^\d{2}\/\d{2}$/.test(ee)?ee:/^\d{2}\/\d{4}$/.test(ee)?`${ee.slice(5,7)}/${ee.slice(0,2)}`:ee}function T(Z){if(!Z)return"-";const ee=String(Z).trim();return/^\d{8}$/.test(ee)?`${ee.slice(0,4)}-${ee.slice(4,6)}-${ee.slice(6,8)}`:ee}function M(Z){if(Z.label)return Z.label;const ee=l.value;return ee==="kr"?Z.labelKR||Z.labelEN||Z.labelID||"":ee==="en"?Z.labelEN||Z.labelID||"":Z.labelID||Z.labelEN||""}function $(Z){if(Z.title)return Z.title;const ee=l.value;return ee==="kr"?Z.titleKR||Z.titleEN||Z.titleID||"":ee==="en"?Z.titleEN||Z.titleID||"":Z.titleID||Z.titleEN||""}function ne(Z,ee){const pe=n.titleTemplate;return pe?pe.replace(/\{(\w+)\}/g,(Be,Te)=>{if(Te==="index")return String(ee+1);const Oe=te(Z,Te);return Oe==null?"":String(Oe)}):`Item #${ee+1}`}function te(Z,ee){if(!(!Z||!ee))return ee.split(".").reduce((pe,Be)=>pe?.[Be],Z)}function ce(Z){const ee=(Z.column||"HALF").toUpperCase();return ee==="FULL"?"sm:col-span-2 lg:col-span-full":""}function ke(Z,ee){const pe=te(Z,ee.modelKey);return Array.isArray(pe)?pe:[]}function we(Z){h.value.has(Z)?h.value.delete(Z):h.value.add(Z)}function _e(Z){return h.value.has(Z)}function fe(Z,ee){return te(Z,ee.model)}async function de(){const Z=n.endpoint?.apiUrl||n.apiUrl;if(Z){f.value=!0;try{const ee=n.endpoint?.apiMethod||n.apiMethod||"GET",pe=String(ee).toUpperCase(),Be=n.endpoint?.keyParam||n.apiParams||{};let Te;i&&(typeof i.apiUrl=="function"?Te=await i.apiUrl(Z,pe,Be):typeof i.get=="function"||typeof i.post=="function"?Te=pe==="POST"?await i.post(Z,Be):await i.get(Z,{params:Be}):typeof i=="function"&&(Te=await i(Z,pe,Be))),!Te&&typeof fetch<"u"&&(Te=await fetch(Z,{method:pe}).then(Ue=>Ue.json()));const Oe=n.endpoint?.dataKey||n.dataPath||"data";let Fe=Te?.data!==void 0?Te.data:Te;Oe&&Oe!=="data"&&(Fe=te(Te,Oe)||te(Te?.data,Oe)||Fe),Array.isArray(Fe)?(d.value=Fe,o("update:modelValue",Fe)):console.warn("[DCodeCardList] Data response is not an array:",Fe)}catch(ee){console.warn("[DCodeCardList] Fetch error:",ee),d.value=[]}finally{f.value=!1}}}return r.onMounted(()=>{(n.endpoint?.apiUrl||n.apiUrl)&&de()}),r.watch(()=>n.endpoint?.apiUrl||n.apiUrl,Z=>{Z&&de()}),(Z,ee)=>(r.openBlock(),r.createElementBlock("div",d3,[F.value||A.value||Z.$slots["header-actions"]?(r.openBlock(),r.createElementBlock("div",u3,[r.createElementVNode("div",f3,[F.value?(r.openBlock(),r.createElementBlock("div",h3,[ee[2]||(ee[2]=r.createElementVNode("div",{class:"h-4.5 w-1.5 bg-primary rounded-full shrink-0"},null,-1)),r.createElementVNode("span",m3,r.toDisplayString(F.value),1),S.value.length>0?(r.openBlock(),r.createBlock(os,{key:0,text:String(S.value.length),variant:"tonal",size:"xs",pill:""},null,8,["text"])):r.createCommentVNode("",!0)])):r.createCommentVNode("",!0),A.value?(r.openBlock(),r.createElementBlock("span",{key:1,class:r.normalizeClass(["text-xs text-neutral-500 dark:text-neutral-400",{"pl-3.5":F.value}])},r.toDisplayString(A.value),3)):r.createCommentVNode("",!0)]),Z.$slots["header-actions"]?(r.openBlock(),r.createElementBlock("div",p3,[r.renderSlot(Z.$slots,"header-actions")])):r.createCommentVNode("",!0)])):r.createCommentVNode("",!0),E.value?(r.openBlock(),r.createElementBlock("div",g3,[(r.openBlock(),r.createElementBlock(r.Fragment,null,r.renderList(2,pe=>r.createElementVNode("div",{key:`skeleton-${pe}`,class:"bg-white dark:bg-neutral-900 border border-neutral-200 dark:border-neutral-800 rounded-xl overflow-hidden animate-pulse"},[ee[4]||(ee[4]=r.createElementVNode("div",{class:"px-5 py-3.5 bg-neutral-50/80 dark:bg-neutral-800/60 border-b border-neutral-200/80 dark:border-neutral-800"},[r.createElementVNode("div",{class:"h-4 w-48 rounded bg-neutral-200 dark:bg-neutral-700"})],-1)),r.createElementVNode("div",b3,[(r.openBlock(),r.createElementBlock(r.Fragment,null,r.renderList(4,Be=>r.createElementVNode("div",{key:Be,class:"space-y-2"},[...ee[3]||(ee[3]=[r.createElementVNode("div",{class:"h-3 w-20 rounded bg-neutral-200 dark:bg-neutral-700"},null,-1),r.createElementVNode("div",{class:"h-4 w-32 rounded bg-neutral-100 dark:bg-neutral-800"},null,-1)])])),64))])])),64))])):S.value.length===0?(r.openBlock(),r.createElementBlock("div",y3,[r.renderSlot(Z.$slots,"empty",{},()=>[r.createElementVNode("div",v3,[r.createVNode(r.unref(Ae.Layers),{class:"h-5 w-5"})]),r.createElementVNode("div",w3,r.toDisplayString(q.value),1)])])):(r.openBlock(),r.createElementBlock("div",{key:3,class:"space-y-3.5",style:r.normalizeStyle(e.maxHeight?{maxHeight:e.maxHeight,overflowY:"auto"}:void 0)},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(O.value,(pe,Be)=>(r.openBlock(),r.createElementBlock("div",{key:Be,class:r.normalizeClass(["bg-white dark:bg-neutral-900 transition-all",[Q(pe)?"border border-neutral-200 dark:border-neutral-800 rounded-xl p-4 shadow-xs hover:border-neutral-300 dark:hover:border-neutral-700":e.cardBorder?"border border-neutral-200 dark:border-neutral-800 rounded-xl overflow-hidden shadow-xs hover:border-neutral-300 dark:hover:border-neutral-700":"rounded-lg overflow-hidden"]])},[Q(pe)?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[r.createElementVNode("div",{class:r.normalizeClass(["flex items-start justify-between gap-3 pb-2",{"cursor-pointer select-none":e.collapsible}]),onClick:Te=>e.collapsible?we(I(Be)):o("card-click",pe,I(Be))},[r.createElementVNode("div",_3,[r.createElementVNode("span",x3,r.toDisplayString(I(Be)+1)+".",1),r.createElementVNode("span",E3,r.toDisplayString(pe.ljk||pe.bankName||c("defaultFacility")),1),pe.jenisKredit?(r.openBlock(),r.createElementBlock("span",C3," • "+r.toDisplayString(pe.jenisKredit),1)):r.createCommentVNode("",!0)]),r.createElementVNode("div",S3,[r.createElementVNode("div",{class:r.normalizeClass(["text-xs font-bold whitespace-nowrap",j(pe.status)])},r.toDisplayString(c("statusLabel"))+" "+r.toDisplayString(Y(pe.status)),3),e.collapsible?(r.openBlock(),r.createBlock(r.unref(Ae.ChevronDown),{key:0,class:r.normalizeClass(["h-4 w-4 text-neutral-400 transition-transform duration-200",{"rotate-180":!_e(I(Be))}])},null,8,["class"])):r.createCommentVNode("",!0)])],10,k3),r.withDirectives(r.createElementVNode("div",A3,[r.createElementVNode("div",T3,[r.createElementVNode("div",B3,[r.createElementVNode("span",P3,r.toDisplayString(c("noRek")),1),r.createElementVNode("span",N3,": "+r.toDisplayString(pe.noRekening||pe.accountNo||"-"),1)]),r.createElementVNode("div",D3,[r.createElementVNode("span",M3,r.toDisplayString(c("mulai")),1),r.createElementVNode("span",R3,": "+r.toDisplayString(T(pe.mulai||pe.tglMulai||pe.tanggalMulai)),1)]),r.createElementVNode("div",I3,[r.createElementVNode("span",O3,r.toDisplayString(c("plafon")),1),r.createElementVNode("span",L3,": "+r.toDisplayString(J(pe.plafon)),1)]),r.createElementVNode("div",F3,[r.createElementVNode("span",$3,r.toDisplayString(c("bakiDebet")),1),r.createElementVNode("span",z3,": "+r.toDisplayString(J(pe.bakiDebet)),1)]),r.createElementVNode("div",j3,[r.createElementVNode("span",U3,r.toDisplayString(c("jatuhTempo")),1),r.createElementVNode("span",W3,": "+r.toDisplayString(T(pe.jatuhTempo||pe.tglJatuhTempo||pe.tanggalJatuhTempo)),1)]),r.createElementVNode("div",H3,[r.createElementVNode("span",q3,r.toDisplayString(c("sifat")),1),r.createElementVNode("span",K3,": "+r.toDisplayString(pe.sifatKredit||pe.sifat||"-"),1)]),r.createElementVNode("div",G3,[r.createElementVNode("span",Y3,r.toDisplayString(c("sukuBunga")),1),r.createElementVNode("span",Z3,": "+r.toDisplayString(U(pe.sukuBunga)),1)]),r.createElementVNode("div",X3,[r.createElementVNode("span",J3,r.toDisplayString(c("tunggakan")),1),r.createElementVNode("span",Q3,": "+r.toDisplayString(k(pe.tunggakan)),1)])]),r.createElementVNode("div",V3,[re(pe)?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[r.createElementVNode("div",eL,r.toDisplayString(c("collateral"))+": ",1),r.createElementVNode("div",tL,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(pe.legalitasAgunan,(Te,Oe)=>(r.openBlock(),r.createElementBlock("div",{key:Oe,class:"text-neutral-800 dark:text-neutral-200 leading-relaxed"},[ee[5]||(ee[5]=r.createElementVNode("span",{class:"text-neutral-400 dark:text-neutral-500 mr-1"},"•",-1)),r.createElementVNode("span",null,r.toDisplayString(Te.agunan||"-"),1),ee[6]||(ee[6]=r.createElementVNode("span",{class:"text-neutral-400 dark:text-neutral-500 mx-1.5"},"-",-1)),r.createElementVNode("span",nL,r.toDisplayString(J(Te.nilaiTaksasi)),1),ee[7]||(ee[7]=r.createElementVNode("span",{class:"text-neutral-400 dark:text-neutral-500 mx-1.5"},"-",-1)),r.createElementVNode("span",null,r.toDisplayString(Te.pengikatan||"-"),1)]))),128))])],64)):(r.openBlock(),r.createElementBlock("div",oL,[r.createElementVNode("span",rL,r.toDisplayString(c("collateral")),1),ee[8]||(ee[8]=r.createElementVNode("span",{class:"font-semibold text-neutral-900 dark:text-neutral-100"},": -",-1))]))]),r.createElementVNode("div",iL,[r.createElementVNode("table",sL,[r.createElementVNode("thead",null,[r.createElementVNode("tr",aL,[r.createElementVNode("th",{colspan:le(pe),class:"py-1 px-1 border-r-2 border-white/20 whitespace-nowrap tracking-tight bg-primary-700 dark:bg-primary-900"},r.toDisplayString(c("historyPart1")),9,lL),X(pe)>0?(r.openBlock(),r.createElementBlock("th",{key:0,colspan:X(pe),class:"py-1 px-1 whitespace-nowrap tracking-tight bg-sky-800 dark:bg-sky-950"},r.toDisplayString(c("historyPart2")),9,cL)):r.createCommentVNode("",!0)]),r.createElementVNode("tr",dL,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(ie(pe),(Te,Oe)=>(r.openBlock(),r.createElementBlock("th",{key:Oe,class:r.normalizeClass(["py-0.5 px-1 whitespace-nowrap min-w-[55px]",[Oe<12?"bg-primary-800 dark:bg-primary-800/80 border-r border-white/10 dark:border-white/10":"bg-sky-900 dark:bg-sky-950/80 border-r last:border-r-0 border-white/10 dark:border-white/10",Oe===11?"!border-r-2 !border-r-white/25":""]])},r.toDisplayString(Te.bulanTahun),3))),128))])]),r.createElementVNode("tbody",null,[r.createElementVNode("tr",null,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(ie(pe),(Te,Oe)=>(r.openBlock(),r.createElementBlock("td",{key:Oe,class:r.normalizeClass(["py-1 px-1 border-r last:border-r-0 border-neutral-200/80 dark:border-neutral-800/80 text-center font-bold whitespace-nowrap",[se(Te.statusKol),Oe===11?"!border-r-2 !border-r-neutral-300 dark:!border-r-neutral-700":""]])},[r.createElementVNode("span",{class:r.normalizeClass(["text-[10px] font-bold",H(Te.statusKol)])},r.toDisplayString(N(Te)),3)],2))),128))])])])]),e.subTables&&e.subTables.length>0?(r.openBlock(),r.createElementBlock("div",uL,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(e.subTables,(Te,Oe)=>(r.openBlock(),r.createElementBlock("div",{key:Te.key||Oe,class:"space-y-1.5"},[r.createElementVNode("div",fL,[ee[9]||(ee[9]=r.createElementVNode("span",{class:"w-1.5 h-1.5 rounded-full bg-primary"},null,-1)),r.createElementVNode("span",hL,r.toDisplayString($(Te)),1)]),r.createElementVNode("div",mL,[r.createElementVNode("table",pL,[r.createElementVNode("thead",gL,[r.createElementVNode("tr",null,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(Te.headers,(Fe,Ue)=>(r.openBlock(),r.createElementBlock("th",{key:Ue,class:"px-3.5 py-2 whitespace-nowrap border-r last:border-r-0 border-neutral-200/60 dark:border-neutral-700/60",style:r.normalizeStyle({width:Fe.width?typeof Fe.width=="number"?`${Fe.width}px`:Fe.width:void 0,textAlign:Fe.align||"left"})},r.toDisplayString(M(Fe)),5))),128))])]),r.createElementVNode("tbody",bL,[ke(pe,Te).length>0?(r.openBlock(!0),r.createElementBlock(r.Fragment,{key:0},r.renderList(ke(pe,Te),(Fe,Ue)=>(r.openBlock(),r.createElementBlock("tr",{key:Ue,class:"hover:bg-neutral-50/60 dark:hover:bg-neutral-800/40 transition-colors"},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(Te.headers,(Qe,Ve)=>(r.openBlock(),r.createElementBlock("td",{key:Ve,class:"px-3.5 py-1.5 whitespace-nowrap text-neutral-700 dark:text-neutral-200 border-r last:border-r-0 border-neutral-100 dark:border-neutral-800/60",style:r.normalizeStyle({textAlign:Qe.align||"left"})},r.toDisplayString(te(Fe,Qe.key)??Fe[Qe.key]??"-"),5))),128))]))),128)):(r.openBlock(),r.createElementBlock("tr",yL,[r.createElementVNode("td",{colspan:Te.headers.length,class:"px-3.5 py-3 text-center text-neutral-400 dark:text-neutral-500 italic"},r.toDisplayString(c("noHistoryData")),9,vL)]))])])])]))),128))])):r.createCommentVNode("",!0)],512),[[r.vShow,!e.collapsible||!_e(I(Be))]])],64)):(r.openBlock(),r.createElementBlock(r.Fragment,{key:1},[r.createElementVNode("div",{class:r.normalizeClass(["px-5 py-3.5 bg-neutral-50/80 dark:bg-neutral-800/60 border-b border-neutral-200/80 dark:border-neutral-800 flex items-center justify-between",{"cursor-pointer select-none":e.collapsible}]),onClick:Te=>e.collapsible?we(I(Be)):o("card-click",pe,I(Be))},[r.renderSlot(Z.$slots,"card-header",{item:pe,index:I(Be)},()=>[r.createElementVNode("div",kL,[r.createElementVNode("div",_L,[r.createVNode(r.unref(Ae.CreditCard),{class:"h-4 w-4"})]),r.createElementVNode("span",xL,r.toDisplayString(ne(pe,I(Be))),1)])]),r.createElementVNode("div",EL,[r.renderSlot(Z.$slots,"card-actions",{item:pe,index:I(Be)}),e.showIndex?(r.openBlock(),r.createElementBlock("span",CL," #"+r.toDisplayString(I(Be)+1),1)):r.createCommentVNode("",!0),e.collapsible?(r.openBlock(),r.createBlock(r.unref(Ae.ChevronDown),{key:1,class:r.normalizeClass(["h-4 w-4 text-neutral-400 transition-transform duration-200",{"rotate-180":!_e(I(Be))}])},null,8,["class"])):r.createCommentVNode("",!0)])],10,wL),r.withDirectives(r.createElementVNode("div",SL,[w.value&&w.value.length>0?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(["p-5 grid gap-x-6 gap-y-0",P.value])},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(w.value,Te=>(r.openBlock(),r.createElementBlock("div",{key:Te.key||Te.model,class:r.normalizeClass(ce(Te))},[r.createVNode(Uu,{label:M(Te),"model-value":fe(pe,Te),"value-type":Te.valueType,prefix:Te.prefix,suffix:Te.suffix,"badge-color":Te.badgeColor,locale:e.locale==="id"?"id-ID":e.locale==="en"?"en-GB":"ko-KR"},null,8,["label","model-value","value-type","prefix","suffix","badge-color","locale"])],2))),128))],2)):r.createCommentVNode("",!0),e.subTables&&e.subTables.length>0?(r.openBlock(),r.createElementBlock("div",{key:1,class:r.normalizeClass(["px-5 pb-5 space-y-4",{"pt-0":e.fields&&e.fields.length>0,"pt-5":!e.fields||e.fields.length===0}])},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(e.subTables,(Te,Oe)=>(r.openBlock(),r.createElementBlock("div",{key:Te.key||Oe,class:"space-y-2"},[r.createElementVNode("div",AL,[ee[10]||(ee[10]=r.createElementVNode("div",{class:"h-3.5 w-1 bg-primary-600 dark:bg-primary-500 rounded-full"},null,-1)),r.createElementVNode("span",TL,r.toDisplayString($(Te)),1)]),r.createElementVNode("div",BL,[r.createElementVNode("table",PL,[r.createElementVNode("thead",NL,[r.createElementVNode("tr",null,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(Te.headers,(Fe,Ue)=>(r.openBlock(),r.createElementBlock("th",{key:Ue,class:"px-3.5 py-2.5 whitespace-nowrap border-r last:border-r-0 border-neutral-200/60 dark:border-neutral-700/60",style:r.normalizeStyle({width:Fe.width?typeof Fe.width=="number"?`${Fe.width}px`:Fe.width:void 0,textAlign:Fe.align||"left"})},r.toDisplayString(M(Fe)),5))),128))])]),r.createElementVNode("tbody",DL,[ke(pe,Te).length>0?(r.openBlock(!0),r.createElementBlock(r.Fragment,{key:0},r.renderList(ke(pe,Te),(Fe,Ue)=>(r.openBlock(),r.createElementBlock("tr",{key:Ue,class:"hover:bg-neutral-50/60 dark:hover:bg-neutral-800/40 transition-colors"},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(Te.headers,(Qe,Ve)=>(r.openBlock(),r.createElementBlock("td",{key:Ve,class:"px-3.5 py-2 whitespace-nowrap text-neutral-700 dark:text-neutral-200 border-r last:border-r-0 border-neutral-100 dark:border-neutral-800/60",style:r.normalizeStyle({textAlign:Qe.align||"left"})},r.toDisplayString(te(Fe,Qe.key)??Fe[Qe.key]??"-"),5))),128))]))),128)):(r.openBlock(),r.createElementBlock("tr",ML,[r.createElementVNode("td",{colspan:Te.headers.length,class:"px-3.5 py-4 text-center text-neutral-400 dark:text-neutral-500 italic"},r.toDisplayString(e.locale==="en"?"No history data":"Tidak ada data riwayat"),9,RL)]))])])])]))),128))],2)):r.createCommentVNode("",!0),Z.$slots["card-footer"]?(r.openBlock(),r.createElementBlock("div",IL,[r.renderSlot(Z.$slots,"card-footer",{item:pe,index:I(Be)})])):r.createCommentVNode("",!0)],512),[[r.vShow,!e.collapsible||!_e(I(Be))]])],64))],2))),128))],4)),S.value.length>0&&e.showPagination?(r.openBlock(),r.createBlock(Im,{key:4,"total-items":S.value.length,"current-page":g.value,"per-page":p.value,"per-page-options":y,loading:E.value,class:"rounded-xl border border-neutral-200 dark:border-neutral-800 overflow-hidden shadow-xs","onUpdate:page":ee[0]||(ee[0]=pe=>g.value=pe),"onUpdate:perPage":ee[1]||(ee[1]=pe=>{p.value=pe,g.value=1})},null,8,["total-items","current-page","per-page","loading"])):r.createCommentVNode("",!0)]))}});(function(){try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(".code-diff-view[theme=light] pre code.hljs{display:block;overflow-x:auto;padding:1em}.code-diff-view[theme=light] code.hljs{padding:3px 5px}.code-diff-view[theme=light] .hljs{color:#24292e;background:#fff}.code-diff-view[theme=light] .hljs-doctag,.code-diff-view[theme=light] .hljs-keyword,.code-diff-view[theme=light] .hljs-meta .hljs-keyword,.code-diff-view[theme=light] .hljs-template-tag,.code-diff-view[theme=light] .hljs-template-variable,.code-diff-view[theme=light] .hljs-type,.code-diff-view[theme=light] .hljs-variable.language_{color:#d73a49}.code-diff-view[theme=light] .hljs-title,.code-diff-view[theme=light] .hljs-title.class_,.code-diff-view[theme=light] .hljs-title.class_.inherited__,.code-diff-view[theme=light] .hljs-title.function_{color:#6f42c1}.code-diff-view[theme=light] .hljs-attr,.code-diff-view[theme=light] .hljs-attribute,.code-diff-view[theme=light] .hljs-literal,.code-diff-view[theme=light] .hljs-meta,.code-diff-view[theme=light] .hljs-number,.code-diff-view[theme=light] .hljs-operator,.code-diff-view[theme=light] .hljs-variable,.code-diff-view[theme=light] .hljs-selector-attr,.code-diff-view[theme=light] .hljs-selector-class,.code-diff-view[theme=light] .hljs-selector-id{color:#005cc5}.code-diff-view[theme=light] .hljs-regexp,.code-diff-view[theme=light] .hljs-string,.code-diff-view[theme=light] .hljs-meta .hljs-string{color:#032f62}.code-diff-view[theme=light] .hljs-built_in,.code-diff-view[theme=light] .hljs-symbol{color:#e36209}.code-diff-view[theme=light] .hljs-comment,.code-diff-view[theme=light] .hljs-code,.code-diff-view[theme=light] .hljs-formula{color:#6a737d}.code-diff-view[theme=light] .hljs-name,.code-diff-view[theme=light] .hljs-quote,.code-diff-view[theme=light] .hljs-selector-tag,.code-diff-view[theme=light] .hljs-selector-pseudo{color:#22863a}.code-diff-view[theme=light] .hljs-subst{color:#24292e}.code-diff-view[theme=light] .hljs-section{color:#005cc5;font-weight:700}.code-diff-view[theme=light] .hljs-bullet{color:#735c0f}.code-diff-view[theme=light] .hljs-emphasis{color:#24292e;font-style:italic}.code-diff-view[theme=light] .hljs-strong{color:#24292e;font-weight:700}.code-diff-view[theme=light] .hljs-addition{color:#22863a;background-color:#f0fff4}.code-diff-view[theme=light] .hljs-deletion{color:#b31d28;background-color:#ffeef0}.code-diff-view[theme=light]{color:var(--fgColor-default, var(--color-fg-default));background-color:var(--bgColor-default, var(--color-canvas-default));--color-canvas-default-transparent: rgba(255,255,255,0);--color-page-header-bg: #f6f8fa;--color-marketing-icon-primary: #218bff;--color-marketing-icon-secondary: #54aeff;--color-diff-blob-addition-num-text: #1F2328;--color-diff-blob-addition-fg: #1F2328;--color-diff-blob-addition-num-bg: #ccffd8;--color-diff-blob-addition-line-bg: #e6ffec;--color-diff-blob-addition-word-bg: #abf2bc;--color-diff-blob-deletion-num-text: #1F2328;--color-diff-blob-deletion-fg: #1F2328;--color-diff-blob-deletion-num-bg: #ffd7d5;--color-diff-blob-deletion-line-bg: #ffebe9;--color-diff-blob-deletion-word-bg: rgba(255,129,130,.4);--color-diff-blob-hunk-num-bg: rgba(84,174,255,.4);--color-diff-blob-expander-icon: #656d76;--color-diff-blob-selected-line-highlight-mix-blend-mode: multiply;--color-diffstat-deletion-border: rgba(31,35,40,.15);--color-diffstat-addition-border: rgba(31,35,40,.15);--color-diffstat-addition-bg: #1f883d;--color-search-keyword-hl: #fff8c5;--color-prettylights-syntax-comment: #6e7781;--color-prettylights-syntax-constant: #0550ae;--color-prettylights-syntax-entity: #6639ba;--color-prettylights-syntax-storage-modifier-import: #24292f;--color-prettylights-syntax-entity-tag: #116329;--color-prettylights-syntax-keyword: #cf222e;--color-prettylights-syntax-string: #0a3069;--color-prettylights-syntax-variable: #953800;--color-prettylights-syntax-brackethighlighter-unmatched: #82071e;--color-prettylights-syntax-invalid-illegal-text: #f6f8fa;--color-prettylights-syntax-invalid-illegal-bg: #82071e;--color-prettylights-syntax-carriage-return-text: #f6f8fa;--color-prettylights-syntax-carriage-return-bg: #cf222e;--color-prettylights-syntax-string-regexp: #116329;--color-prettylights-syntax-markup-list: #3b2300;--color-prettylights-syntax-markup-heading: #0550ae;--color-prettylights-syntax-markup-italic: #24292f;--color-prettylights-syntax-markup-bold: #24292f;--color-prettylights-syntax-markup-deleted-text: #82071e;--color-prettylights-syntax-markup-deleted-bg: #ffebe9;--color-prettylights-syntax-markup-inserted-text: #116329;--color-prettylights-syntax-markup-inserted-bg: #dafbe1;--color-prettylights-syntax-markup-changed-text: #953800;--color-prettylights-syntax-markup-changed-bg: #ffd8b5;--color-prettylights-syntax-markup-ignored-text: #eaeef2;--color-prettylights-syntax-markup-ignored-bg: #0550ae;--color-prettylights-syntax-meta-diff-range: #8250df;--color-prettylights-syntax-brackethighlighter-angle: #57606a;--color-prettylights-syntax-sublimelinter-gutter-mark: #8c959f;--color-prettylights-syntax-constant-other-reference-link: #0a3069;--color-codemirror-text: #1F2328;--color-codemirror-bg: #ffffff;--color-codemirror-gutters-bg: #ffffff;--color-codemirror-guttermarker-text: #ffffff;--color-codemirror-guttermarker-subtle-text: #6e7781;--color-codemirror-linenumber-text: #656d76;--color-codemirror-cursor: #1F2328;--color-codemirror-selection-bg: rgba(84,174,255,.4);--color-codemirror-activeline-bg: rgba(234,238,242,.5);--color-codemirror-matchingbracket-text: #1F2328;--color-codemirror-lines-bg: #ffffff;--color-codemirror-syntax-comment: #24292f;--color-codemirror-syntax-constant: #0550ae;--color-codemirror-syntax-entity: #8250df;--color-codemirror-syntax-keyword: #cf222e;--color-codemirror-syntax-storage: #cf222e;--color-codemirror-syntax-string: #0a3069;--color-codemirror-syntax-support: #0550ae;--color-codemirror-syntax-variable: #953800;--color-checks-bg: #24292f;--color-checks-run-border-width: 0px;--color-checks-container-border-width: 0px;--color-checks-text-primary: #f6f8fa;--color-checks-text-secondary: #8c959f;--color-checks-text-link: #54aeff;--color-checks-btn-icon: #afb8c1;--color-checks-btn-hover-icon: #f6f8fa;--color-checks-btn-hover-bg: rgba(255,255,255,.125);--color-checks-input-text: #eaeef2;--color-checks-input-placeholder-text: #8c959f;--color-checks-input-focus-text: #8c959f;--color-checks-input-bg: #32383f;--color-checks-input-shadow: none;--color-checks-donut-error: #fa4549;--color-checks-donut-pending: #bf8700;--color-checks-donut-success: #1f883d;--color-checks-donut-neutral: #afb8c1;--color-checks-dropdown-text: #afb8c1;--color-checks-dropdown-bg: #32383f;--color-checks-dropdown-border: #424a53;--color-checks-dropdown-shadow: rgba(31,35,40,.3);--color-checks-dropdown-hover-text: #f6f8fa;--color-checks-dropdown-hover-bg: #424a53;--color-checks-dropdown-btn-hover-text: #f6f8fa;--color-checks-dropdown-btn-hover-bg: #32383f;--color-checks-scrollbar-thumb-bg: #57606a;--color-checks-header-label-text: #d0d7de;--color-checks-header-label-open-text: #f6f8fa;--color-checks-header-border: #32383f;--color-checks-header-icon: #8c959f;--color-checks-line-text: #d0d7de;--color-checks-line-num-text: rgba(140,149,159,.75);--color-checks-line-timestamp-text: #8c959f;--color-checks-line-hover-bg: #32383f;--color-checks-line-selected-bg: rgba(33,139,255,.15);--color-checks-line-selected-num-text: #54aeff;--color-checks-line-dt-fm-text: #24292f;--color-checks-line-dt-fm-bg: #9a6700;--color-checks-gate-bg: rgba(125,78,0,.15);--color-checks-gate-text: #d0d7de;--color-checks-gate-waiting-text: #d4a72c;--color-checks-step-header-open-bg: #32383f;--color-checks-step-error-text: #ff8182;--color-checks-step-warning-text: #d4a72c;--color-checks-logline-text: #8c959f;--color-checks-logline-num-text: rgba(140,149,159,.75);--color-checks-logline-debug-text: #c297ff;--color-checks-logline-error-text: #d0d7de;--color-checks-logline-error-num-text: #ff8182;--color-checks-logline-error-bg: rgba(164,14,38,.15);--color-checks-logline-warning-text: #d0d7de;--color-checks-logline-warning-num-text: #d4a72c;--color-checks-logline-warning-bg: rgba(125,78,0,.15);--color-checks-logline-command-text: #54aeff;--color-checks-logline-section-text: #4ac26b;--color-checks-ansi-black: #24292f;--color-checks-ansi-black-bright: #32383f;--color-checks-ansi-white: #d0d7de;--color-checks-ansi-white-bright: #d0d7de;--color-checks-ansi-gray: #8c959f;--color-checks-ansi-red: #ff8182;--color-checks-ansi-red-bright: #ffaba8;--color-checks-ansi-green: #4ac26b;--color-checks-ansi-green-bright: #6fdd8b;--color-checks-ansi-yellow: #d4a72c;--color-checks-ansi-yellow-bright: #eac54f;--color-checks-ansi-blue: #54aeff;--color-checks-ansi-blue-bright: #80ccff;--color-checks-ansi-magenta: #c297ff;--color-checks-ansi-magenta-bright: #d8b9ff;--color-checks-ansi-cyan: #76e3ea;--color-checks-ansi-cyan-bright: #b3f0ff;--color-project-header-bg: #24292f;--color-project-sidebar-bg: #ffffff;--color-project-gradient-in: #ffffff;--color-project-gradient-out: rgba(255,255,255,0);--color-mktg-btn-bg: #1b1f23;--color-mktg-btn-shadow-outline: rgb(0 0 0 / 15%) 0 0 0 1px inset;--color-mktg-btn-shadow-focus: rgb(0 0 0 / 15%) 0 0 0 4px;--color-mktg-btn-shadow-hover: 0 3px 2px rgba(0, 0, 0, .07), 0 7px 5px rgba(0, 0, 0, .04), 0 12px 10px rgba(0, 0, 0, .03), 0 22px 18px rgba(0, 0, 0, .03), 0 42px 33px rgba(0, 0, 0, .02), 0 100px 80px rgba(0, 0, 0, .02);--color-mktg-btn-shadow-hover-muted: rgb(0 0 0 / 70%) 0 0 0 2px inset;--color-control-border-color-emphasis: #858F99;--color-avatar-bg: #ffffff;--color-avatar-border: rgba(31,35,40,.15);--color-avatar-stack-fade: #afb8c1;--color-avatar-stack-fade-more: #d0d7de;--color-avatar-child-shadow: 0 0 0 2px rgba(255,255,255,.8);--color-topic-tag-border: rgba(0,0,0,0);--color-counter-border: rgba(0,0,0,0);--color-select-menu-backdrop-border: rgba(0,0,0,0);--color-select-menu-tap-highlight: rgba(175,184,193,.5);--color-select-menu-tap-focus-bg: #b6e3ff;--color-overlay-shadow: 0 1px 3px rgba(31,35,40,.12), 0 8px 24px rgba(66,74,83,.12);--color-overlay-backdrop: rgba(140,149,159,.2);--color-header-text: rgba(255,255,255,.7);--color-header-bg: #24292f;--color-header-divider: #57606a;--color-header-logo: #ffffff;--color-header-search-bg: #24292f;--color-header-search-border: #57606a;--color-sidenav-selected-bg: #ffffff;--color-menu-bg-active: rgba(0,0,0,0);--color-input-disabled-bg: rgba(175,184,193,.2);--color-timeline-badge-bg: #eaeef2;--color-ansi-black: #24292f;--color-ansi-black-bright: #57606a;--color-ansi-white: #6e7781;--color-ansi-white-bright: #8c959f;--color-ansi-gray: #6e7781;--color-ansi-red: #cf222e;--color-ansi-red-bright: #a40e26;--color-ansi-green: #116329;--color-ansi-green-bright: #1a7f37;--color-ansi-yellow: #4d2d00;--color-ansi-yellow-bright: #633c01;--color-ansi-blue: #0969da;--color-ansi-blue-bright: #218bff;--color-ansi-magenta: #8250df;--color-ansi-magenta-bright: #a475f9;--color-ansi-cyan: #1b7c83;--color-ansi-cyan-bright: #3192aa;--color-btn-text: #24292f;--color-btn-bg: #f6f8fa;--color-btn-border: rgba(31,35,40,.15);--color-btn-shadow: 0 1px 0 rgba(31,35,40,.04);--color-btn-inset-shadow: inset 0 1px 0 rgba(255,255,255,.25);--color-btn-hover-bg: #f3f4f6;--color-btn-hover-border: rgba(31,35,40,.15);--color-btn-active-bg: hsla(220,14%,93%,1);--color-btn-active-border: rgba(31,35,40,.15);--color-btn-selected-bg: hsla(220,14%,94%,1);--color-btn-counter-bg: rgba(31,35,40,.08);--color-btn-primary-text: #ffffff;--color-btn-primary-bg: #1f883d;--color-btn-primary-border: rgba(31,35,40,.15);--color-btn-primary-shadow: 0 1px 0 rgba(31,35,40,.1);--color-btn-primary-inset-shadow: inset 0 1px 0 rgba(255,255,255,.03);--color-btn-primary-hover-bg: #1a7f37;--color-btn-primary-hover-border: rgba(31,35,40,.15);--color-btn-primary-selected-bg: hsla(137,66%,28%,1);--color-btn-primary-selected-shadow: inset 0 1px 0 rgba(0,45,17,.2);--color-btn-primary-disabled-text: rgba(255,255,255,.8);--color-btn-primary-disabled-bg: #94d3a2;--color-btn-primary-disabled-border: rgba(31,35,40,.15);--color-btn-primary-icon: rgba(255,255,255,.8);--color-btn-primary-counter-bg: rgba(0,45,17,.2);--color-btn-outline-text: #0969da;--color-btn-outline-hover-text: #ffffff;--color-btn-outline-hover-bg: #0969da;--color-btn-outline-hover-border: rgba(31,35,40,.15);--color-btn-outline-hover-shadow: 0 1px 0 rgba(31,35,40,.1);--color-btn-outline-hover-inset-shadow: inset 0 1px 0 rgba(255,255,255,.03);--color-btn-outline-hover-counter-bg: rgba(255,255,255,.2);--color-btn-outline-selected-text: #ffffff;--color-btn-outline-selected-bg: hsla(212,92%,42%,1);--color-btn-outline-selected-border: rgba(31,35,40,.15);--color-btn-outline-selected-shadow: inset 0 1px 0 rgba(0,33,85,.2);--color-btn-outline-disabled-text: rgba(9,105,218,.5);--color-btn-outline-disabled-bg: #f6f8fa;--color-btn-outline-disabled-counter-bg: rgba(9,105,218,.05);--color-btn-outline-counter-bg: #0969da1a;--color-btn-outline-counter-fg: #0550ae;--color-btn-outline-hover-counter-fg: #ffffff;--color-btn-outline-disabled-counter-fg: rgba(9,105,218,.5);--color-btn-danger-text: #cf222e;--color-btn-danger-hover-text: #ffffff;--color-btn-danger-hover-bg: #a40e26;--color-btn-danger-hover-border: rgba(31,35,40,.15);--color-btn-danger-hover-shadow: 0 1px 0 rgba(31,35,40,.1);--color-btn-danger-hover-inset-shadow: inset 0 1px 0 rgba(255,255,255,.03);--color-btn-danger-hover-counter-bg: rgba(255,255,255,.2);--color-btn-danger-selected-text: #ffffff;--color-btn-danger-selected-bg: hsla(356,72%,44%,1);--color-btn-danger-selected-border: rgba(31,35,40,.15);--color-btn-danger-selected-shadow: inset 0 1px 0 rgba(76,0,20,.2);--color-btn-danger-disabled-text: rgba(207,34,46,.5);--color-btn-danger-disabled-bg: #f6f8fa;--color-btn-danger-disabled-counter-bg: rgba(207,34,46,.05);--color-btn-danger-counter-bg: rgba(207,34,46,.1);--color-btn-danger-icon: #cf222e;--color-btn-danger-hover-icon: #ffffff;--color-btn-danger-counter-fg: #a40e26;--color-btn-danger-hover-counter-fg: #ffffff;--color-btn-danger-disabled-counter-fg: rgba(207,34,46,.5);--color-underlinenav-icon: #6e7781;--color-underlinenav-border-hover: rgba(175,184,193,.2);--color-action-list-item-inline-divider: rgba(208,215,222,.48);--color-action-list-item-default-hover-bg: rgba(208,215,222,.32);--color-action-list-item-default-hover-border: rgba(0,0,0,0);--color-action-list-item-default-active-bg: rgba(208,215,222,.48);--color-action-list-item-default-active-border: rgba(0,0,0,0);--color-action-list-item-default-selected-bg: rgba(208,215,222,.24);--color-action-list-item-danger-hover-bg: rgba(255,235,233,.64);--color-action-list-item-danger-active-bg: #ffebe9;--color-action-list-item-danger-hover-text: #d1242f;--color-switch-track-bg: #eaeef2;--color-switch-track-hover-bg: hsla(210,24%,90%,1);--color-switch-track-active-bg: hsla(210,24%,88%,1);--color-switch-track-disabled-bg: #8c959f;--color-switch-track-fg: #656d76;--color-switch-track-disabled-fg: #ffffff;--color-switch-track-border: rgba(0,0,0,0);--color-switch-track-checked-bg: #0969da;--color-switch-track-checked-hover-bg: #0860CA;--color-switch-track-checked-active-bg: #0757BA;--color-switch-track-checked-fg: #ffffff;--color-switch-track-checked-disabled-fg: #ffffff;--color-switch-track-checked-border: rgba(0,0,0,0);--color-switch-knob-bg: #ffffff;--color-switch-knob-disabled-bg: #f6f8fa;--color-switch-knob-border: #858F99;--color-switch-knob-checked-bg: #ffffff;--color-switch-knob-checked-disabled-bg: #f6f8fa;--color-switch-knob-checked-border: #0969da;--color-segmented-control-bg: #eaeef2;--color-segmented-control-button-bg: #ffffff;--color-segmented-control-button-hover-bg: rgba(175,184,193,.2);--color-segmented-control-button-active-bg: rgba(175,184,193,.4);--color-segmented-control-button-selected-border: #8c959f;--color-tree-view-item-chevron-hover-bg: rgba(208,215,222,.32);--color-tree-view-item-directory-fill: #54aeff;--color-fg-default: #1F2328;--color-fg-muted: #656d76;--color-fg-subtle: #6e7781;--color-fg-on-emphasis: #ffffff;--color-canvas-default: #ffffff;--color-canvas-overlay: #ffffff;--color-canvas-inset: #f6f8fa;--color-canvas-subtle: #f6f8fa;--color-border-default: #d0d7de;--color-border-muted: hsla(210,18%,87%,1);--color-border-subtle: rgba(31,35,40,.15);--color-shadow-small: 0 1px 0 rgba(31,35,40,.04);--color-shadow-medium: 0 3px 6px rgba(140,149,159,.15);--color-shadow-large: 0 8px 24px rgba(140,149,159,.2);--color-shadow-extra-large: 0 12px 28px rgba(140,149,159,.3);--color-neutral-emphasis-plus: #24292f;--color-neutral-emphasis: #6e7781;--color-neutral-muted: rgba(175,184,193,.2);--color-neutral-subtle: rgba(234,238,242,.5);--color-accent-fg: #0969da;--color-accent-emphasis: #0969da;--color-accent-muted: rgba(84,174,255,.4);--color-accent-subtle: #ddf4ff;--color-success-fg: #1a7f37;--color-success-emphasis: #1f883d;--color-success-muted: rgba(74,194,107,.4);--color-success-subtle: #dafbe1;--color-attention-fg: #9a6700;--color-attention-emphasis: #9a6700;--color-attention-muted: rgba(212,167,44,.4);--color-attention-subtle: #fff8c5;--color-severe-fg: #bc4c00;--color-severe-emphasis: #bc4c00;--color-severe-muted: rgba(251,143,68,.4);--color-severe-subtle: #fff1e5;--color-danger-fg: #d1242f;--color-danger-emphasis: #cf222e;--color-danger-muted: rgba(255,129,130,.4);--color-danger-subtle: #ffebe9;--color-open-fg: #1a7f37;--color-open-emphasis: #1f883d;--color-open-muted: rgba(74,194,107,.4);--color-open-subtle: #dafbe1;--color-closed-fg: #d1242f;--color-closed-emphasis: #cf222e;--color-closed-muted: rgba(255,129,130,.4);--color-closed-subtle: #ffebe9;--color-done-fg: #8250df;--color-done-emphasis: #8250df;--color-done-muted: rgba(194,151,255,.4);--color-done-subtle: #fbefff;--color-sponsors-fg: #bf3989;--color-sponsors-emphasis: #bf3989;--color-sponsors-muted: rgba(255,128,200,.4);--color-sponsors-subtle: #ffeff7;--color-primer-fg-disabled: #8c959f;--color-primer-canvas-backdrop: rgba(31,35,40,.5);--color-primer-canvas-sticky: rgba(255,255,255,.95);--color-primer-border-active: #fd8c73;--color-primer-border-contrast: rgba(31,35,40,.1);--color-primer-shadow-highlight: inset 0 1px 0 rgba(255,255,255,.25);--color-primer-shadow-inset: inset 0 1px 0 rgba(208,215,222,.2);--color-scale-black: #1F2328;--color-scale-white: #ffffff;--color-scale-gray-0: #f6f8fa;--color-scale-gray-1: #eaeef2;--color-scale-gray-2: #d0d7de;--color-scale-gray-3: #afb8c1;--color-scale-gray-4: #8c959f;--color-scale-gray-5: #6e7781;--color-scale-gray-6: #57606a;--color-scale-gray-7: #424a53;--color-scale-gray-8: #32383f;--color-scale-gray-9: #24292f;--color-scale-blue-0: #ddf4ff;--color-scale-blue-1: #b6e3ff;--color-scale-blue-2: #80ccff;--color-scale-blue-3: #54aeff;--color-scale-blue-4: #218bff;--color-scale-blue-5: #0969da;--color-scale-blue-6: #0550ae;--color-scale-blue-7: #033d8b;--color-scale-blue-8: #0a3069;--color-scale-blue-9: #002155;--color-scale-green-0: #dafbe1;--color-scale-green-1: #aceebb;--color-scale-green-2: #6fdd8b;--color-scale-green-3: #4ac26b;--color-scale-green-4: #2da44e;--color-scale-green-5: #1a7f37;--color-scale-green-6: #116329;--color-scale-green-7: #044f1e;--color-scale-green-8: #003d16;--color-scale-green-9: #002d11;--color-scale-yellow-0: #fff8c5;--color-scale-yellow-1: #fae17d;--color-scale-yellow-2: #eac54f;--color-scale-yellow-3: #d4a72c;--color-scale-yellow-4: #bf8700;--color-scale-yellow-5: #9a6700;--color-scale-yellow-6: #7d4e00;--color-scale-yellow-7: #633c01;--color-scale-yellow-8: #4d2d00;--color-scale-yellow-9: #3b2300;--color-scale-orange-0: #fff1e5;--color-scale-orange-1: #ffd8b5;--color-scale-orange-2: #ffb77c;--color-scale-orange-3: #fb8f44;--color-scale-orange-4: #e16f24;--color-scale-orange-5: #bc4c00;--color-scale-orange-6: #953800;--color-scale-orange-7: #762c00;--color-scale-orange-8: #5c2200;--color-scale-orange-9: #471700;--color-scale-red-0: #ffebe9;--color-scale-red-1: #ffcecb;--color-scale-red-2: #ffaba8;--color-scale-red-3: #ff8182;--color-scale-red-4: #fa4549;--color-scale-red-5: #cf222e;--color-scale-red-6: #a40e26;--color-scale-red-7: #82071e;--color-scale-red-8: #660018;--color-scale-red-9: #4c0014;--color-scale-purple-0: #fbefff;--color-scale-purple-1: #ecd8ff;--color-scale-purple-2: #d8b9ff;--color-scale-purple-3: #c297ff;--color-scale-purple-4: #a475f9;--color-scale-purple-5: #8250df;--color-scale-purple-6: #6639ba;--color-scale-purple-7: #512a97;--color-scale-purple-8: #3e1f79;--color-scale-purple-9: #2e1461;--color-scale-pink-0: #ffeff7;--color-scale-pink-1: #ffd3eb;--color-scale-pink-2: #ffadda;--color-scale-pink-3: #ff80c8;--color-scale-pink-4: #e85aad;--color-scale-pink-5: #bf3989;--color-scale-pink-6: #99286e;--color-scale-pink-7: #772057;--color-scale-pink-8: #611347;--color-scale-pink-9: #4d0336;--color-scale-coral-0: #fff0eb;--color-scale-coral-1: #ffd6cc;--color-scale-coral-2: #ffb4a1;--color-scale-coral-3: #fd8c73;--color-scale-coral-4: #ec6547;--color-scale-coral-5: #c4432b;--color-scale-coral-6: #9e2f1c;--color-scale-coral-7: #801f0f;--color-scale-coral-8: #691105;--color-scale-coral-9: #510901}.code-diff-view[theme=dark] pre code.hljs{display:block;overflow-x:auto;padding:1em}.code-diff-view[theme=dark] code.hljs{padding:3px 5px}.code-diff-view[theme=dark] .hljs{color:#c9d1d9;background:#0d1117}.code-diff-view[theme=dark] .hljs-doctag,.code-diff-view[theme=dark] .hljs-keyword,.code-diff-view[theme=dark] .hljs-meta .hljs-keyword,.code-diff-view[theme=dark] .hljs-template-tag,.code-diff-view[theme=dark] .hljs-template-variable,.code-diff-view[theme=dark] .hljs-type,.code-diff-view[theme=dark] .hljs-variable.language_{color:#ff7b72}.code-diff-view[theme=dark] .hljs-title,.code-diff-view[theme=dark] .hljs-title.class_,.code-diff-view[theme=dark] .hljs-title.class_.inherited__,.code-diff-view[theme=dark] .hljs-title.function_{color:#d2a8ff}.code-diff-view[theme=dark] .hljs-attr,.code-diff-view[theme=dark] .hljs-attribute,.code-diff-view[theme=dark] .hljs-literal,.code-diff-view[theme=dark] .hljs-meta,.code-diff-view[theme=dark] .hljs-number,.code-diff-view[theme=dark] .hljs-operator,.code-diff-view[theme=dark] .hljs-variable,.code-diff-view[theme=dark] .hljs-selector-attr,.code-diff-view[theme=dark] .hljs-selector-class,.code-diff-view[theme=dark] .hljs-selector-id{color:#79c0ff}.code-diff-view[theme=dark] .hljs-regexp,.code-diff-view[theme=dark] .hljs-string,.code-diff-view[theme=dark] .hljs-meta .hljs-string{color:#a5d6ff}.code-diff-view[theme=dark] .hljs-built_in,.code-diff-view[theme=dark] .hljs-symbol{color:#ffa657}.code-diff-view[theme=dark] .hljs-comment,.code-diff-view[theme=dark] .hljs-code,.code-diff-view[theme=dark] .hljs-formula{color:#8b949e}.code-diff-view[theme=dark] .hljs-name,.code-diff-view[theme=dark] .hljs-quote,.code-diff-view[theme=dark] .hljs-selector-tag,.code-diff-view[theme=dark] .hljs-selector-pseudo{color:#7ee787}.code-diff-view[theme=dark] .hljs-subst{color:#c9d1d9}.code-diff-view[theme=dark] .hljs-section{color:#1f6feb;font-weight:700}.code-diff-view[theme=dark] .hljs-bullet{color:#f2cc60}.code-diff-view[theme=dark] .hljs-emphasis{color:#c9d1d9;font-style:italic}.code-diff-view[theme=dark] .hljs-strong{color:#c9d1d9;font-weight:700}.code-diff-view[theme=dark] .hljs-addition{color:#aff5b4;background-color:#033a16}.code-diff-view[theme=dark] .hljs-deletion{color:#ffdcd7;background-color:#67060c}.code-diff-view[theme=dark]{color:var(--fgColor-default, var(--color-fg-default));background-color:var(--bgColor-default, var(--color-canvas-default));--color-canvas-default-transparent: rgba(13,17,23,0);--color-page-header-bg: #0d1117;--color-marketing-icon-primary: #79c0ff;--color-marketing-icon-secondary: #1f6feb;--color-diff-blob-addition-num-text: #e6edf3;--color-diff-blob-addition-fg: #e6edf3;--color-diff-blob-addition-num-bg: rgba(63,185,80,.3);--color-diff-blob-addition-line-bg: rgba(46,160,67,.15);--color-diff-blob-addition-word-bg: rgba(46,160,67,.4);--color-diff-blob-deletion-num-text: #e6edf3;--color-diff-blob-deletion-fg: #e6edf3;--color-diff-blob-deletion-num-bg: rgba(248,81,73,.3);--color-diff-blob-deletion-line-bg: rgba(248,81,73,.1);--color-diff-blob-deletion-word-bg: rgba(248,81,73,.4);--color-diff-blob-hunk-num-bg: rgba(56,139,253,.4);--color-diff-blob-expander-icon: #7d8590;--color-diff-blob-selected-line-highlight-mix-blend-mode: screen;--color-diffstat-deletion-border: rgba(240,246,252,.1);--color-diffstat-addition-border: rgba(240,246,252,.1);--color-diffstat-addition-bg: #3fb950;--color-search-keyword-hl: rgba(210,153,34,.4);--color-prettylights-syntax-comment: #8b949e;--color-prettylights-syntax-constant: #79c0ff;--color-prettylights-syntax-entity: #d2a8ff;--color-prettylights-syntax-storage-modifier-import: #c9d1d9;--color-prettylights-syntax-entity-tag: #7ee787;--color-prettylights-syntax-keyword: #ff7b72;--color-prettylights-syntax-string: #a5d6ff;--color-prettylights-syntax-variable: #ffa657;--color-prettylights-syntax-brackethighlighter-unmatched: #f85149;--color-prettylights-syntax-invalid-illegal-text: #f0f6fc;--color-prettylights-syntax-invalid-illegal-bg: #8e1519;--color-prettylights-syntax-carriage-return-text: #f0f6fc;--color-prettylights-syntax-carriage-return-bg: #b62324;--color-prettylights-syntax-string-regexp: #7ee787;--color-prettylights-syntax-markup-list: #f2cc60;--color-prettylights-syntax-markup-heading: #1f6feb;--color-prettylights-syntax-markup-italic: #c9d1d9;--color-prettylights-syntax-markup-bold: #c9d1d9;--color-prettylights-syntax-markup-deleted-text: #ffdcd7;--color-prettylights-syntax-markup-deleted-bg: #67060c;--color-prettylights-syntax-markup-inserted-text: #aff5b4;--color-prettylights-syntax-markup-inserted-bg: #033a16;--color-prettylights-syntax-markup-changed-text: #ffdfb6;--color-prettylights-syntax-markup-changed-bg: #5a1e02;--color-prettylights-syntax-markup-ignored-text: #c9d1d9;--color-prettylights-syntax-markup-ignored-bg: #1158c7;--color-prettylights-syntax-meta-diff-range: #d2a8ff;--color-prettylights-syntax-brackethighlighter-angle: #8b949e;--color-prettylights-syntax-sublimelinter-gutter-mark: #484f58;--color-prettylights-syntax-constant-other-reference-link: #a5d6ff;--color-codemirror-text: #e6edf3;--color-codemirror-bg: #0d1117;--color-codemirror-gutters-bg: #0d1117;--color-codemirror-guttermarker-text: #0d1117;--color-codemirror-guttermarker-subtle-text: #6e7681;--color-codemirror-linenumber-text: #7d8590;--color-codemirror-cursor: #e6edf3;--color-codemirror-selection-bg: rgba(56,139,253,.4);--color-codemirror-activeline-bg: rgba(110,118,129,.1);--color-codemirror-matchingbracket-text: #e6edf3;--color-codemirror-lines-bg: #0d1117;--color-codemirror-syntax-comment: #8b949e;--color-codemirror-syntax-constant: #79c0ff;--color-codemirror-syntax-entity: #d2a8ff;--color-codemirror-syntax-keyword: #ff7b72;--color-codemirror-syntax-storage: #ff7b72;--color-codemirror-syntax-string: #a5d6ff;--color-codemirror-syntax-support: #79c0ff;--color-codemirror-syntax-variable: #ffa657;--color-checks-bg: #010409;--color-checks-run-border-width: 1px;--color-checks-container-border-width: 1px;--color-checks-text-primary: #e6edf3;--color-checks-text-secondary: #7d8590;--color-checks-text-link: #2f81f7;--color-checks-btn-icon: #7d8590;--color-checks-btn-hover-icon: #e6edf3;--color-checks-btn-hover-bg: rgba(110,118,129,.1);--color-checks-input-text: #7d8590;--color-checks-input-placeholder-text: #6e7681;--color-checks-input-focus-text: #e6edf3;--color-checks-input-bg: #161b22;--color-checks-donut-error: #f85149;--color-checks-donut-pending: #d29922;--color-checks-donut-success: #2ea043;--color-checks-donut-neutral: #8b949e;--color-checks-dropdown-text: #e6edf3;--color-checks-dropdown-bg: #161b22;--color-checks-dropdown-border: #30363d;--color-checks-dropdown-shadow: rgba(1,4,9,.3);--color-checks-dropdown-hover-text: #e6edf3;--color-checks-dropdown-hover-bg: rgba(110,118,129,.1);--color-checks-dropdown-btn-hover-text: #e6edf3;--color-checks-dropdown-btn-hover-bg: rgba(110,118,129,.1);--color-checks-scrollbar-thumb-bg: rgba(110,118,129,.4);--color-checks-header-label-text: #7d8590;--color-checks-header-label-open-text: #e6edf3;--color-checks-header-border: #21262d;--color-checks-header-icon: #7d8590;--color-checks-line-text: #7d8590;--color-checks-line-num-text: #6e7681;--color-checks-line-timestamp-text: #6e7681;--color-checks-line-hover-bg: rgba(110,118,129,.1);--color-checks-line-selected-bg: rgba(56,139,253,.1);--color-checks-line-selected-num-text: #2f81f7;--color-checks-line-dt-fm-text: #ffffff;--color-checks-line-dt-fm-bg: #9e6a03;--color-checks-gate-bg: rgba(187,128,9,.15);--color-checks-gate-text: #7d8590;--color-checks-gate-waiting-text: #d29922;--color-checks-step-header-open-bg: #161b22;--color-checks-step-error-text: #f85149;--color-checks-step-warning-text: #d29922;--color-checks-logline-text: #7d8590;--color-checks-logline-num-text: #6e7681;--color-checks-logline-debug-text: #a371f7;--color-checks-logline-error-text: #7d8590;--color-checks-logline-error-num-text: #6e7681;--color-checks-logline-error-bg: rgba(248,81,73,.1);--color-checks-logline-warning-text: #7d8590;--color-checks-logline-warning-num-text: #d29922;--color-checks-logline-warning-bg: rgba(187,128,9,.15);--color-checks-logline-command-text: #2f81f7;--color-checks-logline-section-text: #3fb950;--color-checks-ansi-black: #0d1117;--color-checks-ansi-black-bright: #161b22;--color-checks-ansi-white: #b1bac4;--color-checks-ansi-white-bright: #b1bac4;--color-checks-ansi-gray: #6e7681;--color-checks-ansi-red: #ff7b72;--color-checks-ansi-red-bright: #ffa198;--color-checks-ansi-green: #3fb950;--color-checks-ansi-green-bright: #56d364;--color-checks-ansi-yellow: #d29922;--color-checks-ansi-yellow-bright: #e3b341;--color-checks-ansi-blue: #58a6ff;--color-checks-ansi-blue-bright: #79c0ff;--color-checks-ansi-magenta: #bc8cff;--color-checks-ansi-magenta-bright: #d2a8ff;--color-checks-ansi-cyan: #76e3ea;--color-checks-ansi-cyan-bright: #b3f0ff;--color-project-header-bg: #0d1117;--color-project-sidebar-bg: #161b22;--color-project-gradient-in: #161b22;--color-project-gradient-out: rgba(22,27,34,0);--color-mktg-btn-bg: #f6f8fa;--color-mktg-btn-shadow-outline: rgb(255 255 255 / 25%) 0 0 0 1px inset;--color-mktg-btn-shadow-focus: rgb(255 255 255 / 25%) 0 0 0 4px;--color-mktg-btn-shadow-hover: 0 4px 7px rgba(0, 0, 0, .15), 0 100px 80px rgba(255, 255, 255, .02), 0 42px 33px rgba(255, 255, 255, .024), 0 22px 18px rgba(255, 255, 255, .028), 0 12px 10px rgba(255, 255, 255, .034), 0 7px 5px rgba(255, 255, 255, .04), 0 3px 2px rgba(255, 255, 255, .07);--color-mktg-btn-shadow-hover-muted: rgb(255 255 255) 0 0 0 2px inset;--color-control-border-color-emphasis: #606771;--color-avatar-bg: rgba(255,255,255,.1);--color-avatar-border: rgba(240,246,252,.1);--color-avatar-stack-fade: #30363d;--color-avatar-stack-fade-more: #21262d;--color-avatar-child-shadow: 0 0 0 2px #0d1117;--color-topic-tag-border: rgba(0,0,0,0);--color-counter-border: rgba(0,0,0,0);--color-select-menu-backdrop-border: #484f58;--color-select-menu-tap-highlight: rgba(48,54,61,.5);--color-select-menu-tap-focus-bg: #0c2d6b;--color-overlay-shadow: 0 0 0 1px #30363d, 0 16px 32px rgba(1,4,9,.85);--color-overlay-backdrop: rgba(22,27,34,.4);--color-header-text: rgba(255,255,255,.7);--color-header-bg: #161b22;--color-header-divider: #8b949e;--color-header-logo: #f0f6fc;--color-header-search-bg: #0d1117;--color-header-search-border: #30363d;--color-sidenav-selected-bg: #21262d;--color-menu-bg-active: #161b22;--color-input-disabled-bg: rgba(110,118,129,0);--color-timeline-badge-bg: #21262d;--color-ansi-black: #484f58;--color-ansi-black-bright: #6e7681;--color-ansi-white: #b1bac4;--color-ansi-white-bright: #ffffff;--color-ansi-gray: #6e7681;--color-ansi-red: #ff7b72;--color-ansi-red-bright: #ffa198;--color-ansi-green: #3fb950;--color-ansi-green-bright: #56d364;--color-ansi-yellow: #d29922;--color-ansi-yellow-bright: #e3b341;--color-ansi-blue: #58a6ff;--color-ansi-blue-bright: #79c0ff;--color-ansi-magenta: #bc8cff;--color-ansi-magenta-bright: #d2a8ff;--color-ansi-cyan: #39c5cf;--color-ansi-cyan-bright: #56d4dd;--color-btn-text: #c9d1d9;--color-btn-bg: #21262d;--color-btn-border: rgba(240,246,252,.1);--color-btn-shadow: 0 0 transparent;--color-btn-inset-shadow: 0 0 transparent;--color-btn-hover-bg: #30363d;--color-btn-hover-border: #8b949e;--color-btn-active-bg: hsla(212,12%,18%,1);--color-btn-active-border: #6e7681;--color-btn-selected-bg: #161b22;--color-btn-counter-bg: #30363d;--color-btn-primary-text: #ffffff;--color-btn-primary-bg: #238636;--color-btn-primary-border: rgba(240,246,252,.1);--color-btn-primary-shadow: 0 0 transparent;--color-btn-primary-inset-shadow: 0 0 transparent;--color-btn-primary-hover-bg: #2ea043;--color-btn-primary-hover-border: rgba(240,246,252,.1);--color-btn-primary-selected-bg: #238636;--color-btn-primary-selected-shadow: 0 0 transparent;--color-btn-primary-disabled-text: rgba(255,255,255,.5);--color-btn-primary-disabled-bg: rgba(35,134,54,.6);--color-btn-primary-disabled-border: rgba(240,246,252,.1);--color-btn-primary-icon: #ffffff;--color-btn-primary-counter-bg: rgba(4,38,15,.2);--color-btn-outline-text: #388bfd;--color-btn-outline-hover-text: #58a6ff;--color-btn-outline-hover-bg: #30363d;--color-btn-outline-hover-border: rgba(240,246,252,.1);--color-btn-outline-hover-shadow: 0 1px 0 rgba(1,4,9,.1);--color-btn-outline-hover-inset-shadow: inset 0 1px 0 rgba(255,255,255,.03);--color-btn-outline-hover-counter-bg: rgba(5,29,77,.2);--color-btn-outline-selected-text: #ffffff;--color-btn-outline-selected-bg: #0d419d;--color-btn-outline-selected-border: rgba(240,246,252,.1);--color-btn-outline-selected-shadow: 0 0 transparent;--color-btn-outline-disabled-text: rgba(88,166,255,.5);--color-btn-outline-disabled-bg: #0d1117;--color-btn-outline-disabled-counter-bg: rgba(31,111,235,.05);--color-btn-outline-counter-bg: rgba(5,29,77,.2);--color-btn-outline-hover-counter-fg: #58a6ff;--color-btn-outline-disabled-counter-fg: rgba(47,129,247,.5);--color-btn-outline-counter-fg: #388bfd;--color-btn-danger-text: #f85149;--color-btn-danger-hover-text: #ffffff;--color-btn-danger-hover-bg: #da3633;--color-btn-danger-hover-border: #f85149;--color-btn-danger-hover-shadow: 0 0 transparent;--color-btn-danger-hover-inset-shadow: 0 0 transparent;--color-btn-danger-hover-icon: #ffffff;--color-btn-danger-hover-counter-bg: rgba(255,255,255,.2);--color-btn-danger-selected-text: #ffffff;--color-btn-danger-selected-bg: #b62324;--color-btn-danger-selected-border: #ff7b72;--color-btn-danger-selected-shadow: 0 0 transparent;--color-btn-danger-disabled-text: rgba(248,81,73,.5);--color-btn-danger-disabled-bg: #0d1117;--color-btn-danger-disabled-counter-bg: rgba(218,54,51,.05);--color-btn-danger-counter-bg: rgba(73,2,2,.2);--color-btn-danger-icon: #f85149;--color-btn-danger-counter-fg: #f85149;--color-btn-danger-disabled-counter-fg: rgba(248,81,73,.5);--color-btn-danger-hover-counter-fg: #ffffff;--color-underlinenav-icon: #6e7681;--color-underlinenav-border-hover: rgba(110,118,129,.4);--color-action-list-item-inline-divider: rgba(48,54,61,.48);--color-action-list-item-default-hover-bg: rgba(177,186,196,.12);--color-action-list-item-default-hover-border: rgba(0,0,0,0);--color-action-list-item-default-active-bg: rgba(177,186,196,.2);--color-action-list-item-default-active-border: rgba(0,0,0,0);--color-action-list-item-default-selected-bg: rgba(177,186,196,.08);--color-action-list-item-danger-hover-bg: rgba(248,81,73,.16);--color-action-list-item-danger-active-bg: rgba(248,81,73,.24);--color-action-list-item-danger-hover-text: #ff7b72;--color-switch-track-bg: rgba(110,118,129,.1);--color-switch-track-hover-bg: hsla(215,8%,72%,.1);--color-switch-track-active-bg: rgba(110,118,129,.4);--color-switch-track-disabled-bg: #21262d;--color-switch-track-fg: #7d8590;--color-switch-track-disabled-fg: #010409;--color-switch-track-border: rgba(0,0,0,0);--color-switch-track-checked-bg: rgba(31,111,235,.35);--color-switch-track-checked-hover-bg: rgba(31,111,235,.5);--color-switch-track-checked-active-bg: rgba(31,111,235,.65);--color-switch-track-checked-fg: #ffffff;--color-switch-track-checked-disabled-fg: #010409;--color-switch-track-checked-border: rgba(0,0,0,0);--color-switch-knob-bg: #0d1117;--color-switch-knob-border: #606771;--color-switch-knob-disabled-bg: #161b22;--color-switch-knob-checked-bg: #0d1117;--color-switch-knob-checked-disabled-bg: #161b22;--color-switch-knob-checked-border: rgba(31,111,235,.35);--color-segmented-control-bg: rgba(110,118,129,.1);--color-segmented-control-button-bg: #0d1117;--color-segmented-control-button-hover-bg: #30363d;--color-segmented-control-button-active-bg: #21262d;--color-segmented-control-button-selected-border: #6e7681;--color-tree-view-item-chevron-hover-bg: rgba(177,186,196,.12);--color-tree-view-item-directory-fill: #7d8590;--color-fg-default: #e6edf3;--color-fg-muted: #7d8590;--color-fg-subtle: #6e7681;--color-fg-on-emphasis: #ffffff;--color-canvas-default: #0d1117;--color-canvas-overlay: #161b22;--color-canvas-inset: #010409;--color-canvas-subtle: #161b22;--color-border-default: #30363d;--color-border-muted: #21262d;--color-border-subtle: rgba(240,246,252,.1);--color-shadow-small: 0 0 transparent;--color-shadow-medium: 0 3px 6px #010409;--color-shadow-large: 0 8px 24px #010409;--color-shadow-extra-large: 0 12px 48px #010409;--color-neutral-emphasis-plus: #6e7681;--color-neutral-emphasis: #6e7681;--color-neutral-muted: rgba(110,118,129,.4);--color-neutral-subtle: rgba(110,118,129,.1);--color-accent-fg: #2f81f7;--color-accent-emphasis: #1f6feb;--color-accent-muted: rgba(56,139,253,.4);--color-accent-subtle: rgba(56,139,253,.1);--color-success-fg: #3fb950;--color-success-emphasis: #238636;--color-success-muted: rgba(46,160,67,.4);--color-success-subtle: rgba(46,160,67,.15);--color-attention-fg: #d29922;--color-attention-emphasis: #9e6a03;--color-attention-muted: rgba(187,128,9,.4);--color-attention-subtle: rgba(187,128,9,.15);--color-severe-fg: #db6d28;--color-severe-emphasis: #bd561d;--color-severe-muted: rgba(219,109,40,.4);--color-severe-subtle: rgba(219,109,40,.1);--color-danger-fg: #f85149;--color-danger-emphasis: #da3633;--color-danger-muted: rgba(248,81,73,.4);--color-danger-subtle: rgba(248,81,73,.1);--color-open-fg: #3fb950;--color-open-emphasis: #238636;--color-open-muted: rgba(46,160,67,.4);--color-open-subtle: rgba(46,160,67,.15);--color-closed-fg: #f85149;--color-closed-emphasis: #da3633;--color-closed-muted: rgba(248,81,73,.4);--color-closed-subtle: rgba(248,81,73,.15);--color-done-fg: #a371f7;--color-done-emphasis: #8957e5;--color-done-muted: rgba(163,113,247,.4);--color-done-subtle: rgba(163,113,247,.1);--color-sponsors-fg: #db61a2;--color-sponsors-emphasis: #bf4b8a;--color-sponsors-muted: rgba(219,97,162,.4);--color-sponsors-subtle: rgba(219,97,162,.1);--color-primer-fg-disabled: #484f58;--color-primer-canvas-backdrop: rgba(1,4,9,.8);--color-primer-canvas-sticky: rgba(13,17,23,.95);--color-primer-border-active: #f78166;--color-primer-border-contrast: rgba(255,255,255,.2);--color-primer-shadow-highlight: 0 0 transparent;--color-primer-shadow-inset: 0 0 transparent;--color-scale-black: #010409;--color-scale-white: #ffffff;--color-scale-gray-0: #f0f6fc;--color-scale-gray-1: #c9d1d9;--color-scale-gray-2: #b1bac4;--color-scale-gray-3: #8b949e;--color-scale-gray-4: #6e7681;--color-scale-gray-5: #484f58;--color-scale-gray-6: #30363d;--color-scale-gray-7: #21262d;--color-scale-gray-8: #161b22;--color-scale-gray-9: #0d1117;--color-scale-blue-0: #cae8ff;--color-scale-blue-1: #a5d6ff;--color-scale-blue-2: #79c0ff;--color-scale-blue-3: #58a6ff;--color-scale-blue-4: #388bfd;--color-scale-blue-5: #1f6feb;--color-scale-blue-6: #1158c7;--color-scale-blue-7: #0d419d;--color-scale-blue-8: #0c2d6b;--color-scale-blue-9: #051d4d;--color-scale-green-0: #aff5b4;--color-scale-green-1: #7ee787;--color-scale-green-2: #56d364;--color-scale-green-3: #3fb950;--color-scale-green-4: #2ea043;--color-scale-green-5: #238636;--color-scale-green-6: #196c2e;--color-scale-green-7: #0f5323;--color-scale-green-8: #033a16;--color-scale-green-9: #04260f;--color-scale-yellow-0: #f8e3a1;--color-scale-yellow-1: #f2cc60;--color-scale-yellow-2: #e3b341;--color-scale-yellow-3: #d29922;--color-scale-yellow-4: #bb8009;--color-scale-yellow-5: #9e6a03;--color-scale-yellow-6: #845306;--color-scale-yellow-7: #693e00;--color-scale-yellow-8: #4b2900;--color-scale-yellow-9: #341a00;--color-scale-orange-0: #ffdfb6;--color-scale-orange-1: #ffc680;--color-scale-orange-2: #ffa657;--color-scale-orange-3: #f0883e;--color-scale-orange-4: #db6d28;--color-scale-orange-5: #bd561d;--color-scale-orange-6: #9b4215;--color-scale-orange-7: #762d0a;--color-scale-orange-8: #5a1e02;--color-scale-orange-9: #3d1300;--color-scale-red-0: #ffdcd7;--color-scale-red-1: #ffc1ba;--color-scale-red-2: #ffa198;--color-scale-red-3: #ff7b72;--color-scale-red-4: #f85149;--color-scale-red-5: #da3633;--color-scale-red-6: #b62324;--color-scale-red-7: #8e1519;--color-scale-red-8: #67060c;--color-scale-red-9: #490202;--color-scale-purple-0: #eddeff;--color-scale-purple-1: #e2c5ff;--color-scale-purple-2: #d2a8ff;--color-scale-purple-3: #bc8cff;--color-scale-purple-4: #a371f7;--color-scale-purple-5: #8957e5;--color-scale-purple-6: #6e40c9;--color-scale-purple-7: #553098;--color-scale-purple-8: #3c1e70;--color-scale-purple-9: #271052;--color-scale-pink-0: #ffdaec;--color-scale-pink-1: #ffbedd;--color-scale-pink-2: #ff9bce;--color-scale-pink-3: #f778ba;--color-scale-pink-4: #db61a2;--color-scale-pink-5: #bf4b8a;--color-scale-pink-6: #9e3670;--color-scale-pink-7: #7d2457;--color-scale-pink-8: #5e103e;--color-scale-pink-9: #42062a;--color-scale-coral-0: #ffddd2;--color-scale-coral-1: #ffc2b2;--color-scale-coral-2: #ffa28b;--color-scale-coral-3: #f78166;--color-scale-coral-4: #ea6045;--color-scale-coral-5: #cf462d;--color-scale-coral-6: #ac3220;--color-scale-coral-7: #872012;--color-scale-coral-8: #640d04;--color-scale-coral-9: #460701}.code-diff-view *{position:static;box-sizing:border-box}.code-diff-view{position:relative;margin-top:16px;margin-bottom:16px;border:1px solid var(--color-border-default, #ddd);border-radius:6px;overflow-y:auto}.code-diff-view .file-header{position:sticky;top:0;z-index:1;background-color:var(--color-canvas-subtle);border-bottom:1px solid var(--color-border-default);padding:8px 16px;font-size:12px;font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace}.code-diff-view .file-header .file-info{display:flex;justify-content:space-between;align-items:center;margin-left:8px;height:24px}.code-diff-view .file-header .file-info .info-left{color:var(--color-fg-default)}.code-diff-view .file-header .file-info .info-right{display:flex;justify-content:space-between;align-items:center;width:50%}.code-diff-view .file-header .file-info .diff-stat{display:inline-flex;align-items:center;gap:8px}.code-diff-view .file-header .file-info .diff-stat .diff-stat-added{color:var(--color-diffstat-addition-bg)}.code-diff-view .file-header .file-info .diff-stat .diff-stat-deleted{color:var(--color-danger-emphasis)}.code-diff-view .file-header .file-info .diff-stat .diff-stat-ignored{color:var(--color-fg-subtle)}.code-diff-view .file-header .file-info .diff-commandbar{margin-left:auto;margin-right:1rem}.code-diff-view .file-header .file-info .diff-commandbar .command-item-button{background-color:transparent;color:var(--color-fg-subtle);border:none}.code-diff-view .file-header .file-info .diff-commandbar .command-item-button svg{fill:var(--color-fg-subtle)}.code-diff-view .file-header .file-info .diff-commandbar .command-item-button:hover{background-color:var(--color-btn-outline-hover-border)}.code-diff-view table{border-spacing:0}.code-diff-view .diff-table{width:100%}.code-diff-view .diff-table .blob-num{position:relative;width:1%;min-width:50px;padding-right:10px;padding-left:10px;font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace;font-size:12px;line-height:20px;color:var(--color-fg-subtle);text-align:right;white-space:nowrap;vertical-align:top;cursor:pointer;-webkit-user-select:none;user-select:none}.code-diff-view .diff-table .blob-num-deletion{color:var(--color-diff-blob-deletion-num-text);background-color:var(--color-diff-blob-deletion-num-bg);border-color:var(--color-danger-emphasis)}.code-diff-view .diff-table .blob-num-addition{color:var(--color-diff-blob-addition-num-text);background-color:var(--color-diff-blob-addition-num-bg);border-color:var(--color-success-emphasis)}.code-diff-view .diff-table .blob-code{position:relative;padding-right:10px;padding-left:10px;line-height:20px;vertical-align:top}.code-diff-view .diff-table .blob-code .blob-code-inner{display:table-cell;overflow:visible;font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace;font-size:12px;color:var(--color-fg-default);word-wrap:anywhere;white-space:pre-wrap}.code-diff-view .diff-table .blob-code-deletion{background-color:var(--color-diff-blob-deletion-line-bg);outline:1px dashed transparent}.code-diff-view .diff-table .blob-code-deletion .x{color:var(--color-diff-blob-deletion-fg);background-color:var(--color-diff-blob-deletion-word-bg)}.code-diff-view .diff-table .blob-code-addition{background-color:var(--color-diff-blob-addition-line-bg);outline:1px dotted transparent}.code-diff-view .diff-table .blob-code-addition .x{color:var(--color-diff-blob-addition-fg);background-color:var(--color-diff-blob-addition-word-bg)}.code-diff-view .diff-table .current-diff{border:1px solid var(--color-border-muted)}.code-diff-view .diff-table .blob-code-context,.code-diff-view .diff-table .blob-code-addition,.code-diff-view .diff-table .blob-code-deletion{padding-left:22px!important}.code-diff-view .diff-table .blob-code-marker:before{position:absolute;top:1px;left:8px;padding-right:8px;content:attr(data-code-marker)}.code-diff-view .diff-table .blob-num-hunk{background-color:var(--color-diff-blob-hunk-num-bg)}.code-diff-view .diff-table .blob-code-hunk{background-color:var(--color-accent-subtle)}.code-diff-view .diff-table .load-more{padding:8px;text-align:center}.code-diff-view .diff-table .load-more-button{padding:4px 12px;color:var(--color-accent-fg);background:transparent;border:1px solid var(--color-border-default);border-radius:4px;cursor:pointer}.code-diff-view .diff-table .load-more-button:hover{background-color:var(--color-accent-muted)}.code-diff-view .file-diff-split{table-layout:fixed}.code-diff-view .file-diff-split .blob-code+.blob-num{border-left:1px solid var(--color-border-muted)}.code-diff-view .file-diff-split .no-select{user-select:none}.code-diff-view .empty-cell{cursor:default;background-color:var(--color-neutral-subtle);border-right-color:var(--color-border-muted)}.code-diff-view[data-v-0c5adc58] td:nth-child(1){display:none}")),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();function Ks(){}Ks.prototype={diff:function(e,t){var n,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=o.callback;typeof o=="function"&&(i=o,o={}),this.options=o;var s=this;function a(R){return i?(setTimeout(function(){i(void 0,R)},0),!0):R}e=this.castInput(e),t=this.castInput(t),e=this.removeEmpty(this.tokenize(e)),t=this.removeEmpty(this.tokenize(t));var l=t.length,c=e.length,d=1,f=l+c;o.maxEditLength&&(f=Math.min(f,o.maxEditLength));var h=(n=o.timeout)!==null&&n!==void 0?n:1/0,p=Date.now()+h,g=[{oldPos:-1,lastComponent:void 0}],y=this.extractCommon(g[0],t,e,0);if(g[0].oldPos+1>=c&&y+1>=l)return a([{value:this.join(t),count:t.length}]);var b=-1/0,_=1/0;function x(){for(var R=Math.max(b,-d);R<=Math.min(_,d);R+=2){var S=void 0,O=g[R-1],I=g[R+1];O&&(g[R-1]=void 0);var D=!1;if(I){var w=I.oldPos-R;D=I&&0<=w&&w<l}var E=O&&O.oldPos+1<c;if(!D&&!E){g[R]=void 0;continue}if(!E||D&&O.oldPos+1<I.oldPos?S=s.addToPath(I,!0,void 0,0):S=s.addToPath(O,void 0,!0,1),y=s.extractCommon(S,t,e,R),S.oldPos+1>=c&&y+1>=l)return a(LL(s,S.lastComponent,t,e,s.useLongestToken));g[R]=S,S.oldPos+1>=c&&(_=Math.min(_,R-1)),y+1>=l&&(b=Math.max(b,R+1))}d++}if(i)(function R(){setTimeout(function(){if(d>f||Date.now()>p)return i();x()||R()},0)})();else for(;d<=f&&Date.now()<=p;){var B=x();if(B)return B}},addToPath:function(e,t,n,o){var i=e.lastComponent;return i&&i.added===t&&i.removed===n?{oldPos:e.oldPos+o,lastComponent:{count:i.count+1,added:t,removed:n,previousComponent:i.previousComponent}}:{oldPos:e.oldPos+o,lastComponent:{count:1,added:t,removed:n,previousComponent:i}}},extractCommon:function(e,t,n,o){for(var i=t.length,s=n.length,a=e.oldPos,l=a-o,c=0;l+1<i&&a+1<s&&this.equals(t[l+1],n[a+1]);)l++,a++,c++;return c&&(e.lastComponent={count:c,previousComponent:e.lastComponent}),e.oldPos=a,l},equals:function(e,t){return this.options.comparator?this.options.comparator(e,t):e===t||this.options.ignoreCase&&e.toLowerCase()===t.toLowerCase()},removeEmpty:function(e){for(var t=[],n=0;n<e.length;n++)e[n]&&t.push(e[n]);return t},castInput:function(e){return e},tokenize:function(e){return e.split("")},join:function(e){return e.join("")}};function LL(e,t,n,o,i){for(var s=[],a;t;)s.push(t),a=t.previousComponent,delete t.previousComponent,t=a;s.reverse();for(var l=0,c=s.length,d=0,f=0;l<c;l++){var h=s[l];if(h.removed){if(h.value=e.join(o.slice(f,f+h.count)),f+=h.count,l&&s[l-1].added){var p=s[l-1];s[l-1]=s[l],s[l]=p}}else{if(!h.added&&i){var g=n.slice(d,d+h.count);g=g.map(function(b,_){var x=o[f+_];return x.length>b.length?x:b}),h.value=e.join(g)}else h.value=e.join(n.slice(d,d+h.count));d+=h.count,h.added||(f+=h.count)}}var y=s[c-1];return c>1&&typeof y.value=="string"&&(y.added||y.removed)&&e.equals("",y.value)&&(s[c-2].value+=y.value,s.pop()),s}var FL=new Ks;function $L(e,t,n){return FL.diff(e,t,n)}function zL(e,t){if(typeof e=="function")t.callback=e;else if(e)for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}var Ex=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,Cx=/\S/,ry=new Ks;ry.equals=function(e,t){return this.options.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e===t||this.options.ignoreWhitespace&&!Cx.test(e)&&!Cx.test(t)},ry.tokenize=function(e){for(var t=e.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/),n=0;n<t.length-1;n++)!t[n+1]&&t[n+2]&&Ex.test(t[n])&&Ex.test(t[n+2])&&(t[n]+=t[n+2],t.splice(n+1,2),n--);return t};function jL(e,t,n){return n=zL(n,{ignoreWhitespace:!0}),ry.diff(e,t,n)}var iy=new Ks;iy.tokenize=function(e){this.options.stripTrailingCr&&(e=e.replace(/\r\n/g,`
2
2
  `));var t=[],n=e.split(/(\n|\r\n)/);n[n.length-1]||n.pop();for(var o=0;o<n.length;o++){var i=n[o];o%2&&!this.options.newlineIsToken?t[t.length-1]+=i:(this.options.ignoreWhitespace&&(i=i.trim()),t.push(i))}return t};function UL(e,t,n){return iy.diff(e,t,n)}var WL=new Ks;WL.tokenize=function(e){return e.split(/(\S.+?[.!?])(?=\s+|$)/)};var HL=new Ks;HL.tokenize=function(e){return e.split(/([{}:;,]|\s+)/)};function Lm(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Lm=function(t){return typeof t}:Lm=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Lm(e)}var qL=Object.prototype.toString,Wu=new Ks;Wu.useLongestToken=!0,Wu.tokenize=iy.tokenize,Wu.castInput=function(e){var t=this.options,n=t.undefinedReplacement,o=t.stringifyReplacer,i=o===void 0?function(s,a){return typeof a>"u"?n:a}:o;return typeof e=="string"?e:JSON.stringify(sy(e,null,null,i),i," ")},Wu.equals=function(e,t){return Ks.prototype.equals.call(Wu,e.replace(/,([\r\n])/g,"$1"),t.replace(/,([\r\n])/g,"$1"))};function sy(e,t,n,o,i){t=t||[],n=n||[],o&&(e=o(i,e));var s;for(s=0;s<t.length;s+=1)if(t[s]===e)return n[s];var a;if(qL.call(e)==="[object Array]"){for(t.push(e),a=new Array(e.length),n.push(a),s=0;s<e.length;s+=1)a[s]=sy(e[s],t,n,o,i);return t.pop(),n.pop(),a}if(e&&e.toJSON&&(e=e.toJSON()),Lm(e)==="object"&&e!==null){t.push(e),a={},n.push(a);var l=[],c;for(c in e)e.hasOwnProperty(c)&&l.push(c);for(l.sort(),s=0;s<l.length;s+=1)c=l[s],a[c]=sy(e[c],t,n,o,c);t.pop(),n.pop()}else a=e;return a}var ay=new Ks;ay.tokenize=function(e){return e.slice()},ay.join=ay.removeEmpty=function(e){return e};function KL(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Sx={exports:{}},Ax;function GL(){return Ax||(Ax=1,(function(e){var t=function(){this.Diff_Timeout=1,this.Diff_EditCost=4,this.Match_Threshold=.5,this.Match_Distance=1e3,this.Patch_DeleteThreshold=.5,this.Patch_Margin=4,this.Match_MaxBits=32},n=-1,o=1,i=0;t.Diff=function(s,a){return[s,a]},t.prototype.diff_main=function(s,a,l,c){typeof c>"u"&&(this.Diff_Timeout<=0?c=Number.MAX_VALUE:c=new Date().getTime()+this.Diff_Timeout*1e3);var d=c;if(s==null||a==null)throw new Error("Null input. (diff_main)");if(s==a)return s?[new t.Diff(i,s)]:[];typeof l>"u"&&(l=!0);var f=l,h=this.diff_commonPrefix(s,a),p=s.substring(0,h);s=s.substring(h),a=a.substring(h),h=this.diff_commonSuffix(s,a);var g=s.substring(s.length-h);s=s.substring(0,s.length-h),a=a.substring(0,a.length-h);var y=this.diff_compute_(s,a,f,d);return p&&y.unshift(new t.Diff(i,p)),g&&y.push(new t.Diff(i,g)),this.diff_cleanupMerge(y),y},t.prototype.diff_compute_=function(s,a,l,c){var d;if(!s)return[new t.Diff(o,a)];if(!a)return[new t.Diff(n,s)];var f=s.length>a.length?s:a,h=s.length>a.length?a:s,p=f.indexOf(h);if(p!=-1)return d=[new t.Diff(o,f.substring(0,p)),new t.Diff(i,h),new t.Diff(o,f.substring(p+h.length))],s.length>a.length&&(d[0][0]=d[2][0]=n),d;if(h.length==1)return[new t.Diff(n,s),new t.Diff(o,a)];var g=this.diff_halfMatch_(s,a);if(g){var y=g[0],b=g[1],_=g[2],x=g[3],B=g[4],R=this.diff_main(y,_,l,c),S=this.diff_main(b,x,l,c);return R.concat([new t.Diff(i,B)],S)}return l&&s.length>100&&a.length>100?this.diff_lineMode_(s,a,c):this.diff_bisect_(s,a,c)},t.prototype.diff_lineMode_=function(s,a,l){var c=this.diff_linesToChars_(s,a);s=c.chars1,a=c.chars2;var d=c.lineArray,f=this.diff_main(s,a,!1,l);this.diff_charsToLines_(f,d),this.diff_cleanupSemantic(f),f.push(new t.Diff(i,""));for(var h=0,p=0,g=0,y="",b="";h<f.length;){switch(f[h][0]){case o:g++,b+=f[h][1];break;case n:p++,y+=f[h][1];break;case i:if(p>=1&&g>=1){f.splice(h-p-g,p+g),h=h-p-g;for(var _=this.diff_main(y,b,!1,l),x=_.length-1;x>=0;x--)f.splice(h,0,_[x]);h=h+_.length}g=0,p=0,y="",b="";break}h++}return f.pop(),f},t.prototype.diff_bisect_=function(s,a,l){for(var c=s.length,d=a.length,f=Math.ceil((c+d)/2),h=f,p=2*f,g=new Array(p),y=new Array(p),b=0;b<p;b++)g[b]=-1,y[b]=-1;g[h+1]=0,y[h+1]=0;for(var _=c-d,x=_%2!=0,B=0,R=0,S=0,O=0,I=0;I<f&&!(new Date().getTime()>l);I++){for(var D=-I+B;D<=I-R;D+=2){var w=h+D,E;D==-I||D!=I&&g[w-1]<g[w+1]?E=g[w+1]:E=g[w-1]+1;for(var F=E-D;E<c&&F<d&&s.charAt(E)==a.charAt(F);)E++,F++;if(g[w]=E,E>c)R+=2;else if(F>d)B+=2;else if(x){var A=h+_-D;if(A>=0&&A<p&&y[A]!=-1){var P=c-y[A];if(E>=P)return this.diff_bisectSplit_(s,a,E,F,l)}}}for(var q=-I+S;q<=I-O;q+=2){var A=h+q,P;q==-I||q!=I&&y[A-1]<y[A+1]?P=y[A+1]:P=y[A-1]+1;for(var Q=P-q;P<c&&Q<d&&s.charAt(c-P-1)==a.charAt(d-Q-1);)P++,Q++;if(y[A]=P,P>c)O+=2;else if(Q>d)S+=2;else if(!x){var w=h+_-q;if(w>=0&&w<p&&g[w]!=-1){var E=g[w],F=h+E-w;if(P=c-P,E>=P)return this.diff_bisectSplit_(s,a,E,F,l)}}}}return[new t.Diff(n,s),new t.Diff(o,a)]},t.prototype.diff_bisectSplit_=function(s,a,l,c,d){var f=s.substring(0,l),h=a.substring(0,c),p=s.substring(l),g=a.substring(c),y=this.diff_main(f,h,!1,d),b=this.diff_main(p,g,!1,d);return y.concat(b)},t.prototype.diff_linesToChars_=function(s,a){var l=[],c={};l[0]="";function d(g){for(var y="",b=0,_=-1,x=l.length;_<g.length-1;){_=g.indexOf(`
3
3
  `,b),_==-1&&(_=g.length-1);var B=g.substring(b,_+1);(c.hasOwnProperty?c.hasOwnProperty(B):c[B]!==void 0)?y+=String.fromCharCode(c[B]):(x==f&&(B=g.substring(b),_=g.length),y+=String.fromCharCode(x),c[B]=x,l[x++]=B),b=_+1}return y}var f=4e4,h=d(s);f=65535;var p=d(a);return{chars1:h,chars2:p,lineArray:l}},t.prototype.diff_charsToLines_=function(s,a){for(var l=0;l<s.length;l++){for(var c=s[l][1],d=[],f=0;f<c.length;f++)d[f]=a[c.charCodeAt(f)];s[l][1]=d.join("")}},t.prototype.diff_commonPrefix=function(s,a){if(!s||!a||s.charAt(0)!=a.charAt(0))return 0;for(var l=0,c=Math.min(s.length,a.length),d=c,f=0;l<d;)s.substring(f,d)==a.substring(f,d)?(l=d,f=l):c=d,d=Math.floor((c-l)/2+l);return d},t.prototype.diff_commonSuffix=function(s,a){if(!s||!a||s.charAt(s.length-1)!=a.charAt(a.length-1))return 0;for(var l=0,c=Math.min(s.length,a.length),d=c,f=0;l<d;)s.substring(s.length-d,s.length-f)==a.substring(a.length-d,a.length-f)?(l=d,f=l):c=d,d=Math.floor((c-l)/2+l);return d},t.prototype.diff_commonOverlap_=function(s,a){var l=s.length,c=a.length;if(l==0||c==0)return 0;l>c?s=s.substring(l-c):l<c&&(a=a.substring(0,l));var d=Math.min(l,c);if(s==a)return d;for(var f=0,h=1;;){var p=s.substring(d-h),g=a.indexOf(p);if(g==-1)return f;h+=g,(g==0||s.substring(d-h)==a.substring(0,h))&&(f=h,h++)}},t.prototype.diff_halfMatch_=function(s,a){if(this.Diff_Timeout<=0)return null;var l=s.length>a.length?s:a,c=s.length>a.length?a:s;if(l.length<4||c.length*2<l.length)return null;var d=this;function f(R,S,O){for(var I=R.substring(O,O+Math.floor(R.length/4)),D=-1,w="",E,F,A,P;(D=S.indexOf(I,D+1))!=-1;){var q=d.diff_commonPrefix(R.substring(O),S.substring(D)),Q=d.diff_commonSuffix(R.substring(0,O),S.substring(0,D));w.length<Q+q&&(w=S.substring(D-Q,D)+S.substring(D,D+q),E=R.substring(0,O-Q),F=R.substring(O+q),A=S.substring(0,D-Q),P=S.substring(D+q))}return w.length*2>=R.length?[E,F,A,P,w]:null}var h=f(l,c,Math.ceil(l.length/4)),p=f(l,c,Math.ceil(l.length/2)),g;if(!h&&!p)return null;p?h?g=h[4].length>p[4].length?h:p:g=p:g=h;var y,b,_,x;s.length>a.length?(y=g[0],b=g[1],_=g[2],x=g[3]):(_=g[0],x=g[1],y=g[2],b=g[3]);var B=g[4];return[y,b,_,x,B]},t.prototype.diff_cleanupSemantic=function(s){for(var a=!1,l=[],c=0,d=null,f=0,h=0,p=0,g=0,y=0;f<s.length;)s[f][0]==i?(l[c++]=f,h=g,p=y,g=0,y=0,d=s[f][1]):(s[f][0]==o?g+=s[f][1].length:y+=s[f][1].length,d&&d.length<=Math.max(h,p)&&d.length<=Math.max(g,y)&&(s.splice(l[c-1],0,new t.Diff(n,d)),s[l[c-1]+1][0]=o,c--,c--,f=c>0?l[c-1]:-1,h=0,p=0,g=0,y=0,d=null,a=!0)),f++;for(a&&this.diff_cleanupMerge(s),this.diff_cleanupSemanticLossless(s),f=1;f<s.length;){if(s[f-1][0]==n&&s[f][0]==o){var b=s[f-1][1],_=s[f][1],x=this.diff_commonOverlap_(b,_),B=this.diff_commonOverlap_(_,b);x>=B?(x>=b.length/2||x>=_.length/2)&&(s.splice(f,0,new t.Diff(i,_.substring(0,x))),s[f-1][1]=b.substring(0,b.length-x),s[f+1][1]=_.substring(x),f++):(B>=b.length/2||B>=_.length/2)&&(s.splice(f,0,new t.Diff(i,b.substring(0,B))),s[f-1][0]=o,s[f-1][1]=_.substring(0,_.length-B),s[f+1][0]=n,s[f+1][1]=b.substring(B),f++),f++}f++}},t.prototype.diff_cleanupSemanticLossless=function(s){function a(B,R){if(!B||!R)return 6;var S=B.charAt(B.length-1),O=R.charAt(0),I=S.match(t.nonAlphaNumericRegex_),D=O.match(t.nonAlphaNumericRegex_),w=I&&S.match(t.whitespaceRegex_),E=D&&O.match(t.whitespaceRegex_),F=w&&S.match(t.linebreakRegex_),A=E&&O.match(t.linebreakRegex_),P=F&&B.match(t.blanklineEndRegex_),q=A&&R.match(t.blanklineStartRegex_);return P||q?5:F||A?4:I&&!w&&E?3:w||E?2:I||D?1:0}for(var l=1;l<s.length-1;){if(s[l-1][0]==i&&s[l+1][0]==i){var c=s[l-1][1],d=s[l][1],f=s[l+1][1],h=this.diff_commonSuffix(c,d);if(h){var p=d.substring(d.length-h);c=c.substring(0,c.length-h),d=p+d.substring(0,d.length-h),f=p+f}for(var g=c,y=d,b=f,_=a(c,d)+a(d,f);d.charAt(0)===f.charAt(0);){c+=d.charAt(0),d=d.substring(1)+f.charAt(0),f=f.substring(1);var x=a(c,d)+a(d,f);x>=_&&(_=x,g=c,y=d,b=f)}s[l-1][1]!=g&&(g?s[l-1][1]=g:(s.splice(l-1,1),l--),s[l][1]=y,b?s[l+1][1]=b:(s.splice(l+1,1),l--))}l++}},t.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/,t.whitespaceRegex_=/\s/,t.linebreakRegex_=/[\r\n]/,t.blanklineEndRegex_=/\n\r?\n$/,t.blanklineStartRegex_=/^\r?\n\r?\n/,t.prototype.diff_cleanupEfficiency=function(s){for(var a=!1,l=[],c=0,d=null,f=0,h=!1,p=!1,g=!1,y=!1;f<s.length;)s[f][0]==i?(s[f][1].length<this.Diff_EditCost&&(g||y)?(l[c++]=f,h=g,p=y,d=s[f][1]):(c=0,d=null),g=y=!1):(s[f][0]==n?y=!0:g=!0,d&&(h&&p&&g&&y||d.length<this.Diff_EditCost/2&&h+p+g+y==3)&&(s.splice(l[c-1],0,new t.Diff(n,d)),s[l[c-1]+1][0]=o,c--,d=null,h&&p?(g=y=!0,c=0):(c--,f=c>0?l[c-1]:-1,g=y=!1),a=!0)),f++;a&&this.diff_cleanupMerge(s)},t.prototype.diff_cleanupMerge=function(s){s.push(new t.Diff(i,""));for(var a=0,l=0,c=0,d="",f="",h;a<s.length;)switch(s[a][0]){case o:c++,f+=s[a][1],a++;break;case n:l++,d+=s[a][1],a++;break;case i:l+c>1?(l!==0&&c!==0&&(h=this.diff_commonPrefix(f,d),h!==0&&(a-l-c>0&&s[a-l-c-1][0]==i?s[a-l-c-1][1]+=f.substring(0,h):(s.splice(0,0,new t.Diff(i,f.substring(0,h))),a++),f=f.substring(h),d=d.substring(h)),h=this.diff_commonSuffix(f,d),h!==0&&(s[a][1]=f.substring(f.length-h)+s[a][1],f=f.substring(0,f.length-h),d=d.substring(0,d.length-h))),a-=l+c,s.splice(a,l+c),d.length&&(s.splice(a,0,new t.Diff(n,d)),a++),f.length&&(s.splice(a,0,new t.Diff(o,f)),a++),a++):a!==0&&s[a-1][0]==i?(s[a-1][1]+=s[a][1],s.splice(a,1)):a++,c=0,l=0,d="",f="";break}s[s.length-1][1]===""&&s.pop();var p=!1;for(a=1;a<s.length-1;)s[a-1][0]==i&&s[a+1][0]==i&&(s[a][1].substring(s[a][1].length-s[a-1][1].length)==s[a-1][1]?(s[a][1]=s[a-1][1]+s[a][1].substring(0,s[a][1].length-s[a-1][1].length),s[a+1][1]=s[a-1][1]+s[a+1][1],s.splice(a-1,1),p=!0):s[a][1].substring(0,s[a+1][1].length)==s[a+1][1]&&(s[a-1][1]+=s[a+1][1],s[a][1]=s[a][1].substring(s[a+1][1].length)+s[a+1][1],s.splice(a+1,1),p=!0)),a++;p&&this.diff_cleanupMerge(s)},t.prototype.diff_xIndex=function(s,a){var l=0,c=0,d=0,f=0,h;for(h=0;h<s.length&&(s[h][0]!==o&&(l+=s[h][1].length),s[h][0]!==n&&(c+=s[h][1].length),!(l>a));h++)d=l,f=c;return s.length!=h&&s[h][0]===n?f:f+(a-d)},t.prototype.diff_prettyHtml=function(s){for(var a=[],l=/&/g,c=/</g,d=/>/g,f=/\n/g,h=0;h<s.length;h++){var p=s[h][0],g=s[h][1],y=g.replace(l,"&amp;").replace(c,"&lt;").replace(d,"&gt;").replace(f,"&para;<br>");switch(p){case o:a[h]='<ins style="background:#e6ffe6;">'+y+"</ins>";break;case n:a[h]='<del style="background:#ffe6e6;">'+y+"</del>";break;case i:a[h]="<span>"+y+"</span>";break}}return a.join("")},t.prototype.diff_text1=function(s){for(var a=[],l=0;l<s.length;l++)s[l][0]!==o&&(a[l]=s[l][1]);return a.join("")},t.prototype.diff_text2=function(s){for(var a=[],l=0;l<s.length;l++)s[l][0]!==n&&(a[l]=s[l][1]);return a.join("")},t.prototype.diff_levenshtein=function(s){for(var a=0,l=0,c=0,d=0;d<s.length;d++){var f=s[d][0],h=s[d][1];switch(f){case o:l+=h.length;break;case n:c+=h.length;break;case i:a+=Math.max(l,c),l=0,c=0;break}}return a+=Math.max(l,c),a},t.prototype.diff_toDelta=function(s){for(var a=[],l=0;l<s.length;l++)switch(s[l][0]){case o:a[l]="+"+encodeURI(s[l][1]);break;case n:a[l]="-"+s[l][1].length;break;case i:a[l]="="+s[l][1].length;break}return a.join(" ").replace(/%20/g," ")},t.prototype.diff_fromDelta=function(s,a){for(var l=[],c=0,d=0,f=a.split(/\t/g),h=0;h<f.length;h++){var p=f[h].substring(1);switch(f[h].charAt(0)){case"+":try{l[c++]=new t.Diff(o,decodeURI(p))}catch{throw new Error("Illegal escape in diff_fromDelta: "+p)}break;case"-":case"=":var g=parseInt(p,10);if(isNaN(g)||g<0)throw new Error("Invalid number in diff_fromDelta: "+p);var y=s.substring(d,d+=g);f[h].charAt(0)=="="?l[c++]=new t.Diff(i,y):l[c++]=new t.Diff(n,y);break;default:if(f[h])throw new Error("Invalid diff operation in diff_fromDelta: "+f[h])}}if(d!=s.length)throw new Error("Delta length ("+d+") does not equal source text length ("+s.length+").");return l},t.prototype.match_main=function(s,a,l){if(s==null||a==null||l==null)throw new Error("Null input. (match_main)");return l=Math.max(0,Math.min(l,s.length)),s==a?0:s.length?s.substring(l,l+a.length)==a?l:this.match_bitap_(s,a,l):-1},t.prototype.match_bitap_=function(s,a,l){if(a.length>this.Match_MaxBits)throw new Error("Pattern too long for this browser.");var c=this.match_alphabet_(a),d=this;function f(E,F){var A=E/a.length,P=Math.abs(l-F);return d.Match_Distance?A+P/d.Match_Distance:P?1:A}var h=this.Match_Threshold,p=s.indexOf(a,l);p!=-1&&(h=Math.min(f(0,p),h),p=s.lastIndexOf(a,l+a.length),p!=-1&&(h=Math.min(f(0,p),h)));var g=1<<a.length-1;p=-1;for(var y,b,_=a.length+s.length,x,B=0;B<a.length;B++){for(y=0,b=_;y<b;)f(B,l+b)<=h?y=b:_=b,b=Math.floor((_-y)/2+y);_=b;var R=Math.max(1,l-b+1),S=Math.min(l+b,s.length)+a.length,O=Array(S+2);O[S+1]=(1<<B)-1;for(var I=S;I>=R;I--){var D=c[s.charAt(I-1)];if(B===0?O[I]=(O[I+1]<<1|1)&D:O[I]=(O[I+1]<<1|1)&D|((x[I+1]|x[I])<<1|1)|x[I+1],O[I]&g){var w=f(B,I-1);if(w<=h)if(h=w,p=I-1,p>l)R=Math.max(1,2*l-p);else break}}if(f(B+1,l)>h)break;x=O}return p},t.prototype.match_alphabet_=function(s){for(var a={},l=0;l<s.length;l++)a[s.charAt(l)]=0;for(var l=0;l<s.length;l++)a[s.charAt(l)]|=1<<s.length-l-1;return a},t.prototype.patch_addContext_=function(s,a){if(a.length!=0){if(s.start2===null)throw Error("patch not initialized");for(var l=a.substring(s.start2,s.start2+s.length1),c=0;a.indexOf(l)!=a.lastIndexOf(l)&&l.length<this.Match_MaxBits-this.Patch_Margin-this.Patch_Margin;)c+=this.Patch_Margin,l=a.substring(s.start2-c,s.start2+s.length1+c);c+=this.Patch_Margin;var d=a.substring(s.start2-c,s.start2);d&&s.diffs.unshift(new t.Diff(i,d));var f=a.substring(s.start2+s.length1,s.start2+s.length1+c);f&&s.diffs.push(new t.Diff(i,f)),s.start1-=d.length,s.start2-=d.length,s.length1+=d.length+f.length,s.length2+=d.length+f.length}},t.prototype.patch_make=function(s,a,l){var c,d;if(typeof s=="string"&&typeof a=="string"&&typeof l>"u")c=s,d=this.diff_main(c,a,!0),d.length>2&&(this.diff_cleanupSemantic(d),this.diff_cleanupEfficiency(d));else if(s&&typeof s=="object"&&typeof a>"u"&&typeof l>"u")d=s,c=this.diff_text1(d);else if(typeof s=="string"&&a&&typeof a=="object"&&typeof l>"u")c=s,d=a;else if(typeof s=="string"&&typeof a=="string"&&l&&typeof l=="object")c=s,d=l;else throw new Error("Unknown call format to patch_make.");if(d.length===0)return[];for(var f=[],h=new t.patch_obj,p=0,g=0,y=0,b=c,_=c,x=0;x<d.length;x++){var B=d[x][0],R=d[x][1];switch(!p&&B!==i&&(h.start1=g,h.start2=y),B){case o:h.diffs[p++]=d[x],h.length2+=R.length,_=_.substring(0,y)+R+_.substring(y);break;case n:h.length1+=R.length,h.diffs[p++]=d[x],_=_.substring(0,y)+_.substring(y+R.length);break;case i:R.length<=2*this.Patch_Margin&&p&&d.length!=x+1?(h.diffs[p++]=d[x],h.length1+=R.length,h.length2+=R.length):R.length>=2*this.Patch_Margin&&p&&(this.patch_addContext_(h,b),f.push(h),h=new t.patch_obj,p=0,b=_,g=y);break}B!==o&&(g+=R.length),B!==n&&(y+=R.length)}return p&&(this.patch_addContext_(h,b),f.push(h)),f},t.prototype.patch_deepCopy=function(s){for(var a=[],l=0;l<s.length;l++){var c=s[l],d=new t.patch_obj;d.diffs=[];for(var f=0;f<c.diffs.length;f++)d.diffs[f]=new t.Diff(c.diffs[f][0],c.diffs[f][1]);d.start1=c.start1,d.start2=c.start2,d.length1=c.length1,d.length2=c.length2,a[l]=d}return a},t.prototype.patch_apply=function(s,a){if(s.length==0)return[a,[]];s=this.patch_deepCopy(s);var l=this.patch_addPadding(s);a=l+a+l,this.patch_splitMax(s);for(var c=0,d=[],f=0;f<s.length;f++){var h=s[f].start2+c,p=this.diff_text1(s[f].diffs),g,y=-1;if(p.length>this.Match_MaxBits?(g=this.match_main(a,p.substring(0,this.Match_MaxBits),h),g!=-1&&(y=this.match_main(a,p.substring(p.length-this.Match_MaxBits),h+p.length-this.Match_MaxBits),(y==-1||g>=y)&&(g=-1))):g=this.match_main(a,p,h),g==-1)d[f]=!1,c-=s[f].length2-s[f].length1;else{d[f]=!0,c=g-h;var b;if(y==-1?b=a.substring(g,g+p.length):b=a.substring(g,y+this.Match_MaxBits),p==b)a=a.substring(0,g)+this.diff_text2(s[f].diffs)+a.substring(g+p.length);else{var _=this.diff_main(p,b,!1);if(p.length>this.Match_MaxBits&&this.diff_levenshtein(_)/p.length>this.Patch_DeleteThreshold)d[f]=!1;else{this.diff_cleanupSemanticLossless(_);for(var x=0,B,R=0;R<s[f].diffs.length;R++){var S=s[f].diffs[R];S[0]!==i&&(B=this.diff_xIndex(_,x)),S[0]===o?a=a.substring(0,g+B)+S[1]+a.substring(g+B):S[0]===n&&(a=a.substring(0,g+B)+a.substring(g+this.diff_xIndex(_,x+S[1].length))),S[0]!==n&&(x+=S[1].length)}}}}}return a=a.substring(l.length,a.length-l.length),[a,d]},t.prototype.patch_addPadding=function(s){for(var a=this.Patch_Margin,l="",c=1;c<=a;c++)l+=String.fromCharCode(c);for(var c=0;c<s.length;c++)s[c].start1+=a,s[c].start2+=a;var d=s[0],f=d.diffs;if(f.length==0||f[0][0]!=i)f.unshift(new t.Diff(i,l)),d.start1-=a,d.start2-=a,d.length1+=a,d.length2+=a;else if(a>f[0][1].length){var h=a-f[0][1].length;f[0][1]=l.substring(f[0][1].length)+f[0][1],d.start1-=h,d.start2-=h,d.length1+=h,d.length2+=h}if(d=s[s.length-1],f=d.diffs,f.length==0||f[f.length-1][0]!=i)f.push(new t.Diff(i,l)),d.length1+=a,d.length2+=a;else if(a>f[f.length-1][1].length){var h=a-f[f.length-1][1].length;f[f.length-1][1]+=l.substring(0,h),d.length1+=h,d.length2+=h}return l},t.prototype.patch_splitMax=function(s){for(var a=this.Match_MaxBits,l=0;l<s.length;l++)if(!(s[l].length1<=a)){var c=s[l];s.splice(l--,1);for(var d=c.start1,f=c.start2,h="";c.diffs.length!==0;){var p=new t.patch_obj,g=!0;for(p.start1=d-h.length,p.start2=f-h.length,h!==""&&(p.length1=p.length2=h.length,p.diffs.push(new t.Diff(i,h)));c.diffs.length!==0&&p.length1<a-this.Patch_Margin;){var y=c.diffs[0][0],b=c.diffs[0][1];y===o?(p.length2+=b.length,f+=b.length,p.diffs.push(c.diffs.shift()),g=!1):y===n&&p.diffs.length==1&&p.diffs[0][0]==i&&b.length>2*a?(p.length1+=b.length,d+=b.length,g=!1,p.diffs.push(new t.Diff(y,b)),c.diffs.shift()):(b=b.substring(0,a-p.length1-this.Patch_Margin),p.length1+=b.length,d+=b.length,y===i?(p.length2+=b.length,f+=b.length):g=!1,p.diffs.push(new t.Diff(y,b)),b==c.diffs[0][1]?c.diffs.shift():c.diffs[0][1]=c.diffs[0][1].substring(b.length))}h=this.diff_text2(p.diffs),h=h.substring(h.length-this.Patch_Margin);var _=this.diff_text1(c.diffs).substring(0,this.Patch_Margin);_!==""&&(p.length1+=_.length,p.length2+=_.length,p.diffs.length!==0&&p.diffs[p.diffs.length-1][0]===i?p.diffs[p.diffs.length-1][1]+=_:p.diffs.push(new t.Diff(i,_))),g||s.splice(++l,0,p)}}},t.prototype.patch_toText=function(s){for(var a=[],l=0;l<s.length;l++)a[l]=s[l];return a.join("")},t.prototype.patch_fromText=function(s){var a=[];if(!s)return a;for(var l=s.split(`
4
4
  `),c=0,d=/^@@ -(\d+),?(\d*) \+(\d+),?(\d*) @@$/;c<l.length;){var f=l[c].match(d);if(!f)throw new Error("Invalid patch string: "+l[c]);var h=new t.patch_obj;for(a.push(h),h.start1=parseInt(f[1],10),f[2]===""?(h.start1--,h.length1=1):f[2]=="0"?h.length1=0:(h.start1--,h.length1=parseInt(f[2],10)),h.start2=parseInt(f[3],10),f[4]===""?(h.start2--,h.length2=1):f[4]=="0"?h.length2=0:(h.start2--,h.length2=parseInt(f[4],10)),c++;c<l.length;){var p=l[c].charAt(0);try{var g=decodeURI(l[c].substring(1))}catch{throw new Error("Illegal escape in patch_fromText: "+g)}if(p=="-")h.diffs.push(new t.Diff(n,g));else if(p=="+")h.diffs.push(new t.Diff(o,g));else if(p==" ")h.diffs.push(new t.Diff(i,g));else{if(p=="@")break;if(p!=="")throw new Error('Invalid patch mode "'+p+'" in: '+g)}c++}}return a},t.patch_obj=function(){this.diffs=[],this.start1=null,this.start2=null,this.length1=0,this.length2=0},t.patch_obj.prototype.toString=function(){var s,a;this.length1===0?s=this.start1+",0":this.length1==1?s=this.start1+1:s=this.start1+1+","+this.length1,this.length2===0?a=this.start2+",0":this.length2==1?a=this.start2+1:a=this.start2+1+","+this.length2;for(var l=["@@ -"+s+" +"+a+` @@
@@ -25,8 +25,8 @@ https://github.com/highlightjs/highlight.js/issues/2277`),$n=tt,tn=_t),Ft===void
25
25
  `);if(B===void 0){for(const D of O)R===st.EQUAL&&(d++,f++),R===st.DELETE&&d++,R===st.ADD&&f++,p.push({type:R,code:D,addNum:R===st.DELETE?void 0:f,delNum:R===st.ADD?void 0:d});break}if(R===st.EQUAL)for(const D of O)d++,f++,p.push({type:st.EQUAL,code:D,delNum:d,addNum:f});const I=B.value.replace(/\n$/,"").split(`
26
26
  `);if(R===st.DELETE)if(S===st.ADD&&(O.length===I.length||i)){const D=Math.max(O.length,I.length),w=Array.from({length:D},(E,F)=>Lx(O[F],I[F],o,i));for(let E=0;E<O.length;E++){const F=O[E];d++,p.push({type:c!=null&&c.test(F)?st.EQUAL:st.DELETE,code:w[E][0],delNum:d})}for(let E=0;E<I.length;E++){const F=I[E];f++,p.push({type:c!=null&&c.test(F)?st.EQUAL:st.ADD,code:w[E][1],addNum:f})}h=!0}else for(const D of O)d++,p.push({type:st.DELETE,code:D,delNum:d});if(R===st.ADD)for(const D of O)f++,p.push({type:st.ADD,code:D,addNum:f})}for(let _=0;_<p.length;_++){const x=p[_];if(x.type===st.DELETE||x.type===st.ADD){const[B,R]=[Math.max(_-s,0),Math.min(_+s+1,p.length)];for(let S=B;S<R;S++)p[S].fold=!1}x.fold===void 0&&(x.fold=!0)}if(e===t){for(let _=0;_<p.length;_++)p[_].fold=!1;return p.slice(0,ei).forEach(_=>uy(_,n)),g}const y=[];let b=[];for(let _=0;_<p.length;_++){const x=p[_];if(x.fold===!1){b.length&&(b[0].hideIndex=g.collector.length,g.collector.push({lines:b,fold:!0}),b=[]),y.push(x);continue}x.type==="equal"&&(x.hide=!0,b.push(x)),y.push(x)}return b.length&&(b[0].hideIndex=g.collector.length,g.collector.push({lines:b,fold:!0}),b=[]),g.changes=y,g.changes.filter(_=>!_.hide).slice(0,ei).forEach(_=>uy(_,n)),g}const pF={key:0},gF=["data-diff-change"],bF=["data-code-marker","innerHTML"],yF=r.defineComponent({__name:"UnifiedLine",props:{line:{}},emits:["expand","change-click"],setup(e,{emit:t}){const n=e,o=t;function i(a){n.line.type!==st.ADD&&n.line.type!==st.DELETE||o("change-click",{side:n.line.type===st.DELETE?"old":"new",type:n.line.type,lineNumber:n.line.type===st.DELETE?n.line.delNum:n.line.addNum,event:a})}function s(a){return a===st.DELETE?"-":a===st.ADD?"+":""}return(a,l)=>e.line.hideIndex!==void 0&&e.line.hide?(r.openBlock(),r.createElementBlock("tr",pF,[r.createElementVNode("td",{class:"blob-num blob-num-hunk text-center",colspan:"2",onClick:l[0]||(l[0]=c=>o("expand",e.line))}," > "),l[1]||(l[1]=r.createElementVNode("td",{class:"blob-code blob-code-hunk",align:"left"}," ⋯ ",-1))])):e.line.hide?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("tr",{key:1,"data-diff-change":e.line.type!==r.unref(st).EQUAL?"":void 0,onClick:i},[r.createElementVNode("td",{class:r.normalizeClass(["blob-num",{"blob-num-deletion":e.line.type===r.unref(st).DELETE,"blob-num-addition":e.line.type===r.unref(st).ADD,"blob-num-context":e.line.type===r.unref(st).EQUAL,"blob-num-hunk":e.line.hide!==void 0}])},r.toDisplayString(e.line.delNum),3),r.createElementVNode("td",{class:r.normalizeClass(["blob-num",{"blob-num-deletion":e.line.type===r.unref(st).DELETE,"blob-num-addition":e.line.type===r.unref(st).ADD,"blob-num-context":e.line.type===r.unref(st).EQUAL,"blob-num-hunk":e.line.hide!==void 0}])},r.toDisplayString(e.line.addNum),3),r.createElementVNode("td",{class:r.normalizeClass(["blob-code",{"blob-code-deletion":e.line.type===r.unref(st).DELETE,"blob-code-addition":e.line.type===r.unref(st).ADD,"blob-code-context":e.line.type===r.unref(st).EQUAL,"blob-code-hunk":e.line.hide!==void 0}])},[r.createElementVNode("span",{class:"blob-code-inner blob-code-marker","data-code-marker":s(e.line.type),innerHTML:e.line.code},null,8,bF)],2)],8,gF))}}),vF={class:"diff-table"},wF={key:0},kF={class:"blob-code blob-code-hunk load-more",colspan:"3"},_F=r.defineComponent({__name:"UnifiedViewer",props:{diffChange:{},language:{}},emits:["change-click"],setup(e,{emit:t}){const n=e,o=t,i=r.ref(ei),s=r.shallowRef(n.diffChange.changes.filter(p=>!p.hide||p.hideIndex!==void 0)),a=r.computed(()=>s.value.slice(0,i.value)),l=r.computed(()=>s.value.length-a.value.length),c=r.computed(()=>Math.min(l.value,ei));r.watch(()=>n.diffChange,p=>{i.value=ei,s.value=p.changes.filter(g=>!g.hide||g.hideIndex!==void 0)});function d(){a.value.forEach(p=>uy(p,n.language))}function f({hideIndex:p}){p!==void 0&&(n.diffChange.collector[p].lines.forEach(g=>{g.hide=!1,g.fold=!1}),s.value=n.diffChange.changes.filter(g=>!g.hide||g.hideIndex!==void 0),d())}function h(){i.value+=ei,d()}return(p,g)=>(r.openBlock(),r.createElementBlock("table",vF,[r.createElementVNode("tbody",null,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(a),(y,b)=>(r.openBlock(),r.createBlock(yF,{key:b,line:y,onExpand:f,onChangeClick:g[0]||(g[0]=_=>o("change-click",_))},null,8,["line"]))),128)),r.unref(l)?(r.openBlock(),r.createElementBlock("tr",wF,[r.createElementVNode("td",kF,[r.createElementVNode("button",{class:"load-more-button",type:"button",onClick:h}," Show next "+r.toDisplayString(r.unref(c))+" lines ("+r.toDisplayString(r.unref(l))+" remaining) ",1)])])):r.createCommentVNode("",!0)])]))}}),xF={key:0},EF=["data-diff-change"],CF=["onMousedown","onClick"],SF=["data-code-marker","innerHTML"],AF=r.defineComponent({__name:"SplitLine",props:{splitLine:{}},emits:["expand","change-click"],setup(e,{emit:t}){const n=t;function o(a){return a===st.DELETE?"-":a===st.ADD?"+":""}function i(a,l){const c=a.currentTarget.closest(".file-diff-split"),d=c.querySelectorAll(".split-side-left"),f=c.querySelectorAll(".split-side-right");for(const h of f)h.classList.toggle("no-select",l==="left");for(const h of d)h.classList.toggle("no-select",l==="right")}function s(a,l,c){l.type!==st.ADD&&l.type!==st.DELETE||n("change-click",{side:c,type:l.type,lineNumber:l.num,event:a})}return(a,l)=>e.splitLine.hideIndex!==void 0&&e.splitLine.hide?(r.openBlock(),r.createElementBlock("tr",xF,[r.createElementVNode("td",{class:"blob-num blob-num-hunk",colspan:"1",onClick:l[0]||(l[0]=c=>n("expand",e.splitLine))}," > "),l[1]||(l[1]=r.createElementVNode("td",{class:"blob-code blob-code-inner blob-code-hunk",colspan:"3",align:"left"}," ⋯ ",-1))])):e.splitLine.hide?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("tr",{key:1,"data-diff-change":e.splitLine.left.type===r.unref(st).DELETE||e.splitLine.right.type===r.unref(st).ADD?"":void 0},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList([e.splitLine.left,e.splitLine.right],(c,d)=>(r.openBlock(),r.createElementBlock(r.Fragment,null,[c.type===r.unref(st).EMPTY?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[l[2]||(l[2]=r.createElementVNode("td",{class:"blob-num blob-num-empty empty-cell"},null,-1)),l[3]||(l[3]=r.createElementVNode("td",{class:"blob-code blob-code-empty empty-cell"},null,-1))],64)):(r.openBlock(),r.createElementBlock(r.Fragment,{key:1},[r.createElementVNode("td",{class:r.normalizeClass(["blob-num",{"blob-num-deletion":c.type===r.unref(st).DELETE,"blob-num-addition":c.type===r.unref(st).ADD,"blob-num-context":c.type===r.unref(st).EQUAL,"blob-num-hunk":e.splitLine.hide!==void 0}])},r.toDisplayString(c.num),3),r.createElementVNode("td",{class:r.normalizeClass(["blob-code",{"blob-code-deletion":c.type===r.unref(st).DELETE,"blob-code-addition":c.type===r.unref(st).ADD,"blob-code-context":c.type===r.unref(st).EQUAL,"blob-code-hunk":e.splitLine.hide!==void 0,"split-side-left":d===0,"split-side-right":d===1}]),onMousedown:f=>i(f,d===0?"left":"right"),onClick:f=>s(f,c,d===0?"old":"new")},[r.createElementVNode("span",{class:"blob-code-inner blob-code-marker","data-code-marker":o(c.type),innerHTML:c.code},null,8,SF)],42,CF)],64))],64))),256))],8,EF))}}),TF={class:"file-diff-split diff-table"},BF={key:0},PF={class:"blob-code blob-code-hunk load-more",colspan:"4"},NF=r.defineComponent({__name:"SplitViewer",props:{diffChange:{},language:{}},emits:["change-click"],setup(e,{emit:t}){const n=e,o=t,i=r.ref(ei),s=r.shallowRef(n.diffChange.changes.filter(p=>!p.hide||p.hideIndex!==void 0)),a=r.computed(()=>s.value.slice(0,i.value)),l=r.computed(()=>s.value.length-a.value.length),c=r.computed(()=>Math.min(l.value,ei));r.watch(()=>n.diffChange,p=>{i.value=ei,s.value=p.changes.filter(g=>!g.hide||g.hideIndex!==void 0)});function d(){a.value.forEach(p=>fy(p,n.language))}function f({hideIndex:p}){p!==void 0&&(n.diffChange.collector[p].lines.forEach(g=>{g.hide=!1,g.fold=!1}),s.value=n.diffChange.changes.filter(g=>!g.hide||g.hideIndex!==void 0),d())}function h(){i.value+=ei,d()}return(p,g)=>(r.openBlock(),r.createElementBlock("table",TF,[g[1]||(g[1]=r.createElementVNode("colgroup",null,[r.createElementVNode("col",{width:"44"}),r.createElementVNode("col"),r.createElementVNode("col",{width:"44"}),r.createElementVNode("col")],-1)),r.createElementVNode("tbody",null,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(a),(y,b)=>(r.openBlock(),r.createBlock(AF,{key:b,"split-line":y,onExpand:f,onChangeClick:g[0]||(g[0]=_=>o("change-click",_))},null,8,["split-line"]))),128)),r.unref(l)?(r.openBlock(),r.createElementBlock("tr",BF,[r.createElementVNode("td",PF,[r.createElementVNode("button",{class:"load-more-button",type:"button",onClick:h}," Show next "+r.toDisplayString(r.unref(c))+" lines ("+r.toDisplayString(r.unref(l))+" remaining) ",1)])])):r.createCommentVNode("",!0)])]))}}),zx=(e,t)=>{const n=e.__vccOpts||e;for(const[o,i]of t)n[o]=i;return n},DF={name:"DownArrowIcon"},MF={width:"1rem",viewBox:"0 0 512 512",xmlns:"http://www.w3.org/2000/svg"};function RF(e,t,n,o,i,s){return r.openBlock(),r.createElementBlock("svg",MF,[...t[0]||(t[0]=[r.createElementVNode("path",{d:"M383.6,322.7L278.6,423c-5.8,6-13.7,9-22.4,9c-8.7,0-16.5-3-22.4-9L128.4,322.7c-12.5-11.9-12.5-31.3,0-43.2 c12.5-11.9,32.7-11.9,45.2,0l50.4,48.2v-217c0-16.9,14.3-30.6,32-30.6c17.7,0,32,13.7,32,30.6v217l50.4-48.2 c12.5-11.9,32.7-11.9,45.2,0C396.1,291.4,396.1,310.7,383.6,322.7z"},null,-1)])])}const jx=zx(DF,[["render",RF]]),IF={name:"UpArrowIcon"},OF={width:"1rem",viewBox:"0 0 512 512",xmlns:"http://www.w3.org/2000/svg"};function LF(e,t,n,o,i,s){return r.openBlock(),r.createElementBlock("svg",OF,[...t[0]||(t[0]=[r.createElementVNode("path",{d:"M128.4,189.3L233.4,89c5.8-6,13.7-9,22.4-9c8.7,0,16.5,3,22.4,9l105.4,100.3c12.5,11.9,12.5,31.3,0,43.2 c-12.5,11.9-32.7,11.9-45.2,0L288,184.4v217c0,16.9-14.3,30.6-32,30.6c-17.7,0-32-13.7-32-30.6v-217l-50.4,48.2 c-12.5,11.9-32.7,11.9-45.2,0C115.9,220.6,115.9,201.3,128.4,189.3z"},null,-1)])])}const Ux=zx(IF,[["render",LF]]),FF=["theme"],$F={key:0,class:"file-header"},zF={key:0,class:"file-info"},jF={class:"info-left"},UF={class:"info-left"},WF={key:0,class:"diff-commandbar"},HF={key:1,class:"diff-stat"},qF={class:"diff-stat-added"},KF={class:"diff-stat-deleted"},GF={key:1,class:"file-info"},YF={class:"info-left"},ZF={class:"info-right"},XF={style:{"margin-left":"20px"}},JF={key:0,class:"diff-commandbar"},QF={key:1,class:"diff-stat"},VF={class:"diff-stat-added"},e6={class:"diff-stat-deleted"},t6=r.defineComponent({__name:"CodeDiff",props:{newString:{},oldString:{},language:{default:"plaintext"},context:{default:10},diffStyle:{default:"word"},forceInlineComparison:{type:Boolean,default:!1},outputFormat:{default:"line-by-line"},trim:{type:Boolean,default:!1},noDiffLineFeed:{type:Boolean,default:!1},maxHeight:{default:void 0},filename:{default:void 0},newFilename:{default:void 0},hideHeader:{type:Boolean,default:!1},hideStat:{type:Boolean,default:!1},hideNavigation:{type:Boolean,default:!1},theme:{default:"light"},ignoreMatchingLines:{default:void 0}},emits:["diff","change-click"],setup(e,{emit:t}){const n=e,o=t,i=r.computed(()=>n.outputFormat==="line-by-line"),s=r.computed(()=>{let b=n.oldString||"";return b=n.trim?b.trim():b,b=n.noDiffLineFeed?b.replace(/(\r\n)/g,`
27
27
  `):b,b}),a=r.computed(()=>{let b=n.newString||"";return b=n.trim?b.trim():b,b=n.noDiffLineFeed?b.replace(/(\r\n)/g,`
28
- `):b,b}),l=r.computed(()=>i.value?mF(s.value,a.value,n.language,n.diffStyle,n.forceInlineComparison,n.context,n.ignoreMatchingLines):hF(s.value,a.value,n.language,n.diffStyle,n.forceInlineComparison,n.context,n.ignoreMatchingLines)),c=r.shallowRef(l.value),d=r.computed(()=>c.value.stat.additionsNum===0&&c.value.stat.deletionsNum===0),f=r.ref(-1),h=r.ref();function p(){const b=h.value.querySelectorAll("[data-diff-change]");f.value<b.length-1&&(f.value++,y(b))}function g(){const b=h.value.querySelectorAll("[data-diff-change]");f.value>0&&(f.value--,y(b))}function y(b){h.value.querySelectorAll(".current-diff").forEach(x=>x.classList.remove("current-diff"));const _=b[f.value];_&&(_.querySelectorAll(".blob-code").forEach(x=>x.classList.add("current-diff")),_.scrollIntoView({behavior:"smooth",block:"center"}))}return r.watch(()=>n,()=>{f.value=-1,c.value=l.value,o("diff",{stat:{isChanged:!d.value,addNum:c.value.stat.additionsNum,delNum:c.value.stat.deletionsNum}})},{deep:!0,immediate:!0}),(b,_)=>(r.openBlock(),r.createElementBlock("div",{ref_key:"root",ref:h,class:"code-diff-view",theme:e.theme,style:r.normalizeStyle({maxHeight:e.maxHeight})},[e.hideHeader?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",$F,[r.unref(i)?(r.openBlock(),r.createElementBlock("div",zF,[r.createElementVNode("span",null,[r.createElementVNode("div",jF,r.toDisplayString(e.filename),1),r.createElementVNode("div",UF,r.toDisplayString(e.newFilename),1)]),e.hideNavigation?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("span",WF,[r.createElementVNode("button",{class:"command-item-button",title:"Next Change",onClick:p},[r.createVNode(jx)]),r.createElementVNode("button",{class:"command-item-button",title:"Previous Change",onClick:g},[r.createVNode(Ux)])])),r.renderSlot(b.$slots,"header-actions"),e.hideStat?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("span",HF,[r.renderSlot(b.$slots,"stat",{stat:r.unref(c).stat},()=>[r.createElementVNode("span",qF,"+"+r.toDisplayString(r.unref(c).stat.additionsNum)+" additions",1),r.createElementVNode("span",KF,"-"+r.toDisplayString(r.unref(c).stat.deletionsNum)+" deletions",1)])]))])):(r.openBlock(),r.createElementBlock("div",GF,[r.createElementVNode("span",YF,r.toDisplayString(e.filename),1),r.createElementVNode("span",ZF,[r.createElementVNode("span",XF,r.toDisplayString(e.newFilename),1),e.hideNavigation?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("span",JF,[r.createElementVNode("button",{class:"command-item-button",title:"Next Change",onClick:p},[r.createVNode(jx)]),r.createElementVNode("button",{class:"command-item-button",title:"Previous Change",onClick:g},[r.createVNode(Ux)])])),r.renderSlot(b.$slots,"header-actions"),e.hideStat?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("span",QF,[r.renderSlot(b.$slots,"stat",{stat:r.unref(c).stat},()=>[r.createElementVNode("span",VF,"+"+r.toDisplayString(r.unref(c).stat.additionsNum)+" additions",1),r.createElementVNode("span",e6,"-"+r.toDisplayString(r.unref(c).stat.deletionsNum)+" deletions",1)])]))])]))])),r.unref(i)?(r.openBlock(),r.createBlock(_F,{key:1,"diff-change":r.unref(c),language:e.language,onChangeClick:_[0]||(_[0]=x=>o("change-click",x))},null,8,["diff-change","language"])):(r.openBlock(),r.createBlock(NF,{key:2,"diff-change":r.unref(c),language:e.language,onChangeClick:_[1]||(_[1]=x=>o("change-click",x))},null,8,["diff-change","language"]))],12,FF))}}),n6={class:"flex gap-2"},o6={class:"vue-code-diff-wrapper"},zm=r.defineComponent({__name:"DCodeBeforeAfter",props:{dataBefore:{type:[Object,Array,String,Number,Boolean,null],required:!0},dataAfter:{type:[Object,Array,String,Number,Boolean,null],required:!0}},setup(e){const{t}=In.useI18n(),n=e,o=r.ref(!1);let i=null;r.onMounted(()=>{const f=document.documentElement,h=()=>o.value=f.classList.contains("dark");h(),i=new MutationObserver(h),i.observe(f,{attributes:!0,attributeFilter:["class"]})}),r.onBeforeUnmount(()=>{i?.disconnect(),i=null});const s=r.computed(()=>o.value?"dark":"light"),a=f=>{if(f===null||typeof f!="object")return f;if(Array.isArray(f))return f.map(a);const h=Object.keys(f).sort(),p={};return h.forEach(g=>{p[g]=a(f[g])}),p},l=f=>{try{if(f==null)return"";let h=f;if(typeof f=="string")try{const g=f.trim();(g.startsWith("{")||g.startsWith("["))&&(h=JSON.parse(g))}catch{}const p=a(h);return JSON.stringify(p,null,2)}catch{return String(f)}},c=r.computed(()=>l(n.dataBefore)),d=r.computed(()=>l(n.dataAfter));return(f,h)=>(r.openBlock(),r.createBlock(Pi,{title:r.unref(t)("beforeAfter.dataComparison")||"Data Comparison",padding:"p-0",class:"overflow-hidden","header-theme":"primary"},{actions:r.withCtx(()=>[r.createElementVNode("div",n6,[r.createVNode(os,{variant:"destructive",size:"xs",pill:"",text:r.unref(t)("beforeAfter.original")||"Original"},null,8,["text"]),r.createVNode(os,{variant:"success",size:"xs",pill:"",text:r.unref(t)("beforeAfter.modified")||"Modified"},null,8,["text"])])]),default:r.withCtx(()=>[r.createElementVNode("div",o6,[r.createVNode(r.unref(t6),{"old-string":c.value,"new-string":d.value,"output-format":"side-by-side",language:"json",context:10,"max-height":600,theme:s.value,"hide-header":!0,"hide-stat":!0},null,8,["old-string","new-string","theme"])])]),_:1},8,["title"]))}});function Wx(e,t){const n=r.ref(!1),o=r.ref(!1),i=r.ref(!0),s=r.ref(!1),a=r.ref(!1),l=r.ref(!1),c=r.ref(0),d=r.ref(0),f=r.ref(0);let h=null,p=0,g=null,y=null;const b=new Map,_=["fontFamily","fontSize","fontWeight","fontStyle","fontStretch","fontVariant","fontKerning","fontFeatureSettings","letterSpacing","wordSpacing","textTransform","lineHeight","paddingTop","paddingRight","paddingBottom","paddingLeft","boxSizing","whiteSpace","wordWrap","wordBreak","textAlign","direction"],x=(q,Q)=>{const re=q.parentElement;if(!re)return null;(!h||h.parentElement!==re)&&(h?.remove(),h=q.ownerDocument.createElement("div"),h.setAttribute("aria-hidden","true"),Object.assign(h.style,{position:"absolute",top:"0",left:"0",visibility:"hidden",pointerEvents:"none",zIndex:"-9999",overflow:"hidden",border:"0"}),re.appendChild(h));for(const ie of _)h.style[ie]=Q[ie];return q.tagName==="INPUT"&&(h.style.whiteSpace="pre",h.style.wordWrap="normal",h.style.wordBreak="normal"),h},B=(q,Q)=>{const re=`${Q.font}|${Q.letterSpacing}`,ie=b.get(re);if(ie!==void 0)return ie;const le=q.parentElement;let X=0;if(le){const W=q.ownerDocument.createElement("input");W.type="password",W.tabIndex=-1,W.setAttribute("aria-hidden","true"),W.autocomplete="off",Object.assign(W.style,{position:"absolute",top:"0",left:"0",width:"10px",padding:"0",border:"0",visibility:"hidden",pointerEvents:"none"});for(const se of _)W.style[se]=Q[se];W.value="x".repeat(100),le.appendChild(W),X=W.scrollWidth/100,W.remove()}if(!(X>0)||X<1){const K=x(q,Q);if(K){K.textContent="•".repeat(10);const W=q.ownerDocument.createElement("span");K.appendChild(W);const se=Number.parseFloat(Q.paddingLeft)||0;X=Math.max(0,(W.offsetLeft-se)/10)}}return b.set(re,X),X},R=()=>{s.value=!0,g&&clearTimeout(g),g=setTimeout(()=>s.value=!1,530)},S=()=>{p=0;const q=e.value;if(!q||!t.value){o.value=!1;return}const Q=q.selectionStart,re=q.selectionEnd;if(Q===null||re===null){o.value=!1;return}o.value=!0,i.value=Q===re;const ie=getComputedStyle(q),le=x(q,ie);if(!le)return;q.tagName==="TEXTAREA"?le.style.width=`${q.clientWidth}px`:le.style.width="auto";let X=0,K=0;if(q.tagName==="INPUT"&&q.type==="password")X=Number.parseFloat(ie.paddingLeft)+Q*B(q,ie),K=Number.parseFloat(ie.paddingTop);else{const U=q.value.slice(0,Q);le.textContent=q.tagName==="TEXTAREA"&&U.endsWith(`
29
- `)?U+" ":U;const k=q.ownerDocument.createElement("span");k.textContent="​",le.appendChild(k),X=k.offsetLeft,K=k.offsetTop}const W=q.offsetWidth&&q.getBoundingClientRect().width/q.offsetWidth||1,se=Number.parseFloat(ie.borderLeftWidth)||0,H=Number.parseFloat(ie.borderTopWidth)||0,N=Number.parseFloat(ie.fontSize)||14;let j=q.offsetLeft+se+(X-q.scrollLeft)*W,Y=q.offsetTop+H+(K-q.scrollTop)*W;const J=Math.round(N*1.3);if(q.tagName==="INPUT")Y=q.offsetTop+(q.offsetHeight-J)/2;else{const U=Number.parseFloat(ie.lineHeight);!Number.isNaN(U)&&U>J&&(Y+=(U-J)/2)}q.tagName==="INPUT"?l.value=j<q.offsetLeft-4||j>q.offsetLeft+q.offsetWidth+4:l.value=Y<q.offsetTop-4||Y>q.offsetTop+q.offsetHeight+4,(Math.abs(j-c.value)>.1||Math.abs(Y-d.value)>.1)&&R(),c.value=j,d.value=Y,f.value=J},O=()=>{p||(p=requestAnimationFrame(S))},I=()=>{n.value=!0,a.value=!1,p&&cancelAnimationFrame(p),S(),requestAnimationFrame(()=>a.value=!0)},D=()=>{n.value=!1,a.value=!1},w=()=>{const q=e.value;if(!q)return;(q.getRootNode().activeElement===q||q.ownerDocument.activeElement===q)&&O()},E=q=>{const Q=q.ownerDocument,re=Q.defaultView,ie=["input","keydown","keyup","mousedown","mouseup","select","scroll","selectionchange"];return q.addEventListener("focus",I),q.addEventListener("blur",D),ie.forEach(le=>q.addEventListener(le,O)),Q.addEventListener("selectionchange",w),re?.addEventListener("resize",O),q.getRootNode().activeElement===q&&I(),()=>{q.removeEventListener("focus",I),q.removeEventListener("blur",D),ie.forEach(le=>q.removeEventListener(le,O)),Q.removeEventListener("selectionchange",w),re?.removeEventListener("resize",O)}};r.watch(e,q=>{y?.(),y=null,q&&(y=E(q))},{immediate:!0,flush:"post"}),r.watch(t,O),r.onBeforeUnmount(()=>{y?.(),p&&cancelAnimationFrame(p),g&&clearTimeout(g),h?.remove(),h=null});const F=r.computed(()=>t.value&&n.value&&o.value),A=r.computed(()=>F.value&&i.value&&!l.value);return{caretStyle:r.computed(()=>({height:`${f.value}px`,transform:`translate3d(${c.value}px, ${d.value}px, 0)`})),caretVisible:A,hideNativeCaret:F,isCaretMoving:s,caretAnimate:a,refreshCaret:O}}const r6=["aria-busy"],i6={class:"relative w-full flex-1"},s6={key:0,class:"flex justify-end mt-1"},a6=["for"],l6={key:0,class:"ml-1 text-destructive"},c6={class:"relative w-full flex-1 group"},d6={key:0,class:"absolute inset-y-0 left-4 flex items-center text-muted-foreground"},u6={key:1},f6={class:"text-sm font-semibold text-gray-500 dark:text-gray-400 whitespace-nowrap select-none"},h6=["id","value","placeholder"],m6={key:3,class:"flex items-center pr-2 flex-shrink-0"},p6=["title"],g6={key:1},b6={key:4,class:"flex items-center pr-3"},y6={key:5,class:"flex items-center self-stretch px-3 bg-gray-50 dark:bg-neutral-800 border-l border-gray-300 dark:border-gray-700 flex-shrink-0"},v6={class:"text-sm font-semibold text-gray-500 dark:text-gray-400 whitespace-nowrap select-none"},w6={key:1,class:"absolute top-full right-0 z-10 text-[11px] text-gray-500 dark:text-gray-400 opacity-0 transition-opacity pointer-events-none group-focus-within:opacity-100"},k6={key:0,class:"text-xs text-destructive mt-1"},Gs=Sn(r.defineComponent({name:"DCodeTextField",inheritAttrs:!1,__name:"DCodeTextField",props:{modelValue:{},label:{},placeholder:{default:""},clearable:{type:Boolean},required:{type:Boolean},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},visible:{type:Boolean,default:!0},skeleton:{type:Boolean,default:!1},error:{default:null},prependInner:{},hideClearWhenEmpty:{type:Boolean,default:!0},textCase:{default:"none"},applyTextCaseToValue:{type:Boolean,default:!0},valueType:{default:"free"},allowSpaces:{type:Boolean,default:!0},allowChars:{},pattern:{},showCharCount:{type:Boolean,default:!0},returnNumber:{type:Boolean,default:!1},icon:{},maxLength:{},minLength:{},maxValue:{},minValue:{},prefix:{},prefixClass:{},suffix:{},labelPosition:{default:"top"},labelWidth:{default:"150px"},size:{default:"default"},rounded:{default:"lg"},smoothCaret:{type:Boolean,default:!0},innerButtonText:{},innerButtonIcon:{},innerButtonTooltip:{},hideInnerButtonOnInput:{type:Boolean,default:!0}},emits:["update:modelValue","clear","click:inner-button"],setup(e,{emit:t}){const n=r.useAttrs(),o=r.computed(()=>l.valueType?.toLowerCase()==="password"||n.type==="password"),i=r.ref(!1),s=()=>{i.value=!i.value},a=t,l=e,c=r.computed(()=>n.label??l.label);r.computed(()=>l.visible??!0);const d=r.computed(()=>Zn(l.size)),f=Math.random().toString(36).slice(2,7),h=r.computed(()=>`app-text-field-${n.id||c.value||"field"}-${f}`),p=r.computed(()=>{const Z=n.required,ee=n["aria-required"];return Z===""||Z===!0||Z==="true"||(ee==="true"||ee===!0)||l.required}),g=r.computed(()=>!!(n["onClick:inner-button"]||n["onClick:innerButton"]||n.onClickInnerButton||l.innerButtonText||l.innerButtonIcon)),y=r.computed(()=>l.innerButtonText!==void 0?l.innerButtonText:l.innerButtonIcon?"":"Ctrl K"),b=r.computed(()=>{const{label:Z,class:ee,id:pe,required:Be,"aria-required":Te,...Oe}=n;return Oe}),_=r.computed(()=>{const Z={...b.value};return l.valueType?.toLowerCase()==="number"&&(Z.type="text",Z.inputmode="numeric",Z.pattern="[0-9]*"),l.valueType?.toLowerCase()==="email"&&(Z.type="email",Z.inputmode="email"),Z.type==="email"&&O.value&&(Z.type="text",Z.inputmode="email",Z.autocomplete??="email",Z.spellcheck??=!1,Z.autocapitalize??="off"),o.value&&(Z.type=i.value?"text":"password"),l.disabled&&(Z.disabled=!0),l.readonly&&(Z.readonly=!0),l.maxLength&&(Z.maxlength=l.maxLength),l.minLength&&(Z.minlength=l.minLength),l.maxValue&&(Z.max=l.maxValue),l.minValue&&(Z.min=l.minValue),Z}),x=r.computed(()=>{const Z=l.modelValue;return Z==null||String(Z).length===0}),B=r.computed(()=>!l.clearable||l.disabled||l.readonly?!1:l.hideClearWhenEmpty?!x.value:!0);r.computed(()=>{switch(l.textCase?.toLowerCase()){case"uppercase":return"uppercase";case"lowercase":return"lowercase";default:return"none"}});const R=r.ref(String(l.modelValue??"")),S=r.ref(null);r.watch(()=>l.modelValue,Z=>{const ee=String(Z??"");ee!==R.value&&(R.value=ee)});const O=r.computed(()=>l.smoothCaret&&!l.disabled&&!l.readonly),{caretStyle:I,caretVisible:D,hideNativeCaret:w,isCaretMoving:E,caretAnimate:F,refreshCaret:A}=Wx(S,O);r.watch(R,A,{flush:"post"});const P=r.ref(!1),q=r.ref(!1),Q=Z=>Z.split(/(\s+)/).map(ee=>{if(ee.trim()==="")return ee;const pe=ee.toLowerCase();return pe.charAt(0).toUpperCase()+pe.slice(1)}).join(""),re=Z=>{const ee=Z.toLowerCase(),pe=ee.search(new RegExp("\\p{L}","u"));return pe<0?ee:ee.slice(0,pe)+ee.charAt(pe).toUpperCase()+ee.slice(pe+1)},ie=Z=>{const ee=Z.toLowerCase(),pe=ee.search(new RegExp("\\p{L}","u"));return pe<0?ee:ee.slice(0,pe)+ee.charAt(pe).toUpperCase()+ee.slice(pe+1)},le=Z=>{switch(l.textCase?.toLowerCase()){case"uppercase":return Z.toUpperCase();case"lowercase":return Z.toLowerCase();case"titlecase":return Q(Z);case"capitalize":return ie(Z);case"sentencecase":return re(Z);default:return Z}},X=Z=>{if(!Z)return null;const ee=Array.isArray(Z)?Z.join(""):Z;return ee?new Set(ee):null},K=r.computed(()=>X(l.allowChars)),W=(Z,ee)=>(Z.lastIndex=0,Z.test(ee)),se=Z=>{const ee=l.valueType?.toLowerCase();if(ee==="free"||ee==="email"||ee==="password")return!0;const pe=Z===" ",Be=/\d/.test(Z),Te=new RegExp("\\p{L}","u").test(Z),Oe=new RegExp("\\p{N}","u").test(Z),Fe=/[\/\-_.,:]/.test(Z);return ee==="number"?Be:ee==="letter"?Te||Fe||l.allowSpaces&&pe:ee==="letternumber"?Te||Oe||Fe||l.allowSpaces&&pe:!0},H=Z=>{let ee="";for(const pe of Z){const Be=!!K.value&&K.value.has(pe);l.pattern&&!Be&&!W(l.pattern,pe)||!Be&&!se(pe)||(ee+=pe)}return ee},N=r.computed(()=>{const Z=l.maxLength??n.maxlength??n.maxLength;let ee=Number.NaN;return typeof Z=="number"?ee=Z:typeof Z=="string"&&(ee=Number.parseInt(Z,10)),Number.isFinite(ee)&&ee>0?ee:-1}),j=r.computed(()=>R.value.length),Y=r.computed(()=>l.showCharCount?N.value>0:!1),J=Z=>N.value>0?Z.slice(0,N.value):Z,U=Z=>{const ee=H(Z),pe=l.applyTextCaseToValue?le(ee):ee;return J(pe)},k=Z=>{if(Z==="")return null;if(l.valueType?.toLowerCase()==="number"){const ee=Number(Z);return Number.isFinite(ee)?ee:null}return Z},C=Z=>{R.value=Z,a("update:modelValue",k(Z))},T=(Z,ee)=>{const pe=J(ee);q.value=!0,Z.value=pe,C(pe),queueMicrotask(()=>q.value=!1)},M=Z=>{const ee=S.value;if(!ee)return;const pe=ee.selectionStart??ee.value.length,Be=ee.selectionEnd??ee.value.length;if(N.value>0){const Te=ee.value.length-(Be-pe),Oe=N.value-Te;if(Oe<=0)return;Z=Z.slice(0,Oe)}ee.setRangeText(Z,pe,Be,"end"),T(ee,U(ee.value))},$=Z=>{if(P.value||q.value||!Z.inputType?.startsWith("insert"))return;const ee=Z.data;if(ee==null)return;const pe=U(ee);pe!==ee&&(Z.preventDefault(),pe.length>0&&M(pe))},ne=Z=>{if(P.value||q.value)return;const ee=Z.clipboardData?.getData("text")??"",pe=U(ee);pe!==ee&&(Z.preventDefault(),pe.length>0&&M(pe))},te=Z=>{if(P.value||q.value)return;const ee=Z.target,pe=ee.value??"",Be=U(pe);Be===pe?C(Be):T(ee,Be)},ce=()=>P.value=!0,ke=()=>{P.value=!1;const Z=S.value;if(!Z)return;const ee=Z.value??"",pe=U(ee);pe===ee?C(pe):T(Z,pe)};r.onMounted(()=>{const Z=S.value;if(!Z)return;const ee=Z.value??"",pe=ee!==""?ee:R.value,Be=U(pe);Be===pe?C(Be):T(Z,Be)}),r.onBeforeUnmount(()=>{});const we=()=>{R.value="",S.value&&(S.value.value=""),a("update:modelValue",null),a("clear")},_e=r.computed(()=>Y.value&&j.value>0),fe=r.computed(()=>`${j.value} / ${N.value}`),de=r.computed(()=>!!l.error);return(Z,ee)=>r.withDirectives((r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["flex flex-col gap-1 w-full",[r.unref(n).class,l.disabled?"cursor-not-allowed":""]]),"aria-busy":l.skeleton},[l.skeleton?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[r.createElementVNode("div",{class:r.normalizeClass(["flex flex-1 w-full",[l.labelPosition==="left"?"flex-row items-center gap-3":"",l.labelPosition==="right"?"flex-row-reverse items-center gap-3":"",l.labelPosition==="top"?"flex-col gap-1":"",l.labelPosition==="bottom"?"flex-col-reverse gap-1":""]])},[c.value?(r.openBlock(),r.createElementBlock("div",{key:0,class:"h-4 rounded bg-gray-200 dark:bg-gray-700 animate-shimmer shrink-0",style:r.normalizeStyle(l.labelPosition==="left"||l.labelPosition==="right"?{width:l.labelWidth}:{width:"8rem"})},null,4)):r.createCommentVNode("",!0),r.createElementVNode("div",i6,[r.createElementVNode("div",{class:r.normalizeClass(["w-full bg-gray-200 dark:bg-gray-700 animate-shimmer",[r.unref(Zn)(l.size),r.unref(sn)(l.rounded)]])},null,2)])],2),Y.value?(r.openBlock(),r.createElementBlock("div",s6,[...ee[1]||(ee[1]=[r.createElementVNode("div",{class:"h-3 w-14 rounded bg-gray-200 dark:bg-gray-700 animate-shimmer"},null,-1)])])):r.createCommentVNode("",!0)],64)):(r.openBlock(),r.createElementBlock(r.Fragment,{key:1},[r.createElementVNode("div",{class:r.normalizeClass(["flex flex-1 w-full",[l.labelPosition==="left"?"flex-row items-center gap-3":"",l.labelPosition==="right"?"flex-row-reverse items-center gap-3":"",l.labelPosition==="top"?"flex-col gap-1":"",l.labelPosition==="bottom"?"flex-col-reverse gap-1":""]])},[c.value?(r.openBlock(),r.createElementBlock("label",{key:0,for:h.value,class:"text-sm font-medium shrink-0",style:r.normalizeStyle(l.labelPosition==="left"||l.labelPosition==="right"?{width:l.labelWidth}:{})},[r.createTextVNode(r.toDisplayString(c.value)+" ",1),p.value?(r.openBlock(),r.createElementBlock("span",l6,"*")):r.createCommentVNode("",!0)],12,a6)):r.createCommentVNode("",!0),r.createElementVNode("div",c6,[l.icon||l.prependInner||Z.$slots["prepend-inner"]?(r.openBlock(),r.createElementBlock("div",d6,[r.renderSlot(Z.$slots,"prepend-inner",{},()=>[l.icon?(r.openBlock(),r.createBlock(r.resolveDynamicComponent(l.icon),{key:0,class:"h-4 w-4"})):l.prependInner?(r.openBlock(),r.createElementBlock("span",u6,r.toDisplayString(l.prependInner),1)):r.createCommentVNode("",!0)],!0)])):r.createCommentVNode("",!0),r.createElementVNode("div",{class:r.normalizeClass(["relative flex items-center w-full border overflow-hidden transition-all duration-200",r.unref(sn)(l.rounded),"bg-white dark:bg-neutral-800 border-gray-300 dark:border-neutral-700/50",de.value?"border-destructive ring-1 ring-destructive":"border-gray-300 dark:border-gray-700 focus-within:border-primary focus-within:ring-1 focus-within:ring-primary dark:focus-within:border-primary dark:focus-within:ring-primary",l.disabled?"opacity-50 cursor-not-allowed bg-gray-50 dark:bg-neutral-800":"",l.readonly?"bg-neutral-50/50 dark:bg-neutral-900/30":""])},[l.prefix||Z.$slots.prefix?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(["flex items-center self-stretch px-3 bg-gray-50 dark:bg-neutral-800 border-r border-gray-300 dark:border-gray-700 flex-shrink-0",l.prefixClass])},[r.renderSlot(Z.$slots,"prefix",{},()=>[r.createElementVNode("span",f6,r.toDisplayString(l.prefix),1)],!0)],2)):r.createCommentVNode("",!0),l.icon?(r.openBlock(),r.createBlock(r.resolveDynamicComponent(l.icon),{key:1,class:"w-4 h-4 ml-3 text-gray-400 flex-shrink-0"})):r.createCommentVNode("",!0),r.createElementVNode("input",r.mergeProps({id:h.value,ref_key:"inputRef",ref:S,value:R.value,class:["flex-1 min-w-0 bg-transparent text-foreground dark:text-gray-300 outline-none focus:outline-none focus-visible:outline-none placeholder:text-gray-400",[d.value,r.unref(w)?"dcode-caret-transparent":""]],placeholder:l.placeholder},_.value,{onInput:te,onBeforeinput:$,onPaste:ne,onCompositionstart:ce,onCompositionend:ke}),null,16,h6),O.value?(r.openBlock(),r.createElementBlock("span",{key:2,"aria-hidden":"true",class:r.normalizeClass(["pointer-events-none absolute left-0 top-0 z-[1] w-[2px] rounded-full bg-primary will-change-transform motion-reduce:transition-none",[r.unref(D)?"opacity-100":"opacity-0",r.unref(F)?"transition-[transform,opacity] duration-100 ease-out":"transition-none",r.unref(D)&&!r.unref(E)?"dcode-animate-caret-blink":""]]),style:r.normalizeStyle(r.unref(I))},null,6)):r.createCommentVNode("",!0),g.value&&(!l.hideInnerButtonOnInput||!R.value)?(r.openBlock(),r.createElementBlock("div",m6,[r.createElementVNode("button",{type:"button",title:l.innerButtonTooltip||y.value,class:"inline-flex items-center gap-1 px-1.5 py-0.5 text-[10px] font-mono font-medium rounded border border-neutral-200 dark:border-neutral-700 bg-neutral-100 dark:bg-neutral-800 text-neutral-500 hover:text-neutral-900 dark:text-neutral-400 dark:hover:text-neutral-100 hover:bg-neutral-200 dark:hover:bg-neutral-700 transition-colors shadow-none cursor-pointer select-none",onClick:ee[0]||(ee[0]=r.withModifiers(pe=>a("click:inner-button",pe),["stop"]))},[l.innerButtonIcon?(r.openBlock(),r.createBlock(r.resolveDynamicComponent(l.innerButtonIcon),{key:0,class:"w-3.5 h-3.5"})):r.createCommentVNode("",!0),y.value?(r.openBlock(),r.createElementBlock("span",g6,r.toDisplayString(y.value),1)):r.createCommentVNode("",!0)],8,p6)])):r.createCommentVNode("",!0),B.value||o.value?(r.openBlock(),r.createElementBlock("div",b6,[B.value&&!o.value?(r.openBlock(),r.createBlock(Lr,{key:0,disabled:l.disabled||l.readonly,onClear:we},null,8,["disabled"])):r.createCommentVNode("",!0),o.value?(r.openBlock(),r.createElementBlock("button",{key:1,type:"button",class:"p-1.5 text-gray-400 hover:text-gray-600 dark:hover:text-gray-200 transition-colors",tabindex:"-1",onClick:s},[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(i.value?r.unref(Ae.Eye):r.unref(Ae.EyeOff)),{class:"w-4 h-4"}))])):r.createCommentVNode("",!0)])):r.createCommentVNode("",!0),l.suffix?(r.openBlock(),r.createElementBlock("div",y6,[r.createElementVNode("span",v6,r.toDisplayString(l.suffix),1)])):r.createCommentVNode("",!0)],2),_e.value&&!de.value?(r.openBlock(),r.createElementBlock("p",w6,r.toDisplayString(fe.value),1)):r.createCommentVNode("",!0)])],2),de.value?(r.openBlock(),r.createElementBlock("p",k6,r.toDisplayString(l.error),1)):r.createCommentVNode("",!0)],64))],10,r6)),[[r.vShow,e.visible]])}}),[["__scopeId","data-v-2e6dc550"]]),_6={class:"grid grid-cols-1 md:grid-cols-2 gap-6"},x6={class:"dcode-card h-full flex flex-col border border-neutral-200/60 dark:border-neutral-700/50 bg-white dark:bg-neutral-800 rounded-xl overflow-hidden"},E6={class:"p-4 border-b border-neutral-200/60 dark:border-neutral-700/30 bg-neutral-50 dark:bg-neutral-900/10"},C6={class:"flex items-center justify-between"},S6={class:"font-display font-semibold text-neutral-900 dark:text-neutral-100 flex items-center gap-2"},A6={class:"text-[10px] font-medium px-2 py-0.5 rounded-full bg-white dark:bg-neutral-800 text-neutral-600 dark:text-neutral-400 border border-neutral-200/60 dark:border-neutral-700/50 shadow-sm"},T6={class:"p-6 flex-1"},B6={class:"flex flex-col gap-4"},P6={key:0,class:"text-center py-8 text-neutral-400 dark:text-neutral-500 italic text-sm"},N6={class:"dcode-card h-full flex flex-col border border-neutral-200/60 dark:border-neutral-700/50 bg-white dark:bg-neutral-800 rounded-xl overflow-hidden"},D6={class:"p-4 border-b border-neutral-200/60 dark:border-neutral-700/30 bg-neutral-50 dark:bg-neutral-900/10"},M6={class:"flex items-center justify-between"},R6={class:"font-display font-semibold text-neutral-900 dark:text-neutral-100 flex items-center gap-2"},I6={class:"text-[10px] font-medium px-2 py-0.5 rounded-full bg-white dark:bg-neutral-800 text-primary-600 dark:text-primary-400 border border-primary-100 dark:border-primary-900/30 shadow-sm"},O6={class:"p-6 flex-1"},L6={class:"flex flex-col gap-4"},F6={key:0,class:"text-center py-8 text-neutral-400 dark:text-neutral-500 italic text-sm"},jm=r.defineComponent({name:"DCodeListLabels",__name:"DCodeListLabels",props:{dataBefore:{},dataAfter:{}},setup(e){const{t}=In.useI18n(),n=e,o=c=>{if(!c)return{};if(typeof c=="string")try{if(c.trim().startsWith("{")||c.trim().startsWith("["))return JSON.parse(c)}catch(d){return console.error("Failed to parse data string:",d),{raw:c}}return typeof c=="object"&&c!==null?c:{value:c}},i=r.computed(()=>o(n.dataBefore)),s=r.computed(()=>o(n.dataAfter)),a=c=>c.replaceAll(/([A-Z])/g," $1").replace(/^./,d=>d.toUpperCase()).trim(),l=c=>{if(c==null)return"-";if(typeof c=="boolean")return t(c?"common.yes":"common.no");if(typeof c=="object"&&c!==null){const d=c.name??c.label??c.code??c.value??c.id;return d!=null?String(d):JSON.stringify(c)}return String(c)};return(c,d)=>(r.openBlock(),r.createElementBlock("div",_6,[r.createElementVNode("div",x6,[r.createElementVNode("div",E6,[r.createElementVNode("div",C6,[r.createElementVNode("h3",S6,[d[0]||(d[0]=r.createElementVNode("span",{class:"w-2 h-2 rounded-full bg-danger-500 shadow-[0_0_8px_rgba(239,68,68,0.5)]"},null,-1)),r.createTextVNode(" "+r.toDisplayString(r.unref(t)("beforeAfter.dataBefore")),1)]),r.createElementVNode("span",A6,r.toDisplayString(r.unref(t)("beforeAfter.original")),1)])]),r.createElementVNode("div",T6,[r.createElementVNode("div",B6,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(i.value,(f,h)=>(r.openBlock(),r.createBlock(Gs,{key:h,"model-value":l(f),label:a(String(h)),disabled:"",variant:"underlined",class:"w-full"},null,8,["model-value","label"]))),128)),Object.keys(i.value).length===0?(r.openBlock(),r.createElementBlock("div",P6)):r.createCommentVNode("",!0)])])]),r.createElementVNode("div",N6,[r.createElementVNode("div",D6,[r.createElementVNode("div",M6,[r.createElementVNode("h3",R6,[d[1]||(d[1]=r.createElementVNode("span",{class:"w-2 h-2 rounded-full bg-success-500 shadow-[0_0_8px_rgba(34,197,94,0.5)]"},null,-1)),r.createTextVNode(" "+r.toDisplayString(r.unref(t)("beforeAfter.dataAfter")),1)]),r.createElementVNode("span",I6,r.toDisplayString(r.unref(t)("beforeAfter.modified")),1)])]),r.createElementVNode("div",O6,[r.createElementVNode("div",L6,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(s.value,(f,h)=>(r.openBlock(),r.createBlock(Gs,{key:h,"model-value":l(f),label:a(String(h)),disabled:"",variant:"underlined",class:"w-full"},null,8,["model-value","label"]))),128)),Object.keys(s.value).length===0?(r.openBlock(),r.createElementBlock("div",F6,r.toDisplayString(r.unref(t)("beforeAfter.noModifiedData")),1)):r.createCommentVNode("",!0)])])])]))}}),$6={class:"inline-flex items-center text-[11px] font-semibold px-2.5 py-1 rounded-full bg-primary-50 dark:bg-primary-900/20 text-primary-700 dark:text-primary-300 border border-primary-100 dark:border-primary-800/40"},z6={key:0},j6={class:"grid grid-cols-3 gap-x-5 px-5 py-2 border-b border-neutral-200 dark:border-neutral-700 bg-neutral-50/60 dark:bg-neutral-900/40 text-[9px] font-bold uppercase tracking-wider text-neutral-400 dark:text-neutral-500"},U6={class:"text-danger-500/80 dark:text-danger-400/80"},W6={class:"text-success-600/80 dark:text-success-400/80"},H6={class:"flex items-center gap-2 min-w-0"},q6=["title"],K6={class:"text-[13px] font-semibold text-neutral-800 dark:text-neutral-100 truncate"},G6=["title"],Y6={class:"min-w-0"},Z6={class:"sm:hidden text-[9px] font-bold uppercase tracking-wider text-danger-500/80 dark:text-danger-400/80 mb-1"},X6={key:0,class:"font-mono text-[11px] leading-relaxed whitespace-pre-wrap break-words max-h-32 overflow-y-auto text-neutral-500 dark:text-neutral-400"},J6={key:1,class:"font-mono text-[11.5px] text-neutral-500 dark:text-neutral-400 break-words"},Q6={class:"min-w-0"},V6={class:"sm:hidden text-[9px] font-bold uppercase tracking-wider text-success-600/80 dark:text-success-400/80 mb-1"},e8={key:0,class:"font-mono text-[11px] leading-relaxed whitespace-pre-wrap break-words max-h-32 overflow-y-auto text-neutral-700 dark:text-neutral-200"},t8={key:1,class:"font-mono text-[11.5px] text-neutral-700 dark:text-neutral-200 break-words"},n8={key:1,class:"flex flex-col items-center gap-2 py-12 px-4"},o8={class:"text-sm text-neutral-500 dark:text-neutral-400"},Um=Sn(r.defineComponent({name:"DCodeFieldDiff",__name:"DCodeFieldDiff",props:{dataBefore:{},dataAfter:{},labels:{}},setup(e){const{t,te:n}=In.useI18n(),o=e,i=h=>{if(h==null)return null;if(typeof h=="string"){try{const p=h.trim();if(p.startsWith("{")||p.startsWith("[")){const g=JSON.parse(p);return typeof g=="object"&&g!==null?g:null}}catch(p){console.error("Failed to parse diff data string:",p)}return null}return typeof h=="object"?h:null},s=r.computed(()=>{const h=i(o.dataBefore)||{},p=i(o.dataAfter)||{},g=[...new Set([...Object.keys(h),...Object.keys(p)])],y=b=>b===void 0?null:b;return g.map(b=>{const _=b in h,x=b in p,B=_?h[b]:null,R=x?p[b]:null;return{key:b,before:B,after:R,status:_?x?"modified":"removed":"added"}}).filter(b=>JSON.stringify(y(b.before))!==JSON.stringify(y(b.after)))}),a=h=>h==="added"?"bg-success-500":h==="removed"?"bg-danger-500":"bg-neutral-300 dark:bg-neutral-600",l=h=>{if(o.labels&&o.labels[h])return o.labels[h];const p=`fieldLabels.${h}`;return n(p)?t(p):h.replaceAll(/([A-Z])/g," $1").replace(/^./,g=>g.toUpperCase()).trim()},c=h=>h==null?!1:Array.isArray(h)?h.some(p=>p!==null&&typeof p=="object"):typeof h=="object",d=h=>{try{return JSON.stringify(h,null,2)}catch{return String(h)}},f=h=>{if(h==null||h==="")return"-";if(typeof h=="boolean")return t(h?"common.yes":"common.no");if(Array.isArray(h))return h.length===0?"-":h.map(p=>p!==null&&typeof p=="object"?JSON.stringify(p):String(p)).join(", ");if(typeof h=="object"){const p=h.name??h.label??h.code??h.value??h.id;return p!=null?String(p):JSON.stringify(h)}return String(h)};return(h,p)=>(r.openBlock(),r.createBlock(Pi,{title:r.unref(t)("beforeAfter.changedFields"),padding:"p-0",class:"overflow-hidden"},{actions:r.withCtx(()=>[r.createElementVNode("span",$6,r.toDisplayString(s.value.length),1)]),default:r.withCtx(()=>[s.value.length>0?(r.openBlock(),r.createElementBlock("div",z6,[r.createElementVNode("div",j6,[r.createElementVNode("span",null,r.toDisplayString(r.unref(t)("beforeAfter.field")),1),r.createElementVNode("span",U6,r.toDisplayString(r.unref(t)("beforeAfter.dataBefore")),1),r.createElementVNode("span",W6,r.toDisplayString(r.unref(t)("beforeAfter.dataAfter")),1)]),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(s.value,(g,y)=>(r.openBlock(),r.createElementBlock("div",{key:g.key,class:"fielddiff-row grid grid-cols-1 sm:grid-cols-3 gap-x-5 gap-y-1.5 px-5 py-3 border-b border-neutral-100 dark:border-neutral-800 last:border-b-0 hover:bg-neutral-50/70 dark:hover:bg-neutral-900/30 transition-colors",style:r.normalizeStyle({animationDelay:`${Math.min(y,12)*40}ms`})},[r.createElementVNode("div",H6,[r.createElementVNode("span",{class:r.normalizeClass(["w-1.5 h-1.5 rounded-full shrink-0",a(g.status)]),title:r.unref(t)(`beforeAfter.${g.status}`)},null,10,q6),r.createElementVNode("span",K6,r.toDisplayString(l(g.key)),1),r.createElementVNode("code",{class:"text-[10px] font-mono text-neutral-400 dark:text-neutral-500 truncate",title:g.key},r.toDisplayString(g.key),9,G6)]),r.createElementVNode("div",Y6,[r.createElementVNode("div",Z6,r.toDisplayString(r.unref(t)("beforeAfter.dataBefore")),1),c(g.before)?(r.openBlock(),r.createElementBlock("pre",X6,r.toDisplayString(d(g.before)),1)):(r.openBlock(),r.createElementBlock("span",J6,r.toDisplayString(f(g.before)),1))]),r.createElementVNode("div",Q6,[r.createElementVNode("div",V6,r.toDisplayString(r.unref(t)("beforeAfter.dataAfter")),1),c(g.after)?(r.openBlock(),r.createElementBlock("pre",e8,r.toDisplayString(d(g.after)),1)):(r.openBlock(),r.createElementBlock("span",t8,r.toDisplayString(f(g.after)),1))])],4))),128))])):(r.openBlock(),r.createElementBlock("div",n8,[r.createVNode(r.unref(Ae.CircleCheck),{class:"w-8 h-8 text-success-400 dark:text-success-500","stroke-width":1.5}),r.createElementVNode("p",o8,r.toDisplayString(r.unref(t)("beforeAfter.noModifiedData")),1)]))]),_:1},8,["title"]))}}),[["__scopeId","data-v-84417f89"]]);function Hu(e){return e+.5|0}const za=(e,t,n)=>Math.max(Math.min(e,n),t);function qu(e){return za(Hu(e*2.55),0,255)}function ja(e){return za(Hu(e*255),0,255)}function Ys(e){return za(Hu(e/2.55)/100,0,1)}function Hx(e){return za(Hu(e*100),0,100)}const ti={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},hy=[..."0123456789ABCDEF"],r8=e=>hy[e&15],i8=e=>hy[(e&240)>>4]+hy[e&15],Wm=e=>(e&240)>>4===(e&15),s8=e=>Wm(e.r)&&Wm(e.g)&&Wm(e.b)&&Wm(e.a);function a8(e){var t=e.length,n;return e[0]==="#"&&(t===4||t===5?n={r:255&ti[e[1]]*17,g:255&ti[e[2]]*17,b:255&ti[e[3]]*17,a:t===5?ti[e[4]]*17:255}:(t===7||t===9)&&(n={r:ti[e[1]]<<4|ti[e[2]],g:ti[e[3]]<<4|ti[e[4]],b:ti[e[5]]<<4|ti[e[6]],a:t===9?ti[e[7]]<<4|ti[e[8]]:255})),n}const l8=(e,t)=>e<255?t(e):"";function c8(e){var t=s8(e)?r8:i8;return e?"#"+t(e.r)+t(e.g)+t(e.b)+l8(e.a,t):void 0}const d8=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function qx(e,t,n){const o=t*Math.min(n,1-n),i=(s,a=(s+e/30)%12)=>n-o*Math.max(Math.min(a-3,9-a,1),-1);return[i(0),i(8),i(4)]}function u8(e,t,n){const o=(i,s=(i+e/60)%6)=>n-n*t*Math.max(Math.min(s,4-s,1),0);return[o(5),o(3),o(1)]}function f8(e,t,n){const o=qx(e,1,.5);let i;for(t+n>1&&(i=1/(t+n),t*=i,n*=i),i=0;i<3;i++)o[i]*=1-t-n,o[i]+=t;return o}function h8(e,t,n,o,i){return e===i?(t-n)/o+(t<n?6:0):t===i?(n-e)/o+2:(e-t)/o+4}function my(e){const n=e.r/255,o=e.g/255,i=e.b/255,s=Math.max(n,o,i),a=Math.min(n,o,i),l=(s+a)/2;let c,d,f;return s!==a&&(f=s-a,d=l>.5?f/(2-s-a):f/(s+a),c=h8(n,o,i,f,s),c=c*60+.5),[c|0,d||0,l]}function py(e,t,n,o){return(Array.isArray(t)?e(t[0],t[1],t[2]):e(t,n,o)).map(ja)}function gy(e,t,n){return py(qx,e,t,n)}function m8(e,t,n){return py(f8,e,t,n)}function p8(e,t,n){return py(u8,e,t,n)}function Kx(e){return(e%360+360)%360}function g8(e){const t=d8.exec(e);let n=255,o;if(!t)return;t[5]!==o&&(n=t[6]?qu(+t[5]):ja(+t[5]));const i=Kx(+t[2]),s=+t[3]/100,a=+t[4]/100;return t[1]==="hwb"?o=m8(i,s,a):t[1]==="hsv"?o=p8(i,s,a):o=gy(i,s,a),{r:o[0],g:o[1],b:o[2],a:n}}function b8(e,t){var n=my(e);n[0]=Kx(n[0]+t),n=gy(n),e.r=n[0],e.g=n[1],e.b=n[2]}function y8(e){if(!e)return;const t=my(e),n=t[0],o=Hx(t[1]),i=Hx(t[2]);return e.a<255?`hsla(${n}, ${o}%, ${i}%, ${Ys(e.a)})`:`hsl(${n}, ${o}%, ${i}%)`}const Gx={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"},Yx={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 v8(){const e={},t=Object.keys(Yx),n=Object.keys(Gx);let o,i,s,a,l;for(o=0;o<t.length;o++){for(a=l=t[o],i=0;i<n.length;i++)s=n[i],l=l.replace(s,Gx[s]);s=parseInt(Yx[a],16),e[l]=[s>>16&255,s>>8&255,s&255]}return e}let Hm;function w8(e){Hm||(Hm=v8(),Hm.transparent=[0,0,0,0]);const t=Hm[e.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}const k8=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function _8(e){const t=k8.exec(e);let n=255,o,i,s;if(t){if(t[7]!==o){const a=+t[7];n=t[8]?qu(a):za(a*255,0,255)}return o=+t[1],i=+t[3],s=+t[5],o=255&(t[2]?qu(o):za(o,0,255)),i=255&(t[4]?qu(i):za(i,0,255)),s=255&(t[6]?qu(s):za(s,0,255)),{r:o,g:i,b:s,a:n}}}function x8(e){return e&&(e.a<255?`rgba(${e.r}, ${e.g}, ${e.b}, ${Ys(e.a)})`:`rgb(${e.r}, ${e.g}, ${e.b})`)}const by=e=>e<=.0031308?e*12.92:Math.pow(e,1/2.4)*1.055-.055,ld=e=>e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4);function E8(e,t,n){const o=ld(Ys(e.r)),i=ld(Ys(e.g)),s=ld(Ys(e.b));return{r:ja(by(o+n*(ld(Ys(t.r))-o))),g:ja(by(i+n*(ld(Ys(t.g))-i))),b:ja(by(s+n*(ld(Ys(t.b))-s))),a:e.a+n*(t.a-e.a)}}function qm(e,t,n){if(e){let o=my(e);o[t]=Math.max(0,Math.min(o[t]+o[t]*n,t===0?360:1)),o=gy(o),e.r=o[0],e.g=o[1],e.b=o[2]}}function Zx(e,t){return e&&Object.assign(t||{},e)}function Xx(e){var t={r:0,g:0,b:0,a:255};return Array.isArray(e)?e.length>=3&&(t={r:e[0],g:e[1],b:e[2],a:255},e.length>3&&(t.a=ja(e[3]))):(t=Zx(e,{r:0,g:0,b:0,a:1}),t.a=ja(t.a)),t}function C8(e){return e.charAt(0)==="r"?_8(e):g8(e)}class Ku{constructor(t){if(t instanceof Ku)return t;const n=typeof t;let o;n==="object"?o=Xx(t):n==="string"&&(o=a8(t)||w8(t)||C8(t)),this._rgb=o,this._valid=!!o}get valid(){return this._valid}get rgb(){var t=Zx(this._rgb);return t&&(t.a=Ys(t.a)),t}set rgb(t){this._rgb=Xx(t)}rgbString(){return this._valid?x8(this._rgb):void 0}hexString(){return this._valid?c8(this._rgb):void 0}hslString(){return this._valid?y8(this._rgb):void 0}mix(t,n){if(t){const o=this.rgb,i=t.rgb;let s;const a=n===s?.5:n,l=2*a-1,c=o.a-i.a,d=((l*c===-1?l:(l+c)/(1+l*c))+1)/2;s=1-d,o.r=255&d*o.r+s*i.r+.5,o.g=255&d*o.g+s*i.g+.5,o.b=255&d*o.b+s*i.b+.5,o.a=a*o.a+(1-a)*i.a,this.rgb=o}return this}interpolate(t,n){return t&&(this._rgb=E8(this._rgb,t._rgb,n)),this}clone(){return new Ku(this.rgb)}alpha(t){return this._rgb.a=ja(t),this}clearer(t){const n=this._rgb;return n.a*=1-t,this}greyscale(){const t=this._rgb,n=Hu(t.r*.3+t.g*.59+t.b*.11);return t.r=t.g=t.b=n,this}opaquer(t){const n=this._rgb;return n.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return qm(this._rgb,2,t),this}darken(t){return qm(this._rgb,2,-t),this}saturate(t){return qm(this._rgb,1,t),this}desaturate(t){return qm(this._rgb,1,-t),this}rotate(t){return b8(this._rgb,t),this}}function Zs(){}const S8=(()=>{let e=0;return()=>e++})();function xn(e){return e==null}function xo(e){if(Array.isArray&&Array.isArray(e))return!0;const t=Object.prototype.toString.call(e);return t.slice(0,7)==="[object"&&t.slice(-6)==="Array]"}function an(e){return e!==null&&Object.prototype.toString.call(e)==="[object Object]"}function Zo(e){return(typeof e=="number"||e instanceof Number)&&isFinite(+e)}function ss(e,t){return Zo(e)?e:t}function Zt(e,t){return typeof e>"u"?t:e}const A8=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100:+e/t,Jx=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100*t:+e;function Wn(e,t,n){if(e&&typeof e.call=="function")return e.apply(n,t)}function An(e,t,n,o){let i,s,a;if(xo(e))for(s=e.length,i=0;i<s;i++)t.call(n,e[i],i);else if(an(e))for(a=Object.keys(e),s=a.length,i=0;i<s;i++)t.call(n,e[a[i]],a[i])}function Km(e,t){let n,o,i,s;if(!e||!t||e.length!==t.length)return!1;for(n=0,o=e.length;n<o;++n)if(i=e[n],s=t[n],i.datasetIndex!==s.datasetIndex||i.index!==s.index)return!1;return!0}function Gm(e){if(xo(e))return e.map(Gm);if(an(e)){const t=Object.create(null),n=Object.keys(e),o=n.length;let i=0;for(;i<o;++i)t[n[i]]=Gm(e[n[i]]);return t}return e}function Qx(e){return["__proto__","prototype","constructor"].indexOf(e)===-1}function T8(e,t,n,o){if(!Qx(e))return;const i=t[e],s=n[e];an(i)&&an(s)?Gu(i,s,o):t[e]=Gm(s)}function Gu(e,t,n){const o=xo(t)?t:[t],i=o.length;if(!an(e))return e;n=n||{};const s=n.merger||T8;let a;for(let l=0;l<i;++l){if(a=o[l],!an(a))continue;const c=Object.keys(a);for(let d=0,f=c.length;d<f;++d)s(c[d],e,a,n)}return e}function Yu(e,t){return Gu(e,t,{merger:B8})}function B8(e,t,n){if(!Qx(e))return;const o=t[e],i=n[e];an(o)&&an(i)?Yu(o,i):Object.prototype.hasOwnProperty.call(t,e)||(t[e]=Gm(i))}const Vx={"":e=>e,x:e=>e.x,y:e=>e.y};function P8(e){const t=e.split("."),n=[];let o="";for(const i of t)o+=i,o.endsWith("\\")?o=o.slice(0,-1)+".":(n.push(o),o="");return n}function N8(e){const t=P8(e);return n=>{for(const o of t){if(o==="")break;n=n&&n[o]}return n}}function Wl(e,t){return(Vx[t]||(Vx[t]=N8(t)))(e)}function yy(e){return e.charAt(0).toUpperCase()+e.slice(1)}const Zu=e=>typeof e<"u",Ua=e=>typeof e=="function",eE=(e,t)=>{if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0};function D8(e){return e.type==="mouseup"||e.type==="click"||e.type==="contextmenu"}const Tn=Math.PI,Vn=2*Tn,M8=Vn+Tn,Ym=Number.POSITIVE_INFINITY,R8=Tn/180,Do=Tn/2,Hl=Tn/4,tE=Tn*2/3,nE=Math.log10,as=Math.sign;function Xu(e,t,n){return Math.abs(e-t)<n}function oE(e){const t=Math.round(e);e=Xu(e,t,e/1e3)?t:e;const n=Math.pow(10,Math.floor(nE(e))),o=e/n;return(o<=1?1:o<=2?2:o<=5?5:10)*n}function I8(e){const t=[],n=Math.sqrt(e);let o;for(o=1;o<n;o++)e%o===0&&(t.push(o),t.push(e/o));return n===(n|0)&&t.push(n),t.sort((i,s)=>i-s).pop(),t}function O8(e){return typeof e=="symbol"||typeof e=="object"&&e!==null&&!(Symbol.toPrimitive in e||"toString"in e||"valueOf"in e)}function Ju(e){return!O8(e)&&!isNaN(parseFloat(e))&&isFinite(e)}function L8(e,t){const n=Math.round(e);return n-t<=e&&n+t>=e}function F8(e,t,n){let o,i,s;for(o=0,i=e.length;o<i;o++)s=e[o][n],isNaN(s)||(t.min=Math.min(t.min,s),t.max=Math.max(t.max,s))}function Xs(e){return e*(Tn/180)}function $8(e){return e*(180/Tn)}function rE(e){if(!Zo(e))return;let t=1,n=0;for(;Math.round(e*t)/t!==e;)t*=10,n++;return n}function iE(e,t){const n=t.x-e.x,o=t.y-e.y,i=Math.sqrt(n*n+o*o);let s=Math.atan2(o,n);return s<-.5*Tn&&(s+=Vn),{angle:s,distance:i}}function vy(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function z8(e,t){return(e-t+M8)%Vn-Tn}function Fr(e){return(e%Vn+Vn)%Vn}function Qu(e,t,n,o){const i=Fr(e),s=Fr(t),a=Fr(n),l=Fr(s-i),c=Fr(a-i),d=Fr(i-s),f=Fr(i-a);return i===s||i===a||o&&s===a||l>c&&d<f}function Xo(e,t,n){return Math.max(t,Math.min(n,e))}function j8(e){return Xo(e,-32768,32767)}function Js(e,t,n,o=1e-6){return e>=Math.min(t,n)-o&&e<=Math.max(t,n)+o}function wy(e,t,n){n=n||(a=>e[a]<t);let o=e.length-1,i=0,s;for(;o-i>1;)s=i+o>>1,n(s)?i=s:o=s;return{lo:i,hi:o}}const ql=(e,t,n,o)=>wy(e,n,o?i=>{const s=e[i][t];return s<n||s===n&&e[i+1][t]===n}:i=>e[i][t]<n),U8=(e,t,n)=>wy(e,n,o=>e[o][t]>=n);function W8(e,t,n){let o=0,i=e.length;for(;o<i&&e[o]<t;)o++;for(;i>o&&e[i-1]>n;)i--;return o>0||i<e.length?e.slice(o,i):e}const sE=["push","pop","shift","splice","unshift"];function H8(e,t){if(e._chartjs){e._chartjs.listeners.push(t);return}Object.defineProperty(e,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[t]}}),sE.forEach(n=>{const o="_onData"+yy(n),i=e[n];Object.defineProperty(e,n,{configurable:!0,enumerable:!1,value(...s){const a=i.apply(this,s);return e._chartjs.listeners.forEach(l=>{typeof l[o]=="function"&&l[o](...s)}),a}})})}function aE(e,t){const n=e._chartjs;if(!n)return;const o=n.listeners,i=o.indexOf(t);i!==-1&&o.splice(i,1),!(o.length>0)&&(sE.forEach(s=>{delete e[s]}),delete e._chartjs)}function lE(e){const t=new Set(e);return t.size===e.length?e:Array.from(t)}const cE=(function(){return typeof window>"u"?function(e){return e()}:window.requestAnimationFrame})();function dE(e,t){let n=[],o=!1;return function(...i){n=i,o||(o=!0,cE.call(window,()=>{o=!1,e.apply(t,n)}))}}function q8(e,t){let n;return function(...o){return t?(clearTimeout(n),n=setTimeout(e,t,o)):e.apply(this,o),t}}const ky=e=>e==="start"?"left":e==="end"?"right":"center",Jo=(e,t,n)=>e==="start"?t:e==="end"?n:(t+n)/2,K8=(e,t,n,o)=>e===(o?"left":"right")?n:e==="center"?(t+n)/2:t;function G8(e,t,n){const o=t.length;let i=0,s=o;if(e._sorted){const{iScale:a,vScale:l,_parsed:c}=e,d=e.dataset&&e.dataset.options?e.dataset.options.spanGaps:null,f=a.axis,{min:h,max:p,minDefined:g,maxDefined:y}=a.getUserBounds();if(g){if(i=Math.min(ql(c,f,h).lo,n?o:ql(t,f,a.getPixelForValue(h)).lo),d){const b=c.slice(0,i+1).reverse().findIndex(_=>!xn(_[l.axis]));i-=Math.max(0,b)}i=Xo(i,0,o-1)}if(y){let b=Math.max(ql(c,a.axis,p,!0).hi+1,n?0:ql(t,f,a.getPixelForValue(p),!0).hi+1);if(d){const _=c.slice(b-1).findIndex(x=>!xn(x[l.axis]));b+=Math.max(0,_)}s=Xo(b,i,o)-i}else s=o-i}return{start:i,count:s}}function Y8(e){const{xScale:t,yScale:n,_scaleRanges:o}=e,i={xmin:t.min,xmax:t.max,ymin:n.min,ymax:n.max};if(!o)return e._scaleRanges=i,!0;const s=o.xmin!==t.min||o.xmax!==t.max||o.ymin!==n.min||o.ymax!==n.max;return Object.assign(o,i),s}const Zm=e=>e===0||e===1,uE=(e,t,n)=>-(Math.pow(2,10*(e-=1))*Math.sin((e-t)*Vn/n)),fE=(e,t,n)=>Math.pow(2,-10*e)*Math.sin((e-t)*Vn/n)+1,Vu={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>-e*(e-2),easeInOutQuad:e=>(e/=.5)<1?.5*e*e:-.5*(--e*(e-2)-1),easeInCubic:e=>e*e*e,easeOutCubic:e=>(e-=1)*e*e+1,easeInOutCubic:e=>(e/=.5)<1?.5*e*e*e:.5*((e-=2)*e*e+2),easeInQuart:e=>e*e*e*e,easeOutQuart:e=>-((e-=1)*e*e*e-1),easeInOutQuart:e=>(e/=.5)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2),easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>(e-=1)*e*e*e*e+1,easeInOutQuint:e=>(e/=.5)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2),easeInSine:e=>-Math.cos(e*Do)+1,easeOutSine:e=>Math.sin(e*Do),easeInOutSine:e=>-.5*(Math.cos(Tn*e)-1),easeInExpo:e=>e===0?0:Math.pow(2,10*(e-1)),easeOutExpo:e=>e===1?1:-Math.pow(2,-10*e)+1,easeInOutExpo:e=>Zm(e)?e:e<.5?.5*Math.pow(2,10*(e*2-1)):.5*(-Math.pow(2,-10*(e*2-1))+2),easeInCirc:e=>e>=1?e:-(Math.sqrt(1-e*e)-1),easeOutCirc:e=>Math.sqrt(1-(e-=1)*e),easeInOutCirc:e=>(e/=.5)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1),easeInElastic:e=>Zm(e)?e:uE(e,.075,.3),easeOutElastic:e=>Zm(e)?e:fE(e,.075,.3),easeInOutElastic(e){return Zm(e)?e:e<.5?.5*uE(e*2,.1125,.45):.5+.5*fE(e*2-1,.1125,.45)},easeInBack(e){return e*e*((1.70158+1)*e-1.70158)},easeOutBack(e){return(e-=1)*e*((1.70158+1)*e+1.70158)+1},easeInOutBack(e){let t=1.70158;return(e/=.5)<1?.5*(e*e*(((t*=1.525)+1)*e-t)):.5*((e-=2)*e*(((t*=1.525)+1)*e+t)+2)},easeInBounce:e=>1-Vu.easeOutBounce(1-e),easeOutBounce(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},easeInOutBounce:e=>e<.5?Vu.easeInBounce(e*2)*.5:Vu.easeOutBounce(e*2-1)*.5+.5};function _y(e){if(e&&typeof e=="object"){const t=e.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function hE(e){return _y(e)?e:new Ku(e)}function xy(e){return _y(e)?e:new Ku(e).saturate(.5).darken(.1).hexString()}const Z8=["x","y","borderWidth","radius","tension"],X8=["color","borderColor","backgroundColor"];function J8(e){e.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),e.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>t!=="onProgress"&&t!=="onComplete"&&t!=="fn"}),e.set("animations",{colors:{type:"color",properties:X8},numbers:{type:"number",properties:Z8}}),e.describe("animations",{_fallback:"animation"}),e.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>t|0}}}})}function Q8(e){e.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const mE=new Map;function V8(e,t){t=t||{};const n=e+JSON.stringify(t);let o=mE.get(n);return o||(o=new Intl.NumberFormat(e,t),mE.set(n,o)),o}function Ey(e,t,n){return V8(t,n).format(e)}const e7={values(e){return xo(e)?e:""+e},numeric(e,t,n){if(e===0)return"0";const o=this.chart.options.locale;let i,s=e;if(n.length>1){const d=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(d<1e-4||d>1e15)&&(i="scientific"),s=t7(e,n)}const a=nE(Math.abs(s)),l=isNaN(a)?1:Math.max(Math.min(-1*Math.floor(a),20),0),c={notation:i,minimumFractionDigits:l,maximumFractionDigits:l};return Object.assign(c,this.options.ticks.format),Ey(e,o,c)}};function t7(e,t){let n=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;return Math.abs(n)>=1&&e!==Math.floor(e)&&(n=e-Math.floor(e)),n}var pE={formatters:e7};function n7(e){e.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,n)=>n.lineWidth,tickColor:(t,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:pE.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),e.route("scale.ticks","color","","color"),e.route("scale.grid","color","","borderColor"),e.route("scale.border","color","","borderColor"),e.route("scale.title","color","","color"),e.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&t!=="callback"&&t!=="parser",_indexable:t=>t!=="borderDash"&&t!=="tickBorderDash"&&t!=="dash"}),e.describe("scales",{_fallback:"scale"}),e.describe("scale.ticks",{_scriptable:t=>t!=="backdropPadding"&&t!=="callback",_indexable:t=>t!=="backdropPadding"})}const Kl=Object.create(null),Cy=Object.create(null);function ef(e,t){if(!t)return e;const n=t.split(".");for(let o=0,i=n.length;o<i;++o){const s=n[o];e=e[s]||(e[s]=Object.create(null))}return e}function Sy(e,t,n){return typeof t=="string"?Gu(ef(e,t),n):Gu(ef(e,""),t)}class o7{constructor(t,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=o=>o.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=(o,i)=>xy(i.backgroundColor),this.hoverBorderColor=(o,i)=>xy(i.borderColor),this.hoverColor=(o,i)=>xy(i.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t),this.apply(n)}set(t,n){return Sy(this,t,n)}get(t){return ef(this,t)}describe(t,n){return Sy(Cy,t,n)}override(t,n){return Sy(Kl,t,n)}route(t,n,o,i){const s=ef(this,t),a=ef(this,o),l="_"+n;Object.defineProperties(s,{[l]:{value:s[n],writable:!0},[n]:{enumerable:!0,get(){const c=this[l],d=a[i];return an(c)?Object.assign({},d,c):Zt(c,d)},set(c){this[l]=c}}})}apply(t){t.forEach(n=>n(this))}}var fo=new o7({_scriptable:e=>!e.startsWith("on"),_indexable:e=>e!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[J8,Q8,n7]);function r7(e){return!e||xn(e.size)||xn(e.family)?null:(e.style?e.style+" ":"")+(e.weight?e.weight+" ":"")+e.size+"px "+e.family}function gE(e,t,n,o,i){let s=t[i];return s||(s=t[i]=e.measureText(i).width,n.push(i)),s>o&&(o=s),o}function Gl(e,t,n){const o=e.currentDevicePixelRatio,i=n!==0?Math.max(n/2,.5):0;return Math.round((t-i)*o)/o+i}function bE(e,t){!t&&!e||(t=t||e.getContext("2d"),t.save(),t.resetTransform(),t.clearRect(0,0,e.width,e.height),t.restore())}function Ay(e,t,n,o){yE(e,t,n,o,null)}function yE(e,t,n,o,i){let s,a,l,c,d,f,h,p;const g=t.pointStyle,y=t.rotation,b=t.radius;let _=(y||0)*R8;if(g&&typeof g=="object"&&(s=g.toString(),s==="[object HTMLImageElement]"||s==="[object HTMLCanvasElement]")){e.save(),e.translate(n,o),e.rotate(_),e.drawImage(g,-g.width/2,-g.height/2,g.width,g.height),e.restore();return}if(!(isNaN(b)||b<=0)){switch(e.beginPath(),g){default:i?e.ellipse(n,o,i/2,b,0,0,Vn):e.arc(n,o,b,0,Vn),e.closePath();break;case"triangle":f=i?i/2:b,e.moveTo(n+Math.sin(_)*f,o-Math.cos(_)*b),_+=tE,e.lineTo(n+Math.sin(_)*f,o-Math.cos(_)*b),_+=tE,e.lineTo(n+Math.sin(_)*f,o-Math.cos(_)*b),e.closePath();break;case"rectRounded":d=b*.516,c=b-d,a=Math.cos(_+Hl)*c,h=Math.cos(_+Hl)*(i?i/2-d:c),l=Math.sin(_+Hl)*c,p=Math.sin(_+Hl)*(i?i/2-d:c),e.arc(n-h,o-l,d,_-Tn,_-Do),e.arc(n+p,o-a,d,_-Do,_),e.arc(n+h,o+l,d,_,_+Do),e.arc(n-p,o+a,d,_+Do,_+Tn),e.closePath();break;case"rect":if(!y){c=Math.SQRT1_2*b,f=i?i/2:c,e.rect(n-f,o-c,2*f,2*c);break}_+=Hl;case"rectRot":h=Math.cos(_)*(i?i/2:b),a=Math.cos(_)*b,l=Math.sin(_)*b,p=Math.sin(_)*(i?i/2:b),e.moveTo(n-h,o-l),e.lineTo(n+p,o-a),e.lineTo(n+h,o+l),e.lineTo(n-p,o+a),e.closePath();break;case"crossRot":_+=Hl;case"cross":h=Math.cos(_)*(i?i/2:b),a=Math.cos(_)*b,l=Math.sin(_)*b,p=Math.sin(_)*(i?i/2:b),e.moveTo(n-h,o-l),e.lineTo(n+h,o+l),e.moveTo(n+p,o-a),e.lineTo(n-p,o+a);break;case"star":h=Math.cos(_)*(i?i/2:b),a=Math.cos(_)*b,l=Math.sin(_)*b,p=Math.sin(_)*(i?i/2:b),e.moveTo(n-h,o-l),e.lineTo(n+h,o+l),e.moveTo(n+p,o-a),e.lineTo(n-p,o+a),_+=Hl,h=Math.cos(_)*(i?i/2:b),a=Math.cos(_)*b,l=Math.sin(_)*b,p=Math.sin(_)*(i?i/2:b),e.moveTo(n-h,o-l),e.lineTo(n+h,o+l),e.moveTo(n+p,o-a),e.lineTo(n-p,o+a);break;case"line":a=i?i/2:Math.cos(_)*b,l=Math.sin(_)*b,e.moveTo(n-a,o-l),e.lineTo(n+a,o+l);break;case"dash":e.moveTo(n,o),e.lineTo(n+Math.cos(_)*(i?i/2:b),o+Math.sin(_)*b);break;case!1:e.closePath();break}e.fill(),t.borderWidth>0&&e.stroke()}}function tf(e,t,n){return n=n||.5,!t||e&&e.x>t.left-n&&e.x<t.right+n&&e.y>t.top-n&&e.y<t.bottom+n}function Xm(e,t){e.save(),e.beginPath(),e.rect(t.left,t.top,t.right-t.left,t.bottom-t.top),e.clip()}function Jm(e){e.restore()}function i7(e,t,n,o,i){if(!t)return e.lineTo(n.x,n.y);if(i==="middle"){const s=(t.x+n.x)/2;e.lineTo(s,t.y),e.lineTo(s,n.y)}else i==="after"!=!!o?e.lineTo(t.x,n.y):e.lineTo(n.x,t.y);e.lineTo(n.x,n.y)}function s7(e,t,n,o){if(!t)return e.lineTo(n.x,n.y);e.bezierCurveTo(o?t.cp1x:t.cp2x,o?t.cp1y:t.cp2y,o?n.cp2x:n.cp1x,o?n.cp2y:n.cp1y,n.x,n.y)}function a7(e,t){t.translation&&e.translate(t.translation[0],t.translation[1]),xn(t.rotation)||e.rotate(t.rotation),t.color&&(e.fillStyle=t.color),t.textAlign&&(e.textAlign=t.textAlign),t.textBaseline&&(e.textBaseline=t.textBaseline)}function l7(e,t,n,o,i){if(i.strikethrough||i.underline){const s=e.measureText(o),a=t-s.actualBoundingBoxLeft,l=t+s.actualBoundingBoxRight,c=n-s.actualBoundingBoxAscent,d=n+s.actualBoundingBoxDescent,f=i.strikethrough?(c+d)/2:d;e.strokeStyle=e.fillStyle,e.beginPath(),e.lineWidth=i.decorationWidth||2,e.moveTo(a,f),e.lineTo(l,f),e.stroke()}}function c7(e,t){const n=e.fillStyle;e.fillStyle=t.color,e.fillRect(t.left,t.top,t.width,t.height),e.fillStyle=n}function nf(e,t,n,o,i,s={}){const a=xo(t)?t:[t],l=s.strokeWidth>0&&s.strokeColor!=="";let c,d;for(e.save(),e.font=i.string,a7(e,s),c=0;c<a.length;++c)d=a[c],s.backdrop&&c7(e,s.backdrop),l&&(s.strokeColor&&(e.strokeStyle=s.strokeColor),xn(s.strokeWidth)||(e.lineWidth=s.strokeWidth),e.strokeText(d,n,o,s.maxWidth)),e.fillText(d,n,o,s.maxWidth),l7(e,n,o,d,s),o+=Number(i.lineHeight);e.restore()}function Qm(e,t){const{x:n,y:o,w:i,h:s,radius:a}=t;e.arc(n+a.topLeft,o+a.topLeft,a.topLeft,1.5*Tn,Tn,!0),e.lineTo(n,o+s-a.bottomLeft),e.arc(n+a.bottomLeft,o+s-a.bottomLeft,a.bottomLeft,Tn,Do,!0),e.lineTo(n+i-a.bottomRight,o+s),e.arc(n+i-a.bottomRight,o+s-a.bottomRight,a.bottomRight,Do,0,!0),e.lineTo(n+i,o+a.topRight),e.arc(n+i-a.topRight,o+a.topRight,a.topRight,0,-Do,!0),e.lineTo(n+a.topLeft,o)}const d7=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,u7=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function f7(e,t){const n=(""+e).match(d7);if(!n||n[1]==="normal")return t*1.2;switch(e=+n[2],n[3]){case"px":return e;case"%":e/=100;break}return t*e}const h7=e=>+e||0;function Ty(e,t){const n={},o=an(t),i=o?Object.keys(t):t,s=an(e)?o?a=>Zt(e[a],e[t[a]]):a=>e[a]:()=>e;for(const a of i)n[a]=h7(s(a));return n}function vE(e){return Ty(e,{top:"y",right:"x",bottom:"y",left:"x"})}function cd(e){return Ty(e,["topLeft","topRight","bottomLeft","bottomRight"])}function ni(e){const t=vE(e);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function Qo(e,t){e=e||{},t=t||fo.font;let n=Zt(e.size,t.size);typeof n=="string"&&(n=parseInt(n,10));let o=Zt(e.style,t.style);o&&!(""+o).match(u7)&&(console.warn('Invalid font style specified: "'+o+'"'),o=void 0);const i={family:Zt(e.family,t.family),lineHeight:f7(Zt(e.lineHeight,t.lineHeight),n),size:n,style:o,weight:Zt(e.weight,t.weight),string:""};return i.string=r7(i),i}function Vm(e,t,n,o){let i,s,a;for(i=0,s=e.length;i<s;++i)if(a=e[i],a!==void 0&&a!==void 0)return a}function m7(e,t,n){const{min:o,max:i}=e,s=Jx(t,(i-o)/2),a=(l,c)=>n&&l===0?0:l+c;return{min:a(o,-Math.abs(s)),max:a(i,s)}}function Yl(e,t){return Object.assign(Object.create(e),t)}function By(e,t=[""],n,o,i=()=>e[0]){const s=n||e;typeof o>"u"&&(o=EE("_fallback",e));const a={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:e,_rootScopes:s,_fallback:o,_getTarget:i,override:l=>By([l,...e],t,s,o)};return new Proxy(a,{deleteProperty(l,c){return delete l[c],delete l._keys,delete e[0][c],!0},get(l,c){return kE(l,c,()=>_7(c,t,e,l))},getOwnPropertyDescriptor(l,c){return Reflect.getOwnPropertyDescriptor(l._scopes[0],c)},getPrototypeOf(){return Reflect.getPrototypeOf(e[0])},has(l,c){return CE(l).includes(c)},ownKeys(l){return CE(l)},set(l,c,d){const f=l._storage||(l._storage=i());return l[c]=f[c]=d,delete l._keys,!0}})}function dd(e,t,n,o){const i={_cacheable:!1,_proxy:e,_context:t,_subProxy:n,_stack:new Set,_descriptors:wE(e,o),setContext:s=>dd(e,s,n,o),override:s=>dd(e.override(s),t,n,o)};return new Proxy(i,{deleteProperty(s,a){return delete s[a],delete e[a],!0},get(s,a,l){return kE(s,a,()=>g7(s,a,l))},getOwnPropertyDescriptor(s,a){return s._descriptors.allKeys?Reflect.has(e,a)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(e,a)},getPrototypeOf(){return Reflect.getPrototypeOf(e)},has(s,a){return Reflect.has(e,a)},ownKeys(){return Reflect.ownKeys(e)},set(s,a,l){return e[a]=l,delete s[a],!0}})}function wE(e,t={scriptable:!0,indexable:!0}){const{_scriptable:n=t.scriptable,_indexable:o=t.indexable,_allKeys:i=t.allKeys}=e;return{allKeys:i,scriptable:n,indexable:o,isScriptable:Ua(n)?n:()=>n,isIndexable:Ua(o)?o:()=>o}}const p7=(e,t)=>e?e+yy(t):t,Py=(e,t)=>an(t)&&e!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function kE(e,t,n){if(Object.prototype.hasOwnProperty.call(e,t)||t==="constructor")return e[t];const o=n();return e[t]=o,o}function g7(e,t,n){const{_proxy:o,_context:i,_subProxy:s,_descriptors:a}=e;let l=o[t];return Ua(l)&&a.isScriptable(t)&&(l=b7(t,l,e,n)),xo(l)&&l.length&&(l=y7(t,l,e,a.isIndexable)),Py(t,l)&&(l=dd(l,i,s&&s[t],a)),l}function b7(e,t,n,o){const{_proxy:i,_context:s,_subProxy:a,_stack:l}=n;if(l.has(e))throw new Error("Recursion detected: "+Array.from(l).join("->")+"->"+e);l.add(e);let c=t(s,a||o);return l.delete(e),Py(e,c)&&(c=Ny(i._scopes,i,e,c)),c}function y7(e,t,n,o){const{_proxy:i,_context:s,_subProxy:a,_descriptors:l}=n;if(typeof s.index<"u"&&o(e))return t[s.index%t.length];if(an(t[0])){const c=t,d=i._scopes.filter(f=>f!==c);t=[];for(const f of c){const h=Ny(d,i,e,f);t.push(dd(h,s,a&&a[e],l))}}return t}function _E(e,t,n){return Ua(e)?e(t,n):e}const v7=(e,t)=>e===!0?t:typeof e=="string"?Wl(t,e):void 0;function w7(e,t,n,o,i){for(const s of t){const a=v7(n,s);if(a){e.add(a);const l=_E(a._fallback,n,i);if(typeof l<"u"&&l!==n&&l!==o)return l}else if(a===!1&&typeof o<"u"&&n!==o)return null}return!1}function Ny(e,t,n,o){const i=t._rootScopes,s=_E(t._fallback,n,o),a=[...e,...i],l=new Set;l.add(o);let c=xE(l,a,n,s||n,o);return c===null||typeof s<"u"&&s!==n&&(c=xE(l,a,s,c,o),c===null)?!1:By(Array.from(l),[""],i,s,()=>k7(t,n,o))}function xE(e,t,n,o,i){for(;n;)n=w7(e,t,n,o,i);return n}function k7(e,t,n){const o=e._getTarget();t in o||(o[t]={});const i=o[t];return xo(i)&&an(n)?n:i||{}}function _7(e,t,n,o){let i;for(const s of t)if(i=EE(p7(s,e),n),typeof i<"u")return Py(e,i)?Ny(n,o,e,i):i}function EE(e,t){for(const n of t){if(!n)continue;const o=n[e];if(typeof o<"u")return o}}function CE(e){let t=e._keys;return t||(t=e._keys=x7(e._scopes)),t}function x7(e){const t=new Set;for(const n of e)for(const o of Object.keys(n).filter(i=>!i.startsWith("_")))t.add(o);return Array.from(t)}const E7=Number.EPSILON||1e-14,ud=(e,t)=>t<e.length&&!e[t].skip&&e[t],SE=e=>e==="x"?"y":"x";function C7(e,t,n,o){const i=e.skip?t:e,s=t,a=n.skip?t:n,l=vy(s,i),c=vy(a,s);let d=l/(l+c),f=c/(l+c);d=isNaN(d)?0:d,f=isNaN(f)?0:f;const h=o*d,p=o*f;return{previous:{x:s.x-h*(a.x-i.x),y:s.y-h*(a.y-i.y)},next:{x:s.x+p*(a.x-i.x),y:s.y+p*(a.y-i.y)}}}function S7(e,t,n){const o=e.length;let i,s,a,l,c,d=ud(e,0);for(let f=0;f<o-1;++f)if(c=d,d=ud(e,f+1),!(!c||!d)){if(Xu(t[f],0,E7)){n[f]=n[f+1]=0;continue}i=n[f]/t[f],s=n[f+1]/t[f],l=Math.pow(i,2)+Math.pow(s,2),!(l<=9)&&(a=3/Math.sqrt(l),n[f]=i*a*t[f],n[f+1]=s*a*t[f])}}function A7(e,t,n="x"){const o=SE(n),i=e.length;let s,a,l,c=ud(e,0);for(let d=0;d<i;++d){if(a=l,l=c,c=ud(e,d+1),!l)continue;const f=l[n],h=l[o];a&&(s=(f-a[n])/3,l[`cp1${n}`]=f-s,l[`cp1${o}`]=h-s*t[d]),c&&(s=(c[n]-f)/3,l[`cp2${n}`]=f+s,l[`cp2${o}`]=h+s*t[d])}}function T7(e,t="x"){const n=SE(t),o=e.length,i=Array(o).fill(0),s=Array(o);let a,l,c,d=ud(e,0);for(a=0;a<o;++a)if(l=c,c=d,d=ud(e,a+1),!!c){if(d){const f=d[t]-c[t];i[a]=f!==0?(d[n]-c[n])/f:0}s[a]=l?d?as(i[a-1])!==as(i[a])?0:(i[a-1]+i[a])/2:i[a-1]:i[a]}S7(e,i,s),A7(e,s,t)}function ep(e,t,n){return Math.max(Math.min(e,n),t)}function B7(e,t){let n,o,i,s,a,l=tf(e[0],t);for(n=0,o=e.length;n<o;++n)a=s,s=l,l=n<o-1&&tf(e[n+1],t),s&&(i=e[n],a&&(i.cp1x=ep(i.cp1x,t.left,t.right),i.cp1y=ep(i.cp1y,t.top,t.bottom)),l&&(i.cp2x=ep(i.cp2x,t.left,t.right),i.cp2y=ep(i.cp2y,t.top,t.bottom)))}function P7(e,t,n,o,i){let s,a,l,c;if(t.spanGaps&&(e=e.filter(d=>!d.skip)),t.cubicInterpolationMode==="monotone")T7(e,i);else{let d=o?e[e.length-1]:e[0];for(s=0,a=e.length;s<a;++s)l=e[s],c=C7(d,l,e[Math.min(s+1,a-(o?0:1))%a],t.tension),l.cp1x=c.previous.x,l.cp1y=c.previous.y,l.cp2x=c.next.x,l.cp2y=c.next.y,d=l}t.capBezierPoints&&B7(e,n)}function Dy(){return typeof window<"u"&&typeof document<"u"}function My(e){let t=e.parentNode;return t&&t.toString()==="[object ShadowRoot]"&&(t=t.host),t}function tp(e,t,n){let o;return typeof e=="string"?(o=parseInt(e,10),e.indexOf("%")!==-1&&(o=o/100*t.parentNode[n])):o=e,o}const np=e=>e.ownerDocument.defaultView.getComputedStyle(e,null);function N7(e,t){return np(e).getPropertyValue(t)}const D7=["top","right","bottom","left"];function Zl(e,t,n){const o={};n=n?"-"+n:"";for(let i=0;i<4;i++){const s=D7[i];o[s]=parseFloat(e[t+"-"+s+n])||0}return o.width=o.left+o.right,o.height=o.top+o.bottom,o}const M7=(e,t,n)=>(e>0||t>0)&&(!n||!n.shadowRoot);function R7(e,t){const n=e.touches,o=n&&n.length?n[0]:e,{offsetX:i,offsetY:s}=o;let a=!1,l,c;if(M7(i,s,e.target))l=i,c=s;else{const d=t.getBoundingClientRect();l=o.clientX-d.left,c=o.clientY-d.top,a=!0}return{x:l,y:c,box:a}}function Xl(e,t){if("native"in e)return e;const{canvas:n,currentDevicePixelRatio:o}=t,i=np(n),s=i.boxSizing==="border-box",a=Zl(i,"padding"),l=Zl(i,"border","width"),{x:c,y:d,box:f}=R7(e,n),h=a.left+(f&&l.left),p=a.top+(f&&l.top);let{width:g,height:y}=t;return s&&(g-=a.width+l.width,y-=a.height+l.height),{x:Math.round((c-h)/g*n.width/o),y:Math.round((d-p)/y*n.height/o)}}function I7(e,t,n){let o,i;if(t===void 0||n===void 0){const s=e&&My(e);if(!s)t=e.clientWidth,n=e.clientHeight;else{const a=s.getBoundingClientRect(),l=np(s),c=Zl(l,"border","width"),d=Zl(l,"padding");t=a.width-d.width-c.width,n=a.height-d.height-c.height,o=tp(l.maxWidth,s,"clientWidth"),i=tp(l.maxHeight,s,"clientHeight")}}return{width:t,height:n,maxWidth:o||Ym,maxHeight:i||Ym}}const Wa=e=>Math.round(e*10)/10;function O7(e,t,n,o){const i=np(e),s=Zl(i,"margin"),a=tp(i.maxWidth,e,"clientWidth")||Ym,l=tp(i.maxHeight,e,"clientHeight")||Ym,c=I7(e,t,n);let{width:d,height:f}=c;if(i.boxSizing==="content-box"){const p=Zl(i,"border","width"),g=Zl(i,"padding");d-=g.width+p.width,f-=g.height+p.height}return d=Math.max(0,d-s.width),f=Math.max(0,o?d/o:f-s.height),d=Wa(Math.min(d,a,c.maxWidth)),f=Wa(Math.min(f,l,c.maxHeight)),d&&!f&&(f=Wa(d/2)),(t!==void 0||n!==void 0)&&o&&c.height&&f>c.height&&(f=c.height,d=Wa(Math.floor(f*o))),{width:d,height:f}}function AE(e,t,n){const o=t||1,i=Wa(e.height*o),s=Wa(e.width*o);e.height=Wa(e.height),e.width=Wa(e.width);const a=e.canvas;return a.style&&(n||!a.style.height&&!a.style.width)&&(a.style.height=`${e.height}px`,a.style.width=`${e.width}px`),e.currentDevicePixelRatio!==o||a.height!==i||a.width!==s?(e.currentDevicePixelRatio=o,a.height=i,a.width=s,e.ctx.setTransform(o,0,0,o,0,0),!0):!1}const L7=(function(){let e=!1;try{const t={get passive(){return e=!0,!1}};Dy()&&(window.addEventListener("test",null,t),window.removeEventListener("test",null,t))}catch{}return e})();function TE(e,t){const n=N7(e,t),o=n&&n.match(/^(\d+)(\.\d+)?px$/);return o?+o[1]:void 0}function Jl(e,t,n,o){return{x:e.x+n*(t.x-e.x),y:e.y+n*(t.y-e.y)}}function F7(e,t,n,o){return{x:e.x+n*(t.x-e.x),y:o==="middle"?n<.5?e.y:t.y:o==="after"?n<1?e.y:t.y:n>0?t.y:e.y}}function $7(e,t,n,o){const i={x:e.cp2x,y:e.cp2y},s={x:t.cp1x,y:t.cp1y},a=Jl(e,i,n),l=Jl(i,s,n),c=Jl(s,t,n),d=Jl(a,l,n),f=Jl(l,c,n);return Jl(d,f,n)}const z7=function(e,t){return{x(n){return e+e+t-n},setWidth(n){t=n},textAlign(n){return n==="center"?n:n==="right"?"left":"right"},xPlus(n,o){return n-o},leftForLtr(n,o){return n-o}}},j7=function(){return{x(e){return e},setWidth(e){},textAlign(e){return e},xPlus(e,t){return e+t},leftForLtr(e,t){return e}}};function fd(e,t,n){return e?z7(t,n):j7()}function BE(e,t){let n,o;(t==="ltr"||t==="rtl")&&(n=e.canvas.style,o=[n.getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",t,"important"),e.prevTextDirection=o)}function PE(e,t){t!==void 0&&(delete e.prevTextDirection,e.canvas.style.setProperty("direction",t[0],t[1]))}function NE(e){return e==="angle"?{between:Qu,compare:z8,normalize:Fr}:{between:Js,compare:(t,n)=>t-n,normalize:t=>t}}function DE({start:e,end:t,count:n,loop:o,style:i}){return{start:e%n,end:t%n,loop:o&&(t-e+1)%n===0,style:i}}function U7(e,t,n){const{property:o,start:i,end:s}=n,{between:a,normalize:l}=NE(o),c=t.length;let{start:d,end:f,loop:h}=e,p,g;if(h){for(d+=c,f+=c,p=0,g=c;p<g&&a(l(t[d%c][o]),i,s);++p)d--,f--;d%=c,f%=c}return f<d&&(f+=c),{start:d,end:f,loop:h,style:e.style}}function ME(e,t,n){if(!n)return[e];const{property:o,start:i,end:s}=n,a=t.length,{compare:l,between:c,normalize:d}=NE(o),{start:f,end:h,loop:p,style:g}=U7(e,t,n),y=[];let b=!1,_=null,x,B,R;const S=()=>c(i,R,x)&&l(i,R)!==0,O=()=>l(s,x)===0||c(s,R,x),I=()=>b||S(),D=()=>!b||O();for(let w=f,E=f;w<=h;++w)B=t[w%a],!B.skip&&(x=d(B[o]),x!==R&&(b=c(x,i,s),_===null&&I()&&(_=l(x,i)===0?w:E),_!==null&&D()&&(y.push(DE({start:_,end:w,loop:p,count:a,style:g})),_=null),E=w,R=x));return _!==null&&y.push(DE({start:_,end:h,loop:p,count:a,style:g})),y}function RE(e,t){const n=[],o=e.segments;for(let i=0;i<o.length;i++){const s=ME(o[i],e.points,t);s.length&&n.push(...s)}return n}function W7(e,t,n,o){let i=0,s=t-1;if(n&&!o)for(;i<t&&!e[i].skip;)i++;for(;i<t&&e[i].skip;)i++;for(i%=t,n&&(s+=i);s>i&&e[s%t].skip;)s--;return s%=t,{start:i,end:s}}function H7(e,t,n,o){const i=e.length,s=[];let a=t,l=e[t],c;for(c=t+1;c<=n;++c){const d=e[c%i];d.skip||d.stop?l.skip||(o=!1,s.push({start:t%i,end:(c-1)%i,loop:o}),t=a=d.stop?c:null):(a=c,l.skip&&(t=c)),l=d}return a!==null&&s.push({start:t%i,end:a%i,loop:o}),s}function q7(e,t){const n=e.points,o=e.options.spanGaps,i=n.length;if(!i)return[];const s=!!e._loop,{start:a,end:l}=W7(n,i,s,o);if(o===!0)return IE(e,[{start:a,end:l,loop:s}],n,t);const c=l<a?l+i:l,d=!!e._fullLoop&&a===0&&l===i-1;return IE(e,H7(n,a,c,d),n,t)}function IE(e,t,n,o){return!o||!o.setContext||!n?t:K7(e,t,n,o)}function K7(e,t,n,o){const i=e._chart.getContext(),s=OE(e.options),{_datasetIndex:a,options:{spanGaps:l}}=e,c=n.length,d=[];let f=s,h=t[0].start,p=h;function g(y,b,_,x){const B=l?-1:1;if(y!==b){for(y+=c;n[y%c].skip;)y-=B;for(;n[b%c].skip;)b+=B;y%c!==b%c&&(d.push({start:y%c,end:b%c,loop:_,style:x}),f=x,h=b%c)}}for(const y of t){h=l?h:y.start;let b=n[h%c],_;for(p=h+1;p<=y.end;p++){const x=n[p%c];_=OE(o.setContext(Yl(i,{type:"segment",p0:b,p1:x,p0DataIndex:(p-1)%c,p1DataIndex:p%c,datasetIndex:a}))),G7(_,f)&&g(h,p-1,y.loop,f),b=x,f=_}h<p-1&&g(h,p-1,y.loop,f)}return d}function OE(e){return{backgroundColor:e.backgroundColor,borderCapStyle:e.borderCapStyle,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderJoinStyle:e.borderJoinStyle,borderWidth:e.borderWidth,borderColor:e.borderColor}}function G7(e,t){if(!t)return!1;const n=[],o=function(i,s){return _y(s)?(n.includes(s)||n.push(s),n.indexOf(s)):s};return JSON.stringify(e,o)!==JSON.stringify(t,o)}function op(e,t,n){return e.options.clip?e[n]:t[n]}function Y7(e,t){const{xScale:n,yScale:o}=e;return n&&o?{left:op(n,t,"left"),right:op(n,t,"right"),top:op(o,t,"top"),bottom:op(o,t,"bottom")}:t}function LE(e,t){const n=t._clip;if(n.disabled)return!1;const o=Y7(t,e.chartArea);return{left:n.left===!1?0:o.left-(n.left===!0?0:n.left),right:n.right===!1?e.width:o.right+(n.right===!0?0:n.right),top:n.top===!1?0:o.top-(n.top===!0?0:n.top),bottom:n.bottom===!1?e.height:o.bottom+(n.bottom===!0?0:n.bottom)}}class Z7{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,n,o,i){const s=n.listeners[i],a=n.duration;s.forEach(l=>l({chart:t,initial:n.initial,numSteps:a,currentStep:Math.min(o-n.start,a)}))}_refresh(){this._request||(this._running=!0,this._request=cE.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let n=0;this._charts.forEach((o,i)=>{if(!o.running||!o.items.length)return;const s=o.items;let a=s.length-1,l=!1,c;for(;a>=0;--a)c=s[a],c._active?(c._total>o.duration&&(o.duration=c._total),c.tick(t),l=!0):(s[a]=s[s.length-1],s.pop());l&&(i.draw(),this._notify(i,o,t,"progress")),s.length||(o.running=!1,this._notify(i,o,t,"complete"),o.initial=!1),n+=s.length}),this._lastDate=t,n===0&&(this._running=!1)}_getAnims(t){const n=this._charts;let o=n.get(t);return o||(o={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},n.set(t,o)),o}listen(t,n,o){this._getAnims(t).listeners[n].push(o)}add(t,n){!n||!n.length||this._getAnims(t).items.push(...n)}has(t){return this._getAnims(t).items.length>0}start(t){const n=this._charts.get(t);n&&(n.running=!0,n.start=Date.now(),n.duration=n.items.reduce((o,i)=>Math.max(o,i._duration),0),this._refresh())}running(t){if(!this._running)return!1;const n=this._charts.get(t);return!(!n||!n.running||!n.items.length)}stop(t){const n=this._charts.get(t);if(!n||!n.items.length)return;const o=n.items;let i=o.length-1;for(;i>=0;--i)o[i].cancel();n.items=[],this._notify(t,n,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var Qs=new Z7;const FE="transparent",X7={boolean(e,t,n){return n>.5?t:e},color(e,t,n){const o=hE(e||FE),i=o.valid&&hE(t||FE);return i&&i.valid?i.mix(o,n).hexString():t},number(e,t,n){return e+(t-e)*n}};let J7=class{constructor(t,n,o,i){const s=n[o];i=Vm([t.to,i,s,t.from]);const a=Vm([t.from,s,i]);this._active=!0,this._fn=t.fn||X7[t.type||typeof a],this._easing=Vu[t.easing]||Vu.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=n,this._prop=o,this._from=a,this._to=i,this._promises=void 0}active(){return this._active}update(t,n,o){if(this._active){this._notify(!1);const i=this._target[this._prop],s=o-this._start,a=this._duration-s;this._start=o,this._duration=Math.floor(Math.max(a,t.duration)),this._total+=s,this._loop=!!t.loop,this._to=Vm([t.to,n,i,t.from]),this._from=Vm([t.from,i,n])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const n=t-this._start,o=this._duration,i=this._prop,s=this._from,a=this._loop,l=this._to;let c;if(this._active=s!==l&&(a||n<o),!this._active){this._target[i]=l,this._notify(!0);return}if(n<0){this._target[i]=s;return}c=n/o%2,c=a&&c>1?2-c:c,c=this._easing(Math.min(1,Math.max(0,c))),this._target[i]=this._fn(s,l,c)}wait(){const t=this._promises||(this._promises=[]);return new Promise((n,o)=>{t.push({res:n,rej:o})})}_notify(t){const n=t?"res":"rej",o=this._promises||[];for(let i=0;i<o.length;i++)o[i][n]()}};class $E{constructor(t,n){this._chart=t,this._properties=new Map,this.configure(n)}configure(t){if(!an(t))return;const n=Object.keys(fo.animation),o=this._properties;Object.getOwnPropertyNames(t).forEach(i=>{const s=t[i];if(!an(s))return;const a={};for(const l of n)a[l]=s[l];(xo(s.properties)&&s.properties||[i]).forEach(l=>{(l===i||!o.has(l))&&o.set(l,a)})})}_animateOptions(t,n){const o=n.options,i=V7(t,o);if(!i)return[];const s=this._createAnimations(i,o);return o.$shared&&Q7(t.options.$animations,o).then(()=>{t.options=o},()=>{}),s}_createAnimations(t,n){const o=this._properties,i=[],s=t.$animations||(t.$animations={}),a=Object.keys(n),l=Date.now();let c;for(c=a.length-1;c>=0;--c){const d=a[c];if(d.charAt(0)==="$")continue;if(d==="options"){i.push(...this._animateOptions(t,n));continue}const f=n[d];let h=s[d];const p=o.get(d);if(h)if(p&&h.active()){h.update(p,f,l);continue}else h.cancel();if(!p||!p.duration){t[d]=f;continue}s[d]=h=new J7(p,t,d,f),i.push(h)}return i}update(t,n){if(this._properties.size===0){Object.assign(t,n);return}const o=this._createAnimations(t,n);if(o.length)return Qs.add(this._chart,o),!0}}function Q7(e,t){const n=[],o=Object.keys(t);for(let i=0;i<o.length;i++){const s=e[o[i]];s&&s.active()&&n.push(s.wait())}return Promise.all(n)}function V7(e,t){if(!t)return;let n=e.options;if(!n){e.options=t;return}return n.$shared&&(e.options=n=Object.assign({},n,{$shared:!1,$animations:{}})),n}function zE(e,t){const n=e&&e.options||{},o=n.reverse,i=n.min===void 0?t:0,s=n.max===void 0?t:0;return{start:o?s:i,end:o?i:s}}function e$(e,t,n){if(n===!1)return!1;const o=zE(e,n),i=zE(t,n);return{top:i.end,right:o.end,bottom:i.start,left:o.start}}function t$(e){let t,n,o,i;return an(e)?(t=e.top,n=e.right,o=e.bottom,i=e.left):t=n=o=i=e,{top:t,right:n,bottom:o,left:i,disabled:e===!1}}function jE(e,t){const n=[],o=e._getSortedDatasetMetas(t);let i,s;for(i=0,s=o.length;i<s;++i)n.push(o[i].index);return n}function UE(e,t,n,o={}){const i=e.keys,s=o.mode==="single";let a,l,c,d;if(t===null)return;let f=!1;for(a=0,l=i.length;a<l;++a){if(c=+i[a],c===n){if(f=!0,o.all)continue;break}d=e.values[c],Zo(d)&&(s||t===0||as(t)===as(d))&&(t+=d)}return!f&&!o.all?0:t}function n$(e,t){const{iScale:n,vScale:o}=t,i=n.axis==="x"?"x":"y",s=o.axis==="x"?"x":"y",a=Object.keys(e),l=new Array(a.length);let c,d,f;for(c=0,d=a.length;c<d;++c)f=a[c],l[c]={[i]:f,[s]:e[f]};return l}function Ry(e,t){const n=e&&e.options.stacked;return n||n===void 0&&t.stack!==void 0}function o$(e,t,n){return`${e.id}.${t.id}.${n.stack||n.type}`}function r$(e){const{min:t,max:n,minDefined:o,maxDefined:i}=e.getUserBounds();return{min:o?t:Number.NEGATIVE_INFINITY,max:i?n:Number.POSITIVE_INFINITY}}function i$(e,t,n){const o=e[t]||(e[t]={});return o[n]||(o[n]={})}function WE(e,t,n,o){for(const i of t.getMatchingVisibleMetas(o).reverse()){const s=e[i.index];if(n&&s>0||!n&&s<0)return i.index}return null}function HE(e,t){const{chart:n,_cachedMeta:o}=e,i=n._stacks||(n._stacks={}),{iScale:s,vScale:a,index:l}=o,c=s.axis,d=a.axis,f=o$(s,a,o),h=t.length;let p;for(let g=0;g<h;++g){const y=t[g],{[c]:b,[d]:_}=y,x=y._stacks||(y._stacks={});p=x[d]=i$(i,f,b),p[l]=_,p._top=WE(p,a,!0,o.type),p._bottom=WE(p,a,!1,o.type);const B=p._visualValues||(p._visualValues={});B[l]=_}}function Iy(e,t){const n=e.scales;return Object.keys(n).filter(o=>n[o].axis===t).shift()}function s$(e,t){return Yl(e,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function a$(e,t,n){return Yl(e,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:n,index:t,mode:"default",type:"data"})}function of(e,t){const n=e.controller.index,o=e.vScale&&e.vScale.axis;if(o){t=t||e._parsed;for(const i of t){const s=i._stacks;if(!s||s[o]===void 0||s[o][n]===void 0)return;delete s[o][n],s[o]._visualValues!==void 0&&s[o]._visualValues[n]!==void 0&&delete s[o]._visualValues[n]}}}const Oy=e=>e==="reset"||e==="none",qE=(e,t)=>t?e:Object.assign({},e),l$=(e,t,n)=>e&&!t.hidden&&t._stacked&&{keys:jE(n,!0),values:null};class rp{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(t,n){this.chart=t,this._ctx=t.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 t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=Ry(t.vScale,t),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(t){this.index!==t&&of(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,n=this._cachedMeta,o=this.getDataset(),i=(h,p,g,y)=>h==="x"?p:h==="r"?y:g,s=n.xAxisID=Zt(o.xAxisID,Iy(t,"x")),a=n.yAxisID=Zt(o.yAxisID,Iy(t,"y")),l=n.rAxisID=Zt(o.rAxisID,Iy(t,"r")),c=n.indexAxis,d=n.iAxisID=i(c,s,a,l),f=n.vAxisID=i(c,a,s,l);n.xScale=this.getScaleForId(s),n.yScale=this.getScaleForId(a),n.rScale=this.getScaleForId(l),n.iScale=this.getScaleForId(d),n.vScale=this.getScaleForId(f)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const n=this._cachedMeta;return t===n.iScale?n.vScale:n.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&aE(this._data,this),t._stacked&&of(t)}_dataCheck(){const t=this.getDataset(),n=t.data||(t.data=[]),o=this._data;if(an(n)){const i=this._cachedMeta;this._data=n$(n,i)}else if(o!==n){if(o){aE(o,this);const i=this._cachedMeta;of(i),i._parsed=[]}n&&Object.isExtensible(n)&&H8(n,this),this._syncList=[],this._data=n}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const n=this._cachedMeta,o=this.getDataset();let i=!1;this._dataCheck();const s=n._stacked;n._stacked=Ry(n.vScale,n),n.stack!==o.stack&&(i=!0,of(n),n.stack=o.stack),this._resyncElements(t),(i||s!==n._stacked)&&(HE(this,n._parsed),n._stacked=Ry(n.vScale,n))}configure(){const t=this.chart.config,n=t.datasetScopeKeys(this._type),o=t.getOptionScopes(this.getDataset(),n,!0);this.options=t.createResolver(o,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,n){const{_cachedMeta:o,_data:i}=this,{iScale:s,_stacked:a}=o,l=s.axis;let c=t===0&&n===i.length?!0:o._sorted,d=t>0&&o._parsed[t-1],f,h,p;if(this._parsing===!1)o._parsed=i,o._sorted=!0,p=i;else{xo(i[t])?p=this.parseArrayData(o,i,t,n):an(i[t])?p=this.parseObjectData(o,i,t,n):p=this.parsePrimitiveData(o,i,t,n);const g=()=>h[l]===null||d&&h[l]<d[l];for(f=0;f<n;++f)o._parsed[f+t]=h=p[f],c&&(g()&&(c=!1),d=h);o._sorted=c}a&&HE(this,p)}parsePrimitiveData(t,n,o,i){const{iScale:s,vScale:a}=t,l=s.axis,c=a.axis,d=s.getLabels(),f=s===a,h=new Array(i);let p,g,y;for(p=0,g=i;p<g;++p)y=p+o,h[p]={[l]:f||s.parse(d[y],y),[c]:a.parse(n[y],y)};return h}parseArrayData(t,n,o,i){const{xScale:s,yScale:a}=t,l=new Array(i);let c,d,f,h;for(c=0,d=i;c<d;++c)f=c+o,h=n[f],l[c]={x:s.parse(h[0],f),y:a.parse(h[1],f)};return l}parseObjectData(t,n,o,i){const{xScale:s,yScale:a}=t,{xAxisKey:l="x",yAxisKey:c="y"}=this._parsing,d=new Array(i);let f,h,p,g;for(f=0,h=i;f<h;++f)p=f+o,g=n[p],d[f]={x:s.parse(Wl(g,l),p),y:a.parse(Wl(g,c),p)};return d}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,n,o){const i=this.chart,s=this._cachedMeta,a=n[t.axis],l={keys:jE(i,!0),values:n._stacks[t.axis]._visualValues};return UE(l,a,s.index,{mode:o})}updateRangeFromParsed(t,n,o,i){const s=o[n.axis];let a=s===null?NaN:s;const l=i&&o._stacks[n.axis];i&&l&&(i.values=l,a=UE(i,s,this._cachedMeta.index)),t.min=Math.min(t.min,a),t.max=Math.max(t.max,a)}getMinMax(t,n){const o=this._cachedMeta,i=o._parsed,s=o._sorted&&t===o.iScale,a=i.length,l=this._getOtherScale(t),c=l$(n,o,this.chart),d={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:f,max:h}=r$(l);let p,g;function y(){g=i[p];const b=g[l.axis];return!Zo(g[t.axis])||f>b||h<b}for(p=0;p<a&&!(!y()&&(this.updateRangeFromParsed(d,t,g,c),s));++p);if(s){for(p=a-1;p>=0;--p)if(!y()){this.updateRangeFromParsed(d,t,g,c);break}}return d}getAllParsedValues(t){const n=this._cachedMeta._parsed,o=[];let i,s,a;for(i=0,s=n.length;i<s;++i)a=n[i][t.axis],Zo(a)&&o.push(a);return o}getMaxOverflow(){return!1}getLabelAndValue(t){const n=this._cachedMeta,o=n.iScale,i=n.vScale,s=this.getParsed(t);return{label:o?""+o.getLabelForValue(s[o.axis]):"",value:i?""+i.getLabelForValue(s[i.axis]):""}}_update(t){const n=this._cachedMeta;this.update(t||"default"),n._clip=t$(Zt(this.options.clip,e$(n.xScale,n.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,n=this.chart,o=this._cachedMeta,i=o.data||[],s=n.chartArea,a=[],l=this._drawStart||0,c=this._drawCount||i.length-l,d=this.options.drawActiveElementsOnTop;let f;for(o.dataset&&o.dataset.draw(t,s,l,c),f=l;f<l+c;++f){const h=i[f];h.hidden||(h.active&&d?a.push(h):h.draw(t,s))}for(f=0;f<a.length;++f)a[f].draw(t,s)}getStyle(t,n){const o=n?"active":"default";return t===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(o):this.resolveDataElementOptions(t||0,o)}getContext(t,n,o){const i=this.getDataset();let s;if(t>=0&&t<this._cachedMeta.data.length){const a=this._cachedMeta.data[t];s=a.$context||(a.$context=a$(this.getContext(),t,a)),s.parsed=this.getParsed(t),s.raw=i.data[t],s.index=s.dataIndex=t}else s=this.$context||(this.$context=s$(this.chart.getContext(),this.index)),s.dataset=i,s.index=s.datasetIndex=this.index;return s.active=!!n,s.mode=o,s}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,n){return this._resolveElementOptions(this.dataElementType.id,n,t)}_resolveElementOptions(t,n="default",o){const i=n==="active",s=this._cachedDataOpts,a=t+"-"+n,l=s[a],c=this.enableOptionSharing&&Zu(o);if(l)return qE(l,c);const d=this.chart.config,f=d.datasetElementScopeKeys(this._type,t),h=i?[`${t}Hover`,"hover",t,""]:[t,""],p=d.getOptionScopes(this.getDataset(),f),g=Object.keys(fo.elements[t]),y=()=>this.getContext(o,i,n),b=d.resolveNamedOptions(p,g,y,h);return b.$shared&&(b.$shared=c,s[a]=Object.freeze(qE(b,c))),b}_resolveAnimations(t,n,o){const i=this.chart,s=this._cachedDataOpts,a=`animation-${n}`,l=s[a];if(l)return l;let c;if(i.options.animation!==!1){const f=this.chart.config,h=f.datasetAnimationScopeKeys(this._type,n),p=f.getOptionScopes(this.getDataset(),h);c=f.createResolver(p,this.getContext(t,o,n))}const d=new $E(i,c&&c.animations);return c&&c._cacheable&&(s[a]=Object.freeze(d)),d}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,n){return!n||Oy(t)||this.chart._animationsDisabled}_getSharedOptions(t,n){const o=this.resolveDataElementOptions(t,n),i=this._sharedOptions,s=this.getSharedOptions(o),a=this.includeOptions(n,s)||s!==i;return this.updateSharedOptions(s,n,o),{sharedOptions:s,includeOptions:a}}updateElement(t,n,o,i){Oy(i)?Object.assign(t,o):this._resolveAnimations(n,i).update(t,o)}updateSharedOptions(t,n,o){t&&!Oy(n)&&this._resolveAnimations(void 0,n).update(t,o)}_setStyle(t,n,o,i){t.active=i;const s=this.getStyle(n,i);this._resolveAnimations(n,o,i).update(t,{options:!i&&this.getSharedOptions(s)||s})}removeHoverStyle(t,n,o){this._setStyle(t,o,"active",!1)}setHoverStyle(t,n,o){this._setStyle(t,o,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const n=this._data,o=this._cachedMeta.data;for(const[l,c,d]of this._syncList)this[l](c,d);this._syncList=[];const i=o.length,s=n.length,a=Math.min(s,i);a&&this.parse(0,a),s>i?this._insertElements(i,s-i,t):s<i&&this._removeElements(s,i-s)}_insertElements(t,n,o=!0){const i=this._cachedMeta,s=i.data,a=t+n;let l;const c=d=>{for(d.length+=n,l=d.length-1;l>=a;l--)d[l]=d[l-n]};for(c(s),l=t;l<a;++l)s[l]=new this.dataElementType;this._parsing&&c(i._parsed),this.parse(t,n),o&&this.updateElements(s,t,n,"reset")}updateElements(t,n,o,i){}_removeElements(t,n){const o=this._cachedMeta;if(this._parsing){const i=o._parsed.splice(t,n);o._stacked&&of(o,i)}o.data.splice(t,n)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[n,o,i]=t;this[n](o,i)}this.chart._dataChanges.push([this.index,...t])}_onDataPush(){const t=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-t,t])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(t,n){n&&this._sync(["_removeElements",t,n]);const o=arguments.length-2;o&&this._sync(["_insertElements",t,o])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}function c$(e,t){if(!e._cache.$bar){const n=e.getMatchingVisibleMetas(t);let o=[];for(let i=0,s=n.length;i<s;i++)o=o.concat(n[i].controller.getAllParsedValues(e));e._cache.$bar=lE(o.sort((i,s)=>i-s))}return e._cache.$bar}function d$(e){const t=e.iScale,n=c$(t,e.type);let o=t._length,i,s,a,l;const c=()=>{a===32767||a===-32768||(Zu(l)&&(o=Math.min(o,Math.abs(a-l)||o)),l=a)};for(i=0,s=n.length;i<s;++i)a=t.getPixelForValue(n[i]),c();for(l=void 0,i=0,s=t.ticks.length;i<s;++i)a=t.getPixelForTick(i),c();return o}function u$(e,t,n,o){const i=n.barThickness;let s,a;return xn(i)?(s=t.min*n.categoryPercentage,a=n.barPercentage):(s=i*o,a=1),{chunk:s/o,ratio:a,start:t.pixels[e]-s/2}}function f$(e,t,n,o){const i=t.pixels,s=i[e];let a=e>0?i[e-1]:null,l=e<i.length-1?i[e+1]:null;const c=n.categoryPercentage;a===null&&(a=s-(l===null?t.end-t.start:l-s)),l===null&&(l=s+s-a);const d=s-(s-Math.min(a,l))/2*c;return{chunk:Math.abs(l-a)/2*c/o,ratio:n.barPercentage,start:d}}function h$(e,t,n,o){const i=n.parse(e[0],o),s=n.parse(e[1],o),a=Math.min(i,s),l=Math.max(i,s);let c=a,d=l;Math.abs(a)>Math.abs(l)&&(c=l,d=a),t[n.axis]=d,t._custom={barStart:c,barEnd:d,start:i,end:s,min:a,max:l}}function KE(e,t,n,o){return xo(e)?h$(e,t,n,o):t[n.axis]=n.parse(e,o),t}function GE(e,t,n,o){const i=e.iScale,s=e.vScale,a=i.getLabels(),l=i===s,c=[];let d,f,h,p;for(d=n,f=n+o;d<f;++d)p=t[d],h={},h[i.axis]=l||i.parse(a[d],d),c.push(KE(p,h,s,d));return c}function Ly(e){return e&&e.barStart!==void 0&&e.barEnd!==void 0}function m$(e,t,n){return e!==0?as(e):(t.isHorizontal()?1:-1)*(t.min>=n?1:-1)}function p$(e){let t,n,o,i,s;return e.horizontal?(t=e.base>e.x,n="left",o="right"):(t=e.base<e.y,n="bottom",o="top"),t?(i="end",s="start"):(i="start",s="end"),{start:n,end:o,reverse:t,top:i,bottom:s}}function g$(e,t,n,o){let i=t.borderSkipped;const s={};if(!i){e.borderSkipped=s;return}if(i===!0){e.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:a,end:l,reverse:c,top:d,bottom:f}=p$(e);i==="middle"&&n&&(e.enableBorderRadius=!0,(n._top||0)===o?i=d:(n._bottom||0)===o?i=f:(s[YE(f,a,l,c)]=!0,i=d)),s[YE(i,a,l,c)]=!0,e.borderSkipped=s}function YE(e,t,n,o){return o?(e=b$(e,t,n),e=ZE(e,n,t)):e=ZE(e,t,n),e}function b$(e,t,n){return e===t?n:e===n?t:e}function ZE(e,t,n){return e==="start"?t:e==="end"?n:e}function y$(e,{inflateAmount:t},n){e.inflateAmount=t==="auto"?n===1?.33:0:t}class v$ extends rp{static id="bar";static defaults={datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}};static overrides={scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}};parsePrimitiveData(t,n,o,i){return GE(t,n,o,i)}parseArrayData(t,n,o,i){return GE(t,n,o,i)}parseObjectData(t,n,o,i){const{iScale:s,vScale:a}=t,{xAxisKey:l="x",yAxisKey:c="y"}=this._parsing,d=s.axis==="x"?l:c,f=a.axis==="x"?l:c,h=[];let p,g,y,b;for(p=o,g=o+i;p<g;++p)b=n[p],y={},y[s.axis]=s.parse(Wl(b,d),p),h.push(KE(Wl(b,f),y,a,p));return h}updateRangeFromParsed(t,n,o,i){super.updateRangeFromParsed(t,n,o,i);const s=o._custom;s&&n===this._cachedMeta.vScale&&(t.min=Math.min(t.min,s.min),t.max=Math.max(t.max,s.max))}getMaxOverflow(){return 0}getLabelAndValue(t){const n=this._cachedMeta,{iScale:o,vScale:i}=n,s=this.getParsed(t),a=s._custom,l=Ly(a)?"["+a.start+", "+a.end+"]":""+i.getLabelForValue(s[i.axis]);return{label:""+o.getLabelForValue(s[o.axis]),value:l}}initialize(){this.enableOptionSharing=!0,super.initialize();const t=this._cachedMeta;t.stack=this.getDataset().stack}update(t){const n=this._cachedMeta;this.updateElements(n.data,0,n.data.length,t)}updateElements(t,n,o,i){const s=i==="reset",{index:a,_cachedMeta:{vScale:l}}=this,c=l.getBasePixel(),d=l.isHorizontal(),f=this._getRuler(),{sharedOptions:h,includeOptions:p}=this._getSharedOptions(n,i);for(let g=n;g<n+o;g++){const y=this.getParsed(g),b=s||xn(y[l.axis])?{base:c,head:c}:this._calculateBarValuePixels(g),_=this._calculateBarIndexPixels(g,f),x=(y._stacks||{})[l.axis],B={horizontal:d,base:b.base,enableBorderRadius:!x||Ly(y._custom)||a===x._top||a===x._bottom,x:d?b.head:_.center,y:d?_.center:b.head,height:d?_.size:Math.abs(b.size),width:d?Math.abs(b.size):_.size};p&&(B.options=h||this.resolveDataElementOptions(g,t[g].active?"active":i));const R=B.options||t[g].options;g$(B,R,x,a),y$(B,R,f.ratio),this.updateElement(t[g],g,B,i)}}_getStacks(t,n){const{iScale:o}=this._cachedMeta,i=o.getMatchingVisibleMetas(this._type).filter(f=>f.controller.options.grouped),s=o.options.stacked,a=[],l=this._cachedMeta.controller.getParsed(n),c=l&&l[o.axis],d=f=>{const h=f._parsed.find(g=>g[o.axis]===c),p=h&&h[f.vScale.axis];if(xn(p)||isNaN(p))return!0};for(const f of i)if(!(n!==void 0&&d(f))&&((s===!1||a.indexOf(f.stack)===-1||s===void 0&&f.stack===void 0)&&a.push(f.stack),f.index===t))break;return a.length||a.push(void 0),a}_getStackCount(t){return this._getStacks(void 0,t).length}_getAxisCount(){return this._getAxis().length}getFirstScaleIdForIndexAxis(){const t=this.chart.scales,n=this.chart.options.indexAxis;return Object.keys(t).filter(o=>t[o].axis===n).shift()}_getAxis(){const t={},n=this.getFirstScaleIdForIndexAxis();for(const o of this.chart.data.datasets)t[Zt(this.chart.options.indexAxis==="x"?o.xAxisID:o.yAxisID,n)]=!0;return Object.keys(t)}_getStackIndex(t,n,o){const i=this._getStacks(t,o),s=n!==void 0?i.indexOf(n):-1;return s===-1?i.length-1:s}_getRuler(){const t=this.options,n=this._cachedMeta,o=n.iScale,i=[];let s,a;for(s=0,a=n.data.length;s<a;++s)i.push(o.getPixelForValue(this.getParsed(s)[o.axis],s));const l=t.barThickness;return{min:l||d$(n),pixels:i,start:o._startPixel,end:o._endPixel,stackCount:this._getStackCount(),scale:o,grouped:t.grouped,ratio:l?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){const{_cachedMeta:{vScale:n,_stacked:o,index:i},options:{base:s,minBarLength:a}}=this,l=s||0,c=this.getParsed(t),d=c._custom,f=Ly(d);let h=c[n.axis],p=0,g=o?this.applyStack(n,c,o):h,y,b;g!==h&&(p=g-h,g=h),f&&(h=d.barStart,g=d.barEnd-d.barStart,h!==0&&as(h)!==as(d.barEnd)&&(p=0),p+=h);const _=!xn(s)&&!f?s:p;let x=n.getPixelForValue(_);if(this.chart.getDataVisibility(t)?y=n.getPixelForValue(p+g):y=x,b=y-x,Math.abs(b)<a){b=m$(b,n,l)*a,h===l&&(x-=b/2);const B=n.getPixelForDecimal(0),R=n.getPixelForDecimal(1),S=Math.min(B,R),O=Math.max(B,R);x=Math.max(Math.min(x,O),S),y=x+b,o&&!f&&(c._stacks[n.axis]._visualValues[i]=n.getValueForPixel(y)-n.getValueForPixel(x))}if(x===n.getPixelForValue(l)){const B=as(b)*n.getLineWidthForValue(l)/2;x+=B,b-=B}return{size:b,base:x,head:y,center:y+b/2}}_calculateBarIndexPixels(t,n){const o=n.scale,i=this.options,s=i.skipNull,a=Zt(i.maxBarThickness,1/0);let l,c;const d=this._getAxisCount();if(n.grouped){const f=s?this._getStackCount(t):n.stackCount,h=i.barThickness==="flex"?f$(t,n,i,f*d):u$(t,n,i,f*d),p=this.chart.options.indexAxis==="x"?this.getDataset().xAxisID:this.getDataset().yAxisID,g=this._getAxis().indexOf(Zt(p,this.getFirstScaleIdForIndexAxis())),y=this._getStackIndex(this.index,this._cachedMeta.stack,s?t:void 0)+g;l=h.start+h.chunk*y+h.chunk/2,c=Math.min(a,h.chunk*h.ratio)}else l=o.getPixelForValue(this.getParsed(t)[o.axis],t),c=Math.min(a,n.min*n.ratio);return{base:l-c/2,head:l+c/2,center:l,size:c}}draw(){const t=this._cachedMeta,n=t.vScale,o=t.data,i=o.length;let s=0;for(;s<i;++s)this.getParsed(s)[n.axis]!==null&&!o[s].hidden&&o[s].draw(this._ctx)}}function w$(e,t,n){let o=1,i=1,s=0,a=0;if(t<Vn){const l=e,c=l+t,d=Math.cos(l),f=Math.sin(l),h=Math.cos(c),p=Math.sin(c),g=(R,S,O)=>Qu(R,l,c,!0)?1:Math.max(S,S*n,O,O*n),y=(R,S,O)=>Qu(R,l,c,!0)?-1:Math.min(S,S*n,O,O*n),b=g(0,d,h),_=g(Do,f,p),x=y(Tn,d,h),B=y(Tn+Do,f,p);o=(b-x)/2,i=(_-B)/2,s=-(b+x)/2,a=-(_+B)/2}return{ratioX:o,ratioY:i,offsetX:s,offsetY:a}}class XE extends rp{static id="doughnut";static defaults={datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"};static descriptors={_scriptable:t=>t!=="spacing",_indexable:t=>t!=="spacing"&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const n=t.data,{labels:{pointStyle:o,textAlign:i,color:s,useBorderRadius:a,borderRadius:l}}=t.legend.options;return n.labels.length&&n.datasets.length?n.labels.map((c,d)=>{const h=t.getDatasetMeta(0).controller.getStyle(d);return{text:c,fillStyle:h.backgroundColor,fontColor:s,hidden:!t.getDataVisibility(d),lineDash:h.borderDash,lineDashOffset:h.borderDashOffset,lineJoin:h.borderJoinStyle,lineWidth:h.borderWidth,strokeStyle:h.borderColor,textAlign:i,pointStyle:o,borderRadius:a&&(l||h.borderRadius),index:d}}):[]}},onClick(t,n,o){o.chart.toggleDataVisibility(n.index),o.chart.update()}}}};constructor(t,n){super(t,n),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,n){const o=this.getDataset().data,i=this._cachedMeta;if(this._parsing===!1)i._parsed=o;else{let s=c=>+o[c];if(an(o[t])){const{key:c="value"}=this._parsing;s=d=>+Wl(o[d],c)}let a,l;for(a=t,l=t+n;a<l;++a)i._parsed[a]=s(a)}}_getRotation(){return Xs(this.options.rotation-90)}_getCircumference(){return Xs(this.options.circumference)}_getRotationExtents(){let t=Vn,n=-Vn;for(let o=0;o<this.chart.data.datasets.length;++o)if(this.chart.isDatasetVisible(o)&&this.chart.getDatasetMeta(o).type===this._type){const i=this.chart.getDatasetMeta(o).controller,s=i._getRotation(),a=i._getCircumference();t=Math.min(t,s),n=Math.max(n,s+a)}return{rotation:t,circumference:n-t}}update(t){const n=this.chart,{chartArea:o}=n,i=this._cachedMeta,s=i.data,a=this.getMaxBorderWidth()+this.getMaxOffset(s)+this.options.spacing,l=Math.max((Math.min(o.width,o.height)-a)/2,0),c=Math.min(A8(this.options.cutout,l),1),d=this._getRingWeight(this.index),{circumference:f,rotation:h}=this._getRotationExtents(),{ratioX:p,ratioY:g,offsetX:y,offsetY:b}=w$(h,f,c),_=(o.width-a)/p,x=(o.height-a)/g,B=Math.max(Math.min(_,x)/2,0),R=Jx(this.options.radius,B),S=Math.max(R*c,0),O=(R-S)/this._getVisibleDatasetWeightTotal();this.offsetX=y*R,this.offsetY=b*R,i.total=this.calculateTotal(),this.outerRadius=R-O*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-O*d,0),this.updateElements(s,0,s.length,t)}_circumference(t,n){const o=this.options,i=this._cachedMeta,s=this._getCircumference();return n&&o.animation.animateRotate||!this.chart.getDataVisibility(t)||i._parsed[t]===null||i.data[t].hidden?0:this.calculateCircumference(i._parsed[t]*s/Vn)}updateElements(t,n,o,i){const s=i==="reset",a=this.chart,l=a.chartArea,d=a.options.animation,f=(l.left+l.right)/2,h=(l.top+l.bottom)/2,p=s&&d.animateScale,g=p?0:this.innerRadius,y=p?0:this.outerRadius,{sharedOptions:b,includeOptions:_}=this._getSharedOptions(n,i);let x=this._getRotation(),B;for(B=0;B<n;++B)x+=this._circumference(B,s);for(B=n;B<n+o;++B){const R=this._circumference(B,s),S=t[B],O={x:f+this.offsetX,y:h+this.offsetY,startAngle:x,endAngle:x+R,circumference:R,outerRadius:y,innerRadius:g};_&&(O.options=b||this.resolveDataElementOptions(B,S.active?"active":i)),x+=R,this.updateElement(S,B,O,i)}}calculateTotal(){const t=this._cachedMeta,n=t.data;let o=0,i;for(i=0;i<n.length;i++){const s=t._parsed[i];s!==null&&!isNaN(s)&&this.chart.getDataVisibility(i)&&!n[i].hidden&&(o+=Math.abs(s))}return o}calculateCircumference(t){const n=this._cachedMeta.total;return n>0&&!isNaN(t)?Vn*(Math.abs(t)/n):0}getLabelAndValue(t){const n=this._cachedMeta,o=this.chart,i=o.data.labels||[],s=Ey(n._parsed[t],o.options.locale);return{label:i[t]||"",value:s}}getMaxBorderWidth(t){let n=0;const o=this.chart;let i,s,a,l,c;if(!t){for(i=0,s=o.data.datasets.length;i<s;++i)if(o.isDatasetVisible(i)){a=o.getDatasetMeta(i),t=a.data,l=a.controller;break}}if(!t)return 0;for(i=0,s=t.length;i<s;++i)c=l.resolveDataElementOptions(i),c.borderAlign!=="inner"&&(n=Math.max(n,c.borderWidth||0,c.hoverBorderWidth||0));return n}getMaxOffset(t){let n=0;for(let o=0,i=t.length;o<i;++o){const s=this.resolveDataElementOptions(o);n=Math.max(n,s.offset||0,s.hoverOffset||0)}return n}_getRingWeightOffset(t){let n=0;for(let o=0;o<t;++o)this.chart.isDatasetVisible(o)&&(n+=this._getRingWeight(o));return n}_getRingWeight(t){return Math.max(Zt(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}class k$ extends rp{static id="line";static defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1};static overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const n=this._cachedMeta,{dataset:o,data:i=[],_dataset:s}=n,a=this.chart._animationsDisabled;let{start:l,count:c}=G8(n,i,a);this._drawStart=l,this._drawCount=c,Y8(n)&&(l=0,c=i.length),o._chart=this.chart,o._datasetIndex=this.index,o._decimated=!!s._decimated,o.points=i;const d=this.resolveDatasetElementOptions(t);this.options.showLine||(d.borderWidth=0),d.segment=this.options.segment,this.updateElement(o,void 0,{animated:!a,options:d},t),this.updateElements(i,l,c,t)}updateElements(t,n,o,i){const s=i==="reset",{iScale:a,vScale:l,_stacked:c,_dataset:d}=this._cachedMeta,{sharedOptions:f,includeOptions:h}=this._getSharedOptions(n,i),p=a.axis,g=l.axis,{spanGaps:y,segment:b}=this.options,_=Ju(y)?y:Number.POSITIVE_INFINITY,x=this.chart._animationsDisabled||s||i==="none",B=n+o,R=t.length;let S=n>0&&this.getParsed(n-1);for(let O=0;O<R;++O){const I=t[O],D=x?I:{};if(O<n||O>=B){D.skip=!0;continue}const w=this.getParsed(O),E=xn(w[g]),F=D[p]=a.getPixelForValue(w[p],O),A=D[g]=s||E?l.getBasePixel():l.getPixelForValue(c?this.applyStack(l,w,c):w[g],O);D.skip=isNaN(F)||isNaN(A)||E,D.stop=O>0&&Math.abs(w[p]-S[p])>_,b&&(D.parsed=w,D.raw=d.data[O]),h&&(D.options=f||this.resolveDataElementOptions(O,I.active?"active":i)),x||this.updateElement(I,O,D,i),S=w}}getMaxOverflow(){const t=this._cachedMeta,n=t.dataset,o=n.options&&n.options.borderWidth||0,i=t.data||[];if(!i.length)return o;const s=i[0].size(this.resolveDataElementOptions(0)),a=i[i.length-1].size(this.resolveDataElementOptions(i.length-1));return Math.max(o,s,a)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}class _$ extends XE{static id="pie";static defaults={cutout:0,rotation:0,circumference:360,radius:"100%"}}function Ql(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class Fy{static override(t){Object.assign(Fy.prototype,t)}options;constructor(t){this.options=t||{}}init(){}formats(){return Ql()}parse(){return Ql()}format(){return Ql()}add(){return Ql()}diff(){return Ql()}startOf(){return Ql()}endOf(){return Ql()}}var x$={_date:Fy};function E$(e,t,n,o){const{controller:i,data:s,_sorted:a}=e,l=i._cachedMeta.iScale,c=e.dataset&&e.dataset.options?e.dataset.options.spanGaps:null;if(l&&t===l.axis&&t!=="r"&&a&&s.length){const d=l._reversePixels?U8:ql;if(o){if(i._sharedOptions){const f=s[0],h=typeof f.getRange=="function"&&f.getRange(t);if(h){const p=d(s,t,n-h),g=d(s,t,n+h);return{lo:p.lo,hi:g.hi}}}}else{const f=d(s,t,n);if(c){const{vScale:h}=i._cachedMeta,{_parsed:p}=e,g=p.slice(0,f.lo+1).reverse().findIndex(b=>!xn(b[h.axis]));f.lo-=Math.max(0,g);const y=p.slice(f.hi).findIndex(b=>!xn(b[h.axis]));f.hi+=Math.max(0,y)}return f}}return{lo:0,hi:s.length-1}}function ip(e,t,n,o,i){const s=e.getSortedVisibleDatasetMetas(),a=n[t];for(let l=0,c=s.length;l<c;++l){const{index:d,data:f}=s[l],{lo:h,hi:p}=E$(s[l],t,a,i);for(let g=h;g<=p;++g){const y=f[g];y.skip||o(y,d,g)}}}function C$(e){const t=e.indexOf("x")!==-1,n=e.indexOf("y")!==-1;return function(o,i){const s=t?Math.abs(o.x-i.x):0,a=n?Math.abs(o.y-i.y):0;return Math.sqrt(Math.pow(s,2)+Math.pow(a,2))}}function $y(e,t,n,o,i){const s=[];return!i&&!e.isPointInArea(t)||ip(e,n,t,function(l,c,d){!i&&!tf(l,e.chartArea,0)||l.inRange(t.x,t.y,o)&&s.push({element:l,datasetIndex:c,index:d})},!0),s}function S$(e,t,n,o){let i=[];function s(a,l,c){const{startAngle:d,endAngle:f}=a.getProps(["startAngle","endAngle"],o),{angle:h}=iE(a,{x:t.x,y:t.y});Qu(h,d,f)&&i.push({element:a,datasetIndex:l,index:c})}return ip(e,n,t,s),i}function A$(e,t,n,o,i,s){let a=[];const l=C$(n);let c=Number.POSITIVE_INFINITY;function d(f,h,p){const g=f.inRange(t.x,t.y,i);if(o&&!g)return;const y=f.getCenterPoint(i);if(!(!!s||e.isPointInArea(y))&&!g)return;const _=l(t,y);_<c?(a=[{element:f,datasetIndex:h,index:p}],c=_):_===c&&a.push({element:f,datasetIndex:h,index:p})}return ip(e,n,t,d),a}function zy(e,t,n,o,i,s){return!s&&!e.isPointInArea(t)?[]:n==="r"&&!o?S$(e,t,n,i):A$(e,t,n,o,i,s)}function JE(e,t,n,o,i){const s=[],a=n==="x"?"inXRange":"inYRange";let l=!1;return ip(e,n,t,(c,d,f)=>{c[a]&&c[a](t[n],i)&&(s.push({element:c,datasetIndex:d,index:f}),l=l||c.inRange(t.x,t.y,i))}),o&&!l?[]:s}var T$={modes:{index(e,t,n,o){const i=Xl(t,e),s=n.axis||"x",a=n.includeInvisible||!1,l=n.intersect?$y(e,i,s,o,a):zy(e,i,s,!1,o,a),c=[];return l.length?(e.getSortedVisibleDatasetMetas().forEach(d=>{const f=l[0].index,h=d.data[f];h&&!h.skip&&c.push({element:h,datasetIndex:d.index,index:f})}),c):[]},dataset(e,t,n,o){const i=Xl(t,e),s=n.axis||"xy",a=n.includeInvisible||!1;let l=n.intersect?$y(e,i,s,o,a):zy(e,i,s,!1,o,a);if(l.length>0){const c=l[0].datasetIndex,d=e.getDatasetMeta(c).data;l=[];for(let f=0;f<d.length;++f)l.push({element:d[f],datasetIndex:c,index:f})}return l},point(e,t,n,o){const i=Xl(t,e),s=n.axis||"xy",a=n.includeInvisible||!1;return $y(e,i,s,o,a)},nearest(e,t,n,o){const i=Xl(t,e),s=n.axis||"xy",a=n.includeInvisible||!1;return zy(e,i,s,n.intersect,o,a)},x(e,t,n,o){const i=Xl(t,e);return JE(e,i,"x",n.intersect,o)},y(e,t,n,o){const i=Xl(t,e);return JE(e,i,"y",n.intersect,o)}}};const QE=["left","top","right","bottom"];function rf(e,t){return e.filter(n=>n.pos===t)}function VE(e,t){return e.filter(n=>QE.indexOf(n.pos)===-1&&n.box.axis===t)}function sf(e,t){return e.sort((n,o)=>{const i=t?o:n,s=t?n:o;return i.weight===s.weight?i.index-s.index:i.weight-s.weight})}function B$(e){const t=[];let n,o,i,s,a,l;for(n=0,o=(e||[]).length;n<o;++n)i=e[n],{position:s,options:{stack:a,stackWeight:l=1}}=i,t.push({index:n,box:i,pos:s,horizontal:i.isHorizontal(),weight:i.weight,stack:a&&s+a,stackWeight:l});return t}function P$(e){const t={};for(const n of e){const{stack:o,pos:i,stackWeight:s}=n;if(!o||!QE.includes(i))continue;const a=t[o]||(t[o]={count:0,placed:0,weight:0,size:0});a.count++,a.weight+=s}return t}function N$(e,t){const n=P$(e),{vBoxMaxWidth:o,hBoxMaxHeight:i}=t;let s,a,l;for(s=0,a=e.length;s<a;++s){l=e[s];const{fullSize:c}=l.box,d=n[l.stack],f=d&&l.stackWeight/d.weight;l.horizontal?(l.width=f?f*o:c&&t.availableWidth,l.height=i):(l.width=o,l.height=f?f*i:c&&t.availableHeight)}return n}function D$(e){const t=B$(e),n=sf(t.filter(d=>d.box.fullSize),!0),o=sf(rf(t,"left"),!0),i=sf(rf(t,"right")),s=sf(rf(t,"top"),!0),a=sf(rf(t,"bottom")),l=VE(t,"x"),c=VE(t,"y");return{fullSize:n,leftAndTop:o.concat(s),rightAndBottom:i.concat(c).concat(a).concat(l),chartArea:rf(t,"chartArea"),vertical:o.concat(i).concat(c),horizontal:s.concat(a).concat(l)}}function eC(e,t,n,o){return Math.max(e[n],t[n])+Math.max(e[o],t[o])}function tC(e,t){e.top=Math.max(e.top,t.top),e.left=Math.max(e.left,t.left),e.bottom=Math.max(e.bottom,t.bottom),e.right=Math.max(e.right,t.right)}function M$(e,t,n,o){const{pos:i,box:s}=n,a=e.maxPadding;if(!an(i)){n.size&&(e[i]-=n.size);const h=o[n.stack]||{size:0,count:1};h.size=Math.max(h.size,n.horizontal?s.height:s.width),n.size=h.size/h.count,e[i]+=n.size}s.getPadding&&tC(a,s.getPadding());const l=Math.max(0,t.outerWidth-eC(a,e,"left","right")),c=Math.max(0,t.outerHeight-eC(a,e,"top","bottom")),d=l!==e.w,f=c!==e.h;return e.w=l,e.h=c,n.horizontal?{same:d,other:f}:{same:f,other:d}}function R$(e){const t=e.maxPadding;function n(o){const i=Math.max(t[o]-e[o],0);return e[o]+=i,i}e.y+=n("top"),e.x+=n("left"),n("right"),n("bottom")}function I$(e,t){const n=t.maxPadding;function o(i){const s={left:0,top:0,right:0,bottom:0};return i.forEach(a=>{s[a]=Math.max(t[a],n[a])}),s}return o(e?["left","right"]:["top","bottom"])}function af(e,t,n,o){const i=[];let s,a,l,c,d,f;for(s=0,a=e.length,d=0;s<a;++s){l=e[s],c=l.box,c.update(l.width||t.w,l.height||t.h,I$(l.horizontal,t));const{same:h,other:p}=M$(t,n,l,o);d|=h&&i.length,f=f||p,c.fullSize||i.push(l)}return d&&af(i,t,n,o)||f}function sp(e,t,n,o,i){e.top=n,e.left=t,e.right=t+o,e.bottom=n+i,e.width=o,e.height=i}function nC(e,t,n,o){const i=n.padding;let{x:s,y:a}=t;for(const l of e){const c=l.box,d=o[l.stack]||{placed:0,weight:1},f=l.stackWeight/d.weight||1;if(l.horizontal){const h=t.w*f,p=d.size||c.height;Zu(d.start)&&(a=d.start),c.fullSize?sp(c,i.left,a,n.outerWidth-i.right-i.left,p):sp(c,t.left+d.placed,a,h,p),d.start=a,d.placed+=h,a=c.bottom}else{const h=t.h*f,p=d.size||c.width;Zu(d.start)&&(s=d.start),c.fullSize?sp(c,s,i.top,p,n.outerHeight-i.bottom-i.top):sp(c,s,t.top+d.placed,p,h),d.start=s,d.placed+=h,s=c.right}}t.x=s,t.y=a}var oi={addBox(e,t){e.boxes||(e.boxes=[]),t.fullSize=t.fullSize||!1,t.position=t.position||"top",t.weight=t.weight||0,t._layers=t._layers||function(){return[{z:0,draw(n){t.draw(n)}}]},e.boxes.push(t)},removeBox(e,t){const n=e.boxes?e.boxes.indexOf(t):-1;n!==-1&&e.boxes.splice(n,1)},configure(e,t,n){t.fullSize=n.fullSize,t.position=n.position,t.weight=n.weight},update(e,t,n,o){if(!e)return;const i=ni(e.options.layout.padding),s=Math.max(t-i.width,0),a=Math.max(n-i.height,0),l=D$(e.boxes),c=l.vertical,d=l.horizontal;An(e.boxes,b=>{typeof b.beforeLayout=="function"&&b.beforeLayout()});const f=c.reduce((b,_)=>_.box.options&&_.box.options.display===!1?b:b+1,0)||1,h=Object.freeze({outerWidth:t,outerHeight:n,padding:i,availableWidth:s,availableHeight:a,vBoxMaxWidth:s/2/f,hBoxMaxHeight:a/2}),p=Object.assign({},i);tC(p,ni(o));const g=Object.assign({maxPadding:p,w:s,h:a,x:i.left,y:i.top},i),y=N$(c.concat(d),h);af(l.fullSize,g,h,y),af(c,g,h,y),af(d,g,h,y)&&af(c,g,h,y),R$(g),nC(l.leftAndTop,g,h,y),g.x+=g.w,g.y+=g.h,nC(l.rightAndBottom,g,h,y),e.chartArea={left:g.left,top:g.top,right:g.left+g.w,bottom:g.top+g.h,height:g.h,width:g.w},An(l.chartArea,b=>{const _=b.box;Object.assign(_,e.chartArea),_.update(g.w,g.h,{left:0,top:0,right:0,bottom:0})})}};class oC{acquireContext(t,n){}releaseContext(t){return!1}addEventListener(t,n,o){}removeEventListener(t,n,o){}getDevicePixelRatio(){return 1}getMaximumSize(t,n,o,i){return n=Math.max(0,n||t.width),o=o||t.height,{width:n,height:Math.max(0,i?Math.floor(n/i):o)}}isAttached(t){return!0}updateConfig(t){}}class O$ extends oC{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const ap="$chartjs",L$={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},rC=e=>e===null||e==="";function F$(e,t){const n=e.style,o=e.getAttribute("height"),i=e.getAttribute("width");if(e[ap]={initial:{height:o,width:i,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",rC(i)){const s=TE(e,"width");s!==void 0&&(e.width=s)}if(rC(o))if(e.style.height==="")e.height=e.width/(t||2);else{const s=TE(e,"height");s!==void 0&&(e.height=s)}return e}const iC=L7?{passive:!0}:!1;function $$(e,t,n){e&&e.addEventListener(t,n,iC)}function z$(e,t,n){e&&e.canvas&&e.canvas.removeEventListener(t,n,iC)}function j$(e,t){const n=L$[e.type]||e.type,{x:o,y:i}=Xl(e,t);return{type:n,chart:t,native:e,x:o!==void 0?o:null,y:i!==void 0?i:null}}function lp(e,t){for(const n of e)if(n===t||n.contains(t))return!0}function U$(e,t,n){const o=e.canvas,i=new MutationObserver(s=>{let a=!1;for(const l of s)a=a||lp(l.addedNodes,o),a=a&&!lp(l.removedNodes,o);a&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}function W$(e,t,n){const o=e.canvas,i=new MutationObserver(s=>{let a=!1;for(const l of s)a=a||lp(l.removedNodes,o),a=a&&!lp(l.addedNodes,o);a&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}const lf=new Map;let sC=0;function aC(){const e=window.devicePixelRatio;e!==sC&&(sC=e,lf.forEach((t,n)=>{n.currentDevicePixelRatio!==e&&t()}))}function H$(e,t){lf.size||window.addEventListener("resize",aC),lf.set(e,t)}function q$(e){lf.delete(e),lf.size||window.removeEventListener("resize",aC)}function K$(e,t,n){const o=e.canvas,i=o&&My(o);if(!i)return;const s=dE((l,c)=>{const d=i.clientWidth;n(l,c),d<i.clientWidth&&n()},window),a=new ResizeObserver(l=>{const c=l[0],d=c.contentRect.width,f=c.contentRect.height;d===0&&f===0||s(d,f)});return a.observe(i),H$(e,s),a}function jy(e,t,n){n&&n.disconnect(),t==="resize"&&q$(e)}function G$(e,t,n){const o=e.canvas,i=dE(s=>{e.ctx!==null&&n(j$(s,e))},e);return $$(o,t,i),i}class Y$ extends oC{acquireContext(t,n){const o=t&&t.getContext&&t.getContext("2d");return o&&o.canvas===t?(F$(t,n),o):null}releaseContext(t){const n=t.canvas;if(!n[ap])return!1;const o=n[ap].initial;["height","width"].forEach(s=>{const a=o[s];xn(a)?n.removeAttribute(s):n.setAttribute(s,a)});const i=o.style||{};return Object.keys(i).forEach(s=>{n.style[s]=i[s]}),n.width=n.width,delete n[ap],!0}addEventListener(t,n,o){this.removeEventListener(t,n);const i=t.$proxies||(t.$proxies={}),a={attach:U$,detach:W$,resize:K$}[n]||G$;i[n]=a(t,n,o)}removeEventListener(t,n){const o=t.$proxies||(t.$proxies={}),i=o[n];if(!i)return;({attach:jy,detach:jy,resize:jy}[n]||z$)(t,n,i),o[n]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,n,o,i){return O7(t,n,o,i)}isAttached(t){const n=t&&My(t);return!!(n&&n.isConnected)}}function Z$(e){return!Dy()||typeof OffscreenCanvas<"u"&&e instanceof OffscreenCanvas?O$:Y$}let Vs=class{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(t){const{x:n,y:o}=this.getProps(["x","y"],t);return{x:n,y:o}}hasValue(){return Ju(this.x)&&Ju(this.y)}getProps(t,n){const o=this.$animations;if(!n||!o)return this;const i={};return t.forEach(s=>{i[s]=o[s]&&o[s].active()?o[s]._to:this[s]}),i}};function X$(e,t){const n=e.options.ticks,o=J$(e),i=Math.min(n.maxTicksLimit||o,o),s=n.major.enabled?V$(t):[],a=s.length,l=s[0],c=s[a-1],d=[];if(a>i)return e9(t,d,s,a/i),d;const f=Q$(s,t,i);if(a>0){let h,p;const g=a>1?Math.round((c-l)/(a-1)):null;for(cp(t,d,f,xn(g)?0:l-g,l),h=0,p=a-1;h<p;h++)cp(t,d,f,s[h],s[h+1]);return cp(t,d,f,c,xn(g)?t.length:c+g),d}return cp(t,d,f),d}function J$(e){const t=e.options.offset,n=e._tickSize(),o=e._length/n+(t?0:1),i=e._maxLength/n;return Math.floor(Math.min(o,i))}function Q$(e,t,n){const o=t9(e),i=t.length/n;if(!o)return Math.max(i,1);const s=I8(o);for(let a=0,l=s.length-1;a<l;a++){const c=s[a];if(c>i)return c}return Math.max(i,1)}function V$(e){const t=[];let n,o;for(n=0,o=e.length;n<o;n++)e[n].major&&t.push(n);return t}function e9(e,t,n,o){let i=0,s=n[0],a;for(o=Math.ceil(o),a=0;a<e.length;a++)a===s&&(t.push(e[a]),i++,s=n[i*o])}function cp(e,t,n,o,i){const s=Zt(o,0),a=Math.min(Zt(i,e.length),e.length);let l=0,c,d,f;for(n=Math.ceil(n),i&&(c=i-o,n=c/Math.floor(c/n)),f=s;f<0;)l++,f=Math.round(s+l*n);for(d=Math.max(s,0);d<a;d++)d===f&&(t.push(e[d]),l++,f=Math.round(s+l*n))}function t9(e){const t=e.length;let n,o;if(t<2)return!1;for(o=e[0],n=1;n<t;++n)if(e[n]-e[n-1]!==o)return!1;return o}const n9=e=>e==="left"?"right":e==="right"?"left":e,lC=(e,t,n)=>t==="top"||t==="left"?e[t]+n:e[t]-n,cC=(e,t)=>Math.min(t||e,e);function dC(e,t){const n=[],o=e.length/t,i=e.length;let s=0;for(;s<i;s+=o)n.push(e[Math.floor(s)]);return n}function o9(e,t,n){const o=e.ticks.length,i=Math.min(t,o-1),s=e._startPixel,a=e._endPixel,l=1e-6;let c=e.getPixelForTick(i),d;if(!(n&&(o===1?d=Math.max(c-s,a-c):t===0?d=(e.getPixelForTick(1)-c)/2:d=(c-e.getPixelForTick(i-1))/2,c+=i<t?d:-d,c<s-l||c>a+l)))return c}function r9(e,t){An(e,n=>{const o=n.gc,i=o.length/2;let s;if(i>t){for(s=0;s<i;++s)delete n.data[o[s]];o.splice(0,i)}})}function cf(e){return e.drawTicks?e.tickLength:0}function uC(e,t){if(!e.display)return 0;const n=Qo(e.font,t),o=ni(e.padding);return(xo(e.text)?e.text.length:1)*n.lineHeight+o.height}function i9(e,t){return Yl(e,{scale:t,type:"scale"})}function s9(e,t,n){return Yl(e,{tick:n,index:t,type:"tick"})}function a9(e,t,n){let o=ky(e);return(n&&t!=="right"||!n&&t==="right")&&(o=n9(o)),o}function l9(e,t,n,o){const{top:i,left:s,bottom:a,right:l,chart:c}=e,{chartArea:d,scales:f}=c;let h=0,p,g,y;const b=a-i,_=l-s;if(e.isHorizontal()){if(g=Jo(o,s,l),an(n)){const x=Object.keys(n)[0],B=n[x];y=f[x].getPixelForValue(B)+b-t}else n==="center"?y=(d.bottom+d.top)/2+b-t:y=lC(e,n,t);p=l-s}else{if(an(n)){const x=Object.keys(n)[0],B=n[x];g=f[x].getPixelForValue(B)-_+t}else n==="center"?g=(d.left+d.right)/2-_+t:g=lC(e,n,t);y=Jo(o,a,i),h=n==="left"?-Do:Do}return{titleX:g,titleY:y,maxWidth:p,rotation:h}}class hd extends Vs{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,n){return t}getUserBounds(){let{_userMin:t,_userMax:n,_suggestedMin:o,_suggestedMax:i}=this;return t=ss(t,Number.POSITIVE_INFINITY),n=ss(n,Number.NEGATIVE_INFINITY),o=ss(o,Number.POSITIVE_INFINITY),i=ss(i,Number.NEGATIVE_INFINITY),{min:ss(t,o),max:ss(n,i),minDefined:Zo(t),maxDefined:Zo(n)}}getMinMax(t){let{min:n,max:o,minDefined:i,maxDefined:s}=this.getUserBounds(),a;if(i&&s)return{min:n,max:o};const l=this.getMatchingVisibleMetas();for(let c=0,d=l.length;c<d;++c)a=l[c].controller.getMinMax(this,t),i||(n=Math.min(n,a.min)),s||(o=Math.max(o,a.max));return n=s&&n>o?o:n,o=i&&n>o?n:o,{min:ss(n,ss(o,n)),max:ss(o,ss(n,o))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(t=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){Wn(this.options.beforeUpdate,[this])}update(t,n,o){const{beginAtZero:i,grace:s,ticks:a}=this.options,l=a.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=n,this._margins=o=Object.assign({left:0,right:0,top:0,bottom:0},o),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+o.left+o.right:this.height+o.top+o.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=m7(this,s,i),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const c=l<this.ticks.length;this._convertTicksToLabels(c?dC(this.ticks,l):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),a.display&&(a.autoSkip||a.source==="auto")&&(this.ticks=X$(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),c&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let t=this.options.reverse,n,o;this.isHorizontal()?(n=this.left,o=this.right):(n=this.top,o=this.bottom,t=!t),this._startPixel=n,this._endPixel=o,this._reversePixels=t,this._length=o-n,this._alignToPixels=this.options.alignToPixels}afterUpdate(){Wn(this.options.afterUpdate,[this])}beforeSetDimensions(){Wn(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(){Wn(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),Wn(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){Wn(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const n=this.options.ticks;let o,i,s;for(o=0,i=t.length;o<i;o++)s=t[o],s.label=Wn(n.callback,[s.value,o,t],this)}afterTickToLabelConversion(){Wn(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){Wn(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,n=t.ticks,o=cC(this.ticks.length,t.ticks.maxTicksLimit),i=n.minRotation||0,s=n.maxRotation;let a=i,l,c,d;if(!this._isVisible()||!n.display||i>=s||o<=1||!this.isHorizontal()){this.labelRotation=i;return}const f=this._getLabelSizes(),h=f.widest.width,p=f.highest.height,g=Xo(this.chart.width-h,0,this.maxWidth);l=t.offset?this.maxWidth/o:g/(o-1),h+6>l&&(l=g/(o-(t.offset?.5:1)),c=this.maxHeight-cf(t.grid)-n.padding-uC(t.title,this.chart.options.font),d=Math.sqrt(h*h+p*p),a=$8(Math.min(Math.asin(Xo((f.highest.height+6)/l,-1,1)),Math.asin(Xo(c/d,-1,1))-Math.asin(Xo(p/d,-1,1)))),a=Math.max(i,Math.min(s,a))),this.labelRotation=a}afterCalculateLabelRotation(){Wn(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){Wn(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:n,options:{ticks:o,title:i,grid:s}}=this,a=this._isVisible(),l=this.isHorizontal();if(a){const c=uC(i,n.options.font);if(l?(t.width=this.maxWidth,t.height=cf(s)+c):(t.height=this.maxHeight,t.width=cf(s)+c),o.display&&this.ticks.length){const{first:d,last:f,widest:h,highest:p}=this._getLabelSizes(),g=o.padding*2,y=Xs(this.labelRotation),b=Math.cos(y),_=Math.sin(y);if(l){const x=o.mirror?0:_*h.width+b*p.height;t.height=Math.min(this.maxHeight,t.height+x+g)}else{const x=o.mirror?0:b*h.width+_*p.height;t.width=Math.min(this.maxWidth,t.width+x+g)}this._calculatePadding(d,f,_,b)}}this._handleMargins(),l?(this.width=this._length=n.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=n.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,n,o,i){const{ticks:{align:s,padding:a},position:l}=this.options,c=this.labelRotation!==0,d=l!=="top"&&this.axis==="x";if(this.isHorizontal()){const f=this.getPixelForTick(0)-this.left,h=this.right-this.getPixelForTick(this.ticks.length-1);let p=0,g=0;c?d?(p=i*t.width,g=o*n.height):(p=o*t.height,g=i*n.width):s==="start"?g=n.width:s==="end"?p=t.width:s!=="inner"&&(p=t.width/2,g=n.width/2),this.paddingLeft=Math.max((p-f+a)*this.width/(this.width-f),0),this.paddingRight=Math.max((g-h+a)*this.width/(this.width-h),0)}else{let f=n.height/2,h=t.height/2;s==="start"?(f=0,h=t.height):s==="end"&&(f=n.height,h=0),this.paddingTop=f+a,this.paddingBottom=h+a}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){Wn(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:n}=this.options;return n==="top"||n==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t);let n,o;for(n=0,o=t.length;n<o;n++)xn(t[n].label)&&(t.splice(n,1),o--,n--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const n=this.options.ticks.sampleSize;let o=this.ticks;n<o.length&&(o=dC(o,n)),this._labelSizes=t=this._computeLabelSizes(o,o.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,n,o){const{ctx:i,_longestTextCache:s}=this,a=[],l=[],c=Math.floor(n/cC(n,o));let d=0,f=0,h,p,g,y,b,_,x,B,R,S,O;for(h=0;h<n;h+=c){if(y=t[h].label,b=this._resolveTickFontOptions(h),i.font=_=b.string,x=s[_]=s[_]||{data:{},gc:[]},B=b.lineHeight,R=S=0,!xn(y)&&!xo(y))R=gE(i,x.data,x.gc,R,y),S=B;else if(xo(y))for(p=0,g=y.length;p<g;++p)O=y[p],!xn(O)&&!xo(O)&&(R=gE(i,x.data,x.gc,R,O),S+=B);a.push(R),l.push(S),d=Math.max(R,d),f=Math.max(S,f)}r9(s,n);const I=a.indexOf(d),D=l.indexOf(f),w=E=>({width:a[E]||0,height:l[E]||0});return{first:w(0),last:w(n-1),widest:w(I),highest:w(D),widths:a,heights:l}}getLabelForValue(t){return t}getPixelForValue(t,n){return NaN}getValueForPixel(t){}getPixelForTick(t){const n=this.ticks;return t<0||t>n.length-1?null:this.getPixelForValue(n[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const n=this._startPixel+t*this._length;return j8(this._alignToPixels?Gl(this.chart,n,0):n)}getDecimalForPixel(t){const n=(t-this._startPixel)/this._length;return this._reversePixels?1-n:n}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:n}=this;return t<0&&n<0?n:t>0&&n>0?t:0}getContext(t){const n=this.ticks||[];if(t>=0&&t<n.length){const o=n[t];return o.$context||(o.$context=s9(this.getContext(),t,o))}return this.$context||(this.$context=i9(this.chart.getContext(),this))}_tickSize(){const t=this.options.ticks,n=Xs(this.labelRotation),o=Math.abs(Math.cos(n)),i=Math.abs(Math.sin(n)),s=this._getLabelSizes(),a=t.autoSkipPadding||0,l=s?s.widest.width+a:0,c=s?s.highest.height+a:0;return this.isHorizontal()?c*o>l*i?l/o:c/i:c*i<l*o?c/o:l/i}_isVisible(){const t=this.options.display;return t!=="auto"?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const n=this.axis,o=this.chart,i=this.options,{grid:s,position:a,border:l}=i,c=s.offset,d=this.isHorizontal(),h=this.ticks.length+(c?1:0),p=cf(s),g=[],y=l.setContext(this.getContext()),b=y.display?y.width:0,_=b/2,x=function(ie){return Gl(o,ie,b)};let B,R,S,O,I,D,w,E,F,A,P,q;if(a==="top")B=x(this.bottom),D=this.bottom-p,E=B-_,A=x(t.top)+_,q=t.bottom;else if(a==="bottom")B=x(this.top),A=t.top,q=x(t.bottom)-_,D=B+_,E=this.top+p;else if(a==="left")B=x(this.right),I=this.right-p,w=B-_,F=x(t.left)+_,P=t.right;else if(a==="right")B=x(this.left),F=t.left,P=x(t.right)-_,I=B+_,w=this.left+p;else if(n==="x"){if(a==="center")B=x((t.top+t.bottom)/2+.5);else if(an(a)){const ie=Object.keys(a)[0],le=a[ie];B=x(this.chart.scales[ie].getPixelForValue(le))}A=t.top,q=t.bottom,D=B+_,E=D+p}else if(n==="y"){if(a==="center")B=x((t.left+t.right)/2);else if(an(a)){const ie=Object.keys(a)[0],le=a[ie];B=x(this.chart.scales[ie].getPixelForValue(le))}I=B-_,w=I-p,F=t.left,P=t.right}const Q=Zt(i.ticks.maxTicksLimit,h),re=Math.max(1,Math.ceil(h/Q));for(R=0;R<h;R+=re){const ie=this.getContext(R),le=s.setContext(ie),X=l.setContext(ie),K=le.lineWidth,W=le.color,se=X.dash||[],H=X.dashOffset,N=le.tickWidth,j=le.tickColor,Y=le.tickBorderDash||[],J=le.tickBorderDashOffset;S=o9(this,R,c),S!==void 0&&(O=Gl(o,S,K),d?I=w=F=P=O:D=E=A=q=O,g.push({tx1:I,ty1:D,tx2:w,ty2:E,x1:F,y1:A,x2:P,y2:q,width:K,color:W,borderDash:se,borderDashOffset:H,tickWidth:N,tickColor:j,tickBorderDash:Y,tickBorderDashOffset:J}))}return this._ticksLength=h,this._borderValue=B,g}_computeLabelItems(t){const n=this.axis,o=this.options,{position:i,ticks:s}=o,a=this.isHorizontal(),l=this.ticks,{align:c,crossAlign:d,padding:f,mirror:h}=s,p=cf(o.grid),g=p+f,y=h?-f:g,b=-Xs(this.labelRotation),_=[];let x,B,R,S,O,I,D,w,E,F,A,P,q="middle";if(i==="top")I=this.bottom-y,D=this._getXAxisLabelAlignment();else if(i==="bottom")I=this.top+y,D=this._getXAxisLabelAlignment();else if(i==="left"){const re=this._getYAxisLabelAlignment(p);D=re.textAlign,O=re.x}else if(i==="right"){const re=this._getYAxisLabelAlignment(p);D=re.textAlign,O=re.x}else if(n==="x"){if(i==="center")I=(t.top+t.bottom)/2+g;else if(an(i)){const re=Object.keys(i)[0],ie=i[re];I=this.chart.scales[re].getPixelForValue(ie)+g}D=this._getXAxisLabelAlignment()}else if(n==="y"){if(i==="center")O=(t.left+t.right)/2-g;else if(an(i)){const re=Object.keys(i)[0],ie=i[re];O=this.chart.scales[re].getPixelForValue(ie)}D=this._getYAxisLabelAlignment(p).textAlign}n==="y"&&(c==="start"?q="top":c==="end"&&(q="bottom"));const Q=this._getLabelSizes();for(x=0,B=l.length;x<B;++x){R=l[x],S=R.label;const re=s.setContext(this.getContext(x));w=this.getPixelForTick(x)+s.labelOffset,E=this._resolveTickFontOptions(x),F=E.lineHeight,A=xo(S)?S.length:1;const ie=A/2,le=re.color,X=re.textStrokeColor,K=re.textStrokeWidth;let W=D;a?(O=w,D==="inner"&&(x===B-1?W=this.options.reverse?"left":"right":x===0?W=this.options.reverse?"right":"left":W="center"),i==="top"?d==="near"||b!==0?P=-A*F+F/2:d==="center"?P=-Q.highest.height/2-ie*F+F:P=-Q.highest.height+F/2:d==="near"||b!==0?P=F/2:d==="center"?P=Q.highest.height/2-ie*F:P=Q.highest.height-A*F,h&&(P*=-1),b!==0&&!re.showLabelBackdrop&&(O+=F/2*Math.sin(b))):(I=w,P=(1-A)*F/2);let se;if(re.showLabelBackdrop){const H=ni(re.backdropPadding),N=Q.heights[x],j=Q.widths[x];let Y=P-H.top,J=0-H.left;switch(q){case"middle":Y-=N/2;break;case"bottom":Y-=N;break}switch(D){case"center":J-=j/2;break;case"right":J-=j;break;case"inner":x===B-1?J-=j:x>0&&(J-=j/2);break}se={left:J,top:Y,width:j+H.width,height:N+H.height,color:re.backdropColor}}_.push({label:S,font:E,textOffset:P,options:{rotation:b,color:le,strokeColor:X,strokeWidth:K,textAlign:W,textBaseline:q,translation:[O,I],backdrop:se}})}return _}_getXAxisLabelAlignment(){const{position:t,ticks:n}=this.options;if(-Xs(this.labelRotation))return t==="top"?"left":"right";let i="center";return n.align==="start"?i="left":n.align==="end"?i="right":n.align==="inner"&&(i="inner"),i}_getYAxisLabelAlignment(t){const{position:n,ticks:{crossAlign:o,mirror:i,padding:s}}=this.options,a=this._getLabelSizes(),l=t+s,c=a.widest.width;let d,f;return n==="left"?i?(f=this.right+s,o==="near"?d="left":o==="center"?(d="center",f+=c/2):(d="right",f+=c)):(f=this.right-l,o==="near"?d="right":o==="center"?(d="center",f-=c/2):(d="left",f=this.left)):n==="right"?i?(f=this.left+s,o==="near"?d="right":o==="center"?(d="center",f-=c/2):(d="left",f-=c)):(f=this.left+l,o==="near"?d="left":o==="center"?(d="center",f+=c/2):(d="right",f=this.right)):d="right",{textAlign:d,x:f}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,n=this.options.position;if(n==="left"||n==="right")return{top:0,left:this.left,bottom:t.height,right:this.right};if(n==="top"||n==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:t.width}}drawBackground(){const{ctx:t,options:{backgroundColor:n},left:o,top:i,width:s,height:a}=this;n&&(t.save(),t.fillStyle=n,t.fillRect(o,i,s,a),t.restore())}getLineWidthForValue(t){const n=this.options.grid;if(!this._isVisible()||!n.display)return 0;const i=this.ticks.findIndex(s=>s.value===t);return i>=0?n.setContext(this.getContext(i)).lineWidth:0}drawGrid(t){const n=this.options.grid,o=this.ctx,i=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let s,a;const l=(c,d,f)=>{!f.width||!f.color||(o.save(),o.lineWidth=f.width,o.strokeStyle=f.color,o.setLineDash(f.borderDash||[]),o.lineDashOffset=f.borderDashOffset,o.beginPath(),o.moveTo(c.x,c.y),o.lineTo(d.x,d.y),o.stroke(),o.restore())};if(n.display)for(s=0,a=i.length;s<a;++s){const c=i[s];n.drawOnChartArea&&l({x:c.x1,y:c.y1},{x:c.x2,y:c.y2},c),n.drawTicks&&l({x:c.tx1,y:c.ty1},{x:c.tx2,y:c.ty2},{color:c.tickColor,width:c.tickWidth,borderDash:c.tickBorderDash,borderDashOffset:c.tickBorderDashOffset})}}drawBorder(){const{chart:t,ctx:n,options:{border:o,grid:i}}=this,s=o.setContext(this.getContext()),a=o.display?s.width:0;if(!a)return;const l=i.setContext(this.getContext(0)).lineWidth,c=this._borderValue;let d,f,h,p;this.isHorizontal()?(d=Gl(t,this.left,a)-a/2,f=Gl(t,this.right,l)+l/2,h=p=c):(h=Gl(t,this.top,a)-a/2,p=Gl(t,this.bottom,l)+l/2,d=f=c),n.save(),n.lineWidth=s.width,n.strokeStyle=s.color,n.beginPath(),n.moveTo(d,h),n.lineTo(f,p),n.stroke(),n.restore()}drawLabels(t){if(!this.options.ticks.display)return;const o=this.ctx,i=this._computeLabelArea();i&&Xm(o,i);const s=this.getLabelItems(t);for(const a of s){const l=a.options,c=a.font,d=a.label,f=a.textOffset;nf(o,d,0,f,c,l)}i&&Jm(o)}drawTitle(){const{ctx:t,options:{position:n,title:o,reverse:i}}=this;if(!o.display)return;const s=Qo(o.font),a=ni(o.padding),l=o.align;let c=s.lineHeight/2;n==="bottom"||n==="center"||an(n)?(c+=a.bottom,xo(o.text)&&(c+=s.lineHeight*(o.text.length-1))):c+=a.top;const{titleX:d,titleY:f,maxWidth:h,rotation:p}=l9(this,c,n,l);nf(t,o.text,0,0,s,{color:o.color,maxWidth:h,rotation:p,textAlign:a9(l,n,i),textBaseline:"middle",translation:[d,f]})}draw(t){this._isVisible()&&(this.drawBackground(),this.drawGrid(t),this.drawBorder(),this.drawTitle(),this.drawLabels(t))}_layers(){const t=this.options,n=t.ticks&&t.ticks.z||0,o=Zt(t.grid&&t.grid.z,-1),i=Zt(t.border&&t.border.z,0);return!this._isVisible()||this.draw!==hd.prototype.draw?[{z:n,draw:s=>{this.draw(s)}}]:[{z:o,draw:s=>{this.drawBackground(),this.drawGrid(s),this.drawTitle()}},{z:i,draw:()=>{this.drawBorder()}},{z:n,draw:s=>{this.drawLabels(s)}}]}getMatchingVisibleMetas(t){const n=this.chart.getSortedVisibleDatasetMetas(),o=this.axis+"AxisID",i=[];let s,a;for(s=0,a=n.length;s<a;++s){const l=n[s];l[o]===this.id&&(!t||l.type===t)&&i.push(l)}return i}_resolveTickFontOptions(t){const n=this.options.ticks.setContext(this.getContext(t));return Qo(n.font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class dp{constructor(t,n,o){this.type=t,this.scope=n,this.override=o,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){const n=Object.getPrototypeOf(t);let o;u9(n)&&(o=this.register(n));const i=this.items,s=t.id,a=this.scope+"."+s;if(!s)throw new Error("class does not have id: "+t);return s in i||(i[s]=t,c9(t,a,o),this.override&&fo.override(t.id,t.overrides)),a}get(t){return this.items[t]}unregister(t){const n=this.items,o=t.id,i=this.scope;o in n&&delete n[o],i&&o in fo[i]&&(delete fo[i][o],this.override&&delete Kl[o])}}function c9(e,t,n){const o=Gu(Object.create(null),[n?fo.get(n):{},fo.get(t),e.defaults]);fo.set(t,o),e.defaultRoutes&&d9(t,e.defaultRoutes),e.descriptors&&fo.describe(t,e.descriptors)}function d9(e,t){Object.keys(t).forEach(n=>{const o=n.split("."),i=o.pop(),s=[e].concat(o).join("."),a=t[n].split("."),l=a.pop(),c=a.join(".");fo.route(s,i,c,l)})}function u9(e){return"id"in e&&"defaults"in e}let f9=class{constructor(){this.controllers=new dp(rp,"datasets",!0),this.elements=new dp(Vs,"elements"),this.plugins=new dp(Object,"plugins"),this.scales=new dp(hd,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,n,o){[...n].forEach(i=>{const s=o||this._getRegistryForType(i);o||s.isForType(i)||s===this.plugins&&i.id?this._exec(t,s,i):An(i,a=>{const l=o||this._getRegistryForType(a);this._exec(t,l,a)})})}_exec(t,n,o){const i=yy(t);Wn(o["before"+i],[],o),n[t](o),Wn(o["after"+i],[],o)}_getRegistryForType(t){for(let n=0;n<this._typedRegistries.length;n++){const o=this._typedRegistries[n];if(o.isForType(t))return o}return this.plugins}_get(t,n,o){const i=n.get(t);if(i===void 0)throw new Error('"'+t+'" is not a registered '+o+".");return i}};var ls=new f9;class h9{constructor(){this._init=void 0}notify(t,n,o,i){if(n==="beforeInit"&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install")),this._init===void 0)return;const s=i?this._descriptors(t).filter(i):this._descriptors(t),a=this._notify(s,t,n,o);return n==="afterDestroy"&&(this._notify(s,t,"stop"),this._notify(this._init,t,"uninstall"),this._init=void 0),a}_notify(t,n,o,i){i=i||{};for(const s of t){const a=s.plugin,l=a[o],c=[n,i,s.options];if(Wn(l,c,a)===!1&&i.cancelable)return!1}return!0}invalidate(){xn(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;const n=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),n}_createDescriptors(t,n){const o=t&&t.config,i=Zt(o.options&&o.options.plugins,{}),s=m9(o);return i===!1&&!n?[]:g9(t,s,i,n)}_notifyStateChanges(t){const n=this._oldCache||[],o=this._cache,i=(s,a)=>s.filter(l=>!a.some(c=>l.plugin.id===c.plugin.id));this._notify(i(n,o),t,"stop"),this._notify(i(o,n),t,"start")}}function m9(e){const t={},n=[],o=Object.keys(ls.plugins.items);for(let s=0;s<o.length;s++)n.push(ls.getPlugin(o[s]));const i=e.plugins||[];for(let s=0;s<i.length;s++){const a=i[s];n.indexOf(a)===-1&&(n.push(a),t[a.id]=!0)}return{plugins:n,localIds:t}}function p9(e,t){return!t&&e===!1?null:e===!0?{}:e}function g9(e,{plugins:t,localIds:n},o,i){const s=[],a=e.getContext();for(const l of t){const c=l.id,d=p9(o[c],i);d!==null&&s.push({plugin:l,options:b9(e.config,{plugin:l,local:n[c]},d,a)})}return s}function b9(e,{plugin:t,local:n},o,i){const s=e.pluginScopeKeys(t),a=e.getOptionScopes(o,s);return n&&t.defaults&&a.push(t.defaults),e.createResolver(a,i,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function Uy(e,t){const n=fo.datasets[e]||{};return((t.datasets||{})[e]||{}).indexAxis||t.indexAxis||n.indexAxis||"x"}function y9(e,t){let n=e;return e==="_index_"?n=t:e==="_value_"&&(n=t==="x"?"y":"x"),n}function v9(e,t){return e===t?"_index_":"_value_"}function fC(e){if(e==="x"||e==="y"||e==="r")return e}function w9(e){if(e==="top"||e==="bottom")return"x";if(e==="left"||e==="right")return"y"}function Wy(e,...t){if(fC(e))return e;for(const n of t){const o=n.axis||w9(n.position)||e.length>1&&fC(e[0].toLowerCase());if(o)return o}throw new Error(`Cannot determine type of '${e}' axis. Please provide 'axis' or 'position' option.`)}function hC(e,t,n){if(n[t+"AxisID"]===e)return{axis:t}}function k9(e,t){if(t.data&&t.data.datasets){const n=t.data.datasets.filter(o=>o.xAxisID===e||o.yAxisID===e);if(n.length)return hC(e,"x",n[0])||hC(e,"y",n[0])}return{}}function _9(e,t){const n=Kl[e.type]||{scales:{}},o=t.scales||{},i=Uy(e.type,t),s=Object.create(null);return Object.keys(o).forEach(a=>{const l=o[a];if(!an(l))return console.error(`Invalid scale configuration for scale: ${a}`);if(l._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${a}`);const c=Wy(a,l,k9(a,e),fo.scales[l.type]),d=v9(c,i),f=n.scales||{};s[a]=Yu(Object.create(null),[{axis:c},l,f[c],f[d]])}),e.data.datasets.forEach(a=>{const l=a.type||e.type,c=a.indexAxis||Uy(l,t),f=(Kl[l]||{}).scales||{};Object.keys(f).forEach(h=>{const p=y9(h,c),g=a[p+"AxisID"]||p;s[g]=s[g]||Object.create(null),Yu(s[g],[{axis:p},o[g],f[h]])})}),Object.keys(s).forEach(a=>{const l=s[a];Yu(l,[fo.scales[l.type],fo.scale])}),s}function mC(e){const t=e.options||(e.options={});t.plugins=Zt(t.plugins,{}),t.scales=_9(e,t)}function pC(e){return e=e||{},e.datasets=e.datasets||[],e.labels=e.labels||[],e}function x9(e){return e=e||{},e.data=pC(e.data),mC(e),e}const gC=new Map,bC=new Set;function up(e,t){let n=gC.get(e);return n||(n=t(),gC.set(e,n),bC.add(n)),n}const df=(e,t,n)=>{const o=Wl(t,n);o!==void 0&&e.add(o)};let E9=class{constructor(t){this._config=x9(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=pC(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),mC(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return up(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,n){return up(`${t}.transition.${n}`,()=>[[`datasets.${t}.transitions.${n}`,`transitions.${n}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,n){return up(`${t}-${n}`,()=>[[`datasets.${t}.elements.${n}`,`datasets.${t}`,`elements.${n}`,""]])}pluginScopeKeys(t){const n=t.id,o=this.type;return up(`${o}-plugin-${n}`,()=>[[`plugins.${n}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,n){const o=this._scopeCache;let i=o.get(t);return(!i||n)&&(i=new Map,o.set(t,i)),i}getOptionScopes(t,n,o){const{options:i,type:s}=this,a=this._cachedScopes(t,o),l=a.get(n);if(l)return l;const c=new Set;n.forEach(f=>{t&&(c.add(t),f.forEach(h=>df(c,t,h))),f.forEach(h=>df(c,i,h)),f.forEach(h=>df(c,Kl[s]||{},h)),f.forEach(h=>df(c,fo,h)),f.forEach(h=>df(c,Cy,h))});const d=Array.from(c);return d.length===0&&d.push(Object.create(null)),bC.has(n)&&a.set(n,d),d}chartOptionScopes(){const{options:t,type:n}=this;return[t,Kl[n]||{},fo.datasets[n]||{},{type:n},fo,Cy]}resolveNamedOptions(t,n,o,i=[""]){const s={$shared:!0},{resolver:a,subPrefixes:l}=yC(this._resolverCache,t,i);let c=a;if(S9(a,n)){s.$shared=!1,o=Ua(o)?o():o;const d=this.createResolver(t,o,l);c=dd(a,o,d)}for(const d of n)s[d]=c[d];return s}createResolver(t,n,o=[""],i){const{resolver:s}=yC(this._resolverCache,t,o);return an(n)?dd(s,n,void 0,i):s}};function yC(e,t,n){let o=e.get(t);o||(o=new Map,e.set(t,o));const i=n.join();let s=o.get(i);return s||(s={resolver:By(t,n),subPrefixes:n.filter(l=>!l.toLowerCase().includes("hover"))},o.set(i,s)),s}const C9=e=>an(e)&&Object.getOwnPropertyNames(e).some(t=>Ua(e[t]));function S9(e,t){const{isScriptable:n,isIndexable:o}=wE(e);for(const i of t){const s=n(i),a=o(i),l=(a||s)&&e[i];if(s&&(Ua(l)||C9(l))||a&&xo(l))return!0}return!1}var A9="4.5.1";const T9=["top","bottom","left","right","chartArea"];function vC(e,t){return e==="top"||e==="bottom"||T9.indexOf(e)===-1&&t==="x"}function wC(e,t){return function(n,o){return n[e]===o[e]?n[t]-o[t]:n[e]-o[e]}}function kC(e){const t=e.chart,n=t.options.animation;t.notifyPlugins("afterRender"),Wn(n&&n.onComplete,[e],t)}function B9(e){const t=e.chart,n=t.options.animation;Wn(n&&n.onProgress,[e],t)}function _C(e){return Dy()&&typeof e=="string"?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}const fp={},xC=e=>{const t=_C(e);return Object.values(fp).filter(n=>n.canvas===t).pop()};function P9(e,t,n){const o=Object.keys(e);for(const i of o){const s=+i;if(s>=t){const a=e[i];delete e[i],(n>0||s>t)&&(e[s+n]=a)}}}function N9(e,t,n,o){return!n||e.type==="mouseout"?null:o?t:e}class Hy{static defaults=fo;static instances=fp;static overrides=Kl;static registry=ls;static version=A9;static getChart=xC;static register(...t){ls.add(...t),EC()}static unregister(...t){ls.remove(...t),EC()}constructor(t,n){const o=this.config=new E9(n),i=_C(t),s=xC(i);if(s)throw new Error("Canvas is already in use. Chart with ID '"+s.id+"' must be destroyed before the canvas with ID '"+s.canvas.id+"' can be reused.");const a=o.createResolver(o.chartOptionScopes(),this.getContext());this.platform=new(o.platform||Z$(i)),this.platform.updateConfig(o);const l=this.platform.acquireContext(i,a.aspectRatio),c=l&&l.canvas,d=c&&c.height,f=c&&c.width;if(this.id=S8(),this.ctx=l,this.canvas=c,this.width=f,this.height=d,this._options=a,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new h9,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=q8(h=>this.update(h),a.resizeDelay||0),this._dataChanges=[],fp[this.id]=this,!l||!c){console.error("Failed to create chart: can't acquire context from the given item");return}Qs.listen(this,"complete",kC),Qs.listen(this,"progress",B9),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:n},width:o,height:i,_aspectRatio:s}=this;return xn(t)?n&&s?s:i?o/i:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return ls}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():AE(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return bE(this.canvas,this.ctx),this}stop(){return Qs.stop(this),this}resize(t,n){Qs.running(this)?this._resizeBeforeDraw={width:t,height:n}:this._resize(t,n)}_resize(t,n){const o=this.options,i=this.canvas,s=o.maintainAspectRatio&&this.aspectRatio,a=this.platform.getMaximumSize(i,t,n,s),l=o.devicePixelRatio||this.platform.getDevicePixelRatio(),c=this.width?"resize":"attach";this.width=a.width,this.height=a.height,this._aspectRatio=this.aspectRatio,AE(this,l,!0)&&(this.notifyPlugins("resize",{size:a}),Wn(o.onResize,[this,a],this),this.attached&&this._doResize(c)&&this.render())}ensureScalesHaveIDs(){const n=this.options.scales||{};An(n,(o,i)=>{o.id=i})}buildOrUpdateScales(){const t=this.options,n=t.scales,o=this.scales,i=Object.keys(o).reduce((a,l)=>(a[l]=!1,a),{});let s=[];n&&(s=s.concat(Object.keys(n).map(a=>{const l=n[a],c=Wy(a,l),d=c==="r",f=c==="x";return{options:l,dposition:d?"chartArea":f?"bottom":"left",dtype:d?"radialLinear":f?"category":"linear"}}))),An(s,a=>{const l=a.options,c=l.id,d=Wy(c,l),f=Zt(l.type,a.dtype);(l.position===void 0||vC(l.position,d)!==vC(a.dposition))&&(l.position=a.dposition),i[c]=!0;let h=null;if(c in o&&o[c].type===f)h=o[c];else{const p=ls.getScale(f);h=new p({id:c,type:f,ctx:this.ctx,chart:this}),o[h.id]=h}h.init(l,t)}),An(i,(a,l)=>{a||delete o[l]}),An(o,a=>{oi.configure(this,a,a.options),oi.addBox(this,a)})}_updateMetasets(){const t=this._metasets,n=this.data.datasets.length,o=t.length;if(t.sort((i,s)=>i.index-s.index),o>n){for(let i=n;i<o;++i)this._destroyDatasetMeta(i);t.splice(n,o-n)}this._sortedMetasets=t.slice(0).sort(wC("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:n}}=this;t.length>n.length&&delete this._stacks,t.forEach((o,i)=>{n.filter(s=>s===o._dataset).length===0&&this._destroyDatasetMeta(i)})}buildOrUpdateControllers(){const t=[],n=this.data.datasets;let o,i;for(this._removeUnreferencedMetasets(),o=0,i=n.length;o<i;o++){const s=n[o];let a=this.getDatasetMeta(o);const l=s.type||this.config.type;if(a.type&&a.type!==l&&(this._destroyDatasetMeta(o),a=this.getDatasetMeta(o)),a.type=l,a.indexAxis=s.indexAxis||Uy(l,this.options),a.order=s.order||0,a.index=o,a.label=""+s.label,a.visible=this.isDatasetVisible(o),a.controller)a.controller.updateIndex(o),a.controller.linkScales();else{const c=ls.getController(l),{datasetElementType:d,dataElementType:f}=fo.datasets[l];Object.assign(c,{dataElementType:ls.getElement(f),datasetElementType:d&&ls.getElement(d)}),a.controller=new c(this,o),t.push(a.controller)}}return this._updateMetasets(),t}_resetElements(){An(this.data.datasets,(t,n)=>{this.getDatasetMeta(n).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const n=this.config;n.update();const o=this._options=n.createResolver(n.chartOptionScopes(),this.getContext()),i=this._animationsDisabled=!o.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;const s=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let a=0;for(let d=0,f=this.data.datasets.length;d<f;d++){const{controller:h}=this.getDatasetMeta(d),p=!i&&s.indexOf(h)===-1;h.buildOrUpdateElements(p),a=Math.max(+h.getMaxOverflow(),a)}a=this._minPadding=o.layout.autoPadding?a:0,this._updateLayout(a),i||An(s,d=>{d.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(wC("z","_idx"));const{_active:l,_lastEvent:c}=this;c?this._eventHandler(c,!0):l.length&&this._updateHoverStyles(l,l,!0),this.render()}_updateScales(){An(this.scales,t=>{oi.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,n=new Set(Object.keys(this._listeners)),o=new Set(t.events);(!eE(n,o)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,n=this._getUniformDataChanges()||[];for(const{method:o,start:i,count:s}of n){const a=o==="_removeElements"?-s:s;P9(t,i,a)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const n=this.data.datasets.length,o=s=>new Set(t.filter(a=>a[0]===s).map((a,l)=>l+","+a.splice(1).join(","))),i=o(0);for(let s=1;s<n;s++)if(!eE(i,o(s)))return;return Array.from(i).map(s=>s.split(",")).map(s=>({method:s[1],start:+s[2],count:+s[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;oi.update(this,this.width,this.height,t);const n=this.chartArea,o=n.width<=0||n.height<=0;this._layers=[],An(this.boxes,i=>{o&&i.position==="chartArea"||(i.configure&&i.configure(),this._layers.push(...i._layers()))},this),this._layers.forEach((i,s)=>{i._idx=s}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let n=0,o=this.data.datasets.length;n<o;++n)this.getDatasetMeta(n).controller.configure();for(let n=0,o=this.data.datasets.length;n<o;++n)this._updateDataset(n,Ua(t)?t({datasetIndex:n}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,n){const o=this.getDatasetMeta(t),i={meta:o,index:t,mode:n,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",i)!==!1&&(o.controller._update(n),i.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",i))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(Qs.has(this)?this.attached&&!Qs.running(this)&&Qs.start(this):(this.draw(),kC({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:o,height:i}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(o,i)}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const n=this._layers;for(t=0;t<n.length&&n[t].z<=0;++t)n[t].draw(this.chartArea);for(this._drawDatasets();t<n.length;++t)n[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const n=this._sortedMetasets,o=[];let i,s;for(i=0,s=n.length;i<s;++i){const a=n[i];(!t||a.visible)&&o.push(a)}return o}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const t=this.getSortedVisibleDatasetMetas();for(let n=t.length-1;n>=0;--n)this._drawDataset(t[n]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const n=this.ctx,o={meta:t,index:t.index,cancelable:!0},i=LE(this,t);this.notifyPlugins("beforeDatasetDraw",o)!==!1&&(i&&Xm(n,i),t.controller.draw(),i&&Jm(n),o.cancelable=!1,this.notifyPlugins("afterDatasetDraw",o))}isPointInArea(t){return tf(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,n,o,i){const s=T$.modes[n];return typeof s=="function"?s(this,t,o,i):[]}getDatasetMeta(t){const n=this.data.datasets[t],o=this._metasets;let i=o.filter(s=>s&&s._dataset===n).pop();return i||(i={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n&&n.order||0,index:t,_dataset:n,_parsed:[],_sorted:!1},o.push(i)),i}getContext(){return this.$context||(this.$context=Yl(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const n=this.data.datasets[t];if(!n)return!1;const o=this.getDatasetMeta(t);return typeof o.hidden=="boolean"?!o.hidden:!n.hidden}setDatasetVisibility(t,n){const o=this.getDatasetMeta(t);o.hidden=!n}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,n,o){const i=o?"show":"hide",s=this.getDatasetMeta(t),a=s.controller._resolveAnimations(void 0,i);Zu(n)?(s.data[n].hidden=!o,this.update()):(this.setDatasetVisibility(t,o),a.update(s,{visible:o}),this.update(l=>l.datasetIndex===t?i:void 0))}hide(t,n){this._updateVisibility(t,n,!1)}show(t,n){this._updateVisibility(t,n,!0)}_destroyDatasetMeta(t){const n=this._metasets[t];n&&n.controller&&n.controller._destroy(),delete this._metasets[t]}_stop(){let t,n;for(this.stop(),Qs.remove(this),t=0,n=this.data.datasets.length;t<n;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:t,ctx:n}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),bE(t,n),this.platform.releaseContext(n),this.canvas=null,this.ctx=null),delete fp[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const t=this._listeners,n=this.platform,o=(s,a)=>{n.addEventListener(this,s,a),t[s]=a},i=(s,a,l)=>{s.offsetX=a,s.offsetY=l,this._eventHandler(s)};An(this.options.events,s=>o(s,i))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,n=this.platform,o=(c,d)=>{n.addEventListener(this,c,d),t[c]=d},i=(c,d)=>{t[c]&&(n.removeEventListener(this,c,d),delete t[c])},s=(c,d)=>{this.canvas&&this.resize(c,d)};let a;const l=()=>{i("attach",l),this.attached=!0,this.resize(),o("resize",s),o("detach",a)};a=()=>{this.attached=!1,i("resize",s),this._stop(),this._resize(0,0),o("attach",l)},n.isAttached(this.canvas)?l():a()}unbindEvents(){An(this._listeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._listeners={},An(this._responsiveListeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,n,o){const i=o?"set":"remove";let s,a,l,c;for(n==="dataset"&&(s=this.getDatasetMeta(t[0].datasetIndex),s.controller["_"+i+"DatasetHoverStyle"]()),l=0,c=t.length;l<c;++l){a=t[l];const d=a&&this.getDatasetMeta(a.datasetIndex).controller;d&&d[i+"HoverStyle"](a.element,a.datasetIndex,a.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const n=this._active||[],o=t.map(({datasetIndex:s,index:a})=>{const l=this.getDatasetMeta(s);if(!l)throw new Error("No dataset found at index "+s);return{datasetIndex:s,element:l.data[a],index:a}});!Km(o,n)&&(this._active=o,this._lastEvent=null,this._updateHoverStyles(o,n))}notifyPlugins(t,n,o){return this._plugins.notify(this,t,n,o)}isPluginEnabled(t){return this._plugins._cache.filter(n=>n.plugin.id===t).length===1}_updateHoverStyles(t,n,o){const i=this.options.hover,s=(c,d)=>c.filter(f=>!d.some(h=>f.datasetIndex===h.datasetIndex&&f.index===h.index)),a=s(n,t),l=o?t:s(t,n);a.length&&this.updateHoverStyle(a,i.mode,!1),l.length&&i.mode&&this.updateHoverStyle(l,i.mode,!0)}_eventHandler(t,n){const o={event:t,replay:n,cancelable:!0,inChartArea:this.isPointInArea(t)},i=a=>(a.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",o,i)===!1)return;const s=this._handleEvent(t,n,o.inChartArea);return o.cancelable=!1,this.notifyPlugins("afterEvent",o,i),(s||o.changed)&&this.render(),this}_handleEvent(t,n,o){const{_active:i=[],options:s}=this,a=n,l=this._getActiveElements(t,i,o,a),c=D8(t),d=N9(t,this._lastEvent,o,c);o&&(this._lastEvent=null,Wn(s.onHover,[t,l,this],this),c&&Wn(s.onClick,[t,l,this],this));const f=!Km(l,i);return(f||n)&&(this._active=l,this._updateHoverStyles(l,i,n)),this._lastEvent=d,f}_getActiveElements(t,n,o,i){if(t.type==="mouseout")return[];if(!o)return n;const s=this.options.hover;return this.getElementsAtEventForMode(t,s.mode,s,i)}}function EC(){return An(Hy.instances,e=>e._plugins.invalidate())}function D9(e,t,n){const{startAngle:o,x:i,y:s,outerRadius:a,innerRadius:l,options:c}=t,{borderWidth:d,borderJoinStyle:f}=c,h=Math.min(d/a,Fr(o-n));if(e.beginPath(),e.arc(i,s,a-d/2,o+h/2,n-h/2),l>0){const p=Math.min(d/l,Fr(o-n));e.arc(i,s,l+d/2,n-p/2,o+p/2,!0)}else{const p=Math.min(d/2,a*Fr(o-n));if(f==="round")e.arc(i,s,p,n-Tn/2,o+Tn/2,!0);else if(f==="bevel"){const g=2*p*p,y=-g*Math.cos(n+Tn/2)+i,b=-g*Math.sin(n+Tn/2)+s,_=g*Math.cos(o+Tn/2)+i,x=g*Math.sin(o+Tn/2)+s;e.lineTo(y,b),e.lineTo(_,x)}}e.closePath(),e.moveTo(0,0),e.rect(0,0,e.canvas.width,e.canvas.height),e.clip("evenodd")}function M9(e,t,n){const{startAngle:o,pixelMargin:i,x:s,y:a,outerRadius:l,innerRadius:c}=t;let d=i/l;e.beginPath(),e.arc(s,a,l,o-d,n+d),c>i?(d=i/c,e.arc(s,a,c,n+d,o-d,!0)):e.arc(s,a,i,n+Do,o-Do),e.closePath(),e.clip()}function R9(e){return Ty(e,["outerStart","outerEnd","innerStart","innerEnd"])}function I9(e,t,n,o){const i=R9(e.options.borderRadius),s=(n-t)/2,a=Math.min(s,o*t/2),l=c=>{const d=(n-Math.min(s,c))*o/2;return Xo(c,0,Math.min(s,d))};return{outerStart:l(i.outerStart),outerEnd:l(i.outerEnd),innerStart:Xo(i.innerStart,0,a),innerEnd:Xo(i.innerEnd,0,a)}}function md(e,t,n,o){return{x:n+e*Math.cos(t),y:o+e*Math.sin(t)}}function hp(e,t,n,o,i,s){const{x:a,y:l,startAngle:c,pixelMargin:d,innerRadius:f}=t,h=Math.max(t.outerRadius+o+n-d,0),p=f>0?f+o+n+d:0;let g=0;const y=i-c;if(o){const re=f>0?f-o:0,ie=h>0?h-o:0,le=(re+ie)/2,X=le!==0?y*le/(le+o):y;g=(y-X)/2}const b=Math.max(.001,y*h-n/Tn)/h,_=(y-b)/2,x=c+_+g,B=i-_-g,{outerStart:R,outerEnd:S,innerStart:O,innerEnd:I}=I9(t,p,h,B-x),D=h-R,w=h-S,E=x+R/D,F=B-S/w,A=p+O,P=p+I,q=x+O/A,Q=B-I/P;if(e.beginPath(),s){const re=(E+F)/2;if(e.arc(a,l,h,E,re),e.arc(a,l,h,re,F),S>0){const K=md(w,F,a,l);e.arc(K.x,K.y,S,F,B+Do)}const ie=md(P,B,a,l);if(e.lineTo(ie.x,ie.y),I>0){const K=md(P,Q,a,l);e.arc(K.x,K.y,I,B+Do,Q+Math.PI)}const le=(B-I/p+(x+O/p))/2;if(e.arc(a,l,p,B-I/p,le,!0),e.arc(a,l,p,le,x+O/p,!0),O>0){const K=md(A,q,a,l);e.arc(K.x,K.y,O,q+Math.PI,x-Do)}const X=md(D,x,a,l);if(e.lineTo(X.x,X.y),R>0){const K=md(D,E,a,l);e.arc(K.x,K.y,R,x-Do,E)}}else{e.moveTo(a,l);const re=Math.cos(E)*h+a,ie=Math.sin(E)*h+l;e.lineTo(re,ie);const le=Math.cos(F)*h+a,X=Math.sin(F)*h+l;e.lineTo(le,X)}e.closePath()}function O9(e,t,n,o,i){const{fullCircles:s,startAngle:a,circumference:l}=t;let c=t.endAngle;if(s){hp(e,t,n,o,c,i);for(let d=0;d<s;++d)e.fill();isNaN(l)||(c=a+(l%Vn||Vn))}return hp(e,t,n,o,c,i),e.fill(),c}function L9(e,t,n,o,i){const{fullCircles:s,startAngle:a,circumference:l,options:c}=t,{borderWidth:d,borderJoinStyle:f,borderDash:h,borderDashOffset:p,borderRadius:g}=c,y=c.borderAlign==="inner";if(!d)return;e.setLineDash(h||[]),e.lineDashOffset=p,y?(e.lineWidth=d*2,e.lineJoin=f||"round"):(e.lineWidth=d,e.lineJoin=f||"bevel");let b=t.endAngle;if(s){hp(e,t,n,o,b,i);for(let _=0;_<s;++_)e.stroke();isNaN(l)||(b=a+(l%Vn||Vn))}y&&M9(e,t,b),c.selfJoin&&b-a>=Tn&&g===0&&f!=="miter"&&D9(e,t,b),s||(hp(e,t,n,o,b,i),e.stroke())}class F9 extends Vs{static id="arc";static defaults={borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0,selfJoin:!1};static defaultRoutes={backgroundColor:"backgroundColor"};static descriptors={_scriptable:!0,_indexable:t=>t!=="borderDash"};circumference;endAngle;fullCircles;innerRadius;outerRadius;pixelMargin;startAngle;constructor(t){super(),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,t&&Object.assign(this,t)}inRange(t,n,o){const i=this.getProps(["x","y"],o),{angle:s,distance:a}=iE(i,{x:t,y:n}),{startAngle:l,endAngle:c,innerRadius:d,outerRadius:f,circumference:h}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],o),p=(this.options.spacing+this.options.borderWidth)/2,g=Zt(h,c-l),y=Qu(s,l,c)&&l!==c,b=g>=Vn||y,_=Js(a,d+p,f+p);return b&&_}getCenterPoint(t){const{x:n,y:o,startAngle:i,endAngle:s,innerRadius:a,outerRadius:l}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],t),{offset:c,spacing:d}=this.options,f=(i+s)/2,h=(a+l+d+c)/2;return{x:n+Math.cos(f)*h,y:o+Math.sin(f)*h}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){const{options:n,circumference:o}=this,i=(n.offset||0)/4,s=(n.spacing||0)/2,a=n.circular;if(this.pixelMargin=n.borderAlign==="inner"?.33:0,this.fullCircles=o>Vn?Math.floor(o/Vn):0,o===0||this.innerRadius<0||this.outerRadius<0)return;t.save();const l=(this.startAngle+this.endAngle)/2;t.translate(Math.cos(l)*i,Math.sin(l)*i);const c=1-Math.sin(Math.min(Tn,o||0)),d=i*c;t.fillStyle=n.backgroundColor,t.strokeStyle=n.borderColor,O9(t,this,d,s,a),L9(t,this,d,s,a),t.restore()}}function CC(e,t,n=t){e.lineCap=Zt(n.borderCapStyle,t.borderCapStyle),e.setLineDash(Zt(n.borderDash,t.borderDash)),e.lineDashOffset=Zt(n.borderDashOffset,t.borderDashOffset),e.lineJoin=Zt(n.borderJoinStyle,t.borderJoinStyle),e.lineWidth=Zt(n.borderWidth,t.borderWidth),e.strokeStyle=Zt(n.borderColor,t.borderColor)}function $9(e,t,n){e.lineTo(n.x,n.y)}function z9(e){return e.stepped?i7:e.tension||e.cubicInterpolationMode==="monotone"?s7:$9}function SC(e,t,n={}){const o=e.length,{start:i=0,end:s=o-1}=n,{start:a,end:l}=t,c=Math.max(i,a),d=Math.min(s,l),f=i<a&&s<a||i>l&&s>l;return{count:o,start:c,loop:t.loop,ilen:d<c&&!f?o+d-c:d-c}}function j9(e,t,n,o){const{points:i,options:s}=t,{count:a,start:l,loop:c,ilen:d}=SC(i,n,o),f=z9(s);let{move:h=!0,reverse:p}=o||{},g,y,b;for(g=0;g<=d;++g)y=i[(l+(p?d-g:g))%a],!y.skip&&(h?(e.moveTo(y.x,y.y),h=!1):f(e,b,y,p,s.stepped),b=y);return c&&(y=i[(l+(p?d:0))%a],f(e,b,y,p,s.stepped)),!!c}function U9(e,t,n,o){const i=t.points,{count:s,start:a,ilen:l}=SC(i,n,o),{move:c=!0,reverse:d}=o||{};let f=0,h=0,p,g,y,b,_,x;const B=S=>(a+(d?l-S:S))%s,R=()=>{b!==_&&(e.lineTo(f,_),e.lineTo(f,b),e.lineTo(f,x))};for(c&&(g=i[B(0)],e.moveTo(g.x,g.y)),p=0;p<=l;++p){if(g=i[B(p)],g.skip)continue;const S=g.x,O=g.y,I=S|0;I===y?(O<b?b=O:O>_&&(_=O),f=(h*f+S)/++h):(R(),e.lineTo(S,O),y=I,h=0,b=_=O),x=O}R()}function qy(e){const t=e.options,n=t.borderDash&&t.borderDash.length;return!e._decimated&&!e._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!n?U9:j9}function W9(e){return e.stepped?F7:e.tension||e.cubicInterpolationMode==="monotone"?$7:Jl}function H9(e,t,n,o){let i=t._path;i||(i=t._path=new Path2D,t.path(i,n,o)&&i.closePath()),CC(e,t.options),e.stroke(i)}function q9(e,t,n,o){const{segments:i,options:s}=t,a=qy(t);for(const l of i)CC(e,s,l.style),e.beginPath(),a(e,t,l,{start:n,end:n+o-1})&&e.closePath(),e.stroke()}const K9=typeof Path2D=="function";function G9(e,t,n,o){K9&&!t.options.segment?H9(e,t,n,o):q9(e,t,n,o)}class mp extends Vs{static id="line";static defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};static descriptors={_scriptable:!0,_indexable:t=>t!=="borderDash"&&t!=="fill"};constructor(t){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,t&&Object.assign(this,t)}updateControlPoints(t,n){const o=this.options;if((o.tension||o.cubicInterpolationMode==="monotone")&&!o.stepped&&!this._pointsUpdated){const i=o.spanGaps?this._loop:this._fullLoop;P7(this._points,o,t,i,n),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=q7(this,this.options.segment))}first(){const t=this.segments,n=this.points;return t.length&&n[t[0].start]}last(){const t=this.segments,n=this.points,o=t.length;return o&&n[t[o-1].end]}interpolate(t,n){const o=this.options,i=t[n],s=this.points,a=RE(this,{property:n,start:i,end:i});if(!a.length)return;const l=[],c=W9(o);let d,f;for(d=0,f=a.length;d<f;++d){const{start:h,end:p}=a[d],g=s[h],y=s[p];if(g===y){l.push(g);continue}const b=Math.abs((i-g[n])/(y[n]-g[n])),_=c(g,y,b,o.stepped);_[n]=t[n],l.push(_)}return l.length===1?l[0]:l}pathSegment(t,n,o){return qy(this)(t,this,n,o)}path(t,n,o){const i=this.segments,s=qy(this);let a=this._loop;n=n||0,o=o||this.points.length-n;for(const l of i)a&=s(t,this,l,{start:n,end:n+o-1});return!!a}draw(t,n,o,i){const s=this.options||{};(this.points||[]).length&&s.borderWidth&&(t.save(),G9(t,this,o,i),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}function AC(e,t,n,o){const i=e.options,{[n]:s}=e.getProps([n],o);return Math.abs(t-s)<i.radius+i.hitRadius}class Y9 extends Vs{static id="point";parsed;skip;stop;static defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(t){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,t&&Object.assign(this,t)}inRange(t,n,o){const i=this.options,{x:s,y:a}=this.getProps(["x","y"],o);return Math.pow(t-s,2)+Math.pow(n-a,2)<Math.pow(i.hitRadius+i.radius,2)}inXRange(t,n){return AC(this,t,"x",n)}inYRange(t,n){return AC(this,t,"y",n)}getCenterPoint(t){const{x:n,y:o}=this.getProps(["x","y"],t);return{x:n,y:o}}size(t){t=t||this.options||{};let n=t.radius||0;n=Math.max(n,n&&t.hoverRadius||0);const o=n&&t.borderWidth||0;return(n+o)*2}draw(t,n){const o=this.options;this.skip||o.radius<.1||!tf(this,n,this.size(o)/2)||(t.strokeStyle=o.borderColor,t.lineWidth=o.borderWidth,t.fillStyle=o.backgroundColor,Ay(t,o,this.x,this.y))}getRange(){const t=this.options||{};return t.radius+t.hitRadius}}function TC(e,t){const{x:n,y:o,base:i,width:s,height:a}=e.getProps(["x","y","base","width","height"],t);let l,c,d,f,h;return e.horizontal?(h=a/2,l=Math.min(n,i),c=Math.max(n,i),d=o-h,f=o+h):(h=s/2,l=n-h,c=n+h,d=Math.min(o,i),f=Math.max(o,i)),{left:l,top:d,right:c,bottom:f}}function Ha(e,t,n,o){return e?0:Xo(t,n,o)}function Z9(e,t,n){const o=e.options.borderWidth,i=e.borderSkipped,s=vE(o);return{t:Ha(i.top,s.top,0,n),r:Ha(i.right,s.right,0,t),b:Ha(i.bottom,s.bottom,0,n),l:Ha(i.left,s.left,0,t)}}function X9(e,t,n){const{enableBorderRadius:o}=e.getProps(["enableBorderRadius"]),i=e.options.borderRadius,s=cd(i),a=Math.min(t,n),l=e.borderSkipped,c=o||an(i);return{topLeft:Ha(!c||l.top||l.left,s.topLeft,0,a),topRight:Ha(!c||l.top||l.right,s.topRight,0,a),bottomLeft:Ha(!c||l.bottom||l.left,s.bottomLeft,0,a),bottomRight:Ha(!c||l.bottom||l.right,s.bottomRight,0,a)}}function J9(e){const t=TC(e),n=t.right-t.left,o=t.bottom-t.top,i=Z9(e,n/2,o/2),s=X9(e,n/2,o/2);return{outer:{x:t.left,y:t.top,w:n,h:o,radius:s},inner:{x:t.left+i.l,y:t.top+i.t,w:n-i.l-i.r,h:o-i.t-i.b,radius:{topLeft:Math.max(0,s.topLeft-Math.max(i.t,i.l)),topRight:Math.max(0,s.topRight-Math.max(i.t,i.r)),bottomLeft:Math.max(0,s.bottomLeft-Math.max(i.b,i.l)),bottomRight:Math.max(0,s.bottomRight-Math.max(i.b,i.r))}}}}function Ky(e,t,n,o){const i=t===null,s=n===null,l=e&&!(i&&s)&&TC(e,o);return l&&(i||Js(t,l.left,l.right))&&(s||Js(n,l.top,l.bottom))}function Q9(e){return e.topLeft||e.topRight||e.bottomLeft||e.bottomRight}function V9(e,t){e.rect(t.x,t.y,t.w,t.h)}function Gy(e,t,n={}){const o=e.x!==n.x?-t:0,i=e.y!==n.y?-t:0,s=(e.x+e.w!==n.x+n.w?t:0)-o,a=(e.y+e.h!==n.y+n.h?t:0)-i;return{x:e.x+o,y:e.y+i,w:e.w+s,h:e.h+a,radius:e.radius}}class ez extends Vs{static id="bar";static defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,t&&Object.assign(this,t)}draw(t){const{inflateAmount:n,options:{borderColor:o,backgroundColor:i}}=this,{inner:s,outer:a}=J9(this),l=Q9(a.radius)?Qm:V9;t.save(),(a.w!==s.w||a.h!==s.h)&&(t.beginPath(),l(t,Gy(a,n,s)),t.clip(),l(t,Gy(s,-n,a)),t.fillStyle=o,t.fill("evenodd")),t.beginPath(),l(t,Gy(s,n)),t.fillStyle=i,t.fill(),t.restore()}inRange(t,n,o){return Ky(this,t,n,o)}inXRange(t,n){return Ky(this,t,null,n)}inYRange(t,n){return Ky(this,null,t,n)}getCenterPoint(t){const{x:n,y:o,base:i,horizontal:s}=this.getProps(["x","y","base","horizontal"],t);return{x:s?(n+i)/2:n,y:s?o:(o+i)/2}}getRange(t){return t==="x"?this.width/2:this.height/2}}function tz(e,t,n){const o=e.segments,i=e.points,s=t.points,a=[];for(const l of o){let{start:c,end:d}=l;d=pp(c,d,i);const f=Yy(n,i[c],i[d],l.loop);if(!t.segments){a.push({source:l,target:f,start:i[c],end:i[d]});continue}const h=RE(t,f);for(const p of h){const g=Yy(n,s[p.start],s[p.end],p.loop),y=ME(l,i,g);for(const b of y)a.push({source:b,target:p,start:{[n]:BC(f,g,"start",Math.max)},end:{[n]:BC(f,g,"end",Math.min)}})}}return a}function Yy(e,t,n,o){if(o)return;let i=t[e],s=n[e];return e==="angle"&&(i=Fr(i),s=Fr(s)),{property:e,start:i,end:s}}function nz(e,t){const{x:n=null,y:o=null}=e||{},i=t.points,s=[];return t.segments.forEach(({start:a,end:l})=>{l=pp(a,l,i);const c=i[a],d=i[l];o!==null?(s.push({x:c.x,y:o}),s.push({x:d.x,y:o})):n!==null&&(s.push({x:n,y:c.y}),s.push({x:n,y:d.y}))}),s}function pp(e,t,n){for(;t>e;t--){const o=n[t];if(!isNaN(o.x)&&!isNaN(o.y))break}return t}function BC(e,t,n,o){return e&&t?o(e[n],t[n]):e?e[n]:t?t[n]:0}function PC(e,t){let n=[],o=!1;return xo(e)?(o=!0,n=e):n=nz(e,t),n.length?new mp({points:n,options:{tension:0},_loop:o,_fullLoop:o}):null}function NC(e){return e&&e.fill!==!1}function oz(e,t,n){let i=e[t].fill;const s=[t];let a;if(!n)return i;for(;i!==!1&&s.indexOf(i)===-1;){if(!Zo(i))return i;if(a=e[i],!a)return!1;if(a.visible)return i;s.push(i),i=a.fill}return!1}function rz(e,t,n){const o=lz(e);if(an(o))return isNaN(o.value)?!1:o;let i=parseFloat(o);return Zo(i)&&Math.floor(i)===i?iz(o[0],t,i,n):["origin","start","end","stack","shape"].indexOf(o)>=0&&o}function iz(e,t,n,o){return(e==="-"||e==="+")&&(n=t+n),n===t||n<0||n>=o?!1:n}function sz(e,t){let n=null;return e==="start"?n=t.bottom:e==="end"?n=t.top:an(e)?n=t.getPixelForValue(e.value):t.getBasePixel&&(n=t.getBasePixel()),n}function az(e,t,n){let o;return e==="start"?o=n:e==="end"?o=t.options.reverse?t.min:t.max:an(e)?o=e.value:o=t.getBaseValue(),o}function lz(e){const t=e.options,n=t.fill;let o=Zt(n&&n.target,n);return o===void 0&&(o=!!t.backgroundColor),o===!1||o===null?!1:o===!0?"origin":o}function cz(e){const{scale:t,index:n,line:o}=e,i=[],s=o.segments,a=o.points,l=dz(t,n);l.push(PC({x:null,y:t.bottom},o));for(let c=0;c<s.length;c++){const d=s[c];for(let f=d.start;f<=d.end;f++)uz(i,a[f],l)}return new mp({points:i,options:{}})}function dz(e,t){const n=[],o=e.getMatchingVisibleMetas("line");for(let i=0;i<o.length;i++){const s=o[i];if(s.index===t)break;s.hidden||n.unshift(s.dataset)}return n}function uz(e,t,n){const o=[];for(let i=0;i<n.length;i++){const s=n[i],{first:a,last:l,point:c}=fz(s,t,"x");if(!(!c||a&&l)){if(a)o.unshift(c);else if(e.push(c),!l)break}}e.push(...o)}function fz(e,t,n){const o=e.interpolate(t,n);if(!o)return{};const i=o[n],s=e.segments,a=e.points;let l=!1,c=!1;for(let d=0;d<s.length;d++){const f=s[d],h=a[f.start][n],p=a[f.end][n];if(Js(i,h,p)){l=i===h,c=i===p;break}}return{first:l,last:c,point:o}}class DC{constructor(t){this.x=t.x,this.y=t.y,this.radius=t.radius}pathSegment(t,n,o){const{x:i,y:s,radius:a}=this;return n=n||{start:0,end:Vn},t.arc(i,s,a,n.end,n.start,!0),!o.bounds}interpolate(t){const{x:n,y:o,radius:i}=this,s=t.angle;return{x:n+Math.cos(s)*i,y:o+Math.sin(s)*i,angle:s}}}function hz(e){const{chart:t,fill:n,line:o}=e;if(Zo(n))return mz(t,n);if(n==="stack")return cz(e);if(n==="shape")return!0;const i=pz(e);return i instanceof DC?i:PC(i,o)}function mz(e,t){const n=e.getDatasetMeta(t);return n&&e.isDatasetVisible(t)?n.dataset:null}function pz(e){return(e.scale||{}).getPointPositionForValue?bz(e):gz(e)}function gz(e){const{scale:t={},fill:n}=e,o=sz(n,t);if(Zo(o)){const i=t.isHorizontal();return{x:i?o:null,y:i?null:o}}return null}function bz(e){const{scale:t,fill:n}=e,o=t.options,i=t.getLabels().length,s=o.reverse?t.max:t.min,a=az(n,t,s),l=[];if(o.grid.circular){const c=t.getPointPositionForValue(0,s);return new DC({x:c.x,y:c.y,radius:t.getDistanceFromCenterForValue(a)})}for(let c=0;c<i;++c)l.push(t.getPointPositionForValue(c,a));return l}function Zy(e,t,n){const o=hz(t),{chart:i,index:s,line:a,scale:l,axis:c}=t,d=a.options,f=d.fill,h=d.backgroundColor,{above:p=h,below:g=h}=f||{},y=i.getDatasetMeta(s),b=LE(i,y);o&&a.points.length&&(Xm(e,n),yz(e,{line:a,target:o,above:p,below:g,area:n,scale:l,axis:c,clip:b}),Jm(e))}function yz(e,t){const{line:n,target:o,above:i,below:s,area:a,scale:l,clip:c}=t,d=n._loop?"angle":t.axis;e.save();let f=s;s!==i&&(d==="x"?(MC(e,o,a.top),Xy(e,{line:n,target:o,color:i,scale:l,property:d,clip:c}),e.restore(),e.save(),MC(e,o,a.bottom)):d==="y"&&(RC(e,o,a.left),Xy(e,{line:n,target:o,color:s,scale:l,property:d,clip:c}),e.restore(),e.save(),RC(e,o,a.right),f=i)),Xy(e,{line:n,target:o,color:f,scale:l,property:d,clip:c}),e.restore()}function MC(e,t,n){const{segments:o,points:i}=t;let s=!0,a=!1;e.beginPath();for(const l of o){const{start:c,end:d}=l,f=i[c],h=i[pp(c,d,i)];s?(e.moveTo(f.x,f.y),s=!1):(e.lineTo(f.x,n),e.lineTo(f.x,f.y)),a=!!t.pathSegment(e,l,{move:a}),a?e.closePath():e.lineTo(h.x,n)}e.lineTo(t.first().x,n),e.closePath(),e.clip()}function RC(e,t,n){const{segments:o,points:i}=t;let s=!0,a=!1;e.beginPath();for(const l of o){const{start:c,end:d}=l,f=i[c],h=i[pp(c,d,i)];s?(e.moveTo(f.x,f.y),s=!1):(e.lineTo(n,f.y),e.lineTo(f.x,f.y)),a=!!t.pathSegment(e,l,{move:a}),a?e.closePath():e.lineTo(n,h.y)}e.lineTo(n,t.first().y),e.closePath(),e.clip()}function Xy(e,t){const{line:n,target:o,property:i,color:s,scale:a,clip:l}=t,c=tz(n,o,i);for(const{source:d,target:f,start:h,end:p}of c){const{style:{backgroundColor:g=s}={}}=d,y=o!==!0;e.save(),e.fillStyle=g,vz(e,a,l,y&&Yy(i,h,p)),e.beginPath();const b=!!n.pathSegment(e,d);let _;if(y){b?e.closePath():IC(e,o,p,i);const x=!!o.pathSegment(e,f,{move:b,reverse:!0});_=b&&x,_||IC(e,o,h,i)}e.closePath(),e.fill(_?"evenodd":"nonzero"),e.restore()}}function vz(e,t,n,o){const i=t.chart.chartArea,{property:s,start:a,end:l}=o||{};if(s==="x"||s==="y"){let c,d,f,h;s==="x"?(c=a,d=i.top,f=l,h=i.bottom):(c=i.left,d=a,f=i.right,h=l),e.beginPath(),n&&(c=Math.max(c,n.left),f=Math.min(f,n.right),d=Math.max(d,n.top),h=Math.min(h,n.bottom)),e.rect(c,d,f-c,h-d),e.clip()}}function IC(e,t,n,o){const i=t.interpolate(n,o);i&&e.lineTo(i.x,i.y)}var wz={id:"filler",afterDatasetsUpdate(e,t,n){const o=(e.data.datasets||[]).length,i=[];let s,a,l,c;for(a=0;a<o;++a)s=e.getDatasetMeta(a),l=s.dataset,c=null,l&&l.options&&l instanceof mp&&(c={visible:e.isDatasetVisible(a),index:a,fill:rz(l,a,o),chart:e,axis:s.controller.options.indexAxis,scale:s.vScale,line:l}),s.$filler=c,i.push(c);for(a=0;a<o;++a)c=i[a],!(!c||c.fill===!1)&&(c.fill=oz(i,a,n.propagate))},beforeDraw(e,t,n){const o=n.drawTime==="beforeDraw",i=e.getSortedVisibleDatasetMetas(),s=e.chartArea;for(let a=i.length-1;a>=0;--a){const l=i[a].$filler;l&&(l.line.updateControlPoints(s,l.axis),o&&l.fill&&Zy(e.ctx,l,s))}},beforeDatasetsDraw(e,t,n){if(n.drawTime!=="beforeDatasetsDraw")return;const o=e.getSortedVisibleDatasetMetas();for(let i=o.length-1;i>=0;--i){const s=o[i].$filler;NC(s)&&Zy(e.ctx,s,e.chartArea)}},beforeDatasetDraw(e,t,n){const o=t.meta.$filler;!NC(o)||n.drawTime!=="beforeDatasetDraw"||Zy(e.ctx,o,e.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const OC=(e,t)=>{let{boxHeight:n=t,boxWidth:o=t}=e;return e.usePointStyle&&(n=Math.min(n,t),o=e.pointStyleWidth||Math.min(o,t)),{boxWidth:o,boxHeight:n,itemHeight:Math.max(t,n)}},kz=(e,t)=>e!==null&&t!==null&&e.datasetIndex===t.datasetIndex&&e.index===t.index;class LC extends Vs{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,n,o){this.maxWidth=t,this.maxHeight=n,this._margins=o,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const t=this.options.labels||{};let n=Wn(t.generateLabels,[this.chart],this)||[];t.filter&&(n=n.filter(o=>t.filter(o,this.chart.data))),t.sort&&(n=n.sort((o,i)=>t.sort(o,i,this.chart.data))),this.options.reverse&&n.reverse(),this.legendItems=n}fit(){const{options:t,ctx:n}=this;if(!t.display){this.width=this.height=0;return}const o=t.labels,i=Qo(o.font),s=i.size,a=this._computeTitleHeight(),{boxWidth:l,itemHeight:c}=OC(o,s);let d,f;n.font=i.string,this.isHorizontal()?(d=this.maxWidth,f=this._fitRows(a,s,l,c)+10):(f=this.maxHeight,d=this._fitCols(a,i,l,c)+10),this.width=Math.min(d,t.maxWidth||this.maxWidth),this.height=Math.min(f,t.maxHeight||this.maxHeight)}_fitRows(t,n,o,i){const{ctx:s,maxWidth:a,options:{labels:{padding:l}}}=this,c=this.legendHitBoxes=[],d=this.lineWidths=[0],f=i+l;let h=t;s.textAlign="left",s.textBaseline="middle";let p=-1,g=-f;return this.legendItems.forEach((y,b)=>{const _=o+n/2+s.measureText(y.text).width;(b===0||d[d.length-1]+_+2*l>a)&&(h+=f,d[d.length-(b>0?0:1)]=0,g+=f,p++),c[b]={left:0,top:g,row:p,width:_,height:i},d[d.length-1]+=_+l}),h}_fitCols(t,n,o,i){const{ctx:s,maxHeight:a,options:{labels:{padding:l}}}=this,c=this.legendHitBoxes=[],d=this.columnSizes=[],f=a-t;let h=l,p=0,g=0,y=0,b=0;return this.legendItems.forEach((_,x)=>{const{itemWidth:B,itemHeight:R}=_z(o,n,s,_,i);x>0&&g+R+2*l>f&&(h+=p+l,d.push({width:p,height:g}),y+=p+l,b++,p=g=0),c[x]={left:y,top:g,col:b,width:B,height:R},p=Math.max(p,B),g+=R+l}),h+=p,d.push({width:p,height:g}),h}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:n,options:{align:o,labels:{padding:i},rtl:s}}=this,a=fd(s,this.left,this.width);if(this.isHorizontal()){let l=0,c=Jo(o,this.left+i,this.right-this.lineWidths[l]);for(const d of n)l!==d.row&&(l=d.row,c=Jo(o,this.left+i,this.right-this.lineWidths[l])),d.top+=this.top+t+i,d.left=a.leftForLtr(a.x(c),d.width),c+=d.width+i}else{let l=0,c=Jo(o,this.top+t+i,this.bottom-this.columnSizes[l].height);for(const d of n)d.col!==l&&(l=d.col,c=Jo(o,this.top+t+i,this.bottom-this.columnSizes[l].height)),d.top=c,d.left+=this.left+i,d.left=a.leftForLtr(a.x(d.left),d.width),c+=d.height+i}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const t=this.ctx;Xm(t,this),this._draw(),Jm(t)}}_draw(){const{options:t,columnSizes:n,lineWidths:o,ctx:i}=this,{align:s,labels:a}=t,l=fo.color,c=fd(t.rtl,this.left,this.width),d=Qo(a.font),{padding:f}=a,h=d.size,p=h/2;let g;this.drawTitle(),i.textAlign=c.textAlign("left"),i.textBaseline="middle",i.lineWidth=.5,i.font=d.string;const{boxWidth:y,boxHeight:b,itemHeight:_}=OC(a,h),x=function(I,D,w){if(isNaN(y)||y<=0||isNaN(b)||b<0)return;i.save();const E=Zt(w.lineWidth,1);if(i.fillStyle=Zt(w.fillStyle,l),i.lineCap=Zt(w.lineCap,"butt"),i.lineDashOffset=Zt(w.lineDashOffset,0),i.lineJoin=Zt(w.lineJoin,"miter"),i.lineWidth=E,i.strokeStyle=Zt(w.strokeStyle,l),i.setLineDash(Zt(w.lineDash,[])),a.usePointStyle){const F={radius:b*Math.SQRT2/2,pointStyle:w.pointStyle,rotation:w.rotation,borderWidth:E},A=c.xPlus(I,y/2),P=D+p;yE(i,F,A,P,a.pointStyleWidth&&y)}else{const F=D+Math.max((h-b)/2,0),A=c.leftForLtr(I,y),P=cd(w.borderRadius);i.beginPath(),Object.values(P).some(q=>q!==0)?Qm(i,{x:A,y:F,w:y,h:b,radius:P}):i.rect(A,F,y,b),i.fill(),E!==0&&i.stroke()}i.restore()},B=function(I,D,w){nf(i,w.text,I,D+_/2,d,{strikethrough:w.hidden,textAlign:c.textAlign(w.textAlign)})},R=this.isHorizontal(),S=this._computeTitleHeight();R?g={x:Jo(s,this.left+f,this.right-o[0]),y:this.top+f+S,line:0}:g={x:this.left+f,y:Jo(s,this.top+S+f,this.bottom-n[0].height),line:0},BE(this.ctx,t.textDirection);const O=_+f;this.legendItems.forEach((I,D)=>{i.strokeStyle=I.fontColor,i.fillStyle=I.fontColor;const w=i.measureText(I.text).width,E=c.textAlign(I.textAlign||(I.textAlign=a.textAlign)),F=y+p+w;let A=g.x,P=g.y;c.setWidth(this.width),R?D>0&&A+F+f>this.right&&(P=g.y+=O,g.line++,A=g.x=Jo(s,this.left+f,this.right-o[g.line])):D>0&&P+O>this.bottom&&(A=g.x=A+n[g.line].width+f,g.line++,P=g.y=Jo(s,this.top+S+f,this.bottom-n[g.line].height));const q=c.x(A);if(x(q,P,I),A=K8(E,A+y+p,R?A+F:this.right,t.rtl),B(c.x(A),P,I),R)g.x+=F+f;else if(typeof I.text!="string"){const Q=d.lineHeight;g.y+=FC(I,Q)+f}else g.y+=O}),PE(this.ctx,t.textDirection)}drawTitle(){const t=this.options,n=t.title,o=Qo(n.font),i=ni(n.padding);if(!n.display)return;const s=fd(t.rtl,this.left,this.width),a=this.ctx,l=n.position,c=o.size/2,d=i.top+c;let f,h=this.left,p=this.width;if(this.isHorizontal())p=Math.max(...this.lineWidths),f=this.top+d,h=Jo(t.align,h,this.right-p);else{const y=this.columnSizes.reduce((b,_)=>Math.max(b,_.height),0);f=d+Jo(t.align,this.top,this.bottom-y-t.labels.padding-this._computeTitleHeight())}const g=Jo(l,h,h+p);a.textAlign=s.textAlign(ky(l)),a.textBaseline="middle",a.strokeStyle=n.color,a.fillStyle=n.color,a.font=o.string,nf(a,n.text,g,f,o)}_computeTitleHeight(){const t=this.options.title,n=Qo(t.font),o=ni(t.padding);return t.display?n.lineHeight+o.height:0}_getLegendItemAt(t,n){let o,i,s;if(Js(t,this.left,this.right)&&Js(n,this.top,this.bottom)){for(s=this.legendHitBoxes,o=0;o<s.length;++o)if(i=s[o],Js(t,i.left,i.left+i.width)&&Js(n,i.top,i.top+i.height))return this.legendItems[o]}return null}handleEvent(t){const n=this.options;if(!Cz(t.type,n))return;const o=this._getLegendItemAt(t.x,t.y);if(t.type==="mousemove"||t.type==="mouseout"){const i=this._hoveredItem,s=kz(i,o);i&&!s&&Wn(n.onLeave,[t,i,this],this),this._hoveredItem=o,o&&!s&&Wn(n.onHover,[t,o,this],this)}else o&&Wn(n.onClick,[t,o,this],this)}}function _z(e,t,n,o,i){const s=xz(o,e,t,n),a=Ez(i,o,t.lineHeight);return{itemWidth:s,itemHeight:a}}function xz(e,t,n,o){let i=e.text;return i&&typeof i!="string"&&(i=i.reduce((s,a)=>s.length>a.length?s:a)),t+n.size/2+o.measureText(i).width}function Ez(e,t,n){let o=e;return typeof t.text!="string"&&(o=FC(t,n)),o}function FC(e,t){const n=e.text?e.text.length:0;return t*n}function Cz(e,t){return!!((e==="mousemove"||e==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(e==="click"||e==="mouseup"))}var Sz={id:"legend",_element:LC,start(e,t,n){const o=e.legend=new LC({ctx:e.ctx,options:n,chart:e});oi.configure(e,o,n),oi.addBox(e,o)},stop(e){oi.removeBox(e,e.legend),delete e.legend},beforeUpdate(e,t,n){const o=e.legend;oi.configure(e,o,n),o.options=n},afterUpdate(e){const t=e.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(e,t){t.replay||e.legend.handleEvent(t.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(e,t,n){const o=t.datasetIndex,i=n.chart;i.isDatasetVisible(o)?(i.hide(o),t.hidden=!0):(i.show(o),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:e=>e.chart.options.color,boxWidth:40,padding:10,generateLabels(e){const t=e.data.datasets,{labels:{usePointStyle:n,pointStyle:o,textAlign:i,color:s,useBorderRadius:a,borderRadius:l}}=e.legend.options;return e._getSortedDatasetMetas().map(c=>{const d=c.controller.getStyle(n?0:void 0),f=ni(d.borderWidth);return{text:t[c.index].label,fillStyle:d.backgroundColor,fontColor:s,hidden:!c.visible,lineCap:d.borderCapStyle,lineDash:d.borderDash,lineDashOffset:d.borderDashOffset,lineJoin:d.borderJoinStyle,lineWidth:(f.width+f.height)/4,strokeStyle:d.borderColor,pointStyle:o||d.pointStyle,rotation:d.rotation,textAlign:i||d.textAlign,borderRadius:a&&(l||d.borderRadius),datasetIndex:c.index}},this)}},title:{color:e=>e.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:e=>!e.startsWith("on"),labels:{_scriptable:e=>!["generateLabels","filter","sort"].includes(e)}}};class $C extends Vs{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,n){const o=this.options;if(this.left=0,this.top=0,!o.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=t,this.height=this.bottom=n;const i=xo(o.text)?o.text.length:1;this._padding=ni(o.padding);const s=i*Qo(o.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=s:this.width=s}isHorizontal(){const t=this.options.position;return t==="top"||t==="bottom"}_drawArgs(t){const{top:n,left:o,bottom:i,right:s,options:a}=this,l=a.align;let c=0,d,f,h;return this.isHorizontal()?(f=Jo(l,o,s),h=n+t,d=s-o):(a.position==="left"?(f=o+t,h=Jo(l,i,n),c=Tn*-.5):(f=s-t,h=Jo(l,n,i),c=Tn*.5),d=i-n),{titleX:f,titleY:h,maxWidth:d,rotation:c}}draw(){const t=this.ctx,n=this.options;if(!n.display)return;const o=Qo(n.font),s=o.lineHeight/2+this._padding.top,{titleX:a,titleY:l,maxWidth:c,rotation:d}=this._drawArgs(s);nf(t,n.text,0,0,o,{color:n.color,maxWidth:c,rotation:d,textAlign:ky(n.align),textBaseline:"middle",translation:[a,l]})}}function Az(e,t){const n=new $C({ctx:e.ctx,options:t,chart:e});oi.configure(e,n,t),oi.addBox(e,n),e.titleBlock=n}var Tz={id:"title",_element:$C,start(e,t,n){Az(e,n)},stop(e){const t=e.titleBlock;oi.removeBox(e,t),delete e.titleBlock},beforeUpdate(e,t,n){const o=e.titleBlock;oi.configure(e,o,n),o.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 uf={average(e){if(!e.length)return!1;let t,n,o=new Set,i=0,s=0;for(t=0,n=e.length;t<n;++t){const l=e[t].element;if(l&&l.hasValue()){const c=l.tooltipPosition();o.add(c.x),i+=c.y,++s}}return s===0||o.size===0?!1:{x:[...o].reduce((l,c)=>l+c)/o.size,y:i/s}},nearest(e,t){if(!e.length)return!1;let n=t.x,o=t.y,i=Number.POSITIVE_INFINITY,s,a,l;for(s=0,a=e.length;s<a;++s){const c=e[s].element;if(c&&c.hasValue()){const d=c.getCenterPoint(),f=vy(t,d);f<i&&(i=f,l=c)}}if(l){const c=l.tooltipPosition();n=c.x,o=c.y}return{x:n,y:o}}};function cs(e,t){return t&&(xo(t)?Array.prototype.push.apply(e,t):e.push(t)),e}function ea(e){return(typeof e=="string"||e instanceof String)&&e.indexOf(`
28
+ `):b,b}),l=r.computed(()=>i.value?mF(s.value,a.value,n.language,n.diffStyle,n.forceInlineComparison,n.context,n.ignoreMatchingLines):hF(s.value,a.value,n.language,n.diffStyle,n.forceInlineComparison,n.context,n.ignoreMatchingLines)),c=r.shallowRef(l.value),d=r.computed(()=>c.value.stat.additionsNum===0&&c.value.stat.deletionsNum===0),f=r.ref(-1),h=r.ref();function p(){const b=h.value.querySelectorAll("[data-diff-change]");f.value<b.length-1&&(f.value++,y(b))}function g(){const b=h.value.querySelectorAll("[data-diff-change]");f.value>0&&(f.value--,y(b))}function y(b){h.value.querySelectorAll(".current-diff").forEach(x=>x.classList.remove("current-diff"));const _=b[f.value];_&&(_.querySelectorAll(".blob-code").forEach(x=>x.classList.add("current-diff")),_.scrollIntoView({behavior:"smooth",block:"center"}))}return r.watch(()=>n,()=>{f.value=-1,c.value=l.value,o("diff",{stat:{isChanged:!d.value,addNum:c.value.stat.additionsNum,delNum:c.value.stat.deletionsNum}})},{deep:!0,immediate:!0}),(b,_)=>(r.openBlock(),r.createElementBlock("div",{ref_key:"root",ref:h,class:"code-diff-view",theme:e.theme,style:r.normalizeStyle({maxHeight:e.maxHeight})},[e.hideHeader?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",$F,[r.unref(i)?(r.openBlock(),r.createElementBlock("div",zF,[r.createElementVNode("span",null,[r.createElementVNode("div",jF,r.toDisplayString(e.filename),1),r.createElementVNode("div",UF,r.toDisplayString(e.newFilename),1)]),e.hideNavigation?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("span",WF,[r.createElementVNode("button",{class:"command-item-button",title:"Next Change",onClick:p},[r.createVNode(jx)]),r.createElementVNode("button",{class:"command-item-button",title:"Previous Change",onClick:g},[r.createVNode(Ux)])])),r.renderSlot(b.$slots,"header-actions"),e.hideStat?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("span",HF,[r.renderSlot(b.$slots,"stat",{stat:r.unref(c).stat},()=>[r.createElementVNode("span",qF,"+"+r.toDisplayString(r.unref(c).stat.additionsNum)+" additions",1),r.createElementVNode("span",KF,"-"+r.toDisplayString(r.unref(c).stat.deletionsNum)+" deletions",1)])]))])):(r.openBlock(),r.createElementBlock("div",GF,[r.createElementVNode("span",YF,r.toDisplayString(e.filename),1),r.createElementVNode("span",ZF,[r.createElementVNode("span",XF,r.toDisplayString(e.newFilename),1),e.hideNavigation?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("span",JF,[r.createElementVNode("button",{class:"command-item-button",title:"Next Change",onClick:p},[r.createVNode(jx)]),r.createElementVNode("button",{class:"command-item-button",title:"Previous Change",onClick:g},[r.createVNode(Ux)])])),r.renderSlot(b.$slots,"header-actions"),e.hideStat?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("span",QF,[r.renderSlot(b.$slots,"stat",{stat:r.unref(c).stat},()=>[r.createElementVNode("span",VF,"+"+r.toDisplayString(r.unref(c).stat.additionsNum)+" additions",1),r.createElementVNode("span",e6,"-"+r.toDisplayString(r.unref(c).stat.deletionsNum)+" deletions",1)])]))])]))])),r.unref(i)?(r.openBlock(),r.createBlock(_F,{key:1,"diff-change":r.unref(c),language:e.language,onChangeClick:_[0]||(_[0]=x=>o("change-click",x))},null,8,["diff-change","language"])):(r.openBlock(),r.createBlock(NF,{key:2,"diff-change":r.unref(c),language:e.language,onChangeClick:_[1]||(_[1]=x=>o("change-click",x))},null,8,["diff-change","language"]))],12,FF))}}),n6={class:"flex gap-2"},o6={class:"vue-code-diff-wrapper"},zm=r.defineComponent({__name:"DCodeBeforeAfter",props:{dataBefore:{type:[Object,Array,String,Number,Boolean,null],required:!0},dataAfter:{type:[Object,Array,String,Number,Boolean,null],required:!0}},setup(e){const{t}=In.useI18n(),n=e,o=r.ref(!1);let i=null;r.onMounted(()=>{const f=document.documentElement,h=()=>o.value=f.classList.contains("dark");h(),i=new MutationObserver(h),i.observe(f,{attributes:!0,attributeFilter:["class"]})}),r.onBeforeUnmount(()=>{i?.disconnect(),i=null});const s=r.computed(()=>o.value?"dark":"light"),a=f=>{if(f===null||typeof f!="object")return f;if(Array.isArray(f))return f.map(a);const h=Object.keys(f).sort(),p={};return h.forEach(g=>{p[g]=a(f[g])}),p},l=f=>{try{if(f==null)return"";let h=f;if(typeof f=="string")try{const g=f.trim();(g.startsWith("{")||g.startsWith("["))&&(h=JSON.parse(g))}catch{}const p=a(h);return JSON.stringify(p,null,2)}catch{return String(f)}},c=r.computed(()=>l(n.dataBefore)),d=r.computed(()=>l(n.dataAfter));return(f,h)=>(r.openBlock(),r.createBlock(Pi,{title:r.unref(t)("beforeAfter.dataComparison")||"Data Comparison",padding:"p-0",class:"overflow-hidden","header-theme":"primary"},{actions:r.withCtx(()=>[r.createElementVNode("div",n6,[r.createVNode(os,{variant:"destructive",size:"xs",pill:"",text:r.unref(t)("beforeAfter.original")||"Original"},null,8,["text"]),r.createVNode(os,{variant:"success",size:"xs",pill:"",text:r.unref(t)("beforeAfter.modified")||"Modified"},null,8,["text"])])]),default:r.withCtx(()=>[r.createElementVNode("div",o6,[r.createVNode(r.unref(t6),{"old-string":c.value,"new-string":d.value,"output-format":"side-by-side",language:"json",context:10,"max-height":"600px",theme:s.value,"hide-header":!0,"hide-stat":!0},null,8,["old-string","new-string","theme"])])]),_:1},8,["title"]))}});function Wx(e,t){const n=r.ref(!1),o=r.ref(!1),i=r.ref(!0),s=r.ref(!1),a=r.ref(!1),l=r.ref(!1),c=r.ref(0),d=r.ref(0),f=r.ref(0);let h=null,p=0,g=null,y=null;const b=new Map,_=["fontFamily","fontSize","fontWeight","fontStyle","fontStretch","fontVariant","fontKerning","fontFeatureSettings","letterSpacing","wordSpacing","textTransform","lineHeight","paddingTop","paddingRight","paddingBottom","paddingLeft","boxSizing","whiteSpace","wordWrap","wordBreak","textAlign","direction"],x=(q,Q)=>{const re=q.parentElement;if(!re)return null;(!h||h.parentElement!==re)&&(h?.remove(),h=q.ownerDocument.createElement("div"),h.setAttribute("aria-hidden","true"),Object.assign(h.style,{position:"absolute",top:"0",left:"0",visibility:"hidden",pointerEvents:"none",zIndex:"-9999",overflow:"hidden",border:"0"}),re.appendChild(h));for(const ie of _)h.style[ie]=Q[ie];return q.tagName==="INPUT"&&(h.style.whiteSpace="pre",h.style.wordWrap="normal",h.style.wordBreak="normal"),h},B=(q,Q)=>{const re=`${Q.font}|${Q.letterSpacing}`,ie=b.get(re);if(ie!==void 0)return ie;const le=q.parentElement;let X=0;if(le){const W=q.ownerDocument.createElement("input");W.type="password",W.tabIndex=-1,W.setAttribute("aria-hidden","true"),W.autocomplete="off",Object.assign(W.style,{position:"absolute",top:"0",left:"0",width:"10px",padding:"0",border:"0",visibility:"hidden",pointerEvents:"none"});for(const se of _)W.style[se]=Q[se];W.value="x".repeat(100),le.appendChild(W),X=W.scrollWidth/100,W.remove()}if(!(X>0)||X<1){const K=x(q,Q);if(K){K.textContent="•".repeat(10);const W=q.ownerDocument.createElement("span");K.appendChild(W);const se=Number.parseFloat(Q.paddingLeft)||0;X=Math.max(0,(W.offsetLeft-se)/10)}}return b.set(re,X),X},R=()=>{s.value=!0,g&&clearTimeout(g),g=setTimeout(()=>s.value=!1,530)},S=()=>{p=0;const q=e.value;if(!q||!t.value){o.value=!1;return}const Q=q.selectionStart,re=q.selectionEnd;if(Q===null||re===null){o.value=!1;return}o.value=!0,i.value=Q===re;const ie=getComputedStyle(q),le=x(q,ie);if(!le)return;q.tagName==="TEXTAREA"?le.style.width=`${q.clientWidth}px`:le.style.width="auto";let X=0,K=0;if(q.tagName==="INPUT"&&q.type==="password")X=Number.parseFloat(ie.paddingLeft)+Q*B(q,ie),K=Number.parseFloat(ie.paddingTop);else{const U=q.value.slice(0,Q);le.textContent=q.tagName==="TEXTAREA"&&U.endsWith(`
29
+ `)?U+" ":U;const k=q.ownerDocument.createElement("span");k.textContent="​",le.appendChild(k),X=k.offsetLeft,K=k.offsetTop}const W=q.offsetWidth&&q.getBoundingClientRect().width/q.offsetWidth||1,se=Number.parseFloat(ie.borderLeftWidth)||0,H=Number.parseFloat(ie.borderTopWidth)||0,N=Number.parseFloat(ie.fontSize)||14;let j=q.offsetLeft+se+(X-q.scrollLeft)*W,Y=q.offsetTop+H+(K-q.scrollTop)*W;const J=Math.round(N*1.3);if(q.tagName==="INPUT")Y=q.offsetTop+(q.offsetHeight-J)/2;else{const U=Number.parseFloat(ie.lineHeight);!Number.isNaN(U)&&U>J&&(Y+=(U-J)/2)}q.tagName==="INPUT"?l.value=j<q.offsetLeft-4||j>q.offsetLeft+q.offsetWidth+4:l.value=Y<q.offsetTop-4||Y>q.offsetTop+q.offsetHeight+4,(Math.abs(j-c.value)>.1||Math.abs(Y-d.value)>.1)&&R(),c.value=j,d.value=Y,f.value=J},O=()=>{p||(p=requestAnimationFrame(S))},I=()=>{n.value=!0,a.value=!1,p&&cancelAnimationFrame(p),S(),requestAnimationFrame(()=>a.value=!0)},D=()=>{n.value=!1,a.value=!1},w=()=>{const q=e.value;if(!q)return;(q.getRootNode().activeElement===q||q.ownerDocument.activeElement===q)&&O()},E=q=>{const Q=q.ownerDocument,re=Q.defaultView,ie=["input","keydown","keyup","mousedown","mouseup","select","scroll","selectionchange"];return q.addEventListener("focus",I),q.addEventListener("blur",D),ie.forEach(le=>q.addEventListener(le,O)),Q.addEventListener("selectionchange",w),re?.addEventListener("resize",O),q.getRootNode().activeElement===q&&I(),()=>{q.removeEventListener("focus",I),q.removeEventListener("blur",D),ie.forEach(le=>q.removeEventListener(le,O)),Q.removeEventListener("selectionchange",w),re?.removeEventListener("resize",O)}};r.watch(e,q=>{y?.(),y=null,q&&(y=E(q))},{immediate:!0,flush:"post"}),r.watch(t,O),r.onBeforeUnmount(()=>{y?.(),p&&cancelAnimationFrame(p),g&&clearTimeout(g),h?.remove(),h=null});const F=r.computed(()=>t.value&&n.value&&o.value),A=r.computed(()=>F.value&&i.value&&!l.value);return{caretStyle:r.computed(()=>({height:`${f.value}px`,transform:`translate3d(${c.value}px, ${d.value}px, 0)`})),caretVisible:A,hideNativeCaret:F,isCaretMoving:s,caretAnimate:a,refreshCaret:O}}const r6=["aria-busy"],i6={class:"relative w-full flex-1"},s6={key:0,class:"flex justify-end mt-1"},a6=["for"],l6={key:0,class:"ml-1 text-destructive"},c6={class:"relative w-full flex-1 group"},d6={key:0,class:"absolute inset-y-0 left-4 flex items-center text-muted-foreground"},u6={key:1},f6={class:"text-sm font-semibold text-gray-500 dark:text-gray-400 whitespace-nowrap select-none"},h6=["id","value","placeholder"],m6={key:3,class:"flex items-center pr-2 flex-shrink-0"},p6=["title"],g6={key:1},b6={key:4,class:"flex items-center pr-3"},y6={key:5,class:"flex items-center self-stretch px-3 bg-gray-50 dark:bg-neutral-800 border-l border-gray-300 dark:border-gray-700 flex-shrink-0"},v6={class:"text-sm font-semibold text-gray-500 dark:text-gray-400 whitespace-nowrap select-none"},w6={key:1,class:"absolute top-full right-0 z-10 text-[11px] text-gray-500 dark:text-gray-400 opacity-0 transition-opacity pointer-events-none group-focus-within:opacity-100"},k6={key:0,class:"text-xs text-destructive mt-1"},Gs=Sn(r.defineComponent({name:"DCodeTextField",inheritAttrs:!1,__name:"DCodeTextField",props:{modelValue:{},label:{},placeholder:{default:""},clearable:{type:Boolean},required:{type:Boolean},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},visible:{type:Boolean,default:!0},skeleton:{type:Boolean,default:!1},error:{default:null},prependInner:{},hideClearWhenEmpty:{type:Boolean,default:!0},textCase:{default:"none"},applyTextCaseToValue:{type:Boolean,default:!0},valueType:{default:"free"},allowSpaces:{type:Boolean,default:!0},allowChars:{},pattern:{},showCharCount:{type:Boolean,default:!0},returnNumber:{type:Boolean,default:!1},icon:{},maxLength:{},minLength:{},maxValue:{},minValue:{},prefix:{},prefixClass:{},suffix:{},labelPosition:{default:"top"},labelWidth:{default:"150px"},size:{default:"default"},rounded:{default:"lg"},smoothCaret:{type:Boolean,default:!0},innerButtonText:{},innerButtonIcon:{},innerButtonTooltip:{},hideInnerButtonOnInput:{type:Boolean,default:!0}},emits:["update:modelValue","clear","click:inner-button"],setup(e,{emit:t}){const n=r.useAttrs(),o=r.computed(()=>l.valueType?.toLowerCase()==="password"||n.type==="password"),i=r.ref(!1),s=()=>{i.value=!i.value},a=t,l=e,c=r.computed(()=>n.label??l.label);r.computed(()=>l.visible??!0);const d=r.computed(()=>Zn(l.size)),f=Math.random().toString(36).slice(2,7),h=r.computed(()=>`app-text-field-${n.id||c.value||"field"}-${f}`),p=r.computed(()=>{const Z=n.required,ee=n["aria-required"];return Z===""||Z===!0||Z==="true"||(ee==="true"||ee===!0)||l.required}),g=r.computed(()=>!!(n["onClick:inner-button"]||n["onClick:innerButton"]||n.onClickInnerButton||l.innerButtonText||l.innerButtonIcon)),y=r.computed(()=>l.innerButtonText!==void 0?l.innerButtonText:l.innerButtonIcon?"":"Ctrl K"),b=r.computed(()=>{const{label:Z,class:ee,id:pe,required:Be,"aria-required":Te,...Oe}=n;return Oe}),_=r.computed(()=>{const Z={...b.value};return l.valueType?.toLowerCase()==="number"&&(Z.type="text",Z.inputmode="numeric",Z.pattern="[0-9]*"),l.valueType?.toLowerCase()==="email"&&(Z.type="email",Z.inputmode="email"),Z.type==="email"&&O.value&&(Z.type="text",Z.inputmode="email",Z.autocomplete??="email",Z.spellcheck??=!1,Z.autocapitalize??="off"),o.value&&(Z.type=i.value?"text":"password"),l.disabled&&(Z.disabled=!0),l.readonly&&(Z.readonly=!0),l.maxLength&&(Z.maxlength=l.maxLength),l.minLength&&(Z.minlength=l.minLength),l.maxValue&&(Z.max=l.maxValue),l.minValue&&(Z.min=l.minValue),Z}),x=r.computed(()=>{const Z=l.modelValue;return Z==null||String(Z).length===0}),B=r.computed(()=>!l.clearable||l.disabled||l.readonly?!1:l.hideClearWhenEmpty?!x.value:!0);r.computed(()=>{switch(l.textCase?.toLowerCase()){case"uppercase":return"uppercase";case"lowercase":return"lowercase";default:return"none"}});const R=r.ref(String(l.modelValue??"")),S=r.ref(null);r.watch(()=>l.modelValue,Z=>{const ee=String(Z??"");ee!==R.value&&(R.value=ee)});const O=r.computed(()=>l.smoothCaret&&!l.disabled&&!l.readonly),{caretStyle:I,caretVisible:D,hideNativeCaret:w,isCaretMoving:E,caretAnimate:F,refreshCaret:A}=Wx(S,O);r.watch(R,A,{flush:"post"});const P=r.ref(!1),q=r.ref(!1),Q=Z=>Z.split(/(\s+)/).map(ee=>{if(ee.trim()==="")return ee;const pe=ee.toLowerCase();return pe.charAt(0).toUpperCase()+pe.slice(1)}).join(""),re=Z=>{const ee=Z.toLowerCase(),pe=ee.search(new RegExp("\\p{L}","u"));return pe<0?ee:ee.slice(0,pe)+ee.charAt(pe).toUpperCase()+ee.slice(pe+1)},ie=Z=>{const ee=Z.toLowerCase(),pe=ee.search(new RegExp("\\p{L}","u"));return pe<0?ee:ee.slice(0,pe)+ee.charAt(pe).toUpperCase()+ee.slice(pe+1)},le=Z=>{switch(l.textCase?.toLowerCase()){case"uppercase":return Z.toUpperCase();case"lowercase":return Z.toLowerCase();case"titlecase":return Q(Z);case"capitalize":return ie(Z);case"sentencecase":return re(Z);default:return Z}},X=Z=>{if(!Z)return null;const ee=Array.isArray(Z)?Z.join(""):Z;return ee?new Set(ee):null},K=r.computed(()=>X(l.allowChars)),W=(Z,ee)=>(Z.lastIndex=0,Z.test(ee)),se=Z=>{const ee=l.valueType?.toLowerCase();if(ee==="free"||ee==="email"||ee==="password")return!0;const pe=Z===" ",Be=/\d/.test(Z),Te=new RegExp("\\p{L}","u").test(Z),Oe=new RegExp("\\p{N}","u").test(Z),Fe=/[\/\-_.,:]/.test(Z);return ee==="number"?Be:ee==="letter"?Te||Fe||l.allowSpaces&&pe:ee==="letternumber"?Te||Oe||Fe||l.allowSpaces&&pe:!0},H=Z=>{let ee="";for(const pe of Z){const Be=!!K.value&&K.value.has(pe);l.pattern&&!Be&&!W(l.pattern,pe)||!Be&&!se(pe)||(ee+=pe)}return ee},N=r.computed(()=>{const Z=l.maxLength??n.maxlength??n.maxLength;let ee=Number.NaN;return typeof Z=="number"?ee=Z:typeof Z=="string"&&(ee=Number.parseInt(Z,10)),Number.isFinite(ee)&&ee>0?ee:-1}),j=r.computed(()=>R.value.length),Y=r.computed(()=>l.showCharCount?N.value>0:!1),J=Z=>N.value>0?Z.slice(0,N.value):Z,U=Z=>{const ee=H(Z),pe=l.applyTextCaseToValue?le(ee):ee;return J(pe)},k=Z=>{if(Z==="")return null;if(l.valueType?.toLowerCase()==="number"){const ee=Number(Z);return Number.isFinite(ee)?ee:null}return Z},C=Z=>{R.value=Z,a("update:modelValue",k(Z))},T=(Z,ee)=>{const pe=J(ee);q.value=!0,Z.value=pe,C(pe),queueMicrotask(()=>q.value=!1)},M=Z=>{const ee=S.value;if(!ee)return;const pe=ee.selectionStart??ee.value.length,Be=ee.selectionEnd??ee.value.length;if(N.value>0){const Te=ee.value.length-(Be-pe),Oe=N.value-Te;if(Oe<=0)return;Z=Z.slice(0,Oe)}ee.setRangeText(Z,pe,Be,"end"),T(ee,U(ee.value))},$=Z=>{if(P.value||q.value||!Z.inputType?.startsWith("insert"))return;const ee=Z.data;if(ee==null)return;const pe=U(ee);pe!==ee&&(Z.preventDefault(),pe.length>0&&M(pe))},ne=Z=>{if(P.value||q.value)return;const ee=Z.clipboardData?.getData("text")??"",pe=U(ee);pe!==ee&&(Z.preventDefault(),pe.length>0&&M(pe))},te=Z=>{if(P.value||q.value)return;const ee=Z.target,pe=ee.value??"",Be=U(pe);Be===pe?C(Be):T(ee,Be)},ce=()=>P.value=!0,ke=()=>{P.value=!1;const Z=S.value;if(!Z)return;const ee=Z.value??"",pe=U(ee);pe===ee?C(pe):T(Z,pe)};r.onMounted(()=>{const Z=S.value;if(!Z)return;const ee=Z.value??"",pe=ee!==""?ee:R.value,Be=U(pe);Be===pe?C(Be):T(Z,Be)}),r.onBeforeUnmount(()=>{});const we=()=>{R.value="",S.value&&(S.value.value=""),a("update:modelValue",null),a("clear")},_e=r.computed(()=>Y.value&&j.value>0),fe=r.computed(()=>`${j.value} / ${N.value}`),de=r.computed(()=>!!l.error);return(Z,ee)=>r.withDirectives((r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["flex flex-col gap-1 w-full",[r.unref(n).class,l.disabled?"cursor-not-allowed":""]]),"aria-busy":l.skeleton},[l.skeleton?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[r.createElementVNode("div",{class:r.normalizeClass(["flex flex-1 w-full",[l.labelPosition==="left"?"flex-row items-center gap-3":"",l.labelPosition==="right"?"flex-row-reverse items-center gap-3":"",l.labelPosition==="top"?"flex-col gap-1":"",l.labelPosition==="bottom"?"flex-col-reverse gap-1":""]])},[c.value?(r.openBlock(),r.createElementBlock("div",{key:0,class:"h-4 rounded bg-gray-200 dark:bg-gray-700 animate-shimmer shrink-0",style:r.normalizeStyle(l.labelPosition==="left"||l.labelPosition==="right"?{width:l.labelWidth}:{width:"8rem"})},null,4)):r.createCommentVNode("",!0),r.createElementVNode("div",i6,[r.createElementVNode("div",{class:r.normalizeClass(["w-full bg-gray-200 dark:bg-gray-700 animate-shimmer",[r.unref(Zn)(l.size),r.unref(sn)(l.rounded)]])},null,2)])],2),Y.value?(r.openBlock(),r.createElementBlock("div",s6,[...ee[1]||(ee[1]=[r.createElementVNode("div",{class:"h-3 w-14 rounded bg-gray-200 dark:bg-gray-700 animate-shimmer"},null,-1)])])):r.createCommentVNode("",!0)],64)):(r.openBlock(),r.createElementBlock(r.Fragment,{key:1},[r.createElementVNode("div",{class:r.normalizeClass(["flex flex-1 w-full",[l.labelPosition==="left"?"flex-row items-center gap-3":"",l.labelPosition==="right"?"flex-row-reverse items-center gap-3":"",l.labelPosition==="top"?"flex-col gap-1":"",l.labelPosition==="bottom"?"flex-col-reverse gap-1":""]])},[c.value?(r.openBlock(),r.createElementBlock("label",{key:0,for:h.value,class:"text-sm font-medium shrink-0",style:r.normalizeStyle(l.labelPosition==="left"||l.labelPosition==="right"?{width:l.labelWidth}:{})},[r.createTextVNode(r.toDisplayString(c.value)+" ",1),p.value?(r.openBlock(),r.createElementBlock("span",l6,"*")):r.createCommentVNode("",!0)],12,a6)):r.createCommentVNode("",!0),r.createElementVNode("div",c6,[l.icon||l.prependInner||Z.$slots["prepend-inner"]?(r.openBlock(),r.createElementBlock("div",d6,[r.renderSlot(Z.$slots,"prepend-inner",{},()=>[l.icon?(r.openBlock(),r.createBlock(r.resolveDynamicComponent(l.icon),{key:0,class:"h-4 w-4"})):l.prependInner?(r.openBlock(),r.createElementBlock("span",u6,r.toDisplayString(l.prependInner),1)):r.createCommentVNode("",!0)],!0)])):r.createCommentVNode("",!0),r.createElementVNode("div",{class:r.normalizeClass(["relative flex items-center w-full border overflow-hidden transition-all duration-200",r.unref(sn)(l.rounded),"bg-white dark:bg-neutral-800 border-gray-300 dark:border-neutral-700/50",de.value?"border-destructive ring-1 ring-destructive":"border-gray-300 dark:border-gray-700 focus-within:border-primary focus-within:ring-1 focus-within:ring-primary dark:focus-within:border-primary dark:focus-within:ring-primary",l.disabled?"opacity-50 cursor-not-allowed bg-gray-50 dark:bg-neutral-800":"",l.readonly?"bg-neutral-50/50 dark:bg-neutral-900/30":""])},[l.prefix||Z.$slots.prefix?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(["flex items-center self-stretch px-3 bg-gray-50 dark:bg-neutral-800 border-r border-gray-300 dark:border-gray-700 flex-shrink-0",l.prefixClass])},[r.renderSlot(Z.$slots,"prefix",{},()=>[r.createElementVNode("span",f6,r.toDisplayString(l.prefix),1)],!0)],2)):r.createCommentVNode("",!0),l.icon?(r.openBlock(),r.createBlock(r.resolveDynamicComponent(l.icon),{key:1,class:"w-4 h-4 ml-3 text-gray-400 flex-shrink-0"})):r.createCommentVNode("",!0),r.createElementVNode("input",r.mergeProps({id:h.value,ref_key:"inputRef",ref:S,value:R.value,class:["flex-1 min-w-0 bg-transparent text-foreground dark:text-gray-300 outline-none focus:outline-none focus-visible:outline-none placeholder:text-gray-400",[d.value,r.unref(w)?"dcode-caret-transparent":""]],placeholder:l.placeholder},_.value,{onInput:te,onBeforeinput:$,onPaste:ne,onCompositionstart:ce,onCompositionend:ke}),null,16,h6),O.value?(r.openBlock(),r.createElementBlock("span",{key:2,"aria-hidden":"true",class:r.normalizeClass(["pointer-events-none absolute left-0 top-0 z-[1] w-[2px] rounded-full bg-primary will-change-transform motion-reduce:transition-none",[r.unref(D)?"opacity-100":"opacity-0",r.unref(F)?"transition-[transform,opacity] duration-100 ease-out":"transition-none",r.unref(D)&&!r.unref(E)?"dcode-animate-caret-blink":""]]),style:r.normalizeStyle(r.unref(I))},null,6)):r.createCommentVNode("",!0),g.value&&(!l.hideInnerButtonOnInput||!R.value)?(r.openBlock(),r.createElementBlock("div",m6,[r.createElementVNode("button",{type:"button",title:l.innerButtonTooltip||y.value,class:"inline-flex items-center gap-1 px-1.5 py-0.5 text-[10px] font-mono font-medium rounded border border-neutral-200 dark:border-neutral-700 bg-neutral-100 dark:bg-neutral-800 text-neutral-500 hover:text-neutral-900 dark:text-neutral-400 dark:hover:text-neutral-100 hover:bg-neutral-200 dark:hover:bg-neutral-700 transition-colors shadow-none cursor-pointer select-none",onClick:ee[0]||(ee[0]=r.withModifiers(pe=>a("click:inner-button",pe),["stop"]))},[l.innerButtonIcon?(r.openBlock(),r.createBlock(r.resolveDynamicComponent(l.innerButtonIcon),{key:0,class:"w-3.5 h-3.5"})):r.createCommentVNode("",!0),y.value?(r.openBlock(),r.createElementBlock("span",g6,r.toDisplayString(y.value),1)):r.createCommentVNode("",!0)],8,p6)])):r.createCommentVNode("",!0),B.value||o.value?(r.openBlock(),r.createElementBlock("div",b6,[B.value&&!o.value?(r.openBlock(),r.createBlock(Lr,{key:0,disabled:l.disabled||l.readonly,onClear:we},null,8,["disabled"])):r.createCommentVNode("",!0),o.value?(r.openBlock(),r.createElementBlock("button",{key:1,type:"button",class:"p-1.5 text-gray-400 hover:text-gray-600 dark:hover:text-gray-200 transition-colors",tabindex:"-1",onClick:s},[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(i.value?r.unref(Ae.Eye):r.unref(Ae.EyeOff)),{class:"w-4 h-4"}))])):r.createCommentVNode("",!0)])):r.createCommentVNode("",!0),l.suffix?(r.openBlock(),r.createElementBlock("div",y6,[r.createElementVNode("span",v6,r.toDisplayString(l.suffix),1)])):r.createCommentVNode("",!0)],2),_e.value&&!de.value?(r.openBlock(),r.createElementBlock("p",w6,r.toDisplayString(fe.value),1)):r.createCommentVNode("",!0)])],2),de.value?(r.openBlock(),r.createElementBlock("p",k6,r.toDisplayString(l.error),1)):r.createCommentVNode("",!0)],64))],10,r6)),[[r.vShow,e.visible]])}}),[["__scopeId","data-v-f402cf0b"]]),_6={class:"grid grid-cols-1 md:grid-cols-2 gap-6"},x6={class:"dcode-card h-full flex flex-col border border-neutral-200/60 dark:border-neutral-700/50 bg-white dark:bg-neutral-800 rounded-xl overflow-hidden"},E6={class:"p-4 border-b border-neutral-200/60 dark:border-neutral-700/30 bg-neutral-50 dark:bg-neutral-900/10"},C6={class:"flex items-center justify-between"},S6={class:"font-display font-semibold text-neutral-900 dark:text-neutral-100 flex items-center gap-2"},A6={class:"text-[10px] font-medium px-2 py-0.5 rounded-full bg-white dark:bg-neutral-800 text-neutral-600 dark:text-neutral-400 border border-neutral-200/60 dark:border-neutral-700/50 shadow-sm"},T6={class:"p-6 flex-1"},B6={class:"flex flex-col gap-4"},P6={key:0,class:"text-center py-8 text-neutral-400 dark:text-neutral-500 italic text-sm"},N6={class:"dcode-card h-full flex flex-col border border-neutral-200/60 dark:border-neutral-700/50 bg-white dark:bg-neutral-800 rounded-xl overflow-hidden"},D6={class:"p-4 border-b border-neutral-200/60 dark:border-neutral-700/30 bg-neutral-50 dark:bg-neutral-900/10"},M6={class:"flex items-center justify-between"},R6={class:"font-display font-semibold text-neutral-900 dark:text-neutral-100 flex items-center gap-2"},I6={class:"text-[10px] font-medium px-2 py-0.5 rounded-full bg-white dark:bg-neutral-800 text-primary-600 dark:text-primary-400 border border-primary-100 dark:border-primary-900/30 shadow-sm"},O6={class:"p-6 flex-1"},L6={class:"flex flex-col gap-4"},F6={key:0,class:"text-center py-8 text-neutral-400 dark:text-neutral-500 italic text-sm"},jm=r.defineComponent({name:"DCodeListLabels",__name:"DCodeListLabels",props:{dataBefore:{},dataAfter:{}},setup(e){const{t}=In.useI18n(),n=e,o=c=>{if(!c)return{};if(typeof c=="string")try{if(c.trim().startsWith("{")||c.trim().startsWith("["))return JSON.parse(c)}catch(d){return console.error("Failed to parse data string:",d),{raw:c}}return typeof c=="object"&&c!==null?c:{value:c}},i=r.computed(()=>o(n.dataBefore)),s=r.computed(()=>o(n.dataAfter)),a=c=>c.replaceAll(/([A-Z])/g," $1").replace(/^./,d=>d.toUpperCase()).trim(),l=c=>{if(c==null)return"-";if(typeof c=="boolean")return t(c?"common.yes":"common.no");if(typeof c=="object"&&c!==null){const d=c.name??c.label??c.code??c.value??c.id;return d!=null?String(d):JSON.stringify(c)}return String(c)};return(c,d)=>(r.openBlock(),r.createElementBlock("div",_6,[r.createElementVNode("div",x6,[r.createElementVNode("div",E6,[r.createElementVNode("div",C6,[r.createElementVNode("h3",S6,[d[0]||(d[0]=r.createElementVNode("span",{class:"w-2 h-2 rounded-full bg-danger-500 shadow-[0_0_8px_rgba(239,68,68,0.5)]"},null,-1)),r.createTextVNode(" "+r.toDisplayString(r.unref(t)("beforeAfter.dataBefore")),1)]),r.createElementVNode("span",A6,r.toDisplayString(r.unref(t)("beforeAfter.original")),1)])]),r.createElementVNode("div",T6,[r.createElementVNode("div",B6,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(i.value,(f,h)=>(r.openBlock(),r.createBlock(Gs,{key:h,"model-value":l(f),label:a(String(h)),disabled:"",variant:"underlined",class:"w-full"},null,8,["model-value","label"]))),128)),Object.keys(i.value).length===0?(r.openBlock(),r.createElementBlock("div",P6)):r.createCommentVNode("",!0)])])]),r.createElementVNode("div",N6,[r.createElementVNode("div",D6,[r.createElementVNode("div",M6,[r.createElementVNode("h3",R6,[d[1]||(d[1]=r.createElementVNode("span",{class:"w-2 h-2 rounded-full bg-success-500 shadow-[0_0_8px_rgba(34,197,94,0.5)]"},null,-1)),r.createTextVNode(" "+r.toDisplayString(r.unref(t)("beforeAfter.dataAfter")),1)]),r.createElementVNode("span",I6,r.toDisplayString(r.unref(t)("beforeAfter.modified")),1)])]),r.createElementVNode("div",O6,[r.createElementVNode("div",L6,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(s.value,(f,h)=>(r.openBlock(),r.createBlock(Gs,{key:h,"model-value":l(f),label:a(String(h)),disabled:"",variant:"underlined",class:"w-full"},null,8,["model-value","label"]))),128)),Object.keys(s.value).length===0?(r.openBlock(),r.createElementBlock("div",F6,r.toDisplayString(r.unref(t)("beforeAfter.noModifiedData")),1)):r.createCommentVNode("",!0)])])])]))}}),$6={class:"inline-flex items-center text-[11px] font-semibold px-2.5 py-1 rounded-full bg-primary-50 dark:bg-primary-900/20 text-primary-700 dark:text-primary-300 border border-primary-100 dark:border-primary-800/40"},z6={key:0},j6={class:"grid grid-cols-3 gap-x-5 px-5 py-2 border-b border-neutral-200 dark:border-neutral-700 bg-neutral-50/60 dark:bg-neutral-900/40 text-[9px] font-bold uppercase tracking-wider text-neutral-400 dark:text-neutral-500"},U6={class:"text-danger-500/80 dark:text-danger-400/80"},W6={class:"text-success-600/80 dark:text-success-400/80"},H6={class:"flex items-center gap-2 min-w-0"},q6=["title"],K6={class:"text-[13px] font-semibold text-neutral-800 dark:text-neutral-100 truncate"},G6=["title"],Y6={class:"min-w-0"},Z6={class:"sm:hidden text-[9px] font-bold uppercase tracking-wider text-danger-500/80 dark:text-danger-400/80 mb-1"},X6={key:0,class:"font-mono text-[11px] leading-relaxed whitespace-pre-wrap break-words max-h-32 overflow-y-auto text-neutral-500 dark:text-neutral-400"},J6={key:1,class:"font-mono text-[11.5px] text-neutral-500 dark:text-neutral-400 break-words"},Q6={class:"min-w-0"},V6={class:"sm:hidden text-[9px] font-bold uppercase tracking-wider text-success-600/80 dark:text-success-400/80 mb-1"},e8={key:0,class:"font-mono text-[11px] leading-relaxed whitespace-pre-wrap break-words max-h-32 overflow-y-auto text-neutral-700 dark:text-neutral-200"},t8={key:1,class:"font-mono text-[11.5px] text-neutral-700 dark:text-neutral-200 break-words"},n8={key:1,class:"flex flex-col items-center gap-2 py-12 px-4"},o8={class:"text-sm text-neutral-500 dark:text-neutral-400"},Um=Sn(r.defineComponent({name:"DCodeFieldDiff",__name:"DCodeFieldDiff",props:{dataBefore:{},dataAfter:{},labels:{}},setup(e){const{t,te:n}=In.useI18n(),o=e,i=h=>{if(h==null)return null;if(typeof h=="string"){try{const p=h.trim();if(p.startsWith("{")||p.startsWith("[")){const g=JSON.parse(p);return typeof g=="object"&&g!==null?g:null}}catch(p){console.error("Failed to parse diff data string:",p)}return null}return typeof h=="object"?h:null},s=r.computed(()=>{const h=i(o.dataBefore)||{},p=i(o.dataAfter)||{},g=[...new Set([...Object.keys(h),...Object.keys(p)])],y=b=>b===void 0?null:b;return g.map(b=>{const _=b in h,x=b in p,B=_?h[b]:null,R=x?p[b]:null;return{key:b,before:B,after:R,status:_?x?"modified":"removed":"added"}}).filter(b=>JSON.stringify(y(b.before))!==JSON.stringify(y(b.after)))}),a=h=>h==="added"?"bg-success-500":h==="removed"?"bg-danger-500":"bg-neutral-300 dark:bg-neutral-600",l=h=>{if(o.labels&&o.labels[h])return o.labels[h];const p=`fieldLabels.${h}`;return n(p)?t(p):h.replaceAll(/([A-Z])/g," $1").replace(/^./,g=>g.toUpperCase()).trim()},c=h=>h==null?!1:Array.isArray(h)?h.some(p=>p!==null&&typeof p=="object"):typeof h=="object",d=h=>{try{return JSON.stringify(h,null,2)}catch{return String(h)}},f=h=>{if(h==null||h==="")return"-";if(typeof h=="boolean")return t(h?"common.yes":"common.no");if(Array.isArray(h))return h.length===0?"-":h.map(p=>p!==null&&typeof p=="object"?JSON.stringify(p):String(p)).join(", ");if(typeof h=="object"){const p=h.name??h.label??h.code??h.value??h.id;return p!=null?String(p):JSON.stringify(h)}return String(h)};return(h,p)=>(r.openBlock(),r.createBlock(Pi,{title:r.unref(t)("beforeAfter.changedFields"),padding:"p-0",class:"overflow-hidden"},{actions:r.withCtx(()=>[r.createElementVNode("span",$6,r.toDisplayString(s.value.length),1)]),default:r.withCtx(()=>[s.value.length>0?(r.openBlock(),r.createElementBlock("div",z6,[r.createElementVNode("div",j6,[r.createElementVNode("span",null,r.toDisplayString(r.unref(t)("beforeAfter.field")),1),r.createElementVNode("span",U6,r.toDisplayString(r.unref(t)("beforeAfter.dataBefore")),1),r.createElementVNode("span",W6,r.toDisplayString(r.unref(t)("beforeAfter.dataAfter")),1)]),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(s.value,(g,y)=>(r.openBlock(),r.createElementBlock("div",{key:g.key,class:"fielddiff-row grid grid-cols-1 sm:grid-cols-3 gap-x-5 gap-y-1.5 px-5 py-3 border-b border-neutral-100 dark:border-neutral-800 last:border-b-0 hover:bg-neutral-50/70 dark:hover:bg-neutral-900/30 transition-colors",style:r.normalizeStyle({animationDelay:`${Math.min(y,12)*40}ms`})},[r.createElementVNode("div",H6,[r.createElementVNode("span",{class:r.normalizeClass(["w-1.5 h-1.5 rounded-full shrink-0",a(g.status)]),title:r.unref(t)(`beforeAfter.${g.status}`)},null,10,q6),r.createElementVNode("span",K6,r.toDisplayString(l(g.key)),1),r.createElementVNode("code",{class:"text-[10px] font-mono text-neutral-400 dark:text-neutral-500 truncate",title:g.key},r.toDisplayString(g.key),9,G6)]),r.createElementVNode("div",Y6,[r.createElementVNode("div",Z6,r.toDisplayString(r.unref(t)("beforeAfter.dataBefore")),1),c(g.before)?(r.openBlock(),r.createElementBlock("pre",X6,r.toDisplayString(d(g.before)),1)):(r.openBlock(),r.createElementBlock("span",J6,r.toDisplayString(f(g.before)),1))]),r.createElementVNode("div",Q6,[r.createElementVNode("div",V6,r.toDisplayString(r.unref(t)("beforeAfter.dataAfter")),1),c(g.after)?(r.openBlock(),r.createElementBlock("pre",e8,r.toDisplayString(d(g.after)),1)):(r.openBlock(),r.createElementBlock("span",t8,r.toDisplayString(f(g.after)),1))])],4))),128))])):(r.openBlock(),r.createElementBlock("div",n8,[r.createVNode(r.unref(Ae.CircleCheck),{class:"w-8 h-8 text-success-400 dark:text-success-500","stroke-width":1.5}),r.createElementVNode("p",o8,r.toDisplayString(r.unref(t)("beforeAfter.noModifiedData")),1)]))]),_:1},8,["title"]))}}),[["__scopeId","data-v-84417f89"]]);function Hu(e){return e+.5|0}const za=(e,t,n)=>Math.max(Math.min(e,n),t);function qu(e){return za(Hu(e*2.55),0,255)}function ja(e){return za(Hu(e*255),0,255)}function Ys(e){return za(Hu(e/2.55)/100,0,1)}function Hx(e){return za(Hu(e*100),0,100)}const ti={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},hy=[..."0123456789ABCDEF"],r8=e=>hy[e&15],i8=e=>hy[(e&240)>>4]+hy[e&15],Wm=e=>(e&240)>>4===(e&15),s8=e=>Wm(e.r)&&Wm(e.g)&&Wm(e.b)&&Wm(e.a);function a8(e){var t=e.length,n;return e[0]==="#"&&(t===4||t===5?n={r:255&ti[e[1]]*17,g:255&ti[e[2]]*17,b:255&ti[e[3]]*17,a:t===5?ti[e[4]]*17:255}:(t===7||t===9)&&(n={r:ti[e[1]]<<4|ti[e[2]],g:ti[e[3]]<<4|ti[e[4]],b:ti[e[5]]<<4|ti[e[6]],a:t===9?ti[e[7]]<<4|ti[e[8]]:255})),n}const l8=(e,t)=>e<255?t(e):"";function c8(e){var t=s8(e)?r8:i8;return e?"#"+t(e.r)+t(e.g)+t(e.b)+l8(e.a,t):void 0}const d8=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function qx(e,t,n){const o=t*Math.min(n,1-n),i=(s,a=(s+e/30)%12)=>n-o*Math.max(Math.min(a-3,9-a,1),-1);return[i(0),i(8),i(4)]}function u8(e,t,n){const o=(i,s=(i+e/60)%6)=>n-n*t*Math.max(Math.min(s,4-s,1),0);return[o(5),o(3),o(1)]}function f8(e,t,n){const o=qx(e,1,.5);let i;for(t+n>1&&(i=1/(t+n),t*=i,n*=i),i=0;i<3;i++)o[i]*=1-t-n,o[i]+=t;return o}function h8(e,t,n,o,i){return e===i?(t-n)/o+(t<n?6:0):t===i?(n-e)/o+2:(e-t)/o+4}function my(e){const n=e.r/255,o=e.g/255,i=e.b/255,s=Math.max(n,o,i),a=Math.min(n,o,i),l=(s+a)/2;let c,d,f;return s!==a&&(f=s-a,d=l>.5?f/(2-s-a):f/(s+a),c=h8(n,o,i,f,s),c=c*60+.5),[c|0,d||0,l]}function py(e,t,n,o){return(Array.isArray(t)?e(t[0],t[1],t[2]):e(t,n,o)).map(ja)}function gy(e,t,n){return py(qx,e,t,n)}function m8(e,t,n){return py(f8,e,t,n)}function p8(e,t,n){return py(u8,e,t,n)}function Kx(e){return(e%360+360)%360}function g8(e){const t=d8.exec(e);let n=255,o;if(!t)return;t[5]!==o&&(n=t[6]?qu(+t[5]):ja(+t[5]));const i=Kx(+t[2]),s=+t[3]/100,a=+t[4]/100;return t[1]==="hwb"?o=m8(i,s,a):t[1]==="hsv"?o=p8(i,s,a):o=gy(i,s,a),{r:o[0],g:o[1],b:o[2],a:n}}function b8(e,t){var n=my(e);n[0]=Kx(n[0]+t),n=gy(n),e.r=n[0],e.g=n[1],e.b=n[2]}function y8(e){if(!e)return;const t=my(e),n=t[0],o=Hx(t[1]),i=Hx(t[2]);return e.a<255?`hsla(${n}, ${o}%, ${i}%, ${Ys(e.a)})`:`hsl(${n}, ${o}%, ${i}%)`}const Gx={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"},Yx={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 v8(){const e={},t=Object.keys(Yx),n=Object.keys(Gx);let o,i,s,a,l;for(o=0;o<t.length;o++){for(a=l=t[o],i=0;i<n.length;i++)s=n[i],l=l.replace(s,Gx[s]);s=parseInt(Yx[a],16),e[l]=[s>>16&255,s>>8&255,s&255]}return e}let Hm;function w8(e){Hm||(Hm=v8(),Hm.transparent=[0,0,0,0]);const t=Hm[e.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}const k8=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function _8(e){const t=k8.exec(e);let n=255,o,i,s;if(t){if(t[7]!==o){const a=+t[7];n=t[8]?qu(a):za(a*255,0,255)}return o=+t[1],i=+t[3],s=+t[5],o=255&(t[2]?qu(o):za(o,0,255)),i=255&(t[4]?qu(i):za(i,0,255)),s=255&(t[6]?qu(s):za(s,0,255)),{r:o,g:i,b:s,a:n}}}function x8(e){return e&&(e.a<255?`rgba(${e.r}, ${e.g}, ${e.b}, ${Ys(e.a)})`:`rgb(${e.r}, ${e.g}, ${e.b})`)}const by=e=>e<=.0031308?e*12.92:Math.pow(e,1/2.4)*1.055-.055,ld=e=>e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4);function E8(e,t,n){const o=ld(Ys(e.r)),i=ld(Ys(e.g)),s=ld(Ys(e.b));return{r:ja(by(o+n*(ld(Ys(t.r))-o))),g:ja(by(i+n*(ld(Ys(t.g))-i))),b:ja(by(s+n*(ld(Ys(t.b))-s))),a:e.a+n*(t.a-e.a)}}function qm(e,t,n){if(e){let o=my(e);o[t]=Math.max(0,Math.min(o[t]+o[t]*n,t===0?360:1)),o=gy(o),e.r=o[0],e.g=o[1],e.b=o[2]}}function Zx(e,t){return e&&Object.assign(t||{},e)}function Xx(e){var t={r:0,g:0,b:0,a:255};return Array.isArray(e)?e.length>=3&&(t={r:e[0],g:e[1],b:e[2],a:255},e.length>3&&(t.a=ja(e[3]))):(t=Zx(e,{r:0,g:0,b:0,a:1}),t.a=ja(t.a)),t}function C8(e){return e.charAt(0)==="r"?_8(e):g8(e)}class Ku{constructor(t){if(t instanceof Ku)return t;const n=typeof t;let o;n==="object"?o=Xx(t):n==="string"&&(o=a8(t)||w8(t)||C8(t)),this._rgb=o,this._valid=!!o}get valid(){return this._valid}get rgb(){var t=Zx(this._rgb);return t&&(t.a=Ys(t.a)),t}set rgb(t){this._rgb=Xx(t)}rgbString(){return this._valid?x8(this._rgb):void 0}hexString(){return this._valid?c8(this._rgb):void 0}hslString(){return this._valid?y8(this._rgb):void 0}mix(t,n){if(t){const o=this.rgb,i=t.rgb;let s;const a=n===s?.5:n,l=2*a-1,c=o.a-i.a,d=((l*c===-1?l:(l+c)/(1+l*c))+1)/2;s=1-d,o.r=255&d*o.r+s*i.r+.5,o.g=255&d*o.g+s*i.g+.5,o.b=255&d*o.b+s*i.b+.5,o.a=a*o.a+(1-a)*i.a,this.rgb=o}return this}interpolate(t,n){return t&&(this._rgb=E8(this._rgb,t._rgb,n)),this}clone(){return new Ku(this.rgb)}alpha(t){return this._rgb.a=ja(t),this}clearer(t){const n=this._rgb;return n.a*=1-t,this}greyscale(){const t=this._rgb,n=Hu(t.r*.3+t.g*.59+t.b*.11);return t.r=t.g=t.b=n,this}opaquer(t){const n=this._rgb;return n.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return qm(this._rgb,2,t),this}darken(t){return qm(this._rgb,2,-t),this}saturate(t){return qm(this._rgb,1,t),this}desaturate(t){return qm(this._rgb,1,-t),this}rotate(t){return b8(this._rgb,t),this}}function Zs(){}const S8=(()=>{let e=0;return()=>e++})();function xn(e){return e==null}function xo(e){if(Array.isArray&&Array.isArray(e))return!0;const t=Object.prototype.toString.call(e);return t.slice(0,7)==="[object"&&t.slice(-6)==="Array]"}function an(e){return e!==null&&Object.prototype.toString.call(e)==="[object Object]"}function Zo(e){return(typeof e=="number"||e instanceof Number)&&isFinite(+e)}function ss(e,t){return Zo(e)?e:t}function Zt(e,t){return typeof e>"u"?t:e}const A8=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100:+e/t,Jx=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100*t:+e;function Wn(e,t,n){if(e&&typeof e.call=="function")return e.apply(n,t)}function An(e,t,n,o){let i,s,a;if(xo(e))for(s=e.length,i=0;i<s;i++)t.call(n,e[i],i);else if(an(e))for(a=Object.keys(e),s=a.length,i=0;i<s;i++)t.call(n,e[a[i]],a[i])}function Km(e,t){let n,o,i,s;if(!e||!t||e.length!==t.length)return!1;for(n=0,o=e.length;n<o;++n)if(i=e[n],s=t[n],i.datasetIndex!==s.datasetIndex||i.index!==s.index)return!1;return!0}function Gm(e){if(xo(e))return e.map(Gm);if(an(e)){const t=Object.create(null),n=Object.keys(e),o=n.length;let i=0;for(;i<o;++i)t[n[i]]=Gm(e[n[i]]);return t}return e}function Qx(e){return["__proto__","prototype","constructor"].indexOf(e)===-1}function T8(e,t,n,o){if(!Qx(e))return;const i=t[e],s=n[e];an(i)&&an(s)?Gu(i,s,o):t[e]=Gm(s)}function Gu(e,t,n){const o=xo(t)?t:[t],i=o.length;if(!an(e))return e;n=n||{};const s=n.merger||T8;let a;for(let l=0;l<i;++l){if(a=o[l],!an(a))continue;const c=Object.keys(a);for(let d=0,f=c.length;d<f;++d)s(c[d],e,a,n)}return e}function Yu(e,t){return Gu(e,t,{merger:B8})}function B8(e,t,n){if(!Qx(e))return;const o=t[e],i=n[e];an(o)&&an(i)?Yu(o,i):Object.prototype.hasOwnProperty.call(t,e)||(t[e]=Gm(i))}const Vx={"":e=>e,x:e=>e.x,y:e=>e.y};function P8(e){const t=e.split("."),n=[];let o="";for(const i of t)o+=i,o.endsWith("\\")?o=o.slice(0,-1)+".":(n.push(o),o="");return n}function N8(e){const t=P8(e);return n=>{for(const o of t){if(o==="")break;n=n&&n[o]}return n}}function Wl(e,t){return(Vx[t]||(Vx[t]=N8(t)))(e)}function yy(e){return e.charAt(0).toUpperCase()+e.slice(1)}const Zu=e=>typeof e<"u",Ua=e=>typeof e=="function",eE=(e,t)=>{if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0};function D8(e){return e.type==="mouseup"||e.type==="click"||e.type==="contextmenu"}const Tn=Math.PI,Vn=2*Tn,M8=Vn+Tn,Ym=Number.POSITIVE_INFINITY,R8=Tn/180,Do=Tn/2,Hl=Tn/4,tE=Tn*2/3,nE=Math.log10,as=Math.sign;function Xu(e,t,n){return Math.abs(e-t)<n}function oE(e){const t=Math.round(e);e=Xu(e,t,e/1e3)?t:e;const n=Math.pow(10,Math.floor(nE(e))),o=e/n;return(o<=1?1:o<=2?2:o<=5?5:10)*n}function I8(e){const t=[],n=Math.sqrt(e);let o;for(o=1;o<n;o++)e%o===0&&(t.push(o),t.push(e/o));return n===(n|0)&&t.push(n),t.sort((i,s)=>i-s).pop(),t}function O8(e){return typeof e=="symbol"||typeof e=="object"&&e!==null&&!(Symbol.toPrimitive in e||"toString"in e||"valueOf"in e)}function Ju(e){return!O8(e)&&!isNaN(parseFloat(e))&&isFinite(e)}function L8(e,t){const n=Math.round(e);return n-t<=e&&n+t>=e}function F8(e,t,n){let o,i,s;for(o=0,i=e.length;o<i;o++)s=e[o][n],isNaN(s)||(t.min=Math.min(t.min,s),t.max=Math.max(t.max,s))}function Xs(e){return e*(Tn/180)}function $8(e){return e*(180/Tn)}function rE(e){if(!Zo(e))return;let t=1,n=0;for(;Math.round(e*t)/t!==e;)t*=10,n++;return n}function iE(e,t){const n=t.x-e.x,o=t.y-e.y,i=Math.sqrt(n*n+o*o);let s=Math.atan2(o,n);return s<-.5*Tn&&(s+=Vn),{angle:s,distance:i}}function vy(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function z8(e,t){return(e-t+M8)%Vn-Tn}function Fr(e){return(e%Vn+Vn)%Vn}function Qu(e,t,n,o){const i=Fr(e),s=Fr(t),a=Fr(n),l=Fr(s-i),c=Fr(a-i),d=Fr(i-s),f=Fr(i-a);return i===s||i===a||o&&s===a||l>c&&d<f}function Xo(e,t,n){return Math.max(t,Math.min(n,e))}function j8(e){return Xo(e,-32768,32767)}function Js(e,t,n,o=1e-6){return e>=Math.min(t,n)-o&&e<=Math.max(t,n)+o}function wy(e,t,n){n=n||(a=>e[a]<t);let o=e.length-1,i=0,s;for(;o-i>1;)s=i+o>>1,n(s)?i=s:o=s;return{lo:i,hi:o}}const ql=(e,t,n,o)=>wy(e,n,o?i=>{const s=e[i][t];return s<n||s===n&&e[i+1][t]===n}:i=>e[i][t]<n),U8=(e,t,n)=>wy(e,n,o=>e[o][t]>=n);function W8(e,t,n){let o=0,i=e.length;for(;o<i&&e[o]<t;)o++;for(;i>o&&e[i-1]>n;)i--;return o>0||i<e.length?e.slice(o,i):e}const sE=["push","pop","shift","splice","unshift"];function H8(e,t){if(e._chartjs){e._chartjs.listeners.push(t);return}Object.defineProperty(e,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[t]}}),sE.forEach(n=>{const o="_onData"+yy(n),i=e[n];Object.defineProperty(e,n,{configurable:!0,enumerable:!1,value(...s){const a=i.apply(this,s);return e._chartjs.listeners.forEach(l=>{typeof l[o]=="function"&&l[o](...s)}),a}})})}function aE(e,t){const n=e._chartjs;if(!n)return;const o=n.listeners,i=o.indexOf(t);i!==-1&&o.splice(i,1),!(o.length>0)&&(sE.forEach(s=>{delete e[s]}),delete e._chartjs)}function lE(e){const t=new Set(e);return t.size===e.length?e:Array.from(t)}const cE=(function(){return typeof window>"u"?function(e){return e()}:window.requestAnimationFrame})();function dE(e,t){let n=[],o=!1;return function(...i){n=i,o||(o=!0,cE.call(window,()=>{o=!1,e.apply(t,n)}))}}function q8(e,t){let n;return function(...o){return t?(clearTimeout(n),n=setTimeout(e,t,o)):e.apply(this,o),t}}const ky=e=>e==="start"?"left":e==="end"?"right":"center",Jo=(e,t,n)=>e==="start"?t:e==="end"?n:(t+n)/2,K8=(e,t,n,o)=>e===(o?"left":"right")?n:e==="center"?(t+n)/2:t;function G8(e,t,n){const o=t.length;let i=0,s=o;if(e._sorted){const{iScale:a,vScale:l,_parsed:c}=e,d=e.dataset&&e.dataset.options?e.dataset.options.spanGaps:null,f=a.axis,{min:h,max:p,minDefined:g,maxDefined:y}=a.getUserBounds();if(g){if(i=Math.min(ql(c,f,h).lo,n?o:ql(t,f,a.getPixelForValue(h)).lo),d){const b=c.slice(0,i+1).reverse().findIndex(_=>!xn(_[l.axis]));i-=Math.max(0,b)}i=Xo(i,0,o-1)}if(y){let b=Math.max(ql(c,a.axis,p,!0).hi+1,n?0:ql(t,f,a.getPixelForValue(p),!0).hi+1);if(d){const _=c.slice(b-1).findIndex(x=>!xn(x[l.axis]));b+=Math.max(0,_)}s=Xo(b,i,o)-i}else s=o-i}return{start:i,count:s}}function Y8(e){const{xScale:t,yScale:n,_scaleRanges:o}=e,i={xmin:t.min,xmax:t.max,ymin:n.min,ymax:n.max};if(!o)return e._scaleRanges=i,!0;const s=o.xmin!==t.min||o.xmax!==t.max||o.ymin!==n.min||o.ymax!==n.max;return Object.assign(o,i),s}const Zm=e=>e===0||e===1,uE=(e,t,n)=>-(Math.pow(2,10*(e-=1))*Math.sin((e-t)*Vn/n)),fE=(e,t,n)=>Math.pow(2,-10*e)*Math.sin((e-t)*Vn/n)+1,Vu={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>-e*(e-2),easeInOutQuad:e=>(e/=.5)<1?.5*e*e:-.5*(--e*(e-2)-1),easeInCubic:e=>e*e*e,easeOutCubic:e=>(e-=1)*e*e+1,easeInOutCubic:e=>(e/=.5)<1?.5*e*e*e:.5*((e-=2)*e*e+2),easeInQuart:e=>e*e*e*e,easeOutQuart:e=>-((e-=1)*e*e*e-1),easeInOutQuart:e=>(e/=.5)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2),easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>(e-=1)*e*e*e*e+1,easeInOutQuint:e=>(e/=.5)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2),easeInSine:e=>-Math.cos(e*Do)+1,easeOutSine:e=>Math.sin(e*Do),easeInOutSine:e=>-.5*(Math.cos(Tn*e)-1),easeInExpo:e=>e===0?0:Math.pow(2,10*(e-1)),easeOutExpo:e=>e===1?1:-Math.pow(2,-10*e)+1,easeInOutExpo:e=>Zm(e)?e:e<.5?.5*Math.pow(2,10*(e*2-1)):.5*(-Math.pow(2,-10*(e*2-1))+2),easeInCirc:e=>e>=1?e:-(Math.sqrt(1-e*e)-1),easeOutCirc:e=>Math.sqrt(1-(e-=1)*e),easeInOutCirc:e=>(e/=.5)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1),easeInElastic:e=>Zm(e)?e:uE(e,.075,.3),easeOutElastic:e=>Zm(e)?e:fE(e,.075,.3),easeInOutElastic(e){return Zm(e)?e:e<.5?.5*uE(e*2,.1125,.45):.5+.5*fE(e*2-1,.1125,.45)},easeInBack(e){return e*e*((1.70158+1)*e-1.70158)},easeOutBack(e){return(e-=1)*e*((1.70158+1)*e+1.70158)+1},easeInOutBack(e){let t=1.70158;return(e/=.5)<1?.5*(e*e*(((t*=1.525)+1)*e-t)):.5*((e-=2)*e*(((t*=1.525)+1)*e+t)+2)},easeInBounce:e=>1-Vu.easeOutBounce(1-e),easeOutBounce(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},easeInOutBounce:e=>e<.5?Vu.easeInBounce(e*2)*.5:Vu.easeOutBounce(e*2-1)*.5+.5};function _y(e){if(e&&typeof e=="object"){const t=e.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function hE(e){return _y(e)?e:new Ku(e)}function xy(e){return _y(e)?e:new Ku(e).saturate(.5).darken(.1).hexString()}const Z8=["x","y","borderWidth","radius","tension"],X8=["color","borderColor","backgroundColor"];function J8(e){e.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),e.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>t!=="onProgress"&&t!=="onComplete"&&t!=="fn"}),e.set("animations",{colors:{type:"color",properties:X8},numbers:{type:"number",properties:Z8}}),e.describe("animations",{_fallback:"animation"}),e.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>t|0}}}})}function Q8(e){e.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const mE=new Map;function V8(e,t){t=t||{};const n=e+JSON.stringify(t);let o=mE.get(n);return o||(o=new Intl.NumberFormat(e,t),mE.set(n,o)),o}function Ey(e,t,n){return V8(t,n).format(e)}const e7={values(e){return xo(e)?e:""+e},numeric(e,t,n){if(e===0)return"0";const o=this.chart.options.locale;let i,s=e;if(n.length>1){const d=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(d<1e-4||d>1e15)&&(i="scientific"),s=t7(e,n)}const a=nE(Math.abs(s)),l=isNaN(a)?1:Math.max(Math.min(-1*Math.floor(a),20),0),c={notation:i,minimumFractionDigits:l,maximumFractionDigits:l};return Object.assign(c,this.options.ticks.format),Ey(e,o,c)}};function t7(e,t){let n=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;return Math.abs(n)>=1&&e!==Math.floor(e)&&(n=e-Math.floor(e)),n}var pE={formatters:e7};function n7(e){e.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,n)=>n.lineWidth,tickColor:(t,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:pE.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),e.route("scale.ticks","color","","color"),e.route("scale.grid","color","","borderColor"),e.route("scale.border","color","","borderColor"),e.route("scale.title","color","","color"),e.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&t!=="callback"&&t!=="parser",_indexable:t=>t!=="borderDash"&&t!=="tickBorderDash"&&t!=="dash"}),e.describe("scales",{_fallback:"scale"}),e.describe("scale.ticks",{_scriptable:t=>t!=="backdropPadding"&&t!=="callback",_indexable:t=>t!=="backdropPadding"})}const Kl=Object.create(null),Cy=Object.create(null);function ef(e,t){if(!t)return e;const n=t.split(".");for(let o=0,i=n.length;o<i;++o){const s=n[o];e=e[s]||(e[s]=Object.create(null))}return e}function Sy(e,t,n){return typeof t=="string"?Gu(ef(e,t),n):Gu(ef(e,""),t)}class o7{constructor(t,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=o=>o.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=(o,i)=>xy(i.backgroundColor),this.hoverBorderColor=(o,i)=>xy(i.borderColor),this.hoverColor=(o,i)=>xy(i.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t),this.apply(n)}set(t,n){return Sy(this,t,n)}get(t){return ef(this,t)}describe(t,n){return Sy(Cy,t,n)}override(t,n){return Sy(Kl,t,n)}route(t,n,o,i){const s=ef(this,t),a=ef(this,o),l="_"+n;Object.defineProperties(s,{[l]:{value:s[n],writable:!0},[n]:{enumerable:!0,get(){const c=this[l],d=a[i];return an(c)?Object.assign({},d,c):Zt(c,d)},set(c){this[l]=c}}})}apply(t){t.forEach(n=>n(this))}}var fo=new o7({_scriptable:e=>!e.startsWith("on"),_indexable:e=>e!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[J8,Q8,n7]);function r7(e){return!e||xn(e.size)||xn(e.family)?null:(e.style?e.style+" ":"")+(e.weight?e.weight+" ":"")+e.size+"px "+e.family}function gE(e,t,n,o,i){let s=t[i];return s||(s=t[i]=e.measureText(i).width,n.push(i)),s>o&&(o=s),o}function Gl(e,t,n){const o=e.currentDevicePixelRatio,i=n!==0?Math.max(n/2,.5):0;return Math.round((t-i)*o)/o+i}function bE(e,t){!t&&!e||(t=t||e.getContext("2d"),t.save(),t.resetTransform(),t.clearRect(0,0,e.width,e.height),t.restore())}function Ay(e,t,n,o){yE(e,t,n,o,null)}function yE(e,t,n,o,i){let s,a,l,c,d,f,h,p;const g=t.pointStyle,y=t.rotation,b=t.radius;let _=(y||0)*R8;if(g&&typeof g=="object"&&(s=g.toString(),s==="[object HTMLImageElement]"||s==="[object HTMLCanvasElement]")){e.save(),e.translate(n,o),e.rotate(_),e.drawImage(g,-g.width/2,-g.height/2,g.width,g.height),e.restore();return}if(!(isNaN(b)||b<=0)){switch(e.beginPath(),g){default:i?e.ellipse(n,o,i/2,b,0,0,Vn):e.arc(n,o,b,0,Vn),e.closePath();break;case"triangle":f=i?i/2:b,e.moveTo(n+Math.sin(_)*f,o-Math.cos(_)*b),_+=tE,e.lineTo(n+Math.sin(_)*f,o-Math.cos(_)*b),_+=tE,e.lineTo(n+Math.sin(_)*f,o-Math.cos(_)*b),e.closePath();break;case"rectRounded":d=b*.516,c=b-d,a=Math.cos(_+Hl)*c,h=Math.cos(_+Hl)*(i?i/2-d:c),l=Math.sin(_+Hl)*c,p=Math.sin(_+Hl)*(i?i/2-d:c),e.arc(n-h,o-l,d,_-Tn,_-Do),e.arc(n+p,o-a,d,_-Do,_),e.arc(n+h,o+l,d,_,_+Do),e.arc(n-p,o+a,d,_+Do,_+Tn),e.closePath();break;case"rect":if(!y){c=Math.SQRT1_2*b,f=i?i/2:c,e.rect(n-f,o-c,2*f,2*c);break}_+=Hl;case"rectRot":h=Math.cos(_)*(i?i/2:b),a=Math.cos(_)*b,l=Math.sin(_)*b,p=Math.sin(_)*(i?i/2:b),e.moveTo(n-h,o-l),e.lineTo(n+p,o-a),e.lineTo(n+h,o+l),e.lineTo(n-p,o+a),e.closePath();break;case"crossRot":_+=Hl;case"cross":h=Math.cos(_)*(i?i/2:b),a=Math.cos(_)*b,l=Math.sin(_)*b,p=Math.sin(_)*(i?i/2:b),e.moveTo(n-h,o-l),e.lineTo(n+h,o+l),e.moveTo(n+p,o-a),e.lineTo(n-p,o+a);break;case"star":h=Math.cos(_)*(i?i/2:b),a=Math.cos(_)*b,l=Math.sin(_)*b,p=Math.sin(_)*(i?i/2:b),e.moveTo(n-h,o-l),e.lineTo(n+h,o+l),e.moveTo(n+p,o-a),e.lineTo(n-p,o+a),_+=Hl,h=Math.cos(_)*(i?i/2:b),a=Math.cos(_)*b,l=Math.sin(_)*b,p=Math.sin(_)*(i?i/2:b),e.moveTo(n-h,o-l),e.lineTo(n+h,o+l),e.moveTo(n+p,o-a),e.lineTo(n-p,o+a);break;case"line":a=i?i/2:Math.cos(_)*b,l=Math.sin(_)*b,e.moveTo(n-a,o-l),e.lineTo(n+a,o+l);break;case"dash":e.moveTo(n,o),e.lineTo(n+Math.cos(_)*(i?i/2:b),o+Math.sin(_)*b);break;case!1:e.closePath();break}e.fill(),t.borderWidth>0&&e.stroke()}}function tf(e,t,n){return n=n||.5,!t||e&&e.x>t.left-n&&e.x<t.right+n&&e.y>t.top-n&&e.y<t.bottom+n}function Xm(e,t){e.save(),e.beginPath(),e.rect(t.left,t.top,t.right-t.left,t.bottom-t.top),e.clip()}function Jm(e){e.restore()}function i7(e,t,n,o,i){if(!t)return e.lineTo(n.x,n.y);if(i==="middle"){const s=(t.x+n.x)/2;e.lineTo(s,t.y),e.lineTo(s,n.y)}else i==="after"!=!!o?e.lineTo(t.x,n.y):e.lineTo(n.x,t.y);e.lineTo(n.x,n.y)}function s7(e,t,n,o){if(!t)return e.lineTo(n.x,n.y);e.bezierCurveTo(o?t.cp1x:t.cp2x,o?t.cp1y:t.cp2y,o?n.cp2x:n.cp1x,o?n.cp2y:n.cp1y,n.x,n.y)}function a7(e,t){t.translation&&e.translate(t.translation[0],t.translation[1]),xn(t.rotation)||e.rotate(t.rotation),t.color&&(e.fillStyle=t.color),t.textAlign&&(e.textAlign=t.textAlign),t.textBaseline&&(e.textBaseline=t.textBaseline)}function l7(e,t,n,o,i){if(i.strikethrough||i.underline){const s=e.measureText(o),a=t-s.actualBoundingBoxLeft,l=t+s.actualBoundingBoxRight,c=n-s.actualBoundingBoxAscent,d=n+s.actualBoundingBoxDescent,f=i.strikethrough?(c+d)/2:d;e.strokeStyle=e.fillStyle,e.beginPath(),e.lineWidth=i.decorationWidth||2,e.moveTo(a,f),e.lineTo(l,f),e.stroke()}}function c7(e,t){const n=e.fillStyle;e.fillStyle=t.color,e.fillRect(t.left,t.top,t.width,t.height),e.fillStyle=n}function nf(e,t,n,o,i,s={}){const a=xo(t)?t:[t],l=s.strokeWidth>0&&s.strokeColor!=="";let c,d;for(e.save(),e.font=i.string,a7(e,s),c=0;c<a.length;++c)d=a[c],s.backdrop&&c7(e,s.backdrop),l&&(s.strokeColor&&(e.strokeStyle=s.strokeColor),xn(s.strokeWidth)||(e.lineWidth=s.strokeWidth),e.strokeText(d,n,o,s.maxWidth)),e.fillText(d,n,o,s.maxWidth),l7(e,n,o,d,s),o+=Number(i.lineHeight);e.restore()}function Qm(e,t){const{x:n,y:o,w:i,h:s,radius:a}=t;e.arc(n+a.topLeft,o+a.topLeft,a.topLeft,1.5*Tn,Tn,!0),e.lineTo(n,o+s-a.bottomLeft),e.arc(n+a.bottomLeft,o+s-a.bottomLeft,a.bottomLeft,Tn,Do,!0),e.lineTo(n+i-a.bottomRight,o+s),e.arc(n+i-a.bottomRight,o+s-a.bottomRight,a.bottomRight,Do,0,!0),e.lineTo(n+i,o+a.topRight),e.arc(n+i-a.topRight,o+a.topRight,a.topRight,0,-Do,!0),e.lineTo(n+a.topLeft,o)}const d7=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,u7=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function f7(e,t){const n=(""+e).match(d7);if(!n||n[1]==="normal")return t*1.2;switch(e=+n[2],n[3]){case"px":return e;case"%":e/=100;break}return t*e}const h7=e=>+e||0;function Ty(e,t){const n={},o=an(t),i=o?Object.keys(t):t,s=an(e)?o?a=>Zt(e[a],e[t[a]]):a=>e[a]:()=>e;for(const a of i)n[a]=h7(s(a));return n}function vE(e){return Ty(e,{top:"y",right:"x",bottom:"y",left:"x"})}function cd(e){return Ty(e,["topLeft","topRight","bottomLeft","bottomRight"])}function ni(e){const t=vE(e);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function Qo(e,t){e=e||{},t=t||fo.font;let n=Zt(e.size,t.size);typeof n=="string"&&(n=parseInt(n,10));let o=Zt(e.style,t.style);o&&!(""+o).match(u7)&&(console.warn('Invalid font style specified: "'+o+'"'),o=void 0);const i={family:Zt(e.family,t.family),lineHeight:f7(Zt(e.lineHeight,t.lineHeight),n),size:n,style:o,weight:Zt(e.weight,t.weight),string:""};return i.string=r7(i),i}function Vm(e,t,n,o){let i,s,a;for(i=0,s=e.length;i<s;++i)if(a=e[i],a!==void 0&&a!==void 0)return a}function m7(e,t,n){const{min:o,max:i}=e,s=Jx(t,(i-o)/2),a=(l,c)=>n&&l===0?0:l+c;return{min:a(o,-Math.abs(s)),max:a(i,s)}}function Yl(e,t){return Object.assign(Object.create(e),t)}function By(e,t=[""],n,o,i=()=>e[0]){const s=n||e;typeof o>"u"&&(o=EE("_fallback",e));const a={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:e,_rootScopes:s,_fallback:o,_getTarget:i,override:l=>By([l,...e],t,s,o)};return new Proxy(a,{deleteProperty(l,c){return delete l[c],delete l._keys,delete e[0][c],!0},get(l,c){return kE(l,c,()=>_7(c,t,e,l))},getOwnPropertyDescriptor(l,c){return Reflect.getOwnPropertyDescriptor(l._scopes[0],c)},getPrototypeOf(){return Reflect.getPrototypeOf(e[0])},has(l,c){return CE(l).includes(c)},ownKeys(l){return CE(l)},set(l,c,d){const f=l._storage||(l._storage=i());return l[c]=f[c]=d,delete l._keys,!0}})}function dd(e,t,n,o){const i={_cacheable:!1,_proxy:e,_context:t,_subProxy:n,_stack:new Set,_descriptors:wE(e,o),setContext:s=>dd(e,s,n,o),override:s=>dd(e.override(s),t,n,o)};return new Proxy(i,{deleteProperty(s,a){return delete s[a],delete e[a],!0},get(s,a,l){return kE(s,a,()=>g7(s,a,l))},getOwnPropertyDescriptor(s,a){return s._descriptors.allKeys?Reflect.has(e,a)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(e,a)},getPrototypeOf(){return Reflect.getPrototypeOf(e)},has(s,a){return Reflect.has(e,a)},ownKeys(){return Reflect.ownKeys(e)},set(s,a,l){return e[a]=l,delete s[a],!0}})}function wE(e,t={scriptable:!0,indexable:!0}){const{_scriptable:n=t.scriptable,_indexable:o=t.indexable,_allKeys:i=t.allKeys}=e;return{allKeys:i,scriptable:n,indexable:o,isScriptable:Ua(n)?n:()=>n,isIndexable:Ua(o)?o:()=>o}}const p7=(e,t)=>e?e+yy(t):t,Py=(e,t)=>an(t)&&e!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function kE(e,t,n){if(Object.prototype.hasOwnProperty.call(e,t)||t==="constructor")return e[t];const o=n();return e[t]=o,o}function g7(e,t,n){const{_proxy:o,_context:i,_subProxy:s,_descriptors:a}=e;let l=o[t];return Ua(l)&&a.isScriptable(t)&&(l=b7(t,l,e,n)),xo(l)&&l.length&&(l=y7(t,l,e,a.isIndexable)),Py(t,l)&&(l=dd(l,i,s&&s[t],a)),l}function b7(e,t,n,o){const{_proxy:i,_context:s,_subProxy:a,_stack:l}=n;if(l.has(e))throw new Error("Recursion detected: "+Array.from(l).join("->")+"->"+e);l.add(e);let c=t(s,a||o);return l.delete(e),Py(e,c)&&(c=Ny(i._scopes,i,e,c)),c}function y7(e,t,n,o){const{_proxy:i,_context:s,_subProxy:a,_descriptors:l}=n;if(typeof s.index<"u"&&o(e))return t[s.index%t.length];if(an(t[0])){const c=t,d=i._scopes.filter(f=>f!==c);t=[];for(const f of c){const h=Ny(d,i,e,f);t.push(dd(h,s,a&&a[e],l))}}return t}function _E(e,t,n){return Ua(e)?e(t,n):e}const v7=(e,t)=>e===!0?t:typeof e=="string"?Wl(t,e):void 0;function w7(e,t,n,o,i){for(const s of t){const a=v7(n,s);if(a){e.add(a);const l=_E(a._fallback,n,i);if(typeof l<"u"&&l!==n&&l!==o)return l}else if(a===!1&&typeof o<"u"&&n!==o)return null}return!1}function Ny(e,t,n,o){const i=t._rootScopes,s=_E(t._fallback,n,o),a=[...e,...i],l=new Set;l.add(o);let c=xE(l,a,n,s||n,o);return c===null||typeof s<"u"&&s!==n&&(c=xE(l,a,s,c,o),c===null)?!1:By(Array.from(l),[""],i,s,()=>k7(t,n,o))}function xE(e,t,n,o,i){for(;n;)n=w7(e,t,n,o,i);return n}function k7(e,t,n){const o=e._getTarget();t in o||(o[t]={});const i=o[t];return xo(i)&&an(n)?n:i||{}}function _7(e,t,n,o){let i;for(const s of t)if(i=EE(p7(s,e),n),typeof i<"u")return Py(e,i)?Ny(n,o,e,i):i}function EE(e,t){for(const n of t){if(!n)continue;const o=n[e];if(typeof o<"u")return o}}function CE(e){let t=e._keys;return t||(t=e._keys=x7(e._scopes)),t}function x7(e){const t=new Set;for(const n of e)for(const o of Object.keys(n).filter(i=>!i.startsWith("_")))t.add(o);return Array.from(t)}const E7=Number.EPSILON||1e-14,ud=(e,t)=>t<e.length&&!e[t].skip&&e[t],SE=e=>e==="x"?"y":"x";function C7(e,t,n,o){const i=e.skip?t:e,s=t,a=n.skip?t:n,l=vy(s,i),c=vy(a,s);let d=l/(l+c),f=c/(l+c);d=isNaN(d)?0:d,f=isNaN(f)?0:f;const h=o*d,p=o*f;return{previous:{x:s.x-h*(a.x-i.x),y:s.y-h*(a.y-i.y)},next:{x:s.x+p*(a.x-i.x),y:s.y+p*(a.y-i.y)}}}function S7(e,t,n){const o=e.length;let i,s,a,l,c,d=ud(e,0);for(let f=0;f<o-1;++f)if(c=d,d=ud(e,f+1),!(!c||!d)){if(Xu(t[f],0,E7)){n[f]=n[f+1]=0;continue}i=n[f]/t[f],s=n[f+1]/t[f],l=Math.pow(i,2)+Math.pow(s,2),!(l<=9)&&(a=3/Math.sqrt(l),n[f]=i*a*t[f],n[f+1]=s*a*t[f])}}function A7(e,t,n="x"){const o=SE(n),i=e.length;let s,a,l,c=ud(e,0);for(let d=0;d<i;++d){if(a=l,l=c,c=ud(e,d+1),!l)continue;const f=l[n],h=l[o];a&&(s=(f-a[n])/3,l[`cp1${n}`]=f-s,l[`cp1${o}`]=h-s*t[d]),c&&(s=(c[n]-f)/3,l[`cp2${n}`]=f+s,l[`cp2${o}`]=h+s*t[d])}}function T7(e,t="x"){const n=SE(t),o=e.length,i=Array(o).fill(0),s=Array(o);let a,l,c,d=ud(e,0);for(a=0;a<o;++a)if(l=c,c=d,d=ud(e,a+1),!!c){if(d){const f=d[t]-c[t];i[a]=f!==0?(d[n]-c[n])/f:0}s[a]=l?d?as(i[a-1])!==as(i[a])?0:(i[a-1]+i[a])/2:i[a-1]:i[a]}S7(e,i,s),A7(e,s,t)}function ep(e,t,n){return Math.max(Math.min(e,n),t)}function B7(e,t){let n,o,i,s,a,l=tf(e[0],t);for(n=0,o=e.length;n<o;++n)a=s,s=l,l=n<o-1&&tf(e[n+1],t),s&&(i=e[n],a&&(i.cp1x=ep(i.cp1x,t.left,t.right),i.cp1y=ep(i.cp1y,t.top,t.bottom)),l&&(i.cp2x=ep(i.cp2x,t.left,t.right),i.cp2y=ep(i.cp2y,t.top,t.bottom)))}function P7(e,t,n,o,i){let s,a,l,c;if(t.spanGaps&&(e=e.filter(d=>!d.skip)),t.cubicInterpolationMode==="monotone")T7(e,i);else{let d=o?e[e.length-1]:e[0];for(s=0,a=e.length;s<a;++s)l=e[s],c=C7(d,l,e[Math.min(s+1,a-(o?0:1))%a],t.tension),l.cp1x=c.previous.x,l.cp1y=c.previous.y,l.cp2x=c.next.x,l.cp2y=c.next.y,d=l}t.capBezierPoints&&B7(e,n)}function Dy(){return typeof window<"u"&&typeof document<"u"}function My(e){let t=e.parentNode;return t&&t.toString()==="[object ShadowRoot]"&&(t=t.host),t}function tp(e,t,n){let o;return typeof e=="string"?(o=parseInt(e,10),e.indexOf("%")!==-1&&(o=o/100*t.parentNode[n])):o=e,o}const np=e=>e.ownerDocument.defaultView.getComputedStyle(e,null);function N7(e,t){return np(e).getPropertyValue(t)}const D7=["top","right","bottom","left"];function Zl(e,t,n){const o={};n=n?"-"+n:"";for(let i=0;i<4;i++){const s=D7[i];o[s]=parseFloat(e[t+"-"+s+n])||0}return o.width=o.left+o.right,o.height=o.top+o.bottom,o}const M7=(e,t,n)=>(e>0||t>0)&&(!n||!n.shadowRoot);function R7(e,t){const n=e.touches,o=n&&n.length?n[0]:e,{offsetX:i,offsetY:s}=o;let a=!1,l,c;if(M7(i,s,e.target))l=i,c=s;else{const d=t.getBoundingClientRect();l=o.clientX-d.left,c=o.clientY-d.top,a=!0}return{x:l,y:c,box:a}}function Xl(e,t){if("native"in e)return e;const{canvas:n,currentDevicePixelRatio:o}=t,i=np(n),s=i.boxSizing==="border-box",a=Zl(i,"padding"),l=Zl(i,"border","width"),{x:c,y:d,box:f}=R7(e,n),h=a.left+(f&&l.left),p=a.top+(f&&l.top);let{width:g,height:y}=t;return s&&(g-=a.width+l.width,y-=a.height+l.height),{x:Math.round((c-h)/g*n.width/o),y:Math.round((d-p)/y*n.height/o)}}function I7(e,t,n){let o,i;if(t===void 0||n===void 0){const s=e&&My(e);if(!s)t=e.clientWidth,n=e.clientHeight;else{const a=s.getBoundingClientRect(),l=np(s),c=Zl(l,"border","width"),d=Zl(l,"padding");t=a.width-d.width-c.width,n=a.height-d.height-c.height,o=tp(l.maxWidth,s,"clientWidth"),i=tp(l.maxHeight,s,"clientHeight")}}return{width:t,height:n,maxWidth:o||Ym,maxHeight:i||Ym}}const Wa=e=>Math.round(e*10)/10;function O7(e,t,n,o){const i=np(e),s=Zl(i,"margin"),a=tp(i.maxWidth,e,"clientWidth")||Ym,l=tp(i.maxHeight,e,"clientHeight")||Ym,c=I7(e,t,n);let{width:d,height:f}=c;if(i.boxSizing==="content-box"){const p=Zl(i,"border","width"),g=Zl(i,"padding");d-=g.width+p.width,f-=g.height+p.height}return d=Math.max(0,d-s.width),f=Math.max(0,o?d/o:f-s.height),d=Wa(Math.min(d,a,c.maxWidth)),f=Wa(Math.min(f,l,c.maxHeight)),d&&!f&&(f=Wa(d/2)),(t!==void 0||n!==void 0)&&o&&c.height&&f>c.height&&(f=c.height,d=Wa(Math.floor(f*o))),{width:d,height:f}}function AE(e,t,n){const o=t||1,i=Wa(e.height*o),s=Wa(e.width*o);e.height=Wa(e.height),e.width=Wa(e.width);const a=e.canvas;return a.style&&(n||!a.style.height&&!a.style.width)&&(a.style.height=`${e.height}px`,a.style.width=`${e.width}px`),e.currentDevicePixelRatio!==o||a.height!==i||a.width!==s?(e.currentDevicePixelRatio=o,a.height=i,a.width=s,e.ctx.setTransform(o,0,0,o,0,0),!0):!1}const L7=(function(){let e=!1;try{const t={get passive(){return e=!0,!1}};Dy()&&(window.addEventListener("test",null,t),window.removeEventListener("test",null,t))}catch{}return e})();function TE(e,t){const n=N7(e,t),o=n&&n.match(/^(\d+)(\.\d+)?px$/);return o?+o[1]:void 0}function Jl(e,t,n,o){return{x:e.x+n*(t.x-e.x),y:e.y+n*(t.y-e.y)}}function F7(e,t,n,o){return{x:e.x+n*(t.x-e.x),y:o==="middle"?n<.5?e.y:t.y:o==="after"?n<1?e.y:t.y:n>0?t.y:e.y}}function $7(e,t,n,o){const i={x:e.cp2x,y:e.cp2y},s={x:t.cp1x,y:t.cp1y},a=Jl(e,i,n),l=Jl(i,s,n),c=Jl(s,t,n),d=Jl(a,l,n),f=Jl(l,c,n);return Jl(d,f,n)}const z7=function(e,t){return{x(n){return e+e+t-n},setWidth(n){t=n},textAlign(n){return n==="center"?n:n==="right"?"left":"right"},xPlus(n,o){return n-o},leftForLtr(n,o){return n-o}}},j7=function(){return{x(e){return e},setWidth(e){},textAlign(e){return e},xPlus(e,t){return e+t},leftForLtr(e,t){return e}}};function fd(e,t,n){return e?z7(t,n):j7()}function BE(e,t){let n,o;(t==="ltr"||t==="rtl")&&(n=e.canvas.style,o=[n.getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",t,"important"),e.prevTextDirection=o)}function PE(e,t){t!==void 0&&(delete e.prevTextDirection,e.canvas.style.setProperty("direction",t[0],t[1]))}function NE(e){return e==="angle"?{between:Qu,compare:z8,normalize:Fr}:{between:Js,compare:(t,n)=>t-n,normalize:t=>t}}function DE({start:e,end:t,count:n,loop:o,style:i}){return{start:e%n,end:t%n,loop:o&&(t-e+1)%n===0,style:i}}function U7(e,t,n){const{property:o,start:i,end:s}=n,{between:a,normalize:l}=NE(o),c=t.length;let{start:d,end:f,loop:h}=e,p,g;if(h){for(d+=c,f+=c,p=0,g=c;p<g&&a(l(t[d%c][o]),i,s);++p)d--,f--;d%=c,f%=c}return f<d&&(f+=c),{start:d,end:f,loop:h,style:e.style}}function ME(e,t,n){if(!n)return[e];const{property:o,start:i,end:s}=n,a=t.length,{compare:l,between:c,normalize:d}=NE(o),{start:f,end:h,loop:p,style:g}=U7(e,t,n),y=[];let b=!1,_=null,x,B,R;const S=()=>c(i,R,x)&&l(i,R)!==0,O=()=>l(s,x)===0||c(s,R,x),I=()=>b||S(),D=()=>!b||O();for(let w=f,E=f;w<=h;++w)B=t[w%a],!B.skip&&(x=d(B[o]),x!==R&&(b=c(x,i,s),_===null&&I()&&(_=l(x,i)===0?w:E),_!==null&&D()&&(y.push(DE({start:_,end:w,loop:p,count:a,style:g})),_=null),E=w,R=x));return _!==null&&y.push(DE({start:_,end:h,loop:p,count:a,style:g})),y}function RE(e,t){const n=[],o=e.segments;for(let i=0;i<o.length;i++){const s=ME(o[i],e.points,t);s.length&&n.push(...s)}return n}function W7(e,t,n,o){let i=0,s=t-1;if(n&&!o)for(;i<t&&!e[i].skip;)i++;for(;i<t&&e[i].skip;)i++;for(i%=t,n&&(s+=i);s>i&&e[s%t].skip;)s--;return s%=t,{start:i,end:s}}function H7(e,t,n,o){const i=e.length,s=[];let a=t,l=e[t],c;for(c=t+1;c<=n;++c){const d=e[c%i];d.skip||d.stop?l.skip||(o=!1,s.push({start:t%i,end:(c-1)%i,loop:o}),t=a=d.stop?c:null):(a=c,l.skip&&(t=c)),l=d}return a!==null&&s.push({start:t%i,end:a%i,loop:o}),s}function q7(e,t){const n=e.points,o=e.options.spanGaps,i=n.length;if(!i)return[];const s=!!e._loop,{start:a,end:l}=W7(n,i,s,o);if(o===!0)return IE(e,[{start:a,end:l,loop:s}],n,t);const c=l<a?l+i:l,d=!!e._fullLoop&&a===0&&l===i-1;return IE(e,H7(n,a,c,d),n,t)}function IE(e,t,n,o){return!o||!o.setContext||!n?t:K7(e,t,n,o)}function K7(e,t,n,o){const i=e._chart.getContext(),s=OE(e.options),{_datasetIndex:a,options:{spanGaps:l}}=e,c=n.length,d=[];let f=s,h=t[0].start,p=h;function g(y,b,_,x){const B=l?-1:1;if(y!==b){for(y+=c;n[y%c].skip;)y-=B;for(;n[b%c].skip;)b+=B;y%c!==b%c&&(d.push({start:y%c,end:b%c,loop:_,style:x}),f=x,h=b%c)}}for(const y of t){h=l?h:y.start;let b=n[h%c],_;for(p=h+1;p<=y.end;p++){const x=n[p%c];_=OE(o.setContext(Yl(i,{type:"segment",p0:b,p1:x,p0DataIndex:(p-1)%c,p1DataIndex:p%c,datasetIndex:a}))),G7(_,f)&&g(h,p-1,y.loop,f),b=x,f=_}h<p-1&&g(h,p-1,y.loop,f)}return d}function OE(e){return{backgroundColor:e.backgroundColor,borderCapStyle:e.borderCapStyle,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderJoinStyle:e.borderJoinStyle,borderWidth:e.borderWidth,borderColor:e.borderColor}}function G7(e,t){if(!t)return!1;const n=[],o=function(i,s){return _y(s)?(n.includes(s)||n.push(s),n.indexOf(s)):s};return JSON.stringify(e,o)!==JSON.stringify(t,o)}function op(e,t,n){return e.options.clip?e[n]:t[n]}function Y7(e,t){const{xScale:n,yScale:o}=e;return n&&o?{left:op(n,t,"left"),right:op(n,t,"right"),top:op(o,t,"top"),bottom:op(o,t,"bottom")}:t}function LE(e,t){const n=t._clip;if(n.disabled)return!1;const o=Y7(t,e.chartArea);return{left:n.left===!1?0:o.left-(n.left===!0?0:n.left),right:n.right===!1?e.width:o.right+(n.right===!0?0:n.right),top:n.top===!1?0:o.top-(n.top===!0?0:n.top),bottom:n.bottom===!1?e.height:o.bottom+(n.bottom===!0?0:n.bottom)}}class Z7{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,n,o,i){const s=n.listeners[i],a=n.duration;s.forEach(l=>l({chart:t,initial:n.initial,numSteps:a,currentStep:Math.min(o-n.start,a)}))}_refresh(){this._request||(this._running=!0,this._request=cE.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let n=0;this._charts.forEach((o,i)=>{if(!o.running||!o.items.length)return;const s=o.items;let a=s.length-1,l=!1,c;for(;a>=0;--a)c=s[a],c._active?(c._total>o.duration&&(o.duration=c._total),c.tick(t),l=!0):(s[a]=s[s.length-1],s.pop());l&&(i.draw(),this._notify(i,o,t,"progress")),s.length||(o.running=!1,this._notify(i,o,t,"complete"),o.initial=!1),n+=s.length}),this._lastDate=t,n===0&&(this._running=!1)}_getAnims(t){const n=this._charts;let o=n.get(t);return o||(o={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},n.set(t,o)),o}listen(t,n,o){this._getAnims(t).listeners[n].push(o)}add(t,n){!n||!n.length||this._getAnims(t).items.push(...n)}has(t){return this._getAnims(t).items.length>0}start(t){const n=this._charts.get(t);n&&(n.running=!0,n.start=Date.now(),n.duration=n.items.reduce((o,i)=>Math.max(o,i._duration),0),this._refresh())}running(t){if(!this._running)return!1;const n=this._charts.get(t);return!(!n||!n.running||!n.items.length)}stop(t){const n=this._charts.get(t);if(!n||!n.items.length)return;const o=n.items;let i=o.length-1;for(;i>=0;--i)o[i].cancel();n.items=[],this._notify(t,n,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var Qs=new Z7;const FE="transparent",X7={boolean(e,t,n){return n>.5?t:e},color(e,t,n){const o=hE(e||FE),i=o.valid&&hE(t||FE);return i&&i.valid?i.mix(o,n).hexString():t},number(e,t,n){return e+(t-e)*n}};let J7=class{constructor(t,n,o,i){const s=n[o];i=Vm([t.to,i,s,t.from]);const a=Vm([t.from,s,i]);this._active=!0,this._fn=t.fn||X7[t.type||typeof a],this._easing=Vu[t.easing]||Vu.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=n,this._prop=o,this._from=a,this._to=i,this._promises=void 0}active(){return this._active}update(t,n,o){if(this._active){this._notify(!1);const i=this._target[this._prop],s=o-this._start,a=this._duration-s;this._start=o,this._duration=Math.floor(Math.max(a,t.duration)),this._total+=s,this._loop=!!t.loop,this._to=Vm([t.to,n,i,t.from]),this._from=Vm([t.from,i,n])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const n=t-this._start,o=this._duration,i=this._prop,s=this._from,a=this._loop,l=this._to;let c;if(this._active=s!==l&&(a||n<o),!this._active){this._target[i]=l,this._notify(!0);return}if(n<0){this._target[i]=s;return}c=n/o%2,c=a&&c>1?2-c:c,c=this._easing(Math.min(1,Math.max(0,c))),this._target[i]=this._fn(s,l,c)}wait(){const t=this._promises||(this._promises=[]);return new Promise((n,o)=>{t.push({res:n,rej:o})})}_notify(t){const n=t?"res":"rej",o=this._promises||[];for(let i=0;i<o.length;i++)o[i][n]()}};class $E{constructor(t,n){this._chart=t,this._properties=new Map,this.configure(n)}configure(t){if(!an(t))return;const n=Object.keys(fo.animation),o=this._properties;Object.getOwnPropertyNames(t).forEach(i=>{const s=t[i];if(!an(s))return;const a={};for(const l of n)a[l]=s[l];(xo(s.properties)&&s.properties||[i]).forEach(l=>{(l===i||!o.has(l))&&o.set(l,a)})})}_animateOptions(t,n){const o=n.options,i=V7(t,o);if(!i)return[];const s=this._createAnimations(i,o);return o.$shared&&Q7(t.options.$animations,o).then(()=>{t.options=o},()=>{}),s}_createAnimations(t,n){const o=this._properties,i=[],s=t.$animations||(t.$animations={}),a=Object.keys(n),l=Date.now();let c;for(c=a.length-1;c>=0;--c){const d=a[c];if(d.charAt(0)==="$")continue;if(d==="options"){i.push(...this._animateOptions(t,n));continue}const f=n[d];let h=s[d];const p=o.get(d);if(h)if(p&&h.active()){h.update(p,f,l);continue}else h.cancel();if(!p||!p.duration){t[d]=f;continue}s[d]=h=new J7(p,t,d,f),i.push(h)}return i}update(t,n){if(this._properties.size===0){Object.assign(t,n);return}const o=this._createAnimations(t,n);if(o.length)return Qs.add(this._chart,o),!0}}function Q7(e,t){const n=[],o=Object.keys(t);for(let i=0;i<o.length;i++){const s=e[o[i]];s&&s.active()&&n.push(s.wait())}return Promise.all(n)}function V7(e,t){if(!t)return;let n=e.options;if(!n){e.options=t;return}return n.$shared&&(e.options=n=Object.assign({},n,{$shared:!1,$animations:{}})),n}function zE(e,t){const n=e&&e.options||{},o=n.reverse,i=n.min===void 0?t:0,s=n.max===void 0?t:0;return{start:o?s:i,end:o?i:s}}function e$(e,t,n){if(n===!1)return!1;const o=zE(e,n),i=zE(t,n);return{top:i.end,right:o.end,bottom:i.start,left:o.start}}function t$(e){let t,n,o,i;return an(e)?(t=e.top,n=e.right,o=e.bottom,i=e.left):t=n=o=i=e,{top:t,right:n,bottom:o,left:i,disabled:e===!1}}function jE(e,t){const n=[],o=e._getSortedDatasetMetas(t);let i,s;for(i=0,s=o.length;i<s;++i)n.push(o[i].index);return n}function UE(e,t,n,o={}){const i=e.keys,s=o.mode==="single";let a,l,c,d;if(t===null)return;let f=!1;for(a=0,l=i.length;a<l;++a){if(c=+i[a],c===n){if(f=!0,o.all)continue;break}d=e.values[c],Zo(d)&&(s||t===0||as(t)===as(d))&&(t+=d)}return!f&&!o.all?0:t}function n$(e,t){const{iScale:n,vScale:o}=t,i=n.axis==="x"?"x":"y",s=o.axis==="x"?"x":"y",a=Object.keys(e),l=new Array(a.length);let c,d,f;for(c=0,d=a.length;c<d;++c)f=a[c],l[c]={[i]:f,[s]:e[f]};return l}function Ry(e,t){const n=e&&e.options.stacked;return n||n===void 0&&t.stack!==void 0}function o$(e,t,n){return`${e.id}.${t.id}.${n.stack||n.type}`}function r$(e){const{min:t,max:n,minDefined:o,maxDefined:i}=e.getUserBounds();return{min:o?t:Number.NEGATIVE_INFINITY,max:i?n:Number.POSITIVE_INFINITY}}function i$(e,t,n){const o=e[t]||(e[t]={});return o[n]||(o[n]={})}function WE(e,t,n,o){for(const i of t.getMatchingVisibleMetas(o).reverse()){const s=e[i.index];if(n&&s>0||!n&&s<0)return i.index}return null}function HE(e,t){const{chart:n,_cachedMeta:o}=e,i=n._stacks||(n._stacks={}),{iScale:s,vScale:a,index:l}=o,c=s.axis,d=a.axis,f=o$(s,a,o),h=t.length;let p;for(let g=0;g<h;++g){const y=t[g],{[c]:b,[d]:_}=y,x=y._stacks||(y._stacks={});p=x[d]=i$(i,f,b),p[l]=_,p._top=WE(p,a,!0,o.type),p._bottom=WE(p,a,!1,o.type);const B=p._visualValues||(p._visualValues={});B[l]=_}}function Iy(e,t){const n=e.scales;return Object.keys(n).filter(o=>n[o].axis===t).shift()}function s$(e,t){return Yl(e,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function a$(e,t,n){return Yl(e,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:n,index:t,mode:"default",type:"data"})}function of(e,t){const n=e.controller.index,o=e.vScale&&e.vScale.axis;if(o){t=t||e._parsed;for(const i of t){const s=i._stacks;if(!s||s[o]===void 0||s[o][n]===void 0)return;delete s[o][n],s[o]._visualValues!==void 0&&s[o]._visualValues[n]!==void 0&&delete s[o]._visualValues[n]}}}const Oy=e=>e==="reset"||e==="none",qE=(e,t)=>t?e:Object.assign({},e),l$=(e,t,n)=>e&&!t.hidden&&t._stacked&&{keys:jE(n,!0),values:null};class rp{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(t,n){this.chart=t,this._ctx=t.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 t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=Ry(t.vScale,t),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(t){this.index!==t&&of(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,n=this._cachedMeta,o=this.getDataset(),i=(h,p,g,y)=>h==="x"?p:h==="r"?y:g,s=n.xAxisID=Zt(o.xAxisID,Iy(t,"x")),a=n.yAxisID=Zt(o.yAxisID,Iy(t,"y")),l=n.rAxisID=Zt(o.rAxisID,Iy(t,"r")),c=n.indexAxis,d=n.iAxisID=i(c,s,a,l),f=n.vAxisID=i(c,a,s,l);n.xScale=this.getScaleForId(s),n.yScale=this.getScaleForId(a),n.rScale=this.getScaleForId(l),n.iScale=this.getScaleForId(d),n.vScale=this.getScaleForId(f)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const n=this._cachedMeta;return t===n.iScale?n.vScale:n.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&aE(this._data,this),t._stacked&&of(t)}_dataCheck(){const t=this.getDataset(),n=t.data||(t.data=[]),o=this._data;if(an(n)){const i=this._cachedMeta;this._data=n$(n,i)}else if(o!==n){if(o){aE(o,this);const i=this._cachedMeta;of(i),i._parsed=[]}n&&Object.isExtensible(n)&&H8(n,this),this._syncList=[],this._data=n}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const n=this._cachedMeta,o=this.getDataset();let i=!1;this._dataCheck();const s=n._stacked;n._stacked=Ry(n.vScale,n),n.stack!==o.stack&&(i=!0,of(n),n.stack=o.stack),this._resyncElements(t),(i||s!==n._stacked)&&(HE(this,n._parsed),n._stacked=Ry(n.vScale,n))}configure(){const t=this.chart.config,n=t.datasetScopeKeys(this._type),o=t.getOptionScopes(this.getDataset(),n,!0);this.options=t.createResolver(o,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,n){const{_cachedMeta:o,_data:i}=this,{iScale:s,_stacked:a}=o,l=s.axis;let c=t===0&&n===i.length?!0:o._sorted,d=t>0&&o._parsed[t-1],f,h,p;if(this._parsing===!1)o._parsed=i,o._sorted=!0,p=i;else{xo(i[t])?p=this.parseArrayData(o,i,t,n):an(i[t])?p=this.parseObjectData(o,i,t,n):p=this.parsePrimitiveData(o,i,t,n);const g=()=>h[l]===null||d&&h[l]<d[l];for(f=0;f<n;++f)o._parsed[f+t]=h=p[f],c&&(g()&&(c=!1),d=h);o._sorted=c}a&&HE(this,p)}parsePrimitiveData(t,n,o,i){const{iScale:s,vScale:a}=t,l=s.axis,c=a.axis,d=s.getLabels(),f=s===a,h=new Array(i);let p,g,y;for(p=0,g=i;p<g;++p)y=p+o,h[p]={[l]:f||s.parse(d[y],y),[c]:a.parse(n[y],y)};return h}parseArrayData(t,n,o,i){const{xScale:s,yScale:a}=t,l=new Array(i);let c,d,f,h;for(c=0,d=i;c<d;++c)f=c+o,h=n[f],l[c]={x:s.parse(h[0],f),y:a.parse(h[1],f)};return l}parseObjectData(t,n,o,i){const{xScale:s,yScale:a}=t,{xAxisKey:l="x",yAxisKey:c="y"}=this._parsing,d=new Array(i);let f,h,p,g;for(f=0,h=i;f<h;++f)p=f+o,g=n[p],d[f]={x:s.parse(Wl(g,l),p),y:a.parse(Wl(g,c),p)};return d}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,n,o){const i=this.chart,s=this._cachedMeta,a=n[t.axis],l={keys:jE(i,!0),values:n._stacks[t.axis]._visualValues};return UE(l,a,s.index,{mode:o})}updateRangeFromParsed(t,n,o,i){const s=o[n.axis];let a=s===null?NaN:s;const l=i&&o._stacks[n.axis];i&&l&&(i.values=l,a=UE(i,s,this._cachedMeta.index)),t.min=Math.min(t.min,a),t.max=Math.max(t.max,a)}getMinMax(t,n){const o=this._cachedMeta,i=o._parsed,s=o._sorted&&t===o.iScale,a=i.length,l=this._getOtherScale(t),c=l$(n,o,this.chart),d={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:f,max:h}=r$(l);let p,g;function y(){g=i[p];const b=g[l.axis];return!Zo(g[t.axis])||f>b||h<b}for(p=0;p<a&&!(!y()&&(this.updateRangeFromParsed(d,t,g,c),s));++p);if(s){for(p=a-1;p>=0;--p)if(!y()){this.updateRangeFromParsed(d,t,g,c);break}}return d}getAllParsedValues(t){const n=this._cachedMeta._parsed,o=[];let i,s,a;for(i=0,s=n.length;i<s;++i)a=n[i][t.axis],Zo(a)&&o.push(a);return o}getMaxOverflow(){return!1}getLabelAndValue(t){const n=this._cachedMeta,o=n.iScale,i=n.vScale,s=this.getParsed(t);return{label:o?""+o.getLabelForValue(s[o.axis]):"",value:i?""+i.getLabelForValue(s[i.axis]):""}}_update(t){const n=this._cachedMeta;this.update(t||"default"),n._clip=t$(Zt(this.options.clip,e$(n.xScale,n.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,n=this.chart,o=this._cachedMeta,i=o.data||[],s=n.chartArea,a=[],l=this._drawStart||0,c=this._drawCount||i.length-l,d=this.options.drawActiveElementsOnTop;let f;for(o.dataset&&o.dataset.draw(t,s,l,c),f=l;f<l+c;++f){const h=i[f];h.hidden||(h.active&&d?a.push(h):h.draw(t,s))}for(f=0;f<a.length;++f)a[f].draw(t,s)}getStyle(t,n){const o=n?"active":"default";return t===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(o):this.resolveDataElementOptions(t||0,o)}getContext(t,n,o){const i=this.getDataset();let s;if(t>=0&&t<this._cachedMeta.data.length){const a=this._cachedMeta.data[t];s=a.$context||(a.$context=a$(this.getContext(),t,a)),s.parsed=this.getParsed(t),s.raw=i.data[t],s.index=s.dataIndex=t}else s=this.$context||(this.$context=s$(this.chart.getContext(),this.index)),s.dataset=i,s.index=s.datasetIndex=this.index;return s.active=!!n,s.mode=o,s}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,n){return this._resolveElementOptions(this.dataElementType.id,n,t)}_resolveElementOptions(t,n="default",o){const i=n==="active",s=this._cachedDataOpts,a=t+"-"+n,l=s[a],c=this.enableOptionSharing&&Zu(o);if(l)return qE(l,c);const d=this.chart.config,f=d.datasetElementScopeKeys(this._type,t),h=i?[`${t}Hover`,"hover",t,""]:[t,""],p=d.getOptionScopes(this.getDataset(),f),g=Object.keys(fo.elements[t]),y=()=>this.getContext(o,i,n),b=d.resolveNamedOptions(p,g,y,h);return b.$shared&&(b.$shared=c,s[a]=Object.freeze(qE(b,c))),b}_resolveAnimations(t,n,o){const i=this.chart,s=this._cachedDataOpts,a=`animation-${n}`,l=s[a];if(l)return l;let c;if(i.options.animation!==!1){const f=this.chart.config,h=f.datasetAnimationScopeKeys(this._type,n),p=f.getOptionScopes(this.getDataset(),h);c=f.createResolver(p,this.getContext(t,o,n))}const d=new $E(i,c&&c.animations);return c&&c._cacheable&&(s[a]=Object.freeze(d)),d}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,n){return!n||Oy(t)||this.chart._animationsDisabled}_getSharedOptions(t,n){const o=this.resolveDataElementOptions(t,n),i=this._sharedOptions,s=this.getSharedOptions(o),a=this.includeOptions(n,s)||s!==i;return this.updateSharedOptions(s,n,o),{sharedOptions:s,includeOptions:a}}updateElement(t,n,o,i){Oy(i)?Object.assign(t,o):this._resolveAnimations(n,i).update(t,o)}updateSharedOptions(t,n,o){t&&!Oy(n)&&this._resolveAnimations(void 0,n).update(t,o)}_setStyle(t,n,o,i){t.active=i;const s=this.getStyle(n,i);this._resolveAnimations(n,o,i).update(t,{options:!i&&this.getSharedOptions(s)||s})}removeHoverStyle(t,n,o){this._setStyle(t,o,"active",!1)}setHoverStyle(t,n,o){this._setStyle(t,o,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const n=this._data,o=this._cachedMeta.data;for(const[l,c,d]of this._syncList)this[l](c,d);this._syncList=[];const i=o.length,s=n.length,a=Math.min(s,i);a&&this.parse(0,a),s>i?this._insertElements(i,s-i,t):s<i&&this._removeElements(s,i-s)}_insertElements(t,n,o=!0){const i=this._cachedMeta,s=i.data,a=t+n;let l;const c=d=>{for(d.length+=n,l=d.length-1;l>=a;l--)d[l]=d[l-n]};for(c(s),l=t;l<a;++l)s[l]=new this.dataElementType;this._parsing&&c(i._parsed),this.parse(t,n),o&&this.updateElements(s,t,n,"reset")}updateElements(t,n,o,i){}_removeElements(t,n){const o=this._cachedMeta;if(this._parsing){const i=o._parsed.splice(t,n);o._stacked&&of(o,i)}o.data.splice(t,n)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[n,o,i]=t;this[n](o,i)}this.chart._dataChanges.push([this.index,...t])}_onDataPush(){const t=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-t,t])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(t,n){n&&this._sync(["_removeElements",t,n]);const o=arguments.length-2;o&&this._sync(["_insertElements",t,o])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}function c$(e,t){if(!e._cache.$bar){const n=e.getMatchingVisibleMetas(t);let o=[];for(let i=0,s=n.length;i<s;i++)o=o.concat(n[i].controller.getAllParsedValues(e));e._cache.$bar=lE(o.sort((i,s)=>i-s))}return e._cache.$bar}function d$(e){const t=e.iScale,n=c$(t,e.type);let o=t._length,i,s,a,l;const c=()=>{a===32767||a===-32768||(Zu(l)&&(o=Math.min(o,Math.abs(a-l)||o)),l=a)};for(i=0,s=n.length;i<s;++i)a=t.getPixelForValue(n[i]),c();for(l=void 0,i=0,s=t.ticks.length;i<s;++i)a=t.getPixelForTick(i),c();return o}function u$(e,t,n,o){const i=n.barThickness;let s,a;return xn(i)?(s=t.min*n.categoryPercentage,a=n.barPercentage):(s=i*o,a=1),{chunk:s/o,ratio:a,start:t.pixels[e]-s/2}}function f$(e,t,n,o){const i=t.pixels,s=i[e];let a=e>0?i[e-1]:null,l=e<i.length-1?i[e+1]:null;const c=n.categoryPercentage;a===null&&(a=s-(l===null?t.end-t.start:l-s)),l===null&&(l=s+s-a);const d=s-(s-Math.min(a,l))/2*c;return{chunk:Math.abs(l-a)/2*c/o,ratio:n.barPercentage,start:d}}function h$(e,t,n,o){const i=n.parse(e[0],o),s=n.parse(e[1],o),a=Math.min(i,s),l=Math.max(i,s);let c=a,d=l;Math.abs(a)>Math.abs(l)&&(c=l,d=a),t[n.axis]=d,t._custom={barStart:c,barEnd:d,start:i,end:s,min:a,max:l}}function KE(e,t,n,o){return xo(e)?h$(e,t,n,o):t[n.axis]=n.parse(e,o),t}function GE(e,t,n,o){const i=e.iScale,s=e.vScale,a=i.getLabels(),l=i===s,c=[];let d,f,h,p;for(d=n,f=n+o;d<f;++d)p=t[d],h={},h[i.axis]=l||i.parse(a[d],d),c.push(KE(p,h,s,d));return c}function Ly(e){return e&&e.barStart!==void 0&&e.barEnd!==void 0}function m$(e,t,n){return e!==0?as(e):(t.isHorizontal()?1:-1)*(t.min>=n?1:-1)}function p$(e){let t,n,o,i,s;return e.horizontal?(t=e.base>e.x,n="left",o="right"):(t=e.base<e.y,n="bottom",o="top"),t?(i="end",s="start"):(i="start",s="end"),{start:n,end:o,reverse:t,top:i,bottom:s}}function g$(e,t,n,o){let i=t.borderSkipped;const s={};if(!i){e.borderSkipped=s;return}if(i===!0){e.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:a,end:l,reverse:c,top:d,bottom:f}=p$(e);i==="middle"&&n&&(e.enableBorderRadius=!0,(n._top||0)===o?i=d:(n._bottom||0)===o?i=f:(s[YE(f,a,l,c)]=!0,i=d)),s[YE(i,a,l,c)]=!0,e.borderSkipped=s}function YE(e,t,n,o){return o?(e=b$(e,t,n),e=ZE(e,n,t)):e=ZE(e,t,n),e}function b$(e,t,n){return e===t?n:e===n?t:e}function ZE(e,t,n){return e==="start"?t:e==="end"?n:e}function y$(e,{inflateAmount:t},n){e.inflateAmount=t==="auto"?n===1?.33:0:t}class v$ extends rp{static id="bar";static defaults={datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}};static overrides={scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}};parsePrimitiveData(t,n,o,i){return GE(t,n,o,i)}parseArrayData(t,n,o,i){return GE(t,n,o,i)}parseObjectData(t,n,o,i){const{iScale:s,vScale:a}=t,{xAxisKey:l="x",yAxisKey:c="y"}=this._parsing,d=s.axis==="x"?l:c,f=a.axis==="x"?l:c,h=[];let p,g,y,b;for(p=o,g=o+i;p<g;++p)b=n[p],y={},y[s.axis]=s.parse(Wl(b,d),p),h.push(KE(Wl(b,f),y,a,p));return h}updateRangeFromParsed(t,n,o,i){super.updateRangeFromParsed(t,n,o,i);const s=o._custom;s&&n===this._cachedMeta.vScale&&(t.min=Math.min(t.min,s.min),t.max=Math.max(t.max,s.max))}getMaxOverflow(){return 0}getLabelAndValue(t){const n=this._cachedMeta,{iScale:o,vScale:i}=n,s=this.getParsed(t),a=s._custom,l=Ly(a)?"["+a.start+", "+a.end+"]":""+i.getLabelForValue(s[i.axis]);return{label:""+o.getLabelForValue(s[o.axis]),value:l}}initialize(){this.enableOptionSharing=!0,super.initialize();const t=this._cachedMeta;t.stack=this.getDataset().stack}update(t){const n=this._cachedMeta;this.updateElements(n.data,0,n.data.length,t)}updateElements(t,n,o,i){const s=i==="reset",{index:a,_cachedMeta:{vScale:l}}=this,c=l.getBasePixel(),d=l.isHorizontal(),f=this._getRuler(),{sharedOptions:h,includeOptions:p}=this._getSharedOptions(n,i);for(let g=n;g<n+o;g++){const y=this.getParsed(g),b=s||xn(y[l.axis])?{base:c,head:c}:this._calculateBarValuePixels(g),_=this._calculateBarIndexPixels(g,f),x=(y._stacks||{})[l.axis],B={horizontal:d,base:b.base,enableBorderRadius:!x||Ly(y._custom)||a===x._top||a===x._bottom,x:d?b.head:_.center,y:d?_.center:b.head,height:d?_.size:Math.abs(b.size),width:d?Math.abs(b.size):_.size};p&&(B.options=h||this.resolveDataElementOptions(g,t[g].active?"active":i));const R=B.options||t[g].options;g$(B,R,x,a),y$(B,R,f.ratio),this.updateElement(t[g],g,B,i)}}_getStacks(t,n){const{iScale:o}=this._cachedMeta,i=o.getMatchingVisibleMetas(this._type).filter(f=>f.controller.options.grouped),s=o.options.stacked,a=[],l=this._cachedMeta.controller.getParsed(n),c=l&&l[o.axis],d=f=>{const h=f._parsed.find(g=>g[o.axis]===c),p=h&&h[f.vScale.axis];if(xn(p)||isNaN(p))return!0};for(const f of i)if(!(n!==void 0&&d(f))&&((s===!1||a.indexOf(f.stack)===-1||s===void 0&&f.stack===void 0)&&a.push(f.stack),f.index===t))break;return a.length||a.push(void 0),a}_getStackCount(t){return this._getStacks(void 0,t).length}_getAxisCount(){return this._getAxis().length}getFirstScaleIdForIndexAxis(){const t=this.chart.scales,n=this.chart.options.indexAxis;return Object.keys(t).filter(o=>t[o].axis===n).shift()}_getAxis(){const t={},n=this.getFirstScaleIdForIndexAxis();for(const o of this.chart.data.datasets)t[Zt(this.chart.options.indexAxis==="x"?o.xAxisID:o.yAxisID,n)]=!0;return Object.keys(t)}_getStackIndex(t,n,o){const i=this._getStacks(t,o),s=n!==void 0?i.indexOf(n):-1;return s===-1?i.length-1:s}_getRuler(){const t=this.options,n=this._cachedMeta,o=n.iScale,i=[];let s,a;for(s=0,a=n.data.length;s<a;++s)i.push(o.getPixelForValue(this.getParsed(s)[o.axis],s));const l=t.barThickness;return{min:l||d$(n),pixels:i,start:o._startPixel,end:o._endPixel,stackCount:this._getStackCount(),scale:o,grouped:t.grouped,ratio:l?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){const{_cachedMeta:{vScale:n,_stacked:o,index:i},options:{base:s,minBarLength:a}}=this,l=s||0,c=this.getParsed(t),d=c._custom,f=Ly(d);let h=c[n.axis],p=0,g=o?this.applyStack(n,c,o):h,y,b;g!==h&&(p=g-h,g=h),f&&(h=d.barStart,g=d.barEnd-d.barStart,h!==0&&as(h)!==as(d.barEnd)&&(p=0),p+=h);const _=!xn(s)&&!f?s:p;let x=n.getPixelForValue(_);if(this.chart.getDataVisibility(t)?y=n.getPixelForValue(p+g):y=x,b=y-x,Math.abs(b)<a){b=m$(b,n,l)*a,h===l&&(x-=b/2);const B=n.getPixelForDecimal(0),R=n.getPixelForDecimal(1),S=Math.min(B,R),O=Math.max(B,R);x=Math.max(Math.min(x,O),S),y=x+b,o&&!f&&(c._stacks[n.axis]._visualValues[i]=n.getValueForPixel(y)-n.getValueForPixel(x))}if(x===n.getPixelForValue(l)){const B=as(b)*n.getLineWidthForValue(l)/2;x+=B,b-=B}return{size:b,base:x,head:y,center:y+b/2}}_calculateBarIndexPixels(t,n){const o=n.scale,i=this.options,s=i.skipNull,a=Zt(i.maxBarThickness,1/0);let l,c;const d=this._getAxisCount();if(n.grouped){const f=s?this._getStackCount(t):n.stackCount,h=i.barThickness==="flex"?f$(t,n,i,f*d):u$(t,n,i,f*d),p=this.chart.options.indexAxis==="x"?this.getDataset().xAxisID:this.getDataset().yAxisID,g=this._getAxis().indexOf(Zt(p,this.getFirstScaleIdForIndexAxis())),y=this._getStackIndex(this.index,this._cachedMeta.stack,s?t:void 0)+g;l=h.start+h.chunk*y+h.chunk/2,c=Math.min(a,h.chunk*h.ratio)}else l=o.getPixelForValue(this.getParsed(t)[o.axis],t),c=Math.min(a,n.min*n.ratio);return{base:l-c/2,head:l+c/2,center:l,size:c}}draw(){const t=this._cachedMeta,n=t.vScale,o=t.data,i=o.length;let s=0;for(;s<i;++s)this.getParsed(s)[n.axis]!==null&&!o[s].hidden&&o[s].draw(this._ctx)}}function w$(e,t,n){let o=1,i=1,s=0,a=0;if(t<Vn){const l=e,c=l+t,d=Math.cos(l),f=Math.sin(l),h=Math.cos(c),p=Math.sin(c),g=(R,S,O)=>Qu(R,l,c,!0)?1:Math.max(S,S*n,O,O*n),y=(R,S,O)=>Qu(R,l,c,!0)?-1:Math.min(S,S*n,O,O*n),b=g(0,d,h),_=g(Do,f,p),x=y(Tn,d,h),B=y(Tn+Do,f,p);o=(b-x)/2,i=(_-B)/2,s=-(b+x)/2,a=-(_+B)/2}return{ratioX:o,ratioY:i,offsetX:s,offsetY:a}}class XE extends rp{static id="doughnut";static defaults={datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"};static descriptors={_scriptable:t=>t!=="spacing",_indexable:t=>t!=="spacing"&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const n=t.data,{labels:{pointStyle:o,textAlign:i,color:s,useBorderRadius:a,borderRadius:l}}=t.legend.options;return n.labels.length&&n.datasets.length?n.labels.map((c,d)=>{const h=t.getDatasetMeta(0).controller.getStyle(d);return{text:c,fillStyle:h.backgroundColor,fontColor:s,hidden:!t.getDataVisibility(d),lineDash:h.borderDash,lineDashOffset:h.borderDashOffset,lineJoin:h.borderJoinStyle,lineWidth:h.borderWidth,strokeStyle:h.borderColor,textAlign:i,pointStyle:o,borderRadius:a&&(l||h.borderRadius),index:d}}):[]}},onClick(t,n,o){o.chart.toggleDataVisibility(n.index),o.chart.update()}}}};constructor(t,n){super(t,n),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,n){const o=this.getDataset().data,i=this._cachedMeta;if(this._parsing===!1)i._parsed=o;else{let s=c=>+o[c];if(an(o[t])){const{key:c="value"}=this._parsing;s=d=>+Wl(o[d],c)}let a,l;for(a=t,l=t+n;a<l;++a)i._parsed[a]=s(a)}}_getRotation(){return Xs(this.options.rotation-90)}_getCircumference(){return Xs(this.options.circumference)}_getRotationExtents(){let t=Vn,n=-Vn;for(let o=0;o<this.chart.data.datasets.length;++o)if(this.chart.isDatasetVisible(o)&&this.chart.getDatasetMeta(o).type===this._type){const i=this.chart.getDatasetMeta(o).controller,s=i._getRotation(),a=i._getCircumference();t=Math.min(t,s),n=Math.max(n,s+a)}return{rotation:t,circumference:n-t}}update(t){const n=this.chart,{chartArea:o}=n,i=this._cachedMeta,s=i.data,a=this.getMaxBorderWidth()+this.getMaxOffset(s)+this.options.spacing,l=Math.max((Math.min(o.width,o.height)-a)/2,0),c=Math.min(A8(this.options.cutout,l),1),d=this._getRingWeight(this.index),{circumference:f,rotation:h}=this._getRotationExtents(),{ratioX:p,ratioY:g,offsetX:y,offsetY:b}=w$(h,f,c),_=(o.width-a)/p,x=(o.height-a)/g,B=Math.max(Math.min(_,x)/2,0),R=Jx(this.options.radius,B),S=Math.max(R*c,0),O=(R-S)/this._getVisibleDatasetWeightTotal();this.offsetX=y*R,this.offsetY=b*R,i.total=this.calculateTotal(),this.outerRadius=R-O*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-O*d,0),this.updateElements(s,0,s.length,t)}_circumference(t,n){const o=this.options,i=this._cachedMeta,s=this._getCircumference();return n&&o.animation.animateRotate||!this.chart.getDataVisibility(t)||i._parsed[t]===null||i.data[t].hidden?0:this.calculateCircumference(i._parsed[t]*s/Vn)}updateElements(t,n,o,i){const s=i==="reset",a=this.chart,l=a.chartArea,d=a.options.animation,f=(l.left+l.right)/2,h=(l.top+l.bottom)/2,p=s&&d.animateScale,g=p?0:this.innerRadius,y=p?0:this.outerRadius,{sharedOptions:b,includeOptions:_}=this._getSharedOptions(n,i);let x=this._getRotation(),B;for(B=0;B<n;++B)x+=this._circumference(B,s);for(B=n;B<n+o;++B){const R=this._circumference(B,s),S=t[B],O={x:f+this.offsetX,y:h+this.offsetY,startAngle:x,endAngle:x+R,circumference:R,outerRadius:y,innerRadius:g};_&&(O.options=b||this.resolveDataElementOptions(B,S.active?"active":i)),x+=R,this.updateElement(S,B,O,i)}}calculateTotal(){const t=this._cachedMeta,n=t.data;let o=0,i;for(i=0;i<n.length;i++){const s=t._parsed[i];s!==null&&!isNaN(s)&&this.chart.getDataVisibility(i)&&!n[i].hidden&&(o+=Math.abs(s))}return o}calculateCircumference(t){const n=this._cachedMeta.total;return n>0&&!isNaN(t)?Vn*(Math.abs(t)/n):0}getLabelAndValue(t){const n=this._cachedMeta,o=this.chart,i=o.data.labels||[],s=Ey(n._parsed[t],o.options.locale);return{label:i[t]||"",value:s}}getMaxBorderWidth(t){let n=0;const o=this.chart;let i,s,a,l,c;if(!t){for(i=0,s=o.data.datasets.length;i<s;++i)if(o.isDatasetVisible(i)){a=o.getDatasetMeta(i),t=a.data,l=a.controller;break}}if(!t)return 0;for(i=0,s=t.length;i<s;++i)c=l.resolveDataElementOptions(i),c.borderAlign!=="inner"&&(n=Math.max(n,c.borderWidth||0,c.hoverBorderWidth||0));return n}getMaxOffset(t){let n=0;for(let o=0,i=t.length;o<i;++o){const s=this.resolveDataElementOptions(o);n=Math.max(n,s.offset||0,s.hoverOffset||0)}return n}_getRingWeightOffset(t){let n=0;for(let o=0;o<t;++o)this.chart.isDatasetVisible(o)&&(n+=this._getRingWeight(o));return n}_getRingWeight(t){return Math.max(Zt(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}class k$ extends rp{static id="line";static defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1};static overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const n=this._cachedMeta,{dataset:o,data:i=[],_dataset:s}=n,a=this.chart._animationsDisabled;let{start:l,count:c}=G8(n,i,a);this._drawStart=l,this._drawCount=c,Y8(n)&&(l=0,c=i.length),o._chart=this.chart,o._datasetIndex=this.index,o._decimated=!!s._decimated,o.points=i;const d=this.resolveDatasetElementOptions(t);this.options.showLine||(d.borderWidth=0),d.segment=this.options.segment,this.updateElement(o,void 0,{animated:!a,options:d},t),this.updateElements(i,l,c,t)}updateElements(t,n,o,i){const s=i==="reset",{iScale:a,vScale:l,_stacked:c,_dataset:d}=this._cachedMeta,{sharedOptions:f,includeOptions:h}=this._getSharedOptions(n,i),p=a.axis,g=l.axis,{spanGaps:y,segment:b}=this.options,_=Ju(y)?y:Number.POSITIVE_INFINITY,x=this.chart._animationsDisabled||s||i==="none",B=n+o,R=t.length;let S=n>0&&this.getParsed(n-1);for(let O=0;O<R;++O){const I=t[O],D=x?I:{};if(O<n||O>=B){D.skip=!0;continue}const w=this.getParsed(O),E=xn(w[g]),F=D[p]=a.getPixelForValue(w[p],O),A=D[g]=s||E?l.getBasePixel():l.getPixelForValue(c?this.applyStack(l,w,c):w[g],O);D.skip=isNaN(F)||isNaN(A)||E,D.stop=O>0&&Math.abs(w[p]-S[p])>_,b&&(D.parsed=w,D.raw=d.data[O]),h&&(D.options=f||this.resolveDataElementOptions(O,I.active?"active":i)),x||this.updateElement(I,O,D,i),S=w}}getMaxOverflow(){const t=this._cachedMeta,n=t.dataset,o=n.options&&n.options.borderWidth||0,i=t.data||[];if(!i.length)return o;const s=i[0].size(this.resolveDataElementOptions(0)),a=i[i.length-1].size(this.resolveDataElementOptions(i.length-1));return Math.max(o,s,a)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}class _$ extends XE{static id="pie";static defaults={cutout:0,rotation:0,circumference:360,radius:"100%"}}function Ql(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class Fy{static override(t){Object.assign(Fy.prototype,t)}options;constructor(t){this.options=t||{}}init(){}formats(){return Ql()}parse(){return Ql()}format(){return Ql()}add(){return Ql()}diff(){return Ql()}startOf(){return Ql()}endOf(){return Ql()}}var x$={_date:Fy};function E$(e,t,n,o){const{controller:i,data:s,_sorted:a}=e,l=i._cachedMeta.iScale,c=e.dataset&&e.dataset.options?e.dataset.options.spanGaps:null;if(l&&t===l.axis&&t!=="r"&&a&&s.length){const d=l._reversePixels?U8:ql;if(o){if(i._sharedOptions){const f=s[0],h=typeof f.getRange=="function"&&f.getRange(t);if(h){const p=d(s,t,n-h),g=d(s,t,n+h);return{lo:p.lo,hi:g.hi}}}}else{const f=d(s,t,n);if(c){const{vScale:h}=i._cachedMeta,{_parsed:p}=e,g=p.slice(0,f.lo+1).reverse().findIndex(b=>!xn(b[h.axis]));f.lo-=Math.max(0,g);const y=p.slice(f.hi).findIndex(b=>!xn(b[h.axis]));f.hi+=Math.max(0,y)}return f}}return{lo:0,hi:s.length-1}}function ip(e,t,n,o,i){const s=e.getSortedVisibleDatasetMetas(),a=n[t];for(let l=0,c=s.length;l<c;++l){const{index:d,data:f}=s[l],{lo:h,hi:p}=E$(s[l],t,a,i);for(let g=h;g<=p;++g){const y=f[g];y.skip||o(y,d,g)}}}function C$(e){const t=e.indexOf("x")!==-1,n=e.indexOf("y")!==-1;return function(o,i){const s=t?Math.abs(o.x-i.x):0,a=n?Math.abs(o.y-i.y):0;return Math.sqrt(Math.pow(s,2)+Math.pow(a,2))}}function $y(e,t,n,o,i){const s=[];return!i&&!e.isPointInArea(t)||ip(e,n,t,function(l,c,d){!i&&!tf(l,e.chartArea,0)||l.inRange(t.x,t.y,o)&&s.push({element:l,datasetIndex:c,index:d})},!0),s}function S$(e,t,n,o){let i=[];function s(a,l,c){const{startAngle:d,endAngle:f}=a.getProps(["startAngle","endAngle"],o),{angle:h}=iE(a,{x:t.x,y:t.y});Qu(h,d,f)&&i.push({element:a,datasetIndex:l,index:c})}return ip(e,n,t,s),i}function A$(e,t,n,o,i,s){let a=[];const l=C$(n);let c=Number.POSITIVE_INFINITY;function d(f,h,p){const g=f.inRange(t.x,t.y,i);if(o&&!g)return;const y=f.getCenterPoint(i);if(!(!!s||e.isPointInArea(y))&&!g)return;const _=l(t,y);_<c?(a=[{element:f,datasetIndex:h,index:p}],c=_):_===c&&a.push({element:f,datasetIndex:h,index:p})}return ip(e,n,t,d),a}function zy(e,t,n,o,i,s){return!s&&!e.isPointInArea(t)?[]:n==="r"&&!o?S$(e,t,n,i):A$(e,t,n,o,i,s)}function JE(e,t,n,o,i){const s=[],a=n==="x"?"inXRange":"inYRange";let l=!1;return ip(e,n,t,(c,d,f)=>{c[a]&&c[a](t[n],i)&&(s.push({element:c,datasetIndex:d,index:f}),l=l||c.inRange(t.x,t.y,i))}),o&&!l?[]:s}var T$={modes:{index(e,t,n,o){const i=Xl(t,e),s=n.axis||"x",a=n.includeInvisible||!1,l=n.intersect?$y(e,i,s,o,a):zy(e,i,s,!1,o,a),c=[];return l.length?(e.getSortedVisibleDatasetMetas().forEach(d=>{const f=l[0].index,h=d.data[f];h&&!h.skip&&c.push({element:h,datasetIndex:d.index,index:f})}),c):[]},dataset(e,t,n,o){const i=Xl(t,e),s=n.axis||"xy",a=n.includeInvisible||!1;let l=n.intersect?$y(e,i,s,o,a):zy(e,i,s,!1,o,a);if(l.length>0){const c=l[0].datasetIndex,d=e.getDatasetMeta(c).data;l=[];for(let f=0;f<d.length;++f)l.push({element:d[f],datasetIndex:c,index:f})}return l},point(e,t,n,o){const i=Xl(t,e),s=n.axis||"xy",a=n.includeInvisible||!1;return $y(e,i,s,o,a)},nearest(e,t,n,o){const i=Xl(t,e),s=n.axis||"xy",a=n.includeInvisible||!1;return zy(e,i,s,n.intersect,o,a)},x(e,t,n,o){const i=Xl(t,e);return JE(e,i,"x",n.intersect,o)},y(e,t,n,o){const i=Xl(t,e);return JE(e,i,"y",n.intersect,o)}}};const QE=["left","top","right","bottom"];function rf(e,t){return e.filter(n=>n.pos===t)}function VE(e,t){return e.filter(n=>QE.indexOf(n.pos)===-1&&n.box.axis===t)}function sf(e,t){return e.sort((n,o)=>{const i=t?o:n,s=t?n:o;return i.weight===s.weight?i.index-s.index:i.weight-s.weight})}function B$(e){const t=[];let n,o,i,s,a,l;for(n=0,o=(e||[]).length;n<o;++n)i=e[n],{position:s,options:{stack:a,stackWeight:l=1}}=i,t.push({index:n,box:i,pos:s,horizontal:i.isHorizontal(),weight:i.weight,stack:a&&s+a,stackWeight:l});return t}function P$(e){const t={};for(const n of e){const{stack:o,pos:i,stackWeight:s}=n;if(!o||!QE.includes(i))continue;const a=t[o]||(t[o]={count:0,placed:0,weight:0,size:0});a.count++,a.weight+=s}return t}function N$(e,t){const n=P$(e),{vBoxMaxWidth:o,hBoxMaxHeight:i}=t;let s,a,l;for(s=0,a=e.length;s<a;++s){l=e[s];const{fullSize:c}=l.box,d=n[l.stack],f=d&&l.stackWeight/d.weight;l.horizontal?(l.width=f?f*o:c&&t.availableWidth,l.height=i):(l.width=o,l.height=f?f*i:c&&t.availableHeight)}return n}function D$(e){const t=B$(e),n=sf(t.filter(d=>d.box.fullSize),!0),o=sf(rf(t,"left"),!0),i=sf(rf(t,"right")),s=sf(rf(t,"top"),!0),a=sf(rf(t,"bottom")),l=VE(t,"x"),c=VE(t,"y");return{fullSize:n,leftAndTop:o.concat(s),rightAndBottom:i.concat(c).concat(a).concat(l),chartArea:rf(t,"chartArea"),vertical:o.concat(i).concat(c),horizontal:s.concat(a).concat(l)}}function eC(e,t,n,o){return Math.max(e[n],t[n])+Math.max(e[o],t[o])}function tC(e,t){e.top=Math.max(e.top,t.top),e.left=Math.max(e.left,t.left),e.bottom=Math.max(e.bottom,t.bottom),e.right=Math.max(e.right,t.right)}function M$(e,t,n,o){const{pos:i,box:s}=n,a=e.maxPadding;if(!an(i)){n.size&&(e[i]-=n.size);const h=o[n.stack]||{size:0,count:1};h.size=Math.max(h.size,n.horizontal?s.height:s.width),n.size=h.size/h.count,e[i]+=n.size}s.getPadding&&tC(a,s.getPadding());const l=Math.max(0,t.outerWidth-eC(a,e,"left","right")),c=Math.max(0,t.outerHeight-eC(a,e,"top","bottom")),d=l!==e.w,f=c!==e.h;return e.w=l,e.h=c,n.horizontal?{same:d,other:f}:{same:f,other:d}}function R$(e){const t=e.maxPadding;function n(o){const i=Math.max(t[o]-e[o],0);return e[o]+=i,i}e.y+=n("top"),e.x+=n("left"),n("right"),n("bottom")}function I$(e,t){const n=t.maxPadding;function o(i){const s={left:0,top:0,right:0,bottom:0};return i.forEach(a=>{s[a]=Math.max(t[a],n[a])}),s}return o(e?["left","right"]:["top","bottom"])}function af(e,t,n,o){const i=[];let s,a,l,c,d,f;for(s=0,a=e.length,d=0;s<a;++s){l=e[s],c=l.box,c.update(l.width||t.w,l.height||t.h,I$(l.horizontal,t));const{same:h,other:p}=M$(t,n,l,o);d|=h&&i.length,f=f||p,c.fullSize||i.push(l)}return d&&af(i,t,n,o)||f}function sp(e,t,n,o,i){e.top=n,e.left=t,e.right=t+o,e.bottom=n+i,e.width=o,e.height=i}function nC(e,t,n,o){const i=n.padding;let{x:s,y:a}=t;for(const l of e){const c=l.box,d=o[l.stack]||{placed:0,weight:1},f=l.stackWeight/d.weight||1;if(l.horizontal){const h=t.w*f,p=d.size||c.height;Zu(d.start)&&(a=d.start),c.fullSize?sp(c,i.left,a,n.outerWidth-i.right-i.left,p):sp(c,t.left+d.placed,a,h,p),d.start=a,d.placed+=h,a=c.bottom}else{const h=t.h*f,p=d.size||c.width;Zu(d.start)&&(s=d.start),c.fullSize?sp(c,s,i.top,p,n.outerHeight-i.bottom-i.top):sp(c,s,t.top+d.placed,p,h),d.start=s,d.placed+=h,s=c.right}}t.x=s,t.y=a}var oi={addBox(e,t){e.boxes||(e.boxes=[]),t.fullSize=t.fullSize||!1,t.position=t.position||"top",t.weight=t.weight||0,t._layers=t._layers||function(){return[{z:0,draw(n){t.draw(n)}}]},e.boxes.push(t)},removeBox(e,t){const n=e.boxes?e.boxes.indexOf(t):-1;n!==-1&&e.boxes.splice(n,1)},configure(e,t,n){t.fullSize=n.fullSize,t.position=n.position,t.weight=n.weight},update(e,t,n,o){if(!e)return;const i=ni(e.options.layout.padding),s=Math.max(t-i.width,0),a=Math.max(n-i.height,0),l=D$(e.boxes),c=l.vertical,d=l.horizontal;An(e.boxes,b=>{typeof b.beforeLayout=="function"&&b.beforeLayout()});const f=c.reduce((b,_)=>_.box.options&&_.box.options.display===!1?b:b+1,0)||1,h=Object.freeze({outerWidth:t,outerHeight:n,padding:i,availableWidth:s,availableHeight:a,vBoxMaxWidth:s/2/f,hBoxMaxHeight:a/2}),p=Object.assign({},i);tC(p,ni(o));const g=Object.assign({maxPadding:p,w:s,h:a,x:i.left,y:i.top},i),y=N$(c.concat(d),h);af(l.fullSize,g,h,y),af(c,g,h,y),af(d,g,h,y)&&af(c,g,h,y),R$(g),nC(l.leftAndTop,g,h,y),g.x+=g.w,g.y+=g.h,nC(l.rightAndBottom,g,h,y),e.chartArea={left:g.left,top:g.top,right:g.left+g.w,bottom:g.top+g.h,height:g.h,width:g.w},An(l.chartArea,b=>{const _=b.box;Object.assign(_,e.chartArea),_.update(g.w,g.h,{left:0,top:0,right:0,bottom:0})})}};class oC{acquireContext(t,n){}releaseContext(t){return!1}addEventListener(t,n,o){}removeEventListener(t,n,o){}getDevicePixelRatio(){return 1}getMaximumSize(t,n,o,i){return n=Math.max(0,n||t.width),o=o||t.height,{width:n,height:Math.max(0,i?Math.floor(n/i):o)}}isAttached(t){return!0}updateConfig(t){}}class O$ extends oC{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const ap="$chartjs",L$={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},rC=e=>e===null||e==="";function F$(e,t){const n=e.style,o=e.getAttribute("height"),i=e.getAttribute("width");if(e[ap]={initial:{height:o,width:i,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",rC(i)){const s=TE(e,"width");s!==void 0&&(e.width=s)}if(rC(o))if(e.style.height==="")e.height=e.width/(t||2);else{const s=TE(e,"height");s!==void 0&&(e.height=s)}return e}const iC=L7?{passive:!0}:!1;function $$(e,t,n){e&&e.addEventListener(t,n,iC)}function z$(e,t,n){e&&e.canvas&&e.canvas.removeEventListener(t,n,iC)}function j$(e,t){const n=L$[e.type]||e.type,{x:o,y:i}=Xl(e,t);return{type:n,chart:t,native:e,x:o!==void 0?o:null,y:i!==void 0?i:null}}function lp(e,t){for(const n of e)if(n===t||n.contains(t))return!0}function U$(e,t,n){const o=e.canvas,i=new MutationObserver(s=>{let a=!1;for(const l of s)a=a||lp(l.addedNodes,o),a=a&&!lp(l.removedNodes,o);a&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}function W$(e,t,n){const o=e.canvas,i=new MutationObserver(s=>{let a=!1;for(const l of s)a=a||lp(l.removedNodes,o),a=a&&!lp(l.addedNodes,o);a&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}const lf=new Map;let sC=0;function aC(){const e=window.devicePixelRatio;e!==sC&&(sC=e,lf.forEach((t,n)=>{n.currentDevicePixelRatio!==e&&t()}))}function H$(e,t){lf.size||window.addEventListener("resize",aC),lf.set(e,t)}function q$(e){lf.delete(e),lf.size||window.removeEventListener("resize",aC)}function K$(e,t,n){const o=e.canvas,i=o&&My(o);if(!i)return;const s=dE((l,c)=>{const d=i.clientWidth;n(l,c),d<i.clientWidth&&n()},window),a=new ResizeObserver(l=>{const c=l[0],d=c.contentRect.width,f=c.contentRect.height;d===0&&f===0||s(d,f)});return a.observe(i),H$(e,s),a}function jy(e,t,n){n&&n.disconnect(),t==="resize"&&q$(e)}function G$(e,t,n){const o=e.canvas,i=dE(s=>{e.ctx!==null&&n(j$(s,e))},e);return $$(o,t,i),i}class Y$ extends oC{acquireContext(t,n){const o=t&&t.getContext&&t.getContext("2d");return o&&o.canvas===t?(F$(t,n),o):null}releaseContext(t){const n=t.canvas;if(!n[ap])return!1;const o=n[ap].initial;["height","width"].forEach(s=>{const a=o[s];xn(a)?n.removeAttribute(s):n.setAttribute(s,a)});const i=o.style||{};return Object.keys(i).forEach(s=>{n.style[s]=i[s]}),n.width=n.width,delete n[ap],!0}addEventListener(t,n,o){this.removeEventListener(t,n);const i=t.$proxies||(t.$proxies={}),a={attach:U$,detach:W$,resize:K$}[n]||G$;i[n]=a(t,n,o)}removeEventListener(t,n){const o=t.$proxies||(t.$proxies={}),i=o[n];if(!i)return;({attach:jy,detach:jy,resize:jy}[n]||z$)(t,n,i),o[n]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,n,o,i){return O7(t,n,o,i)}isAttached(t){const n=t&&My(t);return!!(n&&n.isConnected)}}function Z$(e){return!Dy()||typeof OffscreenCanvas<"u"&&e instanceof OffscreenCanvas?O$:Y$}let Vs=class{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(t){const{x:n,y:o}=this.getProps(["x","y"],t);return{x:n,y:o}}hasValue(){return Ju(this.x)&&Ju(this.y)}getProps(t,n){const o=this.$animations;if(!n||!o)return this;const i={};return t.forEach(s=>{i[s]=o[s]&&o[s].active()?o[s]._to:this[s]}),i}};function X$(e,t){const n=e.options.ticks,o=J$(e),i=Math.min(n.maxTicksLimit||o,o),s=n.major.enabled?V$(t):[],a=s.length,l=s[0],c=s[a-1],d=[];if(a>i)return e9(t,d,s,a/i),d;const f=Q$(s,t,i);if(a>0){let h,p;const g=a>1?Math.round((c-l)/(a-1)):null;for(cp(t,d,f,xn(g)?0:l-g,l),h=0,p=a-1;h<p;h++)cp(t,d,f,s[h],s[h+1]);return cp(t,d,f,c,xn(g)?t.length:c+g),d}return cp(t,d,f),d}function J$(e){const t=e.options.offset,n=e._tickSize(),o=e._length/n+(t?0:1),i=e._maxLength/n;return Math.floor(Math.min(o,i))}function Q$(e,t,n){const o=t9(e),i=t.length/n;if(!o)return Math.max(i,1);const s=I8(o);for(let a=0,l=s.length-1;a<l;a++){const c=s[a];if(c>i)return c}return Math.max(i,1)}function V$(e){const t=[];let n,o;for(n=0,o=e.length;n<o;n++)e[n].major&&t.push(n);return t}function e9(e,t,n,o){let i=0,s=n[0],a;for(o=Math.ceil(o),a=0;a<e.length;a++)a===s&&(t.push(e[a]),i++,s=n[i*o])}function cp(e,t,n,o,i){const s=Zt(o,0),a=Math.min(Zt(i,e.length),e.length);let l=0,c,d,f;for(n=Math.ceil(n),i&&(c=i-o,n=c/Math.floor(c/n)),f=s;f<0;)l++,f=Math.round(s+l*n);for(d=Math.max(s,0);d<a;d++)d===f&&(t.push(e[d]),l++,f=Math.round(s+l*n))}function t9(e){const t=e.length;let n,o;if(t<2)return!1;for(o=e[0],n=1;n<t;++n)if(e[n]-e[n-1]!==o)return!1;return o}const n9=e=>e==="left"?"right":e==="right"?"left":e,lC=(e,t,n)=>t==="top"||t==="left"?e[t]+n:e[t]-n,cC=(e,t)=>Math.min(t||e,e);function dC(e,t){const n=[],o=e.length/t,i=e.length;let s=0;for(;s<i;s+=o)n.push(e[Math.floor(s)]);return n}function o9(e,t,n){const o=e.ticks.length,i=Math.min(t,o-1),s=e._startPixel,a=e._endPixel,l=1e-6;let c=e.getPixelForTick(i),d;if(!(n&&(o===1?d=Math.max(c-s,a-c):t===0?d=(e.getPixelForTick(1)-c)/2:d=(c-e.getPixelForTick(i-1))/2,c+=i<t?d:-d,c<s-l||c>a+l)))return c}function r9(e,t){An(e,n=>{const o=n.gc,i=o.length/2;let s;if(i>t){for(s=0;s<i;++s)delete n.data[o[s]];o.splice(0,i)}})}function cf(e){return e.drawTicks?e.tickLength:0}function uC(e,t){if(!e.display)return 0;const n=Qo(e.font,t),o=ni(e.padding);return(xo(e.text)?e.text.length:1)*n.lineHeight+o.height}function i9(e,t){return Yl(e,{scale:t,type:"scale"})}function s9(e,t,n){return Yl(e,{tick:n,index:t,type:"tick"})}function a9(e,t,n){let o=ky(e);return(n&&t!=="right"||!n&&t==="right")&&(o=n9(o)),o}function l9(e,t,n,o){const{top:i,left:s,bottom:a,right:l,chart:c}=e,{chartArea:d,scales:f}=c;let h=0,p,g,y;const b=a-i,_=l-s;if(e.isHorizontal()){if(g=Jo(o,s,l),an(n)){const x=Object.keys(n)[0],B=n[x];y=f[x].getPixelForValue(B)+b-t}else n==="center"?y=(d.bottom+d.top)/2+b-t:y=lC(e,n,t);p=l-s}else{if(an(n)){const x=Object.keys(n)[0],B=n[x];g=f[x].getPixelForValue(B)-_+t}else n==="center"?g=(d.left+d.right)/2-_+t:g=lC(e,n,t);y=Jo(o,a,i),h=n==="left"?-Do:Do}return{titleX:g,titleY:y,maxWidth:p,rotation:h}}class hd extends Vs{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,n){return t}getUserBounds(){let{_userMin:t,_userMax:n,_suggestedMin:o,_suggestedMax:i}=this;return t=ss(t,Number.POSITIVE_INFINITY),n=ss(n,Number.NEGATIVE_INFINITY),o=ss(o,Number.POSITIVE_INFINITY),i=ss(i,Number.NEGATIVE_INFINITY),{min:ss(t,o),max:ss(n,i),minDefined:Zo(t),maxDefined:Zo(n)}}getMinMax(t){let{min:n,max:o,minDefined:i,maxDefined:s}=this.getUserBounds(),a;if(i&&s)return{min:n,max:o};const l=this.getMatchingVisibleMetas();for(let c=0,d=l.length;c<d;++c)a=l[c].controller.getMinMax(this,t),i||(n=Math.min(n,a.min)),s||(o=Math.max(o,a.max));return n=s&&n>o?o:n,o=i&&n>o?n:o,{min:ss(n,ss(o,n)),max:ss(o,ss(n,o))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(t=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){Wn(this.options.beforeUpdate,[this])}update(t,n,o){const{beginAtZero:i,grace:s,ticks:a}=this.options,l=a.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=n,this._margins=o=Object.assign({left:0,right:0,top:0,bottom:0},o),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+o.left+o.right:this.height+o.top+o.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=m7(this,s,i),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const c=l<this.ticks.length;this._convertTicksToLabels(c?dC(this.ticks,l):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),a.display&&(a.autoSkip||a.source==="auto")&&(this.ticks=X$(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),c&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let t=this.options.reverse,n,o;this.isHorizontal()?(n=this.left,o=this.right):(n=this.top,o=this.bottom,t=!t),this._startPixel=n,this._endPixel=o,this._reversePixels=t,this._length=o-n,this._alignToPixels=this.options.alignToPixels}afterUpdate(){Wn(this.options.afterUpdate,[this])}beforeSetDimensions(){Wn(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(){Wn(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),Wn(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){Wn(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const n=this.options.ticks;let o,i,s;for(o=0,i=t.length;o<i;o++)s=t[o],s.label=Wn(n.callback,[s.value,o,t],this)}afterTickToLabelConversion(){Wn(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){Wn(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,n=t.ticks,o=cC(this.ticks.length,t.ticks.maxTicksLimit),i=n.minRotation||0,s=n.maxRotation;let a=i,l,c,d;if(!this._isVisible()||!n.display||i>=s||o<=1||!this.isHorizontal()){this.labelRotation=i;return}const f=this._getLabelSizes(),h=f.widest.width,p=f.highest.height,g=Xo(this.chart.width-h,0,this.maxWidth);l=t.offset?this.maxWidth/o:g/(o-1),h+6>l&&(l=g/(o-(t.offset?.5:1)),c=this.maxHeight-cf(t.grid)-n.padding-uC(t.title,this.chart.options.font),d=Math.sqrt(h*h+p*p),a=$8(Math.min(Math.asin(Xo((f.highest.height+6)/l,-1,1)),Math.asin(Xo(c/d,-1,1))-Math.asin(Xo(p/d,-1,1)))),a=Math.max(i,Math.min(s,a))),this.labelRotation=a}afterCalculateLabelRotation(){Wn(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){Wn(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:n,options:{ticks:o,title:i,grid:s}}=this,a=this._isVisible(),l=this.isHorizontal();if(a){const c=uC(i,n.options.font);if(l?(t.width=this.maxWidth,t.height=cf(s)+c):(t.height=this.maxHeight,t.width=cf(s)+c),o.display&&this.ticks.length){const{first:d,last:f,widest:h,highest:p}=this._getLabelSizes(),g=o.padding*2,y=Xs(this.labelRotation),b=Math.cos(y),_=Math.sin(y);if(l){const x=o.mirror?0:_*h.width+b*p.height;t.height=Math.min(this.maxHeight,t.height+x+g)}else{const x=o.mirror?0:b*h.width+_*p.height;t.width=Math.min(this.maxWidth,t.width+x+g)}this._calculatePadding(d,f,_,b)}}this._handleMargins(),l?(this.width=this._length=n.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=n.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,n,o,i){const{ticks:{align:s,padding:a},position:l}=this.options,c=this.labelRotation!==0,d=l!=="top"&&this.axis==="x";if(this.isHorizontal()){const f=this.getPixelForTick(0)-this.left,h=this.right-this.getPixelForTick(this.ticks.length-1);let p=0,g=0;c?d?(p=i*t.width,g=o*n.height):(p=o*t.height,g=i*n.width):s==="start"?g=n.width:s==="end"?p=t.width:s!=="inner"&&(p=t.width/2,g=n.width/2),this.paddingLeft=Math.max((p-f+a)*this.width/(this.width-f),0),this.paddingRight=Math.max((g-h+a)*this.width/(this.width-h),0)}else{let f=n.height/2,h=t.height/2;s==="start"?(f=0,h=t.height):s==="end"&&(f=n.height,h=0),this.paddingTop=f+a,this.paddingBottom=h+a}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){Wn(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:n}=this.options;return n==="top"||n==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t);let n,o;for(n=0,o=t.length;n<o;n++)xn(t[n].label)&&(t.splice(n,1),o--,n--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const n=this.options.ticks.sampleSize;let o=this.ticks;n<o.length&&(o=dC(o,n)),this._labelSizes=t=this._computeLabelSizes(o,o.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,n,o){const{ctx:i,_longestTextCache:s}=this,a=[],l=[],c=Math.floor(n/cC(n,o));let d=0,f=0,h,p,g,y,b,_,x,B,R,S,O;for(h=0;h<n;h+=c){if(y=t[h].label,b=this._resolveTickFontOptions(h),i.font=_=b.string,x=s[_]=s[_]||{data:{},gc:[]},B=b.lineHeight,R=S=0,!xn(y)&&!xo(y))R=gE(i,x.data,x.gc,R,y),S=B;else if(xo(y))for(p=0,g=y.length;p<g;++p)O=y[p],!xn(O)&&!xo(O)&&(R=gE(i,x.data,x.gc,R,O),S+=B);a.push(R),l.push(S),d=Math.max(R,d),f=Math.max(S,f)}r9(s,n);const I=a.indexOf(d),D=l.indexOf(f),w=E=>({width:a[E]||0,height:l[E]||0});return{first:w(0),last:w(n-1),widest:w(I),highest:w(D),widths:a,heights:l}}getLabelForValue(t){return t}getPixelForValue(t,n){return NaN}getValueForPixel(t){}getPixelForTick(t){const n=this.ticks;return t<0||t>n.length-1?null:this.getPixelForValue(n[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const n=this._startPixel+t*this._length;return j8(this._alignToPixels?Gl(this.chart,n,0):n)}getDecimalForPixel(t){const n=(t-this._startPixel)/this._length;return this._reversePixels?1-n:n}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:n}=this;return t<0&&n<0?n:t>0&&n>0?t:0}getContext(t){const n=this.ticks||[];if(t>=0&&t<n.length){const o=n[t];return o.$context||(o.$context=s9(this.getContext(),t,o))}return this.$context||(this.$context=i9(this.chart.getContext(),this))}_tickSize(){const t=this.options.ticks,n=Xs(this.labelRotation),o=Math.abs(Math.cos(n)),i=Math.abs(Math.sin(n)),s=this._getLabelSizes(),a=t.autoSkipPadding||0,l=s?s.widest.width+a:0,c=s?s.highest.height+a:0;return this.isHorizontal()?c*o>l*i?l/o:c/i:c*i<l*o?c/o:l/i}_isVisible(){const t=this.options.display;return t!=="auto"?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const n=this.axis,o=this.chart,i=this.options,{grid:s,position:a,border:l}=i,c=s.offset,d=this.isHorizontal(),h=this.ticks.length+(c?1:0),p=cf(s),g=[],y=l.setContext(this.getContext()),b=y.display?y.width:0,_=b/2,x=function(ie){return Gl(o,ie,b)};let B,R,S,O,I,D,w,E,F,A,P,q;if(a==="top")B=x(this.bottom),D=this.bottom-p,E=B-_,A=x(t.top)+_,q=t.bottom;else if(a==="bottom")B=x(this.top),A=t.top,q=x(t.bottom)-_,D=B+_,E=this.top+p;else if(a==="left")B=x(this.right),I=this.right-p,w=B-_,F=x(t.left)+_,P=t.right;else if(a==="right")B=x(this.left),F=t.left,P=x(t.right)-_,I=B+_,w=this.left+p;else if(n==="x"){if(a==="center")B=x((t.top+t.bottom)/2+.5);else if(an(a)){const ie=Object.keys(a)[0],le=a[ie];B=x(this.chart.scales[ie].getPixelForValue(le))}A=t.top,q=t.bottom,D=B+_,E=D+p}else if(n==="y"){if(a==="center")B=x((t.left+t.right)/2);else if(an(a)){const ie=Object.keys(a)[0],le=a[ie];B=x(this.chart.scales[ie].getPixelForValue(le))}I=B-_,w=I-p,F=t.left,P=t.right}const Q=Zt(i.ticks.maxTicksLimit,h),re=Math.max(1,Math.ceil(h/Q));for(R=0;R<h;R+=re){const ie=this.getContext(R),le=s.setContext(ie),X=l.setContext(ie),K=le.lineWidth,W=le.color,se=X.dash||[],H=X.dashOffset,N=le.tickWidth,j=le.tickColor,Y=le.tickBorderDash||[],J=le.tickBorderDashOffset;S=o9(this,R,c),S!==void 0&&(O=Gl(o,S,K),d?I=w=F=P=O:D=E=A=q=O,g.push({tx1:I,ty1:D,tx2:w,ty2:E,x1:F,y1:A,x2:P,y2:q,width:K,color:W,borderDash:se,borderDashOffset:H,tickWidth:N,tickColor:j,tickBorderDash:Y,tickBorderDashOffset:J}))}return this._ticksLength=h,this._borderValue=B,g}_computeLabelItems(t){const n=this.axis,o=this.options,{position:i,ticks:s}=o,a=this.isHorizontal(),l=this.ticks,{align:c,crossAlign:d,padding:f,mirror:h}=s,p=cf(o.grid),g=p+f,y=h?-f:g,b=-Xs(this.labelRotation),_=[];let x,B,R,S,O,I,D,w,E,F,A,P,q="middle";if(i==="top")I=this.bottom-y,D=this._getXAxisLabelAlignment();else if(i==="bottom")I=this.top+y,D=this._getXAxisLabelAlignment();else if(i==="left"){const re=this._getYAxisLabelAlignment(p);D=re.textAlign,O=re.x}else if(i==="right"){const re=this._getYAxisLabelAlignment(p);D=re.textAlign,O=re.x}else if(n==="x"){if(i==="center")I=(t.top+t.bottom)/2+g;else if(an(i)){const re=Object.keys(i)[0],ie=i[re];I=this.chart.scales[re].getPixelForValue(ie)+g}D=this._getXAxisLabelAlignment()}else if(n==="y"){if(i==="center")O=(t.left+t.right)/2-g;else if(an(i)){const re=Object.keys(i)[0],ie=i[re];O=this.chart.scales[re].getPixelForValue(ie)}D=this._getYAxisLabelAlignment(p).textAlign}n==="y"&&(c==="start"?q="top":c==="end"&&(q="bottom"));const Q=this._getLabelSizes();for(x=0,B=l.length;x<B;++x){R=l[x],S=R.label;const re=s.setContext(this.getContext(x));w=this.getPixelForTick(x)+s.labelOffset,E=this._resolveTickFontOptions(x),F=E.lineHeight,A=xo(S)?S.length:1;const ie=A/2,le=re.color,X=re.textStrokeColor,K=re.textStrokeWidth;let W=D;a?(O=w,D==="inner"&&(x===B-1?W=this.options.reverse?"left":"right":x===0?W=this.options.reverse?"right":"left":W="center"),i==="top"?d==="near"||b!==0?P=-A*F+F/2:d==="center"?P=-Q.highest.height/2-ie*F+F:P=-Q.highest.height+F/2:d==="near"||b!==0?P=F/2:d==="center"?P=Q.highest.height/2-ie*F:P=Q.highest.height-A*F,h&&(P*=-1),b!==0&&!re.showLabelBackdrop&&(O+=F/2*Math.sin(b))):(I=w,P=(1-A)*F/2);let se;if(re.showLabelBackdrop){const H=ni(re.backdropPadding),N=Q.heights[x],j=Q.widths[x];let Y=P-H.top,J=0-H.left;switch(q){case"middle":Y-=N/2;break;case"bottom":Y-=N;break}switch(D){case"center":J-=j/2;break;case"right":J-=j;break;case"inner":x===B-1?J-=j:x>0&&(J-=j/2);break}se={left:J,top:Y,width:j+H.width,height:N+H.height,color:re.backdropColor}}_.push({label:S,font:E,textOffset:P,options:{rotation:b,color:le,strokeColor:X,strokeWidth:K,textAlign:W,textBaseline:q,translation:[O,I],backdrop:se}})}return _}_getXAxisLabelAlignment(){const{position:t,ticks:n}=this.options;if(-Xs(this.labelRotation))return t==="top"?"left":"right";let i="center";return n.align==="start"?i="left":n.align==="end"?i="right":n.align==="inner"&&(i="inner"),i}_getYAxisLabelAlignment(t){const{position:n,ticks:{crossAlign:o,mirror:i,padding:s}}=this.options,a=this._getLabelSizes(),l=t+s,c=a.widest.width;let d,f;return n==="left"?i?(f=this.right+s,o==="near"?d="left":o==="center"?(d="center",f+=c/2):(d="right",f+=c)):(f=this.right-l,o==="near"?d="right":o==="center"?(d="center",f-=c/2):(d="left",f=this.left)):n==="right"?i?(f=this.left+s,o==="near"?d="right":o==="center"?(d="center",f-=c/2):(d="left",f-=c)):(f=this.left+l,o==="near"?d="left":o==="center"?(d="center",f+=c/2):(d="right",f=this.right)):d="right",{textAlign:d,x:f}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,n=this.options.position;if(n==="left"||n==="right")return{top:0,left:this.left,bottom:t.height,right:this.right};if(n==="top"||n==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:t.width}}drawBackground(){const{ctx:t,options:{backgroundColor:n},left:o,top:i,width:s,height:a}=this;n&&(t.save(),t.fillStyle=n,t.fillRect(o,i,s,a),t.restore())}getLineWidthForValue(t){const n=this.options.grid;if(!this._isVisible()||!n.display)return 0;const i=this.ticks.findIndex(s=>s.value===t);return i>=0?n.setContext(this.getContext(i)).lineWidth:0}drawGrid(t){const n=this.options.grid,o=this.ctx,i=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let s,a;const l=(c,d,f)=>{!f.width||!f.color||(o.save(),o.lineWidth=f.width,o.strokeStyle=f.color,o.setLineDash(f.borderDash||[]),o.lineDashOffset=f.borderDashOffset,o.beginPath(),o.moveTo(c.x,c.y),o.lineTo(d.x,d.y),o.stroke(),o.restore())};if(n.display)for(s=0,a=i.length;s<a;++s){const c=i[s];n.drawOnChartArea&&l({x:c.x1,y:c.y1},{x:c.x2,y:c.y2},c),n.drawTicks&&l({x:c.tx1,y:c.ty1},{x:c.tx2,y:c.ty2},{color:c.tickColor,width:c.tickWidth,borderDash:c.tickBorderDash,borderDashOffset:c.tickBorderDashOffset})}}drawBorder(){const{chart:t,ctx:n,options:{border:o,grid:i}}=this,s=o.setContext(this.getContext()),a=o.display?s.width:0;if(!a)return;const l=i.setContext(this.getContext(0)).lineWidth,c=this._borderValue;let d,f,h,p;this.isHorizontal()?(d=Gl(t,this.left,a)-a/2,f=Gl(t,this.right,l)+l/2,h=p=c):(h=Gl(t,this.top,a)-a/2,p=Gl(t,this.bottom,l)+l/2,d=f=c),n.save(),n.lineWidth=s.width,n.strokeStyle=s.color,n.beginPath(),n.moveTo(d,h),n.lineTo(f,p),n.stroke(),n.restore()}drawLabels(t){if(!this.options.ticks.display)return;const o=this.ctx,i=this._computeLabelArea();i&&Xm(o,i);const s=this.getLabelItems(t);for(const a of s){const l=a.options,c=a.font,d=a.label,f=a.textOffset;nf(o,d,0,f,c,l)}i&&Jm(o)}drawTitle(){const{ctx:t,options:{position:n,title:o,reverse:i}}=this;if(!o.display)return;const s=Qo(o.font),a=ni(o.padding),l=o.align;let c=s.lineHeight/2;n==="bottom"||n==="center"||an(n)?(c+=a.bottom,xo(o.text)&&(c+=s.lineHeight*(o.text.length-1))):c+=a.top;const{titleX:d,titleY:f,maxWidth:h,rotation:p}=l9(this,c,n,l);nf(t,o.text,0,0,s,{color:o.color,maxWidth:h,rotation:p,textAlign:a9(l,n,i),textBaseline:"middle",translation:[d,f]})}draw(t){this._isVisible()&&(this.drawBackground(),this.drawGrid(t),this.drawBorder(),this.drawTitle(),this.drawLabels(t))}_layers(){const t=this.options,n=t.ticks&&t.ticks.z||0,o=Zt(t.grid&&t.grid.z,-1),i=Zt(t.border&&t.border.z,0);return!this._isVisible()||this.draw!==hd.prototype.draw?[{z:n,draw:s=>{this.draw(s)}}]:[{z:o,draw:s=>{this.drawBackground(),this.drawGrid(s),this.drawTitle()}},{z:i,draw:()=>{this.drawBorder()}},{z:n,draw:s=>{this.drawLabels(s)}}]}getMatchingVisibleMetas(t){const n=this.chart.getSortedVisibleDatasetMetas(),o=this.axis+"AxisID",i=[];let s,a;for(s=0,a=n.length;s<a;++s){const l=n[s];l[o]===this.id&&(!t||l.type===t)&&i.push(l)}return i}_resolveTickFontOptions(t){const n=this.options.ticks.setContext(this.getContext(t));return Qo(n.font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class dp{constructor(t,n,o){this.type=t,this.scope=n,this.override=o,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){const n=Object.getPrototypeOf(t);let o;u9(n)&&(o=this.register(n));const i=this.items,s=t.id,a=this.scope+"."+s;if(!s)throw new Error("class does not have id: "+t);return s in i||(i[s]=t,c9(t,a,o),this.override&&fo.override(t.id,t.overrides)),a}get(t){return this.items[t]}unregister(t){const n=this.items,o=t.id,i=this.scope;o in n&&delete n[o],i&&o in fo[i]&&(delete fo[i][o],this.override&&delete Kl[o])}}function c9(e,t,n){const o=Gu(Object.create(null),[n?fo.get(n):{},fo.get(t),e.defaults]);fo.set(t,o),e.defaultRoutes&&d9(t,e.defaultRoutes),e.descriptors&&fo.describe(t,e.descriptors)}function d9(e,t){Object.keys(t).forEach(n=>{const o=n.split("."),i=o.pop(),s=[e].concat(o).join("."),a=t[n].split("."),l=a.pop(),c=a.join(".");fo.route(s,i,c,l)})}function u9(e){return"id"in e&&"defaults"in e}let f9=class{constructor(){this.controllers=new dp(rp,"datasets",!0),this.elements=new dp(Vs,"elements"),this.plugins=new dp(Object,"plugins"),this.scales=new dp(hd,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,n,o){[...n].forEach(i=>{const s=o||this._getRegistryForType(i);o||s.isForType(i)||s===this.plugins&&i.id?this._exec(t,s,i):An(i,a=>{const l=o||this._getRegistryForType(a);this._exec(t,l,a)})})}_exec(t,n,o){const i=yy(t);Wn(o["before"+i],[],o),n[t](o),Wn(o["after"+i],[],o)}_getRegistryForType(t){for(let n=0;n<this._typedRegistries.length;n++){const o=this._typedRegistries[n];if(o.isForType(t))return o}return this.plugins}_get(t,n,o){const i=n.get(t);if(i===void 0)throw new Error('"'+t+'" is not a registered '+o+".");return i}};var ls=new f9;class h9{constructor(){this._init=void 0}notify(t,n,o,i){if(n==="beforeInit"&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install")),this._init===void 0)return;const s=i?this._descriptors(t).filter(i):this._descriptors(t),a=this._notify(s,t,n,o);return n==="afterDestroy"&&(this._notify(s,t,"stop"),this._notify(this._init,t,"uninstall"),this._init=void 0),a}_notify(t,n,o,i){i=i||{};for(const s of t){const a=s.plugin,l=a[o],c=[n,i,s.options];if(Wn(l,c,a)===!1&&i.cancelable)return!1}return!0}invalidate(){xn(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;const n=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),n}_createDescriptors(t,n){const o=t&&t.config,i=Zt(o.options&&o.options.plugins,{}),s=m9(o);return i===!1&&!n?[]:g9(t,s,i,n)}_notifyStateChanges(t){const n=this._oldCache||[],o=this._cache,i=(s,a)=>s.filter(l=>!a.some(c=>l.plugin.id===c.plugin.id));this._notify(i(n,o),t,"stop"),this._notify(i(o,n),t,"start")}}function m9(e){const t={},n=[],o=Object.keys(ls.plugins.items);for(let s=0;s<o.length;s++)n.push(ls.getPlugin(o[s]));const i=e.plugins||[];for(let s=0;s<i.length;s++){const a=i[s];n.indexOf(a)===-1&&(n.push(a),t[a.id]=!0)}return{plugins:n,localIds:t}}function p9(e,t){return!t&&e===!1?null:e===!0?{}:e}function g9(e,{plugins:t,localIds:n},o,i){const s=[],a=e.getContext();for(const l of t){const c=l.id,d=p9(o[c],i);d!==null&&s.push({plugin:l,options:b9(e.config,{plugin:l,local:n[c]},d,a)})}return s}function b9(e,{plugin:t,local:n},o,i){const s=e.pluginScopeKeys(t),a=e.getOptionScopes(o,s);return n&&t.defaults&&a.push(t.defaults),e.createResolver(a,i,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function Uy(e,t){const n=fo.datasets[e]||{};return((t.datasets||{})[e]||{}).indexAxis||t.indexAxis||n.indexAxis||"x"}function y9(e,t){let n=e;return e==="_index_"?n=t:e==="_value_"&&(n=t==="x"?"y":"x"),n}function v9(e,t){return e===t?"_index_":"_value_"}function fC(e){if(e==="x"||e==="y"||e==="r")return e}function w9(e){if(e==="top"||e==="bottom")return"x";if(e==="left"||e==="right")return"y"}function Wy(e,...t){if(fC(e))return e;for(const n of t){const o=n.axis||w9(n.position)||e.length>1&&fC(e[0].toLowerCase());if(o)return o}throw new Error(`Cannot determine type of '${e}' axis. Please provide 'axis' or 'position' option.`)}function hC(e,t,n){if(n[t+"AxisID"]===e)return{axis:t}}function k9(e,t){if(t.data&&t.data.datasets){const n=t.data.datasets.filter(o=>o.xAxisID===e||o.yAxisID===e);if(n.length)return hC(e,"x",n[0])||hC(e,"y",n[0])}return{}}function _9(e,t){const n=Kl[e.type]||{scales:{}},o=t.scales||{},i=Uy(e.type,t),s=Object.create(null);return Object.keys(o).forEach(a=>{const l=o[a];if(!an(l))return console.error(`Invalid scale configuration for scale: ${a}`);if(l._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${a}`);const c=Wy(a,l,k9(a,e),fo.scales[l.type]),d=v9(c,i),f=n.scales||{};s[a]=Yu(Object.create(null),[{axis:c},l,f[c],f[d]])}),e.data.datasets.forEach(a=>{const l=a.type||e.type,c=a.indexAxis||Uy(l,t),f=(Kl[l]||{}).scales||{};Object.keys(f).forEach(h=>{const p=y9(h,c),g=a[p+"AxisID"]||p;s[g]=s[g]||Object.create(null),Yu(s[g],[{axis:p},o[g],f[h]])})}),Object.keys(s).forEach(a=>{const l=s[a];Yu(l,[fo.scales[l.type],fo.scale])}),s}function mC(e){const t=e.options||(e.options={});t.plugins=Zt(t.plugins,{}),t.scales=_9(e,t)}function pC(e){return e=e||{},e.datasets=e.datasets||[],e.labels=e.labels||[],e}function x9(e){return e=e||{},e.data=pC(e.data),mC(e),e}const gC=new Map,bC=new Set;function up(e,t){let n=gC.get(e);return n||(n=t(),gC.set(e,n),bC.add(n)),n}const df=(e,t,n)=>{const o=Wl(t,n);o!==void 0&&e.add(o)};let E9=class{constructor(t){this._config=x9(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=pC(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),mC(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return up(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,n){return up(`${t}.transition.${n}`,()=>[[`datasets.${t}.transitions.${n}`,`transitions.${n}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,n){return up(`${t}-${n}`,()=>[[`datasets.${t}.elements.${n}`,`datasets.${t}`,`elements.${n}`,""]])}pluginScopeKeys(t){const n=t.id,o=this.type;return up(`${o}-plugin-${n}`,()=>[[`plugins.${n}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,n){const o=this._scopeCache;let i=o.get(t);return(!i||n)&&(i=new Map,o.set(t,i)),i}getOptionScopes(t,n,o){const{options:i,type:s}=this,a=this._cachedScopes(t,o),l=a.get(n);if(l)return l;const c=new Set;n.forEach(f=>{t&&(c.add(t),f.forEach(h=>df(c,t,h))),f.forEach(h=>df(c,i,h)),f.forEach(h=>df(c,Kl[s]||{},h)),f.forEach(h=>df(c,fo,h)),f.forEach(h=>df(c,Cy,h))});const d=Array.from(c);return d.length===0&&d.push(Object.create(null)),bC.has(n)&&a.set(n,d),d}chartOptionScopes(){const{options:t,type:n}=this;return[t,Kl[n]||{},fo.datasets[n]||{},{type:n},fo,Cy]}resolveNamedOptions(t,n,o,i=[""]){const s={$shared:!0},{resolver:a,subPrefixes:l}=yC(this._resolverCache,t,i);let c=a;if(S9(a,n)){s.$shared=!1,o=Ua(o)?o():o;const d=this.createResolver(t,o,l);c=dd(a,o,d)}for(const d of n)s[d]=c[d];return s}createResolver(t,n,o=[""],i){const{resolver:s}=yC(this._resolverCache,t,o);return an(n)?dd(s,n,void 0,i):s}};function yC(e,t,n){let o=e.get(t);o||(o=new Map,e.set(t,o));const i=n.join();let s=o.get(i);return s||(s={resolver:By(t,n),subPrefixes:n.filter(l=>!l.toLowerCase().includes("hover"))},o.set(i,s)),s}const C9=e=>an(e)&&Object.getOwnPropertyNames(e).some(t=>Ua(e[t]));function S9(e,t){const{isScriptable:n,isIndexable:o}=wE(e);for(const i of t){const s=n(i),a=o(i),l=(a||s)&&e[i];if(s&&(Ua(l)||C9(l))||a&&xo(l))return!0}return!1}var A9="4.5.1";const T9=["top","bottom","left","right","chartArea"];function vC(e,t){return e==="top"||e==="bottom"||T9.indexOf(e)===-1&&t==="x"}function wC(e,t){return function(n,o){return n[e]===o[e]?n[t]-o[t]:n[e]-o[e]}}function kC(e){const t=e.chart,n=t.options.animation;t.notifyPlugins("afterRender"),Wn(n&&n.onComplete,[e],t)}function B9(e){const t=e.chart,n=t.options.animation;Wn(n&&n.onProgress,[e],t)}function _C(e){return Dy()&&typeof e=="string"?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}const fp={},xC=e=>{const t=_C(e);return Object.values(fp).filter(n=>n.canvas===t).pop()};function P9(e,t,n){const o=Object.keys(e);for(const i of o){const s=+i;if(s>=t){const a=e[i];delete e[i],(n>0||s>t)&&(e[s+n]=a)}}}function N9(e,t,n,o){return!n||e.type==="mouseout"?null:o?t:e}class Hy{static defaults=fo;static instances=fp;static overrides=Kl;static registry=ls;static version=A9;static getChart=xC;static register(...t){ls.add(...t),EC()}static unregister(...t){ls.remove(...t),EC()}constructor(t,n){const o=this.config=new E9(n),i=_C(t),s=xC(i);if(s)throw new Error("Canvas is already in use. Chart with ID '"+s.id+"' must be destroyed before the canvas with ID '"+s.canvas.id+"' can be reused.");const a=o.createResolver(o.chartOptionScopes(),this.getContext());this.platform=new(o.platform||Z$(i)),this.platform.updateConfig(o);const l=this.platform.acquireContext(i,a.aspectRatio),c=l&&l.canvas,d=c&&c.height,f=c&&c.width;if(this.id=S8(),this.ctx=l,this.canvas=c,this.width=f,this.height=d,this._options=a,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new h9,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=q8(h=>this.update(h),a.resizeDelay||0),this._dataChanges=[],fp[this.id]=this,!l||!c){console.error("Failed to create chart: can't acquire context from the given item");return}Qs.listen(this,"complete",kC),Qs.listen(this,"progress",B9),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:n},width:o,height:i,_aspectRatio:s}=this;return xn(t)?n&&s?s:i?o/i:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return ls}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():AE(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return bE(this.canvas,this.ctx),this}stop(){return Qs.stop(this),this}resize(t,n){Qs.running(this)?this._resizeBeforeDraw={width:t,height:n}:this._resize(t,n)}_resize(t,n){const o=this.options,i=this.canvas,s=o.maintainAspectRatio&&this.aspectRatio,a=this.platform.getMaximumSize(i,t,n,s),l=o.devicePixelRatio||this.platform.getDevicePixelRatio(),c=this.width?"resize":"attach";this.width=a.width,this.height=a.height,this._aspectRatio=this.aspectRatio,AE(this,l,!0)&&(this.notifyPlugins("resize",{size:a}),Wn(o.onResize,[this,a],this),this.attached&&this._doResize(c)&&this.render())}ensureScalesHaveIDs(){const n=this.options.scales||{};An(n,(o,i)=>{o.id=i})}buildOrUpdateScales(){const t=this.options,n=t.scales,o=this.scales,i=Object.keys(o).reduce((a,l)=>(a[l]=!1,a),{});let s=[];n&&(s=s.concat(Object.keys(n).map(a=>{const l=n[a],c=Wy(a,l),d=c==="r",f=c==="x";return{options:l,dposition:d?"chartArea":f?"bottom":"left",dtype:d?"radialLinear":f?"category":"linear"}}))),An(s,a=>{const l=a.options,c=l.id,d=Wy(c,l),f=Zt(l.type,a.dtype);(l.position===void 0||vC(l.position,d)!==vC(a.dposition))&&(l.position=a.dposition),i[c]=!0;let h=null;if(c in o&&o[c].type===f)h=o[c];else{const p=ls.getScale(f);h=new p({id:c,type:f,ctx:this.ctx,chart:this}),o[h.id]=h}h.init(l,t)}),An(i,(a,l)=>{a||delete o[l]}),An(o,a=>{oi.configure(this,a,a.options),oi.addBox(this,a)})}_updateMetasets(){const t=this._metasets,n=this.data.datasets.length,o=t.length;if(t.sort((i,s)=>i.index-s.index),o>n){for(let i=n;i<o;++i)this._destroyDatasetMeta(i);t.splice(n,o-n)}this._sortedMetasets=t.slice(0).sort(wC("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:n}}=this;t.length>n.length&&delete this._stacks,t.forEach((o,i)=>{n.filter(s=>s===o._dataset).length===0&&this._destroyDatasetMeta(i)})}buildOrUpdateControllers(){const t=[],n=this.data.datasets;let o,i;for(this._removeUnreferencedMetasets(),o=0,i=n.length;o<i;o++){const s=n[o];let a=this.getDatasetMeta(o);const l=s.type||this.config.type;if(a.type&&a.type!==l&&(this._destroyDatasetMeta(o),a=this.getDatasetMeta(o)),a.type=l,a.indexAxis=s.indexAxis||Uy(l,this.options),a.order=s.order||0,a.index=o,a.label=""+s.label,a.visible=this.isDatasetVisible(o),a.controller)a.controller.updateIndex(o),a.controller.linkScales();else{const c=ls.getController(l),{datasetElementType:d,dataElementType:f}=fo.datasets[l];Object.assign(c,{dataElementType:ls.getElement(f),datasetElementType:d&&ls.getElement(d)}),a.controller=new c(this,o),t.push(a.controller)}}return this._updateMetasets(),t}_resetElements(){An(this.data.datasets,(t,n)=>{this.getDatasetMeta(n).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const n=this.config;n.update();const o=this._options=n.createResolver(n.chartOptionScopes(),this.getContext()),i=this._animationsDisabled=!o.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;const s=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let a=0;for(let d=0,f=this.data.datasets.length;d<f;d++){const{controller:h}=this.getDatasetMeta(d),p=!i&&s.indexOf(h)===-1;h.buildOrUpdateElements(p),a=Math.max(+h.getMaxOverflow(),a)}a=this._minPadding=o.layout.autoPadding?a:0,this._updateLayout(a),i||An(s,d=>{d.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(wC("z","_idx"));const{_active:l,_lastEvent:c}=this;c?this._eventHandler(c,!0):l.length&&this._updateHoverStyles(l,l,!0),this.render()}_updateScales(){An(this.scales,t=>{oi.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,n=new Set(Object.keys(this._listeners)),o=new Set(t.events);(!eE(n,o)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,n=this._getUniformDataChanges()||[];for(const{method:o,start:i,count:s}of n){const a=o==="_removeElements"?-s:s;P9(t,i,a)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const n=this.data.datasets.length,o=s=>new Set(t.filter(a=>a[0]===s).map((a,l)=>l+","+a.splice(1).join(","))),i=o(0);for(let s=1;s<n;s++)if(!eE(i,o(s)))return;return Array.from(i).map(s=>s.split(",")).map(s=>({method:s[1],start:+s[2],count:+s[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;oi.update(this,this.width,this.height,t);const n=this.chartArea,o=n.width<=0||n.height<=0;this._layers=[],An(this.boxes,i=>{o&&i.position==="chartArea"||(i.configure&&i.configure(),this._layers.push(...i._layers()))},this),this._layers.forEach((i,s)=>{i._idx=s}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let n=0,o=this.data.datasets.length;n<o;++n)this.getDatasetMeta(n).controller.configure();for(let n=0,o=this.data.datasets.length;n<o;++n)this._updateDataset(n,Ua(t)?t({datasetIndex:n}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,n){const o=this.getDatasetMeta(t),i={meta:o,index:t,mode:n,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",i)!==!1&&(o.controller._update(n),i.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",i))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(Qs.has(this)?this.attached&&!Qs.running(this)&&Qs.start(this):(this.draw(),kC({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:o,height:i}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(o,i)}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const n=this._layers;for(t=0;t<n.length&&n[t].z<=0;++t)n[t].draw(this.chartArea);for(this._drawDatasets();t<n.length;++t)n[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const n=this._sortedMetasets,o=[];let i,s;for(i=0,s=n.length;i<s;++i){const a=n[i];(!t||a.visible)&&o.push(a)}return o}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const t=this.getSortedVisibleDatasetMetas();for(let n=t.length-1;n>=0;--n)this._drawDataset(t[n]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const n=this.ctx,o={meta:t,index:t.index,cancelable:!0},i=LE(this,t);this.notifyPlugins("beforeDatasetDraw",o)!==!1&&(i&&Xm(n,i),t.controller.draw(),i&&Jm(n),o.cancelable=!1,this.notifyPlugins("afterDatasetDraw",o))}isPointInArea(t){return tf(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,n,o,i){const s=T$.modes[n];return typeof s=="function"?s(this,t,o,i):[]}getDatasetMeta(t){const n=this.data.datasets[t],o=this._metasets;let i=o.filter(s=>s&&s._dataset===n).pop();return i||(i={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n&&n.order||0,index:t,_dataset:n,_parsed:[],_sorted:!1},o.push(i)),i}getContext(){return this.$context||(this.$context=Yl(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const n=this.data.datasets[t];if(!n)return!1;const o=this.getDatasetMeta(t);return typeof o.hidden=="boolean"?!o.hidden:!n.hidden}setDatasetVisibility(t,n){const o=this.getDatasetMeta(t);o.hidden=!n}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,n,o){const i=o?"show":"hide",s=this.getDatasetMeta(t),a=s.controller._resolveAnimations(void 0,i);Zu(n)?(s.data[n].hidden=!o,this.update()):(this.setDatasetVisibility(t,o),a.update(s,{visible:o}),this.update(l=>l.datasetIndex===t?i:void 0))}hide(t,n){this._updateVisibility(t,n,!1)}show(t,n){this._updateVisibility(t,n,!0)}_destroyDatasetMeta(t){const n=this._metasets[t];n&&n.controller&&n.controller._destroy(),delete this._metasets[t]}_stop(){let t,n;for(this.stop(),Qs.remove(this),t=0,n=this.data.datasets.length;t<n;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:t,ctx:n}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),bE(t,n),this.platform.releaseContext(n),this.canvas=null,this.ctx=null),delete fp[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const t=this._listeners,n=this.platform,o=(s,a)=>{n.addEventListener(this,s,a),t[s]=a},i=(s,a,l)=>{s.offsetX=a,s.offsetY=l,this._eventHandler(s)};An(this.options.events,s=>o(s,i))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,n=this.platform,o=(c,d)=>{n.addEventListener(this,c,d),t[c]=d},i=(c,d)=>{t[c]&&(n.removeEventListener(this,c,d),delete t[c])},s=(c,d)=>{this.canvas&&this.resize(c,d)};let a;const l=()=>{i("attach",l),this.attached=!0,this.resize(),o("resize",s),o("detach",a)};a=()=>{this.attached=!1,i("resize",s),this._stop(),this._resize(0,0),o("attach",l)},n.isAttached(this.canvas)?l():a()}unbindEvents(){An(this._listeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._listeners={},An(this._responsiveListeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,n,o){const i=o?"set":"remove";let s,a,l,c;for(n==="dataset"&&(s=this.getDatasetMeta(t[0].datasetIndex),s.controller["_"+i+"DatasetHoverStyle"]()),l=0,c=t.length;l<c;++l){a=t[l];const d=a&&this.getDatasetMeta(a.datasetIndex).controller;d&&d[i+"HoverStyle"](a.element,a.datasetIndex,a.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const n=this._active||[],o=t.map(({datasetIndex:s,index:a})=>{const l=this.getDatasetMeta(s);if(!l)throw new Error("No dataset found at index "+s);return{datasetIndex:s,element:l.data[a],index:a}});!Km(o,n)&&(this._active=o,this._lastEvent=null,this._updateHoverStyles(o,n))}notifyPlugins(t,n,o){return this._plugins.notify(this,t,n,o)}isPluginEnabled(t){return this._plugins._cache.filter(n=>n.plugin.id===t).length===1}_updateHoverStyles(t,n,o){const i=this.options.hover,s=(c,d)=>c.filter(f=>!d.some(h=>f.datasetIndex===h.datasetIndex&&f.index===h.index)),a=s(n,t),l=o?t:s(t,n);a.length&&this.updateHoverStyle(a,i.mode,!1),l.length&&i.mode&&this.updateHoverStyle(l,i.mode,!0)}_eventHandler(t,n){const o={event:t,replay:n,cancelable:!0,inChartArea:this.isPointInArea(t)},i=a=>(a.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",o,i)===!1)return;const s=this._handleEvent(t,n,o.inChartArea);return o.cancelable=!1,this.notifyPlugins("afterEvent",o,i),(s||o.changed)&&this.render(),this}_handleEvent(t,n,o){const{_active:i=[],options:s}=this,a=n,l=this._getActiveElements(t,i,o,a),c=D8(t),d=N9(t,this._lastEvent,o,c);o&&(this._lastEvent=null,Wn(s.onHover,[t,l,this],this),c&&Wn(s.onClick,[t,l,this],this));const f=!Km(l,i);return(f||n)&&(this._active=l,this._updateHoverStyles(l,i,n)),this._lastEvent=d,f}_getActiveElements(t,n,o,i){if(t.type==="mouseout")return[];if(!o)return n;const s=this.options.hover;return this.getElementsAtEventForMode(t,s.mode,s,i)}}function EC(){return An(Hy.instances,e=>e._plugins.invalidate())}function D9(e,t,n){const{startAngle:o,x:i,y:s,outerRadius:a,innerRadius:l,options:c}=t,{borderWidth:d,borderJoinStyle:f}=c,h=Math.min(d/a,Fr(o-n));if(e.beginPath(),e.arc(i,s,a-d/2,o+h/2,n-h/2),l>0){const p=Math.min(d/l,Fr(o-n));e.arc(i,s,l+d/2,n-p/2,o+p/2,!0)}else{const p=Math.min(d/2,a*Fr(o-n));if(f==="round")e.arc(i,s,p,n-Tn/2,o+Tn/2,!0);else if(f==="bevel"){const g=2*p*p,y=-g*Math.cos(n+Tn/2)+i,b=-g*Math.sin(n+Tn/2)+s,_=g*Math.cos(o+Tn/2)+i,x=g*Math.sin(o+Tn/2)+s;e.lineTo(y,b),e.lineTo(_,x)}}e.closePath(),e.moveTo(0,0),e.rect(0,0,e.canvas.width,e.canvas.height),e.clip("evenodd")}function M9(e,t,n){const{startAngle:o,pixelMargin:i,x:s,y:a,outerRadius:l,innerRadius:c}=t;let d=i/l;e.beginPath(),e.arc(s,a,l,o-d,n+d),c>i?(d=i/c,e.arc(s,a,c,n+d,o-d,!0)):e.arc(s,a,i,n+Do,o-Do),e.closePath(),e.clip()}function R9(e){return Ty(e,["outerStart","outerEnd","innerStart","innerEnd"])}function I9(e,t,n,o){const i=R9(e.options.borderRadius),s=(n-t)/2,a=Math.min(s,o*t/2),l=c=>{const d=(n-Math.min(s,c))*o/2;return Xo(c,0,Math.min(s,d))};return{outerStart:l(i.outerStart),outerEnd:l(i.outerEnd),innerStart:Xo(i.innerStart,0,a),innerEnd:Xo(i.innerEnd,0,a)}}function md(e,t,n,o){return{x:n+e*Math.cos(t),y:o+e*Math.sin(t)}}function hp(e,t,n,o,i,s){const{x:a,y:l,startAngle:c,pixelMargin:d,innerRadius:f}=t,h=Math.max(t.outerRadius+o+n-d,0),p=f>0?f+o+n+d:0;let g=0;const y=i-c;if(o){const re=f>0?f-o:0,ie=h>0?h-o:0,le=(re+ie)/2,X=le!==0?y*le/(le+o):y;g=(y-X)/2}const b=Math.max(.001,y*h-n/Tn)/h,_=(y-b)/2,x=c+_+g,B=i-_-g,{outerStart:R,outerEnd:S,innerStart:O,innerEnd:I}=I9(t,p,h,B-x),D=h-R,w=h-S,E=x+R/D,F=B-S/w,A=p+O,P=p+I,q=x+O/A,Q=B-I/P;if(e.beginPath(),s){const re=(E+F)/2;if(e.arc(a,l,h,E,re),e.arc(a,l,h,re,F),S>0){const K=md(w,F,a,l);e.arc(K.x,K.y,S,F,B+Do)}const ie=md(P,B,a,l);if(e.lineTo(ie.x,ie.y),I>0){const K=md(P,Q,a,l);e.arc(K.x,K.y,I,B+Do,Q+Math.PI)}const le=(B-I/p+(x+O/p))/2;if(e.arc(a,l,p,B-I/p,le,!0),e.arc(a,l,p,le,x+O/p,!0),O>0){const K=md(A,q,a,l);e.arc(K.x,K.y,O,q+Math.PI,x-Do)}const X=md(D,x,a,l);if(e.lineTo(X.x,X.y),R>0){const K=md(D,E,a,l);e.arc(K.x,K.y,R,x-Do,E)}}else{e.moveTo(a,l);const re=Math.cos(E)*h+a,ie=Math.sin(E)*h+l;e.lineTo(re,ie);const le=Math.cos(F)*h+a,X=Math.sin(F)*h+l;e.lineTo(le,X)}e.closePath()}function O9(e,t,n,o,i){const{fullCircles:s,startAngle:a,circumference:l}=t;let c=t.endAngle;if(s){hp(e,t,n,o,c,i);for(let d=0;d<s;++d)e.fill();isNaN(l)||(c=a+(l%Vn||Vn))}return hp(e,t,n,o,c,i),e.fill(),c}function L9(e,t,n,o,i){const{fullCircles:s,startAngle:a,circumference:l,options:c}=t,{borderWidth:d,borderJoinStyle:f,borderDash:h,borderDashOffset:p,borderRadius:g}=c,y=c.borderAlign==="inner";if(!d)return;e.setLineDash(h||[]),e.lineDashOffset=p,y?(e.lineWidth=d*2,e.lineJoin=f||"round"):(e.lineWidth=d,e.lineJoin=f||"bevel");let b=t.endAngle;if(s){hp(e,t,n,o,b,i);for(let _=0;_<s;++_)e.stroke();isNaN(l)||(b=a+(l%Vn||Vn))}y&&M9(e,t,b),c.selfJoin&&b-a>=Tn&&g===0&&f!=="miter"&&D9(e,t,b),s||(hp(e,t,n,o,b,i),e.stroke())}class F9 extends Vs{static id="arc";static defaults={borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0,selfJoin:!1};static defaultRoutes={backgroundColor:"backgroundColor"};static descriptors={_scriptable:!0,_indexable:t=>t!=="borderDash"};circumference;endAngle;fullCircles;innerRadius;outerRadius;pixelMargin;startAngle;constructor(t){super(),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,t&&Object.assign(this,t)}inRange(t,n,o){const i=this.getProps(["x","y"],o),{angle:s,distance:a}=iE(i,{x:t,y:n}),{startAngle:l,endAngle:c,innerRadius:d,outerRadius:f,circumference:h}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],o),p=(this.options.spacing+this.options.borderWidth)/2,g=Zt(h,c-l),y=Qu(s,l,c)&&l!==c,b=g>=Vn||y,_=Js(a,d+p,f+p);return b&&_}getCenterPoint(t){const{x:n,y:o,startAngle:i,endAngle:s,innerRadius:a,outerRadius:l}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],t),{offset:c,spacing:d}=this.options,f=(i+s)/2,h=(a+l+d+c)/2;return{x:n+Math.cos(f)*h,y:o+Math.sin(f)*h}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){const{options:n,circumference:o}=this,i=(n.offset||0)/4,s=(n.spacing||0)/2,a=n.circular;if(this.pixelMargin=n.borderAlign==="inner"?.33:0,this.fullCircles=o>Vn?Math.floor(o/Vn):0,o===0||this.innerRadius<0||this.outerRadius<0)return;t.save();const l=(this.startAngle+this.endAngle)/2;t.translate(Math.cos(l)*i,Math.sin(l)*i);const c=1-Math.sin(Math.min(Tn,o||0)),d=i*c;t.fillStyle=n.backgroundColor,t.strokeStyle=n.borderColor,O9(t,this,d,s,a),L9(t,this,d,s,a),t.restore()}}function CC(e,t,n=t){e.lineCap=Zt(n.borderCapStyle,t.borderCapStyle),e.setLineDash(Zt(n.borderDash,t.borderDash)),e.lineDashOffset=Zt(n.borderDashOffset,t.borderDashOffset),e.lineJoin=Zt(n.borderJoinStyle,t.borderJoinStyle),e.lineWidth=Zt(n.borderWidth,t.borderWidth),e.strokeStyle=Zt(n.borderColor,t.borderColor)}function $9(e,t,n){e.lineTo(n.x,n.y)}function z9(e){return e.stepped?i7:e.tension||e.cubicInterpolationMode==="monotone"?s7:$9}function SC(e,t,n={}){const o=e.length,{start:i=0,end:s=o-1}=n,{start:a,end:l}=t,c=Math.max(i,a),d=Math.min(s,l),f=i<a&&s<a||i>l&&s>l;return{count:o,start:c,loop:t.loop,ilen:d<c&&!f?o+d-c:d-c}}function j9(e,t,n,o){const{points:i,options:s}=t,{count:a,start:l,loop:c,ilen:d}=SC(i,n,o),f=z9(s);let{move:h=!0,reverse:p}=o||{},g,y,b;for(g=0;g<=d;++g)y=i[(l+(p?d-g:g))%a],!y.skip&&(h?(e.moveTo(y.x,y.y),h=!1):f(e,b,y,p,s.stepped),b=y);return c&&(y=i[(l+(p?d:0))%a],f(e,b,y,p,s.stepped)),!!c}function U9(e,t,n,o){const i=t.points,{count:s,start:a,ilen:l}=SC(i,n,o),{move:c=!0,reverse:d}=o||{};let f=0,h=0,p,g,y,b,_,x;const B=S=>(a+(d?l-S:S))%s,R=()=>{b!==_&&(e.lineTo(f,_),e.lineTo(f,b),e.lineTo(f,x))};for(c&&(g=i[B(0)],e.moveTo(g.x,g.y)),p=0;p<=l;++p){if(g=i[B(p)],g.skip)continue;const S=g.x,O=g.y,I=S|0;I===y?(O<b?b=O:O>_&&(_=O),f=(h*f+S)/++h):(R(),e.lineTo(S,O),y=I,h=0,b=_=O),x=O}R()}function qy(e){const t=e.options,n=t.borderDash&&t.borderDash.length;return!e._decimated&&!e._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!n?U9:j9}function W9(e){return e.stepped?F7:e.tension||e.cubicInterpolationMode==="monotone"?$7:Jl}function H9(e,t,n,o){let i=t._path;i||(i=t._path=new Path2D,t.path(i,n,o)&&i.closePath()),CC(e,t.options),e.stroke(i)}function q9(e,t,n,o){const{segments:i,options:s}=t,a=qy(t);for(const l of i)CC(e,s,l.style),e.beginPath(),a(e,t,l,{start:n,end:n+o-1})&&e.closePath(),e.stroke()}const K9=typeof Path2D=="function";function G9(e,t,n,o){K9&&!t.options.segment?H9(e,t,n,o):q9(e,t,n,o)}class mp extends Vs{static id="line";static defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};static descriptors={_scriptable:!0,_indexable:t=>t!=="borderDash"&&t!=="fill"};constructor(t){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,t&&Object.assign(this,t)}updateControlPoints(t,n){const o=this.options;if((o.tension||o.cubicInterpolationMode==="monotone")&&!o.stepped&&!this._pointsUpdated){const i=o.spanGaps?this._loop:this._fullLoop;P7(this._points,o,t,i,n),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=q7(this,this.options.segment))}first(){const t=this.segments,n=this.points;return t.length&&n[t[0].start]}last(){const t=this.segments,n=this.points,o=t.length;return o&&n[t[o-1].end]}interpolate(t,n){const o=this.options,i=t[n],s=this.points,a=RE(this,{property:n,start:i,end:i});if(!a.length)return;const l=[],c=W9(o);let d,f;for(d=0,f=a.length;d<f;++d){const{start:h,end:p}=a[d],g=s[h],y=s[p];if(g===y){l.push(g);continue}const b=Math.abs((i-g[n])/(y[n]-g[n])),_=c(g,y,b,o.stepped);_[n]=t[n],l.push(_)}return l.length===1?l[0]:l}pathSegment(t,n,o){return qy(this)(t,this,n,o)}path(t,n,o){const i=this.segments,s=qy(this);let a=this._loop;n=n||0,o=o||this.points.length-n;for(const l of i)a&=s(t,this,l,{start:n,end:n+o-1});return!!a}draw(t,n,o,i){const s=this.options||{};(this.points||[]).length&&s.borderWidth&&(t.save(),G9(t,this,o,i),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}function AC(e,t,n,o){const i=e.options,{[n]:s}=e.getProps([n],o);return Math.abs(t-s)<i.radius+i.hitRadius}class Y9 extends Vs{static id="point";parsed;skip;stop;static defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(t){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,t&&Object.assign(this,t)}inRange(t,n,o){const i=this.options,{x:s,y:a}=this.getProps(["x","y"],o);return Math.pow(t-s,2)+Math.pow(n-a,2)<Math.pow(i.hitRadius+i.radius,2)}inXRange(t,n){return AC(this,t,"x",n)}inYRange(t,n){return AC(this,t,"y",n)}getCenterPoint(t){const{x:n,y:o}=this.getProps(["x","y"],t);return{x:n,y:o}}size(t){t=t||this.options||{};let n=t.radius||0;n=Math.max(n,n&&t.hoverRadius||0);const o=n&&t.borderWidth||0;return(n+o)*2}draw(t,n){const o=this.options;this.skip||o.radius<.1||!tf(this,n,this.size(o)/2)||(t.strokeStyle=o.borderColor,t.lineWidth=o.borderWidth,t.fillStyle=o.backgroundColor,Ay(t,o,this.x,this.y))}getRange(){const t=this.options||{};return t.radius+t.hitRadius}}function TC(e,t){const{x:n,y:o,base:i,width:s,height:a}=e.getProps(["x","y","base","width","height"],t);let l,c,d,f,h;return e.horizontal?(h=a/2,l=Math.min(n,i),c=Math.max(n,i),d=o-h,f=o+h):(h=s/2,l=n-h,c=n+h,d=Math.min(o,i),f=Math.max(o,i)),{left:l,top:d,right:c,bottom:f}}function Ha(e,t,n,o){return e?0:Xo(t,n,o)}function Z9(e,t,n){const o=e.options.borderWidth,i=e.borderSkipped,s=vE(o);return{t:Ha(i.top,s.top,0,n),r:Ha(i.right,s.right,0,t),b:Ha(i.bottom,s.bottom,0,n),l:Ha(i.left,s.left,0,t)}}function X9(e,t,n){const{enableBorderRadius:o}=e.getProps(["enableBorderRadius"]),i=e.options.borderRadius,s=cd(i),a=Math.min(t,n),l=e.borderSkipped,c=o||an(i);return{topLeft:Ha(!c||l.top||l.left,s.topLeft,0,a),topRight:Ha(!c||l.top||l.right,s.topRight,0,a),bottomLeft:Ha(!c||l.bottom||l.left,s.bottomLeft,0,a),bottomRight:Ha(!c||l.bottom||l.right,s.bottomRight,0,a)}}function J9(e){const t=TC(e),n=t.right-t.left,o=t.bottom-t.top,i=Z9(e,n/2,o/2),s=X9(e,n/2,o/2);return{outer:{x:t.left,y:t.top,w:n,h:o,radius:s},inner:{x:t.left+i.l,y:t.top+i.t,w:n-i.l-i.r,h:o-i.t-i.b,radius:{topLeft:Math.max(0,s.topLeft-Math.max(i.t,i.l)),topRight:Math.max(0,s.topRight-Math.max(i.t,i.r)),bottomLeft:Math.max(0,s.bottomLeft-Math.max(i.b,i.l)),bottomRight:Math.max(0,s.bottomRight-Math.max(i.b,i.r))}}}}function Ky(e,t,n,o){const i=t===null,s=n===null,l=e&&!(i&&s)&&TC(e,o);return l&&(i||Js(t,l.left,l.right))&&(s||Js(n,l.top,l.bottom))}function Q9(e){return e.topLeft||e.topRight||e.bottomLeft||e.bottomRight}function V9(e,t){e.rect(t.x,t.y,t.w,t.h)}function Gy(e,t,n={}){const o=e.x!==n.x?-t:0,i=e.y!==n.y?-t:0,s=(e.x+e.w!==n.x+n.w?t:0)-o,a=(e.y+e.h!==n.y+n.h?t:0)-i;return{x:e.x+o,y:e.y+i,w:e.w+s,h:e.h+a,radius:e.radius}}class ez extends Vs{static id="bar";static defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,t&&Object.assign(this,t)}draw(t){const{inflateAmount:n,options:{borderColor:o,backgroundColor:i}}=this,{inner:s,outer:a}=J9(this),l=Q9(a.radius)?Qm:V9;t.save(),(a.w!==s.w||a.h!==s.h)&&(t.beginPath(),l(t,Gy(a,n,s)),t.clip(),l(t,Gy(s,-n,a)),t.fillStyle=o,t.fill("evenodd")),t.beginPath(),l(t,Gy(s,n)),t.fillStyle=i,t.fill(),t.restore()}inRange(t,n,o){return Ky(this,t,n,o)}inXRange(t,n){return Ky(this,t,null,n)}inYRange(t,n){return Ky(this,null,t,n)}getCenterPoint(t){const{x:n,y:o,base:i,horizontal:s}=this.getProps(["x","y","base","horizontal"],t);return{x:s?(n+i)/2:n,y:s?o:(o+i)/2}}getRange(t){return t==="x"?this.width/2:this.height/2}}function tz(e,t,n){const o=e.segments,i=e.points,s=t.points,a=[];for(const l of o){let{start:c,end:d}=l;d=pp(c,d,i);const f=Yy(n,i[c],i[d],l.loop);if(!t.segments){a.push({source:l,target:f,start:i[c],end:i[d]});continue}const h=RE(t,f);for(const p of h){const g=Yy(n,s[p.start],s[p.end],p.loop),y=ME(l,i,g);for(const b of y)a.push({source:b,target:p,start:{[n]:BC(f,g,"start",Math.max)},end:{[n]:BC(f,g,"end",Math.min)}})}}return a}function Yy(e,t,n,o){if(o)return;let i=t[e],s=n[e];return e==="angle"&&(i=Fr(i),s=Fr(s)),{property:e,start:i,end:s}}function nz(e,t){const{x:n=null,y:o=null}=e||{},i=t.points,s=[];return t.segments.forEach(({start:a,end:l})=>{l=pp(a,l,i);const c=i[a],d=i[l];o!==null?(s.push({x:c.x,y:o}),s.push({x:d.x,y:o})):n!==null&&(s.push({x:n,y:c.y}),s.push({x:n,y:d.y}))}),s}function pp(e,t,n){for(;t>e;t--){const o=n[t];if(!isNaN(o.x)&&!isNaN(o.y))break}return t}function BC(e,t,n,o){return e&&t?o(e[n],t[n]):e?e[n]:t?t[n]:0}function PC(e,t){let n=[],o=!1;return xo(e)?(o=!0,n=e):n=nz(e,t),n.length?new mp({points:n,options:{tension:0},_loop:o,_fullLoop:o}):null}function NC(e){return e&&e.fill!==!1}function oz(e,t,n){let i=e[t].fill;const s=[t];let a;if(!n)return i;for(;i!==!1&&s.indexOf(i)===-1;){if(!Zo(i))return i;if(a=e[i],!a)return!1;if(a.visible)return i;s.push(i),i=a.fill}return!1}function rz(e,t,n){const o=lz(e);if(an(o))return isNaN(o.value)?!1:o;let i=parseFloat(o);return Zo(i)&&Math.floor(i)===i?iz(o[0],t,i,n):["origin","start","end","stack","shape"].indexOf(o)>=0&&o}function iz(e,t,n,o){return(e==="-"||e==="+")&&(n=t+n),n===t||n<0||n>=o?!1:n}function sz(e,t){let n=null;return e==="start"?n=t.bottom:e==="end"?n=t.top:an(e)?n=t.getPixelForValue(e.value):t.getBasePixel&&(n=t.getBasePixel()),n}function az(e,t,n){let o;return e==="start"?o=n:e==="end"?o=t.options.reverse?t.min:t.max:an(e)?o=e.value:o=t.getBaseValue(),o}function lz(e){const t=e.options,n=t.fill;let o=Zt(n&&n.target,n);return o===void 0&&(o=!!t.backgroundColor),o===!1||o===null?!1:o===!0?"origin":o}function cz(e){const{scale:t,index:n,line:o}=e,i=[],s=o.segments,a=o.points,l=dz(t,n);l.push(PC({x:null,y:t.bottom},o));for(let c=0;c<s.length;c++){const d=s[c];for(let f=d.start;f<=d.end;f++)uz(i,a[f],l)}return new mp({points:i,options:{}})}function dz(e,t){const n=[],o=e.getMatchingVisibleMetas("line");for(let i=0;i<o.length;i++){const s=o[i];if(s.index===t)break;s.hidden||n.unshift(s.dataset)}return n}function uz(e,t,n){const o=[];for(let i=0;i<n.length;i++){const s=n[i],{first:a,last:l,point:c}=fz(s,t,"x");if(!(!c||a&&l)){if(a)o.unshift(c);else if(e.push(c),!l)break}}e.push(...o)}function fz(e,t,n){const o=e.interpolate(t,n);if(!o)return{};const i=o[n],s=e.segments,a=e.points;let l=!1,c=!1;for(let d=0;d<s.length;d++){const f=s[d],h=a[f.start][n],p=a[f.end][n];if(Js(i,h,p)){l=i===h,c=i===p;break}}return{first:l,last:c,point:o}}class DC{constructor(t){this.x=t.x,this.y=t.y,this.radius=t.radius}pathSegment(t,n,o){const{x:i,y:s,radius:a}=this;return n=n||{start:0,end:Vn},t.arc(i,s,a,n.end,n.start,!0),!o.bounds}interpolate(t){const{x:n,y:o,radius:i}=this,s=t.angle;return{x:n+Math.cos(s)*i,y:o+Math.sin(s)*i,angle:s}}}function hz(e){const{chart:t,fill:n,line:o}=e;if(Zo(n))return mz(t,n);if(n==="stack")return cz(e);if(n==="shape")return!0;const i=pz(e);return i instanceof DC?i:PC(i,o)}function mz(e,t){const n=e.getDatasetMeta(t);return n&&e.isDatasetVisible(t)?n.dataset:null}function pz(e){return(e.scale||{}).getPointPositionForValue?bz(e):gz(e)}function gz(e){const{scale:t={},fill:n}=e,o=sz(n,t);if(Zo(o)){const i=t.isHorizontal();return{x:i?o:null,y:i?null:o}}return null}function bz(e){const{scale:t,fill:n}=e,o=t.options,i=t.getLabels().length,s=o.reverse?t.max:t.min,a=az(n,t,s),l=[];if(o.grid.circular){const c=t.getPointPositionForValue(0,s);return new DC({x:c.x,y:c.y,radius:t.getDistanceFromCenterForValue(a)})}for(let c=0;c<i;++c)l.push(t.getPointPositionForValue(c,a));return l}function Zy(e,t,n){const o=hz(t),{chart:i,index:s,line:a,scale:l,axis:c}=t,d=a.options,f=d.fill,h=d.backgroundColor,{above:p=h,below:g=h}=f||{},y=i.getDatasetMeta(s),b=LE(i,y);o&&a.points.length&&(Xm(e,n),yz(e,{line:a,target:o,above:p,below:g,area:n,scale:l,axis:c,clip:b}),Jm(e))}function yz(e,t){const{line:n,target:o,above:i,below:s,area:a,scale:l,clip:c}=t,d=n._loop?"angle":t.axis;e.save();let f=s;s!==i&&(d==="x"?(MC(e,o,a.top),Xy(e,{line:n,target:o,color:i,scale:l,property:d,clip:c}),e.restore(),e.save(),MC(e,o,a.bottom)):d==="y"&&(RC(e,o,a.left),Xy(e,{line:n,target:o,color:s,scale:l,property:d,clip:c}),e.restore(),e.save(),RC(e,o,a.right),f=i)),Xy(e,{line:n,target:o,color:f,scale:l,property:d,clip:c}),e.restore()}function MC(e,t,n){const{segments:o,points:i}=t;let s=!0,a=!1;e.beginPath();for(const l of o){const{start:c,end:d}=l,f=i[c],h=i[pp(c,d,i)];s?(e.moveTo(f.x,f.y),s=!1):(e.lineTo(f.x,n),e.lineTo(f.x,f.y)),a=!!t.pathSegment(e,l,{move:a}),a?e.closePath():e.lineTo(h.x,n)}e.lineTo(t.first().x,n),e.closePath(),e.clip()}function RC(e,t,n){const{segments:o,points:i}=t;let s=!0,a=!1;e.beginPath();for(const l of o){const{start:c,end:d}=l,f=i[c],h=i[pp(c,d,i)];s?(e.moveTo(f.x,f.y),s=!1):(e.lineTo(n,f.y),e.lineTo(f.x,f.y)),a=!!t.pathSegment(e,l,{move:a}),a?e.closePath():e.lineTo(n,h.y)}e.lineTo(n,t.first().y),e.closePath(),e.clip()}function Xy(e,t){const{line:n,target:o,property:i,color:s,scale:a,clip:l}=t,c=tz(n,o,i);for(const{source:d,target:f,start:h,end:p}of c){const{style:{backgroundColor:g=s}={}}=d,y=o!==!0;e.save(),e.fillStyle=g,vz(e,a,l,y&&Yy(i,h,p)),e.beginPath();const b=!!n.pathSegment(e,d);let _;if(y){b?e.closePath():IC(e,o,p,i);const x=!!o.pathSegment(e,f,{move:b,reverse:!0});_=b&&x,_||IC(e,o,h,i)}e.closePath(),e.fill(_?"evenodd":"nonzero"),e.restore()}}function vz(e,t,n,o){const i=t.chart.chartArea,{property:s,start:a,end:l}=o||{};if(s==="x"||s==="y"){let c,d,f,h;s==="x"?(c=a,d=i.top,f=l,h=i.bottom):(c=i.left,d=a,f=i.right,h=l),e.beginPath(),n&&(c=Math.max(c,n.left),f=Math.min(f,n.right),d=Math.max(d,n.top),h=Math.min(h,n.bottom)),e.rect(c,d,f-c,h-d),e.clip()}}function IC(e,t,n,o){const i=t.interpolate(n,o);i&&e.lineTo(i.x,i.y)}var wz={id:"filler",afterDatasetsUpdate(e,t,n){const o=(e.data.datasets||[]).length,i=[];let s,a,l,c;for(a=0;a<o;++a)s=e.getDatasetMeta(a),l=s.dataset,c=null,l&&l.options&&l instanceof mp&&(c={visible:e.isDatasetVisible(a),index:a,fill:rz(l,a,o),chart:e,axis:s.controller.options.indexAxis,scale:s.vScale,line:l}),s.$filler=c,i.push(c);for(a=0;a<o;++a)c=i[a],!(!c||c.fill===!1)&&(c.fill=oz(i,a,n.propagate))},beforeDraw(e,t,n){const o=n.drawTime==="beforeDraw",i=e.getSortedVisibleDatasetMetas(),s=e.chartArea;for(let a=i.length-1;a>=0;--a){const l=i[a].$filler;l&&(l.line.updateControlPoints(s,l.axis),o&&l.fill&&Zy(e.ctx,l,s))}},beforeDatasetsDraw(e,t,n){if(n.drawTime!=="beforeDatasetsDraw")return;const o=e.getSortedVisibleDatasetMetas();for(let i=o.length-1;i>=0;--i){const s=o[i].$filler;NC(s)&&Zy(e.ctx,s,e.chartArea)}},beforeDatasetDraw(e,t,n){const o=t.meta.$filler;!NC(o)||n.drawTime!=="beforeDatasetDraw"||Zy(e.ctx,o,e.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const OC=(e,t)=>{let{boxHeight:n=t,boxWidth:o=t}=e;return e.usePointStyle&&(n=Math.min(n,t),o=e.pointStyleWidth||Math.min(o,t)),{boxWidth:o,boxHeight:n,itemHeight:Math.max(t,n)}},kz=(e,t)=>e!==null&&t!==null&&e.datasetIndex===t.datasetIndex&&e.index===t.index;class LC extends Vs{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,n,o){this.maxWidth=t,this.maxHeight=n,this._margins=o,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const t=this.options.labels||{};let n=Wn(t.generateLabels,[this.chart],this)||[];t.filter&&(n=n.filter(o=>t.filter(o,this.chart.data))),t.sort&&(n=n.sort((o,i)=>t.sort(o,i,this.chart.data))),this.options.reverse&&n.reverse(),this.legendItems=n}fit(){const{options:t,ctx:n}=this;if(!t.display){this.width=this.height=0;return}const o=t.labels,i=Qo(o.font),s=i.size,a=this._computeTitleHeight(),{boxWidth:l,itemHeight:c}=OC(o,s);let d,f;n.font=i.string,this.isHorizontal()?(d=this.maxWidth,f=this._fitRows(a,s,l,c)+10):(f=this.maxHeight,d=this._fitCols(a,i,l,c)+10),this.width=Math.min(d,t.maxWidth||this.maxWidth),this.height=Math.min(f,t.maxHeight||this.maxHeight)}_fitRows(t,n,o,i){const{ctx:s,maxWidth:a,options:{labels:{padding:l}}}=this,c=this.legendHitBoxes=[],d=this.lineWidths=[0],f=i+l;let h=t;s.textAlign="left",s.textBaseline="middle";let p=-1,g=-f;return this.legendItems.forEach((y,b)=>{const _=o+n/2+s.measureText(y.text).width;(b===0||d[d.length-1]+_+2*l>a)&&(h+=f,d[d.length-(b>0?0:1)]=0,g+=f,p++),c[b]={left:0,top:g,row:p,width:_,height:i},d[d.length-1]+=_+l}),h}_fitCols(t,n,o,i){const{ctx:s,maxHeight:a,options:{labels:{padding:l}}}=this,c=this.legendHitBoxes=[],d=this.columnSizes=[],f=a-t;let h=l,p=0,g=0,y=0,b=0;return this.legendItems.forEach((_,x)=>{const{itemWidth:B,itemHeight:R}=_z(o,n,s,_,i);x>0&&g+R+2*l>f&&(h+=p+l,d.push({width:p,height:g}),y+=p+l,b++,p=g=0),c[x]={left:y,top:g,col:b,width:B,height:R},p=Math.max(p,B),g+=R+l}),h+=p,d.push({width:p,height:g}),h}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:n,options:{align:o,labels:{padding:i},rtl:s}}=this,a=fd(s,this.left,this.width);if(this.isHorizontal()){let l=0,c=Jo(o,this.left+i,this.right-this.lineWidths[l]);for(const d of n)l!==d.row&&(l=d.row,c=Jo(o,this.left+i,this.right-this.lineWidths[l])),d.top+=this.top+t+i,d.left=a.leftForLtr(a.x(c),d.width),c+=d.width+i}else{let l=0,c=Jo(o,this.top+t+i,this.bottom-this.columnSizes[l].height);for(const d of n)d.col!==l&&(l=d.col,c=Jo(o,this.top+t+i,this.bottom-this.columnSizes[l].height)),d.top=c,d.left+=this.left+i,d.left=a.leftForLtr(a.x(d.left),d.width),c+=d.height+i}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const t=this.ctx;Xm(t,this),this._draw(),Jm(t)}}_draw(){const{options:t,columnSizes:n,lineWidths:o,ctx:i}=this,{align:s,labels:a}=t,l=fo.color,c=fd(t.rtl,this.left,this.width),d=Qo(a.font),{padding:f}=a,h=d.size,p=h/2;let g;this.drawTitle(),i.textAlign=c.textAlign("left"),i.textBaseline="middle",i.lineWidth=.5,i.font=d.string;const{boxWidth:y,boxHeight:b,itemHeight:_}=OC(a,h),x=function(I,D,w){if(isNaN(y)||y<=0||isNaN(b)||b<0)return;i.save();const E=Zt(w.lineWidth,1);if(i.fillStyle=Zt(w.fillStyle,l),i.lineCap=Zt(w.lineCap,"butt"),i.lineDashOffset=Zt(w.lineDashOffset,0),i.lineJoin=Zt(w.lineJoin,"miter"),i.lineWidth=E,i.strokeStyle=Zt(w.strokeStyle,l),i.setLineDash(Zt(w.lineDash,[])),a.usePointStyle){const F={radius:b*Math.SQRT2/2,pointStyle:w.pointStyle,rotation:w.rotation,borderWidth:E},A=c.xPlus(I,y/2),P=D+p;yE(i,F,A,P,a.pointStyleWidth&&y)}else{const F=D+Math.max((h-b)/2,0),A=c.leftForLtr(I,y),P=cd(w.borderRadius);i.beginPath(),Object.values(P).some(q=>q!==0)?Qm(i,{x:A,y:F,w:y,h:b,radius:P}):i.rect(A,F,y,b),i.fill(),E!==0&&i.stroke()}i.restore()},B=function(I,D,w){nf(i,w.text,I,D+_/2,d,{strikethrough:w.hidden,textAlign:c.textAlign(w.textAlign)})},R=this.isHorizontal(),S=this._computeTitleHeight();R?g={x:Jo(s,this.left+f,this.right-o[0]),y:this.top+f+S,line:0}:g={x:this.left+f,y:Jo(s,this.top+S+f,this.bottom-n[0].height),line:0},BE(this.ctx,t.textDirection);const O=_+f;this.legendItems.forEach((I,D)=>{i.strokeStyle=I.fontColor,i.fillStyle=I.fontColor;const w=i.measureText(I.text).width,E=c.textAlign(I.textAlign||(I.textAlign=a.textAlign)),F=y+p+w;let A=g.x,P=g.y;c.setWidth(this.width),R?D>0&&A+F+f>this.right&&(P=g.y+=O,g.line++,A=g.x=Jo(s,this.left+f,this.right-o[g.line])):D>0&&P+O>this.bottom&&(A=g.x=A+n[g.line].width+f,g.line++,P=g.y=Jo(s,this.top+S+f,this.bottom-n[g.line].height));const q=c.x(A);if(x(q,P,I),A=K8(E,A+y+p,R?A+F:this.right,t.rtl),B(c.x(A),P,I),R)g.x+=F+f;else if(typeof I.text!="string"){const Q=d.lineHeight;g.y+=FC(I,Q)+f}else g.y+=O}),PE(this.ctx,t.textDirection)}drawTitle(){const t=this.options,n=t.title,o=Qo(n.font),i=ni(n.padding);if(!n.display)return;const s=fd(t.rtl,this.left,this.width),a=this.ctx,l=n.position,c=o.size/2,d=i.top+c;let f,h=this.left,p=this.width;if(this.isHorizontal())p=Math.max(...this.lineWidths),f=this.top+d,h=Jo(t.align,h,this.right-p);else{const y=this.columnSizes.reduce((b,_)=>Math.max(b,_.height),0);f=d+Jo(t.align,this.top,this.bottom-y-t.labels.padding-this._computeTitleHeight())}const g=Jo(l,h,h+p);a.textAlign=s.textAlign(ky(l)),a.textBaseline="middle",a.strokeStyle=n.color,a.fillStyle=n.color,a.font=o.string,nf(a,n.text,g,f,o)}_computeTitleHeight(){const t=this.options.title,n=Qo(t.font),o=ni(t.padding);return t.display?n.lineHeight+o.height:0}_getLegendItemAt(t,n){let o,i,s;if(Js(t,this.left,this.right)&&Js(n,this.top,this.bottom)){for(s=this.legendHitBoxes,o=0;o<s.length;++o)if(i=s[o],Js(t,i.left,i.left+i.width)&&Js(n,i.top,i.top+i.height))return this.legendItems[o]}return null}handleEvent(t){const n=this.options;if(!Cz(t.type,n))return;const o=this._getLegendItemAt(t.x,t.y);if(t.type==="mousemove"||t.type==="mouseout"){const i=this._hoveredItem,s=kz(i,o);i&&!s&&Wn(n.onLeave,[t,i,this],this),this._hoveredItem=o,o&&!s&&Wn(n.onHover,[t,o,this],this)}else o&&Wn(n.onClick,[t,o,this],this)}}function _z(e,t,n,o,i){const s=xz(o,e,t,n),a=Ez(i,o,t.lineHeight);return{itemWidth:s,itemHeight:a}}function xz(e,t,n,o){let i=e.text;return i&&typeof i!="string"&&(i=i.reduce((s,a)=>s.length>a.length?s:a)),t+n.size/2+o.measureText(i).width}function Ez(e,t,n){let o=e;return typeof t.text!="string"&&(o=FC(t,n)),o}function FC(e,t){const n=e.text?e.text.length:0;return t*n}function Cz(e,t){return!!((e==="mousemove"||e==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(e==="click"||e==="mouseup"))}var Sz={id:"legend",_element:LC,start(e,t,n){const o=e.legend=new LC({ctx:e.ctx,options:n,chart:e});oi.configure(e,o,n),oi.addBox(e,o)},stop(e){oi.removeBox(e,e.legend),delete e.legend},beforeUpdate(e,t,n){const o=e.legend;oi.configure(e,o,n),o.options=n},afterUpdate(e){const t=e.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(e,t){t.replay||e.legend.handleEvent(t.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(e,t,n){const o=t.datasetIndex,i=n.chart;i.isDatasetVisible(o)?(i.hide(o),t.hidden=!0):(i.show(o),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:e=>e.chart.options.color,boxWidth:40,padding:10,generateLabels(e){const t=e.data.datasets,{labels:{usePointStyle:n,pointStyle:o,textAlign:i,color:s,useBorderRadius:a,borderRadius:l}}=e.legend.options;return e._getSortedDatasetMetas().map(c=>{const d=c.controller.getStyle(n?0:void 0),f=ni(d.borderWidth);return{text:t[c.index].label,fillStyle:d.backgroundColor,fontColor:s,hidden:!c.visible,lineCap:d.borderCapStyle,lineDash:d.borderDash,lineDashOffset:d.borderDashOffset,lineJoin:d.borderJoinStyle,lineWidth:(f.width+f.height)/4,strokeStyle:d.borderColor,pointStyle:o||d.pointStyle,rotation:d.rotation,textAlign:i||d.textAlign,borderRadius:a&&(l||d.borderRadius),datasetIndex:c.index}},this)}},title:{color:e=>e.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:e=>!e.startsWith("on"),labels:{_scriptable:e=>!["generateLabels","filter","sort"].includes(e)}}};class $C extends Vs{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,n){const o=this.options;if(this.left=0,this.top=0,!o.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=t,this.height=this.bottom=n;const i=xo(o.text)?o.text.length:1;this._padding=ni(o.padding);const s=i*Qo(o.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=s:this.width=s}isHorizontal(){const t=this.options.position;return t==="top"||t==="bottom"}_drawArgs(t){const{top:n,left:o,bottom:i,right:s,options:a}=this,l=a.align;let c=0,d,f,h;return this.isHorizontal()?(f=Jo(l,o,s),h=n+t,d=s-o):(a.position==="left"?(f=o+t,h=Jo(l,i,n),c=Tn*-.5):(f=s-t,h=Jo(l,n,i),c=Tn*.5),d=i-n),{titleX:f,titleY:h,maxWidth:d,rotation:c}}draw(){const t=this.ctx,n=this.options;if(!n.display)return;const o=Qo(n.font),s=o.lineHeight/2+this._padding.top,{titleX:a,titleY:l,maxWidth:c,rotation:d}=this._drawArgs(s);nf(t,n.text,0,0,o,{color:n.color,maxWidth:c,rotation:d,textAlign:ky(n.align),textBaseline:"middle",translation:[a,l]})}}function Az(e,t){const n=new $C({ctx:e.ctx,options:t,chart:e});oi.configure(e,n,t),oi.addBox(e,n),e.titleBlock=n}var Tz={id:"title",_element:$C,start(e,t,n){Az(e,n)},stop(e){const t=e.titleBlock;oi.removeBox(e,t),delete e.titleBlock},beforeUpdate(e,t,n){const o=e.titleBlock;oi.configure(e,o,n),o.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 uf={average(e){if(!e.length)return!1;let t,n,o=new Set,i=0,s=0;for(t=0,n=e.length;t<n;++t){const l=e[t].element;if(l&&l.hasValue()){const c=l.tooltipPosition();o.add(c.x),i+=c.y,++s}}return s===0||o.size===0?!1:{x:[...o].reduce((l,c)=>l+c)/o.size,y:i/s}},nearest(e,t){if(!e.length)return!1;let n=t.x,o=t.y,i=Number.POSITIVE_INFINITY,s,a,l;for(s=0,a=e.length;s<a;++s){const c=e[s].element;if(c&&c.hasValue()){const d=c.getCenterPoint(),f=vy(t,d);f<i&&(i=f,l=c)}}if(l){const c=l.tooltipPosition();n=c.x,o=c.y}return{x:n,y:o}}};function cs(e,t){return t&&(xo(t)?Array.prototype.push.apply(e,t):e.push(t)),e}function ea(e){return(typeof e=="string"||e instanceof String)&&e.indexOf(`
30
30
  `)>-1?e.split(`
31
31
  `):e}function Bz(e,t){const{element:n,datasetIndex:o,index:i}=t,s=e.getDatasetMeta(o).controller,{label:a,value:l}=s.getLabelAndValue(i);return{chart:e,label:a,parsed:s.getParsed(i),raw:e.data.datasets[o].data[i],formattedValue:l,dataset:s.getDataset(),dataIndex:i,datasetIndex:o,element:n}}function zC(e,t){const n=e.chart.ctx,{body:o,footer:i,title:s}=e,{boxWidth:a,boxHeight:l}=t,c=Qo(t.bodyFont),d=Qo(t.titleFont),f=Qo(t.footerFont),h=s.length,p=i.length,g=o.length,y=ni(t.padding);let b=y.height,_=0,x=o.reduce((S,O)=>S+O.before.length+O.lines.length+O.after.length,0);if(x+=e.beforeBody.length+e.afterBody.length,h&&(b+=h*d.lineHeight+(h-1)*t.titleSpacing+t.titleMarginBottom),x){const S=t.displayColors?Math.max(l,c.lineHeight):c.lineHeight;b+=g*S+(x-g)*c.lineHeight+(x-1)*t.bodySpacing}p&&(b+=t.footerMarginTop+p*f.lineHeight+(p-1)*t.footerSpacing);let B=0;const R=function(S){_=Math.max(_,n.measureText(S).width+B)};return n.save(),n.font=d.string,An(e.title,R),n.font=c.string,An(e.beforeBody.concat(e.afterBody),R),B=t.displayColors?a+2+t.boxPadding:0,An(o,S=>{An(S.before,R),An(S.lines,R),An(S.after,R)}),B=0,n.font=f.string,An(e.footer,R),n.restore(),_+=y.width,{width:_,height:b}}function Pz(e,t){const{y:n,height:o}=t;return n<o/2?"top":n>e.height-o/2?"bottom":"center"}function Nz(e,t,n,o){const{x:i,width:s}=o,a=n.caretSize+n.caretPadding;if(e==="left"&&i+s+a>t.width||e==="right"&&i-s-a<0)return!0}function Dz(e,t,n,o){const{x:i,width:s}=n,{width:a,chartArea:{left:l,right:c}}=e;let d="center";return o==="center"?d=i<=(l+c)/2?"left":"right":i<=s/2?d="left":i>=a-s/2&&(d="right"),Nz(d,e,t,n)&&(d="center"),d}function jC(e,t,n){const o=n.yAlign||t.yAlign||Pz(e,n);return{xAlign:n.xAlign||t.xAlign||Dz(e,t,n,o),yAlign:o}}function Mz(e,t){let{x:n,width:o}=e;return t==="right"?n-=o:t==="center"&&(n-=o/2),n}function Rz(e,t,n){let{y:o,height:i}=e;return t==="top"?o+=n:t==="bottom"?o-=i+n:o-=i/2,o}function UC(e,t,n,o){const{caretSize:i,caretPadding:s,cornerRadius:a}=e,{xAlign:l,yAlign:c}=n,d=i+s,{topLeft:f,topRight:h,bottomLeft:p,bottomRight:g}=cd(a);let y=Mz(t,l);const b=Rz(t,c,d);return c==="center"?l==="left"?y+=d:l==="right"&&(y-=d):l==="left"?y-=Math.max(f,p)+i:l==="right"&&(y+=Math.max(h,g)+i),{x:Xo(y,0,o.width-t.width),y:Xo(b,0,o.height-t.height)}}function gp(e,t,n){const o=ni(n.padding);return t==="center"?e.x+e.width/2:t==="right"?e.x+e.width-o.right:e.x+o.left}function WC(e){return cs([],ea(e))}function Iz(e,t,n){return Yl(e,{tooltip:t,tooltipItems:n,type:"tooltip"})}function HC(e,t){const n=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return n?e.override(n):e}const qC={beforeTitle:Zs,title(e){if(e.length>0){const t=e[0],n=t.chart.data.labels,o=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(o>0&&t.dataIndex<o)return n[t.dataIndex]}return""},afterTitle:Zs,beforeBody:Zs,beforeLabel:Zs,label(e){if(this&&this.options&&this.options.mode==="dataset")return e.label+": "+e.formattedValue||e.formattedValue;let t=e.dataset.label||"";t&&(t+=": ");const n=e.formattedValue;return xn(n)||(t+=n),t},labelColor(e){const n=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.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(e){const n=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{pointStyle:n.pointStyle,rotation:n.rotation}},afterLabel:Zs,afterBody:Zs,beforeFooter:Zs,footer:Zs,afterFooter:Zs};function wr(e,t,n,o){const i=e[t].call(n,o);return typeof i>"u"?qC[t].call(n,o):i}class KC extends Vs{static positioners=uf;constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const n=this.chart,o=this.options.setContext(this.getContext()),i=o.enabled&&n.options.animation&&o.animations,s=new $E(this.chart,i);return i._cacheable&&(this._cachedAnimations=Object.freeze(s)),s}getContext(){return this.$context||(this.$context=Iz(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,n){const{callbacks:o}=n,i=wr(o,"beforeTitle",this,t),s=wr(o,"title",this,t),a=wr(o,"afterTitle",this,t);let l=[];return l=cs(l,ea(i)),l=cs(l,ea(s)),l=cs(l,ea(a)),l}getBeforeBody(t,n){return WC(wr(n.callbacks,"beforeBody",this,t))}getBody(t,n){const{callbacks:o}=n,i=[];return An(t,s=>{const a={before:[],lines:[],after:[]},l=HC(o,s);cs(a.before,ea(wr(l,"beforeLabel",this,s))),cs(a.lines,wr(l,"label",this,s)),cs(a.after,ea(wr(l,"afterLabel",this,s))),i.push(a)}),i}getAfterBody(t,n){return WC(wr(n.callbacks,"afterBody",this,t))}getFooter(t,n){const{callbacks:o}=n,i=wr(o,"beforeFooter",this,t),s=wr(o,"footer",this,t),a=wr(o,"afterFooter",this,t);let l=[];return l=cs(l,ea(i)),l=cs(l,ea(s)),l=cs(l,ea(a)),l}_createItems(t){const n=this._active,o=this.chart.data,i=[],s=[],a=[];let l=[],c,d;for(c=0,d=n.length;c<d;++c)l.push(Bz(this.chart,n[c]));return t.filter&&(l=l.filter((f,h,p)=>t.filter(f,h,p,o))),t.itemSort&&(l=l.sort((f,h)=>t.itemSort(f,h,o))),An(l,f=>{const h=HC(t.callbacks,f);i.push(wr(h,"labelColor",this,f)),s.push(wr(h,"labelPointStyle",this,f)),a.push(wr(h,"labelTextColor",this,f))}),this.labelColors=i,this.labelPointStyles=s,this.labelTextColors=a,this.dataPoints=l,l}update(t,n){const o=this.options.setContext(this.getContext()),i=this._active;let s,a=[];if(!i.length)this.opacity!==0&&(s={opacity:0});else{const l=uf[o.position].call(this,i,this._eventPosition);a=this._createItems(o),this.title=this.getTitle(a,o),this.beforeBody=this.getBeforeBody(a,o),this.body=this.getBody(a,o),this.afterBody=this.getAfterBody(a,o),this.footer=this.getFooter(a,o);const c=this._size=zC(this,o),d=Object.assign({},l,c),f=jC(this.chart,o,d),h=UC(o,d,f,this.chart);this.xAlign=f.xAlign,this.yAlign=f.yAlign,s={opacity:1,x:h.x,y:h.y,width:c.width,height:c.height,caretX:l.x,caretY:l.y}}this._tooltipItems=a,this.$context=void 0,s&&this._resolveAnimations().update(this,s),t&&o.external&&o.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(t,n,o,i){const s=this.getCaretPosition(t,o,i);n.lineTo(s.x1,s.y1),n.lineTo(s.x2,s.y2),n.lineTo(s.x3,s.y3)}getCaretPosition(t,n,o){const{xAlign:i,yAlign:s}=this,{caretSize:a,cornerRadius:l}=o,{topLeft:c,topRight:d,bottomLeft:f,bottomRight:h}=cd(l),{x:p,y:g}=t,{width:y,height:b}=n;let _,x,B,R,S,O;return s==="center"?(S=g+b/2,i==="left"?(_=p,x=_-a,R=S+a,O=S-a):(_=p+y,x=_+a,R=S-a,O=S+a),B=_):(i==="left"?x=p+Math.max(c,f)+a:i==="right"?x=p+y-Math.max(d,h)-a:x=this.caretX,s==="top"?(R=g,S=R-a,_=x-a,B=x+a):(R=g+b,S=R+a,_=x+a,B=x-a),O=R),{x1:_,x2:x,x3:B,y1:R,y2:S,y3:O}}drawTitle(t,n,o){const i=this.title,s=i.length;let a,l,c;if(s){const d=fd(o.rtl,this.x,this.width);for(t.x=gp(this,o.titleAlign,o),n.textAlign=d.textAlign(o.titleAlign),n.textBaseline="middle",a=Qo(o.titleFont),l=o.titleSpacing,n.fillStyle=o.titleColor,n.font=a.string,c=0;c<s;++c)n.fillText(i[c],d.x(t.x),t.y+a.lineHeight/2),t.y+=a.lineHeight+l,c+1===s&&(t.y+=o.titleMarginBottom-l)}}_drawColorBox(t,n,o,i,s){const a=this.labelColors[o],l=this.labelPointStyles[o],{boxHeight:c,boxWidth:d}=s,f=Qo(s.bodyFont),h=gp(this,"left",s),p=i.x(h),g=c<f.lineHeight?(f.lineHeight-c)/2:0,y=n.y+g;if(s.usePointStyle){const b={radius:Math.min(d,c)/2,pointStyle:l.pointStyle,rotation:l.rotation,borderWidth:1},_=i.leftForLtr(p,d)+d/2,x=y+c/2;t.strokeStyle=s.multiKeyBackground,t.fillStyle=s.multiKeyBackground,Ay(t,b,_,x),t.strokeStyle=a.borderColor,t.fillStyle=a.backgroundColor,Ay(t,b,_,x)}else{t.lineWidth=an(a.borderWidth)?Math.max(...Object.values(a.borderWidth)):a.borderWidth||1,t.strokeStyle=a.borderColor,t.setLineDash(a.borderDash||[]),t.lineDashOffset=a.borderDashOffset||0;const b=i.leftForLtr(p,d),_=i.leftForLtr(i.xPlus(p,1),d-2),x=cd(a.borderRadius);Object.values(x).some(B=>B!==0)?(t.beginPath(),t.fillStyle=s.multiKeyBackground,Qm(t,{x:b,y,w:d,h:c,radius:x}),t.fill(),t.stroke(),t.fillStyle=a.backgroundColor,t.beginPath(),Qm(t,{x:_,y:y+1,w:d-2,h:c-2,radius:x}),t.fill()):(t.fillStyle=s.multiKeyBackground,t.fillRect(b,y,d,c),t.strokeRect(b,y,d,c),t.fillStyle=a.backgroundColor,t.fillRect(_,y+1,d-2,c-2))}t.fillStyle=this.labelTextColors[o]}drawBody(t,n,o){const{body:i}=this,{bodySpacing:s,bodyAlign:a,displayColors:l,boxHeight:c,boxWidth:d,boxPadding:f}=o,h=Qo(o.bodyFont);let p=h.lineHeight,g=0;const y=fd(o.rtl,this.x,this.width),b=function(w){n.fillText(w,y.x(t.x+g),t.y+p/2),t.y+=p+s},_=y.textAlign(a);let x,B,R,S,O,I,D;for(n.textAlign=a,n.textBaseline="middle",n.font=h.string,t.x=gp(this,_,o),n.fillStyle=o.bodyColor,An(this.beforeBody,b),g=l&&_!=="right"?a==="center"?d/2+f:d+2+f:0,S=0,I=i.length;S<I;++S){for(x=i[S],B=this.labelTextColors[S],n.fillStyle=B,An(x.before,b),R=x.lines,l&&R.length&&(this._drawColorBox(n,t,S,y,o),p=Math.max(h.lineHeight,c)),O=0,D=R.length;O<D;++O)b(R[O]),p=h.lineHeight;An(x.after,b)}g=0,p=h.lineHeight,An(this.afterBody,b),t.y-=s}drawFooter(t,n,o){const i=this.footer,s=i.length;let a,l;if(s){const c=fd(o.rtl,this.x,this.width);for(t.x=gp(this,o.footerAlign,o),t.y+=o.footerMarginTop,n.textAlign=c.textAlign(o.footerAlign),n.textBaseline="middle",a=Qo(o.footerFont),n.fillStyle=o.footerColor,n.font=a.string,l=0;l<s;++l)n.fillText(i[l],c.x(t.x),t.y+a.lineHeight/2),t.y+=a.lineHeight+o.footerSpacing}}drawBackground(t,n,o,i){const{xAlign:s,yAlign:a}=this,{x:l,y:c}=t,{width:d,height:f}=o,{topLeft:h,topRight:p,bottomLeft:g,bottomRight:y}=cd(i.cornerRadius);n.fillStyle=i.backgroundColor,n.strokeStyle=i.borderColor,n.lineWidth=i.borderWidth,n.beginPath(),n.moveTo(l+h,c),a==="top"&&this.drawCaret(t,n,o,i),n.lineTo(l+d-p,c),n.quadraticCurveTo(l+d,c,l+d,c+p),a==="center"&&s==="right"&&this.drawCaret(t,n,o,i),n.lineTo(l+d,c+f-y),n.quadraticCurveTo(l+d,c+f,l+d-y,c+f),a==="bottom"&&this.drawCaret(t,n,o,i),n.lineTo(l+g,c+f),n.quadraticCurveTo(l,c+f,l,c+f-g),a==="center"&&s==="left"&&this.drawCaret(t,n,o,i),n.lineTo(l,c+h),n.quadraticCurveTo(l,c,l+h,c),n.closePath(),n.fill(),i.borderWidth>0&&n.stroke()}_updateAnimationTarget(t){const n=this.chart,o=this.$animations,i=o&&o.x,s=o&&o.y;if(i||s){const a=uf[t.position].call(this,this._active,this._eventPosition);if(!a)return;const l=this._size=zC(this,t),c=Object.assign({},a,this._size),d=jC(n,t,c),f=UC(t,c,d,n);(i._to!==f.x||s._to!==f.y)&&(this.xAlign=d.xAlign,this.yAlign=d.yAlign,this.width=l.width,this.height=l.height,this.caretX=a.x,this.caretY=a.y,this._resolveAnimations().update(this,f))}}_willRender(){return!!this.opacity}draw(t){const n=this.options.setContext(this.getContext());let o=this.opacity;if(!o)return;this._updateAnimationTarget(n);const i={width:this.width,height:this.height},s={x:this.x,y:this.y};o=Math.abs(o)<.001?0:o;const a=ni(n.padding),l=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&l&&(t.save(),t.globalAlpha=o,this.drawBackground(s,t,i,n),BE(t,n.textDirection),s.y+=a.top,this.drawTitle(s,t,n),this.drawBody(s,t,n),this.drawFooter(s,t,n),PE(t,n.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,n){const o=this._active,i=t.map(({datasetIndex:l,index:c})=>{const d=this.chart.getDatasetMeta(l);if(!d)throw new Error("Cannot find a dataset at index "+l);return{datasetIndex:l,element:d.data[c],index:c}}),s=!Km(o,i),a=this._positionChanged(i,n);(s||a)&&(this._active=i,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,n,o=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const i=this.options,s=this._active||[],a=this._getActiveElements(t,s,n,o),l=this._positionChanged(a,t),c=n||!Km(a,s)||l;return c&&(this._active=a,(i.enabled||i.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,n))),c}_getActiveElements(t,n,o,i){const s=this.options;if(t.type==="mouseout")return[];if(!i)return n.filter(l=>this.chart.data.datasets[l.datasetIndex]&&this.chart.getDatasetMeta(l.datasetIndex).controller.getParsed(l.index)!==void 0);const a=this.chart.getElementsAtEventForMode(t,s.mode,s,o);return s.reverse&&a.reverse(),a}_positionChanged(t,n){const{caretX:o,caretY:i,options:s}=this,a=uf[s.position].call(this,t,n);return a!==!1&&(o!==a.x||i!==a.y)}}var Oz={id:"tooltip",_element:KC,positioners:uf,afterInit(e,t,n){n&&(e.tooltip=new KC({chart:e,options:n}))},beforeUpdate(e,t,n){e.tooltip&&e.tooltip.initialize(n)},reset(e,t,n){e.tooltip&&e.tooltip.initialize(n)},afterDraw(e){const t=e.tooltip;if(t&&t._willRender()){const n={tooltip:t};if(e.notifyPlugins("beforeTooltipDraw",{...n,cancelable:!0})===!1)return;t.draw(e.ctx),e.notifyPlugins("afterTooltipDraw",n)}},afterEvent(e,t){if(e.tooltip){const n=t.replay;e.tooltip.handleEvent(t.event,n,t.inChartArea)&&(t.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(e,t)=>t.bodyFont.size,boxWidth:(e,t)=>t.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:qC},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:e=>e!=="filter"&&e!=="itemSort"&&e!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const Lz=(e,t,n,o)=>(typeof t=="string"?(n=e.push(t)-1,o.unshift({index:n,label:t})):isNaN(t)&&(n=null),n);function Fz(e,t,n,o){const i=e.indexOf(t);if(i===-1)return Lz(e,t,n,o);const s=e.lastIndexOf(t);return i!==s?n:i}const $z=(e,t)=>e===null?null:Xo(Math.round(e),0,t);function GC(e){const t=this.getLabels();return e>=0&&e<t.length?t[e]:e}class zz extends hd{static id="category";static defaults={ticks:{callback:GC}};constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const n=this._addedLabels;if(n.length){const o=this.getLabels();for(const{index:i,label:s}of n)o[i]===s&&o.splice(i,1);this._addedLabels=[]}super.init(t)}parse(t,n){if(xn(t))return null;const o=this.getLabels();return n=isFinite(n)&&o[n]===t?n:Fz(o,t,Zt(n,t),this._addedLabels),$z(n,o.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:n}=this.getUserBounds();let{min:o,max:i}=this.getMinMax(!0);this.options.bounds==="ticks"&&(t||(o=0),n||(i=this.getLabels().length-1)),this.min=o,this.max=i}buildTicks(){const t=this.min,n=this.max,o=this.options.offset,i=[];let s=this.getLabels();s=t===0&&n===s.length-1?s:s.slice(t,n+1),this._valueRange=Math.max(s.length-(o?0:1),1),this._startValue=this.min-(o?.5:0);for(let a=t;a<=n;a++)i.push({value:a});return i}getLabelForValue(t){return GC.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return typeof t!="number"&&(t=this.parse(t)),t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const n=this.ticks;return t<0||t>n.length-1?null:this.getPixelForValue(n[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}function jz(e,t){const n=[],{bounds:i,step:s,min:a,max:l,precision:c,count:d,maxTicks:f,maxDigits:h,includeBounds:p}=e,g=s||1,y=f-1,{min:b,max:_}=t,x=!xn(a),B=!xn(l),R=!xn(d),S=(_-b)/(h+1);let O=oE((_-b)/y/g)*g,I,D,w,E;if(O<1e-14&&!x&&!B)return[{value:b},{value:_}];E=Math.ceil(_/O)-Math.floor(b/O),E>y&&(O=oE(E*O/y/g)*g),xn(c)||(I=Math.pow(10,c),O=Math.ceil(O*I)/I),i==="ticks"?(D=Math.floor(b/O)*O,w=Math.ceil(_/O)*O):(D=b,w=_),x&&B&&s&&L8((l-a)/s,O/1e3)?(E=Math.round(Math.min((l-a)/O,f)),O=(l-a)/E,D=a,w=l):R?(D=x?a:D,w=B?l:w,E=d-1,O=(w-D)/E):(E=(w-D)/O,Xu(E,Math.round(E),O/1e3)?E=Math.round(E):E=Math.ceil(E));const F=Math.max(rE(O),rE(D));I=Math.pow(10,xn(c)?F:c),D=Math.round(D*I)/I,w=Math.round(w*I)/I;let A=0;for(x&&(p&&D!==a?(n.push({value:a}),D<a&&A++,Xu(Math.round((D+A*O)*I)/I,a,YC(a,S,e))&&A++):D<a&&A++);A<E;++A){const P=Math.round((D+A*O)*I)/I;if(B&&P>l)break;n.push({value:P})}return B&&p&&w!==l?n.length&&Xu(n[n.length-1].value,l,YC(l,S,e))?n[n.length-1].value=l:n.push({value:l}):(!B||w===l)&&n.push({value:w}),n}function YC(e,t,{horizontal:n,minRotation:o}){const i=Xs(o),s=(n?Math.sin(i):Math.cos(i))||.001,a=.75*t*(""+e).length;return Math.min(t/s,a)}class Uz extends hd{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,n){return xn(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:n,maxDefined:o}=this.getUserBounds();let{min:i,max:s}=this;const a=c=>i=n?i:c,l=c=>s=o?s:c;if(t){const c=as(i),d=as(s);c<0&&d<0?l(0):c>0&&d>0&&a(0)}if(i===s){let c=s===0?1:Math.abs(s*.05);l(s+c),t||a(i-c)}this.min=i,this.max=s}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:n,stepSize:o}=t,i;return o?(i=Math.ceil(this.max/o)-Math.floor(this.min/o)+1,i>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${o} would result generating up to ${i} ticks. Limiting to 1000.`),i=1e3)):(i=this.computeTickLimit(),n=n||11),n&&(i=Math.min(n,i)),i}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,n=t.ticks;let o=this.getTickLimit();o=Math.max(2,o);const i={maxTicks:o,bounds:t.bounds,min:t.min,max:t.max,precision:n.precision,step:n.stepSize,count:n.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:n.minRotation||0,includeBounds:n.includeBounds!==!1},s=this._range||this,a=jz(i,s);return t.bounds==="ticks"&&F8(a,this,"value"),t.reverse?(a.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),a}configure(){const t=this.ticks;let n=this.min,o=this.max;if(super.configure(),this.options.offset&&t.length){const i=(o-n)/Math.max(t.length-1,1)/2;n-=i,o+=i}this._startValue=n,this._endValue=o,this._valueRange=o-n}getLabelForValue(t){return Ey(t,this.chart.options.locale,this.options.ticks.format)}}class Wz extends Uz{static id="linear";static defaults={ticks:{callback:pE.formatters.numeric}};determineDataLimits(){const{min:t,max:n}=this.getMinMax(!0);this.min=Zo(t)?t:0,this.max=Zo(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),n=t?this.width:this.height,o=Xs(this.options.ticks.minRotation),i=(t?Math.sin(o):Math.cos(o))||.001,s=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,s.lineHeight/i))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}const bp={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}},kr=Object.keys(bp);function ZC(e,t){return e-t}function XC(e,t){if(xn(t))return null;const n=e._adapter,{parser:o,round:i,isoWeekday:s}=e._parseOpts;let a=t;return typeof o=="function"&&(a=o(a)),Zo(a)||(a=typeof o=="string"?n.parse(a,o):n.parse(a)),a===null?null:(i&&(a=i==="week"&&(Ju(s)||s===!0)?n.startOf(a,"isoWeek",s):n.startOf(a,i)),+a)}function JC(e,t,n,o){const i=kr.length;for(let s=kr.indexOf(e);s<i-1;++s){const a=bp[kr[s]],l=a.steps?a.steps:Number.MAX_SAFE_INTEGER;if(a.common&&Math.ceil((n-t)/(l*a.size))<=o)return kr[s]}return kr[i-1]}function Hz(e,t,n,o,i){for(let s=kr.length-1;s>=kr.indexOf(n);s--){const a=kr[s];if(bp[a].common&&e._adapter.diff(i,o,a)>=t-1)return a}return kr[n?kr.indexOf(n):0]}function qz(e){for(let t=kr.indexOf(e)+1,n=kr.length;t<n;++t)if(bp[kr[t]].common)return kr[t]}function QC(e,t,n){if(!n)e[t]=!0;else if(n.length){const{lo:o,hi:i}=wy(n,t),s=n[o]>=t?n[o]:n[i];e[s]=!0}}function Kz(e,t,n,o){const i=e._adapter,s=+i.startOf(t[0].value,o),a=t[t.length-1].value;let l,c;for(l=s;l<=a;l=+i.add(l,1,o))c=n[l],c>=0&&(t[c].major=!0);return t}function VC(e,t,n){const o=[],i={},s=t.length;let a,l;for(a=0;a<s;++a)l=t[a],i[l]=a,o.push({value:l,major:!1});return s===0||!n?o:Kz(e,o,i,n)}class e2 extends hd{static id="time";static defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}};constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,n={}){const o=t.time||(t.time={}),i=this._adapter=new x$._date(t.adapters.date);i.init(n),Yu(o.displayFormats,i.formats()),this._parseOpts={parser:o.parser,round:o.round,isoWeekday:o.isoWeekday},super.init(t),this._normalized=n.normalized}parse(t,n){return t===void 0?null:XC(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,n=this._adapter,o=t.time.unit||"day";let{min:i,max:s,minDefined:a,maxDefined:l}=this.getUserBounds();function c(d){!a&&!isNaN(d.min)&&(i=Math.min(i,d.min)),!l&&!isNaN(d.max)&&(s=Math.max(s,d.max))}(!a||!l)&&(c(this._getLabelBounds()),(t.bounds!=="ticks"||t.ticks.source!=="labels")&&c(this.getMinMax(!1))),i=Zo(i)&&!isNaN(i)?i:+n.startOf(Date.now(),o),s=Zo(s)&&!isNaN(s)?s:+n.endOf(Date.now(),o)+1,this.min=Math.min(i,s-1),this.max=Math.max(i+1,s)}_getLabelBounds(){const t=this.getLabelTimestamps();let n=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY;return t.length&&(n=t[0],o=t[t.length-1]),{min:n,max:o}}buildTicks(){const t=this.options,n=t.time,o=t.ticks,i=o.source==="labels"?this.getLabelTimestamps():this._generate();t.bounds==="ticks"&&i.length&&(this.min=this._userMin||i[0],this.max=this._userMax||i[i.length-1]);const s=this.min,a=this.max,l=W8(i,s,a);return this._unit=n.unit||(o.autoSkip?JC(n.minUnit,this.min,this.max,this._getLabelCapacity(s)):Hz(this,l.length,n.minUnit,this.min,this.max)),this._majorUnit=!o.major.enabled||this._unit==="year"?void 0:qz(this._unit),this.initOffsets(i),t.reverse&&l.reverse(),VC(this,l,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t=[]){let n=0,o=0,i,s;this.options.offset&&t.length&&(i=this.getDecimalForValue(t[0]),t.length===1?n=1-i:n=(this.getDecimalForValue(t[1])-i)/2,s=this.getDecimalForValue(t[t.length-1]),t.length===1?o=s:o=(s-this.getDecimalForValue(t[t.length-2]))/2);const a=t.length<3?.5:.25;n=Xo(n,0,a),o=Xo(o,0,a),this._offsets={start:n,end:o,factor:1/(n+1+o)}}_generate(){const t=this._adapter,n=this.min,o=this.max,i=this.options,s=i.time,a=s.unit||JC(s.minUnit,n,o,this._getLabelCapacity(n)),l=Zt(i.ticks.stepSize,1),c=a==="week"?s.isoWeekday:!1,d=Ju(c)||c===!0,f={};let h=n,p,g;if(d&&(h=+t.startOf(h,"isoWeek",c)),h=+t.startOf(h,d?"day":a),t.diff(o,n,a)>1e5*l)throw new Error(n+" and "+o+" are too far apart with stepSize of "+l+" "+a);const y=i.ticks.source==="data"&&this.getDataTimestamps();for(p=h,g=0;p<o;p=+t.add(p,l,a),g++)QC(f,p,y);return(p===o||i.bounds==="ticks"||g===1)&&QC(f,p,y),Object.keys(f).sort(ZC).map(b=>+b)}getLabelForValue(t){const n=this._adapter,o=this.options.time;return o.tooltipFormat?n.format(t,o.tooltipFormat):n.format(t,o.displayFormats.datetime)}format(t,n){const i=this.options.time.displayFormats,s=this._unit,a=n||i[s];return this._adapter.format(t,a)}_tickFormatFunction(t,n,o,i){const s=this.options,a=s.ticks.callback;if(a)return Wn(a,[t,n,o],this);const l=s.time.displayFormats,c=this._unit,d=this._majorUnit,f=c&&l[c],h=d&&l[d],p=o[n],g=d&&h&&p&&p.major;return this._adapter.format(t,i||(g?h:f))}generateTickLabels(t){let n,o,i;for(n=0,o=t.length;n<o;++n)i=t[n],i.label=this._tickFormatFunction(i.value,n,t)}getDecimalForValue(t){return t===null?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const n=this._offsets,o=this.getDecimalForValue(t);return this.getPixelForDecimal((n.start+o)*n.factor)}getValueForPixel(t){const n=this._offsets,o=this.getDecimalForPixel(t)/n.factor-n.end;return this.min+o*(this.max-this.min)}_getLabelSize(t){const n=this.options.ticks,o=this.ctx.measureText(t).width,i=Xs(this.isHorizontal()?n.maxRotation:n.minRotation),s=Math.cos(i),a=Math.sin(i),l=this._resolveTickFontOptions(0).size;return{w:o*s+l*a,h:o*a+l*s}}_getLabelCapacity(t){const n=this.options.time,o=n.displayFormats,i=o[n.unit]||o.millisecond,s=this._tickFormatFunction(t,0,VC(this,[t],this._majorUnit),i),a=this._getLabelSize(s),l=Math.floor(this.isHorizontal()?this.width/a.w:this.height/a.h)-1;return l>0?l:1}getDataTimestamps(){let t=this._cache.data||[],n,o;if(t.length)return t;const i=this.getMatchingVisibleMetas();if(this._normalized&&i.length)return this._cache.data=i[0].controller.getAllParsedValues(this);for(n=0,o=i.length;n<o;++n)t=t.concat(i[n].controller.getAllParsedValues(this));return this._cache.data=this.normalize(t)}getLabelTimestamps(){const t=this._cache.labels||[];let n,o;if(t.length)return t;const i=this.getLabels();for(n=0,o=i.length;n<o;++n)t.push(XC(this,i[n]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return lE(t.sort(ZC))}}function yp(e,t,n){let o=0,i=e.length-1,s,a,l,c;n?(t>=e[o].pos&&t<=e[i].pos&&({lo:o,hi:i}=ql(e,"pos",t)),{pos:s,time:l}=e[o],{pos:a,time:c}=e[i]):(t>=e[o].time&&t<=e[i].time&&({lo:o,hi:i}=ql(e,"time",t)),{time:s,pos:l}=e[o],{time:a,pos:c}=e[i]);const d=a-s;return d?l+(c-l)*(t-s)/d:l}class HTe extends e2{static id="timeseries";static defaults=e2.defaults;constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),n=this._table=this.buildLookupTable(t);this._minPos=yp(n,this.min),this._tableRange=yp(n,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:n,max:o}=this,i=[],s=[];let a,l,c,d,f;for(a=0,l=t.length;a<l;++a)d=t[a],d>=n&&d<=o&&i.push(d);if(i.length<2)return[{time:n,pos:0},{time:o,pos:1}];for(a=0,l=i.length;a<l;++a)f=i[a+1],c=i[a-1],d=i[a],Math.round((f+c)/2)!==d&&s.push({time:d,pos:a/(l-1)});return s}_generate(){const t=this.min,n=this.max;let o=super.getDataTimestamps();return(!o.includes(t)||!o.length)&&o.splice(0,0,t),(!o.includes(n)||o.length===1)&&o.push(n),o.sort((i,s)=>i-s)}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const n=this.getDataTimestamps(),o=this.getLabelTimestamps();return n.length&&o.length?t=this.normalize(n.concat(o)):t=n.length?n:o,t=this._cache.all=t,t}getDecimalForValue(t){return(yp(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const n=this._offsets,o=this.getDecimalForPixel(t)/n.factor-n.end;return yp(this._table,o*this._tableRange+this._minPos,!0)}}const Gz={key:0,class:"mb-2 text-sm font-medium text-gray-700"},Yz={key:0,class:"text-red-500 ml-1"},Zz={key:0,class:"absolute inset-0 flex items-center justify-center bg-white"},Xz={key:1,class:"absolute inset-0 flex items-center justify-center bg-red-50 border border-red-200 rounded"},Jz={class:"text-red-600 text-sm"},Qz={key:1,class:"mt-2 text-xs text-gray-500"},Vz={key:0},vp=Sn(r.defineComponent({name:"DCodeChart",__name:"DCodeChart",props:{type:{default:"line"},width:{default:400},height:{default:300},required:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},error:{default:null},showInfo:{type:Boolean,default:!1},responsive:{type:Boolean,default:!0},maintainAspectRatio:{type:Boolean,default:!1},theme:{default:"light"},colors:{default:()=>["#3B82F6","#EF4444","#10B981","#F59E0B","#8B5CF6","#EC4899","#14B8A6","#F97316","#6366F1","#84CC16"]},data:{},modelValue:{},options:{},onClick:{},onHover:{},label:{}},emits:["update:modelValue","click","hover","ready"],setup(e,{expose:t,emit:n}){Hy.register(zz,Wz,Y9,mp,ez,F9,Tz,Oz,Sz,wz,k$,v$,_$,XE);const o=e,i=n,s=r.ref(null),a=r.shallowRef(null),l=r.ref(null),c=r.computed(()=>({"opacity-50 pointer-events-none":o.loading||o.error})),d=()=>{const p=o.theme==="dark";return{responsive:o.responsive,maintainAspectRatio:o.maintainAspectRatio,animation:{duration:1e3,easing:"easeInOutQuart",delay:g=>{let y=0;return g.type==="data"&&g.mode==="default"&&(y=g.dataIndex*100+g.datasetIndex*50),y},onComplete:()=>{}},plugins:{legend:{position:"top",labels:{color:p?"#E5E7EB":"#374151",font:{size:12}}},tooltip:{backgroundColor:p?"#1F2937":"#FFFFFF",titleColor:p?"#F3F4F6":"#111827",bodyColor:p?"#D1D5DB":"#4B5563",borderColor:p?"#374151":"#E5E7EB",borderWidth:1,animation:{duration:200,easing:"easeInOutQuad"}}},scales:o.type!=="pie"&&o.type!=="doughnut"&&o.type!=="polarArea"?{x:{grid:{color:p?"#374151":"#E5E7EB"},ticks:{color:p?"#D1D5DB":"#6B7280"}},y:{grid:{color:p?"#374151":"#E5E7EB"},ticks:{color:p?"#D1D5DB":"#6B7280"}}}:void 0}},f=p=>!p||!p.datasets?p:{...p,datasets:p.datasets.map((g,y)=>{const b=y%o.colors.length,_=o.colors[b];let x=g.backgroundColor,B=g.borderColor;return["pie","doughnut","polarArea"].includes(o.type)&&(!x||x.length===0)?g.data&&(x=g.data.map((R,S)=>o.colors[S%o.colors.length]+"80"),B=g.data.map((R,S)=>o.colors[S%o.colors.length])):(x=x||_+"40",B=B||_),{...g,borderColor:B,backgroundColor:x,pointBackgroundColor:g.pointBackgroundColor||_,pointBorderColor:g.pointBorderColor||_,hoverBackgroundColor:g.hoverBackgroundColor||_+"60",hoverBorderColor:g.hoverBorderColor||_}})},h=async()=>{if(!s.value)return;await r.nextTick(),a.value&&a.value.destroy();const p=o.data||o.modelValue;let g=p;if(Array.isArray(p))if(p.length>0&&typeof p[0]=="object"&&p[0]!==null){const b=Object.keys(p[0]),_=b.find(B=>["label","name","x","category","title"].includes(B.toLowerCase()))||b[0],x=b.find(B=>B!==_&&["value","y","count","amount","total","data"].includes(B.toLowerCase()))||b.find(B=>B!==_&&typeof p[0][B]=="number")||(b.length>1?b.find(B=>B!==_):b[0]);g={labels:p.map(B=>B[_||""]),datasets:[{label:o.label||"Data",data:p.map(B=>B[x||""])}]}}else p.length>0?g={labels:p.map((b,_)=>`Data ${_+1}`),datasets:[{label:o.label||"Data",data:p}]}:g={labels:[],datasets:[]};if(l.value=f(g),!l.value)return;const y={...d(),...o.options,onClick:(b,_)=>{i("click",b,_),o.onClick&&o.onClick(b,_)},onHover:(b,_)=>{i("hover",b,_),o.onHover&&o.onHover(b,_)}};a.value=new Hy(s.value,{type:o.type,data:l.value,options:y}),i("ready",a.value)};return r.watch(()=>[o.data,o.modelValue,o.type,o.options,o.theme],()=>{h()},{deep:!0}),r.watch(()=>[o.width,o.height],()=>{a.value&&a.value.resize()}),r.onMounted(()=>{h()}),r.onUnmounted(()=>{a.value&&a.value.destroy()}),t({chart:a,updateChart:h}),(p,g)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["d-code-chart",c.value])},[e.label?(r.openBlock(),r.createElementBlock("div",Gz,[r.createTextVNode(r.toDisplayString(e.label)+" ",1),e.required?(r.openBlock(),r.createElementBlock("span",Yz,"*")):r.createCommentVNode("",!0)])):r.createCommentVNode("",!0),r.createElementVNode("div",{class:"relative",style:r.normalizeStyle({height:e.height+"px"})},[r.createElementVNode("canvas",{ref_key:"chartCanvas",ref:s},null,512),e.loading?(r.openBlock(),r.createElementBlock("div",Zz,[...g[0]||(g[0]=[r.createElementVNode("div",{class:"animate-pulse-slow rounded-full h-8 w-8 border-b-2 border-blue-600"},null,-1)])])):r.createCommentVNode("",!0),e.error?(r.openBlock(),r.createElementBlock("div",Xz,[r.createElementVNode("div",Jz,r.toDisplayString(e.error),1)])):r.createCommentVNode("",!0)],4),e.showInfo&&l.value?(r.openBlock(),r.createElementBlock("div",Qz,[l.value.datasets?(r.openBlock(),r.createElementBlock("div",Vz,r.toDisplayString(l.value.datasets.length)+" dataset(s) • "+r.toDisplayString(l.value.labels?l.value.labels.length:0)+" data points ",1)):r.createCommentVNode("",!0)])):r.createCommentVNode("",!0)],2))}}),[["__scopeId","data-v-b1c7c58f"]]),pd=r.defineComponent({__name:"Label",props:{for:{},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,n=Lo.reactiveOmit(t,"class");return(o,i)=>(r.openBlock(),r.createBlock(r.unref(Lt.Label),r.mergeProps(r.unref(n),{class:r.unref(_n)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",t.class)}),{default:r.withCtx(()=>[r.renderSlot(o.$slots,"default")]),_:3},16,["class"]))}}),ej={key:0,class:"ml-1 text-destructive"},tj=["aria-busy"],nj={key:0,class:"h-4 w-32 rounded bg-gray-200 dark:bg-gray-700 animate-pulse mb-2"},oj={key:1,class:"flex items-center"},rj=["id","checked","indeterminate","disabled","required"],ij={key:1,class:"text-xs text-destructive mt-1"},Di=Sn(r.defineComponent({name:"DCodeCheckbox",inheritAttrs:!1,__name:"DCodeCheckbox",props:{modelValue:{type:[Boolean,null]},label:{default:""},placeholder:{},clearable:{type:Boolean},required:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},visible:{type:Boolean,default:!0},skeleton:{type:Boolean,default:!1},error:{default:null},id:{default:""},title:{default:""},checked:{type:[Boolean,null]},indeterminate:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(e,{emit:t}){const n=r.useAttrs(),o=t,i=e,s=r.computed(()=>i.visible??!0),a=r.computed(()=>i.required),l=Math.random().toString(36).slice(2,7),c=r.computed(()=>`dcode-checkbox-${i.id||i.label||"checkbox"}-${l}`),d=r.ref(!!(i.modelValue??i.checked));r.watch(()=>[i.modelValue,i.checked],([p,g])=>{d.value=!!(p??g)},{immediate:!0});const f=()=>{if(i.disabled||i.readonly)return;const p=!d.value;d.value=p,o("update:modelValue",p),o("change",p)},h=p=>{(p.key===" "||p.key==="Enter")&&(p.preventDefault(),f())};return(p,g)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["grid gap-1.5",i.disabled?"cursor-not-allowed":""])},[e.label?(r.openBlock(),r.createBlock(pd,{key:0,class:"text-sm font-medium mb-1"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(e.label)+" ",1),e.required?(r.openBlock(),r.createElementBlock("span",ej,"*")):r.createCommentVNode("",!0)]),_:1})):r.createCommentVNode("",!0),r.withDirectives(r.createElementVNode("div",{class:r.normalizeClass([r.unref(n).class,{"opacity-60 cursor-not-allowed":e.disabled}]),"aria-busy":e.skeleton},[e.skeleton?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[e.label?(r.openBlock(),r.createElementBlock("div",nj)):r.createCommentVNode("",!0),g[0]||(g[0]=r.createElementVNode("div",{class:"flex items-center gap-2.5"},[r.createElementVNode("div",{class:"h-4 w-4 rounded bg-gray-200 dark:bg-gray-700 animate-pulse flex-shrink-0"}),r.createElementVNode("div",{class:"h-4 w-24 rounded bg-gray-200 dark:bg-gray-700 animate-pulse"})],-1))],64)):(r.openBlock(),r.createElementBlock("div",oj,[r.createElementVNode("label",{class:r.normalizeClass(["flex items-center gap-2.5 group relative",{"cursor-pointer":!e.disabled&&!e.readonly,"opacity-50 cursor-not-allowed":e.disabled,"cursor-default opacity-80":e.readonly}])},[r.createElementVNode("input",{type:"checkbox",id:c.value,class:"sr-only peer",checked:d.value,indeterminate:e.indeterminate,disabled:e.disabled,required:a.value,onChange:f,onKeydown:h},null,40,rj),r.createElementVNode("div",{class:r.normalizeClass(["h-4 w-4 shrink-0 rounded-sm border shadow-sm transition-all focus:outline-none peer-focus-visible:ring-2 peer-focus-visible:ring-neutral-400 dark:peer-focus-visible:ring-neutral-600 peer-focus-visible:ring-offset-2 flex items-center justify-center",[d.value||e.indeterminate?"bg-primary border-primary text-primary-foreground":"border-neutral-300 dark:border-neutral-600 bg-white dark:bg-neutral-800",e.disabled?"cursor-not-allowed":e.readonly?"cursor-default":"cursor-pointer"]]),"aria-hidden":"true"},[d.value&&!e.indeterminate?(r.openBlock(),r.createBlock(r.unref(Ae.Check),{key:0,class:"h-3 w-3 text-white","stroke-width":"3"})):e.indeterminate?(r.openBlock(),r.createBlock(r.unref(Ae.Minus),{key:1,class:"h-3 w-3 text-white","stroke-width":"3"})):r.createCommentVNode("",!0)],2),e.title?(r.openBlock(),r.createElementBlock("span",{key:0,class:r.normalizeClass(["text-sm leading-relaxed select-none transition-colors",[e.disabled?"text-gray-400 dark:text-gray-500":"text-gray-700 dark:text-gray-300 group-hover:text-gray-900 dark:group-hover:text-gray-100"]])},r.toDisplayString(e.title),3)):r.createCommentVNode("",!0)],2)]))],10,tj),[[r.vShow,s.value]]),i.error?(r.openBlock(),r.createElementBlock("p",ij,r.toDisplayString(i.error),1)):r.createCommentVNode("",!0)],2))}}),[["__scopeId","data-v-c4b1f449"]]),sj={class:"w-full"},aj={key:0,class:"mb-4"},lj={key:0,class:"h-6 w-48 rounded bg-gray-200 dark:bg-gray-700 animate-pulse"},cj={key:1,class:"text-sm font-medium text-gray-900 dark:text-gray-100"},dj={key:0,class:"ml-1 text-destructive"},uj={key:0,class:"flex items-center gap-2 text-sm text-gray-500 dark:text-neutral-400 mb-4"},fj={key:1,class:"flex flex-wrap gap-4"},hj={key:0,class:"text-center py-8 text-gray-500 dark:text-gray-400"},mj={key:1,class:"flex flex-wrap gap-x-6 gap-y-4"},pj={key:3,class:"flex items-center gap-1 text-sm text-red-500 mt-4"},wp=Sn(r.defineComponent({name:"DCodeCardCheckboxList",inheritAttrs:!1,__name:"DCodeCardCheckboxList",props:{modelValue:{default:()=>[]},icon:{},itemTitle:{default:"name"},itemValue:{default:"id"},label:{default:""},options:{default:()=>[]},items:{default:()=>[]},apiUrl:{default:""},apiMethod:{default:"GET"},apiModule:{},apiAction:{},endpoint:{},dataPath:{default:""},layout:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},required:{type:Boolean,default:!1},visible:{type:Boolean,default:!0},error:{default:null},size:{default:"md"},color:{default:"blue"},model:{default:"id"},id:{default:""},columns:{default:2},apiParams:{default:()=>({})},returnArray:{type:Boolean,default:!0},skeleton:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(e,{emit:t}){r.useAttrs();const{apiUrl:n,DCodeApi:o}=r.inject("externalApi")||{},i=t,s=e,a=r.ref(new Set);r.watch(()=>s.modelValue,I=>{if(!I){a.value=new Set;return}const D=I.map(w=>typeof w=="object"&&w!==null?w.id!==void 0?w.id:w.value:w);a.value=new Set(D)},{immediate:!0,deep:!0});const l=r.ref([]),c=r.ref(!1),d=r.ref(null),f=async()=>{const I=s.endpoint?.apiUrl||s.apiUrl;if(!(!I&&!s.apiModule&&!s.apiAction)){c.value=!0,d.value=null;try{let D;const w=s.endpoint?.apiMethod||s.apiMethod||"GET",E={page:1,perPage:100,...s.apiParams};I?D=await n(I,w,E):s.apiModule&&s.apiAction&&o&&(D=await o(s.apiModule,s.apiAction,E));let F=D;s.dataPath?F=s.dataPath.split(".").reduce((P,q)=>P&&P[q]!==void 0?P[q]:void 0,D):typeof D=="object"&&!Array.isArray(D)&&D.data&&(F=D.data),Array.isArray(F)?l.value=F:(console.warn("DCodeCardCheckboxList: Format response tidak terdeteksi sebagai Array. Gunakan prop 'dataPath'."),d.value="Format respons data tidak valid. Array tidak ditemukan.")}catch(D){console.error("DCodeCardCheckboxList fetch error:",D),d.value="Gagal memuat data dari endpoint."}finally{c.value=!1}}},h=r.ref(!1);let p=null;const g=()=>{typeof document<"u"&&(h.value=document.documentElement.classList.contains("dark")||document.body.classList.contains("dark"))};r.onMounted(()=>{(s.endpoint?.apiUrl||s.apiUrl||s.apiModule&&s.apiAction)&&f(),g(),typeof document<"u"&&(p=new MutationObserver(g),p.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]}),p.observe(document.body,{attributes:!0,attributeFilter:["class"]}))}),r.onBeforeUnmount(()=>{p&&p.disconnect()});const y=r.computed(()=>s.options&&s.options.length>0?s.options:s.items&&s.items.length>0?s.items:l.value),b=I=>{if(typeof I!="object"||I===null)return I;const D=s.itemValue||s.model||"id";return I[D]},_=I=>{if(typeof I!="object"||I===null)return String(I);const D=s.itemTitle||"name";return I[D]},x=I=>a.value.has(I),B=(I,D)=>{if(s.disabled)return;const w=new Set(a.value);D?w.add(I):w.delete(I),a.value=w;const E=Array.from(a.value);i("update:modelValue",E),i("change",E)};r.watch(()=>s.endpoint?.apiUrl||s.apiUrl,(I,D)=>{I&&I!==D&&f()});const R=r.computed(()=>s.skeleton||c.value),S=r.computed(()=>!!s.error||!!d.value),O=r.computed(()=>s.error||d.value);return(I,D)=>r.withDirectives((r.openBlock(),r.createElementBlock("div",sj,[e.label||R.value?(r.openBlock(),r.createElementBlock("div",aj,[R.value?(r.openBlock(),r.createElementBlock("div",lj)):(r.openBlock(),r.createElementBlock("h3",cj,[r.createTextVNode(r.toDisplayString(e.label)+" ",1),e.required?(r.openBlock(),r.createElementBlock("span",dj,"*")):r.createCommentVNode("",!0)]))])):r.createCommentVNode("",!0),r.createElementVNode("div",null,[c.value?(r.openBlock(),r.createElementBlock("div",uj,[r.createVNode(r.unref(Ae.Loader2),{class:"w-4 h-4 animate-spin"}),D[0]||(D[0]=r.createTextVNode(" Sedang memuat opsi... ",-1))])):r.createCommentVNode("",!0),R.value?(r.openBlock(),r.createElementBlock("div",fj,[(r.openBlock(),r.createElementBlock(r.Fragment,null,r.renderList(6,w=>r.createElementVNode("div",{key:`skeleton-${w}`,class:"flex items-center gap-2.5 min-w-[120px]"},[...D[1]||(D[1]=[r.createElementVNode("div",{class:"h-4 w-4 rounded bg-gray-200 dark:bg-gray-700 animate-pulse flex-shrink-0"},null,-1),r.createElementVNode("div",{class:"h-4 w-24 rounded bg-gray-200 dark:bg-gray-700 animate-pulse"},null,-1)])])),64))])):(r.openBlock(),r.createElementBlock(r.Fragment,{key:2},[y.value.length===0?(r.openBlock(),r.createElementBlock("div",hj," Tidak ada data ")):(r.openBlock(),r.createElementBlock("div",mj,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(y.value,(w,E)=>(r.openBlock(),r.createElementBlock("div",{key:E,class:"flex items-start"},[r.createVNode(Di,{"model-value":x(b(w)),title:_(w),disabled:e.disabled,"onUpdate:modelValue":F=>B(b(w),F)},null,8,["model-value","title","disabled","onUpdate:modelValue"])]))),128))]))],64)),S.value&&O.value?(r.openBlock(),r.createElementBlock("div",pj,[r.createVNode(r.unref(Ae.AlertCircle),{class:"w-4 h-4 flex-shrink-0"}),r.createTextVNode(" "+r.toDisplayString(O.value),1)])):r.createCommentVNode("",!0)])],512)),[[r.vShow,e.visible]])}}),[["__scopeId","data-v-9fb8103d"]]),gj=["aria-busy"],bj={key:0,class:"h-4 w-32 rounded bg-gray-200 dark:bg-gray-700 animate-pulse"},yj={class:"relative w-full"},vj={key:1,class:"flex justify-end"},wj=["for"],kj={key:0,class:"ml-1 text-destructive"},_j={class:"relative w-full group"},xj={class:"flex items-center self-stretch px-3 bg-gray-50 dark:bg-neutral-800 border-r border-gray-300 dark:border-gray-700 flex-shrink-0"},Ej={class:"text-sm font-semibold text-gray-500 dark:text-gray-400 whitespace-nowrap select-none"},Cj=["id","disabled","readonly","placeholder"],Sj={key:0,class:"flex items-center pr-3"},Aj={key:0,class:"absolute top-full right-0 z-10 text-[11px] text-gray-400 dark:text-gray-500 opacity-0 transition-opacity pointer-events-none group-focus-within:opacity-100 mt-0.5"},Tj={key:1,class:"flex items-center gap-1 text-xs text-destructive"},kp=Sn(r.defineComponent({name:"DCodeCurrencyField",inheritAttrs:!1,__name:"DCodeCurrencyField",props:{modelValue:{},label:{default:""},placeholder:{},clearable:{type:Boolean},required:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},visible:{type:Boolean,default:!0},skeleton:{type:Boolean,default:!1},error:{default:null},currency:{default:"IDR"},locale:{},hideClearWhenEmpty:{type:Boolean,default:!0},prependInner:{},showCharCount:{type:Boolean,default:!0},minValue:{},maxValue:{},size:{default:"default"},rounded:{default:"lg"}},emits:["update:modelValue","clear"],setup(e,{emit:t}){const n=r.useAttrs(),o=r.computed(()=>Zn(s.size)),i=t,s=e,a=Math.random().toString(36).slice(2,7),l=r.computed(()=>`app-currency-field-${n.id||s.label||"currency-field"}-${a}`),c=r.computed(()=>{const re=n.required,ie=n["aria-required"];return re===""||re===!0||re==="true"||(ie==="true"||ie===!0)||s.required}),d=r.computed(()=>{const re=n.maxlength??n.maxLength;let ie=Number.NaN;return typeof re=="number"?ie=re:typeof re=="string"&&(ie=Number.parseInt(re,10)),Number.isFinite(ie)&&ie>0?ie:void 0}),f=r.computed(()=>d.value??15),h={IDR:"id-ID",USD:"en-US",EUR:"de-DE",JPY:"ja-JP",SGD:"en-SG",GBP:"en-GB",CNY:"zh-CN",KRW:"ko-KR",AUD:"en-AU",HKD:"zh-HK",CHF:"de-CH",CAD:"en-CA",NZD:"en-NZ",SEK:"sv-SE",NOK:"nb-NO",DKK:"da-DK",PLN:"pl-PL",TRY:"tr-TR",RUB:"ru-RU",INR:"en-IN",BRL:"pt-BR",MXN:"es-MX",THB:"th-TH",MYR:"ms-MY",PHP:"en-PH",VND:"vi-VN"},p=r.computed(()=>s.locale?s.locale:s.currency&&h[s.currency]?h[s.currency]:"en-US"),g={IDR:"Rp",USD:"$",EUR:"€",JPY:"¥",SGD:"S$",GBP:"£",CNY:"¥",KRW:"₩",AUD:"A$",HKD:"HK$",CHF:"CHF",CAD:"C$",NZD:"NZ$",SEK:"kr",NOK:"kr",DKK:"kr",PLN:"zł",TRY:"₺",RUB:"₽",INR:"₹",BRL:"R$",MXN:"Mex$",THB:"฿",MYR:"RM",PHP:"₱",VND:"₫"},y=r.computed(()=>s.prependInner?s.prependInner:s.currency&&g[s.currency]?g[s.currency]:s.currency),b=r.computed(()=>new Intl.NumberFormat(p.value,{style:"decimal",minimumFractionDigits:0,maximumFractionDigits:0})),_=re=>b.value.format(re),x=r.ref(""),B=r.ref(null);r.watch([()=>s.modelValue,()=>s.currency],([re])=>{if(re==null)x.value="";else{const ie=_(re);x.value!==ie&&(x.value=ie)}},{immediate:!0});const R=(re,ie)=>{let le=0;for(let X=0;X<ie;X++)/\d/.test(re[X])&&le++;return le},S=(re,ie)=>{let le=0;for(let X=0;X<re.length;X++)if(/\d/.test(re[X])&&(le++,le===ie))return X+1;return re.length},O=re=>{const ie=re.target,le=ie.value,X=ie.selectionStart??le.length,K=le.replace(/\D/g,"");if(K===""){x.value="",i("update:modelValue",null);return}let W=K;K.length>f.value&&(W=K.slice(0,f.value));const se=Number(W),H=_(se);if(le!==H){const N=R(le,X);x.value=H,r.nextTick(()=>{if(B.value){const j=S(H,N);B.value.setSelectionRange(j,j)}})}i("update:modelValue",se)},I=()=>{x.value="",i("update:modelValue",null),i("clear")},D=r.computed(()=>!s.clearable||s.disabled||s.readonly?!1:s.hideClearWhenEmpty?x.value.length>0:!0),w=r.computed(()=>!!s.error||!!E.value),E=r.computed(()=>{if(s.modelValue===null||s.modelValue===void 0)return null;const re=s.modelValue;return s.minValue!==void 0&&s.minValue!==null&&re<s.minValue?`Minimum value is ${y.value} ${_(s.minValue)}`:s.maxValue!==void 0&&s.maxValue!==null&&re>s.maxValue?`Maximum value is ${y.value} ${_(s.maxValue)}`:null}),F=r.computed(()=>{const{class:re,maxlength:ie,maxLength:le,...X}=n;return X}),A=r.computed(()=>x.value.replace(/\D/g,"").length),P=r.computed(()=>s.showCharCount?(d.value??0)>0:!1),q=r.computed(()=>P.value&&A.value>0),Q=r.computed(()=>`${A.value} / ${d.value}`);return(re,ie)=>r.withDirectives((r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["flex flex-col gap-1.5 w-full",[r.unref(n).class,s.disabled?"cursor-not-allowed":""]]),"aria-busy":s.skeleton},[s.skeleton?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[e.label?(r.openBlock(),r.createElementBlock("div",bj)):r.createCommentVNode("",!0),r.createElementVNode("div",yj,[r.createElementVNode("div",{class:r.normalizeClass(["w-full bg-gray-200 dark:bg-gray-700 animate-pulse",[r.unref(Zn)(s.size),r.unref(sn)(s.rounded)]])},null,2)]),P.value?(r.openBlock(),r.createElementBlock("div",vj,[...ie[1]||(ie[1]=[r.createElementVNode("div",{class:"h-3 w-14 rounded bg-gray-200 dark:bg-gray-700 animate-pulse"},null,-1)])])):r.createCommentVNode("",!0)],64)):(r.openBlock(),r.createElementBlock(r.Fragment,{key:1},[e.label?(r.openBlock(),r.createElementBlock("label",{key:0,for:l.value,class:"text-sm font-medium text-gray-700 dark:text-gray-300"},[r.createTextVNode(r.toDisplayString(e.label)+" ",1),c.value?(r.openBlock(),r.createElementBlock("span",kj,"*")):r.createCommentVNode("",!0)],8,wj)):r.createCommentVNode("",!0),r.createElementVNode("div",_j,[r.createElementVNode("div",{class:r.normalizeClass(["flex items-center w-full border overflow-hidden transition-all duration-200",r.unref(sn)(s.rounded),"bg-white dark:bg-neutral-800 border-gray-300 dark:border-neutral-700/50",w.value?"border-destructive ring-1 ring-destructive":"border-gray-300 dark:border-gray-700 focus-within:border-neutral-400 focus-within:ring-1 focus-within:ring-neutral-400 dark:focus-within:border-neutral-600 dark:focus-within:ring-neutral-600",s.disabled?"opacity-50 cursor-not-allowed bg-gray-50 dark:bg-neutral-800":"",s.readonly?"bg-neutral-50/50 dark:bg-neutral-900/30":""])},[r.createElementVNode("div",xj,[r.createElementVNode("span",Ej,r.toDisplayString(y.value),1)]),r.withDirectives(r.createElementVNode("input",r.mergeProps({id:l.value,ref_key:"inputRef",ref:B,"onUpdate:modelValue":ie[0]||(ie[0]=le=>x.value=le),onInput:O,type:"text",inputmode:"numeric"},F.value,{disabled:s.disabled,readonly:s.readonly,placeholder:s.placeholder,class:["flex-1 min-w-0 bg-transparent text-foreground dark:text-gray-300 outline-none focus:outline-none focus-visible:outline-none placeholder:text-gray-400",o.value]}),null,16,Cj),[[r.vModelText,x.value]]),D.value?(r.openBlock(),r.createElementBlock("div",Sj,[r.createVNode(Lr,{disabled:s.disabled||s.readonly,onClear:I},null,8,["disabled"])])):r.createCommentVNode("",!0)],2),q.value?(r.openBlock(),r.createElementBlock("p",Aj,r.toDisplayString(Q.value),1)):r.createCommentVNode("",!0)]),w.value?(r.openBlock(),r.createElementBlock("p",Tj,[r.createVNode(r.unref(Ae.AlertCircle),{class:"w-3.5 h-3.5 flex-shrink-0"}),r.createTextVNode(" "+r.toDisplayString(E.value||s.error),1)])):r.createCommentVNode("",!0)],64))],10,gj)),[[r.vShow,e.visible]])}}),[["__scopeId","data-v-20fdce60"]]),Bj=["aria-busy"],Pj={key:0,class:"h-4 w-32 rounded bg-gray-200 dark:bg-gray-700 animate-pulse"},Nj={class:"relative w-full"},Dj={key:1,class:"flex justify-end"},Mj=["for"],Rj={key:0,class:"ml-1 text-destructive"},Ij={class:"relative w-full group"},Oj=["id","value","disabled","readonly","placeholder"],Lj={key:0,class:"flex items-center pr-3"},Fj={class:"flex items-center self-stretch px-3 bg-gray-50 dark:bg-neutral-800 border-l border-gray-300 dark:border-gray-700"},$j={class:"text-sm font-semibold text-gray-500 dark:text-gray-400 whitespace-nowrap select-none"},zj={key:0,class:"absolute top-full right-0 z-10 text-[11px] text-gray-400 dark:text-gray-500 opacity-0 transition-opacity pointer-events-none group-focus-within:opacity-100 mt-0.5"},jj={key:1,class:"flex items-center gap-1 text-xs text-destructive"},_p=r.defineComponent({name:"DCodePercentField",inheritAttrs:!1,__name:"DCodePercentField",props:{modelValue:{},label:{},placeholder:{},clearable:{type:Boolean},required:{type:Boolean},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},visible:{type:Boolean,default:!0},skeleton:{type:Boolean,default:!1},error:{default:null},locale:{},hideClearWhenEmpty:{type:Boolean,default:!0},suffix:{default:"%"},showCharCount:{type:Boolean,default:!0},minValue:{default:0},maxValue:{default:100},minLength:{default:0},maxLength:{default:10},returnNumber:{type:Boolean,default:!1},size:{default:"default"},rounded:{default:"lg"}},emits:["update:modelValue","clear"],setup(e,{emit:t}){const n=r.useAttrs(),o=r.computed(()=>Zn(s.size)),i=t,s=e,a=Math.random().toString(36).slice(2,7),l=r.computed(()=>`app-percent-field-${n.id||s.label||"percent-field"}-${a}`),c=r.computed(()=>{const P=n.required,q=n["aria-required"];return P===""||P===!0||P==="true"||(q==="true"||q===!0)||s.required}),d=r.computed(()=>{const P=n.maxlength??n.maxLength;let q=Number.NaN;return typeof P=="number"?q=P:typeof P=="string"&&(q=Number.parseInt(P,10)),Number.isFinite(q)&&q>0?q:void 0}),f=r.computed(()=>s.locale?s.locale:"en-US"),h=r.computed(()=>new Intl.NumberFormat(f.value,{style:"decimal",useGrouping:!1,minimumFractionDigits:0,maximumFractionDigits:s.maxLength||20})),p=P=>{const Q=f.value==="id-ID"||f.value==="id"?P.replace(/[^0-9,]/g,"").replace(",","."):P.replace(/[^0-9.]/g,"");if(!Q)return null;const re=Number(Q);return isNaN(re)?null:re},g=P=>h.value.format(P),y=r.ref(""),b=r.ref(null);r.watch(()=>s.modelValue,P=>{if(P==null||P==="")y.value="";else{const q=typeof P=="string"?Number(P):P;p(y.value)!==q&&(y.value=g(q))}},{immediate:!0});const _=P=>{const q=P.target,Q=q.value;q.selectionStart??Q.length;const re=f.value==="id-ID"||f.value==="id",ie=re?",":".",le=re?".":",";let X=Q.replace(le,ie),K=re?X.replace(/[^0-9,]/g,""):X.replace(/[^0-9.]/g,"");const W=K.split(ie);if(W.length>2&&(K=W[0]+ie+W.slice(1).join("")),W.length===2&&W[1].length>10&&(K=W[0]+ie+W[1].slice(0,10)),s.maxLength&&K.replace(ie,"").length>s.maxLength)if(K.includes(ie)){const j=K.indexOf(ie),Y=K.slice(0,j),J=K.slice(j+1);if(Y.length>=s.maxLength)K=Y.slice(0,s.maxLength);else{const U=s.maxLength-Y.length;K=Y+ie+J.slice(0,U)}}else K=K.slice(0,s.maxLength);if(!K.includes(ie)&&K.length>1&&K.startsWith("0")&&(K=K.replace(/^0+/,"")||"0"),K===""||K===ie){y.value=K,i("update:modelValue",null);return}const se=p(K);if(se===null)return;g(se),y.value=K;const H=s.returnNumber?se:se!==null?String(se):null;i("update:modelValue",H),r.nextTick(()=>{b.value&&b.value.value!==y.value&&(b.value.value=y.value)})},x=P=>{if(["Backspace","Delete","Tab","Escape","Enter","ArrowLeft","ArrowRight","Home","End"].includes(P.key)||(P.ctrlKey||P.metaKey)&&["a","c","v","x"].includes(P.key.toLowerCase()))return;const Q=f.value==="id-ID"||f.value==="id",re=Q?",":".",ie=Q?".":",";if(P.key===re||P.key===ie){y.value.includes(re)&&P.preventDefault();return}/^[0-9]$/.test(P.key)||P.preventDefault()},B=()=>{},R=()=>{y.value="",i("update:modelValue",null),i("clear")},S=r.computed(()=>!s.clearable||s.disabled||s.readonly?!1:s.hideClearWhenEmpty?y.value.length>0:!0),O=r.computed(()=>!!s.error||!!I.value),I=r.computed(()=>{if(s.modelValue===null||s.modelValue===void 0||s.modelValue==="")return null;const P=typeof s.modelValue=="string"?Number(s.modelValue):s.modelValue;return s.minValue!==void 0&&s.minValue!==null&&P<s.minValue?`Minimum value is ${s.minValue}${s.suffix}`:s.maxValue!==void 0&&s.maxValue!==null&&P>s.maxValue?`Maximum value is ${s.maxValue}${s.suffix}`:null}),D=r.computed(()=>{const{class:P,maxlength:q,maxLength:Q,...re}=n;return re}),w=r.computed(()=>y.value.replace(/[^0-9]/g,"").length),E=r.computed(()=>s.showCharCount?(d.value??0)>0:!1),F=r.computed(()=>E.value&&w.value>0),A=r.computed(()=>`${w.value} / ${d.value}`);return(P,q)=>r.withDirectives((r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["flex flex-col gap-1.5 w-full",[r.unref(n).class,s.disabled?"cursor-not-allowed":""]]),"aria-busy":s.skeleton},[s.skeleton?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[e.label?(r.openBlock(),r.createElementBlock("div",Pj)):r.createCommentVNode("",!0),r.createElementVNode("div",Nj,[r.createElementVNode("div",{class:r.normalizeClass(["w-full bg-gray-200 dark:bg-gray-700 animate-pulse",[r.unref(Zn)(s.size),r.unref(sn)(s.rounded)]])},null,2)]),E.value?(r.openBlock(),r.createElementBlock("div",Dj,[...q[0]||(q[0]=[r.createElementVNode("div",{class:"h-3 w-14 rounded bg-gray-200 dark:bg-gray-700 animate-pulse"},null,-1)])])):r.createCommentVNode("",!0)],64)):(r.openBlock(),r.createElementBlock(r.Fragment,{key:1},[e.label?(r.openBlock(),r.createElementBlock("label",{key:0,for:l.value,class:"text-sm font-medium text-gray-700 dark:text-gray-300"},[r.createTextVNode(r.toDisplayString(e.label)+" ",1),c.value?(r.openBlock(),r.createElementBlock("span",Rj,"*")):r.createCommentVNode("",!0)],8,Mj)):r.createCommentVNode("",!0),r.createElementVNode("div",Ij,[r.createElementVNode("div",{class:r.normalizeClass(["flex items-center w-full border overflow-hidden transition-all duration-200",r.unref(sn)(s.rounded),"bg-white dark:bg-neutral-800 border-gray-300 dark:border-neutral-700/50",O.value?"border-destructive ring-1 ring-destructive":"border-gray-300 dark:border-gray-700 focus-within:border-neutral-400 focus-within:ring-1 focus-within:ring-neutral-400 dark:focus-within:border-neutral-600 dark:focus-within:ring-neutral-600",s.disabled?"opacity-50 cursor-not-allowed bg-gray-50 dark:bg-neutral-800":"",s.readonly?"bg-neutral-50/50 dark:bg-neutral-900/30":""])},[r.createElementVNode("input",r.mergeProps({id:l.value,ref_key:"inputRef",ref:b,value:y.value,onInput:_,onKeydown:x,onBlur:B,type:"text",inputmode:"decimal"},D.value,{disabled:s.disabled,readonly:s.readonly,placeholder:s.placeholder,class:["flex-1 min-w-0 bg-transparent text-foreground dark:text-gray-300 outline-none placeholder:text-gray-400",o.value]}),null,16,Oj),S.value?(r.openBlock(),r.createElementBlock("div",Lj,[r.createVNode(Lr,{disabled:s.disabled||s.readonly,onClear:R},null,8,["disabled"])])):r.createCommentVNode("",!0),r.createElementVNode("div",Fj,[r.createElementVNode("span",$j,r.toDisplayString(e.suffix),1)])],2),F.value?(r.openBlock(),r.createElementBlock("p",zj,r.toDisplayString(A.value),1)):r.createCommentVNode("",!0)]),O.value?(r.openBlock(),r.createElementBlock("p",jj,[r.createVNode(r.unref(Ae.AlertCircle),{class:"w-3.5 h-3.5 flex-shrink-0"}),r.createTextVNode(" "+r.toDisplayString(I.value||s.error),1)])):r.createCommentVNode("",!0)],64))],10,Bj)),[[r.vShow,e.visible]])}}),t2=6048e5,Uj=864e5,Jy=6e4,Qy=36e5,Wj=1e3,n2=Symbol.for("constructDateFrom");function so(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&n2 in e?e[n2](t):e instanceof Date?new e.constructor(t):new Date(t)}function cn(e,t){return so(t||e,e)}function $r(e,t,n){const o=cn(e,n?.in);return isNaN(t)?so(n?.in||e,NaN):(t&&o.setDate(o.getDate()+t),o)}function gd(e,t,n){const o=cn(e,n?.in);if(isNaN(t))return so(e,NaN);if(!t)return o;const i=o.getDate(),s=so(e,o.getTime());s.setMonth(o.getMonth()+t+1,0);const a=s.getDate();return i>=a?s:(o.setFullYear(s.getFullYear(),s.getMonth(),i),o)}function xp(e,t){const n=cn(e,t?.in).getDay();return n===0||n===6}let Hj={};function bd(){return Hj}function qa(e,t){const n=bd(),o=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,i=cn(e,t?.in),s=i.getDay(),a=(s<o?7:0)+s-o;return i.setDate(i.getDate()-a),i.setHours(0,0,0,0),i}function yd(e,t){return qa(e,{...t,weekStartsOn:1})}function o2(e,t){const n=cn(e,t?.in),o=n.getFullYear(),i=so(n,0);i.setFullYear(o+1,0,4),i.setHours(0,0,0,0);const s=yd(i),a=so(n,0);a.setFullYear(o,0,4),a.setHours(0,0,0,0);const l=yd(a);return n.getTime()>=s.getTime()?o+1:n.getTime()>=l.getTime()?o:o-1}function Ep(e){const t=cn(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function Vy(e,...t){const n=so.bind(null,e||t.find(o=>typeof o=="object"));return t.map(n)}function dn(e,t){const n=cn(e,t?.in);return n.setHours(0,0,0,0),n}function qj(e,t,n){const[o,i]=Vy(n?.in,e,t),s=dn(o),a=dn(i),l=+s-Ep(s),c=+a-Ep(a);return Math.round((l-c)/Uj)}function Kj(e,t){const n=o2(e,t),o=so(e,0);return o.setFullYear(n,0,4),o.setHours(0,0,0,0),yd(o)}function ff(e,t,n){return gd(e,t*12,n)}function ri(e,t,n){const[o,i]=Vy(n?.in,e,t);return+dn(o)==+dn(i)}function Gj(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function zr(e){return!(!Gj(e)&&typeof e!="number"||isNaN(+cn(e)))}function Ka(e,t){const n=cn(e,t?.in);return n.setHours(23,59,59,999),n}function Fo(e,t){const n=cn(e,t?.in);return n.setDate(1),n.setHours(0,0,0,0),n}function Yj(e,t){const n=cn(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}const Zj={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},Xj=(e,t,n)=>{let o;const i=Zj[e];return typeof i=="string"?o=i:t===1?o=i.one:o=i.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+o:o+" ago":o};function vd(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const Jj={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Qj={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Vj={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},eU={date:vd({formats:Jj,defaultWidth:"full"}),time:vd({formats:Qj,defaultWidth:"full"}),dateTime:vd({formats:Vj,defaultWidth:"full"})},tU={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},nU=(e,t,n,o)=>tU[e];function ds(e){return(t,n)=>{const o=n?.context?String(n.context):"standalone";let i;if(o==="formatting"&&e.formattingValues){const a=e.defaultFormattingWidth||e.defaultWidth,l=n?.width?String(n.width):a;i=e.formattingValues[l]||e.formattingValues[a]}else{const a=e.defaultWidth,l=n?.width?String(n.width):e.defaultWidth;i=e.values[l]||e.values[a]}const s=e.argumentCallback?e.argumentCallback(t):t;return i[s]}}const oU={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},rU={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},iU={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},sU={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},aU={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},lU={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},cU={ordinalNumber:(e,t)=>{const n=Number(e),o=n%100;if(o>20||o<10)switch(o%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:ds({values:oU,defaultWidth:"wide"}),quarter:ds({values:rU,defaultWidth:"wide",argumentCallback:e=>e-1}),month:ds({values:iU,defaultWidth:"wide"}),day:ds({values:sU,defaultWidth:"wide"}),dayPeriod:ds({values:aU,defaultWidth:"wide",formattingValues:lU,defaultFormattingWidth:"wide"})};function us(e){return(t,n={})=>{const o=n.width,i=o&&e.matchPatterns[o]||e.matchPatterns[e.defaultMatchWidth],s=t.match(i);if(!s)return null;const a=s[0],l=o&&e.parsePatterns[o]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(l)?uU(l,h=>h.test(a)):dU(l,h=>h.test(a));let d;d=e.valueCallback?e.valueCallback(c):c,d=n.valueCallback?n.valueCallback(d):d;const f=t.slice(a.length);return{value:d,rest:f}}}function dU(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function uU(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function r2(e){return(t,n={})=>{const o=t.match(e.matchPattern);if(!o)return null;const i=o[0],s=t.match(e.parsePattern);if(!s)return null;let a=e.valueCallback?e.valueCallback(s[0]):s[0];a=n.valueCallback?n.valueCallback(a):a;const l=t.slice(i.length);return{value:a,rest:l}}}const fU=/^(\d+)(th|st|nd|rd)?/i,hU=/\d+/i,mU={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},pU={any:[/^b/i,/^(a|c)/i]},gU={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},bU={any:[/1/i,/2/i,/3/i,/4/i]},yU={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},vU={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},wU={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},kU={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},_U={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},xU={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},EU={ordinalNumber:r2({matchPattern:fU,parsePattern:hU,valueCallback:e=>parseInt(e,10)}),era:us({matchPatterns:mU,defaultMatchWidth:"wide",parsePatterns:pU,defaultParseWidth:"any"}),quarter:us({matchPatterns:gU,defaultMatchWidth:"wide",parsePatterns:bU,defaultParseWidth:"any",valueCallback:e=>e+1}),month:us({matchPatterns:yU,defaultMatchWidth:"wide",parsePatterns:vU,defaultParseWidth:"any"}),day:us({matchPatterns:wU,defaultMatchWidth:"wide",parsePatterns:kU,defaultParseWidth:"any"}),dayPeriod:us({matchPatterns:_U,defaultMatchWidth:"any",parsePatterns:xU,defaultParseWidth:"any"})},hf={code:"en-US",formatDistance:Xj,formatLong:eU,formatRelative:nU,localize:cU,match:EU,options:{weekStartsOn:0,firstWeekContainsDate:1}};function CU(e,t){const n=cn(e,t?.in);return qj(n,Yj(n))+1}function i2(e,t){const n=cn(e,t?.in),o=+yd(n)-+Kj(n);return Math.round(o/t2)+1}function ev(e,t){const n=cn(e,t?.in),o=n.getFullYear(),i=bd(),s=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,a=so(t?.in||e,0);a.setFullYear(o+1,0,s),a.setHours(0,0,0,0);const l=qa(a,t),c=so(t?.in||e,0);c.setFullYear(o,0,s),c.setHours(0,0,0,0);const d=qa(c,t);return+n>=+l?o+1:+n>=+d?o:o-1}function SU(e,t){const n=bd(),o=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,i=ev(e,t),s=so(t?.in||e,0);return s.setFullYear(i,0,o),s.setHours(0,0,0,0),qa(s,t)}function s2(e,t){const n=cn(e,t?.in),o=+qa(n,t)-+SU(n,t);return Math.round(o/t2)+1}function Bn(e,t){const n=e<0?"-":"",o=Math.abs(e).toString().padStart(t,"0");return n+o}const Ga={y(e,t){const n=e.getFullYear(),o=n>0?n:1-n;return Bn(t==="yy"?o%100:o,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):Bn(n+1,2)},d(e,t){return Bn(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return n==="am"?"a.m.":"p.m."}},h(e,t){return Bn(e.getHours()%12||12,t.length)},H(e,t){return Bn(e.getHours(),t.length)},m(e,t){return Bn(e.getMinutes(),t.length)},s(e,t){return Bn(e.getSeconds(),t.length)},S(e,t){const n=t.length,o=e.getMilliseconds(),i=Math.trunc(o*Math.pow(10,n-3));return Bn(i,t.length)}},wd={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},a2={G:function(e,t,n){const o=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(o,{width:"abbreviated"});case"GGGGG":return n.era(o,{width:"narrow"});default:return n.era(o,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const o=e.getFullYear(),i=o>0?o:1-o;return n.ordinalNumber(i,{unit:"year"})}return Ga.y(e,t)},Y:function(e,t,n,o){const i=ev(e,o),s=i>0?i:1-i;if(t==="YY"){const a=s%100;return Bn(a,2)}return t==="Yo"?n.ordinalNumber(s,{unit:"year"}):Bn(s,t.length)},R:function(e,t){const n=o2(e);return Bn(n,t.length)},u:function(e,t){const n=e.getFullYear();return Bn(n,t.length)},Q:function(e,t,n){const o=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(o);case"QQ":return Bn(o,2);case"Qo":return n.ordinalNumber(o,{unit:"quarter"});case"QQQ":return n.quarter(o,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(o,{width:"narrow",context:"formatting"});default:return n.quarter(o,{width:"wide",context:"formatting"})}},q:function(e,t,n){const o=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(o);case"qq":return Bn(o,2);case"qo":return n.ordinalNumber(o,{unit:"quarter"});case"qqq":return n.quarter(o,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(o,{width:"narrow",context:"standalone"});default:return n.quarter(o,{width:"wide",context:"standalone"})}},M:function(e,t,n){const o=e.getMonth();switch(t){case"M":case"MM":return Ga.M(e,t);case"Mo":return n.ordinalNumber(o+1,{unit:"month"});case"MMM":return n.month(o,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(o,{width:"narrow",context:"formatting"});default:return n.month(o,{width:"wide",context:"formatting"})}},L:function(e,t,n){const o=e.getMonth();switch(t){case"L":return String(o+1);case"LL":return Bn(o+1,2);case"Lo":return n.ordinalNumber(o+1,{unit:"month"});case"LLL":return n.month(o,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(o,{width:"narrow",context:"standalone"});default:return n.month(o,{width:"wide",context:"standalone"})}},w:function(e,t,n,o){const i=s2(e,o);return t==="wo"?n.ordinalNumber(i,{unit:"week"}):Bn(i,t.length)},I:function(e,t,n){const o=i2(e);return t==="Io"?n.ordinalNumber(o,{unit:"week"}):Bn(o,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):Ga.d(e,t)},D:function(e,t,n){const o=CU(e);return t==="Do"?n.ordinalNumber(o,{unit:"dayOfYear"}):Bn(o,t.length)},E:function(e,t,n){const o=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(o,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(o,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(o,{width:"short",context:"formatting"});default:return n.day(o,{width:"wide",context:"formatting"})}},e:function(e,t,n,o){const i=e.getDay(),s=(i-o.weekStartsOn+8)%7||7;switch(t){case"e":return String(s);case"ee":return Bn(s,2);case"eo":return n.ordinalNumber(s,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,n,o){const i=e.getDay(),s=(i-o.weekStartsOn+8)%7||7;switch(t){case"c":return String(s);case"cc":return Bn(s,t.length);case"co":return n.ordinalNumber(s,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,n){const o=e.getDay(),i=o===0?7:o;switch(t){case"i":return String(i);case"ii":return Bn(i,t.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(o,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(o,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(o,{width:"short",context:"formatting"});default:return n.day(o,{width:"wide",context:"formatting"})}},a:function(e,t,n){const i=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(i,{width:"narrow",context:"formatting"});default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(e,t,n){const o=e.getHours();let i;switch(o===12?i=wd.noon:o===0?i=wd.midnight:i=o/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(i,{width:"narrow",context:"formatting"});default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(e,t,n){const o=e.getHours();let i;switch(o>=17?i=wd.evening:o>=12?i=wd.afternoon:o>=4?i=wd.morning:i=wd.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(i,{width:"narrow",context:"formatting"});default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let o=e.getHours()%12;return o===0&&(o=12),n.ordinalNumber(o,{unit:"hour"})}return Ga.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):Ga.H(e,t)},K:function(e,t,n){const o=e.getHours()%12;return t==="Ko"?n.ordinalNumber(o,{unit:"hour"}):Bn(o,t.length)},k:function(e,t,n){let o=e.getHours();return o===0&&(o=24),t==="ko"?n.ordinalNumber(o,{unit:"hour"}):Bn(o,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):Ga.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):Ga.s(e,t)},S:function(e,t){return Ga.S(e,t)},X:function(e,t,n){const o=e.getTimezoneOffset();if(o===0)return"Z";switch(t){case"X":return c2(o);case"XXXX":case"XX":return Vl(o);default:return Vl(o,":")}},x:function(e,t,n){const o=e.getTimezoneOffset();switch(t){case"x":return c2(o);case"xxxx":case"xx":return Vl(o);default:return Vl(o,":")}},O:function(e,t,n){const o=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+l2(o,":");default:return"GMT"+Vl(o,":")}},z:function(e,t,n){const o=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+l2(o,":");default:return"GMT"+Vl(o,":")}},t:function(e,t,n){const o=Math.trunc(+e/1e3);return Bn(o,t.length)},T:function(e,t,n){return Bn(+e,t.length)}};function l2(e,t=""){const n=e>0?"-":"+",o=Math.abs(e),i=Math.trunc(o/60),s=o%60;return s===0?n+String(i):n+String(i)+t+Bn(s,2)}function c2(e,t){return e%60===0?(e>0?"-":"+")+Bn(Math.abs(e)/60,2):Vl(e,t)}function Vl(e,t=""){const n=e>0?"-":"+",o=Math.abs(e),i=Bn(Math.trunc(o/60),2),s=Bn(o%60,2);return n+i+t+s}const d2=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},u2=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},tv={p:u2,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],o=n[1],i=n[2];if(!i)return d2(e,t);let s;switch(o){case"P":s=t.dateTime({width:"short"});break;case"PP":s=t.dateTime({width:"medium"});break;case"PPP":s=t.dateTime({width:"long"});break;default:s=t.dateTime({width:"full"});break}return s.replace("{{date}}",d2(o,t)).replace("{{time}}",u2(i,t))}},AU=/^D+$/,TU=/^Y+$/,BU=["D","DD","YY","YYYY"];function f2(e){return AU.test(e)}function h2(e){return TU.test(e)}function nv(e,t,n){const o=PU(e,t,n);if(console.warn(o),BU.includes(e))throw new RangeError(o)}function PU(e,t,n){const o=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${o} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const NU=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,DU=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,MU=/^'([^]*?)'?$/,RU=/''/g,IU=/[a-zA-Z]/;function _r(e,t,n){const o=bd(),i=n?.locale??o.locale??hf,s=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,a=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??o.weekStartsOn??o.locale?.options?.weekStartsOn??0,l=cn(e,n?.in);if(!zr(l))throw new RangeError("Invalid time value");let c=t.match(DU).map(f=>{const h=f[0];if(h==="p"||h==="P"){const p=tv[h];return p(f,i.formatLong)}return f}).join("").match(NU).map(f=>{if(f==="''")return{isToken:!1,value:"'"};const h=f[0];if(h==="'")return{isToken:!1,value:OU(f)};if(a2[h])return{isToken:!0,value:f};if(h.match(IU))throw new RangeError("Format string contains an unescaped latin alphabet character `"+h+"`");return{isToken:!1,value:f}});i.localize.preprocessor&&(c=i.localize.preprocessor(l,c));const d={firstWeekContainsDate:s,weekStartsOn:a,locale:i};return c.map(f=>{if(!f.isToken)return f.value;const h=f.value;(!n?.useAdditionalWeekYearTokens&&h2(h)||!n?.useAdditionalDayOfYearTokens&&f2(h))&&nv(h,t,String(e));const p=a2[h[0]];return p(l,h,i.localize,d)}).join("")}function OU(e){const t=e.match(MU);return t?t[1].replace(RU,"'"):e}function m2(e,t){return cn(e,t?.in).getDay()}function Cp(e,t){const n=cn(e,t?.in),o=n.getFullYear(),i=n.getMonth(),s=so(n,0);return s.setFullYear(o,i+1,0),s.setHours(0,0,0,0),s.getDate()}function LU(){return Object.assign({},bd())}function FU(e,t){const n=cn(e,t?.in).getDay();return n===0?7:n}function ii(e,t){return+cn(e)>+cn(t)}function Ya(e,t){return+cn(e)<+cn(t)}function $U(e,t){const n=zU(t)?new t(0):so(t,0);return n.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),n.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),n}function zU(e){return typeof e=="function"&&e.prototype?.constructor===e}const jU=10;class p2{subPriority=0;validate(t,n){return!0}}class UU extends p2{constructor(t,n,o,i,s){super(),this.value=t,this.validateValue=n,this.setValue=o,this.priority=i,s&&(this.subPriority=s)}validate(t,n){return this.validateValue(t,this.value,n)}set(t,n,o){return this.setValue(t,n,this.value,o)}}class WU extends p2{priority=jU;subPriority=-1;constructor(t,n){super(),this.context=t||(o=>so(n,o))}set(t,n){return n.timestampIsSet?t:so(t,$U(t,this.context))}}let yn=class{run(t,n,o,i){const s=this.parse(t,n,o,i);return s?{setter:new UU(s.value,this.validate,this.set,this.priority,this.subPriority),rest:s.rest}:null}validate(t,n,o){return!0}};class HU extends yn{priority=140;parse(t,n,o){switch(n){case"G":case"GG":case"GGG":return o.era(t,{width:"abbreviated"})||o.era(t,{width:"narrow"});case"GGGGG":return o.era(t,{width:"narrow"});default:return o.era(t,{width:"wide"})||o.era(t,{width:"abbreviated"})||o.era(t,{width:"narrow"})}}set(t,n,o){return n.era=o,t.setFullYear(o,0,1),t.setHours(0,0,0,0),t}incompatibleTokens=["R","u","t","T"]}const ho={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},fs={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function mo(e,t){return e&&{value:t(e.value),rest:e.rest}}function eo(e,t){const n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}function hs(e,t){const n=t.match(e);if(!n)return null;if(n[0]==="Z")return{value:0,rest:t.slice(1)};const o=n[1]==="+"?1:-1,i=n[2]?parseInt(n[2],10):0,s=n[3]?parseInt(n[3],10):0,a=n[5]?parseInt(n[5],10):0;return{value:o*(i*Qy+s*Jy+a*Wj),rest:t.slice(n[0].length)}}function g2(e){return eo(ho.anyDigitsSigned,e)}function ao(e,t){switch(e){case 1:return eo(ho.singleDigit,t);case 2:return eo(ho.twoDigits,t);case 3:return eo(ho.threeDigits,t);case 4:return eo(ho.fourDigits,t);default:return eo(new RegExp("^\\d{1,"+e+"}"),t)}}function Sp(e,t){switch(e){case 1:return eo(ho.singleDigitSigned,t);case 2:return eo(ho.twoDigitsSigned,t);case 3:return eo(ho.threeDigitsSigned,t);case 4:return eo(ho.fourDigitsSigned,t);default:return eo(new RegExp("^-?\\d{1,"+e+"}"),t)}}function ov(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;default:return 0}}function b2(e,t){const n=t>0,o=n?t:1-t;let i;if(o<=50)i=e||100;else{const s=o+50,a=Math.trunc(s/100)*100,l=e>=s%100;i=e+a-(l?100:0)}return n?i:1-i}function y2(e){return e%400===0||e%4===0&&e%100!==0}class qU extends yn{priority=130;incompatibleTokens=["Y","R","u","w","I","i","e","c","t","T"];parse(t,n,o){const i=s=>({year:s,isTwoDigitYear:n==="yy"});switch(n){case"y":return mo(ao(4,t),i);case"yo":return mo(o.ordinalNumber(t,{unit:"year"}),i);default:return mo(ao(n.length,t),i)}}validate(t,n){return n.isTwoDigitYear||n.year>0}set(t,n,o){const i=t.getFullYear();if(o.isTwoDigitYear){const a=b2(o.year,i);return t.setFullYear(a,0,1),t.setHours(0,0,0,0),t}const s=!("era"in n)||n.era===1?o.year:1-o.year;return t.setFullYear(s,0,1),t.setHours(0,0,0,0),t}}class KU extends yn{priority=130;parse(t,n,o){const i=s=>({year:s,isTwoDigitYear:n==="YY"});switch(n){case"Y":return mo(ao(4,t),i);case"Yo":return mo(o.ordinalNumber(t,{unit:"year"}),i);default:return mo(ao(n.length,t),i)}}validate(t,n){return n.isTwoDigitYear||n.year>0}set(t,n,o,i){const s=ev(t,i);if(o.isTwoDigitYear){const l=b2(o.year,s);return t.setFullYear(l,0,i.firstWeekContainsDate),t.setHours(0,0,0,0),qa(t,i)}const a=!("era"in n)||n.era===1?o.year:1-o.year;return t.setFullYear(a,0,i.firstWeekContainsDate),t.setHours(0,0,0,0),qa(t,i)}incompatibleTokens=["y","R","u","Q","q","M","L","I","d","D","i","t","T"]}class GU extends yn{priority=130;parse(t,n){return Sp(n==="R"?4:n.length,t)}set(t,n,o){const i=so(t,0);return i.setFullYear(o,0,4),i.setHours(0,0,0,0),yd(i)}incompatibleTokens=["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]}class YU extends yn{priority=130;parse(t,n){return Sp(n==="u"?4:n.length,t)}set(t,n,o){return t.setFullYear(o,0,1),t.setHours(0,0,0,0),t}incompatibleTokens=["G","y","Y","R","w","I","i","e","c","t","T"]}class ZU extends yn{priority=120;parse(t,n,o){switch(n){case"Q":case"QQ":return ao(n.length,t);case"Qo":return o.ordinalNumber(t,{unit:"quarter"});case"QQQ":return o.quarter(t,{width:"abbreviated",context:"formatting"})||o.quarter(t,{width:"narrow",context:"formatting"});case"QQQQQ":return o.quarter(t,{width:"narrow",context:"formatting"});default:return o.quarter(t,{width:"wide",context:"formatting"})||o.quarter(t,{width:"abbreviated",context:"formatting"})||o.quarter(t,{width:"narrow",context:"formatting"})}}validate(t,n){return n>=1&&n<=4}set(t,n,o){return t.setMonth((o-1)*3,1),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]}class XU extends yn{priority=120;parse(t,n,o){switch(n){case"q":case"qq":return ao(n.length,t);case"qo":return o.ordinalNumber(t,{unit:"quarter"});case"qqq":return o.quarter(t,{width:"abbreviated",context:"standalone"})||o.quarter(t,{width:"narrow",context:"standalone"});case"qqqqq":return o.quarter(t,{width:"narrow",context:"standalone"});default:return o.quarter(t,{width:"wide",context:"standalone"})||o.quarter(t,{width:"abbreviated",context:"standalone"})||o.quarter(t,{width:"narrow",context:"standalone"})}}validate(t,n){return n>=1&&n<=4}set(t,n,o){return t.setMonth((o-1)*3,1),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]}class JU extends yn{incompatibleTokens=["Y","R","q","Q","L","w","I","D","i","e","c","t","T"];priority=110;parse(t,n,o){const i=s=>s-1;switch(n){case"M":return mo(eo(ho.month,t),i);case"MM":return mo(ao(2,t),i);case"Mo":return mo(o.ordinalNumber(t,{unit:"month"}),i);case"MMM":return o.month(t,{width:"abbreviated",context:"formatting"})||o.month(t,{width:"narrow",context:"formatting"});case"MMMMM":return o.month(t,{width:"narrow",context:"formatting"});default:return o.month(t,{width:"wide",context:"formatting"})||o.month(t,{width:"abbreviated",context:"formatting"})||o.month(t,{width:"narrow",context:"formatting"})}}validate(t,n){return n>=0&&n<=11}set(t,n,o){return t.setMonth(o,1),t.setHours(0,0,0,0),t}}class QU extends yn{priority=110;parse(t,n,o){const i=s=>s-1;switch(n){case"L":return mo(eo(ho.month,t),i);case"LL":return mo(ao(2,t),i);case"Lo":return mo(o.ordinalNumber(t,{unit:"month"}),i);case"LLL":return o.month(t,{width:"abbreviated",context:"standalone"})||o.month(t,{width:"narrow",context:"standalone"});case"LLLLL":return o.month(t,{width:"narrow",context:"standalone"});default:return o.month(t,{width:"wide",context:"standalone"})||o.month(t,{width:"abbreviated",context:"standalone"})||o.month(t,{width:"narrow",context:"standalone"})}}validate(t,n){return n>=0&&n<=11}set(t,n,o){return t.setMonth(o,1),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]}function VU(e,t,n){const o=cn(e,n?.in),i=s2(o,n)-t;return o.setDate(o.getDate()-i*7),cn(o,n?.in)}class eW extends yn{priority=100;parse(t,n,o){switch(n){case"w":return eo(ho.week,t);case"wo":return o.ordinalNumber(t,{unit:"week"});default:return ao(n.length,t)}}validate(t,n){return n>=1&&n<=53}set(t,n,o,i){return qa(VU(t,o,i),i)}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","i","t","T"]}function tW(e,t,n){const o=cn(e,n?.in),i=i2(o,n)-t;return o.setDate(o.getDate()-i*7),o}class nW extends yn{priority=100;parse(t,n,o){switch(n){case"I":return eo(ho.week,t);case"Io":return o.ordinalNumber(t,{unit:"week"});default:return ao(n.length,t)}}validate(t,n){return n>=1&&n<=53}set(t,n,o){return yd(tW(t,o))}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]}const oW=[31,28,31,30,31,30,31,31,30,31,30,31],rW=[31,29,31,30,31,30,31,31,30,31,30,31];class iW extends yn{priority=90;subPriority=1;parse(t,n,o){switch(n){case"d":return eo(ho.date,t);case"do":return o.ordinalNumber(t,{unit:"date"});default:return ao(n.length,t)}}validate(t,n){const o=t.getFullYear(),i=y2(o),s=t.getMonth();return i?n>=1&&n<=rW[s]:n>=1&&n<=oW[s]}set(t,n,o){return t.setDate(o),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","Q","w","I","D","i","e","c","t","T"]}class sW extends yn{priority=90;subpriority=1;parse(t,n,o){switch(n){case"D":case"DD":return eo(ho.dayOfYear,t);case"Do":return o.ordinalNumber(t,{unit:"date"});default:return ao(n.length,t)}}validate(t,n){const o=t.getFullYear();return y2(o)?n>=1&&n<=366:n>=1&&n<=365}set(t,n,o){return t.setMonth(0,o),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]}function rv(e,t,n){const o=bd(),i=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??o.weekStartsOn??o.locale?.options?.weekStartsOn??0,s=cn(e,n?.in),a=s.getDay(),c=(t%7+7)%7,d=7-i,f=t<0||t>6?t-(a+d)%7:(c+d)%7-(a+d)%7;return $r(s,f,n)}class aW extends yn{priority=90;parse(t,n,o){switch(n){case"E":case"EE":case"EEE":return o.day(t,{width:"abbreviated",context:"formatting"})||o.day(t,{width:"short",context:"formatting"})||o.day(t,{width:"narrow",context:"formatting"});case"EEEEE":return o.day(t,{width:"narrow",context:"formatting"});case"EEEEEE":return o.day(t,{width:"short",context:"formatting"})||o.day(t,{width:"narrow",context:"formatting"});default:return o.day(t,{width:"wide",context:"formatting"})||o.day(t,{width:"abbreviated",context:"formatting"})||o.day(t,{width:"short",context:"formatting"})||o.day(t,{width:"narrow",context:"formatting"})}}validate(t,n){return n>=0&&n<=6}set(t,n,o,i){return t=rv(t,o,i),t.setHours(0,0,0,0),t}incompatibleTokens=["D","i","e","c","t","T"]}class lW extends yn{priority=90;parse(t,n,o,i){const s=a=>{const l=Math.floor((a-1)/7)*7;return(a+i.weekStartsOn+6)%7+l};switch(n){case"e":case"ee":return mo(ao(n.length,t),s);case"eo":return mo(o.ordinalNumber(t,{unit:"day"}),s);case"eee":return o.day(t,{width:"abbreviated",context:"formatting"})||o.day(t,{width:"short",context:"formatting"})||o.day(t,{width:"narrow",context:"formatting"});case"eeeee":return o.day(t,{width:"narrow",context:"formatting"});case"eeeeee":return o.day(t,{width:"short",context:"formatting"})||o.day(t,{width:"narrow",context:"formatting"});default:return o.day(t,{width:"wide",context:"formatting"})||o.day(t,{width:"abbreviated",context:"formatting"})||o.day(t,{width:"short",context:"formatting"})||o.day(t,{width:"narrow",context:"formatting"})}}validate(t,n){return n>=0&&n<=6}set(t,n,o,i){return t=rv(t,o,i),t.setHours(0,0,0,0),t}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]}class cW extends yn{priority=90;parse(t,n,o,i){const s=a=>{const l=Math.floor((a-1)/7)*7;return(a+i.weekStartsOn+6)%7+l};switch(n){case"c":case"cc":return mo(ao(n.length,t),s);case"co":return mo(o.ordinalNumber(t,{unit:"day"}),s);case"ccc":return o.day(t,{width:"abbreviated",context:"standalone"})||o.day(t,{width:"short",context:"standalone"})||o.day(t,{width:"narrow",context:"standalone"});case"ccccc":return o.day(t,{width:"narrow",context:"standalone"});case"cccccc":return o.day(t,{width:"short",context:"standalone"})||o.day(t,{width:"narrow",context:"standalone"});default:return o.day(t,{width:"wide",context:"standalone"})||o.day(t,{width:"abbreviated",context:"standalone"})||o.day(t,{width:"short",context:"standalone"})||o.day(t,{width:"narrow",context:"standalone"})}}validate(t,n){return n>=0&&n<=6}set(t,n,o,i){return t=rv(t,o,i),t.setHours(0,0,0,0),t}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]}function dW(e,t,n){const o=cn(e,n?.in),i=FU(o,n),s=t-i;return $r(o,s,n)}class uW extends yn{priority=90;parse(t,n,o){const i=s=>s===0?7:s;switch(n){case"i":case"ii":return ao(n.length,t);case"io":return o.ordinalNumber(t,{unit:"day"});case"iii":return mo(o.day(t,{width:"abbreviated",context:"formatting"})||o.day(t,{width:"short",context:"formatting"})||o.day(t,{width:"narrow",context:"formatting"}),i);case"iiiii":return mo(o.day(t,{width:"narrow",context:"formatting"}),i);case"iiiiii":return mo(o.day(t,{width:"short",context:"formatting"})||o.day(t,{width:"narrow",context:"formatting"}),i);default:return mo(o.day(t,{width:"wide",context:"formatting"})||o.day(t,{width:"abbreviated",context:"formatting"})||o.day(t,{width:"short",context:"formatting"})||o.day(t,{width:"narrow",context:"formatting"}),i)}}validate(t,n){return n>=1&&n<=7}set(t,n,o){return t=dW(t,o),t.setHours(0,0,0,0),t}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]}class fW extends yn{priority=80;parse(t,n,o){switch(n){case"a":case"aa":case"aaa":return o.dayPeriod(t,{width:"abbreviated",context:"formatting"})||o.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaaa":return o.dayPeriod(t,{width:"narrow",context:"formatting"});default:return o.dayPeriod(t,{width:"wide",context:"formatting"})||o.dayPeriod(t,{width:"abbreviated",context:"formatting"})||o.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,n,o){return t.setHours(ov(o),0,0,0),t}incompatibleTokens=["b","B","H","k","t","T"]}class hW extends yn{priority=80;parse(t,n,o){switch(n){case"b":case"bb":case"bbb":return o.dayPeriod(t,{width:"abbreviated",context:"formatting"})||o.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbbb":return o.dayPeriod(t,{width:"narrow",context:"formatting"});default:return o.dayPeriod(t,{width:"wide",context:"formatting"})||o.dayPeriod(t,{width:"abbreviated",context:"formatting"})||o.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,n,o){return t.setHours(ov(o),0,0,0),t}incompatibleTokens=["a","B","H","k","t","T"]}class mW extends yn{priority=80;parse(t,n,o){switch(n){case"B":case"BB":case"BBB":return o.dayPeriod(t,{width:"abbreviated",context:"formatting"})||o.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBBB":return o.dayPeriod(t,{width:"narrow",context:"formatting"});default:return o.dayPeriod(t,{width:"wide",context:"formatting"})||o.dayPeriod(t,{width:"abbreviated",context:"formatting"})||o.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,n,o){return t.setHours(ov(o),0,0,0),t}incompatibleTokens=["a","b","t","T"]}class pW extends yn{priority=70;parse(t,n,o){switch(n){case"h":return eo(ho.hour12h,t);case"ho":return o.ordinalNumber(t,{unit:"hour"});default:return ao(n.length,t)}}validate(t,n){return n>=1&&n<=12}set(t,n,o){const i=t.getHours()>=12;return i&&o<12?t.setHours(o+12,0,0,0):!i&&o===12?t.setHours(0,0,0,0):t.setHours(o,0,0,0),t}incompatibleTokens=["H","K","k","t","T"]}class gW extends yn{priority=70;parse(t,n,o){switch(n){case"H":return eo(ho.hour23h,t);case"Ho":return o.ordinalNumber(t,{unit:"hour"});default:return ao(n.length,t)}}validate(t,n){return n>=0&&n<=23}set(t,n,o){return t.setHours(o,0,0,0),t}incompatibleTokens=["a","b","h","K","k","t","T"]}class bW extends yn{priority=70;parse(t,n,o){switch(n){case"K":return eo(ho.hour11h,t);case"Ko":return o.ordinalNumber(t,{unit:"hour"});default:return ao(n.length,t)}}validate(t,n){return n>=0&&n<=11}set(t,n,o){return t.getHours()>=12&&o<12?t.setHours(o+12,0,0,0):t.setHours(o,0,0,0),t}incompatibleTokens=["h","H","k","t","T"]}class yW extends yn{priority=70;parse(t,n,o){switch(n){case"k":return eo(ho.hour24h,t);case"ko":return o.ordinalNumber(t,{unit:"hour"});default:return ao(n.length,t)}}validate(t,n){return n>=1&&n<=24}set(t,n,o){const i=o<=24?o%24:o;return t.setHours(i,0,0,0),t}incompatibleTokens=["a","b","h","H","K","t","T"]}class vW extends yn{priority=60;parse(t,n,o){switch(n){case"m":return eo(ho.minute,t);case"mo":return o.ordinalNumber(t,{unit:"minute"});default:return ao(n.length,t)}}validate(t,n){return n>=0&&n<=59}set(t,n,o){return t.setMinutes(o,0,0),t}incompatibleTokens=["t","T"]}class wW extends yn{priority=50;parse(t,n,o){switch(n){case"s":return eo(ho.second,t);case"so":return o.ordinalNumber(t,{unit:"second"});default:return ao(n.length,t)}}validate(t,n){return n>=0&&n<=59}set(t,n,o){return t.setSeconds(o,0),t}incompatibleTokens=["t","T"]}class kW extends yn{priority=30;parse(t,n){const o=i=>Math.trunc(i*Math.pow(10,-n.length+3));return mo(ao(n.length,t),o)}set(t,n,o){return t.setMilliseconds(o),t}incompatibleTokens=["t","T"]}class _W extends yn{priority=10;parse(t,n){switch(n){case"X":return hs(fs.basicOptionalMinutes,t);case"XX":return hs(fs.basic,t);case"XXXX":return hs(fs.basicOptionalSeconds,t);case"XXXXX":return hs(fs.extendedOptionalSeconds,t);default:return hs(fs.extended,t)}}set(t,n,o){return n.timestampIsSet?t:so(t,t.getTime()-Ep(t)-o)}incompatibleTokens=["t","T","x"]}class xW extends yn{priority=10;parse(t,n){switch(n){case"x":return hs(fs.basicOptionalMinutes,t);case"xx":return hs(fs.basic,t);case"xxxx":return hs(fs.basicOptionalSeconds,t);case"xxxxx":return hs(fs.extendedOptionalSeconds,t);default:return hs(fs.extended,t)}}set(t,n,o){return n.timestampIsSet?t:so(t,t.getTime()-Ep(t)-o)}incompatibleTokens=["t","T","X"]}class EW extends yn{priority=40;parse(t){return g2(t)}set(t,n,o){return[so(t,o*1e3),{timestampIsSet:!0}]}incompatibleTokens="*"}class CW extends yn{priority=20;parse(t){return g2(t)}set(t,n,o){return[so(t,o),{timestampIsSet:!0}]}incompatibleTokens="*"}const SW={G:new HU,y:new qU,Y:new KU,R:new GU,u:new YU,Q:new ZU,q:new XU,M:new JU,L:new QU,w:new eW,I:new nW,d:new iW,D:new sW,E:new aW,e:new lW,c:new cW,i:new uW,a:new fW,b:new hW,B:new mW,h:new pW,H:new gW,K:new bW,k:new yW,m:new vW,s:new wW,S:new kW,X:new _W,x:new xW,t:new EW,T:new CW},AW=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,TW=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,BW=/^'([^]*?)'?$/,PW=/''/g,NW=/\S/,DW=/[a-zA-Z]/;function ms(e,t,n,o){const i=()=>so(o?.in||n,NaN),s=LU(),a=o?.locale??s.locale??hf,l=o?.firstWeekContainsDate??o?.locale?.options?.firstWeekContainsDate??s.firstWeekContainsDate??s.locale?.options?.firstWeekContainsDate??1,c=o?.weekStartsOn??o?.locale?.options?.weekStartsOn??s.weekStartsOn??s.locale?.options?.weekStartsOn??0;if(!t)return e?i():cn(n,o?.in);const d={firstWeekContainsDate:l,weekStartsOn:c,locale:a},f=[new WU(o?.in,n)],h=t.match(TW).map(_=>{const x=_[0];if(x in tv){const B=tv[x];return B(_,a.formatLong)}return _}).join("").match(AW),p=[];for(let _ of h){!o?.useAdditionalWeekYearTokens&&h2(_)&&nv(_,t,e),!o?.useAdditionalDayOfYearTokens&&f2(_)&&nv(_,t,e);const x=_[0],B=SW[x];if(B){const{incompatibleTokens:R}=B;if(Array.isArray(R)){const O=p.find(I=>R.includes(I.token)||I.token===x);if(O)throw new RangeError(`The format string mustn't contain \`${O.fullToken}\` and \`${_}\` at the same time`)}else if(B.incompatibleTokens==="*"&&p.length>0)throw new RangeError(`The format string mustn't contain \`${_}\` and any other token at the same time`);p.push({token:x,fullToken:_});const S=B.run(e,_,a.match,d);if(!S)return i();f.push(S.setter),e=S.rest}else{if(x.match(DW))throw new RangeError("Format string contains an unescaped latin alphabet character `"+x+"`");if(_==="''"?_="'":x==="'"&&(_=MW(_)),e.indexOf(_)===0)e=e.slice(_.length);else return i()}}if(e.length>0&&NW.test(e))return i();const g=f.map(_=>_.priority).sort((_,x)=>x-_).filter((_,x,B)=>B.indexOf(_)===x).map(_=>f.filter(x=>x.priority===_).sort((x,B)=>B.subPriority-x.subPriority)).map(_=>_[0]);let y=cn(n,o?.in);if(isNaN(+y))return i();const b={};for(const _ of g){if(!_.validate(y,d))return i();const x=_.set(y,b,d);Array.isArray(x)?(y=x[0],Object.assign(b,x[1])):y=x}return y}function MW(e){return e.match(BW)[1].replace(PW,"'")}function v2(e,t,n){const[o,i]=Vy(n?.in,e,t);return o.getFullYear()===i.getFullYear()&&o.getMonth()===i.getMonth()}function w2(e,t,n){return $r(e,-t,n)}function k2(e,t){const n=()=>so(t?.in,NaN),i=LW(e);let s;if(i.date){const d=FW(i.date,2);s=$W(d.restDateString,d.year)}if(!s||isNaN(+s))return n();const a=+s;let l=0,c;if(i.time&&(l=zW(i.time),isNaN(l)))return n();if(i.timezone){if(c=jW(i.timezone),isNaN(c))return n()}else{const d=new Date(a+l),f=cn(0,t?.in);return f.setFullYear(d.getUTCFullYear(),d.getUTCMonth(),d.getUTCDate()),f.setHours(d.getUTCHours(),d.getUTCMinutes(),d.getUTCSeconds(),d.getUTCMilliseconds()),f}return cn(a+l+c,t?.in)}const Ap={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},RW=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,IW=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,OW=/^([+-])(\d{2})(?::?(\d{2}))?$/;function LW(e){const t={},n=e.split(Ap.dateTimeDelimiter);let o;if(n.length>2)return t;if(/:/.test(n[0])?o=n[0]:(t.date=n[0],o=n[1],Ap.timeZoneDelimiter.test(t.date)&&(t.date=e.split(Ap.timeZoneDelimiter)[0],o=e.substr(t.date.length,e.length))),o){const i=Ap.timezone.exec(o);i?(t.time=o.replace(i[1],""),t.timezone=i[1]):t.time=o}return t}function FW(e,t){const n=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),o=e.match(n);if(!o)return{year:NaN,restDateString:""};const i=o[1]?parseInt(o[1]):null,s=o[2]?parseInt(o[2]):null;return{year:s===null?i:s*100,restDateString:e.slice((o[1]||o[2]).length)}}function $W(e,t){if(t===null)return new Date(NaN);const n=e.match(RW);if(!n)return new Date(NaN);const o=!!n[4],i=mf(n[1]),s=mf(n[2])-1,a=mf(n[3]),l=mf(n[4]),c=mf(n[5])-1;if(o)return KW(t,l,c)?UW(t,l,c):new Date(NaN);{const d=new Date(0);return!HW(t,s,a)||!qW(t,i)?new Date(NaN):(d.setUTCFullYear(t,s,Math.max(i,a)),d)}}function mf(e){return e?parseInt(e):1}function zW(e){const t=e.match(IW);if(!t)return NaN;const n=iv(t[1]),o=iv(t[2]),i=iv(t[3]);return GW(n,o,i)?n*Qy+o*Jy+i*1e3:NaN}function iv(e){return e&&parseFloat(e.replace(",","."))||0}function jW(e){if(e==="Z")return 0;const t=e.match(OW);if(!t)return 0;const n=t[1]==="+"?-1:1,o=parseInt(t[2]),i=t[3]&&parseInt(t[3])||0;return YW(o,i)?n*(o*Qy+i*Jy):NaN}function UW(e,t,n){const o=new Date(0);o.setUTCFullYear(e,0,4);const i=o.getUTCDay()||7,s=(t-1)*7+n+1-i;return o.setUTCDate(o.getUTCDate()+s),o}const WW=[31,null,31,30,31,30,31,31,30,31,30,31];function _2(e){return e%400===0||e%4===0&&e%100!==0}function HW(e,t,n){return t>=0&&t<=11&&n>=1&&n<=(WW[t]||(_2(e)?29:28))}function qW(e,t){return t>=1&&t<=(_2(e)?366:365)}function KW(e,t,n){return t>=1&&t<=53&&n>=0&&n<=6}function GW(e,t,n){return e===24?t===0&&n===0:n>=0&&n<60&&t>=0&&t<60&&e>=0&&e<25}function YW(e,t){return t>=0&&t<=59}function sv(e,t,n){const o=cn(e,n?.in);return o.setHours(t),o}function ZW(e,t,n){const o=cn(e,n?.in);return o.setMinutes(t),o}function XW(e,t,n){const o=cn(e,n?.in);return o.setSeconds(t),o}function Tp(e,t,n){return gd(e,-1,n)}function Bp(e,t,n){return ff(e,-t,n)}const JW={lessThanXSeconds:{one:"kurang dari 1 detik",other:"kurang dari {{count}} detik"},xSeconds:{one:"1 detik",other:"{{count}} detik"},halfAMinute:"setengah menit",lessThanXMinutes:{one:"kurang dari 1 menit",other:"kurang dari {{count}} menit"},xMinutes:{one:"1 menit",other:"{{count}} menit"},aboutXHours:{one:"sekitar 1 jam",other:"sekitar {{count}} jam"},xHours:{one:"1 jam",other:"{{count}} jam"},xDays:{one:"1 hari",other:"{{count}} hari"},aboutXWeeks:{one:"sekitar 1 minggu",other:"sekitar {{count}} minggu"},xWeeks:{one:"1 minggu",other:"{{count}} minggu"},aboutXMonths:{one:"sekitar 1 bulan",other:"sekitar {{count}} bulan"},xMonths:{one:"1 bulan",other:"{{count}} bulan"},aboutXYears:{one:"sekitar 1 tahun",other:"sekitar {{count}} tahun"},xYears:{one:"1 tahun",other:"{{count}} tahun"},overXYears:{one:"lebih dari 1 tahun",other:"lebih dari {{count}} tahun"},almostXYears:{one:"hampir 1 tahun",other:"hampir {{count}} tahun"}},QW=(e,t,n)=>{let o;const i=JW[e];return typeof i=="string"?o=i:t===1?o=i.one:o=i.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"dalam waktu "+o:o+" yang lalu":o},VW={full:"EEEE, d MMMM yyyy",long:"d MMMM yyyy",medium:"d MMM yyyy",short:"d/M/yyyy"},eH={full:"HH.mm.ss",long:"HH.mm.ss",medium:"HH.mm",short:"HH.mm"},tH={full:"{{date}} 'pukul' {{time}}",long:"{{date}} 'pukul' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},nH={date:vd({formats:VW,defaultWidth:"full"}),time:vd({formats:eH,defaultWidth:"full"}),dateTime:vd({formats:tH,defaultWidth:"full"})},oH={lastWeek:"eeee 'lalu pukul' p",yesterday:"'Kemarin pukul' p",today:"'Hari ini pukul' p",tomorrow:"'Besok pukul' p",nextWeek:"eeee 'pukul' p",other:"P"},rH=(e,t,n,o)=>oH[e],iH={narrow:["SM","M"],abbreviated:["SM","M"],wide:["Sebelum Masehi","Masehi"]},sH={narrow:["1","2","3","4"],abbreviated:["K1","K2","K3","K4"],wide:["Kuartal ke-1","Kuartal ke-2","Kuartal ke-3","Kuartal ke-4"]},aH={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","Mei","Jun","Jul","Agt","Sep","Okt","Nov","Des"],wide:["Januari","Februari","Maret","April","Mei","Juni","Juli","Agustus","September","Oktober","November","Desember"]},lH={narrow:["M","S","S","R","K","J","S"],short:["Min","Sen","Sel","Rab","Kam","Jum","Sab"],abbreviated:["Min","Sen","Sel","Rab","Kam","Jum","Sab"],wide:["Minggu","Senin","Selasa","Rabu","Kamis","Jumat","Sabtu"]},cH={narrow:{am:"AM",pm:"PM",midnight:"tengah malam",noon:"tengah hari",morning:"pagi",afternoon:"siang",evening:"sore",night:"malam"},abbreviated:{am:"AM",pm:"PM",midnight:"tengah malam",noon:"tengah hari",morning:"pagi",afternoon:"siang",evening:"sore",night:"malam"},wide:{am:"AM",pm:"PM",midnight:"tengah malam",noon:"tengah hari",morning:"pagi",afternoon:"siang",evening:"sore",night:"malam"}},dH={narrow:{am:"AM",pm:"PM",midnight:"tengah malam",noon:"tengah hari",morning:"pagi",afternoon:"siang",evening:"sore",night:"malam"},abbreviated:{am:"AM",pm:"PM",midnight:"tengah malam",noon:"tengah hari",morning:"pagi",afternoon:"siang",evening:"sore",night:"malam"},wide:{am:"AM",pm:"PM",midnight:"tengah malam",noon:"tengah hari",morning:"pagi",afternoon:"siang",evening:"sore",night:"malam"}},uH={ordinalNumber:(e,t)=>"ke-"+Number(e),era:ds({values:iH,defaultWidth:"wide"}),quarter:ds({values:sH,defaultWidth:"wide",argumentCallback:e=>e-1}),month:ds({values:aH,defaultWidth:"wide"}),day:ds({values:lH,defaultWidth:"wide"}),dayPeriod:ds({values:cH,defaultWidth:"wide",formattingValues:dH,defaultFormattingWidth:"wide"})},fH=/^ke-(\d+)?/i,hH=/\d+/i,mH={narrow:/^(sm|m)/i,abbreviated:/^(s\.?\s?m\.?|s\.?\s?e\.?\s?u\.?|m\.?|e\.?\s?u\.?)/i,wide:/^(sebelum masehi|sebelum era umum|masehi|era umum)/i},pH={any:[/^s/i,/^(m|e)/i]},gH={narrow:/^[1234]/i,abbreviated:/^K-?\s[1234]/i,wide:/^Kuartal ke-?\s?[1234]/i},bH={any:[/1/i,/2/i,/3/i,/4/i]},yH={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|mei|jun|jul|agt|sep|okt|nov|des)/i,wide:/^(januari|februari|maret|april|mei|juni|juli|agustus|september|oktober|november|desember)/i},vH={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^ma/i,/^ap/i,/^me/i,/^jun/i,/^jul/i,/^ag/i,/^s/i,/^o/i,/^n/i,/^d/i]},wH={narrow:/^[srkjm]/i,short:/^(min|sen|sel|rab|kam|jum|sab)/i,abbreviated:/^(min|sen|sel|rab|kam|jum|sab)/i,wide:/^(minggu|senin|selasa|rabu|kamis|jumat|sabtu)/i},kH={narrow:[/^m/i,/^s/i,/^s/i,/^r/i,/^k/i,/^j/i,/^s/i],any:[/^m/i,/^sen/i,/^sel/i,/^r/i,/^k/i,/^j/i,/^sa/i]},_H={narrow:/^(a|p|tengah m|tengah h|(di(\swaktu)?) (pagi|siang|sore|malam))/i,any:/^([ap]\.?\s?m\.?|tengah malam|tengah hari|(di(\swaktu)?) (pagi|siang|sore|malam))/i},xH={any:{am:/^a/i,pm:/^pm/i,midnight:/^tengah m/i,noon:/^tengah h/i,morning:/pagi/i,afternoon:/siang/i,evening:/sore/i,night:/malam/i}},EH={ordinalNumber:r2({matchPattern:fH,parsePattern:hH,valueCallback:e=>parseInt(e,10)}),era:us({matchPatterns:mH,defaultMatchWidth:"wide",parsePatterns:pH,defaultParseWidth:"any"}),quarter:us({matchPatterns:gH,defaultMatchWidth:"wide",parsePatterns:bH,defaultParseWidth:"any",valueCallback:e=>e+1}),month:us({matchPatterns:yH,defaultMatchWidth:"wide",parsePatterns:vH,defaultParseWidth:"any"}),day:us({matchPatterns:wH,defaultMatchWidth:"wide",parsePatterns:kH,defaultParseWidth:"any"}),dayPeriod:us({matchPatterns:_H,defaultMatchWidth:"any",parsePatterns:xH,defaultParseWidth:"any"})},av={code:"id",formatDistance:QW,formatLong:nH,formatRelative:rH,localize:uH,match:EH,options:{weekStartsOn:1,firstWeekContainsDate:1}},x2={primary:{light:{primary:"hsl(var(--primary))",text:"hsl(var(--primary-foreground))",hover:"hsl(var(--accent))",selectedHover:"hsl(var(--primary) / 0.9)",selectedText:"hsl(var(--primary-foreground))",border:"hsl(var(--border))",range:"#bfdbfe"},dark:{primary:"hsl(var(--primary))",text:"hsl(var(--primary-foreground))",hover:"hsl(var(--accent) /0.5)",selectedHover:"hsl(var(--primary) / 0.9)",selectedText:"#ffffff",border:"hsl(var(--border))",range:"rgba(30, 58, 138, 0.3)"}},emerald:{light:{primary:"#16a34a",text:"#ffffff",hover:"#dcfce7",selectedHover:"#15803d",selectedText:"#ffffff",border:"#16a34a",range:"#ecfdf5"},dark:{primary:"#22c55e",text:"#0b1220",hover:"#14532d",selectedHover:"#16a34a",selectedText:"#ffffff",border:"#22c55e",range:"rgba(6, 78, 59, 0.3)"}},amber:{light:{primary:"#d97706",text:"#ffffff",hover:"#fffbeb",selectedHover:"#b45309",selectedText:"#ffffff",border:"#d97706",range:"#fffbeb"},dark:{primary:"#f59e0b",text:"#0b1220",hover:"#78350f",selectedHover:"#d97706",selectedText:"#0b1220",border:"#f59e0b",range:"rgba(120, 53, 15, 0.3)"}},violet:{light:{primary:"#7c3aed",text:"#ffffff",hover:"#f5f3ff",selectedHover:"#6d28d9",selectedText:"#ffffff",border:"#7c3aed",range:"#f5f3ff"},dark:{primary:"#8b5cf6",text:"#0b1220",hover:"#2e1065",selectedHover:"#7c3aed",selectedText:"#ffffff",border:"#8b5cf6",range:"rgba(46, 16, 101, 0.3)"}},destructive:{light:{primary:"hsl(var(--destructive))",text:"hsl(var(--destructive-foreground))",hover:"hsl(var(--destructive) / 0.10)",selectedHover:"hsl(var(--destructive) / 0.8)",selectedText:"hsl(var(--destructive-foreground))",border:"hsl(var(--destructive))",range:"#fef2f2"},dark:{primary:"hsl(var(--destructive))",text:"hsl(var(--destructive-foreground))",hover:"hsl(var(--destructive) / 0.18)",selectedHover:"hsl(var(--destructive) / 0.7)",selectedText:"hsl(var(--destructive-foreground))",border:"hsl(var(--destructive))",range:"rgba(127, 29, 29, 0.3)"}}},E2="dcode-dp-theme-forced";function CH(e,t=E2){const n=x2[e]??x2.primary,o=`
32
32
  .dp__theme_light {
@@ -116,7 +116,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`),$n=tt,tn=_t),Ft===void
116
116
  }
117
117
  `.trim();let i=document.getElementById(t);i||(i=document.createElement("style"),i.id=t,document.head.appendChild(i)),i.textContent=o}function pf(e,t=E2){r.watch(e,n=>CH(n,t),{immediate:!0})}const SH=["for"],AH={key:0,class:"ml-1 text-destructive"},TH=["disabled"],BH={class:"flex-shrink-0 px-2 text-sm text-muted-foreground select-none whitespace-nowrap"},PH=["id","value","placeholder","disabled","readonly"],NH={key:0,class:"border-r border-gray-200 dark:border-neutral-700 p-2 flex flex-col gap-2 w-32 bg-gray-50/50 dark:bg-neutral-900/50 rounded-l-lg"},DH=["onClick"],MH={class:"px-3 py-3 text-center border-b border-gray-100 dark:border-neutral-800 text-sm text-gray-600 dark:text-gray-400"},RH={key:0},IH={key:1},OH={key:0},LH={key:1},FH={key:2},$H={class:"flex items-center justify-between px-3 pt-3 pb-2 text-primary"},zH={class:"text-center font-bold text-gray-800 dark:text-gray-100 pb-3"},jH={class:"px-2 pb-2"},UH={class:"grid grid-cols-7 mb-2 text-center"},WH=["onClick","onMouseenter"],HH={key:0,class:"text-xs text-destructive mt-1"},Pp=r.defineComponent({name:"DCodeDatePicker",inheritAttrs:!1,__name:"DCodeDatePicker",props:{modelValue:{},label:{default:""},placeholder:{default:"Pilih tanggal"},clearable:{type:Boolean,default:!0},required:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},visible:{type:Boolean,default:!0},skeleton:{type:Boolean,default:!1},error:{default:null},range:{type:Boolean,default:!1},autoRangeDays:{default:null},disablePast:{type:Boolean,default:!1},maxDaysAhead:{default:null},displayFormat:{default:"dd/MM/yyyy"},modelType:{default:"yyyy-MM-dd"},locale:{default:"en"},placement:{default:"bottom-start"},prependInner:{default:void 0},selectLabel:{default:"Select"},cancelLabel:{default:"Cancel"},tone:{default:"primary"},labelPosition:{default:"top"},labelWidth:{default:"150px"},size:{default:"default"},rounded:{default:"lg"}},emits:["update:modelValue","change","clear"],setup(e,{emit:t}){const n=r.useAttrs(),o=e,i=t,s=r.computed(()=>Zn(o.size).split(" ").filter(he=>!he.startsWith("px-")).join(" ")),a=Math.random().toString(36).slice(2,7),l=r.computed(()=>`dcode-datepicker-${n.id||o.label||"date-picker"}-${a}`),c=r.computed(()=>{const he=n.required,Ce=n["aria-required"];return he===""||he===!0||he==="true"||Ce==="true"||Ce===!0||o.required}),d=r.computed(()=>!!o.error),f=r.computed({get:()=>o.modelValue,set:he=>{i("update:modelValue",he),i("change",he)}}),h=r.computed(()=>o.locale==="en"?hf:av),p=r.computed(()=>{if(o.disablePast)return dn(new Date)}),g=r.computed(()=>{if(o.maxDaysAhead&&o.maxDaysAhead>0)return Ka($r(new Date,o.maxDaysAhead))}),y=r.ref(!1);let b=null;r.onMounted(()=>{const he=document.documentElement,Ce=()=>y.value=he.classList.contains("dark");Ce(),b=new MutationObserver(Ce),b.observe(he,{attributes:!0,attributeFilter:["class"]})}),r.onBeforeUnmount(()=>{b?.disconnect(),b=null}),pf(r.toRef(o,"tone"));const _=r.ref(!1),x=r.ref(null),B=r.ref(null),R=r.ref(null),S=r.ref(null),O=r.ref(!1),I=r.ref(""),{floatingStyles:D,isPositioned:w}=td(R,B,{strategy:"fixed",placement:r.computed(()=>o.placement||"bottom-start"),whileElementsMounted:Jc,transform:!1,middleware:[Qc(4),ed({padding:8}),Vc({padding:8})]}),E=r.computed(()=>({...D.value,zIndex:99999,pointerEvents:"auto",visibility:w.value?"visible":"hidden"}));Lo.onClickOutside(x,()=>{_.value&&P()},{ignore:[B]});const F=()=>{o.disabled||o.readonly||(_.value=!0,k())},A=()=>{o.disabled||o.readonly||(_.value?P():F())},P=()=>{_.value=!1,r.nextTick(()=>{I.value!==ie.value&&K(I.value,!0)})},q=he=>{if(!he)return null;const Ce=ms(he,o.modelType,new Date);return zr(Ce)?dn(Ce):null},Q=(he,Ce=o.modelType)=>_r(he,Ce,{locale:h.value}),re=r.computed(()=>{if(!f.value)return[];if(o.range&&Array.isArray(f.value)){const he=q(f.value[0]),Ce=q(f.value[1]),Pe=[];return he&&Pe.push(he),Ce&&Pe.push(Ce),Pe}else if(!o.range&&typeof f.value=="string"){const he=q(f.value);return he?[he]:[]}return[]}),ie=r.computed(()=>o.range?re.value.length===2?`${Q(re.value[0],o.displayFormat)} - ${Q(re.value[1],o.displayFormat)}`:"":re.value.length===1?Q(re.value[0],o.displayFormat):"");r.watch(ie,he=>{O.value||(I.value=he||"")},{immediate:!0});const le=he=>{if(!he||!he.trim())return null;const Ce=he.trim();if(/^\d{8}$/.test(Ce)){if(Ce.startsWith("19")||Ce.startsWith("20"))try{const Ie=ms(Ce,"yyyyMMdd",new Date);if(zr(Ie))return dn(Ie)}catch{}try{const Ie=ms(Ce,"ddMMyyyy",new Date);if(zr(Ie))return dn(Ie)}catch{}}const Pe=[o.displayFormat,o.modelType,"dd/MM/yyyy","dd-MM-yyyy","yyyy-MM-dd","yyyy/MM/dd","d/M/yyyy","d-M-yyyy","dd MMMM yyyy","d MMMM yyyy","MMMM dd, yyyy","MMM dd, yyyy"].filter(Boolean),qe=Array.from(new Set(Pe));for(const Ie of qe)try{const Je=ms(Ce,Ie,new Date,{locale:h.value});if(zr(Je)){const wt=Je.getFullYear();if(wt>=1900&&wt<=2100)return dn(Je)}}catch{}const Se=new Date(Ce);if(zr(Se)){const Ie=Se.getFullYear();if(Ie>=1900&&Ie<=2100)return dn(Se)}return null},X=he=>{const Ce=he.split(/\s+-\s+|\s+to\s+|\s*,\s*/);if(Ce.length===2){const Pe=le(Ce[0]),qe=le(Ce[1]);if(Pe&&qe)return ii(Pe,qe)?[qe,Pe]:[Pe,qe]}return null},K=(he,Ce=!1)=>{const Pe=he.trim();if(!Pe){Ce&&(o.clearable?Xe():I.value=ie.value);return}if(o.range){const qe=X(Pe);if(qe){const[Se,Ie]=qe;if(_.value||(J.value=Fo(Se)),Ce){if(ee(Se)||ee(Ie)){I.value=ie.value;return}let Je=Ie;if(o.autoRangeDays&&o.autoRangeDays>0){const wt=Ka($r(Se,o.autoRangeDays-1));ii(Je,wt)&&(Je=dn(wt))}f.value=[Q(Se),Q(Je)],fe.value=null,I.value=`${Q(Se,o.displayFormat)} - ${Q(Je,o.displayFormat)}`}}else Ce&&(I.value=ie.value)}else{const qe=le(Pe);if(qe){if(_.value||(J.value=Fo(qe)),Ce){if(ee(qe)){I.value=ie.value;return}f.value=Q(qe),I.value=Q(qe,o.displayFormat)}}else Ce&&(I.value=ie.value)}},W=he=>{if(o.disabled||o.readonly)return;const Ce=he.target;Ce.tagName==="INPUT"||Ce.closest("button")||(S.value?.focus(),_.value||F())},se=()=>{o.disabled||o.readonly||(O.value=!0,_.value||F())},H=()=>{o.disabled||o.readonly||_.value||F()},N=()=>{O.value=!1,_.value||K(I.value,!0)},j=he=>{const Ce=he.target;I.value=Ce.value,K(Ce.value,!1)},Y=he=>{he.key==="Enter"?(he.preventDefault(),K(I.value,!0),P()):he.key==="Escape"&&(he.preventDefault(),I.value=ie.value,P())},J=r.ref(Fo(new Date)),U=r.ref(null),k=()=>{if(re.value.length>0)J.value=Fo(re.value[0]);else if(I.value){const he=le(I.value);if(he){J.value=Fo(he);return}J.value=Fo(new Date)}else J.value=Fo(new Date)},C=()=>{J.value=Bp(J.value,10)},T=()=>{J.value=Bp(J.value,1)},M=()=>{J.value=Tp(J.value)},$=()=>{J.value=Fo(new Date)},ne=()=>{J.value=gd(J.value,1)},te=()=>{J.value=ff(J.value,1)},ce=()=>{J.value=ff(J.value,10)},ke=r.computed(()=>_r(J.value,"MMMM yyyy",{locale:h.value})),we=r.computed(()=>{const he=Te(new Date);return Array.from({length:7}).map((Ce,Pe)=>{const qe=$r(he,Pe);return{name:_r(qe,"E",{locale:h.value}),isWeekend:xp(qe)}})}),_e=r.computed(()=>{const he=Fo(J.value),Ce=m2(he),Pe=Cp(J.value),qe=[],Se=Tp(J.value),Ie=Cp(Se);for(let gt=Ce-1;gt>=0;gt--)qe.push({date:dn(new Date(Se.getFullYear(),Se.getMonth(),Ie-gt)),isCurrentMonth:!1});for(let gt=1;gt<=Pe;gt++)qe.push({date:dn(new Date(J.value.getFullYear(),J.value.getMonth(),gt)),isCurrentMonth:!0});const Je=42-qe.length,wt=gd(J.value,1);for(let gt=1;gt<=Je;gt++)qe.push({date:dn(new Date(wt.getFullYear(),wt.getMonth(),gt)),isCurrentMonth:!1});return qe}),fe=r.ref(null),de=he=>{if(!ee(he))if(o.range)if(!fe.value)fe.value=he,f.value=null;else{const Ce=fe.value,Pe=he;let qe=Ce,Se=Pe;if(ii(Ce,Pe)&&(qe=Pe,Se=Ce),o.autoRangeDays&&o.autoRangeDays>0){const Ie=Ka($r(qe,o.autoRangeDays-1));ii(Se,Ie)&&(Se=dn(Ie))}f.value=[Q(qe),Q(Se)],fe.value=null,I.value=`${Q(qe,o.displayFormat)} - ${Q(Se,o.displayFormat)}`,P()}else f.value=Q(he),I.value=Q(he,o.displayFormat),P()},Z=he=>{U.value=he},ee=he=>{if(p.value&&Ya(dn(he),dn(p.value))||g.value&&ii(dn(he),dn(g.value)))return!0;if(o.range&&fe.value&&o.autoRangeDays&&o.autoRangeDays>0){const Ce=dn($r(fe.value,o.autoRangeDays-1)),Pe=dn(w2(fe.value,o.autoRangeDays-1));if(ii(dn(he),Ce)||Ya(dn(he),Pe))return!0}return!1},pe=he=>{if(o.range){if(re.value.length===2)return ri(he,re.value[0])||ri(he,re.value[1]);if(fe.value)return ri(he,fe.value)}else if(re.value.length===1)return ri(he,re.value[0]);return!1},Be=he=>{if(!o.range)return!1;if(re.value.length===2)return ii(he,re.value[0])&&Ya(he,re.value[1])||ri(he,re.value[0])||ri(he,re.value[1]);if(fe.value&&U.value){const Ce=fe.value;let Pe=U.value;if(o.autoRangeDays&&o.autoRangeDays>0){const Ie=$r(Ce,o.autoRangeDays-1),Je=w2(Ce,o.autoRangeDays-1);ii(Pe,Ie)&&(Pe=Ie),Ya(Pe,Je)&&(Pe=Je)}let qe=Ce,Se=Pe;return ii(qe,Se)&&(qe=Pe,Se=Ce),ii(he,qe)&&Ya(he,Se)||ri(he,qe)||ri(he,Se)}return!1},Te=he=>{const Ce=new Date(he),Pe=Ce.getDay(),qe=Ce.getDate()-Pe;return dn(new Date(Ce.setDate(qe)))},Oe=he=>{const Ce=Te(he);return Ka($r(Ce,6))},Fe=he=>dn(Fo(he)),Ue=he=>Ka(new Date(he.getFullYear(),he.getMonth()+1,0)),Qe=r.computed(()=>{if(!o.range)return[];const he=new Date,Ce=dn(he),Pe=(qe,Se)=>{let Ie=qe;o.disablePast&&Ya(Ie,Ce)&&(Ie=Ce);let Je=Se;if(o.autoRangeDays&&o.autoRangeDays>0){const wt=Ka($r(Ie,o.autoRangeDays-1));ii(Je,wt)&&(Je=wt)}return Ya(Je,Ie)&&(Je=Ka(Ie)),[Ie,Je]};return[{label:o.locale==="id"?"Minggu Ini":"This Week",range:Pe(Te(he),Oe(he))},{label:o.locale==="id"?"Bulan Ini":"This Month",range:Pe(Fe(he),Ue(he))}]}),Ve=he=>{he.length<2||(f.value=[Q(he[0]),Q(he[1])],fe.value=null,J.value=Fo(he[0]),I.value=`${Q(he[0],o.displayFormat)} - ${Q(he[1],o.displayFormat)}`,P())},Xe=()=>{f.value=null,fe.value=null,I.value="",i("clear")};return(he,Ce)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["w-full relative",[r.unref(n).class,o.disabled?"cursor-not-allowed":""]]),ref_key:"wrapperRef",ref:x},[e.skeleton?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(["flex flex-1 w-full",[o.labelPosition==="left"?"flex-row items-center gap-3":"",o.labelPosition==="right"?"flex-row-reverse items-center gap-3":"",o.labelPosition==="top"?"flex-col gap-1":"",o.labelPosition==="bottom"?"flex-col-reverse gap-1":""]])},[e.label?(r.openBlock(),r.createElementBlock("div",{key:0,class:"h-4 rounded bg-gray-200 dark:bg-gray-700 animate-shimmer shrink-0",style:r.normalizeStyle(o.labelPosition==="left"||o.labelPosition==="right"?{width:o.labelWidth}:{width:"8rem"})},null,4)):r.createCommentVNode("",!0),r.createElementVNode("div",{class:r.normalizeClass(["w-full flex-1 bg-gray-200 dark:bg-gray-700 animate-shimmer",[r.unref(Zn)(o.size),r.unref(sn)(o.rounded)]])},null,2)],2)):(r.openBlock(),r.createElementBlock(r.Fragment,{key:1},[r.createElementVNode("div",{class:r.normalizeClass(["flex flex-1 w-full",[o.labelPosition==="left"?"flex-row items-center gap-3":"",o.labelPosition==="right"?"flex-row-reverse items-center gap-3":"",o.labelPosition==="top"?"flex-col gap-1":"",o.labelPosition==="bottom"?"flex-col-reverse gap-1":""]])},[e.label?(r.openBlock(),r.createElementBlock("label",{key:0,for:l.value,class:"text-sm font-medium shrink-0",style:r.normalizeStyle(o.labelPosition==="left"||o.labelPosition==="right"?{width:o.labelWidth}:{})},[r.createTextVNode(r.toDisplayString(e.label)+" ",1),c.value?(r.openBlock(),r.createElementBlock("span",AH,"*")):r.createCommentVNode("",!0)],12,SH)):r.createCommentVNode("",!0),r.createElementVNode("div",{class:"relative w-full flex-1",ref_key:"inputContainerRef",ref:R},[r.createElementVNode("div",{class:r.normalizeClass(["flex items-center w-full border bg-white dark:bg-neutral-800 border-gray-300 dark:border-neutral-700/50 overflow-hidden shadow-none transition-all duration-200 focus-within:ring-1 focus-within:ring-primary dark:focus-within:ring-primary-600 focus-within:border-neutral-400 dark:focus-within:border-neutral-600",[s.value,r.unref(sn)(o.rounded),d.value?"border-destructive":"",e.disabled?"opacity-50 cursor-not-allowed":"",e.readonly?"bg-neutral-50/50 dark:bg-neutral-900/30":"",_.value?"border-neutral-400 ring-1 ring-primary dark:border-primary-600 dark:ring-neutral-600":""]]),onClick:W},[r.createElementVNode("button",{type:"button",tabindex:"-1",disabled:e.disabled||e.readonly,class:"flex-shrink-0 flex items-center justify-center w-10 h-full text-muted-foreground hover:text-foreground transition-colors focus:outline-none cursor-pointer disabled:cursor-not-allowed",onClick:r.withModifiers(A,["stop"])},[r.createVNode(r.unref(Ae.Calendar),{class:"w-4 h-4 pointer-events-none"})],8,TH),Ce[2]||(Ce[2]=r.createElementVNode("span",{class:"w-px h-5 bg-gray-200 dark:bg-gray-700 flex-shrink-0"},null,-1)),e.prependInner?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[r.createElementVNode("span",BH,r.toDisplayString(e.prependInner),1),Ce[1]||(Ce[1]=r.createElementVNode("span",{class:"w-px h-5 bg-gray-200 dark:bg-gray-700 flex-shrink-0"},null,-1))],64)):r.createCommentVNode("",!0),r.createElementVNode("input",{ref_key:"inputRef",ref:S,id:l.value,type:"text",value:I.value,placeholder:e.placeholder,disabled:e.disabled,readonly:e.readonly,autocomplete:"off",class:"flex-1 min-w-0 px-3 h-full bg-transparent text-sm text-foreground dark:text-gray-300 placeholder:text-muted-foreground outline-none cursor-text disabled:cursor-not-allowed",onFocus:se,onBlur:N,onInput:j,onKeydown:Y,onClick:H},null,40,PH),e.clearable&&(f.value||I.value)&&!e.disabled&&!e.readonly?(r.openBlock(),r.createBlock(Lr,{key:1,class:"mr-3",onClear:Xe})):r.createCommentVNode("",!0)],2),(r.openBlock(),r.createBlock(r.Teleport,{to:"body"},[_.value?(r.openBlock(),r.createElementBlock("div",{key:0,ref_key:"popoverRef",ref:B,"data-dcode-datepicker-popover":"true",style:r.normalizeStyle(E.value),class:"dcode-datepicker-popover pointer-events-auto font-sans bg-white dark:bg-neutral-900 border border-gray-200 dark:border-neutral-700 rounded-lg shadow-xl flex min-w-max max-h-[calc(100vh-24px)] overflow-y-auto"},[e.range&&Qe.value.length?(r.openBlock(),r.createElementBlock("div",NH,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(Qe.value,Pe=>(r.openBlock(),r.createElementBlock("button",{key:Pe.label,type:"button",class:"w-full text-left text-sm px-3 py-2 rounded-md hover:bg-gray-100 dark:hover:bg-neutral-800 transition-colors",onClick:qe=>Ve(Pe.range)},r.toDisplayString(Pe.label),9,DH))),128))])):r.createCommentVNode("",!0),r.createElementVNode("div",{class:r.normalizeClass(["p-0 flex flex-col w-[300px] select-none bg-white dark:bg-neutral-900",[e.range&&Qe.value.length?"rounded-r-lg":"rounded-lg"]])},[r.createElementVNode("div",MH,[re.value.length===0&&!fe.value?(r.openBlock(),r.createElementBlock("span",RH,"No date selected")):o.range?(r.openBlock(),r.createElementBlock("span",IH,[fe.value?(r.openBlock(),r.createElementBlock("span",OH,r.toDisplayString(Q(fe.value,"MMM dd, yyyy"))+" - ...",1)):(r.openBlock(),r.createElementBlock("span",LH,r.toDisplayString(Q(re.value[0],"MMM dd"))+" - "+r.toDisplayString(Q(re.value[1],"MMM dd, yyyy")),1))])):(r.openBlock(),r.createElementBlock("span",FH,r.toDisplayString(Q(re.value[0],"MMMM dd, yyyy")),1))]),r.createElementVNode("div",$H,[r.createElementVNode("button",{type:"button",onClick:C,class:"p-1 rounded text-primary/70 hover:text-primary hover:bg-primary/10 dark:hover:bg-primary/20 transition-colors focus:outline-none",title:"Dekade Sebelumnya"},[r.createVNode(r.unref(Ae.ChevronFirst),{class:"w-4 h-4"})]),r.createElementVNode("button",{type:"button",onClick:T,class:"p-1 rounded text-primary/70 hover:text-primary hover:bg-primary/10 dark:hover:bg-primary/20 transition-colors focus:outline-none",title:"Tahun Sebelumnya"},[r.createVNode(r.unref(Ae.ChevronsLeft),{class:"w-4 h-4"})]),r.createElementVNode("button",{type:"button",onClick:M,class:"p-1 rounded text-primary/70 hover:text-primary hover:bg-primary/10 dark:hover:bg-primary/20 transition-colors focus:outline-none",title:"Bulan Sebelumnya"},[r.createVNode(r.unref(Ae.ChevronLeft),{class:"w-4 h-4"})]),r.createElementVNode("button",{type:"button",onClick:$,class:"w-7 h-7 flex items-center justify-center rounded bg-primary/10 dark:bg-primary/20 text-primary hover:bg-primary/20 dark:hover:bg-primary/30 transition-colors focus:outline-none",title:"Hari Ini"},[...Ce[3]||(Ce[3]=[r.createElementVNode("div",{class:"w-2 h-2 rounded-full bg-current"},null,-1)])]),r.createElementVNode("button",{type:"button",onClick:ne,class:"p-1 rounded text-primary/70 hover:text-primary hover:bg-primary/10 dark:hover:bg-primary/20 transition-colors focus:outline-none",title:"Bulan Berikutnya"},[r.createVNode(r.unref(Ae.ChevronRight),{class:"w-4 h-4"})]),r.createElementVNode("button",{type:"button",onClick:te,class:"p-1 rounded text-primary/70 hover:text-primary hover:bg-primary/10 dark:hover:bg-primary/20 transition-colors focus:outline-none",title:"Tahun Berikutnya"},[r.createVNode(r.unref(Ae.ChevronsRight),{class:"w-4 h-4"})]),r.createElementVNode("button",{type:"button",onClick:ce,class:"p-1 rounded text-primary/70 hover:text-primary hover:bg-primary/10 dark:hover:bg-primary/20 transition-colors focus:outline-none",title:"Dekade Berikutnya"},[r.createVNode(r.unref(Ae.ChevronLast),{class:"w-4 h-4"})])]),r.createElementVNode("div",zH,r.toDisplayString(ke.value),1),r.createElementVNode("div",jH,[r.createElementVNode("div",UH,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(we.value,Pe=>(r.openBlock(),r.createElementBlock("div",{key:Pe.name,class:r.normalizeClass(["text-xs font-semibold",Pe.isWeekend?"text-red-600 dark:text-red-400":"text-gray-700 dark:text-gray-300"])},r.toDisplayString(Pe.name),3))),128))]),r.createElementVNode("div",{class:"grid grid-cols-7 text-center gap-y-0.5",onMouseleave:Ce[0]||(Ce[0]=Pe=>U.value=null)},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(_e.value,(Pe,qe)=>(r.openBlock(),r.createElementBlock("div",{key:qe,class:r.normalizeClass(["relative w-full h-8 flex items-center justify-center text-sm",[Be(Pe.date)?"bg-gray-100 dark:bg-neutral-800":"",ee(Pe.date)?"opacity-30 cursor-not-allowed":"cursor-pointer"]]),onClick:Se=>de(Pe.date),onMouseenter:Se=>Z(Pe.date)},[r.createElementVNode("div",{class:r.normalizeClass(["w-7 h-7 flex items-center justify-center rounded-full transition-colors",[pe(Pe.date)?"bg-gray-100 text-gray-900 font-bold border border-gray-300 dark:bg-neutral-700 dark:text-white dark:border-neutral-500":Be(Pe.date)?"bg-gray-50 dark:bg-neutral-800":r.unref(ri)(Pe.date,new Date)?"font-bold text-blue-600 dark:text-blue-400":"hover:bg-gray-200 dark:hover:bg-neutral-700",Pe.isCurrentMonth?pe(Pe.date)?"":r.unref(xp)(Pe.date)?"text-red-600 dark:text-red-400 font-medium":"text-gray-700 dark:text-gray-200":"text-gray-400 dark:text-gray-500"]])},r.toDisplayString(r.unref(_r)(Pe.date,"d")),3)],42,WH))),128))],32)]),Ce[4]||(Ce[4]=r.createElementVNode("div",{class:"border-t border-gray-100 dark:border-neutral-800 px-3 py-2 text-xs text-center text-gray-600 dark:text-gray-400 bg-gray-50/50 dark:bg-neutral-900/50 rounded-b-lg"}," Use cursor keys to navigate calendar dates ",-1))],2)],4)):r.createCommentVNode("",!0)]))],512)],2),d.value?(r.openBlock(),r.createElementBlock("p",HH,r.toDisplayString(o.error),1)):r.createCommentVNode("",!0)],64))],2))}}),qH={key:0,class:"h-4 w-32 rounded bg-gray-200 dark:bg-gray-700 animate-shimmer"},KH=["for"],GH={key:0,class:"ml-1 text-destructive"},YH={type:"button",tabindex:"-1",class:"flex-shrink-0 flex items-center justify-center w-10 h-full text-muted-foreground hover:text-foreground transition-colors focus:outline-none pointer-events-none"},ZH={class:"flex-shrink-0 px-2 text-sm text-muted-foreground select-none whitespace-nowrap"},XH=["id","value","placeholder","disabled","onFocus","onBlur","onInput","onKeydown","onKeypress","onPaste"],JH={class:"flex items-center justify-end gap-2 w-full p-2"},QH=["disabled","onClick"],VH={key:1,class:"text-xs text-destructive"},Np=r.defineComponent({name:"DCodeTimePicker",inheritAttrs:!1,__name:"DCodeTimePicker",props:{modelValue:{},label:{default:""},placeholder:{default:"Pilih waktu"},clearable:{type:Boolean,default:!0},required:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},visible:{type:Boolean,default:!0},skeleton:{type:Boolean,default:!1},error:{default:null},displayFormat:{default:"HH:mm"},modelType:{default:"HH:mm"},placement:{default:"bottom-start"},prependInner:{default:void 0},selectLabel:{default:"Select"},cancelLabel:{default:"Cancel"},tone:{default:"primary"},is24:{type:Boolean,default:!0},enableSeconds:{type:Boolean,default:!1},minutesIncrement:{default:1},size:{default:"default"},rounded:{default:"lg"}},emits:["update:modelValue","change","clear"],setup(e,{emit:t}){const n=r.useAttrs(),o=e,i=t,s=r.computed(()=>Zn(o.size).split(" ").filter(O=>!O.startsWith("px-")).join(" ")),a=Math.random().toString(36).slice(2,7),l=r.computed(()=>`dcode-timepicker-${n.id||o.label||"time-picker"}-${a}`),c=r.computed(()=>{const O=n.required,I=n["aria-required"];return O===""||O===!0||O==="true"||I==="true"||I===!0||o.required}),d=r.computed(()=>!!o.error),f=r.computed({get:()=>o.modelValue,set:O=>{i("update:modelValue",O),i("change",O)}}),h=r.computed(()=>o.displayFormat!=="HH:mm"?o.displayFormat:o.enableSeconds?"HH:mm:ss":"HH:mm"),p=r.computed(()=>o.modelType!=="HH:mm"?o.modelType:o.enableSeconds?"HH:mm:ss":"HH:mm"),g=r.ref(null),y=r.ref(!1),b=()=>{!o.disabled&&g.value&&g.value.toggleMenu()},_=()=>{y.value=!0},x=()=>{f.value=null,i("clear")},B=()=>{y.value=!1},R=r.ref(!1);let S=null;return r.onMounted(()=>{const O=document.documentElement,I=()=>R.value=O.classList.contains("dark");I(),S=new MutationObserver(I),S.observe(O,{attributes:!0,attributeFilter:["class"]})}),r.onBeforeUnmount(()=>{S?.disconnect(),S=null}),pf(r.toRef(o,"tone")),(O,I)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["flex flex-col gap-1 w-full",[r.unref(n).class,o.disabled?"cursor-not-allowed":""]])},[e.skeleton?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[e.label?(r.openBlock(),r.createElementBlock("div",qH)):r.createCommentVNode("",!0),r.createElementVNode("div",{class:r.normalizeClass(["w-full bg-gray-200 dark:bg-gray-700 animate-shimmer",[r.unref(Zn)(o.size),r.unref(sn)(o.rounded)]])},null,2)],64)):(r.openBlock(),r.createElementBlock(r.Fragment,{key:1},[e.label?(r.openBlock(),r.createElementBlock("label",{key:0,for:l.value,class:"text-sm font-medium"},[r.createTextVNode(r.toDisplayString(e.label)+" ",1),c.value?(r.openBlock(),r.createElementBlock("span",GH,"*")):r.createCommentVNode("",!0)],8,KH)):r.createCommentVNode("",!0),r.createVNode(r.unref(LR.VueDatePicker),{ref_key:"dpRef",ref:g,modelValue:f.value,"onUpdate:modelValue":I[1]||(I[1]=D=>f.value=D),dark:R.value,disabled:e.disabled,clearable:!1,"time-picker":"","is-24":e.is24,"enable-seconds":e.enableSeconds,"minutes-increment":e.minutesIncrement,"auto-apply":!0,"model-type":p.value,format:h.value,floating:{placement:e.placement,offset:4,arrow:!1,flip:!0,shift:!0},teleport:!0,"menu-class-name":"dcode-timepicker-menu",onOpen:_,onClose:B},{"dp-input":r.withCtx(({value:D,onInput:w,onEnter:E,onTab:F,onBlur:A,onFocus:P,onKeypress:q,onPaste:Q})=>[r.createElementVNode("div",{class:r.normalizeClass(["flex items-center w-full border bg-white dark:bg-neutral-800 border-gray-300 dark:border-neutral-700/50 overflow-hidden shadow-none transition-all duration-200 focus-within:ring-1 focus-within:ring-primary dark:focus-within:ring-primary-600 focus-within:border-neutral-400 dark:focus-within:border-neutral-600 cursor-pointer",[s.value,r.unref(sn)(o.rounded),d.value?"border-destructive":"",e.disabled?"opacity-50 cursor-not-allowed":"",e.readonly?"bg-neutral-50/50 dark:bg-neutral-900/30":"",y.value?"border-neutral-400 ring-1 ring-primary dark:border-primary-600 dark:ring-neutral-600":""]]),onClick:r.withModifiers(b,["stop"])},[r.createElementVNode("button",YH,[r.createVNode(r.unref(Ae.Clock),{class:"w-4 h-4 pointer-events-none"})]),I[3]||(I[3]=r.createElementVNode("span",{class:"w-px h-5 bg-gray-200 dark:bg-gray-700 flex-shrink-0"},null,-1)),e.prependInner?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[r.createElementVNode("span",ZH,r.toDisplayString(e.prependInner),1),I[2]||(I[2]=r.createElementVNode("span",{class:"w-px h-5 bg-gray-200 dark:bg-gray-700 flex-shrink-0"},null,-1))],64)):r.createCommentVNode("",!0),r.createElementVNode("input",{id:l.value,value:D,placeholder:e.placeholder,disabled:e.disabled,autocomplete:"off",readonly:"",class:r.normalizeClass(["flex-1 min-w-0 px-3 h-full bg-transparent text-sm text-foreground dark:text-gray-300 placeholder:text-muted-foreground outline-none",e.disabled?"cursor-not-allowed":e.readonly?"cursor-default":"cursor-pointer"]),onFocus:re=>P(),onBlur:re=>A(),onInput:re=>w(re),onKeydown:[r.withKeys(re=>E(re),["enter"]),r.withKeys(re=>F(re),["tab"])],onKeypress:re=>q(re),onPaste:re=>Q()},null,42,XH),e.clearable&&f.value&&!e.disabled&&!e.readonly?(r.openBlock(),r.createBlock(Lr,{key:1,class:"mr-3",onClear:x})):r.createCommentVNode("",!0)],2)]),"action-buttons":r.withCtx(({selectDate:D,selectionDisabled:w})=>[r.createElementVNode("div",JH,[r.createElementVNode("button",{type:"button",class:"inline-flex items-center justify-center rounded-md text-sm font-medium border border-input bg-background hover:bg-accent hover:text-accent-foreground h-9 px-4 py-2 transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-neutral-400",onClick:I[0]||(I[0]=E=>g.value?.closeMenu())},r.toDisplayString(e.cancelLabel),1),r.createElementVNode("button",{type:"button",disabled:w,class:"inline-flex items-center justify-center rounded-md text-sm font-medium bg-primary text-primary-foreground hover:bg-primary/90 h-9 px-4 py-2 transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-neutral-400 disabled:pointer-events-none disabled:opacity-50",onClick:E=>D()},r.toDisplayString(e.selectLabel),9,QH)])]),_:1},8,["modelValue","dark","disabled","is-24","enable-seconds","minutes-increment","model-type","format","floating"]),d.value?(r.openBlock(),r.createElementBlock("p",VH,r.toDisplayString(o.error),1)):r.createCommentVNode("",!0)],64))],2))}}),eq=["for"],tq={key:0,class:"ml-1 text-destructive"},nq=["disabled"],oq={class:"flex-shrink-0 px-2 text-sm text-muted-foreground select-none whitespace-nowrap"},rq=["id","value","placeholder","disabled","readonly"],iq={class:"px-3 py-3 text-center border-b border-gray-100 dark:border-neutral-800 text-sm font-medium text-gray-700 dark:text-gray-200 bg-gray-50/50 dark:bg-neutral-900/50 rounded-t-lg"},sq={class:"p-0 flex flex-col select-none"},aq={class:"flex items-center justify-between px-3 pt-3 pb-2 text-primary"},lq={class:"text-center font-bold text-gray-800 dark:text-gray-100 pb-3"},cq={class:"px-2 pb-2 border-b border-gray-100 dark:border-neutral-800"},dq={class:"grid grid-cols-7 mb-2 text-center"},uq={class:"grid grid-cols-7 text-center gap-y-0.5"},fq=["onClick"],hq={class:"px-4 py-3 flex items-center justify-center gap-2 bg-gray-50/30 dark:bg-neutral-900/30"},mq={class:"flex items-center gap-1 border border-gray-300 dark:border-neutral-700 rounded bg-white dark:bg-neutral-800 focus-within:ring-1 focus-within:ring-primary pl-2 pr-1 py-1"},pq=["value"],gq={class:"flex flex-col"},bq={class:"flex items-center gap-1 border border-gray-300 dark:border-neutral-700 rounded bg-white dark:bg-neutral-800 focus-within:ring-1 focus-within:ring-primary pl-2 pr-1 py-1"},yq=["value"],vq={class:"flex flex-col"},wq={class:"flex items-center gap-1 border border-gray-300 dark:border-neutral-700 rounded bg-white dark:bg-neutral-800 focus-within:ring-1 focus-within:ring-primary pl-2 pr-1 py-1"},kq=["value"],_q={class:"flex flex-col"},xq={class:"px-3 py-2 flex justify-end gap-2 border-t border-gray-100 dark:border-neutral-800 bg-white dark:bg-neutral-900"},Eq={key:0,class:"text-xs text-destructive mt-1"},Dp=r.defineComponent({name:"DCodeDateTimePicker",inheritAttrs:!1,__name:"DCodeDateTimePicker",props:{modelValue:{},label:{default:""},placeholder:{default:"Pilih tanggal & waktu"},clearable:{type:Boolean,default:!0},required:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},visible:{type:Boolean,default:!0},skeleton:{type:Boolean,default:!1},error:{default:null},disablePast:{type:Boolean,default:!1},maxDaysAhead:{default:null},displayFormat:{default:"dd/MM/yyyy HH:mm"},modelType:{default:"yyyy-MM-dd HH:mm"},locale:{default:"en"},placement:{default:"bottom-start"},prependInner:{default:void 0},selectLabel:{default:"Select"},cancelLabel:{default:"Cancel"},tone:{default:"primary"},is24:{type:Boolean,default:!0},enableSeconds:{type:Boolean,default:!1},minutesIncrement:{default:1},labelPosition:{default:"top"},labelWidth:{default:"150px"},size:{default:"default"},rounded:{default:"lg"}},emits:["update:modelValue","change","clear"],setup(e,{emit:t}){const n=r.useAttrs(),o=e,i=t,s=r.computed(()=>Zn(o.size).split(" ").filter(Re=>!Re.startsWith("px-")).join(" ")),a=Math.random().toString(36).slice(2,7),l=r.computed(()=>`dcode-datetimepicker-${n.id||o.label||"datetime-picker"}-${a}`),c=r.computed(()=>{const Re=n.required,Le=n["aria-required"];return Re===""||Re===!0||Re==="true"||Le==="true"||Le===!0||o.required}),d=r.computed(()=>!!o.error),f=r.computed({get:()=>o.modelValue,set:Re=>{i("update:modelValue",Re),i("change",Re)}}),h=r.computed(()=>o.locale==="en"?hf:av),p=r.computed(()=>{if(o.disablePast)return dn(new Date)}),g=r.computed(()=>{if(o.maxDaysAhead&&o.maxDaysAhead>0)return Ka($r(new Date,o.maxDaysAhead))}),y=r.computed(()=>o.displayFormat!=="dd/MM/yyyy HH:mm"?o.displayFormat:o.enableSeconds?"dd/MM/yyyy HH:mm:ss":"dd/MM/yyyy HH:mm"),b=r.computed(()=>o.modelType!=="yyyy-MM-dd HH:mm"?o.modelType:o.enableSeconds?"yyyy-MM-dd HH:mm:ss":"yyyy-MM-dd HH:mm"),_=r.ref(!1);let x=null;r.onMounted(()=>{const Re=document.documentElement,Le=()=>_.value=Re.classList.contains("dark");Le(),x=new MutationObserver(Le),x.observe(Re,{attributes:!0,attributeFilter:["class"]})}),r.onBeforeUnmount(()=>{x?.disconnect(),x=null}),pf(r.toRef(o,"tone"));const B=r.ref(!1),R=r.ref(null),S=r.ref(null),O=r.ref(null),I=r.ref(null),D=r.ref(!1),w=r.ref(""),{floatingStyles:E,isPositioned:F}=td(O,S,{strategy:"fixed",placement:r.computed(()=>o.placement||"bottom-start"),whileElementsMounted:Jc,transform:!1,middleware:[Qc(4),ed({padding:8}),Vc({padding:8})]}),A=r.computed(()=>({...E.value,zIndex:99999,pointerEvents:"auto",visibility:F.value?"visible":"hidden"}));Lo.onClickOutside(R,()=>{B.value&&Q()},{ignore:[S]});const P=()=>{o.disabled||o.readonly||(B.value=!0,ne())},q=()=>{o.disabled||o.readonly||(B.value?Q():P())},Q=()=>{B.value=!1,r.nextTick(()=>{w.value!==X.value&&W(w.value,!0)})},re=Re=>{if(!Re)return null;const Le=ms(Re,b.value,new Date);return zr(Le)?Le:null},ie=(Re,Le=b.value)=>_r(Re,Le,{locale:h.value}),le=r.computed(()=>re(f.value)),X=r.computed(()=>le.value?ie(le.value,y.value):"");r.watch(X,Re=>{D.value||(w.value=Re||"")},{immediate:!0});const K=Re=>{if(!Re||!Re.trim())return null;const Le=Re.trim();if(/^\d{8}$/.test(Le)){let Tt=null;if(Le.startsWith("19")||Le.startsWith("20"))try{const At=ms(Le,"yyyyMMdd",new Date);zr(At)&&(Tt=At)}catch{}if(!Tt)try{const At=ms(Le,"ddMMyyyy",new Date);zr(At)&&(Tt=At)}catch{}if(Tt){const At=U.value?U.value.getHours():0,rt=U.value?U.value.getMinutes():0,ht=U.value?U.value.getSeconds():0;return new Date(Tt.getFullYear(),Tt.getMonth(),Tt.getDate(),At,rt,ht)}}const ve=[y.value,b.value,"dd/MM/yyyy HH:mm:ss","dd/MM/yyyy HH:mm","dd-MM-yyyy HH:mm:ss","dd-MM-yyyy HH:mm","yyyy-MM-dd HH:mm:ss","yyyy-MM-dd HH:mm","yyyy-MM-dd'T'HH:mm:ss","yyyy-MM-dd'T'HH:mm","yyyy/MM/dd HH:mm:ss","yyyy/MM/dd HH:mm","dd/MM/yyyy hh:mm a","dd/MM/yyyy h:mm a","dd-MM-yyyy hh:mm a","dd-MM-yyyy h:mm a"].filter(Boolean),Ne=Array.from(new Set(ve));for(const Tt of Ne)try{const At=ms(Le,Tt,new Date,{locale:h.value});if(zr(At)){const rt=At.getFullYear();if(rt>=1900&&rt<=2100)return At}}catch{}const Ge=["dd/MM/yyyy","dd-MM-yyyy","yyyy-MM-dd","yyyy/MM/dd","d/M/yyyy","d-M-yyyy","dd MMMM yyyy","d MMMM yyyy","MMMM dd, yyyy","MMM dd, yyyy"];for(const Tt of Ge)try{const At=ms(Le,Tt,new Date,{locale:h.value});if(zr(At)){const rt=At.getFullYear();if(rt>=1900&&rt<=2100){const ht=U.value?U.value.getHours():0,Nt=U.value?U.value.getMinutes():0,wn=U.value?U.value.getSeconds():0;return new Date(At.getFullYear(),At.getMonth(),At.getDate(),ht,Nt,wn)}}}catch{}const pt=new Date(Le);if(zr(pt)){const Tt=pt.getFullYear();if(Tt>=1900&&Tt<=2100)return pt}return null},W=(Re,Le=!1)=>{const ve=Re.trim();if(!ve){Le&&(o.clearable?Ue():w.value=X.value);return}const Ne=K(ve);if(Ne){if(B.value||(U.value=new Date(Ne),k.value=Ne.getHours()>=12?"PM":"AM",$.value=Fo(Ne)),Le){if(Oe(Ne)){w.value=X.value;return}f.value=ie(Ne),w.value=ie(Ne,y.value)}}else Le&&(w.value=X.value)},se=Re=>{if(o.disabled||o.readonly)return;const Le=Re.target;Le.tagName==="INPUT"||Le.closest("button")||(I.value?.focus(),B.value||P())},H=()=>{o.disabled||o.readonly||(D.value=!0,B.value||P())},N=()=>{o.disabled||o.readonly||B.value||P()},j=()=>{D.value=!1,B.value||W(w.value,!0)},Y=Re=>{const Le=Re.target;w.value=Le.value,W(Le.value,!1)},J=Re=>{Re.key==="Enter"?(Re.preventDefault(),W(w.value,!0),Q()):Re.key==="Escape"&&(Re.preventDefault(),w.value=X.value,Q())},U=r.ref(new Date),k=r.ref("AM"),C=r.computed({get:()=>{let Re=U.value.getHours();return o.is24||(Re===0?Re=12:Re>12&&(Re-=12)),Re},set:Re=>{let Le=Re;o.is24||(k.value==="PM"&&Le<12&&(Le+=12),k.value==="AM"&&Le===12&&(Le=0)),U.value=sv(U.value,Le)}}),T=r.computed({get:()=>U.value.getMinutes(),set:Re=>{U.value=ZW(U.value,Re)}}),M=r.computed({get:()=>U.value.getSeconds(),set:Re=>{U.value=XW(U.value,Re)}});r.watch(k,Re=>{let Le=U.value.getHours();Re==="PM"&&Le<12?U.value=sv(U.value,Le+12):Re==="AM"&&Le>=12&&(U.value=sv(U.value,Le-12))});const $=r.ref(Fo(new Date)),ne=()=>{const Re=le.value||(w.value?K(w.value):null)||new Date;U.value=new Date(Re),k.value=U.value.getHours()>=12?"PM":"AM",$.value=Fo(U.value)},te=()=>{$.value=Bp($.value,10)},ce=()=>{$.value=Bp($.value,1)},ke=()=>{$.value=Tp($.value)},we=()=>{$.value=Fo(new Date)},_e=()=>{$.value=gd($.value,1)},fe=()=>{$.value=ff($.value,1)},de=()=>{$.value=ff($.value,10)},Z=r.computed(()=>_r($.value,"MMMM yyyy",{locale:h.value})),ee=r.computed(()=>{const Re=Fe(new Date);return Array.from({length:7}).map((Le,ve)=>{const Ne=$r(Re,ve);return{name:_r(Ne,"E",{locale:h.value}),isWeekend:xp(Ne)}})}),pe=r.computed(()=>{const Re=Fo($.value),Le=m2(Re),ve=Cp($.value),Ne=[],Ge=Tp($.value),pt=Cp(Ge);for(let rt=Le-1;rt>=0;rt--)Ne.push({date:dn(new Date(Ge.getFullYear(),Ge.getMonth(),pt-rt)),isCurrentMonth:!1});for(let rt=1;rt<=ve;rt++)Ne.push({date:dn(new Date($.value.getFullYear(),$.value.getMonth(),rt)),isCurrentMonth:!0});const Tt=42-Ne.length,At=gd($.value,1);for(let rt=1;rt<=Tt;rt++)Ne.push({date:dn(new Date(At.getFullYear(),At.getMonth(),rt)),isCurrentMonth:!1});return Ne}),Be=Re=>{Oe(Re)||(U.value=new Date(Re.getFullYear(),Re.getMonth(),Re.getDate(),U.value.getHours(),U.value.getMinutes(),U.value.getSeconds()))},Te=()=>{f.value=ie(U.value),w.value=ie(U.value,y.value),Q()},Oe=Re=>!!(p.value&&Ya(dn(Re),dn(p.value))||g.value&&ii(dn(Re),dn(g.value))),Fe=Re=>{const Le=new Date(Re),ve=Le.getDay(),Ne=Le.getDate()-ve;return dn(new Date(Le.setDate(Ne)))},Ue=()=>{f.value=null,w.value="",i("clear")},Qe=()=>{let Re=C.value;const Le=o.is24?23:12,ve=o.is24?0:1;Re=Re>=Le?ve:Re+1,C.value=Re},Ve=()=>{let Re=C.value;const Le=o.is24?23:12,ve=o.is24?0:1;Re=Re<=ve?Le:Re-1,C.value=Re},Xe=Re=>{const Le=parseInt(Re.target.value,10);if(!isNaN(Le)){const ve=o.is24?23:12,Ne=o.is24?0:1;C.value=Math.max(Ne,Math.min(ve,Le))}},he=()=>{let Re=T.value;const Le=o.minutesIncrement||1;Re=Re+Le>=60?0:Re+Le,T.value=Re},Ce=()=>{let Re=T.value;const Le=o.minutesIncrement||1;Re=Re-Le<0?60-Le:Re-Le,T.value=Re},Pe=Re=>{const Le=parseInt(Re.target.value,10);isNaN(Le)||(T.value=Math.max(0,Math.min(59,Le)))},qe=()=>{let Re=M.value;Re=Re>=59?0:Re+1,M.value=Re},Se=()=>{let Re=M.value;Re=Re<=0?59:Re-1,M.value=Re},Ie=Re=>{const Le=parseInt(Re.target.value,10);isNaN(Le)||(M.value=Math.max(0,Math.min(59,Le)))},Je=r.computed(()=>C.value.toString().padStart(2,"0")),wt=r.computed(()=>T.value.toString().padStart(2,"0")),gt=r.computed(()=>M.value.toString().padStart(2,"0"));return(Re,Le)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["w-full relative",[r.unref(n).class,o.disabled?"cursor-not-allowed":""]]),ref_key:"wrapperRef",ref:R},[e.skeleton?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(["flex flex-1 w-full",[o.labelPosition==="left"?"flex-row items-center gap-3":"",o.labelPosition==="right"?"flex-row-reverse items-center gap-3":"",o.labelPosition==="top"?"flex-col gap-1":"",o.labelPosition==="bottom"?"flex-col-reverse gap-1":""]])},[e.label?(r.openBlock(),r.createElementBlock("div",{key:0,class:"h-4 rounded bg-gray-200 dark:bg-gray-700 animate-shimmer shrink-0",style:r.normalizeStyle(o.labelPosition==="left"||o.labelPosition==="right"?{width:o.labelWidth}:{width:"8rem"})},null,4)):r.createCommentVNode("",!0),r.createElementVNode("div",{class:r.normalizeClass(["w-full flex-1 bg-gray-200 dark:bg-gray-700 animate-shimmer",[r.unref(Zn)(o.size),r.unref(sn)(o.rounded)]])},null,2)],2)):(r.openBlock(),r.createElementBlock(r.Fragment,{key:1},[r.createElementVNode("div",{class:r.normalizeClass(["flex flex-1 w-full",[o.labelPosition==="left"?"flex-row items-center gap-3":"",o.labelPosition==="right"?"flex-row-reverse items-center gap-3":"",o.labelPosition==="top"?"flex-col gap-1":"",o.labelPosition==="bottom"?"flex-col-reverse gap-1":""]])},[e.label?(r.openBlock(),r.createElementBlock("label",{key:0,for:l.value,class:"text-sm font-medium shrink-0",style:r.normalizeStyle(o.labelPosition==="left"||o.labelPosition==="right"?{width:o.labelWidth}:{})},[r.createTextVNode(r.toDisplayString(e.label)+" ",1),c.value?(r.openBlock(),r.createElementBlock("span",tq,"*")):r.createCommentVNode("",!0)],12,eq)):r.createCommentVNode("",!0),r.createElementVNode("div",{class:"relative w-full flex-1",ref_key:"inputContainerRef",ref:O},[r.createElementVNode("div",{class:r.normalizeClass(["flex items-center w-full border bg-white dark:bg-neutral-800 border-gray-300 dark:border-neutral-700/50 overflow-hidden shadow-none transition-all duration-200 focus-within:ring-1 focus-within:ring-primary dark:focus-within:ring-primary-600 focus-within:border-neutral-400 dark:focus-within:border-neutral-600",[s.value,r.unref(sn)(o.rounded),d.value?"border-destructive":"",e.disabled?"opacity-50 cursor-not-allowed":"",e.readonly?"bg-neutral-50/50 dark:bg-neutral-900/30":"",B.value?"border-neutral-400 ring-1 ring-primary dark:border-primary-600 dark:ring-neutral-600":""]]),onClick:se},[r.createElementVNode("button",{type:"button",tabindex:"-1",disabled:e.disabled||e.readonly,class:"flex-shrink-0 flex items-center justify-center w-10 h-full text-muted-foreground hover:text-foreground transition-colors focus:outline-none cursor-pointer disabled:cursor-not-allowed",onClick:r.withModifiers(q,["stop"])},[r.createVNode(r.unref(Ae.Calendar),{class:"w-4 h-4 pointer-events-none"})],8,nq),Le[2]||(Le[2]=r.createElementVNode("span",{class:"w-px h-5 bg-gray-200 dark:bg-gray-700 flex-shrink-0"},null,-1)),e.prependInner?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[r.createElementVNode("span",oq,r.toDisplayString(e.prependInner),1),Le[1]||(Le[1]=r.createElementVNode("span",{class:"w-px h-5 bg-gray-200 dark:bg-gray-700 flex-shrink-0"},null,-1))],64)):r.createCommentVNode("",!0),r.createElementVNode("input",{ref_key:"inputRef",ref:I,id:l.value,type:"text",value:w.value,placeholder:e.placeholder,disabled:e.disabled,readonly:e.readonly,autocomplete:"off",class:"flex-1 min-w-0 px-3 h-full bg-transparent text-sm text-foreground dark:text-gray-300 placeholder:text-muted-foreground outline-none cursor-text disabled:cursor-not-allowed",onFocus:H,onBlur:j,onInput:Y,onKeydown:J,onClick:N},null,40,rq),e.clearable&&(f.value||w.value)&&!e.disabled&&!e.readonly?(r.openBlock(),r.createBlock(Lr,{key:1,class:"mr-3",onClear:Ue})):r.createCommentVNode("",!0)],2),(r.openBlock(),r.createBlock(r.Teleport,{to:"body"},[B.value?(r.openBlock(),r.createElementBlock("div",{key:0,ref_key:"popoverRef",ref:S,"data-dcode-datepicker-popover":"true",style:r.normalizeStyle(A.value),class:"dcode-datetimepicker-popover pointer-events-auto font-sans bg-white dark:bg-neutral-900 border border-gray-200 dark:border-neutral-700 rounded-lg shadow-xl flex flex-col min-w-[300px] max-h-[calc(100vh-24px)] overflow-y-auto"},[r.createElementVNode("div",iq,[r.createElementVNode("span",null,r.toDisplayString(ie(U.value,y.value)),1)]),r.createElementVNode("div",sq,[r.createElementVNode("div",aq,[r.createElementVNode("button",{type:"button",onClick:te,class:"p-1 rounded text-primary/70 hover:text-primary hover:bg-primary/10 dark:hover:bg-primary/20 transition-colors focus:outline-none",title:"Dekade Sebelumnya"},[r.createVNode(r.unref(Ae.ChevronFirst),{class:"w-4 h-4"})]),r.createElementVNode("button",{type:"button",onClick:ce,class:"p-1 rounded text-primary/70 hover:text-primary hover:bg-primary/10 dark:hover:bg-primary/20 transition-colors focus:outline-none",title:"Tahun Sebelumnya"},[r.createVNode(r.unref(Ae.ChevronsLeft),{class:"w-4 h-4"})]),r.createElementVNode("button",{type:"button",onClick:ke,class:"p-1 rounded text-primary/70 hover:text-primary hover:bg-primary/10 dark:hover:bg-primary/20 transition-colors focus:outline-none",title:"Bulan Sebelumnya"},[r.createVNode(r.unref(Ae.ChevronLeft),{class:"w-4 h-4"})]),r.createElementVNode("button",{type:"button",onClick:we,class:"w-7 h-7 flex items-center justify-center rounded bg-primary/10 dark:bg-primary/20 text-primary hover:bg-primary/20 dark:hover:bg-primary/30 transition-colors focus:outline-none",title:"Hari Ini"},[...Le[3]||(Le[3]=[r.createElementVNode("div",{class:"w-2 h-2 rounded-full bg-current"},null,-1)])]),r.createElementVNode("button",{type:"button",onClick:_e,class:"p-1 rounded text-primary/70 hover:text-primary hover:bg-primary/10 dark:hover:bg-primary/20 transition-colors focus:outline-none",title:"Bulan Berikutnya"},[r.createVNode(r.unref(Ae.ChevronRight),{class:"w-4 h-4"})]),r.createElementVNode("button",{type:"button",onClick:fe,class:"p-1 rounded text-primary/70 hover:text-primary hover:bg-primary/10 dark:hover:bg-primary/20 transition-colors focus:outline-none",title:"Tahun Berikutnya"},[r.createVNode(r.unref(Ae.ChevronsRight),{class:"w-4 h-4"})]),r.createElementVNode("button",{type:"button",onClick:de,class:"p-1 rounded text-primary/70 hover:text-primary hover:bg-primary/10 dark:hover:bg-primary/20 transition-colors focus:outline-none",title:"Dekade Berikutnya"},[r.createVNode(r.unref(Ae.ChevronLast),{class:"w-4 h-4"})])]),r.createElementVNode("div",lq,r.toDisplayString(Z.value),1),r.createElementVNode("div",cq,[r.createElementVNode("div",dq,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(ee.value,ve=>(r.openBlock(),r.createElementBlock("div",{key:ve.name,class:r.normalizeClass(["text-xs font-semibold",ve.isWeekend?"text-red-600 dark:text-red-400":"text-gray-700 dark:text-gray-300"])},r.toDisplayString(ve.name),3))),128))]),r.createElementVNode("div",uq,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(pe.value,(ve,Ne)=>(r.openBlock(),r.createElementBlock("div",{key:Ne,class:r.normalizeClass(["relative w-full h-8 flex items-center justify-center text-sm",[Oe(ve.date)?"opacity-30 cursor-not-allowed":"cursor-pointer"]]),onClick:Ge=>Be(ve.date)},[r.createElementVNode("div",{class:r.normalizeClass(["w-7 h-7 flex items-center justify-center rounded-full transition-colors",[r.unref(ri)(ve.date,U.value)?"bg-gray-100 text-gray-900 font-bold border border-gray-300 dark:bg-neutral-700 dark:text-white dark:border-neutral-500":r.unref(ri)(ve.date,new Date)?"font-bold text-blue-600 dark:text-blue-400":"hover:bg-gray-200 dark:hover:bg-neutral-700",ve.isCurrentMonth?r.unref(ri)(ve.date,U.value)?"":r.unref(xp)(ve.date)?"text-red-600 dark:text-red-400 font-medium":"text-gray-700 dark:text-gray-200":"text-gray-400 dark:text-gray-500"]])},r.toDisplayString(r.unref(_r)(ve.date,"d")),3)],10,fq))),128))])]),r.createElementVNode("div",hq,[r.createVNode(r.unref(Ae.Clock),{class:"w-4 h-4 text-gray-500 mr-2"}),r.createElementVNode("div",mq,[r.createElementVNode("input",{value:Je.value,onChange:Xe,type:"text",class:"w-6 text-center bg-transparent text-sm outline-none text-gray-800 dark:text-gray-200",maxlength:"2"},null,40,pq),r.createElementVNode("div",gq,[r.createElementVNode("button",{type:"button",onClick:r.withModifiers(Qe,["stop"]),class:"text-gray-400 hover:text-primary focus:outline-none leading-none flex items-center justify-center h-3"},[r.createVNode(r.unref(Ae.ChevronUp),{class:"w-3 h-3"})]),r.createElementVNode("button",{type:"button",onClick:r.withModifiers(Ve,["stop"]),class:"text-gray-400 hover:text-primary focus:outline-none leading-none flex items-center justify-center h-3"},[r.createVNode(r.unref(Ae.ChevronDown),{class:"w-3 h-3"})])])]),Le[5]||(Le[5]=r.createElementVNode("span",{class:"font-bold text-gray-500 dark:text-gray-400"},":",-1)),r.createElementVNode("div",bq,[r.createElementVNode("input",{value:wt.value,onChange:Pe,type:"text",class:"w-6 text-center bg-transparent text-sm outline-none text-gray-800 dark:text-gray-200",maxlength:"2"},null,40,yq),r.createElementVNode("div",vq,[r.createElementVNode("button",{type:"button",onClick:r.withModifiers(he,["stop"]),class:"text-gray-400 hover:text-primary focus:outline-none leading-none flex items-center justify-center h-3"},[r.createVNode(r.unref(Ae.ChevronUp),{class:"w-3 h-3"})]),r.createElementVNode("button",{type:"button",onClick:r.withModifiers(Ce,["stop"]),class:"text-gray-400 hover:text-primary focus:outline-none leading-none flex items-center justify-center h-3"},[r.createVNode(r.unref(Ae.ChevronDown),{class:"w-3 h-3"})])])]),e.enableSeconds?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[Le[4]||(Le[4]=r.createElementVNode("span",{class:"font-bold text-gray-500 dark:text-gray-400"},":",-1)),r.createElementVNode("div",wq,[r.createElementVNode("input",{value:gt.value,onChange:Ie,type:"text",class:"w-6 text-center bg-transparent text-sm outline-none text-gray-800 dark:text-gray-200",maxlength:"2"},null,40,kq),r.createElementVNode("div",_q,[r.createElementVNode("button",{type:"button",onClick:r.withModifiers(qe,["stop"]),class:"text-gray-400 hover:text-primary focus:outline-none leading-none flex items-center justify-center h-3"},[r.createVNode(r.unref(Ae.ChevronUp),{class:"w-3 h-3"})]),r.createElementVNode("button",{type:"button",onClick:r.withModifiers(Se,["stop"]),class:"text-gray-400 hover:text-primary focus:outline-none leading-none flex items-center justify-center h-3"},[r.createVNode(r.unref(Ae.ChevronDown),{class:"w-3 h-3"})])])])],64)):r.createCommentVNode("",!0),e.is24?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("button",{key:1,type:"button",onClick:Le[0]||(Le[0]=r.withModifiers(ve=>k.value=k.value==="AM"?"PM":"AM",["stop"])),class:"bg-white dark:bg-neutral-800 border border-gray-300 dark:border-neutral-700 rounded text-sm px-2 py-1 outline-none hover:border-primary hover:text-primary focus:ring-1 focus:ring-primary text-gray-800 dark:text-gray-200 font-medium transition-colors ml-1"},r.toDisplayString(k.value),1))]),r.createElementVNode("div",xq,[r.createElementVNode("button",{type:"button",onClick:Q,class:"px-3 py-1.5 text-sm font-medium rounded-md hover:bg-gray-100 dark:hover:bg-neutral-800 text-gray-700 dark:text-gray-300 transition-colors"},r.toDisplayString(e.cancelLabel),1),r.createElementVNode("button",{type:"button",onClick:Te,class:"px-3 py-1.5 text-sm font-medium rounded-md bg-primary text-white hover:bg-primary/90 transition-colors"},r.toDisplayString(e.selectLabel),1)]),Le[6]||(Le[6]=r.createElementVNode("div",{class:"border-t border-gray-100 dark:border-neutral-800 px-3 py-1.5 text-xs text-center text-gray-600 dark:text-gray-400 bg-gray-50/50 dark:bg-neutral-900/50 rounded-b-lg"}," Use cursor keys to navigate calendar dates ",-1))])],4)):r.createCommentVNode("",!0)]))],512)],2),d.value?(r.openBlock(),r.createElementBlock("p",Eq,r.toDisplayString(o.error),1)):r.createCommentVNode("",!0)],64))],2))}}),Cq=["for"],Sq={key:0,class:"ml-1 text-destructive"},Aq=["disabled"],Tq={class:"flex-shrink-0 px-2 text-sm text-muted-foreground select-none whitespace-nowrap"},Bq=["id","value","placeholder","disabled","readonly"],Pq={class:"px-3 py-3 text-center border-b border-gray-100 dark:border-neutral-800 text-sm text-gray-600 dark:text-gray-400"},Nq={key:0},Dq={key:1},Mq={class:"flex items-center justify-between px-3 pt-3 pb-2 text-primary"},Rq={class:"text-center font-bold text-gray-800 dark:text-gray-100 pb-3"},Iq={class:"px-2 pb-2"},Oq={class:"grid grid-cols-3 gap-1"},Lq=["onClick"],Fq={key:0,class:"text-xs text-destructive mt-1"},lv=r.defineComponent({name:"DCodeMonthPicker",inheritAttrs:!1,__name:"DCodeMonthPicker",props:{modelValue:{},label:{default:""},placeholder:{default:"Pilih bulan"},clearable:{type:Boolean,default:!0},required:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},visible:{type:Boolean,default:!0},skeleton:{type:Boolean,default:!1},error:{default:null},displayFormat:{default:"MM/yyyy"},modelType:{default:"yyyy-MM"},locale:{default:"en"},placement:{default:"bottom-start"},prependInner:{default:void 0},selectLabel:{default:"Select"},cancelLabel:{default:"Cancel"},tone:{default:"primary"},size:{default:"default"},rounded:{default:"lg"},labelPosition:{default:"top"},labelWidth:{default:"150px"}},emits:["update:modelValue","change","clear"],setup(e,{emit:t}){const n=r.useAttrs(),o=e,i=t,s=r.computed(()=>Zn(o.size).split(" ").filter(K=>!K.startsWith("px-")).join(" ")),a=Math.random().toString(36).slice(2,7),l=r.computed(()=>`dcode-monthpicker-${n.id||o.label||"month-picker"}-${a}`),c=r.computed(()=>{if(o.required)return!0;const K=n.required,W=n["aria-required"];return K===""||K===!0||K==="true"||W==="true"||W===!0}),d=r.computed(()=>!!o.error),f=r.computed({get:()=>o.modelValue,set:K=>{i("update:modelValue",K),i("change",K)}}),h=r.ref(!1);let p=null;r.onMounted(()=>{const K=document.documentElement,W=()=>h.value=K.classList.contains("dark");W(),p=new MutationObserver(W),p.observe(K,{attributes:!0,attributeFilter:["class"]})}),r.onBeforeUnmount(()=>{p?.disconnect(),p=null});const g=r.computed(()=>o.locale==="id"?av:hf);pf(r.toRef(o,"tone"));const y=r.ref(!1),b=r.ref(null),_=r.ref(null),x=r.ref(null),{floatingStyles:B,isPositioned:R}=td(x,_,{strategy:"fixed",placement:r.computed(()=>o.placement||"bottom-start"),whileElementsMounted:Jc,transform:!1,middleware:[Qc(4),ed({padding:8}),Vc({padding:8})]}),S=r.computed(()=>({...B.value,zIndex:99999,pointerEvents:"auto",visibility:R.value?"visible":"hidden"}));Lo.onClickOutside(b,()=>{y.value&&A()},{ignore:[_]});const O=r.computed(()=>{if(!f.value)return null;const K=ms(f.value,o.modelType,new Date);return zr(K)?Fo(K):null}),I=r.computed(()=>O.value?_r(O.value,o.displayFormat,{locale:g.value}):""),D=r.ref(new Date().getFullYear()),w=r.computed(()=>{const K=D.value,W=new Date,se=O.value;return Array.from({length:12}).map((H,N)=>{const j=new Date(K,N,1);return{date:j,label:_r(j,"MMM",{locale:g.value}),isCurrent:v2(j,W),isSelected:se?v2(j,se):!1}})}),E=()=>{o.disabled||o.readonly||(O.value?D.value=O.value.getFullYear():D.value=new Date().getFullYear(),y.value=!0)},F=()=>{o.disabled||o.readonly||(y.value?A():E())},A=()=>{y.value=!1},P=K=>{const W=_r(Fo(K),o.modelType,{locale:g.value});f.value=W,A()},q=()=>{f.value=null,i("clear")},Q=()=>{D.value-=1},re=()=>{D.value+=1},ie=()=>{D.value-=10},le=()=>{D.value+=10},X=()=>{const K=new Date;D.value=K.getFullYear()};return(K,W)=>r.withDirectives((r.openBlock(),r.createElementBlock("div",{ref_key:"wrapperRef",ref:b,class:r.normalizeClass(["w-full relative",[r.unref(n).class,o.disabled?"cursor-not-allowed":""]])},[e.skeleton?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(["flex flex-1 w-full",[o.labelPosition==="left"?"flex-row items-center gap-3":"",o.labelPosition==="right"?"flex-row-reverse items-center gap-3":"",o.labelPosition==="top"?"flex-col gap-1":"",o.labelPosition==="bottom"?"flex-col-reverse gap-1":""]])},[e.label?(r.openBlock(),r.createElementBlock("div",{key:0,class:"h-4 rounded bg-gray-200 dark:bg-gray-700 animate-shimmer shrink-0",style:r.normalizeStyle(o.labelPosition==="left"||o.labelPosition==="right"?{width:o.labelWidth}:{width:"8rem"})},null,4)):r.createCommentVNode("",!0),r.createElementVNode("div",{class:r.normalizeClass(["w-full flex-1 bg-gray-200 dark:bg-gray-700 animate-shimmer",[r.unref(Zn)(o.size),r.unref(sn)(o.rounded)]])},null,2)],2)):(r.openBlock(),r.createElementBlock(r.Fragment,{key:1},[r.createElementVNode("div",{class:r.normalizeClass(["flex flex-1 w-full",[o.labelPosition==="left"?"flex-row items-center gap-3":"",o.labelPosition==="right"?"flex-row-reverse items-center gap-3":"",o.labelPosition==="top"?"flex-col gap-1":"",o.labelPosition==="bottom"?"flex-col-reverse gap-1":""]])},[e.label?(r.openBlock(),r.createElementBlock("label",{key:0,for:l.value,class:"text-sm font-medium shrink-0",style:r.normalizeStyle(o.labelPosition==="left"||o.labelPosition==="right"?{width:o.labelWidth}:{})},[r.createTextVNode(r.toDisplayString(e.label)+" ",1),c.value?(r.openBlock(),r.createElementBlock("span",Sq,"*")):r.createCommentVNode("",!0)],12,Cq)):r.createCommentVNode("",!0),r.createElementVNode("div",{class:"relative w-full flex-1",ref_key:"inputContainerRef",ref:x},[r.createElementVNode("div",{class:r.normalizeClass(["flex items-center w-full border bg-white dark:bg-neutral-800 border-gray-300 dark:border-neutral-700/50 overflow-hidden shadow-none transition-all duration-200 focus-within:ring-1 focus-within:ring-primary dark:focus-within:ring-primary-600 focus-within:border-neutral-400 dark:focus-within:border-neutral-600",[s.value,r.unref(sn)(o.rounded),d.value?"border-destructive":"",e.disabled?"opacity-50 cursor-not-allowed":"",e.readonly?"bg-neutral-50/50 dark:bg-neutral-900/30":"",y.value?"border-neutral-400 ring-1 ring-primary dark:border-primary-600 dark:ring-neutral-600":""]]),onClick:r.withModifiers(F,["stop"])},[r.createElementVNode("button",{type:"button",tabindex:"-1",disabled:e.disabled||e.readonly,class:"flex-shrink-0 flex items-center justify-center w-10 h-full text-muted-foreground hover:text-foreground transition-colors focus:outline-none cursor-pointer disabled:cursor-not-allowed",onClick:r.withModifiers(F,["stop"])},[r.createVNode(r.unref(Ae.Calendar),{class:"w-4 h-4 pointer-events-none"})],8,Aq),W[1]||(W[1]=r.createElementVNode("span",{class:"w-px h-5 bg-gray-200 dark:bg-gray-700 flex-shrink-0"},null,-1)),e.prependInner?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[r.createElementVNode("span",Tq,r.toDisplayString(e.prependInner),1),W[0]||(W[0]=r.createElementVNode("span",{class:"w-px h-5 bg-gray-200 dark:bg-gray-700 flex-shrink-0"},null,-1))],64)):r.createCommentVNode("",!0),r.createElementVNode("input",{id:l.value,type:"text",value:I.value,placeholder:e.placeholder,disabled:e.disabled,readonly:e.readonly,autocomplete:"off",class:r.normalizeClass(["flex-1 min-w-0 px-3 h-full bg-transparent text-sm text-foreground dark:text-gray-300 placeholder:text-muted-foreground outline-none cursor-text disabled:cursor-not-allowed",e.disabled?"cursor-not-allowed":e.readonly?"cursor-default":"cursor-text"]),onClick:r.withModifiers(F,["stop"])},null,10,Bq),e.clearable&&f.value&&!e.disabled&&!e.readonly?(r.openBlock(),r.createBlock(Lr,{key:1,class:"mr-3",onClear:q})):r.createCommentVNode("",!0)],2),(r.openBlock(),r.createBlock(r.Teleport,{to:"body"},[y.value?(r.openBlock(),r.createElementBlock("div",{key:0,ref_key:"popoverRef",ref:_,"data-dcode-datepicker-popover":"true",style:r.normalizeStyle(S.value),class:"dcode-datepicker-popover pointer-events-auto font-sans bg-white dark:bg-neutral-900 border border-gray-200 dark:border-neutral-700 rounded-lg shadow-xl flex flex-col min-w-[280px] max-h-[calc(100vh-24px)] overflow-y-auto select-none"},[r.createElementVNode("div",Pq,[O.value?(r.openBlock(),r.createElementBlock("span",Dq,r.toDisplayString(r.unref(_r)(O.value,"MMMM yyyy",{locale:g.value})),1)):(r.openBlock(),r.createElementBlock("span",Nq,"No month selected"))]),r.createElementVNode("div",Mq,[r.createElementVNode("button",{type:"button",onClick:ie,class:"p-1 rounded text-primary/70 hover:text-primary hover:bg-primary/10 dark:hover:bg-primary/20 transition-colors focus:outline-none",title:"Dekade Sebelumnya"},[r.createVNode(r.unref(Ae.ChevronFirst),{class:"w-4 h-4"})]),r.createElementVNode("button",{type:"button",onClick:Q,class:"p-1 rounded text-primary/70 hover:text-primary hover:bg-primary/10 dark:hover:bg-primary/20 transition-colors focus:outline-none",title:"Tahun Sebelumnya"},[r.createVNode(r.unref(Ae.ChevronsLeft),{class:"w-4 h-4"})]),r.createElementVNode("button",{type:"button",onClick:X,class:"w-7 h-7 flex items-center justify-center rounded bg-primary/10 dark:bg-primary/20 text-primary hover:bg-primary/20 dark:hover:bg-primary/30 transition-colors focus:outline-none",title:"Bulan Ini"},[...W[2]||(W[2]=[r.createElementVNode("div",{class:"w-2 h-2 rounded-full bg-current"},null,-1)])]),r.createElementVNode("button",{type:"button",onClick:re,class:"p-1 rounded text-primary/70 hover:text-primary hover:bg-primary/10 dark:hover:bg-primary/20 transition-colors focus:outline-none",title:"Tahun Berikutnya"},[r.createVNode(r.unref(Ae.ChevronsRight),{class:"w-4 h-4"})]),r.createElementVNode("button",{type:"button",onClick:le,class:"p-1 rounded text-primary/70 hover:text-primary hover:bg-primary/10 dark:hover:bg-primary/20 transition-colors focus:outline-none",title:"Dekade Berikutnya"},[r.createVNode(r.unref(Ae.ChevronLast),{class:"w-4 h-4"})])]),r.createElementVNode("div",Rq,r.toDisplayString(D.value),1),r.createElementVNode("div",Iq,[r.createElementVNode("div",Oq,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(w.value,se=>(r.openBlock(),r.createElementBlock("button",{key:se.date.toISOString(),type:"button",class:r.normalizeClass(["h-9 px-2 text-sm rounded-md flex items-center justify-center transition-colors",[se.isSelected?"bg-gray-100 text-gray-900 font-bold border border-gray-300 dark:bg-neutral-700 dark:text-white dark:border-neutral-500":se.isCurrent?"font-bold text-blue-600 dark:text-blue-400 hover:bg-gray-200 dark:hover:bg-neutral-700":"text-gray-700 dark:text-gray-200 hover:bg-gray-200 dark:hover:bg-neutral-700"]]),onClick:H=>P(se.date)},r.toDisplayString(se.label),11,Lq))),128))])]),W[3]||(W[3]=r.createElementVNode("div",{class:"border-t border-gray-100 dark:border-neutral-800 px-3 py-2 text-xs text-center text-gray-600 dark:text-gray-400 bg-gray-50/50 dark:bg-neutral-900/50 rounded-b-lg"}," Use arrow keys to navigate ",-1))],4)):r.createCommentVNode("",!0)]))],512)],2),d.value?(r.openBlock(),r.createElementBlock("p",Fq,r.toDisplayString(o.error),1)):r.createCommentVNode("",!0)],64))],2)),[[r.vShow,e.visible]])}}),$q={key:0,class:"h-4 w-32 rounded bg-gray-200 dark:bg-gray-700 animate-shimmer"},zq=["for"],jq={key:0,class:"ml-1 text-destructive"},Uq={class:"w-full"},Wq={class:"flex flex-col gap-2"},Hq={class:"flex gap-3 items-center flex-wrap"},qq=["title","onClick"],Kq=["disabled","title","aria-label"],Gq={class:"mb-4"},Yq={class:"mb-4"},Zq={class:"text-xs font-semibold text-gray-600 dark:text-gray-400 uppercase mb-2 block"},Xq={class:"mb-4"},Jq={class:"text-xs font-semibold text-gray-600 dark:text-gray-400 uppercase mb-2 block"},Qq={class:"mb-4"},Vq={class:"text-xs font-semibold text-gray-600 dark:text-gray-400 uppercase mb-2 block"},eK={key:0,class:"mb-4 pb-4 border-b border-gray-200 dark:border-neutral-700"},tK={class:"flex gap-2 flex-wrap"},nK=["title","onClick"],oK={class:"flex items-center gap-2"},rK=["value"],iK={key:1,class:"text-xs text-destructive"},C2=Sn(r.defineComponent({name:"DCodeColorPicker",inheritAttrs:!1,__name:"DCodeColorPicker",props:{modelValue:{},placeholder:{default:"Select a color"},label:{},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},error:{default:null},tone:{default:"primary"},skeleton:{type:Boolean,default:!1},required:{type:Boolean,default:!1},showPicker:{type:Boolean,default:!0},hidePicker:{type:Boolean,default:!1},fetchOptions:{},options:{},valueKey:{default:"color"},labelKey:{default:"name"},colorKey:{default:"color"},useClassForColor:{type:Boolean,default:!1},classPrefix:{default:""},size:{default:"default"},rounded:{default:"lg"}},emits:["update:modelValue","change"],setup(e,{emit:t}){const n=r.useAttrs(),o=e,i=r.computed(()=>{switch(o.size){case"sm":return"w-10 h-10";case"lg":return"w-14 h-14";default:return"w-12 h-12"}}),s=t,a=Math.random().toString(36).slice(2,7),l=r.computed(()=>`dcode-colorpicker-${n.id||o.label||"color-picker"}-${a}`),c=r.computed(()=>{const $=n.required,ne=n["aria-required"];return $===""||$===!0||$==="true"||ne==="true"||ne===!0||o.required}),d=r.computed(()=>!!o.error),f=r.computed(()=>o.showPicker&&!o.hidePicker),h=r.computed({get:()=>o.modelValue||"",set:$=>{s("update:modelValue",$||null),s("change",$||null)}}),p=[{name:"primary",color:"#2563EB"},{name:"emerald",color:"#16A34A"},{name:"amber",color:"#D97706"},{name:"violet",color:"#7C3AED"},{name:"destructive",color:"#DC2626"}],g=r.ref([]),y=r.ref(!1),b=r.computed(()=>o.options&&o.options.length>0?o.options:g.value&&g.value.length>0?g.value:p),_=r.computed(()=>b.value.map($=>({original:$,_value:$[o.valueKey]!==void 0?$[o.valueKey]:$.color,_label:$[o.labelKey]!==void 0?$[o.labelKey]:$.name,_color:$[o.colorKey]!==void 0?$[o.colorKey]:$.color}))),x=r.computed(()=>_.value.find($=>$._value===h.value)),B=r.ref(!1),R=r.ref(!1),S=r.ref(null),O=r.ref(null),I=r.ref(null),D=r.ref(null),w=r.ref(0),E=r.ref(100),F=r.ref(50);let A=null,P=null,q=null;const Q=r.ref(!1);let re=($,ne)=>ne||$;try{const $=In.useI18n&&In.useI18n();$&&$.t&&(re=$.t)}catch($){console.error($)}const ie=()=>{if(!D.value||!I.value)return;const $=D.value.getBoundingClientRect(),ne=I.value.getBoundingClientRect(),te={width:window.innerWidth,height:window.innerHeight},ce=12,ke=8;let we=$.bottom+ce,_e=$.left;if(!(we+ne.height+ke<=te.height)){const Z=$.top-ne.height-ce;Z>=ke?we=Z:we=te.height-ne.height-ke}_e+ne.width+ke>te.width&&(_e=$.right-ne.width,_e-ke<0&&(_e=ke)),I.value.style.left=Math.max(ke,_e)+"px",I.value.style.top=we+"px"};r.onMounted(async()=>{const $=document.documentElement,ne=()=>R.value=$.classList.contains("dark");if(ne(),A=new MutationObserver(ne),A.observe($,{attributes:!0,attributeFilter:["class"]}),o.fetchOptions){y.value=!0;try{const te=await o.fetchOptions();te&&typeof te=="object"&&!Array.isArray(te)&&Array.isArray(te.data)?g.value=te.data:Array.isArray(te)?g.value=te:g.value=[]}catch(te){console.error(te),g.value=[]}finally{y.value=!1}}}),r.onBeforeUnmount(()=>{A?.disconnect(),A=null,P&&(document.removeEventListener("click",P),P=null),q&&(window.removeEventListener("scroll",q,!0),window.removeEventListener("resize",q),q=null)}),pf(r.toRef(o,"tone"));const le=$=>{const ne=$.replace("#",""),te=parseInt(ne.slice(0,2),16)/255,ce=parseInt(ne.slice(2,4),16)/255,ke=parseInt(ne.slice(4,6),16)/255,we=Math.max(te,ce,ke),_e=Math.min(te,ce,ke);let fe=0,de=0;const Z=(we+_e)/2;if(we!==_e){const ee=we-_e;de=Z>.5?ee/(2-we-_e):ee/(we+_e),we===te?fe=((ce-ke)/ee+(ce<ke?6:0))/6:we===ce?fe=((ke-te)/ee+2)/6:fe=((te-ce)/ee+4)/6}return{h:Math.round(fe*360),s:Math.round(de*100),l:Math.round(Z*100)}},X=($,ne,te)=>{const ce=(1-Math.abs(2*te/100-1))*ne/100,ke=ce*(1-Math.abs($/60%2-1)),we=te/100-ce/2;let _e=0,fe=0,de=0;$>=0&&$<60?(_e=ce,fe=ke):$>=60&&$<120?(_e=ke,fe=ce):$>=120&&$<180?(fe=ce,de=ke):$>=180&&$<240?(fe=ke,de=ce):$>=240&&$<300?(_e=ke,de=ce):$>=300&&$<360&&(_e=ce,de=ke);const Z=ee=>{const pe=Math.round((ee+we)*255).toString(16);return pe.length===1?"0"+pe:pe};return`#${Z(_e)}${Z(fe)}${Z(de)}`.toUpperCase()},K=()=>{if(!S.value)return;const $=S.value,ne=$.getContext("2d");if(!ne)return;const te=$.width,ce=$.height;for(let ke=0;ke<te;ke++){const we=ke/te*100;for(let _e=0;_e<ce;_e++){const fe=100-_e/ce*100,de=`hsl(${w.value}, ${we}%, ${fe}%)`;ne.fillStyle=de,ne.fillRect(ke,_e,1,1)}}try{const ke=Math.round(E.value/100*te),we=Math.round((1-F.value/100)*ce);ne.beginPath(),ne.strokeStyle="#ffffff",ne.lineWidth=3,ne.arc(ke,we,7,0,Math.PI*2),ne.stroke(),ne.beginPath(),ne.strokeStyle="#000000",ne.lineWidth=1,ne.arc(ke,we,7,0,Math.PI*2),ne.stroke()}catch(ke){console.error("drawSpectrum error",ke)}};let W=!1;const se=$=>{const ne=S.value;if(!ne)return null;const te=ne.getBoundingClientRect(),ce=$.clientX??$.clientX,ke=$.clientY??$.clientY,we=Math.max(0,Math.min(te.width,ce-te.left)),_e=Math.max(0,Math.min(te.height,ke-te.top)),fe=Math.round(we/te.width*ne.width),de=Math.round(_e/te.height*ne.height);return{x:fe,y:de,width:ne.width,height:ne.height}},H=$=>{W=!0;const ne=$.touches?$.touches[0]:$,te=se(ne);te&&(E.value=Math.max(0,Math.min(100,Math.round(te.x/te.width*100))),F.value=Math.max(0,Math.min(100,Math.round((1-te.y/te.height)*100))),h.value=X(w.value,E.value,F.value),K())},N=$=>{if(!W)return;const ne=$.touches?$.touches[0]:$,te=se(ne);te&&(E.value=Math.max(0,Math.min(100,Math.round(te.x/te.width*100))),F.value=Math.max(0,Math.min(100,Math.round((1-te.y/te.height)*100))),h.value=X(w.value,E.value,F.value),K())},j=()=>{W=!1},Y=async()=>{if(!o.disabled&&f.value)if(B.value=!B.value,B.value){if(h.value){const $=le(h.value);w.value=$.h,E.value=$.s,F.value=$.l}await r.nextTick(),K(),await new Promise($=>setTimeout($,0)),ie(),P=$=>{const ne=$.target;I.value&&D.value&&!I.value.contains(ne)&&!D.value.contains(ne)&&(B.value=!1,P&&document.removeEventListener("click",P))},q=()=>ie(),document.addEventListener("click",P),window.addEventListener("scroll",q,!0),window.addEventListener("resize",q)}else P&&(document.removeEventListener("click",P),P=null),q&&(window.removeEventListener("scroll",q,!0),window.removeEventListener("resize",q),q=null)},J=async($,ne)=>{h.value=$;const te=ne||$;if(te&&te.toString().startsWith("#")){const ce=le(te);w.value=ce.h,E.value=ce.s,F.value=ce.l}f.value&&B.value&&(await r.nextTick(),K())},U=()=>{const $=X(w.value,E.value,F.value);h.value=$,K()},k=()=>{const $=X(w.value,E.value,F.value);h.value=$},C=()=>{const $=X(w.value,E.value,F.value);h.value=$},T=$=>{let te=$.target.value.toUpperCase();if(te.startsWith("#")||(te="#"+te),/^#[0-9A-F]{6}$/.test(te)){h.value=te;const ce=le(te);w.value=ce.h,E.value=ce.s,F.value=ce.l}},M=r.computed(()=>h.value?h.value:R.value?"#1f2937":"#f3f4f6");return($,ne)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["flex flex-col gap-1 w-full",[r.unref(n).class,o.disabled?"cursor-not-allowed":""]])},[e.skeleton?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[e.label?(r.openBlock(),r.createElementBlock("div",$q)):r.createCommentVNode("",!0),r.createElementVNode("div",{class:r.normalizeClass(["w-full bg-gray-200 dark:bg-gray-700 animate-shimmer",[r.unref(Zn)(o.size),r.unref(sn)(o.rounded)]])},null,2)],64)):(r.openBlock(),r.createElementBlock(r.Fragment,{key:1},[e.label?(r.openBlock(),r.createElementBlock("label",{key:0,for:l.value,class:"text-sm font-medium"},[r.createTextVNode(r.toDisplayString(e.label)+" ",1),c.value?(r.openBlock(),r.createElementBlock("span",jq,"*")):r.createCommentVNode("",!0)],8,zq)):r.createCommentVNode("",!0),r.createElementVNode("div",Uq,[r.createElementVNode("div",Wq,[r.createElementVNode("div",Hq,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(_.value,te=>(r.openBlock(),r.createElementBlock("button",{key:te._value,type:"button",class:r.normalizeClass(["shrink-0 border-2 flex items-center justify-center transition-all duration-200 focus:outline-none",[i.value,r.unref(sn)(o.rounded),h.value===te._value?"ring-2 ring-offset-2 ring-offset-white dark:ring-offset-neutral-900 ring-primary border-primary scale-110 shadow-lg z-10":"border-gray-300 dark:border-gray-600 hover:scale-105 opacity-90 hover:opacity-100",o.useClassForColor&&te._color?`${o.classPrefix}${te._color.toLowerCase()}`:""]]),style:r.normalizeStyle(o.useClassForColor?{}:{backgroundColor:te._color}),title:te._label,onClick:ce=>J(te._value,te._color)},[h.value===te._value?(r.openBlock(),r.createBlock(r.unref(Ae.Check),{key:0,class:"w-6 h-6 stroke-[3] text-white drop-shadow-[0_1px_2px_rgba(0,0,0,0.8)]"})):r.createCommentVNode("",!0)],14,qq))),128)),f.value?(r.openBlock(),r.createElementBlock("button",{key:0,ref_key:"buttonRef",ref:D,type:"button",class:r.normalizeClass(["shrink-0 border-2 flex items-center justify-center transition-all duration-200",[i.value,r.unref(sn)(o.rounded),o.disabled?"opacity-50 cursor-not-allowed":"cursor-pointer hover:scale-105",!x.value&&h.value?"ring-2 ring-offset-2 ring-offset-white dark:ring-offset-neutral-900 ring-primary border-primary scale-110 shadow-lg z-10":"border-gray-300 dark:border-gray-600 opacity-90 hover:opacity-100",o.useClassForColor&&x.value&&x.value._color?`${o.classPrefix}${x.value._color.toLowerCase()}`:""]]),style:r.normalizeStyle(!o.useClassForColor||!x.value?{backgroundColor:M.value}:{}),disabled:o.disabled,onClick:Y,title:r.unref(re)("pickColor","Pick color"),"aria-label":r.unref(re)("pickColor","Pick color")},[!x.value&&h.value?(r.openBlock(),r.createBlock(r.unref(Ae.Check),{key:0,class:"w-6 h-6 stroke-[3] text-white drop-shadow-[0_1px_2px_rgba(0,0,0,0.8)]"})):(r.openBlock(),r.createBlock(r.unref(Ae.Edit),{key:1,class:"w-5 h-5 text-white drop-shadow-[0_1px_2px_rgba(0,0,0,0.8)]"}))],14,Kq)):r.createCommentVNode("",!0)])]),r.createVNode(r.Transition,{"enter-active-class":"transition ease-out duration-150","enter-from-class":"opacity-0 scale-95","enter-to-class":"opacity-100 scale-100","leave-active-class":"transition ease-in duration-100","leave-from-class":"opacity-100 scale-100","leave-to-class":"opacity-0 scale-95"},{default:r.withCtx(()=>[f.value&&B.value&&!o.disabled?(r.openBlock(),r.createElementBlock("div",{key:0,ref_key:"panelRef",ref:I,class:"fixed w-80 p-4 bg-white dark:bg-neutral-800 border border-gray-200 dark:border-neutral-700 rounded-lg shadow-2xl",style:{"z-index":"99999"},onClick:ne[3]||(ne[3]=r.withModifiers(()=>{},["stop"]))},[r.createElementVNode("div",Gq,[ne[4]||(ne[4]=r.createElementVNode("label",{class:"text-xs font-semibold text-gray-600 dark:text-gray-400 uppercase mb-2 block"}," Color Spectrum ",-1)),r.createElementVNode("canvas",{ref_key:"spectrumCanvasRef",ref:S,class:"w-full h-40 rounded border border-gray-300 dark:border-neutral-600 cursor-crosshair",width:"300",height:"160",onMousedown:r.withModifiers(H,["prevent"]),onMousemove:r.withModifiers(N,["prevent"]),onMouseup:r.withModifiers(j,["prevent"]),onMouseleave:r.withModifiers(j,["prevent"]),onTouchstartPassive:r.withModifiers(H,["prevent"]),onTouchmovePassive:r.withModifiers(N,["prevent"]),onTouchend:r.withModifiers(j,["prevent"])},null,544)]),r.createElementVNode("div",Yq,[r.createElementVNode("label",Zq," Hue: "+r.toDisplayString(w.value)+"° ",1),r.withDirectives(r.createElementVNode("input",{ref_key:"hueRef",ref:O,"onUpdate:modelValue":ne[0]||(ne[0]=te=>w.value=te),type:"range",min:"0",max:"360",class:"w-full h-2 rounded-lg appearance-none cursor-pointer hue-slider",onInput:U},null,544),[[r.vModelText,w.value]])]),r.createElementVNode("div",Xq,[r.createElementVNode("label",Jq," Saturation: "+r.toDisplayString(E.value)+"% ",1),r.withDirectives(r.createElementVNode("input",{"onUpdate:modelValue":ne[1]||(ne[1]=te=>E.value=te),type:"range",min:"0",max:"100",class:"w-full h-2 rounded-lg appearance-none cursor-pointer",style:r.normalizeStyle(`background: linear-gradient(to right, hsl(${w.value}, 0%, ${F.value}%), hsl(${w.value}, 100%, ${F.value}%))`),onInput:k},null,36),[[r.vModelText,E.value]])]),r.createElementVNode("div",Qq,[r.createElementVNode("label",Vq," Lightness: "+r.toDisplayString(F.value)+"% ",1),r.withDirectives(r.createElementVNode("input",{"onUpdate:modelValue":ne[2]||(ne[2]=te=>F.value=te),type:"range",min:"0",max:"100",class:"w-full h-2 bg-gradient-to-r from-black via-gray-500 to-white rounded-lg appearance-none cursor-pointer",onInput:C},null,544),[[r.vModelText,F.value]])]),Q.value?(r.openBlock(),r.createElementBlock("div",eK,[ne[5]||(ne[5]=r.createElementVNode("p",{class:"text-xs font-semibold text-gray-600 dark:text-gray-400 mb-2 uppercase"}," General Colors ",-1)),r.createElementVNode("div",tK,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(_.value,te=>(r.openBlock(),r.createElementBlock("button",{key:te._value,type:"button",class:r.normalizeClass(["border-2 flex items-center justify-center transition-all duration-200 focus:outline-none",[i.value,r.unref(sn)(o.rounded),h.value===te._value?"ring-2 ring-offset-2 ring-offset-white dark:ring-offset-neutral-800 ring-primary border-primary scale-110 shadow-lg z-10":"border-gray-300 dark:border-gray-600 hover:scale-105 opacity-90 hover:opacity-100",o.useClassForColor&&te._color?`${o.classPrefix}${te._color.toLowerCase()}`:""]]),style:r.normalizeStyle(o.useClassForColor?{}:{backgroundColor:te._color}),title:te._label,onClick:ce=>J(te._value,te._color)},[h.value===te._value?(r.openBlock(),r.createBlock(r.unref(Ae.Check),{key:0,class:"w-6 h-6 stroke-[3] text-white drop-shadow-[0_1px_2px_rgba(0,0,0,0.8)]"})):r.createCommentVNode("",!0)],14,nK))),128))])])):r.createCommentVNode("",!0),r.createElementVNode("div",null,[ne[7]||(ne[7]=r.createElementVNode("label",{class:"text-xs font-semibold text-gray-600 dark:text-gray-400 uppercase mb-2 block"}," Hex Value ",-1)),r.createElementVNode("div",oK,[ne[6]||(ne[6]=r.createElementVNode("span",{class:"text-gray-500 dark:text-gray-400 font-semibold"},"#",-1)),r.createElementVNode("input",{value:h.value.replace("#","").toUpperCase(),type:"text",maxlength:"6",placeholder:"000000",class:"flex-1 px-2 py-1 border border-gray-300 dark:border-neutral-600 rounded bg-white dark:bg-neutral-700 text-sm focus:outline-none focus:ring-1 focus:ring-primary font-mono",onInput:T},null,40,rK)])])],512)):r.createCommentVNode("",!0)]),_:1})]),d.value?(r.openBlock(),r.createElementBlock("p",iK,r.toDisplayString(o.error),1)):r.createCommentVNode("",!0)],64))],2))}}),[["__scopeId","data-v-a8562b1a"]]),sK=["aria-label"],aK=["aria-checked","disabled","onClick"],lK={class:"relative grid h-12 w-14 shrink-0 place-items-center overflow-hidden rounded-lg bg-neutral-100 dark:bg-neutral-800"},cK={class:"w-full min-w-0"},dK={class:"block truncate text-sm font-semibold leading-5 text-neutral-800 dark:text-neutral-100"},uK={key:0,class:"mt-0.5 block text-xs leading-4 text-neutral-500 dark:text-neutral-400"},fK={class:"grid size-8 shrink-0 place-items-center rounded-lg bg-card text-primary"},hK={class:"min-w-0 flex-1"},mK={class:"block text-sm font-semibold leading-5 text-neutral-800 dark:text-neutral-100"},pK={key:0,class:"mt-0.5 block text-xs leading-4 text-neutral-500 dark:text-neutral-400"},S2=r.defineComponent({name:"DCodeCardSelect",__name:"DCodeCardSelect",props:{modelValue:{default:""},options:{default:()=>[]},ariaLabel:{default:""},layout:{default:"grid"}},emits:["update:modelValue","change"],setup(e,{emit:t}){const n=e,o=t,i=r.computed(()=>Yt),s=d=>d.id??d.value,a=r.computed(()=>n.layout==="list"?"grid grid-cols-1 gap-3":"grid grid-cols-1 gap-3 sm:grid-cols-3"),l=r.computed(()=>n.layout==="list"?"items-center gap-3 p-3 text-left":"min-h-28 flex-col items-center justify-center gap-3 p-4 text-center"),c=d=>{d.disabled||(o("update:modelValue",d.value),o("change",d.value))};return(d,f)=>(r.openBlock(),r.createElementBlock("div",{role:"radiogroup","aria-label":e.ariaLabel||void 0,class:r.normalizeClass(a.value)},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(e.options,h=>(r.openBlock(),r.createElementBlock("button",{key:s(h),type:"button",role:"radio","aria-checked":e.modelValue===h.value,disabled:h.disabled,class:r.normalizeClass(["flex min-w-0 cursor-pointer rounded-lg border transition-colors duration-200 disabled:cursor-not-allowed disabled:opacity-60",[l.value,e.modelValue===h.value?"border-primary-500 bg-primary-50 shadow-sm ring-2 ring-primary-100 dark:bg-primary-900/20 dark:ring-primary-900/50":"border-neutral-200 bg-neutral-50 hover:border-primary-300 dark:border-neutral-700 dark:bg-neutral-800 dark:hover:border-primary-700"]]),onClick:p=>c(h)},[e.layout==="grid"?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[r.createElementVNode("span",lK,[r.renderSlot(d.$slots,`graphic-${s(h)}`,{},()=>[h.icon?(r.openBlock(),r.createBlock(r.resolveDynamicComponent(i.value[h.icon]),{key:0,class:"h-5 w-5 text-primary"})):r.createCommentVNode("",!0)])]),r.createElementVNode("span",cK,[r.createElementVNode("span",dK,r.toDisplayString(h.title??h.label),1),h.description?(r.openBlock(),r.createElementBlock("small",uK,r.toDisplayString(h.description),1)):r.createCommentVNode("",!0)])],64)):(r.openBlock(),r.createElementBlock(r.Fragment,{key:1},[r.createElementVNode("span",fK,[h.icon?(r.openBlock(),r.createBlock(r.resolveDynamicComponent(i.value[h.icon]),{key:0,class:"h-4 w-4"})):r.createCommentVNode("",!0)]),r.createElementVNode("span",hK,[r.createElementVNode("strong",mK,r.toDisplayString(h.title??h.label),1),h.description?(r.openBlock(),r.createElementBlock("small",pK,r.toDisplayString(h.description),1)):r.createCommentVNode("",!0)])],64))],10,aK))),128))],10,sK))}}),gK=["id","aria-label","aria-expanded","disabled"],bK={class:"flex min-w-0 flex-1 items-center gap-3 truncate"},yK={key:1,class:"text-neutral-400 dark:text-neutral-500"},vK=["aria-label"],wK={key:0,class:"relative mb-1"},kK=["placeholder"],_K={key:1,class:"px-3 py-6 text-center text-sm text-neutral-400 dark:text-neutral-500"},xK=["id","aria-selected","disabled","onMousemove","onClick"],EK={class:"min-w-0 flex-1 truncate text-left"},A2=r.defineComponent({name:"DCodeSelect",inheritAttrs:!1,__name:"DCodeSelect",props:{modelValue:{default:null},options:{default:()=>[]},placeholder:{default:"Pilih…"},searchable:{type:Boolean,default:!1},searchPlaceholder:{default:"Cari…"},clearable:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},ariaLabel:{default:""}},emits:["update:modelValue","change","clear"],setup(e,{emit:t}){const n=e,o=t,i=r.useAttrs(),s=r.ref(null),a=r.ref(null),l=r.ref([]),c=r.ref(!1),d=r.ref(""),f=r.ref(0),h=i.id?String(i.id):`dc-select-${Math.random().toString(36).slice(2,7)}`,p=`${h}-panel`,g=r.computed(()=>n.disabled||n.readonly),y=r.computed(()=>n.options.find(E=>E.value===n.modelValue)),b=E=>E.label??String(E.value),_=r.computed(()=>{const E=d.value.trim().toLowerCase();return E?n.options.filter(F=>`${F.label??F.value}`.toLowerCase().includes(E)):n.options}),x=r.computed(()=>_.value[f.value]),B=()=>{if(g.value)return;c.value=!0,d.value="";const E=n.options.findIndex(F=>F.value===n.modelValue);f.value=E>=0?E:0,l.value=[],r.nextTick(()=>{n.searchable?a.value?.focus():l.value[f.value]?.focus()})},R=()=>{c.value&&(c.value=!1,l.value=[])},S=E=>{!E||E.disabled||(E.value!==n.modelValue&&(o("update:modelValue",E.value),o("change",E.value)),R())},O=E=>{const F=_.value.length;F&&(f.value=(f.value+E+F)%F,r.nextTick(()=>l.value[f.value]?.focus()))},I=(E,F)=>{E&&(l.value[F]=E)},D=E=>{E.key==="ArrowDown"?(E.preventDefault(),O(1)):E.key==="ArrowUp"?(E.preventDefault(),O(-1)):E.key==="Home"?(E.preventDefault(),f.value=0,r.nextTick(()=>l.value[0]?.focus())):E.key==="End"?(E.preventDefault(),f.value=_.value.length-1,r.nextTick(()=>l.value[f.value]?.focus())):E.key==="Enter"||E.key===" "&&x.value?(E.preventDefault(),S(x.value)):E.key==="Escape"&&(E.preventDefault(),R())},w=E=>{c.value&&s.value&&!s.value.contains(E.target)&&R()};return r.onMounted(()=>document.addEventListener("mousedown",w)),r.onBeforeUnmount(()=>document.removeEventListener("mousedown",w)),(E,F)=>(r.openBlock(),r.createElementBlock("div",{ref_key:"rootRef",ref:s,class:"relative w-full"},[r.createElementVNode("button",{type:"button",role:"combobox",id:r.unref(h),"aria-label":e.ariaLabel||void 0,"aria-expanded":c.value,"aria-haspopup":"listbox","aria-controls":p,disabled:g.value,class:r.normalizeClass(["flex h-12 w-full items-center justify-between gap-2 rounded-lg border border-neutral-200 bg-card px-4 text-left text-sm font-medium text-neutral-700 shadow-sm outline-none transition-colors duration-200 hover:border-primary-300 enabled:focus-visible:border-primary-500 enabled:focus-visible:ring-2 enabled:focus-visible:ring-primary-100 disabled:cursor-not-allowed disabled:opacity-60 dark:border-neutral-700 dark:bg-neutral-800 dark:text-neutral-100 dark:hover:border-primary-700 dark:enabled:focus-visible:ring-primary-900/50",c.value?"border-primary-500 ring-2 ring-primary-100 dark:ring-primary-900/50":""]),onClick:B},[r.createElementVNode("span",bK,[r.renderSlot(E.$slots,"selected",{option:y.value},()=>[y.value!=null?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[r.createTextVNode(r.toDisplayString(b(y.value)),1)],64)):(r.openBlock(),r.createElementBlock("span",yK,r.toDisplayString(e.placeholder),1))])]),r.createVNode(r.unref(Ae.ChevronDown),{class:r.normalizeClass(["h-4 w-4 shrink-0 text-neutral-500 transition-transform duration-200 dark:text-neutral-400",c.value?"rotate-180":""])},null,8,["class"])],10,gK),r.createVNode(r.Transition,{"enter-active-class":"transition ease-out duration-200","enter-from-class":"-translate-y-1 opacity-0","enter-to-class":"translate-y-0 opacity-100","leave-active-class":"transition ease-in duration-150","leave-from-class":"translate-y-0 opacity-100","leave-to-class":"-translate-y-1 opacity-0"},{default:r.withCtx(()=>[c.value?(r.openBlock(),r.createElementBlock("div",{key:0,id:p,role:"listbox","aria-label":e.ariaLabel||void 0,class:"absolute left-0 right-0 z-50 mt-2 max-h-72 overflow-y-auto rounded-lg border border-neutral-100 bg-card p-1 shadow-strong dark:border-neutral-700 dark:bg-neutral-900",onKeydown:D},[e.searchable?(r.openBlock(),r.createElementBlock("div",wK,[r.createVNode(r.unref(Ae.Search),{class:"pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-neutral-400"}),r.withDirectives(r.createElementVNode("input",{ref_key:"searchInputRef",ref:a,"onUpdate:modelValue":F[0]||(F[0]=A=>d.value=A),type:"text",placeholder:e.searchPlaceholder,"aria-label":"Cari",class:"h-10 w-full rounded-md border border-neutral-200 bg-card pl-9 pr-3 text-sm text-neutral-700 outline-none transition-colors focus:border-primary-500 focus:ring-2 focus:ring-primary-100 dark:border-neutral-700 dark:bg-neutral-800 dark:text-neutral-100 dark:focus:ring-primary-900/50"},null,8,kK),[[r.vModelText,d.value]])])):r.createCommentVNode("",!0),_.value.length?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",_K," Tidak ada hasil ")),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(_.value,(A,P)=>(r.openBlock(),r.createElementBlock("button",{key:A.value,ref_for:!0,ref:q=>I(q,P),type:"button",role:"option",id:`${p}-${P}`,"aria-selected":y.value?.value===A.value,disabled:A.disabled,class:r.normalizeClass(["flex w-full items-center justify-between gap-3 rounded-md px-3 py-2.5 text-left text-sm transition-colors duration-150 disabled:cursor-not-allowed disabled:opacity-50",P===f.value?"bg-primary-50 text-primary-700 dark:bg-primary-900/20 dark:text-primary-300":y.value?.value===A.value?"bg-primary text-white":"text-neutral-600 hover:bg-primary-50 hover:text-primary-700 dark:text-neutral-300 dark:hover:bg-primary-900/20 dark:hover:text-primary-300"]),onMousemove:q=>f.value=P,onClick:q=>S(A)},[r.createElementVNode("span",EK,[r.renderSlot(E.$slots,"option",{option:A,selected:y.value?.value===A.value},()=>[r.createTextVNode(r.toDisplayString(b(A)),1)])]),y.value?.value===A.value?(r.openBlock(),r.createBlock(r.unref(Ae.Check),{key:0,class:"h-4 w-4 shrink-0","aria-hidden":"true"})):r.createCommentVNode("",!0)],42,xK))),128))],40,vK)):r.createCommentVNode("",!0)]),_:3})],512))}}),CK=r.defineComponent({__name:"Dialog",props:{open:{type:Boolean},defaultOpen:{type:Boolean},modal:{type:Boolean},unmountOnHide:{type:Boolean}},emits:["update:open"],setup(e,{emit:t}){const n=e,o=t,i=Lt.useForwardPropsEmits(n,o);return(s,a)=>(r.openBlock(),r.createBlock(r.unref(Lt.DialogRoot),r.normalizeProps(r.guardReactiveProps(r.unref(i))),{default:r.withCtx(()=>[r.renderSlot(s.$slots,"default")]),_:3},16))}}),SK=r.defineComponent({inheritAttrs:!1,__name:"DialogContent",props:{class:{type:[Boolean,null,String,Object,Array]},showClose:{type:Boolean,default:!0},forceMount:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const n=e,o=t,i=Lo.reactiveOmit(n,"class","showClose"),s=Lt.useForwardPropsEmits(i,o);return(a,l)=>(r.openBlock(),r.createBlock(r.unref(Lt.DialogPortal),null,{default:r.withCtx(()=>[r.createVNode(r.unref(Lt.DialogOverlay),{class:"fixed inset-0 z-50 bg-black/40 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0"}),r.createVNode(r.unref(Lt.DialogContent),r.mergeProps({...r.unref(s),...a.$attrs},{class:r.unref(_n)("fixed left-1/2 top-1/2 z-50 grid w-full max-w-lg -translate-x-1/2 -translate-y-1/2 gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",n.class)}),{default:r.withCtx(()=>[r.renderSlot(a.$slots,"default"),e.showClose?(r.openBlock(),r.createBlock(r.unref(Lt.DialogClose),{key:0,class:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground"},{default:r.withCtx(()=>[r.createVNode(r.unref(Ae.X),{class:"w-4 h-4"}),l[0]||(l[0]=r.createElementVNode("span",{class:"sr-only"},"Close",-1))]),_:1})):r.createCommentVNode("",!0)]),_:3},16,["class"])]),_:3}))}}),T2=r.defineComponent({__name:"DialogDescription",props:{asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,n=Lo.reactiveOmit(t,"class"),o=Lt.useForwardProps(n);return(i,s)=>(r.openBlock(),r.createBlock(r.unref(Lt.DialogDescription),r.mergeProps(r.unref(o),{class:r.unref(_n)("text-sm text-muted-foreground",t.class)}),{default:r.withCtx(()=>[r.renderSlot(i.$slots,"default")]),_:3},16,["class"]))}}),AK=r.defineComponent({__name:"DialogTitle",props:{asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,n=Lo.reactiveOmit(t,"class"),o=Lt.useForwardProps(n);return(i,s)=>(r.openBlock(),r.createBlock(r.unref(Lt.DialogTitle),r.mergeProps(r.unref(o),{class:r.unref(_n)("text-lg font-medium leading-none tracking-tight",t.class)}),{default:r.withCtx(()=>[r.renderSlot(i.$slots,"default")]),_:3},16,["class"]))}}),TK={key:0,class:"px-6 py-4 flex items-center justify-between border-b border-gray-200 dark:border-neutral-600 bg-gray-100 dark:bg-neutral-700/40 sticky top-0 z-20"},BK={class:"flex items-center gap-3"},PK={class:"flex flex-col"},NK={class:"flex items-center gap-2"},DK={key:2,class:"px-6 py-4 border-t border-neutral-200/60 dark:border-neutral-700/50 bg-neutral-50/50 dark:bg-neutral-900/30 sticky bottom-0 z-20"},MK={class:"flex justify-end gap-3 flex-wrap"},Mi=Sn(r.defineComponent({name:"DCodeDialog",inheritAttrs:!1,__name:"DCodeDialog",props:{modelValue:{type:Boolean,default:!1},title:{default:""},icon:{default:""},maxWidth:{default:void 0},size:{default:"sm"},persistent:{type:Boolean,default:!0},description:{default:""},contentClass:{default:"p-5"},contentStyle:{default:()=>({})},iconClass:{default:""},showClose:{type:Boolean,default:!0}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,o=t,i=r.useAttrs(),s=r.computed(()=>{const{style:f,...h}=i;return h}),a=r.computed(()=>{const f={xs:"400px",sm:"500px",md:"700px",lg:"900px",xl:"1100px","2xl":"1300px",full:"95vw"};let h=n.maxWidth||f[n.size||"sm"]||"500px";return typeof h=="number"?h=`${h}px`:typeof h=="string"&&/^\d+$/.test(h)&&(h=`${h}px`),{width:h,maxWidth:"95vw",margin:"0 auto"}}),l=r.computed(()=>n.icon?Yt[n.icon]??null:null),c=f=>{o("update:modelValue",f)},d=f=>{if(n.persistent){f.preventDefault();return}const h=f.target;h&&h.closest('[data-dcode-floating], [data-dcode-datepicker-popover], [data-radix-popper-content-wrapper], [data-reka-popper-content-wrapper], .dcode-datepicker-popover, [role="listbox"], [role="menu"], .dp__menu')&&f.preventDefault()};return(f,h)=>(r.openBlock(),r.createBlock(r.unref(CK),{open:e.modelValue,"onUpdate:open":c},{default:r.withCtx(()=>[r.createVNode(r.unref(SK),r.mergeProps(s.value,{style:a.value,"show-close":!1,class:"p-0 overflow-hidden rounded-xl flex flex-col max-h-[90vh] bg-white dark:bg-neutral-800 border-0 max-w-none",onInteractOutside:d,onPointerDownOutside:d,onEscapeKeyDown:h[2]||(h[2]=p=>e.persistent?p.preventDefault():null)}),{default:r.withCtx(()=>[e.title||f.$slots["header-append"]?(r.openBlock(),r.createElementBlock("div",TK,[r.createElementVNode("div",BK,[l.value?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(["p-2 rounded-lg",e.iconClass||"bg-primary/10 text-primary"])},[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(l.value),{class:"h-5 w-5"}))],2)):r.createCommentVNode("",!0),r.createElementVNode("div",PK,[r.createVNode(r.unref(AK),{class:"text-lg font-bold text-neutral-900 dark:text-neutral-50 leading-tight"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(e.title),1)]),_:1}),e.description?(r.openBlock(),r.createBlock(r.unref(T2),{key:0,class:"text-sm text-neutral-500 dark:text-neutral-400 mt-0.5"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(e.description),1)]),_:1})):(r.openBlock(),r.createBlock(r.unref(T2),{key:1,class:"hidden"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(e.title||"Dialog Content"),1)]),_:1}))])]),r.createElementVNode("div",NK,[r.renderSlot(f.$slots,"header-append",{},void 0,!0),e.showClose?(r.openBlock(),r.createElementBlock("button",{key:0,type:"button",class:"p-1.5 rounded-lg text-neutral-500 hover:text-neutral-800 dark:text-neutral-400 dark:hover:text-neutral-100 hover:bg-neutral-300/60 dark:hover:bg-neutral-600/60 transition-colors outline-none focus:outline-none focus:ring-0 cursor-pointer","aria-label":"Close",onClick:h[0]||(h[0]=p=>c(!1))},[r.createVNode(r.unref(Ae.X),{class:"h-5 w-5"}),h[3]||(h[3]=r.createElementVNode("span",{class:"sr-only"},"Close",-1))])):r.createCommentVNode("",!0)])])):e.showClose?(r.openBlock(),r.createElementBlock("button",{key:1,type:"button",class:"absolute right-4 top-4 z-30 p-1.5 rounded-lg text-neutral-500 hover:text-neutral-800 dark:text-neutral-400 dark:hover:text-neutral-100 hover:bg-neutral-200 dark:hover:bg-neutral-700 transition-colors outline-none focus:outline-none focus:ring-0 cursor-pointer","aria-label":"Close",onClick:h[1]||(h[1]=p=>c(!1))},[r.createVNode(r.unref(Ae.X),{class:"h-5 w-5"}),h[4]||(h[4]=r.createElementVNode("span",{class:"sr-only"},"Close",-1))])):r.createCommentVNode("",!0),r.createElementVNode("div",{class:r.normalizeClass(["flex-1 overflow-y-auto custom-scrollbar",e.contentClass]),style:r.normalizeStyle(e.contentStyle)},[r.renderSlot(f.$slots,"default",{},void 0,!0)],6),f.$slots.actions?(r.openBlock(),r.createElementBlock("div",DK,[r.createElementVNode("div",MK,[r.renderSlot(f.$slots,"actions",{},void 0,!0)])])):r.createCommentVNode("",!0)]),_:3},16,["style"])]),_:3},8,["open"]))}}),[["__scopeId","data-v-29b041c7"]]),RK={key:0,class:"py-8 px-4 text-center select-none flex flex-col items-center"},IK={class:"text-sm font-medium text-neutral-700 dark:text-neutral-300"},OK={key:0,class:"text-xs text-neutral-400 mt-1"},LK=["onClick","onMouseenter"],FK={class:"flex items-center gap-3 min-w-0"},$K={class:"flex flex-col min-w-0"},zK={key:0,class:"text-[11px] text-neutral-400 dark:text-neutral-500 truncate"},jK={class:"flex items-center gap-2 flex-shrink-0"},B2=Sn(r.defineComponent({name:"DCodeSearchDialog",__name:"DCodeSearchDialog",props:{modelValue:{type:Boolean,default:!1},items:{default:()=>[]},title:{default:"Pencarian Cepat"},icon:{default:"Search"},placeholder:{default:"Ketik untuk mencari menu atau halaman..."},maxWidth:{default:580},maxHeight:{default:"340px"},persistent:{type:Boolean,default:!1},serverSearch:{type:Boolean,default:!1},emptyTitle:{default:"Menu tidak ditemukan"},emptySubtitle:{default:"Coba kata kunci lain"},resetSearchText:{default:"Reset pencarian"},showBadge:{type:Boolean,default:!0},showEnterIcon:{type:Boolean,default:!0},closeOnSelect:{type:Boolean,default:!0},defaultIcon:{default:"FileText"},filterFn:{type:Function,default:void 0}},emits:["update:modelValue","select","update:search"],setup(e,{emit:t}){const n=e,o=t,i=r.ref(""),s=r.ref(0),a=r.ref(null),l=r.ref(null),c=r.ref([]),d=r.computed(()=>typeof n.maxHeight=="number"?`${n.maxHeight}px`:n.maxHeight||"340px"),f=E=>{i.value=E},h=()=>{i.value=""},p=E=>{o("update:modelValue",E)},g=(E,F)=>{E&&(c.value[F]=E)},y=E=>E?E.title??E.name??E.label??"":"",b=E=>E?E.subtitle??E.parentTitle??E.description??E.category??"":"",_=E=>E?E.badge??E.route??E.path??"":"",x=E=>{if(E)return E.icon},B=(E,F)=>E?E.id??E.menuId??E.key??E.route??F:F,R=E=>{if(!E)return(typeof n.defaultIcon=="string"?Yt[n.defaultIcon]:n.defaultIcon)||Ae.FileText;if(typeof E=="string"){const F=Yt;if(F[E])return F[E];if(F[`${E}Icon`])return F[`${E}Icon`];const A=E.replace(/^mdi-/,"").split(/[-_]/).map(q=>q.charAt(0).toUpperCase()+q.slice(1)).join("");return F[A]?F[A]:F[`${A}Icon`]?F[`${A}Icon`]:(typeof n.defaultIcon=="string"?F[n.defaultIcon]:n.defaultIcon)||Ae.FileText}return E},S=r.computed(()=>{const E=n.items||[];if(n.serverSearch)return E;const F=(i.value||"").trim().toLowerCase();return F?n.filterFn?E.filter(A=>n.filterFn(A,F)):E.filter(A=>{const P=y(A).toLowerCase(),q=b(A).toLowerCase(),Q=_(A).toLowerCase();return P.includes(F)||q.includes(F)||Q.includes(F)}):E});r.watch(()=>i.value,E=>{o("update:search",E)}),r.watch(S,()=>{s.value=0,c.value=[]}),r.watch(()=>n.modelValue,E=>{E&&(i.value="",s.value=0,r.nextTick(()=>{const F=a.value?.$el?.querySelector("input")||a.value;F&&typeof F.focus=="function"&&F.focus()}))});const O=E=>{E?.disabled||(o("select",E),n.closeOnSelect&&o("update:modelValue",!1))},I=()=>{const E=S.value[s.value];E&&O(E)},D=E=>{const F=S.value.length;F!==0&&(E==="down"?s.value=(s.value+1)%F:s.value=(s.value-1+F)%F,r.nextTick(()=>{const A=c.value[s.value];A&&A.scrollIntoView({block:"nearest",behavior:"smooth"})}))},w=E=>{E.key==="ArrowDown"?(E.preventDefault(),D("down")):E.key==="ArrowUp"?(E.preventDefault(),D("up")):E.key==="Enter"?(E.preventDefault(),I()):E.key==="Escape"&&(n.persistent||o("update:modelValue",!1))};return(E,F)=>(r.openBlock(),r.createBlock(Mi,{"model-value":e.modelValue,"onUpdate:modelValue":p,title:e.title,icon:e.icon,"max-width":e.maxWidth,persistent:e.persistent},{"header-append":r.withCtx(()=>[r.renderSlot(E.$slots,"header-append",{},void 0,!0)]),default:r.withCtx(()=>[r.createElementVNode("div",{class:"space-y-3",onKeydown:w},[r.renderSlot(E.$slots,"input",{query:i.value,setQuery:f},()=>[r.createVNode(Gs,{ref_key:"inputRef",ref:a,modelValue:i.value,"onUpdate:modelValue":F[0]||(F[0]=A=>i.value=A),placeholder:e.placeholder,clearable:!0,size:"default",icon:r.unref(Ae.Search),rounded:"xl",onClear:F[1]||(F[1]=A=>i.value="")},null,8,["modelValue","placeholder","icon"])],!0),r.renderSlot(E.$slots,"prepend-list",{},void 0,!0),r.createElementVNode("div",{ref_key:"listRef",ref:l,class:"overflow-y-auto space-y-1 pr-1 custom-scrollbar",style:r.normalizeStyle({maxHeight:d.value})},[(i.value||"").trim()&&S.value.length===0?(r.openBlock(),r.createElementBlock("div",RK,[r.renderSlot(E.$slots,"empty",{query:i.value,reset:h},()=>[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(r.unref(Ae.SearchX)),{class:"w-8 h-8 text-neutral-400 dark:text-neutral-500 mb-2 opacity-60"})),r.createElementVNode("p",IK,r.toDisplayString(e.emptyTitle),1),e.emptySubtitle?(r.openBlock(),r.createElementBlock("p",OK,r.toDisplayString(e.emptySubtitle),1)):r.createCommentVNode("",!0),e.resetSearchText?(r.openBlock(),r.createBlock(Ut,{key:1,variant:"link",size:"sm",text:e.resetSearchText,onClick:h,class:"mt-2"},null,8,["text"])):r.createCommentVNode("",!0)],!0)])):(r.openBlock(!0),r.createElementBlock(r.Fragment,{key:1},r.renderList(S.value,(A,P)=>(r.openBlock(),r.createElementBlock("div",{key:B(A,P),ref_for:!0,ref:q=>g(q,P),onClick:q=>O(A),onMouseenter:q=>s.value=P,class:r.normalizeClass(["group flex items-center justify-between gap-3 px-3 py-2.5 rounded-xl cursor-pointer transition-all duration-150 select-none",[s.value===P?"bg-primary-50 dark:bg-primary-900/20 text-primary-600 dark:text-primary-400 shadow-xs":"text-neutral-700 dark:text-neutral-300 hover:bg-neutral-50 dark:hover:bg-neutral-800/60",A.disabled?"opacity-50 pointer-events-none":""]])},[r.renderSlot(E.$slots,"item",{item:A,index:P,isSelected:s.value===P,select:()=>O(A)},()=>[r.createElementVNode("div",FK,[r.createElementVNode("div",{class:r.normalizeClass(["w-8 h-8 rounded-lg flex items-center justify-center flex-shrink-0 transition-colors",[s.value===P?"bg-primary-100 dark:bg-primary-800/40 text-primary-600 dark:text-primary-300":"bg-neutral-100 dark:bg-neutral-800 text-neutral-500 dark:text-neutral-400 group-hover:text-neutral-700 dark:group-hover:text-neutral-200"]])},[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(R(x(A))),{class:"w-4 h-4"}))],2),r.createElementVNode("div",$K,[r.createElementVNode("span",{class:r.normalizeClass(["text-sm font-medium truncate",{"text-primary-600 dark:text-primary-400":s.value===P}])},r.toDisplayString(y(A)),3),b(A)?(r.openBlock(),r.createElementBlock("span",zK,r.toDisplayString(b(A)),1)):r.createCommentVNode("",!0)])]),r.createElementVNode("div",jK,[e.showBadge&&_(A)?(r.openBlock(),r.createBlock(os,{key:0,text:_(A),variant:"outline",size:"xs",class:"inline-flex max-w-[180px] truncate font-mono text-[11px]"},null,8,["text"])):r.createCommentVNode("",!0),e.showEnterIcon?(r.openBlock(),r.createElementBlock("div",{key:1,class:r.normalizeClass(["w-5 h-5 rounded flex items-center justify-center transition-opacity",s.value===P?"opacity-100 text-primary-600 dark:text-primary-400":"opacity-0 text-neutral-400"])},[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(r.unref(Ae.CornerDownLeft)),{class:"w-3.5 h-3.5"}))],2)):r.createCommentVNode("",!0)])],!0)],42,LK))),128))],4),r.renderSlot(E.$slots,"append-list",{},void 0,!0)],32)]),_:3},8,["model-value","title","icon","max-width","persistent"]))}}),[["__scopeId","data-v-4997d302"]]),UK={key:0,class:"fixed inset-0 z-[1000] flex justify-end"},WK={class:"flex items-start justify-between gap-3 border-b border-neutral-200 dark:border-neutral-800 px-5 py-4"},HK={class:"min-w-0"},qK={class:"m-0 text-xl font-semibold leading-7 tracking-normal text-neutral-900 dark:text-neutral-100"},KK={key:0,class:"mt-1 m-0 text-sm leading-5 text-neutral-500 dark:text-neutral-400"},GK={class:"flex-1 overflow-y-auto p-5"},P2=r.defineComponent({name:"DCodeDrawer",__name:"DCodeDrawer",props:{open:{type:Boolean,default:!1},title:{default:void 0},description:{default:void 0},widthClass:{default:"max-w-sm"},closeLabel:{default:"Close"}},emits:["close","update:open"],setup(e,{emit:t}){const n=e,o=t,i=()=>{o("update:open",!1),o("close")};r.watch(()=>n.open,a=>{document.body.style.overflow=a?"hidden":""});const s=a=>{a.key==="Escape"&&n.open&&i()};return window.addEventListener("keydown",s),r.onUnmounted(()=>{document.body.style.overflow="",window.removeEventListener("keydown",s)}),(a,l)=>(r.openBlock(),r.createBlock(r.Teleport,{to:"body"},[e.open?(r.openBlock(),r.createElementBlock("div",UK,[r.createVNode(r.Transition,{appear:"","enter-active-class":"transition-opacity duration-300 ease-out","enter-from-class":"opacity-0","enter-to-class":"opacity-100","leave-active-class":"transition-opacity duration-200 ease-in","leave-from-class":"opacity-100","leave-to-class":"opacity-0"},{default:r.withCtx(()=>[e.open?(r.openBlock(),r.createElementBlock("div",{key:0,class:"fixed inset-0 bg-black/40 backdrop-blur-sm",onClick:i})):r.createCommentVNode("",!0)]),_:1}),r.createVNode(r.Transition,{appear:"","enter-active-class":"transition-transform duration-300 ease-out","enter-from-class":"translate-x-full","enter-to-class":"translate-x-0","leave-active-class":"transition-transform duration-200 ease-in","leave-from-class":"translate-x-0","leave-to-class":"translate-x-full"},{default:r.withCtx(()=>[e.open?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(["relative h-full w-full overflow-y-auto bg-white shadow-2xl border-l border-neutral-200 dark:border-neutral-800 dark:bg-neutral-900 flex flex-col",e.widthClass])},[r.createElementVNode("div",WK,[r.createElementVNode("div",HK,[r.createElementVNode("h3",qK,r.toDisplayString(e.title),1),e.description?(r.openBlock(),r.createElementBlock("p",KK,r.toDisplayString(e.description),1)):r.createCommentVNode("",!0)]),r.createVNode(Ut,{variant:"ghost",size:"icon",icon:"X","aria-label":e.closeLabel,onClick:i,class:"shrink-0 rounded-full text-neutral-500 hover:bg-neutral-100 hover:text-neutral-900 dark:text-neutral-400 dark:hover:bg-neutral-800 dark:hover:text-neutral-100"},null,8,["aria-label"])]),r.createElementVNode("div",GK,[r.renderSlot(a.$slots,"default")])],2)):r.createCommentVNode("",!0)]),_:3})])):r.createCommentVNode("",!0)]))}}),gf=r.defineComponent({__name:"Alert",props:{class:{type:[Boolean,null,String,Object,Array]},variant:{}},setup(e){const t=e;return(n,o)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(r.unref(_n)(r.unref(YK)({variant:e.variant}),t.class)),role:"alert"},[r.renderSlot(n.$slots,"default")],2))}}),bf=r.defineComponent({__name:"AlertDescription",props:{class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e;return(n,o)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(r.unref(_n)("text-sm [&_p]:leading-relaxed",t.class))},[r.renderSlot(n.$slots,"default")],2))}}),YK=Rm("relative w-full rounded-lg border px-4 py-3 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}});function Mp(){const e=s=>{const a={type:s.type||"info",title:s.title,message:s.message,duration:s.duration??3e3};typeof window<"u"&&window.dispatchEvent(new CustomEvent("micro:toast",{detail:a,bubbles:!0,composed:!0})),(a.type==="error"?console.error:a.type==="warning"?console.warn:console.log)(`[Toast][${a.type?.toUpperCase()}]`,a.title||"",a.message)};return{show:e,success:(s,a)=>e({type:"success",message:s,title:a}),error:(s,a)=>e({type:"error",message:s,title:a}),warning:(s,a)=>e({type:"warning",message:s,title:a}),info:(s,a)=>e({type:"info",message:s,title:a})}}const cv={xlsx:"FileSpreadsheet",xls:"FileSpreadsheet",csv:"FileSpreadsheet",pdf:"FileText",doc:"FileText",docx:"FileText",txt:"FileText",json:"FileJson",xml:"FileCode",html:"FileCode",zip:"FileArchive",rar:"FileArchive",jpg:"FileImage",jpeg:"FileImage",png:"FileImage",gif:"FileImage",default:"Download"},ps={label:{ID:"Unduh Template",EN:"Download Template",KR:"템플릿 다운로드"},title:{ID:"File Template",EN:"Template File",KR:"템플릿 파일"},description:{ID:"Unduh template ini sebagai panduan format upload",EN:"Download this template as upload format guide",KR:"이 템플릿을 업로드 형식 가이드로 다운로드하세요"},downloading:{ID:"Mengunduh template...",EN:"Downloading template...",KR:"템플릿 다운로드 중..."},success:{ID:"Template berhasil diunduh",EN:"Template downloaded successfully",KR:"템플릿이 성공적으로 다운로드되었습니다"},error:{ID:"Gagal mengunduh template",EN:"Failed to download template",KR:"템플릿 다운로드 실패"},retrying:{ID:"Mencoba mengunduh ulang...",EN:"Retrying download...",KR:"다시 다운로드 중..."},retry:{ID:"Coba Lagi",EN:"Retry",KR:"다시 시도"},show:{ID:"Tampilkan Template",EN:"Show Template",KR:"템플릿 표시"},hide:{ID:"Sembunyikan Template",EN:"Hide Template",KR:"템플릿 숨기기"}};function N2(e){const{template:t,locale:n,apiUrl:o}=e,i=Mp(),s=r.ref(!1),a=r.ref(!0),l=r.ref(null),c=r.computed(()=>!!t?.endpoint?.apiUrl),d=r.computed(()=>{if(t?.icon)return t.icon;if(t?.fileType){const I=t.fileType.toLowerCase();return cv[I]||cv.default}return cv.default}),f=r.computed(()=>b(t?.labelID,t?.labelEN,t?.labelKR,ps.label)),h=r.computed(()=>b(t?.titleID,t?.titleEN,t?.titleKR,ps.title)),p=r.computed(()=>b(t?.descriptionID,t?.descriptionEN,t?.descriptionKR,ps.description)),g=r.computed(()=>{const I=a.value?ps.hide:ps.show;return b(I.ID,I.EN,I.KR,I)}),y=r.computed(()=>b(ps.retry.ID,ps.retry.EN,ps.retry.KR,ps.retry));function b(I,D,w,E){const F=n.value.toLowerCase();return F==="kr"||F==="ko"?w||D||I||E?.KR||E?.EN||E?.ID||"":F==="id"?I||D||E?.ID||E?.EN||"":D||I||E?.EN||E?.ID||""}function _(I){const D=ps[I];return b(D.ID,D.EN,D.KR,D)}function x(I,D){const w=URL.createObjectURL(I),E=document.createElement("a");E.href=w,E.download=D,document.body.appendChild(E),E.click(),document.body.removeChild(E),URL.revokeObjectURL(w)}function B(I,D){return I?.filename?I.filename:I?.name?I.name:I?.data?.filename?I.data.filename:I?.data?.name?I.data.name:D||t?.filename||`template_${Date.now()}.${t?.fileType||"file"}`}async function R(){if(!c.value||!t?.endpoint?.apiUrl){console.warn("No template endpoint configured");return}if(!s.value){s.value=!0,l.value=null,i.info(_("downloading"));try{const I=t.endpoint,D=await o(I.apiUrl,I.apiMethod||"GET",I.params||{});let w;D instanceof Blob?w=D:D?.data instanceof Blob?w=D.data:typeof D=="string"&&D.startsWith("http")?w=await(await fetch(D)).blob():D?.url&&typeof D.url=="string"?w=await(await fetch(D.url)).blob():w=new Blob([JSON.stringify(D)],{type:"application/octet-stream"});const E=B(D,t.filename);x(w,E),i.success(_("success"))}catch(I){console.error("Template download error:",I),l.value=I?.message||_("error"),i.error(_("error"),I?.message)}finally{s.value=!1}}}function S(){a.value=!a.value}function O(){l.value=null}return{isDownloading:s,isExpanded:a,downloadError:l,hasTemplate:c,resolvedIcon:d,resolvedLabel:f,resolvedTitle:h,resolvedDescription:p,toggleButtonText:g,retryButtonText:y,downloadTemplate:R,toggleExpanded:S,clearError:O}}const ZK={class:"flex flex-col gap-3 w-full"},XK={key:0,class:"col-span-full flex flex-col gap-2 p-3 bg-white dark:bg-neutral-800 border border-dashed border-slate-200 dark:border-neutral-700/50 rounded-lg opacity-70 pointer-events-none animate-pulse"},JK={class:"flex flex-col items-center justify-center gap-2 py-6 rounded-lg border border-dashed border-slate-300 dark:border-neutral-700/50 bg-slate-50 dark:bg-neutral-900/30 text-slate-400"},QK={key:1,class:"col-span-full flex flex-col items-center justify-center text-center gap-2 px-3 py-8 bg-slate-50 dark:bg-neutral-900/10 border border-slate-200 dark:border-neutral-700/50 rounded-lg opacity-70"},VK={class:"text-sm font-medium text-slate-500"},eG={class:"flex items-center justify-between gap-2"},tG=["onClick"],nG={key:0,class:"space-y-2"},oG={class:"flex items-center justify-between"},rG=["onClick"],iG={class:"p-3 rounded-lg border border-slate-200 dark:border-neutral-700 bg-gradient-to-br from-blue-50 to-indigo-50 dark:from-blue-950/20 dark:to-indigo-950/20 space-y-2"},sG={class:"flex items-start gap-2"},aG={class:"p-1.5 rounded-lg bg-white dark:bg-neutral-800 shadow-sm"},lG={class:"flex-1"},cG={class:"text-xs font-semibold text-slate-800 dark:text-neutral-200"},dG={class:"text-xs text-slate-600 dark:text-neutral-400 mt-0.5"},uG={class:"flex items-center gap-2"},fG={key:1,class:"flex items-center gap-3 px-3 py-2 bg-green-50 dark:bg-green-900/20 border border-green-200 dark:border-green-800 rounded-md"},hG={class:"text-xs text-green-700 dark:text-green-400 flex-1 truncate"},mG=["onClick"],pG=["for","onDrop"],gG={class:"text-xs text-slate-500 dark:text-slate-400"},bG={key:2,class:"text-xs text-slate-400"},yG=["id","disabled","accept","onChange"],vG={class:"flex flex-col items-center justify-center min-h-[300px]"},wG=["src","alt"],kG=["src"],_G={key:2,class:"flex flex-col items-center gap-4 py-12 text-slate-400"},xG={class:"text-sm font-medium"},EG=["href"],Rp=r.defineComponent({__name:"DCodeDynamicUploadList",props:{modelValue:{type:Array,default:()=>[]},label:{type:String,default:""},labelID:{type:String,default:"Documents"},labelEN:{type:String,default:"Documents"},labelKR:{type:String,default:"Documents"},endpoint:{type:Object,default:()=>null},endpointReference:{type:Object,default:()=>null},itemTitle:{type:String,default:"name"},itemValue:{type:String,default:"id"},disabled:Boolean,required:Boolean,typeFile:{type:String,default:void 0},sizeFile:{type:Number,default:void 0},items:{type:Array,default:void 0},baseUrl:{type:String,default:void 0},template:{type:Object,default:null},dummyMode:{type:Boolean,default:!1}},emits:["update:modelValue","uploaded","success"],setup(e,{emit:t}){const n=e,o=t,{t:i,locale:s}=In.useI18n(),{apiUrl:a}=r.inject("externalApi")||{},l=r.computed(()=>{const A=n.endpoint;if(!A?.apiUrl)return null;let P=A.apiUrl;if(!P.startsWith("http")&&n.baseUrl){const q=n.baseUrl.replace(/\/$/,""),Q=P.startsWith("/")?P:`/${P}`;P=`${q}${Q}`}return P}),c=r.computed(()=>{const A=d.value.length;return A<=1?"grid-cols-1":A===2?"grid-cols-1 md:grid-cols-2":A===3?"grid-cols-1 md:grid-cols-3 xl:grid-cols-4":A===4?"grid-cols-1 md:grid-cols-2 lg:grid-cols-3":"grid-cols-1 md:grid-cols-2 lg:grid-cols-4"}),d=r.ref([]),f=r.ref([]),h=r.ref(new Set),p=r.ref(!0),g=r.ref(!1),y=r.ref(""),b=r.ref(""),_=r.ref(""),x=r.computed(()=>{if(!n.template)return new Map;const A=new Map;return d.value.forEach(P=>{const q=String(P[n.itemValue]||P.id||P.typeDocument||"");q&&A.set(q,N2({template:n.template,locale:r.computed(()=>s.value),apiUrl:a}))}),A}),B=A=>{const P=String(A[n.itemValue]||A.id||A.typeDocument||"");return x.value.get(P)||null},R=A=>{const P=B(A);if(!P)return null;const q=P.resolvedIcon;return Yt[q]||Yt.Download},S=async()=>{if(p.value=!0,n.items!==void 0){d.value=n.items,p.value=!1;return}if(!n.endpointReference?.apiUrl||n.dummyMode){p.value=!1;return}try{const A=await a(n.endpointReference.apiUrl,n.endpointReference.apiMethod||"GET",{page:1,perPage:100});if(n.items!==void 0){p.value=!1;return}let P=A?.data||A;Array.isArray(P)||(P=[P]),d.value=P}catch(A){console.error("Failed to fetch dynamic document list",A)}finally{p.value=!1}};r.onMounted(()=>{Array.isArray(n.modelValue)&&n.modelValue.length>0&&(f.value=JSON.parse(JSON.stringify(n.modelValue))),S()}),r.onBeforeUnmount(()=>{f.value.forEach(A=>{A._localPreviewUrl&&URL.revokeObjectURL(A._localPreviewUrl)})}),r.watch(()=>n.modelValue,A=>{if(Array.isArray(A)&&JSON.stringify(A)!==JSON.stringify(f.value)){const P=JSON.parse(JSON.stringify(A));P.forEach(q=>{const Q=f.value.find(re=>{const ie=[q.typeDocument?.id,q.typeDocument?.code,q.typeDocument,q.idDocumentType?.id,q.idDocumentType?.code,q.idDocumentType].map(X=>String(X)).filter(X=>X!=="undefined"&&X!=="null"&&X!==""),le=[re.typeDocument?.id,re.typeDocument?.code,re.typeDocument,re.idDocumentType?.id,re.idDocumentType?.code,re.idDocumentType].map(X=>String(X)).filter(X=>X!=="undefined"&&X!=="null"&&X!=="");return ie.some(X=>le.includes(X))});Q?._localPreviewUrl&&(q._localPreviewUrl=Q._localPreviewUrl)}),f.value=P}},{deep:!0}),r.watch(()=>n.endpointReference?.apiUrl,(A,P)=>{A!==P&&S()}),r.watch(()=>n.endpointReference?.apiMethod,(A,P)=>{A!==P&&S()}),r.watch(()=>n.items,A=>{d.value=A??[],p.value=!1},{deep:!0,immediate:!0});const O=(A,P)=>{if(!P||!A)return!1;const q=[P[n.itemValue],P.id,P.code,P.value,P.typeDocument].map(ie=>String(ie)).filter(ie=>ie!=="undefined"&&ie!=="null"&&ie!==""),Q=[];A.typeDocument&&(typeof A.typeDocument=="object"?Q.push(A.typeDocument.id,A.typeDocument.code,A.typeDocument.value):Q.push(A.typeDocument)),A.idDocumentType&&(typeof A.idDocumentType=="object"?Q.push(A.idDocumentType.id,A.idDocumentType.code,A.idDocumentType.value):Q.push(A.idDocumentType)),n.itemValue&&A[n.itemValue]&&(typeof A[n.itemValue]=="object"?Q.push(A[n.itemValue].id,A[n.itemValue].code,A[n.itemValue].value):Q.push(A[n.itemValue])),A.document&&typeof A.document=="object"?Q.push(A.document.id,A.document.code,A.document.value):A.document&&typeof A.document!="string"&&Q.push(A.document);const re=Q.map(ie=>String(ie)).filter(ie=>ie!=="undefined"&&ie!=="null"&&ie!=="");return q.some(ie=>re.includes(ie))},I=A=>f.value.find(P=>O(P,A))||null,D=async(A,P,q)=>{const Q=q.target,re=Q.files?.[0];if(!re)return;if(n.dummyMode){const X=A[n.itemValue]||A.id||A.typeDocument,K=URL.createObjectURL(re),W=[...f.value],se=W.findIndex(N=>O(N,A));W[se]?._localPreviewUrl&&URL.revokeObjectURL(W[se]._localPreviewUrl);const H={id:null,idDocument:null,idDocumentType:X,filename:re.name,document:X,documentUrl:re.name,typeDocument:X,_localPreviewUrl:K,_fileType:re.type};se>-1?W[se]={...W[se],...H}:W.push(H),f.value=W,o("update:modelValue",W),Q.value="";return}const ie=A[n.itemValue]||A.id||A.typeDocument,le=URL.createObjectURL(re);if(!l.value){const X=[...f.value],K=X.findIndex(se=>O(se,A));X[K]?._localPreviewUrl&&URL.revokeObjectURL(X[K]._localPreviewUrl);const W={id:null,idDocument:null,idDocumentType:ie,filename:re.name,document:ie,documentUrl:re.name,typeDocument:ie,_localPreviewUrl:le,_fileType:re.type};K>-1?X[K]={...X[K],...W}:X.push(W),f.value=X,o("update:modelValue",X);return}h.value.add(P);try{const X=new FormData;X.append("doc",re),X.append("typeDocument",String(ie));const K=await a(l.value,n.endpoint?.apiMethod||"POST",X),W=Array.isArray(K?.data)?K.data[0]:K?.data||K,se=W?.url||W?.document||re.name,H=W?.id||null,N=W?.filename||W?.name||re.name,j=[...f.value],Y=j.findIndex(U=>O(U,A));j[Y]?._localPreviewUrl&&URL.revokeObjectURL(j[Y]._localPreviewUrl);const J={...W,id:H||W?.idDocument||W?.id_document||null,idDocument:W?.idDocument||H||W?.id_document||null,idDocumentType:ie,filename:N,document:ie,documentUrl:se,typeDocument:ie,_localPreviewUrl:le,_fileType:re.type};Y>-1?j[Y]={...j[Y],...J}:j.push(J),f.value=j,o("update:modelValue",j),o("uploaded",W),o("success",W)}catch(X){console.error("Upload failed",X)}finally{h.value.delete(P),Q.value=""}},w=A=>{const P=f.value.find(Q=>O(Q,A));P?._localPreviewUrl&&URL.revokeObjectURL(P._localPreviewUrl);const q=f.value.filter(Q=>!O(Q,A));f.value=q,o("update:modelValue",q)},E=A=>{const P=I(A);if(!P)return;let q=P._localPreviewUrl;if(!q){const ie=P.document&&typeof P.document=="object"?P.document:null,le=P.server||ie?.server,X=P.url||ie?.url;if(le&&X){const K=String(le).replace(/\/+$/,""),W=String(X).replace(/^\/+/,"");q=`${K}/${W}`}else P.filename&&String(P.filename).startsWith("http")?q=P.filename:q=(typeof P.document=="string"?P.document:null)||P.url||ie?.url}if(!q)return;const Q=P.mime||(P.document&&typeof P.document=="object"?P.document.mime:null)||P._fileType||"",re=Q==="application/pdf"||q.toLowerCase().endsWith(".pdf");re&&!q.includes("#")&&(q+="#toolbar=0&navpanes=0&scrollbar=0&view=FitH&pagemode=none"),y.value=q,b.value=A[n.itemTitle]||A.name||P.filename||"Preview Document",_.value=Q||(re?"application/pdf":"image/jpeg"),g.value=!0},F=(A,P,q)=>{q.preventDefault();const Q=q.dataTransfer?.files?.[0];if(!Q)return;D(A,P,{target:{files:[Q],value:""}})};return(A,P)=>(r.openBlock(),r.createElementBlock("div",ZK,[e.label||e.labelID||e.labelEN||e.labelKR?(r.openBlock(),r.createBlock(Ul,{key:0,text:e.label||(r.unref(s).toLowerCase().startsWith("kr")||r.unref(s).toLowerCase().startsWith("ko")?e.labelKR:r.unref(s).toLowerCase().startsWith("en")?e.labelEN:e.labelID),class:"font-semibold text-sm text-slate-700 dark:text-slate-300",required:e.required},null,8,["text","required"])):r.createCommentVNode("",!0),r.createElementVNode("div",{class:r.normalizeClass(["w-full grid gap-4",c.value])},[d.value.length===0&&p.value?(r.openBlock(),r.createElementBlock("div",XK,[r.createVNode(Ul,{text:r.unref(i)("dynamicUploadList.loadingDocs"),class:"font-semibold text-sm text-slate-700 dark:text-neutral-300"},null,8,["text"]),r.createElementVNode("div",JK,[r.createVNode(r.unref(Ae.Loader2),{class:"w-6 h-6 animate-spin"})])])):d.value.length===0&&!p.value?(r.openBlock(),r.createElementBlock("div",QK,[r.createVNode(r.unref(Ae.CheckCircle2),{class:"w-6 h-6 text-slate-400"}),r.createElementVNode("span",VK,r.toDisplayString(r.unref(i)("dynamicUploadList.noDocsRequired")),1)])):r.createCommentVNode("",!0),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(d.value,(q,Q)=>(r.openBlock(),r.createElementBlock("div",{key:Q,class:"flex flex-col gap-2 p-3 bg-white dark:bg-neutral-800 border border-slate-200 dark:border-neutral-700/50 rounded-lg shadow-sm"},[r.createElementVNode("div",eG,[r.createVNode(Ul,{text:q[e.itemTitle]||q.name||q.filename||"Upload Document",class:"font-semibold text-sm text-slate-700 dark:text-neutral-300 truncate flex-1"},null,8,["text"]),I(q)?(r.openBlock(),r.createElementBlock("button",{key:0,type:"button",class:"p-1 hover:bg-slate-100 dark:hover:bg-zinc-700 rounded transition-colors text-slate-400 hover:text-primary-500",onClick:re=>E(q)},[r.createVNode(r.unref(Ae.Eye),{class:"w-4 h-4"})],8,tG)):r.createCommentVNode("",!0)]),B(q)&&B(q)?.hasTemplate?(r.openBlock(),r.createElementBlock("div",nG,[r.createElementVNode("div",oG,[r.createElementVNode("button",{type:"button",onClick:re=>B(q)?.toggleExpanded(),class:"text-xs font-medium text-slate-600 dark:text-slate-400 hover:text-primary-600 dark:hover:text-primary-400 transition-colors flex items-center gap-1"},[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(B(q)?.isExpanded?Yt.ChevronDown:Yt.ChevronRight),{class:"w-3 h-3"})),r.createTextVNode(" "+r.toDisplayString(B(q)?.toggleButtonText),1)],8,rG)]),r.withDirectives(r.createElementVNode("div",iG,[r.createElementVNode("div",sG,[r.createElementVNode("div",aG,[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(R(q)),{class:"w-4 h-4 text-primary-600 dark:text-primary-400"}))]),r.createElementVNode("div",lG,[r.createElementVNode("h4",cG,r.toDisplayString(B(q)?.resolvedTitle),1),r.createElementVNode("p",dG,r.toDisplayString(B(q)?.resolvedDescription),1)])]),r.createElementVNode("div",uG,[B(q)?.downloadError?(r.openBlock(),r.createBlock(r.unref(Bi),{key:1,type:"button",size:"sm",variant:"destructive",disabled:B(q)?.isDownloading||e.disabled,onClick:re=>B(q)?.downloadTemplate(),class:"text-xs h-7"},{default:r.withCtx(()=>[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(Yt.RotateCw),{class:"w-3 h-3 mr-1"})),r.createTextVNode(" "+r.toDisplayString(B(q)?.retryButtonText),1)]),_:2},1032,["disabled","onClick"])):(r.openBlock(),r.createBlock(r.unref(Bi),{key:0,type:"button",size:"sm",disabled:B(q)?.isDownloading||e.disabled,onClick:re=>B(q)?.downloadTemplate(),class:"text-xs h-7"},{default:r.withCtx(()=>[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(B(q)?.isDownloading?Yt.Loader2:Yt.Download),{class:r.normalizeClass(["w-3 h-3 mr-1",B(q)?.isDownloading?"animate-spin":""])},null,8,["class"])),r.createTextVNode(" "+r.toDisplayString(B(q)?.resolvedLabel),1)]),_:2},1032,["disabled","onClick"])),B(q)?.downloadError?(r.openBlock(),r.createBlock(r.unref(Bi),{key:2,type:"button",size:"sm",variant:"ghost",onClick:re=>B(q)?.clearError(),class:"text-xs h-7"},{default:r.withCtx(()=>[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(Yt.X),{class:"w-3 h-3"}))]),_:1},8,["onClick"])):r.createCommentVNode("",!0)]),B(q)?.downloadError?(r.openBlock(),r.createBlock(r.unref(gf),{key:0,variant:"destructive",class:"text-xs py-2"},{default:r.withCtx(()=>[r.createVNode(r.unref(bf),null,{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(B(q)?.downloadError),1)]),_:2},1024)]),_:2},1024)):r.createCommentVNode("",!0)],512),[[r.vShow,B(q)?.isExpanded]])])):r.createCommentVNode("",!0),I(q)?(r.openBlock(),r.createElementBlock("div",fG,[r.createVNode(r.unref(Ae.CheckCircle2),{class:"w-4 h-4 text-green-600 shrink-0"}),r.createElementVNode("span",hG,r.toDisplayString(I(q)?.filename||r.unref(i)("dynamicUploadList.fileUploaded")),1),e.disabled?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("button",{key:0,type:"button",class:"text-red-400 hover:text-red-600 transition-colors",onClick:re=>w(q)},[r.createVNode(r.unref(Ae.X),{class:"w-4 h-4"})],8,mG))])):(r.openBlock(),r.createElementBlock("label",{key:2,for:`dyn-upload-input-${Q}`,class:r.normalizeClass(["flex flex-col items-center justify-center gap-2 py-8 rounded-lg border-2 border-dashed transition-colors cursor-pointer",[e.disabled?"border-slate-200 bg-slate-50 cursor-not-allowed opacity-60":"border-slate-300 dark:border-slate-600 bg-slate-50 dark:bg-slate-800 hover:border-primary-400 hover:bg-primary-50 dark:hover:bg-primary-900/10",h.value.has(Q)?"pointer-events-none opacity-70":""]]),onDragover:P[0]||(P[0]=r.withModifiers(()=>{},["prevent"])),onDrop:re=>!e.disabled&&!h.value.has(Q)&&F(q,Q,re)},[h.value.has(Q)?(r.openBlock(),r.createBlock(r.unref(Ae.Loader2),{key:0,class:"w-6 h-6 animate-spin text-primary-500"})):(r.openBlock(),r.createBlock(r.unref(Ae.Upload),{key:1,class:"w-6 h-6 text-slate-400"})),r.createElementVNode("span",gG,r.toDisplayString(h.value.has(Q)?r.unref(i)("dynamicUploadList.uploading"):r.unref(i)("dynamicUploadList.clickOrDrag")),1),e.typeFile?(r.openBlock(),r.createElementBlock("span",bG,r.toDisplayString(e.typeFile),1)):r.createCommentVNode("",!0),r.createElementVNode("input",{id:`dyn-upload-input-${Q}`,type:"file",class:"sr-only",disabled:e.disabled||h.value.has(Q),accept:e.typeFile,onChange:re=>D(q,Q,re)},null,40,yG)],42,pG))]))),128))],2),r.createVNode(Mi,{modelValue:g.value,"onUpdate:modelValue":P[2]||(P[2]=q=>g.value=q),title:b.value,"max-width":_.value==="application/pdf"?720:500,"content-class":_.value==="application/pdf"?"p-0 overflow-hidden":"px-6 py-1 overflow-y-auto"},{actions:r.withCtx(()=>[r.createElementVNode("button",{type:"button",class:"px-4 py-2 border border-slate-200 dark:border-zinc-700 rounded-md text-sm font-medium hover:bg-slate-50 dark:hover:bg-zinc-800 transition-colors",onClick:P[1]||(P[1]=q=>g.value=!1)},r.toDisplayString(r.unref(i)("common.close")||"Close"),1)]),default:r.withCtx(()=>[r.createElementVNode("div",vG,[_.value.startsWith("image/")?(r.openBlock(),r.createElementBlock("img",{key:0,src:y.value,alt:b.value,class:"w-full h-auto max-h-[72vh] object-contain rounded-lg shadow-md"},null,8,wG)):_.value==="application/pdf"?(r.openBlock(),r.createElementBlock("iframe",{key:1,src:`${y.value}${y.value.includes("#")?"":"#toolbar=0&navpanes=0&scrollbar=0&view=FitH&pagemode=none"}`,class:"w-full h-[70vh] rounded-lg border border-slate-200",title:"Document Preview"},null,8,kG)):(r.openBlock(),r.createElementBlock("div",_G,[r.createVNode(r.unref(Ae.FileText),{class:"w-16 h-16 stroke-1"}),r.createElementVNode("span",xG,r.toDisplayString(r.unref(i)("dynamicUploadList.noSupportPreview")||"Preview not supported for this file type"),1),r.createElementVNode("a",{href:y.value,target:"_blank",class:"px-4 py-2 bg-primary-500 text-white rounded-md text-sm font-semibold hover:bg-primary-600 transition-colors"},r.toDisplayString(r.unref(i)("dynamicUploadList.viewOriginal")||"View Original"),9,EG)]))])]),_:1},8,["modelValue","title","max-width","content-class"])]))}});function D2(){return{setPageTitle:n=>{typeof document<"u"&&(document.title=n||document.title),typeof window<"u"&&window.dispatchEvent(new CustomEvent("micro:page-title",{detail:{title:n},bubbles:!0,composed:!0}))},setBreadcrumb:n=>{typeof window<"u"&&window.dispatchEvent(new CustomEvent("micro:breadcrumb",{detail:{items:n},bubbles:!0,composed:!0}))}}}function CG(){const e=r.ref(0),t=r.reactive({}),n=r.reactive({}),o=r.reactive({}),i=r.reactive({}),s=r.reactive({}),a=r.ref(!1),l=r.reactive({}),c=r.reactive({}),d=r.reactive({}),f=r.ref(!1),h=r.ref(null),p=r.reactive({}),g=r.reactive({}),y=r.reactive({}),b=r.reactive({}),_=r.reactive({}),x=r.reactive({}),B=r.reactive({}),R=r.ref(null),S=r.ref(""),O=r.reactive({visible:!1,title:"",message:"",action:null,showCancel:!0,okText:"",cancelText:"",isBlocking:!1,redirectUrl:""});return{revision:e,formData:t,originalData:n,tableRowFormData:o,errors:i,touched:s,isSubmitted:a,fieldErrors:l,wizardState:c,inlineState:d,isSubmitting:f,internalSchema:h,rawItemsCache:p,revealedSectionIds:g,revealedFieldModels:y,wizardResponses:b,sectionLoading:_,fieldLoading:x,confirmDialog:O,sectionPagination:B,activeTableAction:R,activeTableKey:S}}var Ip={exports:{}},SG=Ip.exports,M2;function AG(){return M2||(M2=1,(function(e,t){(function(n,o){e.exports=o()})(SG,function(){Array.isArray||(Array.isArray=function(s){return Object.prototype.toString.call(s)==="[object Array]"});function n(s){for(var a=[],l=0,c=s.length;l<c;l++)a.indexOf(s[l])===-1&&a.push(s[l]);return a}var o={},i={"==":function(s,a){return s==a},"===":function(s,a){return s===a},"!=":function(s,a){return s!=a},"!==":function(s,a){return s!==a},">":function(s,a){return s>a},">=":function(s,a){return s>=a},"<":function(s,a,l){return l===void 0?s<a:s<a&&a<l},"<=":function(s,a,l){return l===void 0?s<=a:s<=a&&a<=l},"!!":function(s){return o.truthy(s)},"!":function(s){return!o.truthy(s)},"%":function(s,a){return s%a},log:function(s){return console.log(s),s},in:function(s,a){return!a||typeof a.indexOf>"u"?!1:a.indexOf(s)!==-1},cat:function(){return Array.prototype.join.call(arguments,"")},substr:function(s,a,l){if(l<0){var c=String(s).substr(a);return c.substr(0,c.length+l)}return String(s).substr(a,l)},"+":function(){return Array.prototype.reduce.call(arguments,function(s,a){return parseFloat(s,10)+parseFloat(a,10)},0)},"*":function(){return Array.prototype.reduce.call(arguments,function(s,a){return parseFloat(s,10)*parseFloat(a,10)})},"-":function(s,a){return a===void 0?-s:s-a},"/":function(s,a){return s/a},min:function(){return Math.min.apply(this,arguments)},max:function(){return Math.max.apply(this,arguments)},merge:function(){return Array.prototype.reduce.call(arguments,function(s,a){return s.concat(a)},[])},var:function(s,a){var l=a===void 0?null:a,c=this;if(typeof s>"u"||s===""||s===null)return c;for(var d=String(s).split("."),f=0;f<d.length;f++)if(c==null||(c=c[d[f]],c===void 0))return l;return c},missing:function(){for(var s=[],a=Array.isArray(arguments[0])?arguments[0]:arguments,l=0;l<a.length;l++){var c=a[l],d=o.apply({var:c},this);(d===null||d==="")&&s.push(c)}return s},missing_some:function(s,a){var l=o.apply({missing:a},this);return a.length-l.length>=s?[]:l}};return o.is_logic=function(s){return typeof s=="object"&&s!==null&&!Array.isArray(s)&&Object.keys(s).length===1},o.truthy=function(s){return Array.isArray(s)&&s.length===0?!1:!!s},o.get_operator=function(s){return Object.keys(s)[0]},o.get_values=function(s){return s[o.get_operator(s)]},o.apply=function(s,a){if(Array.isArray(s))return s.map(function(_){return o.apply(_,a)});if(!o.is_logic(s))return s;var l=o.get_operator(s),c=s[l],d,f,h,p,g;if(Array.isArray(c)||(c=[c]),l==="if"||l=="?:"){for(d=0;d<c.length-1;d+=2)if(o.truthy(o.apply(c[d],a)))return o.apply(c[d+1],a);return c.length===d+1?o.apply(c[d],a):null}else if(l==="and"){for(d=0;d<c.length;d+=1)if(f=o.apply(c[d],a),!o.truthy(f))return f;return f}else if(l==="or"){for(d=0;d<c.length;d+=1)if(f=o.apply(c[d],a),o.truthy(f))return f;return f}else{if(l==="filter")return p=o.apply(c[0],a),h=c[1],Array.isArray(p)?p.filter(function(_){return o.truthy(o.apply(h,_))}):[];if(l==="map")return p=o.apply(c[0],a),h=c[1],Array.isArray(p)?p.map(function(_){return o.apply(h,_)}):[];if(l==="reduce")return p=o.apply(c[0],a),h=c[1],g=typeof c[2]<"u"?o.apply(c[2],a):null,Array.isArray(p)?p.reduce(function(_,x){return o.apply(h,{current:x,accumulator:_})},g):g;if(l==="all"){if(p=o.apply(c[0],a),h=c[1],!Array.isArray(p)||!p.length)return!1;for(d=0;d<p.length;d+=1)if(!o.truthy(o.apply(h,p[d])))return!1;return!0}else if(l==="none"){if(p=o.apply(c[0],a),h=c[1],!Array.isArray(p)||!p.length)return!0;for(d=0;d<p.length;d+=1)if(o.truthy(o.apply(h,p[d])))return!1;return!0}else if(l==="some"){if(p=o.apply(c[0],a),h=c[1],!Array.isArray(p)||!p.length)return!1;for(d=0;d<p.length;d+=1)if(o.truthy(o.apply(h,p[d])))return!0;return!1}}if(c=c.map(function(_){return o.apply(_,a)}),i.hasOwnProperty(l)&&typeof i[l]=="function")return i[l].apply(a,c);if(l.indexOf(".")>0){var y=String(l).split("."),b=i;for(d=0;d<y.length;d++){if(!b.hasOwnProperty(y[d]))throw new Error("Unrecognized operation "+l+" (failed at "+y.slice(0,d+1).join(".")+")");b=b[y[d]]}return b.apply(a,c)}throw new Error("Unrecognized operation "+l)},o.uses_data=function(s){var a=[];if(o.is_logic(s)){var l=o.get_operator(s),c=s[l];Array.isArray(c)||(c=[c]),l==="var"?a.push(c[0]):c.forEach(function(d){a.push.apply(a,o.uses_data(d))})}return n(a)},o.add_operation=function(s,a){i[s]=a},o.rm_operation=function(s){delete i[s]},o.rule_like=function(s,a){if(a===s||a==="@")return!0;if(a==="number")return typeof s=="number";if(a==="string")return typeof s=="string";if(a==="array")return Array.isArray(s)&&!o.is_logic(s);if(o.is_logic(a)){if(o.is_logic(s)){var l=o.get_operator(a),c=o.get_operator(s);if(l==="@"||l===c)return o.rule_like(o.get_values(s,!1),o.get_values(a,!1))}return!1}if(Array.isArray(a))if(Array.isArray(s)){if(a.length!==s.length)return!1;for(var d=0;d<a.length;d+=1)if(!o.rule_like(s[d],a[d]))return!1;return!0}else return!1;return!1},o})})(Ip)),Ip.exports}var TG=AG();const Ri=Dm(TG);function dv(){const e=n=>n&&typeof n=="object"&&n._isLogicValue;Ri.add_operation("var",function(n,o){const i=o===void 0?null:o,s=this;if(n===void 0||n===""||n===null)return s;if(s&&typeof s=="object"&&s._resolveLogicVar){const c=s._resolveLogicVar(String(n));if(c!==void 0)return c}const a=String(n).split(".");let l=s;for(let c=0;c<a.length;c++){if(l==null)return i;const d=a[c];let f=l[d];if(f===void 0&&l&&typeof l=="object"){const h=Object.keys(l).find(p=>p===d||p.endsWith("."+d));h!==void 0&&(f=l[h])}if(f===void 0)return i;l=f}return l}),Ri.add_operation("length",n=>n==null?0:e(n)?String(n.code??n.id??n.value??n.name??"").length:typeof n=="string"?n.length:typeof n=="number"?String(n).length:Array.isArray(n)?n.length:typeof n=="object"?n.code!==void 0&&n.code!==null?String(n.code).length:n.id!==void 0&&n.id!==null?String(n.id).length:n.value!==void 0&&n.value!==null?String(n.value).length:n.name!==void 0&&n.name!==null?String(n.name).length:Object.keys(n).length:0),["+","-","*","/",">","<",">=","<="].forEach(n=>{Ri.add_operation(n,(...o)=>{const i=l=>e(l)?Number(l.id??l.code??l.value)||0:typeof l=="string"&&l.trim()!==""&&!isNaN(Number(l))?Number(l):l;if(n==="+"||n==="*"||n==="-"||n==="/")return o.reduce((l,c,d)=>{const f=i(c)||0;if(d===0)return f;switch(n){case"+":return l+f;case"-":return l-f;case"*":return l*f;case"/":return f!==0?l/f:0;default:return l}},n==="*"||n==="/"?1:0);const s=i(o[0]),a=i(o[1]);switch(n){case">":return s>a;case"<":return s<a;case">=":return s>=a;case"<=":return s<=a;default:return 0}})}),Ri.add_operation("==",(n,o)=>{if(n==null)return o==null;if(o==null)return n==null;const i=l=>e(l)?[String(l.code),String(l.id),String(l.value),String(l.name)]:typeof l=="object"?[String(l.code??l.id??l.value??l.name??"")]:[String(l)],[s,a]=[i(n),i(o)];return s.some(l=>a.some(c=>l===c))}),Ri.add_operation("!=",(n,o)=>n==null&&o==null?!1:n==null||o===null||o===void 0?!0:e(n)&&e(o)?!(String(n.id)===String(o.id)||String(n.code)===String(o.code)):e(n)?!(String(n.code)===String(o)||String(n.id)===String(o)):e(o)?!(String(o.code)===String(n)||String(o.id)===String(n)):String(n)!==String(o)),Ri.add_operation("calculate_age",(n,o,i="years")=>{if(!n)return null;const s=new Date(n),a=o&&o!==null&&o!=="null"?new Date(o):new Date;if(isNaN(s.getTime())||isNaN(a.getTime()))return null;const l=s<=a,[c,d]=l?[s,a]:[a,s];let f=d.getFullYear()-c.getFullYear(),h=d.getMonth()-c.getMonth(),p=d.getDate()-c.getDate();if(p<0){h--;const b=new Date(d.getFullYear(),d.getMonth(),0);p+=b.getDate()}h<0&&(f--,h+=12);const g=h,y=l?1:-1;if(i==="years")return f*y;if(i==="months")return g*y;if(i==="days"){const b=d.getTime()-c.getTime();return Math.floor(b/(1e3*60*60*24))*y}return f*y})}function Ot(e){if(!e)return"";const t=e.propsForm||e.propsFormStep||e.propsTable||e.propsTableStep||e.propsDataTableWizard||e.propsWizard||e.props||{};return e.key||t.key||e.id||e.modelKey||t.modelKey||t.modelDatatable||""}const We=(e,t)=>{if(t&&!(!e||typeof e!="object")){if(t.includes(".")){const n=t.split(".");if(!Array.isArray(e[n[0]])){const o=n.reduce((i,s)=>i?.[s],e);if(o!=null)return o}}return e[t]!==void 0&&e[t]!==null?e[t]:t.split(".").reduce((n,o)=>n?.[o],e)}},Vt=(e,t,n)=>{if(!t)return;const o=t.split(".");if(o.length>1&&Array.isArray(e[o[0]])){if(e[t]=n,o.length>=3&&!isNaN(Number(o[1]))){const s=Number(o[1]),a=e[o[0]];if(a[s]&&typeof a[s]=="object"){let l=a[s];for(let c=2;c<o.length-1;c++){const d=o[c];(l[d]===void 0||l[d]===null||typeof l[d]!="object")&&(l[d]={}),l=l[d]}l[o[o.length-1]]=n}}return}o.length>1&&t in e&&t!==o[0]&&(e[t]=n);let i=e;for(let s=0;s<o.length-1;s++){const a=o[s];(i[a]===void 0||i[a]===null||typeof i[a]!="object")&&(i[a]={}),i=i[a]}i[o[o.length-1]]=n},xr=e=>{const t=r.toRaw(e);if(t==null)return t;if(Array.isArray(t))return t.map(n=>xr(n));if(typeof t=="object"){if(t instanceof Date||t instanceof File||t instanceof Blob)return t;if(Object.getPrototypeOf(t)===Object.prototype||Object.getPrototypeOf(t)===null){const n={};return Object.keys(t).forEach(o=>n[o]=xr(t[o])),n}}return t},Op=e=>{if(!e||typeof e!="object")return[];if("var"in e)return[e.var];let t=[];return Object.values(e).forEach(n=>{Array.isArray(n)?n.forEach(o=>{t=t.concat(Op(o))}):typeof n=="object"&&(t=t.concat(Op(n)))}),t},BG=e=>e?[...e].sort((t,n)=>(t.seq||0)-(n.seq||0)):[],yf=(e,t={},n="")=>(!e||typeof e!="object"||Object.keys(e).forEach(o=>{const i=e[o],s=n?`${n}.${o}`:o;t[s]=i,i&&typeof i=="object"&&!Array.isArray(i)&&!i._isLogicValue&&yf(i,t,s)}),t),Ii=(e,t)=>{if(!(!e||typeof e!="object")){if(e[t]!==void 0)return e[t];if(Array.isArray(e))for(const n of e){const o=Ii(n,t);if(o!==void 0)return o}else for(const n of Object.keys(e))if(typeof e[n]=="object"){const o=Ii(e[n],t);if(o!==void 0)return o}}},uv=(e,t)=>{Object.keys(t).forEach(n=>{t[n]&&typeof t[n]=="object"&&!Array.isArray(t[n])?(e[n]||(e[n]={}),uv(e[n],t[n])):e[n]=t[n]})},Oi=(e,t)=>{if(!e||typeof e!="string"||e.startsWith("http")||!t||typeof t!="string")return e;const n=t.replace(/\/$/,""),o=e.startsWith("/")?e:`/${e}`;return`${n}${o}`},ec=e=>{if(!e||typeof e!="object")return!0;const t=["no","action","_index","_isLogicValue"];return!Object.entries(e).some(([n,o])=>t.includes(n)?!1:o!=null&&o!==""?Array.isArray(o)?o.length>0:typeof o=="object"&&!(o instanceof Date)?Object.values(o).some(i=>i!=null&&i!==""):!0:!1)},R2=(e,t)=>`pdg-dynform:pg:${e}:${t}`;let kd=null;const PG=e=>{kd=e},NG=(e,t)=>!t||!kd?null:kd.load(R2(e,t)),I2=(e,t,n)=>{!t||!kd||kd.save(R2(e,t),{page:n?.page??1,perPage:n?.perPage??10,filters:n?.filters||void 0})},DG=()=>{kd?.clear()};function fv({formData:e,errors:t,fieldMap:n,rawItemsCache:o,activeSchema:i,locale:s,tableRowFormData:a,revealedSectionIds:l,revealedFieldModels:c,parentFormData:d,rootFormData:f,activeTableAction:h,activeTableRow:p,activeTableKey:g,tableRows:y}){const b=r.inject("parentFormData",null),_=r.inject("rootFormData",null);r.provide("parentFormData",e),_||r.provide("rootFormData",e);const x=d||b||_||e,B=f||_||e;console.log("[useFormLogic][INIT] Resolved contexts:",{hasParentOption:!!d,hasParentInjected:!!b,parentKeys:Object.keys(x),hasRootOption:!!f,hasRootInjected:!!_,rootKeys:Object.keys(B)});const R=(T,M)=>!T||["DCodeDatePicker","DCodeTextField","DCodeTextArea","DCodeButton","DCodeCheckbox"].includes(T)?!1:["DCodeAutoComplete","DCodeInfiniteAutoComplete","DCodeSelect","DCodeRadio","DCodeRadioCustom","DCodeMultiSelect"].includes(T)||!!(M.endpoint||M.endpointReference||M.items),S=r.computed(()=>I(e)),O=(T,M,$,ne)=>{if(M==null||typeof M=="object"&&M._isLogicValue)return M;let te=$;if(!te){const de=n.value?.paths?.get(T),Z=n.value?.models?.get(T);te=(de||(Array.isArray(Z)?Z[0]:null))?.field}if(!te)return M;const ce=te.props||te.propsFieldCustom||te.propsFieldGlobal||{},ke=o[te.key]||ce.items||ce.options;if(!ke||!Array.isArray(ke))return R(te.component,ce)?{id:ne?.id??M,code:ne?.code??M,value:ne?.value??M,_isLogicValue:!0,_isFallback:!0}:M;const we=ce.itemValue||"code",_e=ke.find(de=>String(de[we])===String(M)||String(de.code)===String(M)||String(de.id)===String(M)||String(de.name)===String(M)||String(de.title)===String(M)||ce.itemTitle&&String(de[ce.itemTitle])===String(M)||typeof M=="string"&&(String(de[we]).toUpperCase()===M.toUpperCase()||String(de.code).toUpperCase()===M.toUpperCase()||String(de.name).toUpperCase()===M.toUpperCase()||String(de.title).toUpperCase()===M.toUpperCase())),fe=R(te.component,ce);return _e?{..._e,id:_e.id??_e[we]??M,code:_e.code??_e[we]??M,name:_e.name??_e[ce.itemTitle||"name"]??_e.title??M,title:_e.title??_e[ce.itemTitle||"title"]??_e.name??M,value:_e.value??_e[we]??_e.id??M,_isLogicValue:!0}:fe?{id:ne?.id??M,code:ne?.code??M,value:ne?.value??M,name:ne?.name??ne?.title??M,title:ne?.title??ne?.name??M,_isLogicValue:!0,_isFallback:!0}:M},I=(T,M,$="LOGIC")=>{const ne=(te,ce)=>{if(te==null||typeof te=="object"&&te._isLogicValue||typeof te=="boolean"||(we=>!we||typeof we!="object"?!1:we instanceof File||we instanceof Blob||we.constructor?.name==="File"||we.size!==void 0&&typeof we.name=="string")(te))return te;if(typeof te=="number"||typeof te=="string")return ce&&(n.value?.paths?.has(ce)||n.value?.models?.has(ce))?O(ce,te):te;if(typeof te=="object"&&!Array.isArray(te)){const _e=(ce?n.value?.paths?.get(ce)||n.value?.models?.get(ce)?.[0]:null)?.field;if(_e&&R(_e.component,_e.props||_e.propsFieldCustom||_e.propsFieldGlobal||{})){const de=te?.id??te?.code??te?.value??te?.key??te?.name??te?.title??te,Z=typeof de=="string"||typeof de=="number"?O(ce,de,_e,te):de;if(Z&&typeof Z=="object")return{...te,...Z,_isLogicValue:!0}}return te}return te};return new Proxy(T,{get(te,ce){if(ce==="_isNormalizedProxy")return!0;if(typeof ce!="string")return te[ce];if(ce==="parent"){const de=x||B;return de?de._isNormalizedProxy?de:I(de,void 0,$):void 0}if(ce==="root"){const de=B;return de?de._isNormalizedProxy?de:I(de,void 0,$):void 0}if(ce.startsWith("parent.")){const de=ce.replace(/^parent\./,""),Z=x||B,ee=We(Z,de)??Z[de];if(ee!=null)return ne(ee,de)}if(ce.startsWith("root.")){const de=ce.replace(/^root\./,""),Z=B,ee=We(Z,de)??Z[de];if(ee!=null)return ne(ee,de)}if(ce==="_resolveLogicVar")return de=>{if(!de)return;const Z=de.replace(/^formData\./,""),ee=n.value?.paths?.get(Z);if(ee){const Te=We(T,ee.path)??T[ee.path]??We(T,Z)??T[Z]??We(e,ee.path);if(Te!==void 0)return ne(Te,Z)}const pe=Z.split(".");for(let Te=pe.length;Te>0;Te--){const Oe=pe.slice(0,Te).join("."),Fe=[];for(const[Ue,Qe]of n.value?.paths?.entries()||[])if(Ue===Oe||Ue.endsWith("."+Oe)){let Ve=0;if(M){const Xe=Ue.split("."),he=M.split(".");let Ce=0;for(let Pe=0;Pe<Math.min(Xe.length,he.length)&&Xe[Pe]===he[Pe];Pe++)Ce++;Ve=Ce}Fe.push({ent:Qe,key:Ue,score:Ve})}if(Fe.length>0){Fe.sort((he,Ce)=>Ce.score!==he.score?Ce.score-he.score:he.key.length-Ce.key.length);const Ue=Fe[0],Qe=We(T,Ue.ent.path)??T[Ue.ent.path]??We(T,Ue.key)??T[Ue.key]??We(e,Ue.ent.path);let Ve=ne(Qe,Ue.key);const Xe=pe.slice(Te);for(const he of Xe){if(Ve==null){Ve=void 0;break}Ve=Ve[he]}if(Ve!==void 0)return Ve}}if(Z.includes(".")){const Te=Z.split(".");let Oe=T;for(const Fe of Te){if(Oe==null)return;Oe=Oe[Fe]}if(Oe!==void 0)return Oe}const Be=T[Z];if(Be!==void 0)return Be};const ke=M?`${M}.${ce}`:ce;$!=="VISIBILITY-SILENT"&&!ce.startsWith("__v_")&&ce!=="_isNormalizedProxy"&&console.log(`[Proxy][GET] ${ke} (Target: ${M||"ROOT"}, Debug: ${$})`);const we=n.value?.paths?.get(ke);if(we){const de=We(te,we.path)??te[we.path]??(M?te[`${M}.${ce}`]:void 0)??We(e,we.path);if(de&&typeof de=="object"&&!Array.isArray(de)&&!de._isLogicValue&&!de._isNormalizedProxy)return I(de,ke,$);if(de!==void 0)return ne(de,ke)}const _e=n.value?.models?.get(ce);if(Array.isArray(_e)&&_e.length>0){const de=M?.includes(".")?M.split(".").slice(0,-1).join("."):M;if(de){const pe=_e.find(Be=>Be?.path?.startsWith(`${de}.`));if(pe){const Be=We(te,pe.path)??te[pe.path]??We(e,pe.path);if(Be&&typeof Be=="object"&&!Array.isArray(Be)&&!Be._isLogicValue&&!Be._isNormalizedProxy)return I(Be,ke,$);if(Be!==void 0)return ne(Be,ce)}}const Z=_e[0];if(Z.field?.type&&!Z.field?.model)return I(e,void 0,$);const ee=We(te,Z.path)??te[Z.path]??We(e,Z.path);if(ee&&typeof ee=="object"&&!Array.isArray(ee)&&!ee._isLogicValue&&!ee._isNormalizedProxy)return I(ee,ke,$);if(ee!==void 0)return ne(ee,ce)}let fe=te[ce];if(fe===void 0&&M&&te[`${M}.${ce}`]!==void 0&&(fe=te[`${M}.${ce}`]),fe===void 0&&a&&typeof ce=="string"&&(fe=a[ce]??a[ke],fe===void 0&&ce.includes(".")&&(fe=We(a,ce)),fe===void 0)){const de=Object.keys(a).find(Z=>Z.endsWith(`.${ce}`));de&&(fe=a[de])}if(fe===void 0&&typeof ce=="string"){const de=Object.keys(te).find(Z=>Z.endsWith(`.${ce}`));de&&(fe=te[de])}if(fe===void 0&&typeof ce=="string"){const de=Object.keys(te).some(Z=>Z.startsWith(`${ce}.`));if(!de&&a&&Object.keys(a).some(ee=>ee.startsWith(`${ce}.`)))return I(a,ke,$);if(de)return I(te,ke,$)}if(fe===void 0&&typeof ce=="string"){if(x&&x!==te){const de=We(x,ce)??x[ce];de!=null&&(fe=de)}if(fe===void 0&&B&&B!==te&&B!==x){const de=We(B,ce)??B[ce];de!=null&&(fe=de)}}if((ce==="id"||ce==="code")&&fe===void 0){const Z=te[ce==="id"?"code":"id"];Z!==void 0&&(fe=Z)}return fe&&typeof fe=="object"&&!Array.isArray(fe)&&!fe._isLogicValue&&!fe._isNormalizedProxy?I(fe,ke,$):ne(fe,ke)},has(te,ce){if(typeof ce!="string")return ce in te;if(ce==="parent"||ce==="root")return!0;let ke=ce;if(ce.startsWith("parent.")?ke=ce.replace(/^parent\./,""):ce.startsWith("root.")&&(ke=ce.replace(/^root\./,"")),n.value?.paths?.has(ke)||n.value?.models?.has(ke)||ke in te||Object.keys(te).some(fe=>fe.startsWith(`${ke}.`)))return!0;const _e=x||B;return!!(_e&&_e!==te&&(ke in _e||We(_e,ke)!==void 0)||B&&B!==te&&B!==_e&&(ke in B||We(B,ke)!==void 0))},ownKeys(te){const ce=new Set([...Object.keys(te),...n.value?.paths?Array.from(n.value.paths.keys()):[],...n.value?.models?Array.from(n.value.models.keys()):[]]),ke=x||B;return ke&&ke!==te&&Object.keys(ke).forEach(we=>ce.add(we)),B&&B!==te&&B!==ke&&Object.keys(B).forEach(we=>ce.add(we)),Array.from(ce)},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}}})},D=r.ref(new Set);function w(){dv()}function E(T,M,$="LOGIC",ne){const te=M?M._isNormalizedProxy?M:I(M,ne,$):ne?I(e,ne,$):S.value;if(T==null||typeof T=="object"&&Object.keys(T).length===0)return!0;if(typeof T=="boolean")return T;if(typeof T=="string")try{return!!new Function("formData",`return ${T};`)(te)}catch{return!1}const ce=we=>{if(!we||typeof we!="object")return we;if(Array.isArray(we))return we.map(ce);const _e=Object.keys(we)[0],fe=we[_e];if(["==","!=","in","!==","==="].includes(_e)&&Array.isArray(fe)&&fe.length===2){let Z=fe[0],ee=fe[1];if(Z?.var?.endsWith(".id")&&typeof ee=="string"&&isNaN(Number(ee))){const pe=Z.var.replace(/\.id$/,".code");return{[_e]:[{var:pe},ee]}}if(ee?.var?.endsWith(".id")&&typeof Z=="string"&&isNaN(Number(Z))){const pe=ee.var.replace(/\.id$/,".code");return{[_e]:[Z,{var:pe}]}}}const de={};for(const Z in we)de[Z]=ce(we[Z]);return de},ke=ce(T);JSON.stringify(ke)!==JSON.stringify(T)&&$!=="VISIBILITY-SILENT"&&console.log("[evaluateLogic][AUTO-HEAL] Migrated rule from .id to .code for consistency:",JSON.stringify(ke));try{w();const we=Ri.apply(ke,te);let _e=we;return typeof we=="number"&&isNaN(we)&&(_e=void 0),$!=="VISIBILITY-SILENT"&&console.log(`[evaluateLogic][${$}] Rule:`,JSON.stringify(T),"Result:",_e),_e}catch(we){console.error(`[DynamicForm][ERROR][${$}] Logic evaluation failed:`,we,{rule:T,contextPath:ne});return}}function F(T,M,$,ne){return T==null?null:Array.isArray(T)?T.find(te=>!te.condition||E(te.condition,M,$,ne))||null:typeof T=="object"&&T.condition&&!T._isLogicValue?E(T.condition,M,$,ne)?T:null:T}function A(T,M,$){if(T.isHidden||c&&c[T.model])return!0;const ne=M?I(M,$):$?I(e,$):S.value,te=T.logic?.visibleRule;if(te==null)return!0;const ce=F(te,ne,`VISIBLE-${T.model}`,$);return ce===null?!0:typeof ce=="object"?!!E(ce,ne,`VISIBLE-${T.model}`,$):!!ce}function P(T,M,$){const ne=T.props||T.propsFieldCustom||T.propsFieldGlobal||{},te=!!(T.required||ne.required),ce=M?I(M,$):$?I(e,$):S.value,ke=T.logic?.requiredRule;if(ke==null)return te;const we=F(ke,ce,`REQUIRED-${T.model}`,$);return we===null?te:typeof we=="object"?"required"in we?!!we.required:!!E(we,ce,`REQUIRED-${T.model}`,$):!!we}function q(T,M,$){const ne=T.props||T.propsFieldCustom||T.propsFieldGlobal||{},te=!!(T.disabled||ne.disabled),ce=M?I(M,$):$?I(e,$):S.value,ke=T.logic?.disabledRule;if(ke==null)return te;const we=F(ke,ce,`DISABLED-${T.model}`,$);return we===null?te:typeof we=="object"?"disabled"in we?!!we.disabled:!!E(we,ce,`DISABLED-${T.model}`,$):!!we}function Q(T,M,$){const ne=T.props||T.propsFieldCustom||T.propsFieldGlobal||{},te=!!(T.readonly||ne.readonly),ce=M?I(M,$):$?I(e,$):S.value,ke=T.logic?.readonlyRule;if(ke==null)return te;const we=F(ke,ce,`READONLY-${T.model}`,$);return we===null?te:typeof we=="object"?!!E(we,ce,`READONLY-${T.model}`,$):!!we}function re(T,M,$){if(T.isHidden||T.logic?.hiddenRule===!0)return!0;const ne=T.logic?.hiddenRule;if(ne==null)return!1;const te=M?I(M,$):$?I(e,$):S.value,ce=F(ne,te,`HIDDEN-${T.model}`,$);return ce===null?!1:typeof ce=="object"?!!E(ce,te,`HIDDEN-${T.model}`,$):!!ce}function ie(T){const M=T.propsForm||T.propsFormStep||T.propsTable||T.propsTableStep||T.propsDataTableWizard||T.propsWizard||T.props||{};let $=s.value==="kr"||s.value==="ko"?M.titleKR||T.titleKR||M.titleEN||T.titleEN||T.labelEN||M.titleID||T.titleID||T.labelID:s.value==="id"?M.titleID||T.titleID||T.labelID:M.titleEN||T.titleEN||T.labelEN,ne=s.value==="kr"||s.value==="ko"?M.descriptionKR||T.descriptionKR||M.descriptionEN||T.descriptionEN||M.descriptionID||T.descriptionID:s.value==="id"?M.descriptionID||T.descriptionID:M.descriptionEN||T.descriptionEN;const te=F((T.logic||M.logic)?.labelingRule,S.value,"LABEL-SEC");return te&&($=s.value==="kr"||s.value==="ko"?te.labelKR||te.titleKR||te.labelEN||te.titleEN||te.title||te.labelID||te.titleID:s.value==="id"?te.labelID||te.titleID||te.title:te.labelEN||te.titleEN||te.title,ne=s.value==="kr"||s.value==="ko"?te.descriptionKR||te.descriptionEN||te.descriptionID:s.value==="id"?te.descriptionID:te.descriptionEN),{title:$,description:ne}}function le(T,M){if(!T)return!0;const $=T.propsForm||T.propsFormStep||T.propsTable||T.propsTableStep||T.propsDataTableWizard||T.propsWizard||T.props||{},ne=(T.logic||$.logic)?.visibleRule,te=M?I(M):S.value;if(ne!=null){const we=F(ne,te,"VISIBLE-SEC");let _e=!0;return we===null?_e=!0:typeof we=="object"?_e=!!E(we,te,"VISIBLE-SEC"):_e=!!we,_e}const ce=Ot(T);if(ce&&D.value.has(ce))return!!(l&&l[ce]);const ke=$.fields||T.fields||[];return ke.length===0||ke.some(we=>A(we,M))}function X(T,M){if(!T)return!1;if(T.isHidden)return!0;const $=T.propsForm||T.propsFormStep||T.propsTable||T.propsTableStep||T.propsDataTableWizard||T.propsWizard||T.props||{},ne=(T.logic||$.logic)?.hiddenRule;if(ne==null)return!1;if(ne===!0)return!0;const te=M?I(M):S.value,ce=F(ne,te,"HIDDEN-SEC");return ce===null?!1:typeof ce=="object"?!!E(ce,te,"HIDDEN-SEC"):!!ce}function K(T,M){const $=M?I(M):S.value;return F(T.logic?.labelingRule,$,`LABEL-${T.model}`)||null}function W(T,M){const $=M?I(M):S.value,ne=T.logic?.lengthRule;if(!ne){const ce=T.props||T.propsFieldCustom||T.propsFieldGlobal||{};return ce.minLength!==void 0||ce.maxLength!==void 0?{minLength:ce.minLength,maxLength:ce.maxLength}:null}const te=F(ne,$,`LENGTH-${T.model}`);if(!te){const ce=T.props||T.propsFieldCustom||T.propsFieldGlobal||{};return{minLength:ce.minLength,maxLength:ce.maxLength}}return typeof te=="object"&&te!==null&&!te._isLogicValue?"maxLength"in te||"minLength"in te?te:E(te,$,`LENGTH-${T.model}`):te}function se(T,M,$){const ne=M?I(M,$):$?I(e,$):S.value,te=T.logic?.defaultValueRule;if(te==null)return;const ce=F(te,ne,`DEFAULT-VAL-${T.model}`,$);if(ce===null)return;let ke=ce;typeof ce=="object"&&ce!==null&&"value"in ce&&!ce._isLogicValue&&(ke=ce.value);let we;return typeof ke=="object"&&ke!==null&&!ke._isLogicValue?we=E(ke,ne,`DEFAULT-VAL-${T.model}`,$):we=ke,((T.props||T.propsFieldCustom||T.propsFieldGlobal||{}).returnObject||T.logic?.returnObject)&&(typeof we=="string"||typeof we=="number")?O(T.model,we,T):we}function H(T,M,$){const ne=T.props||{};let ce=[...o[T.key]||ne.items||ne.options||[]];if(T.logic?.optionsFilterRule){const fe=M?I(M,$,`FILTER-${T.model}`):$?I(e,$,`FILTER-${T.model}`):S.value,de=F(T.logic.optionsFilterRule,fe,`FILTER-${T.model}`,$);if(de){const Z=de.options||de.items;if(Z&&Array.isArray(Z))ce=[...Z];else if(de.values){const ee=de.values||[],pe=new Set(ee.map(String)),Be=new Set(ee.map(Fe=>String(Fe).toUpperCase())),Te=ne.itemValue||"id",Oe=ne.itemTitle||"name";ce=ce.filter(Fe=>{if(Fe==null)return!1;if(typeof Fe!="object"){const Ue=String(Fe);return pe.has(Ue)||Be.has(Ue.toUpperCase())}return[Te,Oe,"code","id","value","key","name","title"].some(Ue=>{const Qe=Fe[Ue];if(Qe==null)return!1;const Ve=String(Qe);return pe.has(Ve)||Be.has(Ve.toUpperCase())})})}}}const ke=h?.value,we=ne.excludeSelectedInTable||ke?.excludeSelectedInTable||ke?.propsActionGlobal?.excludeSelectedInTable||ke?.propsActionCustom?.excludeSelectedInTable,_e=y!=null||p?.value!=null||!!ke;if(we&&_e){const fe=he=>he&&he.toUpperCase();let de=[];const Z=T.model||T.key,ee=ne.itemValue||"id",pe=(he,Ce)=>{if(!he||typeof he!="object")return;if(he[Ce]!==void 0&&he[Ce]!==null)return he[Ce];if(Ce&&Ce.includes(".")){const qe=Ce.split(".").reduce((Se,Ie)=>Se&&Se[Ie],he);if(qe!=null)return qe}const Pe=Ce?Ce.split(".").pop():"";if(Pe&&he[Pe]!==void 0&&he[Pe]!==null)return he[Pe];for(const[qe,Se]of Object.entries(he))if(Se!=null&&(Ce&&qe.endsWith(`.${Ce}`)||Pe&&qe.endsWith(`.${Pe}`)))return Se},Be=he=>{if(he==null||he==="")return null;if(typeof he=="object"){const Ce=he[ee]??he.id??he.code??he.value??he.key;return Ce!=null?String(Ce):null}return String(he)},Te=[],Oe=y&&typeof y=="object"&&"value"in y?y.value:y;if(Array.isArray(Oe)&&Oe.length>0)Te.push(...Oe);else{let he=Z.includes(".")?Z.split(".").slice(0,-1).join("."):"";if(!he&&g&&(he=typeof g=="object"&&"value"in g?g.value:String(g||"")),he)for(const Ce of[x,B,e]){if(!Ce||typeof Ce!="object")continue;const Pe=We(Ce,he);if(Array.isArray(Pe)&&Pe.length>0){Te.push(...Pe);break}}}const Fe=p?.value,Ue=Fe?pe(Fe,Z):void 0,Qe=fe(Be(Ue));Te.forEach(he=>{if(!he||typeof he!="object"||Fe&&he===Fe)return;const Ce=pe(he,Z),Pe=fe(Be(Ce));Pe&&(!Qe||Pe!==Qe)&&de.push(Pe)});const Ve=M?pe(M,Z):We(e,Z),Xe=fe(Be(Ve));if(Xe&&(de=de.filter(he=>he!==Xe)),de.length>0){const he=new Set(de);ce=ce.filter(Ce=>Ce==null?!1:typeof Ce!="object"?!he.has(String(Ce).toUpperCase()):![ee,"id","code","value","key"].some(Se=>{const Ie=Ce[Se];return Ie!=null&&he.has(String(Ie).toUpperCase())}))}}return ce}function N(T){return(T.propsWizard?.propsSteps||[]).filter($=>le($)).map(($,ne)=>{const te=$.sectionsWizard||$.sections||[],ke=(Array.isArray(te)?te:[te]).map(_e=>{let fe=_e.type?.toUpperCase();return fe||(_e.propsForm||_e.propsFormStep||_e.fields?fe="FORM":_e.propsTable||_e.propsTableStep||_e.propsDataTableWizard||_e.isDataTable?fe="TABLE":_e.propsButton||_e.propsButtonStep?fe="BUTTON":fe="UNKNOWN"),{..._e,type:fe}}),we=ie($);return{key:$.modelKey||$.key||`step-${ne}`,title:we.title,description:we.description,icon:$.icon||void 0,sections:ke,actions:$.propsComponent?.actionComponent||$.actionComponent||[],isSubmit:$.isSubmit||$.propsStep?.isSubmit||!1,endpointActionStepNext:$.propsStep?.endpointActionStepNext||$.endpointActionStepNext||$.propsStep?.endpointSave||$.endpointSave,endpointActionStepPrev:$.propsStep?.endpointActionStepPrev||$.endpointActionStepPrev,fieldMapping:$.propsStep?.fieldMapping||$.fieldMapping||{},responseMapping:$.propsStep?.responseMapping||$.responseMapping||{}}})}function j(){if(i.value?.sections)for(let T=0;T<3;T++){let M=!1;if(i.value.sections.forEach($=>{const ne=(te,ce)=>{const ke=ce,_e=(te.propsForm||te.propsFormStep||te.propsTable||te.propsTableStep||te.propsDataTableWizard||te.props||{}).fields||te.fields||[];te.component==="DynamicTableSection"||te.type==="TABLE"||te.type==="DATATABLE"||(_e.forEach(fe=>{if(!fe.logic||typeof fe.logic!="object")return;Object.keys(fe.logic).filter(Z=>Z.toLowerCase().includes("calculaterule")&&fe.logic[Z]&&typeof fe.logic[Z]=="object").forEach(Z=>{const ee=fe.logic[Z],pe=Object.keys(ee)[0];if(!pe)return;const Be=ke?`${ke}.${pe}`:pe;let Te=ee[pe];if(Te&&typeof Te=="object"&&!Array.isArray(Te)&&"formula"in Te){if(Te.condition&&!E(Te.condition,e,`CALC-COND-${pe}`,Be))return;Te=Te.formula}const Oe=E(Te,e,`CALC-${pe}`,Be),Fe=We(e,Be);Oe!==void 0&&(Number.isNaN(Oe)?!Number.isNaN(Fe):JSON.stringify(Fe)!==JSON.stringify(Oe))&&(Vt(e,Be,Oe),M=!0)}),fe.logic.copyRule&&(Array.isArray(fe.logic.copyRule)?fe.logic.copyRule:[fe.logic.copyRule]).forEach(ee=>{const pe=ke?`${ke}.${fe.model}`:fe.model,Be=ee.condition?E(ee.condition,e,`COPY-COND-${fe.model}`,pe):!0;if(console.log(`[useFormLogic][COPY-RULE] Evaluating for field: ${fe.model}, path: ${pe}`,{conditionMet:Be,source:ee.source}),Be){let Te;if(typeof ee.source=="string"?(Te=S.value[ee.source],console.log(`[useFormLogic][COPY-RULE] Resolved source "${ee.source}" from normalizedData:`,Te)):ee.source&&typeof ee.source=="object"&&(Te=E(ee.source,e,`COPY-SRC-${fe.model}`,pe),console.log("[useFormLogic][COPY-RULE] Resolved object source:",Te)),Te!==void 0){const Oe=We(e,pe);console.log(`[useFormLogic][COPY-RULE] Comparing values for ${fe.model}:`,{currentVal:Oe,sourceVal:Te,isDiff:JSON.stringify(Oe)!==JSON.stringify(Te)});let Fe=Te;Te&&typeof Te=="object"&&Te._isLogicValue&&(R(fe.component,fe.props||fe.propsFieldCustom||fe.propsFieldGlobal||{})||(Fe=Te.code??Te.id??Te.value??Te,console.log(`[useFormLogic][COPY-RULE] Unwrapping LogicValue for non-select target ${fe.model}:`,Fe))),JSON.stringify(Oe)!==JSON.stringify(Fe)&&(Vt(e,pe,Fe),M=!0,console.log(`[useFormLogic][COPY-RULE] SUCCESS! Copied value to ${fe.model}:`,Fe))}else console.log("[useFormLogic][COPY-RULE] Source value is undefined for source:",ee.source)}})}),te.type?.toUpperCase()==="WIZARD"&&(te.propsWizard?.propsSteps||[]).forEach(de=>{const Z=de.key||de.id,ee=de.sectionsWizard||de.sections||[];(Array.isArray(ee)?ee:[ee]).forEach(Be=>ne(Be,Z))}))};ne($)}),!M)break}}function Y(T,M){if(!A(T)||!P(T))return!1;const $=M?`${M}.${T.model}`:T.model,ne=n.value.paths.get($),te=ne?We(e,ne.path):e[T.model];return Array.isArray(te)?te.length===0:te==null||te===""}function J(T){return T.sections.flatMap($=>($.propsForm||$.propsTable||$.props||{}).fields||$.fields||[]).some($=>Y($,T.key))}function U(T){if(!le(T))return!1;const M=Ot(T);return(T.propsForm?.fields||T.fields||[]).some(ne=>Y(ne,M))?!0:T.type==="WIZARD"?N(T).some(J):!1}const k=r.computed(()=>i.value?.sections?Object.keys(t).length>0?!0:i.value.sections.some(U):!1);function C(T){const M=new Set,$=T?.sections||[];function ne(te){te.forEach(ce=>{((ce.propsForm||ce.propsFormStep||ce.propsTable||ce.propsTableStep||ce.props||{}).fields||ce.fields||[]).forEach(_e=>{(Array.isArray(_e.logic?.fetchRule)?_e.logic.fetchRule:[_e.logic?.fetchRule].filter(Boolean)).forEach(Z=>{Array.isArray(Z.revealSections)&&Z.revealSections.forEach(ee=>M.add(ee))}),(Array.isArray(_e.logic?.autoFetchRule)?_e.logic.autoFetchRule:[_e.logic?.autoFetchRule].filter(Boolean)).forEach(Z=>{Array.isArray(Z.revealSections)&&Z.revealSections.forEach(ee=>M.add(ee))})}),ce.type==="WIZARD"&&ce.propsWizard?.propsSteps&&ce.propsWizard.propsSteps.forEach(_e=>{Array.isArray(_e.sectionsWizard)?ne(_e.sectionsWizard):_e.sectionsWizard&&ne([_e.sectionsWizard])})})}ne($),D.value=M}return r.watch(()=>i.value,T=>{C(T)},{deep:!0}),C(i.value),{normalizedData:S,getNormalizedData:I,evaluateLogic:E,resolveActiveRule:F,resolveValueIdentifier:O,getFilteredItems:H,isFieldVisible:A,isFieldRequired:P,isFieldDisabled:q,isFieldReadonly:Q,isFieldHidden:re,isSectionVisible:le,isSectionHidden:X,resolveSectionLabels:ie,resolveFieldLabels:K,resolveFieldLength:W,resolveDefaultValue:se,getWizardTabs:N,applyCalculations:j,isSubmitDisabled:k,resolveSectionGridClass:T=>{const M={1:"grid-cols-1",2:"grid-cols-2",3:"grid-cols-3",4:"grid-cols-4",5:"grid-cols-5",6:"grid-cols-6",7:"grid-cols-7",8:"grid-cols-8",9:"grid-cols-9",10:"grid-cols-10",11:"grid-cols-11",12:"grid-cols-12"},$={1:"md:grid-cols-1",2:"md:grid-cols-2",3:"md:grid-cols-3",4:"md:grid-cols-4",5:"md:grid-cols-5",6:"md:grid-cols-6",7:"md:grid-cols-7",8:"md:grid-cols-8",9:"md:grid-cols-9",10:"md:grid-cols-10",11:"md:grid-cols-11",12:"md:grid-cols-12"},te=(ce=>{const ke=String(ce||"FULL").toUpperCase(),we=Number.parseInt(ke);if(!Number.isNaN(we)&&we>0)return Math.min(12,we);switch(ke){case"FULL":case"ONE":return 1;case"HALF":case"TWO":return 2;case"THIRD":case"THREE":return 3;case"TWO-THIRD":case"TWO-THIRDS":return 3;case"QUARTER":case"QUARTED":case"FOUR":return 4;case"THREE-QUARTER":case"THREE-QUARTERS":return 4;default:return 1}})(T);return`${M[te]||"grid-cols-1"} ${$[te]||"md:grid-cols-1"}`},resolveFieldColumnClass:(T,M="FULL")=>{const $={1:"md:col-span-1",2:"md:col-span-2",3:"md:col-span-3",4:"md:col-span-4",5:"md:col-span-5",6:"md:col-span-6",7:"md:col-span-7",8:"md:col-span-8",9:"md:col-span-9",10:"md:col-span-10",11:"md:col-span-11",12:"md:col-span-12"},te=(de=>{const Z=String(de||"FULL").toUpperCase(),ee=parseInt(Z);if(!isNaN(ee)&&ee>0)return Math.min(12,ee);switch(Z){case"FULL":case"ONE":return 1;case"HALF":case"TWO":return 2;case"THIRD":case"THREE":return 3;case"TWO-THIRD":case"TWO-THIRDS":return 3;case"QUARTER":case"QUARTED":case"FOUR":return 4;case"THREE-QUARTER":case"THREE-QUARTERS":return 4;default:return 1}})(M),ce=T.column||T.props?.colSpan||"FULL";let ke=1;const we=String(ce).toUpperCase(),_e=parseInt(we);if(!isNaN(_e)&&_e>0)ke=_e;else switch(we){case"FULL":case"ONE":ke=1;break;case"HALF":case"TWO":ke=2;break;case"THIRD":case"THREE":ke=3;break;case"QUARTER":case"QUARTED":case"FOUR":ke=4;break;case"TWO-THIRD":case"TWO-THIRDS":ke=2;break;case"THREE-QUARTER":case"THREE-QUARTERS":ke=3;break;default:ke=1}const fe=Math.min(te,ke);return te===1?"col-span-1":`col-span-1 ${$[fe]||"md:col-span-1"}`}}}function O2({formData:e,locale:t,errors:n,fieldMap:o,activeSchema:i,isSectionVisible:s,isSectionHidden:a,isFieldVisible:l,isFieldRequired:c,resolveFieldLength:d}){const f=(p,g,y)=>{const b=p.props||p.propsFieldCustom||p.propsFieldGlobal||{};let _="";if(g!=null)if(typeof g=="object")if(Array.isArray(g))_=g.length>0?"non-empty":"";else{const x=g.id??g.code??g.value??g.name??g.title??"";_=x==null?"":String(x).trim()}else _=String(g).trim();if(c(p,y)&&(!_||_===""))return t.value==="kr"||t.value==="ko"?`${p.propsFieldGlobal?.labelKR||p.propsFieldCustom?.labelKR||b.labelKR||p.labelKR||p.model||"필드"}은(는) 필수입니다.`:t.value==="id"?`${p.propsFieldGlobal?.labelID||p.propsFieldCustom?.labelID||b.labelID||p.labelID||p.model||"Field"} wajib diisi.`:`${p.propsFieldGlobal?.labelEN||p.propsFieldCustom?.labelEN||b.labelEN||p.labelEN||p.model||"Field"} is required.`;if(_&&_!==""){const x=d(p,y);if(x){const{minLength:B,maxLength:R}=x;if(B!=null&&_.length<B)return t.value==="kr"||t.value==="ko"?`최소 ${B}자를 입력해야 합니다.`:t.value==="id"?`Minimal ${B} karakter.`:`Minimum ${B} characters required.`;if(R!=null&&_.length>R)return t.value==="kr"||t.value==="ko"?`최대 ${R}자까지 입력할 수 있습니다.`:t.value==="id"?`Maksimal ${R} karakter.`:`Maximum ${R} characters allowed.`}}if(b.regex)try{if(!new RegExp(b.regex).test(_))return b.regexMessage||(t.value==="kr"||t.value==="ko"?"올바르지 않은 형식입니다":t.value==="id"?"Format tidak valid":"Invalid format")}catch{console.warn(`[DynamicForm] Invalid validation regex for field ${p.model}:`,b.regex)}return _&&String(b.valueType||"").toLowerCase()==="email"&&!LI(_)?b.emailInvalidMessage||(t.value==="kr"||t.value==="ko"?"올바르지 않은 이메일 형식입니다":t.value==="id"?"Format email tidak valid":"Invalid email format"):null};return{validateField:f,validateAll:()=>{let p=!0;const g=(y,b)=>{if(!s(y)||a&&a(y))return;const _=Ot(y)||b;((y.propsForm||y.propsFormStep||y.propsTable||y.propsTableStep||y.props||{}).fields||y.fields||[]).forEach(R=>{if(R.model&&l(R)){let S=R.model;const O=o.value.models.get(R.model);O&&O.length>0?S=(_&&O.find(F=>F.path.startsWith(`${_}.`))||O[0]).path:_&&(S=`${_}.${R.model}`);const I=o.value.paths.get(S),D=I?We(e,I.path):We(e,R.model)??e[R.model],w=f(R,D);w?(n[S]=w,p=!1):delete n[S]}}),(y.type==="WIZARD"||y.isWizard)&&(y.propsWizard?.propsSteps||[]).forEach(S=>{const O=S.key||S.id;S.sectionsWizard&&(Array.isArray(S.sectionsWizard)?S.sectionsWizard:[S.sectionsWizard]).forEach(D=>g(D,O))})};return i.value?.sections?.forEach(y=>g(y)),p}}}function MG({formData:e,activeSchema:t,isSectionVisible:n,isFieldVisible:o,isFieldHidden:i,getWizardTabs:s,fieldMap:a,rawItemsCache:l,navigation:c}){const d=()=>{const y=[],b=_=>{_?.forEach(x=>{if(x.type==="TABLE"||x.propsTable||x.propsTableStep||x.propsDataTableWizard){const S=x.propsTable||x.propsTableStep||x.propsDataTableWizard||x,O=S.modelKey||S.modelDatatable||Ot(x);O&&y.push({key:O,subFields:(S.headers||[]).map(I=>I.key)})}((x.propsForm||x.propsFormStep||x.propsTable||x.propsTableStep||x.propsDataTableWizard||x.props||{}).fields||x.fields||[]).forEach(S=>{const O=["DCodeDynamicUploadList","DCodeUploadList","DCodeDataTable","DCodeDynamicFormList"].includes(S.component);if(S.model&&(S.props?.multiple||S.props?.valueType==="array"||O)){const I=S.component.includes("Upload")?["id","filename","document","typeDocument","idDocumentType"]:["id"];y.push({key:S.model,subFields:I})}}),x.type==="WIZARD"&&s(x).forEach(S=>b(S.sections))})};return b(t.value?.sections),y};return{getCleanPayload:()=>{if(!t.value?.sections)return{...e};const y={},b=new Set;return t.value.sections.forEach(_=>{const x=n(_),B=Ot(_),R=(w,E)=>{if(!w.model)return;const F=E?`${E}.${w.model}`:w.model,A=x&&(o(w,void 0,E)||i(w,void 0,E));let P=null;if(A&&(P=We(e,F)??e[w.model]??Ii(e,w.model),["DCodeAutoComplete","DCodeSelect","DCodeRadio","DCodeRadioCustom"].includes(w.component)&&P!==null&&P!==void 0&&typeof P!="object")){const Q=l[w.key];if(Array.isArray(Q)){const re=Q.find(ie=>String(ie.code)===String(P)||String(ie.id)===String(P)||String(ie.name)===String(P));if(re){const le=(w.props||w.propsFieldCustom||w.propsFieldGlobal||{}).itemValue||"id";P=re[le]??re.id??re.code??P}}}Vt(y,F,xr(P)??null),b.add(w.model)},S=_.propsForm||_.propsFormStep||_.propsTable||_.propsTableStep||_.propsDataTableWizard||_.props||{},O=_.type==="WIZARD";(S.fields||_.fields||[]).forEach(w=>R(w,O?B||S.key:void 0)),_.type==="WIZARD"&&s(_).forEach(w=>w.sections.forEach(E=>{const F=Ot(E),A=F?`${w.key}.${F}`:w.key;if(E.type==="TABLE"||E.propsTable||E.propsTableStep||E.propsDataTableWizard){const q=E.propsTable||E.propsTableStep||E.propsDataTableWizard||E,Q=q.modelKey||q.modelDatatable||F;if(Q){const re=`${w.key}.${Q}`,ie=We(e,re)||We(e,Q)||[];if(Array.isArray(ie)){const le=q.headers||[],X=ie.filter(K=>ec(K)?!1:le.length>0?le.some(W=>{if(W.key==="no"||W.key==="action")return!1;let se=We(K,W.key);if(se!=null&&se!=="")return!0;const H=W.key.includes(".")?W.key.split(".").pop():null;return!!(H&&(se=We(K,H),se!=null&&se!==""))}):!0);Vt(y,re,xr(X)),console.log(`[SUBMIT][WIZARD-TABLE][${re}] Payload before sanitize:`,ie.length,"after:",X.length)}else Vt(y,re,[]);b.add(re)}}else((E.propsForm||E.propsFormStep||E.propsTable||E.propsTableStep||E.propsDataTableWizard||E.props||{}).fields||E.fields||[]).forEach(re=>R(re,A))}));const I=_.propsTable||_.propsTableStep||_.propsDataTableWizard,D=I?.modelKey||I?.modelDatatable||B;if(D&&(_.type==="TABLE"||_.propsTable||_.propsTableStep||_.propsDataTableWizard)){if(x){let w=D;const E=c?.navigationState?.value?.parentRowContext;if(E){const A=`${E.parentArrayKey}.${E.childArrayKey}`;(!D||D===A||D.startsWith(A+"."))&&(w=`${E.parentArrayKey}.${E.rowIndex}.${E.childArrayKey}`)}const F=We(e,w)||We(e,D)||[];if(Array.isArray(F)){const A=I?.headers||[],P=F.filter(q=>ec(q)?!1:A.length>0?A.some(Q=>{if(Q.key==="no"||Q.key==="action")return!1;let re=We(q,Q.key);if(re!=null&&re!=="")return!0;const ie=Q.key.includes(".")?Q.key.split(".").pop():null;return!!(ie&&(re=We(q,ie),re!=null&&re!==""))}):!0);y[w]=xr(P),w!==D&&(y[D]=xr(P)),console.log(`[SUBMIT][${w}] Payload before sanitize:`,F.length,"after:",P.length)}else y[w]=[],w!==D&&(y[D]=[])}else{const w=We(e,D);w!==void 0&&(y[D]=xr(w))}if(D.includes(".")){const w=D.indexOf("."),E=D.substring(0,w),F=D.substring(w+1);Object.keys(e).forEach(A=>{if(A.startsWith(`${E}.`)&&A.endsWith(`.${F}`)&&A!==D&&!y[A]){const P=We(e,A);Array.isArray(P)&&(y[A]=xr(P))}})}b.add(D)}}),["id","_id"].forEach(_=>{e[_]!==void 0&&!b.has(_)&&(y[_]=xr(e[_]))}),y},applyFieldMapping:(y,b)=>{const _={},x=(S,O)=>{if(S==null)return S;if(typeof S=="object")return S._isLogicValue?S.id:S.id??S.code??S.value??S;if(O&&l&&a?.value){const D=a.value.models?.get(O)?.[0]?.field;if(D){const w=l[D.key];if(Array.isArray(w)){const E=w.find(F=>String(F.code)===String(S)||String(F.id)===String(S));if(E&&E.id!==void 0)return E.id}}}return Array.isArray(S)&&S.length===1?x(S[0],O):S},B=(S,O)=>{if(!S||typeof S!="object")return;if(S[O]!==void 0)return S[O];const I=O.toLowerCase(),D=Object.keys(S).find(w=>w.toLowerCase()===I);return D!==void 0?S[D]:void 0};Object.entries(b).forEach(([S,O])=>{if(typeof O=="string"){const I=We(y,S)??B(y,S)??We(e,S)??B(e,S)??Ii(y,S)??Ii(e,S);I!==void 0&&(_[O]=x(I,S))}else if(Array.isArray(O)&&O.length>0){const I=O[0];if(S.includes(".")){const w=S.indexOf("."),E=S.substring(0,w),F=S.substring(w+1),A=new Set([...Object.keys(y||{}),...Object.keys(e||{})]),P=Array.from(A).filter(q=>q.startsWith(`${E}.`)&&q.endsWith(`.${F}`)&&q!==S);P.length>0&&P.forEach(q=>{const Q=We(y,q)??We(e,q);if(Array.isArray(Q)&&typeof I=="object"&&I!==null){const re=Object.entries(I),ie=Q.map(se=>{const H={},N=xr(se);return re.forEach(([j,Y])=>{let J=N[j]??se[j]??void 0;if(J==null&&(J=We(N,j)??We(se,j)??void 0),J==null&&j.includes(".")){const U=j.split(".");for(let k=1;k<U.length;k++){const C=U.slice(k).join("."),T=N[C]??We(N,C)??se[C]??We(se,C)??void 0;if(T!=null){J=T;break}}}H[Y]=x(J??null,j)}),H}).filter(se=>!ec(se)),le=q.substring(E.length),X=F.includes(".")?F.substring(F.lastIndexOf(".")):`.${F}`,K=le.replace(new RegExp(`\\.${F}$`),""),W=`${E}${K}${X}`;_[W]=ie}})}let D=We(y,S)??B(y,S)??We(e,S)??B(e,S)??Ii(y,S)??Ii(e,S);if(!Array.isArray(D)||D.length===0){const w=typeof I=="string"?[I]:Object.keys(I),E=d(),F=E.find(A=>A.key.toLowerCase()===S.toLowerCase());if(F){const A=We(y,F.key)??B(y,F.key)??We(e,F.key)??B(e,F.key)??Ii(y,F.key)??Ii(e,F.key);Array.isArray(A)&&A.length>0&&(D=A)}if(!Array.isArray(D)||D.length===0){const A=E.find(P=>w.some(q=>P.subFields.includes(q)));if(A){const P=We(y,A.key)??B(y,A.key)??We(e,A.key)??B(e,A.key)??Ii(y,A.key)??Ii(e,A.key);Array.isArray(P)&&P.length>0&&(D=P)}}}if(Array.isArray(D)){if(typeof I=="string")_[S]=D.map(w=>{const F=xr(w)[I]??w[I]??null;return x(F,I)}).filter(w=>w!=null);else if(typeof I=="object"&&I!==null){const w=Object.entries(I);if(w.length===1&&typeof w[0][1]=="string"){const[F,A]=w[0];_[A]=D.map(P=>{const q=xr(P);let Q=q[F]??P[F]??void 0;if(Q==null&&(Q=We(q,F)??We(P,F)??void 0),Q==null&&F.includes(".")){const re=F.split(".");for(let ie=1;ie<re.length;ie++){const le=re.slice(ie).join("."),X=q[le]??We(q,le)??P[le]??We(P,le)??void 0;if(X!=null){Q=X;break}}}return x(Q??null,F)}).filter(P=>P!=null)}else _[S]=D.map(F=>{const A={},P=xr(F);return w.forEach(([q,Q])=>{if(Array.isArray(Q)&&Q.length>0&&typeof Q[0]=="object"){const ie=Q[0];let le=P[q]??F[q]??void 0;le==null&&(le=We(P,q)??We(F,q)??void 0),Array.isArray(le)?A[q]=le.map(X=>{const K={},W=xr(X);return Object.entries(ie).forEach(([se,H])=>{let N=W[se]??X[se]??void 0;if(N==null&&(N=We(W,se)??We(X,se)??void 0),N==null&&se.includes(".")){const j=se.split(".");for(let Y=1;Y<j.length;Y++){const J=j.slice(Y).join("."),U=W[J]??We(W,J)??X[J]??We(X,J)??void 0;if(U!=null){N=U;break}}}K[H]=x(N??null,se)}),K}).filter(X=>!ec(X)):A[q]=[];return}let re=P[q]??F[q]??P[Q]??F[Q]??void 0;if(re==null&&(re=We(P,q)??We(F,q)??void 0),re==null&&q.includes(".")){const ie=q.split(".");for(let le=1;le<ie.length;le++){const X=ie.slice(le).join("."),K=P[X]??We(P,X)??F[X]??We(F,X)??void 0;if(K!=null){re=K;break}}}A[Q]=x(re??null,q)}),A}).filter(F=>!ec(F))}}}});const R=Object.keys(_).filter(S=>S.includes("."));if(R.length>0){R.sort((O,I)=>I.split(".").length-O.split(".").length);const S=new Set;for(const O of R){const I=O.split("."),D=I[0],w=_[D],E=_[O];if(Array.isArray(w)){if(I.length===3&&!isNaN(Number(I[1]))){const F=Number(I[1]),A=I[2];w[F]&&typeof w[F]=="object"&&(w[F][A]=Array.isArray(E)?E:[E],S.add(`${D}.${F}`))}else if(I.length===2){const F=I[1];if(Array.isArray(E)&&E.length>0)for(let A=0;A<w.length;A++){if(S.has(`${D}.${A}`))continue;const P=w[A];P&&typeof P=="object"&&(!P[F]||Array.isArray(P[F])&&P[F].length===0)&&(P[F]=E)}}}delete _[O]}}return _},handleResponseMapping:(y,b,_)=>{if(!y||!b)return;const x=y,B=y?.data!==void 0?y.data:y,R=Array.isArray(B)?B[0]:B;Object.entries(b).forEach(([S,O])=>{if(typeof S!="string"||typeof O!="string")return;const I=(w,E)=>{if(!(!E||!w||typeof E!="string")){if(E in w)return w[E];try{return E.split(".").reduce((F,A)=>F&&F[A],w)}catch{return}}},D=I(x,S)??I(x,O)??(B&&typeof B=="object"?I(B,S)??I(B,O):void 0)??(R&&typeof R=="object"?I(R,S)??I(R,O):void 0);if(D!==void 0){const w=_&&!O.includes(".")?`${_}.${O}`:O;Vt(e,w,D)}})},handleClearMapping:(y,b)=>{y&&Object.values(y).forEach(_=>{if(typeof _!="string")return;const x=b&&!_.includes(".")?`${b}.${_}`:_;Vt(e,x,null)})},getFormArrayModels:d}}const vf={TOP_LEFT:"top-left",TOP_RIGHT:"top-right",TOP_CENTER:"top-center",BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right",BOTTOM_CENTER:"bottom-center"},_d={LIGHT:"light",DARK:"dark",COLORED:"colored",AUTO:"auto"},ur={INFO:"info",SUCCESS:"success",WARNING:"warning",ERROR:"error",DEFAULT:"default"},RG={BOUNCE:"bounce",SLIDE:"slide",FLIP:"flip",ZOOM:"zoom",NONE:"none"},IG={dangerouslyHTMLString:!1,multiple:!0,position:vf.TOP_RIGHT,autoClose:5e3,transition:"bounce",hideProgressBar:!1,pauseOnHover:!0,pauseOnFocusLoss:!0,closeOnClick:!0,className:"",bodyClassName:"",style:{},progressClassName:"",progressStyle:{},role:"alert",theme:"light"},OG={rtl:!1,newestOnTop:!1,toastClassName:""},L2={...IG,...OG};ur.DEFAULT;var pn=(e=>(e[e.COLLAPSE_DURATION=300]="COLLAPSE_DURATION",e[e.DEBOUNCE_DURATION=50]="DEBOUNCE_DURATION",e.CSS_NAMESPACE="Toastify",e))(pn||{}),hv=(e=>(e.ENTRANCE_ANIMATION_END="d",e))(hv||{});const LG={enter:"Toastify--animate Toastify__bounce-enter",exit:"Toastify--animate Toastify__bounce-exit",appendPosition:!0},FG={enter:"Toastify--animate Toastify__slide-enter",exit:"Toastify--animate Toastify__slide-exit",appendPosition:!0},$G={enter:"Toastify--animate Toastify__zoom-enter",exit:"Toastify--animate Toastify__zoom-exit"},zG={enter:"Toastify--animate Toastify__flip-enter",exit:"Toastify--animate Toastify__flip-exit"},F2="Toastify--animate Toastify__none-enter";function $2(e,t=!1){var n;let o=LG;if(!e||typeof e=="string")switch(e){case"flip":o=zG;break;case"zoom":o=$G;break;case"slide":o=FG;break}else o=e;if(t)o.enter=F2;else if(o.enter===F2){const i=(n=o.exit.split("__")[1])==null?void 0:n.split("-")[0];o.enter=`Toastify--animate Toastify__${i}-enter`}return o}function jG(e){return e.containerId||String(e.position)}const Lp="will-unmount";function UG(e=vf.TOP_RIGHT){return!!document.querySelector(`.${pn.CSS_NAMESPACE}__toast-container--${e}`)}function WG(e=vf.TOP_RIGHT){return`${pn.CSS_NAMESPACE}__toast-container--${e}`}function HG(e,t,n=!1){const o=[`${pn.CSS_NAMESPACE}__toast-container`,`${pn.CSS_NAMESPACE}__toast-container--${e}`,n?`${pn.CSS_NAMESPACE}__toast-container--rtl`:null].filter(Boolean).join(" ");return Ed(t)?t({position:e,rtl:n,defaultClassName:o}):`${o} ${t||""}`}function qG(e){var t;const{position:n,containerClassName:o,rtl:i=!1,style:s={}}=e,a=pn.CSS_NAMESPACE,l=WG(n),c=document.querySelector(`.${a}`),d=document.querySelector(`.${l}`),f=!!d&&!((t=d.className)!=null&&t.includes(Lp)),h=c||document.createElement("div"),p=document.createElement("div");p.className=HG(n,o,i),p.dataset.testid=`${pn.CSS_NAMESPACE}__toast-container--${n}`,p.id=jG(e);for(const g in s)if(Object.prototype.hasOwnProperty.call(s,g)){const y=s[g];p.style[g]=y}return c||(h.className=pn.CSS_NAMESPACE,document.body.appendChild(h)),f||h.appendChild(p),p}function mv(e){var t,n,o;const i=typeof e=="string"?e:((t=e.currentTarget)==null?void 0:t.id)||((n=e.target)==null?void 0:n.id),s=document.getElementById(i);s&&s.removeEventListener("animationend",mv,!1);try{wf[i].unmount(),(o=document.getElementById(i))==null||o.remove(),delete wf[i],delete $o[i]}catch{}}const wf=r.reactive({});function KG(e,t){const n=document.getElementById(String(t));n&&(wf[n.id]=e)}function pv(e,t=!0){const n=String(e);if(!wf[n])return;const o=document.getElementById(n);o&&o.classList.add(Lp),t?(YG(e),o&&o.addEventListener("animationend",mv,!1)):mv(n),si.items=si.items.filter(i=>i.containerId!==e)}function GG(e){for(const t in wf)pv(t,e);si.items=[]}function z2(e,t){const n=document.getElementById(e.toastId);if(n){let o=e;o={...o,...$2(o.transition)};const i=o.appendPosition?`${o.exit}--${o.position}`:o.exit;n.className+=` ${i}`,t&&t(n)}}function YG(e){for(const t in $o)if(t===e)for(const n of $o[t]||[])z2(n)}function ZG(e){const t=xd().find(n=>n.toastId===e);return t?.containerId}function gv(e){return document.getElementById(e)}function XG(e){const t=gv(e.containerId);return t&&t.classList.contains(Lp)}function j2(e){var t;const n=r.isVNode(e.content)?r.toRaw(e.content.props):null;return n??r.toRaw((t=e.data)!=null?t:{})}function JG(e){return e?si.items.filter(t=>t.containerId===e).length>0:si.items.length>0}function QG(){if(si.items.length>0){const e=si.items.shift();Fp(e?.toastContent,e?.toastProps)}}const $o=r.reactive({}),si=r.reactive({items:[]});function xd(){const e=r.toRaw($o);return Object.values(e).reduce((t,n)=>[...t,...n],[])}function VG(e){return xd().find(t=>t.toastId===e)}function Fp(e,t={}){if(XG(t)){const n=gv(t.containerId);n&&n.addEventListener("animationend",bv.bind(null,e,t),!1)}else bv(e,t)}function bv(e,t={}){const n=gv(t.containerId);n&&n.removeEventListener("animationend",bv.bind(null,e,t),!1);const o=$o[t.containerId]||[],i=o.length>0;if(!i&&!UG(t.position)){const s=qG(t),a=r.createApp(xY,t);t.useHandler&&t.useHandler(a),a.mount(s),KG(a,s.id)}i&&!t.updateId&&(t.position=o[0].position),r.nextTick(()=>{t.updateId?jr.update(t):jr.add(e,t)})}const jr={add(e,t){const{containerId:n=""}=t;n&&($o[n]=$o[n]||[],$o[n].find(o=>o.toastId===t.toastId)||setTimeout(()=>{var o,i;t.newestOnTop?(o=$o[n])==null||o.unshift(t):(i=$o[n])==null||i.push(t),t.onOpen&&t.onOpen(j2(t))},t.delay||0))},remove(e){if(e){const t=ZG(e);if(t){const n=$o[t];let o=n.find(i=>i.toastId===e);$o[t]=n.filter(i=>i.toastId!==e),!$o[t].length&&!JG(t)&&pv(t,!1),QG(),r.nextTick(()=>{o!=null&&o.onClose&&(o.onClose(j2(o)),o=void 0)})}}},update(e={}){const{containerId:t=""}=e;if(t&&e.updateId){$o[t]=$o[t]||[];const n=$o[t].find(s=>s.toastId===e.toastId),o=n?.position!==e.position||n?.transition!==e.transition,i={...e,disabledEnterTransition:!o,updateId:void 0};jr.dismissForce(e?.toastId),setTimeout(()=>{Rt(i.content,i)},e.delay||0)}},clear(e,t=!0){e?pv(e,t):GG(t)},dismissCallback(e){var t;const n=(t=e.currentTarget)==null?void 0:t.id,o=document.getElementById(n);o&&(o.removeEventListener("animationend",jr.dismissCallback,!1),setTimeout(()=>{jr.remove(n)}))},dismiss(e){if(e){const t=xd();for(const n of t)if(n.toastId===e){z2(n,o=>{o.addEventListener("animationend",jr.dismissCallback,!1)});break}}},dismissForce(e){if(e){const t=xd();for(const n of t)if(n.toastId===e){const o=document.getElementById(e);o&&(o.remove(),o.removeEventListener("animationend",jr.dismissCallback,!1),jr.remove(e));break}}}},eY=r.reactive({useHandler:void 0}),U2=r.reactive({}),$p=r.reactive({});function W2(){return Math.random().toString(36).substring(2,9)}function tY(e){return typeof e=="number"&&!isNaN(e)}function yv(e){return typeof e=="string"}function Ed(e){return typeof e=="function"}function zp(...e){return r.mergeProps(...e)}function jp(e){return typeof e=="object"&&(!!(e!=null&&e.render)||!!(e!=null&&e.setup)||typeof e?.type=="object")}function nY(e={}){U2[`${pn.CSS_NAMESPACE}-default-options`]=e}function H2(){return U2[`${pn.CSS_NAMESPACE}-default-options`]||L2}function oY(){const e=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches;return document.documentElement.classList.contains("dark")||e?"dark":"light"}var Up=(e=>(e[e.Enter=0]="Enter",e[e.Exit=1]="Exit",e))(Up||{});const q2={containerId:{type:[String,Number],required:!1,default:""},clearOnUrlChange:{type:Boolean,required:!1,default:!0},disabledEnterTransition:{type:Boolean,required:!1,default:!1},dangerouslyHTMLString:{type:Boolean,required:!1,default:!1},multiple:{type:Boolean,required:!1,default:!0},limit:{type:Number,required:!1,default:void 0},position:{type:String,required:!1,default:vf.TOP_LEFT},bodyClassName:{type:String,required:!1,default:""},autoClose:{type:[Number,Boolean],required:!1,default:!1},closeButton:{type:[Boolean,Function,Object],required:!1,default:void 0},transition:{type:[String,Object],required:!1,default:"bounce"},hideProgressBar:{type:Boolean,required:!1,default:!1},pauseOnHover:{type:Boolean,required:!1,default:!0},pauseOnFocusLoss:{type:Boolean,required:!1,default:!0},closeOnClick:{type:Boolean,required:!1,default:!0},progress:{type:Number,required:!1,default:void 0},progressClassName:{type:String,required:!1,default:""},toastStyle:{type:Object,required:!1,default(){return{}}},progressStyle:{type:Object,required:!1,default(){return{}}},role:{type:String,required:!1,default:"alert"},theme:{type:String,required:!1,default:_d.AUTO},content:{type:[String,Object,Function],required:!1,default:""},toastId:{type:[String,Number],required:!1,default:""},data:{type:[Object,String],required:!1,default(){return{}}},type:{type:String,required:!1,default:ur.DEFAULT},icon:{type:[Boolean,String,Number,Object,Function],required:!1,default:void 0},delay:{type:Number,required:!1,default:void 0},onOpen:{type:Function,required:!1,default:void 0},onClose:{type:Function,required:!1,default:void 0},onClick:{type:Function,required:!1,default:void 0},isLoading:{type:Boolean,required:!1,default:void 0},rtl:{type:Boolean,required:!1,default:!1},toastClassName:{type:String,required:!1,default:""},updateId:{type:[String,Number],required:!1,default:""},contentProps:{type:Object,required:!1,default:null},expandCustomProps:{type:Boolean,required:!1,default:!1}},rY={autoClose:{type:[Number,Boolean],required:!0},isRunning:{type:Boolean,required:!1,default:void 0},type:{type:String,required:!1,default:ur.DEFAULT},theme:{type:String,required:!1,default:_d.AUTO},hide:{type:Boolean,required:!1,default:void 0},className:{type:[String,Function],required:!1,default:""},controlledProgress:{type:Boolean,required:!1,default:void 0},rtl:{type:Boolean,required:!1,default:void 0},isIn:{type:Boolean,required:!1,default:void 0},progress:{type:Number,required:!1,default:void 0},closeToast:{type:Function,required:!1,default:void 0}},iY=r.defineComponent({name:"ProgressBar",props:rY,setup(e,{attrs:t}){const n=r.ref(),o=r.computed(()=>e.hide?"true":"false"),i=r.computed(()=>({...t.style||{},animationDuration:`${e.autoClose===!0?5e3:e.autoClose}ms`,animationPlayState:e.isRunning?"running":"paused",opacity:e.hide||e.autoClose===!1?0:1,transform:e.controlledProgress?`scaleX(${e.progress})`:"none"})),s=r.computed(()=>[`${pn.CSS_NAMESPACE}__progress-bar`,e.controlledProgress?`${pn.CSS_NAMESPACE}__progress-bar--controlled`:`${pn.CSS_NAMESPACE}__progress-bar--animated`,`${pn.CSS_NAMESPACE}__progress-bar-theme--${e.theme}`,`${pn.CSS_NAMESPACE}__progress-bar--${e.type}`,e.rtl?`${pn.CSS_NAMESPACE}__progress-bar--rtl`:null].filter(Boolean).join(" ")),a=r.computed(()=>`${s.value} ${t?.class||""}`),l=()=>{n.value&&(n.value.onanimationend=null,n.value.ontransitionend=null)},c=()=>{e.isIn&&e.closeToast&&e.autoClose!==!1&&(e.closeToast(),l())},d=r.computed(()=>e.controlledProgress?null:c),f=r.computed(()=>e.controlledProgress?c:null);return r.watchEffect(()=>{n.value&&(l(),n.value.onanimationend=d.value,n.value.ontransitionend=f.value)}),()=>r.createVNode("div",{ref:n,role:"progressbar","aria-hidden":o.value,"aria-label":"notification timer",class:a.value,style:i.value},null)}}),sY=r.defineComponent({name:"CloseButton",inheritAttrs:!1,props:{theme:{type:String,required:!1,default:_d.AUTO},type:{type:String,required:!1,default:_d.LIGHT},ariaLabel:{type:String,required:!1,default:"close"},closeToast:{type:Function,required:!1,default:void 0}},setup(e){return()=>r.createVNode("button",{class:`${pn.CSS_NAMESPACE}__close-button ${pn.CSS_NAMESPACE}__close-button--${e.theme}`,type:"button",onClick:t=>{t.stopPropagation(),e.closeToast&&e.closeToast(t)},"aria-label":e.ariaLabel},[r.createVNode("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},[r.createVNode("path",{"fill-rule":"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"},null)])])}}),Wp=({theme:e,type:t,path:n,...o})=>r.createVNode("svg",r.mergeProps({viewBox:"0 0 24 24",width:"100%",height:"100%",style:{fill:e==="colored"?"currentColor":`var(--toastify-icon-color-${t})`}},o),[r.createVNode("path",{d:n},null)]);function aY(e){return r.createVNode(Wp,r.mergeProps(e,{path:"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"}),null)}function lY(e){return r.createVNode(Wp,r.mergeProps(e,{path:"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"}),null)}function cY(e){return r.createVNode(Wp,r.mergeProps(e,{path:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"}),null)}function dY(e){return r.createVNode(Wp,r.mergeProps(e,{path:"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"}),null)}function uY(){return r.createVNode("div",{class:`${pn.CSS_NAMESPACE}__spinner`},null)}const Hp={info:lY,warning:aY,success:cY,error:dY,spinner:uY},fY=e=>e in Hp;function hY({theme:e,type:t,isLoading:n,icon:o}){let i;const s=!!n||t==="loading",a={theme:e,type:t};if(s&&(o===void 0||typeof o=="boolean"))return Hp.spinner();if(o!==!1){if(jp(o))i=r.toRaw(o);else if(Ed(o)){const l=o;a.type=s?"loading":t,i=l(a),i=!i&&s?Hp.spinner():i}else r.isVNode(o)?i=r.cloneVNode(o,a):yv(o)||tY(o)?i=o:fY(t)&&(i=Hp[t](a));return i}}const mY=()=>{};function pY(e,t,n=pn.COLLAPSE_DURATION){const{scrollHeight:o,style:i}=e,s=n;requestAnimationFrame(()=>{i.minHeight="initial",i.height=o+"px",i.transition=`all ${s}ms`,requestAnimationFrame(()=>{i.height="0",i.padding="0",i.margin="0",setTimeout(t,s)})})}function gY(e){const t=r.ref(!1),n=r.ref(!1),o=r.ref(!1),i=r.ref(Up.Enter),s=r.reactive({...e,appendPosition:e.appendPosition||!1,collapse:typeof e.collapse>"u"?!0:e.collapse,collapseDuration:e.collapseDuration||pn.COLLAPSE_DURATION}),a=s.done||mY,l=r.computed(()=>s.appendPosition?`${s.enter}--${s.position}`:s.enter),c=r.computed(()=>s.appendPosition?`${s.exit}--${s.position}`:s.exit),d=r.computed(()=>e.pauseOnHover?{onMouseenter:_,onMouseleave:b}:{});function f(){const B=l.value.split(" ");p().addEventListener(hv.ENTRANCE_ANIMATION_END,b,{once:!0});const R=O=>{const I=p();O.target===I&&(I.dispatchEvent(new Event(hv.ENTRANCE_ANIMATION_END)),I.removeEventListener("animationend",R),I.removeEventListener("animationcancel",R),i.value===Up.Enter&&O.type!=="animationcancel"&&I.classList.remove(...B))},S=()=>{const O=p();O.classList.add(...B),O.addEventListener("animationend",R),O.addEventListener("animationcancel",R)};e.pauseOnFocusLoss&&g(),S()}function h(){if(!p())return;const B=()=>{const S=p();S.removeEventListener("animationend",B),s.collapse?pY(S,a,s.collapseDuration):a()},R=()=>{const S=p();i.value=Up.Exit,S&&(S.className+=` ${c.value}`,S.addEventListener("animationend",B))};n.value||(o.value?B():setTimeout(R))}function p(){return e.toastRef.value}function g(){document.hasFocus()||_(),window.addEventListener("focus",b),window.addEventListener("blur",_)}function y(){window.removeEventListener("focus",b),window.removeEventListener("blur",_)}function b(){(!e.loading.value||e.isLoading===void 0)&&(t.value=!0)}function _(){t.value=!1}function x(B){B&&(B.stopPropagation(),B.preventDefault()),n.value=!1}return r.watchEffect(h),r.watchEffect(()=>{const B=xd();n.value=B.findIndex(R=>R.toastId===s.toastId)>-1}),r.watchEffect(()=>{e.isLoading!==void 0&&(e.loading.value?_():b())}),r.onMounted(f),r.onUnmounted(()=>{e.pauseOnFocusLoss&&y()}),{isIn:n,isRunning:t,hideToast:x,eventHandlers:d}}function bY(e){if(!e||typeof e!="object"||Array.isArray(e)||e.__v_isVNode)return!1;const t=e;return["title","content"].some(n=>n in t)}const yY=r.defineComponent({name:"ToastItem",inheritAttrs:!1,props:q2,setup(e){const t=r.ref(),n=r.computed(()=>!!e.isLoading),o=r.computed(()=>e.progress!==void 0&&e.progress!==null),i=r.computed(()=>hY(e)),s=r.computed(()=>[`${pn.CSS_NAMESPACE}__toast`,`${pn.CSS_NAMESPACE}__toast-theme--${e.theme}`,`${pn.CSS_NAMESPACE}__toast--${e.type}`,e.rtl?`${pn.CSS_NAMESPACE}__toast--rtl`:void 0,e.toastClassName||""].filter(Boolean).join(" ")),{isRunning:a,isIn:l,hideToast:c,eventHandlers:d}=gY({toastRef:t,loading:n,done:()=>{jr.remove(e.toastId)},...$2(e.transition,e.disabledEnterTransition),...e});function f(){const h=e.content;if(bY(h)){const p=[];return h.title!==void 0&&p.push(r.createVNode("div",{"data-testid":"toast-text-title",class:`${pn.CSS_NAMESPACE}__toast-text-title`},[h.title])),h.content!==void 0&&p.push(r.createVNode("div",{"data-testid":"toast-text-content",class:`${pn.CSS_NAMESPACE}__toast-text-content`},[h.content])),r.createVNode("div",{"data-testid":"toast-text-content-wrapper",class:`${pn.CSS_NAMESPACE}__toast-text`},[p])}return jp(h)?r.h(r.toRaw(h),{toastProps:r.toRaw(e),closeToast:c,data:e.data,...e.expandCustomProps?e.contentProps:{contentProps:e.contentProps||{}}}):Ed(h)?h({toastProps:r.toRaw(e),closeToast:c,data:e.data}):e.dangerouslyHTMLString?r.h("div",{innerHTML:h}):h}return()=>r.createVNode("div",r.mergeProps({id:e.toastId,class:s.value,style:e.toastStyle||{},ref:t,"data-testid":`toast-item-${e.toastId}`,onClick:h=>{e.closeOnClick&&c(),e.onClick&&e.onClick(h)}},d.value),[r.createVNode("div",{role:e.role,"data-testid":"toast-body",class:`${pn.CSS_NAMESPACE}__toast-body ${e.bodyClassName||""}`},[i.value!=null&&r.createVNode("div",{"data-testid":`toast-icon-${e.type}`,class:[`${pn.CSS_NAMESPACE}__toast-icon`,e.isLoading?"":`${pn.CSS_NAMESPACE}--animate-icon ${pn.CSS_NAMESPACE}__zoom-enter`].join(" ")},[jp(i.value)?r.h(r.toRaw(i.value),{theme:e.theme,type:e.type}):Ed(i.value)?i.value({theme:e.theme,type:e.type}):i.value]),r.createVNode("div",{"data-testid":"toast-content"},[f()])]),(e.closeButton===void 0||e.closeButton===!0)&&r.createVNode(sY,{theme:e.theme,closeToast:h=>{h.stopPropagation(),h.preventDefault(),c()}},null),jp(e.closeButton)?r.h(r.toRaw(e.closeButton),{closeToast:c,type:e.type,theme:e.theme}):Ed(e.closeButton)?e.closeButton({closeToast:c,type:e.type,theme:e.theme}):null,r.createVNode(iY,{className:e.progressClassName,style:e.progressStyle,rtl:e.rtl,theme:e.theme,isIn:l.value,type:e.type,hide:e.hideProgressBar,isRunning:a.value,autoClose:e.autoClose,controlledProgress:o.value,progress:e.progress,closeToast:e.isLoading?void 0:c},null)])}}),qp="vue3-toastify:url-change";let Kp=0,kf;function vY(){if(!(typeof window>"u")&&$p.lastUrl!==window.location.href){$p.lastUrl=window.location.href;const e=n=>typeof n.clearOnUrlChange=="boolean"?n.clearOnUrlChange:H2().clearOnUrlChange!==!1,t=Object.values($o).reduce((n,o)=>(Array.isArray(o)&&n.push(...o),n),[]);for(const n of t)n.toastId&&e(n)&&jr.dismiss(n.toastId);si.items=si.items.filter(n=>!e(n.toastProps))}}function wY(){const{history:e}=window,t=e.pushState,n=e.replaceState;return e.pushState=function(...o){const i=t.apply(this,o);return window.dispatchEvent(new Event(qp)),i},e.replaceState=function(...o){const i=n.apply(this,o);return window.dispatchEvent(new Event(qp)),i},()=>{e.pushState=t,e.replaceState=n}}function kY(){if(typeof window>"u"||kf)return;const e=wY(),t=()=>vY();window.addEventListener(qp,t),window.addEventListener("popstate",t),window.addEventListener("hashchange",t),kf=()=>{e(),window.removeEventListener(qp,t),window.removeEventListener("popstate",t),window.removeEventListener("hashchange",t),kf=void 0}}function _Y(){kf&&(kf(),$p.lastUrl="")}const xY=r.defineComponent({name:"ToastifyContainer",inheritAttrs:!1,props:q2,setup(e){const t=r.computed(()=>e.containerId),n=r.computed(()=>$o[t.value]||[]),o=r.computed(()=>n.value.filter(i=>i.position===e.position));return r.onMounted(()=>{typeof window<"u"&&(Kp+=1,kY())}),r.onUnmounted(()=>{typeof window<"u"&&Kp>0&&(Kp-=1,Kp===0&&_Y())}),()=>r.createVNode(r.Fragment,null,[o.value.map(i=>{const{toastId:s=""}=i;return r.createVNode(yY,r.mergeProps({key:s},i),null)})])}});let vv=!1;const K2={isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1};function G2(){const e=[];return xd().forEach(t=>{const n=document.getElementById(t.containerId);n&&!n.classList.contains(Lp)&&e.push(t)}),e}function EY(e){const t=G2().length,n=e??0;return n>0&&t+si.items.length>=n}function CY(e){EY(e.limit)&&!e.updateId&&si.items.push({toastId:e.toastId,containerId:e.containerId,toastContent:e.content,toastProps:e})}function Za(e,t,n={}){if(vv)return;n=zp(H2(),{type:t},r.toRaw(n)),(!n.toastId||typeof n.toastId!="string"&&typeof n.toastId!="number")&&(n.toastId=W2()),n={...n,...n.type==="loading"?K2:{},content:e,containerId:n.containerId||String(n.position)};const o=Number(n?.progress);return!isNaN(o)&&o<0&&(n.progress=0),o>1&&(n.progress=1),n.theme==="auto"&&(n.theme=oY()),CY(n),$p.lastUrl=window.location.href,n.multiple?si.items.length?n.updateId&&Fp(e,n):Fp(e,n):(vv=!0,Rt.clearAll(void 0,!1),setTimeout(()=>{Fp(e,n)},0),setTimeout(()=>{vv=!1},390)),n.toastId}const Rt=(e,t)=>Za(e,ur.DEFAULT,t);Rt.info=(e,t)=>Za(e,ur.DEFAULT,{...t,type:ur.INFO}),Rt.error=(e,t)=>Za(e,ur.DEFAULT,{...t,type:ur.ERROR}),Rt.warning=(e,t)=>Za(e,ur.DEFAULT,{...t,type:ur.WARNING}),Rt.warn=Rt.warning,Rt.success=(e,t)=>Za(e,ur.DEFAULT,{...t,type:ur.SUCCESS}),Rt.loading=(e,t)=>Za(e,ur.DEFAULT,zp(t,K2)),Rt.dark=(e,t)=>Za(e,ur.DEFAULT,zp(t,{theme:_d.DARK})),Rt.remove=e=>{e?jr.dismiss(e):jr.clear()},Rt.clearAll=(e,t)=>{r.nextTick(()=>{jr.clear(e,t)})},Rt.isActive=e=>{let t=!1;return t=G2().findIndex(n=>n.toastId===e)>-1,t},Rt.update=(e,t={})=>{setTimeout(()=>{const n=VG(e);if(n){const o=r.toRaw(n),{content:i}=o,s={...o,...t,toastId:t.toastId||e,updateId:W2()},a=s.render||i;delete s.render,Za(a,s.type,s)}},0)},Rt.done=e=>{Rt.update(e,{isLoading:!1,progress:1})},Rt.promise=SY;function SY(e,{pending:t,error:n,success:o},i){var s,a,l;let c;const d={...i||{},autoClose:!1};t&&(c=yv(t)?Rt.loading(t,d):Rt.loading(t.render,{...d,...t}));const f={autoClose:(s=i?.autoClose)!=null?s:!0,closeOnClick:(a=i?.closeOnClick)!=null?a:!0,closeButton:(l=i?.autoClose)!=null?l:null,isLoading:void 0,draggable:null,delay:100},h=(g,y,b)=>{if(y==null){Rt.remove(c);return}const _={type:g,...f,...i,data:b},x=yv(y)?{render:y}:y;return c?Rt.update(c,{..._,...x,isLoading:!1}):Rt(x.render,{..._,...x,isLoading:!1}),b},p=Ed(e)?e():e;return p.then(g=>{h("success",o,g)}).catch(g=>{h("error",n,g)}),p}Rt.POSITION=vf,Rt.THEME=_d,Rt.TYPE=ur,Rt.TRANSITIONS=RG;const AY={install(e,t={}){eY.useHandler=t.useHandler||(()=>{}),TY(t)}};typeof window<"u"&&(window.Vue3Toastify=AY);function TY(e={}){const t=zp(L2,e);nY(t)}const BY=["status","success","error","errors"],PY=async(e,t=2048)=>{try{return JSON.parse(await e.slice(0,t).text())}catch{return null}},NY=e=>!e||typeof e!="object"||Array.isArray(e)?!1:e.status===!1||e.success===!1||BY.includes("error")&&("error"in e||"errors"in e)?!0:"message"in e&&Object.keys(e).length<=3,DY=(e,t)=>{const n=e?.message||e?.error||e?.errors||t;return typeof n=="string"?n:JSON.stringify(n)},MY=(e,t,n)=>{const o=(t||"").toLowerCase();return!!(e||o.includes("attachment")||o.includes("filename")||n==="blob"||n==="arraybuffer")};function RY({state:e,props:t,emit:n,apiUrl:o,router:i,locale:s,mapping:a,validation:l,fieldMap:c,activeSchema:d,resolvedBaseUrl:f,resolveKeyParams:h,navigation:p,logic:g}){const y=r.inject("previewActions",r.ref(!1)),b=r.computed(()=>t.dummyMode||y.value),_=A=>{if(t.dummyMode)return!0;if(A.permission&&t.checkPermission){let P=t.checkPermission(A.permission);if(!P&&A.permission!==A.permission.toLowerCase()&&(P=t.checkPermission(A.permission.toLowerCase())),!P)return!1}return A.permission==="CREATE"?!t.isEditMode:A.permission==="UPDATE"?t.isEditMode:!0},x=A=>{if(!A)return null;const P=A.match(/filename\*=(?:UTF-8'')?([^;\n]+)/i);if(P){const Q=P[1].trim().replace(/^['"]|['"]$/g,"");try{return decodeURIComponent(Q)}catch{return Q}}const q=A.match(/filename=(?:"?)([^";]+)(?:"?)/i);if(q){const Q=q[1].trim().replace(/^['"]|['"]$/g,"");try{return decodeURIComponent(Q)}catch{return Q}}return null},B=(A,P)=>{if(!A||!A.headers)return null;const q=A.headers;if(typeof q.get=="function")return q.get(P);const Q=Object.keys(q).find(re=>re.toLowerCase()===P.toLowerCase());return Q?q[Q]:null},R=A=>{const P=B(A,"content-disposition")||B(A,"Content-Disposition"),q=x(P);return A instanceof Blob?{blob:A,filename:q}:A?.data instanceof Blob?{blob:A.data,filename:q}:{blob:A,filename:q}},S=(A,P)=>{if(console.log("🚀 handleNavigation called with:",A),!A||!A.targetSection){console.warn("⚠️ Invalid navigation config - missing targetSection");return}if(!p){console.error("❌ Navigation object not available");return}if(typeof p.navigateTo!="function"){console.error("❌ navigation.navigateTo method not available");return}console.log("📍 Calling navigation.navigateTo"),p.navigateTo(A,P),console.log("✅ Navigation handling complete")},O=A=>{if(A.triggerNavigation){S(A.triggerNavigation);return}A.requireConfirm?(e.confirmDialog.title=s.value==="kr"||s.value==="ko"?A.propCustomMessage?.titleKR||"확인":s.value==="id"?A.propCustomMessage?.titleID||"Konfirmasi":A.propCustomMessage?.titleEN||"Confirm",e.confirmDialog.message=s.value==="kr"||s.value==="ko"?A.propCustomMessage?.messageKR||"계속하시겠습니까?":s.value==="id"?A.propCustomMessage?.messageID||"Lanjutkan?":A.propCustomMessage?.messageEN||"Continue?",e.confirmDialog.action=A,e.confirmDialog.visible=!0):D(A)},I=()=>{const A=e.confirmDialog.redirectUrl;if(e.confirmDialog.visible=!1,e.confirmDialog.action&&(typeof e.confirmDialog.action=="function"?e.confirmDialog.action():typeof e.confirmDialog.action.callback=="function"?e.confirmDialog.action.callback():D(e.confirmDialog.action)),A&&i){const P=A.startsWith("/")?A:"/"+A;i.push(P)}e.confirmDialog.redirectUrl="",e.confirmDialog.isBlocking=!1},D=async A=>{const P=A.propsActionGlobal||A.props||{},q=a.getCleanPayload(),Q=P.fieldMapping||A.fieldMapping||{},re=a.applyFieldMapping(q,Q);if(n("action",A,re),A.triggerNavigation&&p&&g){const le=e.tableRowFormData||re||{};A.triggerNavigation.condition?g.evaluateLogic(A.triggerNavigation.condition,le,"NAVIGATION")&&p.navigateTo(A.triggerNavigation,le):p.navigateTo(A.triggerNavigation,le)}const ie=P.endpointDialogActionSave||A.endpointDialogActionSave||P.endpointDialogAction||A.endpointDialogAction||P.endpointAction||A.endpointAction||P.endpointPropAction||A.endpointPropAction||P.endpoint||A.endpoint;if(console.log("[SUBMIT][DIAGNOSTIC] action type:",P.type,"| endpoint apiUrl:",ie?.apiUrl||"MISSING","| action key:",A.key||A.propsActionGlobal?.key),(P.type==="SUBMIT"||P.type==="ACTION")&&ie?.apiUrl){if(e?.isSubmitting?.value)return;if(b.value){Rt.info(s.value==="kr"||s.value==="ko"?"제출 작업 시뮬레이션 (미리 보기 모드)":s.value==="id"?"Simulasi aksi Submit (Preview Mode)":"Action Submit simulated (Preview Mode)",{autoClose:2e3}),n("success",{dummy:!0});return}e?.isSubmitting&&(e.isSubmitting.value=!0);const le=Rt.loading(s.value==="kr"||s.value==="ko"?"처리 중...":s.value==="id"?"Memproses...":"Processing..."),X=Oi(ie.apiUrl,f.value);try{let K={...re};if(h&&Array.isArray(ie.keyParam)){const Y=h(ie.keyParam);console.log("[SUBMIT] Resolved keyParams for action:",Y),Object.assign(K,Y)}const W=ie.responseType==="blob"||ie.responseType==="arraybuffer"||ie.accept&&!ie.accept.includes("json")||ie.apiUrl&&(ie.apiUrl.includes("/export")||ie.apiUrl.includes("/download"))||X&&(X.includes("/export")||X.includes("/download")||X.includes("format="))||A.actionType==="EXPORT"||A.permission==="EXPORT"||P.type==="EXPORT"||P.permission==="EXPORT",se=ie.config?{...ie.config}:{};ie.accept&&(se.headers||(se.headers={}),se.headers.Accept=ie.accept,se.headers.accept=ie.accept),W&&(se.responseType=ie.responseType||"blob"),console.log("[SUBMIT] Starting API call to:",X,"with payload/params:",K,"and config:",se);const H=await o(X,ie.apiMethod||"POST",K,se);if(console.log("[SUBMIT] API response received:",H),W&&(H instanceof Blob||H?.constructor?.name==="Blob"||H?.size!==void 0||H?.data instanceof Blob||H?.data?.constructor?.name==="Blob"||H?.data?.size!==void 0||H?.data instanceof ArrayBuffer)){const{blob:Y,filename:J}=R(H),U=Y instanceof Blob?Y:new Blob([Y],{type:ie.accept||"application/octet-stream"});if((U.type||"").toLowerCase().includes("application/json")&&!MY(J,B(H,"content-disposition"),ie.responseType)){const fe=await PY(U);if(e.isSubmitting.value=!1,NY(fe)){Rt.update(le,{render:DY(fe,s.value==="id"?"Gagal mengunduh file":"Failed to download file"),type:"error",isLoading:!1,autoClose:5e3});return}}const C=window.URL.createObjectURL(U),T=document.createElement("a");T.href=C;let M="bin";const $=(ie.accept||"").toLowerCase(),ne=(ie.apiUrl||"").toLowerCase(),te=(U.type||"").toLowerCase(),ce=(K?.format||"").toLowerCase(),ke=X.toLowerCase();$.includes("pdf")||te.includes("pdf")||ce==="pdf"||ke.includes("format=pdf")||ke.includes("pdf")?M="pdf":$.includes("excel")||$.includes("sheet")||$.includes("spreadsheet")||$.includes("xlsx")||te.includes("excel")||te.includes("spreadsheet")||ce==="xlsx"||ce==="excel"||ke.includes("format=excel")?M="xlsx":$.includes("csv")||te.includes("csv")||ce==="csv"||ke.includes("format=csv")?M="csv":$.includes("zip")||te.includes("zip")||ce==="zip"||ke.includes("format=zip")?M="zip":$.includes("json")||te.includes("json")?M="json":$.includes("txt")||te.includes("txt")||ce==="txt"||ke.includes("format=txt")||ke.includes("txt")?M="txt":ne.includes("pdf")?M="pdf":ne.includes("excel")||ne.includes("xlsx")?M="xlsx":ne.includes("csv")?M="csv":ne.includes("zip")?M="zip":ne.includes("txt")&&(M="txt");const we=A.label||P.labelID||P.labelEN||"Export";let _e=J||`${we}_${new Date().toISOString().slice(0,10)}.${M}`;M==="txt"&&_e.toLowerCase().endsWith(".bin")&&(_e=_e.replace(/\.bin$/i,".txt")),T.setAttribute("download",_e),document.body.appendChild(T),T.click(),T.remove(),setTimeout(()=>window.URL.revokeObjectURL(C),1e3),Rt.update(le,{render:s.value==="id"?"File berhasil diunduh!":"File downloaded successfully!",type:"success",isLoading:!1,autoClose:2e3}),e.isSubmitting.value=!1,n("success",H);return}const N=H?.status===!0;console.log("[SUBMIT] response.status:",H?.status),console.log("[SUBMIT] isSuccess evaluated as:",N);const j=H?.message||(N?s.value==="kr"||s.value==="ko"?"성공":s.value==="id"?"Sukses":"Success":s.value==="kr"||s.value==="ko"?"실패":s.value==="id"?"Gagal":"Failed");if(Rt.update(le,{render:j,type:N?"success":"error",isLoading:!1,autoClose:N?2e3:5e3}),N){if(console.log("[SUBMIT] Success condition passed"),(P.fieldMapping||A.fieldMapping)&&(console.log("[SUBMIT] Applying field mapping for response"),a.handleResponseMapping(H,P.fieldMapping||A.fieldMapping)),n("success",H),i){const Y=P.routeBack;console.log("[SUBMIT] routeBack value:",Y);const J=U=>{if(!U){console.log("[SUBMIT] No path provided for navigation");return}const k=U.startsWith("/")?U:"/"+U;console.log("[SUBMIT] Triggering router.push to:",k),setTimeout(()=>{i.push(k).then(()=>{console.log("[SUBMIT] Router push success")}).catch(C=>{console.error("[SUBMIT] Router push failed:",C)})},150)};if(Y)J(Y);else{console.log("[SUBMIT] routeBack missing, attempting directory-up fallback");const C=((i.currentRoute?.value||i.currentRoute||{}).path||"/").split("/").filter(Boolean);C.length>1?(C.pop(),J("/"+C.join("/"))):J("/")}}try{let Y=H?.data||H?.payload||H;if(Array.isArray(Y)&&Y.length>0&&(Y=Y[0]),Y&&typeof Y=="object"&&i){const U={...(i.currentRoute?.value||i.currentRoute||{}).query||{}};let k=!1;const C=yf(Y),T=["status","success","code","message","error","errorCode","errorMessage"];if(Object.entries(C).forEach(([M,$])=>{!T.includes(M)&&$!==null&&$!==void 0&&(typeof $=="string"||typeof $=="number"||typeof $=="boolean")&&U[M]!==String($)&&(U[M]=String($),k=!0)}),k&&typeof window<"u"&&window.history){const M=new URL(window.location.href);Object.entries(U).forEach(([$,ne])=>{ne!=null&&M.searchParams.set($,String(ne))}),window.history.replaceState(window.history.state,"",M.toString())}}}catch(Y){console.warn("[SUBMIT] Failed to update query params:",Y)}}else console.log("[SUBMIT] Success condition failed (status is not true). Navigation aborted."),n("error",H)}catch(K){console.error("[SUBMIT] Critical error during action execution. Navigation aborted.",K),Rt.error(K.message||"Action failed"),n("error",K)}finally{e.isSubmitting.value=!1}return}else if(P.type==="SUBMIT"){if(b.value){Rt.info(s.value==="kr"||s.value==="ko"?"제출 작업 시뮬레이션 (미리 보기 모드)":s.value==="id"?"Simulasi aksi Submit (Preview Mode)":"Action Submit simulated (Preview Mode)",{autoClose:2e3});return}n("submit",re)}P.keyRedirect&&P.route&&i&&(console.log("[SUBMIT] Triggering synchronous keyRedirect navigation to:",P.route),i.push(P.route))};return{isActionVisible:_,handleGlobalButtonClick:O,confirmAction:I,performAction:D,handleSubmit:async()=>{if(b.value){Rt.info(s.value==="kr"||s.value==="ko"?"제출 작업 시뮬레이션 (미리 보기 모드)":s.value==="id"?"Simulasi aksi Submit (Preview Mode)":"Action Submit simulated (Preview Mode)",{autoClose:2e3});return}if(e.isSubmitted.value=!0,!!l.validateAll()){e.isSubmitting.value=!0;try{const A=a.getCleanPayload(),P=(d.value?.actions||[]).find(Q=>Q.type==="SUBMIT"||Q.key==="SUBMIT"||Q.propsActionGlobal?.type==="SUBMIT"),q=P?.fieldMapping||P?.propsActionGlobal?.fieldMapping;n("submit",q?a.applyFieldMapping(A,q):A)}finally{e.isSubmitting.value=!1}}},handleCancel:()=>n("cancel"),handleFieldUpdate:(A,P,q)=>{let Q=A;const re=c.value.models.get(A);re&&re.length>0&&(Q=(q&&re.find(W=>W.path.startsWith(`${q}.`))||re[0]).path);const ie=We(e.formData,Q),le=K=>K==null||K===""||Array.isArray(K)&&K.length===0?null:K;JSON.stringify(le(P))!==JSON.stringify(le(ie))&&(e.touched[Q]=!0),q?Vt(e.formData,Q,P):e.formData[A]=P;const X=c.value.paths.get(Q)?.field;if(X){const K=l.validateField(X,P);K?e.errors[Q]=K:delete e.errors[Q]}}}}function IY(e){const{formData:t,emit:n,mapping:o,validation:i,locale:s,logic:a,state:l,activeSchema:c,prefetchFieldItems:d,triggerFetchRule:f,navigation:h}=e,p=r.ref(!1),g=r.ref(""),y=r.ref("Plus"),b=r.ref([]),_=r.ref("md"),x=l?.tableRowFormData||r.reactive({});console.log("[useFormTable][DEBUG] Init. State passed:",!!l,"Identity Match:",x===l?.tableRowFormData),console.log("[useFormTable][DEBUG] tableRowFormData keys:",Object.keys(x));const B=r.reactive({}),R=r.ref(""),S=r.ref(null),O=r.ref(!1),I=r.ref(null),D=r.ref(!1),w=new Map,E=()=>{!a||!b.value.length||b.value.forEach(H=>{const N=H.model;if(!N)return;const j=H.key||N,Y=N,J={visibleRule:H.logic?.visibleRule,disabledRule:H.logic?.disabledRule,optionsFilterRule:H.logic?.optionsFilterRule,lengthRule:H.logic?.lengthRule},U={},k=H.props||H.propsFieldCustom||H.propsFieldGlobal||{},C=k.endpoint||k.endpointReference||k.endpointComponent||k.endpointPropAction;if(Object.entries(J).forEach(([M,$])=>{if(!$)return;let ne;M==="visibleRule"?ne=a.isFieldVisible(H,x):M==="disabledRule"?ne=a.isFieldDisabled(H,x):M==="optionsFilterRule"?ne=a.getFilteredItems(H,x):M==="lengthRule"&&(ne=a.resolveFieldLength(H,x));const te=JSON.stringify(ne);U[M]=te;const ce=w.get(j);ce?.[M]!==void 0&&ce[M]!==te&&(M==="visibleRule"&&ne===!1||M==="disabledRule"&&ne===!0||M==="optionsFilterRule"||M==="lengthRule")&&(x[Y]=null)}),Array.isArray(C?.keyParam)&&C.keyParam.forEach(M=>{let $,ne;if(typeof M=="string")$=x[M],ne=`kp-${M}`;else if(typeof M=="object"&&M!==null)$=Object.values(M).map(we=>x[we]),ne=`kp-${JSON.stringify(M)}`;else return;const te=JSON.stringify($);U[ne]=te;const ce=w.get(j);if(ce?.[ne],te!==ce?.[ne]){d&&d(H,!0,Y,x),f&&H.props?.fetchRule&&f(H,H.props.fetchRule,Y,x);const ke=ce?.[ne]==="null"||ce?.[ne]==="undefined"||!ce,we=te==="null"||te==="undefined",_e=typeof M=="string"&&(M===H.key||M===H.model);(!ke||we)&&!_e&&(x[Y]=null)}}),w.set(j,U),!a.isFieldVisible(H,x)){const M=x[Y];M!=null&&M!==""&&(x[Y]=null)}})},F=()=>{!a||!b.value.length||(E(),b.value.forEach(H=>{const N=H.model;if(!N)return;const j=a.resolveDefaultValue(H,x);if(j!=null){const U=x[N],C=(H.props||H.propsFieldCustom||H.propsFieldGlobal||{}).returnObject||H.logic?.returnObject;(U==null||U===""||C&&(typeof U=="string"||typeof U=="number")&&(typeof j=="object"&&j!==null))&&(x[N]=j)}const Y=H.props||H.propsFieldCustom||H.propsFieldGlobal||{},J=H.logic?.autoSelect||Y.autoSelect||"single";if(J!=="none"&&l?.rawItemsCache){const U=l.rawItemsCache[H.key]||[];if(U.length>0){const k=x[N];if(k==null||k===""){const C=Y.returnObject||H.logic?.returnObject,T=U[0];if(J==="single"&&U.length===1){const M=C?T:T.id??T.value??T.code;x[N]=M}else if(J==="first"){const M=C?T:T.id??T.value??T.code;x[N]=M}}}}H.logic&&typeof H.logic=="object"&&Object.keys(H.logic).filter(k=>k.toLowerCase().includes("calculaterule")&&H.logic[k]&&typeof H.logic[k]=="object").forEach(k=>{const C=H.logic[k],T=Object.keys(C)[0];if(!T)return;const M=a.evaluateLogic(C[T],x,`CALC-${T}`,T),$=x[T];M!==void 0&&(Number.isNaN(M)?!Number.isNaN($):JSON.stringify($)!==JSON.stringify(M))&&(x[T]=M)})}))};r.watch(()=>({...l?.rawItemsCache}),()=>{p.value&&F()},{deep:!0});const A=H=>!H?.apiUrl&&!H?.endpointTable?.apiUrl,P=H=>{if(!H)return!1;const N=(H.key||"").toLowerCase(),j=(H.permission||"").toUpperCase();return N==="detail"||N.includes("view")||j==="VIEW"},q=H=>{const N=H.modelKey||H.modelDatatable,j=H.key||H.id,Y=h?.navigationState?.value?.parentRowContext;if(Y){const U=`${Y.parentArrayKey}.${Y.rowIndex}.${Y.childArrayKey}`,k=H.modelKey||H.modelDatatable,C=`${Y.parentArrayKey}.${Y.childArrayKey}`;if(!k||k===C||k.startsWith(C+"."))return console.log(`[resolveTableDataKey][PARENT-CTX] Scoped path: "${U}"`),U;console.log(`[resolveTableDataKey][PARENT-CTX-MISMATCH] modelKey "${k}" does not match "${C}" — ignoring parentRowContext`)}const J=c?.value||l?.internalSchema?.value||a?.activeSchema?.value;if(J?.sections&&j){const U=(C,T)=>{for(const M of C)if(M.type==="WIZARD"&&M.propsWizard?.propsSteps)for(const $ of M.propsWizard.propsSteps){const ne=Array.isArray($.sectionsWizard)?$.sectionsWizard:$.sectionsWizard?[$.sectionsWizard]:[];if(ne.some(ke=>(ke.key||ke.id||ke.propsTable?.key||ke.propsTableStep?.key||ke.propsForm?.key||ke.propsFormStep?.key)===T))return $.modelKey||$.key||null;const ce=U(ne,T);if(ce)return ce}return null},k=U(J.sections,j);if(k){const C=`${k}.${N||j}`;return console.log(`[resolveTableDataKey][WIZARD-MATCH] Resolved nested path: "${C}" for section: "${j}"`),C}}return N&&We(t,N)!==void 0?N:j&&We(t,j)!==void 0?j:We(t,"data")!==void 0?"data":N||j},Q=H=>{if(!H)return[];const N=q(H),j=We(t,N);if(!Array.isArray(j))return[];const Y=H.headers||[],J=j.filter(U=>ec(U)?!1:Y.length===0?!0:Y.some(C=>{if(C.key==="no"||C.key==="action")return!1;let T=We(U,C.key);if(T!=null&&T!=="")return!0;const M=C.key.includes(".")?C.key.split(".").pop():null;if(M&&(T=We(U,M),T!=null&&T!==""))return!0;const $=C.custom?.propsCustom?.[0]?.value;return!!($&&$!==C.key&&$!==M&&(T=We(U,$),T!=null&&T!==""))}));return j.length>0&&(console.log(`[TABLE][${N}] Raw rows:`,j.length,"Filtered rows:",J.length),j.length!==J.length&&console.log(`[TABLE][${N}] Filtered out ${j.length-J.length} rows (empty or mismatch).`)),J},re=H=>{if(H.fields?.length)return H.fields;const N=(H.actionTableGlobal||[]).find(j=>j.permission==="CREATE"||(j.key||"").toLowerCase().includes("add"));return N?.fieldActionGlobal?.length?N.fieldActionGlobal:(H.headers||[]).filter(j=>j.key&&j.key!=="no").map(j=>({key:j.key,model:j.key,component:"DCodeTextField"}))},ie=(H,N)=>{I.value={propsTable:H,row:N},D.value=!0},le=()=>{if(!I.value)return;const{propsTable:H,row:N}=I.value;D.value=!1;const j=q(H),Y=We(t,j);if(Array.isArray(Y)){const J=Y.indexOf(N);if(J!==-1)Y.splice(J,1);else{const U=JSON.stringify(N,(C,T)=>["no","_index"].includes(C)?void 0:T),k=Y.findIndex(C=>JSON.stringify(C,(T,M)=>["no","_index"].includes(T)?void 0:M)===U);k!==-1&&Y.splice(k,1)}Vt(t,j,[...Y])}},X=(H,N)=>{console.log(`[useFormTable][DEBUG] Updating ${H} with:`,N,"Target Object Keys:",Object.keys(x)),x[H]=N,F();const j=b.value.find(Y=>Y.model===H);if(j){const Y=i.validateField(j,N,x);Y?B[H]=Y:delete B[H]}},K=(H,N,j)=>{const Y="[FORM-TABLE-TRACER]";console.log(`${Y} Starting openTableRowDialog`,{sectionKey:H.modelKey||H.key||H.id,action:N.key||N.permission,hasRowData:!!j}),l?.activeTableAction&&(l.activeTableAction.value=N),j&&console.log(`${Y} Raw Row Data Received:`,JSON.parse(JSON.stringify(j))),R.value=q(H),l?.activeTableKey&&(l.activeTableKey.value=R.value),console.log(`${Y} Resolved activeTableKey: "${R.value}"`),O.value=P(N),S.value=null,g.value=s.value==="id"?N.labelID||"Tambah Data":N.labelEN||"Add Data",y.value=N.icon||"Plus";const J=(N.dialogConfig?.layoutSize||"md").toLowerCase();_.value=J,console.log(`[useFormTable][DEBUG] Opening Dialog with size: "${J}" (from ${N.dialogConfig?.layoutSize})`);const U=N.fieldActionCustom||N.fieldActionGlobal||re(H);b.value=U,console.log(`${Y} Dialog Fields Count:`,U.length),Object.keys(x).forEach(k=>{x[k]=null}),Object.keys(B).forEach(k=>delete B[k]),w.clear(),U.forEach((k,C)=>{const T=k.model||k.key;if(!T){console.warn(`${Y} Field at index ${C} is missing a model/key!`);return}let M=j?We(j,T):null,$="DEEP_MATCH";if(j&&M==null){const ne=T.includes(".")?T.split(".").pop():null;ne&&(M=We(j,ne),M!=null&&($=`LEAF_MATCH("${ne}")`))}j&&console.log(`${Y} Field "${T}" [${$}] -> Resolved Value:`,M),x[T]=M??null}),console.log(`${Y} Final tableRowFormData prepared:`,JSON.parse(JSON.stringify(x))),p.value=!0,setTimeout(()=>{console.log(`${Y} Triggering initial scanDialogLogic...`),F()},10)};return{tableDialogOpen:p,tableDialogTitle:g,tableDialogIcon:y,tableDialogFields:b,tableRowFormData:x,tableRowErrors:B,activeTableKey:R,editingRowIndex:S,tableDialogViewOnly:O,confirmDeletePending:I,confirmDeleteOpen:D,tableDialogSize:_,isTemporaryTable:A,isActionViewOnly:P,tableRows:Q,resolveTableFields:re,confirmTableDelete:ie,executeTableDelete:le,handleTableRowUpdate:X,openTableRowDialog:K,handleDataTableAction:(H,N)=>{const{action:j,row:Y}=N,J=j.toLowerCase();if(N.isLocalSave||N.actionType==="CREATE"||N.actionType==="UPDATE"){const M=N.modelDatatable||q(H);if(M&&Y&&typeof Y=="object"){const $=We(t,M)||[],ne=Array.isArray($)?[...$]:[];if(N.actionType==="UPDATE"){let te=N.originalRow?ne.indexOf(N.originalRow):-1;if(te===-1&&N.originalRow){const ce=N.originalRow["detail.id"]||N.originalRow.id||N.originalRow["documents.id"]||N.originalRow["documents.document.id"];ce!=null&&(te=ne.findIndex(ke=>(ke["detail.id"]||ke.id||ke["documents.id"]||ke["documents.document.id"])===ce))}if(te===-1){const ce=JSON.stringify(N.originalRow||{},(ke,we)=>["no","_index"].includes(ke)?void 0:we);te=ne.findIndex(ke=>JSON.stringify(ke,(we,_e)=>["no","_index"].includes(we)?void 0:_e)===ce)}te===-1&&(te=N.rowIndex!==void 0&&N.rowIndex!==null?N.rowIndex:-1),te!==-1?ne[te]={...Y}:ne.push({...Y})}else ne.push({...Y});Vt(t,M,[...ne]),l?.formData&&Vt(l.formData,M,[...ne]),n("update:modelValue",{...t}),n("update:model",{...t})}return}const U=typeof N.actionType=="string"?N.actionType:"";if(/delete|trash|hapus|remove/i.test(j)||/delete|trash|hapus|remove/i.test(U)){const M=q(H),$=We(t,M);if(Array.isArray($)){if(N.selection&&Array.isArray(N.selection)&&N.selection.length>0){const ne=H.endpointTable?.keyParam?.[0]||H.endpointGlobal?.keyParam?.[0]||H.endpoint?.keyParam?.[0]||"id",te=typeof ne=="object"?Object.keys(ne)[0]:ne,ce=new Set(N.selection.map(we=>String(we))),ke=$.filter((we,_e)=>{let fe=we[te]??we.id;fe===void 0&&(te==="no"?fe=_e+1:te==="_index"&&(fe=_e));const de=String(fe);return!ce.has(de)&&!N.selection.includes(we)});Vt(t,M,ke)}else if(Y){const ne=[...$],te=ne.indexOf(Y);if(te!==-1)ne.splice(te,1);else{const ce=JSON.stringify(Y,(we,_e)=>["no","_index"].includes(we)?void 0:_e),ke=ne.findIndex(we=>JSON.stringify(we,(_e,fe)=>["no","_index"].includes(_e)?void 0:fe)===ce);ke!==-1&&ne.splice(ke,1)}Vt(t,M,ne)}n("update:modelValue",{...t}),n("update:model",o.getCleanPayload())}return}let k=null;const C=M=>Array.isArray(M)?M.find($=>{const ne=($.key||$.propsActionGlobal?.key||$.propsActionCustom?.key||"").toLowerCase(),te=($.actionType||$.propsActionGlobal?.actionType||$.propsActionCustom?.actionType||"").toLowerCase();return ne===J||te===J}):null;k=C(H.actionTableGlobal)||C(H.actionTableLine),!k&&Array.isArray(H.headers)&&H.headers.forEach(M=>{if(M.custom?.type==="ACTION"){const $=C(M.custom.actionCustom);$&&(k=$)}});const T=(k?.actionType||k?.propsActionGlobal?.actionType||k?.propsActionCustom?.actionType||k?.permission||"").toLowerCase();if((T==="delete"||T==="destroy")&&!(k?.endpoint||k?.propsActionGlobal?.endpointPropAction||k?.propsActionCustom?.endpointPropAction)?.apiUrl){const $=q(H),ne=We(t,$);if(Array.isArray(ne)){let te=-1;if(Y&&(te=ne.indexOf(Y),te===-1)){const ce=JSON.stringify(Y,(ke,we)=>["no","_index"].includes(ke)?void 0:we);te=ne.findIndex(ke=>JSON.stringify(ke,(we,_e)=>["no","_index"].includes(we)?void 0:_e)===ce)}te!==-1&&(ne.splice(te,1),Vt(t,$,[...ne]),n("update:model",o.getCleanPayload()))}return}if(T==="view"||T==="detail"||/detail|view/i.test(j)){K(H,k||{key:"detail",permission:"VIEW"},Y);return}if((T==="update"||T==="create"||T==="edit"||T==="add"||/edit|add|create|update/i.test(j))&&k?.openDialog!==!1){if(T==="create"||T==="add"||/add|create/i.test(j))K(H,k||{key:"create",permission:"CREATE"});else{const $=q(H),ne=We(t,$);let te=Array.isArray(ne)?ne.indexOf(Y):-1;if(te===-1&&Array.isArray(ne)){const ce=JSON.stringify(Y,(ke,we)=>["no","_index"].includes(ke)?void 0:we);te=ne.findIndex(ke=>JSON.stringify(ke,(we,_e)=>["no","_index"].includes(we)?void 0:_e)===ce)}S.value=te!==-1?te:null,K(H,k||{key:"edit",permission:"UPDATE"},Y)}return}if(Y&&typeof Y=="object"&&!k?.endpoint?.apiUrl&&!k?.propsActionGlobal?.endpointPropAction?.apiUrl){const M=H.modelDatatable,$=We(t,M)||[],ne=Array.isArray($)?[...$]:[],te=H.headers?.find(_e=>_e.custom?.type==="CHECKBOX"||_e.keyCheckbox),ce=te?.keyCheckbox||te?.custom?.keyCheckbox||"id";let ke=-1;Y[ce]&&(ke=ne.findIndex(_e=>_e[ce]===Y[ce])),ke===-1?ne.push({...Y}):ne.splice(ke,1,{...Y}),Vt(t,M,ne),n("update:model",o.getCleanPayload())}},saveTableRow:()=>{const H="[SAVE-TRACER]";console.log(`${H} Starting saveTableRow`,{activeTableKey:R.value,editingIndex:S.value});let N=!0;if(Object.keys(B).forEach(U=>delete B[U]),b.value.forEach(U=>{if(a&&!a.isFieldVisible(U,x))return;const k=x[U.model],C=i.validateField(U,k,x);C&&(B[U.model]=C,N=!1)}),!N){console.warn(`${H} Validation failed for table row dialog:`,JSON.parse(JSON.stringify(B)));return}const j=R.value;if(!j)return;const Y=We(t,j)||[],J=Array.isArray(Y)?[...Y]:[];S.value!==null?J.splice(S.value,1,{...x}):J.push({...x}),Vt(t,j,J),p.value=!1}}}function OY(e){const{state:t,props:n,emit:o,logic:i,mapping:s,activeSchema:a,fieldMap:l,prefetchFieldItems:c,triggerFetchRule:d,fetchSectionData:f,router:h}=e;let p="",g="",y=!1,b=!0;const _=new Map,x=new Map,B=new Map;r.watch(()=>a.value,(w,E)=>{w!==E&&(x.clear(),_.clear(),B.clear(),b=!0,g="",p="")});const R=async(w,E)=>{const F=a.value?.sections;if(!F)return;i.applyCalculations();const A=i.getNormalizedData(w),P=new Set,q=new Map,Q=(K,W=!0,se)=>{if(K)for(const H of K){const j=i.isSectionVisible(H,w)&&W,Y=Ot(H),J=se&&Y?`${se}.${Y}`:se,U=H.modelKey||H.key||H.id,C=(H.propsForm||H.propsFormStep||H.propsTable||H.propsTableStep||H.propsDataTableWizard||H.props||{}).fields||H.fields||[];for(const T of C){if(!T.model)continue;const M=J?`${J}.${T.model}`:T.model;i.isFieldVisible(T,w,M)&&j&&P.add(M)}if(H.type?.toUpperCase()==="WIZARD"){const T=H.propsWizard?.propsSteps||[],M=Ot(H),$=t.wizardState[M]??0;for(let ne=0;ne<T.length;ne++){const te=T[ne],we=i.isSectionVisible(te,w)&&j&&ne===$,_e=te.sectionsWizard||te.sections||[],fe=Array.isArray(_e)?_e:[_e];Q(fe,we,U)}}}};Q(F,!0);const re=(K,W,se,H)=>{const N=i.isFieldVisible(K,H,W)&&se,j=q.get(K.model)||!1;return q.set(K.model,j||N),N},ie=(K,W,se,H,N)=>{const j=K.model,Y=K.logic,J=K.props||K.propsFieldCustom||K.propsFieldGlobal||{},U=J.endpoint||J.endpointReference||J.endpointComponent||J.endpointPropAction,k=Array.isArray(U?.keyParam);if(!Y&&!k)return;const C={};if(["lengthRule","optionsFilterRule","visibleRule","disabledRule"].forEach(fe=>{const de=Y?.[fe];if(!de)return;let Z;if(fe==="visibleRule")Z=i.isFieldVisible(K,H,W);else if(fe==="disabledRule")Z=i.isFieldDisabled(K,H,W);else if(fe==="requiredRule")Z=i.isFieldRequired(K,H,W);else if(fe==="lengthRule")Z=i.resolveFieldLength(K,H);else if(fe==="optionsFilterRule")Z=i.resolveActiveRule(de,H,`${fe}-${j}`,W);else{const Be=i.resolveActiveRule(de,H,`${fe}-${j}`,W);Z=Be?i.evaluateLogic(Be,H,`${fe}-${j}`,W):null}const ee=JSON.stringify(Z);C[fe]=ee;const pe=B.get(K.key);pe?.[fe]!==void 0&&pe[fe]!==ee&&N&&(fe==="visibleRule"&&Z===!1||fe==="disabledRule"&&Z===!0||fe==="optionsFilterRule"||fe==="lengthRule")&&(P.has(W)||Vt(t.formData,W,null))}),N&&!se&&!P.has(W)){const fe=We(t.formData,W);fe!=null&&fe!==""&&Vt(t.formData,W,null)}Array.isArray(U?.keyParam)&&U.keyParam.forEach(fe=>{let de,Z;const ee=W.includes(".")?W.split(".").slice(0,-1).join("."):void 0,pe=i.getNormalizedData(w,ee);if(typeof fe=="string")de=pe._resolveLogicVar?.(fe)??pe[fe],Z=`kp-${fe}`;else if(typeof fe=="object"&&fe!==null)de=Object.values(fe).map(Fe=>pe._resolveLogicVar?.(Fe)??pe[Fe]),Z=`kp-${JSON.stringify(fe)}`;else return;const Be=JSON.stringify(de);C[Z]=Be;const Te=B.get(K.key);if(Te?.[Z]!==void 0&&Te[Z]!==Be){se&&c(K,!0,W);const Oe=Te[Z]==="null"||Te[Z]==="undefined",Fe=Be==="null"||Be==="undefined",Ue=typeof fe=="string"&&(fe===K.key||fe===K.model);N&&(!Oe||Fe)&&!Ue&&Vt(t.formData,W,null)}});const M=fe=>{if(!fe)return!0;if(typeof fe=="object"){const de=Object.keys(fe);if(de.length===1&&(de[0]==="=="||de[0]==="===")){const Z=fe[de[0]];if(Array.isArray(Z)){if(Z.length===1&&(Z[0]===""||Z[0]===null))return!0;if(Z.length===2){const ee=Z[0],pe=Z[1];if(typeof ee=="object"&&ee!==null&&ee.var===""&&(pe===""||pe===null))return!0}}}}return!1},$=fe=>fe==null?JSON.stringify(fe):fe instanceof File||fe instanceof Blob||fe.constructor?.name==="File"?`File:${fe.name}:${fe.size}:${fe.type}:${fe.lastModified||0}`:Array.isArray(fe)?`[${fe.map($).join(",")}]`:JSON.stringify(fe);(Array.isArray(Y?.fetchRule)?Y.fetchRule:[Y?.fetchRule].filter(Boolean)).forEach((fe,de)=>{const Z=`fetch-${de}`,ee=i.evaluateLogic(fe.condition,H,`FETCH-${j}`,W),pe=JSON.stringify(ee);H[j],C[Z]=pe;const Be=B.get(K.key),Te=Be?.[Z]==="true";let Oe=!1;if(ee&&!Te&&(Oe=!0),ee&&Array.isArray(fe.endpoint?.keyParam)&&fe.endpoint.keyParam.forEach(Fe=>{let Ue,Qe;if(typeof Fe=="string")Ue=H[Fe],Ue===void 0&&K&&K.key===Fe&&(Ue=H[K.model]),Qe=`kp-${Fe}`;else if(typeof Fe=="object"&&Fe!==null)Ue=Object.values(Fe).map(he=>H[he]),Qe=`kp-${JSON.stringify(Fe)}`;else return;const Ve=$(Ue);Be?.[Qe]!==void 0&&Be[Qe]!==Ve&&(Oe=!0),C[Qe]=Ve}),Oe&&se&&d(K,fe,W),!ee&&Te){t.formData[`_fetchStatus_${K.model}`]=!1;const Fe=Qe=>{if(!Qe)return;((Qe.propsForm||Qe.propsFormStep||Qe.propsTable||Qe.propsTableStep||Qe.propsDataTableWizard||Qe.props||{}).fields||Qe.fields||[]).forEach(he=>{if(he.model){const Ce=W.includes(".")?W.split(".").slice(0,-1).join("."):void 0,Pe=Ce?`${Ce}.${he.model}`:he.model;Vt(t.formData,Pe,null)}}),Qe.type?.toUpperCase()==="WIZARD"&&Qe.propsWizard?.propsSteps&&Qe.propsWizard.propsSteps.forEach(he=>{(Array.isArray(he.sectionsWizard)?he.sectionsWizard:[he.sectionsWizard].filter(Boolean)).forEach(Fe)})},Ue=(Qe,Ve)=>{for(const Xe of Qe){if(Ot(Xe)===Ve){Fe(Xe);return}Xe.type?.toUpperCase()==="WIZARD"&&Xe.propsWizard?.propsSteps&&Xe.propsWizard.propsSteps.forEach(Ce=>{const Pe=Array.isArray(Ce.sectionsWizard)?Ce.sectionsWizard:[Ce.sectionsWizard].filter(Boolean);Ue(Pe,Ve)})}};Array.isArray(fe.revealSections)&&fe.revealSections.forEach(Qe=>{t.revealedSectionIds[Qe]=!1,a.value?.sections&&Ue(a.value.sections,Qe)}),Array.isArray(fe.revealFields)&&fe.revealFields.forEach(Qe=>{t.revealedFieldModels[Qe]=!1;const Ve=W.includes(".")?W.split(".").slice(0,-1).join("."):void 0,Xe=Ve?`${Ve}.${Qe}`:Qe;Vt(t.formData,Xe,null)}),s?.handleClearMapping&&s.handleClearMapping(fe.mapping||{},W)}}),(Array.isArray(Y?.autoFetchRule)?Y.autoFetchRule:[Y?.autoFetchRule].filter(Boolean)).forEach((fe,de)=>{const Z=`autofetch-${de}`,pe=fe.condition&&!M(fe.condition)?i.evaluateLogic(fe.condition,H,`AUTOFETCH-${j}`,W):!0,Be=JSON.stringify(pe);C[Z]=Be;const Te=B.get(K.key),Oe=Te?.[Z]==="true";let Fe=!1;pe&&!Oe&&Te!==void 0&&(Fe=!0),pe&&Array.isArray(fe.triggers)&&fe.triggers.forEach((Ue,Qe)=>{const Ve=Ue.fieldKey;if(!Ve)return;const Xe=W.includes(".")?W.split(".").slice(0,-1).join("."):void 0,he=i.getNormalizedData(w,Xe),Ce=he._resolveLogicVar?.(Ve)??he[Ve],Pe=$(Ce),qe=`afr-trig-${Ve}-${Qe}`;if(Te?.[qe]!==void 0&&Te[qe]!==Pe)if(Ue.event==="debounced"){const Se=Ue.debounceMs||300,Ie=`afr-debounced-${K.key}-${de}-${Qe}`;t[Ie]||(t[Ie]=OI((Je,wt,gt)=>{se&&d(Je,wt,gt)},Se)),t[Ie](K,fe,W)}else Fe=!0;C[qe]=Pe}),Fe&&se&&d(K,fe,W),!pe&&Oe&&(t.formData[`_fetchStatus_${K.model}`]=!1,s?.handleClearMapping&&s.handleClearMapping(fe.mapping||{},W),Array.isArray(fe.revealSections)&&fe.revealSections.forEach(Ue=>{t.revealedSectionIds[Ue]=!1}),Array.isArray(fe.revealFields)&&fe.revealFields.forEach(Ue=>{t.revealedFieldModels[Ue]=!1;const Qe=W.includes(".")?W.split(".").slice(0,-1).join("."):void 0,Ve=Qe?`${Qe}.${Ue}`:Ue;Vt(t.formData,Ve,null)}))}),(Array.isArray(Y?.copyRule)?Y.copyRule:[Y?.copyRule].filter(Boolean)).forEach((fe,de)=>{const Z=`copy-${de}`,ee=fe.condition?i.evaluateLogic(fe.condition,H,`COPY-COND-${j}`,W):!0;let pe;typeof fe.source=="string"?pe=H[fe.source]:fe.source&&typeof fe.source=="object"&&(pe=i.evaluateLogic(fe.source,H,`COPY-SRC-${j}`,W));const Be=JSON.stringify({conditionMet:ee,sourceVal:pe});if(B.get(K.key)?.[Z]!==Be&&ee){const Fe=We(t.formData,W);JSON.stringify(Fe)!==JSON.stringify(pe)&&Vt(t.formData,W,pe)}C[Z]=Be});const ke=i.resolveDefaultValue(K,H,W);if(ke!=null){const fe=We(t.formData,W),Z=(K.props||K.propsFieldCustom||K.propsFieldGlobal||{}).returnObject||K.logic?.returnObject;(fe==null||fe===""||Z&&(typeof fe=="string"||typeof fe=="number")&&(typeof ke=="object"&&ke!==null))&&Vt(t.formData,W,ke)}const we=K.props||K.propsFieldCustom||K.propsFieldGlobal||{},_e=K.logic?.autoSelect||we.autoSelect||"none";if(_e!=="none"){const fe=t.rawItemsCache[K.key]||[];if(fe.length>0){const de=We(t.formData,W);if(de==null||de===""){const Z=we.returnObject||K.logic?.returnObject,ee=fe[0];if(_e==="single"&&fe.length===1){const pe=Z?ee:ee.id??ee.value??ee.code;Vt(t.formData,W,pe)}else if(_e==="first"){const pe=Z?ee:ee.id??ee.value??ee.code;Vt(t.formData,W,pe)}}}}B.set(K.key,C)},le=async(K,W,se)=>{if(K.type?.toUpperCase()!=="WIZARD")return;const H=K.propsWizard?.propsSteps||[],N=Ot(K),j=t.wizardState[N]??0;for(let Y=0;Y<H.length;Y++){const J=H[Y],C=i.isSectionVisible(J,se)&&W&&Y===j,T=J.modelKey||J.key||J.id;Array.isArray(J.sectionsWizard)?await X(J.sectionsWizard,C,T):J.sectionsWizard&&await X([J.sectionsWizard],C,T)}},X=async(K,W=!0,se)=>{if(K)for(const H of K){const j=i.isSectionVisible(H,w)&&W,Y=Ot(H),J=se?Y?`${se}.${Y}`:se:Y||"ROOT",U=se&&Y?`${se}.${Y}`:se,k=H.propsForm||H.propsFormStep||H.propsTable||H.propsTableStep||H.propsDataTableWizard||H.props||{};if(E&&!j){const $=k.modelDatatable||k.modelKey||(H.type?.toUpperCase()==="TABLE"?H.key||H.id:null);if($){const ne=We(t.formData,$);if(Array.isArray(ne)?ne.length>0:ne!=null&&ne!==""){const ce=t.originalData?We(t.originalData,$):void 0;(Array.isArray(ce)?ce.length>0:ce!=null&&ce!=="")||Vt(t.formData,$,Array.isArray(ne)?[]:null)}}}const C=x.get(J);(j||b)&&(C===!1||C===void 0)?(x.set(J,!0),(k.endpointSection||k.endpointForm||k.endpointTable)&&(console.log(`[useFormWatcher][TRIGGER] Auto-fetching section: ${J}`),await f(J,H,U))):x.set(J,j);const M=k.fields||H.fields||[];for(const $ of M){if(!$.model)continue;const ne=U?`${U}.${$.model}`:$.model,te=re($,ne,j,w);ie($,ne,te,A,E)}await le(H,j,w)}};await X(F,!0);for(const[K,W]of q.entries())_.set(K,W)};async function S(w,E=!1){if(!w?.sections)return;const F=P=>{if(!P)return;const q=["visibleRule","requiredRule","disabledRule","optionsFilterRule","lengthRule","calculateRule","fetchRule","copyRule","defaultValueRule"];for(const Q of q){const re=P[Q],ie=Array.isArray(re)?re:[re].filter(Boolean);for(const le of ie)le.condition&&Op(le.condition),Q==="copyRule"&&le.source&&typeof le.source=="object"&&Op(le.source)}};function A(P,q){const Q=Ot(P)||q,re=P.propsForm||P.propsFormStep||P.propsTable||P.propsTableStep||P.propsDataTableWizard||P.props||{};F(P.logic||re.logic);const ie=re.fields||P.fields||[];for(const le of ie){F(le.logic);const X=le.props||le.propsFieldCustom||le.propsFieldGlobal||{},K=X.endpointReference||X.endpoint||X.endpointComponent,W=!!K?.apiUrl;if(le.logic?.optionsFilterRule||W){if(Array.isArray(K?.keyParam)&&K.keyParam.length>0){console.log(`[initSection][SKIP] Field "${le.model}" has keyParam dependencies — deferring fetch until parent is selected.`);continue}const H=Q?`${Q}.${le.model}`:le.model;c(le,!1,H)}}if((P.type==="TABLE"||P.isDataTable)&&(P.propsTable?.modelKey||P.propsTable?.modelDatatable||P.propsTableStep?.modelKey||P.propsTableStep?.modelDatatable||P.propsTable?.key||P.key)){const le=P.propsTable?.modelKey||P.propsTable?.modelDatatable||P.propsTableStep?.modelKey||P.propsTableStep?.modelDatatable||P.propsTable?.key||P.key;le&&(t.formData[le]=t.formData[le]||[])}if(P.type==="WIZARD"){const le=Ot(P),X=h?.currentRoute?.value?.query?.[`step_${le}`];X!==void 0&&!isNaN(Number(X))?t.wizardState[le]=Number(X):t.wizardState[le]===void 0&&(t.wizardState[le]=0);for(const K of P.propsWizard?.propsSteps||[]){const W=K.modelKey||K.key||K.id;F(K.logic),K.sectionsWizard&&(Array.isArray(K.sectionsWizard)?K.sectionsWizard:[K.sectionsWizard]).forEach(H=>A(H,W))}}}for(const P of w.sections)A(P);E||(await R(t.formData,!1),b&&(console.log("[useFormWatcher] Schema initialization complete. Exiting initialization mode."),b=!1))}async function O(w,E=!1){if(w&&Object.keys(w).length>0){const F=JSON.stringify(w);if(F===p)return;if(F!==g){g=F,y=!0;const A=p?JSON.parse(p):null;let P=!1;for(const[q,Q]of Object.entries(w)){if(!b&&Q!==null&&Q!==void 0&&A&&A[q]===null)continue;if(!b&&Q!==null&&Q!==void 0){let ie=l.value.paths.get(q)||l.value.models.get(q)?.[0];if(ie&&i.isFieldDisabled(ie.field,t.formData,ie.path))continue}if(Array.isArray(Q)&&Q.length>0){const ie=t.formData[q];if(Array.isArray(ie)&&ie.length>0&&Array.isArray(Q)&&Q.length===0)continue}if(!E&&_.get(q)===!0){const ie=t.formData[q];if(ie!=null)continue}const re=t.formData[q];if(JSON.stringify(re)!==JSON.stringify(Q)){P=!0;const le=(l.value.paths.get(q)||l.value.models.get(q)?.[0])?.path||q;Vt(t.formData,le,Q)}}(b||P)&&Object.assign(t.originalData,JSON.parse(JSON.stringify(t.formData))),b&&(E||(b=!1,await R(t.formData,!1)))}}}let I=null;r.watch(()=>a.value,async w=>{n.dummyMode?(I&&clearTimeout(I),I=setTimeout(async()=>{await S(w)},1e3)):await S(w)},{deep:!0,immediate:!0});let D=null;return r.watch(t.formData,async w=>{t.revision.value++,D&&clearTimeout(D),D=setTimeout(async()=>{const E=!b&&!y;y=!1,await R(w,E);const F=s.getCleanPayload()||{},A=JSON.stringify(F);A!==p&&(p=A,o("update:model",F))},50)},{deep:!0}),r.watch(()=>n.model,async w=>{await O(w)},{deep:!0}),r.watch(()=>({...t.revealedSectionIds}),async()=>{await R(t.formData,!1)},{deep:!0}),r.watch(()=>({...t.wizardState}),async()=>{console.log("[useFormWatcher] wizardState changed, triggering scan..."),await R(t.formData,!1)},{deep:!0}),r.watch(()=>({...t.rawItemsCache}),async()=>{await R(t.formData,!1)},{deep:!0}),{lastEmittedPayload:()=>p}}function LY(e={},t,n){const{initialHiddenStates:o={},maxHistoryDepth:i=20,debug:s=!1}=e,a=r.ref({currentContext:null,history:[],hiddenStates:{...o},navigationEnabled:new Set,maxHistoryDepth:i,parentRowContext:null}),l=(D,w)=>{s&&console.log(`[Navigation] ${D}`,w||"")},c=(D,w)=>{if(D.rules&&D.rules.length>0){l("Multi-rule mode: evaluating rules",D.rules);let E=null;for(const F of D.rules){if(!F.condition){E=F;continue}if(t){const A=t(F.condition,w);if(l(`Rule "${F.id}" condition`,{condition:F.condition,result:A}),A)return l(`Rule "${F.id}" matched`,F),{targetSection:F.targetSection,hiddenRules:F.hiddenRules,parentRowContext:F.parentRowContext}}}return E?(l("Using default rule",E),{targetSection:E.targetSection,hiddenRules:E.hiddenRules,parentRowContext:E.parentRowContext}):(l("No rule matched and no default, aborting"),null)}return{targetSection:D.targetSection,hiddenRules:D.hiddenRules,parentRowContext:D.parentRowContext}},d=(D,w)=>{const E=c(D,w);if(!E||!E.targetSection)return;const F={sectionKey:a.value.currentContext||"root",hiddenStates:{...a.value.hiddenStates},timestamp:Date.now(),sourceAction:E.targetSection,context:w,backButtonConfig:D.backButtonConfig};if(a.value.history.push(F),a.value.history.length>a.value.maxHistoryDepth&&(a.value.history.shift(),l("History trimmed to max depth",a.value.maxHistoryDepth)),l("Added to history",F),h(E.hiddenRules,w),a.value.currentContext=E.targetSection,E.parentRowContext&&w?._rowIndex!==void 0){const P=n?.(E.targetSection)?.propsTable?.modelKey,q=`${E.parentRowContext.parentArrayKey}.${E.parentRowContext.childArrayKey}`;!P||P===q||P.startsWith(q+".")?(a.value.parentRowContext={parentArrayKey:E.parentRowContext.parentArrayKey,rowIndex:w._rowIndex,childArrayKey:E.parentRowContext.childArrayKey},l("Parent row context set",a.value.parentRowContext)):l("Parent row context skipped (modelKey mismatch)",{targetModelKey:P,nestedModelKey:q})}else if(!E.parentRowContext&&w?._rowIndex!==void 0&&n){const P=n(E.targetSection)?.propsTable?.modelKey;if(P){for(const q of Object.keys(w))if(!q.startsWith("_")&&P.startsWith(q+".")){const Q=P.slice(q.length+1);a.value.parentRowContext={parentArrayKey:q,rowIndex:w._rowIndex,childArrayKey:Q},l("Auto-detected parent row context",a.value.parentRowContext);break}}}l("Navigation complete",{currentContext:a.value.currentContext,hiddenStates:a.value.hiddenStates})},f=()=>{if(a.value.history.length===0){l("No history available, cannot navigate back");return}const D=a.value.history.pop();if(!D){l("Failed to pop history item");return}l("Navigating back to",D),a.value.hiddenStates={...D.hiddenStates},a.value.parentRowContext=null,a.value.currentContext=D.sectionKey==="root"?null:D.sectionKey,l("Back navigation complete",{currentContext:a.value.currentContext,hiddenStates:a.value.hiddenStates,remainingHistory:a.value.history.length})},h=(D,w)=>{for(const[E,F]of Object.entries(D)){let A;typeof F=="boolean"?A=F:t&&typeof F=="object"?A=!!t(F,w):A=!1,a.value.hiddenStates[E]=A}},p=()=>a.value.history.length===0?null:a.value.history[a.value.history.length-1]?.backButtonConfig||null,g=D=>a.value.hiddenStates[D]||!1,y=r.computed(()=>a.value.history.length>0),b=r.computed(()=>a.value.currentContext),_=r.computed(()=>a.value.history),x=r.computed(()=>({...a.value.hiddenStates})),B=r.computed(()=>a.value.parentRowContext);return{navigationState:a,hasHistory:y,currentContext:b,history:_,hiddenStates:x,parentRowContext:B,navigateTo:d,navigateBack:f,applyHiddenRules:h,getCurrentBackButton:p,isSectionHidden:g,setSectionHidden:(D,w)=>{l(`Setting ${D} hidden state to ${w}`),a.value.hiddenStates[D]=w},clearHistory:()=>{l("Clearing navigation history"),a.value.history=[],a.value.currentContext=null},reset:()=>{l("Resetting navigation state"),a.value.currentContext=null,a.value.history=[],a.value.hiddenStates={...o},a.value.parentRowContext=null},registerNavigationSection:D=>{a.value.navigationEnabled.add(D),l(`Registered navigation section: ${D}`)}}}const wv=e=>!e||typeof e!="object"?!1:e instanceof File||e instanceof Blob||e.constructor?.name==="File"||e.constructor?.name==="Blob"||(typeof e.name=="string"||typeof e.fileName=="string")&&(e.size!==void 0||e.fileSize!==void 0),FY=e=>{const t=new FormData;return Object.entries(e).forEach(([n,o])=>{o!=null&&(Array.isArray(o)?o.forEach(i=>t.append(n,i)):t.append(n,o))}),t};dv();const Y2=e=>{const t=r.toRaw(e);return t&&typeof t=="object"&&t._isLogicValue===!0&&t.value!==void 0?t.value:t};function Z2(e,t){console.log("[useDynamicForm] Initializing with props:",{hasSchema:!!e.schema,baseUrl:e.baseUrl,idTokenCore:e.schema?.idTokenCore,tokenCoresCount:e.tokenCores?.length||0,isEditMode:e.isEditMode});const{t:n,locale:o}=In.useI18n(),i=r.computed(()=>o.value),{apiUrl:s}=r.inject("externalApi"),a=e.router||zs.useRouter();let l=null;try{l=zs.useRoute()}catch{console.warn("useRoute not available inside composition")}const c=CG(),d=r.computed(()=>e.schema||c.internalSchema.value),f=r.computed(()=>{if(typeof e.selectedTokenCore?.address=="string")return e.selectedTokenCore.address;if(typeof e.baseUrl=="string"&&e.baseUrl!=="")return e.baseUrl;if(d.value?.idTokenCore&&Array.isArray(e.tokenCores)){const K=String(d.value.idTokenCore);e.tokenCores.length>0&&console.log("[resolvedBaseUrl] Token List Check:",e.tokenCores.map(se=>({id:se.id,address:se.address})));const W=e.tokenCores.find(se=>String(se.id)===K);if(console.log(`[resolvedBaseUrl] Matching idTokenCore: "${K}" against list of ${e.tokenCores.length} tokens.`),console.log("[resolvedBaseUrl] Found token:",W?{id:W.id,address:W.address}:"NOT FOUND"),W?.address)return W.address}console.log("[resolvedBaseUrl] Final result: undefined. Prop baseUrl:",e.baseUrl,"SelectedToken:",e.selectedTokenCore?.address)}),h=r.computed(()=>e.permissionBase?e.permissionBase:d.value?.code||""),p=(K,W,se)=>{if(W.model){const H=se?`${se}.${W.model}`:W.model,N={field:W,path:H};K.paths.set(H,N);const j=K.models.get(W.model)||[];j.push(N),K.models.set(W.model,j)}},g=(K,W,se)=>{const H=Ot(W);if(H){const N=se?`${se}.${H}`:H,j={field:W,path:N},Y=K.models.get(H)||[];Y.push(j),K.models.set(H,Y)}},y=(K,W)=>{const se=W.modelKey||W.key||W.id,H=Array.isArray(W.sectionsWizard)?W.sectionsWizard:[W.sectionsWizard].filter(Boolean);for(const N of H){const j=Ot(N),Y=j?`${se}.${j}`:se;g(K,N,se);const J=N.fields||N.propsForm?.fields||N.propsFormStep?.fields||[];for(const U of J)p(K,U,Y)}},b=r.computed(()=>{const K={paths:new Map,models:new Map},W=d.value?.sections;if(!W)return K;for(const se of W){if(!se)continue;const H=se.propsForm||se.propsTable||se.props||{},N=H.fields||se.fields||[],j=Ot(se);if(g(K,se),H.modelKey&&H.modelKey!==j){const J=K.models.get(H.modelKey)||[];J.push({field:se,path:H.modelKey}),K.models.set(H.modelKey,J)}for(const J of N)p(K,J);const Y=J=>{if(!J)return;const U=[...J.fieldActionGlobal||[],...J.fieldActionCustom||[]];for(const k of U)p(K,k)};if(H.propsAction&&Y(H.propsAction),Array.isArray(H.propsActions))for(const J of H.propsActions)Y(J);if(Y(H),Y(se),se.type?.toUpperCase()==="WIZARD"&&se.propsWizard?.propsSteps)for(const J of se.propsWizard.propsSteps)y(K,J)}return K}),_=fv({formData:c.formData,errors:c.errors,fieldMap:b,rawItemsCache:c.rawItemsCache,revealedSectionIds:c.revealedSectionIds,activeSchema:d,locale:i,tableRowFormData:c.tableRowFormData,activeTableAction:c.activeTableAction,activeTableKey:c.activeTableKey}),x=(K,W)=>{if(!W||!K?.sections)return W;const se={...W};return K.sections.forEach(H=>{if(H.type==="WIZARD"&&H.propsWizard?.key){const j=H.propsWizard.key,Y=W[j];Array.isArray(Y)&&Y.forEach(J=>{if(!(!J||typeof J!="object"))for(const U in J){const k=J[U];if(se[U]||(se[U]={}),Array.isArray(k))k.forEach(C=>{C&&typeof C=="object"&&Object.assign(se[U],C)});else if(k&&typeof k=="object")for(const C in k){const T=k[C];T&&typeof T=="object"&&(se[U][C]||(se[U][C]={}),Object.assign(se[U][C],T))}}})}const N=Ot(H);N&&W[N]&&typeof W[N]=="object"&&Object.assign(se,W[N])}),se};let B="";r.watch(()=>d.value,K=>{if(!K)return;const W=K.id||K.code||(K.sections?.[0]?.key?`sec-${K.sections[0].key}`:"default");if(!(W!==B)||(B!==""&&(Object.keys(c.formData).forEach(N=>delete c.formData[N]),Object.keys(c.tableRowFormData).forEach(N=>delete c.tableRowFormData[N]),Object.keys(c.errors).forEach(N=>delete c.errors[N]),Object.keys(c.touched).forEach(N=>delete c.touched[N]),c.isSubmitted.value=!1,Object.keys(c.fieldErrors).forEach(N=>delete c.fieldErrors[N]),Object.keys(c.wizardState).forEach(N=>delete c.wizardState[N]),Object.keys(c.inlineState).forEach(N=>delete c.inlineState[N]),c.isSubmitting.value=!1,Object.keys(c.rawItemsCache).forEach(N=>delete c.rawItemsCache[N]),Object.keys(c.revealedSectionIds).forEach(N=>delete c.revealedSectionIds[N]),Object.keys(c.revealedFieldModels).forEach(N=>delete c.revealedFieldModels[N]),Object.keys(c.wizardResponses).forEach(N=>delete c.wizardResponses[N]),Object.keys(c.sectionLoading).forEach(N=>delete c.sectionLoading[N]),Object.keys(c.fieldLoading).forEach(N=>delete c.fieldLoading[N])),B=W,!K.payload))return;const H=x(K,K.payload);Object.entries(H).forEach(([N,j])=>{const Y=c.formData[N];let J=j;Array.isArray(j)&&(J=j.filter(U=>!ec(U)),j.length!==J.length&&console.log(`[SCHEMA-INIT][${N}] Filtered out ${j.length-J.length} empty objects from initial payload.`)),Y==null?c.formData[N]=J:J!=null&&typeof J=="object"&&!Array.isArray(J)&&uv(c.formData[N],J)}),Object.assign(c.originalData,JSON.parse(JSON.stringify(c.formData))),q()},{immediate:!0,deep:!0});const R=O2({formData:c.formData,locale:i,errors:c.errors,fieldMap:b,activeSchema:d,isSectionVisible:_.isSectionVisible,isSectionHidden:_.isSectionHidden,isFieldVisible:_.isFieldVisible,isFieldRequired:_.isFieldRequired,resolveFieldLength:_.resolveFieldLength});r.watch(c.formData,K=>{Object.keys(c.errors).forEach(W=>{const se=b.value.paths.get(W);if(se){const H=We(K,se.path);R.validateField(se.field,H)||delete c.errors[W]}else{const H=We(K,W),j=b.value.models.get(W)?.[0]?.field;j?R.validateField(j,H)||delete c.errors[W]:H!=null&&H!==""&&delete c.errors[W]}})},{deep:!0});const O=LY({initialHiddenStates:(()=>{const K={},W=d.value;return W?.sections&&W.sections.forEach(se=>{const H=Ot(se);H&&se.logic?.visibleRule===!1&&(K[H]=!0)}),K})()},_.evaluateLogic,K=>F(d.value?.sections||[],K)),I=K=>{const W=Ot(K),se=O?.navigationState?.value?.hiddenStates;return se&&W&&typeof se[W]=="boolean"?!se[W]:_.isSectionVisible(K)},D=MG({formData:c.formData,activeSchema:d,isSectionVisible:I,isFieldVisible:_.isFieldVisible,isFieldHidden:_.isFieldHidden,getWizardTabs:_.getWizardTabs,fieldMap:b,rawItemsCache:c.rawItemsCache,navigation:O}),w=RY({state:c,props:e,emit:t,apiUrl:s,router:a,locale:i,mapping:D,validation:R,fieldMap:b,activeSchema:d,resolvedBaseUrl:f,resolveKeyParams:A,navigation:O,logic:_}),E=(K,W,se)=>{const H={},N=W.propsForm||W.propsFormStep||W.propsTable||W.propsTableStep||W.props||{};(N.fields||W.fields||[]).forEach(J=>{const U=J.model||J.props?.model||J.key;if(U){let k=We(K,U)??K[U];if(k!==void 0){const C=J.props||J.propsFieldCustom||J.propsFieldGlobal||{},T=C.returnObject||J.logic?.returnObject,M=C.itemValue;!T&&M&&k!==null&&typeof k=="object"&&!Array.isArray(k)&&(k=k[M]??k),Vt(H,U,k)}}});const Y=Ot(W);if(Y&&K[Y]!==void 0&&H[Y]===void 0&&Vt(H,Y,K[Y]),W.type==="TABLE"||W.propsTable){const J=N.modelKey||N.modelDatatable;if(J&&K[J]!==void 0&&H[J]===void 0)H[J]=K[J];else if(J&&J.includes(".")&&H[J]===void 0){const U=J.indexOf("."),k=J.substring(0,U),C=J.substring(U+1),T=K[k];if(Array.isArray(T)){const M=[];for(const $ of T){const ne=C.includes(".")?We($,C):$?.[C];Array.isArray(ne)&&M.push(...ne)}M.length>0&&(H[J]=M)}}}if(se){const J={};return Vt(J,se,H),J}return H},F=(K,W)=>{if(!K)return null;for(const se of K){const H=Ot(se);if(H===W||W.endsWith(`.${H}`))return se;if(se.type==="WIZARD"&&se.propsWizard?.propsSteps){for(const N of se.propsWizard.propsSteps)if(N.sectionsWizard){const j=Array.isArray(N.sectionsWizard)?N.sectionsWizard:[N.sectionsWizard],Y=F(j,W);if(Y)return Y}}}return null};function A(K,W,se,H){const N={};return!Array.isArray(K)||K.length===0||(K.forEach(j=>{const Y=k=>typeof k=="string"&&k.trim()!==""&&!isNaN(Number(k))?k.length>1&&k.startsWith("0")&&!k.startsWith("0.")||k.length>15&&/^\d+$/.test(k)?k:Number(k):k,J=k=>{if(k.startsWith("$value(")){const C=k.match(/\$value\(([^)]+)\)/);let T=C?C[1]:k.replace("$value(","").replace(")","");return(T.startsWith("'")&&T.endsWith("'")||T.startsWith('"')&&T.endsWith('"'))&&(T=T.slice(1,-1)),T}if(k.startsWith("$route.")){const C=k.replace("$route.","");if(e.apiParams&&e.apiParams[C]!==void 0&&e.apiParams[C]!==null)return e.apiParams[C];const T=a?.currentRoute?.value||l;return T?T.params?.[C]:void 0}if(k.startsWith("$query.")){const C=k.replace("$query.","");if(e.apiParams&&e.apiParams[C]!==void 0&&e.apiParams[C]!==null)return e.apiParams[C];if(typeof window<"u"){const M=new URLSearchParams(window.location.search);if(M.has(C))return M.get(C)}return(a?.currentRoute?.value||l)?.query?.[C]}if(k.startsWith("$value.")){const C=k.replace("$value.","");return We(H,C)}},U=k=>{if(k.startsWith("$"))return J(k);const C=k.replace(/^formData\./,"");let T=H?We(H,C):void 0;if(T===void 0&&c.tableRowFormData){const M=Object.keys(c.tableRowFormData);T=We(c.tableRowFormData,C),T!==void 0?console.log(`[resolveKeyParams] Found in state.tableRowFormData '${C}':`,T):console.log(`[resolveKeyParams] NOT found in state.tableRowFormData '${C}'. Available keys:`,M)}if(T===void 0?(T=_.getNormalizedData(c.formData,W)._resolveLogicVar?.(C),console.log(`[resolveKeyParams] Smart Resolved '${C}':`,T)):console.log(`[resolveKeyParams] Resolved '${C}':`,T),T==null&&se&&se.key===k&&(T=We(H||c.formData,se.model)),T===void 0){const $=(a?.currentRoute?.value||l)?.query?.[C];$!=null&&$!==""&&(T=$,console.log(`[resolveKeyParams] Query Fallback Resolved '${C}':`,T))}if(T===void 0){const $=(a?.currentRoute?.value||l)?.params?.[C];$!=null&&$!==""&&(T=$,console.log(`[resolveKeyParams] Route Param Fallback Resolved '${C}':`,T))}if(T===void 0&&C.toLowerCase()==="id"){const $=(a?.currentRoute?.value||l)?.params?.id;$&&(T=$,console.log(`[resolveKeyParams] Route ID Fallback Resolved '${C}':`,T))}return T};if(typeof j=="string"){let k=U(j);if(k!=null&&k!==""){k=Y2(k),typeof k=="object"&&!Array.isArray(k)&&!(k instanceof Date)&&!wv(k)&&(k=k.id??k.value??k.code??k);const C=j.startsWith("$")&&j.split(".").pop()||j;N[C]=Y(k)}}else typeof j=="object"&&j!==null&&Object.entries(j).forEach(([k,C])=>{let M=U(C);if((M==null||M==="")&&(e.apiParams&&e.apiParams[k]!==void 0&&e.apiParams[k]!==null&&(M=e.apiParams[k],console.log(`[resolveKeyParams] Fallback resolved '${k}' from apiParams:`,M)),M==null||M==="")){if(typeof window<"u"){const $=new URLSearchParams(window.location.search);$.has(k)&&(M=$.get(k))}if(M===void 0){const $=a?.currentRoute?.value||l;M=$?.query?.[k]||$?.params?.[k]}M!=null&&M!==""&&console.log(`[resolveKeyParams] Fallback resolved '${k}' from URL query/route matching apiKey:`,M)}if((M==null||M==="")&&k.toLowerCase()==="id"){const ne=(a?.currentRoute?.value||l)?.params?.id;ne&&(M=ne,console.log(`[resolveKeyParams] Fallback resolved '${k}' from route ID:`,M))}M!=null&&M!==""&&(M=Y2(M),typeof M=="object"&&!Array.isArray(M)&&!(M instanceof Date)&&!wv(M)&&(M=M.id??M.value??M.code??M),N[k]=Y(M))})}),Object.keys(N).length>0&&console.log(`[resolveKeyParams][DEBUG] Resolved params for ${W||"root"}:`,N)),N}const P=async(K,W=!1,se,H)=>{const N=K.props||{},j=N.endpointReference||N.endpoint||N.endpointComponent;if(!j?.apiUrl)return;const Y=K.component||"";if(!["DCodeWorkflowDiagram","DCodeStaticImage","DCodeTimelineWithIcons"].includes(Y)&&!(!W&&c.rawItemsCache[K.key]))try{const U=Oi(j.apiUrl,f.value);console.log(`[prefetchFieldItems][DEBUG] Field: ${K.model}, BaseURL: ${f.value}, Final URL: ${U}`);let k={page:1,perPage:100};if(Array.isArray(j.keyParam)&&Object.assign(k,A(j.keyParam,se,K,H)),Array.isArray(j.keyParam)&&j.keyParam.length>0){const ne=A(j.keyParam,se,K,H);if(Object.keys(ne).length===0){console.log(`[prefetchFieldItems][SKIPPED] Field "${K.model}" has unresolved dependencies (keyParam). Skipping fetch until parent is selected.`);return}}console.log(`[prefetchFieldItems] Executing request for ${K.key} with params:`,k);const C={...j.config||{}};j.accept&&(C.headers||(C.headers={}),C.headers.Accept=j.accept,C.headers.accept=j.accept);const T=await s(U,j.apiMethod||"GET",k,C),M=T?.data!==void 0?T.data:T;let $=[];Array.isArray(M)?$=M:M&&($=[M]),c.rawItemsCache[K.key]=$}catch(U){console.error(`[prefetchFieldItems] Error fetching items for ${K.key}:`,U),c.rawItemsCache[K.key]=[]}};function q(){if(e.isEditMode&&d.value?.sections){const K=[],W=se=>{se.forEach(H=>{H&&(K.push(H),H.type?.toUpperCase()==="WIZARD"&&H.propsWizard?.propsSteps&&H.propsWizard.propsSteps.forEach(N=>{const j=Array.isArray(N.sectionsWizard)?N.sectionsWizard:[N.sectionsWizard].filter(Boolean);W(j)}))})};W(d.value.sections),K.forEach(se=>{const H=Ot(se);if(!H)return;const N=se.propsForm||se.propsFormStep||se.propsTable||se.propsTableStep||se.props||{},j=(se.logic||N.logic)?.visibleRule;if(j!=null)return;(N.fields||se.fields||[]).some(U=>{if(!U.model)return!1;const C=b.value.models.get(U.model)?.[0]?.path||U.model,T=We(c.formData,C);return T!=null&&T!==""})&&(c.revealedSectionIds[H]=!0)})}}const Q=async(K=!1)=>{const W=d.value?.endpointAction||d.value?.endpointPropAction;if(W?.apiUrl&&!(!e.isEditMode&&!K)){console.log(`[fetchFormData][GLOBAL] Triggered for schema: ${d.value?.code}`),c.isSubmitting.value=!0;try{const se=Oi(W.apiUrl,f.value),H=A(W.keyParam||[]);if(e.isEditMode&&(W.apiMethod||"GET").toUpperCase()==="GET"&&!Object.keys(H).some(U=>U.toLowerCase()==="id"||U.toLowerCase().endsWith("id"))){const U=a?.currentRoute?.value?.params?.id||l?.params?.id;U&&(H.id=U)}console.log("[fetchFormData][GLOBAL] Executing request with params:",H);const N={...W.config||{}};W.accept&&(N.headers||(N.headers={}),N.headers.Accept=W.accept,N.headers.accept=W.accept);const j=await s(se,W.apiMethod||"GET",H,N);if(j?.status===!0||j?.success===!0||j?.code===200||j?.code==="00"||j?.status==="SUCCESS"){const J=j?.data!==void 0?j.data:j;if(Array.isArray(J)){const U=d.value?.sections?.find(C=>C.type==="TABLE"||!!C.propsTable||!!C.isDataTable),k=U?Ot(U):null;k?Vt(c.formData,k,J):Object.assign(c.formData,J[0]||{})}else J&&typeof J=="object"&&(Object.assign(c.formData,J),d.value?.sections?.forEach(U=>{const k=Ot(U);k&&J[k]!==void 0&&Vt(c.formData,k,J[k])}));Object.assign(c.originalData,JSON.parse(JSON.stringify(c.formData))),q()}}catch(se){console.error("[fetchFormData] Error fetching initial data:",se)}finally{c.isSubmitting.value=!1}}},re=async(K,W,se,H)=>{const N=W.endpoint;if(N?.apiUrl){if(c.fieldLoading[K.model]){console.log(`[triggerFetchRule][SKIPPED] Rule for ${K.model} is already in progress.`);return}if(e.dummyMode){Rt.info(`Simulasi Fetch Rule (${K.model})`,{autoClose:2e3}),c.formData[`_fetchStatus_${K.model}`]=!0,Array.isArray(W.revealSections)&&W.revealSections.forEach(j=>{c.revealedSectionIds[j]=!0}),Array.isArray(W.revealFields)&&W.revealFields.forEach(j=>{c.revealedFieldModels[j]=!0});return}try{c.fieldLoading[K.model]=!0;const j=Oi(N.apiUrl,f.value),Y=A(N.keyParam||[],se,K,H);if(N.keyParam&&N.keyParam.length>0&&Object.keys(Y).length===0){console.warn(`[triggerFetchRule][CANCELLED] Missing required dependencies for ${K.model}. Params resolved:`,Y),D.handleClearMapping(W.mapping||{},se),c.formData[`_fetchStatus_${K.model}`]=!1,Array.isArray(W.revealSections)&&W.revealSections.forEach(M=>{c.revealedSectionIds[M]=!1}),Array.isArray(W.revealFields)&&W.revealFields.forEach(M=>{c.revealedFieldModels[M]=!1});return}const J={...N.config,disableGlobalLoading:!0};N.accept&&(J.headers||(J.headers={}),J.headers.Accept=N.accept,J.headers.accept=N.accept),j.includes("/api/auto-layout")&&(J.isAutoLayout=!0);const U=Object.values(Y).some(M=>wv(M));let k=Y;U&&(N.apiMethod||"POST").toUpperCase()!=="GET"&&(k=FY(Y),J.headers&&(delete J.headers["Content-Type"],delete J.headers["content-type"])),console.log(`[triggerFetchRule] Executing request for ${K.key}. Method: ${N.apiMethod||"GET"}, Has File: ${U}`,Y,"Config:",J);const C=await s(j,N.apiMethod||"GET",k,J);if(C?.status===!0||C?.success===!0||C?.code===200||C?.code==="00"||C?.status==="SUCCESS"){const M=se?.includes(".")?se.split(".").slice(0,-1).join("."):void 0;D.handleResponseMapping(C,W.mapping||{},M),c.formData[`_fetchStatus_${K.model}`]=!0;const $=C?.data!==void 0?C.data:C;$&&typeof $=="object"&&Array.isArray($)===!1&&d.value?.sections?.forEach(ne=>{const te=Ot(ne);te&&$[te]!==void 0&&Vt(c.formData,te,$[te])}),Array.isArray(W.revealSections)&&W.revealSections.forEach(ne=>{c.revealedSectionIds[ne]=!0}),Array.isArray(W.revealFields)&&W.revealFields.forEach(ne=>{c.revealedFieldModels[ne]=!0})}else{const M=W.dialog||{},$=M.type==="ALERT";c.confirmDialog.title=i.value==="id"?M.titleID||"Perhatian":M.titleEN||"Attention",c.confirmDialog.message=C?.message||(i.value==="id"?"Data sudah ada atau sedang diproses.":"Data already exists or is being processed."),c.confirmDialog.showCancel=!$&&M.showCancel!==!1,c.confirmDialog.isBlocking=M.isBlocking===!0,c.confirmDialog.redirectUrl=M.redirectUrl||"",c.confirmDialog.okText=i.value==="id"?M.okTextID||M.okText:M.okTextEN||M.okText,c.confirmDialog.cancelText=i.value==="id"?M.cancelTextID||M.cancelText:M.cancelTextEN||M.cancelText,c.confirmDialog.action={callback:()=>{}},c.confirmDialog.visible=!0}}catch(j){console.error(`[triggerFetchRule] Error for ${K.model}:`,j)}finally{c.fieldLoading[K.model]=!1}}},ie=async(K,W,se)=>{const H=W||F(d.value?.sections||[],K);if(!H){console.warn(`[fetchSectionData] Section not found for key: ${K}`);return}const N=H.propsForm||H.propsFormStep||H.propsTable||H.propsTableStep||H.props||{},j=N.endpointSection||N.endpointForm||N.endpointTable||N.endpoint;if(!j?.apiUrl)return;if(console.log(`[fetchSectionData][CHECK] Request for "${K}". Loading state:`,c.sectionLoading[K]),c.sectionLoading[K]){console.warn(`[fetchSectionData][CANCELLED] Request for "${K}" blocked because it is already loading.`);return}if(e.dummyMode)return;const Y=se;c.sectionLoading[K]=!0,H.key&&(c.sectionLoading[H.key]=!0);try{const J=j.keyParam||[],U=j.byPassMode===!0||Array.isArray(J)&&J.includes("$bypassMode"),k=H.type==="TABLE"||!!H.propsTable||!!H.propsTableStep,C=(j.apiMethod||"GET").toUpperCase()==="GET";if(!k&&!e.isEditMode&&C&&!U){console.log(`[fetchSectionData][SKIPPED] Section "${K}" skipped: isEditMode=false and not a TABLE section. No GET in create mode.`),c.sectionLoading[K]=!1,H.key&&(c.sectionLoading[H.key]=!1);return}const T=Oi(j.apiUrl,f.value),M=A(J,Y);if((j.apiMethod||"GET").toUpperCase()==="GET"&&!Object.keys(M).some(fe=>fe.toLowerCase()==="id"||fe.toLowerCase().endsWith("id"))){const fe=a?.currentRoute?.value?.params?.id||l?.params?.id||a?.currentRoute?.value?.query?.id||l?.query?.id||(typeof window<"u"?new URLSearchParams(window.location.search).get("id"):null);fe&&(M.id=fe)}if(k){if(!c.sectionPagination[K]){const _e=H.propsTable||H.propsTableStep||{},fe=NG(K,j.apiUrl);c.sectionPagination[K]={page:fe?.page?Number(fe.page):1,perPage:fe?.perPage?Number(fe.perPage):_e.perPage||10,filters:fe?.filters||void 0,totalData:0,maxPage:1}}M.page=c.sectionPagination[K].page,M.perPage=c.sectionPagination[K].perPage}const $=c.sectionPagination[K]?.filters;$&&Object.keys($).forEach(_e=>{const fe=$[_e];fe!=null&&fe!==""&&(M[_e]=fe)});const ne=U?J.filter(_e=>!(typeof _e=="string"&&_e==="$bypassMode")):J;if(!(Array.isArray(ne)&&ne.length===0)&&j.keyParam&&j.keyParam.length>0&&Object.keys(M).length===0){console.warn(`[fetchSectionData][CANCELLED] Missing required dependencies for section ${K}. Skipping fetch.`);return}const ce={...j.config};j.accept&&(ce.headers||(ce.headers={}),ce.headers.Accept=j.accept,ce.headers.accept=j.accept),T.includes("/api/auto-layout")&&(ce.isAutoLayout=!0),console.log(`[fetchSectionData] Executing request for ${K} with params:`,M);const ke=await s(T,j.apiMethod||"GET",M,ce);if(ke?.status===!0||ke?.success===!0||ke?.code===200||ke?.code==="00"||ke?.status==="SUCCESS"){if(k&&(c.sectionPagination[K]||(c.sectionPagination[K]={page:1,perPage:10}),c.sectionPagination[K].totalData=ke?.totalData??ke?.total??ke?.count??0,c.sectionPagination[K].maxPage=ke?.maxPage??1,c.sectionPagination[K].perPage=ke?.perPage??c.sectionPagination[K].perPage,I2(K,j.apiUrl,c.sectionPagination[K])),j.mapping&&Object.keys(j.mapping).length>0)D.handleResponseMapping(ke,j.mapping,Y);else{const _e=ke?.data||ke?.payload||ke,fe=Array.isArray(_e)&&!k?_e[0]:_e;if(fe&&(typeof fe=="object"||Array.isArray(fe))){const de=E(fe,H,Y);if(k&&Array.isArray(fe)){const Oe=H.propsTable||H.propsTableStep||{},Fe=Oe.modelKey||Oe.modelDatatable||Ot(H);Fe&&(de[Fe]=fe)}const Z=(Oe,Fe)=>{if(!Oe)return{siblings:[],stepKey:null};const Ue=Ot(Fe);for(const Qe of Oe)if(Qe.type==="WIZARD"&&Qe.propsWizard?.propsSteps)for(const Ve of Qe.propsWizard.propsSteps){const Xe=Array.isArray(Ve.sectionsWizard)?Ve.sectionsWizard:Ve.sectionsWizard?[Ve.sectionsWizard]:[];if(Xe.some(Pe=>Ot(Pe)===Ue))return{siblings:Xe,stepKey:Ve.modelKey||Ve.key||Ve.id||null};const Ce=Z(Xe,Fe);if(Ce.siblings.length>0)return Ce}return{siblings:[],stepKey:null}},ee=Z(d.value?.sections||[],H),pe=ee.siblings,Be=ee.stepKey;(pe.length>0?pe:d.value?.sections||[]).forEach(Oe=>{if(Ot(Oe)===Ot(H))return;const Fe=Oe.propsForm||Oe.propsFormStep||Oe.propsTable||Oe.propsTableStep||Oe.props||{},Ue=!!(Fe.endpointSection?.apiUrl||Fe.endpointForm?.apiUrl||Fe.endpointTable?.apiUrl||Fe.endpoint?.apiUrl),Qe=Ot(Oe);let Ve="";if(Be)Ve=Be;else if(Y){const he=Y.lastIndexOf(".");Ve=he!==-1?Y.substring(0,he):""}if(Qe&&fe[Qe]!==void 0){const he=Ve?`${Ve}.${Qe}`:Qe;We(de,he)===void 0&&(console.log(`[fetchSectionData][CASCADE] SUCCESS: Direct key match for section "${Qe}" -> path "${he}". Value:`,fe[Qe]),Vt(de,he,fe[Qe]))}const Xe=Fe.modelKey||Fe.modelDatatable;if(Xe&&(Oe.type==="TABLE"||Oe.propsTable)){const he=Ve?`${Ve}.${Xe}`:Xe;if(!Xe.includes("."))fe[Xe]!==void 0&&We(de,he)===void 0&&(console.log(`[fetchSectionData][CASCADE] SUCCESS: modelKey match for section "${Qe}" -> "${Xe}".`),Vt(de,he,fe[Xe]));else{const Ce=Xe.indexOf("."),Pe=Xe.substring(0,Ce),qe=Xe.substring(Ce+1),Se=fe[Pe];if(Array.isArray(Se)&&We(de,he)===void 0){const Ie=[];for(const Je of Se){const wt=qe.includes(".")?We(Je,qe):Je?.[qe];Array.isArray(wt)&&Ie.push(...wt)}Ie.length>0&&(console.log(`[fetchSectionData][CASCADE] SUCCESS: dotted modelKey match for section "${Qe}" -> "${Xe}" (${Ie.length} rows).`),Vt(de,he,Ie))}}}if(!Ue){const he=E(fe,Oe);Object.keys(he).forEach(Ce=>{const Pe=Ve?Qe?`${Ve}.${Qe}`:Ve:void 0,qe=Pe?`${Pe}.${Ce}`:Ce;We(de,qe)===void 0&&(console.log(`[fetchSectionData][CASCADE] Field "${Ce}" cascaded from section "${Ot(H)}" → "${Qe||Oe.type}" under context "${Ve||"root"}"`),Vt(de,qe,he[Ce]))})}}),uv(c.formData,de)}}Object.assign(c.originalData,JSON.parse(JSON.stringify(c.formData))),q()}}catch(J){console.error(`[fetchSectionData] Error for section ${K}:`,J)}finally{c.sectionLoading[K]=!1,H.key&&(c.sectionLoading[H.key]=!1)}},le=IY({formData:c.formData,emit:t,mapping:D,validation:R,locale:i,logic:_,state:c,activeSchema:d,prefetchFieldItems:P,triggerFetchRule:re,navigation:O});OY({state:c,props:e,emit:t,logic:_,mapping:D,fieldMap:b,activeSchema:d,prefetchFieldItems:P,triggerFetchRule:re,fetchSectionData:ie,router:a}),r.watch(()=>({...c.wizardState}),(K,W)=>{Object.entries(K).forEach(([se,H])=>{if(W?.[se]!==H){const N=d.value?.sections?.find(j=>Ot(j)===se);if(N){const j=N.propsWizard?.propsSteps?.[H];if(j){const Y=j.key||j.id;t("step-change",Y)}}}})},{deep:!0,immediate:!0});const X=r.computed(()=>{const K={},W=d.value;return W?.sections&&W.sections.forEach(se=>{(se.propsForm?.fields||se.propsTable?.fields||se.props?.fields||[]).forEach(N=>{if(N.component==="DCodeRadioCustom"){const j=N.props?.name||"default-group";K[j]||(K[j]=[]);let Y=N.props?.endpoint?.apiUrl||N.props?.apiUrl;Y=Oi(Y,f.value),K[j].push({key:N.key,value:N.props?.value,label:N.props?.labelID||N.props?.labelEN||N.key,model:N.model||N.key,apiUrl:Y,apiMethod:N.props?.endpoint?.apiMethod||N.props?.apiMethod,icon:N.props?.icon,name:j})}})}),K});return r.onMounted(()=>{const K=Object.keys(c.formData).some(W=>{const se=c.formData[W];return Array.isArray(se)||se&&typeof se=="object"?!1:se!=null&&se!==""});e.isEditMode&&!K&&(console.log(`[useDynamicForm][onMounted] Edit Mode and empty formData. Fetching root-level form data for schema: ${d.value?.code}`),Q())}),{t:n,locale:i,i18nLocale:o,apiUrl:s,router:a,isSubmitting:c.isSubmitting,internalSchema:c.internalSchema,activeSchema:d,resolvedBaseUrl:f,permissionBase:h,checkPermission:e.checkPermission,userPermissions:e.userPermissions,selectedTokenCore:e.selectedTokenCore,radioGroups:X,confirmDialog:c.confirmDialog,fieldMap:b,rawItemsCache:c.rawItemsCache,revision:c.revision,formData:c.formData,originalData:c.originalData,errors:c.errors,touched:c.touched,isSubmitted:c.isSubmitted,fieldErrors:c.fieldErrors,inlineState:c.inlineState,wizardState:c.wizardState,wizardResponses:c.wizardResponses,sectionLoading:c.sectionLoading,fieldLoading:c.fieldLoading,sectionPagination:c.sectionPagination,validation:R,getSectionKey:Ot,sortedFields:BG,prefetchFieldItems:P,fetchFormData:Q,fetchSectionData:ie,getDeepValue:We,setDeepValue:Vt,..._,...D,...w,...le,resolveKeyParams:A,navigation:O}}const kv=r.defineComponent({__name:"Badge",props:{variant:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e;return(n,o)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(r.unref(_n)(r.unref($Y)({variant:e.variant}),t.class))},[r.renderSlot(n.$slots,"default")],2))}}),$Y=Rm("inline-flex gap-1 items-center rounded-full border px-2.5 py-0.5 text-xs font-medium transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}}),_f=r.defineComponent({__name:"Card",props:{class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e;return(n,o)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(r.unref(_n)("rounded-xl border bg-card text-card-foreground shadow",t.class))},[r.renderSlot(n.$slots,"default")],2))}}),xf=r.defineComponent({__name:"CardContent",props:{class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e;return(n,o)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(r.unref(_n)("p-6 pt-0",t.class))},[r.renderSlot(n.$slots,"default")],2))}}),Ef=r.defineComponent({__name:"CardHeader",props:{class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e;return(n,o)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(r.unref(_n)("flex flex-col gap-y-1.5 p-6",t.class))},[r.renderSlot(n.$slots,"default")],2))}}),Cf=r.defineComponent({__name:"CardTitle",props:{class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e;return(n,o)=>(r.openBlock(),r.createElementBlock("h3",{class:r.normalizeClass(r.unref(_n)("font-medium leading-none tracking-tight",t.class))},[r.renderSlot(n.$slots,"default")],2))}}),zY={key:0,class:"ml-1 text-destructive"},jY={key:0,class:"mb-4 space-y-2"},UY={class:"flex items-center justify-between"},WY={class:"p-4 rounded-lg border border-slate-200 dark:border-neutral-700 bg-gradient-to-br from-blue-50 to-indigo-50 dark:from-blue-950/20 dark:to-indigo-950/20 space-y-3"},HY={class:"flex items-start gap-3"},qY={class:"p-2 rounded-lg bg-white dark:bg-neutral-800 shadow-sm"},KY={class:"flex-1"},GY={class:"text-sm font-semibold text-slate-800 dark:text-neutral-200"},YY={class:"text-xs text-slate-600 dark:text-neutral-400 mt-1"},ZY={class:"flex items-center gap-2"},XY={class:"h-full w-full p-6 flex flex-col items-center justify-center text-center gap-2"},JY={class:"flex flex-wrap items-center justify-center gap-2"},QY=["accept","multiple"],Gp=Sn(r.defineComponent({name:"DCodeDropzone",__name:"DCodeDropzone",props:{label:{default:"Upload File"},hint:{default:"Drag & drop file di sini atau klik area ini"},accept:{default:"*/*"},maxSizeMb:{default:2},mode:{default:"single"},disabled:{type:Boolean,default:!1},showSelected:{type:Boolean,default:!0},required:{type:Boolean,default:!1},error:{default:null},template:{default:null}},emits:["picked","picked:multiple","error"],setup(e,{emit:t}){const n=e,o=t,i=r.ref(null),s=r.ref(!1),a=r.ref(null),l=r.ref(null),c=r.ref(null);r.computed(()=>n.accept||"file/*");const d=r.computed(()=>n.error??a.value);function f(){n.disabled||i.value?.click()}function h(A){const P=A/1024,q=P/1024;return q>=1?`${q.toFixed(2)} MB`:P>=1?`${P.toFixed(1)} KB`:`${A} B`}function p(A){if(!A)return"File tidak valid";if(n.accept?.includes("image/")&&!A.type.startsWith("image/"))return"Hanya file gambar yang diizinkan";const P=(n.maxSizeMb??2)*1024*1024;return A.size>P?`Ukuran file terlalu besar. Maks ${n.maxSizeMb}MB`:null}function g(A){l.value=A.name,c.value=A.size}function y(A){if(a.value=null,!A.length)return;if(n.mode==="single"){const q=A[0],Q=p(q);if(Q){a.value=Q,o("error",Q);return}n.showSelected&&g(q),o("picked",q);return}const P=[];for(const q of A){const Q=p(q);if(Q){a.value=Q,o("error",Q);return}P.push(q)}P.length&&(n.showSelected&&g(P[0]),o("picked:multiple",P))}function b(A){const P=A.target,q=Array.from(P.files??[]);y(q),P.value=""}function _(){n.disabled||(s.value=!0)}function x(){n.disabled||(s.value=!0)}function B(){s.value=!1}function R(A){if(n.disabled)return;s.value=!1;const P=Array.from(A.dataTransfer?.files??[]),q=n.accept?.includes("image/")?P.filter(Q=>Q.type.startsWith("image/")):P;y(q)}const S=r.computed(()=>(n.accept||"file/*").split(",").map(A=>A.trim()).filter(Boolean).map(A=>A==="image/*"?"IMAGE":A.replace(/^image\//,"").replace(/^\./,"")).join(", "));r.computed(()=>`${n.maxSizeMb??0}MB`);const O=r.ref(!1),I=r.computed(()=>{if(n.disabled||!O.value)return{};const A=document.documentElement.classList.contains("dark")||document.body.classList.contains("dark");return{borderColor:A?"hsl(var(--primary) / 0.5)":"hsl(var(--primary) / 0.6)",backgroundColor:A?"hsl(var(--primary) / 0.1)":"hsl(var(--primary) / 0.05)"}}),{locale:D}=In.useI18n(),{apiUrl:w}=r.inject("externalApi")||{},E=r.computed(()=>n.template?N2({template:n.template,locale:D,apiUrl:w}):null),F=r.computed(()=>{if(!E.value)return null;const A=E.value.resolvedIcon.value;return Yt[A]||Yt.Download});return(A,P)=>(r.openBlock(),r.createBlock(r.unref(_f),{class:r.normalizeClass([e.disabled?"opacity-60":"","dark:bg-neutral-800 dark:border-neutral-700/50"])},{default:r.withCtx(()=>[r.createVNode(r.unref(Ef),{class:"pb-2"},{default:r.withCtx(()=>[r.createVNode(r.unref(Cf),{class:"text-sm font-semibold dark:text-neutral-100"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(e.label)+" ",1),e.required?(r.openBlock(),r.createElementBlock("span",zY,"*")):r.createCommentVNode("",!0)]),_:1})]),_:1}),r.createVNode(r.unref(xf),{class:"pt-2"},{default:r.withCtx(()=>[E.value&&E.value.hasTemplate?(r.openBlock(),r.createElementBlock("div",jY,[r.createElementVNode("div",UY,[r.createElementVNode("button",{type:"button",onClick:P[0]||(P[0]=q=>E.value.toggleExpanded()),class:"text-xs font-medium text-slate-600 dark:text-slate-400 hover:text-primary-600 dark:hover:text-primary-400 transition-colors flex items-center gap-1"},[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(E.value.isExpanded?Yt.ChevronDown:Yt.ChevronRight),{class:"w-3 h-3"})),r.createTextVNode(" "+r.toDisplayString(E.value.toggleButtonText),1)])]),r.withDirectives(r.createElementVNode("div",WY,[r.createElementVNode("div",HY,[r.createElementVNode("div",qY,[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(F.value),{class:"w-5 h-5 text-primary-600 dark:text-primary-400"}))]),r.createElementVNode("div",KY,[r.createElementVNode("h4",GY,r.toDisplayString(E.value.resolvedTitle),1),r.createElementVNode("p",YY,r.toDisplayString(E.value.resolvedDescription),1)])]),r.createElementVNode("div",ZY,[E.value.downloadError?(r.openBlock(),r.createBlock(r.unref(Bi),{key:1,type:"button",size:"sm",variant:"destructive",disabled:E.value.isDownloading||e.disabled,onClick:P[2]||(P[2]=q=>E.value.downloadTemplate()),class:"text-xs"},{default:r.withCtx(()=>[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(Yt.RotateCw),{class:"w-3.5 h-3.5 mr-1.5"})),r.createTextVNode(" "+r.toDisplayString(E.value.retryButtonText),1)]),_:1},8,["disabled"])):(r.openBlock(),r.createBlock(r.unref(Bi),{key:0,type:"button",size:"sm",disabled:E.value.isDownloading||e.disabled,onClick:P[1]||(P[1]=q=>E.value.downloadTemplate()),class:"text-xs"},{default:r.withCtx(()=>[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(E.value.isDownloading?Yt.Loader2:Yt.Download),{class:r.normalizeClass(["w-3.5 h-3.5 mr-1.5",E.value.isDownloading?"animate-spin":""])},null,8,["class"])),r.createTextVNode(" "+r.toDisplayString(E.value.resolvedLabel),1)]),_:1},8,["disabled"])),E.value.downloadError?(r.openBlock(),r.createBlock(r.unref(Bi),{key:2,type:"button",size:"sm",variant:"ghost",onClick:P[3]||(P[3]=q=>E.value.clearError()),class:"text-xs"},{default:r.withCtx(()=>[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(Yt.X),{class:"w-3.5 h-3.5"}))]),_:1})):r.createCommentVNode("",!0)]),E.value.downloadError?(r.openBlock(),r.createBlock(r.unref(gf),{key:0,variant:"destructive",class:"text-xs py-2"},{default:r.withCtx(()=>[r.createVNode(r.unref(bf),null,{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(E.value.downloadError),1)]),_:1})]),_:1})):r.createCommentVNode("",!0)],512),[[r.vShow,E.value.isExpanded]])])):r.createCommentVNode("",!0),r.createElementVNode("div",{class:r.normalizeClass(["d-dropzone-area flex justify-center items-center rounded-xl border-2 border-dashed transition cursor-pointer select-none",[s.value?"is-dragging border-primary bg-primary/10 dark:bg-primary/20 -translate-y-[1px]":"border-border dark:border-neutral-700 bg-muted/30 dark:bg-neutral-800/50",e.disabled?"is-disabled":""]]),style:r.normalizeStyle([{minHeight:"190px"},I.value]),onClick:f,onDragenter:r.withModifiers(_,["prevent"]),onDragover:r.withModifiers(x,["prevent"]),onDragleave:r.withModifiers(B,["prevent"]),onDrop:r.withModifiers(R,["prevent"]),onMouseenter:P[4]||(P[4]=q=>O.value=!0),onMouseleave:P[5]||(P[5]=q=>O.value=!1)},[r.createElementVNode("div",XY,[P[6]||(P[6]=r.createElementVNode("div",{class:"text-sm font-medium dark:text-neutral-200"},"Drag & drop file di sini",-1)),P[7]||(P[7]=r.createElementVNode("div",{class:"text-xs text-muted-foreground dark:text-neutral-400"},"atau klik area ini untuk memilih file",-1)),r.createElementVNode("div",JY,[r.createVNode(r.unref(kv),{variant:"secondary",class:"text-[11px] dark:bg-neutral-800 dark:text-neutral-300"},{default:r.withCtx(()=>[r.createTextVNode(" Allowed: "+r.toDisplayString(S.value),1)]),_:1}),r.createVNode(r.unref(kv),{variant:"secondary",class:"text-[11px] dark:bg-neutral-800 dark:text-neutral-300"},{default:r.withCtx(()=>[r.createTextVNode(" Max: "+r.toDisplayString(n.maxSizeMb)+"MB ",1)]),_:1})]),e.showSelected&&l.value?(r.openBlock(),r.createBlock(r.unref(kv),{key:0,variant:"secondary",class:"mt-2 dark:bg-neutral-800 dark:text-neutral-300"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(l.value)+" • "+r.toDisplayString(c.value?h(c.value):""),1)]),_:1})):r.createCommentVNode("",!0)]),r.createElementVNode("input",{ref_key:"fileInputEl",ref:i,type:"file",class:"hidden",accept:e.accept,multiple:e.mode==="multiple",onChange:b},null,40,QY)],38),d.value?(r.openBlock(),r.createBlock(r.unref(gf),{key:1,variant:"destructive",class:"mt-3"},{default:r.withCtx(()=>[r.createVNode(r.unref(bf),{class:"text-sm"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(d.value),1)]),_:1})]),_:1})):r.createCommentVNode("",!0)]),_:1})]),_:1},8,["class"]))}}),[["__scopeId","data-v-a9e3de25"]]),VY={key:0,class:"fixed inset-0 z-50 flex items-center justify-center p-4 sm:p-6"},eZ={class:"flex items-center justify-between border-b dark:border-neutral-700/50 px-6 py-4"},tZ={class:"relative overflow-auto p-0"},_v=r.defineComponent({name:"DCodeImageCropperDialog",inheritAttrs:!1,__name:"DCodeImageCropperDialog",props:{modelValue:{type:Boolean},file:{},title:{default:"Resize & Crop Gambar"},description:{default:""},aspectRatio:{default:null},outputWidth:{default:null},outputHeight:{default:null},quality:{default:.92},autoOpenEditor:{type:Boolean,default:!1}},emits:["update:modelValue","done","cancel"],setup(e,{emit:t}){const n=e,o=t,i=r.computed({get:()=>n.modelValue,set:R=>o("update:modelValue",R)}),s=r.ref(null),a=r.ref(null);let l=null,c=!1,d=0,f=null;function h(){if(l){try{l.close()}catch{}l=null,f&&(f.disconnect(),f=null),s.value&&(s.value.innerHTML=""),a.value=null}}async function p(R,S,O,I,D){const w=await new Promise((A,P)=>{const q=URL.createObjectURL(R),Q=new Image;Q.onload=()=>{URL.revokeObjectURL(q),A(Q)},Q.onerror=re=>{URL.revokeObjectURL(q),P(re)},Q.src=q}),E=document.createElement("canvas");E.width=S,E.height=O;const F=E.getContext("2d");return F?(F.drawImage(w,0,0,S,O),await new Promise(A=>{E.toBlob(P=>A(P||R),I,D)})):R}function g(){if(!l||!a.value)return;const R=l.getPlugin("Dashboard"),S=l.getFile(a.value);!R||!S||requestAnimationFrame(()=>{try{R.openFileEditor(S)}catch{try{R.openFileEditor(a.value)}catch{}}})}async function y(R){if(l){l.cancelAll(),a.value=null;try{const S=l.addFile({name:R.name,type:R.type,data:R,source:"Local",isRemote:!1});a.value=String(S)}catch{}}}function b(){if(!s.value)return;l&&h(),l=new FR({autoProceed:!1,restrictions:{maxNumberOfFiles:1,allowedFileTypes:["image/*"]}});const R=document.documentElement.classList.contains("dark");l.use(C1,{target:s.value,inline:!0,height:480,theme:R?"dark":"light",proudlyDisplayPoweredByUppy:!1,hideUploadButton:!0,hideRetryButton:!0,hidePauseResumeButton:!0,hideCancelButton:!0,showProgressDetails:!1}),f=new MutationObserver(()=>{if(!l)return;const S=document.documentElement.classList.contains("dark"),O=l.getPlugin("Dashboard");O&&O.setOptions({theme:S?"dark":"light"})}),f.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]}),l.use($R,{target:C1,quality:n.quality,cropperOptions:{viewMode:1,dragMode:"move",autoCropArea:1,aspectRatio:n.aspectRatio==null?Number.NaN:n.aspectRatio}}),l.on("file-editor:cancel",()=>{i.value=!1}),l.on("file-added",S=>{a.value=S?.id??null,n.autoOpenEditor&&setTimeout(()=>g(),80)}),l.on("file-editor:complete",async S=>{const O=++d;try{const I=S.data,D=I.type||S.type||"image/jpeg";let w=I;if(n.outputWidth&&n.outputHeight&&(w=await p(I,n.outputWidth,n.outputHeight,D,n.quality)),c||O!==d)return;const E=S.name||"edited-image.jpg",F=new File([w],E,{type:D});await _(F,"UPPY_EDITOR_COMPLETE"),o("done",F),i.value=!1}catch{}})}async function _(R,S="CROP_RESULT"){const O=URL.createObjectURL(R);try{const I=await new Promise((D,w)=>{const E=new Image;E.onload=()=>D(E),E.onerror=w,E.src=O});console.group(S),console.table({name:R.name,type:R.type,sizeBytes:R.size,sizeMB:+(R.size/1024/1024).toFixed(3),width:I.naturalWidth,height:I.naturalHeight,ratio:+(I.naturalWidth/I.naturalHeight).toFixed(4)}),console.groupEnd()}finally{URL.revokeObjectURL(O)}}r.watch(i,async R=>{c=!R,d++,R?(await r.nextTick(),b(),n.file&&await y(n.file)):h()},{flush:"post"}),r.watch(()=>n.file,async R=>{i.value&&R&&(await r.nextTick(),await y(R))}),r.onBeforeUnmount(()=>{c=!0,d++,h()});const x=R=>{R.key==="Escape"&&i.value&&(i.value=!1)};r.watch(i,R=>{R?globalThis.addEventListener("keydown",x):globalThis.removeEventListener("keydown",x)},{immediate:!0});const B=r.ref(!1);return(R,S)=>i.value?(r.openBlock(),r.createElementBlock("div",VY,[r.createVNode(r.Transition,{appear:"","enter-active-class":"duration-300 ease-out","enter-from-class":"opacity-0","enter-to-class":"opacity-100","leave-active-class":"duration-200 ease-in","leave-from-class":"opacity-100","leave-to-class":"opacity-0"},{default:r.withCtx(()=>[i.value?(r.openBlock(),r.createElementBlock("div",{key:0,class:"fixed inset-0 bg-black/60 backdrop-blur-sm transition-opacity",onClick:S[0]||(S[0]=O=>i.value=!1)})):r.createCommentVNode("",!0)]),_:1}),r.createVNode(r.Transition,{appear:"","enter-active-class":"duration-300 ease-out","enter-from-class":"opacity-0 scale-95 translate-y-4 sm:translate-y-0 sm:scale-95","enter-to-class":"opacity-100 scale-100 translate-y-0 sm:scale-100","leave-active-class":"duration-200 ease-in","leave-from-class":"opacity-100 scale-100 translate-y-0 sm:scale-100","leave-to-class":"opacity-0 scale-95 translate-y-4 sm:translate-y-0 sm:scale-95"},{default:r.withCtx(()=>[i.value?(r.openBlock(),r.createElementBlock("div",{key:0,class:"relative flex w-fit max-w-4xl flex-col overflow-hidden rounded-xl border border-border dark:border-neutral-700/50 bg-background dark:bg-neutral-800 shadow-2xl transition-all",onClick:S[4]||(S[4]=r.withModifiers(()=>{},["stop"]))},[r.createElementVNode("div",eZ,[S[6]||(S[6]=r.createElementVNode("h3",{class:"text-lg font-semibold leading-none tracking-tight dark:text-neutral-100"}," Crop & Resize ",-1)),r.createElementVNode("button",{class:"d-close-btn rounded-sm dark:text-neutral-400 ring-offset-background transition-opacity focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",style:r.normalizeStyle({opacity:B.value?1:.7}),onClick:S[1]||(S[1]=O=>i.value=!1),onMouseenter:S[2]||(S[2]=O=>B.value=!0),onMouseleave:S[3]||(S[3]=O=>B.value=!1)},[r.createVNode(r.unref(Ae.X),{class:"h-4 w-4"}),S[5]||(S[5]=r.createElementVNode("span",{class:"sr-only"},"Close",-1))],36)]),r.createElementVNode("div",tZ,[r.createElementVNode("div",{ref_key:"dashboardEl",ref:s,class:"uppy-wrap"},null,512)])])):r.createCommentVNode("",!0)]),_:1})])):r.createCommentVNode("",!0)}}),nZ={key:0,class:"ml-1 text-destructive"},oZ={key:0,class:"text-xs text-muted-foreground dark:text-neutral-400"},rZ=["src"],iZ=["disabled"],sZ=["disabled"],aZ={class:"text-[11px] text-foreground/90 dark:text-neutral-200 space-y-1 whitespace-nowrap"},lZ={class:"flex gap-2"},cZ={class:"font-medium truncate"},dZ={class:"flex gap-2"},uZ={class:"font-medium"},fZ={class:"flex gap-2"},hZ={class:"font-medium truncate"},xv=Sn(r.defineComponent({name:"DCodeImageResult",__name:"DCodeImageResult",props:{file:{},title:{default:"Hasil Gambar"},description:{default:""},disabled:{type:Boolean,default:!1},required:{type:Boolean,default:!1},previewHeight:{default:190},previewWidth:{default:220},showEdit:{type:Boolean,default:!0},showReplace:{type:Boolean,default:!0},showRemove:{type:Boolean,default:!0}},emits:["edit","replace","remove"],setup(e,{emit:t}){const n=e,o=t,i=r.ref(null);r.watch(()=>n.file,p=>{i.value&&URL.revokeObjectURL(i.value),i.value=p?URL.createObjectURL(p):null},{immediate:!0}),r.onBeforeUnmount(()=>{i.value&&URL.revokeObjectURL(i.value),d&&d.disconnect()});function s(p){const g=p/1024,y=g/1024;return y>=1?`${y.toFixed(2)} MB`:g>=1?`${g.toFixed(1)} KB`:`${p} B`}const a=r.computed(()=>n.file?{name:n.file.name,size:s(n.file.size),type:n.file.type||"unknown"}:null),l=r.ref(!1),c=r.ref(!1);let d=null;const f=()=>{typeof document<"u"&&(c.value=document.documentElement.classList.contains("dark")||document.body.classList.contains("dark"))};r.onMounted(()=>{f(),typeof document<"u"&&(d=new MutationObserver(f),d.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]}),d.observe(document.body,{attributes:!0,attributeFilter:["class"]}))});const h=r.computed(()=>n.disabled||!l.value?{}:{borderColor:c.value?"hsl(var(--primary) / 0.4)":"hsl(var(--primary) / 0.5)",backgroundColor:c.value?"hsl(var(--primary) / 0.1)":"hsl(var(--primary) / 0.05)"});return(p,g)=>e.file?(r.openBlock(),r.createBlock(_f,{key:0,class:r.normalizeClass([e.disabled?"opacity-60 pointer-events-none":"","dark:bg-neutral-800 dark:border-neutral-700/50"])},{default:r.withCtx(()=>[r.createVNode(Ef,{class:"pb-2"},{default:r.withCtx(()=>[r.createVNode(Cf,{class:"text-sm font-semibold dark:text-neutral-100"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(e.title)+" ",1),e.required?(r.openBlock(),r.createElementBlock("span",nZ,"*")):r.createCommentVNode("",!0)]),_:1}),e.description?(r.openBlock(),r.createElementBlock("div",oZ,r.toDisplayString(e.description),1)):r.createCommentVNode("",!0)]),_:1}),r.createVNode(xf,{class:"pt-2"},{default:r.withCtx(()=>[r.createElementVNode("div",{class:"d-result-preview-wrap relative rounded-xl overflow-hidden border-2 border-dashed transition-colors duration-200 bg-muted dark:bg-neutral-900/30 border-border dark:border-neutral-700/50 w-full",style:r.normalizeStyle([{height:`${e.previewHeight}px`},h.value]),onMouseenter:g[2]||(g[2]=y=>l.value=!0),onMouseleave:g[3]||(g[3]=y=>l.value=!1)},[i.value?(r.openBlock(),r.createElementBlock("img",{key:0,src:i.value,alt:"Preview",class:"h-full w-full object-contain"},null,8,rZ)):r.createCommentVNode("",!0),r.createElementVNode("div",{class:"d-action-buttons",style:r.normalizeStyle({position:"absolute",top:"8px",left:"8px",right:"8px",display:"flex",alignItems:"center",justifyContent:"space-between",zIndex:50,opacity:l.value?1:0,transition:"opacity 0.2s ease-in-out",pointerEvents:l.value?"auto":"none"})},[e.showEdit?(r.openBlock(),r.createElementBlock("button",{key:0,disabled:e.disabled,class:"d-action-btn shadow-md",style:r.normalizeStyle({height:"32px",width:"32px",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"#eab308",color:"white",borderRadius:"8px",border:"1px solid rgba(255,255,255,0.4)",cursor:e.disabled?"not-allowed":"pointer",transition:"all 0.2s",boxShadow:"0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)"}),onClick:g[0]||(g[0]=y=>o("edit"))},[r.createVNode(r.unref(Ae.Pencil),{style:{width:"16px",height:"16px"}})],12,iZ)):r.createCommentVNode("",!0),e.showRemove?(r.openBlock(),r.createElementBlock("button",{key:1,disabled:e.disabled,class:"d-action-btn shadow-md",style:r.normalizeStyle({height:"32px",width:"32px",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"#ef4444",color:"white",borderRadius:"8px",border:"1px solid rgba(255,255,255,0.4)",cursor:e.disabled?"not-allowed":"pointer",transition:"all 0.2s",boxShadow:"0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)"}),onClick:g[1]||(g[1]=y=>o("remove"))},[r.createVNode(r.unref(Ae.Trash2),{style:{width:"16px",height:"16px"}})],12,sZ)):r.createCommentVNode("",!0)],4),r.createElementVNode("div",{class:"d-metadata-overlay",style:r.normalizeStyle({position:"absolute",left:"8px",bottom:"8px",zIndex:10,display:"inline-block",maxWidth:"calc(100% - 16px)",borderRadius:"12px",border:"1px solid rgba(0,0,0,0.1)",padding:"8px 12px",boxShadow:"0 10px 15px -3px rgba(0,0,0,0.1)",backdropFilter:"blur(8px)",transition:"all 0.2s ease-in-out",opacity:l.value?1:0,transform:l.value?"translateY(0) scale(1)":"translateY(4px) scale(0.99)",backgroundColor:c.value?"rgba(38, 38, 38, 0.8)":"rgba(255, 255, 255, 0.8)",color:c.value?"#e5e5e5":"#171717"})},[r.createElementVNode("div",aZ,[r.createElementVNode("div",lZ,[g[4]||(g[4]=r.createElementVNode("span",{class:"w-14 shrink-0 text-muted-foreground dark:text-neutral-400"},"Nama",-1)),r.createElementVNode("span",cZ,r.toDisplayString(a.value?.name),1)]),r.createElementVNode("div",dZ,[g[5]||(g[5]=r.createElementVNode("span",{class:"w-14 shrink-0 text-muted-foreground dark:text-neutral-400"},"Ukuran",-1)),r.createElementVNode("span",uZ,r.toDisplayString(a.value?.size),1)]),r.createElementVNode("div",fZ,[g[6]||(g[6]=r.createElementVNode("span",{class:"w-14 shrink-0 text-muted-foreground dark:text-neutral-400"},"Tipe",-1)),r.createElementVNode("span",hZ,r.toDisplayString(a.value?.type),1)])])],4)],36)]),_:1})]),_:1},8,["class"])):r.createCommentVNode("",!0)}}),[["__scopeId","data-v-d0f904c9"]]),mZ={key:0,class:"ml-1 text-destructive"},pZ={class:"flex flex-col items-center justify-center gap-3 rounded-xl border-2 border-dashed border-primary-300 dark:border-primary-700 bg-primary-50/50 dark:bg-primary-900/10",style:{"min-height":"190px"}},Yp=r.defineComponent({name:"DCodeImageField",inheritAttrs:!1,__name:"DCodeImageField",props:{modelValue:{default:null},label:{default:"Upload Gambar"},hint:{default:"Drag & drop atau klik area ini"},disabled:{type:Boolean,default:!1},required:{type:Boolean,default:!1},error:{default:null},allowedTypes:{default:null},accept:{default:"image/*"},minSizeMb:{default:null},maxSizeMb:{default:1},title:{default:"Hasil Gambar"},description:{default:""},previewWidth:{default:360},previewHeight:{default:220},aspectRatio:{default:null},outputWidth:{default:null},outputHeight:{default:null},quality:{default:.92},autoOpenEditor:{type:Boolean,default:!0},minWidth:{default:null},minHeight:{default:null},maxWidth:{default:null},maxHeight:{default:null},endpoint:{},uploadFn:{},editUseOriginal:{type:Boolean,default:!1},template:{default:null}},emits:["update:modelValue","error","uploaded"],setup(e,{emit:t}){const n=e,o=t,i=r.ref(null),s=r.ref(!1),a=r.ref(null),l=r.ref(null);r.watch(()=>n.modelValue,K=>{K instanceof File?i.value=K:K||(i.value=null)},{immediate:!0});const c=r.ref(null);function d(K){c.value=K,o("error",K)}function f(){c.value=null}const h=r.computed(()=>{const K=D.required,W=D["aria-required"];return K===""||K===!0||K==="true"||(W==="true"||W===!0)||n.required}),p=r.computed(()=>{const K=(n.allowedTypes??"").trim();return K?K.split(/[,\s;]+/g).map(se=>se.trim().toLowerCase()).filter(Boolean).map(se=>se.includes("/")||se.startsWith(".")?se:`.${se}`):[]});function g(K){const W=K.lastIndexOf(".");return W>=0?K.slice(W).toLowerCase():""}const y=r.computed(()=>{if(p.value.length){const K=p.value.filter(se=>se.startsWith("."));return[...p.value.filter(se=>se.includes("/")),...K].join(",")}return n.accept||"image/*"}),b=r.computed(()=>p.value.length?p.value.join(", "):n.accept||"image/*");function _(K){if(p.value.length){const se=(K.type||"").toLowerCase(),H=g(K.name);return p.value.some(N=>N.includes("/")?se===N:N.startsWith(".")?H===N:H===`.${N}`)}return(n.accept||"image/*").toLowerCase().includes("image/")?(K.type||"").toLowerCase().startsWith("image/"):!0}function x(K){return K*1024*1024}async function B(K){return K.type?.startsWith("image/")?await new Promise(W=>{const se=URL.createObjectURL(K),H=new Image;H.onload=()=>{URL.revokeObjectURL(se),W({w:H.naturalWidth,h:H.naturalHeight})},H.onerror=()=>{URL.revokeObjectURL(se),W(null)},H.src=se}):null}async function R(K){if(!(n.minWidth!=null||n.minHeight!=null||n.maxWidth!=null||n.maxHeight!=null))return null;const se=await B(K);return se?n.minWidth!=null&&se.w<n.minWidth?`Lebar gambar minimal ${n.minWidth}px`:n.minHeight!=null&&se.h<n.minHeight?`Tinggi gambar minimal ${n.minHeight}px`:n.maxWidth!=null&&se.w>n.maxWidth?`Lebar gambar maksimal ${n.maxWidth}px`:n.maxHeight!=null&&se.h>n.maxHeight?`Tinggi gambar maksimal ${n.maxHeight}px`:null:"Gagal membaca dimensi gambar"}async function S(K){return K?_(K)?n.minSizeMb!=null&&K.size<x(n.minSizeMb)?`Ukuran file terlalu kecil. Minimal ${n.minSizeMb}MB`:n.maxSizeMb!=null&&K.size>x(n.maxSizeMb)?`Ukuran file terlalu besar. Maks ${n.maxSizeMb}MB`:await R(K):`only Allowed: ${b.value}`:"File tidak valid"}function O(K){n.disabled||(a.value=K,s.value=!0)}async function I(K){if(n.disabled)return;f();const W=await S(K);if(W){d(W);return}l.value=K,O(K)}const D=r.useAttrs(),{apiUrl:w}=r.inject("externalApi")||{},E=Mp(),F=r.ref(!1),A=r.ref(null);function P(K,W){return!K||!W?null:K.replace(/\/+$/,"")+"/"+W.replace(/^\/+/,"")}function q(K){const se=(K?.data??K)?.data?.[0];if(!se)return null;const H=P(se.server,se.url);return{...se,fullUrl:H?encodeURI(H):null}}async function Q(K){if(n.uploadFn){try{F.value=!0;const W=await n.uploadFn(K);i.value=K,o("update:modelValue",W),o("uploaded",W)}catch(W){console.error("Upload Error",W),E.error("Upload Failed",W?.message||"Unknown error"),d(W?.message||"Upload Failed")}finally{F.value=!1}return}if(!n.endpoint?.apiUrl){i.value=K,o("update:modelValue",K);return}try{F.value=!0;const W=new FormData;W.append("doc",K);const se=(n.endpoint.apiMethod||"POST").toUpperCase(),H=n.endpoint.apiUrl,N=await w(H,se,W),j=Array.isArray(N?.data)?N.data[0]:N?.data||N,Y=q(N);Y&&(A.value=Y),i.value=K,o("update:modelValue",j??Y??N),o("uploaded",N)}catch(W){console.error("Upload Error",W),E.error("Upload Failed",W?.message||"Unknown error"),d(W?.message||"Upload Failed")}finally{F.value=!1}}async function re(K){f(),await Q(K),s.value=!1,a.value=null}function ie(){s.value=!1,a.value=null}async function le(){if(!i.value)return;f();const K=n.editUseOriginal?l.value??i.value:i.value,W=await S(K);if(W){d(W);return}O(K)}function X(){f(),i.value=null,A.value=null,a.value=null,s.value=!1,l.value=null,o("update:modelValue",null)}return r.watch(()=>n.modelValue,K=>{K instanceof File&&!l.value&&(l.value=K),K||(l.value=null)},{immediate:!0}),(K,W)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["space-y-3 w-full",r.unref(D).class])},[F.value?(r.openBlock(),r.createBlock(r.unref(_f),{key:0,class:"dark:bg-neutral-800 dark:border-neutral-700/50"},{default:r.withCtx(()=>[r.createVNode(r.unref(Ef),{class:"pb-2"},{default:r.withCtx(()=>[r.createVNode(r.unref(Cf),{class:"text-sm font-semibold dark:text-neutral-100"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(e.label)+" ",1),h.value?(r.openBlock(),r.createElementBlock("span",mZ,"*")):r.createCommentVNode("",!0)]),_:1})]),_:1}),r.createVNode(r.unref(xf),{class:"pt-2"},{default:r.withCtx(()=>[r.createElementVNode("div",pZ,[r.createVNode(r.unref(Ae.Loader2),{class:"w-8 h-8 animate-spin text-primary-500"}),W[2]||(W[2]=r.createElementVNode("span",{class:"text-sm font-medium text-primary-600 dark:text-primary-400"},"Uploading...",-1))])]),_:1})]),_:1})):i.value?(r.openBlock(),r.createBlock(xv,{key:2,file:i.value,title:e.label,description:e.description,"preview-width":e.previewWidth,disabled:e.disabled||F.value,required:h.value,"show-edit":!0,"show-remove":!0,"show-replace":!1,onEdit:le,onRemove:X,"aspect-ratio":16/9},null,8,["file","title","description","preview-width","disabled","required"])):(r.openBlock(),r.createBlock(Gp,{key:1,label:e.label,hint:e.hint,accept:y.value,maxSizeMb:e.maxSizeMb,disabled:e.disabled||F.value,required:h.value,template:e.template,onPicked:I,error:c.value,onError:W[0]||(W[0]=se=>d(se))},null,8,["label","hint","accept","maxSizeMb","disabled","required","template","error"])),e.error?(r.openBlock(),r.createBlock(r.unref(gf),{key:3,variant:"destructive"},{default:r.withCtx(()=>[r.createVNode(r.unref(bf),{class:"text-sm"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(e.error),1)]),_:1})]),_:1})):r.createCommentVNode("",!0),r.createVNode(_v,{modelValue:s.value,"onUpdate:modelValue":W[1]||(W[1]=se=>s.value=se),file:a.value,title:e.title,description:e.description,"auto-open-editor":e.autoOpenEditor,"aspect-ratio":e.aspectRatio,"output-width":e.outputWidth,"output-height":e.outputHeight,quality:e.quality,onDone:re,onCancel:ie},null,8,["modelValue","file","title","description","auto-open-editor","aspect-ratio","output-width","output-height","quality"])],2))}}),gZ={class:"space-y-4"},bZ={key:0,class:"h-4 w-32 rounded bg-gray-200 dark:bg-gray-700 animate-pulse mb-2"},yZ={class:"flex items-center gap-2 flex-nowrap"},vZ={key:0,class:"flex flex-col gap-0.5"},wZ=["for"],kZ={key:0,class:"ml-1 text-destructive"},_Z=["for"],xZ={class:"text-[11px] text-gray-500 dark:text-gray-400"},EZ={class:"flex items-center gap-2 flex-nowrap"},CZ=["id","value","disabled","readonly","onKeydown","onInput","onPaste"],SZ={key:1,class:"text-xs text-destructive mt-1"},Zp=r.defineComponent({name:"DCodeOtpInput",inheritAttrs:!1,__name:"DCodeOtpInput",props:{minLength:{default:6},default:{default:""},endpoint:{},submitFn:{},size:{default:"default"},rounded:{default:"lg"},modelValue:{default:""},label:{default:""},placeholder:{},clearable:{type:Boolean,default:!1},required:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},visible:{type:Boolean,default:!0},skeleton:{type:Boolean,default:!1},error:{default:null}},emits:["updateOtp","update:modelValue","complete","loading","success","error"],setup(e,{emit:t}){const n=r.useAttrs(),o=Math.random().toString(36).slice(2,7),i=r.computed(()=>`app-otp-${(n.id||s.label||"otp-field").replaceAll(/\s+/g,"-").toLowerCase()}-${o}`),s=e,a=t,l=r.computed(()=>!!s.error),c=r.computed(()=>{switch(s.size){case"sm":return"w-10 h-10 text-lg";case"lg":return"w-14 h-14 text-2xl";default:return"w-12 h-12 text-xl"}}),d=r.ref([]),f=r.ref([]),h=r.ref(!1),{DCodeApi:p}=r.inject("externalApi")||{},g=Mp(),y=r.computed(()=>{const A=Number(s.minLength);return A&&A>0?A:6}),b=()=>{const A=s.modelValue||s.default||"";f.value=Array.from({length:y.value},(P,q)=>A[q]??""),a("updateOtp",f.value.join(""))};b(),r.watch(()=>[s.minLength,s.default],()=>b()),r.watch(()=>s.modelValue,A=>{const P=A||"";P!==f.value.join("")&&(f.value=Array.from({length:y.value},(q,Q)=>P[Q]??""))});const _=A=>{A<0||A>=y.value||r.nextTick(()=>d.value[A]?.focus())},x=r.computed(()=>f.value.some(A=>A!=="")),B=r.computed(()=>s.clearable&&!s.disabled&&!s.readonly&&x.value),R=()=>{f.value=Array.from({length:y.value},()=>""),a("updateOtp",""),a("update:modelValue",""),_(0)},S=A=>A.match(/[a-zA-Z0-9]/)?A.match(/[a-zA-Z0-9]/)[0]:"";async function O(A){if(a("complete",A),s.submitFn){try{h.value=!0,a("loading",!0);const P=await s.submitFn(A);a("success",P)}catch(P){console.error("OTP Submit Error",P),g.error("Submit Failed",P?.message||"Unknown error"),a("error",P?.message||"Submit Failed")}finally{h.value=!1,a("loading",!1)}return}if(s.endpoint?.apiUrl){if(typeof p!="function"){a("error","useApi() must expose DCodeApi()");return}try{h.value=!0,a("loading",!0);const P=(s.endpoint.apiMethod||"POST").toUpperCase(),q=s.endpoint.apiUrl,Q=await p("","",{otp:A},{_url:q,_method:P,withCredentials:!0}),re=Q?.data??Q;a("success",re)}catch(P){console.error("OTP Submit Error",P),g.error("Submit Failed",P?.message||"Unknown error"),a("error",P?.message||"Submit Failed")}finally{h.value=!1,a("loading",!1)}}}const I=(A,P)=>{f.value[A]=S(P);const q=f.value.join("");a("updateOtp",q),a("update:modelValue",q),q.length===y.value&&O(q)},D=(A,P)=>{const q=A.key,Q=/^\d$/.test(q),re=/^[a-zA-Z]$/.test(q);if(q==="Backspace"){if(A.preventDefault(),f.value[P]){I(P,"");return}P>0&&(I(P-1,""),_(P-1));return}if(q==="ArrowLeft"){A.preventDefault(),_(P-1);return}if(q==="ArrowRight"){A.preventDefault(),_(P+1);return}if(Q||re){A.preventDefault(),I(P,q),P<y.value-1&&_(P+1);return}q.length===1&&A.preventDefault()},w=(A,P)=>{const q=A.target,Q=q.value??"",re=S(Q);q.value=re,I(P,re),re&&P<y.value-1&&_(P+1)},E=(A,P)=>{A.preventDefault();const Q=(A.clipboardData?.getData("text")??"").replaceAll(/[^a-zA-Z0-9]/g,"");if(!Q)return;let re=P;for(const le of Q){if(re>=y.value)break;f.value[re]=le,re++}const ie=f.value.join("");a("updateOtp",ie),a("update:modelValue",ie),ie.length===y.value&&O(ie),_(Math.min(re,y.value-1))},F=A=>P=>{d.value[A]=P?.$el??P};return(A,P)=>r.withDirectives((r.openBlock(),r.createElementBlock("div",gZ,[s.skeleton?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[s.label?(r.openBlock(),r.createElementBlock("div",bZ)):r.createCommentVNode("",!0),r.createElementVNode("div",yZ,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(y.value,q=>(r.openBlock(),r.createElementBlock("div",{key:q,class:r.normalizeClass(["bg-gray-200 dark:bg-gray-700 animate-pulse",[c.value,r.unref(sn)(s.rounded)]])},null,2))),128))])],64)):(r.openBlock(),r.createElementBlock(r.Fragment,{key:1},[s.label||y.value?(r.openBlock(),r.createElementBlock("div",vZ,[s.label?(r.openBlock(),r.createElementBlock("label",{key:0,for:i.value,class:"text-sm font-medium text-foreground"},[r.createTextVNode(r.toDisplayString(s.label)+" ",1),e.required?(r.openBlock(),r.createElementBlock("span",kZ,"*")):r.createCommentVNode("",!0)],8,wZ)):(r.openBlock(),r.createElementBlock("label",{key:1,for:i.value,class:"text-sm font-medium text-foreground"}," Enter security code ",8,_Z)),r.createElementVNode("p",xZ," Type your "+r.toDisplayString(y.value)+"-digit verification code ",1)])):r.createCommentVNode("",!0),r.createElementVNode("div",EZ,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(y.value,q=>(r.openBlock(),r.createElementBlock("input",{key:q,id:q===1?i.value:void 0,ref_for:!0,ref:F(q-1),value:f.value[q-1]||"",type:"text",inputmode:"text",maxlength:"1",autocomplete:"one-time-code","aria-label":"`OTP digit ${i}`",placeholder:"*",disabled:s.disabled||h.value,readonly:s.readonly,class:r.normalizeClass(["flex-none text-center font-bold border transition-all duration-200 box-border p-0",c.value,r.unref(sn)(s.rounded),"focus:outline-none focus:scale-105 disabled:opacity-50 disabled:cursor-not-allowed",f.value[q-1]?"border-blue-500 bg-white dark:bg-neutral-800 text-foreground dark:text-gray-300":"border-gray-300 dark:border-neutral-700/50 bg-white dark:bg-neutral-800 text-gray-400 focus:ring-1 focus:ring-neutral-400 dark:focus:ring-neutral-600",l.value?"border-destructive focus:ring-destructive":""]),onKeydown:Q=>D(Q,q-1),onInput:Q=>w(Q,q-1),onPaste:Q=>E(Q,q-1)},null,42,CZ))),128)),B.value?(r.openBlock(),r.createBlock(Lr,{key:0,size:"sm","aria-label":"Clear OTP",disabled:s.disabled||h.value,onClear:R},null,8,["disabled"])):r.createCommentVNode("",!0)]),l.value?(r.openBlock(),r.createElementBlock("p",SZ,r.toDisplayString(s.error),1)):r.createCommentVNode("",!0)],64))],512)),[[r.vShow,e.visible]])}}),AZ={key:0,class:"ml-1 text-destructive"},TZ={key:1,class:"flex items-center gap-3"},BZ={key:0,class:"h-4 w-24 bg-neutral-200 dark:bg-neutral-700 rounded animate-pulse"},PZ={key:2,class:"inline-flex items-center gap-3"},NZ=["id","name","aria-checked","aria-label","disabled"],DZ={key:0,class:"absolute inset-0 flex items-center justify-center"},MZ={class:"relative z-10 flex items-center gap-2"},RZ=["id","name","aria-checked","aria-label","disabled"],IZ={key:0,class:"absolute inset-0 flex items-center justify-center"},OZ={key:3,class:"text-xs text-destructive mt-1"},LZ={name:"DCodeSwitch"},Xp=r.defineComponent({...LZ,props:{title:{default:""},size:{default:"medium"},color:{default:"primary"},loading:{type:Boolean,default:!1},labelPosition:{default:"right"},id:{},name:{},showTooltip:{type:Boolean,default:!1},tooltipActiveText:{default:"Aktif"},tooltipInactiveText:{default:"Tidak Aktif"},modelValue:{type:Boolean,default:!1},label:{default:""},placeholder:{},clearable:{type:Boolean},required:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},visible:{type:Boolean,default:!0},skeleton:{type:Boolean,default:!1},error:{default:null}},emits:["update:modelValue","change"],setup(e,{emit:t}){const n=e,o=t,i=r.computed({get:()=>n.modelValue,set:h=>{!n.disabled&&!n.loading&&(o("update:modelValue",h),o("change",h))}});r.watch(()=>n.modelValue,h=>{h==null&&o("update:modelValue",!1)},{immediate:!0});const s=r.computed(()=>{switch(n.size){case"small":return"w-9 h-5";case"large":return"w-14 h-7";default:return"w-11 h-6"}}),a=r.computed(()=>{switch(n.size){case"small":return"w-4 h-4";case"large":return"w-6 h-6";default:return"w-5 h-5"}}),l=r.computed(()=>{switch(n.size){case"small":return"translate-x-4";case"large":return"translate-x-7";default:return"translate-x-5"}}),c=r.computed(()=>{if(n.disabled)return"bg-gray-300";if(n.readonly)return i.value?"bg-blue-400 opacity-80":"bg-gray-200 opacity-80";if(!i.value)return"bg-gray-200";switch(n.color){case"success":return"bg-green-500";case"warning":return"bg-yellow-500";case"danger":return"bg-red-500";default:return"bg-blue-500"}}),d=()=>{n.disabled||n.readonly||n.loading||(i.value=!i.value)},f=r.computed(()=>i.value?n.tooltipActiveText:n.tooltipInactiveText);return(h,p)=>r.withDirectives((r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["grid gap-3",n.disabled?"cursor-not-allowed":""])},[e.title?(r.openBlock(),r.createBlock(pd,{key:0,class:"text-sm font-medium"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(e.title)+" ",1),e.required?(r.openBlock(),r.createElementBlock("span",AZ,"*")):r.createCommentVNode("",!0)]),_:1})):r.createCommentVNode("",!0),n.skeleton?(r.openBlock(),r.createElementBlock("div",TZ,[r.createElementVNode("div",{class:r.normalizeClass([s.value,"bg-neutral-200 dark:bg-neutral-700 rounded-full animate-pulse"])},null,2),e.label?(r.openBlock(),r.createElementBlock("div",BZ)):r.createCommentVNode("",!0)])):(r.openBlock(),r.createElementBlock("div",PZ,[r.createVNode(r.unref(id),null,{default:r.withCtx(()=>[e.showTooltip?(r.openBlock(),r.createBlock(r.unref(od),{key:0,"delay-duration":200},{default:r.withCtx(()=>[r.createVNode(r.unref(sd),{"as-child":""},{default:r.withCtx(()=>[r.createElementVNode("button",{type:"button",id:e.id,name:e.name,"aria-checked":i.value?"true":"false","aria-label":e.label||"Toggle switch",disabled:e.disabled||e.loading,class:r.normalizeClass([s.value,c.value,"relative inline-flex items-center rounded-full transition-all duration-300 ease-in-out focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500","hover:scale-105 active:scale-95",{"cursor-not-allowed opacity-50":e.disabled,"cursor-wait":e.loading,"cursor-default opacity-80":e.readonly&&!e.loading,"cursor-pointer":!e.disabled&&!e.loading&&!e.readonly}]),onClick:d},[r.createElementVNode("span",{class:r.normalizeClass([a.value,i.value?l.value:"translate-x-0.5","inline-block transform rounded-full bg-white shadow-lg transition-all duration-300 ease-in-out","hover:shadow-xl flex items-center justify-center"])},[e.loading?(r.openBlock(),r.createElementBlock("span",DZ,[...p[0]||(p[0]=[r.createElementVNode("svg",{class:"animate-spin h-3 w-3 text-gray-400",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},[r.createElementVNode("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}),r.createElementVNode("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})],-1)])])):r.createCommentVNode("",!0),r.createVNode(r.Transition,{"enter-active-class":"transition-all duration-200 ease-out","enter-from-class":"scale-0 rotate-90 opacity-0","enter-to-class":"scale-100 rotate-0 opacity-100","leave-active-class":"transition-all duration-150 ease-in","leave-from-class":"scale-100 rotate-0 opacity-100","leave-to-class":"scale-0 -rotate-90 opacity-0"},{default:r.withCtx(()=>[i.value&&!e.loading?(r.openBlock(),r.createBlock(r.unref(Ae.Check),{key:0,class:r.normalizeClass([e.size==="small"?"w-2.5 h-2.5":e.size==="large"?"w-4 h-4":"w-3 h-3","text-green-600 stroke-[3]"])},null,8,["class"])):!i.value&&!e.loading?(r.openBlock(),r.createBlock(r.unref(Ae.X),{key:1,class:r.normalizeClass([e.size==="small"?"w-2.5 h-2.5":e.size==="large"?"w-4 h-4":"w-3 h-3","text-gray-400 stroke-[3]"])},null,8,["class"])):r.createCommentVNode("",!0)]),_:1})],2)],10,NZ)]),_:1}),r.createVNode(r.unref(rd),{side:"top","side-offset":8,class:r.normalizeClass(["animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 px-3 py-2 rounded-lg text-sm font-medium shadow-xl border-0",[i.value?"bg-green-600 dark:bg-green-500 text-white":"bg-gray-700 dark:bg-gray-600 text-white"]])},{default:r.withCtx(()=>[r.createElementVNode("span",MZ,[r.createElementVNode("span",{class:r.normalizeClass(["inline-block w-2 h-2 rounded-full animate-pulse",i.value?"bg-green-200":"bg-gray-300"])},null,2),r.createTextVNode(" "+r.toDisplayString(f.value),1)])]),_:1},8,["class"])]),_:1})):(r.openBlock(),r.createElementBlock("button",{key:1,type:"button",id:e.id,name:e.name,"aria-checked":i.value?"true":"false","aria-label":e.label||"Toggle switch",disabled:e.disabled||e.loading,class:r.normalizeClass([s.value,c.value,"relative inline-flex items-center rounded-full transition-all duration-300 ease-in-out focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500","hover:scale-105 active:scale-95",{"cursor-not-allowed opacity-50":e.disabled,"cursor-wait":e.loading,"cursor-default opacity-80":e.readonly&&!e.loading,"cursor-pointer":!e.disabled&&!e.loading&&!e.readonly}]),onClick:d},[r.createElementVNode("span",{class:r.normalizeClass([a.value,i.value?l.value:"translate-x-0.5","inline-block transform rounded-full bg-white shadow-lg transition-all duration-300 ease-in-out","hover:shadow-xl flex items-center justify-center"])},[e.loading?(r.openBlock(),r.createElementBlock("span",IZ,[...p[1]||(p[1]=[r.createElementVNode("svg",{class:"animate-spin h-3 w-3 text-gray-400",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},[r.createElementVNode("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}),r.createElementVNode("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})],-1)])])):r.createCommentVNode("",!0),r.createVNode(r.Transition,{"enter-active-class":"transition-all duration-200 ease-out","enter-from-class":"scale-0 rotate-90 opacity-0","enter-to-class":"scale-100 rotate-0 opacity-100","leave-active-class":"transition-all duration-150 ease-in","leave-from-class":"scale-100 rotate-0 opacity-100","leave-to-class":"scale-0 -rotate-90 opacity-0"},{default:r.withCtx(()=>[i.value&&!e.loading?(r.openBlock(),r.createBlock(r.unref(Ae.Check),{key:0,class:r.normalizeClass([e.size==="small"?"w-2.5 h-2.5":e.size==="large"?"w-4 h-4":"w-3 h-3","text-green-600 stroke-[3]"])},null,8,["class"])):!i.value&&!e.loading?(r.openBlock(),r.createBlock(r.unref(Ae.X),{key:1,class:r.normalizeClass([e.size==="small"?"w-2.5 h-2.5":e.size==="large"?"w-4 h-4":"w-3 h-3","text-gray-400 stroke-[3]"])},null,8,["class"])):r.createCommentVNode("",!0)]),_:1})],2)],10,RZ))]),_:1})])),n.error?(r.openBlock(),r.createElementBlock("p",OZ,r.toDisplayString(n.error),1)):r.createCommentVNode("",!0)],2)),[[r.vShow,e.visible]])}}),FZ={key:0,class:"ml-1 text-destructive"},$Z={key:1,class:"flex gap-2"},zZ=["aria-selected","aria-disabled","disabled","onClick"],jZ={key:1,class:"truncate"},UZ={key:0,class:"truncate"},WZ={key:1,class:"truncate"},HZ={key:0,class:"truncate"},qZ={key:1,class:"rounded-xl border border-dashed border-slate-300 bg-white p-3 text-sm text-slate-500 dark:border-slate-700 dark:bg-slate-900 dark:text-slate-400"},Jp=Sn(r.defineComponent({__name:"DCodeSegment",props:{modelValue:{default:""},label:{default:""},title:{default:""},required:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},size:{default:"medium"},color:{default:"primary"},options:{default:()=>[]},id:{default:""},skeleton:{type:Boolean,default:!1},layout:{default:"default"}},emits:["update:modelValue","change"],setup(e,{emit:t}){const n=e,o=t,i=r.ref(null),s=r.ref({width:"0px",transform:"translateX(0px)"}),a=r.computed({get:()=>n.modelValue,set:x=>{n.disabled||n.readonly||(o("update:modelValue",x),o("change",x))}}),l=r.computed(()=>{switch(n.size){case"small":return"px-2.5 py-1 text-xs";case"large":return"px-4 py-2 text-sm";default:return"px-3 py-2 text-sm"}}),c=r.computed(()=>{const x=String(n.color||"primary").trim();return["primary","secondary","accent","destructive","muted","foreground","border","input","ring"].includes(x.toLowerCase())?`hsl(var(--${x.toLowerCase()}))`:x}),d=r.computed(()=>n.disabled?"text-slate-700 dark:text-slate-300":"text-white"),f=r.computed(()=>n.disabled?"text-slate-400 cursor-not-allowed":"text-slate-700 dark:text-slate-200"),h=r.computed(()=>["relative flex w-full overflow-visible rounded-full border border-slate-300 bg-slate-100 shadow-sm dark:border-slate-700 dark:bg-slate-800",n.disabled?"opacity-70 cursor-not-allowed":"",n.readonly&&!n.disabled?"opacity-80":""]),p=r.computed(()=>["flex-1 min-w-0 inline-flex items-center justify-center rounded-full transition-colors duration-200 ease-in-out focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 relative z-10",n.layout==="icon-bottom"&&"flex-col",n.layout==="icon-start"&&"flex-row-reverse",n.layout==="icon-end"&&"flex-row",n.layout==="default"&&"flex-row gap-2",l.value]),g=r.computed(()=>Yt),y=r.computed(()=>{switch(n.size){case"small":return"w-3.5 h-3.5";case"large":return"w-5 h-5";default:return"w-4 h-4"}}),b=()=>{if(!i.value)return;const x=i.value.querySelectorAll("button[role='tab']"),B=Array.from(x).find(R=>R.getAttribute("aria-selected")==="true");if(B){const R=B.getBoundingClientRect(),S=i.value.getBoundingClientRect(),O=R.left-S.left,I=R.width;s.value={width:`${I}px`,transform:`translateX(${O}px)`}}};r.watch(()=>a.value,()=>{setTimeout(b,0)}),r.watch(()=>n.options,()=>{setTimeout(b,0)},{deep:!0}),r.onMounted(()=>{setTimeout(b,0),window.addEventListener("resize",b)}),r.onBeforeUnmount(()=>{window.removeEventListener("resize",b)});const _=x=>{n.disabled||n.readonly||x.disabled||(a.value=x.value)};return(x,B)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["grid gap-3",n.disabled?"cursor-not-allowed":""])},[e.title?(r.openBlock(),r.createBlock(pd,{key:0,class:"text-sm font-medium"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(e.title)+" ",1),e.required?(r.openBlock(),r.createElementBlock("span",FZ,"*")):r.createCommentVNode("",!0)]),_:1})):r.createCommentVNode("",!0),n.skeleton?(r.openBlock(),r.createElementBlock("div",$Z,[...B[0]||(B[0]=[r.createElementVNode("div",{class:"h-8 w-20 rounded-full bg-neutral-200 dark:bg-neutral-700 animate-pulse"},null,-1),r.createElementVNode("div",{class:"h-8 w-20 rounded-full bg-neutral-200 dark:bg-neutral-700 animate-pulse"},null,-1)])])):(r.openBlock(),r.createElementBlock(r.Fragment,{key:2},[n.options?.length?(r.openBlock(),r.createElementBlock("div",{key:0,ref_key:"containerRef",ref:i,class:r.normalizeClass(h.value)},[r.createElementVNode("div",{class:"absolute top-0 left-0 h-full rounded-full transition-all duration-300 ease-out pointer-events-none",style:r.normalizeStyle({width:s.value.width,transform:s.value.transform,backgroundColor:c.value,zIndex:0})},null,4),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(n.options,R=>(r.openBlock(),r.createElementBlock("button",{key:R.value,type:"button",role:"tab","aria-selected":a.value===R.value?"true":"false","aria-disabled":n.disabled||R.disabled?"true":"false",disabled:n.disabled||R.disabled,class:r.normalizeClass([p.value,R.disabled?"opacity-50 cursor-not-allowed":"cursor-pointer",a.value===R.value?d.value:f.value]),onClick:S=>_(R)},[n.layout==="icon-only"&&R.icon?(r.openBlock(),r.createBlock(r.resolveDynamicComponent(g.value[R.icon]),{key:0,class:r.normalizeClass(y.value)},null,8,["class"])):n.layout==="default"?(r.openBlock(),r.createElementBlock(r.Fragment,{key:1},[R.icon?(r.openBlock(),r.createBlock(r.resolveDynamicComponent(g.value[R.icon]),{key:0,class:r.normalizeClass(y.value)},null,8,["class"])):r.createCommentVNode("",!0),R.label?(r.openBlock(),r.createElementBlock("span",jZ,r.toDisplayString(R.label),1)):r.createCommentVNode("",!0)],64)):n.layout==="icon-bottom"?(r.openBlock(),r.createElementBlock(r.Fragment,{key:2},[R.label?(r.openBlock(),r.createElementBlock("span",UZ,r.toDisplayString(R.label),1)):r.createCommentVNode("",!0),R.icon?(r.openBlock(),r.createBlock(r.resolveDynamicComponent(g.value[R.icon]),{key:1,class:r.normalizeClass(y.value)},null,8,["class"])):r.createCommentVNode("",!0)],64)):n.layout==="icon-start"?(r.openBlock(),r.createElementBlock(r.Fragment,{key:3},[R.icon?(r.openBlock(),r.createBlock(r.resolveDynamicComponent(g.value[R.icon]),{key:0,class:r.normalizeClass(y.value)},null,8,["class"])):r.createCommentVNode("",!0),R.label?(r.openBlock(),r.createElementBlock("span",WZ,r.toDisplayString(R.label),1)):r.createCommentVNode("",!0)],64)):n.layout==="icon-end"?(r.openBlock(),r.createElementBlock(r.Fragment,{key:4},[R.label?(r.openBlock(),r.createElementBlock("span",HZ,r.toDisplayString(R.label),1)):r.createCommentVNode("",!0),R.icon?(r.openBlock(),r.createBlock(r.resolveDynamicComponent(g.value[R.icon]),{key:1,class:r.normalizeClass(y.value)},null,8,["class"])):r.createCommentVNode("",!0)],64)):r.createCommentVNode("",!0)],10,zZ))),128))],2)):(r.openBlock(),r.createElementBlock("div",qZ," Tidak ada opsi segment. "))],64))],2))}}),[["__scopeId","data-v-83f4af28"]]),KZ=["aria-busy"],GZ={key:0,class:"h-4 w-32 rounded bg-gray-200 dark:bg-gray-700 animate-pulse"},YZ=["for"],ZZ={key:0,class:"ml-1 text-destructive"},XZ={class:"relative w-full group"},JZ=["id","value","placeholder"],QZ={key:1,class:"absolute top-1 right-3 z-10"},VZ={key:2,class:"absolute top-full right-0 z-10 text-[11px] text-gray-500 dark:text-gray-400 opacity-0 transition-opacity pointer-events-none group-focus-within:opacity-100"},eX={key:1,class:"text-xs text-destructive"},Cd=Sn(r.defineComponent({name:"DCodeTextarea",inheritAttrs:!1,__name:"DCodeTextarea",props:{modelValue:{},label:{},placeholder:{},clearable:{type:Boolean},required:{type:Boolean},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},visible:{type:Boolean,default:!0},skeleton:{type:Boolean,default:!1},error:{default:null},hideClearWhenEmpty:{type:Boolean,default:!0},textCase:{default:"none"},applyTextCaseToValue:{type:Boolean,default:!0},valueType:{default:"free"},allowSpaces:{type:Boolean,default:!0},allowChars:{},pattern:{},showCharCount:{type:Boolean,default:!0},returnNumber:{type:Boolean,default:!1},size:{default:"default"},rounded:{default:"lg"},smoothCaret:{type:Boolean,default:!0}},emits:["update:modelValue","clear"],setup(e,{emit:t}){const n=r.useAttrs(),o=t,i=e,s=r.computed(()=>n.label??i.label),a=r.computed(()=>n.placeholder??i.placeholder??""),l=r.computed(()=>i.visible??!0),c=r.computed(()=>{switch(i.size){case"sm":return"py-2 text-sm";case"lg":return"py-3 text-base";default:return"py-2.5 text-sm"}}),d=Math.random().toString(36).slice(2,7),f=r.computed(()=>`app-textarea-${n.id||s.value||"field"}-${d}`),h=r.computed(()=>{const de=n.required,Z=n["aria-required"];return de===""||de===!0||de==="true"||(Z==="true"||Z===!0)||i.required}),p=r.computed(()=>{const{label:de,class:Z,id:ee,required:pe,"aria-required":Be,...Te}=n,Oe={...Te};return i.disabled&&(Oe.disabled=!0),i.readonly&&(Oe.readonly=!0),Oe}),g=r.computed(()=>{const de=n.maxlength;let Z=Number.NaN;return typeof de=="number"?Z=de:typeof de=="string"&&(Z=Number.parseInt(de,10)),Number.isFinite(Z)&&Z>0?Z:-1}),y=de=>g.value>0?de.slice(0,g.value):de,b=r.computed(()=>{const de=i.modelValue;return de==null||String(de).length===0}),_=r.computed(()=>!i.clearable||i.disabled||i.readonly?!1:i.hideClearWhenEmpty?!b.value:!0),x=r.ref(String(i.modelValue??""));r.watch(()=>i.modelValue,de=>{const Z=String(de??"");Z!==x.value&&(x.value=Z)});const B=r.ref(!1),R=r.ref(!1),S=de=>de.split(/(\s+)/).map(Z=>{if(Z.trim()==="")return Z;const ee=Z.toLowerCase();return ee.charAt(0).toUpperCase()+ee.slice(1)}).join(""),O=de=>{const Z=de.toLowerCase(),ee=Z.search(new RegExp("\\p{L}","u"));return ee<0?Z:Z.slice(0,ee)+Z.charAt(ee).toUpperCase()+Z.slice(ee+1)},I=de=>{const Z=de.toLowerCase(),ee=Z.search(new RegExp("\\p{L}","u"));return ee<0?Z:Z.slice(0,ee)+Z.charAt(ee).toUpperCase()+Z.slice(ee+1)},D=de=>{switch(i.textCase?.toLowerCase()){case"uppercase":return de.toUpperCase();case"lowercase":return de.toLowerCase();case"titlecase":return S(de);case"capitalize":return I(de);case"sentencecase":return O(de);default:return de}},w=r.computed(()=>{switch(i.textCase?.toLowerCase()){case"uppercase":return"uppercase";case"lowercase":return"lowercase";default:return"none"}}),E=de=>{if(!de)return null;const Z=Array.isArray(de)?de.join(""):de;return Z?new Set(Z):null},F=r.computed(()=>E(i.allowChars)),A=(de,Z)=>(de.lastIndex=0,de.test(Z)),P=de=>{if(de===`
118
118
  `)return i.valueType!=="number";if(i.valueType==="free")return!0;const Z=de===" ",ee=/\d/.test(de),pe=new RegExp("\\p{L}","u").test(de),Be=new RegExp("\\p{N}","u").test(de),Te=/[\/\-_.,:]/.test(de);return i.valueType==="number"?ee:i.valueType==="letter"?pe||Te||i.allowSpaces&&Z:i.valueType==="letternumber"?pe||Be||Te||i.allowSpaces&&Z:!0},q=de=>{let Z="";for(const ee of de){const pe=!!F.value&&F.value.has(ee);i.pattern&&!pe&&!A(i.pattern,ee)||!pe&&!P(ee)||(Z+=ee)}return Z},Q=de=>{const Z=q(de),ee=i.applyTextCaseToValue?D(Z):Z;return y(ee)},re=r.ref(null),ie=r.computed(()=>i.smoothCaret&&!i.disabled&&!i.readonly),{caretStyle:le,caretVisible:X,hideNativeCaret:K,isCaretMoving:W,caretAnimate:se,refreshCaret:H}=Wx(re,ie);r.watch(x,H,{flush:"post"});const N=de=>{if(de==="")return null;if(i.valueType==="number"){const Z=de.replaceAll(`
119
- `,""),ee=Number(Z);return Number.isFinite(ee)?ee:null}return de},j=de=>{x.value=de,o("update:modelValue",N(de))},Y=(de,Z)=>{const ee=y(Z);R.value=!0,de.value=ee,j(ee),queueMicrotask(()=>R.value=!1)},J=(de,Z)=>{const ee=de.selectionStart??de.value.length,pe=de.selectionEnd??de.value.length;if(g.value>0){const Be=de.value.length-(pe-ee),Te=g.value-Be;if(Te<=0)return;Z=Z.slice(0,Te)}de.setRangeText(Z,ee,pe,"end"),Y(de,Q(de.value))},U=de=>{const Z=re.value;if(!Z||B.value||R.value||!de.inputType?.startsWith("insert"))return;const ee=de.data;if(ee==null)return;const pe=Q(ee);pe!==ee&&(de.preventDefault(),pe.length>0&&J(Z,pe))},k=de=>{const Z=re.value;if(!Z||B.value||R.value)return;const ee=de.clipboardData?.getData("text")??"",pe=Q(ee);pe!==ee&&(de.preventDefault(),pe.length>0&&J(Z,pe))},C=async()=>{const de=re.value;if(!de||B.value||R.value)return;const Z=de.value??"",ee=Q(Z);if(ee===Z){const pe=de.selectionStart??ee.length,Be=de.selectionEnd??ee.length;Y(de,ee),await r.nextTick();try{de.setSelectionRange(pe,Be)}catch{}j(ee)}else{const pe=de.selectionStart??ee.length,Be=de.selectionEnd??ee.length;Y(de,ee),await r.nextTick();try{de.setSelectionRange(pe,Be)}catch{}}},T=()=>B.value=!0,M=()=>{B.value=!1;const de=re.value;if(!de)return;const Z=de.value??"",ee=Q(Z);ee===Z?j(ee):Y(de,ee)};r.onMounted(()=>{const de=re.value;if(!de)return;const Z=de.value??"",ee=Z!==""?Z:x.value,pe=Q(ee);pe===ee?j(pe):Y(de,pe)}),r.onBeforeUnmount(()=>{});const $=()=>{x.value="",re.value&&(re.value.value=""),o("update:modelValue",null),o("clear")},ne=r.computed(()=>x.value.length),te=r.computed(()=>i.showCharCount?g.value>0:!1),ce=r.computed(()=>te.value&&ne.value>0),ke=r.computed(()=>`${ne.value} / ${g.value}`),we=r.computed(()=>!!i.error),_e=r.computed(()=>{const de=n.rows,Z=typeof de=="number"?de:Number.parseInt(String(de??""),10);return Number.isFinite(Z)&&Z>0?Z:3}),fe=r.computed(()=>({height:`${_e.value*24+16}px`}));return(de,Z)=>r.withDirectives((r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["flex flex-col gap-1 w-full",[r.unref(n).class,i.disabled?"cursor-not-allowed":""]]),"aria-busy":i.skeleton},[i.skeleton?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[s.value?(r.openBlock(),r.createElementBlock("div",GZ)):r.createCommentVNode("",!0),r.createElementVNode("div",{class:r.normalizeClass(["w-full bg-gray-200 dark:bg-gray-700 animate-pulse",r.unref(sn)(i.rounded)]),style:r.normalizeStyle(fe.value)},null,6)],64)):(r.openBlock(),r.createElementBlock(r.Fragment,{key:1},[s.value?(r.openBlock(),r.createElementBlock("label",{key:0,for:f.value,class:"text-sm font-medium"},[r.createTextVNode(r.toDisplayString(s.value)+" ",1),h.value?(r.openBlock(),r.createElementBlock("span",ZZ,"*")):r.createCommentVNode("",!0)],8,YZ)):r.createCommentVNode("",!0),r.createElementVNode("div",XZ,[r.createElementVNode("textarea",r.mergeProps({id:f.value,ref_key:"textareaRef",ref:re,value:x.value,placeholder:a.value},p.value,{onInput:C,onBeforeinput:U,onPaste:k,onCompositionstart:T,onCompositionend:M,style:`text-transform: ${w.value}; padding-right: ${_.value?"2.5rem":"0.75rem"} !important; padding-left: 0.75rem !important;`,class:["flex min-h-[120px] w-full border bg-white dark:bg-neutral-800 text-foreground dark:text-gray-300 border-gray-300 dark:border-neutral-700/50 focus:ring-1 focus:ring-neutral-400 dark:focus:ring-neutral-600 placeholder:text-muted-foreground focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 readonly:bg-neutral-50/50 dark:readonly:bg-neutral-900/30",[c.value,r.unref(sn)(i.rounded),we.value?"border-destructive focus-visible:ring-destructive focus:ring-destructive":"",r.unref(K)?"dcode-caret-transparent":""]]}),null,16,JZ),ie.value?(r.openBlock(),r.createElementBlock("span",{key:0,"aria-hidden":"true",class:r.normalizeClass(["pointer-events-none absolute left-0 top-0 z-[1] w-[2px] rounded-full bg-primary will-change-transform motion-reduce:transition-none",[r.unref(X)?"opacity-100":"opacity-0",r.unref(se)?"transition-[transform,opacity] duration-100 ease-out":"transition-none",r.unref(X)&&!r.unref(W)?"dcode-animate-caret-blink":""]]),style:r.normalizeStyle(r.unref(le))},null,6)):r.createCommentVNode("",!0),_.value?(r.openBlock(),r.createElementBlock("div",QZ,[r.createVNode(Lr,{"aria-label":"Clear textarea",disabled:i.disabled,onClear:$},null,8,["disabled"])])):r.createCommentVNode("",!0),ce.value&&!we.value?(r.openBlock(),r.createElementBlock("p",VZ,r.toDisplayString(ke.value),1)):r.createCommentVNode("",!0)]),we.value?(r.openBlock(),r.createElementBlock("p",eX,r.toDisplayString(i.error),1)):r.createCommentVNode("",!0)],64))],10,KZ)),[[r.vShow,l.value]])}}),[["__scopeId","data-v-75b8af3b"]]);var Sf={exports:{}};var tX=Sf.exports,X2;function nX(){return X2||(X2=1,(function(e,t){(function(n,o){o(t)})(tX,(function(n){var o="1.9.4";function i(u){var m,v,z,V;for(v=1,z=arguments.length;v<z;v++){V=arguments[v];for(m in V)u[m]=V[m]}return u}var s=Object.create||(function(){function u(){}return function(m){return u.prototype=m,new u}})();function a(u,m){var v=Array.prototype.slice;if(u.bind)return u.bind.apply(u,v.call(arguments,1));var z=v.call(arguments,2);return function(){return u.apply(m,z.length?z.concat(v.call(arguments)):arguments)}}var l=0;function c(u){return"_leaflet_id"in u||(u._leaflet_id=++l),u._leaflet_id}function d(u,m,v){var z,V,ue,Ee;return Ee=function(){z=!1,V&&(ue.apply(v,V),V=!1)},ue=function(){z?V=arguments:(u.apply(v,arguments),setTimeout(Ee,m),z=!0)},ue}function f(u,m,v){var z=m[1],V=m[0],ue=z-V;return u===z&&v?u:((u-V)%ue+ue)%ue+V}function h(){return!1}function p(u,m){if(m===!1)return u;var v=Math.pow(10,m===void 0?6:m);return Math.round(u*v)/v}function g(u){return u.trim?u.trim():u.replace(/^\s+|\s+$/g,"")}function y(u){return g(u).split(/\s+/)}function b(u,m){Object.prototype.hasOwnProperty.call(u,"options")||(u.options=u.options?s(u.options):{});for(var v in m)u.options[v]=m[v];return u.options}function _(u,m,v){var z=[];for(var V in u)z.push(encodeURIComponent(v?V.toUpperCase():V)+"="+encodeURIComponent(u[V]));return(!m||m.indexOf("?")===-1?"?":"&")+z.join("&")}var x=/\{ *([\w_ -]+) *\}/g;function B(u,m){return u.replace(x,function(v,z){var V=m[z];if(V===void 0)throw new Error("No value provided for variable "+v);return typeof V=="function"&&(V=V(m)),V})}var R=Array.isArray||function(u){return Object.prototype.toString.call(u)==="[object Array]"};function S(u,m){for(var v=0;v<u.length;v++)if(u[v]===m)return v;return-1}var O="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function I(u){return window["webkit"+u]||window["moz"+u]||window["ms"+u]}var D=0;function w(u){var m=+new Date,v=Math.max(0,16-(m-D));return D=m+v,window.setTimeout(u,v)}var E=window.requestAnimationFrame||I("RequestAnimationFrame")||w,F=window.cancelAnimationFrame||I("CancelAnimationFrame")||I("CancelRequestAnimationFrame")||function(u){window.clearTimeout(u)};function A(u,m,v){if(v&&E===w)u.call(m);else return E.call(window,a(u,m))}function P(u){u&&F.call(window,u)}var q={__proto__:null,extend:i,create:s,bind:a,get lastId(){return l},stamp:c,throttle:d,wrapNum:f,falseFn:h,formatNum:p,trim:g,splitWords:y,setOptions:b,getParamString:_,template:B,isArray:R,indexOf:S,emptyImageUrl:O,requestFn:E,cancelFn:F,requestAnimFrame:A,cancelAnimFrame:P};function Q(){}Q.extend=function(u){var m=function(){b(this),this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},v=m.__super__=this.prototype,z=s(v);z.constructor=m,m.prototype=z;for(var V in this)Object.prototype.hasOwnProperty.call(this,V)&&V!=="prototype"&&V!=="__super__"&&(m[V]=this[V]);return u.statics&&i(m,u.statics),u.includes&&(re(u.includes),i.apply(null,[z].concat(u.includes))),i(z,u),delete z.statics,delete z.includes,z.options&&(z.options=v.options?s(v.options):{},i(z.options,u.options)),z._initHooks=[],z.callInitHooks=function(){if(!this._initHooksCalled){v.callInitHooks&&v.callInitHooks.call(this),this._initHooksCalled=!0;for(var ue=0,Ee=z._initHooks.length;ue<Ee;ue++)z._initHooks[ue].call(this)}},m},Q.include=function(u){var m=this.prototype.options;return i(this.prototype,u),u.options&&(this.prototype.options=m,this.mergeOptions(u.options)),this},Q.mergeOptions=function(u){return i(this.prototype.options,u),this},Q.addInitHook=function(u){var m=Array.prototype.slice.call(arguments,1),v=typeof u=="function"?u:function(){this[u].apply(this,m)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(v),this};function re(u){if(!(typeof L>"u"||!L||!L.Mixin)){u=R(u)?u:[u];for(var m=0;m<u.length;m++)u[m]===L.Mixin.Events&&console.warn("Deprecated include of L.Mixin.Events: this property will be removed in future releases, please inherit from L.Evented instead.",new Error().stack)}}var ie={on:function(u,m,v){if(typeof u=="object")for(var z in u)this._on(z,u[z],m);else{u=y(u);for(var V=0,ue=u.length;V<ue;V++)this._on(u[V],m,v)}return this},off:function(u,m,v){if(!arguments.length)delete this._events;else if(typeof u=="object")for(var z in u)this._off(z,u[z],m);else{u=y(u);for(var V=arguments.length===1,ue=0,Ee=u.length;ue<Ee;ue++)V?this._off(u[ue]):this._off(u[ue],m,v)}return this},_on:function(u,m,v,z){if(typeof m!="function"){console.warn("wrong listener type: "+typeof m);return}if(this._listens(u,m,v)===!1){v===this&&(v=void 0);var V={fn:m,ctx:v};z&&(V.once=!0),this._events=this._events||{},this._events[u]=this._events[u]||[],this._events[u].push(V)}},_off:function(u,m,v){var z,V,ue;if(this._events&&(z=this._events[u],!!z)){if(arguments.length===1){if(this._firingCount)for(V=0,ue=z.length;V<ue;V++)z[V].fn=h;delete this._events[u];return}if(typeof m!="function"){console.warn("wrong listener type: "+typeof m);return}var Ee=this._listens(u,m,v);if(Ee!==!1){var Me=z[Ee];this._firingCount&&(Me.fn=h,this._events[u]=z=z.slice()),z.splice(Ee,1)}}},fire:function(u,m,v){if(!this.listens(u,v))return this;var z=i({},m,{type:u,target:this,sourceTarget:m&&m.sourceTarget||this});if(this._events){var V=this._events[u];if(V){this._firingCount=this._firingCount+1||1;for(var ue=0,Ee=V.length;ue<Ee;ue++){var Me=V[ue],$e=Me.fn;Me.once&&this.off(u,$e,Me.ctx),$e.call(Me.ctx||this,z)}this._firingCount--}}return v&&this._propagateEvent(z),this},listens:function(u,m,v,z){typeof u!="string"&&console.warn('"string" type argument expected');var V=m;typeof m!="function"&&(z=!!m,V=void 0,v=void 0);var ue=this._events&&this._events[u];if(ue&&ue.length&&this._listens(u,V,v)!==!1)return!0;if(z){for(var Ee in this._eventParents)if(this._eventParents[Ee].listens(u,m,v,z))return!0}return!1},_listens:function(u,m,v){if(!this._events)return!1;var z=this._events[u]||[];if(!m)return!!z.length;v===this&&(v=void 0);for(var V=0,ue=z.length;V<ue;V++)if(z[V].fn===m&&z[V].ctx===v)return V;return!1},once:function(u,m,v){if(typeof u=="object")for(var z in u)this._on(z,u[z],m,!0);else{u=y(u);for(var V=0,ue=u.length;V<ue;V++)this._on(u[V],m,v,!0)}return this},addEventParent:function(u){return this._eventParents=this._eventParents||{},this._eventParents[c(u)]=u,this},removeEventParent:function(u){return this._eventParents&&delete this._eventParents[c(u)],this},_propagateEvent:function(u){for(var m in this._eventParents)this._eventParents[m].fire(u.type,i({layer:u.target,propagatedFrom:u.target},u),!0)}};ie.addEventListener=ie.on,ie.removeEventListener=ie.clearAllEventListeners=ie.off,ie.addOneTimeEventListener=ie.once,ie.fireEvent=ie.fire,ie.hasEventListeners=ie.listens;var le=Q.extend(ie);function X(u,m,v){this.x=v?Math.round(u):u,this.y=v?Math.round(m):m}var K=Math.trunc||function(u){return u>0?Math.floor(u):Math.ceil(u)};X.prototype={clone:function(){return new X(this.x,this.y)},add:function(u){return this.clone()._add(W(u))},_add:function(u){return this.x+=u.x,this.y+=u.y,this},subtract:function(u){return this.clone()._subtract(W(u))},_subtract:function(u){return this.x-=u.x,this.y-=u.y,this},divideBy:function(u){return this.clone()._divideBy(u)},_divideBy:function(u){return this.x/=u,this.y/=u,this},multiplyBy:function(u){return this.clone()._multiplyBy(u)},_multiplyBy:function(u){return this.x*=u,this.y*=u,this},scaleBy:function(u){return new X(this.x*u.x,this.y*u.y)},unscaleBy:function(u){return new X(this.x/u.x,this.y/u.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=K(this.x),this.y=K(this.y),this},distanceTo:function(u){u=W(u);var m=u.x-this.x,v=u.y-this.y;return Math.sqrt(m*m+v*v)},equals:function(u){return u=W(u),u.x===this.x&&u.y===this.y},contains:function(u){return u=W(u),Math.abs(u.x)<=Math.abs(this.x)&&Math.abs(u.y)<=Math.abs(this.y)},toString:function(){return"Point("+p(this.x)+", "+p(this.y)+")"}};function W(u,m,v){return u instanceof X?u:R(u)?new X(u[0],u[1]):u==null?u:typeof u=="object"&&"x"in u&&"y"in u?new X(u.x,u.y):new X(u,m,v)}function se(u,m){if(u)for(var v=m?[u,m]:u,z=0,V=v.length;z<V;z++)this.extend(v[z])}se.prototype={extend:function(u){var m,v;if(!u)return this;if(u instanceof X||typeof u[0]=="number"||"x"in u)m=v=W(u);else if(u=H(u),m=u.min,v=u.max,!m||!v)return this;return!this.min&&!this.max?(this.min=m.clone(),this.max=v.clone()):(this.min.x=Math.min(m.x,this.min.x),this.max.x=Math.max(v.x,this.max.x),this.min.y=Math.min(m.y,this.min.y),this.max.y=Math.max(v.y,this.max.y)),this},getCenter:function(u){return W((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,u)},getBottomLeft:function(){return W(this.min.x,this.max.y)},getTopRight:function(){return W(this.max.x,this.min.y)},getTopLeft:function(){return this.min},getBottomRight:function(){return this.max},getSize:function(){return this.max.subtract(this.min)},contains:function(u){var m,v;return typeof u[0]=="number"||u instanceof X?u=W(u):u=H(u),u instanceof se?(m=u.min,v=u.max):m=v=u,m.x>=this.min.x&&v.x<=this.max.x&&m.y>=this.min.y&&v.y<=this.max.y},intersects:function(u){u=H(u);var m=this.min,v=this.max,z=u.min,V=u.max,ue=V.x>=m.x&&z.x<=v.x,Ee=V.y>=m.y&&z.y<=v.y;return ue&&Ee},overlaps:function(u){u=H(u);var m=this.min,v=this.max,z=u.min,V=u.max,ue=V.x>m.x&&z.x<v.x,Ee=V.y>m.y&&z.y<v.y;return ue&&Ee},isValid:function(){return!!(this.min&&this.max)},pad:function(u){var m=this.min,v=this.max,z=Math.abs(m.x-v.x)*u,V=Math.abs(m.y-v.y)*u;return H(W(m.x-z,m.y-V),W(v.x+z,v.y+V))},equals:function(u){return u?(u=H(u),this.min.equals(u.getTopLeft())&&this.max.equals(u.getBottomRight())):!1}};function H(u,m){return!u||u instanceof se?u:new se(u,m)}function N(u,m){if(u)for(var v=m?[u,m]:u,z=0,V=v.length;z<V;z++)this.extend(v[z])}N.prototype={extend:function(u){var m=this._southWest,v=this._northEast,z,V;if(u instanceof Y)z=u,V=u;else if(u instanceof N){if(z=u._southWest,V=u._northEast,!z||!V)return this}else return u?this.extend(J(u)||j(u)):this;return!m&&!v?(this._southWest=new Y(z.lat,z.lng),this._northEast=new Y(V.lat,V.lng)):(m.lat=Math.min(z.lat,m.lat),m.lng=Math.min(z.lng,m.lng),v.lat=Math.max(V.lat,v.lat),v.lng=Math.max(V.lng,v.lng)),this},pad:function(u){var m=this._southWest,v=this._northEast,z=Math.abs(m.lat-v.lat)*u,V=Math.abs(m.lng-v.lng)*u;return new N(new Y(m.lat-z,m.lng-V),new Y(v.lat+z,v.lng+V))},getCenter:function(){return new Y((this._southWest.lat+this._northEast.lat)/2,(this._southWest.lng+this._northEast.lng)/2)},getSouthWest:function(){return this._southWest},getNorthEast:function(){return this._northEast},getNorthWest:function(){return new Y(this.getNorth(),this.getWest())},getSouthEast:function(){return new Y(this.getSouth(),this.getEast())},getWest:function(){return this._southWest.lng},getSouth:function(){return this._southWest.lat},getEast:function(){return this._northEast.lng},getNorth:function(){return this._northEast.lat},contains:function(u){typeof u[0]=="number"||u instanceof Y||"lat"in u?u=J(u):u=j(u);var m=this._southWest,v=this._northEast,z,V;return u instanceof N?(z=u.getSouthWest(),V=u.getNorthEast()):z=V=u,z.lat>=m.lat&&V.lat<=v.lat&&z.lng>=m.lng&&V.lng<=v.lng},intersects:function(u){u=j(u);var m=this._southWest,v=this._northEast,z=u.getSouthWest(),V=u.getNorthEast(),ue=V.lat>=m.lat&&z.lat<=v.lat,Ee=V.lng>=m.lng&&z.lng<=v.lng;return ue&&Ee},overlaps:function(u){u=j(u);var m=this._southWest,v=this._northEast,z=u.getSouthWest(),V=u.getNorthEast(),ue=V.lat>m.lat&&z.lat<v.lat,Ee=V.lng>m.lng&&z.lng<v.lng;return ue&&Ee},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(u,m){return u?(u=j(u),this._southWest.equals(u.getSouthWest(),m)&&this._northEast.equals(u.getNorthEast(),m)):!1},isValid:function(){return!!(this._southWest&&this._northEast)}};function j(u,m){return u instanceof N?u:new N(u,m)}function Y(u,m,v){if(isNaN(u)||isNaN(m))throw new Error("Invalid LatLng object: ("+u+", "+m+")");this.lat=+u,this.lng=+m,v!==void 0&&(this.alt=+v)}Y.prototype={equals:function(u,m){if(!u)return!1;u=J(u);var v=Math.max(Math.abs(this.lat-u.lat),Math.abs(this.lng-u.lng));return v<=(m===void 0?1e-9:m)},toString:function(u){return"LatLng("+p(this.lat,u)+", "+p(this.lng,u)+")"},distanceTo:function(u){return k.distance(this,J(u))},wrap:function(){return k.wrapLatLng(this)},toBounds:function(u){var m=180*u/40075017,v=m/Math.cos(Math.PI/180*this.lat);return j([this.lat-m,this.lng-v],[this.lat+m,this.lng+v])},clone:function(){return new Y(this.lat,this.lng,this.alt)}};function J(u,m,v){return u instanceof Y?u:R(u)&&typeof u[0]!="object"?u.length===3?new Y(u[0],u[1],u[2]):u.length===2?new Y(u[0],u[1]):null:u==null?u:typeof u=="object"&&"lat"in u?new Y(u.lat,"lng"in u?u.lng:u.lon,u.alt):m===void 0?null:new Y(u,m,v)}var U={latLngToPoint:function(u,m){var v=this.projection.project(u),z=this.scale(m);return this.transformation._transform(v,z)},pointToLatLng:function(u,m){var v=this.scale(m),z=this.transformation.untransform(u,v);return this.projection.unproject(z)},project:function(u){return this.projection.project(u)},unproject:function(u){return this.projection.unproject(u)},scale:function(u){return 256*Math.pow(2,u)},zoom:function(u){return Math.log(u/256)/Math.LN2},getProjectedBounds:function(u){if(this.infinite)return null;var m=this.projection.bounds,v=this.scale(u),z=this.transformation.transform(m.min,v),V=this.transformation.transform(m.max,v);return new se(z,V)},infinite:!1,wrapLatLng:function(u){var m=this.wrapLng?f(u.lng,this.wrapLng,!0):u.lng,v=this.wrapLat?f(u.lat,this.wrapLat,!0):u.lat,z=u.alt;return new Y(v,m,z)},wrapLatLngBounds:function(u){var m=u.getCenter(),v=this.wrapLatLng(m),z=m.lat-v.lat,V=m.lng-v.lng;if(z===0&&V===0)return u;var ue=u.getSouthWest(),Ee=u.getNorthEast(),Me=new Y(ue.lat-z,ue.lng-V),$e=new Y(Ee.lat-z,Ee.lng-V);return new N(Me,$e)}},k=i({},U,{wrapLng:[-180,180],R:6371e3,distance:function(u,m){var v=Math.PI/180,z=u.lat*v,V=m.lat*v,ue=Math.sin((m.lat-u.lat)*v/2),Ee=Math.sin((m.lng-u.lng)*v/2),Me=ue*ue+Math.cos(z)*Math.cos(V)*Ee*Ee,$e=2*Math.atan2(Math.sqrt(Me),Math.sqrt(1-Me));return this.R*$e}}),C=6378137,T={R:C,MAX_LATITUDE:85.0511287798,project:function(u){var m=Math.PI/180,v=this.MAX_LATITUDE,z=Math.max(Math.min(v,u.lat),-v),V=Math.sin(z*m);return new X(this.R*u.lng*m,this.R*Math.log((1+V)/(1-V))/2)},unproject:function(u){var m=180/Math.PI;return new Y((2*Math.atan(Math.exp(u.y/this.R))-Math.PI/2)*m,u.x*m/this.R)},bounds:(function(){var u=C*Math.PI;return new se([-u,-u],[u,u])})()};function M(u,m,v,z){if(R(u)){this._a=u[0],this._b=u[1],this._c=u[2],this._d=u[3];return}this._a=u,this._b=m,this._c=v,this._d=z}M.prototype={transform:function(u,m){return this._transform(u.clone(),m)},_transform:function(u,m){return m=m||1,u.x=m*(this._a*u.x+this._b),u.y=m*(this._c*u.y+this._d),u},untransform:function(u,m){return m=m||1,new X((u.x/m-this._b)/this._a,(u.y/m-this._d)/this._c)}};function $(u,m,v,z){return new M(u,m,v,z)}var ne=i({},k,{code:"EPSG:3857",projection:T,transformation:(function(){var u=.5/(Math.PI*T.R);return $(u,.5,-u,.5)})()}),te=i({},ne,{code:"EPSG:900913"});function ce(u){return document.createElementNS("http://www.w3.org/2000/svg",u)}function ke(u,m){var v="",z,V,ue,Ee,Me,$e;for(z=0,ue=u.length;z<ue;z++){for(Me=u[z],V=0,Ee=Me.length;V<Ee;V++)$e=Me[V],v+=(V?"L":"M")+$e.x+" "+$e.y;v+=m?kt.svg?"z":"x":""}return v||"M0 0"}var we=document.documentElement.style,_e="ActiveXObject"in window,fe=_e&&!document.addEventListener,de="msLaunchUri"in navigator&&!("documentMode"in document),Z=Ro("webkit"),ee=Ro("android"),pe=Ro("android 2")||Ro("android 3"),Be=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),Te=ee&&Ro("Google")&&Be<537&&!("AudioNode"in window),Oe=!!window.opera,Fe=!de&&Ro("chrome"),Ue=Ro("gecko")&&!Z&&!Oe&&!_e,Qe=!Fe&&Ro("safari"),Ve=Ro("phantom"),Xe="OTransition"in we,he=navigator.platform.indexOf("Win")===0,Ce=_e&&"transition"in we,Pe="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!pe,qe="MozPerspective"in we,Se=!window.L_DISABLE_3D&&(Ce||Pe||qe)&&!Xe&&!Ve,Ie=typeof orientation<"u"||Ro("mobile"),Je=Ie&&Z,wt=Ie&&Pe,gt=!window.PointerEvent&&window.MSPointerEvent,Re=!!(window.PointerEvent||gt),Le="ontouchstart"in window||!!window.TouchEvent,ve=!window.L_NO_TOUCH&&(Le||Re),Ne=Ie&&Oe,Ge=Ie&&Ue,pt=(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1,Tt=(function(){var u=!1;try{var m=Object.defineProperty({},"passive",{get:function(){u=!0}});window.addEventListener("testPassiveEventSupport",h,m),window.removeEventListener("testPassiveEventSupport",h,m)}catch{}return u})(),At=(function(){return!!document.createElement("canvas").getContext})(),rt=!!(document.createElementNS&&ce("svg").createSVGRect),ht=!!rt&&(function(){var u=document.createElement("div");return u.innerHTML="<svg/>",(u.firstChild&&u.firstChild.namespaceURI)==="http://www.w3.org/2000/svg"})(),Nt=!rt&&(function(){try{var u=document.createElement("div");u.innerHTML='<v:shape adj="1"/>';var m=u.firstChild;return m.style.behavior="url(#default#VML)",m&&typeof m.adj=="object"}catch{return!1}})(),wn=navigator.platform.indexOf("Mac")===0,qn=navigator.platform.indexOf("Linux")===0;function Ro(u){return navigator.userAgent.toLowerCase().indexOf(u)>=0}var kt={ie:_e,ielt9:fe,edge:de,webkit:Z,android:ee,android23:pe,androidStock:Te,opera:Oe,chrome:Fe,gecko:Ue,safari:Qe,phantom:Ve,opera12:Xe,win:he,ie3d:Ce,webkit3d:Pe,gecko3d:qe,any3d:Se,mobile:Ie,mobileWebkit:Je,mobileWebkit3d:wt,msPointer:gt,pointer:Re,touch:ve,touchNative:Le,mobileOpera:Ne,mobileGecko:Ge,retina:pt,passiveEvents:Tt,canvas:At,svg:rt,vml:Nt,inlineSvg:ht,mac:wn,linux:qn},Mr=kt.msPointer?"MSPointerDown":"pointerdown",Ea=kt.msPointer?"MSPointerMove":"pointermove",jn=kt.msPointer?"MSPointerUp":"pointerup",Zi=kt.msPointer?"MSPointerCancel":"pointercancel",Al={touchstart:Mr,touchmove:Ea,touchend:jn,touchcancel:Zi},lr={touchstart:Ca,touchmove:Bl,touchend:Bl,touchcancel:Bl},xi={},Xi=!1;function Tl(u,m,v){return m==="touchstart"&&Su(),lr[m]?(v=lr[m].bind(this,v),u.addEventListener(Al[m],v,!1),v):(console.warn("wrong event specified:",m),h)}function Cu(u,m,v){if(!Al[m]){console.warn("wrong event specified:",m);return}u.removeEventListener(Al[m],v,!1)}function im(u){xi[u.pointerId]=u}function Ei(u){xi[u.pointerId]&&(xi[u.pointerId]=u)}function Wc(u){delete xi[u.pointerId]}function Su(){Xi||(document.addEventListener(Mr,im,!0),document.addEventListener(Ea,Ei,!0),document.addEventListener(jn,Wc,!0),document.addEventListener(Zi,Wc,!0),Xi=!0)}function Bl(u,m){if(m.pointerType!==(m.MSPOINTER_TYPE_MOUSE||"mouse")){m.touches=[];for(var v in xi)m.touches.push(xi[v]);m.changedTouches=[m],u(m)}}function Ca(u,m){m.MSPOINTER_TYPE_TOUCH&&m.pointerType===m.MSPOINTER_TYPE_TOUCH&&Ao(m),Bl(u,m)}function Un(u){var m={},v,z;for(z in u)v=u[z],m[z]=v&&v.bind?v.bind(u):v;return u=m,m.type="dblclick",m.detail=2,m.isTrusted=!1,m._simulated=!0,m}var Ji=200;function sm(u,m){u.addEventListener("dblclick",m);var v=0,z;function V(ue){if(ue.detail!==1){z=ue.detail;return}if(!(ue.pointerType==="mouse"||ue.sourceCapabilities&&!ue.sourceCapabilities.firesTouchEvents)){var Ee=db(ue);if(!(Ee.some(function($e){return $e instanceof HTMLLabelElement&&$e.attributes.for})&&!Ee.some(function($e){return $e instanceof HTMLInputElement||$e instanceof HTMLSelectElement}))){var Me=Date.now();Me-v<=Ji?(z++,z===2&&m(Un(ue))):z=1,v=Me}}}return u.addEventListener("click",V),{dblclick:m,simDblclick:V}}function tt(u,m){u.removeEventListener("dblclick",m.dblclick),u.removeEventListener("click",m.simDblclick)}var _t=Ns(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),Ft=Ns(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),tn=Ft==="webkitTransition"||Ft==="OTransition"?Ft+"End":"transitionend";function $n(u){return typeof u=="string"?document.getElementById(u):u}function Io(u,m){var v=u.style[m]||u.currentStyle&&u.currentStyle[m];if((!v||v==="auto")&&document.defaultView){var z=document.defaultView.getComputedStyle(u,null);v=z?z[m]:null}return v==="auto"?null:v}function Wt(u,m,v){var z=document.createElement(u);return z.className=m||"",v&&v.appendChild(z),z}function bn(u){var m=u.parentNode;m&&m.removeChild(u)}function kn(u){for(;u.firstChild;)u.removeChild(u.firstChild)}function ro(u){var m=u.parentNode;m&&m.lastChild!==u&&m.appendChild(u)}function jo(u){var m=u.parentNode;m&&m.firstChild!==u&&m.insertBefore(u,m.firstChild)}function Rn(u,m){if(u.classList!==void 0)return u.classList.contains(m);var v=Pl(u);return v.length>0&&new RegExp("(^|\\s)"+m+"(\\s|$)").test(v)}function $t(u,m){if(u.classList!==void 0)for(var v=y(m),z=0,V=v.length;z<V;z++)u.classList.add(v[z]);else if(!Rn(u,m)){var ue=Pl(u);Sa(u,(ue?ue+" ":"")+m)}}function Kn(u,m){u.classList!==void 0?u.classList.remove(m):Sa(u,g((" "+Pl(u)+" ").replace(" "+m+" "," ")))}function Sa(u,m){u.className.baseVal===void 0?u.className=m:u.className.baseVal=m}function Pl(u){return u.correspondingElement&&(u=u.correspondingElement),u.className.baseVal===void 0?u.className:u.className.baseVal}function cr(u,m){"opacity"in u.style?u.style.opacity=m:"filter"in u.style&&Aa(u,m)}function Aa(u,m){var v=!1,z="DXImageTransform.Microsoft.Alpha";try{v=u.filters.item(z)}catch{if(m===1)return}m=Math.round(m*100),v?(v.Enabled=m!==100,v.Opacity=m):u.style.filter+=" progid:"+z+"(opacity="+m+")"}function Ns(u){for(var m=document.documentElement.style,v=0;v<u.length;v++)if(u[v]in m)return u[v];return!1}function bo(u,m,v){var z=m||new X(0,0);u.style[_t]=(kt.ie3d?"translate("+z.x+"px,"+z.y+"px)":"translate3d("+z.x+"px,"+z.y+"px,0)")+(v?" scale("+v+")":"")}function Gn(u,m){u._leaflet_pos=m,kt.any3d?bo(u,m):(u.style.left=m.x+"px",u.style.top=m.y+"px")}function br(u){return u._leaflet_pos||new X(0,0)}var Dt,Ds,io;if("onselectstart"in document)Dt=function(){Pt(window,"selectstart",Ao)},Ds=function(){Cn(window,"selectstart",Ao)};else{var fn=Ns(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);Dt=function(){if(fn){var u=document.documentElement.style;io=u[fn],u[fn]="none"}},Ds=function(){fn&&(document.documentElement.style[fn]=io,io=void 0)}}function Oo(){Pt(window,"dragstart",Ao)}function Qr(){Cn(window,"dragstart",Ao)}var Kt,Ta;function it(u){for(;u.tabIndex===-1;)u=u.parentNode;u.style&&(vt(),Kt=u,Ta=u.style.outlineStyle,u.style.outlineStyle="none",Pt(window,"keydown",vt))}function vt(){Kt&&(Kt.style.outlineStyle=Ta,Kt=void 0,Ta=void 0,Cn(window,"keydown",vt))}function jt(u){do u=u.parentNode;while((!u.offsetWidth||!u.offsetHeight)&&u!==document.body);return u}function hn(u){var m=u.getBoundingClientRect();return{x:m.width/u.offsetWidth||1,y:m.height/u.offsetHeight||1,boundingClientRect:m}}var yo={__proto__:null,TRANSFORM:_t,TRANSITION:Ft,TRANSITION_END:tn,get:$n,getStyle:Io,create:Wt,remove:bn,empty:kn,toFront:ro,toBack:jo,hasClass:Rn,addClass:$t,removeClass:Kn,setClass:Sa,getClass:Pl,setOpacity:cr,testProp:Ns,setTransform:bo,setPosition:Gn,getPosition:br,get disableTextSelection(){return Dt},get enableTextSelection(){return Ds},disableImageDrag:Oo,enableImageDrag:Qr,preventOutline:it,restoreOutline:vt,getSizedParentNode:jt,getScale:hn};function Pt(u,m,v,z){if(m&&typeof m=="object")for(var V in m)vo(u,V,m[V],v);else{m=y(m);for(var ue=0,Ee=m.length;ue<Ee;ue++)vo(u,m[ue],v,z)}return this}var dr="_leaflet_events";function Cn(u,m,v,z){if(arguments.length===1)Au(u),delete u[dr];else if(m&&typeof m=="object")for(var V in m)am(u,V,m[V],v);else if(m=y(m),arguments.length===2)Au(u,function(Me){return S(m,Me)!==-1});else for(var ue=0,Ee=m.length;ue<Ee;ue++)am(u,m[ue],v,z);return this}function Au(u,m){for(var v in u[dr]){var z=v.split(/\d/)[0];(!m||m(z))&&am(u,z,null,null,v)}}var Tu={mouseenter:"mouseover",mouseleave:"mouseout",wheel:!("onwheel"in window)&&"mousewheel"};function vo(u,m,v,z){var V=m+c(v)+(z?"_"+c(z):"");if(u[dr]&&u[dr][V])return this;var ue=function(Me){return v.call(z||u,Me||window.event)},Ee=ue;!kt.touchNative&&kt.pointer&&m.indexOf("touch")===0?ue=Tl(u,m,ue):kt.touch&&m==="dblclick"?ue=sm(u,ue):"addEventListener"in u?m==="touchstart"||m==="touchmove"||m==="wheel"||m==="mousewheel"?u.addEventListener(Tu[m]||m,ue,kt.passiveEvents?{passive:!1}:!1):m==="mouseenter"||m==="mouseleave"?(ue=function(Me){Me=Me||window.event,Ci(u,Me)&&Ee(Me)},u.addEventListener(Tu[m],ue,!1)):u.addEventListener(m,Ee,!1):u.attachEvent("on"+m,ue),u[dr]=u[dr]||{},u[dr][V]=ue}function am(u,m,v,z,V){V=V||m+c(v)+(z?"_"+c(z):"");var ue=u[dr]&&u[dr][V];if(!ue)return this;!kt.touchNative&&kt.pointer&&m.indexOf("touch")===0?Cu(u,m,ue):kt.touch&&m==="dblclick"?tt(u,ue):"removeEventListener"in u?u.removeEventListener(Tu[m]||m,ue,!1):u.detachEvent("on"+m,ue),u[dr][V]=null}function Ms(u){return u.stopPropagation?u.stopPropagation():u.originalEvent?u.originalEvent._stopped=!0:u.cancelBubble=!0,this}function Bu(u){return vo(u,"wheel",Ms),this}function Nl(u){return Pt(u,"mousedown touchstart dblclick contextmenu",Ms),u._leaflet_disable_click=!0,this}function Ao(u){return u.preventDefault?u.preventDefault():u.returnValue=!1,this}function Qi(u){return Ao(u),Ms(u),this}function db(u){if(u.composedPath)return u.composedPath();for(var m=[],v=u.target;v;)m.push(v),v=v.parentNode;return m}function ub(u,m){if(!m)return new X(u.clientX,u.clientY);var v=hn(m),z=v.boundingClientRect;return new X((u.clientX-z.left)/v.x-m.clientLeft,(u.clientY-z.top)/v.y-m.clientTop)}var o1=kt.linux&&kt.chrome?window.devicePixelRatio:kt.mac?window.devicePixelRatio*3:window.devicePixelRatio>0?2*window.devicePixelRatio:1;function Hc(u){return kt.edge?u.wheelDeltaY/2:u.deltaY&&u.deltaMode===0?-u.deltaY/o1:u.deltaY&&u.deltaMode===1?-u.deltaY*20:u.deltaY&&u.deltaMode===2?-u.deltaY*60:u.deltaX||u.deltaZ?0:u.wheelDelta?(u.wheelDeltaY||u.wheelDelta)/2:u.detail&&Math.abs(u.detail)<32765?-u.detail*20:u.detail?u.detail/-32765*60:0}function Ci(u,m){var v=m.relatedTarget;if(!v)return!0;try{for(;v&&v!==u;)v=v.parentNode}catch{return!1}return v!==u}var r1={__proto__:null,on:Pt,off:Cn,stopPropagation:Ms,disableScrollPropagation:Bu,disableClickPropagation:Nl,preventDefault:Ao,stop:Qi,getPropagationPath:db,getMousePosition:ub,getWheelDelta:Hc,isExternalTarget:Ci,addListener:Pt,removeListener:Cn},fb=le.extend({run:function(u,m,v,z){this.stop(),this._el=u,this._inProgress=!0,this._duration=v||.25,this._easeOutPower=1/Math.max(z||.5,.2),this._startPos=br(u),this._offset=m.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=A(this._animate,this),this._step()},_step:function(u){var m=+new Date-this._startTime,v=this._duration*1e3;m<v?this._runFrame(this._easeOut(m/v),u):(this._runFrame(1),this._complete())},_runFrame:function(u,m){var v=this._startPos.add(this._offset.multiplyBy(u));m&&v._round(),Gn(this._el,v),this.fire("step")},_complete:function(){P(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(u){return 1-Math.pow(1-u,this._easeOutPower)}}),ln=le.extend({options:{crs:ne,center:void 0,zoom:void 0,minZoom:void 0,maxZoom:void 0,layers:[],maxBounds:void 0,renderer:void 0,zoomAnimation:!0,zoomAnimationThreshold:4,fadeAnimation:!0,markerZoomAnimation:!0,transform3DLimit:8388608,zoomSnap:1,zoomDelta:1,trackResize:!0},initialize:function(u,m){m=b(this,m),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._initContainer(u),this._initLayout(),this._onResize=a(this._onResize,this),this._initEvents(),m.maxBounds&&this.setMaxBounds(m.maxBounds),m.zoom!==void 0&&(this._zoom=this._limitZoom(m.zoom)),m.center&&m.zoom!==void 0&&this.setView(J(m.center),m.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=Ft&&kt.any3d&&!kt.mobileOpera&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),Pt(this._proxy,tn,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)},setView:function(u,m,v){if(m=m===void 0?this._zoom:this._limitZoom(m),u=this._limitCenter(J(u),m,this.options.maxBounds),v=v||{},this._stop(),this._loaded&&!v.reset&&v!==!0){v.animate!==void 0&&(v.zoom=i({animate:v.animate},v.zoom),v.pan=i({animate:v.animate,duration:v.duration},v.pan));var z=this._zoom!==m?this._tryAnimatedZoom&&this._tryAnimatedZoom(u,m,v.zoom):this._tryAnimatedPan(u,v.pan);if(z)return clearTimeout(this._sizeTimer),this}return this._resetView(u,m,v.pan&&v.pan.noMoveStart),this},setZoom:function(u,m){return this._loaded?this.setView(this.getCenter(),u,{zoom:m}):(this._zoom=u,this)},zoomIn:function(u,m){return u=u||(kt.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom+u,m)},zoomOut:function(u,m){return u=u||(kt.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom-u,m)},setZoomAround:function(u,m,v){var z=this.getZoomScale(m),V=this.getSize().divideBy(2),ue=u instanceof X?u:this.latLngToContainerPoint(u),Ee=ue.subtract(V).multiplyBy(1-1/z),Me=this.containerPointToLatLng(V.add(Ee));return this.setView(Me,m,{zoom:v})},_getBoundsCenterZoom:function(u,m){m=m||{},u=u.getBounds?u.getBounds():j(u);var v=W(m.paddingTopLeft||m.padding||[0,0]),z=W(m.paddingBottomRight||m.padding||[0,0]),V=this.getBoundsZoom(u,!1,v.add(z));if(V=typeof m.maxZoom=="number"?Math.min(m.maxZoom,V):V,V===1/0)return{center:u.getCenter(),zoom:V};var ue=z.subtract(v).divideBy(2),Ee=this.project(u.getSouthWest(),V),Me=this.project(u.getNorthEast(),V),$e=this.unproject(Ee.add(Me).divideBy(2).add(ue),V);return{center:$e,zoom:V}},fitBounds:function(u,m){if(u=j(u),!u.isValid())throw new Error("Bounds are not valid.");var v=this._getBoundsCenterZoom(u,m);return this.setView(v.center,v.zoom,m)},fitWorld:function(u){return this.fitBounds([[-90,-180],[90,180]],u)},panTo:function(u,m){return this.setView(u,this._zoom,{pan:m})},panBy:function(u,m){if(u=W(u).round(),m=m||{},!u.x&&!u.y)return this.fire("moveend");if(m.animate!==!0&&!this.getSize().contains(u))return this._resetView(this.unproject(this.project(this.getCenter()).add(u)),this.getZoom()),this;if(this._panAnim||(this._panAnim=new fb,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),m.noMoveStart||this.fire("movestart"),m.animate!==!1){$t(this._mapPane,"leaflet-pan-anim");var v=this._getMapPanePos().subtract(u).round();this._panAnim.run(this._mapPane,v,m.duration||.25,m.easeLinearity)}else this._rawPanBy(u),this.fire("move").fire("moveend");return this},flyTo:function(u,m,v){if(v=v||{},v.animate===!1||!kt.any3d)return this.setView(u,m,v);this._stop();var z=this.project(this.getCenter()),V=this.project(u),ue=this.getSize(),Ee=this._zoom;u=J(u),m=m===void 0?Ee:m;var Me=Math.max(ue.x,ue.y),$e=Me*this.getZoomScale(Ee,m),Ye=V.distanceTo(z)||1,mt=1.42,It=mt*mt;function on(Po){var Db=Po?-1:1,OTe=Po?$e:Me,LTe=$e*$e-Me*Me+Db*It*It*Ye*Ye,FTe=2*OTe*It*Ye,g1=LTe/FTe,ER=Math.sqrt(g1*g1+1)-g1,$Te=ER<1e-9?-18:Math.log(ER);return $Te}function yr(Po){return(Math.exp(Po)-Math.exp(-Po))/2}function Uo(Po){return(Math.exp(Po)+Math.exp(-Po))/2}function Ai(Po){return yr(Po)/Uo(Po)}var Ir=on(0);function Ru(Po){return Me*(Uo(Ir)/Uo(Ir+mt*Po))}function DTe(Po){return Me*(Uo(Ir)*Ai(Ir+mt*Po)-yr(Ir))/It}function MTe(Po){return 1-Math.pow(1-Po,1.5)}var RTe=Date.now(),_R=(on(1)-Ir)/mt,ITe=v.duration?1e3*v.duration:1e3*_R*.8;function xR(){var Po=(Date.now()-RTe)/ITe,Db=MTe(Po)*_R;Po<=1?(this._flyToFrame=A(xR,this),this._move(this.unproject(z.add(V.subtract(z).multiplyBy(DTe(Db)/Ye)),Ee),this.getScaleZoom(Me/Ru(Db),Ee),{flyTo:!0})):this._move(u,m)._moveEnd(!0)}return this._moveStart(!0,v.noMoveStart),xR.call(this),this},flyToBounds:function(u,m){var v=this._getBoundsCenterZoom(u,m);return this.flyTo(v.center,v.zoom,m)},setMaxBounds:function(u){return u=j(u),this.listens("moveend",this._panInsideMaxBounds)&&this.off("moveend",this._panInsideMaxBounds),u.isValid()?(this.options.maxBounds=u,this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds)):(this.options.maxBounds=null,this)},setMinZoom:function(u){var m=this.options.minZoom;return this.options.minZoom=u,this._loaded&&m!==u&&(this.fire("zoomlevelschange"),this.getZoom()<this.options.minZoom)?this.setZoom(u):this},setMaxZoom:function(u){var m=this.options.maxZoom;return this.options.maxZoom=u,this._loaded&&m!==u&&(this.fire("zoomlevelschange"),this.getZoom()>this.options.maxZoom)?this.setZoom(u):this},panInsideBounds:function(u,m){this._enforcingBounds=!0;var v=this.getCenter(),z=this._limitCenter(v,this._zoom,j(u));return v.equals(z)||this.panTo(z,m),this._enforcingBounds=!1,this},panInside:function(u,m){m=m||{};var v=W(m.paddingTopLeft||m.padding||[0,0]),z=W(m.paddingBottomRight||m.padding||[0,0]),V=this.project(this.getCenter()),ue=this.project(u),Ee=this.getPixelBounds(),Me=H([Ee.min.add(v),Ee.max.subtract(z)]),$e=Me.getSize();if(!Me.contains(ue)){this._enforcingBounds=!0;var Ye=ue.subtract(Me.getCenter()),mt=Me.extend(ue).getSize().subtract($e);V.x+=Ye.x<0?-mt.x:mt.x,V.y+=Ye.y<0?-mt.y:mt.y,this.panTo(this.unproject(V),m),this._enforcingBounds=!1}return this},invalidateSize:function(u){if(!this._loaded)return this;u=i({animate:!1,pan:!0},u===!0?{animate:!0}:u);var m=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var v=this.getSize(),z=m.divideBy(2).round(),V=v.divideBy(2).round(),ue=z.subtract(V);return!ue.x&&!ue.y?this:(u.animate&&u.pan?this.panBy(ue):(u.pan&&this._rawPanBy(ue),this.fire("move"),u.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(a(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:m,newSize:v}))},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(u){if(u=this._locateOptions=i({timeout:1e4,watch:!1},u),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var m=a(this._handleGeolocationResponse,this),v=a(this._handleGeolocationError,this);return u.watch?this._locationWatchId=navigator.geolocation.watchPosition(m,v,u):navigator.geolocation.getCurrentPosition(m,v,u),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(u){if(this._container._leaflet_id){var m=u.code,v=u.message||(m===1?"permission denied":m===2?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:m,message:"Geolocation error: "+v+"."})}},_handleGeolocationResponse:function(u){if(this._container._leaflet_id){var m=u.coords.latitude,v=u.coords.longitude,z=new Y(m,v),V=z.toBounds(u.coords.accuracy*2),ue=this._locateOptions;if(ue.setView){var Ee=this.getBoundsZoom(V);this.setView(z,ue.maxZoom?Math.min(Ee,ue.maxZoom):Ee)}var Me={latlng:z,bounds:V,timestamp:u.timestamp};for(var $e in u.coords)typeof u.coords[$e]=="number"&&(Me[$e]=u.coords[$e]);this.fire("locationfound",Me)}},addHandler:function(u,m){if(!m)return this;var v=this[u]=new m(this);return this._handlers.push(v),this.options[u]&&v.enable(),this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch{this._container._leaflet_id=void 0,this._containerId=void 0}this._locationWatchId!==void 0&&this.stopLocate(),this._stop(),bn(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(P(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload");var u;for(u in this._layers)this._layers[u].remove();for(u in this._panes)bn(this._panes[u]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(u,m){var v="leaflet-pane"+(u?" leaflet-"+u.replace("Pane","")+"-pane":""),z=Wt("div",v,m||this._mapPane);return u&&(this._panes[u]=z),z},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var u=this.getPixelBounds(),m=this.unproject(u.getBottomLeft()),v=this.unproject(u.getTopRight());return new N(m,v)},getMinZoom:function(){return this.options.minZoom===void 0?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return this.options.maxZoom===void 0?this._layersMaxZoom===void 0?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(u,m,v){u=j(u),v=W(v||[0,0]);var z=this.getZoom()||0,V=this.getMinZoom(),ue=this.getMaxZoom(),Ee=u.getNorthWest(),Me=u.getSouthEast(),$e=this.getSize().subtract(v),Ye=H(this.project(Me,z),this.project(Ee,z)).getSize(),mt=kt.any3d?this.options.zoomSnap:1,It=$e.x/Ye.x,on=$e.y/Ye.y,yr=m?Math.max(It,on):Math.min(It,on);return z=this.getScaleZoom(yr,z),mt&&(z=Math.round(z/(mt/100))*(mt/100),z=m?Math.ceil(z/mt)*mt:Math.floor(z/mt)*mt),Math.max(V,Math.min(ue,z))},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new X(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(u,m){var v=this._getTopLeftPoint(u,m);return new se(v,v.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(u){return this.options.crs.getProjectedBounds(u===void 0?this.getZoom():u)},getPane:function(u){return typeof u=="string"?this._panes[u]:u},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(u,m){var v=this.options.crs;return m=m===void 0?this._zoom:m,v.scale(u)/v.scale(m)},getScaleZoom:function(u,m){var v=this.options.crs;m=m===void 0?this._zoom:m;var z=v.zoom(u*v.scale(m));return isNaN(z)?1/0:z},project:function(u,m){return m=m===void 0?this._zoom:m,this.options.crs.latLngToPoint(J(u),m)},unproject:function(u,m){return m=m===void 0?this._zoom:m,this.options.crs.pointToLatLng(W(u),m)},layerPointToLatLng:function(u){var m=W(u).add(this.getPixelOrigin());return this.unproject(m)},latLngToLayerPoint:function(u){var m=this.project(J(u))._round();return m._subtract(this.getPixelOrigin())},wrapLatLng:function(u){return this.options.crs.wrapLatLng(J(u))},wrapLatLngBounds:function(u){return this.options.crs.wrapLatLngBounds(j(u))},distance:function(u,m){return this.options.crs.distance(J(u),J(m))},containerPointToLayerPoint:function(u){return W(u).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(u){return W(u).add(this._getMapPanePos())},containerPointToLatLng:function(u){var m=this.containerPointToLayerPoint(W(u));return this.layerPointToLatLng(m)},latLngToContainerPoint:function(u){return this.layerPointToContainerPoint(this.latLngToLayerPoint(J(u)))},mouseEventToContainerPoint:function(u){return ub(u,this._container)},mouseEventToLayerPoint:function(u){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(u))},mouseEventToLatLng:function(u){return this.layerPointToLatLng(this.mouseEventToLayerPoint(u))},_initContainer:function(u){var m=this._container=$n(u);if(m){if(m._leaflet_id)throw new Error("Map container is already initialized.")}else throw new Error("Map container not found.");Pt(m,"scroll",this._onScroll,this),this._containerId=c(m)},_initLayout:function(){var u=this._container;this._fadeAnimated=this.options.fadeAnimation&&kt.any3d,$t(u,"leaflet-container"+(kt.touch?" leaflet-touch":"")+(kt.retina?" leaflet-retina":"")+(kt.ielt9?" leaflet-oldie":"")+(kt.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var m=Io(u,"position");m!=="absolute"&&m!=="relative"&&m!=="fixed"&&m!=="sticky"&&(u.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var u=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),Gn(this._mapPane,new X(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||($t(u.markerPane,"leaflet-zoom-hide"),$t(u.shadowPane,"leaflet-zoom-hide"))},_resetView:function(u,m,v){Gn(this._mapPane,new X(0,0));var z=!this._loaded;this._loaded=!0,m=this._limitZoom(m),this.fire("viewprereset");var V=this._zoom!==m;this._moveStart(V,v)._move(u,m)._moveEnd(V),this.fire("viewreset"),z&&this.fire("load")},_moveStart:function(u,m){return u&&this.fire("zoomstart"),m||this.fire("movestart"),this},_move:function(u,m,v,z){m===void 0&&(m=this._zoom);var V=this._zoom!==m;return this._zoom=m,this._lastCenter=u,this._pixelOrigin=this._getNewPixelOrigin(u),z?v&&v.pinch&&this.fire("zoom",v):((V||v&&v.pinch)&&this.fire("zoom",v),this.fire("move",v)),this},_moveEnd:function(u){return u&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return P(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(u){Gn(this._mapPane,this._getMapPanePos().subtract(u))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(u){this._targets={},this._targets[c(this._container)]=this;var m=u?Cn:Pt;m(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&m(window,"resize",this._onResize,this),kt.any3d&&this.options.transform3DLimit&&(u?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){P(this._resizeRequest),this._resizeRequest=A(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var u=this._getMapPanePos();Math.max(Math.abs(u.x),Math.abs(u.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(u,m){for(var v=[],z,V=m==="mouseout"||m==="mouseover",ue=u.target||u.srcElement,Ee=!1;ue;){if(z=this._targets[c(ue)],z&&(m==="click"||m==="preclick")&&this._draggableMoved(z)){Ee=!0;break}if(z&&z.listens(m,!0)&&(V&&!Ci(ue,u)||(v.push(z),V))||ue===this._container)break;ue=ue.parentNode}return!v.length&&!Ee&&!V&&this.listens(m,!0)&&(v=[this]),v},_isClickDisabled:function(u){for(;u&&u!==this._container;){if(u._leaflet_disable_click)return!0;u=u.parentNode}},_handleDOMEvent:function(u){var m=u.target||u.srcElement;if(!(!this._loaded||m._leaflet_disable_events||u.type==="click"&&this._isClickDisabled(m))){var v=u.type;v==="mousedown"&&it(m),this._fireDOMEvent(u,v)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(u,m,v){if(u.type==="click"){var z=i({},u);z.type="preclick",this._fireDOMEvent(z,z.type,v)}var V=this._findEventTargets(u,m);if(v){for(var ue=[],Ee=0;Ee<v.length;Ee++)v[Ee].listens(m,!0)&&ue.push(v[Ee]);V=ue.concat(V)}if(V.length){m==="contextmenu"&&Ao(u);var Me=V[0],$e={originalEvent:u};if(u.type!=="keypress"&&u.type!=="keydown"&&u.type!=="keyup"){var Ye=Me.getLatLng&&(!Me._radius||Me._radius<=10);$e.containerPoint=Ye?this.latLngToContainerPoint(Me.getLatLng()):this.mouseEventToContainerPoint(u),$e.layerPoint=this.containerPointToLayerPoint($e.containerPoint),$e.latlng=Ye?Me.getLatLng():this.layerPointToLatLng($e.layerPoint)}for(Ee=0;Ee<V.length;Ee++)if(V[Ee].fire(m,$e,!0),$e.originalEvent._stopped||V[Ee].options.bubblingMouseEvents===!1&&S(this._mouseEvents,m)!==-1)return}},_draggableMoved:function(u){return u=u.dragging&&u.dragging.enabled()?u:this,u.dragging&&u.dragging.moved()||this.boxZoom&&this.boxZoom.moved()},_clearHandlers:function(){for(var u=0,m=this._handlers.length;u<m;u++)this._handlers[u].disable()},whenReady:function(u,m){return this._loaded?u.call(m||this,{target:this}):this.on("load",u,m),this},_getMapPanePos:function(){return br(this._mapPane)||new X(0,0)},_moved:function(){var u=this._getMapPanePos();return u&&!u.equals([0,0])},_getTopLeftPoint:function(u,m){var v=u&&m!==void 0?this._getNewPixelOrigin(u,m):this.getPixelOrigin();return v.subtract(this._getMapPanePos())},_getNewPixelOrigin:function(u,m){var v=this.getSize()._divideBy(2);return this.project(u,m)._subtract(v)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function(u,m,v){var z=this._getNewPixelOrigin(v,m);return this.project(u,m)._subtract(z)},_latLngBoundsToNewLayerBounds:function(u,m,v){var z=this._getNewPixelOrigin(v,m);return H([this.project(u.getSouthWest(),m)._subtract(z),this.project(u.getNorthWest(),m)._subtract(z),this.project(u.getSouthEast(),m)._subtract(z),this.project(u.getNorthEast(),m)._subtract(z)])},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(u){return this.latLngToLayerPoint(u).subtract(this._getCenterLayerPoint())},_limitCenter:function(u,m,v){if(!v)return u;var z=this.project(u,m),V=this.getSize().divideBy(2),ue=new se(z.subtract(V),z.add(V)),Ee=this._getBoundsOffset(ue,v,m);return Math.abs(Ee.x)<=1&&Math.abs(Ee.y)<=1?u:this.unproject(z.add(Ee),m)},_limitOffset:function(u,m){if(!m)return u;var v=this.getPixelBounds(),z=new se(v.min.add(u),v.max.add(u));return u.add(this._getBoundsOffset(z,m))},_getBoundsOffset:function(u,m,v){var z=H(this.project(m.getNorthEast(),v),this.project(m.getSouthWest(),v)),V=z.min.subtract(u.min),ue=z.max.subtract(u.max),Ee=this._rebound(V.x,-ue.x),Me=this._rebound(V.y,-ue.y);return new X(Ee,Me)},_rebound:function(u,m){return u+m>0?Math.round(u-m)/2:Math.max(0,Math.ceil(u))-Math.max(0,Math.floor(m))},_limitZoom:function(u){var m=this.getMinZoom(),v=this.getMaxZoom(),z=kt.any3d?this.options.zoomSnap:1;return z&&(u=Math.round(u/z)*z),Math.max(m,Math.min(v,u))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){Kn(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(u,m){var v=this._getCenterOffset(u)._trunc();return(m&&m.animate)!==!0&&!this.getSize().contains(v)?!1:(this.panBy(v,m),!0)},_createAnimProxy:function(){var u=this._proxy=Wt("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(u),this.on("zoomanim",function(m){var v=_t,z=this._proxy.style[v];bo(this._proxy,this.project(m.center,m.zoom),this.getZoomScale(m.zoom,1)),z===this._proxy.style[v]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){bn(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var u=this.getCenter(),m=this.getZoom();bo(this._proxy,this.project(u,m),this.getZoomScale(m,1))},_catchTransitionEnd:function(u){this._animatingZoom&&u.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(u,m,v){if(this._animatingZoom)return!0;if(v=v||{},!this._zoomAnimated||v.animate===!1||this._nothingToAnimate()||Math.abs(m-this._zoom)>this.options.zoomAnimationThreshold)return!1;var z=this.getZoomScale(m),V=this._getCenterOffset(u)._divideBy(1-1/z);return v.animate!==!0&&!this.getSize().contains(V)?!1:(A(function(){this._moveStart(!0,v.noMoveStart||!1)._animateZoom(u,m,!0)},this),!0)},_animateZoom:function(u,m,v,z){this._mapPane&&(v&&(this._animatingZoom=!0,this._animateToCenter=u,this._animateToZoom=m,$t(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:u,zoom:m,noUpdate:z}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(a(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&Kn(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))}});function i1(u,m){return new ln(u,m)}var Rr=Q.extend({options:{position:"topright"},initialize:function(u){b(this,u)},getPosition:function(){return this.options.position},setPosition:function(u){var m=this._map;return m&&m.removeControl(this),this.options.position=u,m&&m.addControl(this),this},getContainer:function(){return this._container},addTo:function(u){this.remove(),this._map=u;var m=this._container=this.onAdd(u),v=this.getPosition(),z=u._controlCorners[v];return $t(m,"leaflet-control"),v.indexOf("bottom")!==-1?z.insertBefore(m,z.firstChild):z.appendChild(m),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(bn(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(u){this._map&&u&&u.screenX>0&&u.screenY>0&&this._map.getContainer().focus()}}),qc=function(u){return new Rr(u)};ln.include({addControl:function(u){return u.addTo(this),this},removeControl:function(u){return u.remove(),this},_initControlPos:function(){var u=this._controlCorners={},m="leaflet-",v=this._controlContainer=Wt("div",m+"control-container",this._container);function z(V,ue){var Ee=m+V+" "+m+ue;u[V+ue]=Wt("div",Ee,v)}z("top","left"),z("top","right"),z("bottom","left"),z("bottom","right")},_clearControlPos:function(){for(var u in this._controlCorners)bn(this._controlCorners[u]);bn(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var Ba=Rr.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(u,m,v,z){return v<z?-1:z<v?1:0}},initialize:function(u,m,v){b(this,v),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1,this._preventClick=!1;for(var z in u)this._addLayer(u[z],z);for(z in m)this._addLayer(m[z],z,!0)},onAdd:function(u){this._initLayout(),this._update(),this._map=u,u.on("zoomend",this._checkDisabledLayers,this);for(var m=0;m<this._layers.length;m++)this._layers[m].layer.on("add remove",this._onLayerChange,this);return this._container},addTo:function(u){return Rr.prototype.addTo.call(this,u),this._expandIfNotCollapsed()},onRemove:function(){this._map.off("zoomend",this._checkDisabledLayers,this);for(var u=0;u<this._layers.length;u++)this._layers[u].layer.off("add remove",this._onLayerChange,this)},addBaseLayer:function(u,m){return this._addLayer(u,m),this._map?this._update():this},addOverlay:function(u,m){return this._addLayer(u,m,!0),this._map?this._update():this},removeLayer:function(u){u.off("add remove",this._onLayerChange,this);var m=this._getLayer(c(u));return m&&this._layers.splice(this._layers.indexOf(m),1),this._map?this._update():this},expand:function(){$t(this._container,"leaflet-control-layers-expanded"),this._section.style.height=null;var u=this._map.getSize().y-(this._container.offsetTop+50);return u<this._section.clientHeight?($t(this._section,"leaflet-control-layers-scrollbar"),this._section.style.height=u+"px"):Kn(this._section,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return Kn(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var u="leaflet-control-layers",m=this._container=Wt("div",u),v=this.options.collapsed;m.setAttribute("aria-haspopup",!0),Nl(m),Bu(m);var z=this._section=Wt("section",u+"-list");v&&(this._map.on("click",this.collapse,this),Pt(m,{mouseenter:this._expandSafely,mouseleave:this.collapse},this));var V=this._layersLink=Wt("a",u+"-toggle",m);V.href="#",V.title="Layers",V.setAttribute("role","button"),Pt(V,{keydown:function(ue){ue.keyCode===13&&this._expandSafely()},click:function(ue){Ao(ue),this._expandSafely()}},this),v||this.expand(),this._baseLayersList=Wt("div",u+"-base",z),this._separator=Wt("div",u+"-separator",z),this._overlaysList=Wt("div",u+"-overlays",z),m.appendChild(z)},_getLayer:function(u){for(var m=0;m<this._layers.length;m++)if(this._layers[m]&&c(this._layers[m].layer)===u)return this._layers[m]},_addLayer:function(u,m,v){this._map&&u.on("add remove",this._onLayerChange,this),this._layers.push({layer:u,name:m,overlay:v}),this.options.sortLayers&&this._layers.sort(a(function(z,V){return this.options.sortFunction(z.layer,V.layer,z.name,V.name)},this)),this.options.autoZIndex&&u.setZIndex&&(this._lastZIndex++,u.setZIndex(this._lastZIndex)),this._expandIfNotCollapsed()},_update:function(){if(!this._container)return this;kn(this._baseLayersList),kn(this._overlaysList),this._layerControlInputs=[];var u,m,v,z,V=0;for(v=0;v<this._layers.length;v++)z=this._layers[v],this._addItem(z),m=m||z.overlay,u=u||!z.overlay,V+=z.overlay?0:1;return this.options.hideSingleBase&&(u=u&&V>1,this._baseLayersList.style.display=u?"":"none"),this._separator.style.display=m&&u?"":"none",this},_onLayerChange:function(u){this._handlingClick||this._update();var m=this._getLayer(c(u.target)),v=m.overlay?u.type==="add"?"overlayadd":"overlayremove":u.type==="add"?"baselayerchange":null;v&&this._map.fire(v,m)},_createRadioElement:function(u,m){var v='<input type="radio" class="leaflet-control-layers-selector" name="'+u+'"'+(m?' checked="checked"':"")+"/>",z=document.createElement("div");return z.innerHTML=v,z.firstChild},_addItem:function(u){var m=document.createElement("label"),v=this._map.hasLayer(u.layer),z;u.overlay?(z=document.createElement("input"),z.type="checkbox",z.className="leaflet-control-layers-selector",z.defaultChecked=v):z=this._createRadioElement("leaflet-base-layers_"+c(this),v),this._layerControlInputs.push(z),z.layerId=c(u.layer),Pt(z,"click",this._onInputClick,this);var V=document.createElement("span");V.innerHTML=" "+u.name;var ue=document.createElement("span");m.appendChild(ue),ue.appendChild(z),ue.appendChild(V);var Ee=u.overlay?this._overlaysList:this._baseLayersList;return Ee.appendChild(m),this._checkDisabledLayers(),m},_onInputClick:function(){if(!this._preventClick){var u=this._layerControlInputs,m,v,z=[],V=[];this._handlingClick=!0;for(var ue=u.length-1;ue>=0;ue--)m=u[ue],v=this._getLayer(m.layerId).layer,m.checked?z.push(v):m.checked||V.push(v);for(ue=0;ue<V.length;ue++)this._map.hasLayer(V[ue])&&this._map.removeLayer(V[ue]);for(ue=0;ue<z.length;ue++)this._map.hasLayer(z[ue])||this._map.addLayer(z[ue]);this._handlingClick=!1,this._refocusOnMap()}},_checkDisabledLayers:function(){for(var u=this._layerControlInputs,m,v,z=this._map.getZoom(),V=u.length-1;V>=0;V--)m=u[V],v=this._getLayer(m.layerId).layer,m.disabled=v.options.minZoom!==void 0&&z<v.options.minZoom||v.options.maxZoom!==void 0&&z>v.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var u=this._section;this._preventClick=!0,Pt(u,"click",Ao),this.expand();var m=this;setTimeout(function(){Cn(u,"click",Ao),m._preventClick=!1})}}),s1=function(u,m,v){return new Ba(u,m,v)},Dl=Rr.extend({options:{position:"topleft",zoomInText:'<span aria-hidden="true">+</span>',zoomInTitle:"Zoom in",zoomOutText:'<span aria-hidden="true">&#x2212;</span>',zoomOutTitle:"Zoom out"},onAdd:function(u){var m="leaflet-control-zoom",v=Wt("div",m+" leaflet-bar"),z=this.options;return this._zoomInButton=this._createButton(z.zoomInText,z.zoomInTitle,m+"-in",v,this._zoomIn),this._zoomOutButton=this._createButton(z.zoomOutText,z.zoomOutTitle,m+"-out",v,this._zoomOut),this._updateDisabled(),u.on("zoomend zoomlevelschange",this._updateDisabled,this),v},onRemove:function(u){u.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(u){!this._disabled&&this._map._zoom<this._map.getMaxZoom()&&this._map.zoomIn(this._map.options.zoomDelta*(u.shiftKey?3:1))},_zoomOut:function(u){!this._disabled&&this._map._zoom>this._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(u.shiftKey?3:1))},_createButton:function(u,m,v,z,V){var ue=Wt("a",v,z);return ue.innerHTML=u,ue.href="#",ue.title=m,ue.setAttribute("role","button"),ue.setAttribute("aria-label",m),Nl(ue),Pt(ue,"click",Qi),Pt(ue,"click",V,this),Pt(ue,"click",this._refocusOnMap,this),ue},_updateDisabled:function(){var u=this._map,m="leaflet-disabled";Kn(this._zoomInButton,m),Kn(this._zoomOutButton,m),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||u._zoom===u.getMinZoom())&&($t(this._zoomOutButton,m),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||u._zoom===u.getMaxZoom())&&($t(this._zoomInButton,m),this._zoomInButton.setAttribute("aria-disabled","true"))}});ln.mergeOptions({zoomControl:!0}),ln.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new Dl,this.addControl(this.zoomControl))});var hb=function(u){return new Dl(u)},mb=Rr.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(u){var m="leaflet-control-scale",v=Wt("div",m),z=this.options;return this._addScales(z,m+"-line",v),u.on(z.updateWhenIdle?"moveend":"move",this._update,this),u.whenReady(this._update,this),v},onRemove:function(u){u.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(u,m,v){u.metric&&(this._mScale=Wt("div",m,v)),u.imperial&&(this._iScale=Wt("div",m,v))},_update:function(){var u=this._map,m=u.getSize().y/2,v=u.distance(u.containerPointToLatLng([0,m]),u.containerPointToLatLng([this.options.maxWidth,m]));this._updateScales(v)},_updateScales:function(u){this.options.metric&&u&&this._updateMetric(u),this.options.imperial&&u&&this._updateImperial(u)},_updateMetric:function(u){var m=this._getRoundNum(u),v=m<1e3?m+" m":m/1e3+" km";this._updateScale(this._mScale,v,m/u)},_updateImperial:function(u){var m=u*3.2808399,v,z,V;m>5280?(v=m/5280,z=this._getRoundNum(v),this._updateScale(this._iScale,z+" mi",z/v)):(V=this._getRoundNum(m),this._updateScale(this._iScale,V+" ft",V/m))},_updateScale:function(u,m,v){u.style.width=Math.round(this.options.maxWidth*v)+"px",u.innerHTML=m},_getRoundNum:function(u){var m=Math.pow(10,(Math.floor(u)+"").length-1),v=u/m;return v=v>=10?10:v>=5?5:v>=3?3:v>=2?2:1,m*v}}),a1=function(u){return new mb(u)},l1='<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="12" height="8" viewBox="0 0 12 8" class="leaflet-attribution-flag"><path fill="#4C7BE1" d="M0 0h12v4H0z"/><path fill="#FFD500" d="M0 4h12v3H0z"/><path fill="#E0BC00" d="M0 7h12v1H0z"/></svg>',lm=Rr.extend({options:{position:"bottomright",prefix:'<a href="https://leafletjs.com" title="A JavaScript library for interactive maps">'+(kt.inlineSvg?l1+" ":"")+"Leaflet</a>"},initialize:function(u){b(this,u),this._attributions={}},onAdd:function(u){u.attributionControl=this,this._container=Wt("div","leaflet-control-attribution"),Nl(this._container);for(var m in u._layers)u._layers[m].getAttribution&&this.addAttribution(u._layers[m].getAttribution());return this._update(),u.on("layeradd",this._addAttribution,this),this._container},onRemove:function(u){u.off("layeradd",this._addAttribution,this)},_addAttribution:function(u){u.layer.getAttribution&&(this.addAttribution(u.layer.getAttribution()),u.layer.once("remove",function(){this.removeAttribution(u.layer.getAttribution())},this))},setPrefix:function(u){return this.options.prefix=u,this._update(),this},addAttribution:function(u){return u?(this._attributions[u]||(this._attributions[u]=0),this._attributions[u]++,this._update(),this):this},removeAttribution:function(u){return u?(this._attributions[u]&&(this._attributions[u]--,this._update()),this):this},_update:function(){if(this._map){var u=[];for(var m in this._attributions)this._attributions[m]&&u.push(m);var v=[];this.options.prefix&&v.push(this.options.prefix),u.length&&v.push(u.join(", ")),this._container.innerHTML=v.join(' <span aria-hidden="true">|</span> ')}}});ln.mergeOptions({attributionControl:!0}),ln.addInitHook(function(){this.options.attributionControl&&new lm().addTo(this)});var Kc=function(u){return new lm(u)};Rr.Layers=Ba,Rr.Zoom=Dl,Rr.Scale=mb,Rr.Attribution=lm,qc.layers=s1,qc.zoom=hb,qc.scale=a1,qc.attribution=Kc;var Si=Q.extend({initialize:function(u){this._map=u},enable:function(){return this._enabled?this:(this._enabled=!0,this.addHooks(),this)},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});Si.addTo=function(u,m){return u.addHandler(m,this),this};var c1={Events:ie},pb=kt.touch?"touchstart mousedown":"mousedown",Rs=le.extend({options:{clickTolerance:3},initialize:function(u,m,v,z){b(this,z),this._element=u,this._dragStartTarget=m||u,this._preventOutline=v},enable:function(){this._enabled||(Pt(this._dragStartTarget,pb,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(Rs._dragging===this&&this.finishDrag(!0),Cn(this._dragStartTarget,pb,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(u){if(this._enabled&&(this._moved=!1,!Rn(this._element,"leaflet-zoom-anim"))){if(u.touches&&u.touches.length!==1){Rs._dragging===this&&this.finishDrag();return}if(!(Rs._dragging||u.shiftKey||u.which!==1&&u.button!==1&&!u.touches)&&(Rs._dragging=this,this._preventOutline&&it(this._element),Oo(),Dt(),!this._moving)){this.fire("down");var m=u.touches?u.touches[0]:u,v=jt(this._element);this._startPoint=new X(m.clientX,m.clientY),this._startPos=br(this._element),this._parentScale=hn(v);var z=u.type==="mousedown";Pt(document,z?"mousemove":"touchmove",this._onMove,this),Pt(document,z?"mouseup":"touchend touchcancel",this._onUp,this)}}},_onMove:function(u){if(this._enabled){if(u.touches&&u.touches.length>1){this._moved=!0;return}var m=u.touches&&u.touches.length===1?u.touches[0]:u,v=new X(m.clientX,m.clientY)._subtract(this._startPoint);!v.x&&!v.y||Math.abs(v.x)+Math.abs(v.y)<this.options.clickTolerance||(v.x/=this._parentScale.x,v.y/=this._parentScale.y,Ao(u),this._moved||(this.fire("dragstart"),this._moved=!0,$t(document.body,"leaflet-dragging"),this._lastTarget=u.target||u.srcElement,window.SVGElementInstance&&this._lastTarget instanceof window.SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),$t(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(v),this._moving=!0,this._lastEvent=u,this._updatePosition())}},_updatePosition:function(){var u={originalEvent:this._lastEvent};this.fire("predrag",u),Gn(this._element,this._newPos),this.fire("drag",u)},_onUp:function(){this._enabled&&this.finishDrag()},finishDrag:function(u){Kn(document.body,"leaflet-dragging"),this._lastTarget&&(Kn(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null),Cn(document,"mousemove touchmove",this._onMove,this),Cn(document,"mouseup touchend touchcancel",this._onUp,this),Qr(),Ds();var m=this._moved&&this._moving;this._moving=!1,Rs._dragging=!1,m&&this.fire("dragend",{noInertia:u,distance:this._newPos.distanceTo(this._startPos)})}});function gb(u,m,v){var z,V=[1,4,2,8],ue,Ee,Me,$e,Ye,mt,It,on;for(ue=0,mt=u.length;ue<mt;ue++)u[ue]._code=Is(u[ue],m);for(Me=0;Me<4;Me++){for(It=V[Me],z=[],ue=0,mt=u.length,Ee=mt-1;ue<mt;Ee=ue++)$e=u[ue],Ye=u[Ee],$e._code&It?Ye._code&It||(on=Nu(Ye,$e,It,m,v),on._code=Is(on,m),z.push(on)):(Ye._code&It&&(on=Nu(Ye,$e,It,m,v),on._code=Is(on,m),z.push(on)),z.push($e));u=z}return u}function cm(u,m){var v,z,V,ue,Ee,Me,$e,Ye,mt;if(!u||u.length===0)throw new Error("latlngs not passed");To(u)||(console.warn("latlngs are not flat! Only the first ring will be used"),u=u[0]);var It=J([0,0]),on=j(u),yr=on.getNorthWest().distanceTo(on.getSouthWest())*on.getNorthEast().distanceTo(on.getNorthWest());yr<1700&&(It=Pu(u));var Uo=u.length,Ai=[];for(v=0;v<Uo;v++){var Ir=J(u[v]);Ai.push(m.project(J([Ir.lat-It.lat,Ir.lng-It.lng])))}for(Me=$e=Ye=0,v=0,z=Uo-1;v<Uo;z=v++)V=Ai[v],ue=Ai[z],Ee=V.y*ue.x-ue.y*V.x,$e+=(V.x+ue.x)*Ee,Ye+=(V.y+ue.y)*Ee,Me+=Ee*3;Me===0?mt=Ai[0]:mt=[$e/Me,Ye/Me];var Ru=m.unproject(W(mt));return J([Ru.lat+It.lat,Ru.lng+It.lng])}function Pu(u){for(var m=0,v=0,z=0,V=0;V<u.length;V++){var ue=J(u[V]);m+=ue.lat,v+=ue.lng,z++}return J([m/z,v/z])}var bb={__proto__:null,clipPolygon:gb,polygonCenter:cm,centroid:Pu};function yb(u,m){if(!m||!u.length)return u.slice();var v=m*m;return u=um(u,v),u=d1(u,v),u}function vb(u,m,v){return Math.sqrt(Gc(u,m,v,!0))}function wb(u,m,v){return Gc(u,m,v)}function d1(u,m){var v=u.length,z=typeof Uint8Array<"u"?Uint8Array:Array,V=new z(v);V[0]=V[v-1]=1,dm(u,V,m,0,v-1);var ue,Ee=[];for(ue=0;ue<v;ue++)V[ue]&&Ee.push(u[ue]);return Ee}function dm(u,m,v,z,V){var ue=0,Ee,Me,$e;for(Me=z+1;Me<=V-1;Me++)$e=Gc(u[Me],u[z],u[V],!0),$e>ue&&(Ee=Me,ue=$e);ue>v&&(m[Ee]=1,dm(u,m,v,z,Ee),dm(u,m,v,Ee,V))}function um(u,m){for(var v=[u[0]],z=1,V=0,ue=u.length;z<ue;z++)u1(u[z],u[V])>m&&(v.push(u[z]),V=z);return V<ue-1&&v.push(u[ue-1]),v}var kb;function _b(u,m,v,z,V){var ue=z?kb:Is(u,v),Ee=Is(m,v),Me,$e,Ye;for(kb=Ee;;){if(!(ue|Ee))return[u,m];if(ue&Ee)return!1;Me=ue||Ee,$e=Nu(u,m,Me,v,V),Ye=Is($e,v),Me===ue?(u=$e,ue=Ye):(m=$e,Ee=Ye)}}function Nu(u,m,v,z,V){var ue=m.x-u.x,Ee=m.y-u.y,Me=z.min,$e=z.max,Ye,mt;return v&8?(Ye=u.x+ue*($e.y-u.y)/Ee,mt=$e.y):v&4?(Ye=u.x+ue*(Me.y-u.y)/Ee,mt=Me.y):v&2?(Ye=$e.x,mt=u.y+Ee*($e.x-u.x)/ue):v&1&&(Ye=Me.x,mt=u.y+Ee*(Me.x-u.x)/ue),new X(Ye,mt,V)}function Is(u,m){var v=0;return u.x<m.min.x?v|=1:u.x>m.max.x&&(v|=2),u.y<m.min.y?v|=4:u.y>m.max.y&&(v|=8),v}function u1(u,m){var v=m.x-u.x,z=m.y-u.y;return v*v+z*z}function Gc(u,m,v,z){var V=m.x,ue=m.y,Ee=v.x-V,Me=v.y-ue,$e=Ee*Ee+Me*Me,Ye;return $e>0&&(Ye=((u.x-V)*Ee+(u.y-ue)*Me)/$e,Ye>1?(V=v.x,ue=v.y):Ye>0&&(V+=Ee*Ye,ue+=Me*Ye)),Ee=u.x-V,Me=u.y-ue,z?Ee*Ee+Me*Me:new X(V,ue)}function To(u){return!R(u[0])||typeof u[0][0]!="object"&&typeof u[0][0]<"u"}function fm(u){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),To(u)}function hm(u,m){var v,z,V,ue,Ee,Me,$e,Ye;if(!u||u.length===0)throw new Error("latlngs not passed");To(u)||(console.warn("latlngs are not flat! Only the first ring will be used"),u=u[0]);var mt=J([0,0]),It=j(u),on=It.getNorthWest().distanceTo(It.getSouthWest())*It.getNorthEast().distanceTo(It.getNorthWest());on<1700&&(mt=Pu(u));var yr=u.length,Uo=[];for(v=0;v<yr;v++){var Ai=J(u[v]);Uo.push(m.project(J([Ai.lat-mt.lat,Ai.lng-mt.lng])))}for(v=0,z=0;v<yr-1;v++)z+=Uo[v].distanceTo(Uo[v+1])/2;if(z===0)Ye=Uo[0];else for(v=0,ue=0;v<yr-1;v++)if(Ee=Uo[v],Me=Uo[v+1],V=Ee.distanceTo(Me),ue+=V,ue>z){$e=(ue-z)/V,Ye=[Me.x-$e*(Me.x-Ee.x),Me.y-$e*(Me.y-Ee.y)];break}var Ir=m.unproject(W(Ye));return J([Ir.lat+mt.lat,Ir.lng+mt.lng])}var xb={__proto__:null,simplify:yb,pointToSegmentDistance:vb,closestPointOnSegment:wb,clipSegment:_b,_getEdgeIntersection:Nu,_getBitCode:Is,_sqClosestPointOnSegment:Gc,isFlat:To,_flat:fm,polylineCenter:hm},G={project:function(u){return new X(u.lng,u.lat)},unproject:function(u){return new Y(u.y,u.x)},bounds:new se([-180,-90],[180,90])},ae={R:6378137,R_MINOR:6356752314245179e-9,bounds:new se([-2003750834279e-5,-1549657073972e-5],[2003750834279e-5,1876465623138e-5]),project:function(u){var m=Math.PI/180,v=this.R,z=u.lat*m,V=this.R_MINOR/v,ue=Math.sqrt(1-V*V),Ee=ue*Math.sin(z),Me=Math.tan(Math.PI/4-z/2)/Math.pow((1-Ee)/(1+Ee),ue/2);return z=-v*Math.log(Math.max(Me,1e-10)),new X(u.lng*m*v,z)},unproject:function(u){for(var m=180/Math.PI,v=this.R,z=this.R_MINOR/v,V=Math.sqrt(1-z*z),ue=Math.exp(-u.y/v),Ee=Math.PI/2-2*Math.atan(ue),Me=0,$e=.1,Ye;Me<15&&Math.abs($e)>1e-7;Me++)Ye=V*Math.sin(Ee),Ye=Math.pow((1-Ye)/(1+Ye),V/2),$e=Math.PI/2-2*Math.atan(ue*Ye)-Ee,Ee+=$e;return new Y(Ee*m,u.x*m/v)}},oe={__proto__:null,LonLat:G,Mercator:ae,SphericalMercator:T},ge=i({},k,{code:"EPSG:3395",projection:ae,transformation:(function(){var u=.5/(Math.PI*ae.R);return $(u,.5,-u,.5)})()}),me=i({},k,{code:"EPSG:4326",projection:G,transformation:$(1/180,1,-1/180,.5)}),ye=i({},U,{projection:G,transformation:$(1,0,-1,0),scale:function(u){return Math.pow(2,u)},zoom:function(u){return Math.log(u)/Math.LN2},distance:function(u,m){var v=m.lng-u.lng,z=m.lat-u.lat;return Math.sqrt(v*v+z*z)},infinite:!0});U.Earth=k,U.EPSG3395=ge,U.EPSG3857=ne,U.EPSG900913=te,U.EPSG4326=me,U.Simple=ye;var be=le.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(u){return u.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(u){return u&&u.removeLayer(this),this},getPane:function(u){return this._map.getPane(u?this.options[u]||u:this.options.pane)},addInteractiveTarget:function(u){return this._map._targets[c(u)]=this,this},removeInteractiveTarget:function(u){return delete this._map._targets[c(u)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(u){var m=u.target;if(m.hasLayer(this)){if(this._map=m,this._zoomAnimated=m._zoomAnimated,this.getEvents){var v=this.getEvents();m.on(v,this),this.once("remove",function(){m.off(v,this)},this)}this.onAdd(m),this.fire("add"),m.fire("layeradd",{layer:this})}}});ln.include({addLayer:function(u){if(!u._layerAdd)throw new Error("The provided object is not a Layer.");var m=c(u);return this._layers[m]?this:(this._layers[m]=u,u._mapToAdd=this,u.beforeAdd&&u.beforeAdd(this),this.whenReady(u._layerAdd,u),this)},removeLayer:function(u){var m=c(u);return this._layers[m]?(this._loaded&&u.onRemove(this),delete this._layers[m],this._loaded&&(this.fire("layerremove",{layer:u}),u.fire("remove")),u._map=u._mapToAdd=null,this):this},hasLayer:function(u){return c(u)in this._layers},eachLayer:function(u,m){for(var v in this._layers)u.call(m,this._layers[v]);return this},_addLayers:function(u){u=u?R(u)?u:[u]:[];for(var m=0,v=u.length;m<v;m++)this.addLayer(u[m])},_addZoomLimit:function(u){(!isNaN(u.options.maxZoom)||!isNaN(u.options.minZoom))&&(this._zoomBoundLayers[c(u)]=u,this._updateZoomLevels())},_removeZoomLimit:function(u){var m=c(u);this._zoomBoundLayers[m]&&(delete this._zoomBoundLayers[m],this._updateZoomLevels())},_updateZoomLevels:function(){var u=1/0,m=-1/0,v=this._getZoomSpan();for(var z in this._zoomBoundLayers){var V=this._zoomBoundLayers[z].options;u=V.minZoom===void 0?u:Math.min(u,V.minZoom),m=V.maxZoom===void 0?m:Math.max(m,V.maxZoom)}this._layersMaxZoom=m===-1/0?void 0:m,this._layersMinZoom=u===1/0?void 0:u,v!==this._getZoomSpan()&&this.fire("zoomlevelschange"),this.options.maxZoom===void 0&&this._layersMaxZoom&&this.getZoom()>this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),this.options.minZoom===void 0&&this._layersMinZoom&&this.getZoom()<this._layersMinZoom&&this.setZoom(this._layersMinZoom)}});var De=be.extend({initialize:function(u,m){b(this,m),this._layers={};var v,z;if(u)for(v=0,z=u.length;v<z;v++)this.addLayer(u[v])},addLayer:function(u){var m=this.getLayerId(u);return this._layers[m]=u,this._map&&this._map.addLayer(u),this},removeLayer:function(u){var m=u in this._layers?u:this.getLayerId(u);return this._map&&this._layers[m]&&this._map.removeLayer(this._layers[m]),delete this._layers[m],this},hasLayer:function(u){var m=typeof u=="number"?u:this.getLayerId(u);return m in this._layers},clearLayers:function(){return this.eachLayer(this.removeLayer,this)},invoke:function(u){var m=Array.prototype.slice.call(arguments,1),v,z;for(v in this._layers)z=this._layers[v],z[u]&&z[u].apply(z,m);return this},onAdd:function(u){this.eachLayer(u.addLayer,u)},onRemove:function(u){this.eachLayer(u.removeLayer,u)},eachLayer:function(u,m){for(var v in this._layers)u.call(m,this._layers[v]);return this},getLayer:function(u){return this._layers[u]},getLayers:function(){var u=[];return this.eachLayer(u.push,u),u},setZIndex:function(u){return this.invoke("setZIndex",u)},getLayerId:function(u){return c(u)}}),He=function(u,m){return new De(u,m)},et=De.extend({addLayer:function(u){return this.hasLayer(u)?this:(u.addEventParent(this),De.prototype.addLayer.call(this,u),this.fire("layeradd",{layer:u}))},removeLayer:function(u){return this.hasLayer(u)?(u in this._layers&&(u=this._layers[u]),u.removeEventParent(this),De.prototype.removeLayer.call(this,u),this.fire("layerremove",{layer:u})):this},setStyle:function(u){return this.invoke("setStyle",u)},bringToFront:function(){return this.invoke("bringToFront")},bringToBack:function(){return this.invoke("bringToBack")},getBounds:function(){var u=new N;for(var m in this._layers){var v=this._layers[m];u.extend(v.getBounds?v.getBounds():v.getLatLng())}return u}}),ct=function(u,m){return new et(u,m)},Mt=Q.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0],crossOrigin:!1},initialize:function(u){b(this,u)},createIcon:function(u){return this._createIcon("icon",u)},createShadow:function(u){return this._createIcon("shadow",u)},_createIcon:function(u,m){var v=this._getIconUrl(u);if(!v){if(u==="icon")throw new Error("iconUrl not set in Icon options (see the docs).");return null}var z=this._createImg(v,m&&m.tagName==="IMG"?m:null);return this._setIconStyles(z,u),(this.options.crossOrigin||this.options.crossOrigin==="")&&(z.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),z},_setIconStyles:function(u,m){var v=this.options,z=v[m+"Size"];typeof z=="number"&&(z=[z,z]);var V=W(z),ue=W(m==="shadow"&&v.shadowAnchor||v.iconAnchor||V&&V.divideBy(2,!0));u.className="leaflet-marker-"+m+" "+(v.className||""),ue&&(u.style.marginLeft=-ue.x+"px",u.style.marginTop=-ue.y+"px"),V&&(u.style.width=V.x+"px",u.style.height=V.y+"px")},_createImg:function(u,m){return m=m||document.createElement("img"),m.src=u,m},_getIconUrl:function(u){return kt.retina&&this.options[u+"RetinaUrl"]||this.options[u+"Url"]}});function dt(u){return new Mt(u)}var nt=Mt.extend({options:{iconUrl:"marker-icon.png",iconRetinaUrl:"marker-icon-2x.png",shadowUrl:"marker-shadow.png",iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],tooltipAnchor:[16,-28],shadowSize:[41,41]},_getIconUrl:function(u){return typeof nt.imagePath!="string"&&(nt.imagePath=this._detectIconPath()),(this.options.imagePath||nt.imagePath)+Mt.prototype._getIconUrl.call(this,u)},_stripUrl:function(u){var m=function(v,z,V){var ue=z.exec(v);return ue&&ue[V]};return u=m(u,/^url\((['"])?(.+)\1\)$/,2),u&&m(u,/^(.*)marker-icon\.png$/,1)},_detectIconPath:function(){var u=Wt("div","leaflet-default-icon-path",document.body),m=Io(u,"background-image")||Io(u,"backgroundImage");if(document.body.removeChild(u),m=this._stripUrl(m),m)return m;var v=document.querySelector('link[href$="leaflet.css"]');return v?v.href.substring(0,v.href.length-11-1):""}}),mn=Si.extend({initialize:function(u){this._marker=u},addHooks:function(){var u=this._marker._icon;this._draggable||(this._draggable=new Rs(u,u,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),$t(u,"leaflet-marker-draggable")},removeHooks:function(){this._draggable.off({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).disable(),this._marker._icon&&Kn(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_adjustPan:function(u){var m=this._marker,v=m._map,z=this._marker.options.autoPanSpeed,V=this._marker.options.autoPanPadding,ue=br(m._icon),Ee=v.getPixelBounds(),Me=v.getPixelOrigin(),$e=H(Ee.min._subtract(Me).add(V),Ee.max._subtract(Me).subtract(V));if(!$e.contains(ue)){var Ye=W((Math.max($e.max.x,ue.x)-$e.max.x)/(Ee.max.x-$e.max.x)-(Math.min($e.min.x,ue.x)-$e.min.x)/(Ee.min.x-$e.min.x),(Math.max($e.max.y,ue.y)-$e.max.y)/(Ee.max.y-$e.max.y)-(Math.min($e.min.y,ue.y)-$e.min.y)/(Ee.min.y-$e.min.y)).multiplyBy(z);v.panBy(Ye,{animate:!1}),this._draggable._newPos._add(Ye),this._draggable._startPos._add(Ye),Gn(m._icon,this._draggable._newPos),this._onDrag(u),this._panRequest=A(this._adjustPan.bind(this,u))}},_onDragStart:function(){this._oldLatLng=this._marker.getLatLng(),this._marker.closePopup&&this._marker.closePopup(),this._marker.fire("movestart").fire("dragstart")},_onPreDrag:function(u){this._marker.options.autoPan&&(P(this._panRequest),this._panRequest=A(this._adjustPan.bind(this,u)))},_onDrag:function(u){var m=this._marker,v=m._shadow,z=br(m._icon),V=m._map.layerPointToLatLng(z);v&&Gn(v,z),m._latlng=V,u.latlng=V,u.oldLatLng=this._oldLatLng,m.fire("move",u).fire("drag",u)},_onDragEnd:function(u){P(this._panRequest),delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",u)}}),Nn=be.extend({options:{icon:new nt,interactive:!0,keyboard:!0,title:"",alt:"Marker",zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250,pane:"markerPane",shadowPane:"shadowPane",bubblingMouseEvents:!1,autoPanOnFocus:!0,draggable:!1,autoPan:!1,autoPanPadding:[50,50],autoPanSpeed:10},initialize:function(u,m){b(this,m),this._latlng=J(u)},onAdd:function(u){this._zoomAnimated=this._zoomAnimated&&u.options.markerZoomAnimation,this._zoomAnimated&&u.on("zoomanim",this._animateZoom,this),this._initIcon(),this.update()},onRemove:function(u){this.dragging&&this.dragging.enabled()&&(this.options.draggable=!0,this.dragging.removeHooks()),delete this.dragging,this._zoomAnimated&&u.off("zoomanim",this._animateZoom,this),this._removeIcon(),this._removeShadow()},getEvents:function(){return{zoom:this.update,viewreset:this.update}},getLatLng:function(){return this._latlng},setLatLng:function(u){var m=this._latlng;return this._latlng=J(u),this.update(),this.fire("move",{oldLatLng:m,latlng:this._latlng})},setZIndexOffset:function(u){return this.options.zIndexOffset=u,this.update()},getIcon:function(){return this.options.icon},setIcon:function(u){return this.options.icon=u,this._map&&(this._initIcon(),this.update()),this._popup&&this.bindPopup(this._popup,this._popup.options),this},getElement:function(){return this._icon},update:function(){if(this._icon&&this._map){var u=this._map.latLngToLayerPoint(this._latlng).round();this._setPos(u)}return this},_initIcon:function(){var u=this.options,m="leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"),v=u.icon.createIcon(this._icon),z=!1;v!==this._icon&&(this._icon&&this._removeIcon(),z=!0,u.title&&(v.title=u.title),v.tagName==="IMG"&&(v.alt=u.alt||"")),$t(v,m),u.keyboard&&(v.tabIndex="0",v.setAttribute("role","button")),this._icon=v,u.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&Pt(v,"focus",this._panOnFocus,this);var V=u.icon.createShadow(this._shadow),ue=!1;V!==this._shadow&&(this._removeShadow(),ue=!0),V&&($t(V,m),V.alt=""),this._shadow=V,u.opacity<1&&this._updateOpacity(),z&&this.getPane().appendChild(this._icon),this._initInteraction(),V&&ue&&this.getPane(u.shadowPane).appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&Cn(this._icon,"focus",this._panOnFocus,this),bn(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&bn(this._shadow),this._shadow=null},_setPos:function(u){this._icon&&Gn(this._icon,u),this._shadow&&Gn(this._shadow,u),this._zIndex=u.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(u){this._icon&&(this._icon.style.zIndex=this._zIndex+u)},_animateZoom:function(u){var m=this._map._latLngToNewLayerPoint(this._latlng,u.zoom,u.center).round();this._setPos(m)},_initInteraction:function(){if(this.options.interactive&&($t(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),mn)){var u=this.options.draggable;this.dragging&&(u=this.dragging.enabled(),this.dragging.disable()),this.dragging=new mn(this),u&&this.dragging.enable()}},setOpacity:function(u){return this.options.opacity=u,this._map&&this._updateOpacity(),this},_updateOpacity:function(){var u=this.options.opacity;this._icon&&cr(this._icon,u),this._shadow&&cr(this._shadow,u)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)},_panOnFocus:function(){var u=this._map;if(u){var m=this.options.icon.options,v=m.iconSize?W(m.iconSize):W(0,0),z=m.iconAnchor?W(m.iconAnchor):W(0,0);u.panInside(this._latlng,{paddingTopLeft:z,paddingBottomRight:v.subtract(z)})}},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor}});function Yn(u,m){return new Nn(u,m)}var Dn=be.extend({options:{stroke:!0,color:"#3388ff",weight:3,opacity:1,lineCap:"round",lineJoin:"round",dashArray:null,dashOffset:null,fill:!1,fillColor:null,fillOpacity:.2,fillRule:"evenodd",interactive:!0,bubblingMouseEvents:!0},beforeAdd:function(u){this._renderer=u.getRenderer(this)},onAdd:function(){this._renderer._initPath(this),this._reset(),this._renderer._addPath(this)},onRemove:function(){this._renderer._removePath(this)},redraw:function(){return this._map&&this._renderer._updatePath(this),this},setStyle:function(u){return b(this,u),this._renderer&&(this._renderer._updateStyle(this),this.options.stroke&&u&&Object.prototype.hasOwnProperty.call(u,"weight")&&this._updateBounds()),this},bringToFront:function(){return this._renderer&&this._renderer._bringToFront(this),this},bringToBack:function(){return this._renderer&&this._renderer._bringToBack(this),this},getElement:function(){return this._path},_reset:function(){this._project(),this._update()},_clickTolerance:function(){return(this.options.stroke?this.options.weight/2:0)+(this._renderer.options.tolerance||0)}}),wo=Dn.extend({options:{fill:!0,radius:10},initialize:function(u,m){b(this,m),this._latlng=J(u),this._radius=this.options.radius},setLatLng:function(u){var m=this._latlng;return this._latlng=J(u),this.redraw(),this.fire("move",{oldLatLng:m,latlng:this._latlng})},getLatLng:function(){return this._latlng},setRadius:function(u){return this.options.radius=this._radius=u,this.redraw()},getRadius:function(){return this._radius},setStyle:function(u){var m=u&&u.radius||this._radius;return Dn.prototype.setStyle.call(this,u),this.setRadius(m),this},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()},_updateBounds:function(){var u=this._radius,m=this._radiusY||u,v=this._clickTolerance(),z=[u+v,m+v];this._pxBounds=new se(this._point.subtract(z),this._point.add(z))},_update:function(){this._map&&this._updatePath()},_updatePath:function(){this._renderer._updateCircle(this)},_empty:function(){return this._radius&&!this._renderer._bounds.intersects(this._pxBounds)},_containsPoint:function(u){return u.distanceTo(this._point)<=this._radius+this._clickTolerance()}});function ko(u,m){return new wo(u,m)}var Vr=wo.extend({initialize:function(u,m,v){if(typeof m=="number"&&(m=i({},v,{radius:m})),b(this,m),this._latlng=J(u),isNaN(this.options.radius))throw new Error("Circle radius cannot be NaN");this._mRadius=this.options.radius},setRadius:function(u){return this._mRadius=u,this.redraw()},getRadius:function(){return this._mRadius},getBounds:function(){var u=[this._radius,this._radiusY||this._radius];return new N(this._map.layerPointToLatLng(this._point.subtract(u)),this._map.layerPointToLatLng(this._point.add(u)))},setStyle:Dn.prototype.setStyle,_project:function(){var u=this._latlng.lng,m=this._latlng.lat,v=this._map,z=v.options.crs;if(z.distance===k.distance){var V=Math.PI/180,ue=this._mRadius/k.R/V,Ee=v.project([m+ue,u]),Me=v.project([m-ue,u]),$e=Ee.add(Me).divideBy(2),Ye=v.unproject($e).lat,mt=Math.acos((Math.cos(ue*V)-Math.sin(m*V)*Math.sin(Ye*V))/(Math.cos(m*V)*Math.cos(Ye*V)))/V;(isNaN(mt)||mt===0)&&(mt=ue/Math.cos(Math.PI/180*m)),this._point=$e.subtract(v.getPixelOrigin()),this._radius=isNaN(mt)?0:$e.x-v.project([Ye,u-mt]).x,this._radiusY=$e.y-Ee.y}else{var It=z.unproject(z.project(this._latlng).subtract([this._mRadius,0]));this._point=v.latLngToLayerPoint(this._latlng),this._radius=this._point.x-v.latLngToLayerPoint(It).x}this._updateBounds()}});function Ml(u,m,v){return new Vr(u,m,v)}var Bo=Dn.extend({options:{smoothFactor:1,noClip:!1},initialize:function(u,m){b(this,m),this._setLatLngs(u)},getLatLngs:function(){return this._latlngs},setLatLngs:function(u){return this._setLatLngs(u),this.redraw()},isEmpty:function(){return!this._latlngs.length},closestLayerPoint:function(u){for(var m=1/0,v=null,z=Gc,V,ue,Ee=0,Me=this._parts.length;Ee<Me;Ee++)for(var $e=this._parts[Ee],Ye=1,mt=$e.length;Ye<mt;Ye++){V=$e[Ye-1],ue=$e[Ye];var It=z(u,V,ue,!0);It<m&&(m=It,v=z(u,V,ue))}return v&&(v.distance=Math.sqrt(m)),v},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");return hm(this._defaultShape(),this._map.options.crs)},getBounds:function(){return this._bounds},addLatLng:function(u,m){return m=m||this._defaultShape(),u=J(u),m.push(u),this._bounds.extend(u),this.redraw()},_setLatLngs:function(u){this._bounds=new N,this._latlngs=this._convertLatLngs(u)},_defaultShape:function(){return To(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(u){for(var m=[],v=To(u),z=0,V=u.length;z<V;z++)v?(m[z]=J(u[z]),this._bounds.extend(m[z])):m[z]=this._convertLatLngs(u[z]);return m},_project:function(){var u=new se;this._rings=[],this._projectLatlngs(this._latlngs,this._rings,u),this._bounds.isValid()&&u.isValid()&&(this._rawPxBounds=u,this._updateBounds())},_updateBounds:function(){var u=this._clickTolerance(),m=new X(u,u);this._rawPxBounds&&(this._pxBounds=new se([this._rawPxBounds.min.subtract(m),this._rawPxBounds.max.add(m)]))},_projectLatlngs:function(u,m,v){var z=u[0]instanceof Y,V=u.length,ue,Ee;if(z){for(Ee=[],ue=0;ue<V;ue++)Ee[ue]=this._map.latLngToLayerPoint(u[ue]),v.extend(Ee[ue]);m.push(Ee)}else for(ue=0;ue<V;ue++)this._projectLatlngs(u[ue],m,v)},_clipPoints:function(){var u=this._renderer._bounds;if(this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(u))){if(this.options.noClip){this._parts=this._rings;return}var m=this._parts,v,z,V,ue,Ee,Me,$e;for(v=0,V=0,ue=this._rings.length;v<ue;v++)for($e=this._rings[v],z=0,Ee=$e.length;z<Ee-1;z++)Me=_b($e[z],$e[z+1],u,z,!0),Me&&(m[V]=m[V]||[],m[V].push(Me[0]),(Me[1]!==$e[z+1]||z===Ee-2)&&(m[V].push(Me[1]),V++))}},_simplifyPoints:function(){for(var u=this._parts,m=this.options.smoothFactor,v=0,z=u.length;v<z;v++)u[v]=yb(u[v],m)},_update:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},_updatePath:function(){this._renderer._updatePoly(this)},_containsPoint:function(u,m){var v,z,V,ue,Ee,Me,$e=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(u))return!1;for(v=0,ue=this._parts.length;v<ue;v++)for(Me=this._parts[v],z=0,Ee=Me.length,V=Ee-1;z<Ee;V=z++)if(!(!m&&z===0)&&vb(u,Me[V],Me[z])<=$e)return!0;return!1}});function Pa(u,m){return new Bo(u,m)}Bo._flat=fm;var Os=Bo.extend({options:{fill:!0},isEmpty:function(){return!this._latlngs.length||!this._latlngs[0].length},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");return cm(this._defaultShape(),this._map.options.crs)},_convertLatLngs:function(u){var m=Bo.prototype._convertLatLngs.call(this,u),v=m.length;return v>=2&&m[0]instanceof Y&&m[0].equals(m[v-1])&&m.pop(),m},_setLatLngs:function(u){Bo.prototype._setLatLngs.call(this,u),To(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return To(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var u=this._renderer._bounds,m=this.options.weight,v=new X(m,m);if(u=new se(u.min.subtract(v),u.max.add(v)),this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(u))){if(this.options.noClip){this._parts=this._rings;return}for(var z=0,V=this._rings.length,ue;z<V;z++)ue=gb(this._rings[z],u,!0),ue.length&&this._parts.push(ue)}},_updatePath:function(){this._renderer._updatePoly(this,!0)},_containsPoint:function(u){var m=!1,v,z,V,ue,Ee,Me,$e,Ye;if(!this._pxBounds||!this._pxBounds.contains(u))return!1;for(ue=0,$e=this._parts.length;ue<$e;ue++)for(v=this._parts[ue],Ee=0,Ye=v.length,Me=Ye-1;Ee<Ye;Me=Ee++)z=v[Ee],V=v[Me],z.y>u.y!=V.y>u.y&&u.x<(V.x-z.x)*(u.y-z.y)/(V.y-z.y)+z.x&&(m=!m);return m||Bo.prototype._containsPoint.call(this,u,!0)}});function f1(u,m){return new Os(u,m)}var Na=et.extend({initialize:function(u,m){b(this,m),this._layers={},u&&this.addData(u)},addData:function(u){var m=R(u)?u:u.features,v,z,V;if(m){for(v=0,z=m.length;v<z;v++)V=m[v],(V.geometries||V.geometry||V.features||V.coordinates)&&this.addData(V);return this}var ue=this.options;if(ue.filter&&!ue.filter(u))return this;var Ee=Eb(u,ue);return Ee?(Ee.feature=Ab(u),Ee.defaultOptions=Ee.options,this.resetStyle(Ee),ue.onEachFeature&&ue.onEachFeature(u,Ee),this.addLayer(Ee)):this},resetStyle:function(u){return u===void 0?this.eachLayer(this.resetStyle,this):(u.options=i({},u.defaultOptions),this._setLayerStyle(u,this.options.style),this)},setStyle:function(u){return this.eachLayer(function(m){this._setLayerStyle(m,u)},this)},_setLayerStyle:function(u,m){u.setStyle&&(typeof m=="function"&&(m=m(u.feature)),u.setStyle(m))}});function Eb(u,m){var v=u.type==="Feature"?u.geometry:u,z=v?v.coordinates:null,V=[],ue=m&&m.pointToLayer,Ee=m&&m.coordsToLatLng||h1,Me,$e,Ye,mt;if(!z&&!v)return null;switch(v.type){case"Point":return Me=Ee(z),rR(ue,u,Me,m);case"MultiPoint":for(Ye=0,mt=z.length;Ye<mt;Ye++)Me=Ee(z[Ye]),V.push(rR(ue,u,Me,m));return new et(V);case"LineString":case"MultiLineString":return $e=Cb(z,v.type==="LineString"?0:1,Ee),new Bo($e,m);case"Polygon":case"MultiPolygon":return $e=Cb(z,v.type==="Polygon"?1:2,Ee),new Os($e,m);case"GeometryCollection":for(Ye=0,mt=v.geometries.length;Ye<mt;Ye++){var It=Eb({geometry:v.geometries[Ye],type:"Feature",properties:u.properties},m);It&&V.push(It)}return new et(V);case"FeatureCollection":for(Ye=0,mt=v.features.length;Ye<mt;Ye++){var on=Eb(v.features[Ye],m);on&&V.push(on)}return new et(V);default:throw new Error("Invalid GeoJSON object.")}}function rR(u,m,v,z){return u?u(m,v):new Nn(v,z&&z.markersInheritOptions&&z)}function h1(u){return new Y(u[1],u[0],u[2])}function Cb(u,m,v){for(var z=[],V=0,ue=u.length,Ee;V<ue;V++)Ee=m?Cb(u[V],m-1,v):(v||h1)(u[V]),z.push(Ee);return z}function m1(u,m){return u=J(u),u.alt!==void 0?[p(u.lng,m),p(u.lat,m),p(u.alt,m)]:[p(u.lng,m),p(u.lat,m)]}function Sb(u,m,v,z){for(var V=[],ue=0,Ee=u.length;ue<Ee;ue++)V.push(m?Sb(u[ue],To(u[ue])?0:m-1,v,z):m1(u[ue],z));return!m&&v&&V.length>0&&V.push(V[0].slice()),V}function Du(u,m){return u.feature?i({},u.feature,{geometry:m}):Ab(m)}function Ab(u){return u.type==="Feature"||u.type==="FeatureCollection"?u:{type:"Feature",properties:{},geometry:u}}var p1={toGeoJSON:function(u){return Du(this,{type:"Point",coordinates:m1(this.getLatLng(),u)})}};Nn.include(p1),Vr.include(p1),wo.include(p1),Bo.include({toGeoJSON:function(u){var m=!To(this._latlngs),v=Sb(this._latlngs,m?1:0,!1,u);return Du(this,{type:(m?"Multi":"")+"LineString",coordinates:v})}}),Os.include({toGeoJSON:function(u){var m=!To(this._latlngs),v=m&&!To(this._latlngs[0]),z=Sb(this._latlngs,v?2:m?1:0,!0,u);return m||(z=[z]),Du(this,{type:(v?"Multi":"")+"Polygon",coordinates:z})}}),De.include({toMultiPoint:function(u){var m=[];return this.eachLayer(function(v){m.push(v.toGeoJSON(u).geometry.coordinates)}),Du(this,{type:"MultiPoint",coordinates:m})},toGeoJSON:function(u){var m=this.feature&&this.feature.geometry&&this.feature.geometry.type;if(m==="MultiPoint")return this.toMultiPoint(u);var v=m==="GeometryCollection",z=[];return this.eachLayer(function(V){if(V.toGeoJSON){var ue=V.toGeoJSON(u);if(v)z.push(ue.geometry);else{var Ee=Ab(ue);Ee.type==="FeatureCollection"?z.push.apply(z,Ee.features):z.push(Ee)}}}),v?Du(this,{geometries:z,type:"GeometryCollection"}):{type:"FeatureCollection",features:z}}});function iR(u,m){return new Na(u,m)}var vTe=iR,Tb=be.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(u,m,v){this._url=u,this._bounds=j(m),b(this,v)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&($t(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){bn(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(u){return this.options.opacity=u,this._image&&this._updateOpacity(),this},setStyle:function(u){return u.opacity&&this.setOpacity(u.opacity),this},bringToFront:function(){return this._map&&ro(this._image),this},bringToBack:function(){return this._map&&jo(this._image),this},setUrl:function(u){return this._url=u,this._image&&(this._image.src=u),this},setBounds:function(u){return this._bounds=j(u),this._map&&this._reset(),this},getEvents:function(){var u={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(u.zoomanim=this._animateZoom),u},setZIndex:function(u){return this.options.zIndex=u,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var u=this._url.tagName==="IMG",m=this._image=u?this._url:Wt("img");if($t(m,"leaflet-image-layer"),this._zoomAnimated&&$t(m,"leaflet-zoom-animated"),this.options.className&&$t(m,this.options.className),m.onselectstart=h,m.onmousemove=h,m.onload=a(this.fire,this,"load"),m.onerror=a(this._overlayOnError,this,"error"),(this.options.crossOrigin||this.options.crossOrigin==="")&&(m.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),u){this._url=m.src;return}m.src=this._url,m.alt=this.options.alt},_animateZoom:function(u){var m=this._map.getZoomScale(u.zoom),v=this._map._latLngBoundsToNewLayerBounds(this._bounds,u.zoom,u.center).min;bo(this._image,v,m)},_reset:function(){var u=this._image,m=new se(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),v=m.getSize();Gn(u,m.min),u.style.width=v.x+"px",u.style.height=v.y+"px"},_updateOpacity:function(){cr(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var u=this.options.errorOverlayUrl;u&&this._url!==u&&(this._url=u,this._image.src=u)},getCenter:function(){return this._bounds.getCenter()}}),wTe=function(u,m,v){return new Tb(u,m,v)},sR=Tb.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var u=this._url.tagName==="VIDEO",m=this._image=u?this._url:Wt("video");if($t(m,"leaflet-image-layer"),this._zoomAnimated&&$t(m,"leaflet-zoom-animated"),this.options.className&&$t(m,this.options.className),m.onselectstart=h,m.onmousemove=h,m.onloadeddata=a(this.fire,this,"load"),u){for(var v=m.getElementsByTagName("source"),z=[],V=0;V<v.length;V++)z.push(v[V].src);this._url=v.length>0?z:[m.src];return}R(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(m.style,"objectFit")&&(m.style.objectFit="fill"),m.autoplay=!!this.options.autoplay,m.loop=!!this.options.loop,m.muted=!!this.options.muted,m.playsInline=!!this.options.playsInline;for(var ue=0;ue<this._url.length;ue++){var Ee=Wt("source");Ee.src=this._url[ue],m.appendChild(Ee)}}});function kTe(u,m,v){return new sR(u,m,v)}var aR=Tb.extend({_initImage:function(){var u=this._image=this._url;$t(u,"leaflet-image-layer"),this._zoomAnimated&&$t(u,"leaflet-zoom-animated"),this.options.className&&$t(u,this.options.className),u.onselectstart=h,u.onmousemove=h}});function _Te(u,m,v){return new aR(u,m,v)}var Ls=be.extend({options:{interactive:!1,offset:[0,0],className:"",pane:void 0,content:""},initialize:function(u,m){u&&(u instanceof Y||R(u))?(this._latlng=J(u),b(this,m)):(b(this,u),this._source=m),this.options.content&&(this._content=this.options.content)},openOn:function(u){return u=arguments.length?u:this._source._map,u.hasLayer(this)||u.addLayer(this),this},close:function(){return this._map&&this._map.removeLayer(this),this},toggle:function(u){return this._map?this.close():(arguments.length?this._source=u:u=this._source,this._prepareOpen(),this.openOn(u._map)),this},onAdd:function(u){this._zoomAnimated=u._zoomAnimated,this._container||this._initLayout(),u._fadeAnimated&&cr(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),u._fadeAnimated&&cr(this._container,1),this.bringToFront(),this.options.interactive&&($t(this._container,"leaflet-interactive"),this.addInteractiveTarget(this._container))},onRemove:function(u){u._fadeAnimated?(cr(this._container,0),this._removeTimeout=setTimeout(a(bn,void 0,this._container),200)):bn(this._container),this.options.interactive&&(Kn(this._container,"leaflet-interactive"),this.removeInteractiveTarget(this._container))},getLatLng:function(){return this._latlng},setLatLng:function(u){return this._latlng=J(u),this._map&&(this._updatePosition(),this._adjustPan()),this},getContent:function(){return this._content},setContent:function(u){return this._content=u,this.update(),this},getElement:function(){return this._container},update:function(){this._map&&(this._container.style.visibility="hidden",this._updateContent(),this._updateLayout(),this._updatePosition(),this._container.style.visibility="",this._adjustPan())},getEvents:function(){var u={zoom:this._updatePosition,viewreset:this._updatePosition};return this._zoomAnimated&&(u.zoomanim=this._animateZoom),u},isOpen:function(){return!!this._map&&this._map.hasLayer(this)},bringToFront:function(){return this._map&&ro(this._container),this},bringToBack:function(){return this._map&&jo(this._container),this},_prepareOpen:function(u){var m=this._source;if(!m._map)return!1;if(m instanceof et){m=null;var v=this._source._layers;for(var z in v)if(v[z]._map){m=v[z];break}if(!m)return!1;this._source=m}if(!u)if(m.getCenter)u=m.getCenter();else if(m.getLatLng)u=m.getLatLng();else if(m.getBounds)u=m.getBounds().getCenter();else throw new Error("Unable to get source layer LatLng.");return this.setLatLng(u),this._map&&this.update(),!0},_updateContent:function(){if(this._content){var u=this._contentNode,m=typeof this._content=="function"?this._content(this._source||this):this._content;if(typeof m=="string")u.innerHTML=m;else{for(;u.hasChildNodes();)u.removeChild(u.firstChild);u.appendChild(m)}this.fire("contentupdate")}},_updatePosition:function(){if(this._map){var u=this._map.latLngToLayerPoint(this._latlng),m=W(this.options.offset),v=this._getAnchor();this._zoomAnimated?Gn(this._container,u.add(v)):m=m.add(u).add(v);var z=this._containerBottom=-m.y,V=this._containerLeft=-Math.round(this._containerWidth/2)+m.x;this._container.style.bottom=z+"px",this._container.style.left=V+"px"}},_getAnchor:function(){return[0,0]}});ln.include({_initOverlay:function(u,m,v,z){var V=m;return V instanceof u||(V=new u(z).setContent(m)),v&&V.setLatLng(v),V}}),be.include({_initOverlay:function(u,m,v,z){var V=v;return V instanceof u?(b(V,z),V._source=this):(V=m&&!z?m:new u(z,this),V.setContent(v)),V}});var Bb=Ls.extend({options:{pane:"popupPane",offset:[0,7],maxWidth:300,minWidth:50,maxHeight:null,autoPan:!0,autoPanPaddingTopLeft:null,autoPanPaddingBottomRight:null,autoPanPadding:[5,5],keepInView:!1,closeButton:!0,autoClose:!0,closeOnEscapeKey:!0,className:""},openOn:function(u){return u=arguments.length?u:this._source._map,!u.hasLayer(this)&&u._popup&&u._popup.options.autoClose&&u.removeLayer(u._popup),u._popup=this,Ls.prototype.openOn.call(this,u)},onAdd:function(u){Ls.prototype.onAdd.call(this,u),u.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof Dn||this._source.on("preclick",Ms))},onRemove:function(u){Ls.prototype.onRemove.call(this,u),u.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof Dn||this._source.off("preclick",Ms))},getEvents:function(){var u=Ls.prototype.getEvents.call(this);return(this.options.closeOnClick!==void 0?this.options.closeOnClick:this._map.options.closePopupOnClick)&&(u.preclick=this.close),this.options.keepInView&&(u.moveend=this._adjustPan),u},_initLayout:function(){var u="leaflet-popup",m=this._container=Wt("div",u+" "+(this.options.className||"")+" leaflet-zoom-animated"),v=this._wrapper=Wt("div",u+"-content-wrapper",m);if(this._contentNode=Wt("div",u+"-content",v),Nl(m),Bu(this._contentNode),Pt(m,"contextmenu",Ms),this._tipContainer=Wt("div",u+"-tip-container",m),this._tip=Wt("div",u+"-tip",this._tipContainer),this.options.closeButton){var z=this._closeButton=Wt("a",u+"-close-button",m);z.setAttribute("role","button"),z.setAttribute("aria-label","Close popup"),z.href="#close",z.innerHTML='<span aria-hidden="true">&#215;</span>',Pt(z,"click",function(V){Ao(V),this.close()},this)}},_updateLayout:function(){var u=this._contentNode,m=u.style;m.width="",m.whiteSpace="nowrap";var v=u.offsetWidth;v=Math.min(v,this.options.maxWidth),v=Math.max(v,this.options.minWidth),m.width=v+1+"px",m.whiteSpace="",m.height="";var z=u.offsetHeight,V=this.options.maxHeight,ue="leaflet-popup-scrolled";V&&z>V?(m.height=V+"px",$t(u,ue)):Kn(u,ue),this._containerWidth=this._container.offsetWidth},_animateZoom:function(u){var m=this._map._latLngToNewLayerPoint(this._latlng,u.zoom,u.center),v=this._getAnchor();Gn(this._container,m.add(v))},_adjustPan:function(){if(this.options.autoPan){if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning){this._autopanning=!1;return}var u=this._map,m=parseInt(Io(this._container,"marginBottom"),10)||0,v=this._container.offsetHeight+m,z=this._containerWidth,V=new X(this._containerLeft,-v-this._containerBottom);V._add(br(this._container));var ue=u.layerPointToContainerPoint(V),Ee=W(this.options.autoPanPadding),Me=W(this.options.autoPanPaddingTopLeft||Ee),$e=W(this.options.autoPanPaddingBottomRight||Ee),Ye=u.getSize(),mt=0,It=0;ue.x+z+$e.x>Ye.x&&(mt=ue.x+z-Ye.x+$e.x),ue.x-mt-Me.x<0&&(mt=ue.x-Me.x),ue.y+v+$e.y>Ye.y&&(It=ue.y+v-Ye.y+$e.y),ue.y-It-Me.y<0&&(It=ue.y-Me.y),(mt||It)&&(this.options.keepInView&&(this._autopanning=!0),u.fire("autopanstart").panBy([mt,It]))}},_getAnchor:function(){return W(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),xTe=function(u,m){return new Bb(u,m)};ln.mergeOptions({closePopupOnClick:!0}),ln.include({openPopup:function(u,m,v){return this._initOverlay(Bb,u,m,v).openOn(this),this},closePopup:function(u){return u=arguments.length?u:this._popup,u&&u.close(),this}}),be.include({bindPopup:function(u,m){return this._popup=this._initOverlay(Bb,this._popup,u,m),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(u){return this._popup&&(this instanceof et||(this._popup._source=this),this._popup._prepareOpen(u||this._latlng)&&this._popup.openOn(this._map)),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return this._popup?this._popup.isOpen():!1},setPopupContent:function(u){return this._popup&&this._popup.setContent(u),this},getPopup:function(){return this._popup},_openPopup:function(u){if(!(!this._popup||!this._map)){Qi(u);var m=u.layer||u.target;if(this._popup._source===m&&!(m instanceof Dn)){this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(u.latlng);return}this._popup._source=m,this.openPopup(u.latlng)}},_movePopup:function(u){this._popup.setLatLng(u.latlng)},_onKeyPress:function(u){u.originalEvent.keyCode===13&&this._openPopup(u)}});var Pb=Ls.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(u){Ls.prototype.onAdd.call(this,u),this.setOpacity(this.options.opacity),u.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(u){Ls.prototype.onRemove.call(this,u),u.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var u=Ls.prototype.getEvents.call(this);return this.options.permanent||(u.preclick=this.close),u},_initLayout:function(){var u="leaflet-tooltip",m=u+" "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=Wt("div",m),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+c(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(u){var m,v,z=this._map,V=this._container,ue=z.latLngToContainerPoint(z.getCenter()),Ee=z.layerPointToContainerPoint(u),Me=this.options.direction,$e=V.offsetWidth,Ye=V.offsetHeight,mt=W(this.options.offset),It=this._getAnchor();Me==="top"?(m=$e/2,v=Ye):Me==="bottom"?(m=$e/2,v=0):Me==="center"?(m=$e/2,v=Ye/2):Me==="right"?(m=0,v=Ye/2):Me==="left"?(m=$e,v=Ye/2):Ee.x<ue.x?(Me="right",m=0,v=Ye/2):(Me="left",m=$e+(mt.x+It.x)*2,v=Ye/2),u=u.subtract(W(m,v,!0)).add(mt).add(It),Kn(V,"leaflet-tooltip-right"),Kn(V,"leaflet-tooltip-left"),Kn(V,"leaflet-tooltip-top"),Kn(V,"leaflet-tooltip-bottom"),$t(V,"leaflet-tooltip-"+Me),Gn(V,u)},_updatePosition:function(){var u=this._map.latLngToLayerPoint(this._latlng);this._setPosition(u)},setOpacity:function(u){this.options.opacity=u,this._container&&cr(this._container,u)},_animateZoom:function(u){var m=this._map._latLngToNewLayerPoint(this._latlng,u.zoom,u.center);this._setPosition(m)},_getAnchor:function(){return W(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}}),ETe=function(u,m){return new Pb(u,m)};ln.include({openTooltip:function(u,m,v){return this._initOverlay(Pb,u,m,v).openOn(this),this},closeTooltip:function(u){return u.close(),this}}),be.include({bindTooltip:function(u,m){return this._tooltip&&this.isTooltipOpen()&&this.unbindTooltip(),this._tooltip=this._initOverlay(Pb,this._tooltip,u,m),this._initTooltipInteractions(),this._tooltip.options.permanent&&this._map&&this._map.hasLayer(this)&&this.openTooltip(),this},unbindTooltip:function(){return this._tooltip&&(this._initTooltipInteractions(!0),this.closeTooltip(),this._tooltip=null),this},_initTooltipInteractions:function(u){if(!(!u&&this._tooltipHandlersAdded)){var m=u?"off":"on",v={remove:this.closeTooltip,move:this._moveTooltip};this._tooltip.options.permanent?v.add=this._openTooltip:(v.mouseover=this._openTooltip,v.mouseout=this.closeTooltip,v.click=this._openTooltip,this._map?this._addFocusListeners():v.add=this._addFocusListeners),this._tooltip.options.sticky&&(v.mousemove=this._moveTooltip),this[m](v),this._tooltipHandlersAdded=!u}},openTooltip:function(u){return this._tooltip&&(this instanceof et||(this._tooltip._source=this),this._tooltip._prepareOpen(u)&&(this._tooltip.openOn(this._map),this.getElement?this._setAriaDescribedByOnLayer(this):this.eachLayer&&this.eachLayer(this._setAriaDescribedByOnLayer,this))),this},closeTooltip:function(){if(this._tooltip)return this._tooltip.close()},toggleTooltip:function(){return this._tooltip&&this._tooltip.toggle(this),this},isTooltipOpen:function(){return this._tooltip.isOpen()},setTooltipContent:function(u){return this._tooltip&&this._tooltip.setContent(u),this},getTooltip:function(){return this._tooltip},_addFocusListeners:function(){this.getElement?this._addFocusListenersOnLayer(this):this.eachLayer&&this.eachLayer(this._addFocusListenersOnLayer,this)},_addFocusListenersOnLayer:function(u){var m=typeof u.getElement=="function"&&u.getElement();m&&(Pt(m,"focus",function(){this._tooltip._source=u,this.openTooltip()},this),Pt(m,"blur",this.closeTooltip,this))},_setAriaDescribedByOnLayer:function(u){var m=typeof u.getElement=="function"&&u.getElement();m&&m.setAttribute("aria-describedby",this._tooltip._container.id)},_openTooltip:function(u){if(!(!this._tooltip||!this._map)){if(this._map.dragging&&this._map.dragging.moving()&&!this._openOnceFlag){this._openOnceFlag=!0;var m=this;this._map.once("moveend",function(){m._openOnceFlag=!1,m._openTooltip(u)});return}this._tooltip._source=u.layer||u.target,this.openTooltip(this._tooltip.options.sticky?u.latlng:void 0)}},_moveTooltip:function(u){var m=u.latlng,v,z;this._tooltip.options.sticky&&u.originalEvent&&(v=this._map.mouseEventToContainerPoint(u.originalEvent),z=this._map.containerPointToLayerPoint(v),m=this._map.layerPointToLatLng(z)),this._tooltip.setLatLng(m)}});var lR=Mt.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"},createIcon:function(u){var m=u&&u.tagName==="DIV"?u:document.createElement("div"),v=this.options;if(v.html instanceof Element?(kn(m),m.appendChild(v.html)):m.innerHTML=v.html!==!1?v.html:"",v.bgPos){var z=W(v.bgPos);m.style.backgroundPosition=-z.x+"px "+-z.y+"px"}return this._setIconStyles(m,"icon"),m},createShadow:function(){return null}});function CTe(u){return new lR(u)}Mt.Default=nt;var mm=be.extend({options:{tileSize:256,opacity:1,updateWhenIdle:kt.mobile,updateWhenZooming:!0,updateInterval:200,zIndex:1,bounds:null,minZoom:0,maxZoom:void 0,maxNativeZoom:void 0,minNativeZoom:void 0,noWrap:!1,pane:"tilePane",className:"",keepBuffer:2},initialize:function(u){b(this,u)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView()},beforeAdd:function(u){u._addZoomLimit(this)},onRemove:function(u){this._removeAllTiles(),bn(this._container),u._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(ro(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(jo(this._container),this._setAutoZIndex(Math.min)),this},getContainer:function(){return this._container},setOpacity:function(u){return this.options.opacity=u,this._updateOpacity(),this},setZIndex:function(u){return this.options.zIndex=u,this._updateZIndex(),this},isLoading:function(){return this._loading},redraw:function(){if(this._map){this._removeAllTiles();var u=this._clampZoom(this._map.getZoom());u!==this._tileZoom&&(this._tileZoom=u,this._updateLevels()),this._update()}return this},getEvents:function(){var u={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};return this.options.updateWhenIdle||(this._onMove||(this._onMove=d(this._onMoveEnd,this.options.updateInterval,this)),u.move=this._onMove),this._zoomAnimated&&(u.zoomanim=this._animateZoom),u},createTile:function(){return document.createElement("div")},getTileSize:function(){var u=this.options.tileSize;return u instanceof X?u:new X(u,u)},_updateZIndex:function(){this._container&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(u){for(var m=this.getPane().children,v=-u(-1/0,1/0),z=0,V=m.length,ue;z<V;z++)ue=m[z].style.zIndex,m[z]!==this._container&&ue&&(v=u(v,+ue));isFinite(v)&&(this.options.zIndex=v+u(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!kt.ielt9){cr(this._container,this.options.opacity);var u=+new Date,m=!1,v=!1;for(var z in this._tiles){var V=this._tiles[z];if(!(!V.current||!V.loaded)){var ue=Math.min(1,(u-V.loaded)/200);cr(V.el,ue),ue<1?m=!0:(V.active?v=!0:this._onOpaqueTile(V),V.active=!0)}}v&&!this._noPrune&&this._pruneTiles(),m&&(P(this._fadeFrame),this._fadeFrame=A(this._updateOpacity,this))}},_onOpaqueTile:h,_initContainer:function(){this._container||(this._container=Wt("div","leaflet-layer "+(this.options.className||"")),this._updateZIndex(),this.options.opacity<1&&this._updateOpacity(),this.getPane().appendChild(this._container))},_updateLevels:function(){var u=this._tileZoom,m=this.options.maxZoom;if(u!==void 0){for(var v in this._levels)v=Number(v),this._levels[v].el.children.length||v===u?(this._levels[v].el.style.zIndex=m-Math.abs(u-v),this._onUpdateLevel(v)):(bn(this._levels[v].el),this._removeTilesAtZoom(v),this._onRemoveLevel(v),delete this._levels[v]);var z=this._levels[u],V=this._map;return z||(z=this._levels[u]={},z.el=Wt("div","leaflet-tile-container leaflet-zoom-animated",this._container),z.el.style.zIndex=m,z.origin=V.project(V.unproject(V.getPixelOrigin()),u).round(),z.zoom=u,this._setZoomTransform(z,V.getCenter(),V.getZoom()),h(z.el.offsetWidth),this._onCreateLevel(z)),this._level=z,z}},_onUpdateLevel:h,_onRemoveLevel:h,_onCreateLevel:h,_pruneTiles:function(){if(this._map){var u,m,v=this._map.getZoom();if(v>this.options.maxZoom||v<this.options.minZoom){this._removeAllTiles();return}for(u in this._tiles)m=this._tiles[u],m.retain=m.current;for(u in this._tiles)if(m=this._tiles[u],m.current&&!m.active){var z=m.coords;this._retainParent(z.x,z.y,z.z,z.z-5)||this._retainChildren(z.x,z.y,z.z,z.z+2)}for(u in this._tiles)this._tiles[u].retain||this._removeTile(u)}},_removeTilesAtZoom:function(u){for(var m in this._tiles)this._tiles[m].coords.z===u&&this._removeTile(m)},_removeAllTiles:function(){for(var u in this._tiles)this._removeTile(u)},_invalidateAll:function(){for(var u in this._levels)bn(this._levels[u].el),this._onRemoveLevel(Number(u)),delete this._levels[u];this._removeAllTiles(),this._tileZoom=void 0},_retainParent:function(u,m,v,z){var V=Math.floor(u/2),ue=Math.floor(m/2),Ee=v-1,Me=new X(+V,+ue);Me.z=+Ee;var $e=this._tileCoordsToKey(Me),Ye=this._tiles[$e];return Ye&&Ye.active?(Ye.retain=!0,!0):(Ye&&Ye.loaded&&(Ye.retain=!0),Ee>z?this._retainParent(V,ue,Ee,z):!1)},_retainChildren:function(u,m,v,z){for(var V=2*u;V<2*u+2;V++)for(var ue=2*m;ue<2*m+2;ue++){var Ee=new X(V,ue);Ee.z=v+1;var Me=this._tileCoordsToKey(Ee),$e=this._tiles[Me];if($e&&$e.active){$e.retain=!0;continue}else $e&&$e.loaded&&($e.retain=!0);v+1<z&&this._retainChildren(V,ue,v+1,z)}},_resetView:function(u){var m=u&&(u.pinch||u.flyTo);this._setView(this._map.getCenter(),this._map.getZoom(),m,m)},_animateZoom:function(u){this._setView(u.center,u.zoom,!0,u.noUpdate)},_clampZoom:function(u){var m=this.options;return m.minNativeZoom!==void 0&&u<m.minNativeZoom?m.minNativeZoom:m.maxNativeZoom!==void 0&&m.maxNativeZoom<u?m.maxNativeZoom:u},_setView:function(u,m,v,z){var V=Math.round(m);this.options.maxZoom!==void 0&&V>this.options.maxZoom||this.options.minZoom!==void 0&&V<this.options.minZoom?V=void 0:V=this._clampZoom(V);var ue=this.options.updateWhenZooming&&V!==this._tileZoom;(!z||ue)&&(this._tileZoom=V,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),V!==void 0&&this._update(u),v||this._pruneTiles(),this._noPrune=!!v),this._setZoomTransforms(u,m)},_setZoomTransforms:function(u,m){for(var v in this._levels)this._setZoomTransform(this._levels[v],u,m)},_setZoomTransform:function(u,m,v){var z=this._map.getZoomScale(v,u.zoom),V=u.origin.multiplyBy(z).subtract(this._map._getNewPixelOrigin(m,v)).round();kt.any3d?bo(u.el,V,z):Gn(u.el,V)},_resetGrid:function(){var u=this._map,m=u.options.crs,v=this._tileSize=this.getTileSize(),z=this._tileZoom,V=this._map.getPixelWorldBounds(this._tileZoom);V&&(this._globalTileRange=this._pxBoundsToTileRange(V)),this._wrapX=m.wrapLng&&!this.options.noWrap&&[Math.floor(u.project([0,m.wrapLng[0]],z).x/v.x),Math.ceil(u.project([0,m.wrapLng[1]],z).x/v.y)],this._wrapY=m.wrapLat&&!this.options.noWrap&&[Math.floor(u.project([m.wrapLat[0],0],z).y/v.x),Math.ceil(u.project([m.wrapLat[1],0],z).y/v.y)]},_onMoveEnd:function(){!this._map||this._map._animatingZoom||this._update()},_getTiledPixelBounds:function(u){var m=this._map,v=m._animatingZoom?Math.max(m._animateToZoom,m.getZoom()):m.getZoom(),z=m.getZoomScale(v,this._tileZoom),V=m.project(u,this._tileZoom).floor(),ue=m.getSize().divideBy(z*2);return new se(V.subtract(ue),V.add(ue))},_update:function(u){var m=this._map;if(m){var v=this._clampZoom(m.getZoom());if(u===void 0&&(u=m.getCenter()),this._tileZoom!==void 0){var z=this._getTiledPixelBounds(u),V=this._pxBoundsToTileRange(z),ue=V.getCenter(),Ee=[],Me=this.options.keepBuffer,$e=new se(V.getBottomLeft().subtract([Me,-Me]),V.getTopRight().add([Me,-Me]));if(!(isFinite(V.min.x)&&isFinite(V.min.y)&&isFinite(V.max.x)&&isFinite(V.max.y)))throw new Error("Attempted to load an infinite number of tiles");for(var Ye in this._tiles){var mt=this._tiles[Ye].coords;(mt.z!==this._tileZoom||!$e.contains(new X(mt.x,mt.y)))&&(this._tiles[Ye].current=!1)}if(Math.abs(v-this._tileZoom)>1){this._setView(u,v);return}for(var It=V.min.y;It<=V.max.y;It++)for(var on=V.min.x;on<=V.max.x;on++){var yr=new X(on,It);if(yr.z=this._tileZoom,!!this._isValidTile(yr)){var Uo=this._tiles[this._tileCoordsToKey(yr)];Uo?Uo.current=!0:Ee.push(yr)}}if(Ee.sort(function(Ir,Ru){return Ir.distanceTo(ue)-Ru.distanceTo(ue)}),Ee.length!==0){this._loading||(this._loading=!0,this.fire("loading"));var Ai=document.createDocumentFragment();for(on=0;on<Ee.length;on++)this._addTile(Ee[on],Ai);this._level.el.appendChild(Ai)}}}},_isValidTile:function(u){var m=this._map.options.crs;if(!m.infinite){var v=this._globalTileRange;if(!m.wrapLng&&(u.x<v.min.x||u.x>v.max.x)||!m.wrapLat&&(u.y<v.min.y||u.y>v.max.y))return!1}if(!this.options.bounds)return!0;var z=this._tileCoordsToBounds(u);return j(this.options.bounds).overlaps(z)},_keyToBounds:function(u){return this._tileCoordsToBounds(this._keyToTileCoords(u))},_tileCoordsToNwSe:function(u){var m=this._map,v=this.getTileSize(),z=u.scaleBy(v),V=z.add(v),ue=m.unproject(z,u.z),Ee=m.unproject(V,u.z);return[ue,Ee]},_tileCoordsToBounds:function(u){var m=this._tileCoordsToNwSe(u),v=new N(m[0],m[1]);return this.options.noWrap||(v=this._map.wrapLatLngBounds(v)),v},_tileCoordsToKey:function(u){return u.x+":"+u.y+":"+u.z},_keyToTileCoords:function(u){var m=u.split(":"),v=new X(+m[0],+m[1]);return v.z=+m[2],v},_removeTile:function(u){var m=this._tiles[u];m&&(bn(m.el),delete this._tiles[u],this.fire("tileunload",{tile:m.el,coords:this._keyToTileCoords(u)}))},_initTile:function(u){$t(u,"leaflet-tile");var m=this.getTileSize();u.style.width=m.x+"px",u.style.height=m.y+"px",u.onselectstart=h,u.onmousemove=h,kt.ielt9&&this.options.opacity<1&&cr(u,this.options.opacity)},_addTile:function(u,m){var v=this._getTilePos(u),z=this._tileCoordsToKey(u),V=this.createTile(this._wrapCoords(u),a(this._tileReady,this,u));this._initTile(V),this.createTile.length<2&&A(a(this._tileReady,this,u,null,V)),Gn(V,v),this._tiles[z]={el:V,coords:u,current:!0},m.appendChild(V),this.fire("tileloadstart",{tile:V,coords:u})},_tileReady:function(u,m,v){m&&this.fire("tileerror",{error:m,tile:v,coords:u});var z=this._tileCoordsToKey(u);v=this._tiles[z],v&&(v.loaded=+new Date,this._map._fadeAnimated?(cr(v.el,0),P(this._fadeFrame),this._fadeFrame=A(this._updateOpacity,this)):(v.active=!0,this._pruneTiles()),m||($t(v.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:v.el,coords:u})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),kt.ielt9||!this._map._fadeAnimated?A(this._pruneTiles,this):setTimeout(a(this._pruneTiles,this),250)))},_getTilePos:function(u){return u.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(u){var m=new X(this._wrapX?f(u.x,this._wrapX):u.x,this._wrapY?f(u.y,this._wrapY):u.y);return m.z=u.z,m},_pxBoundsToTileRange:function(u){var m=this.getTileSize();return new se(u.min.unscaleBy(m).floor(),u.max.unscaleBy(m).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var u in this._tiles)if(!this._tiles[u].loaded)return!1;return!0}});function STe(u){return new mm(u)}var Mu=mm.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(u,m){this._url=u,m=b(this,m),m.detectRetina&&kt.retina&&m.maxZoom>0?(m.tileSize=Math.floor(m.tileSize/2),m.zoomReverse?(m.zoomOffset--,m.minZoom=Math.min(m.maxZoom,m.minZoom+1)):(m.zoomOffset++,m.maxZoom=Math.max(m.minZoom,m.maxZoom-1)),m.minZoom=Math.max(0,m.minZoom)):m.zoomReverse?m.minZoom=Math.min(m.maxZoom,m.minZoom):m.maxZoom=Math.max(m.minZoom,m.maxZoom),typeof m.subdomains=="string"&&(m.subdomains=m.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(u,m){return this._url===u&&m===void 0&&(m=!0),this._url=u,m||this.redraw(),this},createTile:function(u,m){var v=document.createElement("img");return Pt(v,"load",a(this._tileOnLoad,this,m,v)),Pt(v,"error",a(this._tileOnError,this,m,v)),(this.options.crossOrigin||this.options.crossOrigin==="")&&(v.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),typeof this.options.referrerPolicy=="string"&&(v.referrerPolicy=this.options.referrerPolicy),v.alt="",v.src=this.getTileUrl(u),v},getTileUrl:function(u){var m={r:kt.retina?"@2x":"",s:this._getSubdomain(u),x:u.x,y:u.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var v=this._globalTileRange.max.y-u.y;this.options.tms&&(m.y=v),m["-y"]=v}return B(this._url,i(m,this.options))},_tileOnLoad:function(u,m){kt.ielt9?setTimeout(a(u,this,null,m),0):u(null,m)},_tileOnError:function(u,m,v){var z=this.options.errorTileUrl;z&&m.getAttribute("src")!==z&&(m.src=z),u(v,m)},_onTileRemove:function(u){u.tile.onload=null},_getZoomForUrl:function(){var u=this._tileZoom,m=this.options.maxZoom,v=this.options.zoomReverse,z=this.options.zoomOffset;return v&&(u=m-u),u+z},_getSubdomain:function(u){var m=Math.abs(u.x+u.y)%this.options.subdomains.length;return this.options.subdomains[m]},_abortLoading:function(){var u,m;for(u in this._tiles)if(this._tiles[u].coords.z!==this._tileZoom&&(m=this._tiles[u].el,m.onload=h,m.onerror=h,!m.complete)){m.src=O;var v=this._tiles[u].coords;bn(m),delete this._tiles[u],this.fire("tileabort",{tile:m,coords:v})}},_removeTile:function(u){var m=this._tiles[u];if(m)return m.el.setAttribute("src",O),mm.prototype._removeTile.call(this,u)},_tileReady:function(u,m,v){if(!(!this._map||v&&v.getAttribute("src")===O))return mm.prototype._tileReady.call(this,u,m,v)}});function cR(u,m){return new Mu(u,m)}var dR=Mu.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(u,m){this._url=u;var v=i({},this.defaultWmsParams);for(var z in m)z in this.options||(v[z]=m[z]);m=b(this,m);var V=m.detectRetina&&kt.retina?2:1,ue=this.getTileSize();v.width=ue.x*V,v.height=ue.y*V,this.wmsParams=v},onAdd:function(u){this._crs=this.options.crs||u.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var m=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[m]=this._crs.code,Mu.prototype.onAdd.call(this,u)},getTileUrl:function(u){var m=this._tileCoordsToNwSe(u),v=this._crs,z=H(v.project(m[0]),v.project(m[1])),V=z.min,ue=z.max,Ee=(this._wmsVersion>=1.3&&this._crs===me?[V.y,V.x,ue.y,ue.x]:[V.x,V.y,ue.x,ue.y]).join(","),Me=Mu.prototype.getTileUrl.call(this,u);return Me+_(this.wmsParams,Me,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+Ee},setParams:function(u,m){return i(this.wmsParams,u),m||this.redraw(),this}});function ATe(u,m){return new dR(u,m)}Mu.WMS=dR,cR.wms=ATe;var Da=be.extend({options:{padding:.1},initialize:function(u){b(this,u),c(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),$t(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var u={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(u.zoomanim=this._onAnimZoom),u},_onAnimZoom:function(u){this._updateTransform(u.center,u.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(u,m){var v=this._map.getZoomScale(m,this._zoom),z=this._map.getSize().multiplyBy(.5+this.options.padding),V=this._map.project(this._center,m),ue=z.multiplyBy(-v).add(V).subtract(this._map._getNewPixelOrigin(u,m));kt.any3d?bo(this._container,ue,v):Gn(this._container,ue)},_reset:function(){this._update(),this._updateTransform(this._center,this._zoom);for(var u in this._layers)this._layers[u]._reset()},_onZoomEnd:function(){for(var u in this._layers)this._layers[u]._project()},_updatePaths:function(){for(var u in this._layers)this._layers[u]._update()},_update:function(){var u=this.options.padding,m=this._map.getSize(),v=this._map.containerPointToLayerPoint(m.multiplyBy(-u)).round();this._bounds=new se(v,v.add(m.multiplyBy(1+u*2)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),uR=Da.extend({options:{tolerance:0},getEvents:function(){var u=Da.prototype.getEvents.call(this);return u.viewprereset=this._onViewPreReset,u},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){Da.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var u=this._container=document.createElement("canvas");Pt(u,"mousemove",this._onMouseMove,this),Pt(u,"click dblclick mousedown mouseup contextmenu",this._onClick,this),Pt(u,"mouseout",this._handleMouseOut,this),u._leaflet_disable_events=!0,this._ctx=u.getContext("2d")},_destroyContainer:function(){P(this._redrawRequest),delete this._ctx,bn(this._container),Cn(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){var u;this._redrawBounds=null;for(var m in this._layers)u=this._layers[m],u._update();this._redraw()}},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){Da.prototype._update.call(this);var u=this._bounds,m=this._container,v=u.getSize(),z=kt.retina?2:1;Gn(m,u.min),m.width=z*v.x,m.height=z*v.y,m.style.width=v.x+"px",m.style.height=v.y+"px",kt.retina&&this._ctx.scale(2,2),this._ctx.translate(-u.min.x,-u.min.y),this.fire("update")}},_reset:function(){Da.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(u){this._updateDashArray(u),this._layers[c(u)]=u;var m=u._order={layer:u,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=m),this._drawLast=m,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(u){this._requestRedraw(u)},_removePath:function(u){var m=u._order,v=m.next,z=m.prev;v?v.prev=z:this._drawLast=z,z?z.next=v:this._drawFirst=v,delete u._order,delete this._layers[c(u)],this._requestRedraw(u)},_updatePath:function(u){this._extendRedrawBounds(u),u._project(),u._update(),this._requestRedraw(u)},_updateStyle:function(u){this._updateDashArray(u),this._requestRedraw(u)},_updateDashArray:function(u){if(typeof u.options.dashArray=="string"){var m=u.options.dashArray.split(/[, ]+/),v=[],z,V;for(V=0;V<m.length;V++){if(z=Number(m[V]),isNaN(z))return;v.push(z)}u.options._dashArray=v}else u.options._dashArray=u.options.dashArray},_requestRedraw:function(u){this._map&&(this._extendRedrawBounds(u),this._redrawRequest=this._redrawRequest||A(this._redraw,this))},_extendRedrawBounds:function(u){if(u._pxBounds){var m=(u.options.weight||0)+1;this._redrawBounds=this._redrawBounds||new se,this._redrawBounds.extend(u._pxBounds.min.subtract([m,m])),this._redrawBounds.extend(u._pxBounds.max.add([m,m]))}},_redraw:function(){this._redrawRequest=null,this._redrawBounds&&(this._redrawBounds.min._floor(),this._redrawBounds.max._ceil()),this._clear(),this._draw(),this._redrawBounds=null},_clear:function(){var u=this._redrawBounds;if(u){var m=u.getSize();this._ctx.clearRect(u.min.x,u.min.y,m.x,m.y)}else this._ctx.save(),this._ctx.setTransform(1,0,0,1,0,0),this._ctx.clearRect(0,0,this._container.width,this._container.height),this._ctx.restore()},_draw:function(){var u,m=this._redrawBounds;if(this._ctx.save(),m){var v=m.getSize();this._ctx.beginPath(),this._ctx.rect(m.min.x,m.min.y,v.x,v.y),this._ctx.clip()}this._drawing=!0;for(var z=this._drawFirst;z;z=z.next)u=z.layer,(!m||u._pxBounds&&u._pxBounds.intersects(m))&&u._updatePath();this._drawing=!1,this._ctx.restore()},_updatePoly:function(u,m){if(this._drawing){var v,z,V,ue,Ee=u._parts,Me=Ee.length,$e=this._ctx;if(Me){for($e.beginPath(),v=0;v<Me;v++){for(z=0,V=Ee[v].length;z<V;z++)ue=Ee[v][z],$e[z?"lineTo":"moveTo"](ue.x,ue.y);m&&$e.closePath()}this._fillStroke($e,u)}}},_updateCircle:function(u){if(!(!this._drawing||u._empty())){var m=u._point,v=this._ctx,z=Math.max(Math.round(u._radius),1),V=(Math.max(Math.round(u._radiusY),1)||z)/z;V!==1&&(v.save(),v.scale(1,V)),v.beginPath(),v.arc(m.x,m.y/V,z,0,Math.PI*2,!1),V!==1&&v.restore(),this._fillStroke(v,u)}},_fillStroke:function(u,m){var v=m.options;v.fill&&(u.globalAlpha=v.fillOpacity,u.fillStyle=v.fillColor||v.color,u.fill(v.fillRule||"evenodd")),v.stroke&&v.weight!==0&&(u.setLineDash&&u.setLineDash(m.options&&m.options._dashArray||[]),u.globalAlpha=v.opacity,u.lineWidth=v.weight,u.strokeStyle=v.color,u.lineCap=v.lineCap,u.lineJoin=v.lineJoin,u.stroke())},_onClick:function(u){for(var m=this._map.mouseEventToLayerPoint(u),v,z,V=this._drawFirst;V;V=V.next)v=V.layer,v.options.interactive&&v._containsPoint(m)&&(!(u.type==="click"||u.type==="preclick")||!this._map._draggableMoved(v))&&(z=v);this._fireEvent(z?[z]:!1,u)},_onMouseMove:function(u){if(!(!this._map||this._map.dragging.moving()||this._map._animatingZoom)){var m=this._map.mouseEventToLayerPoint(u);this._handleMouseHover(u,m)}},_handleMouseOut:function(u){var m=this._hoveredLayer;m&&(Kn(this._container,"leaflet-interactive"),this._fireEvent([m],u,"mouseout"),this._hoveredLayer=null,this._mouseHoverThrottled=!1)},_handleMouseHover:function(u,m){if(!this._mouseHoverThrottled){for(var v,z,V=this._drawFirst;V;V=V.next)v=V.layer,v.options.interactive&&v._containsPoint(m)&&(z=v);z!==this._hoveredLayer&&(this._handleMouseOut(u),z&&($t(this._container,"leaflet-interactive"),this._fireEvent([z],u,"mouseover"),this._hoveredLayer=z)),this._fireEvent(this._hoveredLayer?[this._hoveredLayer]:!1,u),this._mouseHoverThrottled=!0,setTimeout(a(function(){this._mouseHoverThrottled=!1},this),32)}},_fireEvent:function(u,m,v){this._map._fireDOMEvent(m,v||m.type,u)},_bringToFront:function(u){var m=u._order;if(m){var v=m.next,z=m.prev;if(v)v.prev=z;else return;z?z.next=v:v&&(this._drawFirst=v),m.prev=this._drawLast,this._drawLast.next=m,m.next=null,this._drawLast=m,this._requestRedraw(u)}},_bringToBack:function(u){var m=u._order;if(m){var v=m.next,z=m.prev;if(z)z.next=v;else return;v?v.prev=z:z&&(this._drawLast=z),m.prev=null,m.next=this._drawFirst,this._drawFirst.prev=m,this._drawFirst=m,this._requestRedraw(u)}}});function fR(u){return kt.canvas?new uR(u):null}var pm=(function(){try{return document.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(u){return document.createElement("<lvml:"+u+' class="lvml">')}}catch{}return function(u){return document.createElement("<"+u+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}})(),TTe={_initContainer:function(){this._container=Wt("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(Da.prototype._update.call(this),this.fire("update"))},_initPath:function(u){var m=u._container=pm("shape");$t(m,"leaflet-vml-shape "+(this.options.className||"")),m.coordsize="1 1",u._path=pm("path"),m.appendChild(u._path),this._updateStyle(u),this._layers[c(u)]=u},_addPath:function(u){var m=u._container;this._container.appendChild(m),u.options.interactive&&u.addInteractiveTarget(m)},_removePath:function(u){var m=u._container;bn(m),u.removeInteractiveTarget(m),delete this._layers[c(u)]},_updateStyle:function(u){var m=u._stroke,v=u._fill,z=u.options,V=u._container;V.stroked=!!z.stroke,V.filled=!!z.fill,z.stroke?(m||(m=u._stroke=pm("stroke")),V.appendChild(m),m.weight=z.weight+"px",m.color=z.color,m.opacity=z.opacity,z.dashArray?m.dashStyle=R(z.dashArray)?z.dashArray.join(" "):z.dashArray.replace(/( *, *)/g," "):m.dashStyle="",m.endcap=z.lineCap.replace("butt","flat"),m.joinstyle=z.lineJoin):m&&(V.removeChild(m),u._stroke=null),z.fill?(v||(v=u._fill=pm("fill")),V.appendChild(v),v.color=z.fillColor||z.color,v.opacity=z.fillOpacity):v&&(V.removeChild(v),u._fill=null)},_updateCircle:function(u){var m=u._point.round(),v=Math.round(u._radius),z=Math.round(u._radiusY||v);this._setPath(u,u._empty()?"M0 0":"AL "+m.x+","+m.y+" "+v+","+z+" 0,"+65535*360)},_setPath:function(u,m){u._path.v=m},_bringToFront:function(u){ro(u._container)},_bringToBack:function(u){jo(u._container)}},Nb=kt.vml?pm:ce,gm=Da.extend({_initContainer:function(){this._container=Nb("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=Nb("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){bn(this._container),Cn(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){Da.prototype._update.call(this);var u=this._bounds,m=u.getSize(),v=this._container;(!this._svgSize||!this._svgSize.equals(m))&&(this._svgSize=m,v.setAttribute("width",m.x),v.setAttribute("height",m.y)),Gn(v,u.min),v.setAttribute("viewBox",[u.min.x,u.min.y,m.x,m.y].join(" ")),this.fire("update")}},_initPath:function(u){var m=u._path=Nb("path");u.options.className&&$t(m,u.options.className),u.options.interactive&&$t(m,"leaflet-interactive"),this._updateStyle(u),this._layers[c(u)]=u},_addPath:function(u){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(u._path),u.addInteractiveTarget(u._path)},_removePath:function(u){bn(u._path),u.removeInteractiveTarget(u._path),delete this._layers[c(u)]},_updatePath:function(u){u._project(),u._update()},_updateStyle:function(u){var m=u._path,v=u.options;m&&(v.stroke?(m.setAttribute("stroke",v.color),m.setAttribute("stroke-opacity",v.opacity),m.setAttribute("stroke-width",v.weight),m.setAttribute("stroke-linecap",v.lineCap),m.setAttribute("stroke-linejoin",v.lineJoin),v.dashArray?m.setAttribute("stroke-dasharray",v.dashArray):m.removeAttribute("stroke-dasharray"),v.dashOffset?m.setAttribute("stroke-dashoffset",v.dashOffset):m.removeAttribute("stroke-dashoffset")):m.setAttribute("stroke","none"),v.fill?(m.setAttribute("fill",v.fillColor||v.color),m.setAttribute("fill-opacity",v.fillOpacity),m.setAttribute("fill-rule",v.fillRule||"evenodd")):m.setAttribute("fill","none"))},_updatePoly:function(u,m){this._setPath(u,ke(u._parts,m))},_updateCircle:function(u){var m=u._point,v=Math.max(Math.round(u._radius),1),z=Math.max(Math.round(u._radiusY),1)||v,V="a"+v+","+z+" 0 1,0 ",ue=u._empty()?"M0 0":"M"+(m.x-v)+","+m.y+V+v*2+",0 "+V+-v*2+",0 ";this._setPath(u,ue)},_setPath:function(u,m){u._path.setAttribute("d",m)},_bringToFront:function(u){ro(u._path)},_bringToBack:function(u){jo(u._path)}});kt.vml&&gm.include(TTe);function hR(u){return kt.svg||kt.vml?new gm(u):null}ln.include({getRenderer:function(u){var m=u.options.renderer||this._getPaneRenderer(u.options.pane)||this.options.renderer||this._renderer;return m||(m=this._renderer=this._createRenderer()),this.hasLayer(m)||this.addLayer(m),m},_getPaneRenderer:function(u){if(u==="overlayPane"||u===void 0)return!1;var m=this._paneRenderers[u];return m===void 0&&(m=this._createRenderer({pane:u}),this._paneRenderers[u]=m),m},_createRenderer:function(u){return this.options.preferCanvas&&fR(u)||hR(u)}});var mR=Os.extend({initialize:function(u,m){Os.prototype.initialize.call(this,this._boundsToLatLngs(u),m)},setBounds:function(u){return this.setLatLngs(this._boundsToLatLngs(u))},_boundsToLatLngs:function(u){return u=j(u),[u.getSouthWest(),u.getNorthWest(),u.getNorthEast(),u.getSouthEast()]}});function BTe(u,m){return new mR(u,m)}gm.create=Nb,gm.pointsToPath=ke,Na.geometryToLayer=Eb,Na.coordsToLatLng=h1,Na.coordsToLatLngs=Cb,Na.latLngToCoords=m1,Na.latLngsToCoords=Sb,Na.getFeature=Du,Na.asFeature=Ab,ln.mergeOptions({boxZoom:!0});var pR=Si.extend({initialize:function(u){this._map=u,this._container=u._container,this._pane=u._panes.overlayPane,this._resetStateTimeout=0,u.on("unload",this._destroy,this)},addHooks:function(){Pt(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Cn(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){bn(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){this._resetStateTimeout!==0&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(u){if(!u.shiftKey||u.which!==1&&u.button!==1)return!1;this._clearDeferredResetState(),this._resetState(),Dt(),Oo(),this._startPoint=this._map.mouseEventToContainerPoint(u),Pt(document,{contextmenu:Qi,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(u){this._moved||(this._moved=!0,this._box=Wt("div","leaflet-zoom-box",this._container),$t(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(u);var m=new se(this._point,this._startPoint),v=m.getSize();Gn(this._box,m.min),this._box.style.width=v.x+"px",this._box.style.height=v.y+"px"},_finish:function(){this._moved&&(bn(this._box),Kn(this._container,"leaflet-crosshair")),Ds(),Qr(),Cn(document,{contextmenu:Qi,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(u){if(!(u.which!==1&&u.button!==1)&&(this._finish(),!!this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(a(this._resetState,this),0);var m=new N(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(m).fire("boxzoomend",{boxZoomBounds:m})}},_onKeyDown:function(u){u.keyCode===27&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});ln.addInitHook("addHandler","boxZoom",pR),ln.mergeOptions({doubleClickZoom:!0});var gR=Si.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(u){var m=this._map,v=m.getZoom(),z=m.options.zoomDelta,V=u.originalEvent.shiftKey?v-z:v+z;m.options.doubleClickZoom==="center"?m.setZoom(V):m.setZoomAround(u.containerPoint,V)}});ln.addInitHook("addHandler","doubleClickZoom",gR),ln.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var bR=Si.extend({addHooks:function(){if(!this._draggable){var u=this._map;this._draggable=new Rs(u._mapPane,u._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),u.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),u.on("zoomend",this._onZoomEnd,this),u.whenReady(this._onZoomEnd,this))}$t(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){Kn(this._map._container,"leaflet-grab"),Kn(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var u=this._map;if(u._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var m=j(this._map.options.maxBounds);this._offsetLimit=H(this._map.latLngToContainerPoint(m.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(m.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;u.fire("movestart").fire("dragstart"),u.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(u){if(this._map.options.inertia){var m=this._lastTime=+new Date,v=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(v),this._times.push(m),this._prunePositions(m)}this._map.fire("move",u).fire("drag",u)},_prunePositions:function(u){for(;this._positions.length>1&&u-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var u=this._map.getSize().divideBy(2),m=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=m.subtract(u).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(u,m){return u-(u-m)*this._viscosity},_onPreDragLimit:function(){if(!(!this._viscosity||!this._offsetLimit)){var u=this._draggable._newPos.subtract(this._draggable._startPos),m=this._offsetLimit;u.x<m.min.x&&(u.x=this._viscousLimit(u.x,m.min.x)),u.y<m.min.y&&(u.y=this._viscousLimit(u.y,m.min.y)),u.x>m.max.x&&(u.x=this._viscousLimit(u.x,m.max.x)),u.y>m.max.y&&(u.y=this._viscousLimit(u.y,m.max.y)),this._draggable._newPos=this._draggable._startPos.add(u)}},_onPreDragWrap:function(){var u=this._worldWidth,m=Math.round(u/2),v=this._initialWorldOffset,z=this._draggable._newPos.x,V=(z-m+v)%u+m-v,ue=(z+m+v)%u-m-v,Ee=Math.abs(V+v)<Math.abs(ue+v)?V:ue;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=Ee},_onDragEnd:function(u){var m=this._map,v=m.options,z=!v.inertia||u.noInertia||this._times.length<2;if(m.fire("dragend",u),z)m.fire("moveend");else{this._prunePositions(+new Date);var V=this._lastPos.subtract(this._positions[0]),ue=(this._lastTime-this._times[0])/1e3,Ee=v.easeLinearity,Me=V.multiplyBy(Ee/ue),$e=Me.distanceTo([0,0]),Ye=Math.min(v.inertiaMaxSpeed,$e),mt=Me.multiplyBy(Ye/$e),It=Ye/(v.inertiaDeceleration*Ee),on=mt.multiplyBy(-It/2).round();!on.x&&!on.y?m.fire("moveend"):(on=m._limitOffset(on,m.options.maxBounds),A(function(){m.panBy(on,{duration:It,easeLinearity:Ee,noMoveStart:!0,animate:!0})}))}}});ln.addInitHook("addHandler","dragging",bR),ln.mergeOptions({keyboard:!0,keyboardPanDelta:80});var yR=Si.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61,171],zoomOut:[189,109,54,173]},initialize:function(u){this._map=u,this._setPanDelta(u.options.keyboardPanDelta),this._setZoomDelta(u.options.zoomDelta)},addHooks:function(){var u=this._map._container;u.tabIndex<=0&&(u.tabIndex="0"),Pt(u,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.on({focus:this._addHooks,blur:this._removeHooks},this)},removeHooks:function(){this._removeHooks(),Cn(this._map._container,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.off({focus:this._addHooks,blur:this._removeHooks},this)},_onMouseDown:function(){if(!this._focused){var u=document.body,m=document.documentElement,v=u.scrollTop||m.scrollTop,z=u.scrollLeft||m.scrollLeft;this._map._container.focus(),window.scrollTo(z,v)}},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanDelta:function(u){var m=this._panKeys={},v=this.keyCodes,z,V;for(z=0,V=v.left.length;z<V;z++)m[v.left[z]]=[-1*u,0];for(z=0,V=v.right.length;z<V;z++)m[v.right[z]]=[u,0];for(z=0,V=v.down.length;z<V;z++)m[v.down[z]]=[0,u];for(z=0,V=v.up.length;z<V;z++)m[v.up[z]]=[0,-1*u]},_setZoomDelta:function(u){var m=this._zoomKeys={},v=this.keyCodes,z,V;for(z=0,V=v.zoomIn.length;z<V;z++)m[v.zoomIn[z]]=u;for(z=0,V=v.zoomOut.length;z<V;z++)m[v.zoomOut[z]]=-u},_addHooks:function(){Pt(document,"keydown",this._onKeyDown,this)},_removeHooks:function(){Cn(document,"keydown",this._onKeyDown,this)},_onKeyDown:function(u){if(!(u.altKey||u.ctrlKey||u.metaKey)){var m=u.keyCode,v=this._map,z;if(m in this._panKeys){if(!v._panAnim||!v._panAnim._inProgress)if(z=this._panKeys[m],u.shiftKey&&(z=W(z).multiplyBy(3)),v.options.maxBounds&&(z=v._limitOffset(W(z),v.options.maxBounds)),v.options.worldCopyJump){var V=v.wrapLatLng(v.unproject(v.project(v.getCenter()).add(z)));v.panTo(V)}else v.panBy(z)}else if(m in this._zoomKeys)v.setZoom(v.getZoom()+(u.shiftKey?3:1)*this._zoomKeys[m]);else if(m===27&&v._popup&&v._popup.options.closeOnEscapeKey)v.closePopup();else return;Qi(u)}}});ln.addInitHook("addHandler","keyboard",yR),ln.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});var vR=Si.extend({addHooks:function(){Pt(this._map._container,"wheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){Cn(this._map._container,"wheel",this._onWheelScroll,this)},_onWheelScroll:function(u){var m=Hc(u),v=this._map.options.wheelDebounceTime;this._delta+=m,this._lastMousePos=this._map.mouseEventToContainerPoint(u),this._startTime||(this._startTime=+new Date);var z=Math.max(v-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(a(this._performZoom,this),z),Qi(u)},_performZoom:function(){var u=this._map,m=u.getZoom(),v=this._map.options.zoomSnap||0;u._stop();var z=this._delta/(this._map.options.wheelPxPerZoomLevel*4),V=4*Math.log(2/(1+Math.exp(-Math.abs(z))))/Math.LN2,ue=v?Math.ceil(V/v)*v:V,Ee=u._limitZoom(m+(this._delta>0?ue:-ue))-m;this._delta=0,this._startTime=null,Ee&&(u.options.scrollWheelZoom==="center"?u.setZoom(m+Ee):u.setZoomAround(this._lastMousePos,m+Ee))}});ln.addInitHook("addHandler","scrollWheelZoom",vR);var PTe=600;ln.mergeOptions({tapHold:kt.touchNative&&kt.safari&&kt.mobile,tapTolerance:15});var wR=Si.extend({addHooks:function(){Pt(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){Cn(this._map._container,"touchstart",this._onDown,this)},_onDown:function(u){if(clearTimeout(this._holdTimeout),u.touches.length===1){var m=u.touches[0];this._startPos=this._newPos=new X(m.clientX,m.clientY),this._holdTimeout=setTimeout(a(function(){this._cancel(),this._isTapValid()&&(Pt(document,"touchend",Ao),Pt(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",m))},this),PTe),Pt(document,"touchend touchcancel contextmenu",this._cancel,this),Pt(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function u(){Cn(document,"touchend",Ao),Cn(document,"touchend touchcancel",u)},_cancel:function(){clearTimeout(this._holdTimeout),Cn(document,"touchend touchcancel contextmenu",this._cancel,this),Cn(document,"touchmove",this._onMove,this)},_onMove:function(u){var m=u.touches[0];this._newPos=new X(m.clientX,m.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(u,m){var v=new MouseEvent(u,{bubbles:!0,cancelable:!0,view:window,screenX:m.screenX,screenY:m.screenY,clientX:m.clientX,clientY:m.clientY});v._simulated=!0,m.target.dispatchEvent(v)}});ln.addInitHook("addHandler","tapHold",wR),ln.mergeOptions({touchZoom:kt.touch,bounceAtZoomLimits:!0});var kR=Si.extend({addHooks:function(){$t(this._map._container,"leaflet-touch-zoom"),Pt(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){Kn(this._map._container,"leaflet-touch-zoom"),Cn(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(u){var m=this._map;if(!(!u.touches||u.touches.length!==2||m._animatingZoom||this._zooming)){var v=m.mouseEventToContainerPoint(u.touches[0]),z=m.mouseEventToContainerPoint(u.touches[1]);this._centerPoint=m.getSize()._divideBy(2),this._startLatLng=m.containerPointToLatLng(this._centerPoint),m.options.touchZoom!=="center"&&(this._pinchStartLatLng=m.containerPointToLatLng(v.add(z)._divideBy(2))),this._startDist=v.distanceTo(z),this._startZoom=m.getZoom(),this._moved=!1,this._zooming=!0,m._stop(),Pt(document,"touchmove",this._onTouchMove,this),Pt(document,"touchend touchcancel",this._onTouchEnd,this),Ao(u)}},_onTouchMove:function(u){if(!(!u.touches||u.touches.length!==2||!this._zooming)){var m=this._map,v=m.mouseEventToContainerPoint(u.touches[0]),z=m.mouseEventToContainerPoint(u.touches[1]),V=v.distanceTo(z)/this._startDist;if(this._zoom=m.getScaleZoom(V,this._startZoom),!m.options.bounceAtZoomLimits&&(this._zoom<m.getMinZoom()&&V<1||this._zoom>m.getMaxZoom()&&V>1)&&(this._zoom=m._limitZoom(this._zoom)),m.options.touchZoom==="center"){if(this._center=this._startLatLng,V===1)return}else{var ue=v._add(z)._divideBy(2)._subtract(this._centerPoint);if(V===1&&ue.x===0&&ue.y===0)return;this._center=m.unproject(m.project(this._pinchStartLatLng,this._zoom).subtract(ue),this._zoom)}this._moved||(m._moveStart(!0,!1),this._moved=!0),P(this._animRequest);var Ee=a(m._move,m,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=A(Ee,this,!0),Ao(u)}},_onTouchEnd:function(){if(!this._moved||!this._zooming){this._zooming=!1;return}this._zooming=!1,P(this._animRequest),Cn(document,"touchmove",this._onTouchMove,this),Cn(document,"touchend touchcancel",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))}});ln.addInitHook("addHandler","touchZoom",kR),ln.BoxZoom=pR,ln.DoubleClickZoom=gR,ln.Drag=bR,ln.Keyboard=yR,ln.ScrollWheelZoom=vR,ln.TapHold=wR,ln.TouchZoom=kR,n.Bounds=se,n.Browser=kt,n.CRS=U,n.Canvas=uR,n.Circle=Vr,n.CircleMarker=wo,n.Class=Q,n.Control=Rr,n.DivIcon=lR,n.DivOverlay=Ls,n.DomEvent=r1,n.DomUtil=yo,n.Draggable=Rs,n.Evented=le,n.FeatureGroup=et,n.GeoJSON=Na,n.GridLayer=mm,n.Handler=Si,n.Icon=Mt,n.ImageOverlay=Tb,n.LatLng=Y,n.LatLngBounds=N,n.Layer=be,n.LayerGroup=De,n.LineUtil=xb,n.Map=ln,n.Marker=Nn,n.Mixin=c1,n.Path=Dn,n.Point=X,n.PolyUtil=bb,n.Polygon=Os,n.Polyline=Bo,n.Popup=Bb,n.PosAnimation=fb,n.Projection=oe,n.Rectangle=mR,n.Renderer=Da,n.SVG=gm,n.SVGOverlay=aR,n.TileLayer=Mu,n.Tooltip=Pb,n.Transformation=M,n.Util=q,n.VideoOverlay=sR,n.bind=a,n.bounds=H,n.canvas=fR,n.circle=Ml,n.circleMarker=ko,n.control=qc,n.divIcon=CTe,n.extend=i,n.featureGroup=ct,n.geoJSON=iR,n.geoJson=vTe,n.gridLayer=STe,n.icon=dt,n.imageOverlay=wTe,n.latLng=J,n.latLngBounds=j,n.layerGroup=He,n.map=i1,n.marker=Yn,n.point=W,n.polygon=f1,n.polyline=Pa,n.popup=xTe,n.rectangle=BTe,n.setOptions=b,n.stamp=c,n.svg=hR,n.svgOverlay=_Te,n.tileLayer=cR,n.tooltip=ETe,n.transformation=$,n.version=o,n.videoOverlay=kTe;var NTe=window.L;n.noConflict=function(){return window.L=NTe,this},window.L=n}))})(Sf,Sf.exports)),Sf.exports}var oX=nX();const Ev=Dm(oX),rX={class:"flex flex-col gap-1 w-full relative"},iX={key:0,class:"h-4 w-32 rounded bg-gray-200 dark:bg-gray-700 animate-shimmer mb-1"},sX={class:"flex items-center justify-between mb-0.5"},aX={key:0,class:"text-sm font-medium text-gray-700 dark:text-gray-200"},lX={key:0,class:"ml-1 text-destructive"},cX={key:0,class:"flex flex-col gap-2 mb-2 w-full relative"},dX={class:"flex flex-col sm:flex-row gap-2 w-full relative"},uX={class:"px-3 py-2 text-sm text-gray-500 dark:text-gray-400 h-10 flex items-center"},fX={key:0},hX={key:1},mX={key:2},pX={key:1,class:"flex-1 grid grid-cols-2 gap-2"},gX=["disabled"],bX=["disabled"],yX={class:"flex gap-2 flex-shrink-0"},vX={key:0,class:"absolute inset-0 z-[1001] bg-transparent cursor-not-allowed pointer-events-auto"},wX={key:1,class:"absolute bottom-2.5 left-2.5 z-[1000] bg-white/95 dark:bg-neutral-900/95 backdrop-blur-sm border border-gray-200 dark:border-neutral-800 rounded-md px-2.5 py-1 text-[11px] font-mono text-gray-700 dark:text-gray-300 shadow-md flex items-center gap-1.5 pointer-events-none select-none"},kX={key:1,class:"text-xs text-destructive mt-1"},Qp=r.defineComponent({name:"DCodeMapField",inheritAttrs:!1,__name:"DCodeMapField",props:{modelValue:{},valueFormat:{default:"object-lat-lng"},label:{},placeholder:{default:"Cari alamat atau lokasi..."},disabled:{type:[Boolean,String],default:!1},readonly:{type:Boolean,default:!1},visible:{type:Boolean,default:!0},skeleton:{type:Boolean,default:!1},error:{default:null},height:{default:"320px"},zoom:{default:13},defaultLat:{default:-.9492},defaultLng:{default:100.42},enableSearch:{type:Boolean,default:!0},enableCurrentLocation:{type:Boolean,default:!0},enableManualInput:{type:Boolean,default:!1},required:{type:Boolean,default:!1},size:{default:"default"},rounded:{default:"lg"}},emits:["update:modelValue","change"],setup(e,{emit:t}){const n=r.useAttrs(),o=e,i=t,a=`app-map-container-${Math.random().toString(36).slice(2,7)}`,l=r.computed(()=>o.label??n.label),c=r.computed(()=>{const N=n.required,j=n["aria-required"];return N===""||N===!0||N==="true"||j==="true"||j===!0||o.required}),d=r.computed(()=>o.disabled===!0||o.disabled==="true"),f=r.ref(!1),h=r.ref(!1),p=r.ref([]),g=r.ref(null),y=r.ref(""),b=r.ref(""),_=r.ref(""),x=r.ref(o.enableManualInput?"manual":"search");r.watch(()=>[o.enableSearch,o.enableManualInput],()=>{o.enableManualInput?x.value="manual":x.value="search"},{immediate:!0});let B=null,R=null,S=null,O=null;const I=N=>{if(!N)return null;if(typeof N=="object"){if(Array.isArray(N)){if(N.length>=2){const J=Number(N[0]),U=Number(N[1]);if(!isNaN(J)&&!isNaN(U))return o.valueFormat==="array-lng-lat"?{lat:U,lng:J}:{lat:J,lng:U}}return null}const j=Number(N.lat!==void 0?N.lat:N.latitude),Y=Number(N.lng!==void 0?N.lng:N.longitude);if(!isNaN(j)&&!isNaN(Y))return{lat:j,lng:Y}}else if(typeof N=="string"){const j=N.split(",").map(Y=>Number(Y.trim()));if(j.length>=2&&!isNaN(j[0])&&!isNaN(j[1]))return{lat:j[0],lng:j[1]}}return null},D=N=>{const j=Number(N.lat.toFixed(6)),Y=Number(N.lng.toFixed(6));switch(o.valueFormat){case"object-latitude-longitude":return{latitude:j,longitude:Y};case"array-lat-lng":return[j,Y];case"array-lng-lat":return[Y,j];case"string":return`${j},${Y}`;default:return{lat:j,lng:Y}}},w=r.ref(null);r.watch(()=>o.modelValue,N=>{const j=I(N);j?(!w.value||Math.abs(w.value.lat-j.lat)>1e-6||Math.abs(w.value.lng-j.lng)>1e-6)&&(w.value=j,b.value=j.lat.toFixed(6),_.value=j.lng.toFixed(6),re(j.lat,j.lng,!0)):(N==null||N==="")&&(w.value=null,b.value="",_.value="",g.value=null,R&&B&&(B.removeLayer(R),R=null))},{deep:!0,immediate:!0});const E=(N,j)=>{if(!B||!j)return;const Y="https://tile.openstreetmap.org/{z}/{x}/{y}.png",J='&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors';S&&B.removeLayer(S),S=j.tileLayer(Y,{attribution:J,maxZoom:19}).addTo(B)},F=N=>N.divIcon({className:"custom-map-marker-container",html:`
119
+ `,""),ee=Number(Z);return Number.isFinite(ee)?ee:null}return de},j=de=>{x.value=de,o("update:modelValue",N(de))},Y=(de,Z)=>{const ee=y(Z);R.value=!0,de.value=ee,j(ee),queueMicrotask(()=>R.value=!1)},J=(de,Z)=>{const ee=de.selectionStart??de.value.length,pe=de.selectionEnd??de.value.length;if(g.value>0){const Be=de.value.length-(pe-ee),Te=g.value-Be;if(Te<=0)return;Z=Z.slice(0,Te)}de.setRangeText(Z,ee,pe,"end"),Y(de,Q(de.value))},U=de=>{const Z=re.value;if(!Z||B.value||R.value||!de.inputType?.startsWith("insert"))return;const ee=de.data;if(ee==null)return;const pe=Q(ee);pe!==ee&&(de.preventDefault(),pe.length>0&&J(Z,pe))},k=de=>{const Z=re.value;if(!Z||B.value||R.value)return;const ee=de.clipboardData?.getData("text")??"",pe=Q(ee);pe!==ee&&(de.preventDefault(),pe.length>0&&J(Z,pe))},C=async()=>{const de=re.value;if(!de||B.value||R.value)return;const Z=de.value??"",ee=Q(Z);if(ee===Z){const pe=de.selectionStart??ee.length,Be=de.selectionEnd??ee.length;Y(de,ee),await r.nextTick();try{de.setSelectionRange(pe,Be)}catch{}j(ee)}else{const pe=de.selectionStart??ee.length,Be=de.selectionEnd??ee.length;Y(de,ee),await r.nextTick();try{de.setSelectionRange(pe,Be)}catch{}}},T=()=>B.value=!0,M=()=>{B.value=!1;const de=re.value;if(!de)return;const Z=de.value??"",ee=Q(Z);ee===Z?j(ee):Y(de,ee)};r.onMounted(()=>{const de=re.value;if(!de)return;const Z=de.value??"",ee=Z!==""?Z:x.value,pe=Q(ee);pe===ee?j(pe):Y(de,pe)}),r.onBeforeUnmount(()=>{});const $=()=>{x.value="",re.value&&(re.value.value=""),o("update:modelValue",null),o("clear")},ne=r.computed(()=>x.value.length),te=r.computed(()=>i.showCharCount?g.value>0:!1),ce=r.computed(()=>te.value&&ne.value>0),ke=r.computed(()=>`${ne.value} / ${g.value}`),we=r.computed(()=>!!i.error),_e=r.computed(()=>{const de=n.rows,Z=typeof de=="number"?de:Number.parseInt(String(de??""),10);return Number.isFinite(Z)&&Z>0?Z:3}),fe=r.computed(()=>({height:`${_e.value*24+16}px`}));return(de,Z)=>r.withDirectives((r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["flex flex-col gap-1 w-full",[r.unref(n).class,i.disabled?"cursor-not-allowed":""]]),"aria-busy":i.skeleton},[i.skeleton?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[s.value?(r.openBlock(),r.createElementBlock("div",GZ)):r.createCommentVNode("",!0),r.createElementVNode("div",{class:r.normalizeClass(["w-full bg-gray-200 dark:bg-gray-700 animate-pulse",r.unref(sn)(i.rounded)]),style:r.normalizeStyle(fe.value)},null,6)],64)):(r.openBlock(),r.createElementBlock(r.Fragment,{key:1},[s.value?(r.openBlock(),r.createElementBlock("label",{key:0,for:f.value,class:"text-sm font-medium"},[r.createTextVNode(r.toDisplayString(s.value)+" ",1),h.value?(r.openBlock(),r.createElementBlock("span",ZZ,"*")):r.createCommentVNode("",!0)],8,YZ)):r.createCommentVNode("",!0),r.createElementVNode("div",XZ,[r.createElementVNode("textarea",r.mergeProps({id:f.value,ref_key:"textareaRef",ref:re,value:x.value,placeholder:a.value},p.value,{onInput:C,onBeforeinput:U,onPaste:k,onCompositionstart:T,onCompositionend:M,style:`text-transform: ${w.value}; padding-right: ${_.value?"2.5rem":"0.75rem"} !important; padding-left: 0.75rem !important;`,class:["flex min-h-[120px] w-full border bg-white dark:bg-neutral-800 text-foreground dark:text-gray-300 border-gray-300 dark:border-neutral-700/50 focus:ring-1 focus:ring-neutral-400 dark:focus:ring-neutral-600 placeholder:text-muted-foreground focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 readonly:bg-neutral-50/50 dark:readonly:bg-neutral-900/30",[c.value,r.unref(sn)(i.rounded),we.value?"border-destructive focus-visible:ring-destructive focus:ring-destructive":"",r.unref(K)?"dcode-caret-transparent":""]]}),null,16,JZ),ie.value?(r.openBlock(),r.createElementBlock("span",{key:0,"aria-hidden":"true",class:r.normalizeClass(["pointer-events-none absolute left-0 top-0 z-[1] w-[2px] rounded-full bg-primary will-change-transform motion-reduce:transition-none",[r.unref(X)?"opacity-100":"opacity-0",r.unref(se)?"transition-[transform,opacity] duration-100 ease-out":"transition-none",r.unref(X)&&!r.unref(W)?"dcode-animate-caret-blink":""]]),style:r.normalizeStyle(r.unref(le))},null,6)):r.createCommentVNode("",!0),_.value?(r.openBlock(),r.createElementBlock("div",QZ,[r.createVNode(Lr,{"aria-label":"Clear textarea",disabled:i.disabled,onClear:$},null,8,["disabled"])])):r.createCommentVNode("",!0),ce.value&&!we.value?(r.openBlock(),r.createElementBlock("p",VZ,r.toDisplayString(ke.value),1)):r.createCommentVNode("",!0)]),we.value?(r.openBlock(),r.createElementBlock("p",eX,r.toDisplayString(i.error),1)):r.createCommentVNode("",!0)],64))],10,KZ)),[[r.vShow,l.value]])}}),[["__scopeId","data-v-77fda133"]]);var Sf={exports:{}};var tX=Sf.exports,X2;function nX(){return X2||(X2=1,(function(e,t){(function(n,o){o(t)})(tX,(function(n){var o="1.9.4";function i(u){var m,v,z,V;for(v=1,z=arguments.length;v<z;v++){V=arguments[v];for(m in V)u[m]=V[m]}return u}var s=Object.create||(function(){function u(){}return function(m){return u.prototype=m,new u}})();function a(u,m){var v=Array.prototype.slice;if(u.bind)return u.bind.apply(u,v.call(arguments,1));var z=v.call(arguments,2);return function(){return u.apply(m,z.length?z.concat(v.call(arguments)):arguments)}}var l=0;function c(u){return"_leaflet_id"in u||(u._leaflet_id=++l),u._leaflet_id}function d(u,m,v){var z,V,ue,Ee;return Ee=function(){z=!1,V&&(ue.apply(v,V),V=!1)},ue=function(){z?V=arguments:(u.apply(v,arguments),setTimeout(Ee,m),z=!0)},ue}function f(u,m,v){var z=m[1],V=m[0],ue=z-V;return u===z&&v?u:((u-V)%ue+ue)%ue+V}function h(){return!1}function p(u,m){if(m===!1)return u;var v=Math.pow(10,m===void 0?6:m);return Math.round(u*v)/v}function g(u){return u.trim?u.trim():u.replace(/^\s+|\s+$/g,"")}function y(u){return g(u).split(/\s+/)}function b(u,m){Object.prototype.hasOwnProperty.call(u,"options")||(u.options=u.options?s(u.options):{});for(var v in m)u.options[v]=m[v];return u.options}function _(u,m,v){var z=[];for(var V in u)z.push(encodeURIComponent(v?V.toUpperCase():V)+"="+encodeURIComponent(u[V]));return(!m||m.indexOf("?")===-1?"?":"&")+z.join("&")}var x=/\{ *([\w_ -]+) *\}/g;function B(u,m){return u.replace(x,function(v,z){var V=m[z];if(V===void 0)throw new Error("No value provided for variable "+v);return typeof V=="function"&&(V=V(m)),V})}var R=Array.isArray||function(u){return Object.prototype.toString.call(u)==="[object Array]"};function S(u,m){for(var v=0;v<u.length;v++)if(u[v]===m)return v;return-1}var O="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function I(u){return window["webkit"+u]||window["moz"+u]||window["ms"+u]}var D=0;function w(u){var m=+new Date,v=Math.max(0,16-(m-D));return D=m+v,window.setTimeout(u,v)}var E=window.requestAnimationFrame||I("RequestAnimationFrame")||w,F=window.cancelAnimationFrame||I("CancelAnimationFrame")||I("CancelRequestAnimationFrame")||function(u){window.clearTimeout(u)};function A(u,m,v){if(v&&E===w)u.call(m);else return E.call(window,a(u,m))}function P(u){u&&F.call(window,u)}var q={__proto__:null,extend:i,create:s,bind:a,get lastId(){return l},stamp:c,throttle:d,wrapNum:f,falseFn:h,formatNum:p,trim:g,splitWords:y,setOptions:b,getParamString:_,template:B,isArray:R,indexOf:S,emptyImageUrl:O,requestFn:E,cancelFn:F,requestAnimFrame:A,cancelAnimFrame:P};function Q(){}Q.extend=function(u){var m=function(){b(this),this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},v=m.__super__=this.prototype,z=s(v);z.constructor=m,m.prototype=z;for(var V in this)Object.prototype.hasOwnProperty.call(this,V)&&V!=="prototype"&&V!=="__super__"&&(m[V]=this[V]);return u.statics&&i(m,u.statics),u.includes&&(re(u.includes),i.apply(null,[z].concat(u.includes))),i(z,u),delete z.statics,delete z.includes,z.options&&(z.options=v.options?s(v.options):{},i(z.options,u.options)),z._initHooks=[],z.callInitHooks=function(){if(!this._initHooksCalled){v.callInitHooks&&v.callInitHooks.call(this),this._initHooksCalled=!0;for(var ue=0,Ee=z._initHooks.length;ue<Ee;ue++)z._initHooks[ue].call(this)}},m},Q.include=function(u){var m=this.prototype.options;return i(this.prototype,u),u.options&&(this.prototype.options=m,this.mergeOptions(u.options)),this},Q.mergeOptions=function(u){return i(this.prototype.options,u),this},Q.addInitHook=function(u){var m=Array.prototype.slice.call(arguments,1),v=typeof u=="function"?u:function(){this[u].apply(this,m)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(v),this};function re(u){if(!(typeof L>"u"||!L||!L.Mixin)){u=R(u)?u:[u];for(var m=0;m<u.length;m++)u[m]===L.Mixin.Events&&console.warn("Deprecated include of L.Mixin.Events: this property will be removed in future releases, please inherit from L.Evented instead.",new Error().stack)}}var ie={on:function(u,m,v){if(typeof u=="object")for(var z in u)this._on(z,u[z],m);else{u=y(u);for(var V=0,ue=u.length;V<ue;V++)this._on(u[V],m,v)}return this},off:function(u,m,v){if(!arguments.length)delete this._events;else if(typeof u=="object")for(var z in u)this._off(z,u[z],m);else{u=y(u);for(var V=arguments.length===1,ue=0,Ee=u.length;ue<Ee;ue++)V?this._off(u[ue]):this._off(u[ue],m,v)}return this},_on:function(u,m,v,z){if(typeof m!="function"){console.warn("wrong listener type: "+typeof m);return}if(this._listens(u,m,v)===!1){v===this&&(v=void 0);var V={fn:m,ctx:v};z&&(V.once=!0),this._events=this._events||{},this._events[u]=this._events[u]||[],this._events[u].push(V)}},_off:function(u,m,v){var z,V,ue;if(this._events&&(z=this._events[u],!!z)){if(arguments.length===1){if(this._firingCount)for(V=0,ue=z.length;V<ue;V++)z[V].fn=h;delete this._events[u];return}if(typeof m!="function"){console.warn("wrong listener type: "+typeof m);return}var Ee=this._listens(u,m,v);if(Ee!==!1){var Me=z[Ee];this._firingCount&&(Me.fn=h,this._events[u]=z=z.slice()),z.splice(Ee,1)}}},fire:function(u,m,v){if(!this.listens(u,v))return this;var z=i({},m,{type:u,target:this,sourceTarget:m&&m.sourceTarget||this});if(this._events){var V=this._events[u];if(V){this._firingCount=this._firingCount+1||1;for(var ue=0,Ee=V.length;ue<Ee;ue++){var Me=V[ue],$e=Me.fn;Me.once&&this.off(u,$e,Me.ctx),$e.call(Me.ctx||this,z)}this._firingCount--}}return v&&this._propagateEvent(z),this},listens:function(u,m,v,z){typeof u!="string"&&console.warn('"string" type argument expected');var V=m;typeof m!="function"&&(z=!!m,V=void 0,v=void 0);var ue=this._events&&this._events[u];if(ue&&ue.length&&this._listens(u,V,v)!==!1)return!0;if(z){for(var Ee in this._eventParents)if(this._eventParents[Ee].listens(u,m,v,z))return!0}return!1},_listens:function(u,m,v){if(!this._events)return!1;var z=this._events[u]||[];if(!m)return!!z.length;v===this&&(v=void 0);for(var V=0,ue=z.length;V<ue;V++)if(z[V].fn===m&&z[V].ctx===v)return V;return!1},once:function(u,m,v){if(typeof u=="object")for(var z in u)this._on(z,u[z],m,!0);else{u=y(u);for(var V=0,ue=u.length;V<ue;V++)this._on(u[V],m,v,!0)}return this},addEventParent:function(u){return this._eventParents=this._eventParents||{},this._eventParents[c(u)]=u,this},removeEventParent:function(u){return this._eventParents&&delete this._eventParents[c(u)],this},_propagateEvent:function(u){for(var m in this._eventParents)this._eventParents[m].fire(u.type,i({layer:u.target,propagatedFrom:u.target},u),!0)}};ie.addEventListener=ie.on,ie.removeEventListener=ie.clearAllEventListeners=ie.off,ie.addOneTimeEventListener=ie.once,ie.fireEvent=ie.fire,ie.hasEventListeners=ie.listens;var le=Q.extend(ie);function X(u,m,v){this.x=v?Math.round(u):u,this.y=v?Math.round(m):m}var K=Math.trunc||function(u){return u>0?Math.floor(u):Math.ceil(u)};X.prototype={clone:function(){return new X(this.x,this.y)},add:function(u){return this.clone()._add(W(u))},_add:function(u){return this.x+=u.x,this.y+=u.y,this},subtract:function(u){return this.clone()._subtract(W(u))},_subtract:function(u){return this.x-=u.x,this.y-=u.y,this},divideBy:function(u){return this.clone()._divideBy(u)},_divideBy:function(u){return this.x/=u,this.y/=u,this},multiplyBy:function(u){return this.clone()._multiplyBy(u)},_multiplyBy:function(u){return this.x*=u,this.y*=u,this},scaleBy:function(u){return new X(this.x*u.x,this.y*u.y)},unscaleBy:function(u){return new X(this.x/u.x,this.y/u.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=K(this.x),this.y=K(this.y),this},distanceTo:function(u){u=W(u);var m=u.x-this.x,v=u.y-this.y;return Math.sqrt(m*m+v*v)},equals:function(u){return u=W(u),u.x===this.x&&u.y===this.y},contains:function(u){return u=W(u),Math.abs(u.x)<=Math.abs(this.x)&&Math.abs(u.y)<=Math.abs(this.y)},toString:function(){return"Point("+p(this.x)+", "+p(this.y)+")"}};function W(u,m,v){return u instanceof X?u:R(u)?new X(u[0],u[1]):u==null?u:typeof u=="object"&&"x"in u&&"y"in u?new X(u.x,u.y):new X(u,m,v)}function se(u,m){if(u)for(var v=m?[u,m]:u,z=0,V=v.length;z<V;z++)this.extend(v[z])}se.prototype={extend:function(u){var m,v;if(!u)return this;if(u instanceof X||typeof u[0]=="number"||"x"in u)m=v=W(u);else if(u=H(u),m=u.min,v=u.max,!m||!v)return this;return!this.min&&!this.max?(this.min=m.clone(),this.max=v.clone()):(this.min.x=Math.min(m.x,this.min.x),this.max.x=Math.max(v.x,this.max.x),this.min.y=Math.min(m.y,this.min.y),this.max.y=Math.max(v.y,this.max.y)),this},getCenter:function(u){return W((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,u)},getBottomLeft:function(){return W(this.min.x,this.max.y)},getTopRight:function(){return W(this.max.x,this.min.y)},getTopLeft:function(){return this.min},getBottomRight:function(){return this.max},getSize:function(){return this.max.subtract(this.min)},contains:function(u){var m,v;return typeof u[0]=="number"||u instanceof X?u=W(u):u=H(u),u instanceof se?(m=u.min,v=u.max):m=v=u,m.x>=this.min.x&&v.x<=this.max.x&&m.y>=this.min.y&&v.y<=this.max.y},intersects:function(u){u=H(u);var m=this.min,v=this.max,z=u.min,V=u.max,ue=V.x>=m.x&&z.x<=v.x,Ee=V.y>=m.y&&z.y<=v.y;return ue&&Ee},overlaps:function(u){u=H(u);var m=this.min,v=this.max,z=u.min,V=u.max,ue=V.x>m.x&&z.x<v.x,Ee=V.y>m.y&&z.y<v.y;return ue&&Ee},isValid:function(){return!!(this.min&&this.max)},pad:function(u){var m=this.min,v=this.max,z=Math.abs(m.x-v.x)*u,V=Math.abs(m.y-v.y)*u;return H(W(m.x-z,m.y-V),W(v.x+z,v.y+V))},equals:function(u){return u?(u=H(u),this.min.equals(u.getTopLeft())&&this.max.equals(u.getBottomRight())):!1}};function H(u,m){return!u||u instanceof se?u:new se(u,m)}function N(u,m){if(u)for(var v=m?[u,m]:u,z=0,V=v.length;z<V;z++)this.extend(v[z])}N.prototype={extend:function(u){var m=this._southWest,v=this._northEast,z,V;if(u instanceof Y)z=u,V=u;else if(u instanceof N){if(z=u._southWest,V=u._northEast,!z||!V)return this}else return u?this.extend(J(u)||j(u)):this;return!m&&!v?(this._southWest=new Y(z.lat,z.lng),this._northEast=new Y(V.lat,V.lng)):(m.lat=Math.min(z.lat,m.lat),m.lng=Math.min(z.lng,m.lng),v.lat=Math.max(V.lat,v.lat),v.lng=Math.max(V.lng,v.lng)),this},pad:function(u){var m=this._southWest,v=this._northEast,z=Math.abs(m.lat-v.lat)*u,V=Math.abs(m.lng-v.lng)*u;return new N(new Y(m.lat-z,m.lng-V),new Y(v.lat+z,v.lng+V))},getCenter:function(){return new Y((this._southWest.lat+this._northEast.lat)/2,(this._southWest.lng+this._northEast.lng)/2)},getSouthWest:function(){return this._southWest},getNorthEast:function(){return this._northEast},getNorthWest:function(){return new Y(this.getNorth(),this.getWest())},getSouthEast:function(){return new Y(this.getSouth(),this.getEast())},getWest:function(){return this._southWest.lng},getSouth:function(){return this._southWest.lat},getEast:function(){return this._northEast.lng},getNorth:function(){return this._northEast.lat},contains:function(u){typeof u[0]=="number"||u instanceof Y||"lat"in u?u=J(u):u=j(u);var m=this._southWest,v=this._northEast,z,V;return u instanceof N?(z=u.getSouthWest(),V=u.getNorthEast()):z=V=u,z.lat>=m.lat&&V.lat<=v.lat&&z.lng>=m.lng&&V.lng<=v.lng},intersects:function(u){u=j(u);var m=this._southWest,v=this._northEast,z=u.getSouthWest(),V=u.getNorthEast(),ue=V.lat>=m.lat&&z.lat<=v.lat,Ee=V.lng>=m.lng&&z.lng<=v.lng;return ue&&Ee},overlaps:function(u){u=j(u);var m=this._southWest,v=this._northEast,z=u.getSouthWest(),V=u.getNorthEast(),ue=V.lat>m.lat&&z.lat<v.lat,Ee=V.lng>m.lng&&z.lng<v.lng;return ue&&Ee},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(u,m){return u?(u=j(u),this._southWest.equals(u.getSouthWest(),m)&&this._northEast.equals(u.getNorthEast(),m)):!1},isValid:function(){return!!(this._southWest&&this._northEast)}};function j(u,m){return u instanceof N?u:new N(u,m)}function Y(u,m,v){if(isNaN(u)||isNaN(m))throw new Error("Invalid LatLng object: ("+u+", "+m+")");this.lat=+u,this.lng=+m,v!==void 0&&(this.alt=+v)}Y.prototype={equals:function(u,m){if(!u)return!1;u=J(u);var v=Math.max(Math.abs(this.lat-u.lat),Math.abs(this.lng-u.lng));return v<=(m===void 0?1e-9:m)},toString:function(u){return"LatLng("+p(this.lat,u)+", "+p(this.lng,u)+")"},distanceTo:function(u){return k.distance(this,J(u))},wrap:function(){return k.wrapLatLng(this)},toBounds:function(u){var m=180*u/40075017,v=m/Math.cos(Math.PI/180*this.lat);return j([this.lat-m,this.lng-v],[this.lat+m,this.lng+v])},clone:function(){return new Y(this.lat,this.lng,this.alt)}};function J(u,m,v){return u instanceof Y?u:R(u)&&typeof u[0]!="object"?u.length===3?new Y(u[0],u[1],u[2]):u.length===2?new Y(u[0],u[1]):null:u==null?u:typeof u=="object"&&"lat"in u?new Y(u.lat,"lng"in u?u.lng:u.lon,u.alt):m===void 0?null:new Y(u,m,v)}var U={latLngToPoint:function(u,m){var v=this.projection.project(u),z=this.scale(m);return this.transformation._transform(v,z)},pointToLatLng:function(u,m){var v=this.scale(m),z=this.transformation.untransform(u,v);return this.projection.unproject(z)},project:function(u){return this.projection.project(u)},unproject:function(u){return this.projection.unproject(u)},scale:function(u){return 256*Math.pow(2,u)},zoom:function(u){return Math.log(u/256)/Math.LN2},getProjectedBounds:function(u){if(this.infinite)return null;var m=this.projection.bounds,v=this.scale(u),z=this.transformation.transform(m.min,v),V=this.transformation.transform(m.max,v);return new se(z,V)},infinite:!1,wrapLatLng:function(u){var m=this.wrapLng?f(u.lng,this.wrapLng,!0):u.lng,v=this.wrapLat?f(u.lat,this.wrapLat,!0):u.lat,z=u.alt;return new Y(v,m,z)},wrapLatLngBounds:function(u){var m=u.getCenter(),v=this.wrapLatLng(m),z=m.lat-v.lat,V=m.lng-v.lng;if(z===0&&V===0)return u;var ue=u.getSouthWest(),Ee=u.getNorthEast(),Me=new Y(ue.lat-z,ue.lng-V),$e=new Y(Ee.lat-z,Ee.lng-V);return new N(Me,$e)}},k=i({},U,{wrapLng:[-180,180],R:6371e3,distance:function(u,m){var v=Math.PI/180,z=u.lat*v,V=m.lat*v,ue=Math.sin((m.lat-u.lat)*v/2),Ee=Math.sin((m.lng-u.lng)*v/2),Me=ue*ue+Math.cos(z)*Math.cos(V)*Ee*Ee,$e=2*Math.atan2(Math.sqrt(Me),Math.sqrt(1-Me));return this.R*$e}}),C=6378137,T={R:C,MAX_LATITUDE:85.0511287798,project:function(u){var m=Math.PI/180,v=this.MAX_LATITUDE,z=Math.max(Math.min(v,u.lat),-v),V=Math.sin(z*m);return new X(this.R*u.lng*m,this.R*Math.log((1+V)/(1-V))/2)},unproject:function(u){var m=180/Math.PI;return new Y((2*Math.atan(Math.exp(u.y/this.R))-Math.PI/2)*m,u.x*m/this.R)},bounds:(function(){var u=C*Math.PI;return new se([-u,-u],[u,u])})()};function M(u,m,v,z){if(R(u)){this._a=u[0],this._b=u[1],this._c=u[2],this._d=u[3];return}this._a=u,this._b=m,this._c=v,this._d=z}M.prototype={transform:function(u,m){return this._transform(u.clone(),m)},_transform:function(u,m){return m=m||1,u.x=m*(this._a*u.x+this._b),u.y=m*(this._c*u.y+this._d),u},untransform:function(u,m){return m=m||1,new X((u.x/m-this._b)/this._a,(u.y/m-this._d)/this._c)}};function $(u,m,v,z){return new M(u,m,v,z)}var ne=i({},k,{code:"EPSG:3857",projection:T,transformation:(function(){var u=.5/(Math.PI*T.R);return $(u,.5,-u,.5)})()}),te=i({},ne,{code:"EPSG:900913"});function ce(u){return document.createElementNS("http://www.w3.org/2000/svg",u)}function ke(u,m){var v="",z,V,ue,Ee,Me,$e;for(z=0,ue=u.length;z<ue;z++){for(Me=u[z],V=0,Ee=Me.length;V<Ee;V++)$e=Me[V],v+=(V?"L":"M")+$e.x+" "+$e.y;v+=m?kt.svg?"z":"x":""}return v||"M0 0"}var we=document.documentElement.style,_e="ActiveXObject"in window,fe=_e&&!document.addEventListener,de="msLaunchUri"in navigator&&!("documentMode"in document),Z=Ro("webkit"),ee=Ro("android"),pe=Ro("android 2")||Ro("android 3"),Be=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),Te=ee&&Ro("Google")&&Be<537&&!("AudioNode"in window),Oe=!!window.opera,Fe=!de&&Ro("chrome"),Ue=Ro("gecko")&&!Z&&!Oe&&!_e,Qe=!Fe&&Ro("safari"),Ve=Ro("phantom"),Xe="OTransition"in we,he=navigator.platform.indexOf("Win")===0,Ce=_e&&"transition"in we,Pe="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!pe,qe="MozPerspective"in we,Se=!window.L_DISABLE_3D&&(Ce||Pe||qe)&&!Xe&&!Ve,Ie=typeof orientation<"u"||Ro("mobile"),Je=Ie&&Z,wt=Ie&&Pe,gt=!window.PointerEvent&&window.MSPointerEvent,Re=!!(window.PointerEvent||gt),Le="ontouchstart"in window||!!window.TouchEvent,ve=!window.L_NO_TOUCH&&(Le||Re),Ne=Ie&&Oe,Ge=Ie&&Ue,pt=(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1,Tt=(function(){var u=!1;try{var m=Object.defineProperty({},"passive",{get:function(){u=!0}});window.addEventListener("testPassiveEventSupport",h,m),window.removeEventListener("testPassiveEventSupport",h,m)}catch{}return u})(),At=(function(){return!!document.createElement("canvas").getContext})(),rt=!!(document.createElementNS&&ce("svg").createSVGRect),ht=!!rt&&(function(){var u=document.createElement("div");return u.innerHTML="<svg/>",(u.firstChild&&u.firstChild.namespaceURI)==="http://www.w3.org/2000/svg"})(),Nt=!rt&&(function(){try{var u=document.createElement("div");u.innerHTML='<v:shape adj="1"/>';var m=u.firstChild;return m.style.behavior="url(#default#VML)",m&&typeof m.adj=="object"}catch{return!1}})(),wn=navigator.platform.indexOf("Mac")===0,qn=navigator.platform.indexOf("Linux")===0;function Ro(u){return navigator.userAgent.toLowerCase().indexOf(u)>=0}var kt={ie:_e,ielt9:fe,edge:de,webkit:Z,android:ee,android23:pe,androidStock:Te,opera:Oe,chrome:Fe,gecko:Ue,safari:Qe,phantom:Ve,opera12:Xe,win:he,ie3d:Ce,webkit3d:Pe,gecko3d:qe,any3d:Se,mobile:Ie,mobileWebkit:Je,mobileWebkit3d:wt,msPointer:gt,pointer:Re,touch:ve,touchNative:Le,mobileOpera:Ne,mobileGecko:Ge,retina:pt,passiveEvents:Tt,canvas:At,svg:rt,vml:Nt,inlineSvg:ht,mac:wn,linux:qn},Mr=kt.msPointer?"MSPointerDown":"pointerdown",Ea=kt.msPointer?"MSPointerMove":"pointermove",jn=kt.msPointer?"MSPointerUp":"pointerup",Zi=kt.msPointer?"MSPointerCancel":"pointercancel",Al={touchstart:Mr,touchmove:Ea,touchend:jn,touchcancel:Zi},lr={touchstart:Ca,touchmove:Bl,touchend:Bl,touchcancel:Bl},xi={},Xi=!1;function Tl(u,m,v){return m==="touchstart"&&Su(),lr[m]?(v=lr[m].bind(this,v),u.addEventListener(Al[m],v,!1),v):(console.warn("wrong event specified:",m),h)}function Cu(u,m,v){if(!Al[m]){console.warn("wrong event specified:",m);return}u.removeEventListener(Al[m],v,!1)}function im(u){xi[u.pointerId]=u}function Ei(u){xi[u.pointerId]&&(xi[u.pointerId]=u)}function Wc(u){delete xi[u.pointerId]}function Su(){Xi||(document.addEventListener(Mr,im,!0),document.addEventListener(Ea,Ei,!0),document.addEventListener(jn,Wc,!0),document.addEventListener(Zi,Wc,!0),Xi=!0)}function Bl(u,m){if(m.pointerType!==(m.MSPOINTER_TYPE_MOUSE||"mouse")){m.touches=[];for(var v in xi)m.touches.push(xi[v]);m.changedTouches=[m],u(m)}}function Ca(u,m){m.MSPOINTER_TYPE_TOUCH&&m.pointerType===m.MSPOINTER_TYPE_TOUCH&&Ao(m),Bl(u,m)}function Un(u){var m={},v,z;for(z in u)v=u[z],m[z]=v&&v.bind?v.bind(u):v;return u=m,m.type="dblclick",m.detail=2,m.isTrusted=!1,m._simulated=!0,m}var Ji=200;function sm(u,m){u.addEventListener("dblclick",m);var v=0,z;function V(ue){if(ue.detail!==1){z=ue.detail;return}if(!(ue.pointerType==="mouse"||ue.sourceCapabilities&&!ue.sourceCapabilities.firesTouchEvents)){var Ee=db(ue);if(!(Ee.some(function($e){return $e instanceof HTMLLabelElement&&$e.attributes.for})&&!Ee.some(function($e){return $e instanceof HTMLInputElement||$e instanceof HTMLSelectElement}))){var Me=Date.now();Me-v<=Ji?(z++,z===2&&m(Un(ue))):z=1,v=Me}}}return u.addEventListener("click",V),{dblclick:m,simDblclick:V}}function tt(u,m){u.removeEventListener("dblclick",m.dblclick),u.removeEventListener("click",m.simDblclick)}var _t=Ns(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),Ft=Ns(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),tn=Ft==="webkitTransition"||Ft==="OTransition"?Ft+"End":"transitionend";function $n(u){return typeof u=="string"?document.getElementById(u):u}function Io(u,m){var v=u.style[m]||u.currentStyle&&u.currentStyle[m];if((!v||v==="auto")&&document.defaultView){var z=document.defaultView.getComputedStyle(u,null);v=z?z[m]:null}return v==="auto"?null:v}function Wt(u,m,v){var z=document.createElement(u);return z.className=m||"",v&&v.appendChild(z),z}function bn(u){var m=u.parentNode;m&&m.removeChild(u)}function kn(u){for(;u.firstChild;)u.removeChild(u.firstChild)}function ro(u){var m=u.parentNode;m&&m.lastChild!==u&&m.appendChild(u)}function jo(u){var m=u.parentNode;m&&m.firstChild!==u&&m.insertBefore(u,m.firstChild)}function Rn(u,m){if(u.classList!==void 0)return u.classList.contains(m);var v=Pl(u);return v.length>0&&new RegExp("(^|\\s)"+m+"(\\s|$)").test(v)}function $t(u,m){if(u.classList!==void 0)for(var v=y(m),z=0,V=v.length;z<V;z++)u.classList.add(v[z]);else if(!Rn(u,m)){var ue=Pl(u);Sa(u,(ue?ue+" ":"")+m)}}function Kn(u,m){u.classList!==void 0?u.classList.remove(m):Sa(u,g((" "+Pl(u)+" ").replace(" "+m+" "," ")))}function Sa(u,m){u.className.baseVal===void 0?u.className=m:u.className.baseVal=m}function Pl(u){return u.correspondingElement&&(u=u.correspondingElement),u.className.baseVal===void 0?u.className:u.className.baseVal}function cr(u,m){"opacity"in u.style?u.style.opacity=m:"filter"in u.style&&Aa(u,m)}function Aa(u,m){var v=!1,z="DXImageTransform.Microsoft.Alpha";try{v=u.filters.item(z)}catch{if(m===1)return}m=Math.round(m*100),v?(v.Enabled=m!==100,v.Opacity=m):u.style.filter+=" progid:"+z+"(opacity="+m+")"}function Ns(u){for(var m=document.documentElement.style,v=0;v<u.length;v++)if(u[v]in m)return u[v];return!1}function bo(u,m,v){var z=m||new X(0,0);u.style[_t]=(kt.ie3d?"translate("+z.x+"px,"+z.y+"px)":"translate3d("+z.x+"px,"+z.y+"px,0)")+(v?" scale("+v+")":"")}function Gn(u,m){u._leaflet_pos=m,kt.any3d?bo(u,m):(u.style.left=m.x+"px",u.style.top=m.y+"px")}function br(u){return u._leaflet_pos||new X(0,0)}var Dt,Ds,io;if("onselectstart"in document)Dt=function(){Pt(window,"selectstart",Ao)},Ds=function(){Cn(window,"selectstart",Ao)};else{var fn=Ns(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);Dt=function(){if(fn){var u=document.documentElement.style;io=u[fn],u[fn]="none"}},Ds=function(){fn&&(document.documentElement.style[fn]=io,io=void 0)}}function Oo(){Pt(window,"dragstart",Ao)}function Qr(){Cn(window,"dragstart",Ao)}var Kt,Ta;function it(u){for(;u.tabIndex===-1;)u=u.parentNode;u.style&&(vt(),Kt=u,Ta=u.style.outlineStyle,u.style.outlineStyle="none",Pt(window,"keydown",vt))}function vt(){Kt&&(Kt.style.outlineStyle=Ta,Kt=void 0,Ta=void 0,Cn(window,"keydown",vt))}function jt(u){do u=u.parentNode;while((!u.offsetWidth||!u.offsetHeight)&&u!==document.body);return u}function hn(u){var m=u.getBoundingClientRect();return{x:m.width/u.offsetWidth||1,y:m.height/u.offsetHeight||1,boundingClientRect:m}}var yo={__proto__:null,TRANSFORM:_t,TRANSITION:Ft,TRANSITION_END:tn,get:$n,getStyle:Io,create:Wt,remove:bn,empty:kn,toFront:ro,toBack:jo,hasClass:Rn,addClass:$t,removeClass:Kn,setClass:Sa,getClass:Pl,setOpacity:cr,testProp:Ns,setTransform:bo,setPosition:Gn,getPosition:br,get disableTextSelection(){return Dt},get enableTextSelection(){return Ds},disableImageDrag:Oo,enableImageDrag:Qr,preventOutline:it,restoreOutline:vt,getSizedParentNode:jt,getScale:hn};function Pt(u,m,v,z){if(m&&typeof m=="object")for(var V in m)vo(u,V,m[V],v);else{m=y(m);for(var ue=0,Ee=m.length;ue<Ee;ue++)vo(u,m[ue],v,z)}return this}var dr="_leaflet_events";function Cn(u,m,v,z){if(arguments.length===1)Au(u),delete u[dr];else if(m&&typeof m=="object")for(var V in m)am(u,V,m[V],v);else if(m=y(m),arguments.length===2)Au(u,function(Me){return S(m,Me)!==-1});else for(var ue=0,Ee=m.length;ue<Ee;ue++)am(u,m[ue],v,z);return this}function Au(u,m){for(var v in u[dr]){var z=v.split(/\d/)[0];(!m||m(z))&&am(u,z,null,null,v)}}var Tu={mouseenter:"mouseover",mouseleave:"mouseout",wheel:!("onwheel"in window)&&"mousewheel"};function vo(u,m,v,z){var V=m+c(v)+(z?"_"+c(z):"");if(u[dr]&&u[dr][V])return this;var ue=function(Me){return v.call(z||u,Me||window.event)},Ee=ue;!kt.touchNative&&kt.pointer&&m.indexOf("touch")===0?ue=Tl(u,m,ue):kt.touch&&m==="dblclick"?ue=sm(u,ue):"addEventListener"in u?m==="touchstart"||m==="touchmove"||m==="wheel"||m==="mousewheel"?u.addEventListener(Tu[m]||m,ue,kt.passiveEvents?{passive:!1}:!1):m==="mouseenter"||m==="mouseleave"?(ue=function(Me){Me=Me||window.event,Ci(u,Me)&&Ee(Me)},u.addEventListener(Tu[m],ue,!1)):u.addEventListener(m,Ee,!1):u.attachEvent("on"+m,ue),u[dr]=u[dr]||{},u[dr][V]=ue}function am(u,m,v,z,V){V=V||m+c(v)+(z?"_"+c(z):"");var ue=u[dr]&&u[dr][V];if(!ue)return this;!kt.touchNative&&kt.pointer&&m.indexOf("touch")===0?Cu(u,m,ue):kt.touch&&m==="dblclick"?tt(u,ue):"removeEventListener"in u?u.removeEventListener(Tu[m]||m,ue,!1):u.detachEvent("on"+m,ue),u[dr][V]=null}function Ms(u){return u.stopPropagation?u.stopPropagation():u.originalEvent?u.originalEvent._stopped=!0:u.cancelBubble=!0,this}function Bu(u){return vo(u,"wheel",Ms),this}function Nl(u){return Pt(u,"mousedown touchstart dblclick contextmenu",Ms),u._leaflet_disable_click=!0,this}function Ao(u){return u.preventDefault?u.preventDefault():u.returnValue=!1,this}function Qi(u){return Ao(u),Ms(u),this}function db(u){if(u.composedPath)return u.composedPath();for(var m=[],v=u.target;v;)m.push(v),v=v.parentNode;return m}function ub(u,m){if(!m)return new X(u.clientX,u.clientY);var v=hn(m),z=v.boundingClientRect;return new X((u.clientX-z.left)/v.x-m.clientLeft,(u.clientY-z.top)/v.y-m.clientTop)}var o1=kt.linux&&kt.chrome?window.devicePixelRatio:kt.mac?window.devicePixelRatio*3:window.devicePixelRatio>0?2*window.devicePixelRatio:1;function Hc(u){return kt.edge?u.wheelDeltaY/2:u.deltaY&&u.deltaMode===0?-u.deltaY/o1:u.deltaY&&u.deltaMode===1?-u.deltaY*20:u.deltaY&&u.deltaMode===2?-u.deltaY*60:u.deltaX||u.deltaZ?0:u.wheelDelta?(u.wheelDeltaY||u.wheelDelta)/2:u.detail&&Math.abs(u.detail)<32765?-u.detail*20:u.detail?u.detail/-32765*60:0}function Ci(u,m){var v=m.relatedTarget;if(!v)return!0;try{for(;v&&v!==u;)v=v.parentNode}catch{return!1}return v!==u}var r1={__proto__:null,on:Pt,off:Cn,stopPropagation:Ms,disableScrollPropagation:Bu,disableClickPropagation:Nl,preventDefault:Ao,stop:Qi,getPropagationPath:db,getMousePosition:ub,getWheelDelta:Hc,isExternalTarget:Ci,addListener:Pt,removeListener:Cn},fb=le.extend({run:function(u,m,v,z){this.stop(),this._el=u,this._inProgress=!0,this._duration=v||.25,this._easeOutPower=1/Math.max(z||.5,.2),this._startPos=br(u),this._offset=m.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=A(this._animate,this),this._step()},_step:function(u){var m=+new Date-this._startTime,v=this._duration*1e3;m<v?this._runFrame(this._easeOut(m/v),u):(this._runFrame(1),this._complete())},_runFrame:function(u,m){var v=this._startPos.add(this._offset.multiplyBy(u));m&&v._round(),Gn(this._el,v),this.fire("step")},_complete:function(){P(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(u){return 1-Math.pow(1-u,this._easeOutPower)}}),ln=le.extend({options:{crs:ne,center:void 0,zoom:void 0,minZoom:void 0,maxZoom:void 0,layers:[],maxBounds:void 0,renderer:void 0,zoomAnimation:!0,zoomAnimationThreshold:4,fadeAnimation:!0,markerZoomAnimation:!0,transform3DLimit:8388608,zoomSnap:1,zoomDelta:1,trackResize:!0},initialize:function(u,m){m=b(this,m),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._initContainer(u),this._initLayout(),this._onResize=a(this._onResize,this),this._initEvents(),m.maxBounds&&this.setMaxBounds(m.maxBounds),m.zoom!==void 0&&(this._zoom=this._limitZoom(m.zoom)),m.center&&m.zoom!==void 0&&this.setView(J(m.center),m.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=Ft&&kt.any3d&&!kt.mobileOpera&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),Pt(this._proxy,tn,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)},setView:function(u,m,v){if(m=m===void 0?this._zoom:this._limitZoom(m),u=this._limitCenter(J(u),m,this.options.maxBounds),v=v||{},this._stop(),this._loaded&&!v.reset&&v!==!0){v.animate!==void 0&&(v.zoom=i({animate:v.animate},v.zoom),v.pan=i({animate:v.animate,duration:v.duration},v.pan));var z=this._zoom!==m?this._tryAnimatedZoom&&this._tryAnimatedZoom(u,m,v.zoom):this._tryAnimatedPan(u,v.pan);if(z)return clearTimeout(this._sizeTimer),this}return this._resetView(u,m,v.pan&&v.pan.noMoveStart),this},setZoom:function(u,m){return this._loaded?this.setView(this.getCenter(),u,{zoom:m}):(this._zoom=u,this)},zoomIn:function(u,m){return u=u||(kt.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom+u,m)},zoomOut:function(u,m){return u=u||(kt.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom-u,m)},setZoomAround:function(u,m,v){var z=this.getZoomScale(m),V=this.getSize().divideBy(2),ue=u instanceof X?u:this.latLngToContainerPoint(u),Ee=ue.subtract(V).multiplyBy(1-1/z),Me=this.containerPointToLatLng(V.add(Ee));return this.setView(Me,m,{zoom:v})},_getBoundsCenterZoom:function(u,m){m=m||{},u=u.getBounds?u.getBounds():j(u);var v=W(m.paddingTopLeft||m.padding||[0,0]),z=W(m.paddingBottomRight||m.padding||[0,0]),V=this.getBoundsZoom(u,!1,v.add(z));if(V=typeof m.maxZoom=="number"?Math.min(m.maxZoom,V):V,V===1/0)return{center:u.getCenter(),zoom:V};var ue=z.subtract(v).divideBy(2),Ee=this.project(u.getSouthWest(),V),Me=this.project(u.getNorthEast(),V),$e=this.unproject(Ee.add(Me).divideBy(2).add(ue),V);return{center:$e,zoom:V}},fitBounds:function(u,m){if(u=j(u),!u.isValid())throw new Error("Bounds are not valid.");var v=this._getBoundsCenterZoom(u,m);return this.setView(v.center,v.zoom,m)},fitWorld:function(u){return this.fitBounds([[-90,-180],[90,180]],u)},panTo:function(u,m){return this.setView(u,this._zoom,{pan:m})},panBy:function(u,m){if(u=W(u).round(),m=m||{},!u.x&&!u.y)return this.fire("moveend");if(m.animate!==!0&&!this.getSize().contains(u))return this._resetView(this.unproject(this.project(this.getCenter()).add(u)),this.getZoom()),this;if(this._panAnim||(this._panAnim=new fb,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),m.noMoveStart||this.fire("movestart"),m.animate!==!1){$t(this._mapPane,"leaflet-pan-anim");var v=this._getMapPanePos().subtract(u).round();this._panAnim.run(this._mapPane,v,m.duration||.25,m.easeLinearity)}else this._rawPanBy(u),this.fire("move").fire("moveend");return this},flyTo:function(u,m,v){if(v=v||{},v.animate===!1||!kt.any3d)return this.setView(u,m,v);this._stop();var z=this.project(this.getCenter()),V=this.project(u),ue=this.getSize(),Ee=this._zoom;u=J(u),m=m===void 0?Ee:m;var Me=Math.max(ue.x,ue.y),$e=Me*this.getZoomScale(Ee,m),Ye=V.distanceTo(z)||1,mt=1.42,It=mt*mt;function on(Po){var Db=Po?-1:1,OTe=Po?$e:Me,LTe=$e*$e-Me*Me+Db*It*It*Ye*Ye,FTe=2*OTe*It*Ye,g1=LTe/FTe,ER=Math.sqrt(g1*g1+1)-g1,$Te=ER<1e-9?-18:Math.log(ER);return $Te}function yr(Po){return(Math.exp(Po)-Math.exp(-Po))/2}function Uo(Po){return(Math.exp(Po)+Math.exp(-Po))/2}function Ai(Po){return yr(Po)/Uo(Po)}var Ir=on(0);function Ru(Po){return Me*(Uo(Ir)/Uo(Ir+mt*Po))}function DTe(Po){return Me*(Uo(Ir)*Ai(Ir+mt*Po)-yr(Ir))/It}function MTe(Po){return 1-Math.pow(1-Po,1.5)}var RTe=Date.now(),_R=(on(1)-Ir)/mt,ITe=v.duration?1e3*v.duration:1e3*_R*.8;function xR(){var Po=(Date.now()-RTe)/ITe,Db=MTe(Po)*_R;Po<=1?(this._flyToFrame=A(xR,this),this._move(this.unproject(z.add(V.subtract(z).multiplyBy(DTe(Db)/Ye)),Ee),this.getScaleZoom(Me/Ru(Db),Ee),{flyTo:!0})):this._move(u,m)._moveEnd(!0)}return this._moveStart(!0,v.noMoveStart),xR.call(this),this},flyToBounds:function(u,m){var v=this._getBoundsCenterZoom(u,m);return this.flyTo(v.center,v.zoom,m)},setMaxBounds:function(u){return u=j(u),this.listens("moveend",this._panInsideMaxBounds)&&this.off("moveend",this._panInsideMaxBounds),u.isValid()?(this.options.maxBounds=u,this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds)):(this.options.maxBounds=null,this)},setMinZoom:function(u){var m=this.options.minZoom;return this.options.minZoom=u,this._loaded&&m!==u&&(this.fire("zoomlevelschange"),this.getZoom()<this.options.minZoom)?this.setZoom(u):this},setMaxZoom:function(u){var m=this.options.maxZoom;return this.options.maxZoom=u,this._loaded&&m!==u&&(this.fire("zoomlevelschange"),this.getZoom()>this.options.maxZoom)?this.setZoom(u):this},panInsideBounds:function(u,m){this._enforcingBounds=!0;var v=this.getCenter(),z=this._limitCenter(v,this._zoom,j(u));return v.equals(z)||this.panTo(z,m),this._enforcingBounds=!1,this},panInside:function(u,m){m=m||{};var v=W(m.paddingTopLeft||m.padding||[0,0]),z=W(m.paddingBottomRight||m.padding||[0,0]),V=this.project(this.getCenter()),ue=this.project(u),Ee=this.getPixelBounds(),Me=H([Ee.min.add(v),Ee.max.subtract(z)]),$e=Me.getSize();if(!Me.contains(ue)){this._enforcingBounds=!0;var Ye=ue.subtract(Me.getCenter()),mt=Me.extend(ue).getSize().subtract($e);V.x+=Ye.x<0?-mt.x:mt.x,V.y+=Ye.y<0?-mt.y:mt.y,this.panTo(this.unproject(V),m),this._enforcingBounds=!1}return this},invalidateSize:function(u){if(!this._loaded)return this;u=i({animate:!1,pan:!0},u===!0?{animate:!0}:u);var m=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var v=this.getSize(),z=m.divideBy(2).round(),V=v.divideBy(2).round(),ue=z.subtract(V);return!ue.x&&!ue.y?this:(u.animate&&u.pan?this.panBy(ue):(u.pan&&this._rawPanBy(ue),this.fire("move"),u.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(a(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:m,newSize:v}))},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(u){if(u=this._locateOptions=i({timeout:1e4,watch:!1},u),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var m=a(this._handleGeolocationResponse,this),v=a(this._handleGeolocationError,this);return u.watch?this._locationWatchId=navigator.geolocation.watchPosition(m,v,u):navigator.geolocation.getCurrentPosition(m,v,u),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(u){if(this._container._leaflet_id){var m=u.code,v=u.message||(m===1?"permission denied":m===2?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:m,message:"Geolocation error: "+v+"."})}},_handleGeolocationResponse:function(u){if(this._container._leaflet_id){var m=u.coords.latitude,v=u.coords.longitude,z=new Y(m,v),V=z.toBounds(u.coords.accuracy*2),ue=this._locateOptions;if(ue.setView){var Ee=this.getBoundsZoom(V);this.setView(z,ue.maxZoom?Math.min(Ee,ue.maxZoom):Ee)}var Me={latlng:z,bounds:V,timestamp:u.timestamp};for(var $e in u.coords)typeof u.coords[$e]=="number"&&(Me[$e]=u.coords[$e]);this.fire("locationfound",Me)}},addHandler:function(u,m){if(!m)return this;var v=this[u]=new m(this);return this._handlers.push(v),this.options[u]&&v.enable(),this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch{this._container._leaflet_id=void 0,this._containerId=void 0}this._locationWatchId!==void 0&&this.stopLocate(),this._stop(),bn(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(P(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload");var u;for(u in this._layers)this._layers[u].remove();for(u in this._panes)bn(this._panes[u]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(u,m){var v="leaflet-pane"+(u?" leaflet-"+u.replace("Pane","")+"-pane":""),z=Wt("div",v,m||this._mapPane);return u&&(this._panes[u]=z),z},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var u=this.getPixelBounds(),m=this.unproject(u.getBottomLeft()),v=this.unproject(u.getTopRight());return new N(m,v)},getMinZoom:function(){return this.options.minZoom===void 0?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return this.options.maxZoom===void 0?this._layersMaxZoom===void 0?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(u,m,v){u=j(u),v=W(v||[0,0]);var z=this.getZoom()||0,V=this.getMinZoom(),ue=this.getMaxZoom(),Ee=u.getNorthWest(),Me=u.getSouthEast(),$e=this.getSize().subtract(v),Ye=H(this.project(Me,z),this.project(Ee,z)).getSize(),mt=kt.any3d?this.options.zoomSnap:1,It=$e.x/Ye.x,on=$e.y/Ye.y,yr=m?Math.max(It,on):Math.min(It,on);return z=this.getScaleZoom(yr,z),mt&&(z=Math.round(z/(mt/100))*(mt/100),z=m?Math.ceil(z/mt)*mt:Math.floor(z/mt)*mt),Math.max(V,Math.min(ue,z))},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new X(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(u,m){var v=this._getTopLeftPoint(u,m);return new se(v,v.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(u){return this.options.crs.getProjectedBounds(u===void 0?this.getZoom():u)},getPane:function(u){return typeof u=="string"?this._panes[u]:u},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(u,m){var v=this.options.crs;return m=m===void 0?this._zoom:m,v.scale(u)/v.scale(m)},getScaleZoom:function(u,m){var v=this.options.crs;m=m===void 0?this._zoom:m;var z=v.zoom(u*v.scale(m));return isNaN(z)?1/0:z},project:function(u,m){return m=m===void 0?this._zoom:m,this.options.crs.latLngToPoint(J(u),m)},unproject:function(u,m){return m=m===void 0?this._zoom:m,this.options.crs.pointToLatLng(W(u),m)},layerPointToLatLng:function(u){var m=W(u).add(this.getPixelOrigin());return this.unproject(m)},latLngToLayerPoint:function(u){var m=this.project(J(u))._round();return m._subtract(this.getPixelOrigin())},wrapLatLng:function(u){return this.options.crs.wrapLatLng(J(u))},wrapLatLngBounds:function(u){return this.options.crs.wrapLatLngBounds(j(u))},distance:function(u,m){return this.options.crs.distance(J(u),J(m))},containerPointToLayerPoint:function(u){return W(u).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(u){return W(u).add(this._getMapPanePos())},containerPointToLatLng:function(u){var m=this.containerPointToLayerPoint(W(u));return this.layerPointToLatLng(m)},latLngToContainerPoint:function(u){return this.layerPointToContainerPoint(this.latLngToLayerPoint(J(u)))},mouseEventToContainerPoint:function(u){return ub(u,this._container)},mouseEventToLayerPoint:function(u){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(u))},mouseEventToLatLng:function(u){return this.layerPointToLatLng(this.mouseEventToLayerPoint(u))},_initContainer:function(u){var m=this._container=$n(u);if(m){if(m._leaflet_id)throw new Error("Map container is already initialized.")}else throw new Error("Map container not found.");Pt(m,"scroll",this._onScroll,this),this._containerId=c(m)},_initLayout:function(){var u=this._container;this._fadeAnimated=this.options.fadeAnimation&&kt.any3d,$t(u,"leaflet-container"+(kt.touch?" leaflet-touch":"")+(kt.retina?" leaflet-retina":"")+(kt.ielt9?" leaflet-oldie":"")+(kt.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var m=Io(u,"position");m!=="absolute"&&m!=="relative"&&m!=="fixed"&&m!=="sticky"&&(u.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var u=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),Gn(this._mapPane,new X(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||($t(u.markerPane,"leaflet-zoom-hide"),$t(u.shadowPane,"leaflet-zoom-hide"))},_resetView:function(u,m,v){Gn(this._mapPane,new X(0,0));var z=!this._loaded;this._loaded=!0,m=this._limitZoom(m),this.fire("viewprereset");var V=this._zoom!==m;this._moveStart(V,v)._move(u,m)._moveEnd(V),this.fire("viewreset"),z&&this.fire("load")},_moveStart:function(u,m){return u&&this.fire("zoomstart"),m||this.fire("movestart"),this},_move:function(u,m,v,z){m===void 0&&(m=this._zoom);var V=this._zoom!==m;return this._zoom=m,this._lastCenter=u,this._pixelOrigin=this._getNewPixelOrigin(u),z?v&&v.pinch&&this.fire("zoom",v):((V||v&&v.pinch)&&this.fire("zoom",v),this.fire("move",v)),this},_moveEnd:function(u){return u&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return P(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(u){Gn(this._mapPane,this._getMapPanePos().subtract(u))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(u){this._targets={},this._targets[c(this._container)]=this;var m=u?Cn:Pt;m(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&m(window,"resize",this._onResize,this),kt.any3d&&this.options.transform3DLimit&&(u?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){P(this._resizeRequest),this._resizeRequest=A(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var u=this._getMapPanePos();Math.max(Math.abs(u.x),Math.abs(u.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(u,m){for(var v=[],z,V=m==="mouseout"||m==="mouseover",ue=u.target||u.srcElement,Ee=!1;ue;){if(z=this._targets[c(ue)],z&&(m==="click"||m==="preclick")&&this._draggableMoved(z)){Ee=!0;break}if(z&&z.listens(m,!0)&&(V&&!Ci(ue,u)||(v.push(z),V))||ue===this._container)break;ue=ue.parentNode}return!v.length&&!Ee&&!V&&this.listens(m,!0)&&(v=[this]),v},_isClickDisabled:function(u){for(;u&&u!==this._container;){if(u._leaflet_disable_click)return!0;u=u.parentNode}},_handleDOMEvent:function(u){var m=u.target||u.srcElement;if(!(!this._loaded||m._leaflet_disable_events||u.type==="click"&&this._isClickDisabled(m))){var v=u.type;v==="mousedown"&&it(m),this._fireDOMEvent(u,v)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(u,m,v){if(u.type==="click"){var z=i({},u);z.type="preclick",this._fireDOMEvent(z,z.type,v)}var V=this._findEventTargets(u,m);if(v){for(var ue=[],Ee=0;Ee<v.length;Ee++)v[Ee].listens(m,!0)&&ue.push(v[Ee]);V=ue.concat(V)}if(V.length){m==="contextmenu"&&Ao(u);var Me=V[0],$e={originalEvent:u};if(u.type!=="keypress"&&u.type!=="keydown"&&u.type!=="keyup"){var Ye=Me.getLatLng&&(!Me._radius||Me._radius<=10);$e.containerPoint=Ye?this.latLngToContainerPoint(Me.getLatLng()):this.mouseEventToContainerPoint(u),$e.layerPoint=this.containerPointToLayerPoint($e.containerPoint),$e.latlng=Ye?Me.getLatLng():this.layerPointToLatLng($e.layerPoint)}for(Ee=0;Ee<V.length;Ee++)if(V[Ee].fire(m,$e,!0),$e.originalEvent._stopped||V[Ee].options.bubblingMouseEvents===!1&&S(this._mouseEvents,m)!==-1)return}},_draggableMoved:function(u){return u=u.dragging&&u.dragging.enabled()?u:this,u.dragging&&u.dragging.moved()||this.boxZoom&&this.boxZoom.moved()},_clearHandlers:function(){for(var u=0,m=this._handlers.length;u<m;u++)this._handlers[u].disable()},whenReady:function(u,m){return this._loaded?u.call(m||this,{target:this}):this.on("load",u,m),this},_getMapPanePos:function(){return br(this._mapPane)||new X(0,0)},_moved:function(){var u=this._getMapPanePos();return u&&!u.equals([0,0])},_getTopLeftPoint:function(u,m){var v=u&&m!==void 0?this._getNewPixelOrigin(u,m):this.getPixelOrigin();return v.subtract(this._getMapPanePos())},_getNewPixelOrigin:function(u,m){var v=this.getSize()._divideBy(2);return this.project(u,m)._subtract(v)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function(u,m,v){var z=this._getNewPixelOrigin(v,m);return this.project(u,m)._subtract(z)},_latLngBoundsToNewLayerBounds:function(u,m,v){var z=this._getNewPixelOrigin(v,m);return H([this.project(u.getSouthWest(),m)._subtract(z),this.project(u.getNorthWest(),m)._subtract(z),this.project(u.getSouthEast(),m)._subtract(z),this.project(u.getNorthEast(),m)._subtract(z)])},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(u){return this.latLngToLayerPoint(u).subtract(this._getCenterLayerPoint())},_limitCenter:function(u,m,v){if(!v)return u;var z=this.project(u,m),V=this.getSize().divideBy(2),ue=new se(z.subtract(V),z.add(V)),Ee=this._getBoundsOffset(ue,v,m);return Math.abs(Ee.x)<=1&&Math.abs(Ee.y)<=1?u:this.unproject(z.add(Ee),m)},_limitOffset:function(u,m){if(!m)return u;var v=this.getPixelBounds(),z=new se(v.min.add(u),v.max.add(u));return u.add(this._getBoundsOffset(z,m))},_getBoundsOffset:function(u,m,v){var z=H(this.project(m.getNorthEast(),v),this.project(m.getSouthWest(),v)),V=z.min.subtract(u.min),ue=z.max.subtract(u.max),Ee=this._rebound(V.x,-ue.x),Me=this._rebound(V.y,-ue.y);return new X(Ee,Me)},_rebound:function(u,m){return u+m>0?Math.round(u-m)/2:Math.max(0,Math.ceil(u))-Math.max(0,Math.floor(m))},_limitZoom:function(u){var m=this.getMinZoom(),v=this.getMaxZoom(),z=kt.any3d?this.options.zoomSnap:1;return z&&(u=Math.round(u/z)*z),Math.max(m,Math.min(v,u))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){Kn(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(u,m){var v=this._getCenterOffset(u)._trunc();return(m&&m.animate)!==!0&&!this.getSize().contains(v)?!1:(this.panBy(v,m),!0)},_createAnimProxy:function(){var u=this._proxy=Wt("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(u),this.on("zoomanim",function(m){var v=_t,z=this._proxy.style[v];bo(this._proxy,this.project(m.center,m.zoom),this.getZoomScale(m.zoom,1)),z===this._proxy.style[v]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){bn(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var u=this.getCenter(),m=this.getZoom();bo(this._proxy,this.project(u,m),this.getZoomScale(m,1))},_catchTransitionEnd:function(u){this._animatingZoom&&u.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(u,m,v){if(this._animatingZoom)return!0;if(v=v||{},!this._zoomAnimated||v.animate===!1||this._nothingToAnimate()||Math.abs(m-this._zoom)>this.options.zoomAnimationThreshold)return!1;var z=this.getZoomScale(m),V=this._getCenterOffset(u)._divideBy(1-1/z);return v.animate!==!0&&!this.getSize().contains(V)?!1:(A(function(){this._moveStart(!0,v.noMoveStart||!1)._animateZoom(u,m,!0)},this),!0)},_animateZoom:function(u,m,v,z){this._mapPane&&(v&&(this._animatingZoom=!0,this._animateToCenter=u,this._animateToZoom=m,$t(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:u,zoom:m,noUpdate:z}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(a(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&Kn(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))}});function i1(u,m){return new ln(u,m)}var Rr=Q.extend({options:{position:"topright"},initialize:function(u){b(this,u)},getPosition:function(){return this.options.position},setPosition:function(u){var m=this._map;return m&&m.removeControl(this),this.options.position=u,m&&m.addControl(this),this},getContainer:function(){return this._container},addTo:function(u){this.remove(),this._map=u;var m=this._container=this.onAdd(u),v=this.getPosition(),z=u._controlCorners[v];return $t(m,"leaflet-control"),v.indexOf("bottom")!==-1?z.insertBefore(m,z.firstChild):z.appendChild(m),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(bn(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(u){this._map&&u&&u.screenX>0&&u.screenY>0&&this._map.getContainer().focus()}}),qc=function(u){return new Rr(u)};ln.include({addControl:function(u){return u.addTo(this),this},removeControl:function(u){return u.remove(),this},_initControlPos:function(){var u=this._controlCorners={},m="leaflet-",v=this._controlContainer=Wt("div",m+"control-container",this._container);function z(V,ue){var Ee=m+V+" "+m+ue;u[V+ue]=Wt("div",Ee,v)}z("top","left"),z("top","right"),z("bottom","left"),z("bottom","right")},_clearControlPos:function(){for(var u in this._controlCorners)bn(this._controlCorners[u]);bn(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var Ba=Rr.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(u,m,v,z){return v<z?-1:z<v?1:0}},initialize:function(u,m,v){b(this,v),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1,this._preventClick=!1;for(var z in u)this._addLayer(u[z],z);for(z in m)this._addLayer(m[z],z,!0)},onAdd:function(u){this._initLayout(),this._update(),this._map=u,u.on("zoomend",this._checkDisabledLayers,this);for(var m=0;m<this._layers.length;m++)this._layers[m].layer.on("add remove",this._onLayerChange,this);return this._container},addTo:function(u){return Rr.prototype.addTo.call(this,u),this._expandIfNotCollapsed()},onRemove:function(){this._map.off("zoomend",this._checkDisabledLayers,this);for(var u=0;u<this._layers.length;u++)this._layers[u].layer.off("add remove",this._onLayerChange,this)},addBaseLayer:function(u,m){return this._addLayer(u,m),this._map?this._update():this},addOverlay:function(u,m){return this._addLayer(u,m,!0),this._map?this._update():this},removeLayer:function(u){u.off("add remove",this._onLayerChange,this);var m=this._getLayer(c(u));return m&&this._layers.splice(this._layers.indexOf(m),1),this._map?this._update():this},expand:function(){$t(this._container,"leaflet-control-layers-expanded"),this._section.style.height=null;var u=this._map.getSize().y-(this._container.offsetTop+50);return u<this._section.clientHeight?($t(this._section,"leaflet-control-layers-scrollbar"),this._section.style.height=u+"px"):Kn(this._section,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return Kn(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var u="leaflet-control-layers",m=this._container=Wt("div",u),v=this.options.collapsed;m.setAttribute("aria-haspopup",!0),Nl(m),Bu(m);var z=this._section=Wt("section",u+"-list");v&&(this._map.on("click",this.collapse,this),Pt(m,{mouseenter:this._expandSafely,mouseleave:this.collapse},this));var V=this._layersLink=Wt("a",u+"-toggle",m);V.href="#",V.title="Layers",V.setAttribute("role","button"),Pt(V,{keydown:function(ue){ue.keyCode===13&&this._expandSafely()},click:function(ue){Ao(ue),this._expandSafely()}},this),v||this.expand(),this._baseLayersList=Wt("div",u+"-base",z),this._separator=Wt("div",u+"-separator",z),this._overlaysList=Wt("div",u+"-overlays",z),m.appendChild(z)},_getLayer:function(u){for(var m=0;m<this._layers.length;m++)if(this._layers[m]&&c(this._layers[m].layer)===u)return this._layers[m]},_addLayer:function(u,m,v){this._map&&u.on("add remove",this._onLayerChange,this),this._layers.push({layer:u,name:m,overlay:v}),this.options.sortLayers&&this._layers.sort(a(function(z,V){return this.options.sortFunction(z.layer,V.layer,z.name,V.name)},this)),this.options.autoZIndex&&u.setZIndex&&(this._lastZIndex++,u.setZIndex(this._lastZIndex)),this._expandIfNotCollapsed()},_update:function(){if(!this._container)return this;kn(this._baseLayersList),kn(this._overlaysList),this._layerControlInputs=[];var u,m,v,z,V=0;for(v=0;v<this._layers.length;v++)z=this._layers[v],this._addItem(z),m=m||z.overlay,u=u||!z.overlay,V+=z.overlay?0:1;return this.options.hideSingleBase&&(u=u&&V>1,this._baseLayersList.style.display=u?"":"none"),this._separator.style.display=m&&u?"":"none",this},_onLayerChange:function(u){this._handlingClick||this._update();var m=this._getLayer(c(u.target)),v=m.overlay?u.type==="add"?"overlayadd":"overlayremove":u.type==="add"?"baselayerchange":null;v&&this._map.fire(v,m)},_createRadioElement:function(u,m){var v='<input type="radio" class="leaflet-control-layers-selector" name="'+u+'"'+(m?' checked="checked"':"")+"/>",z=document.createElement("div");return z.innerHTML=v,z.firstChild},_addItem:function(u){var m=document.createElement("label"),v=this._map.hasLayer(u.layer),z;u.overlay?(z=document.createElement("input"),z.type="checkbox",z.className="leaflet-control-layers-selector",z.defaultChecked=v):z=this._createRadioElement("leaflet-base-layers_"+c(this),v),this._layerControlInputs.push(z),z.layerId=c(u.layer),Pt(z,"click",this._onInputClick,this);var V=document.createElement("span");V.innerHTML=" "+u.name;var ue=document.createElement("span");m.appendChild(ue),ue.appendChild(z),ue.appendChild(V);var Ee=u.overlay?this._overlaysList:this._baseLayersList;return Ee.appendChild(m),this._checkDisabledLayers(),m},_onInputClick:function(){if(!this._preventClick){var u=this._layerControlInputs,m,v,z=[],V=[];this._handlingClick=!0;for(var ue=u.length-1;ue>=0;ue--)m=u[ue],v=this._getLayer(m.layerId).layer,m.checked?z.push(v):m.checked||V.push(v);for(ue=0;ue<V.length;ue++)this._map.hasLayer(V[ue])&&this._map.removeLayer(V[ue]);for(ue=0;ue<z.length;ue++)this._map.hasLayer(z[ue])||this._map.addLayer(z[ue]);this._handlingClick=!1,this._refocusOnMap()}},_checkDisabledLayers:function(){for(var u=this._layerControlInputs,m,v,z=this._map.getZoom(),V=u.length-1;V>=0;V--)m=u[V],v=this._getLayer(m.layerId).layer,m.disabled=v.options.minZoom!==void 0&&z<v.options.minZoom||v.options.maxZoom!==void 0&&z>v.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var u=this._section;this._preventClick=!0,Pt(u,"click",Ao),this.expand();var m=this;setTimeout(function(){Cn(u,"click",Ao),m._preventClick=!1})}}),s1=function(u,m,v){return new Ba(u,m,v)},Dl=Rr.extend({options:{position:"topleft",zoomInText:'<span aria-hidden="true">+</span>',zoomInTitle:"Zoom in",zoomOutText:'<span aria-hidden="true">&#x2212;</span>',zoomOutTitle:"Zoom out"},onAdd:function(u){var m="leaflet-control-zoom",v=Wt("div",m+" leaflet-bar"),z=this.options;return this._zoomInButton=this._createButton(z.zoomInText,z.zoomInTitle,m+"-in",v,this._zoomIn),this._zoomOutButton=this._createButton(z.zoomOutText,z.zoomOutTitle,m+"-out",v,this._zoomOut),this._updateDisabled(),u.on("zoomend zoomlevelschange",this._updateDisabled,this),v},onRemove:function(u){u.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(u){!this._disabled&&this._map._zoom<this._map.getMaxZoom()&&this._map.zoomIn(this._map.options.zoomDelta*(u.shiftKey?3:1))},_zoomOut:function(u){!this._disabled&&this._map._zoom>this._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(u.shiftKey?3:1))},_createButton:function(u,m,v,z,V){var ue=Wt("a",v,z);return ue.innerHTML=u,ue.href="#",ue.title=m,ue.setAttribute("role","button"),ue.setAttribute("aria-label",m),Nl(ue),Pt(ue,"click",Qi),Pt(ue,"click",V,this),Pt(ue,"click",this._refocusOnMap,this),ue},_updateDisabled:function(){var u=this._map,m="leaflet-disabled";Kn(this._zoomInButton,m),Kn(this._zoomOutButton,m),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||u._zoom===u.getMinZoom())&&($t(this._zoomOutButton,m),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||u._zoom===u.getMaxZoom())&&($t(this._zoomInButton,m),this._zoomInButton.setAttribute("aria-disabled","true"))}});ln.mergeOptions({zoomControl:!0}),ln.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new Dl,this.addControl(this.zoomControl))});var hb=function(u){return new Dl(u)},mb=Rr.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(u){var m="leaflet-control-scale",v=Wt("div",m),z=this.options;return this._addScales(z,m+"-line",v),u.on(z.updateWhenIdle?"moveend":"move",this._update,this),u.whenReady(this._update,this),v},onRemove:function(u){u.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(u,m,v){u.metric&&(this._mScale=Wt("div",m,v)),u.imperial&&(this._iScale=Wt("div",m,v))},_update:function(){var u=this._map,m=u.getSize().y/2,v=u.distance(u.containerPointToLatLng([0,m]),u.containerPointToLatLng([this.options.maxWidth,m]));this._updateScales(v)},_updateScales:function(u){this.options.metric&&u&&this._updateMetric(u),this.options.imperial&&u&&this._updateImperial(u)},_updateMetric:function(u){var m=this._getRoundNum(u),v=m<1e3?m+" m":m/1e3+" km";this._updateScale(this._mScale,v,m/u)},_updateImperial:function(u){var m=u*3.2808399,v,z,V;m>5280?(v=m/5280,z=this._getRoundNum(v),this._updateScale(this._iScale,z+" mi",z/v)):(V=this._getRoundNum(m),this._updateScale(this._iScale,V+" ft",V/m))},_updateScale:function(u,m,v){u.style.width=Math.round(this.options.maxWidth*v)+"px",u.innerHTML=m},_getRoundNum:function(u){var m=Math.pow(10,(Math.floor(u)+"").length-1),v=u/m;return v=v>=10?10:v>=5?5:v>=3?3:v>=2?2:1,m*v}}),a1=function(u){return new mb(u)},l1='<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="12" height="8" viewBox="0 0 12 8" class="leaflet-attribution-flag"><path fill="#4C7BE1" d="M0 0h12v4H0z"/><path fill="#FFD500" d="M0 4h12v3H0z"/><path fill="#E0BC00" d="M0 7h12v1H0z"/></svg>',lm=Rr.extend({options:{position:"bottomright",prefix:'<a href="https://leafletjs.com" title="A JavaScript library for interactive maps">'+(kt.inlineSvg?l1+" ":"")+"Leaflet</a>"},initialize:function(u){b(this,u),this._attributions={}},onAdd:function(u){u.attributionControl=this,this._container=Wt("div","leaflet-control-attribution"),Nl(this._container);for(var m in u._layers)u._layers[m].getAttribution&&this.addAttribution(u._layers[m].getAttribution());return this._update(),u.on("layeradd",this._addAttribution,this),this._container},onRemove:function(u){u.off("layeradd",this._addAttribution,this)},_addAttribution:function(u){u.layer.getAttribution&&(this.addAttribution(u.layer.getAttribution()),u.layer.once("remove",function(){this.removeAttribution(u.layer.getAttribution())},this))},setPrefix:function(u){return this.options.prefix=u,this._update(),this},addAttribution:function(u){return u?(this._attributions[u]||(this._attributions[u]=0),this._attributions[u]++,this._update(),this):this},removeAttribution:function(u){return u?(this._attributions[u]&&(this._attributions[u]--,this._update()),this):this},_update:function(){if(this._map){var u=[];for(var m in this._attributions)this._attributions[m]&&u.push(m);var v=[];this.options.prefix&&v.push(this.options.prefix),u.length&&v.push(u.join(", ")),this._container.innerHTML=v.join(' <span aria-hidden="true">|</span> ')}}});ln.mergeOptions({attributionControl:!0}),ln.addInitHook(function(){this.options.attributionControl&&new lm().addTo(this)});var Kc=function(u){return new lm(u)};Rr.Layers=Ba,Rr.Zoom=Dl,Rr.Scale=mb,Rr.Attribution=lm,qc.layers=s1,qc.zoom=hb,qc.scale=a1,qc.attribution=Kc;var Si=Q.extend({initialize:function(u){this._map=u},enable:function(){return this._enabled?this:(this._enabled=!0,this.addHooks(),this)},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});Si.addTo=function(u,m){return u.addHandler(m,this),this};var c1={Events:ie},pb=kt.touch?"touchstart mousedown":"mousedown",Rs=le.extend({options:{clickTolerance:3},initialize:function(u,m,v,z){b(this,z),this._element=u,this._dragStartTarget=m||u,this._preventOutline=v},enable:function(){this._enabled||(Pt(this._dragStartTarget,pb,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(Rs._dragging===this&&this.finishDrag(!0),Cn(this._dragStartTarget,pb,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(u){if(this._enabled&&(this._moved=!1,!Rn(this._element,"leaflet-zoom-anim"))){if(u.touches&&u.touches.length!==1){Rs._dragging===this&&this.finishDrag();return}if(!(Rs._dragging||u.shiftKey||u.which!==1&&u.button!==1&&!u.touches)&&(Rs._dragging=this,this._preventOutline&&it(this._element),Oo(),Dt(),!this._moving)){this.fire("down");var m=u.touches?u.touches[0]:u,v=jt(this._element);this._startPoint=new X(m.clientX,m.clientY),this._startPos=br(this._element),this._parentScale=hn(v);var z=u.type==="mousedown";Pt(document,z?"mousemove":"touchmove",this._onMove,this),Pt(document,z?"mouseup":"touchend touchcancel",this._onUp,this)}}},_onMove:function(u){if(this._enabled){if(u.touches&&u.touches.length>1){this._moved=!0;return}var m=u.touches&&u.touches.length===1?u.touches[0]:u,v=new X(m.clientX,m.clientY)._subtract(this._startPoint);!v.x&&!v.y||Math.abs(v.x)+Math.abs(v.y)<this.options.clickTolerance||(v.x/=this._parentScale.x,v.y/=this._parentScale.y,Ao(u),this._moved||(this.fire("dragstart"),this._moved=!0,$t(document.body,"leaflet-dragging"),this._lastTarget=u.target||u.srcElement,window.SVGElementInstance&&this._lastTarget instanceof window.SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),$t(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(v),this._moving=!0,this._lastEvent=u,this._updatePosition())}},_updatePosition:function(){var u={originalEvent:this._lastEvent};this.fire("predrag",u),Gn(this._element,this._newPos),this.fire("drag",u)},_onUp:function(){this._enabled&&this.finishDrag()},finishDrag:function(u){Kn(document.body,"leaflet-dragging"),this._lastTarget&&(Kn(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null),Cn(document,"mousemove touchmove",this._onMove,this),Cn(document,"mouseup touchend touchcancel",this._onUp,this),Qr(),Ds();var m=this._moved&&this._moving;this._moving=!1,Rs._dragging=!1,m&&this.fire("dragend",{noInertia:u,distance:this._newPos.distanceTo(this._startPos)})}});function gb(u,m,v){var z,V=[1,4,2,8],ue,Ee,Me,$e,Ye,mt,It,on;for(ue=0,mt=u.length;ue<mt;ue++)u[ue]._code=Is(u[ue],m);for(Me=0;Me<4;Me++){for(It=V[Me],z=[],ue=0,mt=u.length,Ee=mt-1;ue<mt;Ee=ue++)$e=u[ue],Ye=u[Ee],$e._code&It?Ye._code&It||(on=Nu(Ye,$e,It,m,v),on._code=Is(on,m),z.push(on)):(Ye._code&It&&(on=Nu(Ye,$e,It,m,v),on._code=Is(on,m),z.push(on)),z.push($e));u=z}return u}function cm(u,m){var v,z,V,ue,Ee,Me,$e,Ye,mt;if(!u||u.length===0)throw new Error("latlngs not passed");To(u)||(console.warn("latlngs are not flat! Only the first ring will be used"),u=u[0]);var It=J([0,0]),on=j(u),yr=on.getNorthWest().distanceTo(on.getSouthWest())*on.getNorthEast().distanceTo(on.getNorthWest());yr<1700&&(It=Pu(u));var Uo=u.length,Ai=[];for(v=0;v<Uo;v++){var Ir=J(u[v]);Ai.push(m.project(J([Ir.lat-It.lat,Ir.lng-It.lng])))}for(Me=$e=Ye=0,v=0,z=Uo-1;v<Uo;z=v++)V=Ai[v],ue=Ai[z],Ee=V.y*ue.x-ue.y*V.x,$e+=(V.x+ue.x)*Ee,Ye+=(V.y+ue.y)*Ee,Me+=Ee*3;Me===0?mt=Ai[0]:mt=[$e/Me,Ye/Me];var Ru=m.unproject(W(mt));return J([Ru.lat+It.lat,Ru.lng+It.lng])}function Pu(u){for(var m=0,v=0,z=0,V=0;V<u.length;V++){var ue=J(u[V]);m+=ue.lat,v+=ue.lng,z++}return J([m/z,v/z])}var bb={__proto__:null,clipPolygon:gb,polygonCenter:cm,centroid:Pu};function yb(u,m){if(!m||!u.length)return u.slice();var v=m*m;return u=um(u,v),u=d1(u,v),u}function vb(u,m,v){return Math.sqrt(Gc(u,m,v,!0))}function wb(u,m,v){return Gc(u,m,v)}function d1(u,m){var v=u.length,z=typeof Uint8Array<"u"?Uint8Array:Array,V=new z(v);V[0]=V[v-1]=1,dm(u,V,m,0,v-1);var ue,Ee=[];for(ue=0;ue<v;ue++)V[ue]&&Ee.push(u[ue]);return Ee}function dm(u,m,v,z,V){var ue=0,Ee,Me,$e;for(Me=z+1;Me<=V-1;Me++)$e=Gc(u[Me],u[z],u[V],!0),$e>ue&&(Ee=Me,ue=$e);ue>v&&(m[Ee]=1,dm(u,m,v,z,Ee),dm(u,m,v,Ee,V))}function um(u,m){for(var v=[u[0]],z=1,V=0,ue=u.length;z<ue;z++)u1(u[z],u[V])>m&&(v.push(u[z]),V=z);return V<ue-1&&v.push(u[ue-1]),v}var kb;function _b(u,m,v,z,V){var ue=z?kb:Is(u,v),Ee=Is(m,v),Me,$e,Ye;for(kb=Ee;;){if(!(ue|Ee))return[u,m];if(ue&Ee)return!1;Me=ue||Ee,$e=Nu(u,m,Me,v,V),Ye=Is($e,v),Me===ue?(u=$e,ue=Ye):(m=$e,Ee=Ye)}}function Nu(u,m,v,z,V){var ue=m.x-u.x,Ee=m.y-u.y,Me=z.min,$e=z.max,Ye,mt;return v&8?(Ye=u.x+ue*($e.y-u.y)/Ee,mt=$e.y):v&4?(Ye=u.x+ue*(Me.y-u.y)/Ee,mt=Me.y):v&2?(Ye=$e.x,mt=u.y+Ee*($e.x-u.x)/ue):v&1&&(Ye=Me.x,mt=u.y+Ee*(Me.x-u.x)/ue),new X(Ye,mt,V)}function Is(u,m){var v=0;return u.x<m.min.x?v|=1:u.x>m.max.x&&(v|=2),u.y<m.min.y?v|=4:u.y>m.max.y&&(v|=8),v}function u1(u,m){var v=m.x-u.x,z=m.y-u.y;return v*v+z*z}function Gc(u,m,v,z){var V=m.x,ue=m.y,Ee=v.x-V,Me=v.y-ue,$e=Ee*Ee+Me*Me,Ye;return $e>0&&(Ye=((u.x-V)*Ee+(u.y-ue)*Me)/$e,Ye>1?(V=v.x,ue=v.y):Ye>0&&(V+=Ee*Ye,ue+=Me*Ye)),Ee=u.x-V,Me=u.y-ue,z?Ee*Ee+Me*Me:new X(V,ue)}function To(u){return!R(u[0])||typeof u[0][0]!="object"&&typeof u[0][0]<"u"}function fm(u){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),To(u)}function hm(u,m){var v,z,V,ue,Ee,Me,$e,Ye;if(!u||u.length===0)throw new Error("latlngs not passed");To(u)||(console.warn("latlngs are not flat! Only the first ring will be used"),u=u[0]);var mt=J([0,0]),It=j(u),on=It.getNorthWest().distanceTo(It.getSouthWest())*It.getNorthEast().distanceTo(It.getNorthWest());on<1700&&(mt=Pu(u));var yr=u.length,Uo=[];for(v=0;v<yr;v++){var Ai=J(u[v]);Uo.push(m.project(J([Ai.lat-mt.lat,Ai.lng-mt.lng])))}for(v=0,z=0;v<yr-1;v++)z+=Uo[v].distanceTo(Uo[v+1])/2;if(z===0)Ye=Uo[0];else for(v=0,ue=0;v<yr-1;v++)if(Ee=Uo[v],Me=Uo[v+1],V=Ee.distanceTo(Me),ue+=V,ue>z){$e=(ue-z)/V,Ye=[Me.x-$e*(Me.x-Ee.x),Me.y-$e*(Me.y-Ee.y)];break}var Ir=m.unproject(W(Ye));return J([Ir.lat+mt.lat,Ir.lng+mt.lng])}var xb={__proto__:null,simplify:yb,pointToSegmentDistance:vb,closestPointOnSegment:wb,clipSegment:_b,_getEdgeIntersection:Nu,_getBitCode:Is,_sqClosestPointOnSegment:Gc,isFlat:To,_flat:fm,polylineCenter:hm},G={project:function(u){return new X(u.lng,u.lat)},unproject:function(u){return new Y(u.y,u.x)},bounds:new se([-180,-90],[180,90])},ae={R:6378137,R_MINOR:6356752314245179e-9,bounds:new se([-2003750834279e-5,-1549657073972e-5],[2003750834279e-5,1876465623138e-5]),project:function(u){var m=Math.PI/180,v=this.R,z=u.lat*m,V=this.R_MINOR/v,ue=Math.sqrt(1-V*V),Ee=ue*Math.sin(z),Me=Math.tan(Math.PI/4-z/2)/Math.pow((1-Ee)/(1+Ee),ue/2);return z=-v*Math.log(Math.max(Me,1e-10)),new X(u.lng*m*v,z)},unproject:function(u){for(var m=180/Math.PI,v=this.R,z=this.R_MINOR/v,V=Math.sqrt(1-z*z),ue=Math.exp(-u.y/v),Ee=Math.PI/2-2*Math.atan(ue),Me=0,$e=.1,Ye;Me<15&&Math.abs($e)>1e-7;Me++)Ye=V*Math.sin(Ee),Ye=Math.pow((1-Ye)/(1+Ye),V/2),$e=Math.PI/2-2*Math.atan(ue*Ye)-Ee,Ee+=$e;return new Y(Ee*m,u.x*m/v)}},oe={__proto__:null,LonLat:G,Mercator:ae,SphericalMercator:T},ge=i({},k,{code:"EPSG:3395",projection:ae,transformation:(function(){var u=.5/(Math.PI*ae.R);return $(u,.5,-u,.5)})()}),me=i({},k,{code:"EPSG:4326",projection:G,transformation:$(1/180,1,-1/180,.5)}),ye=i({},U,{projection:G,transformation:$(1,0,-1,0),scale:function(u){return Math.pow(2,u)},zoom:function(u){return Math.log(u)/Math.LN2},distance:function(u,m){var v=m.lng-u.lng,z=m.lat-u.lat;return Math.sqrt(v*v+z*z)},infinite:!0});U.Earth=k,U.EPSG3395=ge,U.EPSG3857=ne,U.EPSG900913=te,U.EPSG4326=me,U.Simple=ye;var be=le.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(u){return u.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(u){return u&&u.removeLayer(this),this},getPane:function(u){return this._map.getPane(u?this.options[u]||u:this.options.pane)},addInteractiveTarget:function(u){return this._map._targets[c(u)]=this,this},removeInteractiveTarget:function(u){return delete this._map._targets[c(u)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(u){var m=u.target;if(m.hasLayer(this)){if(this._map=m,this._zoomAnimated=m._zoomAnimated,this.getEvents){var v=this.getEvents();m.on(v,this),this.once("remove",function(){m.off(v,this)},this)}this.onAdd(m),this.fire("add"),m.fire("layeradd",{layer:this})}}});ln.include({addLayer:function(u){if(!u._layerAdd)throw new Error("The provided object is not a Layer.");var m=c(u);return this._layers[m]?this:(this._layers[m]=u,u._mapToAdd=this,u.beforeAdd&&u.beforeAdd(this),this.whenReady(u._layerAdd,u),this)},removeLayer:function(u){var m=c(u);return this._layers[m]?(this._loaded&&u.onRemove(this),delete this._layers[m],this._loaded&&(this.fire("layerremove",{layer:u}),u.fire("remove")),u._map=u._mapToAdd=null,this):this},hasLayer:function(u){return c(u)in this._layers},eachLayer:function(u,m){for(var v in this._layers)u.call(m,this._layers[v]);return this},_addLayers:function(u){u=u?R(u)?u:[u]:[];for(var m=0,v=u.length;m<v;m++)this.addLayer(u[m])},_addZoomLimit:function(u){(!isNaN(u.options.maxZoom)||!isNaN(u.options.minZoom))&&(this._zoomBoundLayers[c(u)]=u,this._updateZoomLevels())},_removeZoomLimit:function(u){var m=c(u);this._zoomBoundLayers[m]&&(delete this._zoomBoundLayers[m],this._updateZoomLevels())},_updateZoomLevels:function(){var u=1/0,m=-1/0,v=this._getZoomSpan();for(var z in this._zoomBoundLayers){var V=this._zoomBoundLayers[z].options;u=V.minZoom===void 0?u:Math.min(u,V.minZoom),m=V.maxZoom===void 0?m:Math.max(m,V.maxZoom)}this._layersMaxZoom=m===-1/0?void 0:m,this._layersMinZoom=u===1/0?void 0:u,v!==this._getZoomSpan()&&this.fire("zoomlevelschange"),this.options.maxZoom===void 0&&this._layersMaxZoom&&this.getZoom()>this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),this.options.minZoom===void 0&&this._layersMinZoom&&this.getZoom()<this._layersMinZoom&&this.setZoom(this._layersMinZoom)}});var De=be.extend({initialize:function(u,m){b(this,m),this._layers={};var v,z;if(u)for(v=0,z=u.length;v<z;v++)this.addLayer(u[v])},addLayer:function(u){var m=this.getLayerId(u);return this._layers[m]=u,this._map&&this._map.addLayer(u),this},removeLayer:function(u){var m=u in this._layers?u:this.getLayerId(u);return this._map&&this._layers[m]&&this._map.removeLayer(this._layers[m]),delete this._layers[m],this},hasLayer:function(u){var m=typeof u=="number"?u:this.getLayerId(u);return m in this._layers},clearLayers:function(){return this.eachLayer(this.removeLayer,this)},invoke:function(u){var m=Array.prototype.slice.call(arguments,1),v,z;for(v in this._layers)z=this._layers[v],z[u]&&z[u].apply(z,m);return this},onAdd:function(u){this.eachLayer(u.addLayer,u)},onRemove:function(u){this.eachLayer(u.removeLayer,u)},eachLayer:function(u,m){for(var v in this._layers)u.call(m,this._layers[v]);return this},getLayer:function(u){return this._layers[u]},getLayers:function(){var u=[];return this.eachLayer(u.push,u),u},setZIndex:function(u){return this.invoke("setZIndex",u)},getLayerId:function(u){return c(u)}}),He=function(u,m){return new De(u,m)},et=De.extend({addLayer:function(u){return this.hasLayer(u)?this:(u.addEventParent(this),De.prototype.addLayer.call(this,u),this.fire("layeradd",{layer:u}))},removeLayer:function(u){return this.hasLayer(u)?(u in this._layers&&(u=this._layers[u]),u.removeEventParent(this),De.prototype.removeLayer.call(this,u),this.fire("layerremove",{layer:u})):this},setStyle:function(u){return this.invoke("setStyle",u)},bringToFront:function(){return this.invoke("bringToFront")},bringToBack:function(){return this.invoke("bringToBack")},getBounds:function(){var u=new N;for(var m in this._layers){var v=this._layers[m];u.extend(v.getBounds?v.getBounds():v.getLatLng())}return u}}),ct=function(u,m){return new et(u,m)},Mt=Q.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0],crossOrigin:!1},initialize:function(u){b(this,u)},createIcon:function(u){return this._createIcon("icon",u)},createShadow:function(u){return this._createIcon("shadow",u)},_createIcon:function(u,m){var v=this._getIconUrl(u);if(!v){if(u==="icon")throw new Error("iconUrl not set in Icon options (see the docs).");return null}var z=this._createImg(v,m&&m.tagName==="IMG"?m:null);return this._setIconStyles(z,u),(this.options.crossOrigin||this.options.crossOrigin==="")&&(z.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),z},_setIconStyles:function(u,m){var v=this.options,z=v[m+"Size"];typeof z=="number"&&(z=[z,z]);var V=W(z),ue=W(m==="shadow"&&v.shadowAnchor||v.iconAnchor||V&&V.divideBy(2,!0));u.className="leaflet-marker-"+m+" "+(v.className||""),ue&&(u.style.marginLeft=-ue.x+"px",u.style.marginTop=-ue.y+"px"),V&&(u.style.width=V.x+"px",u.style.height=V.y+"px")},_createImg:function(u,m){return m=m||document.createElement("img"),m.src=u,m},_getIconUrl:function(u){return kt.retina&&this.options[u+"RetinaUrl"]||this.options[u+"Url"]}});function dt(u){return new Mt(u)}var nt=Mt.extend({options:{iconUrl:"marker-icon.png",iconRetinaUrl:"marker-icon-2x.png",shadowUrl:"marker-shadow.png",iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],tooltipAnchor:[16,-28],shadowSize:[41,41]},_getIconUrl:function(u){return typeof nt.imagePath!="string"&&(nt.imagePath=this._detectIconPath()),(this.options.imagePath||nt.imagePath)+Mt.prototype._getIconUrl.call(this,u)},_stripUrl:function(u){var m=function(v,z,V){var ue=z.exec(v);return ue&&ue[V]};return u=m(u,/^url\((['"])?(.+)\1\)$/,2),u&&m(u,/^(.*)marker-icon\.png$/,1)},_detectIconPath:function(){var u=Wt("div","leaflet-default-icon-path",document.body),m=Io(u,"background-image")||Io(u,"backgroundImage");if(document.body.removeChild(u),m=this._stripUrl(m),m)return m;var v=document.querySelector('link[href$="leaflet.css"]');return v?v.href.substring(0,v.href.length-11-1):""}}),mn=Si.extend({initialize:function(u){this._marker=u},addHooks:function(){var u=this._marker._icon;this._draggable||(this._draggable=new Rs(u,u,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),$t(u,"leaflet-marker-draggable")},removeHooks:function(){this._draggable.off({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).disable(),this._marker._icon&&Kn(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_adjustPan:function(u){var m=this._marker,v=m._map,z=this._marker.options.autoPanSpeed,V=this._marker.options.autoPanPadding,ue=br(m._icon),Ee=v.getPixelBounds(),Me=v.getPixelOrigin(),$e=H(Ee.min._subtract(Me).add(V),Ee.max._subtract(Me).subtract(V));if(!$e.contains(ue)){var Ye=W((Math.max($e.max.x,ue.x)-$e.max.x)/(Ee.max.x-$e.max.x)-(Math.min($e.min.x,ue.x)-$e.min.x)/(Ee.min.x-$e.min.x),(Math.max($e.max.y,ue.y)-$e.max.y)/(Ee.max.y-$e.max.y)-(Math.min($e.min.y,ue.y)-$e.min.y)/(Ee.min.y-$e.min.y)).multiplyBy(z);v.panBy(Ye,{animate:!1}),this._draggable._newPos._add(Ye),this._draggable._startPos._add(Ye),Gn(m._icon,this._draggable._newPos),this._onDrag(u),this._panRequest=A(this._adjustPan.bind(this,u))}},_onDragStart:function(){this._oldLatLng=this._marker.getLatLng(),this._marker.closePopup&&this._marker.closePopup(),this._marker.fire("movestart").fire("dragstart")},_onPreDrag:function(u){this._marker.options.autoPan&&(P(this._panRequest),this._panRequest=A(this._adjustPan.bind(this,u)))},_onDrag:function(u){var m=this._marker,v=m._shadow,z=br(m._icon),V=m._map.layerPointToLatLng(z);v&&Gn(v,z),m._latlng=V,u.latlng=V,u.oldLatLng=this._oldLatLng,m.fire("move",u).fire("drag",u)},_onDragEnd:function(u){P(this._panRequest),delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",u)}}),Nn=be.extend({options:{icon:new nt,interactive:!0,keyboard:!0,title:"",alt:"Marker",zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250,pane:"markerPane",shadowPane:"shadowPane",bubblingMouseEvents:!1,autoPanOnFocus:!0,draggable:!1,autoPan:!1,autoPanPadding:[50,50],autoPanSpeed:10},initialize:function(u,m){b(this,m),this._latlng=J(u)},onAdd:function(u){this._zoomAnimated=this._zoomAnimated&&u.options.markerZoomAnimation,this._zoomAnimated&&u.on("zoomanim",this._animateZoom,this),this._initIcon(),this.update()},onRemove:function(u){this.dragging&&this.dragging.enabled()&&(this.options.draggable=!0,this.dragging.removeHooks()),delete this.dragging,this._zoomAnimated&&u.off("zoomanim",this._animateZoom,this),this._removeIcon(),this._removeShadow()},getEvents:function(){return{zoom:this.update,viewreset:this.update}},getLatLng:function(){return this._latlng},setLatLng:function(u){var m=this._latlng;return this._latlng=J(u),this.update(),this.fire("move",{oldLatLng:m,latlng:this._latlng})},setZIndexOffset:function(u){return this.options.zIndexOffset=u,this.update()},getIcon:function(){return this.options.icon},setIcon:function(u){return this.options.icon=u,this._map&&(this._initIcon(),this.update()),this._popup&&this.bindPopup(this._popup,this._popup.options),this},getElement:function(){return this._icon},update:function(){if(this._icon&&this._map){var u=this._map.latLngToLayerPoint(this._latlng).round();this._setPos(u)}return this},_initIcon:function(){var u=this.options,m="leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"),v=u.icon.createIcon(this._icon),z=!1;v!==this._icon&&(this._icon&&this._removeIcon(),z=!0,u.title&&(v.title=u.title),v.tagName==="IMG"&&(v.alt=u.alt||"")),$t(v,m),u.keyboard&&(v.tabIndex="0",v.setAttribute("role","button")),this._icon=v,u.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&Pt(v,"focus",this._panOnFocus,this);var V=u.icon.createShadow(this._shadow),ue=!1;V!==this._shadow&&(this._removeShadow(),ue=!0),V&&($t(V,m),V.alt=""),this._shadow=V,u.opacity<1&&this._updateOpacity(),z&&this.getPane().appendChild(this._icon),this._initInteraction(),V&&ue&&this.getPane(u.shadowPane).appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&Cn(this._icon,"focus",this._panOnFocus,this),bn(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&bn(this._shadow),this._shadow=null},_setPos:function(u){this._icon&&Gn(this._icon,u),this._shadow&&Gn(this._shadow,u),this._zIndex=u.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(u){this._icon&&(this._icon.style.zIndex=this._zIndex+u)},_animateZoom:function(u){var m=this._map._latLngToNewLayerPoint(this._latlng,u.zoom,u.center).round();this._setPos(m)},_initInteraction:function(){if(this.options.interactive&&($t(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),mn)){var u=this.options.draggable;this.dragging&&(u=this.dragging.enabled(),this.dragging.disable()),this.dragging=new mn(this),u&&this.dragging.enable()}},setOpacity:function(u){return this.options.opacity=u,this._map&&this._updateOpacity(),this},_updateOpacity:function(){var u=this.options.opacity;this._icon&&cr(this._icon,u),this._shadow&&cr(this._shadow,u)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)},_panOnFocus:function(){var u=this._map;if(u){var m=this.options.icon.options,v=m.iconSize?W(m.iconSize):W(0,0),z=m.iconAnchor?W(m.iconAnchor):W(0,0);u.panInside(this._latlng,{paddingTopLeft:z,paddingBottomRight:v.subtract(z)})}},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor}});function Yn(u,m){return new Nn(u,m)}var Dn=be.extend({options:{stroke:!0,color:"#3388ff",weight:3,opacity:1,lineCap:"round",lineJoin:"round",dashArray:null,dashOffset:null,fill:!1,fillColor:null,fillOpacity:.2,fillRule:"evenodd",interactive:!0,bubblingMouseEvents:!0},beforeAdd:function(u){this._renderer=u.getRenderer(this)},onAdd:function(){this._renderer._initPath(this),this._reset(),this._renderer._addPath(this)},onRemove:function(){this._renderer._removePath(this)},redraw:function(){return this._map&&this._renderer._updatePath(this),this},setStyle:function(u){return b(this,u),this._renderer&&(this._renderer._updateStyle(this),this.options.stroke&&u&&Object.prototype.hasOwnProperty.call(u,"weight")&&this._updateBounds()),this},bringToFront:function(){return this._renderer&&this._renderer._bringToFront(this),this},bringToBack:function(){return this._renderer&&this._renderer._bringToBack(this),this},getElement:function(){return this._path},_reset:function(){this._project(),this._update()},_clickTolerance:function(){return(this.options.stroke?this.options.weight/2:0)+(this._renderer.options.tolerance||0)}}),wo=Dn.extend({options:{fill:!0,radius:10},initialize:function(u,m){b(this,m),this._latlng=J(u),this._radius=this.options.radius},setLatLng:function(u){var m=this._latlng;return this._latlng=J(u),this.redraw(),this.fire("move",{oldLatLng:m,latlng:this._latlng})},getLatLng:function(){return this._latlng},setRadius:function(u){return this.options.radius=this._radius=u,this.redraw()},getRadius:function(){return this._radius},setStyle:function(u){var m=u&&u.radius||this._radius;return Dn.prototype.setStyle.call(this,u),this.setRadius(m),this},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()},_updateBounds:function(){var u=this._radius,m=this._radiusY||u,v=this._clickTolerance(),z=[u+v,m+v];this._pxBounds=new se(this._point.subtract(z),this._point.add(z))},_update:function(){this._map&&this._updatePath()},_updatePath:function(){this._renderer._updateCircle(this)},_empty:function(){return this._radius&&!this._renderer._bounds.intersects(this._pxBounds)},_containsPoint:function(u){return u.distanceTo(this._point)<=this._radius+this._clickTolerance()}});function ko(u,m){return new wo(u,m)}var Vr=wo.extend({initialize:function(u,m,v){if(typeof m=="number"&&(m=i({},v,{radius:m})),b(this,m),this._latlng=J(u),isNaN(this.options.radius))throw new Error("Circle radius cannot be NaN");this._mRadius=this.options.radius},setRadius:function(u){return this._mRadius=u,this.redraw()},getRadius:function(){return this._mRadius},getBounds:function(){var u=[this._radius,this._radiusY||this._radius];return new N(this._map.layerPointToLatLng(this._point.subtract(u)),this._map.layerPointToLatLng(this._point.add(u)))},setStyle:Dn.prototype.setStyle,_project:function(){var u=this._latlng.lng,m=this._latlng.lat,v=this._map,z=v.options.crs;if(z.distance===k.distance){var V=Math.PI/180,ue=this._mRadius/k.R/V,Ee=v.project([m+ue,u]),Me=v.project([m-ue,u]),$e=Ee.add(Me).divideBy(2),Ye=v.unproject($e).lat,mt=Math.acos((Math.cos(ue*V)-Math.sin(m*V)*Math.sin(Ye*V))/(Math.cos(m*V)*Math.cos(Ye*V)))/V;(isNaN(mt)||mt===0)&&(mt=ue/Math.cos(Math.PI/180*m)),this._point=$e.subtract(v.getPixelOrigin()),this._radius=isNaN(mt)?0:$e.x-v.project([Ye,u-mt]).x,this._radiusY=$e.y-Ee.y}else{var It=z.unproject(z.project(this._latlng).subtract([this._mRadius,0]));this._point=v.latLngToLayerPoint(this._latlng),this._radius=this._point.x-v.latLngToLayerPoint(It).x}this._updateBounds()}});function Ml(u,m,v){return new Vr(u,m,v)}var Bo=Dn.extend({options:{smoothFactor:1,noClip:!1},initialize:function(u,m){b(this,m),this._setLatLngs(u)},getLatLngs:function(){return this._latlngs},setLatLngs:function(u){return this._setLatLngs(u),this.redraw()},isEmpty:function(){return!this._latlngs.length},closestLayerPoint:function(u){for(var m=1/0,v=null,z=Gc,V,ue,Ee=0,Me=this._parts.length;Ee<Me;Ee++)for(var $e=this._parts[Ee],Ye=1,mt=$e.length;Ye<mt;Ye++){V=$e[Ye-1],ue=$e[Ye];var It=z(u,V,ue,!0);It<m&&(m=It,v=z(u,V,ue))}return v&&(v.distance=Math.sqrt(m)),v},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");return hm(this._defaultShape(),this._map.options.crs)},getBounds:function(){return this._bounds},addLatLng:function(u,m){return m=m||this._defaultShape(),u=J(u),m.push(u),this._bounds.extend(u),this.redraw()},_setLatLngs:function(u){this._bounds=new N,this._latlngs=this._convertLatLngs(u)},_defaultShape:function(){return To(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(u){for(var m=[],v=To(u),z=0,V=u.length;z<V;z++)v?(m[z]=J(u[z]),this._bounds.extend(m[z])):m[z]=this._convertLatLngs(u[z]);return m},_project:function(){var u=new se;this._rings=[],this._projectLatlngs(this._latlngs,this._rings,u),this._bounds.isValid()&&u.isValid()&&(this._rawPxBounds=u,this._updateBounds())},_updateBounds:function(){var u=this._clickTolerance(),m=new X(u,u);this._rawPxBounds&&(this._pxBounds=new se([this._rawPxBounds.min.subtract(m),this._rawPxBounds.max.add(m)]))},_projectLatlngs:function(u,m,v){var z=u[0]instanceof Y,V=u.length,ue,Ee;if(z){for(Ee=[],ue=0;ue<V;ue++)Ee[ue]=this._map.latLngToLayerPoint(u[ue]),v.extend(Ee[ue]);m.push(Ee)}else for(ue=0;ue<V;ue++)this._projectLatlngs(u[ue],m,v)},_clipPoints:function(){var u=this._renderer._bounds;if(this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(u))){if(this.options.noClip){this._parts=this._rings;return}var m=this._parts,v,z,V,ue,Ee,Me,$e;for(v=0,V=0,ue=this._rings.length;v<ue;v++)for($e=this._rings[v],z=0,Ee=$e.length;z<Ee-1;z++)Me=_b($e[z],$e[z+1],u,z,!0),Me&&(m[V]=m[V]||[],m[V].push(Me[0]),(Me[1]!==$e[z+1]||z===Ee-2)&&(m[V].push(Me[1]),V++))}},_simplifyPoints:function(){for(var u=this._parts,m=this.options.smoothFactor,v=0,z=u.length;v<z;v++)u[v]=yb(u[v],m)},_update:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},_updatePath:function(){this._renderer._updatePoly(this)},_containsPoint:function(u,m){var v,z,V,ue,Ee,Me,$e=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(u))return!1;for(v=0,ue=this._parts.length;v<ue;v++)for(Me=this._parts[v],z=0,Ee=Me.length,V=Ee-1;z<Ee;V=z++)if(!(!m&&z===0)&&vb(u,Me[V],Me[z])<=$e)return!0;return!1}});function Pa(u,m){return new Bo(u,m)}Bo._flat=fm;var Os=Bo.extend({options:{fill:!0},isEmpty:function(){return!this._latlngs.length||!this._latlngs[0].length},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");return cm(this._defaultShape(),this._map.options.crs)},_convertLatLngs:function(u){var m=Bo.prototype._convertLatLngs.call(this,u),v=m.length;return v>=2&&m[0]instanceof Y&&m[0].equals(m[v-1])&&m.pop(),m},_setLatLngs:function(u){Bo.prototype._setLatLngs.call(this,u),To(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return To(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var u=this._renderer._bounds,m=this.options.weight,v=new X(m,m);if(u=new se(u.min.subtract(v),u.max.add(v)),this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(u))){if(this.options.noClip){this._parts=this._rings;return}for(var z=0,V=this._rings.length,ue;z<V;z++)ue=gb(this._rings[z],u,!0),ue.length&&this._parts.push(ue)}},_updatePath:function(){this._renderer._updatePoly(this,!0)},_containsPoint:function(u){var m=!1,v,z,V,ue,Ee,Me,$e,Ye;if(!this._pxBounds||!this._pxBounds.contains(u))return!1;for(ue=0,$e=this._parts.length;ue<$e;ue++)for(v=this._parts[ue],Ee=0,Ye=v.length,Me=Ye-1;Ee<Ye;Me=Ee++)z=v[Ee],V=v[Me],z.y>u.y!=V.y>u.y&&u.x<(V.x-z.x)*(u.y-z.y)/(V.y-z.y)+z.x&&(m=!m);return m||Bo.prototype._containsPoint.call(this,u,!0)}});function f1(u,m){return new Os(u,m)}var Na=et.extend({initialize:function(u,m){b(this,m),this._layers={},u&&this.addData(u)},addData:function(u){var m=R(u)?u:u.features,v,z,V;if(m){for(v=0,z=m.length;v<z;v++)V=m[v],(V.geometries||V.geometry||V.features||V.coordinates)&&this.addData(V);return this}var ue=this.options;if(ue.filter&&!ue.filter(u))return this;var Ee=Eb(u,ue);return Ee?(Ee.feature=Ab(u),Ee.defaultOptions=Ee.options,this.resetStyle(Ee),ue.onEachFeature&&ue.onEachFeature(u,Ee),this.addLayer(Ee)):this},resetStyle:function(u){return u===void 0?this.eachLayer(this.resetStyle,this):(u.options=i({},u.defaultOptions),this._setLayerStyle(u,this.options.style),this)},setStyle:function(u){return this.eachLayer(function(m){this._setLayerStyle(m,u)},this)},_setLayerStyle:function(u,m){u.setStyle&&(typeof m=="function"&&(m=m(u.feature)),u.setStyle(m))}});function Eb(u,m){var v=u.type==="Feature"?u.geometry:u,z=v?v.coordinates:null,V=[],ue=m&&m.pointToLayer,Ee=m&&m.coordsToLatLng||h1,Me,$e,Ye,mt;if(!z&&!v)return null;switch(v.type){case"Point":return Me=Ee(z),rR(ue,u,Me,m);case"MultiPoint":for(Ye=0,mt=z.length;Ye<mt;Ye++)Me=Ee(z[Ye]),V.push(rR(ue,u,Me,m));return new et(V);case"LineString":case"MultiLineString":return $e=Cb(z,v.type==="LineString"?0:1,Ee),new Bo($e,m);case"Polygon":case"MultiPolygon":return $e=Cb(z,v.type==="Polygon"?1:2,Ee),new Os($e,m);case"GeometryCollection":for(Ye=0,mt=v.geometries.length;Ye<mt;Ye++){var It=Eb({geometry:v.geometries[Ye],type:"Feature",properties:u.properties},m);It&&V.push(It)}return new et(V);case"FeatureCollection":for(Ye=0,mt=v.features.length;Ye<mt;Ye++){var on=Eb(v.features[Ye],m);on&&V.push(on)}return new et(V);default:throw new Error("Invalid GeoJSON object.")}}function rR(u,m,v,z){return u?u(m,v):new Nn(v,z&&z.markersInheritOptions&&z)}function h1(u){return new Y(u[1],u[0],u[2])}function Cb(u,m,v){for(var z=[],V=0,ue=u.length,Ee;V<ue;V++)Ee=m?Cb(u[V],m-1,v):(v||h1)(u[V]),z.push(Ee);return z}function m1(u,m){return u=J(u),u.alt!==void 0?[p(u.lng,m),p(u.lat,m),p(u.alt,m)]:[p(u.lng,m),p(u.lat,m)]}function Sb(u,m,v,z){for(var V=[],ue=0,Ee=u.length;ue<Ee;ue++)V.push(m?Sb(u[ue],To(u[ue])?0:m-1,v,z):m1(u[ue],z));return!m&&v&&V.length>0&&V.push(V[0].slice()),V}function Du(u,m){return u.feature?i({},u.feature,{geometry:m}):Ab(m)}function Ab(u){return u.type==="Feature"||u.type==="FeatureCollection"?u:{type:"Feature",properties:{},geometry:u}}var p1={toGeoJSON:function(u){return Du(this,{type:"Point",coordinates:m1(this.getLatLng(),u)})}};Nn.include(p1),Vr.include(p1),wo.include(p1),Bo.include({toGeoJSON:function(u){var m=!To(this._latlngs),v=Sb(this._latlngs,m?1:0,!1,u);return Du(this,{type:(m?"Multi":"")+"LineString",coordinates:v})}}),Os.include({toGeoJSON:function(u){var m=!To(this._latlngs),v=m&&!To(this._latlngs[0]),z=Sb(this._latlngs,v?2:m?1:0,!0,u);return m||(z=[z]),Du(this,{type:(v?"Multi":"")+"Polygon",coordinates:z})}}),De.include({toMultiPoint:function(u){var m=[];return this.eachLayer(function(v){m.push(v.toGeoJSON(u).geometry.coordinates)}),Du(this,{type:"MultiPoint",coordinates:m})},toGeoJSON:function(u){var m=this.feature&&this.feature.geometry&&this.feature.geometry.type;if(m==="MultiPoint")return this.toMultiPoint(u);var v=m==="GeometryCollection",z=[];return this.eachLayer(function(V){if(V.toGeoJSON){var ue=V.toGeoJSON(u);if(v)z.push(ue.geometry);else{var Ee=Ab(ue);Ee.type==="FeatureCollection"?z.push.apply(z,Ee.features):z.push(Ee)}}}),v?Du(this,{geometries:z,type:"GeometryCollection"}):{type:"FeatureCollection",features:z}}});function iR(u,m){return new Na(u,m)}var vTe=iR,Tb=be.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(u,m,v){this._url=u,this._bounds=j(m),b(this,v)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&($t(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){bn(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(u){return this.options.opacity=u,this._image&&this._updateOpacity(),this},setStyle:function(u){return u.opacity&&this.setOpacity(u.opacity),this},bringToFront:function(){return this._map&&ro(this._image),this},bringToBack:function(){return this._map&&jo(this._image),this},setUrl:function(u){return this._url=u,this._image&&(this._image.src=u),this},setBounds:function(u){return this._bounds=j(u),this._map&&this._reset(),this},getEvents:function(){var u={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(u.zoomanim=this._animateZoom),u},setZIndex:function(u){return this.options.zIndex=u,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var u=this._url.tagName==="IMG",m=this._image=u?this._url:Wt("img");if($t(m,"leaflet-image-layer"),this._zoomAnimated&&$t(m,"leaflet-zoom-animated"),this.options.className&&$t(m,this.options.className),m.onselectstart=h,m.onmousemove=h,m.onload=a(this.fire,this,"load"),m.onerror=a(this._overlayOnError,this,"error"),(this.options.crossOrigin||this.options.crossOrigin==="")&&(m.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),u){this._url=m.src;return}m.src=this._url,m.alt=this.options.alt},_animateZoom:function(u){var m=this._map.getZoomScale(u.zoom),v=this._map._latLngBoundsToNewLayerBounds(this._bounds,u.zoom,u.center).min;bo(this._image,v,m)},_reset:function(){var u=this._image,m=new se(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),v=m.getSize();Gn(u,m.min),u.style.width=v.x+"px",u.style.height=v.y+"px"},_updateOpacity:function(){cr(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var u=this.options.errorOverlayUrl;u&&this._url!==u&&(this._url=u,this._image.src=u)},getCenter:function(){return this._bounds.getCenter()}}),wTe=function(u,m,v){return new Tb(u,m,v)},sR=Tb.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var u=this._url.tagName==="VIDEO",m=this._image=u?this._url:Wt("video");if($t(m,"leaflet-image-layer"),this._zoomAnimated&&$t(m,"leaflet-zoom-animated"),this.options.className&&$t(m,this.options.className),m.onselectstart=h,m.onmousemove=h,m.onloadeddata=a(this.fire,this,"load"),u){for(var v=m.getElementsByTagName("source"),z=[],V=0;V<v.length;V++)z.push(v[V].src);this._url=v.length>0?z:[m.src];return}R(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(m.style,"objectFit")&&(m.style.objectFit="fill"),m.autoplay=!!this.options.autoplay,m.loop=!!this.options.loop,m.muted=!!this.options.muted,m.playsInline=!!this.options.playsInline;for(var ue=0;ue<this._url.length;ue++){var Ee=Wt("source");Ee.src=this._url[ue],m.appendChild(Ee)}}});function kTe(u,m,v){return new sR(u,m,v)}var aR=Tb.extend({_initImage:function(){var u=this._image=this._url;$t(u,"leaflet-image-layer"),this._zoomAnimated&&$t(u,"leaflet-zoom-animated"),this.options.className&&$t(u,this.options.className),u.onselectstart=h,u.onmousemove=h}});function _Te(u,m,v){return new aR(u,m,v)}var Ls=be.extend({options:{interactive:!1,offset:[0,0],className:"",pane:void 0,content:""},initialize:function(u,m){u&&(u instanceof Y||R(u))?(this._latlng=J(u),b(this,m)):(b(this,u),this._source=m),this.options.content&&(this._content=this.options.content)},openOn:function(u){return u=arguments.length?u:this._source._map,u.hasLayer(this)||u.addLayer(this),this},close:function(){return this._map&&this._map.removeLayer(this),this},toggle:function(u){return this._map?this.close():(arguments.length?this._source=u:u=this._source,this._prepareOpen(),this.openOn(u._map)),this},onAdd:function(u){this._zoomAnimated=u._zoomAnimated,this._container||this._initLayout(),u._fadeAnimated&&cr(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),u._fadeAnimated&&cr(this._container,1),this.bringToFront(),this.options.interactive&&($t(this._container,"leaflet-interactive"),this.addInteractiveTarget(this._container))},onRemove:function(u){u._fadeAnimated?(cr(this._container,0),this._removeTimeout=setTimeout(a(bn,void 0,this._container),200)):bn(this._container),this.options.interactive&&(Kn(this._container,"leaflet-interactive"),this.removeInteractiveTarget(this._container))},getLatLng:function(){return this._latlng},setLatLng:function(u){return this._latlng=J(u),this._map&&(this._updatePosition(),this._adjustPan()),this},getContent:function(){return this._content},setContent:function(u){return this._content=u,this.update(),this},getElement:function(){return this._container},update:function(){this._map&&(this._container.style.visibility="hidden",this._updateContent(),this._updateLayout(),this._updatePosition(),this._container.style.visibility="",this._adjustPan())},getEvents:function(){var u={zoom:this._updatePosition,viewreset:this._updatePosition};return this._zoomAnimated&&(u.zoomanim=this._animateZoom),u},isOpen:function(){return!!this._map&&this._map.hasLayer(this)},bringToFront:function(){return this._map&&ro(this._container),this},bringToBack:function(){return this._map&&jo(this._container),this},_prepareOpen:function(u){var m=this._source;if(!m._map)return!1;if(m instanceof et){m=null;var v=this._source._layers;for(var z in v)if(v[z]._map){m=v[z];break}if(!m)return!1;this._source=m}if(!u)if(m.getCenter)u=m.getCenter();else if(m.getLatLng)u=m.getLatLng();else if(m.getBounds)u=m.getBounds().getCenter();else throw new Error("Unable to get source layer LatLng.");return this.setLatLng(u),this._map&&this.update(),!0},_updateContent:function(){if(this._content){var u=this._contentNode,m=typeof this._content=="function"?this._content(this._source||this):this._content;if(typeof m=="string")u.innerHTML=m;else{for(;u.hasChildNodes();)u.removeChild(u.firstChild);u.appendChild(m)}this.fire("contentupdate")}},_updatePosition:function(){if(this._map){var u=this._map.latLngToLayerPoint(this._latlng),m=W(this.options.offset),v=this._getAnchor();this._zoomAnimated?Gn(this._container,u.add(v)):m=m.add(u).add(v);var z=this._containerBottom=-m.y,V=this._containerLeft=-Math.round(this._containerWidth/2)+m.x;this._container.style.bottom=z+"px",this._container.style.left=V+"px"}},_getAnchor:function(){return[0,0]}});ln.include({_initOverlay:function(u,m,v,z){var V=m;return V instanceof u||(V=new u(z).setContent(m)),v&&V.setLatLng(v),V}}),be.include({_initOverlay:function(u,m,v,z){var V=v;return V instanceof u?(b(V,z),V._source=this):(V=m&&!z?m:new u(z,this),V.setContent(v)),V}});var Bb=Ls.extend({options:{pane:"popupPane",offset:[0,7],maxWidth:300,minWidth:50,maxHeight:null,autoPan:!0,autoPanPaddingTopLeft:null,autoPanPaddingBottomRight:null,autoPanPadding:[5,5],keepInView:!1,closeButton:!0,autoClose:!0,closeOnEscapeKey:!0,className:""},openOn:function(u){return u=arguments.length?u:this._source._map,!u.hasLayer(this)&&u._popup&&u._popup.options.autoClose&&u.removeLayer(u._popup),u._popup=this,Ls.prototype.openOn.call(this,u)},onAdd:function(u){Ls.prototype.onAdd.call(this,u),u.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof Dn||this._source.on("preclick",Ms))},onRemove:function(u){Ls.prototype.onRemove.call(this,u),u.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof Dn||this._source.off("preclick",Ms))},getEvents:function(){var u=Ls.prototype.getEvents.call(this);return(this.options.closeOnClick!==void 0?this.options.closeOnClick:this._map.options.closePopupOnClick)&&(u.preclick=this.close),this.options.keepInView&&(u.moveend=this._adjustPan),u},_initLayout:function(){var u="leaflet-popup",m=this._container=Wt("div",u+" "+(this.options.className||"")+" leaflet-zoom-animated"),v=this._wrapper=Wt("div",u+"-content-wrapper",m);if(this._contentNode=Wt("div",u+"-content",v),Nl(m),Bu(this._contentNode),Pt(m,"contextmenu",Ms),this._tipContainer=Wt("div",u+"-tip-container",m),this._tip=Wt("div",u+"-tip",this._tipContainer),this.options.closeButton){var z=this._closeButton=Wt("a",u+"-close-button",m);z.setAttribute("role","button"),z.setAttribute("aria-label","Close popup"),z.href="#close",z.innerHTML='<span aria-hidden="true">&#215;</span>',Pt(z,"click",function(V){Ao(V),this.close()},this)}},_updateLayout:function(){var u=this._contentNode,m=u.style;m.width="",m.whiteSpace="nowrap";var v=u.offsetWidth;v=Math.min(v,this.options.maxWidth),v=Math.max(v,this.options.minWidth),m.width=v+1+"px",m.whiteSpace="",m.height="";var z=u.offsetHeight,V=this.options.maxHeight,ue="leaflet-popup-scrolled";V&&z>V?(m.height=V+"px",$t(u,ue)):Kn(u,ue),this._containerWidth=this._container.offsetWidth},_animateZoom:function(u){var m=this._map._latLngToNewLayerPoint(this._latlng,u.zoom,u.center),v=this._getAnchor();Gn(this._container,m.add(v))},_adjustPan:function(){if(this.options.autoPan){if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning){this._autopanning=!1;return}var u=this._map,m=parseInt(Io(this._container,"marginBottom"),10)||0,v=this._container.offsetHeight+m,z=this._containerWidth,V=new X(this._containerLeft,-v-this._containerBottom);V._add(br(this._container));var ue=u.layerPointToContainerPoint(V),Ee=W(this.options.autoPanPadding),Me=W(this.options.autoPanPaddingTopLeft||Ee),$e=W(this.options.autoPanPaddingBottomRight||Ee),Ye=u.getSize(),mt=0,It=0;ue.x+z+$e.x>Ye.x&&(mt=ue.x+z-Ye.x+$e.x),ue.x-mt-Me.x<0&&(mt=ue.x-Me.x),ue.y+v+$e.y>Ye.y&&(It=ue.y+v-Ye.y+$e.y),ue.y-It-Me.y<0&&(It=ue.y-Me.y),(mt||It)&&(this.options.keepInView&&(this._autopanning=!0),u.fire("autopanstart").panBy([mt,It]))}},_getAnchor:function(){return W(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),xTe=function(u,m){return new Bb(u,m)};ln.mergeOptions({closePopupOnClick:!0}),ln.include({openPopup:function(u,m,v){return this._initOverlay(Bb,u,m,v).openOn(this),this},closePopup:function(u){return u=arguments.length?u:this._popup,u&&u.close(),this}}),be.include({bindPopup:function(u,m){return this._popup=this._initOverlay(Bb,this._popup,u,m),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(u){return this._popup&&(this instanceof et||(this._popup._source=this),this._popup._prepareOpen(u||this._latlng)&&this._popup.openOn(this._map)),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return this._popup?this._popup.isOpen():!1},setPopupContent:function(u){return this._popup&&this._popup.setContent(u),this},getPopup:function(){return this._popup},_openPopup:function(u){if(!(!this._popup||!this._map)){Qi(u);var m=u.layer||u.target;if(this._popup._source===m&&!(m instanceof Dn)){this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(u.latlng);return}this._popup._source=m,this.openPopup(u.latlng)}},_movePopup:function(u){this._popup.setLatLng(u.latlng)},_onKeyPress:function(u){u.originalEvent.keyCode===13&&this._openPopup(u)}});var Pb=Ls.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(u){Ls.prototype.onAdd.call(this,u),this.setOpacity(this.options.opacity),u.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(u){Ls.prototype.onRemove.call(this,u),u.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var u=Ls.prototype.getEvents.call(this);return this.options.permanent||(u.preclick=this.close),u},_initLayout:function(){var u="leaflet-tooltip",m=u+" "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=Wt("div",m),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+c(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(u){var m,v,z=this._map,V=this._container,ue=z.latLngToContainerPoint(z.getCenter()),Ee=z.layerPointToContainerPoint(u),Me=this.options.direction,$e=V.offsetWidth,Ye=V.offsetHeight,mt=W(this.options.offset),It=this._getAnchor();Me==="top"?(m=$e/2,v=Ye):Me==="bottom"?(m=$e/2,v=0):Me==="center"?(m=$e/2,v=Ye/2):Me==="right"?(m=0,v=Ye/2):Me==="left"?(m=$e,v=Ye/2):Ee.x<ue.x?(Me="right",m=0,v=Ye/2):(Me="left",m=$e+(mt.x+It.x)*2,v=Ye/2),u=u.subtract(W(m,v,!0)).add(mt).add(It),Kn(V,"leaflet-tooltip-right"),Kn(V,"leaflet-tooltip-left"),Kn(V,"leaflet-tooltip-top"),Kn(V,"leaflet-tooltip-bottom"),$t(V,"leaflet-tooltip-"+Me),Gn(V,u)},_updatePosition:function(){var u=this._map.latLngToLayerPoint(this._latlng);this._setPosition(u)},setOpacity:function(u){this.options.opacity=u,this._container&&cr(this._container,u)},_animateZoom:function(u){var m=this._map._latLngToNewLayerPoint(this._latlng,u.zoom,u.center);this._setPosition(m)},_getAnchor:function(){return W(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}}),ETe=function(u,m){return new Pb(u,m)};ln.include({openTooltip:function(u,m,v){return this._initOverlay(Pb,u,m,v).openOn(this),this},closeTooltip:function(u){return u.close(),this}}),be.include({bindTooltip:function(u,m){return this._tooltip&&this.isTooltipOpen()&&this.unbindTooltip(),this._tooltip=this._initOverlay(Pb,this._tooltip,u,m),this._initTooltipInteractions(),this._tooltip.options.permanent&&this._map&&this._map.hasLayer(this)&&this.openTooltip(),this},unbindTooltip:function(){return this._tooltip&&(this._initTooltipInteractions(!0),this.closeTooltip(),this._tooltip=null),this},_initTooltipInteractions:function(u){if(!(!u&&this._tooltipHandlersAdded)){var m=u?"off":"on",v={remove:this.closeTooltip,move:this._moveTooltip};this._tooltip.options.permanent?v.add=this._openTooltip:(v.mouseover=this._openTooltip,v.mouseout=this.closeTooltip,v.click=this._openTooltip,this._map?this._addFocusListeners():v.add=this._addFocusListeners),this._tooltip.options.sticky&&(v.mousemove=this._moveTooltip),this[m](v),this._tooltipHandlersAdded=!u}},openTooltip:function(u){return this._tooltip&&(this instanceof et||(this._tooltip._source=this),this._tooltip._prepareOpen(u)&&(this._tooltip.openOn(this._map),this.getElement?this._setAriaDescribedByOnLayer(this):this.eachLayer&&this.eachLayer(this._setAriaDescribedByOnLayer,this))),this},closeTooltip:function(){if(this._tooltip)return this._tooltip.close()},toggleTooltip:function(){return this._tooltip&&this._tooltip.toggle(this),this},isTooltipOpen:function(){return this._tooltip.isOpen()},setTooltipContent:function(u){return this._tooltip&&this._tooltip.setContent(u),this},getTooltip:function(){return this._tooltip},_addFocusListeners:function(){this.getElement?this._addFocusListenersOnLayer(this):this.eachLayer&&this.eachLayer(this._addFocusListenersOnLayer,this)},_addFocusListenersOnLayer:function(u){var m=typeof u.getElement=="function"&&u.getElement();m&&(Pt(m,"focus",function(){this._tooltip._source=u,this.openTooltip()},this),Pt(m,"blur",this.closeTooltip,this))},_setAriaDescribedByOnLayer:function(u){var m=typeof u.getElement=="function"&&u.getElement();m&&m.setAttribute("aria-describedby",this._tooltip._container.id)},_openTooltip:function(u){if(!(!this._tooltip||!this._map)){if(this._map.dragging&&this._map.dragging.moving()&&!this._openOnceFlag){this._openOnceFlag=!0;var m=this;this._map.once("moveend",function(){m._openOnceFlag=!1,m._openTooltip(u)});return}this._tooltip._source=u.layer||u.target,this.openTooltip(this._tooltip.options.sticky?u.latlng:void 0)}},_moveTooltip:function(u){var m=u.latlng,v,z;this._tooltip.options.sticky&&u.originalEvent&&(v=this._map.mouseEventToContainerPoint(u.originalEvent),z=this._map.containerPointToLayerPoint(v),m=this._map.layerPointToLatLng(z)),this._tooltip.setLatLng(m)}});var lR=Mt.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"},createIcon:function(u){var m=u&&u.tagName==="DIV"?u:document.createElement("div"),v=this.options;if(v.html instanceof Element?(kn(m),m.appendChild(v.html)):m.innerHTML=v.html!==!1?v.html:"",v.bgPos){var z=W(v.bgPos);m.style.backgroundPosition=-z.x+"px "+-z.y+"px"}return this._setIconStyles(m,"icon"),m},createShadow:function(){return null}});function CTe(u){return new lR(u)}Mt.Default=nt;var mm=be.extend({options:{tileSize:256,opacity:1,updateWhenIdle:kt.mobile,updateWhenZooming:!0,updateInterval:200,zIndex:1,bounds:null,minZoom:0,maxZoom:void 0,maxNativeZoom:void 0,minNativeZoom:void 0,noWrap:!1,pane:"tilePane",className:"",keepBuffer:2},initialize:function(u){b(this,u)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView()},beforeAdd:function(u){u._addZoomLimit(this)},onRemove:function(u){this._removeAllTiles(),bn(this._container),u._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(ro(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(jo(this._container),this._setAutoZIndex(Math.min)),this},getContainer:function(){return this._container},setOpacity:function(u){return this.options.opacity=u,this._updateOpacity(),this},setZIndex:function(u){return this.options.zIndex=u,this._updateZIndex(),this},isLoading:function(){return this._loading},redraw:function(){if(this._map){this._removeAllTiles();var u=this._clampZoom(this._map.getZoom());u!==this._tileZoom&&(this._tileZoom=u,this._updateLevels()),this._update()}return this},getEvents:function(){var u={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};return this.options.updateWhenIdle||(this._onMove||(this._onMove=d(this._onMoveEnd,this.options.updateInterval,this)),u.move=this._onMove),this._zoomAnimated&&(u.zoomanim=this._animateZoom),u},createTile:function(){return document.createElement("div")},getTileSize:function(){var u=this.options.tileSize;return u instanceof X?u:new X(u,u)},_updateZIndex:function(){this._container&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(u){for(var m=this.getPane().children,v=-u(-1/0,1/0),z=0,V=m.length,ue;z<V;z++)ue=m[z].style.zIndex,m[z]!==this._container&&ue&&(v=u(v,+ue));isFinite(v)&&(this.options.zIndex=v+u(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!kt.ielt9){cr(this._container,this.options.opacity);var u=+new Date,m=!1,v=!1;for(var z in this._tiles){var V=this._tiles[z];if(!(!V.current||!V.loaded)){var ue=Math.min(1,(u-V.loaded)/200);cr(V.el,ue),ue<1?m=!0:(V.active?v=!0:this._onOpaqueTile(V),V.active=!0)}}v&&!this._noPrune&&this._pruneTiles(),m&&(P(this._fadeFrame),this._fadeFrame=A(this._updateOpacity,this))}},_onOpaqueTile:h,_initContainer:function(){this._container||(this._container=Wt("div","leaflet-layer "+(this.options.className||"")),this._updateZIndex(),this.options.opacity<1&&this._updateOpacity(),this.getPane().appendChild(this._container))},_updateLevels:function(){var u=this._tileZoom,m=this.options.maxZoom;if(u!==void 0){for(var v in this._levels)v=Number(v),this._levels[v].el.children.length||v===u?(this._levels[v].el.style.zIndex=m-Math.abs(u-v),this._onUpdateLevel(v)):(bn(this._levels[v].el),this._removeTilesAtZoom(v),this._onRemoveLevel(v),delete this._levels[v]);var z=this._levels[u],V=this._map;return z||(z=this._levels[u]={},z.el=Wt("div","leaflet-tile-container leaflet-zoom-animated",this._container),z.el.style.zIndex=m,z.origin=V.project(V.unproject(V.getPixelOrigin()),u).round(),z.zoom=u,this._setZoomTransform(z,V.getCenter(),V.getZoom()),h(z.el.offsetWidth),this._onCreateLevel(z)),this._level=z,z}},_onUpdateLevel:h,_onRemoveLevel:h,_onCreateLevel:h,_pruneTiles:function(){if(this._map){var u,m,v=this._map.getZoom();if(v>this.options.maxZoom||v<this.options.minZoom){this._removeAllTiles();return}for(u in this._tiles)m=this._tiles[u],m.retain=m.current;for(u in this._tiles)if(m=this._tiles[u],m.current&&!m.active){var z=m.coords;this._retainParent(z.x,z.y,z.z,z.z-5)||this._retainChildren(z.x,z.y,z.z,z.z+2)}for(u in this._tiles)this._tiles[u].retain||this._removeTile(u)}},_removeTilesAtZoom:function(u){for(var m in this._tiles)this._tiles[m].coords.z===u&&this._removeTile(m)},_removeAllTiles:function(){for(var u in this._tiles)this._removeTile(u)},_invalidateAll:function(){for(var u in this._levels)bn(this._levels[u].el),this._onRemoveLevel(Number(u)),delete this._levels[u];this._removeAllTiles(),this._tileZoom=void 0},_retainParent:function(u,m,v,z){var V=Math.floor(u/2),ue=Math.floor(m/2),Ee=v-1,Me=new X(+V,+ue);Me.z=+Ee;var $e=this._tileCoordsToKey(Me),Ye=this._tiles[$e];return Ye&&Ye.active?(Ye.retain=!0,!0):(Ye&&Ye.loaded&&(Ye.retain=!0),Ee>z?this._retainParent(V,ue,Ee,z):!1)},_retainChildren:function(u,m,v,z){for(var V=2*u;V<2*u+2;V++)for(var ue=2*m;ue<2*m+2;ue++){var Ee=new X(V,ue);Ee.z=v+1;var Me=this._tileCoordsToKey(Ee),$e=this._tiles[Me];if($e&&$e.active){$e.retain=!0;continue}else $e&&$e.loaded&&($e.retain=!0);v+1<z&&this._retainChildren(V,ue,v+1,z)}},_resetView:function(u){var m=u&&(u.pinch||u.flyTo);this._setView(this._map.getCenter(),this._map.getZoom(),m,m)},_animateZoom:function(u){this._setView(u.center,u.zoom,!0,u.noUpdate)},_clampZoom:function(u){var m=this.options;return m.minNativeZoom!==void 0&&u<m.minNativeZoom?m.minNativeZoom:m.maxNativeZoom!==void 0&&m.maxNativeZoom<u?m.maxNativeZoom:u},_setView:function(u,m,v,z){var V=Math.round(m);this.options.maxZoom!==void 0&&V>this.options.maxZoom||this.options.minZoom!==void 0&&V<this.options.minZoom?V=void 0:V=this._clampZoom(V);var ue=this.options.updateWhenZooming&&V!==this._tileZoom;(!z||ue)&&(this._tileZoom=V,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),V!==void 0&&this._update(u),v||this._pruneTiles(),this._noPrune=!!v),this._setZoomTransforms(u,m)},_setZoomTransforms:function(u,m){for(var v in this._levels)this._setZoomTransform(this._levels[v],u,m)},_setZoomTransform:function(u,m,v){var z=this._map.getZoomScale(v,u.zoom),V=u.origin.multiplyBy(z).subtract(this._map._getNewPixelOrigin(m,v)).round();kt.any3d?bo(u.el,V,z):Gn(u.el,V)},_resetGrid:function(){var u=this._map,m=u.options.crs,v=this._tileSize=this.getTileSize(),z=this._tileZoom,V=this._map.getPixelWorldBounds(this._tileZoom);V&&(this._globalTileRange=this._pxBoundsToTileRange(V)),this._wrapX=m.wrapLng&&!this.options.noWrap&&[Math.floor(u.project([0,m.wrapLng[0]],z).x/v.x),Math.ceil(u.project([0,m.wrapLng[1]],z).x/v.y)],this._wrapY=m.wrapLat&&!this.options.noWrap&&[Math.floor(u.project([m.wrapLat[0],0],z).y/v.x),Math.ceil(u.project([m.wrapLat[1],0],z).y/v.y)]},_onMoveEnd:function(){!this._map||this._map._animatingZoom||this._update()},_getTiledPixelBounds:function(u){var m=this._map,v=m._animatingZoom?Math.max(m._animateToZoom,m.getZoom()):m.getZoom(),z=m.getZoomScale(v,this._tileZoom),V=m.project(u,this._tileZoom).floor(),ue=m.getSize().divideBy(z*2);return new se(V.subtract(ue),V.add(ue))},_update:function(u){var m=this._map;if(m){var v=this._clampZoom(m.getZoom());if(u===void 0&&(u=m.getCenter()),this._tileZoom!==void 0){var z=this._getTiledPixelBounds(u),V=this._pxBoundsToTileRange(z),ue=V.getCenter(),Ee=[],Me=this.options.keepBuffer,$e=new se(V.getBottomLeft().subtract([Me,-Me]),V.getTopRight().add([Me,-Me]));if(!(isFinite(V.min.x)&&isFinite(V.min.y)&&isFinite(V.max.x)&&isFinite(V.max.y)))throw new Error("Attempted to load an infinite number of tiles");for(var Ye in this._tiles){var mt=this._tiles[Ye].coords;(mt.z!==this._tileZoom||!$e.contains(new X(mt.x,mt.y)))&&(this._tiles[Ye].current=!1)}if(Math.abs(v-this._tileZoom)>1){this._setView(u,v);return}for(var It=V.min.y;It<=V.max.y;It++)for(var on=V.min.x;on<=V.max.x;on++){var yr=new X(on,It);if(yr.z=this._tileZoom,!!this._isValidTile(yr)){var Uo=this._tiles[this._tileCoordsToKey(yr)];Uo?Uo.current=!0:Ee.push(yr)}}if(Ee.sort(function(Ir,Ru){return Ir.distanceTo(ue)-Ru.distanceTo(ue)}),Ee.length!==0){this._loading||(this._loading=!0,this.fire("loading"));var Ai=document.createDocumentFragment();for(on=0;on<Ee.length;on++)this._addTile(Ee[on],Ai);this._level.el.appendChild(Ai)}}}},_isValidTile:function(u){var m=this._map.options.crs;if(!m.infinite){var v=this._globalTileRange;if(!m.wrapLng&&(u.x<v.min.x||u.x>v.max.x)||!m.wrapLat&&(u.y<v.min.y||u.y>v.max.y))return!1}if(!this.options.bounds)return!0;var z=this._tileCoordsToBounds(u);return j(this.options.bounds).overlaps(z)},_keyToBounds:function(u){return this._tileCoordsToBounds(this._keyToTileCoords(u))},_tileCoordsToNwSe:function(u){var m=this._map,v=this.getTileSize(),z=u.scaleBy(v),V=z.add(v),ue=m.unproject(z,u.z),Ee=m.unproject(V,u.z);return[ue,Ee]},_tileCoordsToBounds:function(u){var m=this._tileCoordsToNwSe(u),v=new N(m[0],m[1]);return this.options.noWrap||(v=this._map.wrapLatLngBounds(v)),v},_tileCoordsToKey:function(u){return u.x+":"+u.y+":"+u.z},_keyToTileCoords:function(u){var m=u.split(":"),v=new X(+m[0],+m[1]);return v.z=+m[2],v},_removeTile:function(u){var m=this._tiles[u];m&&(bn(m.el),delete this._tiles[u],this.fire("tileunload",{tile:m.el,coords:this._keyToTileCoords(u)}))},_initTile:function(u){$t(u,"leaflet-tile");var m=this.getTileSize();u.style.width=m.x+"px",u.style.height=m.y+"px",u.onselectstart=h,u.onmousemove=h,kt.ielt9&&this.options.opacity<1&&cr(u,this.options.opacity)},_addTile:function(u,m){var v=this._getTilePos(u),z=this._tileCoordsToKey(u),V=this.createTile(this._wrapCoords(u),a(this._tileReady,this,u));this._initTile(V),this.createTile.length<2&&A(a(this._tileReady,this,u,null,V)),Gn(V,v),this._tiles[z]={el:V,coords:u,current:!0},m.appendChild(V),this.fire("tileloadstart",{tile:V,coords:u})},_tileReady:function(u,m,v){m&&this.fire("tileerror",{error:m,tile:v,coords:u});var z=this._tileCoordsToKey(u);v=this._tiles[z],v&&(v.loaded=+new Date,this._map._fadeAnimated?(cr(v.el,0),P(this._fadeFrame),this._fadeFrame=A(this._updateOpacity,this)):(v.active=!0,this._pruneTiles()),m||($t(v.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:v.el,coords:u})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),kt.ielt9||!this._map._fadeAnimated?A(this._pruneTiles,this):setTimeout(a(this._pruneTiles,this),250)))},_getTilePos:function(u){return u.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(u){var m=new X(this._wrapX?f(u.x,this._wrapX):u.x,this._wrapY?f(u.y,this._wrapY):u.y);return m.z=u.z,m},_pxBoundsToTileRange:function(u){var m=this.getTileSize();return new se(u.min.unscaleBy(m).floor(),u.max.unscaleBy(m).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var u in this._tiles)if(!this._tiles[u].loaded)return!1;return!0}});function STe(u){return new mm(u)}var Mu=mm.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(u,m){this._url=u,m=b(this,m),m.detectRetina&&kt.retina&&m.maxZoom>0?(m.tileSize=Math.floor(m.tileSize/2),m.zoomReverse?(m.zoomOffset--,m.minZoom=Math.min(m.maxZoom,m.minZoom+1)):(m.zoomOffset++,m.maxZoom=Math.max(m.minZoom,m.maxZoom-1)),m.minZoom=Math.max(0,m.minZoom)):m.zoomReverse?m.minZoom=Math.min(m.maxZoom,m.minZoom):m.maxZoom=Math.max(m.minZoom,m.maxZoom),typeof m.subdomains=="string"&&(m.subdomains=m.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(u,m){return this._url===u&&m===void 0&&(m=!0),this._url=u,m||this.redraw(),this},createTile:function(u,m){var v=document.createElement("img");return Pt(v,"load",a(this._tileOnLoad,this,m,v)),Pt(v,"error",a(this._tileOnError,this,m,v)),(this.options.crossOrigin||this.options.crossOrigin==="")&&(v.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),typeof this.options.referrerPolicy=="string"&&(v.referrerPolicy=this.options.referrerPolicy),v.alt="",v.src=this.getTileUrl(u),v},getTileUrl:function(u){var m={r:kt.retina?"@2x":"",s:this._getSubdomain(u),x:u.x,y:u.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var v=this._globalTileRange.max.y-u.y;this.options.tms&&(m.y=v),m["-y"]=v}return B(this._url,i(m,this.options))},_tileOnLoad:function(u,m){kt.ielt9?setTimeout(a(u,this,null,m),0):u(null,m)},_tileOnError:function(u,m,v){var z=this.options.errorTileUrl;z&&m.getAttribute("src")!==z&&(m.src=z),u(v,m)},_onTileRemove:function(u){u.tile.onload=null},_getZoomForUrl:function(){var u=this._tileZoom,m=this.options.maxZoom,v=this.options.zoomReverse,z=this.options.zoomOffset;return v&&(u=m-u),u+z},_getSubdomain:function(u){var m=Math.abs(u.x+u.y)%this.options.subdomains.length;return this.options.subdomains[m]},_abortLoading:function(){var u,m;for(u in this._tiles)if(this._tiles[u].coords.z!==this._tileZoom&&(m=this._tiles[u].el,m.onload=h,m.onerror=h,!m.complete)){m.src=O;var v=this._tiles[u].coords;bn(m),delete this._tiles[u],this.fire("tileabort",{tile:m,coords:v})}},_removeTile:function(u){var m=this._tiles[u];if(m)return m.el.setAttribute("src",O),mm.prototype._removeTile.call(this,u)},_tileReady:function(u,m,v){if(!(!this._map||v&&v.getAttribute("src")===O))return mm.prototype._tileReady.call(this,u,m,v)}});function cR(u,m){return new Mu(u,m)}var dR=Mu.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(u,m){this._url=u;var v=i({},this.defaultWmsParams);for(var z in m)z in this.options||(v[z]=m[z]);m=b(this,m);var V=m.detectRetina&&kt.retina?2:1,ue=this.getTileSize();v.width=ue.x*V,v.height=ue.y*V,this.wmsParams=v},onAdd:function(u){this._crs=this.options.crs||u.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var m=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[m]=this._crs.code,Mu.prototype.onAdd.call(this,u)},getTileUrl:function(u){var m=this._tileCoordsToNwSe(u),v=this._crs,z=H(v.project(m[0]),v.project(m[1])),V=z.min,ue=z.max,Ee=(this._wmsVersion>=1.3&&this._crs===me?[V.y,V.x,ue.y,ue.x]:[V.x,V.y,ue.x,ue.y]).join(","),Me=Mu.prototype.getTileUrl.call(this,u);return Me+_(this.wmsParams,Me,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+Ee},setParams:function(u,m){return i(this.wmsParams,u),m||this.redraw(),this}});function ATe(u,m){return new dR(u,m)}Mu.WMS=dR,cR.wms=ATe;var Da=be.extend({options:{padding:.1},initialize:function(u){b(this,u),c(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),$t(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var u={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(u.zoomanim=this._onAnimZoom),u},_onAnimZoom:function(u){this._updateTransform(u.center,u.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(u,m){var v=this._map.getZoomScale(m,this._zoom),z=this._map.getSize().multiplyBy(.5+this.options.padding),V=this._map.project(this._center,m),ue=z.multiplyBy(-v).add(V).subtract(this._map._getNewPixelOrigin(u,m));kt.any3d?bo(this._container,ue,v):Gn(this._container,ue)},_reset:function(){this._update(),this._updateTransform(this._center,this._zoom);for(var u in this._layers)this._layers[u]._reset()},_onZoomEnd:function(){for(var u in this._layers)this._layers[u]._project()},_updatePaths:function(){for(var u in this._layers)this._layers[u]._update()},_update:function(){var u=this.options.padding,m=this._map.getSize(),v=this._map.containerPointToLayerPoint(m.multiplyBy(-u)).round();this._bounds=new se(v,v.add(m.multiplyBy(1+u*2)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),uR=Da.extend({options:{tolerance:0},getEvents:function(){var u=Da.prototype.getEvents.call(this);return u.viewprereset=this._onViewPreReset,u},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){Da.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var u=this._container=document.createElement("canvas");Pt(u,"mousemove",this._onMouseMove,this),Pt(u,"click dblclick mousedown mouseup contextmenu",this._onClick,this),Pt(u,"mouseout",this._handleMouseOut,this),u._leaflet_disable_events=!0,this._ctx=u.getContext("2d")},_destroyContainer:function(){P(this._redrawRequest),delete this._ctx,bn(this._container),Cn(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){var u;this._redrawBounds=null;for(var m in this._layers)u=this._layers[m],u._update();this._redraw()}},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){Da.prototype._update.call(this);var u=this._bounds,m=this._container,v=u.getSize(),z=kt.retina?2:1;Gn(m,u.min),m.width=z*v.x,m.height=z*v.y,m.style.width=v.x+"px",m.style.height=v.y+"px",kt.retina&&this._ctx.scale(2,2),this._ctx.translate(-u.min.x,-u.min.y),this.fire("update")}},_reset:function(){Da.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(u){this._updateDashArray(u),this._layers[c(u)]=u;var m=u._order={layer:u,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=m),this._drawLast=m,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(u){this._requestRedraw(u)},_removePath:function(u){var m=u._order,v=m.next,z=m.prev;v?v.prev=z:this._drawLast=z,z?z.next=v:this._drawFirst=v,delete u._order,delete this._layers[c(u)],this._requestRedraw(u)},_updatePath:function(u){this._extendRedrawBounds(u),u._project(),u._update(),this._requestRedraw(u)},_updateStyle:function(u){this._updateDashArray(u),this._requestRedraw(u)},_updateDashArray:function(u){if(typeof u.options.dashArray=="string"){var m=u.options.dashArray.split(/[, ]+/),v=[],z,V;for(V=0;V<m.length;V++){if(z=Number(m[V]),isNaN(z))return;v.push(z)}u.options._dashArray=v}else u.options._dashArray=u.options.dashArray},_requestRedraw:function(u){this._map&&(this._extendRedrawBounds(u),this._redrawRequest=this._redrawRequest||A(this._redraw,this))},_extendRedrawBounds:function(u){if(u._pxBounds){var m=(u.options.weight||0)+1;this._redrawBounds=this._redrawBounds||new se,this._redrawBounds.extend(u._pxBounds.min.subtract([m,m])),this._redrawBounds.extend(u._pxBounds.max.add([m,m]))}},_redraw:function(){this._redrawRequest=null,this._redrawBounds&&(this._redrawBounds.min._floor(),this._redrawBounds.max._ceil()),this._clear(),this._draw(),this._redrawBounds=null},_clear:function(){var u=this._redrawBounds;if(u){var m=u.getSize();this._ctx.clearRect(u.min.x,u.min.y,m.x,m.y)}else this._ctx.save(),this._ctx.setTransform(1,0,0,1,0,0),this._ctx.clearRect(0,0,this._container.width,this._container.height),this._ctx.restore()},_draw:function(){var u,m=this._redrawBounds;if(this._ctx.save(),m){var v=m.getSize();this._ctx.beginPath(),this._ctx.rect(m.min.x,m.min.y,v.x,v.y),this._ctx.clip()}this._drawing=!0;for(var z=this._drawFirst;z;z=z.next)u=z.layer,(!m||u._pxBounds&&u._pxBounds.intersects(m))&&u._updatePath();this._drawing=!1,this._ctx.restore()},_updatePoly:function(u,m){if(this._drawing){var v,z,V,ue,Ee=u._parts,Me=Ee.length,$e=this._ctx;if(Me){for($e.beginPath(),v=0;v<Me;v++){for(z=0,V=Ee[v].length;z<V;z++)ue=Ee[v][z],$e[z?"lineTo":"moveTo"](ue.x,ue.y);m&&$e.closePath()}this._fillStroke($e,u)}}},_updateCircle:function(u){if(!(!this._drawing||u._empty())){var m=u._point,v=this._ctx,z=Math.max(Math.round(u._radius),1),V=(Math.max(Math.round(u._radiusY),1)||z)/z;V!==1&&(v.save(),v.scale(1,V)),v.beginPath(),v.arc(m.x,m.y/V,z,0,Math.PI*2,!1),V!==1&&v.restore(),this._fillStroke(v,u)}},_fillStroke:function(u,m){var v=m.options;v.fill&&(u.globalAlpha=v.fillOpacity,u.fillStyle=v.fillColor||v.color,u.fill(v.fillRule||"evenodd")),v.stroke&&v.weight!==0&&(u.setLineDash&&u.setLineDash(m.options&&m.options._dashArray||[]),u.globalAlpha=v.opacity,u.lineWidth=v.weight,u.strokeStyle=v.color,u.lineCap=v.lineCap,u.lineJoin=v.lineJoin,u.stroke())},_onClick:function(u){for(var m=this._map.mouseEventToLayerPoint(u),v,z,V=this._drawFirst;V;V=V.next)v=V.layer,v.options.interactive&&v._containsPoint(m)&&(!(u.type==="click"||u.type==="preclick")||!this._map._draggableMoved(v))&&(z=v);this._fireEvent(z?[z]:!1,u)},_onMouseMove:function(u){if(!(!this._map||this._map.dragging.moving()||this._map._animatingZoom)){var m=this._map.mouseEventToLayerPoint(u);this._handleMouseHover(u,m)}},_handleMouseOut:function(u){var m=this._hoveredLayer;m&&(Kn(this._container,"leaflet-interactive"),this._fireEvent([m],u,"mouseout"),this._hoveredLayer=null,this._mouseHoverThrottled=!1)},_handleMouseHover:function(u,m){if(!this._mouseHoverThrottled){for(var v,z,V=this._drawFirst;V;V=V.next)v=V.layer,v.options.interactive&&v._containsPoint(m)&&(z=v);z!==this._hoveredLayer&&(this._handleMouseOut(u),z&&($t(this._container,"leaflet-interactive"),this._fireEvent([z],u,"mouseover"),this._hoveredLayer=z)),this._fireEvent(this._hoveredLayer?[this._hoveredLayer]:!1,u),this._mouseHoverThrottled=!0,setTimeout(a(function(){this._mouseHoverThrottled=!1},this),32)}},_fireEvent:function(u,m,v){this._map._fireDOMEvent(m,v||m.type,u)},_bringToFront:function(u){var m=u._order;if(m){var v=m.next,z=m.prev;if(v)v.prev=z;else return;z?z.next=v:v&&(this._drawFirst=v),m.prev=this._drawLast,this._drawLast.next=m,m.next=null,this._drawLast=m,this._requestRedraw(u)}},_bringToBack:function(u){var m=u._order;if(m){var v=m.next,z=m.prev;if(z)z.next=v;else return;v?v.prev=z:z&&(this._drawLast=z),m.prev=null,m.next=this._drawFirst,this._drawFirst.prev=m,this._drawFirst=m,this._requestRedraw(u)}}});function fR(u){return kt.canvas?new uR(u):null}var pm=(function(){try{return document.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(u){return document.createElement("<lvml:"+u+' class="lvml">')}}catch{}return function(u){return document.createElement("<"+u+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}})(),TTe={_initContainer:function(){this._container=Wt("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(Da.prototype._update.call(this),this.fire("update"))},_initPath:function(u){var m=u._container=pm("shape");$t(m,"leaflet-vml-shape "+(this.options.className||"")),m.coordsize="1 1",u._path=pm("path"),m.appendChild(u._path),this._updateStyle(u),this._layers[c(u)]=u},_addPath:function(u){var m=u._container;this._container.appendChild(m),u.options.interactive&&u.addInteractiveTarget(m)},_removePath:function(u){var m=u._container;bn(m),u.removeInteractiveTarget(m),delete this._layers[c(u)]},_updateStyle:function(u){var m=u._stroke,v=u._fill,z=u.options,V=u._container;V.stroked=!!z.stroke,V.filled=!!z.fill,z.stroke?(m||(m=u._stroke=pm("stroke")),V.appendChild(m),m.weight=z.weight+"px",m.color=z.color,m.opacity=z.opacity,z.dashArray?m.dashStyle=R(z.dashArray)?z.dashArray.join(" "):z.dashArray.replace(/( *, *)/g," "):m.dashStyle="",m.endcap=z.lineCap.replace("butt","flat"),m.joinstyle=z.lineJoin):m&&(V.removeChild(m),u._stroke=null),z.fill?(v||(v=u._fill=pm("fill")),V.appendChild(v),v.color=z.fillColor||z.color,v.opacity=z.fillOpacity):v&&(V.removeChild(v),u._fill=null)},_updateCircle:function(u){var m=u._point.round(),v=Math.round(u._radius),z=Math.round(u._radiusY||v);this._setPath(u,u._empty()?"M0 0":"AL "+m.x+","+m.y+" "+v+","+z+" 0,"+65535*360)},_setPath:function(u,m){u._path.v=m},_bringToFront:function(u){ro(u._container)},_bringToBack:function(u){jo(u._container)}},Nb=kt.vml?pm:ce,gm=Da.extend({_initContainer:function(){this._container=Nb("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=Nb("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){bn(this._container),Cn(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){Da.prototype._update.call(this);var u=this._bounds,m=u.getSize(),v=this._container;(!this._svgSize||!this._svgSize.equals(m))&&(this._svgSize=m,v.setAttribute("width",m.x),v.setAttribute("height",m.y)),Gn(v,u.min),v.setAttribute("viewBox",[u.min.x,u.min.y,m.x,m.y].join(" ")),this.fire("update")}},_initPath:function(u){var m=u._path=Nb("path");u.options.className&&$t(m,u.options.className),u.options.interactive&&$t(m,"leaflet-interactive"),this._updateStyle(u),this._layers[c(u)]=u},_addPath:function(u){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(u._path),u.addInteractiveTarget(u._path)},_removePath:function(u){bn(u._path),u.removeInteractiveTarget(u._path),delete this._layers[c(u)]},_updatePath:function(u){u._project(),u._update()},_updateStyle:function(u){var m=u._path,v=u.options;m&&(v.stroke?(m.setAttribute("stroke",v.color),m.setAttribute("stroke-opacity",v.opacity),m.setAttribute("stroke-width",v.weight),m.setAttribute("stroke-linecap",v.lineCap),m.setAttribute("stroke-linejoin",v.lineJoin),v.dashArray?m.setAttribute("stroke-dasharray",v.dashArray):m.removeAttribute("stroke-dasharray"),v.dashOffset?m.setAttribute("stroke-dashoffset",v.dashOffset):m.removeAttribute("stroke-dashoffset")):m.setAttribute("stroke","none"),v.fill?(m.setAttribute("fill",v.fillColor||v.color),m.setAttribute("fill-opacity",v.fillOpacity),m.setAttribute("fill-rule",v.fillRule||"evenodd")):m.setAttribute("fill","none"))},_updatePoly:function(u,m){this._setPath(u,ke(u._parts,m))},_updateCircle:function(u){var m=u._point,v=Math.max(Math.round(u._radius),1),z=Math.max(Math.round(u._radiusY),1)||v,V="a"+v+","+z+" 0 1,0 ",ue=u._empty()?"M0 0":"M"+(m.x-v)+","+m.y+V+v*2+",0 "+V+-v*2+",0 ";this._setPath(u,ue)},_setPath:function(u,m){u._path.setAttribute("d",m)},_bringToFront:function(u){ro(u._path)},_bringToBack:function(u){jo(u._path)}});kt.vml&&gm.include(TTe);function hR(u){return kt.svg||kt.vml?new gm(u):null}ln.include({getRenderer:function(u){var m=u.options.renderer||this._getPaneRenderer(u.options.pane)||this.options.renderer||this._renderer;return m||(m=this._renderer=this._createRenderer()),this.hasLayer(m)||this.addLayer(m),m},_getPaneRenderer:function(u){if(u==="overlayPane"||u===void 0)return!1;var m=this._paneRenderers[u];return m===void 0&&(m=this._createRenderer({pane:u}),this._paneRenderers[u]=m),m},_createRenderer:function(u){return this.options.preferCanvas&&fR(u)||hR(u)}});var mR=Os.extend({initialize:function(u,m){Os.prototype.initialize.call(this,this._boundsToLatLngs(u),m)},setBounds:function(u){return this.setLatLngs(this._boundsToLatLngs(u))},_boundsToLatLngs:function(u){return u=j(u),[u.getSouthWest(),u.getNorthWest(),u.getNorthEast(),u.getSouthEast()]}});function BTe(u,m){return new mR(u,m)}gm.create=Nb,gm.pointsToPath=ke,Na.geometryToLayer=Eb,Na.coordsToLatLng=h1,Na.coordsToLatLngs=Cb,Na.latLngToCoords=m1,Na.latLngsToCoords=Sb,Na.getFeature=Du,Na.asFeature=Ab,ln.mergeOptions({boxZoom:!0});var pR=Si.extend({initialize:function(u){this._map=u,this._container=u._container,this._pane=u._panes.overlayPane,this._resetStateTimeout=0,u.on("unload",this._destroy,this)},addHooks:function(){Pt(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Cn(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){bn(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){this._resetStateTimeout!==0&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(u){if(!u.shiftKey||u.which!==1&&u.button!==1)return!1;this._clearDeferredResetState(),this._resetState(),Dt(),Oo(),this._startPoint=this._map.mouseEventToContainerPoint(u),Pt(document,{contextmenu:Qi,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(u){this._moved||(this._moved=!0,this._box=Wt("div","leaflet-zoom-box",this._container),$t(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(u);var m=new se(this._point,this._startPoint),v=m.getSize();Gn(this._box,m.min),this._box.style.width=v.x+"px",this._box.style.height=v.y+"px"},_finish:function(){this._moved&&(bn(this._box),Kn(this._container,"leaflet-crosshair")),Ds(),Qr(),Cn(document,{contextmenu:Qi,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(u){if(!(u.which!==1&&u.button!==1)&&(this._finish(),!!this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(a(this._resetState,this),0);var m=new N(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(m).fire("boxzoomend",{boxZoomBounds:m})}},_onKeyDown:function(u){u.keyCode===27&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});ln.addInitHook("addHandler","boxZoom",pR),ln.mergeOptions({doubleClickZoom:!0});var gR=Si.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(u){var m=this._map,v=m.getZoom(),z=m.options.zoomDelta,V=u.originalEvent.shiftKey?v-z:v+z;m.options.doubleClickZoom==="center"?m.setZoom(V):m.setZoomAround(u.containerPoint,V)}});ln.addInitHook("addHandler","doubleClickZoom",gR),ln.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var bR=Si.extend({addHooks:function(){if(!this._draggable){var u=this._map;this._draggable=new Rs(u._mapPane,u._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),u.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),u.on("zoomend",this._onZoomEnd,this),u.whenReady(this._onZoomEnd,this))}$t(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){Kn(this._map._container,"leaflet-grab"),Kn(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var u=this._map;if(u._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var m=j(this._map.options.maxBounds);this._offsetLimit=H(this._map.latLngToContainerPoint(m.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(m.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;u.fire("movestart").fire("dragstart"),u.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(u){if(this._map.options.inertia){var m=this._lastTime=+new Date,v=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(v),this._times.push(m),this._prunePositions(m)}this._map.fire("move",u).fire("drag",u)},_prunePositions:function(u){for(;this._positions.length>1&&u-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var u=this._map.getSize().divideBy(2),m=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=m.subtract(u).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(u,m){return u-(u-m)*this._viscosity},_onPreDragLimit:function(){if(!(!this._viscosity||!this._offsetLimit)){var u=this._draggable._newPos.subtract(this._draggable._startPos),m=this._offsetLimit;u.x<m.min.x&&(u.x=this._viscousLimit(u.x,m.min.x)),u.y<m.min.y&&(u.y=this._viscousLimit(u.y,m.min.y)),u.x>m.max.x&&(u.x=this._viscousLimit(u.x,m.max.x)),u.y>m.max.y&&(u.y=this._viscousLimit(u.y,m.max.y)),this._draggable._newPos=this._draggable._startPos.add(u)}},_onPreDragWrap:function(){var u=this._worldWidth,m=Math.round(u/2),v=this._initialWorldOffset,z=this._draggable._newPos.x,V=(z-m+v)%u+m-v,ue=(z+m+v)%u-m-v,Ee=Math.abs(V+v)<Math.abs(ue+v)?V:ue;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=Ee},_onDragEnd:function(u){var m=this._map,v=m.options,z=!v.inertia||u.noInertia||this._times.length<2;if(m.fire("dragend",u),z)m.fire("moveend");else{this._prunePositions(+new Date);var V=this._lastPos.subtract(this._positions[0]),ue=(this._lastTime-this._times[0])/1e3,Ee=v.easeLinearity,Me=V.multiplyBy(Ee/ue),$e=Me.distanceTo([0,0]),Ye=Math.min(v.inertiaMaxSpeed,$e),mt=Me.multiplyBy(Ye/$e),It=Ye/(v.inertiaDeceleration*Ee),on=mt.multiplyBy(-It/2).round();!on.x&&!on.y?m.fire("moveend"):(on=m._limitOffset(on,m.options.maxBounds),A(function(){m.panBy(on,{duration:It,easeLinearity:Ee,noMoveStart:!0,animate:!0})}))}}});ln.addInitHook("addHandler","dragging",bR),ln.mergeOptions({keyboard:!0,keyboardPanDelta:80});var yR=Si.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61,171],zoomOut:[189,109,54,173]},initialize:function(u){this._map=u,this._setPanDelta(u.options.keyboardPanDelta),this._setZoomDelta(u.options.zoomDelta)},addHooks:function(){var u=this._map._container;u.tabIndex<=0&&(u.tabIndex="0"),Pt(u,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.on({focus:this._addHooks,blur:this._removeHooks},this)},removeHooks:function(){this._removeHooks(),Cn(this._map._container,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.off({focus:this._addHooks,blur:this._removeHooks},this)},_onMouseDown:function(){if(!this._focused){var u=document.body,m=document.documentElement,v=u.scrollTop||m.scrollTop,z=u.scrollLeft||m.scrollLeft;this._map._container.focus(),window.scrollTo(z,v)}},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanDelta:function(u){var m=this._panKeys={},v=this.keyCodes,z,V;for(z=0,V=v.left.length;z<V;z++)m[v.left[z]]=[-1*u,0];for(z=0,V=v.right.length;z<V;z++)m[v.right[z]]=[u,0];for(z=0,V=v.down.length;z<V;z++)m[v.down[z]]=[0,u];for(z=0,V=v.up.length;z<V;z++)m[v.up[z]]=[0,-1*u]},_setZoomDelta:function(u){var m=this._zoomKeys={},v=this.keyCodes,z,V;for(z=0,V=v.zoomIn.length;z<V;z++)m[v.zoomIn[z]]=u;for(z=0,V=v.zoomOut.length;z<V;z++)m[v.zoomOut[z]]=-u},_addHooks:function(){Pt(document,"keydown",this._onKeyDown,this)},_removeHooks:function(){Cn(document,"keydown",this._onKeyDown,this)},_onKeyDown:function(u){if(!(u.altKey||u.ctrlKey||u.metaKey)){var m=u.keyCode,v=this._map,z;if(m in this._panKeys){if(!v._panAnim||!v._panAnim._inProgress)if(z=this._panKeys[m],u.shiftKey&&(z=W(z).multiplyBy(3)),v.options.maxBounds&&(z=v._limitOffset(W(z),v.options.maxBounds)),v.options.worldCopyJump){var V=v.wrapLatLng(v.unproject(v.project(v.getCenter()).add(z)));v.panTo(V)}else v.panBy(z)}else if(m in this._zoomKeys)v.setZoom(v.getZoom()+(u.shiftKey?3:1)*this._zoomKeys[m]);else if(m===27&&v._popup&&v._popup.options.closeOnEscapeKey)v.closePopup();else return;Qi(u)}}});ln.addInitHook("addHandler","keyboard",yR),ln.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});var vR=Si.extend({addHooks:function(){Pt(this._map._container,"wheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){Cn(this._map._container,"wheel",this._onWheelScroll,this)},_onWheelScroll:function(u){var m=Hc(u),v=this._map.options.wheelDebounceTime;this._delta+=m,this._lastMousePos=this._map.mouseEventToContainerPoint(u),this._startTime||(this._startTime=+new Date);var z=Math.max(v-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(a(this._performZoom,this),z),Qi(u)},_performZoom:function(){var u=this._map,m=u.getZoom(),v=this._map.options.zoomSnap||0;u._stop();var z=this._delta/(this._map.options.wheelPxPerZoomLevel*4),V=4*Math.log(2/(1+Math.exp(-Math.abs(z))))/Math.LN2,ue=v?Math.ceil(V/v)*v:V,Ee=u._limitZoom(m+(this._delta>0?ue:-ue))-m;this._delta=0,this._startTime=null,Ee&&(u.options.scrollWheelZoom==="center"?u.setZoom(m+Ee):u.setZoomAround(this._lastMousePos,m+Ee))}});ln.addInitHook("addHandler","scrollWheelZoom",vR);var PTe=600;ln.mergeOptions({tapHold:kt.touchNative&&kt.safari&&kt.mobile,tapTolerance:15});var wR=Si.extend({addHooks:function(){Pt(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){Cn(this._map._container,"touchstart",this._onDown,this)},_onDown:function(u){if(clearTimeout(this._holdTimeout),u.touches.length===1){var m=u.touches[0];this._startPos=this._newPos=new X(m.clientX,m.clientY),this._holdTimeout=setTimeout(a(function(){this._cancel(),this._isTapValid()&&(Pt(document,"touchend",Ao),Pt(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",m))},this),PTe),Pt(document,"touchend touchcancel contextmenu",this._cancel,this),Pt(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function u(){Cn(document,"touchend",Ao),Cn(document,"touchend touchcancel",u)},_cancel:function(){clearTimeout(this._holdTimeout),Cn(document,"touchend touchcancel contextmenu",this._cancel,this),Cn(document,"touchmove",this._onMove,this)},_onMove:function(u){var m=u.touches[0];this._newPos=new X(m.clientX,m.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(u,m){var v=new MouseEvent(u,{bubbles:!0,cancelable:!0,view:window,screenX:m.screenX,screenY:m.screenY,clientX:m.clientX,clientY:m.clientY});v._simulated=!0,m.target.dispatchEvent(v)}});ln.addInitHook("addHandler","tapHold",wR),ln.mergeOptions({touchZoom:kt.touch,bounceAtZoomLimits:!0});var kR=Si.extend({addHooks:function(){$t(this._map._container,"leaflet-touch-zoom"),Pt(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){Kn(this._map._container,"leaflet-touch-zoom"),Cn(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(u){var m=this._map;if(!(!u.touches||u.touches.length!==2||m._animatingZoom||this._zooming)){var v=m.mouseEventToContainerPoint(u.touches[0]),z=m.mouseEventToContainerPoint(u.touches[1]);this._centerPoint=m.getSize()._divideBy(2),this._startLatLng=m.containerPointToLatLng(this._centerPoint),m.options.touchZoom!=="center"&&(this._pinchStartLatLng=m.containerPointToLatLng(v.add(z)._divideBy(2))),this._startDist=v.distanceTo(z),this._startZoom=m.getZoom(),this._moved=!1,this._zooming=!0,m._stop(),Pt(document,"touchmove",this._onTouchMove,this),Pt(document,"touchend touchcancel",this._onTouchEnd,this),Ao(u)}},_onTouchMove:function(u){if(!(!u.touches||u.touches.length!==2||!this._zooming)){var m=this._map,v=m.mouseEventToContainerPoint(u.touches[0]),z=m.mouseEventToContainerPoint(u.touches[1]),V=v.distanceTo(z)/this._startDist;if(this._zoom=m.getScaleZoom(V,this._startZoom),!m.options.bounceAtZoomLimits&&(this._zoom<m.getMinZoom()&&V<1||this._zoom>m.getMaxZoom()&&V>1)&&(this._zoom=m._limitZoom(this._zoom)),m.options.touchZoom==="center"){if(this._center=this._startLatLng,V===1)return}else{var ue=v._add(z)._divideBy(2)._subtract(this._centerPoint);if(V===1&&ue.x===0&&ue.y===0)return;this._center=m.unproject(m.project(this._pinchStartLatLng,this._zoom).subtract(ue),this._zoom)}this._moved||(m._moveStart(!0,!1),this._moved=!0),P(this._animRequest);var Ee=a(m._move,m,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=A(Ee,this,!0),Ao(u)}},_onTouchEnd:function(){if(!this._moved||!this._zooming){this._zooming=!1;return}this._zooming=!1,P(this._animRequest),Cn(document,"touchmove",this._onTouchMove,this),Cn(document,"touchend touchcancel",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))}});ln.addInitHook("addHandler","touchZoom",kR),ln.BoxZoom=pR,ln.DoubleClickZoom=gR,ln.Drag=bR,ln.Keyboard=yR,ln.ScrollWheelZoom=vR,ln.TapHold=wR,ln.TouchZoom=kR,n.Bounds=se,n.Browser=kt,n.CRS=U,n.Canvas=uR,n.Circle=Vr,n.CircleMarker=wo,n.Class=Q,n.Control=Rr,n.DivIcon=lR,n.DivOverlay=Ls,n.DomEvent=r1,n.DomUtil=yo,n.Draggable=Rs,n.Evented=le,n.FeatureGroup=et,n.GeoJSON=Na,n.GridLayer=mm,n.Handler=Si,n.Icon=Mt,n.ImageOverlay=Tb,n.LatLng=Y,n.LatLngBounds=N,n.Layer=be,n.LayerGroup=De,n.LineUtil=xb,n.Map=ln,n.Marker=Nn,n.Mixin=c1,n.Path=Dn,n.Point=X,n.PolyUtil=bb,n.Polygon=Os,n.Polyline=Bo,n.Popup=Bb,n.PosAnimation=fb,n.Projection=oe,n.Rectangle=mR,n.Renderer=Da,n.SVG=gm,n.SVGOverlay=aR,n.TileLayer=Mu,n.Tooltip=Pb,n.Transformation=M,n.Util=q,n.VideoOverlay=sR,n.bind=a,n.bounds=H,n.canvas=fR,n.circle=Ml,n.circleMarker=ko,n.control=qc,n.divIcon=CTe,n.extend=i,n.featureGroup=ct,n.geoJSON=iR,n.geoJson=vTe,n.gridLayer=STe,n.icon=dt,n.imageOverlay=wTe,n.latLng=J,n.latLngBounds=j,n.layerGroup=He,n.map=i1,n.marker=Yn,n.point=W,n.polygon=f1,n.polyline=Pa,n.popup=xTe,n.rectangle=BTe,n.setOptions=b,n.stamp=c,n.svg=hR,n.svgOverlay=_Te,n.tileLayer=cR,n.tooltip=ETe,n.transformation=$,n.version=o,n.videoOverlay=kTe;var NTe=window.L;n.noConflict=function(){return window.L=NTe,this},window.L=n}))})(Sf,Sf.exports)),Sf.exports}var oX=nX();const Ev=Dm(oX),rX={class:"flex flex-col gap-1 w-full relative"},iX={key:0,class:"h-4 w-32 rounded bg-gray-200 dark:bg-gray-700 animate-shimmer mb-1"},sX={class:"flex items-center justify-between mb-0.5"},aX={key:0,class:"text-sm font-medium text-gray-700 dark:text-gray-200"},lX={key:0,class:"ml-1 text-destructive"},cX={key:0,class:"flex flex-col gap-2 mb-2 w-full relative"},dX={class:"flex flex-col sm:flex-row gap-2 w-full relative"},uX={class:"px-3 py-2 text-sm text-gray-500 dark:text-gray-400 h-10 flex items-center"},fX={key:0},hX={key:1},mX={key:2},pX={key:1,class:"flex-1 grid grid-cols-2 gap-2"},gX=["disabled"],bX=["disabled"],yX={class:"flex gap-2 flex-shrink-0"},vX={key:0,class:"absolute inset-0 z-[1001] bg-transparent cursor-not-allowed pointer-events-auto"},wX={key:1,class:"absolute bottom-2.5 left-2.5 z-[1000] bg-white/95 dark:bg-neutral-900/95 backdrop-blur-sm border border-gray-200 dark:border-neutral-800 rounded-md px-2.5 py-1 text-[11px] font-mono text-gray-700 dark:text-gray-300 shadow-md flex items-center gap-1.5 pointer-events-none select-none"},kX={key:1,class:"text-xs text-destructive mt-1"},Qp=r.defineComponent({name:"DCodeMapField",inheritAttrs:!1,__name:"DCodeMapField",props:{modelValue:{},valueFormat:{default:"object-lat-lng"},label:{},placeholder:{default:"Cari alamat atau lokasi..."},disabled:{type:[Boolean,String],default:!1},readonly:{type:Boolean,default:!1},visible:{type:Boolean,default:!0},skeleton:{type:Boolean,default:!1},error:{default:null},height:{default:"320px"},zoom:{default:13},defaultLat:{default:-.9492},defaultLng:{default:100.42},enableSearch:{type:Boolean,default:!0},enableCurrentLocation:{type:Boolean,default:!0},enableManualInput:{type:Boolean,default:!1},required:{type:Boolean,default:!1},size:{default:"default"},rounded:{default:"lg"}},emits:["update:modelValue","change"],setup(e,{emit:t}){const n=r.useAttrs(),o=e,i=t,a=`app-map-container-${Math.random().toString(36).slice(2,7)}`,l=r.computed(()=>o.label??n.label),c=r.computed(()=>{const N=n.required,j=n["aria-required"];return N===""||N===!0||N==="true"||j==="true"||j===!0||o.required}),d=r.computed(()=>o.disabled===!0||o.disabled==="true"),f=r.ref(!1),h=r.ref(!1),p=r.ref([]),g=r.ref(null),y=r.ref(""),b=r.ref(""),_=r.ref(""),x=r.ref(o.enableManualInput?"manual":"search");r.watch(()=>[o.enableSearch,o.enableManualInput],()=>{o.enableManualInput?x.value="manual":x.value="search"},{immediate:!0});let B=null,R=null,S=null,O=null;const I=N=>{if(!N)return null;if(typeof N=="object"){if(Array.isArray(N)){if(N.length>=2){const J=Number(N[0]),U=Number(N[1]);if(!isNaN(J)&&!isNaN(U))return o.valueFormat==="array-lng-lat"?{lat:U,lng:J}:{lat:J,lng:U}}return null}const j=Number(N.lat!==void 0?N.lat:N.latitude),Y=Number(N.lng!==void 0?N.lng:N.longitude);if(!isNaN(j)&&!isNaN(Y))return{lat:j,lng:Y}}else if(typeof N=="string"){const j=N.split(",").map(Y=>Number(Y.trim()));if(j.length>=2&&!isNaN(j[0])&&!isNaN(j[1]))return{lat:j[0],lng:j[1]}}return null},D=N=>{const j=Number(N.lat.toFixed(6)),Y=Number(N.lng.toFixed(6));switch(o.valueFormat){case"object-latitude-longitude":return{latitude:j,longitude:Y};case"array-lat-lng":return[j,Y];case"array-lng-lat":return[Y,j];case"string":return`${j},${Y}`;default:return{lat:j,lng:Y}}},w=r.ref(null);r.watch(()=>o.modelValue,N=>{const j=I(N);j?(!w.value||Math.abs(w.value.lat-j.lat)>1e-6||Math.abs(w.value.lng-j.lng)>1e-6)&&(w.value=j,b.value=j.lat.toFixed(6),_.value=j.lng.toFixed(6),re(j.lat,j.lng,!0)):(N==null||N==="")&&(w.value=null,b.value="",_.value="",g.value=null,R&&B&&(B.removeLayer(R),R=null))},{deep:!0,immediate:!0});const E=(N,j)=>{if(!B||!j)return;const Y="https://tile.openstreetmap.org/{z}/{x}/{y}.png",J='&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors';S&&B.removeLayer(S),S=j.tileLayer(Y,{attribution:J,maxZoom:19}).addTo(B)},F=N=>N.divIcon({className:"custom-map-marker-container",html:`
120
120
  <div class="relative flex items-center justify-center -top-4">
121
121
  <!-- Ping Ripple -->
122
122
  <span class="absolute inline-flex h-8 w-8 rounded-full bg-blue-500 opacity-40 animate-ping"></span>