@webority/ui-elements 0.165.0 → 0.168.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (414) hide show
  1. package/dist/WuiCarousel-CRx2-eKV.js +1 -0
  2. package/dist/WuiCodeBlock-DTckR_z3.js +1 -0
  3. package/dist/WuiCommandPalette-CSzl5yGf.js +2 -0
  4. package/dist/WuiCommentThread-AYovTYSA.js +1 -0
  5. package/dist/WuiConsentBanner-CWvXnwBH.js +1 -0
  6. package/dist/WuiContextMenu-CyejQsef.js +1 -0
  7. package/dist/WuiDataTable-BniN81KC.js +1 -0
  8. package/dist/WuiDatePicker-q0s8tL_E.js +31 -0
  9. package/dist/WuiDateRange-p2r5A9CY.js +25 -0
  10. package/dist/WuiDrawer-CQ7nRHUD.js +1 -0
  11. package/dist/{WuiDropdown-CeiMaiwi.js → WuiDropdown-BQC04Q48.js} +1 -1
  12. package/dist/WuiEntryGrid-DPAYNu1v.js +3 -0
  13. package/dist/{WuiHoverCard-AAXID-P3.js → WuiHoverCard-DRZh88zM.js} +1 -1
  14. package/dist/WuiImageCrop-BTY59Qsm.js +17 -0
  15. package/dist/WuiInlineEdit-CEjs5Ruk.js +1 -0
  16. package/dist/WuiLeadPopup-L9UCTVA5.js +382 -0
  17. package/dist/WuiLightbox-DDQAOabU.js +1 -0
  18. package/dist/WuiMentionInput-CkhrCz_2.js +1 -0
  19. package/dist/{WuiModal-Bz2Xg161.js → WuiModal-BRILsSMq.js} +1 -1
  20. package/dist/{WuiNavigationMenu-Dybw-nMb.js → WuiNavigationMenu-BCnqv7e-.js} +1 -1
  21. package/dist/WuiNotificationCenter-BCXT3Y7m.js +1 -0
  22. package/dist/WuiOrgTree-5v0vqPVk.js +1 -0
  23. package/dist/WuiOverflow-DtetLQHW.js +1 -0
  24. package/dist/WuiPhone-B6jgFRSi.js +16 -0
  25. package/dist/{WuiPopover-y_Vxm64z.js → WuiPopover-BzVxNSs1.js} +1 -1
  26. package/dist/WuiRecordPager-Dye7AfCS.js +1 -0
  27. package/dist/{WuiRelativeTime-CmlKD-97.js → WuiRelativeTime-DTGKGHbK.js} +1 -1
  28. package/dist/WuiSavedViews-BsAyuOzX.js +1 -0
  29. package/dist/WuiSelect-CMHoPHlx.js +9 -0
  30. package/dist/WuiShortcuts-DSjwaZx7.js +1 -0
  31. package/dist/WuiShowMore-CGhWrlmK.js +1 -0
  32. package/dist/WuiSlider-J9YPWu9e.js +51 -0
  33. package/dist/WuiSortable-BfOm57Mj.js +1 -0
  34. package/dist/WuiTimePicker-C5XouoR7.js +9 -0
  35. package/dist/WuiTour-BDOGWyNA.js +1 -0
  36. package/dist/WuiTree-CeYbyaCx.js +1 -0
  37. package/dist/{WuiWhatsNew-BdsS6MzB.js → WuiWhatsNew-DOo54GiH.js} +1 -1
  38. package/dist/WuiWizardStep-Ce6O_8oc.js +1 -0
  39. package/dist/calendarMath-CFjBxJYM.js +1 -0
  40. package/dist/carousel.g-Bw_pFDzc.js +1 -0
  41. package/dist/chips-CemguTKJ.js +2 -0
  42. package/dist/codeBlock.g-BCF2IlK-.js +1 -0
  43. package/dist/commandPalette.g-DFWnCufa.js +1 -0
  44. package/dist/commentText-NWsssKvj.js +1 -0
  45. package/dist/consentBanner.g-CZAb1BLJ.js +1 -0
  46. package/dist/country-B7jmc--B.js +1 -0
  47. package/dist/customRule-BXJdj57A.js +1 -0
  48. package/dist/customRule.g-Cfkl3_ZC.js +1 -0
  49. package/dist/dataTable-CKz4Oncc.js +1 -0
  50. package/dist/dataTable.g-BVxhub_d.js +1 -0
  51. package/dist/datePicker.g-CT9FBY21.js +1 -0
  52. package/dist/dateRangePicker.g-Pnc37vgX.js +1 -0
  53. package/dist/drawer.g-B-zYKBfQ.js +1 -0
  54. package/dist/drawerDiscard-BjykHS_G.js +1 -0
  55. package/dist/elements/carousel.js +1 -1
  56. package/dist/elements/code-block.js +1 -1
  57. package/dist/elements/command-palette.js +1 -1
  58. package/dist/elements/comment-thread.js +1 -1
  59. package/dist/elements/consent-banner.js +1 -1
  60. package/dist/elements/context-menu.js +1 -1
  61. package/dist/elements/data-table.js +1 -1
  62. package/dist/elements/date-range.js +1 -1
  63. package/dist/elements/datepicker.js +1 -1
  64. package/dist/elements/drawer.js +1 -1
  65. package/dist/elements/dropdown.js +1 -1
  66. package/dist/elements/entry-grid.js +1 -1
  67. package/dist/elements/filter-popover.js +1 -1
  68. package/dist/elements/hover-card.js +1 -1
  69. package/dist/elements/image-crop.js +1 -1
  70. package/dist/elements/inline-edit.js +1 -1
  71. package/dist/elements/kanban.js +1 -1
  72. package/dist/elements/lead-popup.js +1 -1
  73. package/dist/elements/lightbox.js +1 -1
  74. package/dist/elements/mention-input.js +1 -1
  75. package/dist/elements/modal.js +1 -1
  76. package/dist/elements/navigation-menu.js +1 -1
  77. package/dist/elements/notification-center.js +1 -1
  78. package/dist/elements/org-tree.js +1 -1
  79. package/dist/elements/overflow.js +1 -1
  80. package/dist/elements/phone.js +1 -1
  81. package/dist/elements/popover.js +1 -1
  82. package/dist/elements/record-pager.js +1 -1
  83. package/dist/elements/relative-time.js +1 -1
  84. package/dist/elements/saved-views.js +1 -1
  85. package/dist/elements/select.js +1 -1
  86. package/dist/elements/shortcuts.js +1 -1
  87. package/dist/elements/show-more.js +1 -1
  88. package/dist/elements/slider.js +1 -1
  89. package/dist/elements/sortable.js +1 -1
  90. package/dist/elements/timepicker.js +1 -1
  91. package/dist/elements/tour.js +1 -1
  92. package/dist/elements/tree.js +1 -1
  93. package/dist/elements/whats-new.js +1 -1
  94. package/dist/elements/wizard.js +1 -1
  95. package/dist/fileViewer.g-B5XQ5WKr.js +1 -0
  96. package/dist/fileViewerImage-B0Q9zdgW.js +3 -0
  97. package/dist/fileViewerMedia-D3fdG-Ti.js +1 -0
  98. package/dist/fileViewerPdf-DeRWa1JE.js +20 -0
  99. package/dist/{filterPopover-B29bt1s2.js → filterPopover-DmeVG4_N.js} +1 -1
  100. package/dist/formatters-Dy4kQQ_h.js +1 -0
  101. package/dist/formatters.g-BNAu1PMe.js +1 -0
  102. package/dist/helpers.js +1 -1
  103. package/dist/httpFailure.g-DBKzEpAf.js +1 -0
  104. package/dist/iconGlyphs.g-DxSJLQJ8.js +1 -0
  105. package/dist/imageCrop.g-BnbAeH2Q.js +1 -0
  106. package/dist/inlineEdit.g-ZxRNYq0t.js +1 -0
  107. package/dist/inlineEditText-BUO5sZxN.js +1 -0
  108. package/dist/kanban-CEZmyYFY.js +1 -0
  109. package/dist/kanban.g-dtKYyIpr.js +1 -0
  110. package/dist/kanbanModel-Dp5c1rTs.js +1 -0
  111. package/dist/leadPopup.g-BfMPz9nH.js +1 -0
  112. package/dist/lightbox.g-DDrycPou.js +1 -0
  113. package/dist/{loader-C7Ov09Bx.js → loader-CQJFj96n.js} +1 -1
  114. package/dist/mentionInput.g-DJo6d2Gm.js +1 -0
  115. package/dist/nativeOverlay-C1Rw2gIW.js +1 -0
  116. package/dist/notificationCentre.g-UsAurkUz.js +1 -0
  117. package/dist/notificationDays-B7cbYu4q.js +1 -0
  118. package/dist/{optionLabel-4xjXWy74.js → optionLabel-B2cU4Ax0.js} +1 -1
  119. package/dist/orgTree.g-CIg75quV.js +1 -0
  120. package/dist/overflow.g-BfcGEhwR.js +1 -0
  121. package/dist/passwordRules.g-CMYrohdd.js +1 -0
  122. package/dist/phone.g-P66U-SK5.js +1 -0
  123. package/dist/recents-BQ0fD7Y0.js +1 -0
  124. package/dist/relativeTime-CdFw-ekO.js +1 -0
  125. package/dist/relativeTime.g-BH90tjJM.js +1 -0
  126. package/dist/rowDrop.g-DQpB10Ey.js +1 -0
  127. package/dist/savedViews.g-CzzEliTR.js +1 -0
  128. package/dist/search-Cj1YQUwK.js +1 -0
  129. package/dist/search.g-B5d1s59A.js +1 -0
  130. package/dist/server.js +1 -1
  131. package/dist/shell.g-C2Ht5xl2.js +1 -0
  132. package/dist/shortcutKeys-DmPiY4T7.js +1 -0
  133. package/dist/shortcutKeys.g-C0TeAfYL.js +1 -0
  134. package/dist/showMore.g-BdQ5MUSd.js +1 -0
  135. package/dist/slider.g-BPNfxZEV.js +1 -0
  136. package/dist/sortable.g-BsTKys5-.js +1 -0
  137. package/dist/tableSelect.g-DKZqXQT_.js +1 -0
  138. package/dist/text/en.json +1278 -0
  139. package/dist/text.js +1 -0
  140. package/dist/textStore-opIEM4lu.js +1 -0
  141. package/dist/themeTransition-CDB0Mx61.js +1 -0
  142. package/dist/timePicker.g-DM61i-ZE.js +1 -0
  143. package/dist/tourAdvance.g-BJqDnqag.js +1 -0
  144. package/dist/tree.g-RId8xZSk.js +1 -0
  145. package/dist/ui-calendar.global.js +1 -1
  146. package/dist/ui-calendar.js +1 -1
  147. package/dist/ui-chart.global.js +2 -2
  148. package/dist/ui-chart.js +2 -2
  149. package/dist/ui-consent-banner.global.js +1 -1
  150. package/dist/ui-elements/carousel.global.js +1 -1
  151. package/dist/ui-elements/code-block.global.js +1 -1
  152. package/dist/ui-elements/command-palette.global.js +2 -2
  153. package/dist/ui-elements/comment-thread.global.js +1 -1
  154. package/dist/ui-elements/consent-banner.global.js +1 -1
  155. package/dist/ui-elements/context-menu.global.js +1 -1
  156. package/dist/ui-elements/date-range.global.js +12 -12
  157. package/dist/ui-elements/drawer.global.js +1 -1
  158. package/dist/ui-elements/dropdown.global.js +1 -1
  159. package/dist/ui-elements/entry-grid.global.js +3 -1
  160. package/dist/ui-elements/glyphs.global.js +1 -1
  161. package/dist/ui-elements/image-crop.global.js +8 -8
  162. package/dist/ui-elements/inline-edit.global.js +1 -1
  163. package/dist/ui-elements/kanban.global.js +1 -1
  164. package/dist/ui-elements/lead-popup.global.js +50 -50
  165. package/dist/ui-elements/lightbox.global.js +1 -1
  166. package/dist/ui-elements/markdown.global.js +1 -1
  167. package/dist/ui-elements/org-tree.global.js +1 -1
  168. package/dist/ui-elements/phone.global.js +9 -9
  169. package/dist/ui-elements/popover.global.js +1 -1
  170. package/dist/ui-elements/saved-views.global.js +1 -1
  171. package/dist/ui-elements/select-chips.global.js +2 -2
  172. package/dist/ui-elements/select-recents.global.js +1 -1
  173. package/dist/ui-elements/select-search.global.js +1 -1
  174. package/dist/ui-elements/slider.global.js +13 -13
  175. package/dist/ui-elements/sortable.global.js +1 -1
  176. package/dist/ui-elements/status-icon.global.js +1 -1
  177. package/dist/ui-elements/timepicker.global.js +4 -4
  178. package/dist/ui-elements/tour.global.js +1 -1
  179. package/dist/ui-elements/tree.global.js +1 -1
  180. package/dist/ui-elements/wizard.global.js +1 -1
  181. package/dist/ui-elements.global.js +21 -21
  182. package/dist/ui-elements.js +1 -1
  183. package/dist/ui-file-viewer.global.js +11 -11
  184. package/dist/ui-file-viewer.js +1 -1
  185. package/dist/ui-lead-popup.global.js +1 -1
  186. package/dist/ui-rich-text.global.js +8 -8
  187. package/dist/ui-rich-text.js +8 -8
  188. package/dist/ui-tour.global.js +1 -1
  189. package/dist/wizard.g-DOZSBUc5.js +1 -0
  190. package/package.json +11 -6
  191. package/types/WuiCarousel.d.ts +0 -8
  192. package/types/WuiChart.d.ts +1 -1
  193. package/types/WuiCommentThread.d.ts +1 -1
  194. package/types/WuiDrawer.d.ts +1 -1
  195. package/types/WuiEntryGrid.d.ts +5 -2
  196. package/types/WuiMentionInput.d.ts +0 -10
  197. package/types/WuiTour.d.ts +1 -12
  198. package/types/avatarPicker.d.ts +0 -13
  199. package/types/calendarMath.d.ts +0 -2
  200. package/types/chartAdapter.d.ts +1 -0
  201. package/types/chartSpec.d.ts +0 -4
  202. package/types/commentText.d.ts +0 -35
  203. package/types/dataTable.d.ts +6 -8
  204. package/types/elements/comment-thread.d.ts +2 -2
  205. package/types/elements/data-table.d.ts +1 -1
  206. package/types/elements/inline-edit.d.ts +2 -2
  207. package/types/elements/mention-input.d.ts +2 -2
  208. package/types/formatters.d.ts +15 -3
  209. package/types/global/core.d.ts +8 -7
  210. package/types/global/shared.d.ts +6 -0
  211. package/types/helpers.d.ts +9 -9
  212. package/types/inlineEditText.d.ts +0 -14
  213. package/types/kanbanModel.d.ts +0 -32
  214. package/types/notificationDays.d.ts +0 -19
  215. package/types/passwordRules.d.ts +0 -2
  216. package/types/server/drawerDiscard.d.ts +0 -5
  217. package/types/server/index.d.ts +3 -3
  218. package/types/server/remoteModal.d.ts +7 -5
  219. package/types/server/serverActions.d.ts +0 -9
  220. package/types/server/serverTable.d.ts +0 -11
  221. package/types/server/unsavedChanges.d.ts +0 -6
  222. package/types/shortcutKeys.d.ts +3 -3
  223. package/types/tableSelect.d.ts +0 -2
  224. package/types/text/index.d.ts +8 -0
  225. package/types/text/textStore.d.ts +19 -0
  226. package/types/text/web/accountSwitcher.g.d.ts +4 -0
  227. package/types/text/web/alert.g.d.ts +4 -0
  228. package/types/text/web/asyncBlock.g.d.ts +7 -0
  229. package/types/text/web/avatar.g.d.ts +4 -0
  230. package/types/text/web/avatarGroup.g.d.ts +4 -0
  231. package/types/text/web/banner.g.d.ts +4 -0
  232. package/types/text/web/breadcrumbs.g.d.ts +4 -0
  233. package/types/text/web/calendar.g.d.ts +20 -0
  234. package/types/text/web/card.g.d.ts +4 -0
  235. package/types/text/web/carousel.g.d.ts +13 -0
  236. package/types/text/web/catalogue.g.d.ts +266 -0
  237. package/types/text/web/chart.g.d.ts +102 -0
  238. package/types/text/web/chartCard.g.d.ts +13 -0
  239. package/types/text/web/check.g.d.ts +4 -0
  240. package/types/text/web/checkbox.g.d.ts +4 -0
  241. package/types/text/web/chip.g.d.ts +5 -0
  242. package/types/text/web/chipGroup.g.d.ts +4 -0
  243. package/types/text/web/choiceCard.g.d.ts +4 -0
  244. package/types/text/web/choiceChip.g.d.ts +4 -0
  245. package/types/text/web/codeBlock.g.d.ts +6 -0
  246. package/types/text/web/colourField.g.d.ts +7 -0
  247. package/types/text/web/columnMenu.g.d.ts +4 -0
  248. package/types/text/web/commandPalette.g.d.ts +12 -0
  249. package/types/text/web/commentThread.g.d.ts +35 -0
  250. package/types/text/web/compareTable.g.d.ts +7 -0
  251. package/types/text/web/confirmDialog.g.d.ts +10 -0
  252. package/types/text/web/confirmProvider.g.d.ts +4 -0
  253. package/types/text/web/consentBanner.g.d.ts +18 -0
  254. package/types/text/web/contextMenu.g.d.ts +5 -0
  255. package/types/text/web/copyButton.g.d.ts +5 -0
  256. package/types/text/web/customRule.g.d.ts +4 -0
  257. package/types/text/web/dataTable.g.d.ts +31 -0
  258. package/types/text/web/datePicker.g.d.ts +16 -0
  259. package/types/text/web/dateRangePicker.g.d.ts +22 -0
  260. package/types/text/web/drawer.g.d.ts +9 -0
  261. package/types/text/web/dropZone.g.d.ts +8 -0
  262. package/types/text/web/dropdown.g.d.ts +7 -0
  263. package/types/text/web/dueDate.g.d.ts +10 -0
  264. package/types/text/web/entryGrid.g.d.ts +16 -0
  265. package/types/text/web/errorBoundary.g.d.ts +4 -0
  266. package/types/text/web/errorSummary.g.d.ts +5 -0
  267. package/types/text/web/field.g.d.ts +4 -0
  268. package/types/text/web/fileAttachment.g.d.ts +18 -0
  269. package/types/text/web/filePicker.g.d.ts +20 -0
  270. package/types/text/web/fileValidation.g.d.ts +15 -0
  271. package/types/text/web/fileViewer.g.d.ts +55 -0
  272. package/types/text/web/filterBar.g.d.ts +15 -0
  273. package/types/text/web/floatingDock.g.d.ts +4 -0
  274. package/types/text/web/formatters.g.d.ts +49 -0
  275. package/types/text/web/formulaSteps.g.d.ts +9 -0
  276. package/types/text/web/hoverCard.g.d.ts +4 -0
  277. package/types/text/web/httpFailure.g.d.ts +4 -0
  278. package/types/text/web/imageCrop.g.d.ts +18 -0
  279. package/types/text/web/imagePicker.g.d.ts +22 -0
  280. package/types/text/web/index.g.d.ts +132 -0
  281. package/types/text/web/infoTip.g.d.ts +4 -0
  282. package/types/text/web/inlineEdit.g.d.ts +12 -0
  283. package/types/text/web/input.g.d.ts +11 -0
  284. package/types/text/web/inputMask.g.d.ts +12 -0
  285. package/types/text/web/kanban.g.d.ts +33 -0
  286. package/types/text/web/kbd.g.d.ts +6 -0
  287. package/types/text/web/kpiTile.g.d.ts +4 -0
  288. package/types/text/web/labelHelp.g.d.ts +4 -0
  289. package/types/text/web/leadPopup.g.d.ts +23 -0
  290. package/types/text/web/lightbox.g.d.ts +12 -0
  291. package/types/text/web/mentionInput.g.d.ts +11 -0
  292. package/types/text/web/modal.g.d.ts +14 -0
  293. package/types/text/web/modalCardRenderer.g.d.ts +5 -0
  294. package/types/text/web/modalContent.g.d.ts +4 -0
  295. package/types/text/web/modalForm.g.d.ts +5 -0
  296. package/types/text/web/navigationMenu.g.d.ts +4 -0
  297. package/types/text/web/notificationCentre.g.d.ts +24 -0
  298. package/types/text/web/numberInput.g.d.ts +7 -0
  299. package/types/text/web/onboardingChecklist.g.d.ts +10 -0
  300. package/types/text/web/orgTree.g.d.ts +10 -0
  301. package/types/text/web/otpInput.g.d.ts +5 -0
  302. package/types/text/web/overflow.g.d.ts +4 -0
  303. package/types/text/web/pageHeader.g.d.ts +5 -0
  304. package/types/text/web/passwordRules.g.d.ts +11 -0
  305. package/types/text/web/periodPicker.g.d.ts +13 -0
  306. package/types/text/web/person.g.d.ts +4 -0
  307. package/types/text/web/phone.g.d.ts +12 -0
  308. package/types/text/web/phoneNumberInput.g.d.ts +6 -0
  309. package/types/text/web/pricingCard.g.d.ts +4 -0
  310. package/types/text/web/qrCode.g.d.ts +4 -0
  311. package/types/text/web/radio.g.d.ts +4 -0
  312. package/types/text/web/radioGroup.g.d.ts +5 -0
  313. package/types/text/web/rating.g.d.ts +8 -0
  314. package/types/text/web/recordPager.g.d.ts +6 -0
  315. package/types/text/web/relativeTime.g.d.ts +16 -0
  316. package/types/text/web/repeater.g.d.ts +5 -0
  317. package/types/text/web/richText.g.d.ts +25 -0
  318. package/types/text/web/routeError.g.d.ts +12 -0
  319. package/types/text/web/rowActions.g.d.ts +4 -0
  320. package/types/text/web/rowDrop.g.d.ts +5 -0
  321. package/types/text/web/savedViews.g.d.ts +19 -0
  322. package/types/text/web/scoreScale.g.d.ts +4 -0
  323. package/types/text/web/search.g.d.ts +6 -0
  324. package/types/text/web/sectionLeadCapture.g.d.ts +12 -0
  325. package/types/text/web/segmented.g.d.ts +4 -0
  326. package/types/text/web/select.g.d.ts +26 -0
  327. package/types/text/web/shell.g.d.ts +36 -0
  328. package/types/text/web/shortcutKeys.g.d.ts +10 -0
  329. package/types/text/web/showMore.g.d.ts +5 -0
  330. package/types/text/web/skeletonShapes.g.d.ts +4 -0
  331. package/types/text/web/slider.g.d.ts +9 -0
  332. package/types/text/web/sortable.g.d.ts +12 -0
  333. package/types/text/web/sortableList.g.d.ts +4 -0
  334. package/types/text/web/sparkline.g.d.ts +7 -0
  335. package/types/text/web/spinner.g.d.ts +4 -0
  336. package/types/text/web/splash.g.d.ts +4 -0
  337. package/types/text/web/splitButton.g.d.ts +4 -0
  338. package/types/text/web/splitView.g.d.ts +19 -0
  339. package/types/text/web/stepper.g.d.ts +5 -0
  340. package/types/text/web/switch.g.d.ts +4 -0
  341. package/types/text/web/tablePagination.g.d.ts +11 -0
  342. package/types/text/web/tableRows.g.d.ts +4 -0
  343. package/types/text/web/tableSelect.g.d.ts +5 -0
  344. package/types/text/web/tableToolbar.g.d.ts +8 -0
  345. package/types/text/web/tabs.g.d.ts +6 -0
  346. package/types/text/web/textarea.g.d.ts +5 -0
  347. package/types/text/web/themeToggle.g.d.ts +10 -0
  348. package/types/text/web/timePicker.g.d.ts +15 -0
  349. package/types/text/web/timeline.g.d.ts +4 -0
  350. package/types/text/web/toast.g.d.ts +9 -0
  351. package/types/text/web/tour.g.d.ts +12 -0
  352. package/types/text/web/tourAdvance.g.d.ts +4 -0
  353. package/types/text/web/tree.g.d.ts +5 -0
  354. package/types/text/web/unsavedChanges.g.d.ts +6 -0
  355. package/types/text/web/updateBar.g.d.ts +6 -0
  356. package/types/text/web/value.g.d.ts +4 -0
  357. package/types/text/web/whatsNew.g.d.ts +7 -0
  358. package/types/text/web/wizard.g.d.ts +16 -0
  359. package/types/text/web/workspaceSwitcher.g.d.ts +8 -0
  360. package/dist/WuiCarousel-BdhJLo1m.js +0 -1
  361. package/dist/WuiCodeBlock-7O514Hqe.js +0 -1
  362. package/dist/WuiCommandPalette-rVScJ2Hy.js +0 -2
  363. package/dist/WuiCommentThread-Bkb78uhy.js +0 -1
  364. package/dist/WuiConsentBanner-Bm7tT3_5.js +0 -1
  365. package/dist/WuiContextMenu-Fc9WCgM8.js +0 -1
  366. package/dist/WuiDataTable-Bb5hxTfn.js +0 -1
  367. package/dist/WuiDatePicker-D7tOu4kV.js +0 -31
  368. package/dist/WuiDateRange-D0pzZeUU.js +0 -25
  369. package/dist/WuiDrawer-BKNcc0WX.js +0 -1
  370. package/dist/WuiEntryGrid-DCVSZuPc.js +0 -1
  371. package/dist/WuiImageCrop-ChvH8GKb.js +0 -17
  372. package/dist/WuiInlineEdit-DwnXChDc.js +0 -1
  373. package/dist/WuiLeadPopup-BmZG0Fk_.js +0 -382
  374. package/dist/WuiLightbox-hw48EjHj.js +0 -1
  375. package/dist/WuiMentionInput-BCXdub58.js +0 -1
  376. package/dist/WuiNotificationCenter-BRomMzI2.js +0 -1
  377. package/dist/WuiOrgTree-DzeLFQxy.js +0 -1
  378. package/dist/WuiOverflow-CV5y5zkM.js +0 -1
  379. package/dist/WuiPhone-BKxBok5L.js +0 -16
  380. package/dist/WuiRecordPager-7HVGoFlP.js +0 -1
  381. package/dist/WuiSavedViews-CdjavvPC.js +0 -1
  382. package/dist/WuiSelect-CKfM5kWG.js +0 -9
  383. package/dist/WuiShortcuts-Wiv_zufK.js +0 -1
  384. package/dist/WuiShowMore-CvdNQXrA.js +0 -1
  385. package/dist/WuiSlider-Cz5-zWC7.js +0 -51
  386. package/dist/WuiSortable-CBLMNRuZ.js +0 -1
  387. package/dist/WuiTimePicker-DAS2sxSH.js +0 -9
  388. package/dist/WuiTour-CAVM3O8-.js +0 -1
  389. package/dist/WuiTree-BPT9EZuw.js +0 -1
  390. package/dist/WuiWizardStep-Cencr-mT.js +0 -1
  391. package/dist/calendarMath-D6UUgYTD.js +0 -1
  392. package/dist/chips-DjccCG3b.js +0 -2
  393. package/dist/commentText-BnX7rA2-.js +0 -1
  394. package/dist/country-x5lqC5Xu.js +0 -1
  395. package/dist/customRule-Chp7YwFb.js +0 -1
  396. package/dist/dataTable-CcH1lBIM.js +0 -1
  397. package/dist/drawerDiscard-C1We4r_2.js +0 -1
  398. package/dist/fileViewerImage-CVHV1fBb.js +0 -3
  399. package/dist/fileViewerMedia-DGnbWDXP.js +0 -1
  400. package/dist/fileViewerPdf-BxoLE4hd.js +0 -20
  401. package/dist/fileViewerUi-2ZoK9uX0.js +0 -1
  402. package/dist/formatters-ljfITOZ3.js +0 -1
  403. package/dist/iconGlyphs.g-DPqoOoXy.js +0 -1
  404. package/dist/inlineEditText-CDptpqmI.js +0 -1
  405. package/dist/kanban-CDaks135.js +0 -1
  406. package/dist/kanbanModel-BaT75e-b.js +0 -1
  407. package/dist/nativeOverlay-BsVSWs1q.js +0 -1
  408. package/dist/notificationDays-BIWczft0.js +0 -1
  409. package/dist/recents-Dcw-b5cB.js +0 -1
  410. package/dist/relativeTime-BahImc8F.js +0 -1
  411. package/dist/search-Du-vK_9z.js +0 -1
  412. package/dist/shortcutKeys-COVLox98.js +0 -1
  413. package/dist/themeTransition-Dt7Br1QT.js +0 -1
  414. package/dist/zone-BR02ZkHF.js +0 -1
@@ -1,34 +1,34 @@
1
- var WeborityUiElements=(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=Object.defineProperty,n=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},r=n({defineElement:()=>i});function i(e,t){if(typeof customElements>`u`||customElements.get(e))return;let n=[];if(typeof document<`u`)for(let r of document.querySelectorAll(e))for(let i of Object.keys(r)){let a=Object.getOwnPropertyDescriptor(t.prototype,i);if(a&&(a.set||a.get)&&(n.push([r,i,Reflect.get(r,i)]),!Reflect.deleteProperty(r,i)))throw Error(`defineElement: could not clear the early "${i}" property on <${e}>.`)}customElements.define(e,t);for(let[t,r,i]of n)if(!Reflect.set(t,r,i))throw Error(`defineElement: could not restore the "${r}" property on <${e}>.`)}var a=n({ElementBase:()=>s,NO_DOM_MESSAGE:()=>o}),o=`@webority/ui-elements needs a browser DOM; import its types or helpers entry on the server`;if(typeof HTMLElement>`u`)throw Error(o);var s=HTMLElement,c=n({anchorOverlay:()=>x,bindReanchor:()=>S,unbindReanchor:()=>C}),l=4,u=8,d=300,f=400;function p(e,t){let n=t.offsetWidth,r=t.offsetHeight,i=e.right+l+n>window.innerWidth-l,a=i?e.left-l-n:e.right+l;t.style.left=`${Math.max(l,a)}px`,t.style.top=`${Math.max(l,Math.min(e.top,window.innerHeight-r-l))}px`,t.dataset.side=i?`start`:`end`}var m=8,h={top:`bottom`,bottom:`top`,start:`end`,end:`start`},g=[`bottom`,`top`,`end`,`start`];function _(e,t){return e===`bottom`?window.innerHeight-t.bottom:e===`top`?t.top:e===`end`?window.innerWidth-t.right:t.left}function v(e,t,n,r){return e===`start`?t:e===`end`?n-r:t+(n-t-r)/2}function y(e,t,n){return Math.max(m,Math.min(e,t-n-m))}function b(e,t,n,r){let i=r.gap??l,a=r.align??`start`,o=t.offsetWidth,s=t.offsetHeight,c=n===`auto`?g.reduce((t,n)=>_(n,e)>_(t,e)?n:t):n,u=c===`top`||c===`bottom`,d=(u?s:o)+i,f=_(c,e)<d&&_(h[c],e)>_(c,e)?h[c]:c,p,m;if(u){m=f===`bottom`?e.bottom+i:Math.max(l,e.top-s-i);let t=v(a,e.left,e.right,o);r.flipAlign&&a===`start`&&t+o>window.innerWidth-l&&e.right-o>=l?t=e.right-o:r.flipAlign&&a===`end`&&t<l&&e.left+o<=window.innerWidth-l&&(t=e.left),p=Math.max(l,Math.min(t,window.innerWidth-o-l))}else p=Math.max(l,f===`end`?e.right+i:e.left-o-i),m=Math.max(l,Math.min(v(a,e.top,e.bottom,s),window.innerHeight-s-l));t.style.left=`${p}px`,t.style.top=`${m}px`,t.dataset.side=f;let b=r.arrow;if(b){if(u){let t=(e.left+e.right)/2-p-b.offsetWidth/2;b.style.left=`${y(t,o,b.offsetWidth)}px`}else{let t=(e.top+e.bottom)/2-m-b.offsetHeight/2;b.style.top=`${y(t,s,b.offsetHeight)}px`}}}function x(e,t,n={}){if(!e)throw Error(`anchorOverlay: missing trigger`);if(!t)throw Error(`anchorOverlay: missing panel`);t.style.position=`fixed`;let r=e.getBoundingClientRect();if(n.beside){p(r,t);return}if(n.side!==void 0){t.classList.remove(`drop-up`),t.style.maxHeight=``,b(r,t,n.side,n);return}let i=n.clampHeight?t.scrollTop:0;n.clampHeight&&(t.style.maxHeight=``);let a=t.offsetHeight,o=window.innerHeight-r.bottom,s=!n.below&&o<a+l&&r.top>o;if(t.classList.toggle(`drop-up`,s),t.style.top=s?`${Math.max(l,r.top-a-l)}px`:`${r.bottom+l}px`,n.clampHeight){let e=s?r.top-8:window.innerHeight-r.bottom-8;e<a&&(t.style.maxHeight=`${Math.max(e,0)}px`),t.scrollTop=i}n.matchWidth&&(r.width>=d?(t.style.minWidth=`${r.width}px`,t.style.width=`${r.width}px`,t.style.maxWidth=`${r.width}px`):(t.style.minWidth=`${r.width}px`,t.style.width=`max-content`,t.style.maxWidth=`${Math.min(f,window.innerWidth-8)}px`));let c=t.offsetWidth;if(n.alignEnd){let e=r.right-c,n=e>=u?e:r.left,i=Math.max(u,Math.min(n,window.innerWidth-c-u));t.style.left=`${i}px`}else{let e=n.flipAlign&&r.left+c>window.innerWidth-l&&r.right-c>=l,i=Math.min(e?r.right-c:r.left,window.innerWidth-c-l);t.style.left=`${Math.max(l,i)}px`}}function S(e,t){C(e),e._reanchor=t,e._reanchorScroll=n=>{n.composedPath().includes(e)||t()},window.addEventListener(`resize`,e._reanchor),window.addEventListener(`scroll`,e._reanchorScroll,!0)}function C(e){if(!e?._reanchor)return;window.removeEventListener(`resize`,e._reanchor);let t=e._reanchorScroll;t&&window.removeEventListener(`scroll`,t,!0),e._reanchor=null,e._reanchorScroll=null}var w=n({CLOSE_MOTION_LIMIT_MS:()=>400,CLOSING_ATTRIBUTE:()=>D,DISMISS_ATTRIBUTE:()=>E,OPEN_ATTRIBUTE:()=>T,closeAnchoredPopover:()=>j,closeModalDialog:()=>Ce,isPopoverOpen:()=>M,onOverlayRootChange:()=>Oe,openAnchoredPopover:()=>A,openModalDialog:()=>Se,overlayRoot:()=>De,raisePopover:()=>Te,returnFocus:()=>ye,setPopoverOpen:()=>we,wireOpenTriggers:()=>ke}),T=`data-wui-open`,E=`data-wui-dismiss`,D=`data-wui-closing`,ee=`[${E}]`,O=`[${T}]`,te=`(prefers-reduced-motion: reduce)`,ne=`a[href],button:not([disabled]),input:not([disabled]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex="-1"])`,re=400,ie=new WeakSet,ae=new WeakSet,oe=new WeakSet,se=Symbol.for(`webority.ui.modal-stack`),ce=Symbol.for(`webority.ui.root-watches`);function le(e){let t=e;return t[ce]??=new Set,t[ce]}var ue=new WeakMap,de=new WeakMap,fe=new WeakMap;function pe(e){let t=e.querySelector(`[data-autofocus]`);if(t)return t;let n=null;for(let t of e.querySelectorAll(ne))if(!t.closest(`[hidden],[inert]`)){if(!t.closest(`${ee},.wui-modal-back`))return t;n??=t}return n}function me(e){return e.localName.includes(`-`)&&`show`in e&&typeof e.show==`function`}function he(e){let t=e;return t[se]??=[],t[se]}function k(e){ge(e),he(e.ownerDocument).push(e)}function ge(e){let t=he(e.ownerDocument),n=t.indexOf(e);n>=0&&t.splice(n,1)}function _e(e){for(let t of le(e)){let n=De(e);t.last!==n&&(t.last=n,t.listener(n))}}function ve(e){let t=Promise.allSettled(e.getAnimations().map(e=>e.finished));return new Promise(e=>{let n=window.setTimeout(e,400);t.then(()=>{window.clearTimeout(n),e()})})}function ye(e,t){if(!e?.isConnected)return;let n=e.ownerDocument.activeElement;(!n||n===e.ownerDocument.body||t.contains(n))&&e.focus()}function be(e){let t=e.getBoundingClientRect();return t.bottom<0||t.right<0||t.top>window.innerHeight||t.left>window.innerWidth}function xe(e,t){fe.get(e)?.();let n=t.ownerDocument,r=0,i=()=>{window.clearTimeout(o),window.clearTimeout(r),n.removeEventListener(`pointerdown`,i,!0),n.removeEventListener(`keydown`,i,!0),t.removeEventListener(`click`,a,!0),fe.delete(e)},a=()=>{t.removeEventListener(`click`,a,!0),r=window.setTimeout(i,0)},o=window.setTimeout(i,re);n.addEventListener(`pointerdown`,i,!0),n.addEventListener(`keydown`,i,!0),t.addEventListener(`click`,a,!0),fe.set(e,i)}function Se(e,t){let n=t.focus===`first-control`?pe(e):null,r=n??e,i=r===e&&!e.hasAttribute(`tabindex`);i&&e.setAttribute(`tabindex`,`-1`);let a=!t.escape&&!e.hasAttribute(`closedby`);a&&e.setAttribute(`closedby`,`none`),ie.add(e);let o=()=>{if(k(e),!e.hasAttribute(`open`)){let t=n!==null&&!e.querySelector(`[autofocus]`);t&&n.setAttribute(`autofocus`,``);try{e.showModal()}catch(t){throw ge(e),t}finally{t&&n.removeAttribute(`autofocus`)}}r.focus(),_e(e.ownerDocument)},s=!1,c=n=>{if(n.key!==`Escape`||n.defaultPrevented||!t.escape||n.altKey||n.ctrlKey||n.metaKey)return;let r=e.ownerDocument;De(r)===e&&(e.querySelector(`:popover-open`)||r.querySelector(`[popover=""]:popover-open, [popover="auto"]:popover-open`)||(s=!0,window.setTimeout(()=>{s&&ie.has(e)&&e.open&&(s=!1,t.onRequestClose(`escape`))},0)))},l=e=>{s=!1,e.preventDefault(),t.escape&&t.onRequestClose(`escape`)},u=n=>{let r=n.target;if(!(r instanceof Element))return;let i=r.closest(ee);if(i&&i.closest(`dialog`)===e){t.onRequestClose(`dismiss`);return}if(r!==e||!t.backdrop)return;let a=e.getBoundingClientRect();(n.clientX<a.left||n.clientX>a.right||n.clientY<a.top||n.clientY>a.bottom)&&t.onRequestClose(`backdrop`)},d=()=>{let n=s;s=!1,ge(e),ie.has(e)?(o(),n&&t.onRequestClose(`escape`)):_e(e.ownerDocument)},f=e.ownerDocument;return f.addEventListener(`keydown`,c),e.addEventListener(`cancel`,l),e.addEventListener(`click`,u),e.addEventListener(`close`,d),o(),()=>{f.removeEventListener(`keydown`,c),e.removeEventListener(`cancel`,l),e.removeEventListener(`click`,u),e.removeEventListener(`close`,d),ie.delete(e),i&&e.removeAttribute(`tabindex`),a&&e.removeAttribute(`closedby`),ge(e),_e(e.ownerDocument)}}async function Ce(e){ie.delete(e),e.setAttribute(D,``),!window.matchMedia(te).matches&&typeof e.getAnimations==`function`&&e.getAnimations().length>0&&await ve(e),e.close(),ge(e),_e(e.ownerDocument),e.removeAttribute(D)}function A(e,t,n){let r=fe.get(t);if(r){r();return}ue.get(t)?.(),t.setAttribute(`popover`,n.mode),t.showPopover();let i=()=>x(e,t,n);try{i()}catch(e){throw j(t),e}S(t,()=>{!M(t)||!t.isConnected?de.get(t)?.():e.isConnected&&n.scrollSettling?.()?i():!e.isConnected||!n.keepOffscreen&&be(e)?j(t):i()});let a=e=>{`newState`in e&&e.newState===`closed`&&de.get(t)?.()},o=()=>{n.mode===`auto`&&M(t)&&xe(t,e)};t.addEventListener(`toggle`,a),e.addEventListener(`pointerdown`,o,!0),ue.set(t,()=>{t.removeEventListener(`toggle`,a),e.removeEventListener(`pointerdown`,o,!0),C(t),ue.delete(t),de.delete(t)}),de.set(t,()=>{ue.get(t)?.(),n.onClosed?.()})}function j(e){M(e)&&e.hidePopover(),de.get(e)?.()}function M(e){return e.matches(`:popover-open`)}function we(e,t){Ee(e),M(e)!==t&&(t?e.showPopover():e.hidePopover())}function Te(e){if(Ee(e),!e.isConnected)throw Error(`nativeOverlay: raisePopover was given a panel that is not on the page; a caller whose overlay root can leave the page skips the raise until the panel moves to the new root`);e.hidePopover(),e.showPopover()}function Ee(e){if(!e.hasAttribute(`popover`))throw Error(`nativeOverlay: the panel has no popover attribute`)}function De(e=document){let t=he(e);for(let e=t.length-1;e>=0;e--){let n=t[e];if(n?.isConnected&&n.hasAttribute(`open`))return n}return e.body}function Oe(e,t=document){ae.has(t)||(ae.add(t),t.addEventListener(`toggle`,()=>_e(t),!0),t.addEventListener(`close`,()=>_e(t),!0));let n={last:De(t),listener:e};return le(t).add(n),()=>{le(t).delete(n)}}function ke(e){oe.has(e)||(oe.add(e),e.addEventListener(`click`,t=>{let n=t.target,r=n instanceof Element?n.closest(O):null;if(!(r instanceof HTMLElement))return;let i=(r.getAttribute(`data-wui-open`)??``).replace(/^#/,``),a=e.getElementById(i);if(!a)throw Error(`[data-wui-open] names #${i}, which is not on the page.`);me(a)&&(t.preventDefault(),a.show(r))}))}var Ae=n({closestOf:()=>P,elementOf:()=>je,must:()=>N});function N(e,t){if(e==null)throw Error(t);return e}function je(e,t,n){if(!(e instanceof t))throw TypeError(n);return e}function P(e,t){return e instanceof Element?e.closest(t):null}var Me=`data-wui-shortcuts`,Ne=`data-shortcut-scope`,Pe=`wui:shortcut`,Fe={title:`Keyboard shortcuts`,close:`Close`,help:`Show these shortcuts`},Ie=[{key:`J`,label:`Next item`},{key:`K`,label:`Previous item`},{key:`Enter`,label:`Open the item`}],Le={key:`X`,label:`Select the item`},Re={"/":`slash`,"?":`help`,Escape:`esc`,Esc:`esc`,Enter:`enter`},ze={esc:`Esc`,escape:`Esc`,enter:`Enter`,slash:`/`,help:`?`},Be={esc:`Escape`,ctrl:`Control`,cmd:`Meta`,option:`Alt`,opt:`Alt`},Ve=new Set([`checkbox`,`radio`,`button`,`submit`,`reset`,`range`,`color`,`file`,`image`]),He=new Set([`textbox`,`searchbox`,`combobox`]),Ue=`a[href], button, summary, input, select, textarea, [role="button"], [role="link"], [role="menuitem"], [role="option"], [role="tab"], [role="checkbox"], [role="switch"]`;function We(e){if(!e||e.ctrlKey||e.metaKey||e.altKey)return null;let t=e.key;return typeof t!=`string`||!t?null:Re[t]?Re[t]:t.length===1&&t.trim()?t.toLowerCase():null}function Ge(e){let t=String(e??``).trim();return t.length===1?t.toUpperCase():ze[t.toLowerCase()]??t}function Ke(e){return String(e??``).trim().split(/\s+/).filter(Boolean).map(e=>Be[e.toLowerCase()]??(e.length===1?e.toUpperCase():e)).join(`+`)}function qe(e){if(!e||!Je(e))return!1;if(e instanceof HTMLElement&&e.isContentEditable||e.closest?.(`[contenteditable=""], [contenteditable="true"], [contenteditable="plaintext-only"]`)||e.tagName===`TEXTAREA`||e.tagName===`SELECT`)return!0;if(e.tagName===`INPUT`){let t=e instanceof HTMLInputElement&&e.type?e.type:`text`;return!Ve.has(t.toLowerCase())}return He.has(e.getAttribute?.(`role`))}function Je(e){return e.nodeType===1}function Ye(e=typeof document>`u`?null:document){return e?.documentElement?.getAttribute(Me)===`off`}function Xe(e,t){if(!t||e&&t.contains(e))return!0;let n=t.ownerDocument;return(!e||e===n.body||e===n.documentElement)&&n.querySelector(`[data-shortcut-scope]`)===t}function Ze(e,t,n=null){let r=e.target instanceof Node?e.target:null;if(!t||e.defaultPrevented||Ye(r?.ownerDocument??void 0))return!1;let i=We(e);if(!i||!Xe(r,n)||qe(r))return!1;let a=t[i]??(i.length===1?t[i.toUpperCase()]:void 0);return typeof a!=`function`||i===`enter`&&r instanceof Element&&r.closest(Ue)?!1:(e.preventDefault(),a(e),!0)}function Qe(e,t){let n=e[0]?.ownerDocument;if(!n)return null;let r=n.activeElement,i=e.findIndex(e=>e===r||e.contains(r));if(i<0&&r&&r!==n.body){let t=r.closest?.(`li, tr`);t&&(i=e.findIndex(e=>t.contains(e)))}i<0&&(i=e.findIndex(e=>e.getAttribute(`aria-current`)===`true`));let a=N(e[i<0?t>0?0:e.length-1:Math.min(e.length-1,Math.max(0,i+t))],`moveFocus: no item at the clamped index`);return a.focus(),a.scrollIntoView?.({block:`nearest`}),a}var $e=2,et=`wui-filter-popover-pinned`,tt=`.wui-filter-popover-trigger`,nt=`.wui-filter-popover-panel`,rt=`.wui-filter-popover-head`,it=`input:not([type]),input[type="text"],input[type="search"]`,at=`a[href],button:not([disabled]),input:not([disabled]):not([type='hidden']),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex='-1'])`;function ot(){try{return sessionStorage.getItem(et)===`1`}catch{return!1}}function st(e){try{e?sessionStorage.setItem(et,`1`):sessionStorage.removeItem(et)}catch(e){if(!(e instanceof DOMException))throw e}}function ct(e){if(e===null||e instanceof Node)return e;throw TypeError(`event target is not a node`)}function lt(e,t){let n=e?.querySelector(t)??null;return n instanceof HTMLElement?n:null}var ut=class extends s{_doc;_timer;_sticky;_closingByCode;_inside;_pendingSubmit;_onEnter;_onLeave;_onClick;_onChange;_onListClose;_onFocusOut;_onKeyDown;_onShortcut;constructor(){super(),this._doc=null,this._timer=null,this._sticky=!1,this._closingByCode=!1,this._inside=!1,this._pendingSubmit=!1,this._onEnter=e=>{e.pointerType!==`touch`&&e.pointerType!==`pen`&&(this._inside=!0,this._schedule(!0))},this._onLeave=e=>{e.pointerType!==`touch`&&e.pointerType!==`pen`&&(this._inside=!1,this._schedule(!1))},this._onClick=e=>{this._trigger?.contains(ct(e.target))&&(this._clear(),this.isOpen&&this._sticky?this._close(!0):this._open(!0,e.detail===0))},this._onChange=e=>{let t=this._pin;if(t&&e.target===t){st(t.checked),t.checked?this._clear():this._schedule(!1);return}let n=e.target;if(n instanceof Element&&n.closest(`wui-select[mode="multiple"], wui-select[mode="tag"]`)?.querySelector(`[aria-expanded="true"]`)){this._pendingSubmit=!0;return}let r=this.closest(`form.wui-filter-form`);r instanceof HTMLFormElement&&r.requestSubmit()},this._onListClose=()=>{if(!this._pendingSubmit)return;this._pendingSubmit=!1;let e=this.closest(`form.wui-filter-form`);e instanceof HTMLFormElement&&e.requestSubmit()},this._onFocusOut=e=>{this.contains(ct(e.relatedTarget))||this._schedule(!1)},this._onKeyDown=e=>{let t=e.target;if(e.key!==`Enter`||!(t instanceof Element)||!this._panel?.contains(t)||!t.matches(it))return;e.preventDefault();let n=this.closest(`form.wui-filter-form`);n instanceof HTMLFormElement&&n.requestSubmit()},this._onShortcut=e=>{this.ownerDocument.querySelector(`wui-filter-popover`)===this&&Ze(e,{f:()=>this._open(!0,!0)})}}get isOpen(){let e=this._panel;return e?M(e):!1}connectedCallback(){this._doc=this.ownerDocument,this.addEventListener(`pointerenter`,this._onEnter),this.addEventListener(`pointerleave`,this._onLeave),this.addEventListener(`click`,this._onClick),this.addEventListener(`change`,this._onChange),this.addEventListener(`focusout`,this._onFocusOut),this.addEventListener(`keydown`,this._onKeyDown),this.addEventListener(`wui-select:close`,this._onListClose),this._doc.addEventListener(`keydown`,this._onShortcut),ot()&&this._pin&&(this._pin.checked=!0,this._open(!1,!1))}disconnectedCallback(){this._clear();let e=this._panel;e&&this._closeByCode(e),this.removeEventListener(`pointerenter`,this._onEnter),this.removeEventListener(`pointerleave`,this._onLeave),this.removeEventListener(`click`,this._onClick),this.removeEventListener(`change`,this._onChange),this.removeEventListener(`focusout`,this._onFocusOut),this.removeEventListener(`keydown`,this._onKeyDown),this.removeEventListener(`wui-select:close`,this._onListClose),this._doc?.removeEventListener(`keydown`,this._onShortcut),this._doc=null}get _trigger(){return lt(this,tt)}get _panel(){return lt(this,nt)}get _pin(){let e=this.querySelector(`${rt} input[type="checkbox"]`);return e instanceof HTMLInputElement?e:null}get _pinned(){return this._pin?.checked===!0}_clear(){this._timer!==null&&clearTimeout(this._timer),this._timer=null}_schedule(e){if(this._clear(),e){if(this.isOpen)return;this._timer=setTimeout(()=>{this._timer=null,this._open(!1,!1)},150)}else this.isOpen&&!this._stayOpen()&&(this._timer=setTimeout(()=>{this._timer=null,this._stayOpen()||this._close(!1)},400))}_stayOpen(){let e=this._panel;return e?this._pinned||this._inside||e.contains(this.ownerDocument.activeElement)||e.querySelector(`[aria-expanded="true"]`)!==null:!1}_open(e,t){this._clear();let n=this._panel,r=this._trigger;n&&r&&(this.isOpen?e&&(this._sticky=!0):(r.setAttribute(`aria-expanded`,`true`),this._sticky=e,A(r,n,{mode:`auto`,clampHeight:!0,alignEnd:!0,onClosed:()=>this._closed()})),t&&(lt(n.querySelector(`.wui-filter-popover-grid`),at)??lt(n,at))?.focus())}_close(e){this._clear();let t=this._panel;if(!t||!this.isOpen)return;let n=t.contains(this.ownerDocument.activeElement);this._closeByCode(t),e&&n&&this._trigger?.focus()}_closeByCode(e){this._closingByCode=!0;try{j(e)}finally{this._closingByCode=!1}}_closed(){if(this._trigger?.setAttribute(`aria-expanded`,`false`),this._sticky=!1,this._closingByCode)return;let e=this._trigger,t=this._panel,n=this.ownerDocument.activeElement;e&&(n===this.ownerDocument.body||t?.contains(n))&&e.focus()}};function dt(){i(`wui-filter-popover`,ut)}var ft=`INR`,pt=Object.freeze({INR:`₹`,USD:`$`,EUR:`€`,GBP:`£`,JPY:`¥`}),mt=e=>typeof e==`string`&&/^[A-Z]{3}$/.test(e),ht=(e=`INR`)=>pt[e]??`${e} `,gt=n({IST_OFFSET_MS:()=>_t,IST_TIME_ZONE:()=>F,isTimeZone:()=>bt,nowIn:()=>Dt,todayIn:()=>Et,wallClockOf:()=>Tt,wallToInstant:()=>Ct,zoneOffsetMs:()=>St,zoneParts:()=>xt}),F=`Asia/Kolkata`,_t=198e5,vt=new Map;function yt(e){let t=vt.get(e);return t||(t=new Intl.DateTimeFormat(`en-US`,{timeZone:e,hourCycle:`h23`,year:`numeric`,month:`2-digit`,day:`2-digit`,hour:`2-digit`,minute:`2-digit`,second:`2-digit`}),vt.set(e,t)),t}function bt(e){if(typeof e!=`string`||e===``)return!1;try{return yt(e),!0}catch{return!1}}function xt(e,t=F){if(t===`Asia/Kolkata`){let t=new Date(e+_t);return{year:t.getUTCFullYear(),month:t.getUTCMonth(),day:t.getUTCDate(),hour:t.getUTCHours(),minute:t.getUTCMinutes(),second:t.getUTCSeconds()}}let n=Object.fromEntries(yt(t).formatToParts(e).map(e=>[e.type,Number(e.value)]));return{year:Number(n.year),month:Number(n.month)-1,day:Number(n.day),hour:Number(n.hour)%24,minute:Number(n.minute),second:Number(n.second)}}function St(e,t=F){if(t===`Asia/Kolkata`)return _t;let n=xt(e,t),r=new Date(0);return r.setUTCFullYear(n.year,n.month,n.day),r.setUTCHours(n.hour,n.minute,n.second,0),r.getTime()-Math.floor(e/1e3)*1e3}function Ct(e,t=F){let n=e-St(e,t);return n=e-St(n,t),n}var wt=e=>e instanceof Date?e.getTime():e;function Tt(e,t=F){return new Date(e+St(e,t)).toISOString().slice(0,19)}function Et(e=F,t=Date.now()){return Tt(wt(t),e).slice(0,10)}function Dt(e=F,t=Date.now()){let n=wt(t);return new Date(n+St(n,e))}var Ot=n({CURRENCIES:()=>At,DATE_PATTERNS:()=>Nt,DURATION_UNITS:()=>Mt,EMPTY_VALUE:()=>`-`,FORMAT_STYLES:()=>kt,IST_OFFSET_MS:()=>_t,IST_TIME_ZONE:()=>F,MAX_DECIMALS:()=>20,MONEY_UNITS:()=>jt,compactFormatOf:()=>dn,formatCompact:()=>nn,formatCurrency:()=>en,formatDate:()=>I,formatDateTime:()=>fn,formatDayShort:()=>ln,formatDuration:()=>on,formatNumber:()=>$t,formatPercent:()=>rn,formatValue:()=>un,isMoneyUnit:()=>Pt,istParts:()=>cn,paiseToRupeeText:()=>Yt,timeZoneLabel:()=>hn,toInstant:()=>sn}),kt=[`number`,`currency`,`percent`,`compact`,`duration`,`date`],At=[`INR`,`USD`,`EUR`,`GBP`],jt=[`rupees`,`paise`],Mt=[`ms`,`s`,`min`,`h`],Nt=[`day`,`month`,`year`,`datetime`,`time`];function Pt(e){return jt.some(t=>t===e)}var Ft=`-`,It=`−`,Lt=[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`],Rt=(e,t)=>N(e[t],`no compact unit at index ${t}`),zt=[[1e7,`Cr`],[1e5,`L`],[1e3,`K`]],Bt=[[1e9,`B`],[1e6,`M`],[1e3,`K`]],Vt=e=>!e||e===`INR`?`en-IN`:`en-US`,Ht=(e,t)=>typeof e==`number`&&Number.isInteger(e)&&e>=0&&e<=20?e:t,Ut=new Map,Wt=(e,t=`en-IN`)=>{let n=`${t}:${e}`,r=Ut.get(n);return r||(r=new Intl.NumberFormat(t,{minimumFractionDigits:0,maximumFractionDigits:e}),Ut.set(n,r)),r},Gt=new Map,Kt=(e,t=`en-IN`)=>{let n=`${t}:${e}`,r=Gt.get(n);return r||(r=new Intl.NumberFormat(t,{minimumFractionDigits:e,maximumFractionDigits:e}),Gt.set(n,r)),r},qt=e=>typeof e==`number`&&Number.isFinite(e),Jt=e=>e<0&&!Object.is(Math.abs(e),0)?It:``;function Yt(e){if(!Number.isInteger(e))throw Error(`A paise amount must be a whole number, got ${e}`);let t=BigInt(Math.abs(e)).toString().padStart(3,`0`);return`${e<0?`-`:``}${t.slice(0,-2)}.${t.slice(-2)}`}var Xt=(e,t)=>t===`paise`?Number(Yt(e)):e,Zt=2,Qt=(e,t,n)=>{let r=Math.min(t,Zt),i=10n**BigInt(Zt-r),a=(BigInt(Yt(e).replace(`.`,``))+i/2n)/i,o=10n**BigInt(r),s=Kt(0,n).format(a/o);return t===0?s:`${s}.${(a%o).toString().padStart(r,`0`)}${`0`.repeat(t-r)}`};function $t(e,{decimals:t}={}){if(!qt(e))return`-`;let n=Wt(Ht(t,2)).format(Math.abs(e));return n===`0`?`0`:Jt(e)+n}function en(e,{unit:t=`rupees`,decimals:n,currency:r=`INR`}={}){if(!qt(e))return`-`;let i=Ht(n,0),a=Vt(r),o=t===`paise`?Qt(Math.abs(e),i,a):Kt(i,a).format(Math.abs(e));return(Number(o.replace(/,/g,``))===0?``:Jt(e))+ht(r)+o}var tn=e=>e>0&&e<.1?Math.min(20,1-Math.floor(Math.log10(e))):2;function nn(e,{currency:t,unit:n=`rupees`}={}){if(!qt(e))return`-`;let r=t?Xt(e,n):e,i=t?ht(t):``,a=t?Vt(t):`en-IN`,o=a===`en-IN`?zt:Bt,s=Math.abs(r),c=o.findIndex(([e])=>s>=e);if(c===-1){let e=Wt(tn(s),a).format(s);if(e!==`1,000`)return(e===`0`?``:Jt(r))+i+e;c=o.length-1}let[l,u]=Rt(o,c),d=s/l,f=d>=100?0:d>=10?1:2,p=Number(d.toFixed(f));return p>=100&&c>0&&(--c,[l,u]=Rt(o,c),d=s/l,f=d>=100?0:d>=10?1:2,p=Number(d.toFixed(f))),`${Jt(r)}${i}${Wt(f,a).format(p)} ${u}`}function rn(e,{decimals:t}={}){return qt(e)?`${$t(e*100,{decimals:Ht(t,1)})}%`:`-`}var an={ms:1,s:1e3,min:6e4,h:36e5};function on(e,{unit:t=`s`}={}){if(!qt(e))return`-`;let n=an[t]??1e3,r=Math.abs(e*n),i=Jt(e);if(Math.round(r)<1e3)return`${i}${Wt(0).format(r)} ms`;let a=r/1e3;if(a<10)return`${i}${Wt(1).format(a)}s`;let o=Math.round(a);if(o<60)return`${i}${o}s`;let s=e=>String(e).padStart(2,`0`),c=Math.floor(o/60);if(c<60)return`${i}${c}m ${s(o%60)}s`;let l=Math.floor(c/60);return`${i}${Wt(0).format(l)}h ${s(c%60)}m`}function sn(e,t=F){if(e instanceof Date)return e.getTime();if(qt(e))return e;if(typeof e!=`string`)return NaN;let n=/^(\d{4})-(\d{2})-(\d{2})$/.exec(e.trim());if(n){let[e,r,i]=[Number(n[1]),Number(n[2]),Number(n[3])],a=new Date(Date.UTC(2e3,r-1,i));return a.setUTCFullYear(e),a.getUTCFullYear()===e&&a.getUTCMonth()===r-1&&a.getUTCDate()===i?Ct(a.getTime(),t):NaN}return Date.parse(e)}function cn(e,t=F){let{year:n,month:r,day:i,hour:a,minute:o}=xt(e,t);return{year:n,month:r,day:i,hour:a,minute:o}}function I(e,{pattern:t=`day`,timeZone:n=F}={}){let r=sn(e,n);if(!Number.isFinite(r))return`-`;let i=cn(r,n),a=e=>String(e).padStart(2,`0`),o=`${a(i.day)}-${Lt[i.month]}-${i.year}`,s=`${a(i.hour)}:${a(i.minute)}`;switch(t){case`month`:return`${Lt[i.month]}-${i.year}`;case`year`:return String(i.year);case`datetime`:return`${o} ${s}`;case`time`:return s;default:return o}}function ln(e,{timeZone:t=F}={}){let n=sn(e,t);if(!Number.isFinite(n))return`-`;let r=cn(n,t);return`${String(r.day).padStart(2,`0`)}-${Lt[r.month]}`}function un(e,t){if(e==null||e===``)return`-`;let n=t?.style;if(n===`date`)return I(e,t);if(typeof e!=`number`)return String(e);switch(n){case`currency`:return en(e,t);case`percent`:return rn(e,t);case`compact`:return nn(e,t);case`duration`:return on(e,t);default:return $t(e,t)}}function dn(e){let t=e?.style;return t===`currency`?{style:`compact`,currency:e?.currency??`INR`,unit:e?.unit}:!t||t===`number`?{style:`compact`}:e??{}}function fn(e,{timeZone:t=F}={}){let n=sn(e);if(!Number.isFinite(n))return`-`;let r=Object.fromEntries(mn(t).formatToParts(n).map(e=>[e.type,e.value])),i=r.dayPeriod;if(i===void 0)throw Error(`Intl returned no day period for a 12-hour clock`);return`${r.day}-${Lt[Number(r.month)-1]}-${r.year}, ${r.hour}:${r.minute} ${i.toUpperCase()}`}var pn=new Map;function mn(e){let t=pn.get(e);return t||(t=new Intl.DateTimeFormat(`en-IN`,{day:`2-digit`,month:`numeric`,year:`numeric`,hour:`numeric`,minute:`2-digit`,hour12:!0,timeZone:e}),pn.set(e,t)),t}function hn(e=F){return new Intl.DateTimeFormat(`en-IN`,{timeZone:e,timeZoneName:`short`}).formatToParts(new Date).find(e=>e.type===`timeZoneName`)?.value??e}var gn=n({COLUMN_MAX_WIDTH:()=>vn,COLUMN_MIN_WIDTH:()=>48,DATA_TABLE_TEXT:()=>L,PIN_AT_VAR:()=>Mn,PIN_SIDES:()=>xn,RESIZE_STEP:()=>10,RESIZE_STEP_LARGE:()=>50,ROW_HEIGHTS:()=>Cn,ROW_MOVE_LIMIT:()=>200,ROW_MOVE_MS:()=>220,ROW_SAVE_ATTR:()=>Gn,ROW_SAVE_ERROR_CLASS:()=>Kn,ROW_SAVE_STATES:()=>Wn,VIRTUAL_OVERSCAN:()=>8,clampColumnWidth:()=>Tn,groupCount:()=>wn,groupItems:()=>En,identityCell:()=>qn,measureRows:()=>Vn,pinAtValue:()=>Nn,pinClasses:()=>Fn,pinOffsetVar:()=>jn,planPins:()=>Pn,playRowMoves:()=>Hn,readColumnWidths:()=>kn,rowLabel:()=>Jn,rowOrderChanged:()=>Un,saveOutcomeText:()=>Zn,setRowSaveState:()=>Yn,settledRows:()=>Xn,virtualRange:()=>Dn,writeColumnWidths:()=>An}),_n=48,vn=1200,yn=10,bn=50,xn=[`start`,`end`],Sn=8,Cn={comfortable:72,cozy:48,compact:40},L={resize:e=>e?`Resize ${e} column`:`Resize column`,width:e=>`${e} pixels`,rows:e=>`${$t(e,{decimals:0})} ${e===1?`row`:`rows`}`,saved:e=>e?`${e} saved.`:`Row saved.`,savedMany:e=>`${$t(e,{decimals:0})} rows saved.`,notSaved:(e,t)=>`${e?`${e} was not saved.`:`Row was not saved.`}${t?` ${t}`:``}`},wn=e=>$t(e,{decimals:0}),Tn=e=>Math.min(vn,Math.max(48,Math.round(Number(e)||0)));function En(e,t,n=[]){let r=new Map(n.map(e=>[e,[]]));return e.forEach((e,n)=>{let i=t(e,n),a=r.get(i);a||(a=[],r.set(i,a)),a.push(e)}),[...r].filter(([,e])=>e.length>0).map(([e,t])=>({key:e,items:t}))}function Dn({scrollTop:e,viewport:t,rowHeight:n,count:r,overscan:i=8}){let a=n>0?n:Cn.comfortable,o=Math.floor(Math.max(0,e)/a),s=Math.max(0,o-i);s-=s%2;let c=Math.min(r,o+Math.ceil(Math.max(0,t)/a)+i),l=Math.min(s,c);return{start:l,end:c,before:l*a,after:Math.max(0,r-c)*a}}var On=e=>`wui-widths:${e}`;function kn(e){if(!e)return{};try{let t=JSON.parse(window.localStorage.getItem(On(e))||`{}`),n={};if(t&&typeof t==`object`)for(let[e,r]of Object.entries(t))Number.isFinite(r)&&(n[e]=Tn(r));return n}catch{return{}}}function An(e,t){if(e)try{Object.keys(t).length?window.localStorage.setItem(On(e),JSON.stringify(t)):window.localStorage.removeItem(On(e))}catch(e){if(!(e instanceof DOMException))throw e}}var jn=(e,t)=>`--wui-pin-${e}-${t}`,Mn=`--wui-pin-at`,Nn=(e,t)=>`var(${jn(e,t)}, 0px)`;function Pn(e){let t=e.map(()=>null),n=-1;e.forEach((e,t)=>{e===`start`&&(n=t)});let r=0;for(let i=0;i<=n;i++)(e[i]===`start`||e[i]===`lead`)&&(t[i]={side:`start`,ordinal:r++,edge:!1});let i=t[n];i&&(i.edge=!0);let a=-1;r=0;for(let n=e.length-1;n>=0;n--)e[n]===`end`&&(t[n]={side:`end`,ordinal:r++,edge:!1},a=n);let o=t[a];return o&&(o.edge=!0),t}var Fn=e=>e?`wui-pin-${e.side}${e.edge?` wui-pin-${e.side}-edge`:``}`:``,In=200,Ln=220,Rn=`cubic-bezier(0.22, 1, 0.36, 1)`,zn=()=>typeof window<`u`&&typeof window.matchMedia==`function`&&window.matchMedia(`(prefers-reduced-motion: reduce)`).matches,Bn=e=>e.getAttribute(`data-row-key`)??e;function Vn(e){let t=[...e];if(t.length>200)return null;let n=new Map;for(let e of t)e.hidden||n.set(Bn(e),e.offsetTop);return n}function Hn(e,t){let n=[...e];if(!t||n.length>200||zn())return 0;let r=0;for(let e of n){if(e.hidden||typeof e.animate!=`function`)continue;let n=t.get(Bn(e));if(n===void 0)continue;let i=n-e.offsetTop;Math.abs(i)<1||(e.animate([{transform:`translateY(${i}px)`},{transform:`translateY(0)`}],{duration:220,easing:Rn}),r++)}return r}function Un(e,t){if(!e||!t)return!1;let n=new Set(t),r=new Set(e),i=e.filter(e=>n.has(e)),a=t.filter(e=>r.has(e));return i.some((e,t)=>e!==a[t])}var Wn=[`saving`,`error`],Gn=`data-wui-save-state`,Kn=`wui-row-save-error`,qn=e=>{let t=e.querySelector(`:scope > .wui-name-cell`);return t instanceof HTMLTableCellElement?t:[...e.cells].find(e=>!e.matches(`.wui-select-cell, .wui-expand-cell`))??null};function Jn(e){let t=qn(e);if(!t)return``;let n=t.querySelector(`.u-name`);if(n)return(n.textContent??``).trim();let r=``;for(let e of t.childNodes)e instanceof Element&&e.classList.contains(`wui-row-save-error`)||(r+=e.textContent??``);return r.replace(/\s+/g,` `).trim()}function Yn(e,t,n=``){if(t!==null&&!Wn.includes(t))throw Error(`A row's save state is ${Wn.join(` or `)} (or null to clear it), not "${t}".`);e.querySelector(`:scope > * > .${Kn}`)?.remove(),t===null?e.removeAttribute(Gn):e.setAttribute(Gn,t),t===`saving`?e.setAttribute(`aria-busy`,`true`):e.removeAttribute(`aria-busy`);let r=t===`error`&&n?qn(e):null;if(r){let t=e.ownerDocument.createElement(`span`);t.className=Kn,t.textContent=n,r.append(t)}}function Xn(e,t){let n=[];if(!e)return n;for(let[r,i]of e){let e=t.get(r);i.state===`saving`&&e&&e.state!==`saving`&&n.push({label:e.label,ok:e.state!==`error`,message:e.message||``})}return n}function Zn(e){let t=e.filter(e=>e.ok),n=[],[r]=t;t.length===1&&r?n.push(L.saved(r.label)):t.length>1&&n.push(L.savedMany(t.length));for(let t of e)t.ok||n.push(L.notSaved(t.label,t.message));return n.join(` `)}var Qn=n({isImeSafeEnter:()=>$n});function $n(e){return e.key===`Enter`&&e.isComposing!==!0&&e.keyCode!==229}var er=`.wui-col-resize`,tr=`.wui-group-row, .wui-virtual-spacer`,nr=`.wui-select-cell, .wui-expand-cell`,rr=`<svg class="wui-icon" data-icon="chevron-down" data-wui="AppIcon" width="16" height="16" viewBox="0 0 24 24" fill="none" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="1.5" d="M19.92 8.95l-6.52 6.52c-.77.77-2.03.77-2.8 0L4.08 8.95"></path></svg>`;function R(e){if(e==null)throw TypeError(`Missing DOM node`);return e}function ir(e,t){if(e instanceof t)return e;throw TypeError(`Missing DOM node`)}var ar=e=>{let t=P(e,er);return t instanceof HTMLElement?t:null},or=e=>e.hasAttribute(`data-wui-skeleton`)||!!e.querySelector(`:scope > td > .skeleton`),sr=class extends s{_frame;_headDirty;_rowsDirty;_frozenSig;_natural;_widths;_collapsed;_groupOrder;_items;_range;_drag;_userSized;_swallowClick;_mo;_ro;_fonts;_onPointerDown;_onKeyDown;_onClick;_onDblClick;_onScroll;_onFonts;_top=null;_bottom=null;_rowHeight=0;constructor(){super(),this._frame=0,this._headDirty=!0,this._rowsDirty=!0,this._frozenSig=null,this._natural=[],this._widths={},this._collapsed=new Set,this._groupOrder=[],this._items=[],this._range=null,this._drag=null,this._userSized=!1,this._swallowClick=!1,this._mo=null,this._ro=null,this._fonts=null,this._onPointerDown=e=>this._startDrag(e),this._onKeyDown=e=>this._key(e),this._onClick=e=>this._click(e),this._onDblClick=e=>{let t=ar(e.target);t&&this.contains(t)&&this._reset(t.closest(`th`))},this._onScroll=()=>{this.hasAttribute(`virtual`)&&this._schedule()},this._onFonts=()=>{this._userSized||this._drag||this._frozenSig===null||!this.hasAttribute(`resizable`)||(this._frozenSig=null,this._schedule())}}connectedCallback(){this._widths=kn(this.getAttribute(`view-key`)),this.addEventListener(`pointerdown`,this._onPointerDown,!0),this.addEventListener(`keydown`,this._onKeyDown,!0),this.addEventListener(`click`,this._onClick,!0),this.addEventListener(`dblclick`,this._onDblClick),this.addEventListener(`scroll`,this._onScroll,{passive:!0}),this._fonts=this.ownerDocument.fonts??null,this._fonts?.addEventListener(`loadingdone`,this._onFonts),typeof MutationObserver<`u`&&(this._mo=new MutationObserver(e=>this._mutated(e)),this._mo.observe(this,{childList:!0,subtree:!0})),typeof ResizeObserver<`u`&&(this._ro=new ResizeObserver(()=>this._schedule()),this._ro.observe(this)),this._headDirty=!0,this._rowsDirty=!0,this._schedule()}disconnectedCallback(){this.removeEventListener(`pointerdown`,this._onPointerDown,!0),this.removeEventListener(`keydown`,this._onKeyDown,!0),this.removeEventListener(`click`,this._onClick,!0),this.removeEventListener(`dblclick`,this._onDblClick),this.removeEventListener(`scroll`,this._onScroll),this._fonts?.removeEventListener(`loadingdone`,this._onFonts),this._fonts=null,this._mo?.disconnect(),this._ro?.disconnect(),this._mo=null,this._ro=null,this._frame&&cancelAnimationFrame(this._frame),this._frame=0,this._drag=null}refresh(){this._headDirty=!0,this._rowsDirty=!0,this._run()}get _table(){let e=this.querySelector(`:scope > table`);return e instanceof HTMLTableElement?e:null}_headCells(e){let t=e.tHead?.rows[0];return t?[...t.cells]:[]}_schedule(){this._frame||=requestAnimationFrame(()=>{this._frame=0,this._run()})}_mutated(e){for(let t of e){let e=t.target instanceof Element?t.target:t.target.parentElement;e&&((e.closest(`thead`)||e===this._table||e===this)&&(this._headDirty=!0),(e.closest(`tbody, tfoot`)||e===this._table||e===this)&&(this._rowsDirty=!0))}this._schedule()}_run(){let e=this._table;if(!e)return;let t=this._headDirty,n=this._rowsDirty;this._headDirty=!1,this._rowsDirty=!1,n&&this.hasAttribute(`group-by`)&&this._group(e),this._pins(e,t||n),this.hasAttribute(`resizable`)&&(t&&this._handles(e),this._layout(e)),this.hasAttribute(`virtual`)&&this._virtual(e,t||n),this._mo?.takeRecords()}_pins(e,t){let n=this._headCells(e),r=n.map(e=>{let t=e.dataset.pin;return t===`start`||t===`end`?t:e.matches(nr)?`lead`:null});if(!r.some(e=>e===`start`||e===`end`))return;let i=Pn(r);i.forEach((e,t)=>{e&&this._ro?.observe(R(n[t]))});let a=e=>R(n[e]).getBoundingClientRect().width,o=0;i.forEach((t,n)=>{t?.side===`start`&&(this._setVar(e,jn(`start`,t.ordinal),o),o+=a(n))}),o=0;for(let t=i.length-1;t>=0;t--){let n=i[t];n?.side===`end`&&(this._setVar(e,jn(`end`,n.ordinal),o),o+=a(t))}if(t)for(let t of e.rows)t.matches(`${tr}, .wui-row-expanded`)||t.cells.length!==n.length||i.forEach((e,n)=>{if(!e)return;let r=R(t.cells[n]);r.classList.contains(`wui-pin-${e.side}`)||r.classList.add(`wui-pin-${e.side}`),e.edge&&!r.classList.contains(`wui-pin-${e.side}-edge`)&&r.classList.add(`wui-pin-${e.side}-edge`);let i=Nn(e.side,e.ordinal);r.style.getPropertyValue(`--wui-pin-at`)!==i&&r.style.setProperty(Mn,i)})}_setVar(e,t,n){let r=`${Math.round(n*100)/100}px`;e.style.getPropertyValue(t)!==r&&e.style.setProperty(t,r)}_resizable(e){return e.map((t,n)=>n<e.length-1&&!t.matches(nr))}_handles(e){let t=this._headCells(e),n=this._resizable(t);t.forEach((e,t)=>{if(!n[t]||e.querySelector(er))return;let r=e.ownerDocument.createElement(`span`);r.className=`wui-col-resize`,r.setAttribute(`role`,`separator`),r.setAttribute(`aria-orientation`,`vertical`),r.setAttribute(`aria-valuemin`,`48`),r.setAttribute(`aria-valuemax`,String(vn)),r.setAttribute(`tabindex`,`0`);let i=(e.textContent??``).trim();r.setAttribute(`aria-label`,L.resize(i)),i&&!e.hasAttribute(`aria-label`)&&e.setAttribute(`aria-label`,i),e.classList.add(`wui-col-resizable`),e.appendChild(r)})}_hasRows(e){for(let t of e.tBodies)for(let e of t.rows)if(!e.matches(tr)&&!or(e))return!0;return!1}_signature(e){return e.map(e=>e.dataset.key||(e.textContent??``).trim()).join(``)}_layout(e){let t=this._headCells(e),n=this._signature(t);t.length&&n!==this._frozenSig&&(this._hasRows(e)?this._freeze(e,t,n):this._applyRemembered(t))}_applyRemembered(e){for(let t of e){let e=t.dataset.key&&this._widths[t.dataset.key];e&&(t.style.width=`${e}px`);let n=t.querySelector(er);n&&this._handleValue(n,Tn(e||t.getBoundingClientRect().width))}}_freeze(e,t,n){e.style.tableLayout=``,e.style.width=``,e.removeAttribute(`data-wui-fixed`);for(let e of t)e.hasAttribute(`data-wui-width`)&&(e.style.width=``,e.removeAttribute(`data-wui-width`));this._natural=t.map(e=>e.getBoundingClientRect().width),t.forEach((e,n)=>{if(n===t.length-1||e.matches(nr))return;let r=e.dataset.key&&this._widths[e.dataset.key];this._setWidth(e,r||this._natural[n])}),e.style.tableLayout=`fixed`,e.setAttribute(`data-wui-fixed`,``),this._frozenSig=n,this._fitTable(e,t)}_setWidth(e,t){let n=Tn(t);e.style.width=`${n}px`,e.setAttribute(`data-wui-width`,``);let r=e.querySelector(er);return r&&this._handleValue(r,n),n}_handleValue(e,t){e.setAttribute(`aria-valuenow`,String(t)),e.setAttribute(`aria-valuetext`,L.width(t))}_fitTable(e,t){let n=t.length-1,r=this._natural[n]||0;for(let e=0;e<n;e++)r+=Number.parseFloat(R(t[e]).style.width)||this._natural[e]||0;e.style.width=`max(100%, ${Math.round(r)}px)`}_ensureFrozen(e){let t=this._headCells(e),n=this._signature(t);return n!==this._frozenSig&&this._freeze(e,t,n),t}_resizeTo(e,t,n){let r=this._table;if(!r)return;let i=this._ensureFrozen(r);this._userSized=!0,this._setWidth(e,t),this._fitTable(r,i),n&&this._remember(e),this._pins(r,!1)}_remember(e){let t=e.dataset.key;t&&(this._widths={...this._widths,[t]:Number.parseFloat(e.style.width)},An(this.getAttribute(`view-key`),this._widths))}_reset(e){let t=this._table;if(!e||!t)return;let n=this._ensureFrozen(t);this._userSized=!0;let r=e.dataset.key;if(r&&r in this._widths){let{[r]:e,...t}=this._widths;this._widths=t,An(this.getAttribute(`view-key`),this._widths)}this._setWidth(e,this._natural[n.indexOf(e)]||0),this._fitTable(t,n),this._pins(t,!1)}_rtl(){return getComputedStyle(this).direction===`rtl`}_startDrag(e){let t=ar(e.target);if(!t||!this.contains(t)||e.button!==0)return;e.preventDefault(),e.stopPropagation();let n=t.closest(`th`),r=this._table;if(!n||!r)return;this._ensureFrozen(r);let i={th:n,x:e.clientX,from:n.getBoundingClientRect().width,dir:this._rtl()?-1:1,moved:!1};this._drag=i,t.setPointerCapture?.(e.pointerId),t.classList.add(`is-dragging`);let a=e=>{let t=(e.clientX-i.x)*i.dir;Math.abs(t)>1&&(i.moved=!0),this._resizeTo(n,i.from+t,!1)},o=e=>{t.removeEventListener(`pointermove`,a),t.removeEventListener(`pointerup`,o),t.removeEventListener(`pointercancel`,o),t.classList.remove(`is-dragging`),this._drag=null,e.type===`pointercancel`?this._resizeTo(n,i.from,!1):i.moved&&this._remember(n),this._swallowClick=!0,setTimeout(()=>{this._swallowClick=!1},0)};t.addEventListener(`pointermove`,a),t.addEventListener(`pointerup`,o),t.addEventListener(`pointercancel`,o)}_key(e){let t=ar(e.target);if(!t||!this.contains(t))return;let n=t.closest(`th`);if($n(e)||e.key===` `){e.preventDefault(),e.stopPropagation();return}if(e.key===`Home`){e.preventDefault(),e.stopPropagation(),this._reset(n);return}if(e.key!==`ArrowLeft`&&e.key!==`ArrowRight`)return;e.preventDefault(),e.stopPropagation();let r=this._table;if(!r)return;this._ensureFrozen(r);let i=R(n),a=e.shiftKey?50:10,o=e.key===`ArrowRight`!==this._rtl(),s=Number.parseFloat(i.style.width)||i.getBoundingClientRect().width;this._resizeTo(i,s+(o?a:-a),!0)}_click(e){let t=e.target instanceof Element&&e.target.closest(er)!==null;if(this._swallowClick||t){e.stopPropagation(),(t||this._swallowClick)&&e.preventDefault(),this._swallowClick=!1;return}if(!this.hasAttribute(`group-by`))return;let n=P(e.target,`.wui-group-toggle`)?.closest(`.wui-group-row`);if(!(n instanceof HTMLTableRowElement)||!this.contains(n))return;let r=n.dataset.groupKey;this._collapsed.has(r)?this._collapsed.delete(r):this._collapsed.add(r),this._showGroup(n,!this._collapsed.has(r));let i=this._table;i&&this.hasAttribute(`virtual`)&&(this._virtual(i,!0),this._mo?.takeRecords())}_group(e){let t=this.getAttribute(`group-by`),n=this._headCells(e),r=n.findIndex(e=>e.dataset.key===t);if(r<0)throw Error(`<wui-data-table group-by="${t}"> needs a header cell with data-key="${t}".`);let i=e.tBodies[0];if(!i)return;let a=[...i.rows].filter(e=>!e.matches(tr));if(a.some(or))return;let o=this.ownerDocument,s=new Map;for(let e of i.querySelectorAll(`:scope > tr.wui-group-row`))e instanceof HTMLTableRowElement&&s.set(e.dataset.groupKey,e);let c=En(a,e=>e.dataset.group??e.cells[r]?.textContent?.trim()??``,this.closest(`[data-wui-server]`)?[]:this._groupOrder);this._groupOrder=c.map(e=>e.key);let l=o.createDocumentFragment(),u=c.map(e=>{let t=s.get(e.key)??this._groupRow(o,e.key);return s.delete(e.key),ir(t.querySelector(`.wui-group-cell`),HTMLTableCellElement).colSpan=n.length,ir(t.querySelector(`.wui-group-count`),HTMLElement).textContent=wn(e.items.length),ir(t.querySelector(`.wui-group-rows`),HTMLElement).textContent=`, ${L.rows(e.items.length)}`,l.append(t,...e.items),[t,e.key]});for(let e of s.values())e.remove();i.insertBefore(l,this._bottom?.parentNode===i?this._bottom:null);for(let[e,t]of u)this._showGroup(e,!this._collapsed.has(t))}_groupRow(e,t){let n=e.createElement(`tr`);n.className=`wui-group-row`,n.dataset.groupKey=t;let r=e.createElement(`th`);r.className=`wui-group-cell`,r.scope=`rowgroup`;let i=e.createElement(`button`);i.type=`button`,i.className=`wui-group-toggle`,i.innerHTML=rr;let a=e.createElement(`span`);a.className=`wui-group-label`,a.textContent=t;let o=e.createElement(`span`);o.className=`wui-group-count`,o.setAttribute(`aria-hidden`,`true`);let s=e.createElement(`span`);return s.className=`visually-hidden wui-group-rows`,i.append(a,o,s),r.append(i),n.append(r),n}_showGroup(e,t){if(e){e.querySelector(`.wui-group-toggle`)?.setAttribute(`aria-expanded`,String(t));for(let n=e.nextElementSibling;n&&!n.matches(tr);n=n.nextElementSibling)n instanceof HTMLElement&&(n.hidden=!t)}}_spacer(e,t){if(t?.parentNode===e)return t;let n=e.ownerDocument,r=n.createElement(`tr`);return r.className=`wui-virtual-spacer`,r.setAttribute(`aria-hidden`,`true`),r.append(n.createElement(`td`)),r}_virtual(e,t){let n=e.tBodies[0];if(!n)return;if(t){this._top=this._spacer(n,this._top),this._bottom=this._spacer(n,this._bottom),n.firstElementChild!==this._top&&n.insertBefore(this._top,n.firstChild),n.lastElementChild!==this._bottom&&n.append(this._bottom);let t=Math.max(1,this._headCells(e).length);R(this._top.cells[0]).colSpan=t,R(this._bottom.cells[0]).colSpan=t,this._items=[...n.rows].filter(e=>!e.classList.contains(`wui-virtual-spacer`)&&!e.hidden),this._range=null,e.setAttribute(`aria-rowcount`,String(this._items.length+1)),e.tHead?.rows[0]?.setAttribute(`aria-rowindex`,`1`),this._items.forEach((e,t)=>{e.setAttribute(`aria-rowindex`,String(t+2))}),this._rowHeight>0||(this._rowHeight=this._measureRow(e))}let r=e.tHead?.getBoundingClientRect().height||0,i=Dn({scrollTop:this.scrollTop-r,viewport:this.clientHeight,rowHeight:this._rowHeight,count:this._items.length}),a=this._range;if(a&&a.start===i.start&&a.end===i.end)return;let o=a?Math.min(a.start,i.start):0,s=a?Math.max(a.end,i.end):this._items.length;for(let e=o;e<s;e++){let t=e<i.start||e>=i.end,n=R(this._items[e]);n.classList.contains(`wui-virtual-off`)!==t&&n.classList.toggle(`wui-virtual-off`,t)}this._range=i;let c=R(this._top),l=R(this._bottom);c.hidden=i.before===0,l.hidden=i.after===0,R(c.cells[0]).style.height=`${i.before}px`,R(l.cells[0]).style.height=`${i.after}px`}_measureRow(e){let t=this._items.find(e=>!e.classList.contains(`wui-group-row`)&&!e.classList.contains(`wui-virtual-off`))?.getBoundingClientRect().height??0;return t>0?t:e.classList.contains(`wui-table-compact`)?Cn.compact:e.classList.contains(`wui-table-cozy`)?Cn.cozy:Cn.comfortable}},cr=n({DISPLAY_FORMAT:()=>hr,MONTHS:()=>lr,WEEKDAYS:()=>ur,clampMonth:()=>vr,daysIn:()=>_r,firstWeekday:()=>fr,fmt:()=>gr,pad:()=>pr,parseIso:()=>z,toIso:()=>mr}),lr=[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`],ur=[`Su`,`Mo`,`Tu`,`We`,`Th`,`Fr`,`Sa`],dr=e=>{let t=String(e??``).trim();return/^[0-6]$/.test(t)?Number(t):null},fr=e=>dr(e.getAttribute(`first-day`))??dr(getComputedStyle(e).getPropertyValue(`--wui-first-day`))??1,pr=e=>String(e).padStart(2,`0`),mr=(e,t,n)=>`${e}-${pr(t+1)}-${pr(n)}`,z=e=>{let t=/^(\d{4})-(\d{2})-(\d{2})$/.exec(e||``);if(!t)return null;let[,n,r,i]=t;if(n===void 0||r===void 0||i===void 0)throw Error(`ISO date parts missing`);let a=+n,o=+r,s=+i;return o<1||o>12||s<1||s>_r(a,o-1)?null:{y:a,m:o-1,d:s}},hr=`dd-MMM-yyyy`,gr=(e,t=hr)=>{let n=z(e);if(!n)return``;let r=lr[n.m];if(r===void 0)throw Error(`month out of range`);let i={yyyy:n.y,MMMM:r,MMM:r.slice(0,3),MM:pr(n.m+1),dd:pr(n.d),d:n.d};return(t||`dd-MMM-yyyy`).replace(/yyyy|MMMM|MMM|MM|dd|d/g,e=>String(i[e]))},_r=(e,t)=>{let n=new Date(0);return n.setFullYear(e,t+1,0),n.getDate()},vr=(e,t)=>{for(;t<0;)t+=12,--e;for(;t>11;)t-=12,e+=1;return{y:e,m:t}},yr=n({BUSY_CLASS:()=>br,isInert:()=>B,isReadOnly:()=>xr,syncFieldState:()=>Sr}),br=`wui-field-busy`,xr=e=>e.hasAttribute(`readonly`),B=e=>e.hasAttribute(`disabled`)||e.hasAttribute(`readonly`)||e.hasAttribute(`loading`);function Sr(e,t){let n=e.hasAttribute(`loading`);n?e.setAttribute(`aria-busy`,`true`):e.removeAttribute(`aria-busy`),t&&(t.classList.toggle(br,n),xr(e)?t.setAttribute(`aria-readonly`,`true`):t.removeAttribute(`aria-readonly`))}var Cr=n({syncFormMirror:()=>V,syncFormMirrors:()=>Dr}),wr=`data-wui-mirror`;function Tr(e,t,n,r){t.name=n,t.value=r==null?``:String(r);for(let n of[...t.attributes])n.name.startsWith(`data-val`)&&!e.hasAttribute(n.name)&&t.removeAttribute(n.name);for(let n of e.attributes)n.name.startsWith(`data-val`)&&t.setAttribute(n.name,n.value);t.disabled=e.hasAttribute(`disabled`)}function Er(e){let t=document.createElement(`input`);return t.type=`hidden`,t.setAttribute(wr,``),e.appendChild(t),t}function V(e,t){let n=e.getAttribute(`name`)??``,r=e.querySelector(`:scope > input[${wr}]`),i=r instanceof HTMLInputElement?r:null;n?(i||=Er(e),Tr(e,i,n,t)):i?.remove()}function Dr(e,t){let n=e.getAttribute(`name`)??``,r=[...e.querySelectorAll(`:scope > input[${wr}]`)].filter(e=>e instanceof HTMLInputElement),i=[...e.attributes].some(e=>e.name.startsWith(`data-val`)),a=n?t.length>0?t:i?[``]:[]:[];for(let e of r.splice(a.length))e.remove();a.forEach((t,i)=>{Tr(e,r[i]??Er(e),n,t)})}var Or={add:`<path d="M6 12h12M12 18V6" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,"alert-circle":`<path d="M12 7.75V13M21.08 8.58v6.84c0 1.12-.6 2.16-1.57 2.73l-5.94 3.43c-.97.56-2.17.56-3.15 0l-5.94-3.43a3.15 3.15 0 0 1-1.57-2.73V8.58c0-1.12.6-2.16 1.57-2.73l5.94-3.43c.97-.56 2.17-.56 3.15 0l5.94 3.43c.97.57 1.57 1.6 1.57 2.73Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M12 16.2v.1" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path>`,"alert-triangle":`<path d="M12 9v5M12 21.41H5.94c-3.47 0-4.92-2.48-3.24-5.51l3.12-5.62L8.76 5c1.78-3.21 4.7-3.21 6.48 0l2.94 5.29 3.12 5.62c1.68 3.03.22 5.51-3.24 5.51H12v-.01Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M11.995 17h.009" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path>`,"arrow-left":`<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="1.5" d="M9.57 5.93L3.5 12l6.07 6.07M20.5 12H3.67"></path>`,"arrow-right":`<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="1.5" d="M14.43 5.93L20.5 12l-6.07 6.07M3.5 12h16.83"></path>`,at:`<path d="M16 12a4 4 0 1 1-8 0 4 4 0 1 1 8 0M16 12v1.5a2.5 2.5 0 0 0 5 0V12a9 9 0 1 0-3.5 7.13" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>`,calendar:`<path d="M8 2v3M16 2v3M3.5 9.09h17M21 8.5V17c0 3-1.5 5-5 5H8c-3.5 0-5-2-5-5V8.5c0-3 1.5-5 5-5h8c3.5 0 5 2 5 5Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="M15.695 13.7h.009M15.695 16.7h.009M11.995 13.7h.01M11.995 16.7h.01M8.294 13.7h.01M8.294 16.7h.01" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path>`,"calendar-dots":`<path d="M8 2v3M16 2v3M16 3.5c3.33.18 5 1.45 5 6.15v6.18c0 4.12-1 6.18-6 6.18H9c-5 0-6-2.06-6-6.18V9.65c0-4.7 1.67-5.96 5-6.15h8ZM20.75 17.6H3.25" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="M12 8.25c-1.23 0-2.27.67-2.27 1.97 0 .62.29 1.09.73 1.39-.61.36-.96.94-.96 1.62 0 1.24.95 2.01 2.5 2.01 1.54 0 2.5-.77 2.5-2.01 0-.68-.35-1.27-.97-1.62.45-.31.73-.77.73-1.39 0-1.3-1.03-1.97-2.26-1.97Zm0 2.84c-.52 0-.9-.31-.9-.8 0-.5.38-.79.9-.79s.9.29.9.79c0 .49-.38.8-.9.8ZM12 14c-.66 0-1.14-.33-1.14-.93 0-.6.48-.92 1.14-.92.66 0 1.14.33 1.14.92 0 .6-.48.93-1.14.93Z" fill="currentColor"></path>`,chart:`<path d="M9 22h6c5 0 7-2 7-7V9c0-5-2-7-7-7H9C4 2 2 4 2 9v6c0 5 2 7 7 7Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M15.5 18.5c1.1 0 2-.9 2-2v-9c0-1.1-.9-2-2-2s-2 .9-2 2v9a2 2 0 0 0 2 2ZM8.5 18.5c1.1 0 2-.9 2-2V13c0-1.1-.9-2-2-2s-2 .9-2 2v3.5a2 2 0 0 0 2 2Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,check:`<path d="m5 12.75 4.5 4.5L19 7.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>`,"check-circle":`<path d="M12 22c5.5 0 10-4.5 10-10S17.5 2 12 2 2 6.5 2 12s4.5 10 10 10Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="m7.75 12 2.83 2.83 5.67-5.66" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,"chevron-down":`<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="1.5" d="M19.92 8.95l-6.52 6.52c-.77.77-2.03.77-2.8 0L4.08 8.95"></path>`,"chevron-left":`<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="1.5" d="M15 19.92L8.48 13.4c-.77-.77-.77-2.03 0-2.8L15 4.08"></path>`,"chevron-right":`<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="1.5" d="M8.91 19.92l6.52-6.52c.77-.77.77-2.03 0-2.8L8.91 4.08"></path>`,"chevron-up":`<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="1.5" d="M19.92 15.05L13.4 8.53c-.77-.77-2.03-.77-2.8 0l-6.52 6.52"></path>`,"chevrons-up-down":`<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="1.5" d="M9.01 20.5l-5.02-5.01M9.01 3.5v17M14.99 3.5l5.02 5.01M14.99 20.5v-17"></path>`,circle:`<path d="M11.97 22c5.523 0 10-4.477 10-10s-4.477-10-10-10-10 4.477-10 10 4.477 10 10 10Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M12 16.23a4.23 4.23 0 1 0 0-8.46 4.23 4.23 0 0 0 0 8.46Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path>`,clock:`<path d="M22 12c0 5.52-4.48 10-10 10S2 17.52 2 12 6.48 2 12 2s10 4.48 10 10Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="m15.71 15.18-3.1-1.85c-.54-.32-.98-1.09-.98-1.72v-4.1" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,code:`<path d="M9 13c-.66.33-1.21.82-1.62 1.43-.23.35-.23.79 0 1.14.41.61.96 1.1 1.62 1.43M15.21 13c.66.33 1.21.82 1.62 1.43.23.35.23.79 0 1.14-.41.61-.96 1.1-1.62 1.43" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M9 22h6c5 0 7-2 7-7V9c0-5-2-7-7-7H9C4 2 2 4 2 9v6c0 5 2 7 7 7ZM2.23 8.01 21.45 8" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,comment:`<path d="M8.5 19H8c-4 0-6-1-6-6V8c0-4 2-6 6-6h8c4 0 6 2 6 6v5c0 4-2 6-6 6h-.5c-.31 0-.61.15-.8.4l-1.5 2c-.66.88-1.74.88-2.4 0l-1.5-2c-.16-.22-.53-.4-.8-.4Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="M15.996 11h.01M11.995 11h.01M7.995 11h.008" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path>`,copy:`<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M16 12.9v4.2c0 3.5-1.4 4.9-4.9 4.9H6.9C3.4 22 2 20.6 2 17.1v-4.2C2 9.4 3.4 8 6.9 8h4.2c3.5 0 4.9 1.4 4.9 4.9z"></path><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M22 6.9v4.2c0 3.5-1.4 4.9-4.9 4.9H16v-3.1C16 9.4 14.6 8 11.1 8H8V6.9C8 3.4 9.4 2 12.9 2h4.2C20.6 2 22 3.4 22 6.9z"></path>`,danger:`<path d="M12 9v5M12 21.41H5.94c-3.47 0-4.92-2.48-3.24-5.51l3.12-5.62L8.76 5c1.78-3.21 4.7-3.21 6.48 0l2.94 5.29 3.12 5.62c1.68 3.03.22 5.51-3.24 5.51H12v-.01Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M11.995 17h.009" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path>`,display:`<path d="M6.44 2h11.11C21.11 2 22 2.89 22 6.44v6.33c0 3.56-.89 4.44-4.44 4.44H6.44C2.89 17.22 2 16.33 2 12.78V6.44C2 2.89 2.89 2 6.44 2ZM12 17.22V22M2 13h20M7.5 22h9" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,document:`<path d="M22 10v5c0 5-2 7-7 7H9c-5 0-7-2-7-7V9c0-5 2-7 7-7h5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M22 10h-4c-3 0-4-1-4-4V2l8 8Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,download:`<path d="M9 11v6l2-2M9 17l-2-2" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M22 10v5c0 5-2 7-7 7H9c-5 0-7-2-7-7V9c0-5 2-7 7-7h5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M22 10h-4c-3 0-4-1-4-4V2l8 8Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,edit:`<path d="m13.26 3.6-8.21 8.69c-.31.33-.61.98-.67 1.43l-.37 3.24c-.13 1.17.71 1.97 1.87 1.77l3.22-.55c.45-.08 1.08-.41 1.39-.75l8.21-8.69c1.42-1.5 2.06-3.21-.15-5.3-2.2-2.07-3.87-1.34-5.29.16Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="M11.89 5.05a6.126 6.126 0 0 0 5.45 5.15M3 22h18" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path>`,export:`<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="1.5" d="M9.32 6.5l2.56-2.56 2.56 2.56M11.88 14.18V4.01M4 12c0 4.42 3 8 8 8s8-3.58 8-8"></path>`,"file-text":`<path d="M21 7v10c0 3-1.5 5-5 5H8c-3.5 0-5-2-5-5V7c0-3 1.5-5 5-5h8c3.5 0 5 2 5 5Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="M14.5 4.5v2c0 1.1.9 2 2 2h2M8 13h4M8 17h8" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path>`,files:`<path d="M17 13.4v3c0 4-1.6 5.6-5.6 5.6H7.6c-4 0-5.6-1.6-5.6-5.6v-3.8C2 8.6 3.6 7 7.6 7h3" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M17 13.4h-3.2c-2.4 0-3.2-.8-3.2-3.2V7l6.4 6.4ZM11.6 2h4M7 5c0-1.66 1.34-3 3-3h2.62M22 8v6.19c0 1.55-1.26 2.81-2.81 2.81M22 8h-3c-2.25 0-3-.75-3-3V2l6 6Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,filter:`<path d="M5.4 2.1h13.2c1.1 0 2 .9 2 2v2.2c0 .8-.5 1.8-1 2.3l-4.3 3.8c-.6.5-1 1.5-1 2.3V19c0 .6-.4 1.4-.9 1.7l-1.4.9c-1.3.8-3.1-.1-3.1-1.7v-5.3c0-.7-.4-1.6-.8-2.1l-3.8-4c-.5-.5-.9-1.4-.9-2V4.2c0-1.2.9-2.1 2-2.1ZM10.93 2.1 6 10" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path>`,flag:`<path d="M5.15 2v20M5.15 4h11.2c2.7 0 3.3 1.5 1.4 3.4l-1.2 1.2c-.8.8-.8 2.1 0 2.8l1.2 1.2c1.9 1.9 1.2 3.4-1.4 3.4H5.15" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path>`,gauge:`<path d="M19.14 19.5a9.964 9.964 0 0 0 2.86-7c0-5.52-4.48-10-10-10S2 6.98 2 12.5c0 2.72 1.08 5.18 2.84 6.99" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="M12 21.5a3.38 3.38 0 1 0 0-6.76 3.38 3.38 0 0 0 0 6.76ZM15.25 12H16c.82 0 1.5-.67 1.5-1.5 0-.82-.68-1.5-1.5-1.5s-1.5.67-1.5 1.5v.75c0 .41.34.75.75.75Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path>`,grid:`<path d="M22 8.52V3.98C22 2.57 21.36 2 19.77 2h-4.04c-1.59 0-2.23.57-2.23 1.98v4.53c0 1.42.64 1.98 2.23 1.98h4.04c1.59.01 2.23-.56 2.23-1.97ZM22 19.77v-4.04c0-1.59-.64-2.23-2.23-2.23h-4.04c-1.59 0-2.23.64-2.23 2.23v4.04c0 1.59.64 2.23 2.23 2.23h4.04c1.59 0 2.23-.64 2.23-2.23ZM10.5 8.52V3.98C10.5 2.57 9.86 2 8.27 2H4.23C2.64 2 2 2.57 2 3.98v4.53c0 1.42.64 1.98 2.23 1.98h4.04c1.59.01 2.23-.56 2.23-1.97ZM10.5 19.77v-4.04c0-1.59-.64-2.23-2.23-2.23H4.23c-1.59 0-2.23.64-2.23 2.23v4.04C2 21.36 2.64 22 4.23 22h4.04c1.59 0 2.23-.64 2.23-2.23Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,image:`<path d="M9 22h6c5 0 7-2 7-7V9c0-5-2-7-7-7H9C4 2 2 4 2 9v6c0 5 2 7 7 7Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M9 10a2 2 0 1 0 0-4 2 2 0 0 0 0 4ZM2.67 18.95l4.93-3.31c.79-.53 1.93-.47 2.64.14l.33.29c.78.67 2.04.67 2.82 0l4.16-3.57c.78-.67 2.04-.67 2.82 0L22 13.9" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,info:`<g transform="rotate(180 12 12)"><path d="M12 22c5.5 0 10-4.5 10-10S17.5 2 12 2 2 6.5 2 12s4.5 10 10 10ZM12 8v5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M11.995 16h.009" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path></g>`,key:`<path d="M19.79 14.93a7.575 7.575 0 0 1-7.6 1.87l-4.71 4.7c-.34.35-1.01.56-1.49.49l-2.18-.3c-.72-.1-1.39-.78-1.5-1.5l-.3-2.18c-.07-.48.16-1.15.49-1.49l4.7-4.7c-.8-2.6-.18-5.55 1.88-7.6 2.95-2.95 7.74-2.95 10.7 0 2.96 2.95 2.96 7.76.01 10.71ZM6.89 17.49l2.3 2.3" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="M14.5 11a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,list:`<path d="M3 4.5h18M3 9.5h9.47M3 14.5h18M3 19.5h9.47" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,lock:`<path d="M6 10V8c0-3.31 1-6 6-6s6 2.69 6 6v2M12 18.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M17 22H7c-4 0-5-1-5-5v-2c0-4 1-5 5-5h10c4 0 5 1 5 5v2c0 4-1 5-5 5Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,"maximize-4":`<path d="M21 9V3h-6M3 15v6h6M21 3l-7.5 7.5M10.5 13.5 3 21" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,menu:`<path d="M3 7h18M3 12h18M3 17h18" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"></path>`,minus:`<path d="M6 12h12" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,monitor:`<path d="M6.44 2h11.11C21.11 2 22 2.89 22 6.44v6.33c0 3.56-.89 4.44-4.44 4.44H6.44C2.89 17.22 2 16.33 2 12.78V6.44C2 2.89 2.89 2 6.44 2ZM12 17.22V22M2 13h20M7.5 22h9" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,moon:`<path d="M2.03 12.42c.36 5.15 4.73 9.34 9.96 9.57 3.69.16 6.99-1.56 8.97-4.27.82-1.11.38-1.85-.99-1.6-.67.12-1.36.17-2.08.14C13 16.06 9 11.97 8.98 7.14c-.01-1.3.26-2.53.75-3.65.54-1.24-.11-1.83-1.36-1.3C4.41 3.86 1.7 7.85 2.03 12.42Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,music:`<path d="M6.28 22a3.12 3.12 0 1 0 0-6.24 3.12 3.12 0 0 0 0 6.24Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M20.84 16.8V4.6c0-2.6-1.63-2.96-3.28-2.51l-6.24 1.7C10.18 4.1 9.4 5 9.4 6.3v12.57" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M17.72 19.92a3.12 3.12 0 1 0 0-6.24 3.12 3.12 0 0 0 0 6.24ZM9.4 9.52 20.84 6.4" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,pause:`<path d="M10.65 19.11V4.89c0-1.35-.57-1.89-2.01-1.89H5.01C3.57 3 3 3.54 3 4.89v14.22C3 20.46 3.57 21 5.01 21h3.63c1.44 0 2.01-.54 2.01-1.89ZM21 19.11V4.89C21 3.54 20.43 3 18.99 3h-3.63c-1.43 0-2.01.54-2.01 1.89v14.22c0 1.35.57 1.89 2.01 1.89h3.63c1.44 0 2.01-.54 2.01-1.89Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,people:`<path d="M18 7.16a.605.605 0 0 0-.19 0 2.573 2.573 0 0 1-2.48-2.58c0-1.43 1.15-2.58 2.58-2.58a2.58 2.58 0 0 1 2.58 2.58A2.589 2.589 0 0 1 18 7.16ZM16.97 14.44c1.37.23 2.88-.01 3.94-.72 1.41-.94 1.41-2.48 0-3.42-1.07-.71-2.6-.95-3.97-.71M5.97 7.16c.06-.01.13-.01.19 0a2.573 2.573 0 0 0 2.48-2.58C8.64 3.15 7.49 2 6.06 2a2.58 2.58 0 0 0-2.58 2.58c.01 1.4 1.11 2.53 2.49 2.58ZM7 14.44c-1.37.23-2.88-.01-3.94-.72-1.41-.94-1.41-2.48 0-3.42 1.07-.71 2.6-.95 3.97-.71M12 14.63a.605.605 0 0 0-.19 0 2.573 2.573 0 0 1-2.48-2.58c0-1.43 1.15-2.58 2.58-2.58a2.58 2.58 0 0 1 2.58 2.58c-.01 1.4-1.11 2.54-2.49 2.58ZM9.09 17.78c-1.41.94-1.41 2.48 0 3.42 1.6 1.07 4.22 1.07 5.82 0 1.41-.94 1.41-2.48 0-3.42-1.59-1.06-4.22-1.06-5.82 0Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,phone:`<path d="M21.97 18.33c0 .36-.08.73-.25 1.09-.17.36-.39.7-.68 1.02-.49.54-1.03.93-1.64 1.18-.6.25-1.25.38-1.95.38-1.02 0-2.11-.24-3.26-.73s-2.3-1.15-3.44-1.98a28.75 28.75 0 0 1-3.28-2.8 28.414 28.414 0 0 1-2.79-3.27c-.82-1.14-1.48-2.28-1.96-3.41C2.24 8.67 2 7.58 2 6.54c0-.68.12-1.33.36-1.93.24-.61.62-1.17 1.15-1.67C4.15 2.31 4.85 2 5.59 2c.28 0 .56.06.81.18.26.12.49.3.67.56l2.32 3.27c.18.25.31.48.4.7.09.21.14.42.14.61 0 .24-.07.48-.21.71-.13.23-.32.47-.56.71l-.76.79c-.11.11-.16.24-.16.4 0 .08.01.15.03.23.03.08.06.14.08.2.18.33.49.76.93 1.28.45.52.93 1.05 1.45 1.58.54.53 1.06 1.02 1.59 1.47.52.44.95.74 1.29.92.05.02.11.05.18.08.08.03.16.04.25.04.17 0 .3-.06.41-.17l.76-.75c.25-.25.49-.44.72-.56.23-.14.46-.21.71-.21.19 0 .39.04.61.13.22.09.45.22.7.39l3.31 2.35c.26.18.44.39.55.64.1.25.16.5.16.78Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10"></path>`,play:`<path d="M4 12V8.44c0-4.42 3.13-6.23 6.96-4.02l3.09 1.78 3.09 1.78c3.83 2.21 3.83 5.83 0 8.04l-3.09 1.78-3.09 1.78C7.13 21.79 4 19.98 4 15.56V12Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path>`,printer:`<path d="M7.25 7h9.5V5c0-2-.75-3-3-3h-3.5c-2.25 0-3 1-3 3v2ZM16 15v4c0 2-1 3-3 3h-2c-2 0-3-1-3-3v-4h8Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="M21 10v5c0 2-1 3-3 3h-2v-3H8v3H6c-2 0-3-1-3-3v-5c0-2 1-3 3-3h12c2 0 3 1 3 3ZM17 15H7M7 11h3" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path>`,refresh:`<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M22 12c0 5.52-4.48 10-10 10s-8.89-5.56-8.89-5.56m0 0h4.52m-4.52 0v5M2 12C2 6.48 6.44 2 12 2c6.67 0 10 5.56 10 5.56m0 0v-5m0 5h-4.44"></path>`,"rotate-ccw":`<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M9.11 5.08c.87-.26 1.83-.43 2.89-.43 4.79 0 8.67 3.88 8.67 8.67s-3.88 8.67-8.67 8.67-8.67-3.88-8.67-8.67c0-1.78.54-3.44 1.46-4.82M7.87 5.32L10.76 2M7.87 5.32l3.37 2.46"></path>`,"rotate-cw":`<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M14.89 5.08c-.87-.26-1.83-.43-2.89-.43-4.79 0-8.67 3.88-8.67 8.67C3.33 18.12 7.21 22 12 22s8.67-3.88 8.67-8.67c0-1.78-.54-3.44-1.46-4.82M16.13 5.32L13.24 2M16.13 5.32l-3.37 2.46"></path>`,search:`<path d="M11.5 21a9.5 9.5 0 1 0 0-19 9.5 9.5 0 0 0 0 19ZM22 22l-2-2" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,send:`<path d="m7.4 6.32 8.49-2.83c3.81-1.27 5.88.81 4.62 4.62l-2.83 8.49c-1.9 5.71-5.02 5.71-6.92 0l-.84-2.52-2.52-.84c-5.71-1.9-5.71-5.01 0-6.92ZM10.11 13.65l3.58-3.59" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,server:`<path d="M19.32 10H4.69c-1.48 0-2.68-1.21-2.68-2.68V4.69c0-1.48 1.21-2.68 2.68-2.68h14.63C20.8 2.01 22 3.22 22 4.69v2.63C22 8.79 20.79 10 19.32 10ZM19.32 22H4.69c-1.48 0-2.68-1.21-2.68-2.68v-2.63c0-1.48 1.21-2.68 2.68-2.68h14.63c1.48 0 2.68 1.21 2.68 2.68v2.63c0 1.47-1.21 2.68-2.68 2.68ZM6 5v2M10 5v2M6 17v2M10 17v2M14 6h4M14 18h4" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,subtitle:`<path d="M9 22h6c5 0 7-2 7-7V9c0-5-2-7-7-7H9C4 2 2 4 2 9v6c0 5 2 7 7 7ZM17.5 17.08h-1.85M12.97 17.08H6.5M17.5 13.32h-5.53M9.27 13.32H6.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,sun:`<path d="M12 18.5a6.5 6.5 0 1 0 0-13 6.5 6.5 0 0 0 0 13Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="m19.14 19.14-.13-.13m0-14.02.13-.13-.13.13ZM4.86 19.14l.13-.13-.13.13ZM12 2.08V2v.08ZM12 22v-.08.08ZM2.08 12H2h.08ZM22 12h-.08.08ZM4.99 4.99l-.13-.13.13.13Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path>`,tag:`<path d="m4.405 15.526 4.53 4.53a4.78 4.78 0 0 0 6.75 0l4.39-4.39a4.78 4.78 0 0 0 0-6.75l-4.54-4.52a4.75 4.75 0 0 0-3.6-1.39l-5 .24c-2 .09-3.59 1.68-3.69 3.67l-.24 5c-.06 1.35.45 2.66 1.4 3.61Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M9.735 12.226a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"></path><path d="m13.235 17.226 4-4" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path>`,text:`<path d="M2.67 7.17V5.35c0-1.15.93-2.07 2.07-2.07h14.52c1.15 0 2.07.93 2.07 2.07v1.82M12 20.72V4.11M8.06 20.72h7.88" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,"two-page":`<path d="M22 16.74V4.67c0-1.2-.98-2.09-2.17-1.99h-.06c-2.1.18-5.29 1.25-7.07 2.37l-.17.11c-.29.18-.77.18-1.06 0l-.25-.15C9.44 3.9 6.26 2.84 4.16 2.67 2.97 2.57 2 3.47 2 4.66v12.08c0 .96.78 1.86 1.74 1.98l.29.04c2.17.29 5.52 1.39 7.44 2.44l.04.02c.27.15.7.15.96 0 1.92-1.06 5.28-2.17 7.46-2.46l.33-.04c.96-.12 1.74-1.02 1.74-1.98ZM12 5.49v15M7.75 8.49H5.5M8.5 11.49h-3" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,user:`<path d="M12 12a5 5 0 1 0 0-10 5 5 0 0 0 0 10ZM20.59 22c0-3.87-3.85-7-8.59-7s-8.59 3.13-8.59 7" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,"volume-high":`<path d="M2 10v4c0 2 1 3 3 3h1.43c.37 0 .74.11 1.06.3l2.92 1.83c2.52 1.58 4.59.43 4.59-2.54V7.41c0-2.98-2.07-4.12-4.59-2.54L7.49 6.7c-.32.19-.69.3-1.06.3H5c-2 0-3 1-3 3Z" stroke="currentColor" stroke-width="1.5"></path><path d="M18 8a6.66 6.66 0 0 1 0 8M19.83 5.5a10.83 10.83 0 0 1 0 13" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,"volume-mute":`<path d="M15 8.37v-.96c0-2.98-2.07-4.12-4.59-2.54L7.49 6.7c-.32.19-.69.3-1.06.3H5c-2 0-3 1-3 3v4c0 2 1 3 3 3h2M10.41 19.13c2.52 1.58 4.59.43 4.59-2.54v-3.64M18.81 9.42c.9 2.15.63 4.66-.81 6.58M21.15 7.8a10.82 10.82 0 0 1-1.32 10.7M22 2 2 22" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,x:`<path d="M6.4 6.4l11.2 11.2M17.6 6.4 6.4 17.6" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>`,"zoom-in":`<path d="M11 20a9 9 0 1 0 0-18 9 9 0 0 0 0 18ZM8.5 11h5M11 13.5v-5M18.93 20.69c.53 1.6 1.74 1.76 2.67.36.85-1.28.29-2.33-1.25-2.33-1.14-.01-1.78.88-1.42 1.97Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,"zoom-out":`<path d="M9 11.7h5M11.5 21a9.5 9.5 0 1 0 0-19 9.5 9.5 0 0 0 0 19ZM22 22l-2-2" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`},kr=n({devError:()=>H,devWarn:()=>Ar});function Ar(e,...t){console.warn(e,...t)}function H(e,...t){console.error(e,...t)}var jr=Object.freeze({carousel:{entries:[`elements/carousel.ts`],tags:[`wui-carousel`]},"code-block":{entries:[`elements/code-block.ts`],tags:[`wui-code-block`]},"command-palette":{entries:[`elements/command-palette.ts`],tags:[`wui-command-palette`]},"comment-thread":{entries:[`elements/comment-thread.ts`],tags:[`wui-mention-input`,`wui-comment-thread`]},"consent-banner":{entries:[`elements/consent-banner.ts`],tags:[`wui-consent-banner`]},"context-menu":{entries:[`elements/context-menu.ts`],tags:[`wui-context-menu`]},"date-range":{entries:[`elements/date-range.ts`],tags:[`wui-date-range`]},drawer:{entries:[`elements/drawer.ts`],tags:[`wui-drawer`]},dropdown:{entries:[`elements/dropdown.ts`],tags:[`wui-dropdown`]},"entry-grid":{entries:[`elements/entry-grid.ts`],tags:[`wui-entry-grid`]},"image-crop":{entries:[`elements/image-crop.ts`],tags:[`wui-image-crop`]},"inline-edit":{entries:[`elements/inline-edit.ts`],tags:[`wui-inline-edit`]},kanban:{entries:[`elements/kanban.ts`],tags:[`wui-kanban`]},"lead-popup":{entries:[`elements/lead-popup.ts`],tags:[`wui-lead-popup`]},lightbox:{entries:[`elements/lightbox.ts`],tags:[`wui-lightbox`]},"org-tree":{entries:[`elements/org-tree.ts`],tags:[`wui-org-tree`]},markdown:{entries:[`elements/markdown.ts`],tags:[`wui-markdown`]},phone:{entries:[`elements/phone.ts`,`global/parts/select-country.ts`],tags:[`wui-phone`]},popover:{entries:[`elements/popover.ts`],tags:[`wui-popover`]},"saved-views":{entries:[`elements/saved-views.ts`],tags:[`wui-saved-views`]},glyphs:{entries:[`global/parts/glyphs.ts`],tags:[]},"select-chips":{entries:[`global/parts/select-chips.ts`],tags:[]},"select-recents":{entries:[`global/parts/select-recents.ts`],tags:[]},"select-search":{entries:[`global/parts/select-search.ts`],tags:[]},slider:{entries:[`elements/slider.ts`],tags:[`wui-slider`]},sortable:{entries:[`elements/sortable.ts`],tags:[`wui-sortable`]},"status-icon":{entries:[`elements/status-icon.ts`],tags:[`wui-status-icon`]},timepicker:{entries:[`elements/timepicker.ts`],tags:[`wui-timepicker`]},tour:{entries:[`elements/tour.ts`],tags:[`wui-tour`]},tree:{entries:[`elements/tree.ts`],tags:[`wui-tree`]},wizard:{entries:[`elements/wizard.ts`],tags:[`wui-wizard-step`,`wui-wizard`]},chart:{file:`ui-chart.global.js`,tags:[`wui-chart`],selfContained:!0},calendar:{file:`ui-calendar.global.js`,tags:[`wui-calendar`],selfContained:!0},"rich-text":{file:`ui-rich-text.global.js`,tags:[`wui-rich-text`],selfContained:!0},"file-viewer":{file:`ui-file-viewer.global.js`,tags:[`wui-file-viewer`],selfContained:!0}});Object.freeze({anchorOverlay:`anchorOverlay.ts`,buttonClass:`buttonClass.ts`,calendarMath:`calendarMath.ts`,copyText:`copyText.ts`,dataTable:`dataTable.ts`,defineElement:`defineElement.ts`,devWarn:`devWarn.ts`,dom:`dom.ts`,elementBase:`elementBase.ts`,fieldState:`fieldState.ts`,formatters:`formatters.ts`,formMirror:`formMirror.ts`,glyphs:`global/glyphs.ts`,iconGlyphs:`iconGlyphs.g.ts`,imeSafeEnter:`imeSafeEnter.ts`,isDrawn:`isDrawn.ts`,listboxKeyNav:`listboxKeyNav.ts`,loader:`global/loader.ts`,mentionText:`mentionText.ts`,menuKeyNav:`menuKeyNav.ts`,nativeOverlay:`nativeOverlay.ts`,notificationDays:`notificationDays.ts`,optionLabel:`optionLabel.ts`,partRegistry:`select/partRegistry.ts`,selectList:`select/list.ts`,selectRemote:`select/remote.ts`,stepperHeader:`stepperHeader.ts`,tableSelect:`tableSelect.ts`,textMatch:`textMatch.ts`,tooltips:`tooltips.ts`,wuiHttp:`server/wuiHttp.ts`,WuiSelect:`WuiSelect.ts`,zone:`zone.ts`});var Mr=`ui-elements/`;function Nr(e){let t=jr[e];if(t===void 0)throw Error(`[webority-ui] No on-demand element chunk is named ${e}.`);return t}function Pr(e){let t=Nr(e);if(!t.selfContained)return`${Mr+e}.global.js`;if(t.file===void 0)throw Error(`[webority-ui] The self-contained element chunk ${e} names no file.`);return t.file}var Fr=n({CHUNK_DIR:()=>Mr,CHUNK_RETRY_MS:()=>Rr,ELEMENTS_DEFINED_EVENT:()=>Ir,ELEMENTS_LOAD_ERROR_EVENT:()=>Lr,assetUrl:()=>Zr,loadChunk:()=>Qr,startElementLoader:()=>Jr,stopElementLoader:()=>Yr,whenElementsReady:()=>Xr}),Ir=`wui-elements:defined`,Lr=`wui-elements:load-error`,Rr=1e3,zr={"ui-elements/carousel.global.js":`8427b6999f4c`,"ui-elements/code-block.global.js":`2112f10d7e00`,"ui-elements/command-palette.global.js":`946ab4d7870f`,"ui-elements/comment-thread.global.js":`ac5fd1955722`,"ui-elements/consent-banner.global.js":`e16adc375848`,"ui-elements/context-menu.global.js":`576f6cb68081`,"ui-elements/date-range.global.js":`81c8a69cf5cd`,"ui-elements/drawer.global.js":`f91318164fa2`,"ui-elements/dropdown.global.js":`48809b50f2bc`,"ui-elements/entry-grid.global.js":`19fc8c084eae`,"ui-elements/image-crop.global.js":`3376ca17b259`,"ui-elements/inline-edit.global.js":`347b5ad3f393`,"ui-elements/kanban.global.js":`a346a2c8a592`,"ui-elements/lead-popup.global.js":`0d172ec9331e`,"ui-elements/lightbox.global.js":`cab5c4b4db17`,"ui-elements/org-tree.global.js":`9719a21f4d0e`,"ui-elements/markdown.global.js":`7ba0ae9cc8ec`,"ui-elements/phone.global.js":`3ceb6a4d8d43`,"ui-elements/popover.global.js":`422d0f68ab33`,"ui-elements/saved-views.global.js":`91fbb7112d4c`,"ui-elements/glyphs.global.js":`ff6e5f8b2761`,"ui-elements/select-chips.global.js":`27a5f99ac371`,"ui-elements/select-recents.global.js":`424d9a5b9ba4`,"ui-elements/select-search.global.js":`7ec8dc9f1503`,"ui-elements/slider.global.js":`09641bcf22b1`,"ui-elements/sortable.global.js":`6bf6091b44f1`,"ui-elements/status-icon.global.js":`7bb6b1e48355`,"ui-elements/timepicker.global.js":`747b90540fe0`,"ui-elements/tour.global.js":`8a3736abd6a5`,"ui-elements/tree.global.js":`7733c31f0be4`,"ui-elements/wizard.global.js":`b7eef98bd741`,"ui-chart.global.js":`9f65e9d54b5f`,"ui-calendar.global.js":`b17d17688fdd`,"ui-rich-text.global.js":`ad9d154e5576`,"ui-file-viewer.global.js":`17f1353ea58e`,"ui-phone.global.js":`c646775bc1d1`},Br=new Map;for(let[e,t]of Object.entries(jr))for(let n of t.tags)Br.set(n,e);var Vr=[...Br.keys()].join(`,`),Hr=null,Ur=``,Wr=!1,Gr=null,Kr=new Map;function qr(){let e=document.currentScript;return e instanceof HTMLScriptElement?e:null}function Jr(e=qr()){Wr||(Wr=!0,Hr=e?.src?e.src:null,Ur=e?.nonce||``,ni(document),Gr=new MutationObserver(e=>{for(let t of e)for(let e of t.addedNodes)e instanceof Element&&ni(e)}),Gr.observe(document.documentElement,{childList:!0,subtree:!0}))}function Yr(){Gr?.disconnect(),Gr=null,Wr=!1,Hr=null,Ur=``,Kr.clear()}function Xr(e=document){return Promise.all([...ti(e)].map(e=>Qr(e))).then(()=>void 0)}function Zr(e){if(Hr===null)throw Error(`The on-demand element files have no address to load from.`);let t=new URL(e,Hr);return t.search=Object.hasOwn(zr,e)?`?v=${zr[e]}`:``,t.href}function Qr(e){let t=Kr.get(e);if(t?.promise)return t.promise;let n=Nr(e),{tags:r}=n,i=Pr(e),a=()=>Promise.all(r.map(e=>customElements.whenDefined(e))),o={status:`loading`,promise:null},s=new Promise((t,s)=>{let c=``,l=()=>{Gr&&Object.keys(jr).every(e=>Kr.get(e)?.status===`loaded`||Kr.get(e)?.status===`failed`)&&Gr.disconnect()},u=()=>{o.status=`loaded`,l(),document.dispatchEvent(new CustomEvent(Ir,{detail:{chunk:e,tags:r}})),t()},d=t=>{o.status=`failed`,l(),H(`[webority-ui] Could not load ${c} for ${r.length?r.join(`, `):e}.${t?` ${t.message}`:``}`),document.dispatchEvent(new CustomEvent(Lr,{detail:{chunk:e,url:c,tags:r}})),s(Error(`[webority-ui] The ${e} elements failed to load.`))},f=(e,t)=>{let i=document.createElement(`script`);i.src=e,i.async=!1,Ur&&(i.nonce=Ur),i.addEventListener(`load`,()=>{!n.selfContained&&!r.every(e=>customElements.get(e))?d(Error(`The file ran but did not define its elements; see the error above.`)):a().then(u)}),i.addEventListener(`error`,()=>{i.remove(),t?d():setTimeout(()=>f(e,!0),Rr)}),document.head.append(i)};if([...document.scripts].some(e=>new URL(e.src,location.href).pathname.endsWith(`/${i}`)))a().then(u);else{try{c=Zr(i)}catch(e){d(e instanceof Error?e:void 0);return}f(c,!1)}});return o.promise=s,Kr.set(e,o),s}function $r(e){return Br.has(e.localName)&&!customElements.get(e.localName)}function ei(e,t){let n=Br.get(t.localName);n!==void 0&&$r(t)&&e.add(n)}function ti(e){let t=new Set;e instanceof Element&&ei(t,e);for(let n of e.querySelectorAll(Vr))ei(t,n);return t}function ni(e){for(let t of ti(e))Promise.allSettled([Qr(t)])}var ri=n({GLYPH_CHUNK:()=>ii,GLYPH_PENDING_ATTRIBUTE:()=>ai,glyphSvg:()=>U,registerGlyphs:()=>pi}),ii=`glyphs`,ai=`data-wui-glyph-pending`,oi=`svg[${ai}]`,si=/^[a-z0-9]+(?:-[a-z0-9]+)*$/,ci={...Or},li=!1,ui=null;function di(e,t,n,r,i){return`<svg class="${n?`wui-icon ${n}`:`wui-icon`}" data-icon="${e}"${i?` ${ai}`:``} width="${t}" height="${t}" viewBox="0 0 24 24" fill="none" aria-hidden="true">${r}</svg>`}function U(e,{size:t=16,className:n=``}={}){let r=ci[e];return r===void 0?li||!si.test(e)?``:(Promise.allSettled([Qr(ii)]),di(e,t,n,``,!0)):di(e,t,n,r,!1)}function fi(e){let t=e instanceof Element&&e.matches(oi)?[e]:[];for(let n of[...t,...e.querySelectorAll(oi)]){let e=ci[n.getAttribute(`data-icon`)??``];e===void 0?n.remove():(n.removeAttribute(ai),n.innerHTML=e)}}function pi(e){Object.assign(ci,e),li=!0,fi(document),ui===null&&(ui=new MutationObserver(e=>{for(let t of e)for(let e of t.addedNodes)e instanceof Element&&fi(e)}),ui.observe(document.documentElement,{childList:!0,subtree:!0}))}var mi=n({TRUSTED_HTML:()=>hi,escapeHtml:()=>W,optionLabelHtml:()=>bi,optionText:()=>Ci,stripTags:()=>xi,withTrustedLabel:()=>gi}),hi=Symbol(`wui.trustedHtml`),gi=e=>({...e,[hi]:!0}),W=e=>String(e??``).replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`).replace(/"/g,`&quot;`).replace(/'/g,`&#39;`),_i=e=>{if(!e)return``;let t=String(e).toLowerCase().replace(/[^a-z0-9-]/g,``);return t?U(t):``},vi=e=>`wui-flag wui-flag-${e}`,yi=e=>{let t=String(e??``).toLowerCase();return/^[a-z]{2}$/.test(t)?`<span class="${vi(t)}" aria-hidden="true"></span>`:``},bi=e=>{if(e==null)return``;let t=e[hi]?String(e.label??``):W(e.label),n=yi(e.flag)+_i(e.icon);return n?`<span class="wui-opt-label">${n}${t}</span>`:t},xi=e=>String(e??``).replace(/<[^>]*>/g,``),Si=new WeakMap,Ci=e=>{if(e==null)return``;if(!e[hi])return xi(e.label);let t=Si.get(e);if(t&&t.label===e.label)return t.text;let n=document.createElement(`template`);n.innerHTML=String(e.label??``);let r=n.content.textContent??``;return Si.set(e,{label:e.label,text:r}),r},wi=class extends s{static formAssociated=!0;static get observedAttributes(){return[`value`,`min`,`max`,`placeholder`,`disabled`,`readonly`,`loading`,`first-day`,`disabled-weekdays`,`display-format`,`size`,`aria-label`,`aria-describedby`,`aria-invalid`]}_internals;_value;_defaultValue;_rendered;_viewY;_viewM;_mode;_focus;_slide;_viewNavigated;_openFn;_closeFn;_onKeyBound;_closingQuietly;get _open(){return N(this._openFn,`open missing`)}get _close(){return N(this._closeFn,`close missing`)}constructor(){super();try{this._internals=this.attachInternals()}catch{this._internals=null}this._value=``;let e=new Date(2e3,0,1);this._viewY=e.getFullYear(),this._viewM=e.getMonth(),this._mode=`days`,this._focus=null,this._slide=``}connectedCallback(){this._rendered||this.render()}disconnectedCallback(){this._dropPanel()}attributeChangedCallback(e,t,n){if(e===`aria-invalid`)this._syncInvalid();else if(this._rendered){if(e===`value`)this._value=n||``,this._syncFormValue(),this._syncTrigger();else if(e===`display-format`)this._syncTrigger();else if(e===`first-day`){let e=this.querySelector(`.datepicker-pop`);e instanceof HTMLDivElement&&M(e)&&this._renderView()}else this.render()}}_syncInvalid(){let e=this.querySelector(`.datepicker-trigger`);e instanceof HTMLButtonElement&&(this.hasAttribute(`aria-invalid`)?e.setAttribute(`aria-invalid`,`true`):e.removeAttribute(`aria-invalid`))}formResetCallback(){this.value=this._defaultValue||``}get value(){return this._value}set value(e){this._value=e||``,V(this,this._value),this._syncTrigger()}_firstDay(){return fr(this)}render(){this._dropPanel(),this._defaultValue===void 0&&(this._defaultValue=this.getAttribute(`value`)||``,this._value=this._defaultValue||this._value);let e=this.getAttribute(`placeholder`)||`Choose a date`,t=z(this._value);t&&(this._viewY=t.y,this._viewM=t.m);let n=this.getAttribute(`size`),r=n===`sm`?` input-sm`:n===`lg`?` input-lg`:``,i=this.getAttribute(`aria-label`),a=this.getAttribute(`aria-describedby`);this.innerHTML=`
1
+ var WeborityUiElements=(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=Object.defineProperty,n=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},r=n({defineElement:()=>i});function i(e,t){if(typeof customElements>`u`||customElements.get(e))return;let n=[];if(typeof document<`u`)for(let r of document.querySelectorAll(e))for(let i of Object.keys(r)){let a=Object.getOwnPropertyDescriptor(t.prototype,i);if(a&&(a.set||a.get)&&(n.push([r,i,Reflect.get(r,i)]),!Reflect.deleteProperty(r,i)))throw Error(`defineElement: could not clear the early "${i}" property on <${e}>.`)}customElements.define(e,t);for(let[t,r,i]of n)if(!Reflect.set(t,r,i))throw Error(`defineElement: could not restore the "${r}" property on <${e}>.`)}var a=n({ElementBase:()=>s,NO_DOM_MESSAGE:()=>o}),o=`@webority/ui-elements needs a browser DOM; import its types or helpers entry on the server`;if(typeof HTMLElement>`u`)throw Error(o);var s=HTMLElement,c=n({anchorOverlay:()=>x,bindReanchor:()=>S,unbindReanchor:()=>C}),l=4,u=8,d=300,f=400;function p(e,t){let n=t.offsetWidth,r=t.offsetHeight,i=e.right+l+n>window.innerWidth-l,a=i?e.left-l-n:e.right+l;t.style.left=`${Math.max(l,a)}px`,t.style.top=`${Math.max(l,Math.min(e.top,window.innerHeight-r-l))}px`,t.dataset.side=i?`start`:`end`}var m=8,h={top:`bottom`,bottom:`top`,start:`end`,end:`start`},g=[`bottom`,`top`,`end`,`start`];function _(e,t){return e===`bottom`?window.innerHeight-t.bottom:e===`top`?t.top:e===`end`?window.innerWidth-t.right:t.left}function v(e,t,n,r){return e===`start`?t:e===`end`?n-r:t+(n-t-r)/2}function y(e,t,n){return Math.max(m,Math.min(e,t-n-m))}function b(e,t,n,r){let i=r.gap??l,a=r.align??`start`,o=t.offsetWidth,s=t.offsetHeight,c=n===`auto`?g.reduce((t,n)=>_(n,e)>_(t,e)?n:t):n,u=c===`top`||c===`bottom`,d=(u?s:o)+i,f=_(c,e)<d&&_(h[c],e)>_(c,e)?h[c]:c,p,m;if(u){m=f===`bottom`?e.bottom+i:Math.max(l,e.top-s-i);let t=v(a,e.left,e.right,o);r.flipAlign&&a===`start`&&t+o>window.innerWidth-l&&e.right-o>=l?t=e.right-o:r.flipAlign&&a===`end`&&t<l&&e.left+o<=window.innerWidth-l&&(t=e.left),p=Math.max(l,Math.min(t,window.innerWidth-o-l))}else p=Math.max(l,f===`end`?e.right+i:e.left-o-i),m=Math.max(l,Math.min(v(a,e.top,e.bottom,s),window.innerHeight-s-l));t.style.left=`${p}px`,t.style.top=`${m}px`,t.dataset.side=f;let b=r.arrow;if(b){if(u){let t=(e.left+e.right)/2-p-b.offsetWidth/2;b.style.left=`${y(t,o,b.offsetWidth)}px`}else{let t=(e.top+e.bottom)/2-m-b.offsetHeight/2;b.style.top=`${y(t,s,b.offsetHeight)}px`}}}function x(e,t,n={}){if(!e)throw Error(`anchorOverlay: missing trigger`);if(!t)throw Error(`anchorOverlay: missing panel`);t.style.position=`fixed`;let r=e.getBoundingClientRect();if(n.beside){p(r,t);return}if(n.side!==void 0){t.classList.remove(`drop-up`),t.style.maxHeight=``,b(r,t,n.side,n);return}let i=n.clampHeight?t.scrollTop:0;n.clampHeight&&(t.style.maxHeight=``);let a=t.offsetHeight,o=window.innerHeight-r.bottom,s=!n.below&&o<a+l&&r.top>o;if(t.classList.toggle(`drop-up`,s),t.style.top=s?`${Math.max(l,r.top-a-l)}px`:`${r.bottom+l}px`,n.clampHeight){let e=s?r.top-8:window.innerHeight-r.bottom-8;e<a&&(t.style.maxHeight=`${Math.max(e,0)}px`),t.scrollTop=i}n.matchWidth&&(r.width>=d?(t.style.minWidth=`${r.width}px`,t.style.width=`${r.width}px`,t.style.maxWidth=`${r.width}px`):(t.style.minWidth=`${r.width}px`,t.style.width=`max-content`,t.style.maxWidth=`${Math.min(f,window.innerWidth-8)}px`));let c=t.offsetWidth;if(n.alignEnd){let e=r.right-c,n=e>=u?e:r.left,i=Math.max(u,Math.min(n,window.innerWidth-c-u));t.style.left=`${i}px`}else{let e=n.flipAlign&&r.left+c>window.innerWidth-l&&r.right-c>=l,i=Math.min(e?r.right-c:r.left,window.innerWidth-c-l);t.style.left=`${Math.max(l,i)}px`}}function S(e,t){C(e),e._reanchor=t,e._reanchorScroll=n=>{n.composedPath().includes(e)||t()},window.addEventListener(`resize`,e._reanchor),window.addEventListener(`scroll`,e._reanchorScroll,!0)}function C(e){if(!e?._reanchor)return;window.removeEventListener(`resize`,e._reanchor);let t=e._reanchorScroll;t&&window.removeEventListener(`scroll`,t,!0),e._reanchor=null,e._reanchorScroll=null}var ee=n({CLOSE_MOTION_LIMIT_MS:()=>400,CLOSING_ATTRIBUTE:()=>E,DISMISS_ATTRIBUTE:()=>T,OPEN_ATTRIBUTE:()=>w,closeAnchoredPopover:()=>k,closeModalDialog:()=>Te,isPopoverOpen:()=>A,onOverlayRootChange:()=>je,openAnchoredPopover:()=>Ee,openModalDialog:()=>we,overlayRoot:()=>Ae,raisePopover:()=>Oe,returnFocus:()=>xe,setPopoverOpen:()=>De,wireOpenTriggers:()=>Me}),w=`data-wui-open`,T=`data-wui-dismiss`,E=`data-wui-closing`,te=`[${T}]`,D=`[${w}]`,ne=`(prefers-reduced-motion: reduce)`,re=`a[href],button:not([disabled]),input:not([disabled]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex="-1"])`,ie=400,ae=new WeakSet,oe=new WeakSet,se=new WeakSet,ce=Symbol.for(`webority.ui.modal-stack`),le=Symbol.for(`webority.ui.root-watches`);function ue(e){let t=e;return t[le]??=new Set,t[le]}var de=new WeakMap,fe=new WeakMap,pe=new WeakMap;function me(e){let t=e.querySelector(`[data-autofocus]`);if(t)return t;let n=null;for(let t of e.querySelectorAll(re))if(!t.closest(`[hidden],[inert]`)){if(!t.closest(`${te},.wui-modal-back`))return t;n??=t}return n}function he(e){let t=[],n=new Map;for(let r of e.querySelectorAll(re))if(!(r.closest(`[hidden],[inert]`)||r.closest(`dialog`)!==e)&&!(r.tabIndex<0||r.getClientRects().length===0)){if(r instanceof HTMLInputElement&&r.type===`radio`&&r.name){let e=n.get(r.name);e?r.checked&&!e.checked&&(e.checked=r,t[t.indexOf(e.first)]=r):(n.set(r.name,{first:r,checked:r.checked?r:null}),t.push(r))}else t.push(r)}return t}function ge(e){return e.localName.includes(`-`)&&`show`in e&&typeof e.show==`function`}function O(e){let t=e;return t[ce]??=[],t[ce]}function _e(e){ve(e),O(e.ownerDocument).push(e)}function ve(e){let t=O(e.ownerDocument),n=t.indexOf(e);n>=0&&t.splice(n,1)}function ye(e){for(let t of ue(e)){let n=Ae(e);t.last!==n&&(t.last=n,t.listener(n))}}function be(e){let t=Promise.allSettled(e.getAnimations().map(e=>e.finished));return new Promise(e=>{let n=window.setTimeout(e,400);t.then(()=>{window.clearTimeout(n),e()})})}function xe(e,t){if(!e?.isConnected)return;let n=e.ownerDocument.activeElement;(!n||n===e.ownerDocument.body||t.contains(n))&&e.focus()}function Se(e){let t=e.getBoundingClientRect();return t.bottom<0||t.right<0||t.top>window.innerHeight||t.left>window.innerWidth}function Ce(e,t){pe.get(e)?.();let n=t.ownerDocument,r=0,i=()=>{window.clearTimeout(o),window.clearTimeout(r),n.removeEventListener(`pointerdown`,i,!0),n.removeEventListener(`keydown`,i,!0),t.removeEventListener(`click`,a,!0),pe.delete(e)},a=()=>{t.removeEventListener(`click`,a,!0),r=window.setTimeout(i,0)},o=window.setTimeout(i,ie);n.addEventListener(`pointerdown`,i,!0),n.addEventListener(`keydown`,i,!0),t.addEventListener(`click`,a,!0),pe.set(e,i)}function we(e,t){let n=t.focus===`first-control`?me(e):null,r=n??e,i=r===e&&!e.hasAttribute(`tabindex`);i&&e.setAttribute(`tabindex`,`-1`);let a=!t.escape&&!e.hasAttribute(`closedby`);a&&e.setAttribute(`closedby`,`none`),ae.add(e);let o=()=>{if(_e(e),!e.hasAttribute(`open`)){let t=n!==null&&!e.querySelector(`[autofocus]`);t&&n.setAttribute(`autofocus`,``);try{e.showModal()}catch(t){throw ve(e),t}finally{t&&n.removeAttribute(`autofocus`)}}r.focus(),ye(e.ownerDocument)},s=!1,c=n=>{if(n.key!==`Escape`||n.defaultPrevented||!t.escape||n.altKey||n.ctrlKey||n.metaKey)return;let r=e.ownerDocument;Ae(r)===e&&(e.querySelector(`:popover-open`)||r.querySelector(`[popover=""]:popover-open, [popover="auto"]:popover-open`)||(s=!0,window.setTimeout(()=>{s&&ae.has(e)&&e.open&&(s=!1,t.onRequestClose(`escape`))},0)))},l=t=>{if(t.key!==`Tab`||t.defaultPrevented||t.altKey||t.ctrlKey||t.metaKey)return;let n=e.ownerDocument;if(Ae(n)!==e||e.querySelector(`:popover-open`))return;t.preventDefault();let r=he(e),i=r[0],a=r[r.length-1];if(!i||!a){e.focus();return}let o=n.activeElement,s=o?r.findIndex(e=>e===o||e.contains(o)):-1;s<0?(t.shiftKey?a:i).focus():r[((t.shiftKey?s-1:s+1)+r.length)%r.length]?.focus()},u=e=>{s=!1,e.preventDefault(),t.escape&&t.onRequestClose(`escape`)},d=n=>{let r=n.target;if(!(r instanceof Element))return;let i=r.closest(te);if(i&&i.closest(`dialog`)===e){t.onRequestClose(`dismiss`);return}if(r!==e||!t.backdrop)return;let a=e.getBoundingClientRect();(n.clientX<a.left||n.clientX>a.right||n.clientY<a.top||n.clientY>a.bottom)&&t.onRequestClose(`backdrop`)},f=()=>{let n=s;s=!1,ve(e),ae.has(e)?(o(),n&&t.onRequestClose(`escape`)):ye(e.ownerDocument)},p=e.ownerDocument;return p.addEventListener(`keydown`,c),p.addEventListener(`keydown`,l),e.addEventListener(`cancel`,u),e.addEventListener(`click`,d),e.addEventListener(`close`,f),o(),()=>{p.removeEventListener(`keydown`,c),p.removeEventListener(`keydown`,l),e.removeEventListener(`cancel`,u),e.removeEventListener(`click`,d),e.removeEventListener(`close`,f),ae.delete(e),i&&e.removeAttribute(`tabindex`),a&&e.removeAttribute(`closedby`),ve(e),ye(e.ownerDocument)}}async function Te(e){ae.delete(e),e.setAttribute(E,``),!window.matchMedia(ne).matches&&typeof e.getAnimations==`function`&&e.getAnimations().length>0&&await be(e),e.close(),ve(e),ye(e.ownerDocument),e.removeAttribute(E)}function Ee(e,t,n){let r=pe.get(t);if(r){r();return}de.get(t)?.(),t.setAttribute(`popover`,n.mode),t.showPopover();let i=()=>x(e,t,n);try{i()}catch(e){throw k(t),e}S(t,()=>{!A(t)||!t.isConnected?fe.get(t)?.():e.isConnected&&n.scrollSettling?.()?i():!e.isConnected||!n.keepOffscreen&&Se(e)?k(t):i()});let a=e=>{`newState`in e&&e.newState===`closed`&&fe.get(t)?.()},o=()=>{n.mode===`auto`&&A(t)&&Ce(t,e)};t.addEventListener(`toggle`,a),e.addEventListener(`pointerdown`,o,!0),de.set(t,()=>{t.removeEventListener(`toggle`,a),e.removeEventListener(`pointerdown`,o,!0),C(t),de.delete(t),fe.delete(t)}),fe.set(t,()=>{de.get(t)?.(),n.onClosed?.()})}function k(e){A(e)&&e.hidePopover(),fe.get(e)?.()}function A(e){return e.matches(`:popover-open`)}function De(e,t){ke(e),A(e)!==t&&(t?e.showPopover():e.hidePopover())}function Oe(e){if(ke(e),!e.isConnected)throw Error(`nativeOverlay: raisePopover was given a panel that is not on the page; a caller whose overlay root can leave the page skips the raise until the panel moves to the new root`);e.hidePopover(),e.showPopover()}function ke(e){if(!e.hasAttribute(`popover`))throw Error(`nativeOverlay: the panel has no popover attribute`)}function Ae(e=document){let t=O(e);for(let e=t.length-1;e>=0;e--){let n=t[e];if(n?.isConnected&&n.hasAttribute(`open`))return n}return e.body}function je(e,t=document){oe.has(t)||(oe.add(t),t.addEventListener(`toggle`,()=>ye(t),!0),t.addEventListener(`close`,()=>ye(t),!0));let n={last:Ae(t),listener:e};return ue(t).add(n),()=>{ue(t).delete(n)}}function Me(e){se.has(e)||(se.add(e),e.addEventListener(`click`,t=>{let n=t.target,r=n instanceof Element?n.closest(D):null;if(!(r instanceof HTMLElement))return;let i=(r.getAttribute(`data-wui-open`)??``).replace(/^#/,``),a=e.getElementById(i);if(!a)throw Error(`[data-wui-open] names #${i}, which is not on the page.`);ge(a)&&(t.preventDefault(),a.show(r))}))}var Ne=n({closestOf:()=>M,elementOf:()=>Pe,must:()=>j});function j(e,t){if(e==null)throw Error(t);return e}function Pe(e,t,n){if(!(e instanceof t))throw TypeError(n);return e}function M(e,t){return e instanceof Element?e.closest(t):null}var Fe=n({fillText:()=>P,pluralText:()=>Ke,readText:()=>N,setText:()=>Ue,subscribeText:()=>We,textLocale:()=>Ge}),Ie=`en-IN`,Le=/\{([A-Za-z0-9_]+)\}/g,Re,ze=new Map,Be=0,Ve=new Set,He=new Map;function Ue(e){let t=new Map,n,r=Object.entries(e);for(let[e,i]of r)if(i!==void 0){if(e===`locale`){if(typeof i!=`string`)throw RangeError(`Text locale must be a BCP 47 tag string.`);n=i}else{if(!qe(i))throw RangeError(`Text ${e} must be an object of string keys.`);t.set(e,Je(e,i))}}Re=n,ze=t,Be+=1;for(let e of Array.from(Ve))e()}function N(e,t){let n=ze.get(e);if(n===void 0)return t;let r=He.get(e);if(r!==void 0&&r.version===Be&&r.english===t&&Xe(r.merged,t))return r.merged;let i=Ye(e,n,t);return He.set(e,{version:Be,english:t,merged:i}),i}function We(e){return Ve.add(e),()=>{Ve.delete(e)}}function Ge(){return Re??Ie}function P(e,t){return e.replace(Le,(e,n)=>Object.hasOwn(t,n)?String(t[n]):e)}function Ke(e,t,n,r){let i=`${t}Other`;if(!Object.hasOwn(e,i))throw RangeError(`Plural text ${t} has no ${i} key; every plural needs its Other form.`);let a=new Intl.PluralRules(Ge()).select(n),o=`${t}${a.charAt(0).toUpperCase()}${a.slice(1)}`,s=e[Object.hasOwn(e,o)?o:i];if(s===void 0)throw RangeError(`Plural text ${t} has no ${o} key.`);return P(s,{count:n,...r})}function qe(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Je(e,t){let n={};for(let[r,i]of Object.entries(t)){if(typeof i!=`string`)throw RangeError(`Text ${e}.${r} must be a string.`);n[r]=i}return n}function Ye(e,t,n){let r={};for(let[i,a]of Object.entries(t)){let t=Object.hasOwn(n,i)?n[i]:void 0;if(t===void 0)throw RangeError(`Text ${e}.${i} is not a key of the English text. Allowed keys: ${Object.keys(n).join(`, `)}.`);let o=Ze(t);for(let t of Ze(a))if(!o.includes(t))throw RangeError(`Text ${e}.${i} uses {${t}}, which the English text does not have. Allowed placeholders: ${o.length===0?`none`:o.map(e=>`{${e}}`).join(`, `)}.`);r[i]=a}return Object.assign({},n,r)}function Xe(e,t){let n=Object.keys(t);return Object.keys(e).length===n.length&&n.every(t=>Object.hasOwn(e,t))}function Ze(e){return Array.from(e.matchAll(Le),e=>e[1]??``)}var Qe=`data-wui-shortcuts`,$e=`data-shortcut-scope`,et=`wui:shortcut`,tt={"/":`slash`,"?":`help`,Escape:`esc`,Esc:`esc`,Enter:`enter`},nt={esc:`Esc`,escape:`Esc`,enter:`Enter`,slash:`/`,help:`?`},rt={esc:`Escape`,ctrl:`Control`,cmd:`Meta`,option:`Alt`,opt:`Alt`},it=new Set([`checkbox`,`radio`,`button`,`submit`,`reset`,`range`,`color`,`file`,`image`]),at=new Set([`textbox`,`searchbox`,`combobox`]),ot=`a[href], button, summary, input, select, textarea, [role="button"], [role="link"], [role="menuitem"], [role="option"], [role="tab"], [role="checkbox"], [role="switch"]`;function st(e){if(!e||e.ctrlKey||e.metaKey||e.altKey)return null;let t=e.key;return typeof t!=`string`||!t?null:tt[t]?tt[t]:t.length===1&&t.trim()?t.toLowerCase():null}function ct(e){let t=String(e??``).trim();return t.length===1?t.toUpperCase():nt[t.toLowerCase()]??t}function lt(e){return String(e??``).trim().split(/\s+/).filter(Boolean).map(e=>rt[e.toLowerCase()]??(e.length===1?e.toUpperCase():e)).join(`+`)}function ut(e){if(!e||!dt(e))return!1;if(e instanceof HTMLElement&&e.isContentEditable||e.closest?.(`[contenteditable=""], [contenteditable="true"], [contenteditable="plaintext-only"]`)||e.tagName===`TEXTAREA`||e.tagName===`SELECT`)return!0;if(e.tagName===`INPUT`){let t=e instanceof HTMLInputElement&&e.type?e.type:`text`;return!it.has(t.toLowerCase())}return at.has(e.getAttribute?.(`role`))}function dt(e){return e.nodeType===1}function ft(e=typeof document>`u`?null:document){return e?.documentElement?.getAttribute(Qe)===`off`}function pt(e,t){if(!t||e&&t.contains(e))return!0;let n=t.ownerDocument;return(!e||e===n.body||e===n.documentElement)&&n.querySelector(`[data-shortcut-scope]`)===t}function mt(e,t,n=null){let r=e.target instanceof Node?e.target:null;if(!t||e.defaultPrevented||ft(r?.ownerDocument??void 0))return!1;let i=st(e);if(!i||!pt(r,n)||ut(r))return!1;let a=t[i]??(i.length===1?t[i.toUpperCase()]:void 0);return typeof a!=`function`||i===`enter`&&r instanceof Element&&r.closest(ot)?!1:(e.preventDefault(),a(e),!0)}function ht(e,t){let n=e[0]?.ownerDocument;if(!n)return null;let r=n.activeElement,i=e.findIndex(e=>e===r||e.contains(r));if(i<0&&r&&r!==n.body){let t=r.closest?.(`li, tr`);t&&(i=e.findIndex(e=>t.contains(e)))}i<0&&(i=e.findIndex(e=>e.getAttribute(`aria-current`)===`true`));let a=j(e[i<0?t>0?0:e.length-1:Math.min(e.length-1,Math.max(0,i+t))],`moveFocus: no item at the clamped index`);return a.focus(),a.scrollIntoView?.({block:`nearest`}),a}var gt=2,_t=`wui-filter-popover-pinned`,vt=`.wui-filter-popover-trigger`,yt=`.wui-filter-popover-panel`,bt=`.wui-filter-popover-head`,xt=`input:not([type]),input[type="text"],input[type="search"]`,St=`a[href],button:not([disabled]),input:not([disabled]):not([type='hidden']),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex='-1'])`;function Ct(){try{return sessionStorage.getItem(_t)===`1`}catch{return!1}}function wt(e){try{e?sessionStorage.setItem(_t,`1`):sessionStorage.removeItem(_t)}catch(e){if(!(e instanceof DOMException))throw e}}function Tt(e){if(e===null||e instanceof Node)return e;throw TypeError(`event target is not a node`)}function Et(e,t){let n=e?.querySelector(t)??null;return n instanceof HTMLElement?n:null}var Dt=class extends s{_doc;_timer;_sticky;_closingByCode;_inside;_pendingSubmit;_onEnter;_onLeave;_onClick;_onChange;_onListClose;_onFocusOut;_onKeyDown;_onShortcut;constructor(){super(),this._doc=null,this._timer=null,this._sticky=!1,this._closingByCode=!1,this._inside=!1,this._pendingSubmit=!1,this._onEnter=e=>{e.pointerType!==`touch`&&e.pointerType!==`pen`&&(this._inside=!0,this._schedule(!0))},this._onLeave=e=>{e.pointerType!==`touch`&&e.pointerType!==`pen`&&(this._inside=!1,this._schedule(!1))},this._onClick=e=>{this._trigger?.contains(Tt(e.target))&&(this._clear(),this.isOpen&&this._sticky?this._close(!0):this._open(!0,e.detail===0))},this._onChange=e=>{let t=this._pin;if(t&&e.target===t){wt(t.checked),t.checked?this._clear():this._schedule(!1);return}let n=e.target;if(n instanceof Element&&n.closest(`wui-select[mode="multiple"], wui-select[mode="tag"]`)?.querySelector(`[aria-expanded="true"]`)){this._pendingSubmit=!0;return}let r=this.closest(`form.wui-filter-form`);r instanceof HTMLFormElement&&r.requestSubmit()},this._onListClose=()=>{if(!this._pendingSubmit)return;this._pendingSubmit=!1;let e=this.closest(`form.wui-filter-form`);e instanceof HTMLFormElement&&e.requestSubmit()},this._onFocusOut=e=>{this.contains(Tt(e.relatedTarget))||this._schedule(!1)},this._onKeyDown=e=>{let t=e.target;if(e.key!==`Enter`||!(t instanceof Element)||!this._panel?.contains(t)||!t.matches(xt))return;e.preventDefault();let n=this.closest(`form.wui-filter-form`);n instanceof HTMLFormElement&&n.requestSubmit()},this._onShortcut=e=>{this.ownerDocument.querySelector(`wui-filter-popover`)===this&&mt(e,{f:()=>this._open(!0,!0)})}}get isOpen(){let e=this._panel;return e?A(e):!1}connectedCallback(){this._doc=this.ownerDocument,this.addEventListener(`pointerenter`,this._onEnter),this.addEventListener(`pointerleave`,this._onLeave),this.addEventListener(`click`,this._onClick),this.addEventListener(`change`,this._onChange),this.addEventListener(`focusout`,this._onFocusOut),this.addEventListener(`keydown`,this._onKeyDown),this.addEventListener(`wui-select:close`,this._onListClose),this._doc.addEventListener(`keydown`,this._onShortcut),Ct()&&this._pin&&(this._pin.checked=!0,this._open(!1,!1))}disconnectedCallback(){this._clear();let e=this._panel;e&&this._closeByCode(e),this.removeEventListener(`pointerenter`,this._onEnter),this.removeEventListener(`pointerleave`,this._onLeave),this.removeEventListener(`click`,this._onClick),this.removeEventListener(`change`,this._onChange),this.removeEventListener(`focusout`,this._onFocusOut),this.removeEventListener(`keydown`,this._onKeyDown),this.removeEventListener(`wui-select:close`,this._onListClose),this._doc?.removeEventListener(`keydown`,this._onShortcut),this._doc=null}get _trigger(){return Et(this,vt)}get _panel(){return Et(this,yt)}get _pin(){let e=this.querySelector(`${bt} input[type="checkbox"]`);return e instanceof HTMLInputElement?e:null}get _pinned(){return this._pin?.checked===!0}_clear(){this._timer!==null&&clearTimeout(this._timer),this._timer=null}_schedule(e){if(this._clear(),e){if(this.isOpen)return;this._timer=setTimeout(()=>{this._timer=null,this._open(!1,!1)},150)}else this.isOpen&&!this._stayOpen()&&(this._timer=setTimeout(()=>{this._timer=null,this._stayOpen()||this._close(!1)},400))}_stayOpen(){let e=this._panel;return e?this._pinned||this._inside||e.contains(this.ownerDocument.activeElement)||e.querySelector(`[aria-expanded="true"]`)!==null:!1}_open(e,t){this._clear();let n=this._panel,r=this._trigger;n&&r&&(this.isOpen?e&&(this._sticky=!0):(r.setAttribute(`aria-expanded`,`true`),this._sticky=e,Ee(r,n,{mode:`auto`,clampHeight:!0,alignEnd:!0,onClosed:()=>this._closed()})),t&&(Et(n.querySelector(`.wui-filter-popover-grid`),St)??Et(n,St))?.focus())}_close(e){this._clear();let t=this._panel;if(!t||!this.isOpen)return;let n=t.contains(this.ownerDocument.activeElement);this._closeByCode(t),e&&n&&this._trigger?.focus()}_closeByCode(e){this._closingByCode=!0;try{k(e)}finally{this._closingByCode=!1}}_closed(){if(this._trigger?.setAttribute(`aria-expanded`,`false`),this._sticky=!1,this._closingByCode)return;let e=this._trigger,t=this._panel,n=this.ownerDocument.activeElement;e&&(n===this.ownerDocument.body||t?.contains(n))&&e.focus()}};function Ot(){i(`wui-filter-popover`,Dt)}var kt=`INR`,At=Object.freeze({INR:`₹`,USD:`$`,EUR:`€`,GBP:`£`,JPY:`¥`}),jt=e=>typeof e==`string`&&/^[A-Z]{3}$/.test(e),Mt=(e=`INR`)=>At[e]??`${e} `,Nt={aprShortLabel:`Apr`,aprilLabel:`April`,augShortLabel:`Aug`,augustLabel:`August`,decShortLabel:`Dec`,decemberLabel:`December`,emptyValueLabel:`-`,febShortLabel:`Feb`,februaryLabel:`February`,friMinLabel:`Fr`,friShortLabel:`Fri`,fridayLabel:`Friday`,janShortLabel:`Jan`,januaryLabel:`January`,julShortLabel:`Jul`,julyLabel:`July`,junShortLabel:`Jun`,juneLabel:`June`,marShortLabel:`Mar`,marchLabel:`March`,mayLabel:`May`,mayShortLabel:`May`,monMinLabel:`Mo`,monShortLabel:`Mon`,mondayLabel:`Monday`,novShortLabel:`Nov`,novemberLabel:`November`,octShortLabel:`Oct`,octoberLabel:`October`,satMinLabel:`Sa`,satShortLabel:`Sat`,saturdayLabel:`Saturday`,sepShortLabel:`Sep`,septemberLabel:`September`,sunMinLabel:`Su`,sunShortLabel:`Sun`,sundayLabel:`Sunday`,thuMinLabel:`Th`,thuShortLabel:`Thu`,thursdayLabel:`Thursday`,tueMinLabel:`Tu`,tueShortLabel:`Tue`,tuesdayLabel:`Tuesday`,wedMinLabel:`We`,wedShortLabel:`Wed`,wednesdayLabel:`Wednesday`},Pt=n({IST_OFFSET_MS:()=>Ft,IST_TIME_ZONE:()=>F,isTimeZone:()=>Rt,nowIn:()=>Gt,todayIn:()=>Wt,wallClockOf:()=>Ut,wallToInstant:()=>Vt,zoneOffsetMs:()=>Bt,zoneParts:()=>zt}),F=`Asia/Kolkata`,Ft=198e5,It=new Map;function Lt(e){let t=It.get(e);return t||(t=new Intl.DateTimeFormat(`en-US`,{timeZone:e,hourCycle:`h23`,year:`numeric`,month:`2-digit`,day:`2-digit`,hour:`2-digit`,minute:`2-digit`,second:`2-digit`}),It.set(e,t)),t}function Rt(e){if(typeof e!=`string`||e===``)return!1;try{return Lt(e),!0}catch{return!1}}function zt(e,t=F){if(t===`Asia/Kolkata`){let t=new Date(e+Ft);return{year:t.getUTCFullYear(),month:t.getUTCMonth(),day:t.getUTCDate(),hour:t.getUTCHours(),minute:t.getUTCMinutes(),second:t.getUTCSeconds()}}let n=Object.fromEntries(Lt(t).formatToParts(e).map(e=>[e.type,Number(e.value)]));return{year:Number(n.year),month:Number(n.month)-1,day:Number(n.day),hour:Number(n.hour)%24,minute:Number(n.minute),second:Number(n.second)}}function Bt(e,t=F){if(t===`Asia/Kolkata`)return Ft;let n=zt(e,t),r=new Date(0);return r.setUTCFullYear(n.year,n.month,n.day),r.setUTCHours(n.hour,n.minute,n.second,0),r.getTime()-Math.floor(e/1e3)*1e3}function Vt(e,t=F){let n=e-Bt(e,t);return n=e-Bt(n,t),n}var Ht=e=>e instanceof Date?e.getTime():e;function Ut(e,t=F){return new Date(e+Bt(e,t)).toISOString().slice(0,19)}function Wt(e=F,t=Date.now()){return Ut(Ht(t),e).slice(0,10)}function Gt(e=F,t=Date.now()){let n=Ht(t);return new Date(n+Bt(n,e))}var Kt=n({CURRENCIES:()=>Jt,DATE_PATTERNS:()=>Zt,DURATION_UNITS:()=>Xt,FORMAT_STYLES:()=>qt,IST_OFFSET_MS:()=>Ft,IST_TIME_ZONE:()=>F,MAX_DECIMALS:()=>20,MONEY_UNITS:()=>Yt,compactFormatOf:()=>In,emptyValueLabel:()=>I,formatCompact:()=>Dn,formatCurrency:()=>Tn,formatDate:()=>Nn,formatDateTime:()=>Ln,formatDayShort:()=>Pn,formatDuration:()=>An,formatNumber:()=>wn,formatPercent:()=>On,formatValue:()=>Fn,isMoneyUnit:()=>Qt,istParts:()=>Mn,monthLabel:()=>on,monthLongLabel:()=>sn,paiseToRupeeText:()=>bn,timeZoneLabel:()=>Bn,toInstant:()=>jn,weekdayLabel:()=>cn}),qt=[`number`,`currency`,`percent`,`compact`,`duration`,`date`],Jt=[`INR`,`USD`,`EUR`,`GBP`],Yt=[`rupees`,`paise`],Xt=[`ms`,`s`,`min`,`h`],Zt=[`day`,`month`,`year`,`datetime`,`time`];function Qt(e){return Yt.some(t=>t===e)}var $t=()=>N(`formatters`,Nt),I=()=>$t().emptyValueLabel,en=`−`,tn=[`janShortLabel`,`febShortLabel`,`marShortLabel`,`aprShortLabel`,`mayShortLabel`,`junShortLabel`,`julShortLabel`,`augShortLabel`,`sepShortLabel`,`octShortLabel`,`novShortLabel`,`decShortLabel`],nn=[`januaryLabel`,`februaryLabel`,`marchLabel`,`aprilLabel`,`mayLabel`,`juneLabel`,`julyLabel`,`augustLabel`,`septemberLabel`,`octoberLabel`,`novemberLabel`,`decemberLabel`],rn={short:[`sunShortLabel`,`monShortLabel`,`tueShortLabel`,`wedShortLabel`,`thuShortLabel`,`friShortLabel`,`satShortLabel`],long:[`sundayLabel`,`mondayLabel`,`tuesdayLabel`,`wednesdayLabel`,`thursdayLabel`,`fridayLabel`,`saturdayLabel`],min:[`sunMinLabel`,`monMinLabel`,`tueMinLabel`,`wedMinLabel`,`thuMinLabel`,`friMinLabel`,`satMinLabel`]},an=(e,t)=>$t()[j(e[t],`no date name at index ${t}`)],on=e=>an(tn,e),sn=e=>an(nn,e);function cn(e,t){return an(rn[t],e)}var ln=(e,t)=>j(e[t],`no compact unit at index ${t}`),un=[[1e7,`Cr`],[1e5,`L`],[1e3,`K`]],dn=[[1e9,`B`],[1e6,`M`],[1e3,`K`]],fn=e=>!e||e===`INR`?`en-IN`:`en-US`,pn=(e,t)=>typeof e==`number`&&Number.isInteger(e)&&e>=0&&e<=20?e:t,mn=new Map,hn=(e,t=`en-IN`)=>{let n=`${t}:${e}`,r=mn.get(n);return r||(r=new Intl.NumberFormat(t,{minimumFractionDigits:0,maximumFractionDigits:e}),mn.set(n,r)),r},gn=new Map,_n=(e,t=`en-IN`)=>{let n=`${t}:${e}`,r=gn.get(n);return r||(r=new Intl.NumberFormat(t,{minimumFractionDigits:e,maximumFractionDigits:e}),gn.set(n,r)),r},vn=e=>typeof e==`number`&&Number.isFinite(e),yn=e=>e<0&&!Object.is(Math.abs(e),0)?en:``;function bn(e){if(!Number.isInteger(e))throw Error(`A paise amount must be a whole number, got ${e}`);let t=BigInt(Math.abs(e)).toString().padStart(3,`0`);return`${e<0?`-`:``}${t.slice(0,-2)}.${t.slice(-2)}`}var xn=(e,t)=>t===`paise`?Number(bn(e)):e,Sn=2,Cn=(e,t,n)=>{let r=Math.min(t,Sn),i=10n**BigInt(Sn-r),a=(BigInt(bn(e).replace(`.`,``))+i/2n)/i,o=10n**BigInt(r),s=_n(0,n).format(a/o);return t===0?s:`${s}.${(a%o).toString().padStart(r,`0`)}${`0`.repeat(t-r)}`};function wn(e,{decimals:t}={}){if(!vn(e))return I();let n=hn(pn(t,2)).format(Math.abs(e));return n===`0`?`0`:yn(e)+n}function Tn(e,{unit:t=`rupees`,decimals:n,currency:r=`INR`}={}){if(!vn(e))return I();let i=pn(n,0),a=fn(r),o=t===`paise`?Cn(Math.abs(e),i,a):_n(i,a).format(Math.abs(e));return(Number(o.replace(/,/g,``))===0?``:yn(e))+Mt(r)+o}var En=e=>e>0&&e<.1?Math.min(20,1-Math.floor(Math.log10(e))):2;function Dn(e,{currency:t,unit:n=`rupees`}={}){if(!vn(e))return I();let r=t?xn(e,n):e,i=t?Mt(t):``,a=t?fn(t):`en-IN`,o=a===`en-IN`?un:dn,s=Math.abs(r),c=o.findIndex(([e])=>s>=e);if(c===-1){let e=hn(En(s),a).format(s);if(e!==`1,000`)return(e===`0`?``:yn(r))+i+e;c=o.length-1}let[l,u]=ln(o,c),d=s/l,f=d>=100?0:d>=10?1:2,p=Number(d.toFixed(f));return p>=100&&c>0&&(--c,[l,u]=ln(o,c),d=s/l,f=d>=100?0:d>=10?1:2,p=Number(d.toFixed(f))),`${yn(r)}${i}${hn(f,a).format(p)} ${u}`}function On(e,{decimals:t}={}){return vn(e)?`${wn(e*100,{decimals:pn(t,1)})}%`:I()}var kn={ms:1,s:1e3,min:6e4,h:36e5};function An(e,{unit:t=`s`}={}){if(!vn(e))return I();let n=kn[t]??1e3,r=Math.abs(e*n),i=yn(e);if(Math.round(r)<1e3)return`${i}${hn(0).format(r)} ms`;let a=r/1e3;if(a<10)return`${i}${hn(1).format(a)}s`;let o=Math.round(a);if(o<60)return`${i}${o}s`;let s=e=>String(e).padStart(2,`0`),c=Math.floor(o/60);if(c<60)return`${i}${c}m ${s(o%60)}s`;let l=Math.floor(c/60);return`${i}${hn(0).format(l)}h ${s(c%60)}m`}function jn(e,t=F){if(e instanceof Date)return e.getTime();if(vn(e))return e;if(typeof e!=`string`)return NaN;let n=/^(\d{4})-(\d{2})-(\d{2})$/.exec(e.trim());if(n){let[e,r,i]=[Number(n[1]),Number(n[2]),Number(n[3])],a=new Date(Date.UTC(2e3,r-1,i));return a.setUTCFullYear(e),a.getUTCFullYear()===e&&a.getUTCMonth()===r-1&&a.getUTCDate()===i?Vt(a.getTime(),t):NaN}return Date.parse(e)}function Mn(e,t=F){let{year:n,month:r,day:i,hour:a,minute:o}=zt(e,t);return{year:n,month:r,day:i,hour:a,minute:o}}function Nn(e,{pattern:t=`day`,timeZone:n=F}={}){let r=jn(e,n);if(!Number.isFinite(r))return I();let i=Mn(r,n),a=e=>String(e).padStart(2,`0`),o=`${a(i.day)}-${on(i.month)}-${i.year}`,s=`${a(i.hour)}:${a(i.minute)}`;switch(t){case`month`:return`${on(i.month)}-${i.year}`;case`year`:return String(i.year);case`datetime`:return`${o} ${s}`;case`time`:return s;default:return o}}function Pn(e,{timeZone:t=F}={}){let n=jn(e,t);if(!Number.isFinite(n))return I();let r=Mn(n,t);return`${String(r.day).padStart(2,`0`)}-${on(r.month)}`}function Fn(e,t){if(e==null||e===``)return I();let n=t?.style;if(n===`date`)return Nn(e,t);if(typeof e!=`number`)return String(e);switch(n){case`currency`:return Tn(e,t);case`percent`:return On(e,t);case`compact`:return Dn(e,t);case`duration`:return An(e,t);default:return wn(e,t)}}function In(e){let t=e?.style;return t===`currency`?{style:`compact`,currency:e?.currency??`INR`,unit:e?.unit}:!t||t===`number`?{style:`compact`}:e??{}}function Ln(e,{timeZone:t=F}={}){let n=jn(e);if(!Number.isFinite(n))return I();let r=Object.fromEntries(zn(t).formatToParts(n).map(e=>[e.type,e.value])),i=r.dayPeriod;if(i===void 0)throw Error(`Intl returned no day period for a 12-hour clock`);return`${r.day}-${on(Number(r.month)-1)}-${r.year}, ${r.hour}:${r.minute} ${i.toUpperCase()}`}var Rn=new Map;function zn(e){let t=Rn.get(e);return t||(t=new Intl.DateTimeFormat(`en-IN`,{day:`2-digit`,month:`numeric`,year:`numeric`,hour:`numeric`,minute:`2-digit`,hour12:!0,timeZone:e}),Rn.set(e,t)),t}function Bn(e=F){return new Intl.DateTimeFormat(`en-IN`,{timeZone:e,timeZoneName:`short`}).formatToParts(new Date).find(e=>e.type===`timeZoneName`)?.value??e}var Vn={actionFailedMessage:`That did not work. Try again.`,actionForbiddenMessage:`You do not have permission to do that.`,collapseRowLabel:`Collapse row`,empty:`No records found.`,emptyLabel:`No rows`,errorText:`These rows did not load. Try again.`,expandLabel:`Expand`,expandRowLabel:`Expand row`,forbiddenMessage:`You do not have access to these rows.`,groupRowsOne:`1 row`,groupRowsOther:`{count} rows`,loadingText:`Loading rows`,moreActionsForText:`More actions for {firstValue}`,networkMessage:`The connection dropped before the rows loaded. Check it and try again.`,pageTextOne:`Page {page} of {pages}, {total} row`,pageTextOther:`Page {page} of {pages}, {total} rows`,resizeColumnLabel:`Resize column`,resizeColumnText:`Resize {label} column`,resizeText:`{px} pixels`,retryLabel:`Retry`,rowActionsLabel:`Actions`,rowSavedText:`Row saved.`,rowWasNotSavedText:`Row was not saved.`,rowsSavedText:`{n} rows saved.`,savedText:`{label} saved.`,selectAllRowsLabel:`Select all rows`,selectRowLabel:`Select row`,wasNotSavedText:`{label} was not saved.`},Hn=n({COLUMN_MAX_WIDTH:()=>Wn,COLUMN_MIN_WIDTH:()=>48,PIN_AT_VAR:()=>dr,PIN_SIDES:()=>qn,RESIZE_STEP:()=>10,RESIZE_STEP_LARGE:()=>50,ROW_HEIGHTS:()=>Yn,ROW_MOVE_LIMIT:()=>200,ROW_MOVE_MS:()=>220,ROW_SAVE_ATTR:()=>wr,ROW_SAVE_ERROR_CLASS:()=>Tr,ROW_SAVE_STATES:()=>Cr,VIRTUAL_OVERSCAN:()=>8,clampColumnWidth:()=>ir,groupCount:()=>rr,groupItems:()=>ar,groupRowsText:()=>$n,identityCell:()=>Er,measureRows:()=>br,notSavedText:()=>nr,pinAtValue:()=>fr,pinClasses:()=>mr,pinOffsetVar:()=>ur,planPins:()=>pr,playRowMoves:()=>xr,readColumnWidths:()=>cr,resizeName:()=>Zn,rowLabel:()=>Dr,rowOrderChanged:()=>Sr,saveOutcomeText:()=>Ar,savedManyText:()=>tr,savedText:()=>er,setRowSaveState:()=>Or,settledRows:()=>kr,virtualRange:()=>or,widthText:()=>Qn,writeColumnWidths:()=>lr}),Un=48,Wn=1200,Gn=10,Kn=50,qn=[`start`,`end`],Jn=8,Yn={comfortable:72,cozy:48,compact:40},Xn=()=>N(`dataTable`,Vn),Zn=e=>e?P(Xn().resizeColumnText,{label:e}):Xn().resizeColumnLabel,Qn=e=>P(Xn().resizeText,{px:e}),$n=e=>Ke(Xn(),`groupRows`,e,{count:wn(e,{decimals:0})}),er=e=>e?P(Xn().savedText,{label:e}):Xn().rowSavedText,tr=e=>P(Xn().rowsSavedText,{n:wn(e,{decimals:0})}),nr=(e,t)=>`${e?P(Xn().wasNotSavedText,{label:e}):Xn().rowWasNotSavedText}${t?` ${t}`:``}`,rr=e=>wn(e,{decimals:0}),ir=e=>Math.min(Wn,Math.max(48,Math.round(Number(e)||0)));function ar(e,t,n=[]){let r=new Map(n.map(e=>[e,[]]));return e.forEach((e,n)=>{let i=t(e,n),a=r.get(i);a||(a=[],r.set(i,a)),a.push(e)}),[...r].filter(([,e])=>e.length>0).map(([e,t])=>({key:e,items:t}))}function or({scrollTop:e,viewport:t,rowHeight:n,count:r,overscan:i=8}){let a=n>0?n:Yn.comfortable,o=Math.floor(Math.max(0,e)/a),s=Math.max(0,o-i);s-=s%2;let c=Math.min(r,o+Math.ceil(Math.max(0,t)/a)+i),l=Math.min(s,c);return{start:l,end:c,before:l*a,after:Math.max(0,r-c)*a}}var sr=e=>`wui-widths:${e}`;function cr(e){if(!e)return{};try{let t=JSON.parse(window.localStorage.getItem(sr(e))||`{}`),n={};if(t&&typeof t==`object`)for(let[e,r]of Object.entries(t))Number.isFinite(r)&&(n[e]=ir(r));return n}catch{return{}}}function lr(e,t){if(e)try{Object.keys(t).length?window.localStorage.setItem(sr(e),JSON.stringify(t)):window.localStorage.removeItem(sr(e))}catch(e){if(!(e instanceof DOMException))throw e}}var ur=(e,t)=>`--wui-pin-${e}-${t}`,dr=`--wui-pin-at`,fr=(e,t)=>`var(${ur(e,t)}, 0px)`;function pr(e){let t=e.map(()=>null),n=-1;e.forEach((e,t)=>{e===`start`&&(n=t)});let r=0;for(let i=0;i<=n;i++)(e[i]===`start`||e[i]===`lead`)&&(t[i]={side:`start`,ordinal:r++,edge:!1});let i=t[n];i&&(i.edge=!0);let a=-1;r=0;for(let n=e.length-1;n>=0;n--)e[n]===`end`&&(t[n]={side:`end`,ordinal:r++,edge:!1},a=n);let o=t[a];return o&&(o.edge=!0),t}var mr=e=>e?`wui-pin-${e.side}${e.edge?` wui-pin-${e.side}-edge`:``}`:``,hr=200,gr=220,_r=`cubic-bezier(0.22, 1, 0.36, 1)`,vr=()=>typeof window<`u`&&typeof window.matchMedia==`function`&&window.matchMedia(`(prefers-reduced-motion: reduce)`).matches,yr=e=>e.getAttribute(`data-row-key`)??e;function br(e){let t=[...e];if(t.length>200)return null;let n=new Map;for(let e of t)e.hidden||n.set(yr(e),e.offsetTop);return n}function xr(e,t){let n=[...e];if(!t||n.length>200||vr())return 0;let r=0;for(let e of n){if(e.hidden||typeof e.animate!=`function`)continue;let n=t.get(yr(e));if(n===void 0)continue;let i=n-e.offsetTop;Math.abs(i)<1||(e.animate([{transform:`translateY(${i}px)`},{transform:`translateY(0)`}],{duration:220,easing:_r}),r++)}return r}function Sr(e,t){if(!e||!t)return!1;let n=new Set(t),r=new Set(e),i=e.filter(e=>n.has(e)),a=t.filter(e=>r.has(e));return i.some((e,t)=>e!==a[t])}var Cr=[`saving`,`error`],wr=`data-wui-save-state`,Tr=`wui-row-save-error`,Er=e=>{let t=e.querySelector(`:scope > .wui-name-cell`);return t instanceof HTMLTableCellElement?t:[...e.cells].find(e=>!e.matches(`.wui-select-cell, .wui-expand-cell`))??null};function Dr(e){let t=Er(e);if(!t)return``;let n=t.querySelector(`.u-name`);if(n)return(n.textContent??``).trim();let r=``;for(let e of t.childNodes)e instanceof Element&&e.classList.contains(`wui-row-save-error`)||(r+=e.textContent??``);return r.replace(/\s+/g,` `).trim()}function Or(e,t,n=``){if(t!==null&&!Cr.includes(t))throw Error(`A row's save state is ${Cr.join(` or `)} (or null to clear it), not "${t}".`);e.querySelector(`:scope > * > .${Tr}`)?.remove(),t===null?e.removeAttribute(wr):e.setAttribute(wr,t),t===`saving`?e.setAttribute(`aria-busy`,`true`):e.removeAttribute(`aria-busy`);let r=t===`error`&&n?Er(e):null;if(r){let t=e.ownerDocument.createElement(`span`);t.className=Tr,t.textContent=n,r.append(t)}}function kr(e,t){let n=[];if(!e)return n;for(let[r,i]of e){let e=t.get(r);i.state===`saving`&&e&&e.state!==`saving`&&n.push({label:e.label,ok:e.state!==`error`,message:e.message||``})}return n}function Ar(e){let t=e.filter(e=>e.ok),n=[],[r]=t;t.length===1&&r?n.push(er(r.label)):t.length>1&&n.push(tr(t.length));for(let t of e)t.ok||n.push(nr(t.label,t.message));return n.join(` `)}var jr=n({isImeSafeEnter:()=>Mr});function Mr(e){return e.key===`Enter`&&e.isComposing!==!0&&e.keyCode!==229}var Nr=`.wui-col-resize`,Pr=`.wui-group-row, .wui-virtual-spacer`,Fr=`.wui-select-cell, .wui-expand-cell`,Ir=`<svg class="wui-icon" data-icon="chevron-down" data-wui="AppIcon" width="16" height="16" viewBox="0 0 24 24" fill="none" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="1.5" d="M19.92 8.95l-6.52 6.52c-.77.77-2.03.77-2.8 0L4.08 8.95"></path></svg>`;function L(e){if(e==null)throw TypeError(`Missing DOM node`);return e}function Lr(e,t){if(e instanceof t)return e;throw TypeError(`Missing DOM node`)}var Rr=e=>{let t=M(e,Nr);return t instanceof HTMLElement?t:null},zr=e=>e.hasAttribute(`data-wui-skeleton`)||!!e.querySelector(`:scope > td > .skeleton`),Br=class extends s{_frame;_headDirty;_rowsDirty;_frozenSig;_natural;_widths;_collapsed;_groupOrder;_items;_range;_drag;_userSized;_swallowClick;_mo;_ro;_fonts;_onPointerDown;_onKeyDown;_onClick;_onDblClick;_onScroll;_onFonts;_top=null;_bottom=null;_rowHeight=0;constructor(){super(),this._frame=0,this._headDirty=!0,this._rowsDirty=!0,this._frozenSig=null,this._natural=[],this._widths={},this._collapsed=new Set,this._groupOrder=[],this._items=[],this._range=null,this._drag=null,this._userSized=!1,this._swallowClick=!1,this._mo=null,this._ro=null,this._fonts=null,this._onPointerDown=e=>this._startDrag(e),this._onKeyDown=e=>this._key(e),this._onClick=e=>this._click(e),this._onDblClick=e=>{let t=Rr(e.target);t&&this.contains(t)&&this._reset(t.closest(`th`))},this._onScroll=()=>{this.hasAttribute(`virtual`)&&this._schedule()},this._onFonts=()=>{this._userSized||this._drag||this._frozenSig===null||!this.hasAttribute(`resizable`)||(this._frozenSig=null,this._schedule())}}connectedCallback(){this._widths=cr(this.getAttribute(`view-key`)),this.addEventListener(`pointerdown`,this._onPointerDown,!0),this.addEventListener(`keydown`,this._onKeyDown,!0),this.addEventListener(`click`,this._onClick,!0),this.addEventListener(`dblclick`,this._onDblClick),this.addEventListener(`scroll`,this._onScroll,{passive:!0}),this._fonts=this.ownerDocument.fonts??null,this._fonts?.addEventListener(`loadingdone`,this._onFonts),typeof MutationObserver<`u`&&(this._mo=new MutationObserver(e=>this._mutated(e)),this._mo.observe(this,{childList:!0,subtree:!0})),typeof ResizeObserver<`u`&&(this._ro=new ResizeObserver(()=>this._schedule()),this._ro.observe(this)),this._headDirty=!0,this._rowsDirty=!0,this._schedule()}disconnectedCallback(){this.removeEventListener(`pointerdown`,this._onPointerDown,!0),this.removeEventListener(`keydown`,this._onKeyDown,!0),this.removeEventListener(`click`,this._onClick,!0),this.removeEventListener(`dblclick`,this._onDblClick),this.removeEventListener(`scroll`,this._onScroll),this._fonts?.removeEventListener(`loadingdone`,this._onFonts),this._fonts=null,this._mo?.disconnect(),this._ro?.disconnect(),this._mo=null,this._ro=null,this._frame&&cancelAnimationFrame(this._frame),this._frame=0,this._drag=null}refresh(){this._headDirty=!0,this._rowsDirty=!0,this._run()}get _table(){let e=this.querySelector(`:scope > table`);return e instanceof HTMLTableElement?e:null}_headCells(e){let t=e.tHead?.rows[0];return t?[...t.cells]:[]}_schedule(){this._frame||=requestAnimationFrame(()=>{this._frame=0,this._run()})}_mutated(e){for(let t of e){let e=t.target instanceof Element?t.target:t.target.parentElement;e&&((e.closest(`thead`)||e===this._table||e===this)&&(this._headDirty=!0),(e.closest(`tbody, tfoot`)||e===this._table||e===this)&&(this._rowsDirty=!0))}this._schedule()}_run(){let e=this._table;if(!e)return;let t=this._headDirty,n=this._rowsDirty;this._headDirty=!1,this._rowsDirty=!1,n&&this.hasAttribute(`group-by`)&&this._group(e),this._pins(e,t||n),this.hasAttribute(`resizable`)&&(t&&this._handles(e),this._layout(e)),this.hasAttribute(`virtual`)&&this._virtual(e,t||n),this._mo?.takeRecords()}_pins(e,t){let n=this._headCells(e),r=n.map(e=>{let t=e.dataset.pin;return t===`start`||t===`end`?t:e.matches(Fr)?`lead`:null});if(!r.some(e=>e===`start`||e===`end`))return;let i=pr(r);i.forEach((e,t)=>{e&&this._ro?.observe(L(n[t]))});let a=e=>L(n[e]).getBoundingClientRect().width,o=0;i.forEach((t,n)=>{t?.side===`start`&&(this._setVar(e,ur(`start`,t.ordinal),o),o+=a(n))}),o=0;for(let t=i.length-1;t>=0;t--){let n=i[t];n?.side===`end`&&(this._setVar(e,ur(`end`,n.ordinal),o),o+=a(t))}if(t)for(let t of e.rows)t.matches(`${Pr}, .wui-row-expanded`)||t.cells.length!==n.length||i.forEach((e,n)=>{if(!e)return;let r=L(t.cells[n]);r.classList.contains(`wui-pin-${e.side}`)||r.classList.add(`wui-pin-${e.side}`),e.edge&&!r.classList.contains(`wui-pin-${e.side}-edge`)&&r.classList.add(`wui-pin-${e.side}-edge`);let i=fr(e.side,e.ordinal);r.style.getPropertyValue(`--wui-pin-at`)!==i&&r.style.setProperty(dr,i)})}_setVar(e,t,n){let r=`${Math.round(n*100)/100}px`;e.style.getPropertyValue(t)!==r&&e.style.setProperty(t,r)}_resizable(e){return e.map((t,n)=>n<e.length-1&&!t.matches(Fr))}_handles(e){let t=this._headCells(e),n=this._resizable(t);t.forEach((e,t)=>{if(!n[t]||e.querySelector(Nr))return;let r=e.ownerDocument.createElement(`span`);r.className=`wui-col-resize`,r.setAttribute(`role`,`separator`),r.setAttribute(`aria-orientation`,`vertical`),r.setAttribute(`aria-valuemin`,`48`),r.setAttribute(`aria-valuemax`,String(Wn)),r.setAttribute(`tabindex`,`0`);let i=(e.textContent??``).trim();r.setAttribute(`aria-label`,Zn(i)),i&&!e.hasAttribute(`aria-label`)&&e.setAttribute(`aria-label`,i),e.classList.add(`wui-col-resizable`),e.appendChild(r)})}_hasRows(e){for(let t of e.tBodies)for(let e of t.rows)if(!e.matches(Pr)&&!zr(e))return!0;return!1}_signature(e){return e.map(e=>e.dataset.key||(e.textContent??``).trim()).join(``)}_layout(e){let t=this._headCells(e),n=this._signature(t);t.length&&n!==this._frozenSig&&(this._hasRows(e)?this._freeze(e,t,n):this._applyRemembered(t))}_applyRemembered(e){for(let t of e){let e=t.dataset.key&&this._widths[t.dataset.key];e&&(t.style.width=`${e}px`);let n=t.querySelector(Nr);n&&this._handleValue(n,ir(e||t.getBoundingClientRect().width))}}_freeze(e,t,n){e.style.tableLayout=``,e.style.width=``,e.removeAttribute(`data-wui-fixed`);for(let e of t)e.hasAttribute(`data-wui-width`)&&(e.style.width=``,e.removeAttribute(`data-wui-width`));this._natural=t.map(e=>e.getBoundingClientRect().width),t.forEach((e,n)=>{if(n===t.length-1||e.matches(Fr))return;let r=e.dataset.key&&this._widths[e.dataset.key];this._setWidth(e,r||this._natural[n])}),e.style.tableLayout=`fixed`,e.setAttribute(`data-wui-fixed`,``),this._frozenSig=n,this._fitTable(e,t)}_setWidth(e,t){let n=ir(t);e.style.width=`${n}px`,e.setAttribute(`data-wui-width`,``);let r=e.querySelector(Nr);return r&&this._handleValue(r,n),n}_handleValue(e,t){e.setAttribute(`aria-valuenow`,String(t)),e.setAttribute(`aria-valuetext`,Qn(t))}_fitTable(e,t){let n=t.length-1,r=this._natural[n]||0;for(let e=0;e<n;e++)r+=Number.parseFloat(L(t[e]).style.width)||this._natural[e]||0;e.style.width=`max(100%, ${Math.round(r)}px)`}_ensureFrozen(e){let t=this._headCells(e),n=this._signature(t);return n!==this._frozenSig&&this._freeze(e,t,n),t}_resizeTo(e,t,n){let r=this._table;if(!r)return;let i=this._ensureFrozen(r);this._userSized=!0,this._setWidth(e,t),this._fitTable(r,i),n&&this._remember(e),this._pins(r,!1)}_remember(e){let t=e.dataset.key;t&&(this._widths={...this._widths,[t]:Number.parseFloat(e.style.width)},lr(this.getAttribute(`view-key`),this._widths))}_reset(e){let t=this._table;if(!e||!t)return;let n=this._ensureFrozen(t);this._userSized=!0;let r=e.dataset.key;if(r&&r in this._widths){let{[r]:e,...t}=this._widths;this._widths=t,lr(this.getAttribute(`view-key`),this._widths)}this._setWidth(e,this._natural[n.indexOf(e)]||0),this._fitTable(t,n),this._pins(t,!1)}_rtl(){return getComputedStyle(this).direction===`rtl`}_startDrag(e){let t=Rr(e.target);if(!t||!this.contains(t)||e.button!==0)return;e.preventDefault(),e.stopPropagation();let n=t.closest(`th`),r=this._table;if(!n||!r)return;this._ensureFrozen(r);let i={th:n,x:e.clientX,from:n.getBoundingClientRect().width,dir:this._rtl()?-1:1,moved:!1};this._drag=i,t.setPointerCapture?.(e.pointerId),t.classList.add(`is-dragging`);let a=e=>{let t=(e.clientX-i.x)*i.dir;Math.abs(t)>1&&(i.moved=!0),this._resizeTo(n,i.from+t,!1)},o=e=>{t.removeEventListener(`pointermove`,a),t.removeEventListener(`pointerup`,o),t.removeEventListener(`pointercancel`,o),t.classList.remove(`is-dragging`),this._drag=null,e.type===`pointercancel`?this._resizeTo(n,i.from,!1):i.moved&&this._remember(n),this._swallowClick=!0,setTimeout(()=>{this._swallowClick=!1},0)};t.addEventListener(`pointermove`,a),t.addEventListener(`pointerup`,o),t.addEventListener(`pointercancel`,o)}_key(e){let t=Rr(e.target);if(!t||!this.contains(t))return;let n=t.closest(`th`);if(Mr(e)||e.key===` `){e.preventDefault(),e.stopPropagation();return}if(e.key===`Home`){e.preventDefault(),e.stopPropagation(),this._reset(n);return}if(e.key!==`ArrowLeft`&&e.key!==`ArrowRight`)return;e.preventDefault(),e.stopPropagation();let r=this._table;if(!r)return;this._ensureFrozen(r);let i=L(n),a=e.shiftKey?50:10,o=e.key===`ArrowRight`!==this._rtl(),s=Number.parseFloat(i.style.width)||i.getBoundingClientRect().width;this._resizeTo(i,s+(o?a:-a),!0)}_click(e){let t=e.target instanceof Element&&e.target.closest(Nr)!==null;if(this._swallowClick||t){e.stopPropagation(),(t||this._swallowClick)&&e.preventDefault(),this._swallowClick=!1;return}if(!this.hasAttribute(`group-by`))return;let n=M(e.target,`.wui-group-toggle`)?.closest(`.wui-group-row`);if(!(n instanceof HTMLTableRowElement)||!this.contains(n))return;let r=n.dataset.groupKey;this._collapsed.has(r)?this._collapsed.delete(r):this._collapsed.add(r),this._showGroup(n,!this._collapsed.has(r));let i=this._table;i&&this.hasAttribute(`virtual`)&&(this._virtual(i,!0),this._mo?.takeRecords())}_group(e){let t=this.getAttribute(`group-by`),n=this._headCells(e),r=n.findIndex(e=>e.dataset.key===t);if(r<0)throw Error(`<wui-data-table group-by="${t}"> needs a header cell with data-key="${t}".`);let i=e.tBodies[0];if(!i)return;let a=[...i.rows].filter(e=>!e.matches(Pr));if(a.some(zr))return;let o=this.ownerDocument,s=new Map;for(let e of i.querySelectorAll(`:scope > tr.wui-group-row`))e instanceof HTMLTableRowElement&&s.set(e.dataset.groupKey,e);let c=ar(a,e=>e.dataset.group??e.cells[r]?.textContent?.trim()??``,this.closest(`[data-wui-server]`)?[]:this._groupOrder);this._groupOrder=c.map(e=>e.key);let l=o.createDocumentFragment(),u=c.map(e=>{let t=s.get(e.key)??this._groupRow(o,e.key);return s.delete(e.key),Lr(t.querySelector(`.wui-group-cell`),HTMLTableCellElement).colSpan=n.length,Lr(t.querySelector(`.wui-group-count`),HTMLElement).textContent=rr(e.items.length),Lr(t.querySelector(`.wui-group-rows`),HTMLElement).textContent=`, ${$n(e.items.length)}`,l.append(t,...e.items),[t,e.key]});for(let e of s.values())e.remove();i.insertBefore(l,this._bottom?.parentNode===i?this._bottom:null);for(let[e,t]of u)this._showGroup(e,!this._collapsed.has(t))}_groupRow(e,t){let n=e.createElement(`tr`);n.className=`wui-group-row`,n.dataset.groupKey=t;let r=e.createElement(`th`);r.className=`wui-group-cell`,r.scope=`rowgroup`;let i=e.createElement(`button`);i.type=`button`,i.className=`wui-group-toggle`,i.innerHTML=Ir;let a=e.createElement(`span`);a.className=`wui-group-label`,a.textContent=t;let o=e.createElement(`span`);o.className=`wui-group-count`,o.setAttribute(`aria-hidden`,`true`);let s=e.createElement(`span`);return s.className=`visually-hidden wui-group-rows`,i.append(a,o,s),r.append(i),n.append(r),n}_showGroup(e,t){if(e){e.querySelector(`.wui-group-toggle`)?.setAttribute(`aria-expanded`,String(t));for(let n=e.nextElementSibling;n&&!n.matches(Pr);n=n.nextElementSibling)n instanceof HTMLElement&&(n.hidden=!t)}}_spacer(e,t){if(t?.parentNode===e)return t;let n=e.ownerDocument,r=n.createElement(`tr`);return r.className=`wui-virtual-spacer`,r.setAttribute(`aria-hidden`,`true`),r.append(n.createElement(`td`)),r}_virtual(e,t){let n=e.tBodies[0];if(!n)return;if(t){this._top=this._spacer(n,this._top),this._bottom=this._spacer(n,this._bottom),n.firstElementChild!==this._top&&n.insertBefore(this._top,n.firstChild),n.lastElementChild!==this._bottom&&n.append(this._bottom);let t=Math.max(1,this._headCells(e).length);L(this._top.cells[0]).colSpan=t,L(this._bottom.cells[0]).colSpan=t,this._items=[...n.rows].filter(e=>!e.classList.contains(`wui-virtual-spacer`)&&!e.hidden),this._range=null,e.setAttribute(`aria-rowcount`,String(this._items.length+1)),e.tHead?.rows[0]?.setAttribute(`aria-rowindex`,`1`),this._items.forEach((e,t)=>{e.setAttribute(`aria-rowindex`,String(t+2))}),this._rowHeight>0||(this._rowHeight=this._measureRow(e))}let r=e.tHead?.getBoundingClientRect().height||0,i=or({scrollTop:this.scrollTop-r,viewport:this.clientHeight,rowHeight:this._rowHeight,count:this._items.length}),a=this._range;if(a&&a.start===i.start&&a.end===i.end)return;let o=a?Math.min(a.start,i.start):0,s=a?Math.max(a.end,i.end):this._items.length;for(let e=o;e<s;e++){let t=e<i.start||e>=i.end,n=L(this._items[e]);n.classList.contains(`wui-virtual-off`)!==t&&n.classList.toggle(`wui-virtual-off`,t)}this._range=i;let c=L(this._top),l=L(this._bottom);c.hidden=i.before===0,l.hidden=i.after===0,L(c.cells[0]).style.height=`${i.before}px`,L(l.cells[0]).style.height=`${i.after}px`}_measureRow(e){let t=this._items.find(e=>!e.classList.contains(`wui-group-row`)&&!e.classList.contains(`wui-virtual-off`))?.getBoundingClientRect().height??0;return t>0?t:e.classList.contains(`wui-table-compact`)?Yn.compact:e.classList.contains(`wui-table-cozy`)?Yn.cozy:Yn.comfortable}},Vr=n({DISPLAY_FORMAT:()=>Kr,clampMonth:()=>Yr,daysIn:()=>Jr,firstWeekday:()=>Ur,fmt:()=>qr,pad:()=>Wr,parseIso:()=>R,toIso:()=>Gr}),Hr=e=>{let t=String(e??``).trim();return/^[0-6]$/.test(t)?Number(t):null},Ur=e=>Hr(e.getAttribute(`first-day`))??Hr(getComputedStyle(e).getPropertyValue(`--wui-first-day`))??1,Wr=e=>String(e).padStart(2,`0`),Gr=(e,t,n)=>`${e}-${Wr(t+1)}-${Wr(n)}`,R=e=>{let t=/^(\d{4})-(\d{2})-(\d{2})$/.exec(e||``);if(!t)return null;let[,n,r,i]=t;if(n===void 0||r===void 0||i===void 0)throw Error(`ISO date parts missing`);let a=+n,o=+r,s=+i;return o<1||o>12||s<1||s>Jr(a,o-1)?null:{y:a,m:o-1,d:s}},Kr=`dd-MMM-yyyy`,qr=(e,t=Kr)=>{let n=R(e);if(!n)return``;let r={yyyy:n.y,MMMM:sn(n.m),MMM:on(n.m),MM:Wr(n.m+1),dd:Wr(n.d),d:n.d};return(t||`dd-MMM-yyyy`).replace(/yyyy|MMMM|MMM|MM|dd|d/g,e=>String(r[e]))},Jr=(e,t)=>{let n=new Date(0);return n.setFullYear(e,t+1,0),n.getDate()},Yr=(e,t)=>{for(;t<0;)t+=12,--e;for(;t>11;)t-=12,e+=1;return{y:e,m:t}},Xr=n({BUSY_CLASS:()=>Zr,isInert:()=>z,isReadOnly:()=>Qr,syncFieldState:()=>$r}),Zr=`wui-field-busy`,Qr=e=>e.hasAttribute(`readonly`),z=e=>e.hasAttribute(`disabled`)||e.hasAttribute(`readonly`)||e.hasAttribute(`loading`);function $r(e,t){let n=e.hasAttribute(`loading`);n?e.setAttribute(`aria-busy`,`true`):e.removeAttribute(`aria-busy`),t&&(t.classList.toggle(Zr,n),Qr(e)?t.setAttribute(`aria-readonly`,`true`):t.removeAttribute(`aria-readonly`))}var ei=n({syncFormMirror:()=>ii,syncFormMirrors:()=>ai}),ti=`data-wui-mirror`;function ni(e,t,n,r){t.name=n,t.value=r==null?``:String(r);for(let n of[...t.attributes])n.name.startsWith(`data-val`)&&!e.hasAttribute(n.name)&&t.removeAttribute(n.name);for(let n of e.attributes)n.name.startsWith(`data-val`)&&t.setAttribute(n.name,n.value);t.disabled=e.hasAttribute(`disabled`)}function ri(e){let t=document.createElement(`input`);return t.type=`hidden`,t.setAttribute(ti,``),e.appendChild(t),t}function ii(e,t){let n=e.getAttribute(`name`)??``,r=e.querySelector(`:scope > input[${ti}]`),i=r instanceof HTMLInputElement?r:null;n?(i||=ri(e),ni(e,i,n,t)):i?.remove()}function ai(e,t){let n=e.getAttribute(`name`)??``,r=[...e.querySelectorAll(`:scope > input[${ti}]`)].filter(e=>e instanceof HTMLInputElement),i=[...e.attributes].some(e=>e.name.startsWith(`data-val`)),a=n?t.length>0?t:i?[``]:[]:[];for(let e of r.splice(a.length))e.remove();a.forEach((t,i)=>{ni(e,r[i]??ri(e),n,t)})}var oi={add:`<path d="M6 12h12M12 18V6" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,"alert-circle":`<path d="M12 7.75V13M21.08 8.58v6.84c0 1.12-.6 2.16-1.57 2.73l-5.94 3.43c-.97.56-2.17.56-3.15 0l-5.94-3.43a3.15 3.15 0 0 1-1.57-2.73V8.58c0-1.12.6-2.16 1.57-2.73l5.94-3.43c.97-.56 2.17-.56 3.15 0l5.94 3.43c.97.57 1.57 1.6 1.57 2.73Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M12 16.2v.1" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path>`,"alert-triangle":`<path d="M12 9v5M12 21.41H5.94c-3.47 0-4.92-2.48-3.24-5.51l3.12-5.62L8.76 5c1.78-3.21 4.7-3.21 6.48 0l2.94 5.29 3.12 5.62c1.68 3.03.22 5.51-3.24 5.51H12v-.01Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M11.995 17h.009" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path>`,"arrow-left":`<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="1.5" d="M9.57 5.93L3.5 12l6.07 6.07M20.5 12H3.67"></path>`,"arrow-right":`<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="1.5" d="M14.43 5.93L20.5 12l-6.07 6.07M3.5 12h16.83"></path>`,at:`<path d="M16 12a4 4 0 1 1-8 0 4 4 0 1 1 8 0M16 12v1.5a2.5 2.5 0 0 0 5 0V12a9 9 0 1 0-3.5 7.13" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>`,calendar:`<path d="M8 2v3M16 2v3M3.5 9.09h17M21 8.5V17c0 3-1.5 5-5 5H8c-3.5 0-5-2-5-5V8.5c0-3 1.5-5 5-5h8c3.5 0 5 2 5 5Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="M15.695 13.7h.009M15.695 16.7h.009M11.995 13.7h.01M11.995 16.7h.01M8.294 13.7h.01M8.294 16.7h.01" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path>`,"calendar-dots":`<path d="M8 2v3M16 2v3M16 3.5c3.33.18 5 1.45 5 6.15v6.18c0 4.12-1 6.18-6 6.18H9c-5 0-6-2.06-6-6.18V9.65c0-4.7 1.67-5.96 5-6.15h8ZM20.75 17.6H3.25" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="M12 8.25c-1.23 0-2.27.67-2.27 1.97 0 .62.29 1.09.73 1.39-.61.36-.96.94-.96 1.62 0 1.24.95 2.01 2.5 2.01 1.54 0 2.5-.77 2.5-2.01 0-.68-.35-1.27-.97-1.62.45-.31.73-.77.73-1.39 0-1.3-1.03-1.97-2.26-1.97Zm0 2.84c-.52 0-.9-.31-.9-.8 0-.5.38-.79.9-.79s.9.29.9.79c0 .49-.38.8-.9.8ZM12 14c-.66 0-1.14-.33-1.14-.93 0-.6.48-.92 1.14-.92.66 0 1.14.33 1.14.92 0 .6-.48.93-1.14.93Z" fill="currentColor"></path>`,chart:`<path d="M9 22h6c5 0 7-2 7-7V9c0-5-2-7-7-7H9C4 2 2 4 2 9v6c0 5 2 7 7 7Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M15.5 18.5c1.1 0 2-.9 2-2v-9c0-1.1-.9-2-2-2s-2 .9-2 2v9a2 2 0 0 0 2 2ZM8.5 18.5c1.1 0 2-.9 2-2V13c0-1.1-.9-2-2-2s-2 .9-2 2v3.5a2 2 0 0 0 2 2Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,check:`<path d="m5 12.75 4.5 4.5L19 7.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>`,"check-circle":`<path d="M12 22c5.5 0 10-4.5 10-10S17.5 2 12 2 2 6.5 2 12s4.5 10 10 10Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="m7.75 12 2.83 2.83 5.67-5.66" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,"chevron-down":`<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="1.5" d="M19.92 8.95l-6.52 6.52c-.77.77-2.03.77-2.8 0L4.08 8.95"></path>`,"chevron-left":`<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="1.5" d="M15 19.92L8.48 13.4c-.77-.77-.77-2.03 0-2.8L15 4.08"></path>`,"chevron-right":`<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="1.5" d="M8.91 19.92l6.52-6.52c.77-.77.77-2.03 0-2.8L8.91 4.08"></path>`,"chevron-up":`<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="1.5" d="M19.92 15.05L13.4 8.53c-.77-.77-2.03-.77-2.8 0l-6.52 6.52"></path>`,"chevrons-up-down":`<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="1.5" d="M9.01 20.5l-5.02-5.01M9.01 3.5v17M14.99 3.5l5.02 5.01M14.99 20.5v-17"></path>`,circle:`<path d="M11.97 22c5.523 0 10-4.477 10-10s-4.477-10-10-10-10 4.477-10 10 4.477 10 10 10Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M12 16.23a4.23 4.23 0 1 0 0-8.46 4.23 4.23 0 0 0 0 8.46Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path>`,clock:`<path d="M22 12c0 5.52-4.48 10-10 10S2 17.52 2 12 6.48 2 12 2s10 4.48 10 10Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="m15.71 15.18-3.1-1.85c-.54-.32-.98-1.09-.98-1.72v-4.1" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,code:`<path d="M9 13c-.66.33-1.21.82-1.62 1.43-.23.35-.23.79 0 1.14.41.61.96 1.1 1.62 1.43M15.21 13c.66.33 1.21.82 1.62 1.43.23.35.23.79 0 1.14-.41.61-.96 1.1-1.62 1.43" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M9 22h6c5 0 7-2 7-7V9c0-5-2-7-7-7H9C4 2 2 4 2 9v6c0 5 2 7 7 7ZM2.23 8.01 21.45 8" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,comment:`<path d="M8.5 19H8c-4 0-6-1-6-6V8c0-4 2-6 6-6h8c4 0 6 2 6 6v5c0 4-2 6-6 6h-.5c-.31 0-.61.15-.8.4l-1.5 2c-.66.88-1.74.88-2.4 0l-1.5-2c-.16-.22-.53-.4-.8-.4Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="M15.996 11h.01M11.995 11h.01M7.995 11h.008" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path>`,copy:`<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M16 12.9v4.2c0 3.5-1.4 4.9-4.9 4.9H6.9C3.4 22 2 20.6 2 17.1v-4.2C2 9.4 3.4 8 6.9 8h4.2c3.5 0 4.9 1.4 4.9 4.9z"></path><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M22 6.9v4.2c0 3.5-1.4 4.9-4.9 4.9H16v-3.1C16 9.4 14.6 8 11.1 8H8V6.9C8 3.4 9.4 2 12.9 2h4.2C20.6 2 22 3.4 22 6.9z"></path>`,danger:`<path d="M12 9v5M12 21.41H5.94c-3.47 0-4.92-2.48-3.24-5.51l3.12-5.62L8.76 5c1.78-3.21 4.7-3.21 6.48 0l2.94 5.29 3.12 5.62c1.68 3.03.22 5.51-3.24 5.51H12v-.01Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M11.995 17h.009" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path>`,display:`<path d="M6.44 2h11.11C21.11 2 22 2.89 22 6.44v6.33c0 3.56-.89 4.44-4.44 4.44H6.44C2.89 17.22 2 16.33 2 12.78V6.44C2 2.89 2.89 2 6.44 2ZM12 17.22V22M2 13h20M7.5 22h9" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,document:`<path d="M22 10v5c0 5-2 7-7 7H9c-5 0-7-2-7-7V9c0-5 2-7 7-7h5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M22 10h-4c-3 0-4-1-4-4V2l8 8Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,download:`<path d="M9 11v6l2-2M9 17l-2-2" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M22 10v5c0 5-2 7-7 7H9c-5 0-7-2-7-7V9c0-5 2-7 7-7h5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M22 10h-4c-3 0-4-1-4-4V2l8 8Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,edit:`<path d="m13.26 3.6-8.21 8.69c-.31.33-.61.98-.67 1.43l-.37 3.24c-.13 1.17.71 1.97 1.87 1.77l3.22-.55c.45-.08 1.08-.41 1.39-.75l8.21-8.69c1.42-1.5 2.06-3.21-.15-5.3-2.2-2.07-3.87-1.34-5.29.16Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="M11.89 5.05a6.126 6.126 0 0 0 5.45 5.15M3 22h18" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path>`,export:`<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="1.5" d="M9.32 6.5l2.56-2.56 2.56 2.56M11.88 14.18V4.01M4 12c0 4.42 3 8 8 8s8-3.58 8-8"></path>`,"file-text":`<path d="M21 7v10c0 3-1.5 5-5 5H8c-3.5 0-5-2-5-5V7c0-3 1.5-5 5-5h8c3.5 0 5 2 5 5Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="M14.5 4.5v2c0 1.1.9 2 2 2h2M8 13h4M8 17h8" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path>`,files:`<path d="M17 13.4v3c0 4-1.6 5.6-5.6 5.6H7.6c-4 0-5.6-1.6-5.6-5.6v-3.8C2 8.6 3.6 7 7.6 7h3" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M17 13.4h-3.2c-2.4 0-3.2-.8-3.2-3.2V7l6.4 6.4ZM11.6 2h4M7 5c0-1.66 1.34-3 3-3h2.62M22 8v6.19c0 1.55-1.26 2.81-2.81 2.81M22 8h-3c-2.25 0-3-.75-3-3V2l6 6Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,filter:`<path d="M5.4 2.1h13.2c1.1 0 2 .9 2 2v2.2c0 .8-.5 1.8-1 2.3l-4.3 3.8c-.6.5-1 1.5-1 2.3V19c0 .6-.4 1.4-.9 1.7l-1.4.9c-1.3.8-3.1-.1-3.1-1.7v-5.3c0-.7-.4-1.6-.8-2.1l-3.8-4c-.5-.5-.9-1.4-.9-2V4.2c0-1.2.9-2.1 2-2.1ZM10.93 2.1 6 10" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path>`,flag:`<path d="M5.15 2v20M5.15 4h11.2c2.7 0 3.3 1.5 1.4 3.4l-1.2 1.2c-.8.8-.8 2.1 0 2.8l1.2 1.2c1.9 1.9 1.2 3.4-1.4 3.4H5.15" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path>`,gauge:`<path d="M19.14 19.5a9.964 9.964 0 0 0 2.86-7c0-5.52-4.48-10-10-10S2 6.98 2 12.5c0 2.72 1.08 5.18 2.84 6.99" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="M12 21.5a3.38 3.38 0 1 0 0-6.76 3.38 3.38 0 0 0 0 6.76ZM15.25 12H16c.82 0 1.5-.67 1.5-1.5 0-.82-.68-1.5-1.5-1.5s-1.5.67-1.5 1.5v.75c0 .41.34.75.75.75Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path>`,grid:`<path d="M22 8.52V3.98C22 2.57 21.36 2 19.77 2h-4.04c-1.59 0-2.23.57-2.23 1.98v4.53c0 1.42.64 1.98 2.23 1.98h4.04c1.59.01 2.23-.56 2.23-1.97ZM22 19.77v-4.04c0-1.59-.64-2.23-2.23-2.23h-4.04c-1.59 0-2.23.64-2.23 2.23v4.04c0 1.59.64 2.23 2.23 2.23h4.04c1.59 0 2.23-.64 2.23-2.23ZM10.5 8.52V3.98C10.5 2.57 9.86 2 8.27 2H4.23C2.64 2 2 2.57 2 3.98v4.53c0 1.42.64 1.98 2.23 1.98h4.04c1.59.01 2.23-.56 2.23-1.97ZM10.5 19.77v-4.04c0-1.59-.64-2.23-2.23-2.23H4.23c-1.59 0-2.23.64-2.23 2.23v4.04C2 21.36 2.64 22 4.23 22h4.04c1.59 0 2.23-.64 2.23-2.23Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,image:`<path d="M9 22h6c5 0 7-2 7-7V9c0-5-2-7-7-7H9C4 2 2 4 2 9v6c0 5 2 7 7 7Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M9 10a2 2 0 1 0 0-4 2 2 0 0 0 0 4ZM2.67 18.95l4.93-3.31c.79-.53 1.93-.47 2.64.14l.33.29c.78.67 2.04.67 2.82 0l4.16-3.57c.78-.67 2.04-.67 2.82 0L22 13.9" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,info:`<g transform="rotate(180 12 12)"><path d="M12 22c5.5 0 10-4.5 10-10S17.5 2 12 2 2 6.5 2 12s4.5 10 10 10ZM12 8v5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M11.995 16h.009" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path></g>`,key:`<path d="M19.79 14.93a7.575 7.575 0 0 1-7.6 1.87l-4.71 4.7c-.34.35-1.01.56-1.49.49l-2.18-.3c-.72-.1-1.39-.78-1.5-1.5l-.3-2.18c-.07-.48.16-1.15.49-1.49l4.7-4.7c-.8-2.6-.18-5.55 1.88-7.6 2.95-2.95 7.74-2.95 10.7 0 2.96 2.95 2.96 7.76.01 10.71ZM6.89 17.49l2.3 2.3" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="M14.5 11a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,list:`<path d="M3 4.5h18M3 9.5h9.47M3 14.5h18M3 19.5h9.47" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,lock:`<path d="M6 10V8c0-3.31 1-6 6-6s6 2.69 6 6v2M12 18.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M17 22H7c-4 0-5-1-5-5v-2c0-4 1-5 5-5h10c4 0 5 1 5 5v2c0 4-1 5-5 5Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,"maximize-4":`<path d="M21 9V3h-6M3 15v6h6M21 3l-7.5 7.5M10.5 13.5 3 21" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,menu:`<path d="M3 7h18M3 12h18M3 17h18" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"></path>`,minus:`<path d="M6 12h12" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,monitor:`<path d="M6.44 2h11.11C21.11 2 22 2.89 22 6.44v6.33c0 3.56-.89 4.44-4.44 4.44H6.44C2.89 17.22 2 16.33 2 12.78V6.44C2 2.89 2.89 2 6.44 2ZM12 17.22V22M2 13h20M7.5 22h9" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,moon:`<path d="M2.03 12.42c.36 5.15 4.73 9.34 9.96 9.57 3.69.16 6.99-1.56 8.97-4.27.82-1.11.38-1.85-.99-1.6-.67.12-1.36.17-2.08.14C13 16.06 9 11.97 8.98 7.14c-.01-1.3.26-2.53.75-3.65.54-1.24-.11-1.83-1.36-1.3C4.41 3.86 1.7 7.85 2.03 12.42Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,music:`<path d="M6.28 22a3.12 3.12 0 1 0 0-6.24 3.12 3.12 0 0 0 0 6.24Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M20.84 16.8V4.6c0-2.6-1.63-2.96-3.28-2.51l-6.24 1.7C10.18 4.1 9.4 5 9.4 6.3v12.57" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M17.72 19.92a3.12 3.12 0 1 0 0-6.24 3.12 3.12 0 0 0 0 6.24ZM9.4 9.52 20.84 6.4" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,pause:`<path d="M10.65 19.11V4.89c0-1.35-.57-1.89-2.01-1.89H5.01C3.57 3 3 3.54 3 4.89v14.22C3 20.46 3.57 21 5.01 21h3.63c1.44 0 2.01-.54 2.01-1.89ZM21 19.11V4.89C21 3.54 20.43 3 18.99 3h-3.63c-1.43 0-2.01.54-2.01 1.89v14.22c0 1.35.57 1.89 2.01 1.89h3.63c1.44 0 2.01-.54 2.01-1.89Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,people:`<path d="M18 7.16a.605.605 0 0 0-.19 0 2.573 2.573 0 0 1-2.48-2.58c0-1.43 1.15-2.58 2.58-2.58a2.58 2.58 0 0 1 2.58 2.58A2.589 2.589 0 0 1 18 7.16ZM16.97 14.44c1.37.23 2.88-.01 3.94-.72 1.41-.94 1.41-2.48 0-3.42-1.07-.71-2.6-.95-3.97-.71M5.97 7.16c.06-.01.13-.01.19 0a2.573 2.573 0 0 0 2.48-2.58C8.64 3.15 7.49 2 6.06 2a2.58 2.58 0 0 0-2.58 2.58c.01 1.4 1.11 2.53 2.49 2.58ZM7 14.44c-1.37.23-2.88-.01-3.94-.72-1.41-.94-1.41-2.48 0-3.42 1.07-.71 2.6-.95 3.97-.71M12 14.63a.605.605 0 0 0-.19 0 2.573 2.573 0 0 1-2.48-2.58c0-1.43 1.15-2.58 2.58-2.58a2.58 2.58 0 0 1 2.58 2.58c-.01 1.4-1.11 2.54-2.49 2.58ZM9.09 17.78c-1.41.94-1.41 2.48 0 3.42 1.6 1.07 4.22 1.07 5.82 0 1.41-.94 1.41-2.48 0-3.42-1.59-1.06-4.22-1.06-5.82 0Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,phone:`<path d="M21.97 18.33c0 .36-.08.73-.25 1.09-.17.36-.39.7-.68 1.02-.49.54-1.03.93-1.64 1.18-.6.25-1.25.38-1.95.38-1.02 0-2.11-.24-3.26-.73s-2.3-1.15-3.44-1.98a28.75 28.75 0 0 1-3.28-2.8 28.414 28.414 0 0 1-2.79-3.27c-.82-1.14-1.48-2.28-1.96-3.41C2.24 8.67 2 7.58 2 6.54c0-.68.12-1.33.36-1.93.24-.61.62-1.17 1.15-1.67C4.15 2.31 4.85 2 5.59 2c.28 0 .56.06.81.18.26.12.49.3.67.56l2.32 3.27c.18.25.31.48.4.7.09.21.14.42.14.61 0 .24-.07.48-.21.71-.13.23-.32.47-.56.71l-.76.79c-.11.11-.16.24-.16.4 0 .08.01.15.03.23.03.08.06.14.08.2.18.33.49.76.93 1.28.45.52.93 1.05 1.45 1.58.54.53 1.06 1.02 1.59 1.47.52.44.95.74 1.29.92.05.02.11.05.18.08.08.03.16.04.25.04.17 0 .3-.06.41-.17l.76-.75c.25-.25.49-.44.72-.56.23-.14.46-.21.71-.21.19 0 .39.04.61.13.22.09.45.22.7.39l3.31 2.35c.26.18.44.39.55.64.1.25.16.5.16.78Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10"></path>`,play:`<path d="M4 12V8.44c0-4.42 3.13-6.23 6.96-4.02l3.09 1.78 3.09 1.78c3.83 2.21 3.83 5.83 0 8.04l-3.09 1.78-3.09 1.78C7.13 21.79 4 19.98 4 15.56V12Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path>`,printer:`<path d="M7.25 7h9.5V5c0-2-.75-3-3-3h-3.5c-2.25 0-3 1-3 3v2ZM16 15v4c0 2-1 3-3 3h-2c-2 0-3-1-3-3v-4h8Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="M21 10v5c0 2-1 3-3 3h-2v-3H8v3H6c-2 0-3-1-3-3v-5c0-2 1-3 3-3h12c2 0 3 1 3 3ZM17 15H7M7 11h3" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path>`,refresh:`<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M22 12c0 5.52-4.48 10-10 10s-8.89-5.56-8.89-5.56m0 0h4.52m-4.52 0v5M2 12C2 6.48 6.44 2 12 2c6.67 0 10 5.56 10 5.56m0 0v-5m0 5h-4.44"></path>`,"rotate-ccw":`<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M9.11 5.08c.87-.26 1.83-.43 2.89-.43 4.79 0 8.67 3.88 8.67 8.67s-3.88 8.67-8.67 8.67-8.67-3.88-8.67-8.67c0-1.78.54-3.44 1.46-4.82M7.87 5.32L10.76 2M7.87 5.32l3.37 2.46"></path>`,"rotate-cw":`<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M14.89 5.08c-.87-.26-1.83-.43-2.89-.43-4.79 0-8.67 3.88-8.67 8.67C3.33 18.12 7.21 22 12 22s8.67-3.88 8.67-8.67c0-1.78-.54-3.44-1.46-4.82M16.13 5.32L13.24 2M16.13 5.32l-3.37 2.46"></path>`,search:`<path d="M11.5 21a9.5 9.5 0 1 0 0-19 9.5 9.5 0 0 0 0 19ZM22 22l-2-2" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,send:`<path d="m7.4 6.32 8.49-2.83c3.81-1.27 5.88.81 4.62 4.62l-2.83 8.49c-1.9 5.71-5.02 5.71-6.92 0l-.84-2.52-2.52-.84c-5.71-1.9-5.71-5.01 0-6.92ZM10.11 13.65l3.58-3.59" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,server:`<path d="M19.32 10H4.69c-1.48 0-2.68-1.21-2.68-2.68V4.69c0-1.48 1.21-2.68 2.68-2.68h14.63C20.8 2.01 22 3.22 22 4.69v2.63C22 8.79 20.79 10 19.32 10ZM19.32 22H4.69c-1.48 0-2.68-1.21-2.68-2.68v-2.63c0-1.48 1.21-2.68 2.68-2.68h14.63c1.48 0 2.68 1.21 2.68 2.68v2.63c0 1.47-1.21 2.68-2.68 2.68ZM6 5v2M10 5v2M6 17v2M10 17v2M14 6h4M14 18h4" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,sort:`<path d="M3 7h18M6 12h12M10 17h4" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"></path>`,subtitle:`<path d="M9 22h6c5 0 7-2 7-7V9c0-5-2-7-7-7H9C4 2 2 4 2 9v6c0 5 2 7 7 7ZM17.5 17.08h-1.85M12.97 17.08H6.5M17.5 13.32h-5.53M9.27 13.32H6.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,sun:`<path d="M12 18.5a6.5 6.5 0 1 0 0-13 6.5 6.5 0 0 0 0 13Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="m19.14 19.14-.13-.13m0-14.02.13-.13-.13.13ZM4.86 19.14l.13-.13-.13.13ZM12 2.08V2v.08ZM12 22v-.08.08ZM2.08 12H2h.08ZM22 12h-.08.08ZM4.99 4.99l-.13-.13.13.13Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path>`,tag:`<path d="m4.405 15.526 4.53 4.53a4.78 4.78 0 0 0 6.75 0l4.39-4.39a4.78 4.78 0 0 0 0-6.75l-4.54-4.52a4.75 4.75 0 0 0-3.6-1.39l-5 .24c-2 .09-3.59 1.68-3.69 3.67l-.24 5c-.06 1.35.45 2.66 1.4 3.61Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M9.735 12.226a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"></path><path d="m13.235 17.226 4-4" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path>`,text:`<path d="M2.67 7.17V5.35c0-1.15.93-2.07 2.07-2.07h14.52c1.15 0 2.07.93 2.07 2.07v1.82M12 20.72V4.11M8.06 20.72h7.88" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,"two-page":`<path d="M22 16.74V4.67c0-1.2-.98-2.09-2.17-1.99h-.06c-2.1.18-5.29 1.25-7.07 2.37l-.17.11c-.29.18-.77.18-1.06 0l-.25-.15C9.44 3.9 6.26 2.84 4.16 2.67 2.97 2.57 2 3.47 2 4.66v12.08c0 .96.78 1.86 1.74 1.98l.29.04c2.17.29 5.52 1.39 7.44 2.44l.04.02c.27.15.7.15.96 0 1.92-1.06 5.28-2.17 7.46-2.46l.33-.04c.96-.12 1.74-1.02 1.74-1.98ZM12 5.49v15M7.75 8.49H5.5M8.5 11.49h-3" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,user:`<path d="M12 12a5 5 0 1 0 0-10 5 5 0 0 0 0 10ZM20.59 22c0-3.87-3.85-7-8.59-7s-8.59 3.13-8.59 7" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,"volume-high":`<path d="M2 10v4c0 2 1 3 3 3h1.43c.37 0 .74.11 1.06.3l2.92 1.83c2.52 1.58 4.59.43 4.59-2.54V7.41c0-2.98-2.07-4.12-4.59-2.54L7.49 6.7c-.32.19-.69.3-1.06.3H5c-2 0-3 1-3 3Z" stroke="currentColor" stroke-width="1.5"></path><path d="M18 8a6.66 6.66 0 0 1 0 8M19.83 5.5a10.83 10.83 0 0 1 0 13" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,"volume-mute":`<path d="M15 8.37v-.96c0-2.98-2.07-4.12-4.59-2.54L7.49 6.7c-.32.19-.69.3-1.06.3H5c-2 0-3 1-3 3v4c0 2 1 3 3 3h2M10.41 19.13c2.52 1.58 4.59.43 4.59-2.54v-3.64M18.81 9.42c.9 2.15.63 4.66-.81 6.58M21.15 7.8a10.82 10.82 0 0 1-1.32 10.7M22 2 2 22" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,x:`<path d="M6.4 6.4l11.2 11.2M17.6 6.4 6.4 17.6" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>`,"zoom-in":`<path d="M11 20a9 9 0 1 0 0-18 9 9 0 0 0 0 18ZM8.5 11h5M11 13.5v-5M18.93 20.69c.53 1.6 1.74 1.76 2.67.36.85-1.28.29-2.33-1.25-2.33-1.14-.01-1.78.88-1.42 1.97Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,"zoom-out":`<path d="M9 11.7h5M11.5 21a9.5 9.5 0 1 0 0-19 9.5 9.5 0 0 0 0 19ZM22 22l-2-2" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`},si=n({devError:()=>B,devWarn:()=>ci});function ci(e,...t){console.warn(e,...t)}function B(e,...t){console.error(e,...t)}var li=Object.freeze({carousel:{entries:[`elements/carousel.ts`],tags:[`wui-carousel`]},"code-block":{entries:[`elements/code-block.ts`],tags:[`wui-code-block`]},"command-palette":{entries:[`elements/command-palette.ts`],tags:[`wui-command-palette`]},"comment-thread":{entries:[`elements/comment-thread.ts`],tags:[`wui-mention-input`,`wui-comment-thread`]},"consent-banner":{entries:[`elements/consent-banner.ts`],tags:[`wui-consent-banner`]},"context-menu":{entries:[`elements/context-menu.ts`],tags:[`wui-context-menu`]},"date-range":{entries:[`elements/date-range.ts`],tags:[`wui-date-range`]},drawer:{entries:[`elements/drawer.ts`],tags:[`wui-drawer`]},dropdown:{entries:[`elements/dropdown.ts`],tags:[`wui-dropdown`]},"entry-grid":{entries:[`elements/entry-grid.ts`],tags:[`wui-entry-grid`]},"image-crop":{entries:[`elements/image-crop.ts`],tags:[`wui-image-crop`]},"inline-edit":{entries:[`elements/inline-edit.ts`],tags:[`wui-inline-edit`]},kanban:{entries:[`elements/kanban.ts`],tags:[`wui-kanban`]},"lead-popup":{entries:[`elements/lead-popup.ts`],tags:[`wui-lead-popup`]},lightbox:{entries:[`elements/lightbox.ts`],tags:[`wui-lightbox`]},"org-tree":{entries:[`elements/org-tree.ts`],tags:[`wui-org-tree`]},markdown:{entries:[`elements/markdown.ts`],tags:[`wui-markdown`]},phone:{entries:[`elements/phone.ts`,`global/parts/select-country.ts`],tags:[`wui-phone`]},popover:{entries:[`elements/popover.ts`],tags:[`wui-popover`]},"saved-views":{entries:[`elements/saved-views.ts`],tags:[`wui-saved-views`]},glyphs:{entries:[`global/parts/glyphs.ts`],tags:[]},"select-chips":{entries:[`global/parts/select-chips.ts`],tags:[]},"select-recents":{entries:[`global/parts/select-recents.ts`],tags:[]},"select-search":{entries:[`global/parts/select-search.ts`],tags:[]},slider:{entries:[`elements/slider.ts`],tags:[`wui-slider`]},sortable:{entries:[`elements/sortable.ts`],tags:[`wui-sortable`]},"status-icon":{entries:[`elements/status-icon.ts`],tags:[`wui-status-icon`]},timepicker:{entries:[`elements/timepicker.ts`],tags:[`wui-timepicker`]},tour:{entries:[`elements/tour.ts`],tags:[`wui-tour`]},tree:{entries:[`elements/tree.ts`],tags:[`wui-tree`]},wizard:{entries:[`elements/wizard.ts`],tags:[`wui-wizard-step`,`wui-wizard`]},chart:{file:`ui-chart.global.js`,tags:[`wui-chart`],selfContained:!0},calendar:{file:`ui-calendar.global.js`,tags:[`wui-calendar`],selfContained:!0},"rich-text":{file:`ui-rich-text.global.js`,tags:[`wui-rich-text`],selfContained:!0},"file-viewer":{file:`ui-file-viewer.global.js`,tags:[`wui-file-viewer`],selfContained:!0}});Object.freeze({anchorOverlay:`anchorOverlay.ts`,buttonClass:`buttonClass.ts`,calendarMath:`calendarMath.ts`,copyText:`copyText.ts`,dataTable:`dataTable.ts`,defineElement:`defineElement.ts`,devWarn:`devWarn.ts`,dom:`dom.ts`,drawerText:`text/web/drawer.g.ts`,elementBase:`elementBase.ts`,fieldState:`fieldState.ts`,formatters:`formatters.ts`,formMirror:`formMirror.ts`,glyphs:`global/glyphs.ts`,iconGlyphs:`iconGlyphs.g.ts`,imeSafeEnter:`imeSafeEnter.ts`,isDrawn:`isDrawn.ts`,listboxKeyNav:`listboxKeyNav.ts`,loader:`global/loader.ts`,mentionText:`mentionText.ts`,menuKeyNav:`menuKeyNav.ts`,nativeOverlay:`nativeOverlay.ts`,notificationDays:`notificationDays.ts`,optionLabel:`optionLabel.ts`,partRegistry:`select/partRegistry.ts`,selectList:`select/list.ts`,selectRemote:`select/remote.ts`,selectText:`text/web/select.g.ts`,stepperHeader:`stepperHeader.ts`,tableSelect:`tableSelect.ts`,textMatch:`textMatch.ts`,textStore:`text/textStore.ts`,tooltips:`tooltips.ts`,wuiHttp:`server/wuiHttp.ts`,WuiSelect:`WuiSelect.ts`,zone:`zone.ts`});var ui=`ui-elements/`;function di(e){let t=li[e];if(t===void 0)throw Error(`[webority-ui] No on-demand element chunk is named ${e}.`);return t}function fi(e){let t=di(e);if(!t.selfContained)return`${ui+e}.global.js`;if(t.file===void 0)throw Error(`[webority-ui] The self-contained element chunk ${e} names no file.`);return t.file}var pi=n({CHUNK_DIR:()=>ui,CHUNK_RETRY_MS:()=>gi,ELEMENTS_DEFINED_EVENT:()=>mi,ELEMENTS_LOAD_ERROR_EVENT:()=>hi,assetUrl:()=>ki,loadChunk:()=>Ai,startElementLoader:()=>Ei,stopElementLoader:()=>Di,whenElementsReady:()=>Oi}),mi=`wui-elements:defined`,hi=`wui-elements:load-error`,gi=1e3,_i={"ui-elements/carousel.global.js":`89bb73e6e8f3`,"ui-elements/code-block.global.js":`253036dfd2b9`,"ui-elements/command-palette.global.js":`99e9ae60415a`,"ui-elements/comment-thread.global.js":`689c5d4b9831`,"ui-elements/consent-banner.global.js":`e9ccac4db678`,"ui-elements/context-menu.global.js":`5088dd676c8e`,"ui-elements/date-range.global.js":`f67c870b29c9`,"ui-elements/drawer.global.js":`ba4efdd5efa3`,"ui-elements/dropdown.global.js":`1d95976a52b3`,"ui-elements/entry-grid.global.js":`ebc26c8836ee`,"ui-elements/image-crop.global.js":`72869a95ba1a`,"ui-elements/inline-edit.global.js":`c112cfaece9d`,"ui-elements/kanban.global.js":`cc3848e4926d`,"ui-elements/lead-popup.global.js":`ee80cd362cd8`,"ui-elements/lightbox.global.js":`a51bb14015a6`,"ui-elements/org-tree.global.js":`307722952c02`,"ui-elements/markdown.global.js":`97526d77780b`,"ui-elements/phone.global.js":`1e2bbae79aec`,"ui-elements/popover.global.js":`d0550c2531fd`,"ui-elements/saved-views.global.js":`35716901686a`,"ui-elements/glyphs.global.js":`a49729969e4b`,"ui-elements/select-chips.global.js":`4d002230cd7f`,"ui-elements/select-recents.global.js":`be3a8907c12d`,"ui-elements/select-search.global.js":`ff314e5173da`,"ui-elements/slider.global.js":`1895b0a0e5f1`,"ui-elements/sortable.global.js":`c15de581af79`,"ui-elements/status-icon.global.js":`418377b7a9fa`,"ui-elements/timepicker.global.js":`7bc70ef4c781`,"ui-elements/tour.global.js":`487fd2f5fdf5`,"ui-elements/tree.global.js":`4aea054bfb0b`,"ui-elements/wizard.global.js":`3a1e5c0c1e0f`,"ui-chart.global.js":`5f17579daddd`,"ui-calendar.global.js":`7a04673ad806`,"ui-rich-text.global.js":`ee652029f32a`,"ui-file-viewer.global.js":`7c0cc6b9259e`,"ui-phone.global.js":`c646775bc1d1`},vi=new Map;for(let[e,t]of Object.entries(li))for(let n of t.tags)vi.set(n,e);var yi=[...vi.keys()].join(`,`),bi=null,xi=``,Si=!1,Ci=null,wi=new Map;function Ti(){let e=document.currentScript;return e instanceof HTMLScriptElement?e:null}function Ei(e=Ti()){Si||(Si=!0,bi=e?.src?e.src:null,xi=e?.nonce||``,Pi(document),Ci=new MutationObserver(e=>{for(let t of e)for(let e of t.addedNodes)e instanceof Element&&Pi(e)}),Ci.observe(document.documentElement,{childList:!0,subtree:!0}))}function Di(){Ci?.disconnect(),Ci=null,Si=!1,bi=null,xi=``,wi.clear()}function Oi(e=document){return Promise.all([...Ni(e)].map(e=>Ai(e))).then(()=>void 0)}function ki(e){if(bi===null)throw Error(`The on-demand element files have no address to load from.`);let t=new URL(e,bi);return t.search=Object.hasOwn(_i,e)?`?v=${_i[e]}`:``,t.href}function Ai(e){let t=wi.get(e);if(t?.promise)return t.promise;let n=di(e),{tags:r}=n,i=fi(e),a=()=>Promise.all(r.map(e=>customElements.whenDefined(e))),o={status:`loading`,promise:null},s=new Promise((t,s)=>{let c=``,l=()=>{Ci&&Object.keys(li).every(e=>wi.get(e)?.status===`loaded`||wi.get(e)?.status===`failed`)&&Ci.disconnect()},u=()=>{o.status=`loaded`,l(),document.dispatchEvent(new CustomEvent(mi,{detail:{chunk:e,tags:r}})),t()},d=t=>{o.status=`failed`,l(),B(`[webority-ui] Could not load ${c} for ${r.length?r.join(`, `):e}.${t?` ${t.message}`:``}`),document.dispatchEvent(new CustomEvent(hi,{detail:{chunk:e,url:c,tags:r}})),s(Error(`[webority-ui] The ${e} elements failed to load.`))},f=(e,t)=>{let i=document.createElement(`script`);i.src=e,i.async=!1,xi&&(i.nonce=xi),i.addEventListener(`load`,()=>{!n.selfContained&&!r.every(e=>customElements.get(e))?d(Error(`The file ran but did not define its elements; see the error above.`)):a().then(u)}),i.addEventListener(`error`,()=>{i.remove(),t?d():setTimeout(()=>f(e,!0),gi)}),document.head.append(i)};if([...document.scripts].some(e=>new URL(e.src,location.href).pathname.endsWith(`/${i}`)))a().then(u);else{try{c=ki(i)}catch(e){d(e instanceof Error?e:void 0);return}f(c,!1)}});return o.promise=s,wi.set(e,o),s}function ji(e){return vi.has(e.localName)&&!customElements.get(e.localName)}function Mi(e,t){let n=vi.get(t.localName);n!==void 0&&ji(t)&&e.add(n)}function Ni(e){let t=new Set;e instanceof Element&&Mi(t,e);for(let n of e.querySelectorAll(yi))Mi(t,n);return t}function Pi(e){for(let t of Ni(e))Promise.allSettled([Ai(t)])}var Fi=n({GLYPH_CHUNK:()=>Ii,GLYPH_PENDING_ATTRIBUTE:()=>Li,glyphSvg:()=>V,registerGlyphs:()=>Gi}),Ii=`glyphs`,Li=`data-wui-glyph-pending`,Ri=`svg[${Li}]`,zi=/^[a-z0-9]+(?:-[a-z0-9]+)*$/,Bi={...oi},Vi=!1,Hi=null;function Ui(e,t,n,r,i){return`<svg class="${n?`wui-icon ${n}`:`wui-icon`}" data-icon="${e}"${i?` ${Li}`:``} width="${t}" height="${t}" viewBox="0 0 24 24" fill="none" aria-hidden="true">${r}</svg>`}function V(e,{size:t=16,className:n=``}={}){let r=Bi[e];return r===void 0?Vi||!zi.test(e)?``:(Promise.allSettled([Ai(Ii)]),Ui(e,t,n,``,!0)):Ui(e,t,n,r,!1)}function Wi(e){let t=e instanceof Element&&e.matches(Ri)?[e]:[];for(let n of[...t,...e.querySelectorAll(Ri)]){let e=Bi[n.getAttribute(`data-icon`)??``];e===void 0?n.remove():(n.removeAttribute(Li),n.innerHTML=e)}}function Gi(e){Object.assign(Bi,e),Vi=!0,Wi(document),Hi===null&&(Hi=new MutationObserver(e=>{for(let t of e)for(let e of t.addedNodes)e instanceof Element&&Wi(e)}),Hi.observe(document.documentElement,{childList:!0,subtree:!0}))}var Ki=n({TRUSTED_HTML:()=>qi,escapeHtml:()=>H,optionLabelHtml:()=>Qi,optionText:()=>ta,stripTags:()=>$i,withTrustedLabel:()=>Ji}),qi=Symbol(`wui.trustedHtml`),Ji=e=>({...e,[qi]:!0}),H=e=>String(e??``).replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`).replace(/"/g,`&quot;`).replace(/'/g,`&#39;`),Yi=e=>{if(!e)return``;let t=String(e).toLowerCase().replace(/[^a-z0-9-]/g,``);return t?V(t):``},Xi=e=>`wui-flag wui-flag-${e}`,Zi=e=>{let t=String(e??``).toLowerCase();return/^[a-z]{2}$/.test(t)?`<span class="${Xi(t)}" aria-hidden="true"></span>`:``},Qi=e=>{if(e==null)return``;let t=e[qi]?String(e.label??``):H(e.label),n=Zi(e.flag)+Yi(e.icon);return n?`<span class="wui-opt-label">${n}${t}</span>`:t},$i=e=>String(e??``).replace(/<[^>]*>/g,``),ea=new WeakMap,ta=e=>{if(e==null)return``;if(!e[qi])return $i(e.label);let t=ea.get(e);if(t&&t.label===e.label)return t.text;let n=document.createElement(`template`);n.innerHTML=String(e.label??``);let r=n.content.textContent??``;return ea.set(e,{label:e.label,text:r}),r},na={chooseMonthYearLabel:`Choose month and year`,chooseYearLabel:`Choose year`,clearLabel:`Clear`,helpLabel:`More information`,nextDecadeLabel:`Next decade`,nextMonth:`Next month`,nextYearLabel:`Next year`,optionalLabel:`(optional)`,placeholder:`Choose a date`,previousDecadeLabel:`Previous decade`,previousMonth:`Previous month`,previousYearLabel:`Previous year`,todayLabel:`Today`},U=()=>N(`datePicker`,na),ra=class extends s{static formAssociated=!0;static get observedAttributes(){return[`value`,`min`,`max`,`placeholder`,`disabled`,`readonly`,`loading`,`first-day`,`disabled-weekdays`,`display-format`,`size`,`aria-label`,`aria-describedby`,`aria-invalid`]}_internals;_value;_defaultValue;_rendered;_viewY;_viewM;_mode;_focus;_slide;_viewNavigated;_openFn;_closeFn;_onKeyBound;_closingQuietly;get _open(){return j(this._openFn,`open missing`)}get _close(){return j(this._closeFn,`close missing`)}constructor(){super();try{this._internals=this.attachInternals()}catch{this._internals=null}this._value=``;let e=new Date(2e3,0,1);this._viewY=e.getFullYear(),this._viewM=e.getMonth(),this._mode=`days`,this._focus=null,this._slide=``}connectedCallback(){this._rendered||this.render()}disconnectedCallback(){this._dropPanel()}attributeChangedCallback(e,t,n){if(e===`aria-invalid`)this._syncInvalid();else if(this._rendered){if(e===`value`)this._value=n||``,this._syncFormValue(),this._syncTrigger();else if(e===`display-format`)this._syncTrigger();else if(e===`first-day`){let e=this.querySelector(`.datepicker-pop`);e instanceof HTMLDivElement&&A(e)&&this._renderView()}else this.render()}}_syncInvalid(){let e=this.querySelector(`.datepicker-trigger`);e instanceof HTMLButtonElement&&(this.hasAttribute(`aria-invalid`)?e.setAttribute(`aria-invalid`,`true`):e.removeAttribute(`aria-invalid`))}formResetCallback(){this.value=this._defaultValue||``}get value(){return this._value}set value(e){this._value=e||``,ii(this,this._value),this._syncTrigger()}_firstDay(){return Ur(this)}render(){this._dropPanel(),this._defaultValue===void 0&&(this._defaultValue=this.getAttribute(`value`)||``,this._value=this._defaultValue||this._value);let e=this.getAttribute(`placeholder`)||U().placeholder,t=R(this._value);t&&(this._viewY=t.y,this._viewM=t.m);let n=this.getAttribute(`size`),r=n===`sm`?` wui-input-sm`:n===`lg`?` wui-input-lg`:n===`xl`?` wui-input-xl`:``,i=this.getAttribute(`aria-label`),a=this.getAttribute(`aria-describedby`);this.innerHTML=`
2
2
  <div class="datepicker">
3
- <button type="button" class="input datepicker-trigger${r}${t?` has-value`:``}" aria-haspopup="dialog" aria-expanded="false"${this.hasAttribute(`aria-invalid`)?` aria-invalid="true"`:``}${this.hasAttribute(`disabled`)?` disabled`:``}${i?` aria-label="${W(i)}"`:``}${a?` aria-describedby="${W(a)}"`:``}>
4
- <span data-trigger-label class="${t?``:`wui-select-placeholder`}">${W(t?gr(this._value,this.getAttribute(`display-format`)):e)}</span>
5
- ${U(`calendar-dots`)}
3
+ <button type="button" class="input datepicker-trigger${r}${t?` has-value`:``}" aria-haspopup="dialog" aria-expanded="false"${this.hasAttribute(`aria-invalid`)?` aria-invalid="true"`:``}${this.hasAttribute(`disabled`)?` disabled`:``}${i?` aria-label="${H(i)}"`:``}${a?` aria-describedby="${H(a)}"`:``}>
4
+ <span data-trigger-label class="${t?``:`wui-select-placeholder`}">${H(t?qr(this._value,this.getAttribute(`display-format`)):e)}</span>
5
+ ${V(`calendar-dots`)}
6
6
  </button>
7
7
  <div class="datepicker-pop" role="dialog" popover="auto"></div>
8
- </div>`,this._rendered=!0,Sr(this,this.querySelector(`.datepicker-trigger`)),V(this,this._value),this._wire()}_syncFormValue(){V(this,this._value)}_syncTrigger(){let e=this.querySelector(`.datepicker-trigger`),t=this.querySelector(`[data-trigger-label]`);if(!(t instanceof HTMLSpanElement))return;let n=z(this._value);t.textContent=n?gr(this._value,this.getAttribute(`display-format`)):this.getAttribute(`placeholder`)||`Choose a date`,t.classList.toggle(`wui-select-placeholder`,!n),e?.classList.toggle(`has-value`,!!n),Sr(this,e)}_limits(){let e=z(this.getAttribute(`min`)),t=z(this.getAttribute(`max`)),n=e?new Date(e.y,e.m,e.d).getTime():-1/0,r=t?new Date(t.y,t.m,t.d).getTime():1/0,i=new Set;for(let e of(this.getAttribute(`disabled-weekdays`)||``).split(`,`)){let t=e.trim();/^[0-6]$/.test(t)&&i.add(Number(t))}return{dayDisabled:(e,t,a)=>{let o=new Date(e,t,a),s=o.getTime();return s<n||s>r||i.has(o.getDay())},monthDisabled:(e,t)=>{let i=new Date(e,t,1).getTime();return new Date(e,t,_r(e,t)).getTime()<n||i>r},yearDisabled:e=>{let t=new Date(e,0,1).getTime();return new Date(e,11,31).getTime()<n||t>r}}}_dropPanel(){let e=this.querySelector(`.datepicker-pop`);if(e instanceof HTMLDivElement){this._closingQuietly=!0;try{j(e)}finally{this._closingQuietly=!1}}}_renderView(){let e=this.querySelector(`.datepicker-pop`);e instanceof HTMLDivElement&&(e.innerHTML=this._mode===`months`?this._monthsHtml():this._mode===`years`?this._yearsHtml():this._daysHtml(),this._focusActive())}_daysHtml(){let e=this._firstDay(),t=(new Date(this._viewY,this._viewM,1).getDay()-e+7)%7,n=_r(this._viewY,this._viewM),r=z(this._value),i=new Date,{dayDisabled:a}=this._limits(),o=this._focus||r||{y:this._viewY,m:this._viewM,d:1},s=(e,t,n,s)=>{let c=mr(e,t,n),l=r&&r.y===e&&r.m===t&&r.d===n,u=i.getFullYear()===e&&i.getMonth()===t&&i.getDate()===n,d=o.y===e&&o.m===t&&o.d===n,f=a(e,t,n);return`<button type="button" class="${[`datepicker-day`,s?`is-outside`:``,u?`is-today`:``,l?`is-selected`:``].filter(Boolean).join(` `)}" data-iso="${c}" role="gridcell" tabindex="${d&&!f?`0`:`-1`}"${l?` aria-selected="true"`:``}${f?` disabled aria-disabled="true"`:``}>${n}</button>`},c=``,l=vr(this._viewY,this._viewM-1),u=_r(l.y,l.m);for(let e=t-1;e>=0;e--)c+=s(l.y,l.m,u-e,!0);for(let e=1;e<=n;e++)c+=s(this._viewY,this._viewM,e,!1);let d=vr(this._viewY,this._viewM+1),f=(7-(t+n)%7)%7;for(let e=1;e<=f;e++)c+=s(d.y,d.m,e,!0);let p=a(i.getFullYear(),i.getMonth(),i.getDate()),m=B(this)?``:`<button type="button" class="datepicker-link" data-clear>Clear</button>`,h=ur.map((t,n)=>ur[(n+e)%7]).map(e=>`<span>${e}</span>`).join(``);return`
8
+ </div>`,this._rendered=!0,$r(this,this.querySelector(`.datepicker-trigger`)),ii(this,this._value),this._wire()}_syncFormValue(){ii(this,this._value)}_syncTrigger(){let e=this.querySelector(`.datepicker-trigger`),t=this.querySelector(`[data-trigger-label]`);if(!(t instanceof HTMLSpanElement))return;let n=R(this._value);t.textContent=n?qr(this._value,this.getAttribute(`display-format`)):this.getAttribute(`placeholder`)||U().placeholder,t.classList.toggle(`wui-select-placeholder`,!n),e?.classList.toggle(`has-value`,!!n),$r(this,e)}_limits(){let e=R(this.getAttribute(`min`)),t=R(this.getAttribute(`max`)),n=e?new Date(e.y,e.m,e.d).getTime():-1/0,r=t?new Date(t.y,t.m,t.d).getTime():1/0,i=new Set;for(let e of(this.getAttribute(`disabled-weekdays`)||``).split(`,`)){let t=e.trim();/^[0-6]$/.test(t)&&i.add(Number(t))}return{dayDisabled:(e,t,a)=>{let o=new Date(e,t,a),s=o.getTime();return s<n||s>r||i.has(o.getDay())},monthDisabled:(e,t)=>{let i=new Date(e,t,1).getTime();return new Date(e,t,Jr(e,t)).getTime()<n||i>r},yearDisabled:e=>{let t=new Date(e,0,1).getTime();return new Date(e,11,31).getTime()<n||t>r}}}_dropPanel(){let e=this.querySelector(`.datepicker-pop`);if(e instanceof HTMLDivElement){this._closingQuietly=!0;try{k(e)}finally{this._closingQuietly=!1}}}_renderView(){let e=this.querySelector(`.datepicker-pop`);e instanceof HTMLDivElement&&(e.innerHTML=this._mode===`months`?this._monthsHtml():this._mode===`years`?this._yearsHtml():this._daysHtml(),this._focusActive())}_daysHtml(){let e=this._firstDay(),t=(new Date(this._viewY,this._viewM,1).getDay()-e+7)%7,n=Jr(this._viewY,this._viewM),r=R(this._value),i=new Date,{dayDisabled:a}=this._limits(),o=this._focus||r||{y:this._viewY,m:this._viewM,d:1},s=(e,t,n,s)=>{let c=Gr(e,t,n),l=r&&r.y===e&&r.m===t&&r.d===n,u=i.getFullYear()===e&&i.getMonth()===t&&i.getDate()===n,d=o.y===e&&o.m===t&&o.d===n,f=a(e,t,n);return`<button type="button" class="${[`datepicker-day`,s?`is-outside`:``,u?`is-today`:``,l?`is-selected`:``].filter(Boolean).join(` `)}" data-iso="${c}" role="gridcell" tabindex="${d&&!f?`0`:`-1`}"${l?` aria-selected="true"`:``}${f?` disabled aria-disabled="true"`:``}>${n}</button>`},c=``,l=Yr(this._viewY,this._viewM-1),u=Jr(l.y,l.m);for(let e=t-1;e>=0;e--)c+=s(l.y,l.m,u-e,!0);for(let e=1;e<=n;e++)c+=s(this._viewY,this._viewM,e,!1);let d=Yr(this._viewY,this._viewM+1),f=(7-(t+n)%7)%7;for(let e=1;e<=f;e++)c+=s(d.y,d.m,e,!0);let p=a(i.getFullYear(),i.getMonth(),i.getDate()),m=z(this)?``:`<button type="button" class="datepicker-link" data-clear>${H(U().clearLabel)}</button>`,h=Array.from({length:7},(t,n)=>cn((n+e)%7,`min`)).map(e=>`<span>${e}</span>`).join(``);return`
9
9
  <div class="datepicker-head">
10
- <button type="button" class="datepicker-nav-btn" data-nav="-1" aria-label="Previous month">${U(`chevron-left`)}</button>
11
- <button type="button" class="datepicker-month" data-view="months" aria-label="Choose month and year">${lr[this._viewM]} ${this._viewY}</button>
12
- <button type="button" class="datepicker-nav-btn" data-nav="1" aria-label="Next month">${U(`chevron-right`)}</button>
10
+ <button type="button" class="datepicker-nav-btn" data-nav="-1" aria-label="${H(U().previousMonth)}">${V(`chevron-left`)}</button>
11
+ <button type="button" class="datepicker-month" data-view="months" aria-label="${H(U().chooseMonthYearLabel)}">${sn(this._viewM)} ${this._viewY}</button>
12
+ <button type="button" class="datepicker-nav-btn" data-nav="1" aria-label="${H(U().nextMonth)}">${V(`chevron-right`)}</button>
13
13
  </div>
14
14
  <div class="datepicker-weekdays">${h}</div>
15
15
  <div class="datepicker-grid${this._slide?` ${this._slide}`:``}" role="grid">${c}</div>
16
16
  <div class="datepicker-foot">
17
- <button type="button" class="datepicker-link" data-today${p?` disabled`:``}>Today</button>
17
+ <button type="button" class="datepicker-link" data-today${p?` disabled`:``}>${H(U().todayLabel)}</button>
18
18
  ${m}
19
- </div>`}_monthsHtml(){let e=z(this._value),t=new Date,{monthDisabled:n}=this._limits(),r=``;for(let i=0;i<12;i++){let a=e&&e.y===this._viewY&&e.m===i,o=t.getFullYear()===this._viewY&&t.getMonth()===i,s=n(this._viewY,i),c=[`datepicker-cell`,o?`is-today`:``,a?`is-selected`:``].filter(Boolean).join(` `),l=lr[i];if(l===void 0)throw Error(`month name missing`);r+=`<button type="button" class="${c}" data-month="${i}"${s?` disabled`:``}>${l.slice(0,3)}</button>`}return`
19
+ </div>`}_monthsHtml(){let e=R(this._value),t=new Date,{monthDisabled:n}=this._limits(),r=``;for(let i=0;i<12;i++){let a=e&&e.y===this._viewY&&e.m===i,o=t.getFullYear()===this._viewY&&t.getMonth()===i,s=n(this._viewY,i),c=[`datepicker-cell`,o?`is-today`:``,a?`is-selected`:``].filter(Boolean).join(` `);r+=`<button type="button" class="${c}" data-month="${i}"${s?` disabled`:``}>${on(i)}</button>`}return`
20
20
  <div class="datepicker-head">
21
- <button type="button" class="datepicker-nav-btn" data-nav-year="-1" aria-label="Previous year">${U(`chevron-left`)}</button>
22
- <button type="button" class="datepicker-month" data-view="years" aria-label="Choose year">${this._viewY}</button>
23
- <button type="button" class="datepicker-nav-btn" data-nav-year="1" aria-label="Next year">${U(`chevron-right`)}</button>
21
+ <button type="button" class="datepicker-nav-btn" data-nav-year="-1" aria-label="${H(U().previousYearLabel)}">${V(`chevron-left`)}</button>
22
+ <button type="button" class="datepicker-month" data-view="years" aria-label="${H(U().chooseYearLabel)}">${this._viewY}</button>
23
+ <button type="button" class="datepicker-nav-btn" data-nav-year="1" aria-label="${H(U().nextYearLabel)}">${V(`chevron-right`)}</button>
24
24
  </div>
25
- <div class="datepicker-cells">${r}</div>`}_yearsHtml(){let e=z(this._value),t=new Date().getFullYear(),{yearDisabled:n}=this._limits(),r=this._viewY-(this._viewY%10+10)%10-1,i=``;for(let a=0;a<12;a++){let o=r+a,s=e&&e.y===o,c=t===o,l=n(o),u=[`datepicker-cell`,c?`is-today`:``,s?`is-selected`:``].filter(Boolean).join(` `);i+=`<button type="button" class="${u}" data-year="${o}"${l?` disabled`:``}>${o}</button>`}return`
25
+ <div class="datepicker-cells">${r}</div>`}_yearsHtml(){let e=R(this._value),t=new Date().getFullYear(),{yearDisabled:n}=this._limits(),r=this._viewY-(this._viewY%10+10)%10-1,i=``;for(let a=0;a<12;a++){let o=r+a,s=e&&e.y===o,c=t===o,l=n(o),u=[`datepicker-cell`,c?`is-today`:``,s?`is-selected`:``].filter(Boolean).join(` `);i+=`<button type="button" class="${u}" data-year="${o}"${l?` disabled`:``}>${o}</button>`}return`
26
26
  <div class="datepicker-head">
27
- <button type="button" class="datepicker-nav-btn" data-nav-decade="-1" aria-label="Previous decade">${U(`chevron-left`)}</button>
27
+ <button type="button" class="datepicker-nav-btn" data-nav-decade="-1" aria-label="${H(U().previousDecadeLabel)}">${V(`chevron-left`)}</button>
28
28
  <span class="datepicker-month">${r+1} to ${r+10}</span>
29
- <button type="button" class="datepicker-nav-btn" data-nav-decade="1" aria-label="Next decade">${U(`chevron-right`)}</button>
29
+ <button type="button" class="datepicker-nav-btn" data-nav-decade="1" aria-label="${H(U().nextDecadeLabel)}">${V(`chevron-right`)}</button>
30
30
  </div>
31
- <div class="datepicker-cells">${i}</div>`}_focusActive(){let e=this.querySelector(`.datepicker-pop`);if(!(e instanceof HTMLDivElement))return;let t=e.querySelector(`[tabindex="0"]`)||e.querySelector(`.is-selected`)||e.querySelector(`.datepicker-day:not(:disabled), .datepicker-cell:not(:disabled)`);t instanceof HTMLElement&&e.contains(document.activeElement)&&t.focus()}_setFocus(e,t,n,r){let{y:i,m:a}=vr(e,t);this._focus={y:i,m:a,d:n};let o=i!==this._viewY||a!==this._viewM;this._viewY=i,this._viewM=a,this._slide=o&&r||``,this._renderView(),this._slide=``;let s=this.querySelector(`.datepicker-day[data-iso="${mr(i,a,n)}"]`);s instanceof HTMLButtonElement&&s.focus()}_seek(e,t,n,r){let{dayDisabled:i}=this._limits(),a=new Date(e,t,n);for(let e=0;e<400;e++,a.setDate(a.getDate()+r))if(!i(a.getFullYear(),a.getMonth(),a.getDate()))return new Date(a);return null}_onKey(e){if(this._mode!==`days`)return;let t=this._focus||z(this._value)||{y:this._viewY,m:this._viewM,d:1},n=(e,t,n,r,i)=>{let a=this._seek(e,t,n,r);a&&this._setFocus(a.getFullYear(),a.getMonth(),a.getDate(),i)},r=(r,i,a=r<0?-1:1)=>{e.preventDefault(),n(t.y,t.m,t.d+r,a,i)};switch(e.key){case`ArrowLeft`:r(-1,`slide-prev`);break;case`ArrowRight`:r(1,`slide-next`);break;case`ArrowUp`:r(-7,`slide-prev`);break;case`ArrowDown`:r(7,`slide-next`);break;case`Home`:r(-((new Date(t.y,t.m,t.d).getDay()-this._firstDay()+7)%7),`slide-prev`,1);break;case`End`:r(6-(new Date(t.y,t.m,t.d).getDay()-this._firstDay()+7)%7,`slide-next`,-1);break;case`PageUp`:{e.preventDefault();let r=vr(t.y,t.m-(e.shiftKey?12:1));n(r.y,r.m,Math.min(t.d,_r(r.y,r.m)),-1,`slide-prev`);break}case`PageDown`:{e.preventDefault();let r=vr(t.y,t.m+(e.shiftKey?12:1));n(r.y,r.m,Math.min(t.d,_r(r.y,r.m)),1,`slide-next`);break}case`Enter`:case` `:e.preventDefault(),this._limits().dayDisabled(t.y,t.m,t.d)||(this.value=mr(t.y,t.m,t.d),this.dispatchEvent(new Event(`change`,{bubbles:!0})),this._close());return}}_wire(){let e=this.querySelector(`.datepicker-trigger`),t=this.querySelector(`.datepicker-pop`),n=this.querySelector(`.datepicker`);if(!(e instanceof HTMLButtonElement)||!(t instanceof HTMLDivElement))return;let r=()=>M(t),i=()=>{n?.classList.remove(`open`),e.setAttribute(`aria-expanded`,`false`),this._closingQuietly||e.focus()};this._openFn=()=>{if(B(this))return;let a=new Date,o=z(this._value);(o||!this._viewNavigated)&&(this._viewY=a.getFullYear(),this._viewM=a.getMonth()),this._mode=`days`;let s=a.getFullYear()===this._viewY&&a.getMonth()===this._viewM,c=o&&o.y===this._viewY&&o.m===this._viewM;if(this._focus=c?o:{y:this._viewY,m:this._viewM,d:s?a.getDate():1},this._limits().dayDisabled(this._focus.y,this._focus.m,this._focus.d)){let e=this._focus,t=[1,-1].map(t=>this._seek(e.y,e.m,e.d,t)).find(t=>t&&t.getMonth()===e.m);t&&(this._focus={y:t.getFullYear(),m:t.getMonth(),d:t.getDate()})}if(this._renderView(),A(e,t,{mode:`auto`,clampHeight:!0,onClosed:i}),!r())return;n?.classList.add(`open`),e.setAttribute(`aria-expanded`,`true`);let l=t.querySelector(`[tabindex="0"]`);l instanceof HTMLElement&&l.focus()},this._closeFn=()=>{j(t)},e.addEventListener(`click`,()=>r()?this._close():this._open()),t.addEventListener(`click`,e=>{let t=e.target;if(!(t instanceof Element))throw Error(`click target is not an element`);let n=t.closest(`[data-nav]`);if(n instanceof HTMLElement){this._viewNavigated=!0,this._slide=Number(n.dataset.nav)<0?`slide-prev`:`slide-next`;let e=vr(this._viewY,this._viewM+Number(n.dataset.nav));this._viewY=e.y,this._viewM=e.m,this._focus={y:e.y,m:e.m,d:1},this._renderView(),this._slide=``;return}let r=t.closest(`[data-nav-year]`);if(r instanceof HTMLElement){this._viewY+=Number(r.dataset.navYear),this._renderView();return}let i=t.closest(`[data-nav-decade]`);if(i instanceof HTMLElement){this._viewY+=Number(i.dataset.navDecade)*10,this._renderView();return}let a=t.closest(`[data-view]`);if(a instanceof HTMLElement){this._mode=a.dataset.view,this._renderView();return}let o=t.closest(`[data-month]`);if(o instanceof HTMLButtonElement&&!o.disabled){this._viewNavigated=!0,this._viewM=Number(o.dataset.month),this._mode=`days`,this._focus={y:this._viewY,m:this._viewM,d:1},this._renderView();return}let s=t.closest(`[data-year]`);if(s instanceof HTMLButtonElement&&!s.disabled){this._viewNavigated=!0,this._viewY=Number(s.dataset.year),this._mode=`months`,this._renderView();return}if(t.closest(`[data-today]`)){let e=new Date;if(this._limits().dayDisabled(e.getFullYear(),e.getMonth(),e.getDate()))return;this.value=mr(e.getFullYear(),e.getMonth(),e.getDate()),this.dispatchEvent(new Event(`change`,{bubbles:!0})),this._close();return}if(t.closest(`[data-clear]`)){this.value=``,this.dispatchEvent(new Event(`change`,{bubbles:!0})),this._close();return}let c=t.closest(`.datepicker-day[data-iso]`);c instanceof HTMLButtonElement&&!c.disabled&&(this.value=c.dataset.iso,this.dispatchEvent(new Event(`change`,{bubbles:!0})),this._close())}),this._onKeyBound=e=>{r()&&this._onKey(e)},t.addEventListener(`keydown`,this._onKeyBound),this._syncFormValue()}},Ti=class extends s{_pointerMoveListener;_pointerLeaveListener;_frame;_pointerX;static get observedAttributes(){return[`static`,`max-scale`,`radius`]}constructor(){super(),this._pointerMoveListener=null,this._pointerLeaveListener=null,this._frame=0,this._pointerX=0}connectedCallback(){this._wire()}disconnectedCallback(){this._teardown()}attributeChangedCallback(e,t,n){e===`static`&&this.isConnected&&this._wire()}_maxScale(){return Di(this.getAttribute(`max-scale`),1.6)}_radius(){return Di(this.getAttribute(`radius`),100)}_magnifyEnabled(){return!(this.hasAttribute(`static`)||typeof matchMedia==`function`&&(matchMedia(`(pointer: coarse)`).matches||matchMedia(`(prefers-reduced-motion: reduce)`).matches))}_applyMagnification(){this._frame=0;let e=this._maxScale(),t=this._radius();for(let n of this.querySelectorAll(`.dock-item`)){let r=Ei(n),i=r.getBoundingClientRect(),a=Math.abs(this._pointerX-(i.left+i.width/2)),o=Math.max(0,1-a/t),s=1+(e-1)*o;r.style.setProperty(`--wui-dock-mag`,s.toFixed(3))}}_resetMagnification(){this._frame&&=(cancelAnimationFrame(this._frame),0);for(let e of this.querySelectorAll(`.dock-item`))Ei(e).style.removeProperty(`--wui-dock-mag`)}_wire(){this._teardown(),this._magnifyEnabled()&&(this._pointerMoveListener=e=>{this._pointerX=e.clientX,this._frame||=requestAnimationFrame(()=>this._applyMagnification())},this._pointerLeaveListener=()=>this._resetMagnification(),this.addEventListener(`pointermove`,this._pointerMoveListener),this.addEventListener(`pointerleave`,this._pointerLeaveListener))}_teardown(){this._pointerMoveListener&&=(this.removeEventListener(`pointermove`,this._pointerMoveListener),null),this._pointerLeaveListener&&=(this.removeEventListener(`pointerleave`,this._pointerLeaveListener),null),this._resetMagnification()}},Ei=e=>je(e,HTMLElement,`wui-dock item must be an HTML element`),Di=(e,t)=>{let n=Number.parseFloat(e??``);return Number.isFinite(n)?n:t},Oi=300,ki=150,Ai=`.wui-hover-card-trigger`,ji=`.wui-hover-card-panel`,Mi=`a[href],button,input,select,textarea,[tabindex]`,Ni=0;function Pi(e,t){let n=e.querySelector(t);return n instanceof HTMLElement?n:null}var Fi=class extends s{_doc;_timer;_described;_refocusing;_onOver;_onOut;_onFocusIn;_onFocusOut;_onKeyDown;static get observedAttributes(){return[`open`]}constructor(){super(),this._doc=null,this._timer=null,this._described=null,this._refocusing=!1,this._onOver=e=>{if(e.pointerType===`touch`||e.pointerType===`pen`)return;let t=this._zone(e.target);t===`panel`?this._clear():t===`trigger`&&this._schedule(!0)},this._onOut=e=>{e.pointerType!==`touch`&&e.pointerType!==`pen`&&this._zone(e.target)&&!this._zone(e.relatedTarget)&&this._schedule(!1)},this._onFocusIn=e=>{this._refocusing||(this._zone(e.target)===`trigger`?this._schedule(!0):this._zone(e.target)===`panel`&&this._clear())},this._onFocusOut=e=>{this._zone(e.target)&&!this._zone(e.relatedTarget)&&this._schedule(!1)},this._onKeyDown=e=>{if(e.key!==`Escape`||!this.isOpen||this.hasAttribute(`open`))return;e.preventDefault();let t=this._zone(this.ownerDocument.activeElement)===`panel`;this._clear(),this._setOpen(!1),t&&(this._refocusing=!0,this._anchor?.focus(),this._refocusing=!1)}}get isOpen(){let e=this._panel;return e!==null&&M(e)}connectedCallback(){this._doc=this.ownerDocument,this.addEventListener(`pointerover`,this._onOver),this.addEventListener(`pointerout`,this._onOut),this.addEventListener(`focusin`,this._onFocusIn),this.addEventListener(`focusout`,this._onFocusOut),this._syncOpen()}attributeChangedCallback(){this.isConnected&&this._syncOpen()}disconnectedCallback(){this._clear();let e=this._panel;e&&j(e),this.removeEventListener(`pointerover`,this._onOver),this.removeEventListener(`pointerout`,this._onOut),this.removeEventListener(`focusin`,this._onFocusIn),this.removeEventListener(`focusout`,this._onFocusOut),this._doc=null}get _trigger(){return Pi(this,Ai)}get _panel(){return Pi(this,ji)}get _anchor(){let e=this._trigger;return e?Pi(e,Mi)??e:null}_zone(e){if(!(e instanceof Node)||!this.contains(e))return null;let t=e instanceof Element?e:e.parentElement;return this._panel?.contains(t)?`panel`:this._trigger?.contains(t)?`trigger`:null}_delay(e,t){let n=Number(this.getAttribute(e));return this.hasAttribute(e)&&Number.isFinite(n)&&n>=0?n:t}_clear(){this._timer!==null&&clearTimeout(this._timer),this._timer=null}_syncOpen(){this._clear(),this._setOpen(this.hasAttribute(`open`))}_schedule(e){if(!e&&this.hasAttribute(`open`)||(this._clear(),this.isOpen===e))return;let t=e?this._delay(`open-delay`,Oi):this._delay(`close-delay`,ki);this._timer=setTimeout(()=>{this._timer=null,this._setOpen(e)},t)}_setOpen(e){let t=this._panel;if(!t||this.isOpen===e)return;if(!e){j(t);return}let n=this._trigger;if(!n)throw Error(`wui-hover-card: panel without a trigger`);A(n,t,{mode:`manual`,clampHeight:!0,keepOffscreen:this.hasAttribute(`open`),onClosed:()=>this._closed()}),this._doc?.addEventListener(`keydown`,this._onKeyDown,!0),this._describe(t),this.dispatchEvent(new CustomEvent(`wui:hover-card:open`,{bubbles:!0}))}_closed(){this._doc?.removeEventListener(`keydown`,this._onKeyDown,!0),this._described?.removeAttribute(`aria-describedby`),this._described=null,this.dispatchEvent(new CustomEvent(`wui:hover-card:close`,{bubbles:!0}))}_describe(e){let t=this._anchor;t&&(e.id||=`wui-hover-card-${++Ni}`,t.setAttribute(`aria-describedby`,e.id),this._described=t)}},Ii=class extends s{_doc;_release;_opener;_returnTo;_session;_closing;_reopen;static get observedAttributes(){return[`open`,`static`,`no-escape`]}constructor(){super(),this._doc=null,this._release=null,this._opener=null,this._returnTo=null,this._session=0,this._closing=!1,this._reopen=!1}connectedCallback(){this._doc=this.ownerDocument,ke(this._doc),this.hasAttribute(`open`)&&this._open()}disconnectedCallback(){this._session++,this._closing=!1,this._reopen=!1;let e=this.querySelector(`dialog`);this._release&&e instanceof HTMLDialogElement&&e.close(),this._releaseDialog(),this._opener=null,this._returnTo=null,this._doc=null}attributeChangedCallback(e){this._doc&&e===`open`&&(this.hasAttribute(`open`)?this._open():this._close())}get isOpen(){return this.hasAttribute(`open`)}show(e){e&&(this._opener=e),this.setAttribute(`open`,``)}hide(){this.removeAttribute(`open`)}_open(){if(this._closing){this._reopen=!0;return}if(this._release)return;let e=++this._session,t=this._opener;if(this._returnTo=t,this._opener=null,this.dispatchEvent(new CustomEvent(`wui-modal-open`,{bubbles:!0,detail:{trigger:t}})),!this.isOpen)return;let n=this._dialog();this._release=Se(n,{escape:!this.hasAttribute(`no-escape`),backdrop:!this.hasAttribute(`static`),focus:`first-control`,onRequestClose:e=>this._requestClose(e)}),this._settle(e,n)}_close(){if(this._closing){this._reopen=!1;return}if(!this._release)return;this._closing=!0;let e=this._session,t=this._dialog();Ce(t).then(()=>{e===this._session&&(this._closing=!1,this._releaseDialog(),ye(this._returnTo,t),this._returnTo=null,this.dispatchEvent(new CustomEvent(`wui-modal-closed`,{bubbles:!0})),this._reopen&&(this._reopen=!1,this.isOpen&&this._open()))})}_settle(e,t){let n=t.getAnimations?.()??[];n.length?Promise.allSettled(n.map(e=>e.finished)).then(()=>{e===this._session&&this.isOpen&&this._announceOpened()}):this._announceOpened()}_announceOpened(){this.dispatchEvent(new CustomEvent(`wui-modal-opened`,{bubbles:!0}))}_requestClose(e){this.dispatchEvent(new CustomEvent(`wui-modal-close`,{bubbles:!0,cancelable:!0,detail:{reason:e}}))&&this.removeAttribute(`open`)}_releaseDialog(){let e=this._release;this._release=null,e?.()}_dialog(){let e=this.querySelector(`dialog`);if(!(e instanceof HTMLDialogElement))throw TypeError(`wui-modal has no <dialog>`);return e}},Li=`.wui-nav-menu-link`,Ri=`(max-width: 767.98px)`,zi=`data-open`,Bi=e=>e instanceof Element?e:e instanceof Node?e.parentElement:null,Vi=e=>[...e].filter(e=>e instanceof HTMLElement),Hi=e=>{let t=e.children[0];if(!(t instanceof HTMLElement))throw Error(`Navigation entry has no control.`);return t},Ui=e=>{let t=e.children[1];return t instanceof HTMLElement?t:null},Wi=(e,t,n)=>{let r=e[t];if(r===void 0)throw Error(n);return r},Gi=class extends s{constructor(){super(),this._onClick=e=>this._handleClick(e),this._onKeyDown=e=>this._handleKeyDown(e),this._onFocusOut=e=>{let t=this._openItem(),n=e.relatedTarget;t&&n instanceof Node&&!t.contains(n)&&this._set(t,!1)},this._onPointerDown=()=>{this._pressedOpen=this._openItem()},this._onModeChange=()=>{let e=this._openItem();e&&this._set(e,!1)},this._onOutsidePress=e=>{let t=this._openItem();t&&!e.composedPath().includes(t)&&this._set(t,!1)},this._pressedOpen=null,this._media=null}connectedCallback(){this._teardown(),this.addEventListener(`click`,this._onClick),this.addEventListener(`keydown`,this._onKeyDown),this.addEventListener(`focusout`,this._onFocusOut),this.addEventListener(`pointerdown`,this._onPointerDown,!0),this._media=window.matchMedia(Ri),this._media.addEventListener(`change`,this._onModeChange)}disconnectedCallback(){this._teardown()}open(e){let t=this._items().find(t=>{let n=t.children[0];return n instanceof HTMLElement&&this._isTrigger(n)&&n.dataset.key===e});t&&this._set(t,!0)}close(e=!1){let t=this._openItem();t&&(this._set(t,!1),e&&Hi(t).focus({preventScroll:!0}))}_items(){return Vi(this.querySelectorAll(`.wui-nav-menu-item`))}_openItem(){return this._items().find(e=>{let t=Ui(e);return t!==null&&this._isOpen(t)})??null}_isOpen(e){return e.hasAttribute(zi)||M(e)}_isTrigger(e){return!!e?.classList.contains(`wui-nav-menu-trigger`)}_entries(){return this._items().map(Hi)}_links(e){let t=Ui(e);return t?Vi(t.querySelectorAll(Li)):[]}_set(e,t){let n=Ui(e);if(!n)return;let r=Hi(e);if(t){let t=this._openItem();if(t&&t!==e&&this._set(t,!1),this._isOpen(n))return;r.setAttribute(`aria-expanded`,`true`),window.matchMedia(Ri).matches?(n.setAttribute(zi,``),document.addEventListener(`pointerdown`,this._onOutsidePress,!0)):A(r,n,{mode:`auto`,below:!0,flipAlign:!0,onClosed:()=>this._settle(e)}),this._emit(r,!0)}else n.removeAttribute(zi),document.removeEventListener(`pointerdown`,this._onOutsidePress,!0),M(n)&&j(n),this._settle(e)}_settle(e){let t=Hi(e);t.getAttribute(`aria-expanded`)!==`false`&&(t.setAttribute(`aria-expanded`,`false`),this._emit(t,!1))}_emit(e,t){this.dispatchEvent(new CustomEvent(`wui-navigation-menu:toggle`,{bubbles:!0,detail:{key:e.dataset.key??null,open:t}}))}_handleClick(e){let t=this._pressedOpen;this._pressedOpen=null;let n=Bi(e.target),r=n?.closest(`.wui-nav-menu-trigger`);if(r&&this.contains(r)){let e=N(r.parentElement,`Navigation trigger has no entry.`),n=N(Ui(e),`Navigation entry has no panel.`),i=t===e||this._isOpen(n);this._set(e,!i);return}let i=n?.closest(Li);i&&this.contains(i)&&this.close()}_handleKeyDown(e){if(this._pressedOpen=null,e.altKey||e.ctrlKey||e.metaKey)return;let t=Bi(e.target)?.closest(`.wui-nav-menu-trigger, .wui-nav-menu-toplink, .wui-nav-menu-link`);if(!(t instanceof HTMLElement)||!this.contains(t))return;let n=this._openItem();if(e.key===`Escape`){if(!n||!Ui(n)?.hasAttribute(zi))return;e.preventDefault(),e.stopPropagation();let r=n.contains(t);this._set(n,!1),r&&Hi(n).focus({preventScroll:!0});return}if(t.matches(Li)){this._linkKey(e,t);return}let r=this._entries(),i=r.indexOf(t);if(e.key===`ArrowRight`||e.key===`ArrowLeft`||e.key===`Home`||e.key===`End`){e.preventDefault();let t=e.key===`Home`?0:e.key===`End`?r.length-1:(i+(e.key===`ArrowRight`?1:-1)+r.length)%r.length;n&&this._set(n,!1),Wi(r,t,`Navigation has no entry to focus.`).focus({preventScroll:!0})}else if(e.key===`ArrowDown`&&this._isTrigger(t)){e.preventDefault();let n=N(t.parentElement,`Navigation trigger has no entry.`);this._set(n,!0),Wi(this._links(n),0,`Navigation panel has no link to focus.`).focus({preventScroll:!0})}}_linkKey(e,t){let n=N(t.closest(`.wui-nav-menu-item`),`Navigation link has no entry.`),r=this._links(n),i=r.indexOf(t);e.key===`ArrowDown`||e.key===`ArrowUp`?(e.preventDefault(),Wi(r,(i+(e.key===`ArrowDown`?1:-1)+r.length)%r.length,`Navigation panel has no link to focus.`).focus({preventScroll:!0})):e.key===`Home`?(e.preventDefault(),Wi(r,0,`Navigation panel has no link to focus.`).focus({preventScroll:!0})):e.key===`End`&&(e.preventDefault(),Wi(r,r.length-1,`Navigation panel has no link to focus.`).focus({preventScroll:!0}))}_teardown(){for(let e of this._items()){let t=Ui(e);if(!t)continue;let n=t.hasAttribute(zi);t.removeAttribute(zi),j(t),n&&this._settle(e)}this._media?.removeEventListener(`change`,this._onModeChange),this._media=null,document.removeEventListener(`pointerdown`,this._onOutsidePress,!0),this.removeEventListener(`click`,this._onClick),this.removeEventListener(`keydown`,this._onKeyDown),this.removeEventListener(`focusout`,this._onFocusOut),this.removeEventListener(`pointerdown`,this._onPointerDown,!0)}},Ki=n({isDrawn:()=>qi});function qi(e){return typeof e.checkVisibility==`function`?e.checkVisibility():e.closest(`[hidden]`)===null&&getComputedStyle(e).display!==`none`}var Ji=n({NOTIFICATION_COUNT_CAP:()=>99,NOTIFICATION_TEXT:()=>Zi,groupNotificationsByDay:()=>ra,notificationCountText:()=>Qi,notificationDayHeading:()=>na,notificationTime:()=>ta,notificationTriggerLabel:()=>$i,notificationUnreadAnnouncement:()=>ea}),Yi=99,Xi=864e5,Zi=Object.freeze({label:`Notifications`,empty:`You are all caught up.`,markAll:`Mark all read`,viewAll:`View all`,unreadPrefix:`Unread: `,today:`Today`,yesterday:`Yesterday`,allRead:`All notifications marked as read.`,noneUnread:`No unread notifications`,failed:Object.freeze({forbidden:`You do not have permission to mark these as read.`,client:`These could not be marked as read. Refresh the page and try again.`,validation:`These could not be marked as read. Refresh the page and try again.`,server:`Something went wrong on our side, so these were not marked as read. Try again in a moment.`,network:`Could not reach the server, so these were not marked as read. Check your connection and try again.`})});function Qi(e){return e>99?`99+`:String(e)}function $i(e,t){return t===0?e:`${e}, ${Qi(t)} unread`}function ea(e){return e===0?Zi.noneUnread:`${Qi(e)} unread notifications`}function ta(e){return/^\d{4}-\d{2}-\d{2}$/.test(e)?``:I(e,{pattern:`time`})}function na(e,t=Date.now()){let n=I(e);return n===I(t)?Zi.today:n===I(sn(t)-Xi)?Zi.yesterday:n}function ra(e,t=Date.now()){let n=new Map;for(let r of e){if(!Number.isFinite(sn(r.at)))throw Error(`<AppNotificationCenter> item "${r.id}": at must be an ISO date-time with its zone (or a YYYY-MM-DD day), got ${String(r.at)}.`);let e=I(r.at),i=n.get(e);i||(i={key:e,heading:na(r.at,t),items:[]},n.set(e,i)),i.items.push(r)}return[...n.values()]}var ia=Object.freeze([`POST`,`PUT`,`PATCH`,`DELETE`]),aa=e=>(Ar(`[@webority/ui-elements] Wui-Toast-Action: ${e}; the toast shows no action.`),null),oa=e=>typeof e==`object`&&!!e;function sa(e){if(e==null||e===``)return null;let t;try{t=JSON.parse(e)}catch{return aa(`the value is not JSON`)}let n=oa(t)?t:{},r=n.label,i=n.url,a=String(n.method??`POST`).toUpperCase();return typeof r!=`string`||r===``||typeof i!=`string`||i===``?aa(`label and url must be non-empty strings`):ia.includes(a)?{label:r,url:i,method:a}:aa(`method must be one of ${ia.join(`, `)}`)}var ca=n({CSRF_META_NAME:()=>la,DEFAULT_CSRF_HEADER:()=>ua,HTTP_KINDS:()=>ma,WUI_HEADERS:()=>G,WUI_REQUEST_HEADER:()=>pa,classifyStatus:()=>va,configureCsrf:()=>fa,createRequestQueue:()=>Sa,readCsrf:()=>ga,wuiFetch:()=>xa}),la=`wui-csrf`,ua=`RequestVerificationToken`,da={metaName:la,header:ua};function fa({metaName:e=la,header:t=ua}={}){da={metaName:e,header:t}}var pa=`Wui-Request`,G=Object.freeze({fragment:`Wui-Fragment`,message:`Wui-Message`,redirect:`Wui-Redirect`,result:`Wui-Result`,keepOpen:`Wui-Keep-Open`,toastVariant:`Wui-Toast-Variant`,toastAction:`Wui-Toast-Action`,data:`Wui-Data`,next:`Wui-Next`}),ma=Object.freeze([`ok`,`validation`,`forbidden`,`client`,`server`,`network`,`aborted`,`stale`,`session`]),ha=new Set([`GET`,`HEAD`]);function ga(e=document){let t=[...e.querySelectorAll(`meta`)].find(e=>e.getAttribute(`name`)===da.metaName),n=t?.getAttribute(`content`);return!t||!n?null:{header:t.getAttribute(`data-header`)||da.header,token:n}}var _a=e=>{try{return new URL(e,window.location.href).origin===window.location.origin}catch{return!1}};function va(e){return e>=200&&e<300?`ok`:e===401?`session`:e===403?`forbidden`:e===422?`validation`:e>=400&&e<500?`client`:`server`}var ya=e=>typeof e==`object`&&!!e&&`name`in e&&e.name===`AbortError`,ba=e=>{if(e==null||e===``)return null;try{return JSON.parse(e)}catch(e){throw TypeError(`The ${G.data} response header is not JSON: ${e instanceof Error?e.message:String(e)}`,{cause:e})}};async function xa(e,t={}){let n=(t.method||`GET`).toUpperCase(),r=t.navigate||(e=>window.location.assign(e)),i={Accept:`text/html`,"X-Requested-With":`XMLHttpRequest`,[pa]:`1`,...t.headers};if(!ha.has(n)&&_a(e)){let e=ga();e&&(i[e.header]=e.token)}let a=e=>{if(e==null)return null;try{return decodeURIComponent(e)}catch{return e}},o=(e,t=null,n=``)=>{let r=e=>t?.headers.get(e)??null;return{kind:e,ok:e===`ok`,status:t?.status??0,html:n,response:t,message:a(r(G.message)),redirect:r(G.redirect),result:r(G.result),keepOpen:r(G.keepOpen)===`1`,toastVariant:r(G.toastVariant),toastAction:sa(r(G.toastAction)),fragment:r(G.fragment)===`1`,data:ba(a(r(G.data))),next:r(G.next)}},s;try{s=await fetch(e,{method:n,...t.body===void 0?{}:{body:t.body},headers:i,...t.signal===void 0?{}:{signal:t.signal},credentials:`same-origin`})}catch(e){return o(ya(e)||t.signal?.aborted?`aborted`:`network`)}let c=va(s.status);if(c===`ok`&&s.redirected&&s.headers.get(G.fragment)!==`1`&&(c=`session`),c===`session`)return r(s.status===401?s.headers.get(`Location`)||window.location.href:s.url),o(c,s);let l=``;if(c===`ok`||c===`validation`)try{l=await s.text()}catch(e){return o(ya(e)||t.signal?.aborted?`aborted`:`network`,s)}return o(c,s,l)}function Sa(){let e=null,t=0;return{async run(n,r={}){e?.abort();let i=new AbortController;e=i;let a=++t,o=r.signal;o&&(o.aborted?i.abort():o.addEventListener(`abort`,()=>i.abort(),{once:!0}));let s;try{s=await xa(n,{...r,signal:i.signal})}finally{e===i&&(e=null)}return a!==t&&s.kind!==`aborted`?{...s,kind:`stale`,ok:!1}:s},abort(){e?.abort(),e=null}}}var Ca=`.wui-notification-center-trigger`,wa=`.wui-notification-center-panel`,Ta=`.wui-notification-center-count`,Ea=`.wui-notification-center-live`,Da=`.wui-notification-center-markall`,Oa=`.wui-notification-center-item`,ka=`wui-notification-center-item-read`,Aa=`.wui-notification-center-unread-label`,ja=`.app-tabs`,Ma=`.wui-notification-center-tabs [role='tablist']`,Na=`.wui-notification-center-tabs [role='tab']`,Pa=`.wui-notification-center-empty`,Fa=`(max-width: 767.98px)`,Ia={ArrowDown:1,ArrowUp:-1,Home:`first`,End:`last`},La=e=>!!e,Ra=e=>Object.hasOwn(Zi.failed,e),K=(e,t)=>{let n=e.querySelector(t);return n instanceof HTMLElement?n:null},za=(e,t)=>[...e.querySelectorAll(t)].filter(e=>e instanceof HTMLElement),Ba=class extends s{constructor(){super(),this._unread=0,this._busy=!1,this._sheet=!1,this._awaitChildren=null,this._onClick=e=>this._click(e),this._onKeyDown=e=>this._key(e),this._onToggle=e=>{e.type===`toggle`&&`newState`in e&&e.newState===`closed`&&this._closedByBrowser()},this._onFocusOut=e=>{let t=e.relatedTarget;t instanceof Node&&!this.contains(t)&&this.close()}}static get observedAttributes(){return[`open`]}connectedCallback(){this._unread=this._initialUnread(),this.addEventListener(`click`,this._onClick),this.addEventListener(`keydown`,this._onKeyDown),this.addEventListener(`focusout`,this._onFocusOut),this.addEventListener(`toggle`,this._onToggle,!0),this.isOpen&&(K(this,wa)===null||K(this,Ca)===null)?(this._awaitChildren=new MutationObserver(()=>this._finishAwaitedOpen()),this._awaitChildren.observe(this,{childList:!0})):(this._syncOpen(),this.isOpen&&this._showPanel())}disconnectedCallback(){this._disarmAwait(),this.removeEventListener(`click`,this._onClick),this.removeEventListener(`keydown`,this._onKeyDown),this.removeEventListener(`focusout`,this._onFocusOut),this.removeEventListener(`toggle`,this._onToggle,!0);let e=K(this,wa);e&&j(e)}attributeChangedCallback(e,t,n){e===`open`&&t!==n&&(this._awaitChildren?n===null&&this._disarmAwait():this.isConnected&&(n===null?this._hidePanel():this._showPanel()))}_finishAwaitedOpen(){K(this,wa)!==null&&K(this,Ca)!==null&&(this._disarmAwait(),this._syncOpen(),this._showPanel())}_disarmAwait(){this._awaitChildren?.disconnect(),this._awaitChildren=null}_showPanel(){let e=N(K(this,wa),`<wui-notification-center> needs its panel to open.`),t=N(K(this,Ca),`<wui-notification-center> needs its trigger to open.`);M(e)||(this._sheet=window.matchMedia(Fa).matches,this._sheet?we(e,!0):A(t,e,{mode:`auto`,onClosed:()=>this._closedByBrowser()}),M(e)&&this._layoutTabs())}_hidePanel(){let e=K(this,wa);e&&M(e)&&(this._sheet?we(e,!1):j(e))}_closedByBrowser(){if(!this.isConnected||!this.hasAttribute(`open`))return;let e=K(this,wa);this.close({restoreFocus:e?.contains(this.ownerDocument.activeElement)??!1})}get isOpen(){return this.hasAttribute(`open`)}open(){this.isOpen||(N(K(this,wa),`<wui-notification-center> needs its panel to open.`),N(K(this,Ca),`<wui-notification-center> needs its trigger to open.`),this.setAttribute(`open`,``),this._syncOpen(),K(this,wa)?.focus(),this._announceToggle())}close({restoreFocus:e=!1}={}){this.isOpen&&(this.removeAttribute(`open`),this._syncOpen(),e&&K(this,Ca)?.focus(),this._announceToggle())}toggle(){this.isOpen?this.close():this.open()}_announceToggle(){this.dispatchEvent(new CustomEvent(`wui:notification-center:toggle`,{bubbles:!0,detail:{open:this.isOpen}}))}_syncOpen(){this.querySelector(Ca)?.setAttribute(`aria-expanded`,this.isOpen?`true`:`false`)}_initialUnread(){let e=Number.parseInt(this.getAttribute(`unread`)??``,10);return Number.isInteger(e)&&e>=0?e:this.querySelectorAll(`${Oa}:not(.${ka}):not([data-archived="true"])`).length}_click(e){let t=e.target;if(!(t instanceof Element))return;let n=t.closest(Na);if(n instanceof HTMLElement&&this.contains(n)){if(this.hasAttribute(`controlled`))return;this._pickTab(n);return}let r=t.closest(`${Ca}, ${Da}, ${Oa}`);r instanceof HTMLElement&&this.contains(r)&&(r.matches(Ca)?this.toggle():this.hasAttribute(`controlled`)||(r.matches(Da)?this._markAll():this._markItem(r)))}_key(e){if(!this.isOpen)return;let t=e.target;if(!(t instanceof Element))throw Error(`Keyboard event target is not an element.`);if(!this.querySelector(wa)?.contains(t)||t.closest(ja))return;let n=Ia[e.key];if(n===void 0)return;let r=za(this,Oa).filter(qi);if(r.length===0)return;let i=t.closest(Oa),a=i instanceof HTMLElement?r.indexOf(i):-1,o;o=n===`first`?0:n===`last`?r.length-1:a===-1?n===1?0:r.length-1:Math.min(r.length-1,Math.max(0,a+n)),e.preventDefault(),r[o]?.focus()}_markItem(e){e.classList.contains(ka)||(this._applyRead(e),e.dataset.archived!==`true`&&(this._unread=Math.max(0,this._unread-1)),this._render(),this._say(ea(this._unread)),this._emitRead([e.dataset.id].filter(La),!1))}async _markAll(){if(this._busy)return;let e=za(this,`${Oa}:not(.${ka})`);if(e.length===0&&this._unread===0)return;let t=e.map(e=>e.dataset.id).filter(La),n=this.getAttribute(`read-action`);if(n){this._setBusy(!0);let e=new URLSearchParams;for(let n of t)e.append(`ids`,n);let r=await xa(n,{method:`POST`,body:e});if(this._setBusy(!1),!r.ok){if(r.kind===`session`||r.kind===`aborted`)return;let e=r.kind,t=r.message||(Ra(e)?Zi.failed[e]:Zi.failed.server);this._say(t),this.dispatchEvent(new CustomEvent(`wui:notification-center:failed`,{bubbles:!0,detail:{kind:e,message:t}}));return}}for(let t of e)this._applyRead(t);this._unread=0,this._render(),this._say(Zi.allRead),this._emitRead(t,!0)}_pickTab(e){let t=e.closest(Ma);if(t instanceof HTMLElement){for(let n of za(t,Na)){let t=n===e;n.classList.toggle(`active`,t),n.setAttribute(`aria-selected`,t?`true`:`false`),n.setAttribute(`tabindex`,t?`0`:`-1`)}this._layoutTabs(),this._filterItems(e.dataset.key)}}_layoutTabs(){for(let e of za(this,Ma)){let t=K(e,`.app-tab.active`);t&&(e.style.setProperty(`--wui-tab-x`,`${t.offsetLeft}px`),e.style.setProperty(`--wui-tab-w`,`${t.offsetWidth}px`)),e.setAttribute(`data-wui-tabs`,``)}}_filterItems(e){let t=!1;for(let n of za(this,Oa)){let r=n.dataset.archived===`true`,i=n.classList.contains(ka),a=e===`archived`?r:!r&&(e!==`unread`||!i);a&&(t=!0);let o=n.closest(`li`);o&&(o.hidden=!a)}for(let e of za(this,`.wui-notification-center-list section`))e.hidden=[...e.querySelectorAll(`li`)].every(e=>e.hidden);let n=K(this,Pa);n&&(n.hidden=t)}_applyRead(e){e.classList.add(ka),e.querySelector(Aa)?.remove()}_setBusy(e){this._busy=e;let t=this.querySelector(Da);t instanceof HTMLButtonElement&&(t.disabled=e||this._unread===0,e?t.setAttribute(`aria-busy`,`true`):t.removeAttribute(`aria-busy`))}_render(){let e=K(this,Ta);e&&(e.textContent=Qi(this._unread),e.hidden=this._unread===0),this.querySelector(Ca)?.setAttribute(`aria-label`,$i(this.getAttribute(`label`)||Zi.label,this._unread));let t=this.querySelector(Da);t instanceof HTMLButtonElement&&(t.disabled=this._unread===0)}_say(e){let t=this.querySelector(Ea);t&&(t.textContent=e)}_emitRead(e,t){this.dispatchEvent(new CustomEvent(`wui:notification-center:read`,{bubbles:!0,detail:{ids:e,all:t}}))}},Va=`.wui-onboarding-card`,Ha=`.wui-onboarding-steps`,Ua=`.wui-onboarding-toggle`,Wa=`.wui-onboarding-dismiss`,Ga=`.wui-onboarding-restore`,Ka=`wui-onboarding:`,qa=(e,t)=>{let n=e.querySelector(t);return n instanceof HTMLElement?n:null},Ja=class extends s{constructor(){super(),this._onClick=e=>{let t=e.target instanceof Element?e.target:null;t&&(t.closest(Wa)?this.dismiss():t.closest(Ga)?this.restore():t.closest(Ua)&&this.toggle())}}connectedCallback(){this.addEventListener(`click`,this._onClick),this._stored()===`dismissed`&&this._setDismissed(!0)}disconnectedCallback(){this.removeEventListener(`click`,this._onClick)}get dismissed(){return qa(this,Va)?.hidden===!0}get collapsed(){return qa(this,Ha)?.hidden===!0}dismiss(){this.dismissed||(this._setDismissed(!0),this._store(`dismissed`),qa(this,Ga)?.focus(),this.dispatchEvent(new CustomEvent(`wui:onboarding:dismiss`,{bubbles:!0})))}restore(){this.dismissed&&(this._setDismissed(!1),this._store(null),qa(this,Ua)?.focus(),this.dispatchEvent(new CustomEvent(`wui:onboarding:restore`,{bubbles:!0})))}toggle(){let e=qa(this,Ha);if(!e)return;let t=!e.hidden;e.hidden=t,this.querySelector(Ua)?.setAttribute(`aria-expanded`,String(!t)),this.dispatchEvent(new CustomEvent(`wui:onboarding:collapse`,{bubbles:!0,detail:{collapsed:t}}))}_setDismissed(e){let t=qa(this,Va),n=qa(this,Ga);t&&(t.hidden=e),n&&(n.hidden=!e)}_key(){let e=this.getAttribute(`storage-key`);return e?Ka+e:null}_stored(){let e=this._key();if(!e)return null;try{return window.localStorage.getItem(e)}catch{return null}}_store(e){let t=this._key();if(t)try{e?window.localStorage.setItem(t,e):window.localStorage.removeItem(t)}catch(e){if(!(e instanceof DOMException))throw e}}},Ya=/[^0-9]/g,Xa=/[^0-9a-zA-Z]/g,Za=class extends s{static formAssociated=!0;static get observedAttributes(){return[`value`,`length`,`mode`,`disabled`,`readonly`,`loading`,`size`,`aria-label`]}get length(){let e=Number.parseInt(this.getAttribute(`length`)??`6`,10);return Number.isFinite(e)&&e>0?e:6}set length(e){this.setAttribute(`length`,String(e))}get mode(){return this.getAttribute(`mode`)===`alphanumeric`?`alphanumeric`:`numeric`}set mode(e){this.setAttribute(`mode`,String(e??`numeric`))}get value(){return this._value??``}set value(e){this._value=this._clean(e),V(this,this._value),this._paint()}_clean(e){return(e==null?``:String(e)).replace(this.mode===`alphanumeric`?Xa:Ya,``).slice(0,this.length)}constructor(){super();try{this._internals=this.attachInternals()}catch{this._internals=null}}connectedCallback(){this._rendered?this._onSelectionChange&&document.addEventListener(`selectionchange`,this._onSelectionChange):(this._defaultCaptured||=(this._defaultValue=this._value,!0),this.render())}formResetCallback(){this._value=this._defaultValue||``,V(this,this._value),this._paint()}attributeChangedCallback(e,t,n){this._rendered&&(e===`value`?(this._value=this._clean(n),V(this,this._value),this._paint()):this.render())}render(){this._value=this._clean(this.getAttribute(`value`)??this._value);let e=this.length,t=this.mode===`numeric`,n=this.hasAttribute(`disabled`),r=xr(this)||this.hasAttribute(`loading`),i=this.getAttribute(`size`),a=i===`sm`||i===`lg`?` otp-${i}`:``,o=Array.from({length:e},()=>`<span class="otp-slot" aria-hidden="true"></span>`).join(``),s=this.getAttribute(`aria-label`),c=s?` aria-label="${s.replace(/"/g,`&quot;`)}"`:``;this.innerHTML=`
31
+ <div class="datepicker-cells">${i}</div>`}_focusActive(){let e=this.querySelector(`.datepicker-pop`);if(!(e instanceof HTMLDivElement))return;let t=e.querySelector(`[tabindex="0"]`)||e.querySelector(`.is-selected`)||e.querySelector(`.datepicker-day:not(:disabled), .datepicker-cell:not(:disabled)`);t instanceof HTMLElement&&e.contains(document.activeElement)&&t.focus()}_setFocus(e,t,n,r){let{y:i,m:a}=Yr(e,t);this._focus={y:i,m:a,d:n};let o=i!==this._viewY||a!==this._viewM;this._viewY=i,this._viewM=a,this._slide=o&&r||``,this._renderView(),this._slide=``;let s=this.querySelector(`.datepicker-day[data-iso="${Gr(i,a,n)}"]`);s instanceof HTMLButtonElement&&s.focus()}_seek(e,t,n,r){let{dayDisabled:i}=this._limits(),a=new Date(e,t,n);for(let e=0;e<400;e++,a.setDate(a.getDate()+r))if(!i(a.getFullYear(),a.getMonth(),a.getDate()))return new Date(a);return null}_onKey(e){if(this._mode!==`days`)return;let t=this._focus||R(this._value)||{y:this._viewY,m:this._viewM,d:1},n=(e,t,n,r,i)=>{let a=this._seek(e,t,n,r);a&&this._setFocus(a.getFullYear(),a.getMonth(),a.getDate(),i)},r=(r,i,a=r<0?-1:1)=>{e.preventDefault(),n(t.y,t.m,t.d+r,a,i)};switch(e.key){case`ArrowLeft`:r(-1,`slide-prev`);break;case`ArrowRight`:r(1,`slide-next`);break;case`ArrowUp`:r(-7,`slide-prev`);break;case`ArrowDown`:r(7,`slide-next`);break;case`Home`:r(-((new Date(t.y,t.m,t.d).getDay()-this._firstDay()+7)%7),`slide-prev`,1);break;case`End`:r(6-(new Date(t.y,t.m,t.d).getDay()-this._firstDay()+7)%7,`slide-next`,-1);break;case`PageUp`:{e.preventDefault();let r=Yr(t.y,t.m-(e.shiftKey?12:1));n(r.y,r.m,Math.min(t.d,Jr(r.y,r.m)),-1,`slide-prev`);break}case`PageDown`:{e.preventDefault();let r=Yr(t.y,t.m+(e.shiftKey?12:1));n(r.y,r.m,Math.min(t.d,Jr(r.y,r.m)),1,`slide-next`);break}case`Enter`:case` `:e.preventDefault(),this._limits().dayDisabled(t.y,t.m,t.d)||(this.value=Gr(t.y,t.m,t.d),this.dispatchEvent(new Event(`change`,{bubbles:!0})),this._close());return}}_wire(){let e=this.querySelector(`.datepicker-trigger`),t=this.querySelector(`.datepicker-pop`),n=this.querySelector(`.datepicker`);if(!(e instanceof HTMLButtonElement)||!(t instanceof HTMLDivElement))return;let r=()=>A(t),i=()=>{n?.classList.remove(`open`),e.setAttribute(`aria-expanded`,`false`),this._closingQuietly||e.focus()};this._openFn=()=>{if(z(this))return;let a=new Date,o=R(this._value);(o||!this._viewNavigated)&&(this._viewY=a.getFullYear(),this._viewM=a.getMonth()),this._mode=`days`;let s=a.getFullYear()===this._viewY&&a.getMonth()===this._viewM,c=o&&o.y===this._viewY&&o.m===this._viewM;if(this._focus=c?o:{y:this._viewY,m:this._viewM,d:s?a.getDate():1},this._limits().dayDisabled(this._focus.y,this._focus.m,this._focus.d)){let e=this._focus,t=[1,-1].map(t=>this._seek(e.y,e.m,e.d,t)).find(t=>t&&t.getMonth()===e.m);t&&(this._focus={y:t.getFullYear(),m:t.getMonth(),d:t.getDate()})}if(this._renderView(),Ee(e,t,{mode:`auto`,clampHeight:!0,onClosed:i}),!r())return;n?.classList.add(`open`),e.setAttribute(`aria-expanded`,`true`);let l=t.querySelector(`[tabindex="0"]`);l instanceof HTMLElement&&l.focus()},this._closeFn=()=>{k(t)},e.addEventListener(`click`,()=>r()?this._close():this._open()),t.addEventListener(`click`,e=>{let t=e.target;if(!(t instanceof Element))throw Error(`click target is not an element`);let n=t.closest(`[data-nav]`);if(n instanceof HTMLElement){this._viewNavigated=!0,this._slide=Number(n.dataset.nav)<0?`slide-prev`:`slide-next`;let e=Yr(this._viewY,this._viewM+Number(n.dataset.nav));this._viewY=e.y,this._viewM=e.m,this._focus={y:e.y,m:e.m,d:1},this._renderView(),this._slide=``;return}let r=t.closest(`[data-nav-year]`);if(r instanceof HTMLElement){this._viewY+=Number(r.dataset.navYear),this._renderView();return}let i=t.closest(`[data-nav-decade]`);if(i instanceof HTMLElement){this._viewY+=Number(i.dataset.navDecade)*10,this._renderView();return}let a=t.closest(`[data-view]`);if(a instanceof HTMLElement){this._mode=a.dataset.view,this._renderView();return}let o=t.closest(`[data-month]`);if(o instanceof HTMLButtonElement&&!o.disabled){this._viewNavigated=!0,this._viewM=Number(o.dataset.month),this._mode=`days`,this._focus={y:this._viewY,m:this._viewM,d:1},this._renderView();return}let s=t.closest(`[data-year]`);if(s instanceof HTMLButtonElement&&!s.disabled){this._viewNavigated=!0,this._viewY=Number(s.dataset.year),this._mode=`months`,this._renderView();return}if(t.closest(`[data-today]`)){let e=new Date;if(this._limits().dayDisabled(e.getFullYear(),e.getMonth(),e.getDate()))return;this.value=Gr(e.getFullYear(),e.getMonth(),e.getDate()),this.dispatchEvent(new Event(`change`,{bubbles:!0})),this._close();return}if(t.closest(`[data-clear]`)){this.value=``,this.dispatchEvent(new Event(`change`,{bubbles:!0})),this._close();return}let c=t.closest(`.datepicker-day[data-iso]`);c instanceof HTMLButtonElement&&!c.disabled&&(this.value=c.dataset.iso,this.dispatchEvent(new Event(`change`,{bubbles:!0})),this._close())}),this._onKeyBound=e=>{r()&&this._onKey(e)},t.addEventListener(`keydown`,this._onKeyBound),this._syncFormValue()}},ia=class extends s{_pointerMoveListener;_pointerLeaveListener;_frame;_pointerX;static get observedAttributes(){return[`static`,`max-scale`,`radius`]}constructor(){super(),this._pointerMoveListener=null,this._pointerLeaveListener=null,this._frame=0,this._pointerX=0}connectedCallback(){this._wire()}disconnectedCallback(){this._teardown()}attributeChangedCallback(e,t,n){e===`static`&&this.isConnected&&this._wire()}_maxScale(){return oa(this.getAttribute(`max-scale`),1.6)}_radius(){return oa(this.getAttribute(`radius`),100)}_magnifyEnabled(){return!(this.hasAttribute(`static`)||typeof matchMedia==`function`&&(matchMedia(`(pointer: coarse)`).matches||matchMedia(`(prefers-reduced-motion: reduce)`).matches))}_applyMagnification(){this._frame=0;let e=this._maxScale(),t=this._radius();for(let n of this.querySelectorAll(`.dock-item`)){let r=aa(n),i=r.getBoundingClientRect(),a=Math.abs(this._pointerX-(i.left+i.width/2)),o=Math.max(0,1-a/t),s=1+(e-1)*o;r.style.setProperty(`--wui-dock-mag`,s.toFixed(3))}}_resetMagnification(){this._frame&&=(cancelAnimationFrame(this._frame),0);for(let e of this.querySelectorAll(`.dock-item`))aa(e).style.removeProperty(`--wui-dock-mag`)}_wire(){this._teardown(),this._magnifyEnabled()&&(this._pointerMoveListener=e=>{this._pointerX=e.clientX,this._frame||=requestAnimationFrame(()=>this._applyMagnification())},this._pointerLeaveListener=()=>this._resetMagnification(),this.addEventListener(`pointermove`,this._pointerMoveListener),this.addEventListener(`pointerleave`,this._pointerLeaveListener))}_teardown(){this._pointerMoveListener&&=(this.removeEventListener(`pointermove`,this._pointerMoveListener),null),this._pointerLeaveListener&&=(this.removeEventListener(`pointerleave`,this._pointerLeaveListener),null),this._resetMagnification()}},aa=e=>Pe(e,HTMLElement,`wui-dock item must be an HTML element`),oa=(e,t)=>{let n=Number.parseFloat(e??``);return Number.isFinite(n)?n:t},sa=300,ca=150,la=`.wui-hover-card-trigger`,ua=`.wui-hover-card-panel`,da=`a[href],button,input,select,textarea,[tabindex]`,fa=0;function pa(e,t){let n=e.querySelector(t);return n instanceof HTMLElement?n:null}var ma=class extends s{_doc;_timer;_described;_refocusing;_onOver;_onOut;_onFocusIn;_onFocusOut;_onKeyDown;static get observedAttributes(){return[`open`]}constructor(){super(),this._doc=null,this._timer=null,this._described=null,this._refocusing=!1,this._onOver=e=>{if(e.pointerType===`touch`||e.pointerType===`pen`)return;let t=this._zone(e.target);t===`panel`?this._clear():t===`trigger`&&this._schedule(!0)},this._onOut=e=>{e.pointerType!==`touch`&&e.pointerType!==`pen`&&this._zone(e.target)&&!this._zone(e.relatedTarget)&&this._schedule(!1)},this._onFocusIn=e=>{this._refocusing||(this._zone(e.target)===`trigger`?this._schedule(!0):this._zone(e.target)===`panel`&&this._clear())},this._onFocusOut=e=>{this._zone(e.target)&&!this._zone(e.relatedTarget)&&this._schedule(!1)},this._onKeyDown=e=>{if(e.key!==`Escape`||!this.isOpen||this.hasAttribute(`open`))return;e.preventDefault();let t=this._zone(this.ownerDocument.activeElement)===`panel`;this._clear(),this._setOpen(!1),t&&(this._refocusing=!0,this._anchor?.focus(),this._refocusing=!1)}}get isOpen(){let e=this._panel;return e!==null&&A(e)}connectedCallback(){this._doc=this.ownerDocument,this.addEventListener(`pointerover`,this._onOver),this.addEventListener(`pointerout`,this._onOut),this.addEventListener(`focusin`,this._onFocusIn),this.addEventListener(`focusout`,this._onFocusOut),this._syncOpen()}attributeChangedCallback(){this.isConnected&&this._syncOpen()}disconnectedCallback(){this._clear();let e=this._panel;e&&k(e),this.removeEventListener(`pointerover`,this._onOver),this.removeEventListener(`pointerout`,this._onOut),this.removeEventListener(`focusin`,this._onFocusIn),this.removeEventListener(`focusout`,this._onFocusOut),this._doc=null}get _trigger(){return pa(this,la)}get _panel(){return pa(this,ua)}get _anchor(){let e=this._trigger;return e?pa(e,da)??e:null}_zone(e){if(!(e instanceof Node)||!this.contains(e))return null;let t=e instanceof Element?e:e.parentElement;return this._panel?.contains(t)?`panel`:this._trigger?.contains(t)?`trigger`:null}_delay(e,t){let n=Number(this.getAttribute(e));return this.hasAttribute(e)&&Number.isFinite(n)&&n>=0?n:t}_clear(){this._timer!==null&&clearTimeout(this._timer),this._timer=null}_syncOpen(){this._clear(),this._setOpen(this.hasAttribute(`open`))}_schedule(e){if(!e&&this.hasAttribute(`open`)||(this._clear(),this.isOpen===e))return;let t=e?this._delay(`open-delay`,sa):this._delay(`close-delay`,ca);this._timer=setTimeout(()=>{this._timer=null,this._setOpen(e)},t)}_setOpen(e){let t=this._panel;if(!t||this.isOpen===e)return;if(!e){k(t);return}let n=this._trigger;if(!n)throw Error(`wui-hover-card: panel without a trigger`);Ee(n,t,{mode:`manual`,clampHeight:!0,keepOffscreen:this.hasAttribute(`open`),onClosed:()=>this._closed()}),this._doc?.addEventListener(`keydown`,this._onKeyDown,!0),this._describe(t),this.dispatchEvent(new CustomEvent(`wui:hover-card:open`,{bubbles:!0}))}_closed(){this._doc?.removeEventListener(`keydown`,this._onKeyDown,!0),this._described?.removeAttribute(`aria-describedby`),this._described=null,this.dispatchEvent(new CustomEvent(`wui:hover-card:close`,{bubbles:!0}))}_describe(e){let t=this._anchor;t&&(e.id||=`wui-hover-card-${++fa}`,t.setAttribute(`aria-describedby`,e.id),this._described=t)}},ha=class extends s{_doc;_release;_opener;_returnTo;_session;_closing;_reopen;static get observedAttributes(){return[`open`,`static`,`no-escape`]}constructor(){super(),this._doc=null,this._release=null,this._opener=null,this._returnTo=null,this._session=0,this._closing=!1,this._reopen=!1}connectedCallback(){this._doc=this.ownerDocument,Me(this._doc),this.hasAttribute(`open`)&&this._open()}disconnectedCallback(){this._session++,this._closing=!1,this._reopen=!1;let e=this.querySelector(`dialog`);this._release&&e instanceof HTMLDialogElement&&e.close(),this._releaseDialog(),this._opener=null,this._returnTo=null,this._doc=null}attributeChangedCallback(e){this._doc&&e===`open`&&(this.hasAttribute(`open`)?this._open():this._close())}get isOpen(){return this.hasAttribute(`open`)}show(e){e&&(this._opener=e),this.setAttribute(`open`,``)}hide(){this.removeAttribute(`open`)}_open(){if(this._closing){this._reopen=!0;return}if(this._release)return;let e=++this._session,t=this._opener;if(this._returnTo=t,this._opener=null,this.dispatchEvent(new CustomEvent(`wui-modal-open`,{bubbles:!0,detail:{trigger:t}})),!this.isOpen)return;let n=this._dialog();this._release=we(n,{escape:!this.hasAttribute(`no-escape`),backdrop:!this.hasAttribute(`static`),focus:`first-control`,onRequestClose:e=>this._requestClose(e)}),this._settle(e,n)}_close(){if(this._closing){this._reopen=!1;return}if(!this._release)return;this._closing=!0;let e=this._session,t=this._dialog();Te(t).then(()=>{e===this._session&&(this._closing=!1,this._releaseDialog(),xe(this._returnTo,t),this._returnTo=null,this.dispatchEvent(new CustomEvent(`wui-modal-closed`,{bubbles:!0})),this._reopen&&(this._reopen=!1,this.isOpen&&this._open()))})}_settle(e,t){let n=t.getAnimations?.()??[];n.length?Promise.allSettled(n.map(e=>e.finished)).then(()=>{e===this._session&&this.isOpen&&this._announceOpened()}):this._announceOpened()}_announceOpened(){this.dispatchEvent(new CustomEvent(`wui-modal-opened`,{bubbles:!0}))}_requestClose(e){this.dispatchEvent(new CustomEvent(`wui-modal-close`,{bubbles:!0,cancelable:!0,detail:{reason:e}}))&&this.removeAttribute(`open`)}_releaseDialog(){let e=this._release;this._release=null,e?.()}_dialog(){let e=this.querySelector(`dialog`);if(!(e instanceof HTMLDialogElement))throw TypeError(`wui-modal has no <dialog>`);return e}},ga=`.wui-nav-menu-link`,_a=`(max-width: 767.98px)`,va=`data-open`,ya=e=>e instanceof Element?e:e instanceof Node?e.parentElement:null,ba=e=>[...e].filter(e=>e instanceof HTMLElement),xa=e=>{let t=e.children[0];if(!(t instanceof HTMLElement))throw Error(`Navigation entry has no control.`);return t},Sa=e=>{let t=e.children[1];return t instanceof HTMLElement?t:null},Ca=(e,t,n)=>{let r=e[t];if(r===void 0)throw Error(n);return r},wa=class extends s{constructor(){super(),this._onClick=e=>this._handleClick(e),this._onKeyDown=e=>this._handleKeyDown(e),this._onFocusOut=e=>{let t=this._openItem(),n=e.relatedTarget;t&&n instanceof Node&&!t.contains(n)&&this._set(t,!1)},this._onPointerDown=()=>{this._pressedOpen=this._openItem()},this._onModeChange=()=>{let e=this._openItem();e&&this._set(e,!1)},this._onOutsidePress=e=>{let t=this._openItem();t&&!e.composedPath().includes(t)&&this._set(t,!1)},this._pressedOpen=null,this._media=null}connectedCallback(){this._teardown(),this.addEventListener(`click`,this._onClick),this.addEventListener(`keydown`,this._onKeyDown),this.addEventListener(`focusout`,this._onFocusOut),this.addEventListener(`pointerdown`,this._onPointerDown,!0),this._media=window.matchMedia(_a),this._media.addEventListener(`change`,this._onModeChange)}disconnectedCallback(){this._teardown()}open(e){let t=this._items().find(t=>{let n=t.children[0];return n instanceof HTMLElement&&this._isTrigger(n)&&n.dataset.key===e});t&&this._set(t,!0)}close(e=!1){let t=this._openItem();t&&(this._set(t,!1),e&&xa(t).focus({preventScroll:!0}))}_items(){return ba(this.querySelectorAll(`.wui-nav-menu-item`))}_openItem(){return this._items().find(e=>{let t=Sa(e);return t!==null&&this._isOpen(t)})??null}_isOpen(e){return e.hasAttribute(va)||A(e)}_isTrigger(e){return!!e?.classList.contains(`wui-nav-menu-trigger`)}_entries(){return this._items().map(xa)}_links(e){let t=Sa(e);return t?ba(t.querySelectorAll(ga)):[]}_set(e,t){let n=Sa(e);if(!n)return;let r=xa(e);if(t){let t=this._openItem();if(t&&t!==e&&this._set(t,!1),this._isOpen(n))return;r.setAttribute(`aria-expanded`,`true`),window.matchMedia(_a).matches?(n.setAttribute(va,``),document.addEventListener(`pointerdown`,this._onOutsidePress,!0)):Ee(r,n,{mode:`auto`,below:!0,flipAlign:!0,onClosed:()=>this._settle(e)}),this._emit(r,!0)}else n.removeAttribute(va),document.removeEventListener(`pointerdown`,this._onOutsidePress,!0),A(n)&&k(n),this._settle(e)}_settle(e){let t=xa(e);t.getAttribute(`aria-expanded`)!==`false`&&(t.setAttribute(`aria-expanded`,`false`),this._emit(t,!1))}_emit(e,t){this.dispatchEvent(new CustomEvent(`wui-navigation-menu:toggle`,{bubbles:!0,detail:{key:e.dataset.key??null,open:t}}))}_handleClick(e){let t=this._pressedOpen;this._pressedOpen=null;let n=ya(e.target),r=n?.closest(`.wui-nav-menu-trigger`);if(r&&this.contains(r)){let e=j(r.parentElement,`Navigation trigger has no entry.`),n=j(Sa(e),`Navigation entry has no panel.`),i=t===e||this._isOpen(n);this._set(e,!i);return}let i=n?.closest(ga);i&&this.contains(i)&&this.close()}_handleKeyDown(e){if(this._pressedOpen=null,e.altKey||e.ctrlKey||e.metaKey)return;let t=ya(e.target)?.closest(`.wui-nav-menu-trigger, .wui-nav-menu-toplink, .wui-nav-menu-link`);if(!(t instanceof HTMLElement)||!this.contains(t))return;let n=this._openItem();if(e.key===`Escape`){if(!n||!Sa(n)?.hasAttribute(va))return;e.preventDefault(),e.stopPropagation();let r=n.contains(t);this._set(n,!1),r&&xa(n).focus({preventScroll:!0});return}if(t.matches(ga)){this._linkKey(e,t);return}let r=this._entries(),i=r.indexOf(t);if(e.key===`ArrowRight`||e.key===`ArrowLeft`||e.key===`Home`||e.key===`End`){e.preventDefault();let t=e.key===`Home`?0:e.key===`End`?r.length-1:(i+(e.key===`ArrowRight`?1:-1)+r.length)%r.length;n&&this._set(n,!1),Ca(r,t,`Navigation has no entry to focus.`).focus({preventScroll:!0})}else if(e.key===`ArrowDown`&&this._isTrigger(t)){e.preventDefault();let n=j(t.parentElement,`Navigation trigger has no entry.`);this._set(n,!0),Ca(this._links(n),0,`Navigation panel has no link to focus.`).focus({preventScroll:!0})}}_linkKey(e,t){let n=j(t.closest(`.wui-nav-menu-item`),`Navigation link has no entry.`),r=this._links(n),i=r.indexOf(t);e.key===`ArrowDown`||e.key===`ArrowUp`?(e.preventDefault(),Ca(r,(i+(e.key===`ArrowDown`?1:-1)+r.length)%r.length,`Navigation panel has no link to focus.`).focus({preventScroll:!0})):e.key===`Home`?(e.preventDefault(),Ca(r,0,`Navigation panel has no link to focus.`).focus({preventScroll:!0})):e.key===`End`&&(e.preventDefault(),Ca(r,r.length-1,`Navigation panel has no link to focus.`).focus({preventScroll:!0}))}_teardown(){for(let e of this._items()){let t=Sa(e);if(!t)continue;let n=t.hasAttribute(va);t.removeAttribute(va),k(t),n&&this._settle(e)}this._media?.removeEventListener(`change`,this._onModeChange),this._media=null,document.removeEventListener(`pointerdown`,this._onOutsidePress,!0),this.removeEventListener(`click`,this._onClick),this.removeEventListener(`keydown`,this._onKeyDown),this.removeEventListener(`focusout`,this._onFocusOut),this.removeEventListener(`pointerdown`,this._onPointerDown,!0)}},Ta=n({isDrawn:()=>Ea});function Ea(e){return typeof e.checkVisibility==`function`?e.checkVisibility():e.closest(`[hidden]`)===null&&getComputedStyle(e).display!==`none`}var Da={allLabel:`All`,allReadText:`All notifications marked as read.`,archivedLabel:`Archived`,clientMessage:`These could not be marked as read. Refresh the page and try again.`,emptyText:`You are all caught up.`,forbiddenMessage:`You do not have permission to mark these as read.`,label:`Notifications`,markAllLabel:`Mark all read`,networkMessage:`Could not reach the server, so these were not marked as read. Check your connection and try again.`,noneUnreadText:`No unread notifications`,scrollTabsBackwardLabel:`Scroll tabs backward`,scrollTabsForwardLabel:`Scroll tabs forward`,serverMessage:`Something went wrong on our side, so these were not marked as read. Try again in a moment.`,todayLabel:`Today`,unreadAnnouncementTextOne:`{unread} unread notification`,unreadAnnouncementTextOther:`{unread} unread notifications`,unreadLabel:`Unread`,unreadPrefixText:`Unread:`,unreadWordLabel:`unread`,viewAllLabel:`View all`,yesterdayLabel:`Yesterday`},Oa=n({NOTIFICATION_COUNT_CAP:()=>99,groupNotificationsByDay:()=>La,notificationCountText:()=>Ma,notificationDayHeading:()=>Ia,notificationTime:()=>Fa,notificationTriggerLabel:()=>Na,notificationUnreadAnnouncement:()=>Pa}),ka=99,Aa=864e5,ja=()=>N(`notificationCentre`,Da);function Ma(e){return e>99?`99+`:String(e)}function Na(e,t){return t===0?e:`${e}, ${Ma(t)} ${ja().unreadWordLabel}`}function Pa(e){return e===0?ja().noneUnreadText:Ke(ja(),`unreadAnnouncementText`,e,{unread:Ma(e)})}function Fa(e){return/^\d{4}-\d{2}-\d{2}$/.test(e)?``:Nn(e,{pattern:`time`})}function Ia(e,t=Date.now()){let n=Nn(e);return n===Nn(t)?ja().todayLabel:n===Nn(jn(t)-Aa)?ja().yesterdayLabel:n}function La(e,t=Date.now()){let n=new Map;for(let r of e){if(!Number.isFinite(jn(r.at)))throw Error(`<AppNotificationCenter> item "${r.id}": at must be an ISO date-time with its zone (or a YYYY-MM-DD day), got ${String(r.at)}.`);let e=Nn(r.at),i=n.get(e);i||(i={key:e,heading:Ia(r.at,t),items:[]},n.set(e,i)),i.items.push(r)}return[...n.values()]}var Ra=Object.freeze([`POST`,`PUT`,`PATCH`,`DELETE`]),za=e=>(ci(`[@webority/ui-elements] Wui-Toast-Action: ${e}; the toast shows no action.`),null),Ba=e=>typeof e==`object`&&!!e;function Va(e){if(e==null||e===``)return null;let t;try{t=JSON.parse(e)}catch{return za(`the value is not JSON`)}let n=Ba(t)?t:{},r=n.label,i=n.url,a=String(n.method??`POST`).toUpperCase();return typeof r!=`string`||r===``||typeof i!=`string`||i===``?za(`label and url must be non-empty strings`):Ra.includes(a)?{label:r,url:i,method:a}:za(`method must be one of ${Ra.join(`, `)}`)}var Ha=n({CSRF_META_NAME:()=>Ua,DEFAULT_CSRF_HEADER:()=>Wa,HTTP_KINDS:()=>Ja,WUI_HEADERS:()=>W,WUI_REQUEST_HEADER:()=>qa,classifyStatus:()=>Qa,configureCsrf:()=>Ka,createRequestQueue:()=>no,readCsrf:()=>Xa,wuiFetch:()=>to}),Ua=`wui-csrf`,Wa=`RequestVerificationToken`,Ga={metaName:Ua,header:Wa};function Ka({metaName:e=Ua,header:t=Wa}={}){Ga={metaName:e,header:t}}var qa=`Wui-Request`,W=Object.freeze({fragment:`Wui-Fragment`,message:`Wui-Message`,redirect:`Wui-Redirect`,result:`Wui-Result`,keepOpen:`Wui-Keep-Open`,toastVariant:`Wui-Toast-Variant`,toastAction:`Wui-Toast-Action`,data:`Wui-Data`,next:`Wui-Next`}),Ja=Object.freeze([`ok`,`validation`,`forbidden`,`client`,`server`,`network`,`aborted`,`stale`,`session`]),Ya=new Set([`GET`,`HEAD`]);function Xa(e=document){let t=[...e.querySelectorAll(`meta`)].find(e=>e.getAttribute(`name`)===Ga.metaName),n=t?.getAttribute(`content`);return!t||!n?null:{header:t.getAttribute(`data-header`)||Ga.header,token:n}}var Za=e=>{try{return new URL(e,window.location.href).origin===window.location.origin}catch{return!1}};function Qa(e){return e>=200&&e<300?`ok`:e===401?`session`:e===403?`forbidden`:e===422?`validation`:e>=400&&e<500?`client`:`server`}var $a=e=>typeof e==`object`&&!!e&&`name`in e&&e.name===`AbortError`,eo=e=>{if(e==null||e===``)return null;try{return JSON.parse(e)}catch(e){throw TypeError(`The ${W.data} response header is not JSON: ${e instanceof Error?e.message:String(e)}`,{cause:e})}};async function to(e,t={}){let n=(t.method||`GET`).toUpperCase(),r=t.navigate||(e=>window.location.assign(e)),i={Accept:`text/html`,"X-Requested-With":`XMLHttpRequest`,[qa]:`1`,...t.headers};if(!Ya.has(n)&&Za(e)){let e=Xa();e&&(i[e.header]=e.token)}let a=e=>{if(e==null)return null;try{return decodeURIComponent(e)}catch{return e}},o=(e,t=null,n=``)=>{let r=e=>t?.headers.get(e)??null;return{kind:e,ok:e===`ok`,status:t?.status??0,html:n,response:t,message:a(r(W.message)),redirect:r(W.redirect),result:r(W.result),keepOpen:r(W.keepOpen)===`1`,toastVariant:r(W.toastVariant),toastAction:Va(r(W.toastAction)),fragment:r(W.fragment)===`1`,data:eo(a(r(W.data))),next:r(W.next)}},s;try{s=await fetch(e,{method:n,...t.body===void 0?{}:{body:t.body},headers:i,...t.signal===void 0?{}:{signal:t.signal},credentials:`same-origin`})}catch(e){return o($a(e)||t.signal?.aborted?`aborted`:`network`)}let c=Qa(s.status);if(c===`ok`&&s.redirected&&s.headers.get(W.fragment)!==`1`&&(c=`session`),c===`session`)return r(s.status===401?s.headers.get(`Location`)||window.location.href:s.url),o(c,s);let l=``;if(c===`ok`||c===`validation`)try{l=await s.text()}catch(e){return o($a(e)||t.signal?.aborted?`aborted`:`network`,s)}return o(c,s,l)}function no(){let e=null,t=0;return{async run(n,r={}){e?.abort();let i=new AbortController;e=i;let a=++t,o=r.signal;o&&(o.aborted?i.abort():o.addEventListener(`abort`,()=>i.abort(),{once:!0}));let s;try{s=await to(n,{...r,signal:i.signal})}finally{e===i&&(e=null)}return a!==t&&s.kind!==`aborted`?{...s,kind:`stale`,ok:!1}:s},abort(){e?.abort(),e=null}}}var ro=()=>N(`notificationCentre`,Da),io=`.wui-notification-center-trigger`,ao=`.wui-notification-center-panel`,oo=`.wui-notification-center-count`,so=`.wui-notification-center-live`,co=`.wui-notification-center-markall`,lo=`.wui-notification-center-item`,uo=`wui-notification-center-item-read`,fo=`.wui-notification-center-unread-label`,po=`.app-tabs`,mo=`.wui-notification-center-tabs [role='tablist']`,ho=`.wui-notification-center-tabs [role='tab']`,go=`.wui-notification-center-empty`,_o=`(max-width: 767.98px)`,vo={ArrowDown:1,ArrowUp:-1,Home:`first`,End:`last`},yo=e=>!!e,bo=()=>({forbidden:ro().forbiddenMessage,client:ro().clientMessage,validation:ro().clientMessage,server:ro().serverMessage,network:ro().networkMessage}),G=(e,t)=>{let n=e.querySelector(t);return n instanceof HTMLElement?n:null},xo=(e,t)=>[...e.querySelectorAll(t)].filter(e=>e instanceof HTMLElement),So=class extends s{constructor(){super(),this._unread=0,this._busy=!1,this._sheet=!1,this._awaitChildren=null,this._onClick=e=>this._click(e),this._onKeyDown=e=>this._key(e),this._onToggle=e=>{e.type===`toggle`&&`newState`in e&&e.newState===`closed`&&this._closedByBrowser()},this._onFocusOut=e=>{let t=e.relatedTarget;t instanceof Node&&!this.contains(t)&&this.close()}}static get observedAttributes(){return[`open`]}connectedCallback(){this._unread=this._initialUnread(),this.addEventListener(`click`,this._onClick),this.addEventListener(`keydown`,this._onKeyDown),this.addEventListener(`focusout`,this._onFocusOut),this.addEventListener(`toggle`,this._onToggle,!0),this.isOpen&&(G(this,ao)===null||G(this,io)===null)?(this._awaitChildren=new MutationObserver(()=>this._finishAwaitedOpen()),this._awaitChildren.observe(this,{childList:!0})):(this._syncOpen(),this.isOpen&&this._showPanel())}disconnectedCallback(){this._disarmAwait(),this.removeEventListener(`click`,this._onClick),this.removeEventListener(`keydown`,this._onKeyDown),this.removeEventListener(`focusout`,this._onFocusOut),this.removeEventListener(`toggle`,this._onToggle,!0);let e=G(this,ao);e&&k(e)}attributeChangedCallback(e,t,n){e===`open`&&t!==n&&(this._awaitChildren?n===null&&this._disarmAwait():this.isConnected&&(n===null?this._hidePanel():this._showPanel()))}_finishAwaitedOpen(){G(this,ao)!==null&&G(this,io)!==null&&(this._disarmAwait(),this._syncOpen(),this._showPanel())}_disarmAwait(){this._awaitChildren?.disconnect(),this._awaitChildren=null}_showPanel(){let e=j(G(this,ao),`<wui-notification-center> needs its panel to open.`),t=j(G(this,io),`<wui-notification-center> needs its trigger to open.`);A(e)||(this._sheet=window.matchMedia(_o).matches,this._sheet?De(e,!0):Ee(t,e,{mode:`auto`,onClosed:()=>this._closedByBrowser()}),A(e)&&this._layoutTabs())}_hidePanel(){let e=G(this,ao);e&&A(e)&&(this._sheet?De(e,!1):k(e))}_closedByBrowser(){if(!this.isConnected||!this.hasAttribute(`open`))return;let e=G(this,ao);this.close({restoreFocus:e?.contains(this.ownerDocument.activeElement)??!1})}get isOpen(){return this.hasAttribute(`open`)}open(){this.isOpen||(j(G(this,ao),`<wui-notification-center> needs its panel to open.`),j(G(this,io),`<wui-notification-center> needs its trigger to open.`),this.setAttribute(`open`,``),this._syncOpen(),G(this,ao)?.focus(),this._announceToggle())}close({restoreFocus:e=!1}={}){this.isOpen&&(this.removeAttribute(`open`),this._syncOpen(),e&&G(this,io)?.focus(),this._announceToggle())}toggle(){this.isOpen?this.close():this.open()}_announceToggle(){this.dispatchEvent(new CustomEvent(`wui:notification-center:toggle`,{bubbles:!0,detail:{open:this.isOpen}}))}_syncOpen(){this.querySelector(io)?.setAttribute(`aria-expanded`,this.isOpen?`true`:`false`)}_initialUnread(){let e=Number.parseInt(this.getAttribute(`unread`)??``,10);return Number.isInteger(e)&&e>=0?e:this.querySelectorAll(`${lo}:not(.${uo}):not([data-archived="true"])`).length}_click(e){let t=e.target;if(!(t instanceof Element))return;let n=t.closest(ho);if(n instanceof HTMLElement&&this.contains(n)){if(this.hasAttribute(`controlled`))return;this._pickTab(n);return}let r=t.closest(`${io}, ${co}, ${lo}`);r instanceof HTMLElement&&this.contains(r)&&(r.matches(io)?this.toggle():this.hasAttribute(`controlled`)||(r.matches(co)?this._markAll():this._markItem(r)))}_key(e){if(!this.isOpen)return;let t=e.target;if(!(t instanceof Element))throw Error(`Keyboard event target is not an element.`);if(!this.querySelector(ao)?.contains(t)||t.closest(po))return;let n=vo[e.key];if(n===void 0)return;let r=xo(this,lo).filter(Ea);if(r.length===0)return;let i=t.closest(lo),a=i instanceof HTMLElement?r.indexOf(i):-1,o;o=n===`first`?0:n===`last`?r.length-1:a===-1?n===1?0:r.length-1:Math.min(r.length-1,Math.max(0,a+n)),e.preventDefault(),r[o]?.focus()}_markItem(e){e.classList.contains(uo)||(this._applyRead(e),e.dataset.archived!==`true`&&(this._unread=Math.max(0,this._unread-1)),this._render(),this._say(Pa(this._unread)),this._emitRead([e.dataset.id].filter(yo),!1))}async _markAll(){if(this._busy)return;let e=xo(this,`${lo}:not(.${uo})`);if(e.length===0&&this._unread===0)return;let t=e.map(e=>e.dataset.id).filter(yo),n=this.getAttribute(`read-action`);if(n){this._setBusy(!0);let e=new URLSearchParams;for(let n of t)e.append(`ids`,n);let r=await to(n,{method:`POST`,body:e});if(this._setBusy(!1),!r.ok){if(r.kind===`session`||r.kind===`aborted`)return;let e=r.kind,t=r.message||bo()[e]||ro().serverMessage;this._say(t),this.dispatchEvent(new CustomEvent(`wui:notification-center:failed`,{bubbles:!0,detail:{kind:e,message:t}}));return}}for(let t of e)this._applyRead(t);this._unread=0,this._render(),this._say(ro().allReadText),this._emitRead(t,!0)}_pickTab(e){let t=e.closest(mo);if(t instanceof HTMLElement){for(let n of xo(t,ho)){let t=n===e;n.classList.toggle(`active`,t),n.setAttribute(`aria-selected`,t?`true`:`false`),n.setAttribute(`tabindex`,t?`0`:`-1`)}this._layoutTabs(),this._filterItems(e.dataset.key)}}_layoutTabs(){for(let e of xo(this,mo)){let t=G(e,`.app-tab.active`);t&&(e.style.setProperty(`--wui-tab-x`,`${t.offsetLeft}px`),e.style.setProperty(`--wui-tab-w`,`${t.offsetWidth}px`)),e.setAttribute(`data-wui-tabs`,``)}}_filterItems(e){let t=!1;for(let n of xo(this,lo)){let r=n.dataset.archived===`true`,i=n.classList.contains(uo),a=e===`archived`?r:!r&&(e!==`unread`||!i);a&&(t=!0);let o=n.closest(`li`);o&&(o.hidden=!a)}for(let e of xo(this,`.wui-notification-center-list section`))e.hidden=[...e.querySelectorAll(`li`)].every(e=>e.hidden);let n=G(this,go);n&&(n.hidden=t)}_applyRead(e){e.classList.add(uo),e.querySelector(fo)?.remove()}_setBusy(e){this._busy=e;let t=this.querySelector(co);t instanceof HTMLButtonElement&&(t.disabled=e||this._unread===0,e?t.setAttribute(`aria-busy`,`true`):t.removeAttribute(`aria-busy`))}_render(){let e=G(this,oo);e&&(e.textContent=Ma(this._unread),e.hidden=this._unread===0),this.querySelector(io)?.setAttribute(`aria-label`,Na(this.getAttribute(`label`)||ro().label,this._unread));let t=this.querySelector(co);t instanceof HTMLButtonElement&&(t.disabled=this._unread===0)}_say(e){let t=this.querySelector(so);t&&(t.textContent=e)}_emitRead(e,t){this.dispatchEvent(new CustomEvent(`wui:notification-center:read`,{bubbles:!0,detail:{ids:e,all:t}}))}},Co=`.wui-onboarding-card`,wo=`.wui-onboarding-steps`,To=`.wui-onboarding-toggle`,Eo=`.wui-onboarding-dismiss`,Do=`.wui-onboarding-restore`,Oo=`wui-onboarding:`,ko=(e,t)=>{let n=e.querySelector(t);return n instanceof HTMLElement?n:null},Ao=class extends s{constructor(){super(),this._onClick=e=>{let t=e.target instanceof Element?e.target:null;t&&(t.closest(Eo)?this.dismiss():t.closest(Do)?this.restore():t.closest(To)&&this.toggle())}}connectedCallback(){this.addEventListener(`click`,this._onClick),this._stored()===`dismissed`&&this._setDismissed(!0)}disconnectedCallback(){this.removeEventListener(`click`,this._onClick)}get dismissed(){return ko(this,Co)?.hidden===!0}get collapsed(){return ko(this,wo)?.hidden===!0}dismiss(){this.dismissed||(this._setDismissed(!0),this._store(`dismissed`),ko(this,Do)?.focus(),this.dispatchEvent(new CustomEvent(`wui:onboarding:dismiss`,{bubbles:!0})))}restore(){this.dismissed&&(this._setDismissed(!1),this._store(null),ko(this,To)?.focus(),this.dispatchEvent(new CustomEvent(`wui:onboarding:restore`,{bubbles:!0})))}toggle(){let e=ko(this,wo);if(!e)return;let t=!e.hidden;e.hidden=t,this.querySelector(To)?.setAttribute(`aria-expanded`,String(!t)),this.dispatchEvent(new CustomEvent(`wui:onboarding:collapse`,{bubbles:!0,detail:{collapsed:t}}))}_setDismissed(e){let t=ko(this,Co),n=ko(this,Do);t&&(t.hidden=e),n&&(n.hidden=!e)}_key(){let e=this.getAttribute(`storage-key`);return e?Oo+e:null}_stored(){let e=this._key();if(!e)return null;try{return window.localStorage.getItem(e)}catch{return null}}_store(e){let t=this._key();if(t)try{e?window.localStorage.setItem(t,e):window.localStorage.removeItem(t)}catch(e){if(!(e instanceof DOMException))throw e}}},jo=/[^0-9]/g,Mo=/[^0-9a-zA-Z]/g,No=class extends s{static formAssociated=!0;static get observedAttributes(){return[`value`,`length`,`mode`,`disabled`,`readonly`,`loading`,`size`,`aria-label`]}get length(){let e=Number.parseInt(this.getAttribute(`length`)??`6`,10);return Number.isFinite(e)&&e>0?e:6}set length(e){this.setAttribute(`length`,String(e))}get mode(){return this.getAttribute(`mode`)===`alphanumeric`?`alphanumeric`:`numeric`}set mode(e){this.setAttribute(`mode`,String(e??`numeric`))}get value(){return this._value??``}set value(e){this._value=this._clean(e),ii(this,this._value),this._paint()}_clean(e){return(e==null?``:String(e)).replace(this.mode===`alphanumeric`?Mo:jo,``).slice(0,this.length)}constructor(){super();try{this._internals=this.attachInternals()}catch{this._internals=null}}connectedCallback(){this._rendered?this._onSelectionChange&&document.addEventListener(`selectionchange`,this._onSelectionChange):(this._defaultCaptured||=(this._defaultValue=this._value,!0),this.render())}formResetCallback(){this._value=this._defaultValue||``,ii(this,this._value),this._paint()}attributeChangedCallback(e,t,n){this._rendered&&(e===`value`?(this._value=this._clean(n),ii(this,this._value),this._paint()):this.render())}render(){this._value=this._clean(this.getAttribute(`value`)??this._value);let e=this.length,t=this.mode===`numeric`,n=this.hasAttribute(`disabled`),r=Qr(this)||this.hasAttribute(`loading`),i=this.getAttribute(`size`),a=i===`sm`||i===`lg`?` otp-${i}`:``,o=Array.from({length:e},()=>`<span class="otp-slot" aria-hidden="true"></span>`).join(``),s=this.getAttribute(`aria-label`),c=s?` aria-label="${s.replace(/"/g,`&quot;`)}"`:``;this.innerHTML=`
32
32
  <div class="otp${a}">
33
33
  <input
34
34
  class="otp-field"
@@ -41,12 +41,12 @@ var WeborityUiElements=(function(e){Object.defineProperty(e,Symbol.toStringTag,{
41
41
  spellcheck="false"
42
42
  ${n?`disabled`:``}${r?` readonly`:``} />
43
43
  <div class="otp-slots" aria-hidden="true">${o}</div>
44
- </div>`,this._rendered=!0,V(this,this._value),Sr(this,this.querySelector(`.otp`)),this._wire(),this._paint()}_refs(){let e=this.querySelector(`.otp-field`);return{input:e instanceof HTMLInputElement?e:null,slots:[...this.querySelectorAll(`.otp-slot`)].filter(e=>e instanceof HTMLElement)}}_paint(){let{input:e,slots:t}=this._refs();if(!e||!t.length)return;e.value!==this._value&&(e.value=this._value);let n=e.selectionStart??this._value.length,r=Math.min(n,t.length-1),i=document.activeElement===e;t.forEach((e,t)=>{e.textContent=this._value[t]??``,e.classList.toggle(`filled`,!!this._value[t]),e.classList.toggle(`active`,i&&t===r)})}_wire(){let{input:e}=this._refs();if(!e)return;let t=e=>{let t=this._clean(e),n=t!==this._value;this._value=t,V(this,this._value),this._paint(),n&&this.dispatchEvent(new Event(`change`,{bubbles:!0})),n&&t.length===this.length&&this.dispatchEvent(new CustomEvent(`complete`,{bubbles:!0,detail:t}))};e.addEventListener(`input`,()=>{let n=e.value;if(this._value.length===this.length&&n.length>this._value.length&&n.startsWith(this._value)){let e=this._clean(n.slice(this._value.length));if(e){t(e);return}}t(n)}),e.addEventListener(`paste`,e=>{if(B(this))return;let n=e.clipboardData?.getData(`text`);n!=null&&(e.preventDefault(),t(n))});for(let t of[`keyup`,`click`,`blur`,`select`])e.addEventListener(t,()=>this._paint());e.addEventListener(`focus`,()=>{this._value.length===this.length&&e.select(),this._paint()}),this._onSelectionChange&&document.removeEventListener(`selectionchange`,this._onSelectionChange),this._onSelectionChange=()=>{document.activeElement===e&&this._paint()},document.addEventListener(`selectionchange`,this._onSelectionChange)}disconnectedCallback(){this._onSelectionChange&&document.removeEventListener(`selectionchange`,this._onSelectionChange)}},Qa=`data-wui-overflow-hidden`,$a=`[aria-selected="true"], .active`,eo=`.chip-body, input, a[href], button:not(.chip-remove)`,to=1,no=`data-wui-overflow-menu`,ro=`[aria-haspopup], [data-wui-dropdown-trigger]`,io=0,ao=e=>Number.parseFloat(e)||0,oo=e=>e.nodeType===1,so=e=>{let t=e.getAttribute(`data-overflow-label`);if(t)return t;let n=[],r=e=>{for(let t of e.childNodes)if(t.nodeType===3){let e=t.textContent?.trim();e&&n.push(e)}else oo(t)&&!t.matches(`svg, img, [aria-hidden='true'], [data-wui-dropdown-menu]`)&&r(t)};if(r(e),n.length)return n.join(` `);let i=co(e)??e;return i.getAttribute(`aria-label`)||e.getAttribute(`aria-label`)||i.title||e.title},co=e=>{if(e.matches(`button, a[href], label, input`))return e;let t=e.querySelector(eo);return t instanceof HTMLElement?t:null},lo=e=>{let t=co(e);return t?.matches(ro)?t:null},uo=class extends s{constructor(){super(),this._hiddenKey=``,this._ro=null,this._mo=null,this._observedList=null,this._doc=null,this._onDocDown=e=>{!this._menu.hidden&&!e.composedPath().includes(this)&&this._close(!1)}}connectedCallback(){this.classList.add(`wui-overflow`),this._build(),this._doc=this.ownerDocument,this._doc.addEventListener(`pointerdown`,this._onDocDown,!0),typeof ResizeObserver<`u`&&(this._ro=new ResizeObserver(()=>this.layout()),this._ro.observe(this)),typeof MutationObserver<`u`&&(this._mo=new MutationObserver(()=>this.layout()),this._watch()),this.layout()}disconnectedCallback(){this._ro?.disconnect(),this._mo?.disconnect(),this._ro=null,this._mo=null,this._observedList=null,this._doc?.removeEventListener(`pointerdown`,this._onDocDown,!0),this._doc=null,C(this)}static get observedAttributes(){return[`label`]}attributeChangedCallback(){let e=this._more?.firstChild;e&&(e.textContent=this._label())}_label(){return this.getAttribute(`label`)||`More`}_list(){let e=this.querySelector(`[data-wui-overflow-list]`);return e instanceof HTMLElement?e:null}_items(e){return[...e.children].filter(e=>!e.hasAttribute(`data-wui-overflow-skip`))}_build(){if(this._more)return;let e=`wui-overflow-menu-${++io}`,t=this.ownerDocument.createElement(`button`);t.type=`button`,t.className=`wui-overflow-more`,t.hidden=!0,t.setAttribute(`aria-haspopup`,`menu`),t.setAttribute(`aria-expanded`,`false`),t.setAttribute(`aria-controls`,e),t.append(this._label());let n=this.ownerDocument.createElement(`div`);n.className=`wui-overflow-menu`,n.id=e,n.setAttribute(`role`,`menu`),n.hidden=!0,this.append(t,n),this._more=t,this._menu=n,t.addEventListener(`click`,()=>this._menu.hidden?this._open(!1):this._close(!0)),t.addEventListener(`keydown`,e=>{(e.key===`ArrowDown`||e.key===`ArrowUp`)&&(e.preventDefault(),this._open(!0))}),n.addEventListener(`keydown`,e=>this._onMenuKey(e))}_watch(){let e=this._list();this._mo&&e!==this._observedList&&(this._mo.disconnect(),this._observedList=e,e&&this._mo.observe(e,{childList:!0,subtree:!0,characterData:!0,attributes:!0,attributeFilter:[`class`,`aria-selected`,`disabled`,`aria-disabled`,`data-overflow-label`]}))}layout(){let e=this._list();if(this._watch(),!e||!this._more)return;let t=this._items(e);for(let e of t)e.removeAttribute(Qa),e.removeAttribute(no);this._more.hidden=!0;let n=this.clientWidth,r=[];if(t.length&&n<=0&&this.getClientRects().length>0)r=t;else if(n>0&&t.length){let i=getComputedStyle(e),a=ao(i.columnGap),o=ao(i.paddingLeft)+ao(i.paddingRight)+ao(i.borderLeftWidth)+ao(i.borderRightWidth),s=t.map(e=>e.offsetWidth);if(s.reduce((e,t)=>e+t,0)+a*(t.length-1)>n-o+to){this._more.hidden=!1;let e=n-o-this._more.offsetWidth-ao(getComputedStyle(this).columnGap),i=this.hasAttribute(`keep`)?this.getAttribute(`keep`):$a,c=new Set,l=0,u=0,d=i?t.filter(e=>e.matches(i)):[];for(let n of d){let r=l+(s[t.indexOf(n)]??0)+(u?a:0);r>e||(c.add(n),l=r,u+=1)}for(let n=0;n<t.length;n+=1){let r=t[n];if(!r||c.has(r))continue;let i=l+(s[n]??0)+(u?a:0);if(i>e)break;c.add(r),l=i,u+=1}r=t.filter(e=>!c.has(e))}}for(let e of r)e.setAttribute(Qa,``),lo(e)&&e.setAttribute(no,``);this._more.hidden=r.length===0,r.length?this._menu.hidden||this._fill(r):this._close(!1);let i=r.map(e=>t.indexOf(e)).join(`,`);i!==this._hiddenKey&&(this._hiddenKey=i,this.dispatchEvent(new CustomEvent(`wui-overflow-change`,{bubbles:!0,detail:{hidden:r.length}})))}_hiddenItems(){let e=this._list();return e?this._items(e).filter(e=>e.hasAttribute(Qa)):[]}_fill(e){this._menu.replaceChildren();for(let t of e){let e=this.ownerDocument.createElement(`button`);e.type=`button`,e.className=`wui-overflow-item`,e.tabIndex=-1;let n=t.querySelector(`input[type=checkbox], input[type=radio]`);n instanceof HTMLInputElement?(e.setAttribute(`role`,n.type===`radio`?`menuitemradio`:`menuitemcheckbox`),e.setAttribute(`aria-checked`,String(n.checked))):e.setAttribute(`role`,`menuitem`);let r=co(t),i=!r||`disabled`in r&&r.disabled||r.getAttribute(`aria-disabled`)===`true`||t.matches(`.disabled, [aria-disabled='true']`);i&&e.setAttribute(`aria-disabled`,`true`),e.textContent=so(t),e.addEventListener(`click`,()=>{i||r&&this._choose(t,r)}),this._menu.append(e)}}_choose(e,t){this._close(!1),t.click(),this.layout();let n=lo(e)?.isConnected?e.querySelector(`.dropdown-item:not([aria-disabled='true'])`):null;if(n){n.focus();return}let r=!e.hasAttribute(Qa)&&e.matches(`button, a[href]`)?e:this._more;r.hidden||r.focus()}_open(e){let t=this._hiddenItems();if(!t.length)return;this._fill(t),this._menu.hidden=!1,this._more.setAttribute(`aria-expanded`,`true`);let n=()=>x(this._more,this._menu);if(n(),S(this,n),e){let e=this._menu.firstElementChild;e instanceof HTMLElement&&e.focus()}}_close(e){this._menu&&!this._menu.hidden&&(this._menu.hidden=!0,this._more.setAttribute(`aria-expanded`,`false`),C(this),e&&this._more.focus())}_onMenuKey(e){let t=[...this._menu.children].filter(e=>e instanceof HTMLElement),n=this.ownerDocument.activeElement,r=n instanceof HTMLElement?t.indexOf(n):-1,i=null;if(e.key===`ArrowDown`)i=t[(r+1)%t.length];else if(e.key===`ArrowUp`)i=t[(r-1+t.length)%t.length];else if(e.key===`Home`)i=t[0];else if(e.key===`End`)i=t[t.length-1];else if(e.key===`Escape`){e.preventDefault(),e.stopPropagation(),this._close(!0);return}else if(e.key===`Tab`){this._close(!1);return}else return;e.preventDefault(),i?.focus()}},fo=`.wui-rating-star`,po=`wui-rating-star-preview`,mo=`wui-rating-previewing`,ho=`wui-rating-star-full`,go=`wui-rating-star-empty`,_o=[ho,`wui-rating-star-half`,go],vo=e=>[...e.querySelectorAll(fo)].filter(e=>e instanceof HTMLElement),yo=class extends s{_onChange;_onOver;_onLeave;constructor(){super(),this._onChange=e=>{let t=e.target;t instanceof HTMLInputElement&&t.type===`radio`&&this._fill(Number(t.value))},this._onOver=e=>{if(this.hasAttribute(`disabled`))return;let t=P(e.target,fo);t instanceof HTMLElement&&this._preview(Number(t.dataset.value))},this._onLeave=()=>this._preview(0)}connectedCallback(){this.addEventListener(`change`,this._onChange),this.addEventListener(`mouseover`,this._onOver),this.addEventListener(`mouseleave`,this._onLeave)}disconnectedCallback(){this.removeEventListener(`change`,this._onChange),this.removeEventListener(`mouseover`,this._onOver),this.removeEventListener(`mouseleave`,this._onLeave)}_fill(e){for(let t of vo(this))t.classList.remove(..._o),t.classList.add(Number(t.dataset.value)<=e?ho:go)}_preview(e){this.classList.toggle(mo,e>0);for(let t of vo(this))t.classList.toggle(po,e>0&&Number(t.dataset.value)<=e)}},bo=class extends s{_doc;_onKeyDown;constructor(){super(),this._doc=null,this._onKeyDown=e=>{this.hasAttribute(`keys`)&&Ze(e,{j:()=>this._press(`.wui-record-pager-next`),k:()=>this._press(`.wui-record-pager-prev`)},this.closest(`[${Ne}]`))}}connectedCallback(){this._doc=this.ownerDocument,N(this._doc,`wui-record-pager has no owner document`).addEventListener(`keydown`,this._onKeyDown)}disconnectedCallback(){this._doc?.removeEventListener(`keydown`,this._onKeyDown),this._doc=null}_press(e){let t=this.querySelector(e);!(t instanceof HTMLElement)||t instanceof HTMLButtonElement&&t.disabled||t.getAttribute(`aria-disabled`)===`true`||t.click()}},xo=6e4,So=60*xo,Co=24*So,wo=(e,t)=>`${e} ${t}${e===1?``:`s`}`;function To(e,t=Date.now()){let n=sn(e);if(!Number.isFinite(n))return`-`;let r=t-n,i=Math.abs(r);if(i>=7*Co)return I(n);if(i<xo)return`just now`;let[a,o]=i<So?[Math.floor(i/xo),`minute`]:i<Co?[Math.floor(i/So),`hour`]:[Math.floor(i/Co),`day`];return r>0?`${wo(a,o)} ago`:`in ${wo(a,o)}`}function Eo(e){let t=sn(e);return Number.isFinite(t)?`${I(t,{pattern:`datetime`})} IST`:`-`}var Do=3e4,Oo=new Set,ko=null,Ao=()=>{if(!(typeof document<`u`&&document.hidden))for(let e of Oo)e.refresh()},jo=e=>{Oo.add(e),Oo.size===1&&(ko=setInterval(Ao,Do),document.addEventListener(`visibilitychange`,Ao))},Mo=e=>{Oo.delete(e),Oo.size===0&&(clearInterval(ko??void 0),ko=null,document.removeEventListener(`visibilitychange`,Ao))},No=class extends s{_observer;constructor(){super(),this._observer=null}connectedCallback(){this.refresh(),jo(this),this._observer=new MutationObserver(()=>this.refresh()),this._observer.observe(this,{childList:!0,subtree:!0,characterData:!0,attributes:!0,attributeFilter:[`datetime`]})}disconnectedCallback(){Mo(this),this._observer?.disconnect(),this._observer=null}refresh(){let e=this.querySelector(`time[datetime]`);if(!(e instanceof HTMLTimeElement))return;let t=e.getAttribute(`datetime`),n=To(t);e.textContent!==n&&(e.textContent=n);let r=Eo(t);this.getAttribute(`data-wui-tooltip`)!==r&&this.setAttribute(`data-wui-tooltip`,r)}},Po=e=>{let t=String(e??``).trim();return/^(https?:)?\/\//i.test(t)||/^\/(?!\/)/.test(t)||/^data:image\/(png|jpe?g|gif|webp|avif);/i.test(t)?t:``},Fo=(e,t=`wui-opt-avatar`)=>{let n=Po(e.avatar);return!n&&!e.initials?``:`<span class="avatar ${t}" aria-hidden="true"><span class="avatar-face">${W(e.initials??``)}</span>${n?`<img class="avatar-img" src="${Io(n)}" alt="" />`:``}</span>`},Io=e=>String(e??``).replace(/&/g,`&amp;`).replace(/"/g,`&quot;`).replace(/</g,`&lt;`),Lo=n({createListboxKeyNav:()=>zo,moveActiveRow:()=>Bo}),Ro=e=>e.target instanceof Element?e.target.tagName:void 0;function zo(e){let{getVisibleOptions:t,getActive:n,setActive:r,onEnter:i,onEscape:a,onTypeahead:o,typeaheadMs:s=500}=e,c=``,l=null,u=()=>{clearTimeout(l??void 0),l=null,c=``};return{handler:e=>{let d=t(),f=n(),p=Ro(e)===`INPUT`||Ro(e)===`TEXTAREA`;if(e.key===`ArrowDown`)e.preventDefault(),r(Math.min(f+1,d.length-1));else if(e.key===`ArrowUp`)e.preventDefault(),r(Math.max(f-1,0));else if(e.key===`Home`&&!p)e.preventDefault(),d.length&&r(0);else if(e.key===`End`&&!p)e.preventDefault(),d.length&&r(d.length-1);else if(e.key===`PageDown`&&!p){if(e.preventDefault(),!d.length)return;r(Math.min(Math.max(0,f)+8,d.length-1))}else if(e.key===`PageUp`&&!p){if(e.preventDefault(),!d.length)return;r(Math.max(Math.max(0,f)-8,0))}else if($n(e))i&&(e.preventDefault(),i(d[f],d));else if(e.key===`Escape`)a&&a(e);else if(e.key.length===1&&!e.ctrlKey&&!e.metaKey&&!e.altKey&&Ro(e)!==`INPUT`&&Ro(e)!==`TEXTAREA`){e.preventDefault(),clearTimeout(l??void 0),c+=e.key.toLowerCase(),l=setTimeout(u,s);let t=d.findIndex(e=>e.textContent.trim().toLowerCase().startsWith(c));t>=0&&(r(t),o&&o(e.key,t,d))}},clearTypeahead:u,teardown:u}}function Bo(e,t){let n=e.querySelector(`.is-active`);n!==t&&(n?.classList.remove(`is-active`),t?.classList.add(`is-active`))}var Vo=n({filterOptions:()=>Ho,renderOptions:()=>Wo});function Ho(e,t){let n=String(t??``).trim().toLowerCase();return n?e.filter(e=>[Ci(e),e.description,e.meta].some(e=>String(e??``).toLowerCase().includes(n))):e}var Uo=new WeakMap;function Wo(e,t,n={}){let{selected:r=[],query:i=``,status:a=`idle`,emptyText:o=`No matches`,searchingText:s=`Searching…`,hintText:c=`Type to search…`,actionRow:l=[],recents:u=null}=n,d=new Set(r.map(String)),f=Ho(t,i),p=e.id,m=0,h=()=>`${p}-opt-${m++}`,g=e=>`<button type="button" role="option" id="${W(h())}" class="wui-select-option wui-select-add" data-value="${W(e.value)}" data-custom="true" aria-selected="false">${W(e.label)}</button>`,_=l.filter(e=>e.position===`top`).map(g).join(``),v=u?.options.length?`<div class="wui-select-group">${W(u.label)}</div>${u.options.map(e=>Go(e,h(),d.has(String(e.value)))).join(``)}<div class="wui-select-sep" aria-hidden="true"></div>`:``,y=``,b=``;for(let e of f)e.group&&e.group!==y&&(b+=`<div class="wui-select-group">${W(e.group)}</div>`),y=e.group??``,b+=Go(e,h(),d.has(String(e.value)));let x=l.filter(e=>e.position===`bottom`).map(g).join(``),S=``;a===`loading`?S=`<div class="wui-select-loading"><span class="wui-select-spinner spinner-border spinner-border-sm" role="status" aria-hidden="true"></span>${W(s)}</div>`:a===`hint`?S=`<div class="wui-select-hint">${W(c)}</div>`:(a===`empty`||f.length===0&&l.length===0)&&(S=`<div class="wui-select-empty">${W(o)}</div>`);let C=_+v+b+x+S;Uo.get(e)!==C&&(Uo.set(e,C),e.innerHTML=C)}function Go(e,t,n){let r=!!e.disabled,i=r&&e.disabledHint?` title="${W(e.disabledHint)}"`:``,a=`id="${W(t)}" role="option" data-value="${W(e.value)}" aria-selected="${n}"${r?` aria-disabled="true"`:``}${i}`,o=`<span class="wui-select-check" aria-hidden="true">${U(`check`)}</span>`;if(!e.description&&!e.meta)return`<button type="button" class="wui-select-option${n?` selected`:``}" ${a}>${Fo(e)}<span class="wui-select-opt-name">${bi(e)}</span>${o}</button>`;let s=e.description?`<span class="wui-select-opt-desc">${W(e.description)}</span>`:``,c=e.meta?`<span class="wui-select-opt-meta">${W(e.meta)}</span>`:``;return`<div class="wui-select-option wui-select-option-rich${n?` selected`:``}" ${a}>${Fo(e)}<span class="wui-select-option-text"><span class="wui-opt-label">${bi(e)}</span>${s}</span>${c}${o}</div>`}var Ko=Object.freeze([`single`,`multiple`,`search`,`tag`,`country`]),q=e=>e===`multiple`||e===`tag`,qo=n({registerSelectPart:()=>Yo,selectPart:()=>Xo}),Jo=new Map;function Yo(e,t){Jo.set(e,t)}function Xo(e){return Jo.get(e)}var Zo={chips:`select-chips`,search:`select-search`,country:`phone`,recents:`select-recents`};function Qo(e){let t=Object.hasOwn(Zo,e)?Zo[e]:void 0;if(!t)return Promise.reject(Error(`Unknown <wui-select> part: ${e}.`));let n=Xo(e);return n?Promise.resolve(n):Qr(t).then(()=>N(Xo(e),`The ${e} part of <wui-select> did not register.`))}var $o=n({searchesRemotely:()=>es}),es=e=>typeof e.loadOptions==`function`||!!e.getAttribute(`source`)||e.hasAttribute(`remote`),ts=n({WuiSelect:()=>ns}),ns=class extends s{static formAssociated=!0;_internals;_value;_optionsProp;_partOptions;_known;_loadOptionsFn;_validateFn;_declared;_query;_ownsFilter;_active;_status;_error;_nav;_parts;_partSig;_partsMounted;_partToken;_rendered;_searchShown;_defaultValue;_warnedMode;_warnedDensity;_hoverTimer;_hoverOpened;_onHoverOver;_onHoverOut;_panelShown;_pressOpen;static get observedAttributes(){return`mode.value.placeholder.search-placeholder.empty-text.searchable.clearable.disabled.readonly.loading.required.size.density.icon.prefix.open.open-on-hover.aria-label.aria-describedby.aria-invalid.min-chars.debounce.source.remote.allow-custom.add-label.searching-text.hint-text.value-label.value-avatar.value-initials.max-tags.allow-duplicates.separators.pattern.invalid-message.create-label.collapse-chips.selected-text.clear-all-label.countries.suggested.suggested-label.all-countries-label.recents-key.recents-limit.recents-label`.split(`.`)}constructor(){super();try{this._internals=this.attachInternals()}catch{this._internals=null}this._value=``,this._optionsProp=null,this._partOptions=null,this._known=new Map,this._loadOptionsFn=null,this._validateFn=null,this._declared=void 0,this._query=``,this._ownsFilter=!1,this._active=-1,this._status=`idle`,this._error=``,this._nav=null,this._parts=null,this._partSig=``,this._partsMounted=!1,this._partToken=0,this._rendered=!1,this._searchShown=!1,this._defaultValue=void 0,this._warnedMode=null,this._hoverTimer=null,this._hoverOpened=!1,this._panelShown=!1,this._pressOpen=null,this._onHoverOver=e=>{e.pointerType===`mouse`&&this._hoverZone(e.target)&&(this._clearHover(),!this._menuOpen()&&this._hoverEligible()&&(this._hoverTimer=setTimeout(()=>{this._hoverTimer=null,!this._menuOpen()&&this._hoverEligible()&&(this._open({focus:!1}),this._hoverOpened=!0)},os)))},this._onHoverOut=e=>{e.pointerType===`mouse`&&this._hoverZone(e.target)&&!this._hoverZone(e.relatedTarget)&&(this._clearHover(),this._menuOpen()&&this.hasAttribute(`open-on-hover`)&&(this._hoverTimer=setTimeout(()=>{this._hoverTimer=null,this._close()},ss)))}}connectedCallback(){this.addEventListener(`pointerover`,this._onHoverOver),this.addEventListener(`pointerout`,this._onHoverOut),this._rendered||this.render(),this._ensureParts(),this._mountParts()}disconnectedCallback(){this.removeEventListener(`pointerover`,this._onHoverOver),this.removeEventListener(`pointerout`,this._onHoverOut),this._clearHover(),this._dropMenu(),this._teardown(),this._teardownParts()}attributeChangedCallback(e,t,n){e===`value`?(this._value=ps(n,q(this.mode)),this._applyValue()):e===`aria-invalid`?this._syncInvalid():e===`open`?this._rendered&&(this.hasAttribute(`open`)?this._open({focus:!1}):this._close({force:!0})):e===`open-on-hover`?this.hasAttribute(`open-on-hover`)||this._clearHover():(e===`mode`&&(this._value=ps(this._value,q(this.mode)),this._partOptions=null,this._known.clear(),this._ensureParts()),(e===`source`||e===`remote`||e===`recents-key`)&&this._ensureParts(),ds.has(e)?this._rendered&&(this._drawValue(),this.renderList()):us.has(e)?this._remountParts():this._rendered&&this.render())}formResetCallback(){if(this.value=this._defaultValue??``,!this._rendered)return;let e=this._refs();e.input&&(e.input.value=``,e.input.removeAttribute(`aria-invalid`)),e.search&&(e.search.value=``),this.setError(``),this._query!==``&&this._onQueryChange(``)}get mode(){let e=this.getAttribute(`mode`);return e===null?`single`:is(e)?e:(e!==this._warnedMode&&(this._warnedMode=e,Ar(`<wui-select> mode "${e}" is not one of ${Ko.join(`, `)}; it is treated as "single".`)),`single`)}_checkDensity(){let e=this.getAttribute(`density`);e===null||as.includes(e)||e===this._warnedDensity||(this._warnedDensity=e,Ar(`<wui-select> density "${e}" is not one of ${as.join(`, `)}; it is treated as "comfortable".`))}set mode(e){this.setAttribute(`mode`,String(e))}get value(){return Array.isArray(this._value)?this._value.slice():this._value}set value(e){this._value=ps(e,q(this.mode)),this._applyValue()}get options(){return this._readOptions()}set options(e){this._optionsProp=Array.isArray(e)?e:null,this.mode!==`country`&&(this._partOptions=null);for(let e of this._activePartsList())e.onOptions?.();if(this._rendered){if(this.mode===`single`&&this.getAttribute(`searchable`)===null&&this._autoSearch()!==this._searchShown){this.render();return}this._drawValue(),this.renderList()}}get loadOptions(){return this._loadOptionsFn}set loadOptions(e){this._loadOptionsFn=typeof e==`function`?e:null,this._ensureParts()}get validate(){return this._validateFn}set validate(e){this._validateFn=typeof e==`function`?e:null}commit(e,t={}){this.value=e,this.dispatchEvent(new CustomEvent(`change`,{bubbles:!0,detail:{isCustom:!!t.isCustom}}))}setPartOptions(e){this._partOptions=Array.isArray(e)?e:null,this._drawValue(),this.renderList()}setStatus(e){this._status=e,this.renderList()}setError(e){this._error=e?String(e):``,this._syncError()}openMenu(){B(this)||this._open({focus:!1})}closeMenu({focusControl:e=!1}={}){this._close(),e&&this._refs().control?.focus()}renderList(){let e=this._refs();e.list&&(Wo(e.list,this._listOptions(),{selected:this._selectedValues(),query:this._ownsFilter?``:this._query,status:this._status,emptyText:this.getAttribute(`empty-text`)||`No matches`,searchingText:this.getAttribute(`searching-text`)||`Searching…`,hintText:this.getAttribute(`hint-text`)||void 0,actionRow:this._actionRows(),recents:this._recents()}),this._active>=this._visible().length&&(this._active=-1),this._active>=0&&this._setActive(this._active,{reveal:!1}),this._anchorMenu())}render(){this._dropMenu();let e=this._carry();this._teardownParts(),this._snapshotDeclared();let t=this.mode;this._checkDensity();let n=q(t),r=t===`tag`,i=n&&(r||this.hasAttribute(`allow-custom`));this._value=ps(this._value,n),this._defaultValue===void 0&&n&&this._value.length===0&&(this._value=this._declaredSelected()),n||this._preselect(),this._defaultValue===void 0&&(this._defaultValue=ps(this._value,n));let a=this.getAttribute(`size`),o=a===`sm`?` wui-select-sm`:a===`lg`?` wui-select-lg`:``,s=this.getAttribute(`icon`),c=this.getAttribute(`prefix`),l=this.hasAttribute(`clearable`),u=this.hasAttribute(`disabled`);this.id||=`wui-select-${Math.random().toString(36).slice(2,9)}`;let d=`${this.id}-listbox`,f=`${this.id}-entry-error`,p=this.getAttribute(`aria-describedby`)?.trim(),m=p?`${p} ${f}`:f,h=this.hasAttribute(`aria-invalid`)||this._error?` aria-invalid="true"`:``,g=this.hasAttribute(`required`)&&!i?` aria-required="true"`:``,_=` aria-label="${W(this._accessibleName())}" aria-describedby="${W(m)}"${h}${g}`,v=i?``:` role="combobox" aria-haspopup="listbox" aria-expanded="false" aria-controls="${W(d)}"`,y=n?`<div class="input wui-select-control wui-select-multi"${v}${_}${u?` aria-disabled="true"`:r?``:` tabindex="0"`}>`:`<button type="button" class="input wui-select-control"${v}${_}${u?` disabled`:``}>`,b=`${s?U(s,{className:`wui-select-icon`}):``}${c?`<span class="wui-select-prefix">${W(c)}</span>`:``}<span class="wui-select-value" data-label></span>${l?`<span class="wui-select-reset" role="button" aria-label="Clear selection" hidden>${U(`x`)}</span>`:``}${U(`chevron-down`,{className:`wui-select-caret`})}`,x=this.getAttribute(`searchable`),S=x===null?t===`multiple`||t===`country`||this._autoSearch():x!==`false`,C=t===`search`||S&&!i;this._searchShown=C;let w=this.getAttribute(`search-placeholder`)||(t===`country`?`Search countries…`:`Search…`),T=C?`<div class="wui-select-search">${U(`search`)}<input class="wui-select-input" placeholder="${W(w)}" aria-label="${W(w)}" aria-autocomplete="list" /><button type="button" class="wui-select-clear" aria-label="Clear search" hidden>${U(`x`)}</button></div>`:``;this.innerHTML=`
44
+ </div>`,this._rendered=!0,ii(this,this._value),$r(this,this.querySelector(`.otp`)),this._wire(),this._paint()}_refs(){let e=this.querySelector(`.otp-field`);return{input:e instanceof HTMLInputElement?e:null,slots:[...this.querySelectorAll(`.otp-slot`)].filter(e=>e instanceof HTMLElement)}}_paint(){let{input:e,slots:t}=this._refs();if(!e||!t.length)return;e.value!==this._value&&(e.value=this._value);let n=e.selectionStart??this._value.length,r=Math.min(n,t.length-1),i=document.activeElement===e;t.forEach((e,t)=>{e.textContent=this._value[t]??``,e.classList.toggle(`filled`,!!this._value[t]),e.classList.toggle(`active`,i&&t===r)})}_wire(){let{input:e}=this._refs();if(!e)return;let t=e=>{let t=this._clean(e),n=t!==this._value;this._value=t,ii(this,this._value),this._paint(),n&&this.dispatchEvent(new Event(`change`,{bubbles:!0})),n&&t.length===this.length&&this.dispatchEvent(new CustomEvent(`complete`,{bubbles:!0,detail:t}))};e.addEventListener(`input`,()=>{let n=e.value;if(this._value.length===this.length&&n.length>this._value.length&&n.startsWith(this._value)){let e=this._clean(n.slice(this._value.length));if(e){t(e);return}}t(n)}),e.addEventListener(`paste`,e=>{if(z(this))return;let n=e.clipboardData?.getData(`text`);n!=null&&(e.preventDefault(),t(n))});for(let t of[`keyup`,`click`,`blur`,`select`])e.addEventListener(t,()=>this._paint());e.addEventListener(`focus`,()=>{this._value.length===this.length&&e.select(),this._paint()}),this._onSelectionChange&&document.removeEventListener(`selectionchange`,this._onSelectionChange),this._onSelectionChange=()=>{document.activeElement===e&&this._paint()},document.addEventListener(`selectionchange`,this._onSelectionChange)}disconnectedCallback(){this._onSelectionChange&&document.removeEventListener(`selectionchange`,this._onSelectionChange)}},Po={label:`More`},Fo=`data-wui-overflow-hidden`,Io=`[aria-selected="true"], .active`,Lo=`.chip-body, input, a[href], button:not(.chip-remove)`,Ro=()=>N(`overflow`,Po),zo=1,Bo=`data-wui-overflow-menu`,Vo=`[aria-haspopup], [data-wui-dropdown-trigger]`,Ho=0,Uo=e=>Number.parseFloat(e)||0,Wo=e=>e.nodeType===1,Go=e=>{let t=e.getAttribute(`data-overflow-label`);if(t)return t;let n=[],r=e=>{for(let t of e.childNodes)if(t.nodeType===3){let e=t.textContent?.trim();e&&n.push(e)}else Wo(t)&&!t.matches(`svg, img, [aria-hidden='true'], [data-wui-dropdown-menu]`)&&r(t)};if(r(e),n.length)return n.join(` `);let i=Ko(e)??e;return i.getAttribute(`aria-label`)||e.getAttribute(`aria-label`)||i.title||e.title},Ko=e=>{if(e.matches(`button, a[href], label, input`))return e;let t=e.querySelector(Lo);return t instanceof HTMLElement?t:null},qo=e=>{let t=Ko(e);return t?.matches(Vo)?t:null},Jo=class extends s{constructor(){super(),this._hiddenKey=``,this._ro=null,this._mo=null,this._observedList=null,this._doc=null,this._onDocDown=e=>{!this._menu.hidden&&!e.composedPath().includes(this)&&this._close(!1)}}connectedCallback(){this.classList.add(`wui-overflow`),this._build(),this._doc=this.ownerDocument,this._doc.addEventListener(`pointerdown`,this._onDocDown,!0),typeof ResizeObserver<`u`&&(this._ro=new ResizeObserver(()=>this.layout()),this._ro.observe(this)),typeof MutationObserver<`u`&&(this._mo=new MutationObserver(()=>this.layout()),this._watch()),this.layout()}disconnectedCallback(){this._ro?.disconnect(),this._mo?.disconnect(),this._ro=null,this._mo=null,this._observedList=null,this._doc?.removeEventListener(`pointerdown`,this._onDocDown,!0),this._doc=null,C(this)}static get observedAttributes(){return[`label`]}attributeChangedCallback(){let e=this._more?.firstChild;e&&(e.textContent=this._label())}_label(){return this.getAttribute(`label`)||Ro().label}_list(){let e=this.querySelector(`[data-wui-overflow-list]`);return e instanceof HTMLElement?e:null}_items(e){return[...e.children].filter(e=>!e.hasAttribute(`data-wui-overflow-skip`))}_build(){if(this._more)return;let e=`wui-overflow-menu-${++Ho}`,t=this.ownerDocument.createElement(`button`);t.type=`button`,t.className=`wui-overflow-more`,t.hidden=!0,t.setAttribute(`aria-haspopup`,`menu`),t.setAttribute(`aria-expanded`,`false`),t.setAttribute(`aria-controls`,e),t.append(this._label());let n=this.ownerDocument.createElement(`div`);n.className=`wui-overflow-menu`,n.id=e,n.setAttribute(`role`,`menu`),n.hidden=!0,this.append(t,n),this._more=t,this._menu=n,t.addEventListener(`click`,()=>this._menu.hidden?this._open(!1):this._close(!0)),t.addEventListener(`keydown`,e=>{(e.key===`ArrowDown`||e.key===`ArrowUp`)&&(e.preventDefault(),this._open(!0))}),n.addEventListener(`keydown`,e=>this._onMenuKey(e))}_watch(){let e=this._list();this._mo&&e!==this._observedList&&(this._mo.disconnect(),this._observedList=e,e&&this._mo.observe(e,{childList:!0,subtree:!0,characterData:!0,attributes:!0,attributeFilter:[`class`,`aria-selected`,`disabled`,`aria-disabled`,`data-overflow-label`]}))}layout(){let e=this._list();if(this._watch(),!e||!this._more)return;let t=this._items(e);for(let e of t)e.removeAttribute(Fo),e.removeAttribute(Bo);this._more.hidden=!0;let n=this.clientWidth,r=[];if(t.length&&n<=0&&this.getClientRects().length>0)r=t;else if(n>0&&t.length){let i=getComputedStyle(e),a=Uo(i.columnGap),o=Uo(i.paddingLeft)+Uo(i.paddingRight)+Uo(i.borderLeftWidth)+Uo(i.borderRightWidth),s=t.map(e=>e.offsetWidth);if(s.reduce((e,t)=>e+t,0)+a*(t.length-1)>n-o+zo){this._more.hidden=!1;let e=n-o-this._more.offsetWidth-Uo(getComputedStyle(this).columnGap),i=this.hasAttribute(`keep`)?this.getAttribute(`keep`):Io,c=new Set,l=0,u=0,d=i?t.filter(e=>e.matches(i)):[];for(let n of d){let r=l+(s[t.indexOf(n)]??0)+(u?a:0);r>e||(c.add(n),l=r,u+=1)}for(let n=0;n<t.length;n+=1){let r=t[n];if(!r||c.has(r))continue;let i=l+(s[n]??0)+(u?a:0);if(i>e)break;c.add(r),l=i,u+=1}r=t.filter(e=>!c.has(e))}}for(let e of r)e.setAttribute(Fo,``),qo(e)&&e.setAttribute(Bo,``);this._more.hidden=r.length===0,r.length?this._menu.hidden||this._fill(r):this._close(!1);let i=r.map(e=>t.indexOf(e)).join(`,`);i!==this._hiddenKey&&(this._hiddenKey=i,this.dispatchEvent(new CustomEvent(`wui-overflow-change`,{bubbles:!0,detail:{hidden:r.length}})))}_hiddenItems(){let e=this._list();return e?this._items(e).filter(e=>e.hasAttribute(Fo)):[]}_fill(e){this._menu.replaceChildren();for(let t of e){let e=this.ownerDocument.createElement(`button`);e.type=`button`,e.className=`wui-overflow-item`,e.tabIndex=-1;let n=t.querySelector(`input[type=checkbox], input[type=radio]`);n instanceof HTMLInputElement?(e.setAttribute(`role`,n.type===`radio`?`menuitemradio`:`menuitemcheckbox`),e.setAttribute(`aria-checked`,String(n.checked))):e.setAttribute(`role`,`menuitem`);let r=Ko(t),i=!r||`disabled`in r&&r.disabled||r.getAttribute(`aria-disabled`)===`true`||t.matches(`.disabled, [aria-disabled='true']`);i&&e.setAttribute(`aria-disabled`,`true`),e.textContent=Go(t),e.addEventListener(`click`,()=>{i||r&&this._choose(t,r)}),this._menu.append(e)}}_choose(e,t){this._close(!1),t.click(),this.layout();let n=qo(e)?.isConnected?e.querySelector(`.dropdown-item:not([aria-disabled='true'])`):null;if(n){n.focus();return}let r=!e.hasAttribute(Fo)&&e.matches(`button, a[href]`)?e:this._more;r.hidden||r.focus()}_open(e){let t=this._hiddenItems();if(!t.length)return;this._fill(t),this._menu.hidden=!1,this._more.setAttribute(`aria-expanded`,`true`);let n=()=>x(this._more,this._menu);if(n(),S(this,n),e){let e=this._menu.firstElementChild;e instanceof HTMLElement&&e.focus()}}_close(e){this._menu&&!this._menu.hidden&&(this._menu.hidden=!0,this._more.setAttribute(`aria-expanded`,`false`),C(this),e&&this._more.focus())}_onMenuKey(e){let t=[...this._menu.children].filter(e=>e instanceof HTMLElement),n=this.ownerDocument.activeElement,r=n instanceof HTMLElement?t.indexOf(n):-1,i=null;if(e.key===`ArrowDown`)i=t[(r+1)%t.length];else if(e.key===`ArrowUp`)i=t[(r-1+t.length)%t.length];else if(e.key===`Home`)i=t[0];else if(e.key===`End`)i=t[t.length-1];else if(e.key===`Escape`){e.preventDefault(),e.stopPropagation(),this._close(!0);return}else if(e.key===`Tab`){this._close(!1);return}else return;e.preventDefault(),i?.focus()}},Yo=`.wui-rating-star`,Xo=`wui-rating-star-preview`,Zo=`wui-rating-previewing`,Qo=`wui-rating-star-full`,$o=`wui-rating-star-empty`,es=[Qo,`wui-rating-star-half`,$o],ts=e=>[...e.querySelectorAll(Yo)].filter(e=>e instanceof HTMLElement),ns=class extends s{_onChange;_onOver;_onLeave;constructor(){super(),this._onChange=e=>{let t=e.target;t instanceof HTMLInputElement&&t.type===`radio`&&this._fill(Number(t.value))},this._onOver=e=>{if(this.hasAttribute(`disabled`))return;let t=M(e.target,Yo);t instanceof HTMLElement&&this._preview(Number(t.dataset.value))},this._onLeave=()=>this._preview(0)}connectedCallback(){this.addEventListener(`change`,this._onChange),this.addEventListener(`mouseover`,this._onOver),this.addEventListener(`mouseleave`,this._onLeave)}disconnectedCallback(){this.removeEventListener(`change`,this._onChange),this.removeEventListener(`mouseover`,this._onOver),this.removeEventListener(`mouseleave`,this._onLeave)}_fill(e){for(let t of ts(this))t.classList.remove(...es),t.classList.add(Number(t.dataset.value)<=e?Qo:$o)}_preview(e){this.classList.toggle(Zo,e>0);for(let t of ts(this))t.classList.toggle(Xo,e>0&&Number(t.dataset.value)<=e)}},rs=class extends s{_doc;_onKeyDown;constructor(){super(),this._doc=null,this._onKeyDown=e=>{this.hasAttribute(`keys`)&&mt(e,{j:()=>this._press(`.wui-record-pager-next`),k:()=>this._press(`.wui-record-pager-prev`)},this.closest(`[${$e}]`))}}connectedCallback(){this._doc=this.ownerDocument,j(this._doc,`wui-record-pager has no owner document`).addEventListener(`keydown`,this._onKeyDown)}disconnectedCallback(){this._doc?.removeEventListener(`keydown`,this._onKeyDown),this._doc=null}_press(e){let t=this.querySelector(e);!(t instanceof HTMLElement)||t instanceof HTMLButtonElement&&t.disabled||t.getAttribute(`aria-disabled`)===`true`||t.click()}},is={daysAgoTextOne:`{count} day ago`,daysAgoTextOther:`{count} days ago`,hoursAgoTextOne:`{count} hour ago`,hoursAgoTextOther:`{count} hours ago`,inDaysTextOne:`in {count} day`,inDaysTextOther:`in {count} days`,inHoursTextOne:`in {count} hour`,inHoursTextOther:`in {count} hours`,inMinutesTextOne:`in {count} minute`,inMinutesTextOther:`in {count} minutes`,justNowText:`just now`,minutesAgoTextOne:`{count} minute ago`,minutesAgoTextOther:`{count} minutes ago`},as=6e4,os=60*as,ss=24*os,cs=()=>N(`relativeTime`,is),ls={minute:`minutesAgoText`,hour:`hoursAgoText`,day:`daysAgoText`},us={minute:`inMinutesText`,hour:`inHoursText`,day:`inDaysText`};function ds(e,t=Date.now()){let n=jn(e);if(!Number.isFinite(n))return I();let r=t-n,i=Math.abs(r);if(i>=7*ss)return Nn(n);if(i<as)return cs().justNowText;let[a,o]=i<os?[Math.floor(i/as),`minute`]:i<ss?[Math.floor(i/os),`hour`]:[Math.floor(i/ss),`day`];return Ke(cs(),(r>0?ls:us)[o],a)}function fs(e){let t=jn(e);return Number.isFinite(t)?`${Nn(t,{pattern:`datetime`})} IST`:I()}var ps=3e4,ms=new Set,hs=null,gs=()=>{if(!(typeof document<`u`&&document.hidden))for(let e of ms)e.refresh()},_s=e=>{ms.add(e),ms.size===1&&(hs=setInterval(gs,ps),document.addEventListener(`visibilitychange`,gs))},vs=e=>{ms.delete(e),ms.size===0&&(clearInterval(hs??void 0),hs=null,document.removeEventListener(`visibilitychange`,gs))},ys=class extends s{_observer;constructor(){super(),this._observer=null}connectedCallback(){this.refresh(),_s(this),this._observer=new MutationObserver(()=>this.refresh()),this._observer.observe(this,{childList:!0,subtree:!0,characterData:!0,attributes:!0,attributeFilter:[`datetime`]})}disconnectedCallback(){vs(this),this._observer?.disconnect(),this._observer=null}refresh(){let e=this.querySelector(`time[datetime]`);if(!(e instanceof HTMLTimeElement))return;let t=e.getAttribute(`datetime`),n=ds(t);e.textContent!==n&&(e.textContent=n);let r=fs(t);this.getAttribute(`data-wui-tooltip`)!==r&&this.setAttribute(`data-wui-tooltip`,r)}},bs=e=>{let t=String(e??``).trim();return/^(https?:)?\/\//i.test(t)||/^\/(?!\/)/.test(t)||/^data:image\/(png|jpe?g|gif|webp|avif);/i.test(t)?t:``},xs=(e,t=`wui-opt-avatar`)=>{let n=bs(e.avatar);return!n&&!e.initials?``:`<span class="avatar ${t}" aria-hidden="true"><span class="avatar-face">${H(e.initials??``)}</span>${n?`<img class="avatar-img" src="${Ss(n)}" alt="" />`:``}</span>`},Ss=e=>String(e??``).replace(/&/g,`&amp;`).replace(/"/g,`&quot;`).replace(/</g,`&lt;`),Cs=n({createListboxKeyNav:()=>Ts,moveActiveRow:()=>Es}),ws=e=>e.target instanceof Element?e.target.tagName:void 0;function Ts(e){let{getVisibleOptions:t,getActive:n,setActive:r,onEnter:i,onEscape:a,onTypeahead:o,typeaheadMs:s=500}=e,c=``,l=null,u=()=>{clearTimeout(l??void 0),l=null,c=``};return{handler:e=>{let d=t(),f=n(),p=ws(e)===`INPUT`||ws(e)===`TEXTAREA`;if(e.key===`ArrowDown`)e.preventDefault(),r(Math.min(f+1,d.length-1));else if(e.key===`ArrowUp`)e.preventDefault(),r(Math.max(f-1,0));else if(e.key===`Home`&&!p)e.preventDefault(),d.length&&r(0);else if(e.key===`End`&&!p)e.preventDefault(),d.length&&r(d.length-1);else if(e.key===`PageDown`&&!p){if(e.preventDefault(),!d.length)return;r(Math.min(Math.max(0,f)+8,d.length-1))}else if(e.key===`PageUp`&&!p){if(e.preventDefault(),!d.length)return;r(Math.max(Math.max(0,f)-8,0))}else if(Mr(e))i&&(e.preventDefault(),i(d[f],d));else if(e.key===`Escape`)a&&a(e);else if(e.key.length===1&&!e.ctrlKey&&!e.metaKey&&!e.altKey&&ws(e)!==`INPUT`&&ws(e)!==`TEXTAREA`){e.preventDefault(),clearTimeout(l??void 0),c+=e.key.toLowerCase(),l=setTimeout(u,s);let t=d.findIndex(e=>e.textContent.trim().toLowerCase().startsWith(c));t>=0&&(r(t),o&&o(e.key,t,d))}},clearTypeahead:u,teardown:u}}function Es(e,t){let n=e.querySelector(`.is-active`);n!==t&&(n?.classList.remove(`is-active`),t?.classList.add(`is-active`))}var Ds=n({SELECT_TEXT:()=>Os}),Os={addLabel:`Add '{query}'`,addTagsLabel:`Add tags`,allCountriesLabel:`All countries`,clearAllLabel:`Clear all`,clearSelectionLabel:`Clear selection`,countryPlaceholder:`Select country`,countrySearchPlaceholder:`Search countries…`,createLabel:`Create '{text}'`,defaultSearchPlaceholder:`Search {labelText}…`,emptyText:`No matches`,fallbackName:`Select`,helpLabel:`More information`,hintText:`Type to search…`,invalidMessage:`That option is not available.`,optionalLabel:`(optional)`,partLoadMessage:`This control could not load. Reload the page.`,placeholder:`Select…`,recentsLabel:`Recent`,removeText:`Remove {text}`,searchingText:`Searching…`,selectedText:`{count} selected`,suggestedLabel:`Suggested`,tagPlaceholder:`Add…`},ks=n({filterOptions:()=>js,renderOptions:()=>Ns}),As=()=>N(`select`,Os);function js(e,t){let n=String(t??``).trim().toLowerCase();return n?e.filter(e=>[ta(e),e.description,e.meta].some(e=>String(e??``).toLowerCase().includes(n))):e}var Ms=new WeakMap;function Ns(e,t,n={}){let{selected:r=[],query:i=``,status:a=`idle`,emptyText:o=As().emptyText,searchingText:s=As().searchingText,hintText:c=As().hintText,actionRow:l=[],recents:u=null}=n,d=new Set(r.map(String)),f=js(t,i),p=e.id,m=0,h=()=>`${p}-opt-${m++}`,g=e=>`<button type="button" role="option" id="${H(h())}" class="wui-select-option wui-select-add" data-value="${H(e.value)}" data-custom="true" aria-selected="false">${H(e.label)}</button>`,_=l.filter(e=>e.position===`top`).map(g).join(``),v=u?.options.length?`<div class="wui-select-group">${H(u.label)}</div>${u.options.map(e=>Ps(e,h(),d.has(String(e.value)))).join(``)}<div class="wui-select-sep" aria-hidden="true"></div>`:``,y=``,b=``;for(let e of f)e.group&&e.group!==y&&(b+=`<div class="wui-select-group">${H(e.group)}</div>`),y=e.group??``,b+=Ps(e,h(),d.has(String(e.value)));let x=l.filter(e=>e.position===`bottom`).map(g).join(``),S=``;a===`loading`?S=`<div class="wui-select-loading"><span class="wui-select-spinner spinner-border spinner-border-sm" role="status" aria-hidden="true"></span>${H(s)}</div>`:a===`hint`?S=`<div class="wui-select-hint">${H(c)}</div>`:(a===`empty`||f.length===0&&l.length===0)&&(S=`<div class="wui-select-empty">${H(o)}</div>`);let C=_+v+b+x+S;Ms.get(e)!==C&&(Ms.set(e,C),e.innerHTML=C)}function Ps(e,t,n){let r=!!e.disabled,i=r&&e.disabledHint?` title="${H(e.disabledHint)}"`:``,a=`id="${H(t)}" role="option" data-value="${H(e.value)}" aria-selected="${n}"${r?` aria-disabled="true"`:``}${i}`,o=`<span class="wui-select-check" aria-hidden="true">${V(`check`)}</span>`;if(!e.description&&!e.meta)return`<button type="button" class="wui-select-option${n?` selected`:``}" ${a}>${xs(e)}<span class="wui-select-opt-name">${Qi(e)}</span>${o}</button>`;let s=e.description?`<span class="wui-select-opt-desc">${H(e.description)}</span>`:``,c=e.meta?`<span class="wui-select-opt-meta">${H(e.meta)}</span>`:``;return`<div class="wui-select-option wui-select-option-rich${n?` selected`:``}" ${a}>${xs(e)}<span class="wui-select-option-text"><span class="wui-opt-label">${Qi(e)}</span>${s}</span>${c}${o}</div>`}var Fs=Object.freeze([`single`,`multiple`,`search`,`tag`,`country`]),K=e=>e===`multiple`||e===`tag`,Is=n({registerSelectPart:()=>Rs,selectPart:()=>zs}),Ls=new Map;function Rs(e,t){Ls.set(e,t)}function zs(e){return Ls.get(e)}var Bs={chips:`select-chips`,search:`select-search`,country:`phone`,recents:`select-recents`};function Vs(e){let t=Object.hasOwn(Bs,e)?Bs[e]:void 0;if(!t)return Promise.reject(Error(`Unknown <wui-select> part: ${e}.`));let n=zs(e);return n?Promise.resolve(n):Ai(t).then(()=>j(zs(e),`The ${e} part of <wui-select> did not register.`))}var Hs=n({searchesRemotely:()=>Us}),Us=e=>typeof e.loadOptions==`function`||!!e.getAttribute(`source`)||e.hasAttribute(`remote`),Ws={requiredFieldMessage:`Please fill in this field.`},Gs={clearLabel:`Clear search`,placeholder:`Search…`,searchLabel:`Search`},Ks=n({WuiSelect:()=>Xs}),qs=()=>N(`select`,Os),Js=()=>N(`search`,Gs),Ys=()=>N(`field`,Ws),Xs=class extends s{static formAssociated=!0;_internals;_value;_optionsProp;_partOptions;_known;_loadOptionsFn;_validateFn;_declared;_query;_ownsFilter;_active;_status;_error;_nav;_parts;_partSig;_partsMounted;_partToken;_rendered;_searchShown;_defaultValue;_warnedMode;_warnedDensity;_hoverTimer;_hoverOpened;_onHoverOver;_onHoverOut;_panelShown;_pressOpen;static get observedAttributes(){return`mode.value.placeholder.search-placeholder.empty-text.searchable.clearable.disabled.readonly.loading.required.size.density.icon.prefix.open.open-on-hover.aria-label.aria-describedby.aria-invalid.min-chars.debounce.source.remote.allow-custom.add-label.searching-text.hint-text.value-label.value-avatar.value-initials.max-tags.allow-duplicates.separators.pattern.invalid-message.create-label.collapse-chips.selected-text.clear-all-label.countries.suggested.suggested-label.all-countries-label.recents-key.recents-limit.recents-label`.split(`.`)}constructor(){super();try{this._internals=this.attachInternals()}catch{this._internals=null}this._value=``,this._optionsProp=null,this._partOptions=null,this._known=new Map,this._loadOptionsFn=null,this._validateFn=null,this._declared=void 0,this._query=``,this._ownsFilter=!1,this._active=-1,this._status=`idle`,this._error=``,this._nav=null,this._parts=null,this._partSig=``,this._partsMounted=!1,this._partToken=0,this._rendered=!1,this._searchShown=!1,this._defaultValue=void 0,this._warnedMode=null,this._hoverTimer=null,this._hoverOpened=!1,this._panelShown=!1,this._pressOpen=null,this._onHoverOver=e=>{e.pointerType===`mouse`&&this._hoverZone(e.target)&&(this._clearHover(),!this._menuOpen()&&this._hoverEligible()&&(this._hoverTimer=setTimeout(()=>{this._hoverTimer=null,!this._menuOpen()&&this._hoverEligible()&&(this._open({focus:!1}),this._hoverOpened=!0)},ec)))},this._onHoverOut=e=>{e.pointerType===`mouse`&&this._hoverZone(e.target)&&!this._hoverZone(e.relatedTarget)&&(this._clearHover(),this._menuOpen()&&this.hasAttribute(`open-on-hover`)&&(this._hoverTimer=setTimeout(()=>{this._hoverTimer=null,this._close()},tc)))}}connectedCallback(){this.addEventListener(`pointerover`,this._onHoverOver),this.addEventListener(`pointerout`,this._onHoverOut),this._rendered||this.render(),this._ensureParts(),this._mountParts()}disconnectedCallback(){this.removeEventListener(`pointerover`,this._onHoverOver),this.removeEventListener(`pointerout`,this._onHoverOut),this._clearHover(),this._dropMenu(),this._teardown(),this._teardownParts()}attributeChangedCallback(e,t,n){e===`value`?(this._value=sc(n,K(this.mode)),this._applyValue()):e===`aria-invalid`?this._syncInvalid():e===`open`?this._rendered&&(this.hasAttribute(`open`)?this._open({focus:!1}):this._close({force:!0})):e===`open-on-hover`?this.hasAttribute(`open-on-hover`)||this._clearHover():(e===`mode`&&(this._value=sc(this._value,K(this.mode)),this._partOptions=null,this._known.clear(),this._ensureParts()),(e===`source`||e===`remote`||e===`recents-key`)&&this._ensureParts(),ac.has(e)?this._rendered&&(this._drawValue(),this.renderList()):ic.has(e)?this._remountParts():this._rendered&&this.render())}formResetCallback(){if(this.value=this._defaultValue??``,!this._rendered)return;let e=this._refs();e.input&&(e.input.value=``,e.input.removeAttribute(`aria-invalid`)),e.search&&(e.search.value=``),this.setError(``),this._query!==``&&this._onQueryChange(``)}get mode(){let e=this.getAttribute(`mode`);return e===null?`single`:Qs(e)?e:(e!==this._warnedMode&&(this._warnedMode=e,ci(`<wui-select> mode "${e}" is not one of ${Fs.join(`, `)}; it is treated as "single".`)),`single`)}_checkDensity(){let e=this.getAttribute(`density`);e===null||$s.includes(e)||e===this._warnedDensity||(this._warnedDensity=e,ci(`<wui-select> density "${e}" is not one of ${$s.join(`, `)}; it is treated as "comfortable".`))}set mode(e){this.setAttribute(`mode`,String(e))}get value(){return Array.isArray(this._value)?this._value.slice():this._value}set value(e){this._value=sc(e,K(this.mode)),this._applyValue()}get options(){return this._readOptions()}set options(e){this._optionsProp=Array.isArray(e)?e:null,this.mode!==`country`&&(this._partOptions=null);for(let e of this._activePartsList())e.onOptions?.();if(this._rendered){if(this.mode===`single`&&this.getAttribute(`searchable`)===null&&this._autoSearch()!==this._searchShown){this.render();return}this._drawValue(),this.renderList()}}get loadOptions(){return this._loadOptionsFn}set loadOptions(e){this._loadOptionsFn=typeof e==`function`?e:null,this._ensureParts()}get validate(){return this._validateFn}set validate(e){this._validateFn=typeof e==`function`?e:null}commit(e,t={}){this.value=e,this.dispatchEvent(new CustomEvent(`change`,{bubbles:!0,detail:{isCustom:!!t.isCustom}}))}setPartOptions(e){this._partOptions=Array.isArray(e)?e:null,this._drawValue(),this.renderList()}setStatus(e){this._status=e,this.renderList()}setError(e){this._error=e?String(e):``,this._syncError()}openMenu(){z(this)||this._open({focus:!1})}closeMenu({focusControl:e=!1}={}){this._close(),e&&this._refs().control?.focus()}renderList(){let e=this._refs();e.list&&(Ns(e.list,this._listOptions(),{selected:this._selectedValues(),query:this._ownsFilter?``:this._query,status:this._status,emptyText:this.getAttribute(`empty-text`)||qs().emptyText,searchingText:this.getAttribute(`searching-text`)||qs().searchingText,hintText:this.getAttribute(`hint-text`)||void 0,actionRow:this._actionRows(),recents:this._recents()}),this._active>=this._visible().length&&(this._active=-1),this._active>=0&&this._setActive(this._active,{reveal:!1}),this._anchorMenu())}render(){this._dropMenu();let e=this._carry();this._teardownParts(),this._snapshotDeclared();let t=this.mode;this._checkDensity();let n=K(t),r=t===`tag`,i=n&&(r||this.hasAttribute(`allow-custom`));this._value=sc(this._value,n),this._defaultValue===void 0&&n&&this._value.length===0&&(this._value=this._declaredSelected()),n||this._preselect(),this._defaultValue===void 0&&(this._defaultValue=sc(this._value,n));let a=this.getAttribute(`size`),o=a===`sm`?` wui-select-sm`:a===`lg`?` wui-select-lg`:a===`xl`?` wui-select-xl`:``,s=this.getAttribute(`icon`),c=this.getAttribute(`prefix`),l=this.hasAttribute(`clearable`),u=this.hasAttribute(`disabled`);this.id||=`wui-select-${Math.random().toString(36).slice(2,9)}`;let d=`${this.id}-listbox`,f=`${this.id}-entry-error`,p=this.getAttribute(`aria-describedby`)?.trim(),m=p?`${p} ${f}`:f,h=this.hasAttribute(`aria-invalid`)||this._error?` aria-invalid="true"`:``,g=this.hasAttribute(`required`)&&!i?` aria-required="true"`:``,_=` aria-label="${H(this._accessibleName())}" aria-describedby="${H(m)}"${h}${g}`,v=i?``:` role="combobox" aria-haspopup="listbox" aria-expanded="false" aria-controls="${H(d)}"`,y=n?`<div class="input wui-select-control wui-select-multi"${v}${_}${u?` aria-disabled="true"`:r?``:` tabindex="0"`}>`:`<button type="button" class="input wui-select-control"${v}${_}${u?` disabled`:``}>`,b=`${s?V(s,{className:`wui-select-icon`}):``}${c?`<span class="wui-select-prefix">${H(c)}</span>`:``}<span class="wui-select-value" data-label></span>${l?`<span class="wui-select-reset" role="button" aria-label="${H(qs().clearSelectionLabel)}" hidden>${V(`x`)}</span>`:``}${V(`chevron-down`,{className:`wui-select-caret`})}`,x=this.getAttribute(`searchable`),S=x===null?t===`multiple`||t===`country`||this._autoSearch():x!==`false`,C=t===`search`||S&&!i;this._searchShown=C;let ee=this.getAttribute(`search-placeholder`)||(t===`country`?qs().countrySearchPlaceholder:Js().placeholder),w=C?`<div class="wui-select-search">${V(`search`)}<input class="wui-select-input" placeholder="${H(ee)}" aria-label="${H(ee)}" aria-autocomplete="list" /><button type="button" class="wui-select-clear" aria-label="${H(Js().clearLabel)}" hidden>${V(`x`)}</button></div>`:``;this.innerHTML=`
45
45
  <div class="wui-select${o}">
46
46
  ${y}${b}${n?`</div>`:`</button>`}
47
47
  <div class="wui-select-menu wui-select-menu-fixed" popover="auto">
48
- ${T}
49
- <div class="wui-select-options" role="listbox" id="${W(d)}" tabindex="-1"${n?` aria-multiselectable="true"`:``}></div>
48
+ ${w}
49
+ <div class="wui-select-options" role="listbox" id="${H(d)}" tabindex="-1"${n?` aria-multiselectable="true"`:``}></div>
50
50
  </div>
51
51
  </div>
52
- <div class="field-error wui-select-error" id="${W(f)}" aria-live="polite"${this._error?``:` hidden`}>${W(this._error)}</div>`,this._rendered=!0,this._syncMirror(),this._syncValidity(),this._drawValue(),this._syncReset(),this.renderList(),this._wire(),Sr(this,this.querySelector(`.wui-select-control`)),this._mountParts(e)}_accessibleName(){return this.getAttribute(`aria-label`)||this.getAttribute(`placeholder`)||`Select`}_snapshotDeclared(){if(this._declared)return;let e=[...this.querySelectorAll(`:scope > wui-option`)];e.length&&(this._declared=e.map(e=>{let t={value:e.getAttribute(`value`)??bs(e).trim(),label:e.innerHTML,[hi]:!0,selected:e.hasAttribute(`selected`)};for(let[n,r]of fs){let i=e.getAttribute(n);i&&(t[r]=i)}return e.hasAttribute(`disabled`)&&(t.disabled=!0),t}))}_readOptions(){return this.mode===`country`?this._partOptions||[]:this._partOptions?this._partOptions:this._optionsProp?this._optionsProp:(this._snapshotDeclared(),this._declared||[])}_listOptions(){let e=this._readOptions(),t=this.getAttribute(`value-label`);if(this.mode!==`search`||!t||this._value===``)return e;let n=String(this._value);return e.some(e=>String(e.value)===n)?e:[...e,{value:n,label:t}]}_declaredSelected(){return this._optionsProp?[]:(this._declared??[]).filter(e=>e.selected).map(e=>String(e.value))}_preselect(){let e=this._readOptions(),t=this._value!==``&&e.find(e=>String(e.value)===this._value)||e.find(e=>`selected`in e&&!!e.selected);t&&(this._value=String(t.value))}_optionFor(e){let t=String(e),n=this._readOptions().find(e=>String(e.value)===t);return n?(this._known.set(t,n),n):this._known.get(t)}_placeholder(){return this.getAttribute(`placeholder`)||ls[this.mode]}_hasValue(){return Array.isArray(this._value)?this._value.length>0:this._value!==``}_selectedValues(){return Array.isArray(this._value)?this._value:this._value===``?this._listOptions().some(e=>String(e.value)===``)?[``]:[]:[this._value]}_applyValue(){this._syncMirror(),this._syncValidity(),this._rendered&&(this._drawValue(),this._syncReset(),this.renderList())}_syncMirror(){q(this.mode)?Dr(this,this._selectedValues()):V(this,this._value)}_drawValue(){let e=this._refs();if(!e.value)return;let t=q(this.mode),n=t?void 0:this._optionFor(this._value);this._syncTitle(n),this._syncValueAvatar(),this._activePartsList().some(e=>e.renderValue?.()===!0)||(t?(e.value.classList.remove(`wui-select-placeholder`),e.value.textContent=``):(e.value.classList.toggle(`wui-select-placeholder`,!n),e.value.innerHTML=n?bi(n):W(this._placeholder())))}_syncTitle(e){let t=this.querySelector(`.wui-select-control`);if(!t)return;let n=e&&!this.hasAttribute(`title`)?Ci(e).trim():``;n?t.setAttribute(`title`,n):t.removeAttribute(`title`)}_syncValueAvatar(){let e=this.querySelector(`.wui-select-control`);if(!e)return;e.querySelector(`:scope > .wui-select-value-avatar`)?.remove();let t=!q(this.mode)&&this._hasValue()?Fo({avatar:this.getAttribute(`value-avatar`),initials:this.getAttribute(`value-initials`)},`avatar-xs`):``;e.classList.toggle(`wui-has-value-avatar`,!!t),t&&e.insertAdjacentHTML(`afterbegin`,`<span class="wui-select-value-avatar" aria-hidden="true">${t}</span>`)}_syncValidity(){let e=this._internals;if(typeof e?.setValidity==`function`){if(this.hasAttribute(`required`)&&!this._hasValue()){let t=this.querySelector(`.wui-select-control`);e.setValidity({valueMissing:!0},`Please fill in this field.`,t instanceof HTMLElement?t:void 0)}else e.setValidity({})}}_syncReset(){let e=J(this,`.wui-select-reset`,HTMLElement);e&&(e.hidden=!(this.hasAttribute(`clearable`)&&this._hasValue()&&!B(this)))}_syncInvalid(){let e=this.querySelector(`.wui-select-control`);e&&(this.hasAttribute(`aria-invalid`)||this._error?e.setAttribute(`aria-invalid`,`true`):e.removeAttribute(`aria-invalid`))}_syncError(){let e=J(this,`.wui-select-error`,HTMLElement);e&&(e.textContent=this._error,e.hidden=!this._error),this._syncInvalid()}_refs(){return{control:J(this,`.wui-select-control`,HTMLElement),value:J(this,`.wui-select-value`,HTMLElement),menu:J(this,`.wui-select-menu`,HTMLElement),list:J(this,`.wui-select-options`,HTMLElement),search:J(this,`.wui-select-search input`,HTMLInputElement),input:J(this,`.wui-select-draft`,HTMLInputElement)}}_menuOpen(){let e=J(this,`.wui-select-menu`,HTMLElement);return e!==null&&M(e)}_hoverZone(e){if(!(e instanceof Element))return!1;let t=e.closest(`.wui-select-control, .wui-select-menu`);return t!==null&&this.contains(t)}_hoverEligible(){if(!this.hasAttribute(`open-on-hover`)||B(this)||this.mode===`tag`)return!1;let e=this._refs();return e.search===null&&e.input===null}_clearHover(){this._hoverTimer!==null&&clearTimeout(this._hoverTimer),this._hoverTimer=null}_autoSearch(){return this.mode===`single`&&this.getAttribute(`searchable`)===null&&this._readOptions().length>cs}_visible(){let e=this._refs();return e.list?ys(e.list,`.wui-select-option`):[]}_setActive(e,{reveal:t=!0}={}){let n=this._refs();if(!n.list||!n.control)return;let r=this._visible();this._active=e;let i=e>=0?r[e]??null:null;Bo(n.list,i),i?(t&&i.scrollIntoView({block:`nearest`}),n.control.setAttribute(`aria-activedescendant`,i.id)):n.control.removeAttribute(`aria-activedescendant`)}_actionRows(){let e=[];for(let t of this._activePartsList()){let n=t.actionRow?.(this._query);n&&e.push(n)}return e}_recents(){if(this._query.trim()!==``)return null;for(let e of this._activePartsList()){let t=e.recents?.(this._listOptions());if(t)return t}return null}_menuPlacement(e,t){let n=this.hasAttribute(`open`)?{below:!0}:{};if(this.getAttribute(`density`)!==`compact`)return{matchWidth:!0,...n};let r=e.getBoundingClientRect();return t.style.width=`max-content`,t.style.minWidth=`${r.width}px`,t.style.maxWidth=`280px`,n}_anchorMenu(){let e=this._refs();e.control&&e.menu&&this._menuOpen()&&x(e.control,e.menu,this._menuPlacement(e.control,e.menu))}_showMenu(e,t){A(e,t,{...this._menuPlacement(e,t),mode:`auto`,keepOffscreen:this.hasAttribute(`open`),onClosed:()=>this._onPanelClosed()}),this._panelShown=!0}_onPanelClosed(){if(!this._panelShown)return;this._panelShown=!1;let e=this._refs();e.control&&(e.control.setAttribute(`aria-expanded`,`false`),this._setActive(-1),this._nav?.clearTypeahead(),this.dispatchEvent(new CustomEvent(`wui-select:close`,{bubbles:!0})))}_open({focus:e=!0}={}){let t=this._refs();if(!t.menu||!t.control)return;let n=this._menuOpen();this._hoverOpened=!1,t.control.setAttribute(`aria-expanded`,`true`),this._query=t.input?t.input.value:``,this._ownsFilter=this._ownsFilter&&this._query!==``;let r=J(this,`.wui-select-search .wui-select-clear`,HTMLElement);if(r&&(r.hidden=!0),t.search&&(t.search.value=``),this.renderList(),n||this._showMenu(t.control,t.menu),e&&(t.search?.focus(),this._setActive(this._visible().findIndex(e=>e.classList.contains(`selected`)))),!n){this.dispatchEvent(new CustomEvent(`wui-select:open`,{bubbles:!0}));for(let e of this._activePartsList())e.onOpen?.()}}_close({force:e=!1}={}){if(!e&&this.hasAttribute(`open`))return;let t=this._refs();if(!t.menu||!t.control)return;this._hoverOpened=!1;let n=t.menu.contains(document.activeElement);M(t.menu)&&j(t.menu),this._onPanelClosed(),n&&t.control.focus()}_onQueryChange(e){this._query=e,this._setActive(-1);let t=J(this,`.wui-select-search .wui-select-clear`,HTMLElement);t&&(t.hidden=!e);let n=!1;for(let t of this._activePartsList())t.onQuery?.(e)===!0&&(n=!0);this._ownsFilter=n,this.renderList()}_pick(e){if(e.getAttribute(`aria-disabled`)===`true`)return;let t=e.dataset.custom===`true`,n=e.dataset.value??``,r=t?{value:n,label:bs(e).trim()}:this._listOptions().find(e=>String(e.value)===n)??{value:n,label:n},i=this._activePartsList().some(e=>e.onPick?.(r,{isCustom:t})===!0);q(this.mode)||(i||this.commit(n,{isCustom:t}),this._close(),this._refs().control?.focus())}_draftOpens(){return this.mode===`multiple`?this.hasAttribute(`allow-custom`):this.mode===`tag`&&es(this)}_onKeyDown(e){if(!B(this)){for(let t of this._activePartsList())if(t.onKey?.(e)===!0)return;if(!this._menuOpen()){if(e.target instanceof HTMLInputElement){if(e.key!==`ArrowDown`||!this._draftOpens())return;this._open({focus:!1})}else{(e.key===`ArrowDown`||$n(e)||e.key===` `)&&(e.preventDefault(),this._open({focus:!0}));return}}N(this._nav,`Listbox keys are not wired.`).handler(e)}}_wire(){this._teardown();let e=this._refs(),t=e.control,n=e.list;if(!t||!e.menu||!n)return;let r=N(J(this,`.wui-select`,HTMLElement),`The select wrapper is missing.`),i=J(this,`.wui-select-search .wui-select-clear`,HTMLElement),a=J(this,`.wui-select-reset`,HTMLElement);this._nav=zo({getVisibleOptions:()=>this._visible(),getActive:()=>this._active,setActive:e=>this._setActive(e),onEnter:(e,t)=>{if(e)this._pick(e);else if(this._query.trim()!==``){let e=t.find(e=>e.dataset.custom===`true`);if(e)this._pick(e);else if(t.length===1){let e=t[0];e&&this._pick(e)}}},onEscape:e=>{e.preventDefault(),this._nav?.clearTypeahead(),this._close(),t.focus()}}),r.addEventListener(`keydown`,e=>this._onKeyDown(e)),r.addEventListener(`input`,e=>{let t=e.target;if(!(t instanceof HTMLInputElement)||!t.matches(`.wui-select-input, .wui-select-draft`))return;this._onQueryChange(t.value);let n=t.matches(`.wui-select-draft`),r=this._visible().length>0||this._actionRows().length>0;n&&r&&!this._menuOpen()&&!B(this)&&this._draftOpens()&&this._open({focus:!1})}),r.addEventListener(`focusout`,e=>{let t=e.relatedTarget;t instanceof Node&&this.contains(t)||!this._activePartsList().some(e=>e.onBlur?.()===!0)&&t&&this._close()}),i?.addEventListener(`click`,()=>{let t=N(e.search,`The search input is missing.`);t.value=``,this._onQueryChange(``),t.focus()}),t.addEventListener(`pointerdown`,()=>{this._pressOpen=this._menuOpen()}),t.addEventListener(`click`,e=>{if(e.target instanceof Element&&e.target.closest(`[data-remove]`))return;if(this.mode===`tag`){if(B(this))return;this._refs().input?.focus(),!this._menuOpen()&&this._draftOpens()&&this._open({focus:!1});return}if(e.target instanceof HTMLInputElement){!this._menuOpen()&&!B(this)&&this._open({focus:!1});return}let t=e.detail>0&&this._pressOpen!==null?this._pressOpen:this._menuOpen();this._pressOpen=null,this._clearHover(),this._hoverOpened&&t?(this._hoverOpened=!1,this._open({focus:!0})):t?this._close():B(this)||this._open({focus:!0})}),a?.addEventListener(`click`,e=>{e.stopPropagation(),this.commit(q(this.mode)?[]:``),this._close(),t.focus()}),n.addEventListener(`click`,n=>{let r=vs(n).closest(`.wui-select-option`);if(r instanceof HTMLElement&&(this._pick(r),q(this.mode))){let n=this.querySelector(`.wui-select-draft`);(e.search??(n instanceof HTMLElement?n:t)).focus()}}),n.addEventListener(`mousedown`,e=>{q(this.mode)&&e.target instanceof Element&&e.target.closest(`.wui-select-option`)&&e.preventDefault()}),n.addEventListener(`mousemove`,e=>{let t=vs(e).closest(`.wui-select-option`);t instanceof HTMLElement&&!t.classList.contains(`is-active`)&&this._setActive(this._visible().indexOf(t),{reveal:!1})}),n.addEventListener(`mouseleave`,()=>this._setActive(-1)),n.addEventListener(`error`,e=>{let t=e.target;t instanceof Element&&t.classList.contains(`avatar-img`)&&t.remove()},!0),this.hasAttribute(`open`)&&this._open({focus:!1})}_teardown(){this._nav?.teardown()}_dropMenu(){let e=J(this,`.wui-select-menu`,HTMLElement);e&&j(e)}_activePartsList(){return this._partsMounted?N(this._parts,`The mounted parts are missing.`):[]}_ensureParts(){if(!this.isConnected)return;let e=hs(this,this.mode),t=e.join(`,`);if(t===this._partSig)return;this._teardownParts(),this._parts=null,this._partSig=t;let n=++this._partToken;Promise.all(e.map(e=>xs(this,e))).then(e=>{n===this._partToken&&(this._parts=e.filter(e=>e!==null),this._mountParts())})}_mountParts(e={draft:``,query:``}){if(!this._parts||this._partsMounted||!this._rendered||!this.isConnected)return;this._partsMounted=!0;let t=rs(this._refs());for(let n of this._parts)n.mount(this,t,{carry:e});this._drawValue(),this.renderList()}_teardownParts(){let e=this._activePartsList();this._partsMounted=!1;for(let t of e)t.teardown()}_remountParts(){if(!this._partsMounted)return;let e=this._carry();this._teardownParts(),this._mountParts(e)}_carry(){let e=this._refs();return{draft:e.input?.value??``,query:e.search?.value??``}}},rs=e=>{let{control:t,value:n,menu:r,list:i}=e;return{control:N(t,`control missing`),value:N(n,`value missing`),menu:N(r,`menu missing`),list:N(i,`list missing`),search:e.search,input:e.input}},is=e=>Ko.includes(e),as=[`comfortable`,`compact`],os=150,ss=250,cs=10,ls={single:`Select…`,search:`Select…`,multiple:`Select…`,tag:`Add…`,country:`Select country`},us=new Set([`countries`,`suggested`,`suggested-label`,`all-countries-label`,`max-tags`,`pattern`,`collapse-chips`,`source`,`remote`,`min-chars`]),ds=new Set([`separators`,`allow-duplicates`,`invalid-message`,`create-label`,`add-label`,`selected-text`,`clear-all-label`,`value-label`,`value-avatar`,`value-initials`,`hint-text`,`recents-key`,`recents-limit`,`recents-label`]),fs=[[`icon`,`icon`],[`description`,`description`],[`meta`,`meta`],[`group`,`group`],[`avatar`,`avatar`],[`initials`,`initials`],[`disabled-hint`,`disabledHint`]],ps=(e,t)=>t?Array.isArray(e)?e.map(String):e==null||e===``?[]:String(e).split(`,`).map(e=>e.trim()).filter(Boolean):Array.isArray(e)?e.length?String(e[0]):``:e==null?``:String(e),ms=(e,t)=>t===`multiple`?es(e)?[`chips`,`search`]:[`chips`]:t===`search`?[`search`]:t===`country`?[`country`]:t===`tag`?es(e)?[`chips`,`search`]:[`chips`]:[],hs=(e,t)=>e.hasAttribute(`recents-key`)?[`recents`,...ms(e,t)]:ms(e,t),gs=`This control could not load. Reload the page.`,_s=e=>typeof e==`object`&&!!e&&`default`in e&&typeof e.default==`function`,vs=e=>{if(e.target instanceof Element)return e.target;throw Error(`The event target is not an element.`)},J=(e,t,n)=>{let r=e.querySelector(t);return r instanceof n?r:null},ys=(e,t)=>[...e.querySelectorAll(t)].filter(e=>e instanceof HTMLElement),bs=e=>{let t=e.textContent;if(t===null)throw Error(`The element has no text.`);return t},xs=(e,t)=>Qo(t).then(e=>{if(!_s(e))throw Error(`The part ${t} has no default export.`);return e.default()}).catch(()=>(document.dispatchEvent(new CustomEvent(Lr,{bubbles:!0,composed:!0,detail:{chunk:t}})),e.setError(gs),null)),Ss=`wui-shortcuts-open-change`;function Cs(e,t){let n=e.querySelector(t);return n instanceof HTMLElement?n:null}function ws(e,t){return[...e.querySelectorAll(t)].filter(e=>e instanceof HTMLElement)}var Ts=class extends s{_doc;_onKeyDown;_onClick;_onDocClick;_onPointerDown;_onPressEnd;_pressedOpen;_pinned;_mirroring;static get observedAttributes(){return[`open`,`no-trigger`]}constructor(){super(),this._doc=null,this._pressedOpen=!1,this._pinned=!1,this._mirroring=!1,this._onKeyDown=e=>this._keydown(e),this._onClick=e=>this._click(e),this._onDocClick=e=>{let t=P(e.target,`[data-wui-shortcuts-open]`)?.getAttribute(`data-wui-shortcuts-open`);t&&this.matches(t)&&this.setOpen(!0)},this._onPointerDown=e=>{P(e.target,`.wui-shortcut-toggle`)&&(this._pressedOpen=this.open)},this._onPressEnd=e=>{e.type===`pointerup`&&P(e.target,`.wui-shortcut-toggle`)||(this._pressedOpen=!1)}}connectedCallback(){this._doc=this.ownerDocument,this._doc.addEventListener(`keydown`,this._onKeyDown),this._doc.addEventListener(`click`,this._onDocClick),this._doc.addEventListener(`pointerup`,this._onPressEnd,!0),this._doc.addEventListener(`pointercancel`,this._onPressEnd,!0),this.addEventListener(`click`,this._onClick),this.addEventListener(`pointerdown`,this._onPointerDown,!0),this.hasAttribute(`open`)&&!this.open&&(this._pinned=!0,this.setOpen(!0,{focus:!1})),this._syncTrigger()}attributeChangedCallback(e,t,n){e===`no-trigger`?this._syncTrigger():(this._mirroring||(this._pinned=n!==null),this._sheet()&&n!==null!==this.open&&this.setOpen(n!==null))}disconnectedCallback(){let e=this._sheet();e&&j(e),this._doc?.removeEventListener(`keydown`,this._onKeyDown),this._doc?.removeEventListener(`click`,this._onDocClick),this._doc?.removeEventListener(`pointerup`,this._onPressEnd,!0),this._doc?.removeEventListener(`pointercancel`,this._onPressEnd,!0),this.removeEventListener(`click`,this._onClick),this.removeEventListener(`pointerdown`,this._onPointerDown,!0),this._doc=null}get open(){let e=this._sheet();return!!(e&&M(e))}set open(e){let t=e===!0||e===``||e===`true`;this._pinned=t,this._sheet()?t!==this.open&&this.setOpen(t):this.toggleAttribute(`open`,t)}setOpen(e,{focus:t=!0}={}){let n=this._sheet();if(!n)return;let r=Cs(this,`.wui-shortcut-toggle`);e||(this._pinned=!1),e?(n.removeAttribute(`hidden`),A(this.hasAttribute(`no-trigger`)?r??this:N(r,`<wui-shortcuts> needs its toggle to anchor the sheet.`),n,{mode:`auto`,side:`top`,align:`end`,flipAlign:!0,gap:8,keepOffscreen:this._pinned,onClosed:()=>{this._pinned=!1,this._mirror(!1)}})):j(n),this._mirror(e),t&&(e?Cs(n,`.wui-shortcut-close`)?.focus():r?.focus())}_mirror(e){let t=this._sheet();t&&(t.hidden=!e),Cs(this,`.wui-shortcut-toggle`)?.setAttribute(`aria-expanded`,String(e)),this.hasAttribute(`open`)!==e&&(this._mirroring=!0,this.toggleAttribute(`open`,e),this._mirroring=!1,this.dispatchEvent(new CustomEvent(Ss,{bubbles:!0,detail:{open:e}})))}_sheet(){return Cs(this,`.wui-shortcut-sheet`)}_syncTrigger(){let e=Cs(this,`.wui-shortcut-toggle`);e&&(e.hidden=this.hasAttribute(`no-trigger`))}_scope(){let e=this.closest(`[${Ne}]`);return e instanceof HTMLElement?e:null}_items(){let e=this.getAttribute(`items`);return e?ws(N(this._scope()??this._doc,`WuiShortcuts used before it was connected`),e):[]}_click(e){let t=e.target;if(t instanceof Element){if(t.closest(`.wui-shortcut-toggle`)){let e=this._pressedOpen;this._pressedOpen=!1,this.setOpen(!e&&!this.open)}else t.closest(`.wui-shortcut-close`)&&this.setOpen(!1)}}_tickFocused(){let e=this._items(),t=N(this._doc,`WuiShortcuts used before it was connected`).activeElement,n=t?.closest?.(`li, tr`),r=e.find(e=>e===t||e.contains(t)||n?.contains(e)),i=(r?.closest(`li, tr`)??r)?.querySelector(`input[type="checkbox"]`);i instanceof HTMLInputElement&&i.click()}_focusSearch(){let e=this.getAttribute(`search`);if(!e)return;let t=N(this._doc,`WuiShortcuts used before it was connected`);(Cs(this._scope()??t,e)??Cs(t,e))?.focus()}_keydown(e){if(e.defaultPrevented)return;let t=We(e);if(!t)return;if(t===`esc`&&this.open){e.preventDefault(),this.setOpen(!1);return}let n=this._scope(),r={help:()=>this.setOpen(!this.open)};if(this.getAttribute(`items`)&&(r.j=()=>Qe(this._items(),1),r.k=()=>Qe(this._items(),-1),r.x=()=>this._tickFocused()),this.getAttribute(`search`)&&(r.slash=()=>this._focusSearch()),r[t]){Ze(e,r,n);return}if(t===`enter`)return;let i=N(this._doc,`WuiShortcuts used before it was connected`),a=e.target instanceof Node?e.target:null;if(Ye(i)||!Xe(a,n)||qe(a))return;let o=Ge(t),s=ws(this,`.wui-shortcut-keys [data-shortcut]`).find(e=>e.dataset.shortcut===o);if(!s)return;let c=(n??i).querySelector(`[aria-current="true"]`)?.closest(`[data-key]`),l=c instanceof HTMLElement?c.dataset.key??null:null;if(!this.dispatchEvent(new CustomEvent(`wui:shortcut`,{bubbles:!0,cancelable:!0,detail:{key:o,itemKey:l}}))){e.preventDefault();return}let u=s.dataset.target,d=u?Cs(i,u):null;d&&(e.preventDefault(),d.click())}},Es=3,Ds=`Show more`,Os=`Show less`,ks=class extends s{_width;_observer;_toggle;_onClick;constructor(){super(),this._width=-1,this._observer=null,this._toggle=null,this._onClick=()=>this.toggle()}connectedCallback(){let e=this.querySelector(`.wui-show-more-toggle`);if(this._toggle=e instanceof HTMLButtonElement?e:null,!this._toggle)return;let t=Number.parseInt(this.getAttribute(`lines`)??``,10);this.style.setProperty(`--wui-show-more-lines`,String(t>=1?t:Es)),this._toggle.addEventListener(`click`,this._onClick),this._sync(),this._check(),typeof ResizeObserver<`u`&&(this._observer=new ResizeObserver(()=>{this.clientWidth!==this._width&&this._check()}),this._observer.observe(this))}disconnectedCallback(){this._observer?.disconnect(),this._observer=null,this._toggle?.removeEventListener(`click`,this._onClick),this._toggle=null}get expanded(){return this.hasAttribute(`expanded`)}toggle(e=!this.expanded){this.toggleAttribute(`expanded`,!!e),this._sync(),this.dispatchEvent(new CustomEvent(`wui:show-more:toggle`,{bubbles:!0,detail:{expanded:this.expanded}}))}_sync(){let e=N(this._toggle,`WuiShowMore used before it was connected`),t=this.expanded;e.setAttribute(`aria-expanded`,String(t)),e.textContent=t?this.getAttribute(`less-label`)||Os:this.getAttribute(`more-label`)||Ds}_check(){let e=this.querySelector(`.wui-show-more-body`);if(!(e instanceof HTMLElement))return;this._width=this.clientWidth;let t=this.expanded;t&&this.removeAttribute(`expanded`);let n=e.scrollHeight>e.clientHeight+1;t&&this.setAttribute(`expanded`,``);let r=N(this._toggle,`WuiShowMore used before it was connected`);r.hidden=!n}},As=class extends s{_measure;_resize;_mutation;_ownTabindex;constructor(){super(),this._measure=()=>this.measure(),this._resize=null,this._mutation=null,this._ownTabindex=!1}connectedCallback(){this.measure(),this.addEventListener(`mouseover`,this._measure),typeof ResizeObserver<`u`&&(this._resize=new ResizeObserver(this._measure),this._resize.observe(this)),this._mutation=new MutationObserver(this._measure),this._mutation.observe(this,{childList:!0,subtree:!0,characterData:!0})}disconnectedCallback(){this.removeEventListener(`mouseover`,this._measure),this._resize?.disconnect(),this._mutation?.disconnect(),this._resize=null,this._mutation=null}measure(){let e=this.querySelector(`.wui-truncate-text`);e&&(e.scrollWidth>e.clientWidth||e.scrollHeight>e.clientHeight?(this.setAttribute(`data-wui-tooltip`,(e.textContent??``).replace(/\s+/g,` `).trim()),this.hasAttribute(`tabindex`)||(this.setAttribute(`tabindex`,`0`),this._ownTabindex=!0)):(this.removeAttribute(`data-wui-tooltip`),this._ownTabindex&&=(this.removeAttribute(`tabindex`),!1)))}},js=`wui-whats-new-read`,Ms=`wui-whats-new:`,Ns=`data-wui-unread`,Ps=0,Fs=e=>{let t=Date.parse(e);return Number.isNaN(t)?-1/0:t},Is=(e,t)=>Fs(t)>Fs(e)?t:e,Ls=(e,t)=>{let n=e.querySelector(t);return n instanceof HTMLElement?n:null},Rs=class extends s{_doc;_stored;_observer;_onTriggerClick;_closeFocus;static get observedAttributes(){return[`storage-key`,`read-through`,`indicator`]}constructor(){super(),this._doc=null,this._stored=``,this._closeFocus=null,this._observer=null,this._onTriggerClick=()=>this.isOpen?this.close(!0):this.open()}get isOpen(){let e=this._panel;return e!==null&&M(e)}get _trigger(){return Ls(this,`.wui-whats-new-trigger`)}get _panel(){return Ls(this,`.wui-whats-new-panel`)}get _dot(){return Ls(this,`.wui-whats-new-dot`)}connectedCallback(){this._doc=this.ownerDocument;let e=this._panel,t=this._trigger;e&&t&&(e.id||=`wui-whats-new-${++Ps}`,t.setAttribute(`aria-controls`,e.id),t.setAttribute(`aria-expanded`,`false`),t.addEventListener(`click`,this._onTriggerClick),this._stored=this._load(),this._refresh(),typeof MutationObserver<`u`&&(this._observer=new MutationObserver(()=>this._refresh()),this._observer.observe(e,{childList:!0,subtree:!0})))}disconnectedCallback(){let e=this._panel;e&&(this._closeFocus=!1,j(e),this._closeFocus=null),this._observer?.disconnect(),this._observer=null,this._trigger?.removeEventListener(`click`,this._onTriggerClick),this._doc=null}attributeChangedCallback(e,t,n){t!==n&&this._doc&&(e===`storage-key`&&(this._stored=this._load()),this._refresh())}open(){let e=N(this._trigger,`<wui-whats-new> needs its trigger to open.`),t=N(this._panel,`<wui-whats-new> needs its panel to open.`);this.isOpen||(A(e,t,{mode:`auto`,clampHeight:!0,onClosed:()=>this._closed()}),e.setAttribute(`aria-expanded`,`true`),t.focus({preventScroll:!0}),this._markRead())}close(e){let t=this._panel;t&&this.isOpen&&(this._closeFocus=e,j(t))}_closed(){let e=this._closeFocus??this._panel?.contains(this.ownerDocument.activeElement)??!1;this._closeFocus=null,this._settle(e)}_settle(e){this._trigger?.setAttribute(`aria-expanded`,`false`),this._refresh(),e&&this._trigger?.focus()}_entries(){let e=[];for(let t of this.querySelectorAll(`.wui-whats-new-entry`))t instanceof HTMLElement&&e.push({entry:t,date:t.querySelector(`time[datetime]`)?.getAttribute(`datetime`)??``});return e}_newest(){return this._entries().reduce((e,{date:t})=>Is(e,t),``)}_seenPoint(){return Is(this._stored,this.getAttribute(`read-through`)??``)}_refresh(){let e=this._seenPoint(),t=this._entries(),n=0;for(let{entry:r,date:i}of t){let t=Fs(i)>Fs(e);t&&n++,this.isOpen&&r.hasAttribute(Ns)||r.toggleAttribute(Ns,t)}this.toggleAttribute(Ns,n>0);let r=this._dot;r&&(r.textContent=this.getAttribute(`indicator`)===`count`&&n>0?String(n):``)}_markRead(){let e=this._newest();!e||Fs(e)<=Fs(this._seenPoint())||(this._stored=Is(this._stored,e),this._save(this._stored),this._refresh(),this.dispatchEvent(new CustomEvent(js,{bubbles:!0,detail:{through:e}})))}_storage(){let e=this.getAttribute(`storage-key`);if(!e)return null;try{let t=this.ownerDocument.defaultView;return t?{store:t.localStorage,key:Ms+e}:null}catch{return null}}_load(){let e=this._storage();return e?e.store.getItem(e.key)??``:this._stored}_save(e){let t=this._storage();t&&t.store.setItem(t.key,e)}},zs=n({APP_BUTTON_MARKER:()=>Bs,buttonClass:()=>Ws}),Bs=`AppButton`,Vs=new Set([`primary`,`success`,`warning`,`danger`,`info`,`neutral`]),Hs={solid:e=>`btn-${e}`,soft:e=>`btn-soft-${e}`,outline:e=>`btn-outline-${e}`,ghost:e=>`btn-ghost-${e}`,link:e=>`btn-link-${e}`,glass:()=>`btn-glass`};function Us(e){return Object.hasOwn(Hs,e)}function Ws(e=`primary`,t=`solid`,n=`md`){if(!Vs.has(e))throw RangeError(`buttonClass: unknown tone "${e}"`);if(!Us(t))throw RangeError(`buttonClass: unknown variant "${t}"`);let r=Hs[t](e);return n===`md`?`btn ${r}`:`btn ${r} btn-${n}`}var Gs=n({COPY_FEEDBACK_MS:()=>Ks,copyTextToClipboard:()=>qs}),Ks=2e3;async function qs(e){try{if(navigator.clipboard?.writeText)return await navigator.clipboard.writeText(e),!0}catch(e){if(!(e instanceof DOMException))throw e}try{let t=document.createElement(`textarea`);t.value=e,t.style.position=`fixed`,t.style.top=`0`,t.style.left=`0`,t.style.opacity=`0`,document.body.appendChild(t),t.select();let n=document.execCommand(`copy`);return document.body.removeChild(t),!!n}catch(e){if(!(e instanceof DOMException))throw e;return!1}}var Js=n({MENTION_ID_PATTERN:()=>Ys,mentionLabel:()=>Qs,mentionTextFromValue:()=>tc,mentionValueFromText:()=>nc,mentionedIds:()=>rc,parseMentionValue:()=>ec}),Ys=/^[A-Za-z0-9_.:-]{1,64}$/,Xs=/@(\\+)\[|@\[([^[\]\n]{1,100})\]\(([A-Za-z0-9_.:-]{1,64})\)/g,Zs=/@(\\*)\[/g;function Qs(e){return String(e??``).replace(/[[\]\r\n]+/g,` `).replace(/\s+/g,` `).trim().slice(0,100)}var $s=e=>e.replace(Zs,(e,t)=>`@\\${t}[`);function ec(e){let t=String(e??``),n=[],r=e=>{if(!e)return;let t=n[n.length-1];t&&`text`in t?t.text+=e:n.push({text:e})},i=0;for(let e of t.matchAll(Xs))r(t.slice(i,e.index)),e[1]===void 0?n.push({id:e[3]??``,label:e[2]??``}):r(`@${e[1].slice(1)}[`),i=e.index+e[0].length;return r(t.slice(i)),n}function tc(e){let t=``,n=[];for(let r of ec(e)){if(`text`in r){t+=r.text;continue}let e=`@${r.label}`;n.push({start:t.length,end:t.length+e.length,id:r.id,label:r.label}),t+=e}return{text:t,mentions:n}}function nc(e,t=[]){let n=String(e??``),r=[...t].sort((e,t)=>e.start-t.start),i=``,a=0;for(let e of r)e.start<a||n.slice(e.start,e.end)!==`@${e.label}`||!Ys.test(e.id)||(i+=$s(n.slice(a,e.start)),i+=`@[${e.label}](${e.id})`,a=e.end);return i+$s(n.slice(a))}function rc(e){let t=[];for(let n of ec(e))`id`in n&&!t.includes(n.id)&&t.push(n.id);return t}var ic=n({bindMenuKeys:()=>lc}),ac=500,oc=10,sc=new Set([`INPUT`,`TEXTAREA`,`SELECT`]);function cc(e){return e instanceof HTMLElement?sc.has(e.tagName)||e.isContentEditable:!1}function lc(e,t){let{items:n,typeahead:r=!0}=t,i=``,a=null,o=()=>{a!==null&&clearTimeout(a),a=null,i=``},s=e=>{let t=n().filter(qi),s=t.length;if(s===0)return;let c=e.target,l=t.findIndex(e=>c instanceof Node&&e.contains(c)),u=n=>{e.preventDefault(),e.stopPropagation(),t[n]?.focus()},d=cc(c);if(e.key===`ArrowDown`){u(l<0?0:(l+1)%s);return}if(e.key===`ArrowUp`){u(l<0?s-1:(l-1+s)%s);return}if(e.key===`Home`&&!d){u(0);return}if(e.key===`End`&&!d){u(s-1);return}if(e.key===`PageDown`){u(Math.min((l<0?-1:l)+oc,s-1));return}if(e.key===`PageUp`){u(Math.max((l<0?s:l)-oc,0));return}if(!r||!/^\S$/.test(e.key)||e.ctrlKey||e.metaKey||e.altKey||d)return;e.preventDefault(),e.stopPropagation(),a!==null&&clearTimeout(a),i+=e.key.toLowerCase(),a=setTimeout(o,ac);let f=i.length>1&&i.split(``).every(e=>e===i[0]),p=f?i[0]??``:i,m=i.length===1||f?l+1:Math.max(l,0);for(let e=0;e<s;e++){let n=(m+e)%s;if((t[n]?.textContent??``).trim().toLowerCase().startsWith(p)){t[n]?.focus();return}}};return e.addEventListener(`keydown`,s),()=>{e.removeEventListener(`keydown`,s),o()}}var uc=n({deriveStepStatus:()=>dc,stepperHeaderItems:()=>fc});function dc(e,t){return typeof t==`number`?e<t?`done`:e===t?`active`:`pending`:`pending`}function fc(e,t){let{statusOf:n,journey:r,connectors:i}=t;return e.map((t,a)=>{let o=n(a),s;return s=o===`done`?{icon:`check`}:o===`error`?{icon:`alert-triangle`}:o===`skipped`?{icon:`minus`}:t.icon?{icon:t.icon}:{number:a+1},{index:a,status:o,className:o===`pending`?`step`:`step ${o}`,glyph:s,current:o===`active`,line:r&&i&&a<e.length-1?{done:o===`done`}:null}})}var pc=n({SELECT_ALL_LABEL:()=>mc,SELECT_CELL_CLASS:()=>Y,SELECT_ROW_LABEL:()=>hc,addRowSelectCells:()=>Cc,addSelectColumn:()=>wc,attachShiftRange:()=>Dc,createSelectHeaderCell:()=>_c,createSelectRowCell:()=>vc,createSelectSpacerCell:()=>yc,syncSelectAll:()=>Tc}),mc=`Select all rows`,hc=`Select row`,Y=`wui-select-cell`,gc=(e,t)=>{let n=e.createElement(`input`);return n.type=`checkbox`,n.className=`wui-check`,n.setAttribute(`aria-label`,t),n};function _c(e=document){let t=e.createElement(`th`);return t.className=Y,t.appendChild(gc(e,mc)),t}function vc(e=document,{disabled:t=!1}={}){let n=e.createElement(`td`);n.className=Y;let r=gc(e,hc);return r.disabled=t,n.appendChild(r),n}function yc(e=document){let t=e.createElement(`td`);return t.className=Y,t}var bc=e=>e.firstElementChild?.classList.contains(Y),xc=e=>e.matches(`.wui-group-row, .wui-virtual-spacer, .wui-row-expanded`),Sc=(e,t,n)=>[...e.querySelectorAll(t)].filter(e=>e instanceof n);function Cc(e){for(let t of e){if(bc(t)||xc(t))continue;let e=t.getAttribute(`data-row-selectable`)===`false`;t.insertBefore(vc(t.ownerDocument,{disabled:e}),t.firstChild)}}function wc(e){let t=e.querySelector(`thead tr`);if(!(t instanceof HTMLTableRowElement))return null;bc(t)||t.insertBefore(_c(e.ownerDocument),t.firstChild),Cc(Sc(e,`tbody tr`,HTMLTableRowElement));for(let t of Sc(e,`tfoot tr`,HTMLTableRowElement))bc(t)||t.insertBefore(yc(e.ownerDocument),t.firstChild);let n=t.querySelector(`.${Y} .wui-check`);return n instanceof HTMLInputElement?n:null}function Tc(e){let t=e.querySelector(`thead .${Y} .wui-check`),n=Sc(e,`tbody tr .wui-check:not(:disabled)`,HTMLInputElement),r=n.length,i=n.filter(e=>e.checked).length;t instanceof HTMLInputElement&&(t.checked=r>0&&i===r,t.indeterminate=i>0&&i<r);for(let t of Sc(e,`tbody tr`,HTMLTableRowElement)){let e=t.querySelector(`.wui-check`);t.classList.toggle(`is-selected`,e instanceof HTMLInputElement&&e.checked)}return{selected:i,total:r}}var Ec=`tbody .${Y} .wui-check:not(:disabled)`;function Dc(e,t){let n=null,r=e=>e instanceof Element&&e.matches(`.wui-select-cell .wui-check:not(:disabled)`)&&!!e.closest(`tbody`);e.addEventListener(`mousedown`,e=>{e.shiftKey&&r(e.target)&&e.preventDefault()}),e.addEventListener(`click`,i=>{let a=i.target;if(r(a)){if(i.shiftKey&&n?.isConnected&&n!==a){let r=Sc(e,Ec,HTMLInputElement),i=r.indexOf(n),o=r.indexOf(a);if(i>=0&&o>=0){let e=[];for(let t of r.slice(Math.min(i,o),Math.max(i,o)+1))t!==a&&t.checked!==a.checked&&(t.checked=a.checked,e.push(t));e.length&&t?.(e,a.checked)}}n=a}})}var Oc=n({matchSegments:()=>kc});function kc(e,t){let n=String(e??``),r=String(t??``).trim();if(!r||!n)return[{text:n,match:!1}];let i=n.toLowerCase(),a=r.toLowerCase();if(i.length!==n.length)return[{text:n,match:!1}];let o=[],s=0,c=i.indexOf(a,s);for(;c!==-1;)c>s&&o.push({text:n.slice(s,c),match:!1}),o.push({text:n.slice(c,c+a.length),match:!0}),s=c+a.length,c=i.indexOf(a,s);return s<n.length&&o.push({text:n.slice(s),match:!1}),o}var Ac=n({TOOLTIP_ATTRIBUTE:()=>jc,TOOLTIP_CLASS_ATTRIBUTE:()=>Nc,TOOLTIP_HTML_ATTRIBUTE:()=>Pc,TOOLTIP_ID_ATTRIBUTE:()=>Fc,TOOLTIP_OPEN_ATTRIBUTE:()=>Ic,TOOLTIP_PLACEMENT_ATTRIBUTE:()=>Mc,showPinnedTooltips:()=>Rc,wireTooltips:()=>Lc}),jc=`data-wui-tooltip`,Mc=`data-wui-tooltip-placement`,Nc=`data-wui-tooltip-class`,Pc=`data-wui-tooltip-html`,Fc=`data-wui-tooltip-id`,Ic=`data-wui-tooltip-open`;function Lc(e){Hc.has(e)||(Hc.add(e),e.addEventListener(`pointerover`,t=>{let n=qc(t.target);n&&!Yc(e,n)&&Qc(e,n,!1)}),e.addEventListener(`pointerout`,t=>{let n=Wc(e).transient;n&&qc(t.target)===n.trigger&&(t.relatedTarget instanceof Node&&n.trigger.contains(t.relatedTarget)||$c(e,n))}),e.addEventListener(`focusin`,t=>{let n=t.target;if(!(n instanceof Element)||!n.matches(`:focus-visible`))return;let r=qc(n);r&&!Yc(e,r)&&Qc(e,r,!1)}),e.addEventListener(`focusout`,t=>{let n=Wc(e).transient;n&&qc(t.target)===n.trigger&&(t.relatedTarget instanceof Node&&n.trigger.contains(t.relatedTarget)||$c(e,n))}),e.addEventListener(`click`,t=>{let n=Wc(e).transient;n&&qc(t.target)===n.trigger&&$c(e,n)}))}function Rc(e){let t=e instanceof Document?e:e.ownerDocument;for(let n of e.querySelectorAll(`[${Ic}]`))Qc(t,n,!0)}var zc=[`top`,`bottom`,`start`,`end`],Bc=`wui-tooltip`,Vc=`[${jc}], [${Fc}]`,Hc=new WeakSet,Uc=new WeakMap;function Wc(e){let t=Uc.get(e);return t||(t={bubble:null,transient:null,pinned:new Map,pinnedCount:0,onEscape:t=>{t.key===`Escape`&&(t.preventDefault(),t.stopPropagation(),el(e))}},Uc.set(e,t)),t}function Gc(e){return zc.includes(e)}function Kc(e){return e===`auto`||Gc(e)}function qc(e){if(!(e instanceof Element))return null;let t=e.closest(Vc);return t instanceof HTMLElement?t:null}function Jc(e,t){return e.transient?.trigger===t?e.transient:e.pinned.get(t)}function Yc(e,t){return Jc(Wc(e),t)!==void 0}function Xc(e,t){let n=e.createElement(`div`);n.id=t,n.setAttribute(`role`,`tooltip`),n.setAttribute(`popover`,`manual`);let r=e.createElement(`div`);r.className=`tooltip-arrow`;let i=e.createElement(`div`);return i.className=`tooltip-inner`,n.append(r,i),{el:n,arrow:r,inner:i}}function Zc(e,t){return t.bubble||=Xc(e,Bc),t.bubble}function Qc(e,t,n){let r=t.getAttribute(jc),i=t.getAttribute(Fc);if(r===null&&i===null)throw Error(`a tooltip trigger carries ${jc} or ${Fc}`);if(r!==null&&i!==null)throw Error(`a tooltip trigger carries ${jc} or ${Fc}, not both`);let a=t.getAttribute(`data-wui-tooltip-placement`)??`top`;if(!Kc(a))throw Error(`${Mc} "${a}" is not auto, top, bottom, start or end`);let o=Wc(e);$c(e,n?o.pinned.get(t):o.transient);let s,c=null,l=null,u=!1;if(i!==null){let t=e.getElementById(i);if(!(t instanceof HTMLElement))throw Error(`no element with id "${i}" for a tooltip`);s=t,c=e.createComment(`wui-tooltip`),s.replaceWith(c),l=s.getAttribute(`popover`),s.setAttribute(`popover`,`manual`)}else{let i=n?Xc(e,`${Bc}-pinned-${++o.pinnedCount}`):Zc(e,o);u=n;let c=t.getAttribute(`data-wui-tooltip-class`)??``;i.el.className=`tooltip wui-tooltip bs-tooltip-${a} ${c}`.trim(),t.hasAttribute(`data-wui-tooltip-html`)?i.inner.innerHTML=r??``:i.inner.textContent=r??``,s=i.el}let d=t.getAttribute(`aria-describedby`);t.setAttribute(`aria-describedby`,s.id);let f=()=>x(t,s,{side:a,align:`center`,gap:6,arrow:s.querySelector(`.tooltip-arrow`)});De(e).append(s),s.showPopover(),f();let p=Oe(e=>{s.parentElement!==e&&e.append(s),Te(s),f()},e),m=new MutationObserver(()=>{t.isConnected||$c(e,Jc(Wc(e),t))});m.observe(e,{childList:!0,subtree:!0});let h={el:s,trigger:t,pinned:n,own:u,home:c,popover:l,describedBy:d,watch:m,unroot:p};n?o.pinned.set(t,h):o.transient=h,e.addEventListener(`keydown`,o.onEscape,!0)}function $c(e,t){if(!t)return;let n=Wc(e);t.pinned?n.pinned.delete(t.trigger):n.transient=null,!n.transient&&n.pinned.size===0&&e.removeEventListener(`keydown`,n.onEscape,!0),t.watch.disconnect(),t.unroot(),t.el.hidePopover(),t.home?(t.popover===null?t.el.removeAttribute(`popover`):t.el.setAttribute(`popover`,t.popover),t.home.replaceWith(t.el)):t.own&&t.el.remove(),t.describedBy===null?t.trigger.removeAttribute(`aria-describedby`):t.trigger.setAttribute(`aria-describedby`,t.describedBy)}function el(e){let t=Wc(e);$c(e,t.transient);for(let n of[...t.pinned.values()])$c(e,n)}var tl=Object.freeze({anchorOverlay:c,buttonClass:zs,calendarMath:cr,copyText:Gs,dataTable:gn,defineElement:r,devWarn:kr,dom:Ae,elementBase:a,fieldState:yr,formatters:Ot,formMirror:Cr,glyphs:ri,iconGlyphs:ri,imeSafeEnter:Qn,isDrawn:Ki,listboxKeyNav:Lo,loader:Fr,mentionText:Js,menuKeyNav:ic,nativeOverlay:w,notificationDays:Ji,optionLabel:mi,partRegistry:qo,selectList:Vo,selectRemote:$o,stepperHeader:uc,tableSelect:pc,textMatch:Oc,tooltips:Ac,wuiHttp:ca,WuiSelect:ts,zone:gt}),nl=`image/jpeg,image/png,image/webp,image/heic,image/heif,.heic,.heif`,rl=10,il=512,al=`image/webp`,ol=[96,48],sl={dialogTitle:`Edit photo`,dialogSubtitle:`Drag to position the photo, then zoom or rotate it.`,save:`Save photo`,cancel:`Cancel`,choose:`Upload photo`,change:`Change photo`,camera:`Take photo`,remove:`Remove photo`,unreadable:`That photo could not be opened. Choose a JPG, PNG or WebP image.`,heicUnreadable:`This browser cannot open HEIC photos. Choose a JPG, PNG or WebP image instead.`,cropFailed:`That photo could not be saved. Try again, or choose another one.`};function cl(e){if(!e)return!1;let t=String(e.type||``).toLowerCase();return t===`image/heic`||t===`image/heif`||/\.hei[cf]$/i.test(String(e.name||``))}function ll(e){return cl(e)?sl.heicUnreadable:sl.unreadable}function ul(e,t){let n=Number(t);return{name:e?.name||`photo`,type:al,size:Number.isInteger(n)&&n>0?n:512}}var dl=`/`,fl=`.search-wrap.wui-search-collapsible`,pl=`.wui-topsearch-panel`,ml=`.modal, wui-drawer[open]`,hl=new WeakSet,gl=e=>{let t=e.querySelector(`.wui-search-toggle`);return t instanceof HTMLElement?t:null},_l=e=>{let t=e.querySelector(`.search-input`);return t instanceof HTMLInputElement?t:null},vl=e=>[...e.querySelectorAll(fl)].filter(e=>e instanceof HTMLElement);function yl(e){e.classList.remove(`is-collapsed`),gl(e)?.setAttribute(`aria-expanded`,`true`),_l(e)?.focus()}function bl(e){_l(e)?.value||(e.classList.add(`is-collapsed`),gl(e)?.setAttribute(`aria-expanded`,`false`))}function xl(e){if(e.dataset.wuiCollapseWired)return;e.dataset.wuiCollapseWired=`1`;let t=gl(e),n=_l(e);t?.addEventListener(`click`,()=>yl(e)),n?.addEventListener(`keydown`,r=>{r.key!==`Escape`||n?.value||(r.preventDefault(),bl(e),t?.focus())}),e.addEventListener(`focusout`,t=>{let n=t.relatedTarget;n instanceof Node&&e.contains(n)||bl(e)})}function Sl(e){hl.has(e)||(hl.add(e),e.addEventListener(`keydown`,t=>{if(t.key!==`/`||t.ctrlKey||t.altKey||t.metaKey||t.defaultPrevented||qe(t.target instanceof Node?t.target:null)||t.target instanceof Element&&t.target.closest(ml)||e.querySelector(pl))return;let n=vl(e).find(e=>e.offsetParent!==null);n&&(t.preventDefault(),yl(n))}))}function Cl(e=document){let t=e;for(let e of vl(t))xl(e);Sl(e instanceof Element?e.ownerDocument:e)}var wl=`data-wui-command-shortcut`,Tl=`k`,El=new WeakSet;function Dl(e,t){return!(e.ctrlKey||e.metaKey)||e.altKey||e.shiftKey||e.repeat?!1:String(e.key).toLowerCase()===String(t).toLowerCase()}function Ol(e){return e.nodeType===Node.DOCUMENT_NODE}function kl(e){e.closest(`wui-modal`)?.show()}function Al(e){let t=Ol(e)?e:e.ownerDocument;!El.has(t)&&e.querySelector(`[data-wui-command-shortcut]`)&&(El.add(t),t.addEventListener(`keydown`,e=>{for(let n of t.querySelectorAll(`[${wl}]`))if(Dl(e,n.getAttribute(`data-wui-command-shortcut`)||Tl)){e.preventDefault(),n.localName===`wui-command-palette`||n.localName===`wui-modal`?kl(n):(n.focus(),`select`in n&&typeof n.select==`function`&&n.select());return}}))}var jl=`image/png,image/jpeg,image/webp`,Ml=5,Nl={"image/png":[`.png`],"image/jpeg":[`.jpg`,`.jpeg`],"image/webp":[`.webp`],"image/gif":[`.gif`],"image/svg+xml":[`.svg`],"image/heic":[`.heic`],"image/heif":[`.heif`],"application/pdf":[`.pdf`],"text/plain":[`.txt`]},Pl={"image/png":`PNG`,"image/jpeg":`JPG`,"image/webp":`WEBP`,"image/gif":`GIF`,"image/svg+xml":`SVG`,"image/heic":`HEIC`,"image/heif":`HEIC`,"application/pdf":`PDF`,"text/plain":`text file`,"image/*":`images`,"video/*":`videos`,"audio/*":`audio`,".png":`PNG`,".jpg":`JPG`,".jpeg":`JPG`,".webp":`WEBP`,".gif":`GIF`,".svg":`SVG`,".heic":`HEIC`,".heif":`HEIC`,".pdf":`PDF`,".txt":`text file`},Fl=e=>String(e||``).split(`,`).map(e=>e.trim().toLowerCase()).filter(Boolean),Il=[`.png`,`.jpg`,`.jpeg`,`.webp`,`.gif`,`.svg`,`.bmp`,`.avif`,`.heic`,`.heif`];function Ll(e){if(!e)return!1;let t=typeof e==`object`&&e.type?String(e.type).toLowerCase():``;if(t)return t.startsWith(`image/`);let n=typeof e==`string`?e:e.name||e.url||``,r=String(n).toLowerCase();return Il.some(e=>r.endsWith(e))}var Rl=[`KB`,`MB`,`GB`];function zl(e){if(e<1024)return`${e} B`;let t=e/1024,n=0;for(;t>=1024&&n<Rl.length-1;)t/=1024,n+=1;return`${t.toFixed(1)} ${Rl[n]}`}function Bl(e){if(!e)return!1;let t=typeof e==`object`&&e.type?String(e.type).toLowerCase():``;if(t)return t===`application/pdf`;let n=typeof e==`string`?e:e.name||e.url||``;return String(n).toLowerCase().replace(/[?#][\s\S]*$/,``).endsWith(`.pdf`)}function Vl(e){let t=Fl(e);return t.length?t.every(e=>e.startsWith(`.`)?Il.includes(e):e===`image/*`||e.startsWith(`image/`)):!1}function Hl(e){let t=[];for(let n of Fl(e)){let e=Pl[n]||(n.startsWith(`.`)?n.slice(1).toUpperCase():n.toUpperCase());t.includes(e)||t.push(e)}return t.length<=1?t[0]||`supported`:`${t.slice(0,-1).join(`, `)} or ${t[t.length-1]}`}function Ul(e,t){let n=Fl(t);if(!n.length)return!0;let r=(e.type||``).toLowerCase(),i=(e.name||``).toLowerCase();return n.some(e=>e.startsWith(`.`)?i.endsWith(e):e.endsWith(`/*`)?r.startsWith(e.slice(0,-1)):r&&r===e?!0:!r&&(Nl[e]||[]).some(e=>i.endsWith(e)))}function Wl(e,t={}){if(!e)return null;let n=t.accept===void 0?jl:t.accept,r=t.maxSizeMb===void 0?5:t.maxSizeMb;if(!Ul(e,n)){let e=Hl(n),t=Fl(n).map(e=>[`images`,`videos`,`audio`].includes(Pl[e]??``));return t.every(Boolean)?`Choose ${e}.`:t.some(Boolean)?`Choose ${e.endsWith(` file`)?`${e}s`:`${e} files`}.`:`Choose a ${e.endsWith(` file`)?e:`${e} file`}.`}return r!==null&&r>0&&e.size>r*1024*1024?`Keep the file under ${r} MB.`:null}function Gl(e,t){let n=Array.from(e||[]),r=t.multiple?n:n.slice(0,1),i=[],a=[];for(let e of r){let n=Wl(e,{accept:t.accept,maxSizeMb:t.maxSizeMb});n?a.push({file:e,message:n}):i.push(e)}return{files:i,rejections:a}}function Kl(e,t){let{overClass:n,isDisabled:r=()=>!1,onFiles:i,onReject:a,...o}=t,s=0,c=t=>e.classList.toggle(n,t),l=e=>{e.preventDefault(),r()||(s+=1,c(!0))},u=e=>{e.preventDefault(),r()||c(!0)},d=e=>{e.preventDefault(),r()||(s=Math.max(0,s-1),s===0&&c(!1))},f=e=>{if(e.preventDefault(),s=0,c(!1),r())return;let{files:t,rejections:n}=Gl(e.dataTransfer?.files,o);t.length&&i(t);let l=n[0];l&&a(l)};return e.addEventListener(`dragenter`,l),e.addEventListener(`dragover`,u),e.addEventListener(`dragleave`,d),e.addEventListener(`drop`,f),()=>{e.removeEventListener(`dragenter`,l),e.removeEventListener(`dragover`,u),e.removeEventListener(`dragleave`,d),e.removeEventListener(`drop`,f)}}var ql=/[0-9]/,Jl={9:ql,A:/[A-Za-z]/,"*":/[0-9A-Za-z]/},Yl=/[9A*]/,Xl=new Set([`text`,`tel`,`search`,`url`,`password`]),Zl=e=>{let t=e.replace(/\D/g,``);return t.length===12&&t.startsWith(`91`)?t.slice(2):t.length===11&&t.startsWith(`0`)?t.slice(1):e},Ql=e=>{let t=Number(e.slice(0,2)),n=Number(e.slice(2,4)),r=Number(e.slice(4,8));if(r<1)return!1;let i=new Date(Date.UTC(r,n-1,t));return i.getUTCFullYear()===r&&i.getUTCMonth()===n-1&&i.getUTCDate()===t},$l=e=>e.length<=3?e:`${e.slice(0,-3).replace(/\B(?=(\d{2})+(?!\d))/g,`,`)},${e.slice(-3)}`,eu=e=>{let t=/^(\d{4})-(\d{2})-(\d{2})$/.exec(e.trim());return t?`${t[3]}-${t[2]}-${t[1]}`:e};function tu(e,{upper:t=!1,normalize:n,valid:r,post:i=e=>e,message:a=`Enter the full value`}={}){let o=[...e].map(e=>{let t=Jl[e];return t?{re:t}:{lit:e}}),s=o.filter(e=>e.re).length;return{inputMode:o.every(e=>!e.re||e.re===ql)?`numeric`:`text`,normalize:n,post:i,message:a,extract(e){let n=``,r=0;for(let i of e){for(;r<o.length&&o[r]?.lit!==void 0&&o[r]?.lit!==i;)r++;if(r>=o.length)break;let e=o[r];e?.lit===void 0?e?.re.test(i)&&(n+=t?i.toUpperCase():i,r++):r++}return n},layout(e){let t=``,n=[],r=0;for(let i=0;i<o.length&&r<e.length;i++){let a=o[i];a?.lit===void 0?(t+=e.charAt(r++),n.push(!0)):(t+=a.lit,n.push(!1))}return{text:t,isRaw:n}},isValid:e=>e.length===s&&(!r||r(e))}}function nu(){return{inputMode:`decimal`,post:e=>e,message:`Enter a valid amount`,extract(e){let t=``,n=!1,r=0;for(let i of e)ql.test(i)?n?r<2&&(t+=i,r++):t+=i:i===`.`&&!n&&(n=!0,t+=i);return t.startsWith(`.`)&&(t=`0${t}`),t.replace(/^0+(?=\d)/,``)},layout(e){let[t=``,n]=e.split(`.`),r=$l(t)+(e.includes(`.`)?`.${n}`:``);return{text:r,isRaw:[...r].map(e=>e!==`,`)}},isValid:e=>/^\d+(\.\d{1,2})?$/.test(e)}}var ru={"phone-in":()=>tu(`99999 99999`,{normalize:Zl,valid:e=>/^[6-9]/.test(e),message:`Enter a 10-digit mobile number`}),pan:()=>tu(`AAAAA9999A`,{upper:!0,valid:e=>/^[A-Z]{5}\d{4}[A-Z]$/.test(e),message:`Enter a valid PAN`}),gstin:()=>tu(`99AAAAA9999A***`,{upper:!0,valid:e=>/^\d{2}[A-Z]{5}\d{4}[A-Z][1-9A-Z]Z[0-9A-Z]$/.test(e),message:`Enter a valid GSTIN`}),aadhaar:()=>tu(`9999 9999 9999`,{valid:e=>/^[2-9]/.test(e),message:`Enter a valid 12-digit Aadhaar number`}),ifsc:()=>tu(`AAAA*******`,{upper:!0,valid:e=>/^[A-Z]{4}0[A-Z0-9]{6}$/.test(e),message:`Enter a valid IFSC`}),"pin-code":()=>tu(`999999`,{valid:e=>/^[1-9]/.test(e),message:`Enter a valid 6-digit PIN code`}),date:()=>tu(`99-99-9999`,{normalize:eu,valid:Ql,post:(e,t)=>e.length===8&&Ql(e)?`${e.slice(4)}-${e.slice(2,4)}-${e.slice(0,2)}`:t,message:`Enter a valid date as DD-MM-YYYY`}),amount:nu},iu=Object.keys(ru),au=e=>{let t=String(e).toLowerCase();return Object.hasOwn(ru,t)?t:void 0},ou=e=>Yl.test(String(e))&&au(e)===void 0,su=new Map;function cu(e){if(e==null||e===``)return null;let t=String(e),n=su.get(t);return n===void 0&&(n=ou(t)?tu(t):Object.hasOwn(ru,t)?ru[t]?.()??null:null,su.set(t,n)),n}var lu=(e,t)=>e.normalize?e.normalize(t):t;function uu(e,t){let n=cu(e);return n?n.extract(lu(n,String(t??``))):String(t??``)}function du(e,t){let n=cu(e);if(!n)return String(t??``);let r=n.extract(lu(n,String(t??``)));return n.post(r,n.layout(r).text)}function fu(e,t){let n=cu(e);return n?n.layout(n.extract(lu(n,String(t??``)))).text:String(t??``)}var pu=(e,t)=>{if(t<=0)return 0;let n=0;for(let r=0;r<e.length;r++)if(e[r]&&++n===t)return r+1;return e.length},mu=new WeakMap,hu=e=>mu.get(e)?.(),gu=new WeakMap;function _u(e,t,n,r){let i=e.getAll(t),a=gu.get(e)??new Set;gu.set(e,a);let o=i.findIndex((e,r)=>e===n&&!a.has(`${t}\u0000${r}`));if(!(o<0)){if(a.add(`${t}\u0000${o}`),i[o]=r,i.length===1)e.set(t,r);else{e.delete(t);for(let n of i)e.append(t,n)}}}function vu(e){let t=null,n=null,r=!1,i=(t,n)=>{n===null?e.removeAttribute(t):n!==void 0&&e.setAttribute(t,n)},a,o,s=()=>{t?.remove(),t=null,n&&(n.hidden=!1),n=null,r&&e.classList.remove(`error`),r=!1,i(`aria-invalid`,a),i(`aria-describedby`,o),a=void 0,o=void 0};return i=>{if(!i){s();return}let c=e.closest(`.field`),l=c instanceof HTMLElement?c:null,u=l?.querySelector(`.field-error`);if(!(u&&u!==t&&u.textContent?.trim())){if(!t){if(r=!e.classList.contains(`error`),e.classList.add(`error`),a=e.getAttribute(`aria-invalid`),o=e.getAttribute(`aria-describedby`),l){t=document.createElement(`div`),t.className=`field-error`,e.id&&(t.id=`${e.id}-error`);let r=l.querySelector(`.field-hint`);n=r instanceof HTMLElement?r:null,n&&(n.hidden=!0),l.insertBefore(t,[...l.children].find(e=>e.classList.contains(`field-count`))??null),t.id&&e.setAttribute(`aria-describedby`,t.id)}e.setAttribute(`aria-invalid`,`true`)}t&&(t.textContent=i)}}}function yu(e,{mask:t,postFormatted:n=!1,onChange:r,onInvalidChange:i}={}){let a=cu(t);if(!a||!Xl.has(e.type))return()=>{};let o=Object.getPrototypeOf(e),s=Object.getOwnPropertyDescriptor(o,`value`);if(!s?.set)throw Error(`input value setter missing`);let c=s.set,l=!e.hasAttribute(`inputmode`);l&&e.setAttribute(`inputmode`,a.inputMode);let u=i??vu(e),d=null,f=!1,p=!1,m=!1,h=``,g=``,_,v=()=>{let e=m?h:``;e!==g&&(g=e,u(g))},y=(t,n,i)=>{let o=a.extract(t.slice(0,n)).length,s=a.extract(t),{text:l,isRaw:u}=a.layout(s);if(e.value!==l&&(c.call(e,l),document.activeElement===e&&Xl.has(e.type))){let t=pu(u,o);e.setSelectionRange(t,t)}e.dataset.maskRaw=s,h=s&&!a.isValid(s)?a.message:``,e.setCustomValidity(h),v(),i&&s!==d&&r?.(s,l),d=s},b=Object.getOwnPropertyDescriptor(e,`value`),x=b??s;Object.defineProperty(e,"value",{configurable:!0,...x.enumerable===void 0?{}:{enumerable:x.enumerable},get:()=>N(x.get,`input value getter missing`).call(e),set:t=>{if(N(x.set,`input value setter missing`).call(e,t),p)return;let n=lu(a,e.value);y(n,n.length,!0)}});let S=()=>{f=!0,e.dispatchEvent(new Event(`input`,{bubbles:!0})),f=!1},C=t=>{let n=t instanceof InputEvent?t:null;if(f||p||n?.isComposing)return;let r=n?.inputType===`insertText`&&(n.data?.length??0)<=1||n?.inputType?.startsWith(`delete`)?e.value:lu(a,e.value);y(r,e.selectionStart??r.length,!0)},w=()=>{p=!0},T=()=>{p=!1;let t=lu(a,e.value);y(t,e.selectionStart??t.length,!0),S()},E=t=>{let n=t.inputType===`deleteContentBackward`;if(!n&&t.inputType!==`deleteContentForward`||t.isComposing)return;let r=e.selectionStart;if(r==null||r!==e.selectionEnd)return;let{isRaw:i}=a.layout(a.extract(e.value)),o=n?r-1:r;for(;o>=0&&o<i.length&&!i[o];)o+=n?-1:1;o!==(n?r-1:r)&&(t.preventDefault(),o<0||o>=i.length||(y(e.value.slice(0,o)+e.value.slice(o+1),n?o:r,!0),S()))},D=t=>{if(e.readOnly||e.disabled)return;let n=t.clipboardData?.getData(`text`);if(n==null)return;t.preventDefault();let r=lu(a,n),i=e.selectionStart??e.value.length,o=e.selectionEnd??i;y(e.value.slice(0,i)+r+e.value.slice(o),i+r.length,!0),S()},ee=()=>{let t=a.extract(e.value);return a.post(t,a.layout(t).text)},O=()=>{m=!0,v()};e.addEventListener(`input`,C),e.addEventListener(`beforeinput`,E),e.addEventListener(`paste`,D),e.addEventListener(`compositionstart`,w),e.addEventListener(`compositionend`,T),e.addEventListener(`blur`,O),e.addEventListener(`invalid`,O);let te=e.form,ne=t=>{e.name&&!e.disabled&&_u(t.formData,e.name,e.value,ee())},re=()=>{clearTimeout(_),_=setTimeout(()=>{m=!1,y(lu(a,e.value),e.value.length,!0)},0)};n||(te?.addEventListener(`formdata`,ne),mu.set(e,ee)),te?.addEventListener(`reset`,re),te?.addEventListener(`submit`,O);let ie=lu(a,e.value);return y(ie,ie.length,!1),()=>{clearTimeout(_),e.removeEventListener(`input`,C),e.removeEventListener(`beforeinput`,E),e.removeEventListener(`paste`,D),e.removeEventListener(`compositionstart`,w),e.removeEventListener(`compositionend`,T),e.removeEventListener(`blur`,O),e.removeEventListener(`invalid`,O),te?.removeEventListener(`formdata`,ne),te?.removeEventListener(`reset`,re),te?.removeEventListener(`submit`,O),mu.delete(e),b?Object.defineProperty(e,"value",b):Reflect.deleteProperty(e,`value`),m=!1,h=``,v(),e.setCustomValidity(``),delete e.dataset.maskRaw,l&&e.removeAttribute(`inputmode`)}}function bu(){let e=typeof window>`u`?void 0:window.jQuery?.validator?.prototype;if(!e||e.wuiMaskHook)return;let t=e.elementValue;e.elementValue=function(e){let n=hu(e);return n===void 0?t.call(this,e):n},e.wuiMaskHook=!0}var xu=new WeakMap,Su,Cu=e=>{xu.has(e)||xu.set(e,yu(e,{mask:e.dataset.appMask,postFormatted:e.hasAttribute(`data-mask-post-formatted`)}))},wu=e=>[...e.querySelectorAll(`input[data-app-mask]`)].filter(e=>e instanceof HTMLInputElement),Tu=e=>e instanceof Element?[...e instanceof HTMLInputElement&&e.matches(`input[data-app-mask]`)?[e]:[],...wu(e)]:[];function Eu(){Su||typeof MutationObserver>`u`||(Su=new MutationObserver(e=>{for(let t of e){for(let e of t.removedNodes)for(let t of Tu(e))xu.get(t)?.(),xu.delete(t);for(let e of t.addedNodes)for(let t of Tu(e))Cu(t)}}),Su.observe(document.documentElement,{childList:!0,subtree:!0}))}function Du(e=document){bu();for(let t of wu(e))Cu(t);e===document&&Eu()}var Ou=`data-wui-bulk-in-bar`,ku=`[data-wui-page-header-bar][data-wui-bulk-for]`,Au=new WeakSet;function ju(e){return`${$t(e,{decimals:0})} selected`}function Mu(e){let t=e.dataset.wuiBulkFor;return t===void 0?null:document.getElementById(t)}function Nu(e){return typeof e==`object`&&!!e&&`selected`in e&&typeof e.selected==`number`}function Pu(e,t){return[...e.querySelectorAll(t)].flatMap(e=>e instanceof HTMLElement?[e]:[])}function Fu(e,t){for(let n of Pu(e,`[data-wui-bar-swap]`))n.hidden=t>0;let n=e.querySelector(`[data-wui-bar-bulk]`);if(!n)return;if(!(n instanceof HTMLElement))throw Error(`The bulk slot is not an HTML element.`);n.hidden=t===0;let r=n.querySelector(`.page-header-bar-bulk-count`);if(!(r instanceof HTMLElement))throw Error(`The bulk slot has no count element.`);r.textContent=t>0?ju(t):``}function Iu(e=document){for(let t of Pu(e,ku))Mu(t)?.setAttribute(Ou,``);Au.has(document)||(Au.add(document),document.addEventListener(`selectionchange`,e=>{if(!(e instanceof CustomEvent)||!Nu(e.detail))return;let t=e.target;if(t!==null&&!(t instanceof Node))throw Error(`The selection changed on a target that is not a node.`);for(let n of Pu(document,ku))Mu(n)?.contains(t)&&Fu(n,e.detail.selected)}))}var Lu={minLength:10,uppercase:!0,lowercase:!0,digit:!0,special:!0,uniqueChars:0,customRules:[]},Ru=`Password requirements`;function zu(e){return e===!0||e==null?{...Lu}:{...Lu,...e}}function Bu(e){let t=zu(e),n=[];if(t.minLength>0&&n.push({key:`length`,label:`At least ${t.minLength} characters long`,test:e=>e.length>=t.minLength}),t.uppercase&&n.push({key:`uppercase`,label:`At least one uppercase letter`,test:e=>/[A-Z]/.test(e)}),t.lowercase&&n.push({key:`lowercase`,label:`At least one lowercase letter`,test:e=>/[a-z]/.test(e)}),t.digit&&n.push({key:`digit`,label:`At least one digit`,test:e=>/[0-9]/.test(e)}),t.special&&n.push({key:`special`,label:`At least one special character`,test:e=>/[^A-Za-z0-9]/.test(e)}),t.uniqueChars>0){let e=t.uniqueChars;n.push({key:`unique`,label:`At least ${e} unique character${e>1?`s`:``}`,test:t=>new Set(t).size>=e})}for(let[e,r]of(t.customRules??[]).entries()){let t=new RegExp(r.pattern);n.push({key:`custom-${e}`,label:r.label,test:e=>t.test(e)})}return n}function Vu(e,t){let n=e==null?``:String(e);return Bu(t).map(e=>({key:e.key,label:e.label,met:e.test(n)}))}function Hu(e,t){return Vu(e,t).every(e=>e.met)}var Uu=`wui:row-drop`,Wu=`is-drop-over`,Gu=`application/x-wui-rows`,Ku=`wui-row-dragging`,qu=`[data-wui-drop-target]`,Ju=`tbody tr[data-row-key]`,Yu=`input, button, a, select, textarea, label`,Xu=`.wui-select-cell .wui-check`,Zu=new WeakMap,Qu=new WeakSet,$u=null,ed=null;function td(e){let t=e.querySelector(Xu);return t instanceof HTMLInputElement&&t.checked}function nd(e){let t=[];for(let n of e.querySelectorAll(`tbody tr`))n instanceof HTMLElement&&td(n)&&t.push(n.dataset.rowKey);return t}function rd(e,t){return P(e,t)}function id(e,t){let n=rd(e,t);return n instanceof HTMLElement?n:null}function ad(e){let t=e.textContent;if(t===null)throw Error(`A drop target has no text content.`);return t.trim()}var od=e=>typeof e==`object`&&!!e&&`selected`in e&&typeof e.selected==`number`;function sd(){$u=null,document.body.classList.remove(Ku);for(let e of document.querySelectorAll(`${qu}.${Wu}`))e.classList.remove(Wu)}function cd(e,t,n){e.dispatchEvent(new CustomEvent(Uu,{bubbles:!0,detail:{keys:t,target:n.dataset.wuiDropTarget}}))}function ld(e){let t=id(e.target,qu);if(!t||!$u)return;e.preventDefault();let n=N(e.dataTransfer,`A drag event arrived without its DataTransfer.`);n.dropEffect=`move`,t.classList.add(Wu)}function ud(e){let t=id(e.target,qu);!t||e.relatedTarget instanceof Node&&t.contains(e.relatedTarget)||t.classList.remove(Wu)}function dd(e){let t=id(e.target,qu);if(!t||!$u)return;e.preventDefault(),t.classList.remove(Wu);let{root:n,keys:r}=$u;cd(n,r,t),sd()}function fd(e){let t=id(e.target,qu);t&&ed?.keys.length&&(e.preventDefault(),cd(ed.root,ed.keys,t))}function pd(e){($n(e)||e.key===` `)&&fd(e)}function md(e){Qu.has(e)||(Qu.add(e),e.addEventListener(`dragover`,ld),e.addEventListener(`dragenter`,ld),e.addEventListener(`dragleave`,ud),e.addEventListener(`drop`,dd),e.addEventListener(`click`,fd),e.addEventListener(`keydown`,pd))}function hd(e){let t=Zu.get(e);if(t)return t;md(e.ownerDocument||e);let n=t=>{let n=id(t.target,Ju);if(!n||!e.contains(n))return;let r=rd(t.target,Yu);r&&n.contains(r)||(n.draggable=!0)},r=t=>{let n=id(t.target,Ju);if(!n||!e.contains(n))return;let r=td(n)?nd(e):[n.dataset.rowKey],i=N(t.dataTransfer,`A drag event arrived without its DataTransfer.`);i.setData(Gu,JSON.stringify(r)),i.setData(`text/plain`,r.join(`,`)),i.effectAllowed=`move`,$u={root:e,keys:r},document.body.classList.add(Ku)},i=t=>{let n=t instanceof CustomEvent?t.detail:void 0;if(od(n)){let{keys:t}=n;n.selected>0?ed={root:e,keys:Array.isArray(t)?t:nd(e)}:n.selected===0&&(ed=null)}gd(document)};e.addEventListener(`pointerdown`,n),e.addEventListener(`dragstart`,r),e.addEventListener(`dragend`,sd),e.addEventListener(`selectionchange`,i);let a=()=>{e.removeEventListener(`pointerdown`,n),e.removeEventListener(`dragstart`,r),e.removeEventListener(`dragend`,sd),e.removeEventListener(`selectionchange`,i),Zu.delete(e)};return Zu.set(e,a),a}function gd(e=document){let t=e.querySelector(`[data-wui-row-drag] tbody tr ${Xu}:checked`)!==null;for(let n of e.querySelectorAll(qu)){n.tagName!==`BUTTON`&&(n.setAttribute(`role`,`button`),n.setAttribute(`tabindex`,`0`)),t?n.removeAttribute(`aria-disabled`):n.setAttribute(`aria-disabled`,`true`);let e=n.getAttribute(`data-wui-drop-label`)||ad(n);n.setAttribute(`aria-label`,`Move to ${e}`)}for(let t of e.querySelectorAll(`.wui-drop-tray`))t.hasAttribute(`role`)||(t.setAttribute(`role`,`toolbar`),t.setAttribute(`aria-label`,`Move to`))}function _d(e=document){for(let t of e.querySelectorAll(`[data-wui-row-drag]`))t instanceof HTMLElement&&hd(t);gd(e.ownerDocument||e)}var vd=`.table-wrap, .table-responsive, [class*="table-responsive-"]`,yd=1;function bd(e){let t=()=>{let t=e.scrollWidth-e.clientWidth,n=Math.abs(e.scrollLeft);e.toggleAttribute(`data-wui-overflow-start`,t>yd&&n>yd),e.toggleAttribute(`data-wui-overflow-end`,t>yd&&n<t-yd),e.toggleAttribute(`data-wui-overflow-top`,e.scrollTop>yd)},n=()=>{if(e.scrollWidth-e.clientWidth>yd){let t=getComputedStyle(e);e.style.setProperty(`--wui-scroll-pad-start`,t.paddingInlineStart),e.style.setProperty(`--wui-scroll-pad-end`,t.paddingInlineEnd)}else e.style.getPropertyValue(`--wui-scroll-pad-end`)&&(e.style.removeProperty(`--wui-scroll-pad-start`),e.style.removeProperty(`--wui-scroll-pad-end`))},r=()=>{n(),t()};e.addEventListener(`scroll`,t,{passive:!0});let i=null;if(typeof ResizeObserver<`u`){i=new ResizeObserver(r),i.observe(e);for(let t of e.children)i.observe(t)}return r(),()=>{e.removeEventListener(`scroll`,t),i?.disconnect(),e.removeAttribute(`data-wui-overflow-start`),e.removeAttribute(`data-wui-overflow-end`),e.removeAttribute(`data-wui-overflow-top`),e.style.getPropertyValue(`--wui-scroll-pad-end`)&&(e.style.removeProperty(`--wui-scroll-pad-start`),e.style.removeProperty(`--wui-scroll-pad-end`))}}var xd=new WeakMap,Sd,Cd=e=>{xd.has(e)||xd.set(e,bd(e))},wd=e=>{if(!(e instanceof HTMLElement))return[];let t=e.matches(`.table-wrap, .table-responsive, [class*="table-responsive-"]`)?[e]:[];if(e.firstElementChild===null)return t;let n=[...e.querySelectorAll(vd)].filter(e=>e instanceof HTMLElement);return[...t,...n]};function Td(){Sd||typeof MutationObserver>`u`||(Sd=new MutationObserver(e=>{for(let t of e){for(let e of t.removedNodes)for(let t of wd(e))xd.get(t)?.(),xd.delete(t);for(let e of t.addedNodes)for(let t of wd(e))Cd(t)}}),Sd.observe(document.documentElement,{childList:!0,subtree:!0}))}function Ed(e=document){for(let t of e.querySelectorAll(vd))t instanceof HTMLElement&&Cd(t);e===document&&Td()}var Dd=Object.freeze([`page`,`pageSize`,`sortBy`,`sortOrder`,`search`]),Od=`search`,kd=Object.freeze({loading:`Loading rows`,error:`These rows did not load. Try again.`,network:`The connection dropped before the rows loaded. Check it and try again.`,forbidden:`You do not have access to these rows.`,retry:`Retry`,actionFailed:`That did not work. Try again.`,actionForbidden:`You do not have permission to do that.`,empty:`No rows`}),Ad=5,jd=e=>e instanceof HTMLInputElement||e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement||e instanceof HTMLButtonElement||e instanceof HTMLFieldSetElement||e instanceof HTMLObjectElement||e instanceof HTMLOutputElement,Md=e=>e instanceof HTMLObjectElement||e instanceof HTMLOutputElement?!1:e.disabled,Nd=e=>jd(e)&&`type`in e&&e.type===`hidden`,X=(e,t,n)=>[...e.querySelectorAll(t)].filter(e=>e instanceof n),Z=(e,t,n)=>{let r=e.querySelector(t);return r instanceof n?r:null},Pd=(e,t,n)=>{let r=e.closest(t);return r instanceof n?r:null},Fd=e=>e.localName===`wui-select`,Id=new WeakMap,Ld=(e,t)=>{let n=Number(e);return Number.isInteger(n)?n:t},Rd=e=>({total:Ld(e.dataset.total,0),totalCapped:e.dataset.totalCapped===`true`,page:Ld(e.dataset.page,1),pageSize:Ld(e.dataset.pageSize,0),sortBy:e.dataset.sortBy||``,sortOrder:e.dataset.sortOrder===`desc`?`desc`:`asc`}),zd=(e,t)=>{e&&Qd().toast(e,{variant:t})},Bd=(e,t)=>{if(!e)return;let n=new Set([...e.elements].filter(e=>!Nd(e)||e.hasAttribute(`data-range-mirror`)).map(e=>e.getAttribute(`name`)).filter(e=>e&&!Dd.includes(e))),r=[...t].some(([e,t])=>t!==``&&n.has(e));for(let t of X(e,`[data-wui-filter-clear]`,HTMLElement))t.hidden=!r},Vd=new Intl.NumberFormat(`en-IN`),Hd=(e,t)=>t?`${Vd.format(e)}+`:Vd.format(e),Ud=(e,t,n)=>{let r=e.closest(`.wui-list-card`),i=r?Z(r,`.wui-list-card-count`,HTMLElement):null;i&&(i.textContent=Hd(t,n))};function Wd(e=document){let t=X(e,`[data-wui-server]`,HTMLElement);e instanceof HTMLElement&&e.matches(`[data-wui-server]`)&&t.unshift(e);for(let e of t){if(Id.has(e))continue;let t=Kd(e);Id.set(e,t),e.hasAttribute(`data-load-first-page`)&&t.reload()}}function Gd(e){let t=e instanceof Element?Pd(e,`[data-wui-server]`,HTMLElement):null;return t&&Id.get(t)||null}function Kd(e){let t=Z(e,`.table-wrap`,HTMLElement),n=t?Z(t,`:scope > table`,HTMLTableElement):null,r=e.dataset.src;if(!t||!n||!r)throw Error(`A server-paged table needs data-src and a .table-wrap > table: render it with <app-data-table src>.`);let i=Z(t,`:scope > [data-wui-table-state]`,HTMLElement),a=Z(e,`[data-wui-table-pager]`,HTMLElement),o=Z(e,`[data-wui-table-status]`,HTMLElement),s={urlState:e.dataset.urlState!==`false`,refreshOnSuccess:e.dataset.refreshOnSuccess!==`false`,filtersForm:e.dataset.filtersForm||null,filtersRegion:e.dataset.filtersRegion||null,searchInput:e.dataset.searchInput||null,loadingText:e.dataset.loadingText||kd.loading,errorText:e.dataset.errorText||kd.error},c=new URL(r,window.location.href),l=new Set(c.searchParams.keys()),u=n.hasAttribute(`data-app-datatable-selectable`),d=new Set,f=!1,p=Sa(),m=new AbortController,h={signal:m.signal},g=N(Z(n,`:scope > tbody[data-wui-rows]`,HTMLTableSectionElement),`A server-paged table needs its rows in <app-table-rows> (tbody[data-wui-rows]).`),_=Rd(g),v=null,y=null,b=e=>{let t=new URLSearchParams;for(let[n,r]of new URLSearchParams(e))l.has(n)||t.append(n,r);return t},x=e=>b(new URL(e,window.location.href).search),S=e=>{let t=e.toString();return`${window.location.pathname}${t?`?${t}`:``}${window.location.hash}`},C=e=>{let t=new URL(c.href);for(let[n,r]of e)l.has(n)||t.searchParams.append(n,r);return t.origin===window.location.origin?`${t.pathname}${t.search}`:t.href},w=(e,t)=>{let n=new URLSearchParams(e);return n.has(`page`)&&n.set(`page`,String(t.page)),n.has(`pageSize`)&&n.set(`pageSize`,String(t.pageSize)),n.has(`sortBy`)?t.sortBy?(n.set(`sortBy`,t.sortBy),n.set(`sortOrder`,t.sortOrder)):(n.delete(`sortBy`),n.delete(`sortOrder`)):n.delete(`sortOrder`),n},T=w(s.urlState?b(window.location.search):new URLSearchParams,_);s.urlState&&S(T)!==`${window.location.pathname}${window.location.search}${window.location.hash}`&&window.history.replaceState(window.history.state,``,S(T));let E=(e,n)=>t.dispatchEvent(new CustomEvent(e,{bubbles:!0,detail:n})),D=e=>{o&&(o.textContent=e)},ee=e=>{if(e.total===0)return kd.empty;let t=e.pageSize>0?Math.max(1,Math.ceil(e.total/e.pageSize)):1,n=e.totalCapped?Hd(e.total,!0):`${e.total}`;return`Page ${e.page} of ${t}, ${n} ${e.total===1?`row`:`rows`}`},O=()=>X(n,`:scope > thead > tr:first-child > th`,HTMLTableCellElement),te=e=>{if(u&&X(e,`:scope > tr:not(.wui-group-row, .wui-virtual-spacer)`,HTMLTableRowElement).some(e=>!e.dataset.rowKey))throw Error(`A selectable server-paged table needs data-row-key on every row, so a selection can span pages.`)},ne=t=>{let n=e.dataset.activeRowKey;if(n!==void 0)for(let e of t){let t=e.classList.contains(`wui-row-active`),r=n!==``&&e.dataset.rowKey===n;e.classList.toggle(`wui-row-active`,r),r?e.setAttribute(`aria-current`,`true`):t&&e.removeAttribute(`aria-current`)}},re=e=>{if(u){Cc(e);for(let t of e){let e=Z(t,`.${Y} .wui-check:not(:disabled)`,HTMLInputElement);e&&(f&&d.add(t.dataset.rowKey),e.checked=d.has(t.dataset.rowKey))}Tc(n)}ne(e);let t=O();if(n.classList.contains(`wui-table-stack`))for(let n of e)[...n.cells].forEach((e,n)=>{let r=t[n]?.textContent?.trim();r&&!e.hasAttribute(`data-label`)&&e.setAttribute(`data-label`,r)});t.forEach((t,n)=>{if(t.classList.contains(`wui-col-hidden`))for(let t of e)t.cells[n]?.classList.add(`wui-col-hidden`)})},ie=e=>re(X(e,`:scope > tr`,HTMLTableRowElement)),ae=e=>{for(let t of e.querySelectorAll(`:scope > template[data-wui-pager], :scope > template[data-wui-empty], :scope > template[data-wui-filters]`))t.remove()},oe=e=>e?.dispatchEvent(new CustomEvent(`wui:teardown`,{bubbles:!0})),se=(e,t)=>{if(!i)return;let n=Z(e,`:scope > template[data-wui-empty]`,HTMLTemplateElement);oe(i),t.total===0&&n?(i.replaceChildren(n.content.cloneNode(!0)),i.hidden=!1):(i.replaceChildren(),i.hidden=!0)},ce=e=>{let r=Rd(e),i=r.sortBy!==_.sortBy||r.sortOrder!==_.sortOrder?Vn(g.rows):null;if(a){let t=Z(e,`:scope > template[data-wui-pager]`,HTMLTemplateElement);oe(a),a.replaceChildren(...t?[t.content.cloneNode(!0)]:[]),a.hidden=!1}se(e,r);let o=Z(e,`:scope > template[data-wui-filters]`,HTMLTemplateElement),c=s.filtersRegion&&o?Z(document,s.filtersRegion,HTMLElement):null;c&&o&&(oe(c),c.replaceChildren(o.content.cloneNode(!0))),ae(e),oe(g),n.replaceChild(e,g),g=e;let l=f&&r.total!==_.total;return _=r,l&&(f=!1),t.removeAttribute(`data-wui-table-error`),ie(e),ve(),Hn(e.rows,i),l&&be(),c},le=e=>{let t=document.createElement(`template`);t.innerHTML=`<table>${e}</table>`;let n=Z(t.content,`tbody[data-wui-rows]`,HTMLTableSectionElement);return n&&te(n),n?document.importNode(n,!0):null},ue=(e,t=O())=>{let n=document.createElement(`tr`);for(let r=0;r<e;r++){let e=t[r],i=e?.classList.contains(`text-center`),a=!i&&(e?.classList.contains(`num`)||e?.classList.contains(`text-end`)||e?.classList.contains(`wui-cell-end`)),o=document.createElement(`td`);i?o.classList.add(`text-center`):a&&o.classList.add(e?.classList.contains(`num`)?`num`:`wui-cell-end`);let s=document.createElement(`span`);s.className=`skeleton`,s.setAttribute(`aria-hidden`,`true`);let c=i?44:a?56:60;s.style.cssText=`display:block;width:${c}%;height:12px;border-radius:6px`,o.append(s),n.append(o)}return n},de=()=>{if(g.querySelector(`:scope > tr:not([data-wui-skeleton])`))return;let e=Math.max(1,O().length);g.replaceChildren(...Array.from({length:Ad},()=>{let t=ue(e);return t.setAttribute(`data-wui-skeleton`,``),t})),t.removeAttribute(`data-wui-table-error`),i&&(i.hidden=!0)},fe=e=>{e?(t.setAttribute(`aria-busy`,`true`),de()):t.removeAttribute(`aria-busy`)},pe=e=>e===`forbidden`?kd.forbidden:e===`network`?kd.network:s.errorText,me=e=>{let n=pe(e);if(t.setAttribute(`data-wui-table-error`,e),a&&(a.hidden=!0),i){let t=document.createElement(`div`);t.className=`empty-state wui-empty-state-table wui-table-error`,t.setAttribute(`role`,`alert`);let r=document.createElement(`span`);r.className=`empty-state-icon`,r.innerHTML=U(e===`forbidden`?`lock`:`alert-circle`,{size:24});let a=document.createElement(`div`);a.className=`empty-state-title`,a.textContent=n;let o=document.createElement(`div`);o.className=`empty-state-action`;let s=document.createElement(`button`);s.type=`button`,s.className=Ws(`primary`,`outline`,`sm`),s.dataset.wui=Bs,s.setAttribute(`data-wui-table-retry`,``),s.textContent=kd.retry,o.append(s),t.append(r,a,o),oe(i),i.replaceChildren(t),i.hidden=!1}D(n)},he=()=>s.filtersForm?Z(document,s.filtersForm,HTMLFormElement):null,k=async(n,r=`none`,{quiet:i=!1}={})=>{let a=new URLSearchParams(n);i||(v={query:a,mode:r},fe(!0),D(s.loadingText)),E(`wui:table:loading`,{query:a.toString()});let o=await p.run(C(a));if(o.kind===`aborted`||o.kind===`stale`||o.kind===`session`)return o;i||fe(!1);let c=null;if(o.ok)try{c=le(o.html)}catch(e){H(e)}if(!o.ok||!c){let e=o.ok?`server`:o.kind;return i?Ar(`A quiet server table refresh failed; the rows on screen are kept.`,e):me(e),E(`wui:table:error`,{status:o.status,kind:e,message:pe(e)}),o}let l=ce(c);return T=w(a,_),Bd(he(),T),s.urlState&&r===`push`?window.history.pushState(window.history.state,``,S(T)):s.urlState&&r===`replace`&&window.history.replaceState(window.history.state,``,S(T)),i||D(ee(_)),Qd().refresh(t),l&&Qd().refresh(l),Ud(e,_.total,_.totalCapped),E(`wui:table:loaded`,{..._,query:T.toString()}),o},ge=e=>(e.delete(`page`),e),_e=()=>X(n,`:scope > thead th[data-sort-key]`,HTMLTableCellElement),ve=()=>{for(let e of _e()){let t=e.dataset.sortKey===_.sortBy;e.setAttribute(`aria-sort`,t?_.sortOrder===`desc`?`descending`:`ascending`:`none`)}};for(let e of _e())if(e.classList.add(`sortable`),e.tabIndex=0,!e.querySelector(`.sort-icon`)){let t=e.classList.contains(`num`)||e.classList.contains(`text-end`),n=document.createElement(`span`);n.className=t?`sort-icon wui-sort-lead`:`sort-icon`,n.innerHTML=U(`chevrons-up-down`,{size:14}),t?e.prepend(n):e.append(n)}let ye=e=>{let t=ge(new URLSearchParams(T)),n=_.sortBy===e&&_.sortOrder===`asc`?`desc`:`asc`;return t.set(`sortBy`,e),t.set(`sortOrder`,n),k(t,`push`)};n.addEventListener(`click`,e=>{let t=e.target instanceof Element?Pd(e.target,`th[data-sort-key]`,HTMLTableCellElement):null;t&&n.tHead?.contains(t)&&ye(t.dataset.sortKey??``)}),n.addEventListener(`keydown`,e=>{if(e.key!==`Enter`&&e.key!==` `)return;let t=e.target instanceof Element?Pd(e.target,`th[data-sort-key]`,HTMLTableCellElement):null;t&&n.tHead?.contains(t)&&(e.preventDefault(),ye(t.dataset.sortKey??``))});let be=()=>{Tc(n);let e=f?{selected:_.total,total:_.total,allMatching:f}:{selected:d.size,total:_.total};n.dispatchEvent(new CustomEvent(`selectionchange`,{bubbles:!0,detail:e}))};u&&(Dc(n,(e,t)=>{for(let n of e){let e=Pd(n,`tr`,HTMLTableRowElement)?.dataset.rowKey;e&&(t?d.add(e):d.delete(e))}t||(f=!1)}),n.addEventListener(`change`,e=>{let t=e.target;if(t instanceof HTMLInputElement&&t.matches(`.wui-select-cell .wui-check:not(:disabled)`)){if(t.checked||(f=!1),n.tHead?.contains(t))for(let e of X(g,`:scope > tr`,HTMLTableRowElement)){let n=Z(e,`.${Y} .wui-check:not(:disabled)`,HTMLInputElement);n&&(n.checked=t.checked,t.checked?d.add(e.dataset.rowKey):d.delete(e.dataset.rowKey))}else{let e=Pd(t,`tr`,HTMLTableRowElement)?.dataset.rowKey;if(!e)return;t.checked?d.add(e):d.delete(e)}be()}})),a&&(a.addEventListener(`click`,e=>{let t=e.target instanceof Element?Pd(e.target,`a[href]`,HTMLAnchorElement):null;!t||e.defaultPrevented||e.button!==0||e.ctrlKey||e.metaKey||e.shiftKey||e.altKey||(e.preventDefault(),k(x(t.getAttribute(`href`)??``),`push`))}),a.addEventListener(`change`,e=>{let t=e.target;t instanceof HTMLSelectElement&&t.classList.contains(`tpg-select`)&&t.value&&(e.stopPropagation(),k(x(t.value),`push`))}));let xe=()=>{if(!s.searchInput)return null;let e=Z(document,s.searchInput,HTMLElement);return e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement?e:e?Z(e,`input`,HTMLInputElement):null},Se=()=>e.isConnected?!0:(m.abort(),clearTimeout(y??void 0),!1),Ce=(e,t)=>{let n=[...e.elements].filter(jd),r=new Set;for(let e of n)e.name&&!Nd(e)&&r.add(e.name);let i=[];for(let e of n)if(e.name&&!Md(e)){if(e instanceof HTMLInputElement&&e.matches(`input[type="hidden"][data-wui-carried]`))r.has(e.name)||i.push([e.name,e.value]);else if(e instanceof HTMLInputElement&&e.matches(`input[type=checkbox], input[type=radio]`))e.checked&&i.push([e.name,e.value]);else if(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement)e.matches(`[type=submit], [type=button], [type=reset], [type=image], [type=file]`)||i.push([e.name,e.value]);else if(e instanceof HTMLSelectElement)for(let t of e.selectedOptions)i.push([e.name,t.value])}return(t instanceof HTMLButtonElement||t instanceof HTMLInputElement)&&t.name&&!t.disabled&&i.push([t.name,t.value]),i},A=(e,t)=>{let n=new Set([...e.elements].filter(jd).map(e=>e.name).filter(Boolean)),r=new URLSearchParams,i=e=>e!==`search`&&Dd.includes(e);for(let[e,t]of T)e!==`page`&&(i(e)||!n.has(e))&&r.append(e,t);for(let[n,a]of Ce(e,t))a===``||i(n)||l.has(n)||r.append(n,a);let a=xe();if(a){r.delete(Od);let e=a.value.trim();e&&r.set(Od,e)}return k(r,`push`)},j=e=>s.filtersForm&&e.closest?.(s.filtersForm)||s.filtersRegion&&e.closest?.(s.filtersRegion)||null;document.addEventListener(`submit`,e=>{Se()&&s.filtersForm&&e.target instanceof HTMLFormElement&&e.target.matches(s.filtersForm)&&(e.preventDefault(),A(e.target,e.submitter))},h),document.addEventListener(`change`,e=>{if(!Se()||!s.filtersForm||!(e.target instanceof Element))return;let t=Pd(e.target,s.filtersForm,HTMLFormElement);!t||e.target===xe()||t.hasAttribute(`data-wui-apply-on-change`)||e.target.closest(`wui-filter-popover`)||A(t)},h);let M=(e,t)=>{if(!e)return;let n=e=>t.get(e)??``;for(let r of X(e,`input[name]:not([type=hidden])`,HTMLInputElement))if(r.type===`checkbox`)r.checked=t.getAll(r.name).includes(r.value);else if(r.type===`radio`){let e=n(r.name)===r.value;if(r.checked===e)continue;r.checked=e,e&&r.dispatchEvent(new Event(`change`))}else r.value!==n(r.name)&&(r.value=n(r.name),r.dispatchEvent(new Event(`input`,{bubbles:!0})));for(let r of X(e,`select[name]`,HTMLSelectElement))if(!r.multiple)r.value=n(r.name);else for(let e of r.options)e.selected=t.getAll(r.name).includes(e.value);for(let r of[...e.querySelectorAll(`wui-select[name]`)].filter(Fd)){let e=r.getAttribute(`name`)??``;r.value=r.mode===`multiple`||r.mode===`tag`?t.getAll(e):n(e)}for(let t of e.querySelectorAll(`wui-date-range`)){let e=t.getAttribute(`start-name`)||t.getAttribute(`name`),r=t.getAttribute(`end-name`);t.value={start:e?n(e):``,end:r?n(r):``}}};document.addEventListener(`click`,e=>{if(!Se())return;let t=e.target instanceof Element?Pd(e.target,`a[href]`,HTMLAnchorElement):null;if(!t||!j(t)||e.defaultPrevented||e.button!==0||e.ctrlKey||e.metaKey||e.shiftKey||e.altKey)return;let n=new URL(t.getAttribute(`href`)??``,window.location.href);if(n.origin!==window.location.origin||n.pathname!==window.location.pathname)return;e.preventDefault();let r=ge(x(n.href));M(t.closest(`form`),r),Bd(t.closest(`form`),r),k(r,`push`)},h),document.addEventListener(`input`,e=>{if(!Se())return;let t=xe();t&&e.target===t&&(clearTimeout(y??void 0),y=setTimeout(()=>{if(!Se())return;let e=ge(new URLSearchParams(T)),n=t.value.trim();n?e.set(Od,n):e.delete(Od),e.toString()!==T.toString()&&k(e,`replace`)},300))},h),s.urlState&&window.addEventListener(`popstate`,()=>{if(!Se())return;let e=b(window.location.search),t=xe();t&&(t.value=e.get(`search`)??``),Bd(he(),e),k(e,`none`)},h),document.addEventListener(`wui:modal:success`,()=>{Se()&&s.refreshOnSuccess&&k(T,`none`)},h),i?.addEventListener(`click`,e=>{e.target instanceof Element&&e.target.closest(`[data-wui-table-retry]`)&&v&&k(v.query,v.mode)});let we=e=>[...g.rows].find(t=>t.dataset.rowKey===e)??null,Te=e=>{if(!e?.trim())return null;let t=document.createElement(`template`);if(t.innerHTML=`<table><tbody>${e}</tbody></table>`,t.content.querySelector(`tbody[data-wui-rows]`))return null;let n=X(t.content,`table > tbody > tr[data-row-key]`,HTMLTableRowElement);return n.length?n.map(e=>document.importNode(e,!0)):null},Ee=(e,n,r)=>{let i=r?e[0]:e.find(e=>e.dataset.rowKey===n.dataset.rowKey);if(!i)return null;let a=[];for(let t of e){let e=t===i?n:we(t.dataset.rowKey);e&&(oe(e),e.replaceWith(t),a.push(t))}return re(a),Qd().refresh(t),i},De=e=>e.message||(e.kind===`forbidden`?kd.actionForbidden:kd.actionFailed),Oe=e=>{e?.isConnected&&e.getAttribute(`data-wui-save-state`)===`saving`&&Yn(e,null)},ke=e=>{if(e instanceof HTMLTableRowElement)return e;let t=document.createElement(`template`);t.innerHTML=`<table><tbody>${String(e)}</tbody></table>`;let n=Z(t.content,`table > tbody > tr`,HTMLTableRowElement);return document.importNode(N(n,"saveRow's `row` is the row as it will read: a <tr> element or its HTML."),!0)},Ae=async({url:e,method:n=`POST`,body:r,key:a,row:o}={})=>{if(!e)throw Error("saveRow needs `url`: the handler that saves the row.");let s=a==null,c=s?null:we(String(a));if(!s&&!c)throw Error(`saveRow found no row with data-row-key="${a}" on this page.`);let l=O().filter(e=>!e.classList.contains(Y)),u=o?ke(o):c??ue(Math.max(1,l.length),l);c&&u!==c?c.replaceWith(u):c||g.insertBefore(u,g.firstChild),u!==c&&re([u]),i&&!t.hasAttribute(`data-wui-table-error`)&&(i.hidden=!0),Yn(u,`saving`);let d=Jn(u),f=await xa(e,{method:n.toUpperCase(),body:r});if(f.kind===`session`)return!1;if(f.ok){let e=Te(f.html),t=e&&u.isConnected?Ee(e,u,s):null;return t?D(L.saved(Jn(t)||d)):(await k(T,`none`),Oe(u)),$d(f,f.toastVariant||`success`),E(`wui:table:saved`,{key:t?.dataset.rowKey??(s?null:String(a)),added:s,status:f.status}),!0}let p=De(f),m=u;return c&&u!==c&&u.isConnected?(u.replaceWith(c),m=c):s&&!o&&(u.remove(),m=null,i?.childElementCount&&!g.querySelector(`:scope > tr`)&&(i.hidden=!1)),m?.isConnected&&Yn(m,`error`,p),f.kind!==`aborted`&&zd(p,`danger`),D(L.notSaved(d,p)),E(`wui:table:failed`,{key:s?null:String(a),added:s,status:f.status,kind:f.kind,message:p}),!1},je=async e=>{let t=e.dataset.url;if(!t)throw Error(`A data-wui-row-action button needs data-url: the handler the action posts to.`);let n=Pd(e,`tr`,HTMLTableRowElement),r=n?.dataset.rowKey??null,i=e.dataset.wuiRowAction||``,a=n?Jn(n):``;e.disabled=!0,e.setAttribute(`aria-busy`,`true`),n&&Yn(n,`saving`);let o=await xa(t,{method:(e.dataset.method||`post`).toUpperCase()});if(e.disabled=!1,e.removeAttribute(`aria-busy`),o.kind===`session`||o.kind===`aborted`)Oe(n);else{if(o.ok){$d(o,o.toastVariant||`success`);let e=n?.isConnected?Te(o.html):null,t=e&&n?Ee(e,n,!1):null;t?D(L.saved(Jn(t)||a)):(await k(T,`none`),Oe(n))}else{let e=De(o);zd(e,`danger`),n?.isConnected&&Yn(n,`error`,e),D(L.notSaved(a,e))}E(`wui:table:action`,{action:i,key:r,ok:o.ok,status:o.status})}};return n.addEventListener(`click`,e=>{let t=e.target instanceof Element?Pd(e.target,`[data-wui-row-action]`,HTMLButtonElement):null;t&&g.contains(t)&&!t.disabled&&(e.preventDefault(),je(t))}),te(g),ae(g),u&&wc(n),ie(g),ve(),{el:e,reload:async e=>{let n=e?.quiet===!0;return n&&t.getAttribute(`aria-busy`)===`true`?null:k(T,`none`,{quiet:n})},query:()=>new URLSearchParams(T),setQuery:e=>{let t=new URLSearchParams(T);for(let[n,r]of Object.entries(e??{})){t.delete(n);for(let e of Array.isArray(r)?r:[r])e!=null&&e!==``&&t.append(n,String(e))}return e&&`page`in e||t.delete(`page`),k(t,`push`)},saveRow:Ae,setActiveRow:t=>{e.dataset.activeRowKey=t==null?``:String(t),ne(X(g,`:scope > tr`,HTMLTableRowElement))},selection:{keys:()=>[...d],count:()=>f?_.total:d.size,allMatching:()=>f,selectAllMatching:()=>{f=!0;for(let e of X(g,`:scope > tr`,HTMLTableRowElement)){let t=Z(e,`.${Y} .wui-check`,HTMLInputElement);t?.disabled||(t&&(t.checked=!0),e.dataset.rowKey&&d.add(e.dataset.rowKey))}be()},clear:()=>{f=!1,d.clear();for(let e of X(g,`:scope > tr > .${Y} .wui-check:not(:disabled)`,HTMLInputElement))e.checked=!1;be()}}}}var qd=8e3,Jd=`That did not work. Try again.`,Yd=[`success`,`info`,`warning`,`danger`],Xd=e=>Yd.some(t=>t===e);function Zd(e){if(!Xd(e))throw RangeError(`Unknown toast variant "${e}".`);return e}function Qd(){return N(window.WUI,`window.WUI is not defined: the Razor behaviour script did not load on this page.`)}function $d(e,t=`success`){if(!e?.message)return;let n=e.toastAction;n?Qd().toast(e.message,{variant:Zd(t),duration:qd,action:{label:n.label,onClick:()=>ef(n)}}):Qd().toast(e.message,{variant:Zd(t)})}async function ef(e){let t=await xa(e.url,{method:e.method});if(t.kind!==`session`&&t.kind!==`aborted`){if(t.ok){$d(t,t.toastVariant||`success`);for(let e of document.querySelectorAll(`[data-wui-server]`))e instanceof HTMLElement&&e.dataset.refreshOnSuccess!==`false`&&Gd(e)?.reload()}else Qd().toast(t.message||Jd,{variant:`danger`})}}var tf=`wui-remote-modal`,nf=`wui-remote-drawer`,rf=Object.freeze({sm:360,md:480,lg:640,xl:720}),af=`wui-modal-fullscreen`,of=Object.freeze({sm:380,md:440,lg:640,xl:880}),sf=Object.freeze({loading:`Loading`,close:`Close`,retry:`Try again`,errorTitle:`This could not be loaded`,forbidden:`You do not have access to this.`,client:`It may have been moved or deleted.`,server:`Something went wrong on our side. Try again in a moment.`,network:`Could not reach the server. Check your connection and try again.`,submitFailed:`Your changes were not saved.`,invalid:`Some fields need attention.`}),cf=`a[href],button:not([disabled]),input:not([disabled]):not([type="hidden"]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex="-1"])`,lf=`input:not([type="hidden"]):not([disabled]),select:not([disabled]),textarea:not([disabled]),[contenteditable="true"]`,uf=`[aria-invalid="true"], .is-invalid, .input-validation-error`,df=`invalid`,ff=`.wui-error-summary, [data-wui-form-errors], .validation-summary-errors, [data-valmsg-summary]`,pf=`[data-wui-modal-content]`,mf=`[data-wui-pane-close], [data-wui-dismiss]`,hf=`<button type="button" class="wui-modal-close" data-wui-dismiss aria-label="Close"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M18 6 6 18M6 6l12 12"></path></svg></button>`,gf=new WeakMap,_f=new WeakSet;function vf(e,t){if(e==null)throw TypeError(`The remote modal needs ${t}, and the page does not have it.`);return e}var Q=(e,t)=>{let n=e.querySelector(t);return n instanceof HTMLElement?n:null},yf=(e,t,n)=>vf(Q(e,t),n),bf=(e,t)=>[...e.querySelectorAll(t)].filter(e=>e instanceof HTMLElement),xf=()=>Object.assign(Error(`The remote modal load was aborted.`),{name:`AbortError`}),Sf=e=>typeof e==`object`&&!!e&&`name`in e&&e.name===`AbortError`,Cf=(e,t)=>{let n=e instanceof Element?e.closest(t):null;return n instanceof HTMLElement?n:null},wf=e=>{let t=document.createElement(`span`);return t.textContent=e??``,t.innerHTML},Tf=e=>Object.hasOwn(of,e),Ef=e=>Object.hasOwn(rf,e);function Df(e){if(e==null||e===``)return null;if(e===`fullscreen`)return{fullscreen:!0};if(Tf(e))return{px:of[e]};let t=typeof e==`number`?e:/^\d+$/.test(String(e))?Number(e):NaN;if(Number.isInteger(t)&&t>0)return{px:t};throw TypeError(`Unsupported modal size "${String(e)}". Use sm, md, lg, xl, fullscreen or a px number.`)}var Of=e=>{if(e.classList.contains(`wui-modal-fullscreen`))return{fullscreen:!0};let t=Number.parseInt(e.style.getPropertyValue(`--wui-modal-max-width`),10);return{px:t>0?t:of.md}},kf=(e,t)=>{e.classList.toggle(af,!!t.fullscreen),t.fullscreen?e.style.removeProperty(`--wui-modal-max-width`):e.style.setProperty(`--wui-modal-max-width`,`${t.px}px`)},Af=[`center`,`top`];function jf(e){if(e==null||e===``)return null;if(Ef(e))return{px:rf[e]};let t=typeof e==`number`?e:/^\d+$/.test(String(e))?Number(e):NaN;if(Number.isInteger(t)&&t>0)return{px:t};throw TypeError(`Unsupported drawer size "${String(e)}". Use sm, md, lg, xl or a px number.`)}var Mf=e=>e.container===`drawer`,Nf=e=>e.container===`pane`,Pf=e=>e.container!==`modal`,Ff=(e,t)=>Mf(e)?jf(t):Df(t),If=e=>{let t=typeof e==`string`?document.querySelector(e):e,n=t instanceof HTMLElement?t:null;return n?.matches(`[data-wui-pane-host]`)?n:null},Lf=e=>Nf(e)?e.shell:yf(e.shell,`.modal-dialog`,`a dialog frame`);function Rf(e=`modal`){let t=e===`drawer`,n=t?nf:tf,r=document.getElementById(n);if(r)return r;let i=document.createElement(`wui-modal`);i.id=n,i.setAttribute(`data-wui`,`AppModal`);let a=document.createElement(`dialog`);return a.className=t?`modal wui-modal-shell wui-remote-drawer`:`modal wui-modal-shell`,a.style.setProperty(`--wui-modal-max-width`,`${t?rf.md:of.md}px`),a.innerHTML=t?`<div class="modal-dialog wui-remote-drawer-dialog"><div class="modal-content wui-modal"></div></div>`:`<div class="modal-dialog modal-dialog-centered wui-rb-dialog"><div class="modal-content wui-modal"></div></div>`,i.append(a),document.body.appendChild(i),i}var zf=e=>`<div class="wui-modal-header"><div class="wui-modal-heading"><div class="wui-modal-headtext"><div class="wui-modal-title">${wf(e)}</div></div></div>${hf}</div>`,Bf=e=>`<div class="modal-content wui-modal" aria-busy="true">${zf(e)}<div class="wui-modal-body"><div class="wui-modal-loading" role="status"><span class="visually-hidden">${wf(sf.loading)}</span><div class="skeleton wui-modal-skeleton"></div><div class="skeleton wui-modal-skeleton"></div><div class="skeleton wui-modal-skeleton wui-modal-skeleton--short"></div></div></div></div>`,Vf=(e,t)=>`<div class="modal-content wui-modal" data-wui-modal-error="${wf(t)}">${zf(e)}<div class="wui-modal-body"><div class="wui-modal-state" role="alert"><p class="wui-modal-state-title">${wf(sf.errorTitle)}</p><p class="wui-modal-state-text">${wf(sf[t]||sf.server)}</p><div class="wui-modal-state-actions"><button type="button" class="${Ws(`primary`,`soft`,`md`)}" data-wui-dismiss data-wui="${Bs}">${wf(sf.close)}</button><button type="button" class="${Ws(`primary`,`solid`,`md`)}" data-wui-modal-retry data-wui="${Bs}">${wf(sf.retry)}</button></div></div></div></div>`,Hf=e=>{let t=document.createElement(`template`);return t.innerHTML=e,yf(t.content,`.modal-content`,`a card`)},Uf=e=>Q(e.shell,`.modal-content`);function Wf(e){e&&e.dispatchEvent(new CustomEvent(`wui:teardown`,{bubbles:!0}))}function Gf(e,t){let n=Uf(e),r=n?qf(n):new Map;Wf(n),n?n.replaceWith(t):Lf(e).appendChild(t),Jf(t,r),Qd().refresh()}var Kf=`input[type="file"][name]`;function qf(e){let t=new Map;for(let n of e.querySelectorAll(Kf)){if(!(n instanceof HTMLInputElement))continue;let e=n.files;e&&e.length>0&&t.set(n.name,[...e])}return t}function Jf(e,t){if(t.size!==0&&typeof DataTransfer<`u`)for(let n of e.querySelectorAll(Kf)){if(!(n instanceof HTMLInputElement))continue;let e=t.get(n.name);if(!e)continue;let r=new DataTransfer;for(let t of e)r.items.add(t);n.files=r.files,n.dispatchEvent(new Event(`change`,{bubbles:!0}))}}var Yf=e=>Nf(e)?!e.shell.hidden:e.host.hasAttribute(`open`);function Xf(e,t,n=!1){let r=t?Q(e,uf):null,i=r?r.matches(cf)?r:Q(r,cf)||r:null;if(!i&&n)i=Q(e,`[data-autofocus]`)||Q(e,lf)||Q(e,`.wui-modal-close`);else if(!i){let t=bf(e,cf);i=Q(e,`[data-autofocus]`)||t.find(e=>!e.classList.contains(`wui-modal-close`))||t[0]||e}r?i?.focus?.():i?.focus?.({preventScroll:!0})}function Zf(e,t){let n=Q(e.shell,`[data-wui-modal-live]`);n||(n=document.createElement(`div`),n.className=`visually-hidden`,n.setAttribute(`aria-live`,`assertive`),n.setAttribute(`data-wui-modal-live`,``),Lf(e).appendChild(n)),n.textContent=``,n.textContent=t}var Qf=e=>{let t=Q(e.shell,`[data-wui-modal-live]`);t&&(t.textContent=``)},$f=(e,t,n)=>{e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:n}))};function ep(e,t,n,r){let i={...r,container:e.container};$f(t,`wui:modal:${n}`,i),Mf(e)&&$f(t,`wui:drawer:${n}`,i),Nf(e)&&$f(t,`wui:pane:${n}`,i)}var tp=e=>e.matches(`[data-wui-pane-host]`)?`pane`:yf(e,`dialog`,`a dialog`).classList.contains(`wui-remote-drawer`)?`drawer`:`modal`,np=e=>vf(e.host.closest(`wui-modal`),`a wui-modal host`);function rp(e){let t=gf.get(e);if(t)return t;let n=tp(e),r=n===`pane`?e:yf(e,`dialog`,`a dialog`),i={host:e,shell:r,container:n,queue:Sa(),defaultSize:Of(r),defaultLabel:r.getAttribute(`aria-label`),placeholder:Uf({shell:r})?.outerHTML||`<div class="modal-content wui-modal"></div>`,remoteUrl:e.getAttribute(`data-wui-remote-url`),cache:e.getAttribute(`data-wui-remote-cache`)===`true`,loadedUrl:null,session:null};return gf.set(e,i),e.addEventListener(`submit`,e=>Tp(i,e)),e.addEventListener(`click`,e=>{Cf(e.target,`[data-wui-modal-retry]`)&&i.session&&(e.preventDefault(),dp(i,i.session))}),Nf(i)&&e.addEventListener(`click`,t=>{let n=Cf(t.target,mf);n&&e.contains(n)&&i.session&&ap(i,i.session,`dismissed`,null)}),e.addEventListener(`wui-modal-closed`,t=>{t.target===e&&cp(i)}),e.addEventListener(`wui-modal-opened`,t=>{if(t.target!==e)return;let n=Uf(i);i.session&&n?.matches(pf)&&!n.contains(document.activeElement)&&Xf(n,!1,Pf(i))}),i.remoteUrl&&e.addEventListener(`wui-modal-open`,t=>{t.target===e&&lp(i,t)}),i}function ip(e,t,n){e.session&&(e.queue.abort(),e.session.resolveClosed({status:`dismissed`,detail:{replaced:!0}}));let r=()=>void 0,i=new Promise(e=>{r=e}),a={url:t,method:(n.method||`GET`).toUpperCase(),body:n.body,options:n,trigger:n.trigger||null,explicitSize:null,closing:null,resolveClosed:r,handle:{el:e.shell,closed:i,close:()=>ap(e,a,`dismissed`,null),reload:()=>dp(e,a)}};return e.session=a,a}function ap(e,t,n,r){e.session===t&&(t.closing={status:n,detail:r},Nf(e)?sp(e,t):op(e))}function op(e){let t=np(e);t.dispatchEvent(new CustomEvent(`wui-modal-close`,{bubbles:!0,cancelable:!0,detail:{reason:`dismiss`}}))&&t.hide()}function sp(e,t){let n=e.shell,{status:r,detail:i}=vf(t.closing,`the closing state`),a=n.contains(document.activeElement);e.queue.abort(),e.session=null,Wf(Uf(e)),n.replaceChildren(),n.hidden=!0,n.removeAttribute(`data-open`),t.resolveClosed({status:r,detail:i}),ep(e,n,`closed`,{status:r,url:t.url}),a&&t.trigger?.isConnected&&t.trigger.focus?.()}function cp(e){let t=e.session;if(e.queue.abort(),e.session=null,Qf(e),t){let n=t.closing||{status:`dismissed`,detail:null};t.resolveClosed({status:n.status,detail:n.detail}),ep(e,e.shell,`closed`,{status:n.status,url:t.url});let r=document.activeElement;t.trigger?.isConnected&&(!r||r===document.body||e.shell.contains(r))&&t.trigger.focus?.()}e.cache||(Gf(e,Hf(e.placeholder)),e.loadedUrl=null,kf(e.shell,e.defaultSize),e.defaultLabel?e.shell.setAttribute(`aria-label`,e.defaultLabel):e.shell.removeAttribute(`aria-label`))}function lp(e,t){let n=xp(t instanceof CustomEvent?t.detail:null,`trigger`),r=n instanceof HTMLElement?n:null,i=r?.getAttribute(`data-wui-url`)||e.remoteUrl||``,a=ip(e,i,{trigger:r});a.explicitSize=up(e,r?.getAttribute(`data-wui-size`)),a.explicitSize&&kf(e.shell,a.explicitSize),e.cache&&e.loadedUrl===i||(e.loadedUrl&&Gf(e,Hf(e.placeholder)),dp(e,a,{keepPlaceholder:!0}))}function up(e,t){try{return Ff(e,t)}catch(e){return H(e),null}}async function dp(e,t,{keepPlaceholder:n=!1}={}){n||Gf(e,Hf(Bf(t.options.title||fp(e))));let r=await e.queue.run(t.url,{method:t.method,body:t.body,navigate:t.options.navigate});if(e.session!==t||r.kind===`aborted`||r.kind===`stale`)return`aborted`;if(r.kind===`session`)return`session`;if(r.kind===`ok`&&gp(e,t,r.html,!1))return e.loadedUrl=t.url,ep(e,e.shell,`loaded`,{url:t.url,handle:t.handle}),`loaded`;let i=r.kind===`ok`||r.kind===`validation`?`server`:r.kind;return Gf(e,Hf(Vf(t.options.title||fp(e),i))),Yf(e)&&Xf(vf(Uf(e),`a card`),!1,Pf(e)),ep(e,e.shell,`error`,{url:t.url,kind:i,status:r.status}),`error`}var fp=e=>Uf(e)?.querySelector(`.wui-modal-title`)?.textContent||e.shell.getAttribute(`aria-label`)||``,pp=`/_content/Webority.Ui.Razor/js/`,mp=e=>new URL(e,window.location.href).pathname.includes(pp);function hp(e){if([...document.scripts].some(t=>t.getAttribute(`src`)===e))return;let t=document.createElement(`script`);t.src=e,document.head.appendChild(t)}function gp(e,t,n,r){let i=document.createElement(`template`);i.innerHTML=n;let a=!1;for(let e of i.content.querySelectorAll(`script`)){if(e.getAttribute(`type`)===`application/json`)continue;let t=e.getAttribute(`src`);e.remove(),t&&mp(t)?hp(t):a=!0}a&&Ar(`WUI.modal: ${t.url} returned a fragment with script; it was removed. Keep page behaviour in the page.`);let o=Q(i.content,pf);if(!o)return H(`WUI.modal: ${t.url} did not answer with an <app-modal-content> fragment.`),!1;if(Gf(e,o),r||Qf(e),!Nf(e)){kf(e.shell,t.explicitSize||up(e,o.getAttribute(`data-wui-size`))||e.defaultSize);let n=o.getAttribute(`data-wui-title`);n&&e.shell.setAttribute(`aria-label`,n)}return Yf(e)&&Xf(o,r,Pf(e)),!0}var _p=`button[type="submit"], button:not([type]), input[type="submit"], input[type="image"]`;function vp(e,t,n){let r=[...e.elements].filter(e=>e.matches(_p));if(n){e.setAttribute(`data-wui-submitting`,``);let n=t&&r.includes(t)?t:r[0];for(let e of r)e.toggleAttribute(`data-wui-was-disabled`,e.disabled),e.disabled=!0;n&&(n.classList.add(`is-loading`),n.setAttribute(`aria-busy`,`true`),n.tagName===`BUTTON`&&n.insertAdjacentHTML(`afterbegin`,`<span class="spinner-border spinner-border-sm me-2" aria-hidden="true" data-wui-submit-spinner></span>`))}else{e.removeAttribute(`data-wui-submitting`);for(let e of r)e.disabled=e.hasAttribute(`data-wui-was-disabled`),e.removeAttribute(`data-wui-was-disabled`),e.classList.remove(`is-loading`),e.removeAttribute(`aria-busy`),e.querySelector(`[data-wui-submit-spinner]`)?.remove()}}function yp(e){for(let t of e.querySelectorAll(ff))t.remove();for(let t of e.querySelectorAll(uf))t.removeAttribute(`aria-invalid`),t.classList.remove(`is-invalid`,`input-validation-error`);for(let t of e.querySelectorAll(`.field-error`))t.textContent=``}var bp=new Set(`bad request.unauthorized.payment required.forbidden.not found.method not allowed.not acceptable.proxy authentication required.request timeout.conflict.gone.length required.precondition failed.payload too large.uri too long.unsupported media type.range not satisfiable.expectation failed.misdirected request.unprocessable content.unprocessable entity.locked.failed dependency.too early.upgrade required.precondition required.too many requests.request header fields too large.unavailable for legal reasons`.split(`.`)),xp=(e,t)=>{if(typeof e==`object`&&e&&t in e)return Reflect.get(e,t)};async function Sp(e){if(!e||e.status<400||e.status>499||!e.headers.get(`content-type`)?.toLowerCase().includes(`json`))return null;let t;try{t=JSON.parse(await e.text())}catch{return null}let n=e=>typeof e==`string`?e.trim():``,r=n(xp(t,`title`)),i=(e.statusText||``).trim().toLowerCase(),a=bp.has(r.toLowerCase())||r.toLowerCase()===i;return n(xp(t,`message`))||n(xp(t,`detail`))||(r&&!a?r:null)}function Cp(e,t,n,r){let i=t.closest(`.wui-modal-body`)||t;i.querySelector(`[data-wui-modal-submit-error]`)?.remove(),yp(i);let a=document.createElement(`div`);a.className=`alert alert-danger wui-modal-submit-error`,a.setAttribute(`role`,`alert`),a.setAttribute(`data-wui-modal-submit-error`,``),a.innerHTML=wf(`${sf.submitFailed} ${r||sf[n]||sf.server}`),i.prepend(a),Zf(e,a.textContent)}var wp=(e,t)=>{let n=new URL(e,window.location.href);for(let[e,r]of t)typeof r==`string`&&n.searchParams.append(e,r);return n.origin===window.location.origin?n.pathname+n.search:n.href};async function Tp(e,t){let n=t.target,r=e.session;if(!(n instanceof HTMLFormElement)||!r||n.hasAttribute(`data-wui-native`)||!n.closest(pf)||(t.preventDefault(),n.hasAttribute(`data-wui-submitting`)))return;let i=`submitter`in t&&(t.submitter instanceof HTMLButtonElement||t.submitter instanceof HTMLInputElement)?t.submitter:null,a=i?.getAttribute(`formaction`)||n.getAttribute(`action`)||r.url,o=(i?.getAttribute(`formmethod`)||n.getAttribute(`method`)||`GET`).toUpperCase(),s=new FormData(n);i?.name&&!s.has(i.name)&&s.append(i.name,i.value);let c=o===`GET`;vp(n,i,!0);let l;try{l=await e.queue.run(c?wp(a,s):a,{method:o,body:c?void 0:s,navigate:r.options.navigate})}catch(t){H(t),e.session===r&&n.isConnected&&(vp(n,i,!1),Cp(e,n,`server`,null));return}if(e.session!==r)return;if(n.isConnected&&vp(n,i,!1),l.kind===`ok`&&l.result===`success`){Ep(e,r,l);return}if(l.kind===`aborted`||l.kind===`stale`||l.kind===`session`)return;if(l.kind===`ok`&&l.html){let t=l.result===df;if(gp(e,r,l.html,t)){if(t){let t=vf(Uf(e),`a card`).querySelector(ff)?.textContent?.replace(/\s+/g,` `).trim();Zf(e,t||sf.invalid)}return}}let u=l.kind===`ok`||l.kind===`validation`?`server`:l.kind,d=await Sp(l.response);e.session===r&&Cp(e,n,u,d)}function Ep(e,t,n){let r=n.message,i=n.redirect||null,a=n.toastVariant||`success`;if(!zp(a))throw TypeError(`Unknown toast variant "${a}". Use ${Rp.join(`, `)}.`);let o={url:t.url,trigger:t.trigger,handle:t.handle,message:r,redirect:i,data:n.data??null,container:e.container};i&&!t.options.navigate?cm(r,a):r&&Qd().toast(r,{variant:a}),ep(e,t.trigger?.isConnected?t.trigger:document,`success`,o),t.options.onSuccess?.(o,t.handle),i&&(t.options.navigate||(e=>window.location.assign(e)))(i);let s=n.next;s&&!i?(t.url=s,t.method=`GET`,t.body=void 0,dp(e,t)):n.keepOpen?n.html&&gp(e,t,n.html,!1):ap(e,t,`success`,o)}function Dp(e){let t=Cf(e.target,`[data-wui-modal], [data-wui-drawer], [data-wui-pane]`);t&&(t.matches(`a[href]`)&&(e.ctrlKey||e.metaKey||e.shiftKey||e.button!==0)||(e.preventDefault(),t.hasAttribute(`data-wui-pane`)?Pp(t.getAttribute(`data-wui-pane`)??``,{target:t.getAttribute(`data-wui-pane-target`),trigger:t}).catch(e=>{Sf(e)||H(e)}):t.hasAttribute(`data-wui-modal`)?Ap(t.getAttribute(`data-wui-modal`)??``,{size:t.getAttribute(`data-wui-size`)||void 0,title:t.getAttribute(`data-wui-title`)||void 0,trigger:t}).catch(e=>{Sf(e)||H(e)}):Mp(t.getAttribute(`data-wui-drawer`)??``,{size:t.getAttribute(`data-wui-drawer-size`)||void 0,title:t.getAttribute(`data-wui-title`)||void 0,trigger:t}).catch(e=>{Sf(e)||H(e)})))}function Op(e){if(e.key!==`Escape`||e.defaultPrevented)return;let t=Cf(e.target,Np),n=t&&gf.get(t),r=e.currentTarget;n?.session&&r instanceof Document&&!r.querySelector(`wui-modal[open]`)&&(e.preventDefault(),ap(n,n.session,`dismissed`,null))}function kp(e=document){let t=e instanceof Document?e:vf(e.ownerDocument,`an owner document`);_f.has(t)||(_f.add(t),t.addEventListener(`click`,Dp),t.addEventListener(`keydown`,Op));let n=bf(e,`wui-modal[data-wui-remote-url]`);e instanceof HTMLElement&&e.matches(`wui-modal[data-wui-remote-url]`)&&n.unshift(e);for(let e of n)rp(e)}function Ap(e,t={}){try{if(!e)throw TypeError(`WUI.modal.load: a fragment url is required.`);let n=t.container===`drawer`,r=n?jf(t.size):Df(t.size),i=t.placement||`center`;if(!Af.includes(i))throw TypeError(`WUI.modal.load: unsupported placement "${i}". Use center or top.`);if(t.signal?.aborted)return Promise.reject(xf());let a=Rf(n?`drawer`:`modal`);kp(document);let o=rp(a),s=Yf(o),c=ip(o,e,t);if(c.explicitSize=r,kf(o.shell,r||o.defaultSize),n||yf(o.shell,`.modal-dialog`,`a dialog frame`).classList.toggle(`modal-dialog-centered`,i===`center`),t.title&&o.shell.setAttribute(`aria-label`,t.title),!s){let e=t.staticBackdrop!==!1;a.toggleAttribute(`static`,e),a.toggleAttribute(`no-escape`,e)}let l=s?Promise.resolve():new Promise(e=>a.addEventListener(`wui-modal-opened`,()=>e(),{once:!0})),u=dp(o,c);return s||np(o).show(),jp(o,c,t,l,u,`WUI.modal.load`)}catch(e){return Promise.reject(e)}}function jp(e,t,n,r,i,a){let o=new Promise((r,i)=>{n.signal?.addEventListener(`abort`,()=>{e.session===t&&(e.queue.abort(),ap(e,t,`dismissed`,{aborted:!0})),i(xf())},{once:!0})}),s=Promise.all([r,i]).then(([,e])=>{if(e===`aborted`)throw xf();if(e===`session`)throw Error(`${a}(${t.url}): the session expired; the browser is signing in again.`);return t.handle});return Promise.race([s,o])}function Mp(e,t={}){return Ap(e,{...t,container:`drawer`,placement:void 0})}var Np=`[data-wui-pane-host]`;function Pp(e,t={}){try{if(!e)throw TypeError(`WUI.pane.load: a fragment url is required.`);let n=If(t.target);if(!n)throw TypeError(`WUI.pane.load: the target is not an <app-detail-pane>.`);if(t.signal?.aborted)return Promise.reject(xf());kp(document);let r=rp(n),i=ip(r,e,t);n.hidden=!1,n.setAttribute(`data-open`,``);let a=dp(r,i);return jp(r,i,t,Promise.resolve(),a,`WUI.pane.load`)}catch(e){return Promise.reject(e)}}function Fp(e){let t=If(e);if(!t)throw TypeError(`WUI.pane.close: the target is not an <app-detail-pane>.`);let n=gf.get(t);n?.session&&ap(n,n.session,`dismissed`,null)}var Ip=`wuiConfirm`,Lp=Object.freeze([`danger`]),Rp=Object.freeze([`success`,`info`,`warning`,`danger`]),zp=e=>Rp.some(t=>t===e),Bp=`wui.flash`,Vp=Object.freeze({confirmTitle:`Are you sure?`,confirmLabel:`Confirm`,cancelLabel:`Cancel`,failed:`That did not work. Try again.`,forbidden:`You do not have permission to do that.`,network:`Could not reach the server. Check your connection and try again.`}),Hp=new WeakSet,Up=new WeakSet,Wp=null,Gp=null,Kp=!1,qp=e=>{let t=document.createElement(`span`);return t.textContent=e??``,t.innerHTML},Jp=(e,t)=>{e&&Qd().toast(e,{variant:t})};function Yp(){let e=document.getElementById(Ip);if(e)return N(e.closest(`wui-modal`),`#${Ip} must be a wui-modal.`);let t=document.createElement(`wui-modal`);t.id=Ip;let n=document.createElement(`dialog`);return n.className=`modal wui-modal-shell`,n.style.setProperty(`--wui-modal-max-width`,`${of.md}px`),n.innerHTML=`<div class="modal-dialog modal-dialog-centered wui-rb-dialog"><div class="modal-content wui-modal wui-confirm"><div class="wui-modal-body"><div class="wui-confirm-content"><span class="wui-confirm-icon"><wui-status-icon tone="info" size="120"></wui-status-icon></span><h3 class="wui-confirm-title" tabindex="-1" data-autofocus></h3><p class="wui-confirm-msg"></p></div></div><div class="wui-modal-footer"><div class="wui-confirm-actions"><button type="button" class="${Ws(`primary`,`soft`,`md`)}" data-wui-dismiss data-wui="${Bs}">${qp(Vp.cancelLabel)}</button><button type="button" class="${Ws(`primary`,`solid`,`md`)}" data-app-confirm data-wui="${Bs}"></button></div></div></div></div>`,t.append(n),document.body.appendChild(t),t}function Xp(e,t){let n=e.getAttribute(`data-wui-confirm-tone`);if(n!==null&&!Lp.includes(n))throw TypeError(`data-wui-confirm-tone="${n}" is not supported. Use danger, or leave it off.`);Zp({title:e.getAttribute(`data-wui-confirm-title`),message:e.getAttribute(`data-wui-confirm`),label:e.getAttribute(`data-wui-confirm-label`),danger:n===`danger`},t)}function Zp({title:e,message:t,label:n,danger:r},i){let a=Yp(),o=a.querySelector(`.wui-confirm-title`),s=a.querySelector(`[data-app-confirm]`);if(!o||!s)throw Error(`#${Ip} is not a confirm dialog with a confirm button. Render <app-confirm-dialog id="${Ip}"> without confirm-href, or leave the dialog to the library.`);let c=a.querySelector(`.wui-confirm-msg`);c||(c=document.createElement(`p`),c.className=`wui-confirm-msg`,o.after(c));let l=e||Vp.confirmTitle;o.textContent=l,c.textContent=t,s.textContent=n||Vp.confirmLabel,s.classList.toggle(`btn-danger`,r),s.classList.toggle(`btn-primary`,!r),a.querySelector(`wui-status-icon`)?.setAttribute(`tone`,r?`delete`:`info`),N(a.querySelector(`dialog`),`#${Ip} has no <dialog>.`).setAttribute(`aria-label`,l),Gp=i,Kp=!1,a.show()}var Qp=(e,t)=>{Wp=e;try{t()}finally{Wp=null}},$p=(e,t)=>{let n=Reflect.get(e,t);if(n===void 0||typeof n==`string`)return n;throw TypeError(`confirmAction: ${t} must be text.`)},em=e=>{if(typeof e!=`object`||!e)throw TypeError(`confirmAction: options must be an object with a message.`);let t=`message`in e?e.message:void 0;if(typeof t!=`string`)throw TypeError(`confirmAction: message must be text.`);return{title:$p(e,`title`),message:t,label:$p(e,`label`),tone:$p(e,`tone`)}};function tm(e,t,n){let{title:r,message:i,label:a,tone:o}=em(t);if(o!=null&&!Lp.includes(o))throw TypeError(`confirmAction: tone "${o}" is not supported. Use danger, or leave it off.`);xm(e.ownerDocument),Zp({title:r,message:i,label:a,danger:o===`danger`},()=>Qp(e,n))}var nm=e=>`disabled`in e&&e.disabled===!0||e.getAttribute(`aria-disabled`)===`true`,rm=e=>{je(e,HTMLElement,`data-wui-confirm needs an HTML element to click.`).click()};function im(e){let t=P(e.target,`[data-wui-confirm]:not(form)`);t&&t!==Wp&&!nm(t)&&(e.preventDefault(),e.stopImmediatePropagation(),Xp(t,()=>Qp(t,()=>rm(t))))}function am(e){let t=e.target;if(!(t instanceof HTMLFormElement)||!t.hasAttribute(`data-wui-confirm`)||t===Wp||e.submitter&&e.submitter===Wp||t.querySelector(`input[data-app-repeater-hidden]`))return;e.preventDefault(),e.stopImmediatePropagation();let n=e.submitter instanceof HTMLButtonElement||e.submitter instanceof HTMLInputElement?e.submitter:null,r=n?.form===t?n:void 0;Xp(t,()=>Qp(t,()=>t.requestSubmit(r)))}function om(e){let t=P(e.target,`#${Ip} [data-app-confirm]`);t&&!t.hasAttribute(`disabled`)&&Gp&&(Kp=!0,N(t.closest(`wui-modal`),`#${Ip} is missing around its confirm button.`).hide())}function sm(e){if(!(e.target instanceof Element)||e.target.id!==`wuiConfirm`)return;let t=Kp?Gp:null;Gp=null,Kp=!1,t?.()}function cm(e,t){e&&window.sessionStorage.setItem(Bp,JSON.stringify({message:e,variant:t}))}var lm=e=>e===`forbidden`?Vp.forbidden:e===`network`?Vp.network:Vp.failed;function um(){for(let e of document.querySelectorAll(`[data-wui-server]`))e.getAttribute(`data-refresh-on-success`)!==`false`&&Gd(e)?.reload()}var dm=(e,t)=>{`disabled`in e&&(e.disabled=t)};async function fm(e){let t=e.getAttribute(`data-wui-post`);if(!t)throw Error(`A data-wui-post button needs the URL the action posts to.`);return pm(t,e)}async function pm(e,t,n){let r=t.getAttribute(`data-wui-post-reload`);if(r!==null&&r!==`page`)throw TypeError(`data-wui-post-reload="${r}" is not supported. Use page, or leave it off to reload the server tables.`);dm(t,!0),t.setAttribute(`aria-busy`,`true`);let i=await xa(e,{method:`POST`,body:n});if(i.kind===`session`||i.kind===`aborted`)return;let a=i.toastVariant||`success`;i.ok&&(i.redirect||r===`page`)?(cm(i.message,a),i.redirect?window.location.assign(i.redirect):window.location.reload()):(dm(t,!1),t.removeAttribute(`aria-busy`),i.ok?($d(i,a),um()):Jp(i.message||lm(i.kind),`danger`))}function mm(e,t){dm(e,!1),e.removeAttribute(`aria-busy`),H(t),Jp(Vp.failed,`danger`)}function hm(e){let t=P(e.target,`[data-wui-post]`);t&&(e.preventDefault(),nm(t)||t.getAttribute(`aria-busy`)===`true`||fm(t).catch(e=>mm(t,e)))}function gm(e){let t=P(e.target,`form[data-wui-post-form]`);if(!(t instanceof HTMLFormElement)||e.defaultPrevented)return;e.preventDefault();let n=N(e.submitter||t.querySelector(`button:not(.repeater-add):not(.repeater-remove)`),`A data-wui-post-form needs a submit button to report its result on.`);if(n.getAttribute(`aria-busy`)===`true`)return;let r=new URL(N(t.getAttribute(`action`),`A data-wui-post-form needs an action attribute to post to.`),document.baseURI).href;pm(r,n,new FormData(t)).catch(e=>mm(n,e)),t.closest(`wui-dropdown`)?.hide()}function _m(){let e=window.sessionStorage.getItem(Bp);if(!e)return;window.sessionStorage.removeItem(Bp);let t=JSON.parse(e);if(typeof t!=`object`||!t)throw TypeError(`stored flash is not an object.`);let n=`message`in t?t.message:void 0,r=`variant`in t?t.variant:void 0;if(typeof r!=`string`||!zp(r))throw TypeError(`stored flash variant "${String(r)}" is not supported.`);if(typeof n!=`string`)throw TypeError(`stored flash message is not text.`);Jp(n,r)}function vm(e){let t=e.querySelectorAll?[...e.querySelectorAll(`[data-wui-flash]`)]:[];e instanceof Element&&e.matches(`[data-wui-flash]`)&&t.unshift(e);for(let e of t){let t=e.getAttribute(`data-wui-flash-variant`)||`success`;if(!zp(t))throw TypeError(`data-wui-flash-variant="${t}" is not supported. Use ${Rp.join(`, `)}.`);let n=e.getAttribute(`data-wui-flash`)||(e.textContent??``).trim();e.remove(),Jp(n,t)}}var ym=e=>e instanceof HTMLInputElement||e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement?e.form:null;function bm(e){if(!(e.target instanceof Element))return;let t=e.target.closest(`[data-wui-auto-submit]`);if(!t)return;let n=ym(e.target)||t.closest(`form`);n instanceof HTMLFormElement&&n.requestSubmit()}function xm(e){Up.has(e)||(Up.add(e),e.addEventListener(`click`,om),e.addEventListener(`wui-modal-closed`,sm))}function Sm(e=document){let t=e instanceof Element?e.ownerDocument:e;Hp.has(t)||(Hp.add(t),t.addEventListener(`click`,im,!0),t.addEventListener(`submit`,am,!0),xm(t),t.addEventListener(`click`,hm),t.addEventListener(`submit`,gm),t.addEventListener(`change`,bm),_m()),vm(e)}var Cm=Object.freeze({title:`Leave without saving?`,message:`Your changes on this page are not saved. If you leave now, they are lost.`,leaveLabel:`Leave`}),wm=`form[data-wui-unsaved]`,Tm=`[aria-invalid="true"], .field-error:not(:empty), .field-validation-error, .validation-summary-errors, .wui-error-summary`,Em=`[download], [data-wui-modal], [data-wui-post], [data-bs-toggle]`,Dm=new Set([`submit`,`button`,`reset`,`image`]),Om=new Set([`hidden`,`checkbox`,`radio`,`file`,`submit`,`button`,`reset`,`image`,`range`,`color`]),km=e=>e instanceof HTMLInputElement||e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement||e instanceof HTMLButtonElement||e instanceof HTMLFieldSetElement||e instanceof HTMLObjectElement||e instanceof HTMLOutputElement,Am=e=>km(e)?e instanceof HTMLObjectElement||e instanceof HTMLOutputElement?!1:e.disabled:`disabled`in e&&!!e.disabled,jm=e=>`name`in e&&typeof e.name==`string`&&e.name!==``,Mm=e=>typeof e==`object`&&!!e,Nm=e=>Array.isArray(e)&&e.every(e=>Array.isArray(e)&&typeof e[0]==`string`);function Pm(e){let t=JSON.parse(e);if(!Nm(t))throw Error(`unsaved-changes snapshot is malformed`);return t}var Fm=new WeakMap,Im=new WeakSet,Lm=e=>`${e.name}:${e.size}:${e.lastModified}`,Rm=e=>[...e.querySelectorAll(wm)].filter(e=>e instanceof HTMLFormElement);function zm(e){let t=[];for(let n of e.elements)jm(n)&&!Am(n)&&(km(n)&&Dm.has(n.type)||(n instanceof HTMLInputElement&&(n.type===`checkbox`||n.type===`radio`)?t.push([n.name,n.value,n.checked]):n instanceof HTMLInputElement&&n.type===`file`?t.push([n.name,[...n.files||[]].map(Lm)]):n instanceof HTMLSelectElement&&n.type===`select-multiple`?t.push([n.name,[...n.selectedOptions].map(e=>e.value)]):n instanceof HTMLFieldSetElement||n instanceof HTMLObjectElement?t.push([n.name,null]):t.push([n.name,`value`in n?n.value:null])));return JSON.stringify(t)}function Bm(e){return zm(e)}function Vm(e,t){let n=new Map,r=Pm(t);for(let e of r){let t=n.get(e[0]);t?t.push(e):n.set(e[0],[e])}let i=Pm(zm(e)).map(e=>n.get(e[0])?.shift()??e);for(let e of n.values())i.push(...e);return JSON.stringify(i)}function Hm(e){for(let t of e.elements)if(km(t)&&t.name&&!Am(t)){if(t instanceof HTMLTextAreaElement||t instanceof HTMLInputElement&&!Om.has(t.type)){if(t.value.trim()!==``)return!0}else if(t instanceof HTMLInputElement&&t.type===`file`&&(t.files?.length??0)>0)return!0}return!1}var Um=e=>({saved:e.querySelector(Tm)&&Hm(e)?null:zm(e),engaged:!1,discarded:!1});function Wm(e){let t=Fm.get(e);return!t||t.discarded||!e.isConnected?!1:t.saved===null||t.engaged&&zm(e)!==t.saved}var Gm=(e,t)=>Rm(e).filter(e=>e!==t&&Wm(e));function Km(e,t,n){let r=t.map(e=>e.getAttribute(`data-wui-unsaved`)).find(Boolean)||Cm.message;tm(e,{title:Cm.title,message:r,label:Cm.leaveLabel,tone:`danger`},()=>{for(let e of t){let t=Fm.get(e);t&&(t.discarded=!0)}n()})}function qm(e){if(e.matches(Em))return!1;let t=e.getAttribute(`target`);if(t&&t.toLowerCase()!==`_self`)return!1;let n=e.getAttribute(`href`);if(n===null)return!1;let r=new URL(n,window.location.href);if(r.protocol!==`http:`&&r.protocol!==`https:`)return!1;let i=window.location;return!(r.hash&&r.origin===i.origin&&r.pathname===i.pathname&&r.search===i.search)}function Jm(e,t){if((t?.getAttribute(`formmethod`)||e.getAttribute(`method`)||`get`).toLowerCase()===`dialog`)return!1;let n=t?.getAttribute(`formtarget`)||e.getAttribute(`target`);return!n||n.toLowerCase()===`_self`}function Ym(e){if(e.defaultPrevented||e.button!==0||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey)return;let t=e.target,n=P(t,`a[href]`);if(!(n instanceof HTMLAnchorElement)||!qm(n))return;let r=Gm(n.ownerDocument,null);r.length&&(e.preventDefault(),Km(n,r,()=>n.click()))}function Xm(e){let t=e.target;if(!(t instanceof HTMLFormElement)||e.defaultPrevented||!Jm(t,e.submitter))return;let n=Gm(t.ownerDocument,t);if(n.length){e.preventDefault();let r=e.submitter,i=(r instanceof HTMLButtonElement||r instanceof HTMLInputElement)&&r.form===t?r:void 0;Km(t,n,()=>t.requestSubmit(i));return}let r=Fm.get(t);r&&(r.saved=zm(t),r.discarded=!1)}function Zm(e){Gm(document,null).length&&(e.preventDefault(),e.returnValue=``)}function Qm(e){let t=e.target,n=P(t,wm);return n instanceof HTMLFormElement?n:null}function $m(e){let t=Qm(e);if(!t)return;let n=Fm.get(t);n&&!n.engaged&&(n.saved!==null&&(n.saved=zm(t)),n.engaged=!0)}function eh(e){let t=Qm(e),n=t&&Fm.get(t);n&&(n.discarded=!1,e.isTrusted&&(n.engaged=!0))}function th(e){for(let t of Rm(e)){let e=Fm.get(t);e?.saved&&(e.saved=Vm(t,e.saved))}}function nh(e){let t=Mm(e)?e.handle:void 0;return Mm(t)?t.el:void 0}function rh(e){if(!(e instanceof CustomEvent))return;let t=nh(e.detail);if(t instanceof Element)for(let e of Rm(t))ah(e)}function ih(e=document){let t=e instanceof Document?e:e.ownerDocument;if(!Im.has(t)){Im.add(t);for(let e of[`focusin`,`pointerdown`,`drop`])t.addEventListener(e,$m,!0);for(let e of[`input`,`change`])t.addEventListener(e,eh,!0);t.addEventListener(`click`,Ym),t.addEventListener(`submit`,Xm),t.addEventListener(`wui:modal:success`,rh),t.addEventListener(Ir,()=>th(t)),N(t.defaultView,`unsaved-changes guard needs a document with a window`).addEventListener(`beforeunload`,Zm)}let n=Rm(e);e instanceof HTMLFormElement&&e.matches(wm)&&n.unshift(e);for(let e of n)Fm.has(e)||Fm.set(e,Um(e))}function ah(e){if(!(e instanceof HTMLFormElement)||!e.matches(wm))throw TypeError(`resetUnsavedChanges: ${String(e)} is not a <form data-wui-unsaved>.`);Fm.set(e,{saved:zm(e),engaged:!1,discarded:!1})}var oh=Object.freeze({question:`Discard your changes?`,discard:`Discard`,keep:`Keep editing`}),sh=`wui:drawer:discard`,ch=`wui-drawer[confirm-discard]`,lh=`wui-modal`,uh=`data-wui-no-discard`,dh=`.wui-drawer-discard`,fh=`input, select, textarea`,ph=e=>typeof e==`object`&&!!e||typeof e==`function`;function mh(e){let t=e.currentTarget;if(!(t instanceof Document))throw Error(`The discard guard is not wired on a document.`);return t}function hh(e,t){return P(e,t)}var gh=e=>e instanceof HTMLInputElement||e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement,_h=new WeakMap,vh=new WeakSet,yh=new WeakSet;function bh(e,t,n,r,i){let a=e.createElement(`button`);return a.type=`button`,a.className=Ws(t,n,`sm`),a.dataset.wui=Bs,a.setAttribute(r,``),a.textContent=i,a}function xh(e,t){let n=e.createElement(`div`);n.className=`wui-drawer-discard`,n.setAttribute(`role`,`alert`);let r=e.createElement(`span`);return r.className=`wui-drawer-discard-text`,r.textContent=t,n.append(r,bh(e,`danger`,`solid`,`data-wui-discard-confirm`,oh.discard),bh(e,`primary`,`soft`,`data-wui-discard-keep`,oh.keep)),n}function Sh(e){if(!(e instanceof Element))return null;let t=e.closest(ch);if(t)return t;let n=e.closest(lh);return n&&Th(n).length?n:null}function Ch(e){return e.closest(ch)??e.closest(lh)}function wh(e,t){return t.hasAttribute(uh)||e.hasAttribute(uh)?!1:t.hasAttribute(`confirm-discard`)||e.hasAttribute(`data-wui-confirm-discard`)?!0:(e.getAttribute(`method`)||`get`).toLowerCase()!==`get`}function Th(e){return e.matches(ch)?e.querySelectorAll(`form`):[...e.querySelectorAll(`form`)].filter(t=>wh(t,e))}function Eh(e){let t=_h.get(e);return t!=null&&Bm(e)!==t}function Dh(e){let t=e.ownerDocument.createElement(`div`);return t.className=`wui-drawer-footer`,N(e.querySelector(`.wui-drawer-panel`),`The drawer has no panel to hold its footer.`).append(t),yh.add(t),t}function Oh(e){let t=e.ownerDocument.createElement(`div`);return t.className=`wui-modal-footer`,(e.querySelector(`.wui-modal-body`)?.parentElement??e.querySelector(`.modal-content`)??e).append(t),yh.add(t),t}function kh(e){let t=e.querySelector(`[data-wui-discard-confirm]`);if(!(t instanceof HTMLElement))throw Error(`The discard prompt has no confirm button.`);t.focus()}function Ah(e,t,n){let r=e.querySelector(dh);if(r){kh(r);return}let i=xh(e.ownerDocument,t),a;if(e.matches(ch))a=e.querySelector(`.wui-drawer-footer`)??Dh(e),a.prepend(i);else if(e.hasAttribute(`confirm-discard`))a=e.querySelector(`.wui-modal-footer`)??Oh(e),a.prepend(i);else{if(!n)throw Error(`A discard prompt needs the form that is dirty.`);a=n.querySelector(`.modal-footer`),a?a.prepend(i):(a=n,n.append(i))}a.classList.add(`wui-drawer-discarding`),kh(i)}function jh(e){let t=e.parentElement;if(e.remove(),!t)throw Error(`The discard prompt has no footer.`);t.classList.remove(`wui-drawer-discarding`),yh.has(t)&&t.remove()}function Mh(e){for(let t of Th(e))for(let e of t.querySelectorAll(fh))if(gh(e)&&e.type!==`hidden`&&!e.disabled){e.focus({preventScroll:!0});return}}function Nh(e){let t=Sh(e.target);if(t)for(let e of Th(t))_h.get(e)??_h.set(e,Bm(e))}function Ph(e){for(let t of mh(e).querySelectorAll(`form`)){let e=_h.get(t);e!=null&&_h.set(t,Vm(t,e))}}function Fh(e){let t=e.target;t instanceof HTMLFormElement&&Sh(t)&&_h.set(t,Bm(t))}function Ih(e){if(!ph(e))return;let t=`handle`in e?e.handle:void 0;if(ph(t))return`el`in t?t.el:void 0}function Lh(e){if(!(e instanceof CustomEvent))return;let t=e.detail,n=Ih(t);if(n instanceof Element)for(let e of n.querySelectorAll(`form`))_h.delete(e)}function Rh(e){let t=e.target;t instanceof Element&&t.matches(ch)&&[...Th(t)].some(Eh)&&(e.preventDefault(),Ah(t,t.getAttribute(`confirm-discard`),null))}function zh(e){let t=e.target;if(!(t instanceof Element)||!t.matches(lh))return;let n=[...Th(t)].find(Eh);n&&(e.preventDefault(),Ah(t,n.getAttribute(`data-wui-confirm-discard`)??t.getAttribute(`confirm-discard`)??oh.question,n))}function Bh(e){let t=N(e.closest(dh),`The discard button is outside its prompt.`),n=Ch(t);if(jh(t),!n)throw Error(`The discard prompt is outside its drawer or modal.`);for(let e of Th(n))_h.set(e,Bm(e));n.dispatchEvent(new CustomEvent(sh,{bubbles:!0})),n.matches(ch)?N(n.closest(`wui-drawer`),`The confirm-discard drawer is not a wui-drawer.`).hide():N(n.closest(`wui-modal`),`The discarded dialog is not a wui-modal.`).hide()}function Vh(e){let t=N(e.closest(dh),`The keep button is outside its prompt.`),n=Ch(t);if(jh(t),!n)throw Error(`The discard prompt is outside its drawer or modal.`);Mh(n)}function Hh(e){let t=hh(e.target,`[data-wui-discard-confirm]`);if(t){Bh(t);return}let n=hh(e.target,`[data-wui-discard-keep]`);n&&Vh(n)}function Uh(e=document){let t=e instanceof Document?e:e.ownerDocument;vh.has(t)||(vh.add(t),t.addEventListener(`focusin`,Nh),t.addEventListener(`pointerdown`,Nh),t.addEventListener(`submit`,Fh),t.addEventListener(Ir,Ph),t.addEventListener(`wui:modal:success`,Lh),t.addEventListener(`wui:modal:loaded`,Lh),t.addEventListener(`wui-drawer-close`,Rh,!0),t.addEventListener(`wui-modal-close`,zh),t.addEventListener(`click`,Hh))}var Wh=31536e3,Gh=new WeakMap,Kh=e=>e>99?`99+`:String(e),qh=(e,t)=>Object.entries(t).reduce((e,[t,n])=>e.replaceAll(`{${t}}`,()=>String(n)),e);function Jh(e,t,n=document){try{n.cookie=`${e}=${t?`1`:`0`}; Path=/; Max-Age=${Wh}; SameSite=Lax`}catch(e){if(!(e instanceof DOMException&&e.name===`SecurityError`))throw e}}function Yh(e,t,n,r=document){try{let i=`${e}=`,a=r.cookie.split(`;`).map(e=>e.trim()).find(e=>e.startsWith(i)),o=new Set(a?a.slice(i.length).split(`.`).filter(Boolean):[]);n?o.add(t):o.delete(t),r.cookie=`${e}=${[...o].join(`.`)}; Path=/; Max-Age=${Wh}; SameSite=Lax`}catch(e){if(!(e instanceof DOMException&&e.name===`SecurityError`))throw e}}var Xh=e=>{let t=document.createElement(`template`);return t.innerHTML=e,t.content},$=(e,t,n)=>{let r=e?.querySelector(t);return r instanceof n?r:null},Zh=(e,t,n)=>{let r=e?.closest(t);return r instanceof n?r:null},Qh=(e,t,n)=>e?[...e.querySelectorAll(t)].filter(e=>e instanceof n):[],$h=e=>{if(!(e.target instanceof Element))throw Error(`event target is not an element`);return e.target},eg=e=>{let t=e.getAttribute(`href`);if(t===null)throw Error(`search hit has no href`);return t},tg=(e,t)=>{let n=document.createElement(`div`);return n.className=e,n.textContent=t,n};function ng(e,t){let n=$(e,`.wui-bell-trigger`,HTMLElement),r=$(e,`.wui-bell-count`,HTMLElement),i=$(e,`[data-wui-bell-live]`,HTMLElement),a=$(e,`[data-wui-bell-list]`,HTMLElement),o=()=>N(a,`bell list missing`),s=$(e,`.wui-bell-menu`,HTMLElement),{src:c,readAction:l}=e.dataset,u=e.dataset.label||`Notifications`,d=e.dataset.emptyText||`You are all caught up.`,f=e.dataset.loadingText??`Loading…`,p=e.dataset.noUnreadText??`No unread notifications`,m=e.dataset.unreadText??`{count} unread notifications`,h=e.dataset.bellLabel??`{label}, {count} unread`,g=Number(e.dataset.pollSeconds??60),_=Sa(),v=Number(e.dataset.unread)||0,y=(t,a=!0)=>{let o=Math.max(0,Number(t)||0),s=o!==v;v=o,e.dataset.unread=String(o),r&&(r.textContent=Kh(o),r.hidden=o===0),n?.setAttribute(`aria-label`,o===0?u:qh(h,{label:u,count:Kh(o)})),a&&s&&i&&(i.textContent=o===0?p:qh(m,{count:Kh(o)}))},b=()=>s?M(s):!1,x=()=>{let e=tg(`wui-bell-state`,`Could not load notifications. `),t=document.createElement(`button`);t.type=`button`,t.className=`btn btn-link btn-sm`,t.dataset.wuiBellRetry=``,t.textContent=`Retry`,e.append(t),o().replaceChildren(e)},S=async t=>{if(t&&(o().setAttribute(`aria-busy`,`true`),o().querySelector(`.wui-bell-item`)||o().replaceChildren(tg(`wui-bell-state`,f))),c===void 0)throw Error(`bell has no data-src`);let n=await _.run(c);if(n.kind===`aborted`||n.kind===`stale`||n.kind===`session`)return;if(o().removeAttribute(`aria-busy`),!n.ok){t&&x();return}let r=Xh(n.html),i=$(r,`[data-wui-unread]`,HTMLElement),a=i?Number(i.getAttribute(`data-wui-unread`)):v;y(a),(t||b())&&(r.querySelector(`.wui-bell-item`)?o().replaceChildren(r):o().replaceChildren(tg(`wui-bell-state`,d))),e.dispatchEvent(new CustomEvent(`wui:notifications:loaded`,{bubbles:!0,detail:{unread:a}}))};s?.addEventListener(`beforetoggle`,e=>{`newState`in e&&e.newState===`open`&&S(!0)}),e.addEventListener(`click`,async e=>{let t=$h(e);if(t.closest(`[data-wui-bell-retry]`)){await S(!0);return}let n=Zh(t,`[data-wui-bell-read]`,HTMLButtonElement);if(!n||!l)return;n.disabled=!0;let r=await xa(l,{method:`POST`});n.disabled=!1,r.ok&&(y(0),await S(!0))});let C=null,w=()=>{g>0&&C===null&&(C=setInterval(()=>S(b()),g*1e3))},T=()=>{C!==null&&clearInterval(C),C=null},E=()=>{document.hidden?T():(S(b()),w())};return g>0&&(document.addEventListener(`visibilitychange`,E),document.hidden||w()),t.push(()=>{T(),_.abort(),document.removeEventListener(`visibilitychange`,E)}),{setUnread:e=>y(e),refresh:()=>S(b())}}var rg=e=>e instanceof HTMLElement&&(e.isContentEditable||/^(INPUT|TEXTAREA|SELECT)$/.test(e.tagName)),ig=(e,t,n)=>`${e}${e.includes(`?`)?`&`:`?`}${encodeURIComponent(t)}=${encodeURIComponent(n)}`;function ag(e,t){let n=N($(e,`input.search-input`,HTMLInputElement),`search input missing`),r=$(e,`.wui-topsearch-results`,HTMLElement),i=()=>N(r,`search results missing`),a=$(e,`.wui-topsearch-open`,HTMLElement),o=$(e,`[data-wui-topsearch-live]`,HTMLElement),{src:s,param:c=`q`,resultsHref:l}=e.dataset,u=Number(e.dataset.minChars??2),d=Number(e.dataset.debounceMs??250),f=e.dataset.noResultsText??`No results`,p=e.dataset.resultsCountText??`{count} results`,m=e.dataset.resultCountText??`{count} result`,h=Sa(),g,_=-1,v=()=>Qh(i(),`.wui-topsearch-hit`,HTMLElement),y=e=>{let t=v();_=t.length===0?-1:(e+t.length)%t.length,t.forEach((e,t)=>{let n=t===_;e.classList.toggle(`is-active`,n),e.setAttribute(`aria-selected`,n?`true`:`false`)});let r=_>=0?t[_]:void 0;r?(n.setAttribute(`aria-activedescendant`,r.id),r.scrollIntoView?.({block:`nearest`})):n.removeAttribute(`aria-activedescendant`)},b=()=>{i().hidden=!0,n.setAttribute(`aria-expanded`,`false`),n.removeAttribute(`aria-activedescendant`),_=-1},x=()=>{i().hidden=!1,n.setAttribute(`aria-expanded`,`true`)},S=t=>{e.classList.toggle(`is-open`,t),a?.setAttribute(`aria-expanded`,t?`true`:`false`)},C=t=>{let n=new CustomEvent(`wui:search:select`,{bubbles:!0,cancelable:!0,detail:{href:t}});e.dispatchEvent(n)&&window.location.assign(t)},w=async t=>{if(e.classList.add(`is-loading`),s===void 0)throw Error(`search has no data-src`);let n=await h.run(ig(s,c,t));if(n.kind!==`aborted`&&n.kind!==`stale`&&n.kind!==`session`){if(e.classList.remove(`is-loading`),n.ok){let e=Xh(n.html),t=$(e,`[data-wui-count]`,HTMLElement);i().replaceChildren(e),v().forEach((e,t)=>{e.id=`${i().id}-opt-${t}`});let r=t?Number(t.getAttribute(`data-wui-count`)):v().length;o&&(o.textContent=r===0?f:qh(r===1?m:p,{count:r}))}else i().replaceChildren(tg(`wui-topsearch-empty`,`Search is unavailable right now.`));_=-1,x()}};n.addEventListener(`input`,()=>{clearTimeout(g);let t=n.value.trim();t.length<u?(h.abort(),e.classList.remove(`is-loading`),i().replaceChildren(),b()):g=setTimeout(()=>w(t),d)}),n.addEventListener(`keydown`,t=>{if(t.key===`ArrowDown`||t.key===`ArrowUp`){if(i().hidden||v().length===0)return;t.preventDefault(),y(_+(t.key===`ArrowDown`?1:-1))}else if($n(t)){let e=v(),r=_>=0?e[_]:void 0;!i().hidden&&r?(t.preventDefault(),C(eg(r))):l&&n.value.trim()!==``&&(t.preventDefault(),C(ig(l,c,n.value.trim())))}else t.key===`Escape`&&(i().hidden?e.classList.contains(`is-open`)&&(t.preventDefault(),t.stopPropagation(),S(!1),a?.focus()):(t.preventDefault(),t.stopPropagation(),b()))}),i().addEventListener(`click`,e=>{let t=Zh($h(e),`.wui-topsearch-hit`,HTMLElement);!t||e.ctrlKey||e.metaKey||e.shiftKey||e.button===1||(e.preventDefault(),C(eg(t)))}),a?.addEventListener(`click`,()=>{let t=!e.classList.contains(`is-open`);S(t),t&&n.focus()});let T=e=>{e.key!==`/`||e.ctrlKey||e.metaKey||e.altKey||rg(e.target)||(e.preventDefault(),S(!0),n.focus())},E=t=>{t.target instanceof Node&&e.contains(t.target)||(b(),e.classList.contains(`is-open`)&&S(!1))};document.addEventListener(`keydown`,T),document.addEventListener(`pointerdown`,E),t.push(()=>{clearTimeout(g),h.abort(),document.removeEventListener(`keydown`,T),document.removeEventListener(`pointerdown`,E)})}function og(e){let t=[],n=e.dataset.wuiCollapsedCookie;n&&e.addEventListener(`wui:shell:collapse`,e=>{Jh(n,!!e.detail?.collapsed)});let r=e.dataset.wuiFoldedCookie;r&&e.addEventListener(`wui:shell:nav-fold`,e=>{Yh(r,e.detail?.key,!!e.detail?.folded)}),e.addEventListener(`click`,t=>{$h(t).closest(`[data-wui-tabbar-more]`)&&$(e,`[data-app-shell-menu]`,HTMLElement)?.click()});let i=$(e,`[data-wui-bell]`,HTMLElement),a=i?ng(i,t):null,o=$(e,`[data-wui-topsearch]`,HTMLElement);o&&ag(o,t);let s={el:e,setUnread(e){N(a,`WUI.shell: this <app-shell> has no <app-shell-notifications>.`).setUnread(e)},refreshNotifications(){return N(a,`WUI.shell: this <app-shell> has no <app-shell-notifications>.`).refresh()},get collapsed(){return e.classList.contains(`collapsed`)},set collapsed(t){if(!!t===e.classList.contains(`collapsed`))return;let n=$(e,`[data-app-shell-collapse]`,HTMLElement);n?n.click():e.classList.toggle(`collapsed`,!!t)}};Gh.set(e,s);let c=n=>{if(n.target===e||n.target instanceof Node&&n.target.contains(e)){for(let e of t)e();Gh.delete(e),delete e.dataset.wuiPartsWired,document.removeEventListener(`wui:teardown`,c)}};return document.addEventListener(`wui:teardown`,c),s}function sg(e=document){let t=[];e instanceof HTMLElement&&e.matches(`[data-app-shell]`)&&t.push(e),t.push(...Qh(e,`[data-app-shell]`,HTMLElement));for(let e of t)e.dataset.wuiPartsWired||(e.dataset.wuiPartsWired=`1`,og(e))}function cg(e){let t=Zh(e,`[data-app-shell]`,HTMLElement);return t?(Gh.has(t)||sg(t),Gh.get(t)??null):null}var lg=`data-wui-submit-once`,ug=`data-wui-submit-pending`,dg=`wui-submit-spinner`,fg=new WeakSet,pg=new WeakMap;function mg(e){return e instanceof HTMLButtonElement||e instanceof HTMLInputElement?e:null}function hg(e){if(e.setAttribute(`aria-busy`,`true`),e.tagName===`INPUT`||e.querySelector(`.${dg}`))return;let t=e.ownerDocument.createElement(`span`);t.className=`spinner-border spinner-border-sm me-2 ${dg}`,t.setAttribute(`aria-hidden`,`true`),e.prepend(t)}function gg(e){e.removeAttribute(`aria-busy`),e.querySelector(`.${dg}`)?.remove()}function _g(e){return e.method===`post`&&e.target!==`_blank`&&e.getAttribute(`data-wui-submit-once`)!==`off`}function vg(e){let t=e.target;if(!(t instanceof HTMLFormElement)||!_g(t))return;if(t.hasAttribute(ug)){e.preventDefault();return}t.setAttribute(ug,``);let n=mg(e.submitter);setTimeout(()=>{t.hasAttribute(ug)&&(e.defaultPrevented?t.removeAttribute(ug):n&&(n.disabled=!0,hg(n),pg.set(t,n)))},0)}var yg=e=>[...e.querySelectorAll(`form[${ug}]`)].filter(e=>e instanceof HTMLFormElement);function bg(e){for(let t of yg(e)){t.removeAttribute(ug);let e=pg.get(t);e&&(e.disabled=!1,gg(e),pg.delete(t))}}function xg(e){let t=e.ownerDocument===null?e:e.ownerDocument;fg.has(t)||(fg.add(t),t.addEventListener(`submit`,vg,!0),t.defaultView?.addEventListener(`pageshow`,()=>bg(t)))}var Sg=[`light`,`dark`,`auto`],Cg=[`wave`,`circle`,`slide`,`blinds`,`fade`,`none`],wg=`wave`,Tg=`theme`,Eg={wave:1100,circle:700,slide:600,blinds:900,fade:350,none:0},Dg=`wui-theme-switching`,Og=`wui:theme:change`,kg=`(prefers-color-scheme: dark)`,Ag=e=>typeof window<`u`&&typeof window.matchMedia==`function`&&window.matchMedia(e).matches,jg=e=>Sg.some(t=>t===e);function Mg(e){return e===`dark`||e===`auto`&&Ag(kg)?`dark`:`light`}function Ng(e=Tg){let t=null;try{t=window.localStorage.getItem(e)}catch(e){if(!(e instanceof DOMException))throw e}return jg(t)?t:`auto`}function Pg(e,t=Tg){try{window.localStorage.setItem(t,e)}catch(e){if(!(e instanceof DOMException))throw e}}function Fg(e){let t=document.documentElement,n=Mg(e);t.setAttribute(`data-theme`,e),t.setAttribute(`data-bs-theme`,n),document.dispatchEvent(new CustomEvent(Og,{detail:{mode:n,preference:e}}))}var Ig=`((k)=>{var m;try{m=localStorage.getItem(k)}catch{m=null}if(m!=='light'&&m!=='dark')m='auto';var r=document.documentElement,q=window.matchMedia?window.matchMedia('(prefers-color-scheme: dark)'):null;function s(){var t=r.getAttribute('data-theme');r.setAttribute('data-bs-theme',t==='auto'?(q?.matches?'dark':'light'):t)}r.setAttribute('data-theme',m);s();if(q?.addEventListener)q.addEventListener('change',()=>{if(r.getAttribute('data-theme')==='auto')s()})})(`;function Lg(e=Tg){return`${Ig}${JSON.stringify(String(e)).replace(/</g,`\\u003c`)})`}function Rg(e,{includeAuto:t=!1}={}){return e===`light`?`dark`:e===`dark`&&t?`auto`:`light`}function zg(e){if(typeof window>`u`||typeof window.matchMedia!=`function`)return()=>{};let t=window.matchMedia(kg),n=()=>e(t.matches?`dark`:`light`);return t.addEventListener(`change`,n),()=>t.removeEventListener(`change`,n)}var Bg=60,Vg=e=>e<.5?4*e*e*e:1-(-2*e+2)**3/2,Hg=e=>e.toFixed(1),Ug=(e,t)=>`${Hg(e)}px ${Hg(t)}px`,Wg={amplitude:22,segments:36,cycles:1.5,ripples:2},Gg=6,Kg=(e,t,n,r,i)=>{let{amplitude:a,segments:o,cycles:s}=Wg,c=n*(t+2*a),l=i?t+a-c:c-a,u=i?t+2*a:-2*a,d=[Ug(0,u)];for(let t=0;t<=o;t++){let n=e*t/o,i=l+a*Math.sin(2*Math.PI*s*t/o+r);d.push(Ug(n,i))}return d.push(Ug(e,u)),`polygon(${d.join(`, `)})`},qg=(e,t,n,r)=>{let i=t/Gg,a=[];for(let t=0;t<Gg;t++){let o=t*i,s=i*n,c=r?o+i-s:o,l=r?o+i:o+s;a.push(Ug(0,c),Ug(e,c),Ug(e,l),Ug(0,l))}return`polygon(${a.join(`, `)})`};function Jg(e,{width:t,height:n,to:r=`dark`,origin:i}){let a=r===`dark`,o=[];for(let r=0;r<=Bg;r++){let s=r/Bg,c=Vg(s);switch(e){case`circle`:{let e=i?.x??t/2,r=i?.y??n/2,a=Math.hypot(Math.max(e,t-e),Math.max(r,n-r));o.push({clipPath:`circle(${Hg(a*c)}px at ${Hg(e)}px ${Hg(r)}px)`});break}case`slide`:{let e=n*(1-c);o.push({clipPath:a?`inset(${Hg(e)}px 0px 0px 0px)`:`inset(0px 0px ${Hg(e)}px 0px)`});break}case`blinds`:o.push({clipPath:qg(t,n,c,a)});break;case`fade`:o.push({clipPath:`none`,opacity:c});break;case`none`:return[];default:o.push({clipPath:Kg(t,n,c,s*Wg.ripples*2*Math.PI,a)})}}return o}var Yg=e=>{e instanceof DOMException&&(e.name===`AbortError`||e.name===`InvalidStateError`)||H(`[@webority/ui-elements] The theme view transition failed:`,e)};function Xg(e,{effect:t=wg,to:n,origin:r,duration:i}={}){let a=document.documentElement,o=n!==void 0&&a.getAttribute(`data-bs-theme`)===n;if(t===`none`||o||Ag(`(prefers-reduced-motion: reduce)`)||typeof document.startViewTransition!=`function`||typeof a.animate!=`function`)return e(),Promise.resolve(!1);a.classList.add(Dg);let s=document.startViewTransition(e),c=i??Eg[t]??Eg.wave;return s.ready.then(()=>{let e=Jg(t,{width:window.innerWidth,height:window.innerHeight,to:n,origin:r});a.animate(e,{duration:c,easing:`linear`,fill:`both`,pseudoElement:`::view-transition-new(root)`})}).catch(Yg),s.finished.catch(Yg).finally(()=>a.classList.remove(Dg)).then(()=>!0)}function Zg(){dt(),i(`wui-select`,ns),i(`wui-datepicker`,wi),i(`wui-dock`,Ti),i(`wui-otp`,Za),i(`wui-shortcuts`,Ts),i(`wui-record-pager`,bo),i(`wui-data-table`,sr),i(`wui-hover-card`,Fi),i(`wui-modal`,Ii),i(`wui-navigation-menu`,Gi),i(`wui-notification-center`,Ba),i(`wui-onboarding-checklist`,Ja),i(`wui-overflow`,uo),i(`wui-rating`,yo),i(`wui-relative-time`,No),i(`wui-show-more`,ks),i(`wui-truncate`,As),i(`wui-whats-new`,Rs)}return globalThis.WeborityUiElementsInternal||(globalThis.WeborityUiElementsInternal={version:`0.165.0`,modules:tl}),Jr(),Zg(),e.AVATAR_ACCEPT=nl,e.AVATAR_MAX_SIZE_MB=rl,e.AVATAR_OUTPUT_SIZE=il,e.AVATAR_OUTPUT_TYPE=al,e.AVATAR_PREVIEW_SIZES=ol,e.AVATAR_TEXT=sl,e.BAR_BULK_IN_BAR_ATTRIBUTE=Ou,e.COLUMN_MAX_WIDTH=vn,e.COLUMN_MIN_WIDTH=_n,e.COMMAND_SHORTCUT_ATTRIBUTE=wl,e.CONFIRM_DIALOG_ID=Ip,e.CONFIRM_TONES=Lp,e.COPY_FEEDBACK_MS=Ks,e.CSRF_META_NAME=la,e.CURRENCIES=At,e.CURRENCY_SYMBOLS=pt,e.DATA_TABLE_TEXT=L,e.DATE_PATTERNS=Nt,e.DEFAULT_CSRF_HEADER=ua,e.DEFAULT_CURRENCY=ft,e.DEFAULT_IMAGE_ACCEPT=jl,e.DEFAULT_MAX_SIZE_MB=Ml,e.DEFAULT_PASSWORD_RULES=Lu,e.DEFAULT_REQUIREMENTS_TITLE=Ru,e.DEFAULT_THEME_EFFECT=wg,e.DEFAULT_THEME_STORAGE_KEY=Tg,e.DISCARD_EVENT=sh,e.DISCARD_TEXT=oh,e.DROP_OVER_CLASS=Wu,e.DURATION_UNITS=Mt,e.EMPTY_VALUE=Ft,e.FILTER_POPOVER_MAX_CHIPS=$e,e.FLASH_STORAGE_KEY=Bp,e.FLASH_VARIANTS=Rp,e.FORMAT_STYLES=kt,e.HTTP_KINDS=ma,e.IST_TIME_ZONE=F,e.LIST_KEYS=Ie,e.MASK_INPUT_TYPES=Xl,e.MASK_NAMES=iu,e.MENTION_ID_PATTERN=Ys,e.MONEY_UNITS=jt,e.NOTIFICATION_COUNT_CAP=Yi,e.NOTIFICATION_TEXT=Zi,e.PIN_AT_VAR=Mn,e.PIN_SIDES=xn,e.RESIZE_STEP=yn,e.RESIZE_STEP_LARGE=bn,e.ROW_DRAG_TYPE=Gu,e.ROW_DROP_EVENT=Uu,e.ROW_HEIGHTS=Cn,e.ROW_MOVE_LIMIT=In,e.ROW_MOVE_MS=Ln,e.ROW_SAVE_ATTR=Gn,e.ROW_SAVE_ERROR_CLASS=Kn,e.ROW_SAVE_STATES=Wn,e.SCROLL_EDGE_SELECTOR=vd,e.SEARCH_OPEN_KEY=dl,e.SELECT_ALL_LABEL=mc,e.SELECT_CELL_CLASS=Y,e.SELECT_KEY=Le,e.SELECT_ROW_LABEL=hc,e.SERVER_ACTION_TEXT=Vp,e.SHORTCUTS_OFF_ATTRIBUTE=Me,e.SHORTCUT_EVENT=Pe,e.SHORTCUT_SCOPE_ATTRIBUTE=Ne,e.SHORTCUT_TEXT=Fe,e.SUBMIT_ONCE_ATTRIBUTE=lg,e.THEME_BOOT_SCRIPT_BODY=Ig,e.THEME_CHANGE_EVENT=Og,e.THEME_EFFECTS=Cg,e.THEME_EFFECT_DURATION=Eg,e.THEME_MODES=Sg,e.THEME_SWITCHING_CLASS=Dg,e.TOAST_ACTION_METHODS=ia,e.TOAST_ACTION_MS=qd,e.UNSAVED_TEXT=Cm,e.VIRTUAL_OVERSCAN=Sn,e.WHATS_NEW_READ_EVENT=js,e.WUI_HEADERS=G,e.WuiDataTable=sr,e.WuiDatePicker=wi,e.WuiDock=Ti,e.WuiHoverCard=Fi,e.WuiNavigationMenu=Gi,e.WuiNotificationCenter=Ba,e.WuiOnboardingChecklist=Ja,e.WuiOtp=Za,e.WuiOverflow=uo,e.WuiRating=yo,e.WuiRecordPager=bo,e.WuiRelativeTime=No,e.WuiSelect=ns,e.WuiShortcuts=Ts,e.WuiShowMore=ks,e.WuiTruncate=As,e.WuiWhatsNew=Rs,e.acceptDroppedFiles=Gl,e.acceptLabel=Hl,e.addRowSelectCells=Cc,e.addSelectColumn=wc,e.applyBarBulk=Fu,e.applyTheme=Fg,e.ariaKeyShortcuts=Ke,e.attachFileDrop=Kl,e.attachInputMask=yu,e.attachRowDrag=hd,e.attachScrollEdges=bd,e.attachShiftRange=Dc,e.avatarCropOptions=ul,e.avatarUnreadableMessage=ll,e.barBulkCountText=ju,e.buildPasswordRules=Bu,e.clampColumnWidth=Tn,e.classifyStatus=va,e.closeRemotePane=Fp,e.collapseSearch=bl,e.configureCsrf=fa,e.confirmAction=tm,e.copyTextToClipboard=qs,e.createDiscardPrompt=xh,e.createRequestQueue=Sa,e.createSelectHeaderCell=_c,e.createSelectRowCell=vc,e.createSelectSpacerCell=yc,e.currencyPrefix=ht,e.deriveStepStatus=dc,e.evaluatePassword=Vu,e.formValues=Bm,e.formatCompact=nn,e.formatCurrency=en,e.formatDate=I,e.formatDateTime=fn,e.formatDuration=on,e.formatFileSize=zl,e.formatMasked=fu,e.formatNumber=$t,e.formatPercent=rn,e.formatRelativeTime=To,e.formatValue=un,e.getServerTable=Gd,e.getShell=cg,e.glyphSvg=U,e.groupCount=wn,e.groupItems=En,e.groupNotificationsByDay=ra,e.identityCell=qn,e.inShortcutScope=Xe,e.initCollapsibleSearch=Cl,e.initCommandShortcuts=Al,e.initDrawerDiscard=Uh,e.initInputMasks=Du,e.initPageBarBulk=Iu,e.initRemoteModals=kp,e.initRowDrag=_d,e.initScrollEdges=Ed,e.initServerActions=Sm,e.initServerTables=Wd,e.initShellParts=sg,e.initSubmitOnce=xg,e.initUnsavedChanges=ih,e.isCommandChord=Dl,e.isCurrencyCode=mt,e.isHeicFile=cl,e.isImageFile=Ll,e.isImageOnlyAccept=Vl,e.isMaskPattern=ou,e.isPdfFile=Bl,e.isTimeZone=bt,e.isTypingTarget=qe,e.loadRemoteDrawer=Mp,e.loadRemoteModal=Ap,e.loadRemotePane=Pp,e.maskedPostValue=hu,e.matchSegments=kc,e.matchesAccept=Ul,e.measureRows=Vn,e.mentionLabel=Qs,e.mentionTextFromValue=tc,e.mentionValueFromText=nc,e.mentionedIds=rc,e.moveFocus=Qe,e.nextTheme=Rg,e.notificationCountText=Qi,e.notificationDayHeading=na,e.notificationTime=ta,e.notificationTriggerLabel=$i,e.notificationUnreadAnnouncement=ea,e.openSearch=yl,e.parseMentionValue=ec,e.parseToastAction=sa,e.passwordSatisfies=Hu,e.pinAtValue=Nn,e.pinClasses=Fn,e.pinOffsetVar=jn,e.planPins=Pn,e.playRowMoves=Hn,e.postedMasked=du,e.rawMasked=uu,e.readColumnWidths=kn,e.readCsrf=ga,e.readStoredTheme=Ng,e.relativeTimeTitle=Eo,e.resetUnsavedChanges=ah,e.resolveMask=cu,e.resolveTheme=Mg,e.rowLabel=Jn,e.rowOrderChanged=Un,e.runShortcut=Ze,e.runToastAction=ef,e.saveOutcomeText=Zn,e.setRowSaveState=Yn,e.settledRows=Xn,e.shortcutKey=Ge,e.shortcutName=We,e.shortcutsOff=Ye,e.showResultToast=$d,e.stepperHeaderItems=fc,e.storeTheme=Pg,e.syncSelectAll=Tc,e.syncTargets=gd,e.themeBootScript=Lg,e.themeKeyframes=Jg,e.tickedKeys=nd,e.timeZoneLabel=hn,e.toInstant=sn,e.todayIn=Et,e.transitionTheme=Xg,e.validateFile=Wl,e.virtualRange=Dn,e.wallClockOf=Tt,e.watchSystemTheme=zg,e.whenElementsReady=Xr,e.withTrustedLabel=gi,e.writeColumnWidths=An,e.wuiFetch=xa,e.zoneOffsetMs=St,e.zoneParts=xt,e})({});
52
+ <div class="field-error wui-select-error" id="${H(f)}" aria-live="polite"${this._error?``:` hidden`}>${H(this._error)}</div>`,this._rendered=!0,this._syncMirror(),this._syncValidity(),this._drawValue(),this._syncReset(),this.renderList(),this._wire(),$r(this,this.querySelector(`.wui-select-control`)),this._mountParts(e)}_accessibleName(){return this.getAttribute(`aria-label`)||this.getAttribute(`placeholder`)||qs().fallbackName}_snapshotDeclared(){if(this._declared)return;let e=[...this.querySelectorAll(`:scope > wui-option`)];e.length&&(this._declared=e.map(e=>{let t={value:e.getAttribute(`value`)??pc(e).trim(),label:e.innerHTML,[qi]:!0,selected:e.hasAttribute(`selected`)};for(let[n,r]of oc){let i=e.getAttribute(n);i&&(t[r]=i)}return e.hasAttribute(`disabled`)&&(t.disabled=!0),t}))}_readOptions(){return this.mode===`country`?this._partOptions||[]:this._partOptions?this._partOptions:this._optionsProp?this._optionsProp:(this._snapshotDeclared(),this._declared||[])}_listOptions(){let e=this._readOptions(),t=this.getAttribute(`value-label`);if(this.mode!==`search`||!t||this._value===``)return e;let n=String(this._value);return e.some(e=>String(e.value)===n)?e:[...e,{value:n,label:t}]}_declaredSelected(){return this._optionsProp?[]:(this._declared??[]).filter(e=>e.selected).map(e=>String(e.value))}_preselect(){let e=this._readOptions(),t=this._value!==``&&e.find(e=>String(e.value)===this._value)||e.find(e=>`selected`in e&&!!e.selected);t&&(this._value=String(t.value))}_optionFor(e){let t=String(e),n=this._readOptions().find(e=>String(e.value)===t);return n?(this._known.set(t,n),n):this._known.get(t)}_placeholder(){return this.getAttribute(`placeholder`)||rc()[this.mode]}_hasValue(){return Array.isArray(this._value)?this._value.length>0:this._value!==``}_selectedValues(){return Array.isArray(this._value)?this._value:this._value===``?this._listOptions().some(e=>String(e.value)===``)?[``]:[]:[this._value]}_applyValue(){this._syncMirror(),this._syncValidity(),this._rendered&&(this._drawValue(),this._syncReset(),this.renderList())}_syncMirror(){K(this.mode)?ai(this,this._selectedValues()):ii(this,this._value)}_drawValue(){let e=this._refs();if(!e.value)return;let t=K(this.mode),n=t?void 0:this._optionFor(this._value);this._syncTitle(n),this._syncValueAvatar(),this._activePartsList().some(e=>e.renderValue?.()===!0)||(t?(e.value.classList.remove(`wui-select-placeholder`),e.value.textContent=``):(e.value.classList.toggle(`wui-select-placeholder`,!n),e.value.innerHTML=n?Qi(n):H(this._placeholder())))}_syncTitle(e){let t=this.querySelector(`.wui-select-control`);if(!t)return;let n=e&&!this.hasAttribute(`title`)?ta(e).trim():``;n?t.setAttribute(`title`,n):t.removeAttribute(`title`)}_syncValueAvatar(){let e=this.querySelector(`.wui-select-control`);if(!e)return;e.querySelector(`:scope > .wui-select-value-avatar`)?.remove();let t=!K(this.mode)&&this._hasValue()?xs({avatar:this.getAttribute(`value-avatar`),initials:this.getAttribute(`value-initials`)},`avatar-xs`):``;e.classList.toggle(`wui-has-value-avatar`,!!t),t&&e.insertAdjacentHTML(`afterbegin`,`<span class="wui-select-value-avatar" aria-hidden="true">${t}</span>`)}_syncValidity(){let e=this._internals;if(typeof e?.setValidity==`function`){if(this.hasAttribute(`required`)&&!this._hasValue()){let t=this.querySelector(`.wui-select-control`);e.setValidity({valueMissing:!0},Ys().requiredFieldMessage,t instanceof HTMLElement?t:void 0)}else e.setValidity({})}}_syncReset(){let e=q(this,`.wui-select-reset`,HTMLElement);e&&(e.hidden=!(this.hasAttribute(`clearable`)&&this._hasValue()&&!z(this)))}_syncInvalid(){let e=this.querySelector(`.wui-select-control`);e&&(this.hasAttribute(`aria-invalid`)||this._error?e.setAttribute(`aria-invalid`,`true`):e.removeAttribute(`aria-invalid`))}_syncError(){let e=q(this,`.wui-select-error`,HTMLElement);e&&(e.textContent=this._error,e.hidden=!this._error),this._syncInvalid()}_refs(){return{control:q(this,`.wui-select-control`,HTMLElement),value:q(this,`.wui-select-value`,HTMLElement),menu:q(this,`.wui-select-menu`,HTMLElement),list:q(this,`.wui-select-options`,HTMLElement),search:q(this,`.wui-select-search input`,HTMLInputElement),input:q(this,`.wui-select-draft`,HTMLInputElement)}}_menuOpen(){let e=q(this,`.wui-select-menu`,HTMLElement);return e!==null&&A(e)}_hoverZone(e){if(!(e instanceof Element))return!1;let t=e.closest(`.wui-select-control, .wui-select-menu`);return t!==null&&this.contains(t)}_hoverEligible(){if(!this.hasAttribute(`open-on-hover`)||z(this)||this.mode===`tag`)return!1;let e=this._refs();return e.search===null&&e.input===null}_clearHover(){this._hoverTimer!==null&&clearTimeout(this._hoverTimer),this._hoverTimer=null}_autoSearch(){return this.mode===`single`&&this.getAttribute(`searchable`)===null&&this._readOptions().length>nc}_visible(){let e=this._refs();return e.list?fc(e.list,`.wui-select-option`):[]}_setActive(e,{reveal:t=!0}={}){let n=this._refs();if(!n.list||!n.control)return;let r=this._visible();this._active=e;let i=e>=0?r[e]??null:null;Es(n.list,i),i?(t&&i.scrollIntoView({block:`nearest`}),n.control.setAttribute(`aria-activedescendant`,i.id)):n.control.removeAttribute(`aria-activedescendant`)}_actionRows(){let e=[];for(let t of this._activePartsList()){let n=t.actionRow?.(this._query);n&&e.push(n)}return e}_recents(){if(this._query.trim()!==``)return null;for(let e of this._activePartsList()){let t=e.recents?.(this._listOptions());if(t)return t}return null}_menuPlacement(e,t){let n=this.hasAttribute(`open`)?{below:!0}:{};if(this.getAttribute(`density`)!==`compact`)return{matchWidth:!0,...n};let r=e.getBoundingClientRect();return t.style.width=`max-content`,t.style.minWidth=`${r.width}px`,t.style.maxWidth=`280px`,n}_anchorMenu(){let e=this._refs();e.control&&e.menu&&this._menuOpen()&&x(e.control,e.menu,this._menuPlacement(e.control,e.menu))}_showMenu(e,t){Ee(e,t,{...this._menuPlacement(e,t),mode:`auto`,keepOffscreen:this.hasAttribute(`open`),onClosed:()=>this._onPanelClosed()}),this._panelShown=!0}_onPanelClosed(){if(!this._panelShown)return;this._panelShown=!1;let e=this._refs();e.control&&(e.control.setAttribute(`aria-expanded`,`false`),this._setActive(-1),this._nav?.clearTypeahead(),this.dispatchEvent(new CustomEvent(`wui-select:close`,{bubbles:!0})))}_open({focus:e=!0}={}){let t=this._refs();if(!t.menu||!t.control)return;let n=this._menuOpen();this._hoverOpened=!1,t.control.setAttribute(`aria-expanded`,`true`),this._query=t.input?t.input.value:``,this._ownsFilter=this._ownsFilter&&this._query!==``;let r=q(this,`.wui-select-search .wui-select-clear`,HTMLElement);if(r&&(r.hidden=!0),t.search&&(t.search.value=``),this.renderList(),n||this._showMenu(t.control,t.menu),e&&(t.search?.focus(),this._setActive(this._visible().findIndex(e=>e.classList.contains(`selected`)))),!n){this.dispatchEvent(new CustomEvent(`wui-select:open`,{bubbles:!0}));for(let e of this._activePartsList())e.onOpen?.()}}_close({force:e=!1}={}){if(!e&&this.hasAttribute(`open`))return;let t=this._refs();if(!t.menu||!t.control)return;this._hoverOpened=!1;let n=t.menu.contains(document.activeElement);A(t.menu)&&k(t.menu),this._onPanelClosed(),n&&t.control.focus()}_onQueryChange(e){this._query=e,this._setActive(-1);let t=q(this,`.wui-select-search .wui-select-clear`,HTMLElement);t&&(t.hidden=!e);let n=!1;for(let t of this._activePartsList())t.onQuery?.(e)===!0&&(n=!0);this._ownsFilter=n,this.renderList()}_pick(e){if(e.getAttribute(`aria-disabled`)===`true`)return;let t=e.dataset.custom===`true`,n=e.dataset.value??``,r=t?{value:n,label:pc(e).trim()}:this._listOptions().find(e=>String(e.value)===n)??{value:n,label:n},i=this._activePartsList().some(e=>e.onPick?.(r,{isCustom:t})===!0);K(this.mode)||(i||this.commit(n,{isCustom:t}),this._close(),this._refs().control?.focus())}_draftOpens(){return this.mode===`multiple`?this.hasAttribute(`allow-custom`):this.mode===`tag`&&Us(this)}_onKeyDown(e){if(!z(this)){for(let t of this._activePartsList())if(t.onKey?.(e)===!0)return;if(!this._menuOpen()){if(e.target instanceof HTMLInputElement){if(e.key!==`ArrowDown`||!this._draftOpens())return;this._open({focus:!1})}else{(e.key===`ArrowDown`||Mr(e)||e.key===` `)&&(e.preventDefault(),this._open({focus:!0}));return}}j(this._nav,`Listbox keys are not wired.`).handler(e)}}_wire(){this._teardown();let e=this._refs(),t=e.control,n=e.list;if(!t||!e.menu||!n)return;let r=j(q(this,`.wui-select`,HTMLElement),`The select wrapper is missing.`),i=q(this,`.wui-select-search .wui-select-clear`,HTMLElement),a=q(this,`.wui-select-reset`,HTMLElement);this._nav=Ts({getVisibleOptions:()=>this._visible(),getActive:()=>this._active,setActive:e=>this._setActive(e),onEnter:(e,t)=>{if(e)this._pick(e);else if(this._query.trim()!==``){let e=t.find(e=>e.dataset.custom===`true`);if(e)this._pick(e);else if(t.length===1){let e=t[0];e&&this._pick(e)}}},onEscape:e=>{e.preventDefault(),this._nav?.clearTypeahead(),this._close(),t.focus()}}),r.addEventListener(`keydown`,e=>this._onKeyDown(e)),r.addEventListener(`input`,e=>{let t=e.target;if(!(t instanceof HTMLInputElement)||!t.matches(`.wui-select-input, .wui-select-draft`))return;this._onQueryChange(t.value);let n=t.matches(`.wui-select-draft`),r=this._visible().length>0||this._actionRows().length>0;n&&r&&!this._menuOpen()&&!z(this)&&this._draftOpens()&&this._open({focus:!1})}),r.addEventListener(`focusout`,e=>{let t=e.relatedTarget;t instanceof Node&&this.contains(t)||!this._activePartsList().some(e=>e.onBlur?.()===!0)&&t&&this._close()}),i?.addEventListener(`click`,()=>{let t=j(e.search,`The search input is missing.`);t.value=``,this._onQueryChange(``),t.focus()}),t.addEventListener(`pointerdown`,()=>{this._pressOpen=this._menuOpen()}),t.addEventListener(`click`,e=>{if(e.target instanceof Element&&e.target.closest(`[data-remove]`))return;if(this.mode===`tag`){if(z(this))return;this._refs().input?.focus(),!this._menuOpen()&&this._draftOpens()&&this._open({focus:!1});return}if(e.target instanceof HTMLInputElement){!this._menuOpen()&&!z(this)&&this._open({focus:!1});return}let t=e.detail>0&&this._pressOpen!==null?this._pressOpen:this._menuOpen();this._pressOpen=null,this._clearHover(),this._hoverOpened&&t?(this._hoverOpened=!1,this._open({focus:!0})):t?this._close():z(this)||this._open({focus:!0})}),a?.addEventListener(`click`,e=>{e.stopPropagation(),this.commit(K(this.mode)?[]:``),this._close(),t.focus()}),n.addEventListener(`click`,n=>{let r=dc(n).closest(`.wui-select-option`);if(r instanceof HTMLElement&&(this._pick(r),K(this.mode))){let n=this.querySelector(`.wui-select-draft`);(e.search??(n instanceof HTMLElement?n:t)).focus()}}),n.addEventListener(`mousedown`,e=>{K(this.mode)&&e.target instanceof Element&&e.target.closest(`.wui-select-option`)&&e.preventDefault()}),n.addEventListener(`mousemove`,e=>{let t=dc(e).closest(`.wui-select-option`);t instanceof HTMLElement&&!t.classList.contains(`is-active`)&&this._setActive(this._visible().indexOf(t),{reveal:!1})}),n.addEventListener(`mouseleave`,()=>this._setActive(-1)),n.addEventListener(`error`,e=>{let t=e.target;t instanceof Element&&t.classList.contains(`avatar-img`)&&t.remove()},!0),this.hasAttribute(`open`)&&this._open({focus:!1})}_teardown(){this._nav?.teardown()}_dropMenu(){let e=q(this,`.wui-select-menu`,HTMLElement);e&&k(e)}_activePartsList(){return this._partsMounted?j(this._parts,`The mounted parts are missing.`):[]}_ensureParts(){if(!this.isConnected)return;let e=lc(this,this.mode),t=e.join(`,`);if(t===this._partSig)return;this._teardownParts(),this._parts=null,this._partSig=t;let n=++this._partToken;Promise.all(e.map(e=>mc(this,e))).then(e=>{n===this._partToken&&(this._parts=e.filter(e=>e!==null),this._mountParts())})}_mountParts(e={draft:``,query:``}){if(!this._parts||this._partsMounted||!this._rendered||!this.isConnected)return;this._partsMounted=!0;let t=Zs(this._refs());for(let n of this._parts)n.mount(this,t,{carry:e});this._drawValue(),this.renderList()}_teardownParts(){let e=this._activePartsList();this._partsMounted=!1;for(let t of e)t.teardown()}_remountParts(){if(!this._partsMounted)return;let e=this._carry();this._teardownParts(),this._mountParts(e)}_carry(){let e=this._refs();return{draft:e.input?.value??``,query:e.search?.value??``}}},Zs=e=>{let{control:t,value:n,menu:r,list:i}=e;return{control:j(t,`control missing`),value:j(n,`value missing`),menu:j(r,`menu missing`),list:j(i,`list missing`),search:e.search,input:e.input}},Qs=e=>Fs.includes(e),$s=[`comfortable`,`compact`],ec=150,tc=250,nc=10,rc=()=>{let e=qs();return{single:e.placeholder,search:e.placeholder,multiple:e.placeholder,tag:e.tagPlaceholder,country:e.countryPlaceholder}},ic=new Set([`countries`,`suggested`,`suggested-label`,`all-countries-label`,`max-tags`,`pattern`,`collapse-chips`,`source`,`remote`,`min-chars`]),ac=new Set([`separators`,`allow-duplicates`,`invalid-message`,`create-label`,`add-label`,`selected-text`,`clear-all-label`,`value-label`,`value-avatar`,`value-initials`,`hint-text`,`recents-key`,`recents-limit`,`recents-label`]),oc=[[`icon`,`icon`],[`description`,`description`],[`meta`,`meta`],[`group`,`group`],[`avatar`,`avatar`],[`initials`,`initials`],[`disabled-hint`,`disabledHint`]],sc=(e,t)=>t?Array.isArray(e)?e.map(String):e==null||e===``?[]:String(e).split(`,`).map(e=>e.trim()).filter(Boolean):Array.isArray(e)?e.length?String(e[0]):``:e==null?``:String(e),cc=(e,t)=>t===`multiple`?Us(e)?[`chips`,`search`]:[`chips`]:t===`search`?[`search`]:t===`country`?[`country`]:t===`tag`?Us(e)?[`chips`,`search`]:[`chips`]:[],lc=(e,t)=>e.hasAttribute(`recents-key`)?[`recents`,...cc(e,t)]:cc(e,t),uc=e=>typeof e==`object`&&!!e&&`default`in e&&typeof e.default==`function`,dc=e=>{if(e.target instanceof Element)return e.target;throw Error(`The event target is not an element.`)},q=(e,t,n)=>{let r=e.querySelector(t);return r instanceof n?r:null},fc=(e,t)=>[...e.querySelectorAll(t)].filter(e=>e instanceof HTMLElement),pc=e=>{let t=e.textContent;if(t===null)throw Error(`The element has no text.`);return t},mc=(e,t)=>Vs(t).then(e=>{if(!uc(e))throw Error(`The part ${t} has no default export.`);return e.default()}).catch(()=>(document.dispatchEvent(new CustomEvent(hi,{bubbles:!0,composed:!0,detail:{chunk:t}})),e.setError(qs().partLoadMessage),null)),hc=`wui-shortcuts-open-change`;function gc(e,t){let n=e.querySelector(t);return n instanceof HTMLElement?n:null}function _c(e,t){return[...e.querySelectorAll(t)].filter(e=>e instanceof HTMLElement)}var vc=class extends s{_doc;_onKeyDown;_onClick;_onDocClick;_onPointerDown;_onPressEnd;_pressedOpen;_pinned;_mirroring;static get observedAttributes(){return[`open`,`no-trigger`]}constructor(){super(),this._doc=null,this._pressedOpen=!1,this._pinned=!1,this._mirroring=!1,this._onKeyDown=e=>this._keydown(e),this._onClick=e=>this._click(e),this._onDocClick=e=>{let t=M(e.target,`[data-wui-shortcuts-open]`)?.getAttribute(`data-wui-shortcuts-open`);t&&this.matches(t)&&this.setOpen(!0)},this._onPointerDown=e=>{M(e.target,`.wui-shortcut-toggle`)&&(this._pressedOpen=this.open)},this._onPressEnd=e=>{e.type===`pointerup`&&M(e.target,`.wui-shortcut-toggle`)||(this._pressedOpen=!1)}}connectedCallback(){this._doc=this.ownerDocument,this._doc.addEventListener(`keydown`,this._onKeyDown),this._doc.addEventListener(`click`,this._onDocClick),this._doc.addEventListener(`pointerup`,this._onPressEnd,!0),this._doc.addEventListener(`pointercancel`,this._onPressEnd,!0),this.addEventListener(`click`,this._onClick),this.addEventListener(`pointerdown`,this._onPointerDown,!0),this.hasAttribute(`open`)&&!this.open&&(this._pinned=!0,this.setOpen(!0,{focus:!1})),this._syncTrigger()}attributeChangedCallback(e,t,n){e===`no-trigger`?this._syncTrigger():(this._mirroring||(this._pinned=n!==null),this._sheet()&&n!==null!==this.open&&this.setOpen(n!==null))}disconnectedCallback(){let e=this._sheet();e&&k(e),this._doc?.removeEventListener(`keydown`,this._onKeyDown),this._doc?.removeEventListener(`click`,this._onDocClick),this._doc?.removeEventListener(`pointerup`,this._onPressEnd,!0),this._doc?.removeEventListener(`pointercancel`,this._onPressEnd,!0),this.removeEventListener(`click`,this._onClick),this.removeEventListener(`pointerdown`,this._onPointerDown,!0),this._doc=null}get open(){let e=this._sheet();return!!(e&&A(e))}set open(e){let t=e===!0||e===``||e===`true`;this._pinned=t,this._sheet()?t!==this.open&&this.setOpen(t):this.toggleAttribute(`open`,t)}setOpen(e,{focus:t=!0}={}){let n=this._sheet();if(!n)return;let r=gc(this,`.wui-shortcut-toggle`);e||(this._pinned=!1),e?(n.removeAttribute(`hidden`),Ee(this.hasAttribute(`no-trigger`)?r??this:j(r,`<wui-shortcuts> needs its toggle to anchor the sheet.`),n,{mode:`auto`,side:`top`,align:`end`,flipAlign:!0,gap:8,keepOffscreen:this._pinned,onClosed:()=>{this._pinned=!1,this._mirror(!1)}})):k(n),this._mirror(e),t&&(e?queueMicrotask(()=>{A(n)&&gc(n,`.wui-shortcut-close`)?.focus()}):r?.focus())}_mirror(e){let t=this._sheet();t&&(t.hidden=!e),gc(this,`.wui-shortcut-toggle`)?.setAttribute(`aria-expanded`,String(e)),this.hasAttribute(`open`)!==e&&(this._mirroring=!0,this.toggleAttribute(`open`,e),this._mirroring=!1,this.dispatchEvent(new CustomEvent(hc,{bubbles:!0,detail:{open:e}})))}_sheet(){return gc(this,`.wui-shortcut-sheet`)}_syncTrigger(){let e=gc(this,`.wui-shortcut-toggle`);e&&(e.hidden=this.hasAttribute(`no-trigger`))}_scope(){let e=this.closest(`[${$e}]`);return e instanceof HTMLElement?e:null}_items(){let e=this.getAttribute(`items`);return e?_c(j(this._scope()??this._doc,`WuiShortcuts used before it was connected`),e):[]}_click(e){let t=e.target;if(t instanceof Element){if(t.closest(`.wui-shortcut-toggle`)){let e=this._pressedOpen;this._pressedOpen=!1,this.setOpen(!e&&!this.open)}else t.closest(`.wui-shortcut-close`)&&this.setOpen(!1)}}_tickFocused(){let e=this._items(),t=j(this._doc,`WuiShortcuts used before it was connected`).activeElement,n=t?.closest?.(`li, tr`),r=e.find(e=>e===t||e.contains(t)||n?.contains(e)),i=(r?.closest(`li, tr`)??r)?.querySelector(`input[type="checkbox"]`);i instanceof HTMLInputElement&&i.click()}_focusSearch(){let e=this.getAttribute(`search`);if(!e)return;let t=j(this._doc,`WuiShortcuts used before it was connected`);(gc(this._scope()??t,e)??gc(t,e))?.focus()}_keydown(e){if(e.defaultPrevented)return;let t=st(e);if(!t)return;if(t===`esc`&&this.open){e.preventDefault(),this.setOpen(!1);return}let n=this._scope(),r={help:()=>this.setOpen(!this.open)};if(this.getAttribute(`items`)&&(r.j=()=>ht(this._items(),1),r.k=()=>ht(this._items(),-1),r.x=()=>this._tickFocused()),this.getAttribute(`search`)&&(r.slash=()=>this._focusSearch()),r[t]){mt(e,r,n);return}if(t===`enter`)return;let i=j(this._doc,`WuiShortcuts used before it was connected`),a=e.target instanceof Node?e.target:null;if(ft(i)||!pt(a,n)||ut(a))return;let o=ct(t),s=_c(this,`.wui-shortcut-keys [data-shortcut]`).find(e=>e.dataset.shortcut===o);if(!s)return;let c=(n??i).querySelector(`[aria-current="true"]`)?.closest(`[data-key]`),l=c instanceof HTMLElement?c.dataset.key??null:null;if(!this.dispatchEvent(new CustomEvent(`wui:shortcut`,{bubbles:!0,cancelable:!0,detail:{key:o,itemKey:l}}))){e.preventDefault();return}let u=s.dataset.target,d=u?gc(i,u):null;d&&(e.preventDefault(),d.click())}},yc={lessLabel:`Show less`,moreLabel:`Show more`},bc=3,xc=()=>N(`showMore`,yc),Sc=class extends s{_width;_observer;_toggle;_onClick;constructor(){super(),this._width=-1,this._observer=null,this._toggle=null,this._onClick=()=>this.toggle()}connectedCallback(){let e=this.querySelector(`.wui-show-more-toggle`);if(this._toggle=e instanceof HTMLButtonElement?e:null,!this._toggle)return;let t=Number.parseInt(this.getAttribute(`lines`)??``,10);this.style.setProperty(`--wui-show-more-lines`,String(t>=1?t:bc)),this._toggle.addEventListener(`click`,this._onClick),this._sync(),this._check(),typeof ResizeObserver<`u`&&(this._observer=new ResizeObserver(()=>{this.clientWidth!==this._width&&this._check()}),this._observer.observe(this))}disconnectedCallback(){this._observer?.disconnect(),this._observer=null,this._toggle?.removeEventListener(`click`,this._onClick),this._toggle=null}get expanded(){return this.hasAttribute(`expanded`)}toggle(e=!this.expanded){this.toggleAttribute(`expanded`,!!e),this._sync(),this.dispatchEvent(new CustomEvent(`wui:show-more:toggle`,{bubbles:!0,detail:{expanded:this.expanded}}))}_sync(){let e=j(this._toggle,`WuiShowMore used before it was connected`),t=this.expanded;e.setAttribute(`aria-expanded`,String(t)),e.textContent=t?this.getAttribute(`less-label`)||xc().lessLabel:this.getAttribute(`more-label`)||xc().moreLabel}_check(){let e=this.querySelector(`.wui-show-more-body`);if(!(e instanceof HTMLElement))return;this._width=this.clientWidth;let t=this.expanded;t&&this.removeAttribute(`expanded`);let n=e.scrollHeight>e.clientHeight+1;t&&this.setAttribute(`expanded`,``);let r=j(this._toggle,`WuiShowMore used before it was connected`);r.hidden=!n}},Cc=class extends s{_measure;_resize;_mutation;_ownTabindex;constructor(){super(),this._measure=()=>this.measure(),this._resize=null,this._mutation=null,this._ownTabindex=!1}connectedCallback(){this.measure(),this.addEventListener(`mouseover`,this._measure),typeof ResizeObserver<`u`&&(this._resize=new ResizeObserver(this._measure),this._resize.observe(this)),this._mutation=new MutationObserver(this._measure),this._mutation.observe(this,{childList:!0,subtree:!0,characterData:!0})}disconnectedCallback(){this.removeEventListener(`mouseover`,this._measure),this._resize?.disconnect(),this._mutation?.disconnect(),this._resize=null,this._mutation=null}measure(){let e=this.querySelector(`.wui-truncate-text`);e&&(e.scrollWidth>e.clientWidth||e.scrollHeight>e.clientHeight?(this.setAttribute(`data-wui-tooltip`,(e.textContent??``).replace(/\s+/g,` `).trim()),this.hasAttribute(`tabindex`)||(this.setAttribute(`tabindex`,`0`),this._ownTabindex=!0)):(this.removeAttribute(`data-wui-tooltip`),this._ownTabindex&&=(this.removeAttribute(`tabindex`),!1)))}},wc=`wui-whats-new-read`,Tc=`wui-whats-new:`,Ec=`data-wui-unread`,Dc=0,Oc=e=>{let t=Date.parse(e);return Number.isNaN(t)?-1/0:t},kc=(e,t)=>Oc(t)>Oc(e)?t:e,Ac=(e,t)=>{let n=e.querySelector(t);return n instanceof HTMLElement?n:null},jc=class extends s{_doc;_stored;_observer;_onTriggerClick;_closeFocus;static get observedAttributes(){return[`storage-key`,`read-through`,`indicator`]}constructor(){super(),this._doc=null,this._stored=``,this._closeFocus=null,this._observer=null,this._onTriggerClick=()=>this.isOpen?this.close(!0):this.open()}get isOpen(){let e=this._panel;return e!==null&&A(e)}get _trigger(){return Ac(this,`.wui-whats-new-trigger`)}get _panel(){return Ac(this,`.wui-whats-new-panel`)}get _dot(){return Ac(this,`.wui-whats-new-dot`)}connectedCallback(){this._doc=this.ownerDocument;let e=this._panel,t=this._trigger;e&&t&&(e.id||=`wui-whats-new-${++Dc}`,t.setAttribute(`aria-controls`,e.id),t.setAttribute(`aria-expanded`,`false`),t.addEventListener(`click`,this._onTriggerClick),this._stored=this._load(),this._refresh(),typeof MutationObserver<`u`&&(this._observer=new MutationObserver(()=>this._refresh()),this._observer.observe(e,{childList:!0,subtree:!0})))}disconnectedCallback(){let e=this._panel;e&&(this._closeFocus=!1,k(e),this._closeFocus=null),this._observer?.disconnect(),this._observer=null,this._trigger?.removeEventListener(`click`,this._onTriggerClick),this._doc=null}attributeChangedCallback(e,t,n){t!==n&&this._doc&&(e===`storage-key`&&(this._stored=this._load()),this._refresh())}open(){let e=j(this._trigger,`<wui-whats-new> needs its trigger to open.`),t=j(this._panel,`<wui-whats-new> needs its panel to open.`);this.isOpen||(Ee(e,t,{mode:`auto`,clampHeight:!0,onClosed:()=>this._closed()}),e.setAttribute(`aria-expanded`,`true`),t.focus({preventScroll:!0}),this._markRead())}close(e){let t=this._panel;t&&this.isOpen&&(this._closeFocus=e,k(t))}_closed(){let e=this._closeFocus??this._panel?.contains(this.ownerDocument.activeElement)??!1;this._closeFocus=null,this._settle(e)}_settle(e){this._trigger?.setAttribute(`aria-expanded`,`false`),this._refresh(),e&&this._trigger?.focus()}_entries(){let e=[];for(let t of this.querySelectorAll(`.wui-whats-new-entry`))t instanceof HTMLElement&&e.push({entry:t,date:t.querySelector(`time[datetime]`)?.getAttribute(`datetime`)??``});return e}_newest(){return this._entries().reduce((e,{date:t})=>kc(e,t),``)}_seenPoint(){return kc(this._stored,this.getAttribute(`read-through`)??``)}_refresh(){let e=this._seenPoint(),t=this._entries(),n=0;for(let{entry:r,date:i}of t){let t=Oc(i)>Oc(e);t&&n++,this.isOpen&&r.hasAttribute(Ec)||r.toggleAttribute(Ec,t)}this.toggleAttribute(Ec,n>0);let r=this._dot;r&&(r.textContent=this.getAttribute(`indicator`)===`count`&&n>0?String(n):``)}_markRead(){let e=this._newest();!e||Oc(e)<=Oc(this._seenPoint())||(this._stored=kc(this._stored,e),this._save(this._stored),this._refresh(),this.dispatchEvent(new CustomEvent(wc,{bubbles:!0,detail:{through:e}})))}_storage(){let e=this.getAttribute(`storage-key`);if(!e)return null;try{let t=this.ownerDocument.defaultView;return t?{store:t.localStorage,key:Tc+e}:null}catch{return null}}_load(){let e=this._storage();return e?e.store.getItem(e.key)??``:this._stored}_save(e){let t=this._storage();t&&t.store.setItem(t.key,e)}},Mc=n({APP_BUTTON_MARKER:()=>Nc,buttonClass:()=>Lc}),Nc=`AppButton`,Pc=new Set([`primary`,`success`,`warning`,`danger`,`info`,`neutral`]),Fc={solid:e=>`btn-${e}`,soft:e=>`btn-soft-${e}`,outline:e=>`btn-outline-${e}`,ghost:e=>`btn-ghost-${e}`,link:e=>`btn-link-${e}`,glass:()=>`btn-glass`};function Ic(e){return Object.hasOwn(Fc,e)}function Lc(e=`primary`,t=`solid`,n=`md`){if(!Pc.has(e))throw RangeError(`buttonClass: unknown tone "${e}"`);if(!Ic(t))throw RangeError(`buttonClass: unknown variant "${t}"`);let r=Fc[t](e);return n===`md`?`btn ${r}`:`btn ${r} btn-${n}`}var Rc=n({COPY_FEEDBACK_MS:()=>zc,copyTextToClipboard:()=>Bc}),zc=2e3;async function Bc(e){try{if(navigator.clipboard?.writeText)return await navigator.clipboard.writeText(e),!0}catch(e){if(!(e instanceof DOMException))throw e}try{let t=document.createElement(`textarea`);t.value=e,t.style.position=`fixed`,t.style.top=`0`,t.style.left=`0`,t.style.opacity=`0`,document.body.appendChild(t),t.select();let n=document.execCommand(`copy`);return document.body.removeChild(t),!!n}catch(e){if(!(e instanceof DOMException))throw e;return!1}}var Vc=n({MENTION_ID_PATTERN:()=>Hc,mentionLabel:()=>Gc,mentionTextFromValue:()=>Jc,mentionValueFromText:()=>Yc,mentionedIds:()=>Xc,parseMentionValue:()=>qc}),Hc=/^[A-Za-z0-9_.:-]{1,64}$/,Uc=/@(\\+)\[|@\[([^[\]\n]{1,100})\]\(([A-Za-z0-9_.:-]{1,64})\)/g,Wc=/@(\\*)\[/g;function Gc(e){return String(e??``).replace(/[[\]\r\n]+/g,` `).replace(/\s+/g,` `).trim().slice(0,100)}var Kc=e=>e.replace(Wc,(e,t)=>`@\\${t}[`);function qc(e){let t=String(e??``),n=[],r=e=>{if(!e)return;let t=n[n.length-1];t&&`text`in t?t.text+=e:n.push({text:e})},i=0;for(let e of t.matchAll(Uc))r(t.slice(i,e.index)),e[1]===void 0?n.push({id:e[3]??``,label:e[2]??``}):r(`@${e[1].slice(1)}[`),i=e.index+e[0].length;return r(t.slice(i)),n}function Jc(e){let t=``,n=[];for(let r of qc(e)){if(`text`in r){t+=r.text;continue}let e=`@${r.label}`;n.push({start:t.length,end:t.length+e.length,id:r.id,label:r.label}),t+=e}return{text:t,mentions:n}}function Yc(e,t=[]){let n=String(e??``),r=[...t].sort((e,t)=>e.start-t.start),i=``,a=0;for(let e of r)e.start<a||n.slice(e.start,e.end)!==`@${e.label}`||!Hc.test(e.id)||(i+=Kc(n.slice(a,e.start)),i+=`@[${e.label}](${e.id})`,a=e.end);return i+Kc(n.slice(a))}function Xc(e){let t=[];for(let n of qc(e))`id`in n&&!t.includes(n.id)&&t.push(n.id);return t}var Zc=n({bindMenuKeys:()=>nl}),Qc=500,$c=10,el=new Set([`INPUT`,`TEXTAREA`,`SELECT`]);function tl(e){return e instanceof HTMLElement?el.has(e.tagName)||e.isContentEditable:!1}function nl(e,t){let{items:n,typeahead:r=!0}=t,i=``,a=null,o=()=>{a!==null&&clearTimeout(a),a=null,i=``},s=e=>{let t=n().filter(Ea),s=t.length;if(s===0)return;let c=e.target,l=t.findIndex(e=>c instanceof Node&&e.contains(c)),u=n=>{e.preventDefault(),e.stopPropagation(),t[n]?.focus()},d=tl(c);if(e.key===`ArrowDown`){u(l<0?0:(l+1)%s);return}if(e.key===`ArrowUp`){u(l<0?s-1:(l-1+s)%s);return}if(e.key===`Home`&&!d){u(0);return}if(e.key===`End`&&!d){u(s-1);return}if(e.key===`PageDown`){u(Math.min((l<0?-1:l)+$c,s-1));return}if(e.key===`PageUp`){u(Math.max((l<0?s:l)-$c,0));return}if(!r||!/^\S$/.test(e.key)||e.ctrlKey||e.metaKey||e.altKey||d)return;e.preventDefault(),e.stopPropagation(),a!==null&&clearTimeout(a),i+=e.key.toLowerCase(),a=setTimeout(o,Qc);let f=i.length>1&&i.split(``).every(e=>e===i[0]),p=f?i[0]??``:i,m=i.length===1||f?l+1:Math.max(l,0);for(let e=0;e<s;e++){let n=(m+e)%s;if((t[n]?.textContent??``).trim().toLowerCase().startsWith(p)){t[n]?.focus();return}}};return e.addEventListener(`keydown`,s),()=>{e.removeEventListener(`keydown`,s),o()}}var rl=n({deriveStepStatus:()=>il,stepperHeaderItems:()=>al});function il(e,t){return typeof t==`number`?e<t?`done`:e===t?`active`:`pending`:`pending`}function al(e,t){let{statusOf:n,journey:r,connectors:i}=t;return e.map((t,a)=>{let o=n(a),s;return s=o===`done`?{icon:`check`}:o===`error`?{icon:`alert-triangle`}:o===`skipped`?{icon:`minus`}:t.icon?{icon:t.icon}:{number:a+1},{index:a,status:o,className:o===`pending`?`step`:`step ${o}`,glyph:s,current:o===`active`,line:r&&i&&a<e.length-1?{done:o===`done`}:null}})}var ol={selectAllLabel:`Select all rows`,selectRowLabel:`Select row`},sl=n({SELECT_CELL_CLASS:()=>J,addRowSelectCells:()=>gl,addSelectColumn:()=>_l,attachShiftRange:()=>bl,createSelectHeaderCell:()=>ul,createSelectRowCell:()=>dl,createSelectSpacerCell:()=>fl,syncSelectAll:()=>vl}),cl=()=>N(`tableSelect`,ol),J=`wui-select-cell`,ll=(e,t)=>{let n=e.createElement(`input`);return n.type=`checkbox`,n.className=`wui-check`,n.setAttribute(`aria-label`,t),n};function ul(e=document){let t=e.createElement(`th`);return t.className=J,t.appendChild(ll(e,cl().selectAllLabel)),t}function dl(e=document,{disabled:t=!1}={}){let n=e.createElement(`td`);n.className=J;let r=ll(e,cl().selectRowLabel);return r.disabled=t,n.appendChild(r),n}function fl(e=document){let t=e.createElement(`td`);return t.className=J,t}var pl=e=>e.firstElementChild?.classList.contains(J),ml=e=>e.matches(`.wui-group-row, .wui-virtual-spacer, .wui-row-expanded`),hl=(e,t,n)=>[...e.querySelectorAll(t)].filter(e=>e instanceof n);function gl(e){for(let t of e){if(pl(t)||ml(t))continue;let e=t.getAttribute(`data-row-selectable`)===`false`;t.insertBefore(dl(t.ownerDocument,{disabled:e}),t.firstChild)}}function _l(e){let t=e.querySelector(`thead tr`);if(!(t instanceof HTMLTableRowElement))return null;pl(t)||t.insertBefore(ul(e.ownerDocument),t.firstChild),gl(hl(e,`tbody tr`,HTMLTableRowElement));for(let t of hl(e,`tfoot tr`,HTMLTableRowElement))pl(t)||t.insertBefore(fl(e.ownerDocument),t.firstChild);let n=t.querySelector(`.${J} .wui-check`);return n instanceof HTMLInputElement?n:null}function vl(e){let t=e.querySelector(`thead .${J} .wui-check`),n=hl(e,`tbody tr .wui-check:not(:disabled)`,HTMLInputElement),r=n.length,i=n.filter(e=>e.checked).length;t instanceof HTMLInputElement&&(t.checked=r>0&&i===r,t.indeterminate=i>0&&i<r);for(let t of hl(e,`tbody tr`,HTMLTableRowElement)){let e=t.querySelector(`.wui-check`);t.classList.toggle(`is-selected`,e instanceof HTMLInputElement&&e.checked)}return{selected:i,total:r}}var yl=`tbody .${J} .wui-check:not(:disabled)`;function bl(e,t){let n=null,r=e=>e instanceof Element&&e.matches(`.wui-select-cell .wui-check:not(:disabled)`)&&!!e.closest(`tbody`);e.addEventListener(`mousedown`,e=>{e.shiftKey&&r(e.target)&&e.preventDefault()}),e.addEventListener(`click`,i=>{let a=i.target;if(r(a)){if(i.shiftKey&&n?.isConnected&&n!==a){let r=hl(e,yl,HTMLInputElement),i=r.indexOf(n),o=r.indexOf(a);if(i>=0&&o>=0){let e=[];for(let t of r.slice(Math.min(i,o),Math.max(i,o)+1))t!==a&&t.checked!==a.checked&&(t.checked=a.checked,e.push(t));e.length&&t?.(e,a.checked)}}n=a}})}var xl=n({DRAWER_TEXT:()=>Sl}),Sl={closeLabel:`Close`,confirmDiscard:`Discard your changes?`,discardLabel:`Discard`,keepLabel:`Keep editing`,screenText:`{now}% of the screen`,sheetHeightLabel:`Sheet height`},Cl=n({matchSegments:()=>wl});function wl(e,t){let n=String(e??``),r=String(t??``).trim();if(!r||!n)return[{text:n,match:!1}];let i=n.toLowerCase(),a=r.toLowerCase();if(i.length!==n.length)return[{text:n,match:!1}];let o=[],s=0,c=i.indexOf(a,s);for(;c!==-1;)c>s&&o.push({text:n.slice(s,c),match:!1}),o.push({text:n.slice(c,c+a.length),match:!0}),s=c+a.length,c=i.indexOf(a,s);return s<n.length&&o.push({text:n.slice(s),match:!1}),o}var Tl=n({TOOLTIP_ATTRIBUTE:()=>El,TOOLTIP_CLASS_ATTRIBUTE:()=>Ol,TOOLTIP_HTML_ATTRIBUTE:()=>kl,TOOLTIP_ID_ATTRIBUTE:()=>Al,TOOLTIP_OPEN_ATTRIBUTE:()=>jl,TOOLTIP_PLACEMENT_ATTRIBUTE:()=>Dl,showPinnedTooltips:()=>Nl,wireTooltips:()=>Ml}),El=`data-wui-tooltip`,Dl=`data-wui-tooltip-placement`,Ol=`data-wui-tooltip-class`,kl=`data-wui-tooltip-html`,Al=`data-wui-tooltip-id`,jl=`data-wui-tooltip-open`;function Ml(e){Ll.has(e)||(Ll.add(e),e.addEventListener(`pointerover`,t=>{let n=Hl(t.target);n&&!Wl(e,n)&&ql(e,n,!1)}),e.addEventListener(`pointerout`,t=>{let n=zl(e).transient;n&&Hl(t.target)===n.trigger&&(t.relatedTarget instanceof Node&&n.trigger.contains(t.relatedTarget)||Jl(e,n))}),e.addEventListener(`focusin`,t=>{let n=t.target;if(!(n instanceof Element)||!n.matches(`:focus-visible`))return;let r=Hl(n);r&&!Wl(e,r)&&ql(e,r,!1)}),e.addEventListener(`focusout`,t=>{let n=zl(e).transient;n&&Hl(t.target)===n.trigger&&(t.relatedTarget instanceof Node&&n.trigger.contains(t.relatedTarget)||Jl(e,n))}),e.addEventListener(`click`,t=>{let n=zl(e).transient;n&&Hl(t.target)===n.trigger&&Jl(e,n)}))}function Nl(e){let t=e instanceof Document?e:e.ownerDocument;for(let n of e.querySelectorAll(`[${jl}]`))ql(t,n,!0)}var Pl=[`top`,`bottom`,`start`,`end`],Fl=`wui-tooltip`,Il=`[${El}], [${Al}]`,Ll=new WeakSet,Rl=new WeakMap;function zl(e){let t=Rl.get(e);return t||(t={bubble:null,transient:null,pinned:new Map,pinnedCount:0,onEscape:t=>{t.key===`Escape`&&(t.preventDefault(),t.stopPropagation(),Yl(e))}},Rl.set(e,t)),t}function Bl(e){return Pl.includes(e)}function Vl(e){return e===`auto`||Bl(e)}function Hl(e){if(!(e instanceof Element))return null;let t=e.closest(Il);return t instanceof HTMLElement?t:null}function Ul(e,t){return e.transient?.trigger===t?e.transient:e.pinned.get(t)}function Wl(e,t){return Ul(zl(e),t)!==void 0}function Gl(e,t){let n=e.createElement(`div`);n.id=t,n.setAttribute(`role`,`tooltip`),n.setAttribute(`popover`,`manual`);let r=e.createElement(`div`);r.className=`tooltip-arrow`;let i=e.createElement(`div`);return i.className=`tooltip-inner`,n.append(r,i),{el:n,arrow:r,inner:i}}function Kl(e,t){return t.bubble||=Gl(e,Fl),t.bubble}function ql(e,t,n){let r=t.getAttribute(El),i=t.getAttribute(Al);if(r===null&&i===null)throw Error(`a tooltip trigger carries ${El} or ${Al}`);if(r!==null&&i!==null)throw Error(`a tooltip trigger carries ${El} or ${Al}, not both`);let a=t.getAttribute(`data-wui-tooltip-placement`)??`top`;if(!Vl(a))throw Error(`${Dl} "${a}" is not auto, top, bottom, start or end`);let o=zl(e);Jl(e,n?o.pinned.get(t):o.transient);let s,c=null,l=null,u=!1;if(i!==null){let t=e.getElementById(i);if(!(t instanceof HTMLElement))throw Error(`no element with id "${i}" for a tooltip`);s=t,c=e.createComment(`wui-tooltip`),s.replaceWith(c),l=s.getAttribute(`popover`),s.setAttribute(`popover`,`manual`)}else{let i=n?Gl(e,`${Fl}-pinned-${++o.pinnedCount}`):Kl(e,o);u=n;let c=t.getAttribute(`data-wui-tooltip-class`)??``;i.el.className=`tooltip wui-tooltip bs-tooltip-${a} ${c}`.trim(),t.hasAttribute(`data-wui-tooltip-html`)?i.inner.innerHTML=r??``:i.inner.textContent=r??``,s=i.el}let d=t.getAttribute(`aria-describedby`);t.setAttribute(`aria-describedby`,s.id);let f=()=>x(t,s,{side:a,align:`center`,gap:6,arrow:s.querySelector(`.tooltip-arrow`)});Ae(e).append(s),s.showPopover(),f();let p=je(e=>{s.parentElement!==e&&e.append(s),Oe(s),f()},e),m=new MutationObserver(()=>{t.isConnected||Jl(e,Ul(zl(e),t))});m.observe(e,{childList:!0,subtree:!0});let h={el:s,trigger:t,pinned:n,own:u,home:c,popover:l,describedBy:d,watch:m,unroot:p};n?o.pinned.set(t,h):o.transient=h,e.addEventListener(`keydown`,o.onEscape,!0)}function Jl(e,t){if(!t)return;let n=zl(e);t.pinned?n.pinned.delete(t.trigger):n.transient=null,!n.transient&&n.pinned.size===0&&e.removeEventListener(`keydown`,n.onEscape,!0),t.watch.disconnect(),t.unroot(),t.el.hidePopover(),t.home?(t.popover===null?t.el.removeAttribute(`popover`):t.el.setAttribute(`popover`,t.popover),t.home.replaceWith(t.el)):t.own&&t.el.remove(),t.describedBy===null?t.trigger.removeAttribute(`aria-describedby`):t.trigger.setAttribute(`aria-describedby`,t.describedBy)}function Yl(e){let t=zl(e);Jl(e,t.transient);for(let n of[...t.pinned.values()])Jl(e,n)}var Xl=Object.freeze({anchorOverlay:c,buttonClass:Mc,calendarMath:Vr,copyText:Rc,dataTable:Hn,defineElement:r,devWarn:si,dom:Ne,drawerText:xl,elementBase:a,fieldState:Xr,formatters:Kt,formMirror:ei,glyphs:Fi,iconGlyphs:Fi,imeSafeEnter:jr,isDrawn:Ta,listboxKeyNav:Cs,loader:pi,mentionText:Vc,menuKeyNav:Zc,nativeOverlay:ee,notificationDays:Oa,optionLabel:Ki,partRegistry:Is,selectList:ks,selectRemote:Hs,selectText:Ds,stepperHeader:rl,tableSelect:sl,textMatch:Cl,textStore:Fe,tooltips:Tl,wuiHttp:Ha,WuiSelect:Ks,zone:Pt}),Zl={avatarCropFailed:`That photo could not be saved. Try again, or choose another one.`,avatarDialogSubtitle:`Drag to position the photo, then zoom or rotate it.`,avatarDialogTitle:`Edit photo`,avatarSave:`Save photo`,cameraLabel:`Take photo`,cancel:`Cancel`,changeLabel:`Change photo`,closeLabel:`Close`,cropFailed:`That image could not be cropped. Choose another one.`,dialogSubtitle:`Drag the frame and zoom to choose what to keep.`,dialogTitle:`Crop photo`,heicUnreadableMessage:`This browser cannot open HEIC photos. Choose a JPG, PNG or WebP image instead.`,optionalLabel:`(optional)`,overlayLabel:`Update photo`,photoUnreadableMessage:`That photo could not be opened. Choose a JPG, PNG or WebP image.`,removeLabel:`Remove photo`,save:`Apply`,unreadable:`That image could not be opened. Choose another one.`,uploadLabel:`Upload photo`},Ql=`image/jpeg,image/png,image/webp,image/heic,image/heif,.heic,.heif`,$l=10,eu=512,tu=`image/webp`,nu=[96,48];function ru(e){if(!e)return!1;let t=String(e.type||``).toLowerCase();return t===`image/heic`||t===`image/heif`||/\.hei[cf]$/i.test(String(e.name||``))}function iu(e){let t=N(`imagePicker`,Zl);return ru(e)?t.heicUnreadableMessage:t.photoUnreadableMessage}function au(e,t){let n=Number(t);return{name:e?.name||`photo`,type:tu,size:Number.isInteger(n)&&n>0?n:512}}var ou=`/`,su=`.search-wrap.wui-search-collapsible`,cu=`.wui-topsearch-panel`,lu=`.modal, wui-drawer[open]`,uu=new WeakSet,du=e=>{let t=e.querySelector(`.wui-search-toggle`);return t instanceof HTMLElement?t:null},fu=e=>{let t=e.querySelector(`.search-input`);return t instanceof HTMLInputElement?t:null},pu=e=>[...e.querySelectorAll(su)].filter(e=>e instanceof HTMLElement);function mu(e){e.classList.remove(`is-collapsed`),du(e)?.setAttribute(`aria-expanded`,`true`),fu(e)?.focus()}function hu(e){fu(e)?.value||(e.classList.add(`is-collapsed`),du(e)?.setAttribute(`aria-expanded`,`false`))}function gu(e){if(e.dataset.wuiCollapseWired)return;e.dataset.wuiCollapseWired=`1`;let t=du(e),n=fu(e);t?.addEventListener(`click`,()=>mu(e)),n?.addEventListener(`keydown`,r=>{r.key!==`Escape`||n?.value||(r.preventDefault(),hu(e),t?.focus())}),e.addEventListener(`focusout`,t=>{let n=t.relatedTarget;n instanceof Node&&e.contains(n)||hu(e)})}function _u(e){uu.has(e)||(uu.add(e),e.addEventListener(`keydown`,t=>{if(t.key!==`/`||t.ctrlKey||t.altKey||t.metaKey||t.defaultPrevented||ut(t.target instanceof Node?t.target:null)||t.target instanceof Element&&t.target.closest(lu)||e.querySelector(cu))return;let n=pu(e).find(e=>e.offsetParent!==null);n&&(t.preventDefault(),mu(n))}))}function vu(e=document){let t=e;for(let e of pu(t))gu(e);_u(e instanceof Element?e.ownerDocument:e)}var yu=`data-wui-command-shortcut`,bu=`k`,xu=new WeakSet;function Su(e,t){return!(e.ctrlKey||e.metaKey)||e.altKey||e.shiftKey||e.repeat?!1:String(e.key).toLowerCase()===String(t).toLowerCase()}function Cu(e){return e.nodeType===Node.DOCUMENT_NODE}function wu(e){e.closest(`wui-modal`)?.show()}function Tu(e){let t=Cu(e)?e:e.ownerDocument;!xu.has(t)&&e.querySelector(`[data-wui-command-shortcut]`)&&(xu.add(t),t.addEventListener(`keydown`,e=>{for(let n of t.querySelectorAll(`[${yu}]`))if(Su(e,n.getAttribute(`data-wui-command-shortcut`)||bu)){e.preventDefault(),n.localName===`wui-command-palette`||n.localName===`wui-modal`?wu(n):(n.focus(),`select`in n&&typeof n.select==`function`&&n.select());return}}))}var Eu={audioLabel:`audio`,byteLabel:`B`,chooseText:`Choose {label}.`,gigabyteLabel:`GB`,imagesLabel:`images`,keepFileUnderMbText:`Keep the file under {maxSizeMb} MB.`,kilobyteLabel:`KB`,megabyteLabel:`MB`,orText:`{names} or {last}`,supportedLabel:`supported`,textFileLabel:`text file`,videosLabel:`videos`},Du=()=>N(`fileValidation`,Eu),Ou=`image/png,image/jpeg,image/webp`,ku=5,Au={"image/png":[`.png`],"image/jpeg":[`.jpg`,`.jpeg`],"image/webp":[`.webp`],"image/gif":[`.gif`],"image/svg+xml":[`.svg`],"image/heic":[`.heic`],"image/heif":[`.heif`],"application/pdf":[`.pdf`],"text/plain":[`.txt`]},ju={"image/png":`PNG`,"image/jpeg":`JPG`,"image/webp":`WEBP`,"image/gif":`GIF`,"image/svg+xml":`SVG`,"image/heic":`HEIC`,"image/heif":`HEIC`,"application/pdf":`PDF`,".png":`PNG`,".jpg":`JPG`,".jpeg":`JPG`,".webp":`WEBP`,".gif":`GIF`,".svg":`SVG`,".heic":`HEIC`,".heif":`HEIC`,".pdf":`PDF`},Mu={"text/plain":`textFileLabel`,".txt":`textFileLabel`,"image/*":`imagesLabel`,"video/*":`videosLabel`,"audio/*":`audioLabel`},Nu=new Set([`image/*`,`video/*`,`audio/*`]),Pu=e=>{let t=Mu[e];return t?Du()[t]:ju[e]},Fu=e=>String(e||``).split(`,`).map(e=>e.trim().toLowerCase()).filter(Boolean),Iu=[`.png`,`.jpg`,`.jpeg`,`.webp`,`.gif`,`.svg`,`.bmp`,`.avif`,`.heic`,`.heif`];function Lu(e){if(!e)return!1;let t=typeof e==`object`&&e.type?String(e.type).toLowerCase():``;if(t)return t.startsWith(`image/`);let n=typeof e==`string`?e:e.name||e.url||``,r=String(n).toLowerCase();return Iu.some(e=>r.endsWith(e))}var Ru=[`kilobyteLabel`,`megabyteLabel`,`gigabyteLabel`];function zu(e){if(e<1024)return`${e} ${Du().byteLabel}`;let t=e/1024,n=0;for(;t>=1024&&n<Ru.length-1;)t/=1024,n+=1;return`${t.toFixed(1)} ${Du()[Ru[n]??`gigabyteLabel`]}`}function Bu(e){if(!e)return!1;let t=typeof e==`object`&&e.type?String(e.type).toLowerCase():``;if(t)return t===`application/pdf`;let n=typeof e==`string`?e:e.name||e.url||``;return String(n).toLowerCase().replace(/[?#][\s\S]*$/,``).endsWith(`.pdf`)}function Vu(e){let t=Fu(e);return t.length?t.every(e=>e.startsWith(`.`)?Iu.includes(e):e===`image/*`||e.startsWith(`image/`)):!1}function Hu(e){let t=[];for(let n of Fu(e)){let e=Pu(n)||(n.startsWith(`.`)?n.slice(1).toUpperCase():n.toUpperCase());t.includes(e)||t.push(e)}return t.length<=1?t[0]||Du().supportedLabel:P(Du().orText,{names:t.slice(0,-1).join(`, `),last:t.slice(-1).join(``)})}function Uu(e,t){let n=Fu(t);if(!n.length)return!0;let r=(e.type||``).toLowerCase(),i=(e.name||``).toLowerCase();return n.some(e=>e.startsWith(`.`)?i.endsWith(e):e.endsWith(`/*`)?r.startsWith(e.slice(0,-1)):r&&r===e?!0:!r&&(Au[e]||[]).some(e=>i.endsWith(e)))}function Wu(e,t={}){if(!e)return null;let n=t.accept===void 0?Ou:t.accept,r=t.maxSizeMb===void 0?5:t.maxSizeMb;if(!Uu(e,n)){let e=Hu(n),t=Fu(n).map(e=>Nu.has(e));return t.every(Boolean)?P(Du().chooseText,{label:e}):t.some(Boolean)?P(Du().chooseText,{label:e.endsWith(` file`)?`${e}s`:`${e} files`}):P(Du().chooseText,{label:`a ${e.endsWith(` file`)?e:`${e} file`}`})}return r!==null&&r>0&&e.size>r*1024*1024?P(Du().keepFileUnderMbText,{maxSizeMb:r}):null}function Gu(e,t){let n=Array.from(e||[]),r=t.multiple?n:n.slice(0,1),i=[],a=[];for(let e of r){let n=Wu(e,{accept:t.accept,maxSizeMb:t.maxSizeMb});n?a.push({file:e,message:n}):i.push(e)}return{files:i,rejections:a}}function Ku(e,t){let{overClass:n,isDisabled:r=()=>!1,onFiles:i,onReject:a,...o}=t,s=0,c=t=>e.classList.toggle(n,t),l=e=>{e.preventDefault(),r()||(s+=1,c(!0))},u=e=>{e.preventDefault(),r()||c(!0)},d=e=>{e.preventDefault(),r()||(s=Math.max(0,s-1),s===0&&c(!1))},f=e=>{if(e.preventDefault(),s=0,c(!1),r())return;let{files:t,rejections:n}=Gu(e.dataTransfer?.files,o);t.length&&i(t);let l=n[0];l&&a(l)};return e.addEventListener(`dragenter`,l),e.addEventListener(`dragover`,u),e.addEventListener(`dragleave`,d),e.addEventListener(`drop`,f),()=>{e.removeEventListener(`dragenter`,l),e.removeEventListener(`dragover`,u),e.removeEventListener(`dragleave`,d),e.removeEventListener(`drop`,f)}}var qu={aadhaarMessage:`Enter a valid 12-digit Aadhaar number`,amountMessage:`Enter a valid amount`,dateMessage:`Enter a valid date as DD-MM-YYYY`,gstinMessage:`Enter a valid GSTIN`,ifscMessage:`Enter a valid IFSC`,incompleteMessage:`Enter the full value`,panMessage:`Enter a valid PAN`,phoneInMessage:`Enter a 10-digit mobile number`,pinCodeMessage:`Enter a valid 6-digit PIN code`},Ju=/[0-9]/,Yu={9:Ju,A:/[A-Za-z]/,"*":/[0-9A-Za-z]/},Xu=/[9A*]/,Zu=new Set([`text`,`tel`,`search`,`url`,`password`]),Qu=e=>{let t=e.replace(/\D/g,``);return t.length===12&&t.startsWith(`91`)?t.slice(2):t.length===11&&t.startsWith(`0`)?t.slice(1):e},$u=e=>{let t=Number(e.slice(0,2)),n=Number(e.slice(2,4)),r=Number(e.slice(4,8));if(r<1)return!1;let i=new Date(Date.UTC(r,n-1,t));return i.getUTCFullYear()===r&&i.getUTCMonth()===n-1&&i.getUTCDate()===t},ed=e=>e.length<=3?e:`${e.slice(0,-3).replace(/\B(?=(\d{2})+(?!\d))/g,`,`)},${e.slice(-3)}`,td=e=>{let t=/^(\d{4})-(\d{2})-(\d{2})$/.exec(e.trim());return t?`${t[3]}-${t[2]}-${t[1]}`:e},nd=()=>N(`inputMask`,qu);function rd(e,{upper:t=!1,normalize:n,valid:r,post:i=e=>e,message:a=nd().incompleteMessage}={}){let o=[...e].map(e=>{let t=Yu[e];return t?{re:t}:{lit:e}}),s=o.filter(e=>e.re).length;return{inputMode:o.every(e=>!e.re||e.re===Ju)?`numeric`:`text`,normalize:n,post:i,message:a,extract(e){let n=``,r=0;for(let i of e){for(;r<o.length&&o[r]?.lit!==void 0&&o[r]?.lit!==i;)r++;if(r>=o.length)break;let e=o[r];e?.lit===void 0?e?.re.test(i)&&(n+=t?i.toUpperCase():i,r++):r++}return n},layout(e){let t=``,n=[],r=0;for(let i=0;i<o.length&&r<e.length;i++){let a=o[i];a?.lit===void 0?(t+=e.charAt(r++),n.push(!0)):(t+=a.lit,n.push(!1))}return{text:t,isRaw:n}},isValid:e=>e.length===s&&(!r||r(e))}}function id(){return{inputMode:`decimal`,post:e=>e,message:nd().amountMessage,extract(e){let t=``,n=!1,r=0;for(let i of e)Ju.test(i)?n?r<2&&(t+=i,r++):t+=i:i===`.`&&!n&&(n=!0,t+=i);return t.startsWith(`.`)&&(t=`0${t}`),t.replace(/^0+(?=\d)/,``)},layout(e){let[t=``,n]=e.split(`.`),r=ed(t)+(e.includes(`.`)?`.${n}`:``);return{text:r,isRaw:[...r].map(e=>e!==`,`)}},isValid:e=>/^\d+(\.\d{1,2})?$/.test(e)}}var ad={"phone-in":()=>rd(`99999 99999`,{normalize:Qu,valid:e=>/^[6-9]/.test(e),message:nd().phoneInMessage}),pan:()=>rd(`AAAAA9999A`,{upper:!0,valid:e=>/^[A-Z]{5}\d{4}[A-Z]$/.test(e),message:nd().panMessage}),gstin:()=>rd(`99AAAAA9999A***`,{upper:!0,valid:e=>/^\d{2}[A-Z]{5}\d{4}[A-Z][1-9A-Z]Z[0-9A-Z]$/.test(e),message:nd().gstinMessage}),aadhaar:()=>rd(`9999 9999 9999`,{valid:e=>/^[2-9]/.test(e),message:nd().aadhaarMessage}),ifsc:()=>rd(`AAAA*******`,{upper:!0,valid:e=>/^[A-Z]{4}0[A-Z0-9]{6}$/.test(e),message:nd().ifscMessage}),"pin-code":()=>rd(`999999`,{valid:e=>/^[1-9]/.test(e),message:nd().pinCodeMessage}),date:()=>rd(`99-99-9999`,{normalize:td,valid:$u,post:(e,t)=>e.length===8&&$u(e)?`${e.slice(4)}-${e.slice(2,4)}-${e.slice(0,2)}`:t,message:nd().dateMessage}),amount:id},od=Object.keys(ad),sd=e=>{let t=String(e).toLowerCase();return Object.hasOwn(ad,t)?t:void 0},cd=e=>Xu.test(String(e))&&sd(e)===void 0,ld=new Map;We(()=>ld.clear());function ud(e){if(e==null||e===``)return null;let t=String(e),n=ld.get(t);return n===void 0&&(n=cd(t)?rd(t):Object.hasOwn(ad,t)?ad[t]?.()??null:null,ld.set(t,n)),n}var dd=(e,t)=>e.normalize?e.normalize(t):t;function fd(e,t){let n=ud(e);return n?n.extract(dd(n,String(t??``))):String(t??``)}function pd(e,t){let n=ud(e);if(!n)return String(t??``);let r=n.extract(dd(n,String(t??``)));return n.post(r,n.layout(r).text)}function md(e,t){let n=ud(e);return n?n.layout(n.extract(dd(n,String(t??``)))).text:String(t??``)}var hd=(e,t)=>{if(t<=0)return 0;let n=0;for(let r=0;r<e.length;r++)if(e[r]&&++n===t)return r+1;return e.length},gd=new WeakMap,_d=e=>gd.get(e)?.(),vd=new WeakMap;function yd(e,t,n,r){let i=e.getAll(t),a=vd.get(e)??new Set;vd.set(e,a);let o=i.findIndex((e,r)=>e===n&&!a.has(`${t}\u0000${r}`));if(!(o<0)){if(a.add(`${t}\u0000${o}`),i[o]=r,i.length===1)e.set(t,r);else{e.delete(t);for(let n of i)e.append(t,n)}}}function bd(e){let t=null,n=null,r=!1,i=(t,n)=>{n===null?e.removeAttribute(t):n!==void 0&&e.setAttribute(t,n)},a,o,s=()=>{t?.remove(),t=null,n&&(n.hidden=!1),n=null,r&&e.classList.remove(`error`),r=!1,i(`aria-invalid`,a),i(`aria-describedby`,o),a=void 0,o=void 0};return i=>{if(!i){s();return}let c=e.closest(`.field`),l=c instanceof HTMLElement?c:null,u=l?.querySelector(`.field-error`);if(!(u&&u!==t&&u.textContent?.trim())){if(!t){if(r=!e.classList.contains(`error`),e.classList.add(`error`),a=e.getAttribute(`aria-invalid`),o=e.getAttribute(`aria-describedby`),l){t=document.createElement(`div`),t.className=`field-error`,e.id&&(t.id=`${e.id}-error`);let r=l.querySelector(`.field-hint`);n=r instanceof HTMLElement?r:null,n&&(n.hidden=!0),l.insertBefore(t,[...l.children].find(e=>e.classList.contains(`field-count`))??null),t.id&&e.setAttribute(`aria-describedby`,t.id)}e.setAttribute(`aria-invalid`,`true`)}t&&(t.textContent=i)}}}function xd(e,{mask:t,postFormatted:n=!1,onChange:r,onInvalidChange:i}={}){let a=ud(t);if(!a||!Zu.has(e.type))return()=>{};let o=Object.getPrototypeOf(e),s=Object.getOwnPropertyDescriptor(o,`value`);if(!s?.set)throw Error(`input value setter missing`);let c=s.set,l=!e.hasAttribute(`inputmode`);l&&e.setAttribute(`inputmode`,a.inputMode);let u=i??bd(e),d=null,f=!1,p=!1,m=!1,h=``,g=``,_,v=()=>{let e=m?h:``;e!==g&&(g=e,u(g))},y=(t,n,i)=>{let o=a.extract(t.slice(0,n)).length,s=a.extract(t),{text:l,isRaw:u}=a.layout(s);if(e.value!==l&&(c.call(e,l),document.activeElement===e&&Zu.has(e.type))){let t=hd(u,o);e.setSelectionRange(t,t)}e.dataset.maskRaw=s,h=s&&!a.isValid(s)?a.message:``,e.setCustomValidity(h),v(),i&&s!==d&&r?.(s,l),d=s},b=Object.getOwnPropertyDescriptor(e,`value`),x=b??s;Object.defineProperty(e,"value",{configurable:!0,...x.enumerable===void 0?{}:{enumerable:x.enumerable},get:()=>j(x.get,`input value getter missing`).call(e),set:t=>{if(j(x.set,`input value setter missing`).call(e,t),p)return;let n=dd(a,e.value);y(n,n.length,!0)}});let S=()=>{f=!0,e.dispatchEvent(new Event(`input`,{bubbles:!0})),f=!1},C=t=>{let n=t instanceof InputEvent?t:null;if(f||p||n?.isComposing)return;let r=n?.inputType===`insertText`&&(n.data?.length??0)<=1||n?.inputType?.startsWith(`delete`)?e.value:dd(a,e.value);y(r,e.selectionStart??r.length,!0)},ee=()=>{p=!0},w=()=>{p=!1;let t=dd(a,e.value);y(t,e.selectionStart??t.length,!0),S()},T=t=>{let n=t.inputType===`deleteContentBackward`;if(!n&&t.inputType!==`deleteContentForward`||t.isComposing)return;let r=e.selectionStart;if(r==null||r!==e.selectionEnd)return;let{isRaw:i}=a.layout(a.extract(e.value)),o=n?r-1:r;for(;o>=0&&o<i.length&&!i[o];)o+=n?-1:1;o!==(n?r-1:r)&&(t.preventDefault(),o<0||o>=i.length||(y(e.value.slice(0,o)+e.value.slice(o+1),n?o:r,!0),S()))},E=t=>{if(e.readOnly||e.disabled)return;let n=t.clipboardData?.getData(`text`);if(n==null)return;t.preventDefault();let r=dd(a,n),i=e.selectionStart??e.value.length,o=e.selectionEnd??i;y(e.value.slice(0,i)+r+e.value.slice(o),i+r.length,!0),S()},te=()=>{let t=a.extract(e.value);return a.post(t,a.layout(t).text)},D=()=>{m=!0,v()};e.addEventListener(`input`,C),e.addEventListener(`beforeinput`,T),e.addEventListener(`paste`,E),e.addEventListener(`compositionstart`,ee),e.addEventListener(`compositionend`,w),e.addEventListener(`blur`,D),e.addEventListener(`invalid`,D);let ne=e.form,re=t=>{e.name&&!e.disabled&&yd(t.formData,e.name,e.value,te())},ie=()=>{clearTimeout(_),_=setTimeout(()=>{m=!1,y(dd(a,e.value),e.value.length,!0)},0)};n||(ne?.addEventListener(`formdata`,re),gd.set(e,te)),ne?.addEventListener(`reset`,ie),ne?.addEventListener(`submit`,D);let ae=dd(a,e.value);return y(ae,ae.length,!1),()=>{clearTimeout(_),e.removeEventListener(`input`,C),e.removeEventListener(`beforeinput`,T),e.removeEventListener(`paste`,E),e.removeEventListener(`compositionstart`,ee),e.removeEventListener(`compositionend`,w),e.removeEventListener(`blur`,D),e.removeEventListener(`invalid`,D),ne?.removeEventListener(`formdata`,re),ne?.removeEventListener(`reset`,ie),ne?.removeEventListener(`submit`,D),gd.delete(e),b?Object.defineProperty(e,"value",b):Reflect.deleteProperty(e,`value`),m=!1,h=``,v(),e.setCustomValidity(``),delete e.dataset.maskRaw,l&&e.removeAttribute(`inputmode`)}}function Sd(){let e=typeof window>`u`?void 0:window.jQuery?.validator?.prototype;if(!e||e.wuiMaskHook)return;let t=e.elementValue;e.elementValue=function(e){let n=_d(e);return n===void 0?t.call(this,e):n},e.wuiMaskHook=!0}var Cd=new WeakMap,wd,Td=e=>{Cd.has(e)||Cd.set(e,xd(e,{mask:e.dataset.appMask,postFormatted:e.hasAttribute(`data-mask-post-formatted`)}))},Ed=e=>[...e.querySelectorAll(`input[data-app-mask]`)].filter(e=>e instanceof HTMLInputElement),Dd=e=>e instanceof Element?[...e instanceof HTMLInputElement&&e.matches(`input[data-app-mask]`)?[e]:[],...Ed(e)]:[];function Od(){wd||typeof MutationObserver>`u`||(wd=new MutationObserver(e=>{for(let t of e){for(let e of t.removedNodes)for(let t of Dd(e))Cd.get(t)?.(),Cd.delete(t);for(let e of t.addedNodes)for(let t of Dd(e))Td(t)}}),wd.observe(document.documentElement,{childList:!0,subtree:!0}))}function kd(e=document){Sd();for(let t of Ed(e))Td(t);e===document&&Od()}var Ad=`data-wui-bulk-in-bar`,jd=`[data-wui-page-header-bar][data-wui-bulk-for]`,Md=new WeakSet;function Nd(e){return`${wn(e,{decimals:0})} selected`}function Pd(e){let t=e.dataset.wuiBulkFor;return t===void 0?null:document.getElementById(t)}function Fd(e){return typeof e==`object`&&!!e&&`selected`in e&&typeof e.selected==`number`}function Id(e,t){return[...e.querySelectorAll(t)].flatMap(e=>e instanceof HTMLElement?[e]:[])}function Ld(e,t){for(let n of Id(e,`[data-wui-bar-swap]`))n.hidden=t>0;let n=e.querySelector(`[data-wui-bar-bulk]`);if(!n)return;if(!(n instanceof HTMLElement))throw Error(`The bulk slot is not an HTML element.`);n.hidden=t===0;let r=n.querySelector(`.page-header-bar-bulk-count`);if(!(r instanceof HTMLElement))throw Error(`The bulk slot has no count element.`);r.textContent=t>0?Nd(t):``}function Rd(e=document){for(let t of Id(e,jd))Pd(t)?.setAttribute(Ad,``);Md.has(document)||(Md.add(document),document.addEventListener(`selectionchange`,e=>{if(!(e instanceof CustomEvent)||!Fd(e.detail))return;let t=e.target;if(t!==null&&!(t instanceof Node))throw Error(`The selection changed on a target that is not a node.`);for(let n of Id(document,jd))Pd(n)?.contains(t)&&Ld(n,e.detail.selected)}))}var zd={digitText:`At least one digit`,lengthText:`At least {minLength} characters long`,lowercaseText:`At least one lowercase letter`,requirementsTitle:`Password requirements`,specialText:`At least one special character`,uniqueCharsTextOne:`At least {n} unique character`,uniqueCharsTextOther:`At least {n} unique characters`,uppercaseText:`At least one uppercase letter`},Bd={minLength:10,uppercase:!0,lowercase:!0,digit:!0,special:!0,uniqueChars:0,customRules:[]},Vd=()=>N(`passwordRules`,zd);function Hd(e){return e===!0||e==null?{...Bd}:{...Bd,...e}}function Ud(e){let t=Hd(e),n=[];if(t.minLength>0&&n.push({key:`length`,label:P(Vd().lengthText,{minLength:t.minLength}),test:e=>e.length>=t.minLength}),t.uppercase&&n.push({key:`uppercase`,label:Vd().uppercaseText,test:e=>/[A-Z]/.test(e)}),t.lowercase&&n.push({key:`lowercase`,label:Vd().lowercaseText,test:e=>/[a-z]/.test(e)}),t.digit&&n.push({key:`digit`,label:Vd().digitText,test:e=>/[0-9]/.test(e)}),t.special&&n.push({key:`special`,label:Vd().specialText,test:e=>/[^A-Za-z0-9]/.test(e)}),t.uniqueChars>0){let e=t.uniqueChars;n.push({key:`unique`,label:Ke(Vd(),`uniqueCharsText`,e,{n:e}),test:t=>new Set(t).size>=e})}for(let[e,r]of(t.customRules??[]).entries()){let t=new RegExp(r.pattern);n.push({key:`custom-${e}`,label:r.label,test:e=>t.test(e)})}return n}function Wd(e,t){let n=e==null?``:String(e);return Ud(t).map(e=>({key:e.key,label:e.label,met:e.test(n)}))}function Gd(e,t){return Wd(e,t).every(e=>e.met)}var Kd={moveLabel:`Move to`,moveText:`Move to {label}`},qd=`wui:row-drop`,Jd=`is-drop-over`,Yd=`application/x-wui-rows`,Xd=`wui-row-dragging`,Zd=`[data-wui-drop-target]`,Qd=`tbody tr[data-row-key]`,$d=`input, button, a, select, textarea, label`,ef=`.wui-select-cell .wui-check`,tf=new WeakMap,nf=new WeakSet,rf=null,af=null;function of(e){let t=e.querySelector(ef);return t instanceof HTMLInputElement&&t.checked}function sf(e){let t=[];for(let n of e.querySelectorAll(`tbody tr`))n instanceof HTMLElement&&of(n)&&t.push(n.dataset.rowKey);return t}function cf(e,t){return M(e,t)}function lf(e,t){let n=cf(e,t);return n instanceof HTMLElement?n:null}function uf(e){let t=e.textContent;if(t===null)throw Error(`A drop target has no text content.`);return t.trim()}var df=e=>typeof e==`object`&&!!e&&`selected`in e&&typeof e.selected==`number`;function ff(){rf=null,document.body.classList.remove(Xd);for(let e of document.querySelectorAll(`${Zd}.${Jd}`))e.classList.remove(Jd)}function pf(e,t,n){e.dispatchEvent(new CustomEvent(qd,{bubbles:!0,detail:{keys:t,target:n.dataset.wuiDropTarget}}))}function mf(e){let t=lf(e.target,Zd);if(!t||!rf)return;e.preventDefault();let n=j(e.dataTransfer,`A drag event arrived without its DataTransfer.`);n.dropEffect=`move`,t.classList.add(Jd)}function hf(e){let t=lf(e.target,Zd);!t||e.relatedTarget instanceof Node&&t.contains(e.relatedTarget)||t.classList.remove(Jd)}function gf(e){let t=lf(e.target,Zd);if(!t||!rf)return;e.preventDefault(),t.classList.remove(Jd);let{root:n,keys:r}=rf;pf(n,r,t),ff()}function _f(e){let t=lf(e.target,Zd);t&&af?.keys.length&&(e.preventDefault(),pf(af.root,af.keys,t))}function vf(e){(Mr(e)||e.key===` `)&&_f(e)}function yf(e){nf.has(e)||(nf.add(e),e.addEventListener(`dragover`,mf),e.addEventListener(`dragenter`,mf),e.addEventListener(`dragleave`,hf),e.addEventListener(`drop`,gf),e.addEventListener(`click`,_f),e.addEventListener(`keydown`,vf))}function bf(e){let t=tf.get(e);if(t)return t;yf(e.ownerDocument||e);let n=t=>{let n=lf(t.target,Qd);if(!n||!e.contains(n))return;let r=cf(t.target,$d);r&&n.contains(r)||(n.draggable=!0)},r=t=>{let n=lf(t.target,Qd);if(!n||!e.contains(n))return;let r=of(n)?sf(e):[n.dataset.rowKey],i=j(t.dataTransfer,`A drag event arrived without its DataTransfer.`);i.setData(Yd,JSON.stringify(r)),i.setData(`text/plain`,r.join(`,`)),i.effectAllowed=`move`,rf={root:e,keys:r},document.body.classList.add(Xd)},i=t=>{let n=t instanceof CustomEvent?t.detail:void 0;if(df(n)){let{keys:t}=n;n.selected>0?af={root:e,keys:Array.isArray(t)?t:sf(e)}:n.selected===0&&(af=null)}Sf(document)};e.addEventListener(`pointerdown`,n),e.addEventListener(`dragstart`,r),e.addEventListener(`dragend`,ff),e.addEventListener(`selectionchange`,i);let a=()=>{e.removeEventListener(`pointerdown`,n),e.removeEventListener(`dragstart`,r),e.removeEventListener(`dragend`,ff),e.removeEventListener(`selectionchange`,i),tf.delete(e)};return tf.set(e,a),a}var xf=()=>N(`rowDrop`,Kd);function Sf(e=document){let t=e.querySelector(`[data-wui-row-drag] tbody tr ${ef}:checked`)!==null;for(let n of e.querySelectorAll(Zd)){n.tagName!==`BUTTON`&&(n.setAttribute(`role`,`button`),n.setAttribute(`tabindex`,`0`)),t?n.removeAttribute(`aria-disabled`):n.setAttribute(`aria-disabled`,`true`);let e=n.getAttribute(`data-wui-drop-label`)||uf(n);n.setAttribute(`aria-label`,P(xf().moveText,{label:e}))}for(let t of e.querySelectorAll(`.wui-drop-tray`))t.hasAttribute(`role`)||(t.setAttribute(`role`,`toolbar`),t.setAttribute(`aria-label`,xf().moveLabel))}function Cf(e=document){for(let t of e.querySelectorAll(`[data-wui-row-drag]`))t instanceof HTMLElement&&bf(t);Sf(e.ownerDocument||e)}var wf=`.table-wrap, .table-responsive, [class*="table-responsive-"]`,Tf=1;function Ef(e){let t=()=>{let t=e.scrollWidth-e.clientWidth,n=Math.abs(e.scrollLeft);e.toggleAttribute(`data-wui-overflow-start`,t>Tf&&n>Tf),e.toggleAttribute(`data-wui-overflow-end`,t>Tf&&n<t-Tf),e.toggleAttribute(`data-wui-overflow-top`,e.scrollTop>Tf)},n=()=>{if(e.scrollWidth-e.clientWidth>Tf){let t=getComputedStyle(e);e.style.setProperty(`--wui-scroll-pad-start`,t.paddingInlineStart),e.style.setProperty(`--wui-scroll-pad-end`,t.paddingInlineEnd)}else e.style.getPropertyValue(`--wui-scroll-pad-end`)&&(e.style.removeProperty(`--wui-scroll-pad-start`),e.style.removeProperty(`--wui-scroll-pad-end`))},r=()=>{n(),t()};e.addEventListener(`scroll`,t,{passive:!0});let i=null;if(typeof ResizeObserver<`u`){i=new ResizeObserver(r),i.observe(e);for(let t of e.children)i.observe(t)}return r(),()=>{e.removeEventListener(`scroll`,t),i?.disconnect(),e.removeAttribute(`data-wui-overflow-start`),e.removeAttribute(`data-wui-overflow-end`),e.removeAttribute(`data-wui-overflow-top`),e.style.getPropertyValue(`--wui-scroll-pad-end`)&&(e.style.removeProperty(`--wui-scroll-pad-start`),e.style.removeProperty(`--wui-scroll-pad-end`))}}var Df=new WeakMap,Of,kf=e=>{Df.has(e)||Df.set(e,Ef(e))},Af=e=>{if(!(e instanceof HTMLElement))return[];let t=e.matches(`.table-wrap, .table-responsive, [class*="table-responsive-"]`)?[e]:[];if(e.firstElementChild===null)return t;let n=[...e.querySelectorAll(wf)].filter(e=>e instanceof HTMLElement);return[...t,...n]};function jf(){Of||typeof MutationObserver>`u`||(Of=new MutationObserver(e=>{for(let t of e){for(let e of t.removedNodes)for(let t of Af(e))Df.get(t)?.(),Df.delete(t);for(let e of t.addedNodes)for(let t of Af(e))kf(t)}}),Of.observe(document.documentElement,{childList:!0,subtree:!0}))}function Mf(e=document){for(let t of e.querySelectorAll(wf))t instanceof HTMLElement&&kf(t);e===document&&jf()}var Nf={leaveLabel:`Leave`,message:`Your changes on this page are not saved. If you leave now, they are lost.`,title:`Leave without saving?`},Pf={cancelLabel:`Cancel`,confirmLabel:`Confirm`,confirmTitle:`Are you sure?`,failedMessage:`That did not work. Try again.`,forbiddenMessage:`You do not have permission to do that.`,networkMessage:`Could not reach the server. Check your connection and try again.`,typePhraseLabel:`Type {phrase} to confirm`},Ff={backLabel:`Back`,clientMessage:`It may have been moved or deleted.`,closeLabel:`Close`,errorTitle:`This could not be loaded`,forbiddenMessage:`You do not have access to this.`,invalidMessage:`Some fields need attention.`,loadingLabel:`Loading`,networkMessage:`Could not reach the server. Check your connection and try again.`,retryLabel:`Try again`,serverMessage:`Something went wrong on our side. Try again in a moment.`,submitFailedMessage:`Your changes were not saved.`},If={closeLabel:`Close`,error:`Error`,failedText:`That did not work. Try again.`,loading:`Loading...`,moreText:`more`,success:`Done`},Lf=Object.freeze([`page`,`pageSize`,`sortBy`,`sortOrder`,`search`]),Rf=`search`,zf=()=>N(`dataTable`,Vn),Bf=5,Vf=e=>e instanceof HTMLInputElement||e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement||e instanceof HTMLButtonElement||e instanceof HTMLFieldSetElement||e instanceof HTMLObjectElement||e instanceof HTMLOutputElement,Hf=e=>e instanceof HTMLObjectElement||e instanceof HTMLOutputElement?!1:e.disabled,Uf=e=>Vf(e)&&`type`in e&&e.type===`hidden`,Y=(e,t,n)=>[...e.querySelectorAll(t)].filter(e=>e instanceof n),X=(e,t,n)=>{let r=e.querySelector(t);return r instanceof n?r:null},Wf=(e,t,n)=>{let r=e.closest(t);return r instanceof n?r:null},Gf=e=>e.localName===`wui-select`,Kf=new WeakMap,qf=(e,t)=>{let n=Number(e);return Number.isInteger(n)?n:t},Jf=e=>({total:qf(e.dataset.total,0),totalCapped:e.dataset.totalCapped===`true`,page:qf(e.dataset.page,1),pageSize:qf(e.dataset.pageSize,0),sortBy:e.dataset.sortBy||``,sortOrder:e.dataset.sortOrder===`desc`?`desc`:`asc`}),Yf=(e,t)=>{e&&cp().toast(e,{variant:t})},Xf=(e,t)=>{if(!e)return;let n=new Set([...e.elements].filter(e=>!Uf(e)||e.hasAttribute(`data-range-mirror`)).map(e=>e.getAttribute(`name`)).filter(e=>e&&!Lf.includes(e))),r=[...t].some(([e,t])=>t!==``&&n.has(e));for(let t of Y(e,`[data-wui-filter-clear]`,HTMLElement))t.hidden=!r},Zf=new Intl.NumberFormat(`en-IN`),Qf=(e,t)=>t?`${Zf.format(e)}+`:Zf.format(e),$f=(e,t,n)=>{let r=e.closest(`.wui-list-card`),i=r?X(r,`.wui-list-card-count`,HTMLElement):null;i&&(i.textContent=Qf(t,n))};function ep(e=document){let t=Y(e,`[data-wui-server]`,HTMLElement);e instanceof HTMLElement&&e.matches(`[data-wui-server]`)&&t.unshift(e);for(let e of t){if(Kf.has(e))continue;let t=np(e);Kf.set(e,t),e.hasAttribute(`data-load-first-page`)&&t.reload()}}function tp(e){let t=e instanceof Element?Wf(e,`[data-wui-server]`,HTMLElement):null;return t&&Kf.get(t)||null}function np(e){let t=X(e,`.table-wrap`,HTMLElement),n=t?X(t,`:scope > table`,HTMLTableElement):null,r=e.dataset.src;if(!t||!n||!r)throw Error(`A server-paged table needs data-src and a .table-wrap > table: render it with <app-data-table src>.`);let i=X(t,`:scope > [data-wui-table-state]`,HTMLElement),a=X(e,`[data-wui-table-pager]`,HTMLElement),o=X(e,`[data-wui-table-status]`,HTMLElement),s={urlState:e.dataset.urlState!==`false`,refreshOnSuccess:e.dataset.refreshOnSuccess!==`false`,filtersForm:e.dataset.filtersForm||null,filtersRegion:e.dataset.filtersRegion||null,searchInput:e.dataset.searchInput||null,loadingText:e.dataset.loadingText||zf().loadingText,errorText:e.dataset.errorText||zf().errorText},c=new URL(r,window.location.href),l=new Set(c.searchParams.keys()),u=n.hasAttribute(`data-app-datatable-selectable`),d=new Set,f=!1,p=no(),m=new AbortController,h={signal:m.signal},g=j(X(n,`:scope > tbody[data-wui-rows]`,HTMLTableSectionElement),`A server-paged table needs its rows in <app-table-rows> (tbody[data-wui-rows]).`),_=Jf(g),v=null,y=null,b=e=>{let t=new URLSearchParams;for(let[n,r]of new URLSearchParams(e))l.has(n)||t.append(n,r);return t},x=e=>b(new URL(e,window.location.href).search),S=e=>{let t=e.toString();return`${window.location.pathname}${t?`?${t}`:``}${window.location.hash}`},C=e=>{let t=new URL(c.href);for(let[n,r]of e)l.has(n)||t.searchParams.append(n,r);return t.origin===window.location.origin?`${t.pathname}${t.search}`:t.href},ee=(e,t)=>{let n=new URLSearchParams(e);return n.has(`page`)&&n.set(`page`,String(t.page)),n.has(`pageSize`)&&n.set(`pageSize`,String(t.pageSize)),n.has(`sortBy`)?t.sortBy?(n.set(`sortBy`,t.sortBy),n.set(`sortOrder`,t.sortOrder)):(n.delete(`sortBy`),n.delete(`sortOrder`)):n.delete(`sortOrder`),n},w=ee(s.urlState?b(window.location.search):new URLSearchParams,_);s.urlState&&S(w)!==`${window.location.pathname}${window.location.search}${window.location.hash}`&&window.history.replaceState(window.history.state,``,S(w));let T=(e,n)=>t.dispatchEvent(new CustomEvent(e,{bubbles:!0,detail:n})),E=e=>{o&&(o.textContent=e)},te=e=>{if(e.total===0)return zf().emptyLabel;let t=e.pageSize>0?Math.max(1,Math.ceil(e.total/e.pageSize)):1,n=e.totalCapped?Qf(e.total,!0):`${e.total}`;return P(e.total===1?zf().pageTextOne:zf().pageTextOther,{page:e.page,pages:t,total:n})},D=()=>Y(n,`:scope > thead > tr:first-child > th`,HTMLTableCellElement),ne=e=>{if(u&&Y(e,`:scope > tr:not(.wui-group-row, .wui-virtual-spacer)`,HTMLTableRowElement).some(e=>!e.dataset.rowKey))throw Error(`A selectable server-paged table needs data-row-key on every row, so a selection can span pages.`)},re=t=>{let n=e.dataset.activeRowKey;if(n!==void 0)for(let e of t){let t=e.classList.contains(`wui-row-active`),r=n!==``&&e.dataset.rowKey===n;e.classList.toggle(`wui-row-active`,r),r?e.setAttribute(`aria-current`,`true`):t&&e.removeAttribute(`aria-current`)}},ie=e=>{if(u){gl(e);for(let t of e){let e=X(t,`.${J} .wui-check:not(:disabled)`,HTMLInputElement);e&&(f&&d.add(t.dataset.rowKey),e.checked=d.has(t.dataset.rowKey))}vl(n)}re(e);let t=D();if(n.classList.contains(`wui-table-stack`))for(let n of e)[...n.cells].forEach((e,n)=>{let r=t[n]?.textContent?.trim();r&&!e.hasAttribute(`data-label`)&&e.setAttribute(`data-label`,r)});t.forEach((t,n)=>{if(t.classList.contains(`wui-col-hidden`))for(let t of e)t.cells[n]?.classList.add(`wui-col-hidden`)})},ae=e=>ie(Y(e,`:scope > tr`,HTMLTableRowElement)),oe=e=>{for(let t of e.querySelectorAll(`:scope > template[data-wui-pager], :scope > template[data-wui-empty], :scope > template[data-wui-filters]`))t.remove()},se=e=>e?.dispatchEvent(new CustomEvent(`wui:teardown`,{bubbles:!0})),ce=(e,t)=>{if(!i)return;let n=X(e,`:scope > template[data-wui-empty]`,HTMLTemplateElement);se(i),t.total===0&&n?(i.replaceChildren(n.content.cloneNode(!0)),i.hidden=!1):(i.replaceChildren(),i.hidden=!0)},le=e=>{let r=Jf(e),i=r.sortBy!==_.sortBy||r.sortOrder!==_.sortOrder?br(g.rows):null;if(a){let t=X(e,`:scope > template[data-wui-pager]`,HTMLTemplateElement);se(a),a.replaceChildren(...t?[t.content.cloneNode(!0)]:[]),a.hidden=!1}ce(e,r);let o=X(e,`:scope > template[data-wui-filters]`,HTMLTemplateElement),c=s.filtersRegion&&o?X(document,s.filtersRegion,HTMLElement):null;c&&o&&(se(c),c.replaceChildren(o.content.cloneNode(!0))),oe(e),se(g),n.replaceChild(e,g),g=e;let l=f&&r.total!==_.total;return _=r,l&&(f=!1),t.removeAttribute(`data-wui-table-error`),ae(e),ye(),xr(e.rows,i),l&&xe(),c},ue=e=>{let t=document.createElement(`template`);t.innerHTML=`<table>${e}</table>`;let n=X(t.content,`tbody[data-wui-rows]`,HTMLTableSectionElement);return n&&ne(n),n?document.importNode(n,!0):null},de=(e,t=D())=>{let n=document.createElement(`tr`);for(let r=0;r<e;r++){let e=t[r],i=e?.classList.contains(`text-center`),a=!i&&(e?.classList.contains(`num`)||e?.classList.contains(`text-end`)||e?.classList.contains(`wui-cell-end`)),o=document.createElement(`td`);i?o.classList.add(`text-center`):a&&o.classList.add(e?.classList.contains(`num`)?`num`:`wui-cell-end`);let s=document.createElement(`span`);s.className=`skeleton`,s.setAttribute(`aria-hidden`,`true`);let c=i?44:a?56:60;s.style.cssText=`display:block;width:${c}%;height:12px;border-radius:6px`,o.append(s),n.append(o)}return n},fe=()=>{if(g.querySelector(`:scope > tr:not([data-wui-skeleton])`))return;let e=Math.max(1,D().length);g.replaceChildren(...Array.from({length:Bf},()=>{let t=de(e);return t.setAttribute(`data-wui-skeleton`,``),t})),t.removeAttribute(`data-wui-table-error`),i&&(i.hidden=!0)},pe=e=>{e?(t.setAttribute(`aria-busy`,`true`),fe()):t.removeAttribute(`aria-busy`)},me=e=>e===`forbidden`?zf().forbiddenMessage:e===`network`?zf().networkMessage:s.errorText,he=e=>{let n=me(e);if(t.setAttribute(`data-wui-table-error`,e),a&&(a.hidden=!0),i){let t=document.createElement(`div`);t.className=`empty-state wui-empty-state-table wui-table-error`,t.setAttribute(`role`,`alert`);let r=document.createElement(`span`);r.className=`empty-state-icon`,r.innerHTML=V(e===`forbidden`?`lock`:`alert-circle`,{size:24});let a=document.createElement(`div`);a.className=`empty-state-title`,a.textContent=n;let o=document.createElement(`div`);o.className=`empty-state-action`;let s=document.createElement(`button`);s.type=`button`,s.className=Lc(`primary`,`outline`,`sm`),s.dataset.wui=Nc,s.setAttribute(`data-wui-table-retry`,``),s.textContent=zf().retryLabel,o.append(s),t.append(r,a,o),se(i),i.replaceChildren(t),i.hidden=!1}E(n)},ge=()=>s.filtersForm?X(document,s.filtersForm,HTMLFormElement):null,O=async(n,r=`none`,{quiet:i=!1}={})=>{let a=new URLSearchParams(n);i||(v={query:a,mode:r},pe(!0),E(s.loadingText)),T(`wui:table:loading`,{query:a.toString()});let o=await p.run(C(a));if(o.kind===`aborted`||o.kind===`stale`||o.kind===`session`)return o;i||pe(!1);let c=null;if(o.ok)try{c=ue(o.html)}catch(e){B(e)}if(!o.ok||!c){let e=o.ok?`server`:o.kind;return i?ci(`A quiet server table refresh failed; the rows on screen are kept.`,e):he(e),T(`wui:table:error`,{status:o.status,kind:e,message:me(e)}),o}let l=le(c);return w=ee(a,_),Xf(ge(),w),s.urlState&&r===`push`?window.history.pushState(window.history.state,``,S(w)):s.urlState&&r===`replace`&&window.history.replaceState(window.history.state,``,S(w)),i||E(te(_)),cp().refresh(t),l&&cp().refresh(l),$f(e,_.total,_.totalCapped),T(`wui:table:loaded`,{..._,query:w.toString()}),o},_e=e=>(e.delete(`page`),e),ve=()=>Y(n,`:scope > thead th[data-sort-key]`,HTMLTableCellElement),ye=()=>{for(let e of ve()){let t=e.dataset.sortKey===_.sortBy;e.setAttribute(`aria-sort`,t?_.sortOrder===`desc`?`descending`:`ascending`:`none`)}};for(let e of ve())if(e.classList.add(`sortable`),e.tabIndex=0,!e.querySelector(`.sort-icon`)){let t=e.classList.contains(`num`)||e.classList.contains(`text-end`),n=document.createElement(`span`);n.className=t?`sort-icon wui-sort-lead`:`sort-icon`,n.innerHTML=V(`chevrons-up-down`,{size:14}),t?e.prepend(n):e.append(n)}let be=e=>{let t=_e(new URLSearchParams(w)),n=_.sortBy===e&&_.sortOrder===`asc`?`desc`:`asc`;return t.set(`sortBy`,e),t.set(`sortOrder`,n),O(t,`push`)};n.addEventListener(`click`,e=>{let t=e.target instanceof Element?Wf(e.target,`th[data-sort-key]`,HTMLTableCellElement):null;t&&n.tHead?.contains(t)&&be(t.dataset.sortKey??``)}),n.addEventListener(`keydown`,e=>{if(e.key!==`Enter`&&e.key!==` `)return;let t=e.target instanceof Element?Wf(e.target,`th[data-sort-key]`,HTMLTableCellElement):null;t&&n.tHead?.contains(t)&&(e.preventDefault(),be(t.dataset.sortKey??``))});let xe=()=>{vl(n);let e=f?{selected:_.total,total:_.total,allMatching:f}:{selected:d.size,total:_.total};n.dispatchEvent(new CustomEvent(`selectionchange`,{bubbles:!0,detail:e}))};u&&(bl(n,(e,t)=>{for(let n of e){let e=Wf(n,`tr`,HTMLTableRowElement)?.dataset.rowKey;e&&(t?d.add(e):d.delete(e))}t||(f=!1)}),n.addEventListener(`change`,e=>{let t=e.target;if(t instanceof HTMLInputElement&&t.matches(`.wui-select-cell .wui-check:not(:disabled)`)){if(t.checked||(f=!1),n.tHead?.contains(t))for(let e of Y(g,`:scope > tr`,HTMLTableRowElement)){let n=X(e,`.${J} .wui-check:not(:disabled)`,HTMLInputElement);n&&(n.checked=t.checked,t.checked?d.add(e.dataset.rowKey):d.delete(e.dataset.rowKey))}else{let e=Wf(t,`tr`,HTMLTableRowElement)?.dataset.rowKey;if(!e)return;t.checked?d.add(e):d.delete(e)}xe()}})),a&&(a.addEventListener(`click`,e=>{let t=e.target instanceof Element?Wf(e.target,`a[href]`,HTMLAnchorElement):null;!t||e.defaultPrevented||e.button!==0||e.ctrlKey||e.metaKey||e.shiftKey||e.altKey||(e.preventDefault(),O(x(t.getAttribute(`href`)??``),`push`))}),a.addEventListener(`change`,e=>{let t=e.target;t instanceof HTMLSelectElement&&t.classList.contains(`tpg-select`)&&t.value&&(e.stopPropagation(),O(x(t.value),`push`))}));let Se=()=>{if(!s.searchInput)return null;let e=X(document,s.searchInput,HTMLElement);return e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement?e:e?X(e,`input`,HTMLInputElement):null},Ce=()=>e.isConnected?!0:(m.abort(),clearTimeout(y??void 0),!1),we=(e,t)=>{let n=[...e.elements].filter(Vf),r=new Set;for(let e of n)e.name&&!Uf(e)&&r.add(e.name);let i=[];for(let e of n)if(e.name&&!Hf(e)){if(e instanceof HTMLInputElement&&e.matches(`input[type="hidden"][data-wui-carried]`))r.has(e.name)||i.push([e.name,e.value]);else if(e instanceof HTMLInputElement&&e.matches(`input[type=checkbox], input[type=radio]`))e.checked&&i.push([e.name,e.value]);else if(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement)e.matches(`[type=submit], [type=button], [type=reset], [type=image], [type=file]`)||i.push([e.name,e.value]);else if(e instanceof HTMLSelectElement)for(let t of e.selectedOptions)i.push([e.name,t.value])}return(t instanceof HTMLButtonElement||t instanceof HTMLInputElement)&&t.name&&!t.disabled&&i.push([t.name,t.value]),i},Te=(e,t)=>{let n=new Set([...e.elements].filter(Vf).map(e=>e.name).filter(Boolean)),r=new URLSearchParams,i=e=>e!==`search`&&Lf.includes(e);for(let[e,t]of w)e!==`page`&&(i(e)||!n.has(e))&&r.append(e,t);for(let[n,a]of we(e,t))a===``||i(n)||l.has(n)||r.append(n,a);let a=Se();if(a){r.delete(Rf);let e=a.value.trim();e&&r.set(Rf,e)}return O(r,`push`)},Ee=e=>s.filtersForm&&e.closest?.(s.filtersForm)||s.filtersRegion&&e.closest?.(s.filtersRegion)||null;document.addEventListener(`submit`,e=>{Ce()&&s.filtersForm&&e.target instanceof HTMLFormElement&&e.target.matches(s.filtersForm)&&(e.preventDefault(),Te(e.target,e.submitter))},h),document.addEventListener(`change`,e=>{if(!Ce()||!s.filtersForm||!(e.target instanceof Element))return;let t=Wf(e.target,s.filtersForm,HTMLFormElement);!t||e.target===Se()||t.hasAttribute(`data-wui-apply-on-change`)||e.target.closest(`wui-filter-popover`)||Te(t)},h);let k=(e,t)=>{if(!e)return;let n=e=>t.get(e)??``;for(let r of Y(e,`input[name]:not([type=hidden])`,HTMLInputElement))if(r.type===`checkbox`)r.checked=t.getAll(r.name).includes(r.value);else if(r.type===`radio`){let e=n(r.name)===r.value;if(r.checked===e)continue;r.checked=e,e&&r.dispatchEvent(new Event(`change`))}else r.value!==n(r.name)&&(r.value=n(r.name),r.dispatchEvent(new Event(`input`,{bubbles:!0})));for(let r of Y(e,`select[name]`,HTMLSelectElement))if(!r.multiple)r.value=n(r.name);else for(let e of r.options)e.selected=t.getAll(r.name).includes(e.value);for(let r of[...e.querySelectorAll(`wui-select[name]`)].filter(Gf)){let e=r.getAttribute(`name`)??``;r.value=r.mode===`multiple`||r.mode===`tag`?t.getAll(e):n(e)}for(let t of e.querySelectorAll(`wui-date-range`)){let e=t.getAttribute(`start-name`)||t.getAttribute(`name`),r=t.getAttribute(`end-name`);t.value={start:e?n(e):``,end:r?n(r):``}}};document.addEventListener(`click`,e=>{if(!Ce())return;let t=e.target instanceof Element?Wf(e.target,`a[href]`,HTMLAnchorElement):null;if(!t||!Ee(t)||e.defaultPrevented||e.button!==0||e.ctrlKey||e.metaKey||e.shiftKey||e.altKey)return;let n=new URL(t.getAttribute(`href`)??``,window.location.href);if(n.origin!==window.location.origin||n.pathname!==window.location.pathname)return;e.preventDefault();let r=_e(x(n.href));k(t.closest(`form`),r),Xf(t.closest(`form`),r),O(r,`push`)},h),document.addEventListener(`input`,e=>{if(!Ce())return;let t=Se();t&&e.target===t&&(clearTimeout(y??void 0),y=setTimeout(()=>{if(!Ce())return;let e=_e(new URLSearchParams(w)),n=t.value.trim();n?e.set(Rf,n):e.delete(Rf),e.toString()!==w.toString()&&O(e,`replace`)},300))},h),s.urlState&&window.addEventListener(`popstate`,()=>{if(!Ce())return;let e=b(window.location.search),t=Se();t&&(t.value=e.get(`search`)??``),Xf(ge(),e),O(e,`none`)},h),document.addEventListener(`wui:modal:success`,()=>{Ce()&&s.refreshOnSuccess&&O(w,`none`)},h),i?.addEventListener(`click`,e=>{e.target instanceof Element&&e.target.closest(`[data-wui-table-retry]`)&&v&&O(v.query,v.mode)});let A=e=>[...g.rows].find(t=>t.dataset.rowKey===e)??null,De=e=>{if(!e?.trim())return null;let t=document.createElement(`template`);if(t.innerHTML=`<table><tbody>${e}</tbody></table>`,t.content.querySelector(`tbody[data-wui-rows]`))return null;let n=Y(t.content,`table > tbody > tr[data-row-key]`,HTMLTableRowElement);return n.length?n.map(e=>document.importNode(e,!0)):null},Oe=(e,n,r)=>{let i=r?e[0]:e.find(e=>e.dataset.rowKey===n.dataset.rowKey);if(!i)return null;let a=[];for(let t of e){let e=t===i?n:A(t.dataset.rowKey);e&&(se(e),e.replaceWith(t),a.push(t))}return ie(a),cp().refresh(t),i},ke=e=>e.message||(e.kind===`forbidden`?zf().actionForbiddenMessage:zf().actionFailedMessage),Ae=e=>{e?.isConnected&&e.getAttribute(`data-wui-save-state`)===`saving`&&Or(e,null)},je=e=>{if(e instanceof HTMLTableRowElement)return e;let t=document.createElement(`template`);t.innerHTML=`<table><tbody>${String(e)}</tbody></table>`;let n=X(t.content,`table > tbody > tr`,HTMLTableRowElement);return document.importNode(j(n,"saveRow's `row` is the row as it will read: a <tr> element or its HTML."),!0)},Me=async({url:e,method:n=`POST`,body:r,key:a,row:o}={})=>{if(!e)throw Error("saveRow needs `url`: the handler that saves the row.");let s=a==null,c=s?null:A(String(a));if(!s&&!c)throw Error(`saveRow found no row with data-row-key="${a}" on this page.`);let l=D().filter(e=>!e.classList.contains(J)),u=o?je(o):c??de(Math.max(1,l.length),l);c&&u!==c?c.replaceWith(u):c||g.insertBefore(u,g.firstChild),u!==c&&ie([u]),i&&!t.hasAttribute(`data-wui-table-error`)&&(i.hidden=!0),Or(u,`saving`);let d=Dr(u),f=await to(e,{method:n.toUpperCase(),body:r});if(f.kind===`session`)return!1;if(f.ok){let e=De(f.html),t=e&&u.isConnected?Oe(e,u,s):null;return t?E(er(Dr(t)||d)):(await O(w,`none`),Ae(u)),lp(f,f.toastVariant||`success`),T(`wui:table:saved`,{key:t?.dataset.rowKey??(s?null:String(a)),added:s,status:f.status}),!0}let p=ke(f),m=u;return c&&u!==c&&u.isConnected?(u.replaceWith(c),m=c):s&&!o&&(u.remove(),m=null,i?.childElementCount&&!g.querySelector(`:scope > tr`)&&(i.hidden=!1)),m?.isConnected&&Or(m,`error`,p),f.kind!==`aborted`&&Yf(p,`danger`),E(nr(d,p)),T(`wui:table:failed`,{key:s?null:String(a),added:s,status:f.status,kind:f.kind,message:p}),!1},Ne=async e=>{let t=e.dataset.url;if(!t)throw Error(`A data-wui-row-action button needs data-url: the handler the action posts to.`);let n=Wf(e,`tr`,HTMLTableRowElement),r=n?.dataset.rowKey??null,i=e.dataset.wuiRowAction||``,a=n?Dr(n):``;e.disabled=!0,e.setAttribute(`aria-busy`,`true`),n&&Or(n,`saving`);let o=await to(t,{method:(e.dataset.method||`post`).toUpperCase()});if(e.disabled=!1,e.removeAttribute(`aria-busy`),o.kind===`session`||o.kind===`aborted`)Ae(n);else{if(o.ok){lp(o,o.toastVariant||`success`);let e=n?.isConnected?De(o.html):null,t=e&&n?Oe(e,n,!1):null;t?E(er(Dr(t)||a)):(await O(w,`none`),Ae(n))}else{let e=ke(o);Yf(e,`danger`),n?.isConnected&&Or(n,`error`,e),E(nr(a,e))}T(`wui:table:action`,{action:i,key:r,ok:o.ok,status:o.status})}};return n.addEventListener(`click`,e=>{let t=e.target instanceof Element?Wf(e.target,`[data-wui-row-action]`,HTMLButtonElement):null;t&&g.contains(t)&&!t.disabled&&(e.preventDefault(),Ne(t))}),ne(g),oe(g),u&&_l(n),ae(g),ye(),{el:e,reload:async e=>{let n=e?.quiet===!0;return n&&t.getAttribute(`aria-busy`)===`true`?null:O(w,`none`,{quiet:n})},query:()=>new URLSearchParams(w),setQuery:e=>{let t=new URLSearchParams(w);for(let[n,r]of Object.entries(e??{})){t.delete(n);for(let e of Array.isArray(r)?r:[r])e!=null&&e!==``&&t.append(n,String(e))}return e&&`page`in e||t.delete(`page`),O(t,`push`)},saveRow:Me,setActiveRow:t=>{e.dataset.activeRowKey=t==null?``:String(t),re(Y(g,`:scope > tr`,HTMLTableRowElement))},selection:{keys:()=>[...d],count:()=>f?_.total:d.size,allMatching:()=>f,selectAllMatching:()=>{f=!0;for(let e of Y(g,`:scope > tr`,HTMLTableRowElement)){let t=X(e,`.${J} .wui-check`,HTMLInputElement);t?.disabled||(t&&(t.checked=!0),e.dataset.rowKey&&d.add(e.dataset.rowKey))}xe()},clear:()=>{f=!1,d.clear();for(let e of Y(g,`:scope > tr > .${J} .wui-check:not(:disabled)`,HTMLInputElement))e.checked=!1;xe()}}}}var rp=8e3,ip=()=>N(`toast`,If),ap=[`success`,`info`,`warning`,`danger`],op=e=>ap.some(t=>t===e);function sp(e){if(!op(e))throw RangeError(`Unknown toast variant "${e}".`);return e}function cp(){return j(window.WUI,`window.WUI is not defined: the Razor behaviour script did not load on this page.`)}function lp(e,t=`success`){if(!e?.message)return;let n=e.toastAction;n?cp().toast(e.message,{variant:sp(t),duration:rp,action:{label:n.label,onClick:()=>up(n)}}):cp().toast(e.message,{variant:sp(t)})}async function up(e){let t=await to(e.url,{method:e.method});if(t.kind!==`session`&&t.kind!==`aborted`){if(t.ok){lp(t,t.toastVariant||`success`);for(let e of document.querySelectorAll(`[data-wui-server]`))e instanceof HTMLElement&&e.dataset.refreshOnSuccess!==`false`&&tp(e)?.reload()}else cp().toast(t.message||ip().failedText,{variant:`danger`})}}var dp=`wui-remote-modal`,fp=`wui-remote-drawer`,pp=Object.freeze({sm:360,md:480,lg:640,xl:720}),mp=`wui-modal-fullscreen`,hp=Object.freeze({sm:380,md:440,lg:640,xl:880}),Z=()=>N(`modal`,Ff),gp=`a[href],button:not([disabled]),input:not([disabled]):not([type="hidden"]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex="-1"])`,_p=`input:not([type="hidden"]):not([disabled]),select:not([disabled]),textarea:not([disabled]),[contenteditable="true"]`,vp=`[aria-invalid="true"], .is-invalid, .input-validation-error`,yp=`invalid`,bp=`.wui-error-summary, [data-wui-form-errors], .validation-summary-errors, [data-valmsg-summary]`,xp=`[data-wui-modal-content]`,Sp=`[data-wui-pane-close], [data-wui-dismiss]`,Cp=()=>`<button type="button" class="wui-modal-close" data-wui-dismiss aria-label="${Np(Z().closeLabel).replaceAll(`"`,`&quot;`)}"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M18 6 6 18M6 6l12 12"></path></svg></button>`,wp=new WeakMap,Tp=new WeakSet;function Ep(e,t){if(e==null)throw TypeError(`The remote modal needs ${t}, and the page does not have it.`);return e}var Dp=(e,t)=>{let n=e.querySelector(t);return n instanceof HTMLElement?n:null},Op=(e,t,n)=>Ep(Dp(e,t),n),kp=(e,t)=>[...e.querySelectorAll(t)].filter(e=>e instanceof HTMLElement),Ap=()=>Object.assign(Error(`The remote modal load was aborted.`),{name:`AbortError`}),jp=e=>typeof e==`object`&&!!e&&`name`in e&&e.name===`AbortError`,Mp=(e,t)=>{let n=e instanceof Element?e.closest(t):null;return n instanceof HTMLElement?n:null},Np=e=>{let t=document.createElement(`span`);return t.textContent=e??``,t.innerHTML},Pp=e=>Object.hasOwn(hp,e),Fp=e=>Object.hasOwn(pp,e);function Ip(e){if(e==null||e===``)return null;if(e===`fullscreen`)return{fullscreen:!0};if(Pp(e))return{px:hp[e]};let t=typeof e==`number`?e:/^\d+$/.test(String(e))?Number(e):NaN;if(Number.isInteger(t)&&t>0)return{px:t};throw TypeError(`Unsupported modal size "${String(e)}". Use sm, md, lg, xl, fullscreen or a px number.`)}var Lp=e=>{if(e.classList.contains(`wui-modal-fullscreen`))return{fullscreen:!0};let t=Number.parseInt(e.style.getPropertyValue(`--wui-modal-max-width`),10);return{px:t>0?t:hp.md}},Rp=(e,t)=>{e.classList.toggle(mp,!!t.fullscreen),t.fullscreen?e.style.removeProperty(`--wui-modal-max-width`):e.style.setProperty(`--wui-modal-max-width`,`${t.px}px`)},zp=[`center`,`top`];function Bp(e){if(e==null||e===``)return null;if(Fp(e))return{px:pp[e]};let t=typeof e==`number`?e:/^\d+$/.test(String(e))?Number(e):NaN;if(Number.isInteger(t)&&t>0)return{px:t};throw TypeError(`Unsupported drawer size "${String(e)}". Use sm, md, lg, xl or a px number.`)}var Vp=e=>e.container===`drawer`,Hp=e=>e.container===`pane`,Up=e=>e.container!==`modal`,Wp=(e,t)=>Vp(e)?Bp(t):Ip(t),Gp=e=>{let t=typeof e==`string`?document.querySelector(e):e,n=t instanceof HTMLElement?t:null;return n?.matches(`[data-wui-pane-host]`)?n:null},Kp=e=>Hp(e)?e.shell:Op(e.shell,`.modal-dialog`,`a dialog frame`);function qp(e=`modal`){let t=e===`drawer`,n=t?fp:dp,r=document.getElementById(n);if(r)return r;let i=document.createElement(`wui-modal`);i.id=n,i.setAttribute(`data-wui`,`AppModal`);let a=document.createElement(`dialog`);return a.className=t?`modal wui-modal-shell wui-remote-drawer`:`modal wui-modal-shell`,a.style.setProperty(`--wui-modal-max-width`,`${t?pp.md:hp.md}px`),a.innerHTML=t?`<div class="modal-dialog wui-remote-drawer-dialog"><div class="modal-content wui-modal"></div></div>`:`<div class="modal-dialog modal-dialog-centered wui-rb-dialog"><div class="modal-content wui-modal"></div></div>`,i.append(a),document.body.appendChild(i),i}var Jp=e=>`<div class="wui-modal-header"><div class="wui-modal-heading"><div class="wui-modal-headtext"><div class="wui-modal-title">${Np(e)}</div></div></div>${Cp()}</div>`,Yp=e=>`<div class="modal-content wui-modal" aria-busy="true">${Jp(e)}<div class="wui-modal-body"><div class="wui-modal-loading" role="status"><span class="visually-hidden">${Np(Z().loadingLabel)}</span><div class="skeleton wui-modal-skeleton"></div><div class="skeleton wui-modal-skeleton"></div><div class="skeleton wui-modal-skeleton wui-modal-skeleton--short"></div></div></div></div>`,Xp=(e,t)=>{let n={forbidden:Z().forbiddenMessage,client:Z().clientMessage,server:Z().serverMessage,network:Z().networkMessage};return`<div class="modal-content wui-modal" data-wui-modal-error="${Np(t)}">${Jp(e)}<div class="wui-modal-body"><div class="wui-modal-state" role="alert"><p class="wui-modal-state-title">${Np(Z().errorTitle)}</p><p class="wui-modal-state-text">${Np(n[t]||Z().serverMessage)}</p><div class="wui-modal-state-actions"><button type="button" class="${Lc(`primary`,`soft`,`md`)}" data-wui-dismiss data-wui="${Nc}">${Np(Z().closeLabel)}</button><button type="button" class="${Lc(`primary`,`solid`,`md`)}" data-wui-modal-retry data-wui="${Nc}">${Np(Z().retryLabel)}</button></div></div></div></div>`},Zp=e=>{let t=document.createElement(`template`);return t.innerHTML=e,Op(t.content,`.modal-content`,`a card`)},Qp=e=>Dp(e.shell,`.modal-content`);function $p(e){e&&e.dispatchEvent(new CustomEvent(`wui:teardown`,{bubbles:!0}))}function em(e,t){let n=Qp(e),r=n?nm(n):new Map;$p(n),n?n.replaceWith(t):Kp(e).appendChild(t),rm(t,r),cp().refresh()}var tm=`input[type="file"][name]`;function nm(e){let t=new Map;for(let n of e.querySelectorAll(tm)){if(!(n instanceof HTMLInputElement))continue;let e=n.files;e&&e.length>0&&t.set(n.name,[...e])}return t}function rm(e,t){if(t.size!==0&&typeof DataTransfer<`u`)for(let n of e.querySelectorAll(tm)){if(!(n instanceof HTMLInputElement))continue;let e=t.get(n.name);if(!e)continue;let r=new DataTransfer;for(let t of e)r.items.add(t);n.files=r.files,n.dispatchEvent(new Event(`change`,{bubbles:!0}))}}var im=e=>Hp(e)?!e.shell.hidden:e.host.hasAttribute(`open`);function am(e,t,n=!1){let r=t?Dp(e,vp):null,i=r?r.matches(gp)?r:Dp(r,gp)||r:null;if(!i&&n)i=Dp(e,`[data-autofocus]`)||Dp(e,_p)||Dp(e,`.wui-modal-close`);else if(!i){let t=kp(e,gp);i=Dp(e,`[data-autofocus]`)||t.find(e=>!e.classList.contains(`wui-modal-close`))||t[0]||e}r?i?.focus?.():i?.focus?.({preventScroll:!0})}function om(e,t){let n=Dp(e.shell,`[data-wui-modal-live]`);n||(n=document.createElement(`div`),n.className=`visually-hidden`,n.setAttribute(`aria-live`,`assertive`),n.setAttribute(`data-wui-modal-live`,``),Kp(e).appendChild(n)),n.textContent=``,n.textContent=t}var sm=e=>{let t=Dp(e.shell,`[data-wui-modal-live]`);t&&(t.textContent=``)},cm=(e,t,n)=>{e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:n}))};function lm(e,t,n,r){let i={...r,container:e.container};cm(t,`wui:modal:${n}`,i),Vp(e)&&cm(t,`wui:drawer:${n}`,i),Hp(e)&&cm(t,`wui:pane:${n}`,i)}var um=e=>e.matches(`[data-wui-pane-host]`)?`pane`:Op(e,`dialog`,`a dialog`).classList.contains(`wui-remote-drawer`)?`drawer`:`modal`,dm=e=>Ep(e.host.closest(`wui-modal`),`a wui-modal host`);function fm(e){let t=wp.get(e);if(t)return t;let n=um(e),r=n===`pane`?e:Op(e,`dialog`,`a dialog`),i={host:e,shell:r,container:n,queue:no(),defaultSize:Lp(r),defaultLabel:r.getAttribute(`aria-label`),placeholder:Qp({shell:r})?.outerHTML||`<div class="modal-content wui-modal"></div>`,remoteUrl:e.getAttribute(`data-wui-remote-url`),cache:e.getAttribute(`data-wui-remote-cache`)===`true`,loadedUrl:null,session:null};return wp.set(e,i),e.addEventListener(`submit`,e=>Pm(i,e)),e.addEventListener(`click`,e=>{Mp(e.target,`[data-wui-modal-retry]`)&&i.session&&(e.preventDefault(),bm(i,i.session))}),Hp(i)&&e.addEventListener(`click`,t=>{let n=Mp(t.target,Sp);n&&e.contains(n)&&i.session&&mm(i,i.session,`dismissed`,null)}),e.addEventListener(`wui-modal-close`,t=>{t.target===e&&t instanceof CustomEvent&&Am(t.detail,`reason`)===`escape`&&e.querySelector(`form[data-wui-submitting]`)&&t.preventDefault()}),e.addEventListener(`wui-modal-closed`,t=>{t.target===e&&_m(i)}),e.addEventListener(`wui-modal-opened`,t=>{if(t.target!==e)return;let n=Qp(i);i.session&&n?.matches(xp)&&!n.contains(document.activeElement)&&am(n,!1,Up(i))}),i.remoteUrl&&e.addEventListener(`wui-modal-open`,t=>{t.target===e&&vm(i,t)}),i}function pm(e,t,n){e.session&&(e.queue.abort(),e.session.resolveClosed({status:`dismissed`,detail:{replaced:!0}}));let r=()=>void 0,i=new Promise(e=>{r=e}),a={url:t,method:(n.method||`GET`).toUpperCase(),body:n.body,options:n,trigger:n.trigger||null,explicitSize:null,closing:null,resolveClosed:r,handle:{el:e.shell,closed:i,close:()=>mm(e,a,`dismissed`,null),reload:()=>bm(e,a)}};return e.session=a,a}function mm(e,t,n,r){e.session===t&&(t.closing={status:n,detail:r},Hp(e)?gm(e,t):hm(e))}function hm(e){let t=dm(e);t.dispatchEvent(new CustomEvent(`wui-modal-close`,{bubbles:!0,cancelable:!0,detail:{reason:`dismiss`}}))&&t.hide()}function gm(e,t){let n=e.shell,{status:r,detail:i}=Ep(t.closing,`the closing state`),a=n.contains(document.activeElement);e.queue.abort(),e.session=null,$p(Qp(e)),n.replaceChildren(),n.hidden=!0,n.removeAttribute(`data-open`),t.resolveClosed({status:r,detail:i}),lm(e,n,`closed`,{status:r,url:t.url}),a&&t.trigger?.isConnected&&t.trigger.focus?.()}function _m(e){let t=e.session;if(e.queue.abort(),e.session=null,sm(e),t){let n=t.closing||{status:`dismissed`,detail:null};t.resolveClosed({status:n.status,detail:n.detail}),lm(e,e.shell,`closed`,{status:n.status,url:t.url});let r=document.activeElement;t.trigger?.isConnected&&(!r||r===document.body||e.shell.contains(r))&&t.trigger.focus?.()}e.cache||(em(e,Zp(e.placeholder)),e.loadedUrl=null,Rp(e.shell,e.defaultSize),e.defaultLabel?e.shell.setAttribute(`aria-label`,e.defaultLabel):e.shell.removeAttribute(`aria-label`))}function vm(e,t){let n=Am(t instanceof CustomEvent?t.detail:null,`trigger`),r=n instanceof HTMLElement?n:null,i=r?.getAttribute(`data-wui-url`)||e.remoteUrl||``,a=pm(e,i,{trigger:r});a.explicitSize=ym(e,r?.getAttribute(`data-wui-size`)),a.explicitSize&&Rp(e.shell,a.explicitSize),e.cache&&e.loadedUrl===i||(e.loadedUrl&&em(e,Zp(e.placeholder)),bm(e,a,{keepPlaceholder:!0}))}function ym(e,t){try{return Wp(e,t)}catch(e){return B(e),null}}async function bm(e,t,{keepPlaceholder:n=!1}={}){n||em(e,Zp(Yp(t.options.title||xm(e))));let r=await e.queue.run(t.url,{method:t.method,body:t.body,navigate:t.options.navigate});if(e.session!==t||r.kind===`aborted`||r.kind===`stale`)return`aborted`;if(r.kind===`session`)return`session`;if(r.kind===`ok`&&Tm(e,t,r.html,!1))return e.loadedUrl=t.url,lm(e,e.shell,`loaded`,{url:t.url,handle:t.handle}),`loaded`;let i=r.kind===`ok`||r.kind===`validation`?`server`:r.kind;return em(e,Zp(Xp(t.options.title||xm(e),i))),im(e)&&am(Ep(Qp(e),`a card`),!1,Up(e)),lm(e,e.shell,`error`,{url:t.url,kind:i,status:r.status}),`error`}var xm=e=>Qp(e)?.querySelector(`.wui-modal-title`)?.textContent||e.shell.getAttribute(`aria-label`)||``,Sm=`/_content/Webority.Ui.Razor/js/`,Cm=e=>new URL(e,window.location.href).pathname.includes(Sm);function wm(e){if([...document.scripts].some(t=>t.getAttribute(`src`)===e))return;let t=document.createElement(`script`);t.src=e,document.head.appendChild(t)}function Tm(e,t,n,r){let i=document.createElement(`template`);i.innerHTML=n;let a=!1;for(let e of i.content.querySelectorAll(`script`)){if(e.getAttribute(`type`)===`application/json`)continue;let t=e.getAttribute(`src`);e.remove(),t&&Cm(t)?wm(t):a=!0}a&&ci(`WUI.modal: ${t.url} returned a fragment with script; it was removed. Keep page behaviour in the page.`);let o=Dp(i.content,xp);if(!o)return B(`WUI.modal: ${t.url} did not answer with an <app-modal-content> fragment.`),!1;if(em(e,o),r||sm(e),!Hp(e)){Rp(e.shell,t.explicitSize||ym(e,o.getAttribute(`data-wui-size`))||e.defaultSize);let n=o.getAttribute(`data-wui-title`);n&&e.shell.setAttribute(`aria-label`,n)}return im(e)&&am(o,r,Up(e)),!0}var Em=`button[type="submit"], button:not([type]), input[type="submit"], input[type="image"]`;function Dm(e,t,n){let r=[...e.elements].filter(e=>e.matches(Em));if(n){e.setAttribute(`data-wui-submitting`,``);let n=t&&r.includes(t)?t:r[0];for(let e of r)e.toggleAttribute(`data-wui-was-disabled`,e.disabled),e.disabled=!0;n&&(n.classList.add(`is-loading`),n.setAttribute(`aria-busy`,`true`),n.tagName===`BUTTON`&&n.insertAdjacentHTML(`afterbegin`,`<span class="spinner-border spinner-border-sm me-2" aria-hidden="true" data-wui-submit-spinner></span>`))}else{e.removeAttribute(`data-wui-submitting`);for(let e of r)e.disabled=e.hasAttribute(`data-wui-was-disabled`),e.removeAttribute(`data-wui-was-disabled`),e.classList.remove(`is-loading`),e.removeAttribute(`aria-busy`),e.querySelector(`[data-wui-submit-spinner]`)?.remove()}}function Om(e){for(let t of e.querySelectorAll(bp))t.remove();for(let t of e.querySelectorAll(vp))t.removeAttribute(`aria-invalid`),t.classList.remove(`is-invalid`,`input-validation-error`);for(let t of e.querySelectorAll(`.field-error`))t.textContent=``}var km=new Set(`bad request.unauthorized.payment required.forbidden.not found.method not allowed.not acceptable.proxy authentication required.request timeout.conflict.gone.length required.precondition failed.payload too large.uri too long.unsupported media type.range not satisfiable.expectation failed.misdirected request.unprocessable content.unprocessable entity.locked.failed dependency.too early.upgrade required.precondition required.too many requests.request header fields too large.unavailable for legal reasons`.split(`.`)),Am=(e,t)=>{if(typeof e==`object`&&e&&t in e)return Reflect.get(e,t)};async function jm(e){if(!e||e.status<400||e.status>499||!e.headers.get(`content-type`)?.toLowerCase().includes(`json`))return null;let t;try{t=JSON.parse(await e.text())}catch{return null}let n=e=>typeof e==`string`?e.trim():``,r=n(Am(t,`title`)),i=(e.statusText||``).trim().toLowerCase(),a=km.has(r.toLowerCase())||r.toLowerCase()===i;return n(Am(t,`message`))||n(Am(t,`detail`))||(r&&!a?r:null)}function Mm(e,t,n,r){let i={forbidden:Z().forbiddenMessage,client:Z().clientMessage,server:Z().serverMessage,network:Z().networkMessage},a=t.closest(`.wui-modal-body`)||t;a.querySelector(`[data-wui-modal-submit-error]`)?.remove(),Om(a);let o=document.createElement(`div`);o.className=`alert alert-danger wui-modal-submit-error`,o.setAttribute(`role`,`alert`),o.setAttribute(`data-wui-modal-submit-error`,``),o.innerHTML=Np(`${Z().submitFailedMessage} ${r||i[n]||Z().serverMessage}`),a.prepend(o),om(e,o.textContent)}var Nm=(e,t)=>{let n=new URL(e,window.location.href);for(let[e,r]of t)typeof r==`string`&&n.searchParams.append(e,r);return n.origin===window.location.origin?n.pathname+n.search:n.href};async function Pm(e,t){let n=t.target,r=e.session;if(!(n instanceof HTMLFormElement)||!r||n.hasAttribute(`data-wui-native`)||!n.closest(xp)||(t.preventDefault(),n.hasAttribute(`data-wui-submitting`)))return;let i=`submitter`in t&&(t.submitter instanceof HTMLButtonElement||t.submitter instanceof HTMLInputElement)?t.submitter:null,a=i?.getAttribute(`formaction`)||n.getAttribute(`action`)||r.url,o=(i?.getAttribute(`formmethod`)||n.getAttribute(`method`)||`GET`).toUpperCase(),s=new FormData(n);i?.name&&!s.has(i.name)&&s.append(i.name,i.value);let c=o===`GET`;Dm(n,i,!0);let l;try{l=await e.queue.run(c?Nm(a,s):a,{method:o,body:c?void 0:s,navigate:r.options.navigate})}catch(t){B(t),e.session===r&&n.isConnected&&(Dm(n,i,!1),Mm(e,n,`server`,null));return}if(e.session!==r)return;if(n.isConnected&&Dm(n,i,!1),l.kind===`ok`&&l.result===`success`){Fm(e,r,l);return}if(l.kind===`aborted`||l.kind===`stale`||l.kind===`session`)return;if(l.kind===`ok`&&l.html){let t=l.result===yp;if(Tm(e,r,l.html,t)){if(t){let t=Ep(Qp(e),`a card`).querySelector(bp)?.textContent?.replace(/\s+/g,` `).trim();om(e,t||Z().invalidMessage)}return}}let u=l.kind===`ok`||l.kind===`validation`?`server`:l.kind,d=await jm(l.response);e.session===r&&Mm(e,n,u,d)}function Fm(e,t,n){let r=n.message,i=n.redirect||null,a=n.toastVariant||`success`;if(!Jm(a))throw TypeError(`Unknown toast variant "${a}". Use ${qm.join(`, `)}.`);let o={url:t.url,trigger:t.trigger,handle:t.handle,message:r,redirect:i,data:n.data??null,container:e.container};i&&!t.options.navigate?_h(r,a):r&&cp().toast(r,{variant:a}),lm(e,t.trigger?.isConnected?t.trigger:document,`success`,o),t.options.onSuccess?.(o,t.handle),i&&(t.options.navigate||(e=>window.location.assign(e)))(i);let s=n.next;s&&!i?(t.url=s,t.method=`GET`,t.body=void 0,bm(e,t)):n.keepOpen?n.html&&Tm(e,t,n.html,!1):mm(e,t,`success`,o)}function Im(e){let t=Mp(e.target,`[data-wui-modal], [data-wui-drawer], [data-wui-pane]`);t&&(t.matches(`a[href]`)&&(e.ctrlKey||e.metaKey||e.shiftKey||e.button!==0)||(e.preventDefault(),t.hasAttribute(`data-wui-pane`)?Um(t.getAttribute(`data-wui-pane`)??``,{target:t.getAttribute(`data-wui-pane-target`),trigger:t}).catch(e=>{jp(e)||B(e)}):t.hasAttribute(`data-wui-modal`)?zm(t.getAttribute(`data-wui-modal`)??``,{size:t.getAttribute(`data-wui-size`)||void 0,title:t.getAttribute(`data-wui-title`)||void 0,trigger:t}).catch(e=>{jp(e)||B(e)}):Vm(t.getAttribute(`data-wui-drawer`)??``,{size:t.getAttribute(`data-wui-drawer-size`)||void 0,title:t.getAttribute(`data-wui-title`)||void 0,trigger:t}).catch(e=>{jp(e)||B(e)})))}function Lm(e){if(e.key!==`Escape`||e.defaultPrevented)return;let t=Mp(e.target,Hm);if(!t)return;let n=wp.get(t),r=e.currentTarget;n?.session&&r instanceof Document&&!r.querySelector(`wui-modal[open]`)&&(t.querySelector(`form[data-wui-submitting]`)||(e.preventDefault(),mm(n,n.session,`dismissed`,null)))}function Rm(e=document){let t=e instanceof Document?e:Ep(e.ownerDocument,`an owner document`);Tp.has(t)||(Tp.add(t),t.addEventListener(`click`,Im),t.addEventListener(`keydown`,Lm));let n=kp(e,`wui-modal[data-wui-remote-url]`);e instanceof HTMLElement&&e.matches(`wui-modal[data-wui-remote-url]`)&&n.unshift(e);for(let e of n)fm(e)}function zm(e,t={}){try{if(!e)throw TypeError(`WUI.modal.load: a fragment url is required.`);let n=t.container===`drawer`,r=n?Bp(t.size):Ip(t.size),i=t.placement||`center`;if(!zp.includes(i))throw TypeError(`WUI.modal.load: unsupported placement "${i}". Use center or top.`);if(t.signal?.aborted)return Promise.reject(Ap());let a=qp(n?`drawer`:`modal`);Rm(document);let o=fm(a),s=im(o),c=pm(o,e,t);c.explicitSize=r,Rp(o.shell,r||o.defaultSize),n||Op(o.shell,`.modal-dialog`,`a dialog frame`).classList.toggle(`modal-dialog-centered`,i===`center`),t.title&&o.shell.setAttribute(`aria-label`,t.title),s||(a.toggleAttribute(`static`,t.staticBackdrop!==!1),a.toggleAttribute(`no-escape`,t.closeOnEscape===!1));let l=s?Promise.resolve():new Promise(e=>a.addEventListener(`wui-modal-opened`,()=>e(),{once:!0})),u=bm(o,c);return s||dm(o).show(),Bm(o,c,t,l,u,`WUI.modal.load`)}catch(e){return Promise.reject(e)}}function Bm(e,t,n,r,i,a){let o=new Promise((r,i)=>{n.signal?.addEventListener(`abort`,()=>{e.session===t&&(e.queue.abort(),mm(e,t,`dismissed`,{aborted:!0})),i(Ap())},{once:!0})}),s=Promise.all([r,i]).then(([,e])=>{if(e===`aborted`)throw Ap();if(e===`session`)throw Error(`${a}(${t.url}): the session expired; the browser is signing in again.`);return t.handle});return Promise.race([s,o])}function Vm(e,t={}){return zm(e,{...t,container:`drawer`,placement:void 0})}var Hm=`[data-wui-pane-host]`;function Um(e,t={}){try{if(!e)throw TypeError(`WUI.pane.load: a fragment url is required.`);let n=Gp(t.target);if(!n)throw TypeError(`WUI.pane.load: the target is not an <app-detail-pane>.`);if(t.signal?.aborted)return Promise.reject(Ap());Rm(document);let r=fm(n),i=pm(r,e,t);n.hidden=!1,n.setAttribute(`data-open`,``);let a=bm(r,i);return Bm(r,i,t,Promise.resolve(),a,`WUI.pane.load`)}catch(e){return Promise.reject(e)}}function Wm(e){let t=Gp(e);if(!t)throw TypeError(`WUI.pane.close: the target is not an <app-detail-pane>.`);let n=wp.get(t);n?.session&&mm(n,n.session,`dismissed`,null)}var Gm=`wuiConfirm`,Km=Object.freeze([`danger`]),qm=Object.freeze([`success`,`info`,`warning`,`danger`]),Jm=e=>qm.some(t=>t===e),Ym=`wui.flash`,Xm=()=>N(`confirmDialog`,Pf),Zm=new WeakSet,Qm=new WeakSet,$m=null,eh=null,th=!1,nh=e=>{let t=document.createElement(`span`);return t.textContent=e??``,t.innerHTML},rh=(e,t)=>{e&&cp().toast(e,{variant:t})};function ih(){let e=document.getElementById(Gm);if(e)return j(e.closest(`wui-modal`),`#${Gm} must be a wui-modal.`);let t=document.createElement(`wui-modal`);t.id=Gm;let n=document.createElement(`dialog`);return n.className=`modal wui-modal-shell`,n.style.setProperty(`--wui-modal-max-width`,`${hp.md}px`),n.innerHTML=`<div class="modal-dialog modal-dialog-centered wui-rb-dialog"><div class="modal-content wui-modal wui-confirm"><div class="wui-modal-body"><div class="wui-confirm-content"><span class="wui-confirm-icon"><wui-status-icon tone="info" size="120"></wui-status-icon></span><h3 class="wui-confirm-title" tabindex="-1" data-autofocus></h3><p class="wui-confirm-msg"></p></div></div><div class="wui-modal-footer"><div class="wui-confirm-actions"><button type="button" class="${Lc(`primary`,`soft`,`md`)}" data-wui-dismiss data-wui="${Nc}">${nh(Xm().cancelLabel)}</button><button type="button" class="${Lc(`primary`,`solid`,`md`)}" data-app-confirm data-wui="${Nc}"></button></div></div></div></div>`,t.append(n),document.body.appendChild(t),t}function ah(e,t){let n=e.getAttribute(`data-wui-confirm-tone`);if(n!==null&&!Km.includes(n))throw TypeError(`data-wui-confirm-tone="${n}" is not supported. Use danger, or leave it off.`);oh({title:e.getAttribute(`data-wui-confirm-title`),message:e.getAttribute(`data-wui-confirm`),label:e.getAttribute(`data-wui-confirm-label`),danger:n===`danger`},t)}function oh({title:e,message:t,label:n,danger:r},i){let a=ih(),o=a.querySelector(`.wui-confirm-title`),s=a.querySelector(`[data-app-confirm]`);if(!o||!s)throw Error(`#${Gm} is not a confirm dialog with a confirm button. Render <app-confirm-dialog id="${Gm}"> without confirm-href, or leave the dialog to the library.`);let c=a.querySelector(`.wui-confirm-msg`);c||(c=document.createElement(`p`),c.className=`wui-confirm-msg`,o.after(c));let l=e||Xm().confirmTitle;o.textContent=l,c.textContent=t,s.textContent=n||Xm().confirmLabel,s.classList.toggle(`btn-danger`,r),s.classList.toggle(`btn-primary`,!r),a.querySelector(`wui-status-icon`)?.setAttribute(`tone`,r?`delete`:`info`),j(a.querySelector(`dialog`),`#${Gm} has no <dialog>.`).setAttribute(`aria-label`,l),eh=i,th=!1,a.show()}var sh=(e,t)=>{$m=e;try{t()}finally{$m=null}},ch=(e,t)=>{let n=Reflect.get(e,t);if(n===void 0||typeof n==`string`)return n;throw TypeError(`confirmAction: ${t} must be text.`)},lh=e=>{if(typeof e!=`object`||!e)throw TypeError(`confirmAction: options must be an object with a message.`);let t=`message`in e?e.message:void 0;if(typeof t!=`string`)throw TypeError(`confirmAction: message must be text.`);return{title:ch(e,`title`),message:t,label:ch(e,`label`),tone:ch(e,`tone`)}};function uh(e,t,n){let{title:r,message:i,label:a,tone:o}=lh(t);if(o!=null&&!Km.includes(o))throw TypeError(`confirmAction: tone "${o}" is not supported. Use danger, or leave it off.`);Ah(e.ownerDocument),oh({title:r,message:i,label:a,danger:o===`danger`},()=>sh(e,n))}var dh=e=>`disabled`in e&&e.disabled===!0||e.getAttribute(`aria-disabled`)===`true`,fh=e=>{Pe(e,HTMLElement,`data-wui-confirm needs an HTML element to click.`).click()};function ph(e){let t=M(e.target,`[data-wui-confirm]:not(form)`);t&&t!==$m&&!dh(t)&&(e.preventDefault(),e.stopImmediatePropagation(),ah(t,()=>sh(t,()=>fh(t))))}function mh(e){let t=e.target;if(!(t instanceof HTMLFormElement)||!t.hasAttribute(`data-wui-confirm`)||t===$m||e.submitter&&e.submitter===$m||t.querySelector(`input[data-app-repeater-hidden]`))return;e.preventDefault(),e.stopImmediatePropagation();let n=e.submitter instanceof HTMLButtonElement||e.submitter instanceof HTMLInputElement?e.submitter:null,r=n?.form===t?n:void 0;ah(t,()=>sh(t,()=>t.requestSubmit(r)))}function hh(e){let t=M(e.target,`#${Gm} [data-app-confirm]`);t&&!t.hasAttribute(`disabled`)&&eh&&(th=!0,j(t.closest(`wui-modal`),`#${Gm} is missing around its confirm button.`).hide())}function gh(e){if(!(e.target instanceof Element)||e.target.id!==`wuiConfirm`)return;let t=th?eh:null;eh=null,th=!1,t?.()}function _h(e,t){e&&window.sessionStorage.setItem(Ym,JSON.stringify({message:e,variant:t}))}var vh=e=>e===`forbidden`?Xm().forbiddenMessage:e===`network`?Xm().networkMessage:Xm().failedMessage;function yh(){for(let e of document.querySelectorAll(`[data-wui-server]`))e.getAttribute(`data-refresh-on-success`)!==`false`&&tp(e)?.reload()}var bh=(e,t)=>{`disabled`in e&&(e.disabled=t)};async function xh(e){let t=e.getAttribute(`data-wui-post`);if(!t)throw Error(`A data-wui-post button needs the URL the action posts to.`);return Sh(t,e)}async function Sh(e,t,n){let r=t.getAttribute(`data-wui-post-reload`);if(r!==null&&r!==`page`)throw TypeError(`data-wui-post-reload="${r}" is not supported. Use page, or leave it off to reload the server tables.`);bh(t,!0),t.setAttribute(`aria-busy`,`true`);let i=await to(e,{method:`POST`,body:n});if(i.kind===`session`||i.kind===`aborted`)return;let a=i.toastVariant||`success`;i.ok&&(i.redirect||r===`page`)?(_h(i.message,a),i.redirect?window.location.assign(i.redirect):window.location.reload()):(bh(t,!1),t.removeAttribute(`aria-busy`),i.ok?(lp(i,a),yh()):rh(i.message||vh(i.kind),`danger`))}function Ch(e,t){bh(e,!1),e.removeAttribute(`aria-busy`),B(t),rh(Xm().failedMessage,`danger`)}function wh(e){let t=M(e.target,`[data-wui-post]`);t&&(e.preventDefault(),dh(t)||t.getAttribute(`aria-busy`)===`true`||xh(t).catch(e=>Ch(t,e)))}function Th(e){let t=M(e.target,`form[data-wui-post-form]`);if(!(t instanceof HTMLFormElement)||e.defaultPrevented)return;e.preventDefault();let n=j(e.submitter||t.querySelector(`button:not(.repeater-add):not(.repeater-remove)`),`A data-wui-post-form needs a submit button to report its result on.`);if(n.getAttribute(`aria-busy`)===`true`)return;let r=new URL(j(t.getAttribute(`action`),`A data-wui-post-form needs an action attribute to post to.`),document.baseURI).href;Sh(r,n,new FormData(t)).catch(e=>Ch(n,e)),t.closest(`wui-dropdown`)?.hide()}function Eh(){let e=window.sessionStorage.getItem(Ym);if(!e)return;window.sessionStorage.removeItem(Ym);let t=JSON.parse(e);if(typeof t!=`object`||!t)throw TypeError(`stored flash is not an object.`);let n=`message`in t?t.message:void 0,r=`variant`in t?t.variant:void 0;if(typeof r!=`string`||!Jm(r))throw TypeError(`stored flash variant "${String(r)}" is not supported.`);if(typeof n!=`string`)throw TypeError(`stored flash message is not text.`);rh(n,r)}function Dh(e){let t=e.querySelectorAll?[...e.querySelectorAll(`[data-wui-flash]`)]:[];e instanceof Element&&e.matches(`[data-wui-flash]`)&&t.unshift(e);for(let e of t){let t=e.getAttribute(`data-wui-flash-variant`)||`success`;if(!Jm(t))throw TypeError(`data-wui-flash-variant="${t}" is not supported. Use ${qm.join(`, `)}.`);let n=e.getAttribute(`data-wui-flash`)||(e.textContent??``).trim();e.remove(),rh(n,t)}}var Oh=e=>e instanceof HTMLInputElement||e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement?e.form:null;function kh(e){if(!(e.target instanceof Element))return;let t=e.target.closest(`[data-wui-auto-submit]`);if(!t)return;let n=Oh(e.target)||t.closest(`form`);n instanceof HTMLFormElement&&n.requestSubmit()}function Ah(e){Qm.has(e)||(Qm.add(e),e.addEventListener(`click`,hh),e.addEventListener(`wui-modal-closed`,gh))}function jh(e=document){let t=e instanceof Element?e.ownerDocument:e;Zm.has(t)||(Zm.add(t),t.addEventListener(`click`,ph,!0),t.addEventListener(`submit`,mh,!0),Ah(t),t.addEventListener(`click`,wh),t.addEventListener(`submit`,Th),t.addEventListener(`change`,kh),Eh()),Dh(e)}var Mh=()=>N(`unsavedChanges`,Nf),Nh=`form[data-wui-unsaved]`,Ph=`[aria-invalid="true"], .field-error:not(:empty), .field-validation-error, .validation-summary-errors, .wui-error-summary`,Fh=`[download], [data-wui-modal], [data-wui-post], [data-bs-toggle]`,Ih=new Set([`submit`,`button`,`reset`,`image`]),Lh=new Set([`hidden`,`checkbox`,`radio`,`file`,`submit`,`button`,`reset`,`image`,`range`,`color`]),Rh=e=>e instanceof HTMLInputElement||e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement||e instanceof HTMLButtonElement||e instanceof HTMLFieldSetElement||e instanceof HTMLObjectElement||e instanceof HTMLOutputElement,zh=e=>Rh(e)?e instanceof HTMLObjectElement||e instanceof HTMLOutputElement?!1:e.disabled:`disabled`in e&&!!e.disabled,Bh=e=>`name`in e&&typeof e.name==`string`&&e.name!==``,Vh=e=>typeof e==`object`&&!!e,Hh=e=>Array.isArray(e)&&e.every(e=>Array.isArray(e)&&typeof e[0]==`string`);function Uh(e){let t=JSON.parse(e);if(!Hh(t))throw Error(`unsaved-changes snapshot is malformed`);return t}var Wh=new WeakMap,Gh=new WeakSet,Kh=e=>`${e.name}:${e.size}:${e.lastModified}`,qh=e=>[...e.querySelectorAll(Nh)].filter(e=>e instanceof HTMLFormElement);function Jh(e){let t=[];for(let n of e.elements)Bh(n)&&!zh(n)&&(Rh(n)&&Ih.has(n.type)||(n instanceof HTMLInputElement&&(n.type===`checkbox`||n.type===`radio`)?t.push([n.name,n.value,n.checked]):n instanceof HTMLInputElement&&n.type===`file`?t.push([n.name,[...n.files||[]].map(Kh)]):n instanceof HTMLSelectElement&&n.type===`select-multiple`?t.push([n.name,[...n.selectedOptions].map(e=>e.value)]):n instanceof HTMLFieldSetElement||n instanceof HTMLObjectElement?t.push([n.name,null]):t.push([n.name,`value`in n?n.value:null])));return JSON.stringify(t)}function Yh(e){return Jh(e)}function Xh(e,t){let n=new Map,r=Uh(t);for(let e of r){let t=n.get(e[0]);t?t.push(e):n.set(e[0],[e])}let i=Uh(Jh(e)).map(e=>n.get(e[0])?.shift()??e);for(let e of n.values())i.push(...e);return JSON.stringify(i)}function Zh(e){for(let t of e.elements)if(Rh(t)&&t.name&&!zh(t)){if(t instanceof HTMLTextAreaElement||t instanceof HTMLInputElement&&!Lh.has(t.type)){if(t.value.trim()!==``)return!0}else if(t instanceof HTMLInputElement&&t.type===`file`&&(t.files?.length??0)>0)return!0}return!1}var Qh=e=>({saved:e.querySelector(Ph)&&Zh(e)?null:Jh(e),engaged:!1,discarded:!1});function $h(e){let t=Wh.get(e);return!t||t.discarded||!e.isConnected?!1:t.saved===null||t.engaged&&Jh(e)!==t.saved}var eg=(e,t)=>qh(e).filter(e=>e!==t&&$h(e));function tg(e,t,n){let r=t.map(e=>e.getAttribute(`data-wui-unsaved`)).find(Boolean)||Mh().message;uh(e,{title:Mh().title,message:r,label:Mh().leaveLabel,tone:`danger`},()=>{for(let e of t){let t=Wh.get(e);t&&(t.discarded=!0)}n()})}function ng(e){if(e.matches(Fh))return!1;let t=e.getAttribute(`target`);if(t&&t.toLowerCase()!==`_self`)return!1;let n=e.getAttribute(`href`);if(n===null)return!1;let r=new URL(n,window.location.href);if(r.protocol!==`http:`&&r.protocol!==`https:`)return!1;let i=window.location;return!(r.hash&&r.origin===i.origin&&r.pathname===i.pathname&&r.search===i.search)}function rg(e,t){if((t?.getAttribute(`formmethod`)||e.getAttribute(`method`)||`get`).toLowerCase()===`dialog`)return!1;let n=t?.getAttribute(`formtarget`)||e.getAttribute(`target`);return!n||n.toLowerCase()===`_self`}function ig(e){if(e.defaultPrevented||e.button!==0||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey)return;let t=e.target,n=M(t,`a[href]`);if(!(n instanceof HTMLAnchorElement)||!ng(n))return;let r=eg(n.ownerDocument,null);r.length&&(e.preventDefault(),tg(n,r,()=>n.click()))}function ag(e){let t=e.target;if(!(t instanceof HTMLFormElement)||e.defaultPrevented||!rg(t,e.submitter))return;let n=eg(t.ownerDocument,t);if(n.length){e.preventDefault();let r=e.submitter,i=(r instanceof HTMLButtonElement||r instanceof HTMLInputElement)&&r.form===t?r:void 0;tg(t,n,()=>t.requestSubmit(i));return}let r=Wh.get(t);r&&(r.saved=Jh(t),r.discarded=!1)}function og(e){eg(document,null).length&&(e.preventDefault(),e.returnValue=``)}function sg(e){let t=e.target,n=M(t,Nh);return n instanceof HTMLFormElement?n:null}function cg(e){let t=sg(e);if(!t)return;let n=Wh.get(t);n&&!n.engaged&&(n.saved!==null&&(n.saved=Jh(t)),n.engaged=!0)}function lg(e){let t=sg(e),n=t&&Wh.get(t);n&&(n.discarded=!1,e.isTrusted&&(n.engaged=!0))}function ug(e){for(let t of qh(e)){let e=Wh.get(t);e?.saved&&(e.saved=Xh(t,e.saved))}}function dg(e){let t=Vh(e)?e.handle:void 0;return Vh(t)?t.el:void 0}function fg(e){if(!(e instanceof CustomEvent))return;let t=dg(e.detail);if(t instanceof Element)for(let e of qh(t))mg(e)}function pg(e=document){let t=e instanceof Document?e:e.ownerDocument;if(!Gh.has(t)){Gh.add(t);for(let e of[`focusin`,`pointerdown`,`drop`])t.addEventListener(e,cg,!0);for(let e of[`input`,`change`])t.addEventListener(e,lg,!0);t.addEventListener(`click`,ig),t.addEventListener(`submit`,ag),t.addEventListener(`wui:modal:success`,fg),t.addEventListener(mi,()=>ug(t)),j(t.defaultView,`unsaved-changes guard needs a document with a window`).addEventListener(`beforeunload`,og)}let n=qh(e);e instanceof HTMLFormElement&&e.matches(Nh)&&n.unshift(e);for(let e of n)Wh.has(e)||Wh.set(e,Qh(e))}function mg(e){if(!(e instanceof HTMLFormElement)||!e.matches(Nh))throw TypeError(`resetUnsavedChanges: ${String(e)} is not a <form data-wui-unsaved>.`);Wh.set(e,{saved:Jh(e),engaged:!1,discarded:!1})}var hg=()=>N(`drawer`,Sl),gg=`wui:drawer:discard`,_g=`wui-drawer[confirm-discard]`,vg=`wui-modal`,yg=`data-wui-no-discard`,bg=`.wui-drawer-discard`,xg=`input, select, textarea`,Sg=e=>typeof e==`object`&&!!e||typeof e==`function`;function Cg(e){let t=e.currentTarget;if(!(t instanceof Document))throw Error(`The discard guard is not wired on a document.`);return t}function wg(e,t){return M(e,t)}var Tg=e=>e instanceof HTMLInputElement||e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement,Eg=new WeakMap,Dg=new WeakSet,Og=new WeakSet;function kg(e,t,n,r,i){let a=e.createElement(`button`);return a.type=`button`,a.className=Lc(t,n,`sm`),a.dataset.wui=Nc,a.setAttribute(r,``),a.textContent=i,a}function Ag(e,t){let n=e.createElement(`div`);n.className=`wui-drawer-discard`,n.setAttribute(`role`,`alert`);let r=e.createElement(`span`);return r.className=`wui-drawer-discard-text`,r.textContent=t,n.append(r,kg(e,`danger`,`solid`,`data-wui-discard-confirm`,hg().discardLabel),kg(e,`primary`,`soft`,`data-wui-discard-keep`,hg().keepLabel)),n}function jg(e){if(!(e instanceof Element))return null;let t=e.closest(_g);if(t)return t;let n=e.closest(vg);return n&&Pg(n).length?n:null}function Mg(e){return e.closest(_g)??e.closest(vg)}function Ng(e,t){return t.hasAttribute(yg)||e.hasAttribute(yg)?!1:t.hasAttribute(`confirm-discard`)||e.hasAttribute(`data-wui-confirm-discard`)?!0:(e.getAttribute(`method`)||`get`).toLowerCase()!==`get`}function Pg(e){return e.matches(_g)?e.querySelectorAll(`form`):[...e.querySelectorAll(`form`)].filter(t=>Ng(t,e))}function Fg(e){let t=Eg.get(e);return t!=null&&Yh(e)!==t}function Ig(e){let t=e.ownerDocument.createElement(`div`);return t.className=`wui-drawer-footer`,j(e.querySelector(`.wui-drawer-panel`),`The drawer has no panel to hold its footer.`).append(t),Og.add(t),t}function Lg(e){let t=e.ownerDocument.createElement(`div`);return t.className=`wui-modal-footer`,(e.querySelector(`.wui-modal-body`)?.parentElement??e.querySelector(`.modal-content`)??e).append(t),Og.add(t),t}function Rg(e){let t=e.querySelector(`[data-wui-discard-confirm]`);if(!(t instanceof HTMLElement))throw Error(`The discard prompt has no confirm button.`);t.focus()}function zg(e,t,n){let r=e.querySelector(bg);if(r){Rg(r);return}let i=Ag(e.ownerDocument,t),a;if(e.matches(_g))a=e.querySelector(`.wui-drawer-footer`)??Ig(e),a.prepend(i);else if(e.hasAttribute(`confirm-discard`))a=e.querySelector(`.wui-modal-footer`)??Lg(e),a.prepend(i);else{if(!n)throw Error(`A discard prompt needs the form that is dirty.`);a=n.querySelector(`.modal-footer`),a?a.prepend(i):(a=n,n.append(i))}a.classList.add(`wui-drawer-discarding`),Rg(i)}function Bg(e){let t=e.parentElement;if(e.remove(),!t)throw Error(`The discard prompt has no footer.`);t.classList.remove(`wui-drawer-discarding`),Og.has(t)&&t.remove()}function Vg(e){for(let t of Pg(e))for(let e of t.querySelectorAll(xg))if(Tg(e)&&e.type!==`hidden`&&!e.disabled){e.focus({preventScroll:!0});return}}function Hg(e){let t=jg(e.target);if(t)for(let e of Pg(t))Eg.get(e)??Eg.set(e,Yh(e))}function Ug(e){for(let t of Cg(e).querySelectorAll(`form`)){let e=Eg.get(t);e!=null&&Eg.set(t,Xh(t,e))}}function Wg(e){let t=e.target;t instanceof HTMLFormElement&&jg(t)&&Eg.set(t,Yh(t))}function Gg(e){if(!Sg(e))return;let t=`handle`in e?e.handle:void 0;if(Sg(t))return`el`in t?t.el:void 0}function Kg(e){if(!(e instanceof CustomEvent))return;let t=e.detail,n=Gg(t);if(n instanceof Element)for(let e of n.querySelectorAll(`form`))Eg.delete(e)}function qg(e){let t=e.target;t instanceof Element&&t.matches(_g)&&[...Pg(t)].some(Fg)&&(e.preventDefault(),zg(t,t.getAttribute(`confirm-discard`),null))}function Jg(e){let t=e.target;if(!(t instanceof Element)||!t.matches(vg))return;let n=[...Pg(t)].find(Fg);n&&(e.preventDefault(),zg(t,n.getAttribute(`data-wui-confirm-discard`)??t.getAttribute(`confirm-discard`)??hg().confirmDiscard,n))}function Yg(e){let t=j(e.closest(bg),`The discard button is outside its prompt.`),n=Mg(t);if(Bg(t),!n)throw Error(`The discard prompt is outside its drawer or modal.`);for(let e of Pg(n))Eg.set(e,Yh(e));n.dispatchEvent(new CustomEvent(gg,{bubbles:!0})),n.matches(_g)?j(n.closest(`wui-drawer`),`The confirm-discard drawer is not a wui-drawer.`).hide():j(n.closest(`wui-modal`),`The discarded dialog is not a wui-modal.`).hide()}function Xg(e){let t=j(e.closest(bg),`The keep button is outside its prompt.`),n=Mg(t);if(Bg(t),!n)throw Error(`The discard prompt is outside its drawer or modal.`);Vg(n)}function Zg(e){let t=wg(e.target,`[data-wui-discard-confirm]`);if(t){Yg(t);return}let n=wg(e.target,`[data-wui-discard-keep]`);n&&Xg(n)}function Qg(e=document){let t=e instanceof Document?e:e.ownerDocument;Dg.has(t)||(Dg.add(t),t.addEventListener(`focusin`,Hg),t.addEventListener(`pointerdown`,Hg),t.addEventListener(`submit`,Wg),t.addEventListener(mi,Ug),t.addEventListener(`wui:modal:success`,Kg),t.addEventListener(`wui:modal:loaded`,Kg),t.addEventListener(`wui-drawer-close`,qg,!0),t.addEventListener(`wui-modal-close`,Jg),t.addEventListener(`click`,Zg))}var $g={accountMenuLabel:`Account menu for {name}`,collapseNavLabel:`Collapse navigation`,emptyText:`You are all caught up.`,expandNavLabel:`Expand navigation`,label:`Notifications`,loadingNotificationsText:`Loading…`,logoutLabel:`Sign out`,markAllReadLabel:`Mark all read`,moreLabel:`More`,navLabel:`Main navigation`,newLabel:`New`,noResultsForText:`No results for “{value}”`,noResultsText:`No results`,noUnreadText:`No unread notifications`,notificationsLoadErrorMessage:`Could not load notifications.`,openNavLabel:`Open navigation`,placeholder:`Search`,profileLabel:`My profile`,resultCountText:`{count} result`,resultsCountText:`{count} results`,retryLabel:`Retry`,roleLabel:`Role:`,rolesLabel:`Roles:`,searchResultsLabel:`Search results`,searchUnavailableMessage:`Search is unavailable right now.`,seeAllResultsForText:`See all results for “{query}”`,skipLabel:`Skip to content`,tabBarLabel:`Quick navigation`,togglePagesLabel:`Show or hide {name} pages`,unreadBellLabel:`{label}, {count} unread`,unreadLabel:`Unread`,unreadNotificationsText:`{count} unread notifications`,viewAllLabel:`View all`},Q=()=>N(`shell`,$g),e_=31536e3,t_=new WeakMap,n_=e=>e>99?`99+`:String(e),r_=(e,t)=>Object.entries(t).reduce((e,[t,n])=>e.replaceAll(`{${t}}`,()=>String(n)),e);function i_(e,t,n=document){try{n.cookie=`${e}=${t?`1`:`0`}; Path=/; Max-Age=${e_}; SameSite=Lax`}catch(e){if(!(e instanceof DOMException&&e.name===`SecurityError`))throw e}}function a_(e,t,n,r=document){try{let i=`${e}=`,a=r.cookie.split(`;`).map(e=>e.trim()).find(e=>e.startsWith(i)),o=new Set(a?a.slice(i.length).split(`.`).filter(Boolean):[]);n?o.add(t):o.delete(t),r.cookie=`${e}=${[...o].join(`.`)}; Path=/; Max-Age=${e_}; SameSite=Lax`}catch(e){if(!(e instanceof DOMException&&e.name===`SecurityError`))throw e}}var o_=e=>{let t=document.createElement(`template`);return t.innerHTML=e,t.content},$=(e,t,n)=>{let r=e?.querySelector(t);return r instanceof n?r:null},s_=(e,t,n)=>{let r=e?.closest(t);return r instanceof n?r:null},c_=(e,t,n)=>e?[...e.querySelectorAll(t)].filter(e=>e instanceof n):[],l_=e=>{if(!(e.target instanceof Element))throw Error(`event target is not an element`);return e.target},u_=e=>{let t=e.getAttribute(`href`);if(t===null)throw Error(`search hit has no href`);return t},d_=(e,t)=>{let n=document.createElement(`div`);return n.className=e,n.textContent=t,n};function f_(e,t){let n=$(e,`.wui-bell-trigger`,HTMLElement),r=$(e,`.wui-bell-count`,HTMLElement),i=$(e,`[data-wui-bell-live]`,HTMLElement),a=$(e,`[data-wui-bell-list]`,HTMLElement),o=()=>j(a,`bell list missing`),s=$(e,`.wui-bell-menu`,HTMLElement),{src:c,readAction:l}=e.dataset,u=e.dataset.label||Q().label,d=e.dataset.emptyText||Q().emptyText,f=e.dataset.loadingText??Q().loadingNotificationsText,p=e.dataset.noUnreadText??Q().noUnreadText,m=e.dataset.unreadText??Q().unreadNotificationsText,h=e.dataset.bellLabel??Q().unreadBellLabel,g=Number(e.dataset.pollSeconds??60),_=no(),v=Number(e.dataset.unread)||0,y=(t,a=!0)=>{let o=Math.max(0,Number(t)||0),s=o!==v;v=o,e.dataset.unread=String(o),r&&(r.textContent=n_(o),r.hidden=o===0),n?.setAttribute(`aria-label`,o===0?u:r_(h,{label:u,count:n_(o)})),a&&s&&i&&(i.textContent=o===0?p:r_(m,{count:n_(o)}))},b=()=>s?A(s):!1,x=()=>{let e=d_(`wui-bell-state`,`${Q().notificationsLoadErrorMessage} `),t=document.createElement(`button`);t.type=`button`,t.className=`btn btn-link btn-sm`,t.dataset.wuiBellRetry=``,t.textContent=Q().retryLabel,e.append(t),o().replaceChildren(e)},S=async t=>{if(t&&(o().setAttribute(`aria-busy`,`true`),o().querySelector(`.wui-bell-item`)||o().replaceChildren(d_(`wui-bell-state`,f))),c===void 0)throw Error(`bell has no data-src`);let n=await _.run(c);if(n.kind===`aborted`||n.kind===`stale`||n.kind===`session`)return;if(o().removeAttribute(`aria-busy`),!n.ok){t&&x();return}let r=o_(n.html),i=$(r,`[data-wui-unread]`,HTMLElement),a=i?Number(i.getAttribute(`data-wui-unread`)):v;y(a),(t||b())&&(r.querySelector(`.wui-bell-item`)?o().replaceChildren(r):o().replaceChildren(d_(`wui-bell-state`,d))),e.dispatchEvent(new CustomEvent(`wui:notifications:loaded`,{bubbles:!0,detail:{unread:a}}))};s?.addEventListener(`beforetoggle`,e=>{`newState`in e&&e.newState===`open`&&S(!0)}),e.addEventListener(`click`,async e=>{let t=l_(e);if(t.closest(`[data-wui-bell-retry]`)){await S(!0);return}let n=s_(t,`[data-wui-bell-read]`,HTMLButtonElement);if(!n||!l)return;n.disabled=!0;let r=await to(l,{method:`POST`});n.disabled=!1,r.ok&&(y(0),await S(!0))});let C=null,ee=()=>{g>0&&C===null&&(C=setInterval(()=>S(b()),g*1e3))},w=()=>{C!==null&&clearInterval(C),C=null},T=()=>{document.hidden?w():(S(b()),ee())};return g>0&&(document.addEventListener(`visibilitychange`,T),document.hidden||ee()),t.push(()=>{w(),_.abort(),document.removeEventListener(`visibilitychange`,T)}),{setUnread:e=>y(e),refresh:()=>S(b())}}var p_=e=>e instanceof HTMLElement&&(e.isContentEditable||/^(INPUT|TEXTAREA|SELECT)$/.test(e.tagName)),m_=(e,t,n)=>`${e}${e.includes(`?`)?`&`:`?`}${encodeURIComponent(t)}=${encodeURIComponent(n)}`;function h_(e,t){let n=j($(e,`input.search-input`,HTMLInputElement),`search input missing`),r=$(e,`.wui-topsearch-results`,HTMLElement),i=()=>j(r,`search results missing`),a=$(e,`.wui-topsearch-open`,HTMLElement),o=$(e,`[data-wui-topsearch-live]`,HTMLElement),{src:s,param:c=`q`,resultsHref:l}=e.dataset,u=Number(e.dataset.minChars??2),d=Number(e.dataset.debounceMs??250),f=e.dataset.noResultsText??Q().noResultsText,p=e.dataset.resultsCountText??Q().resultsCountText,m=e.dataset.resultCountText??Q().resultCountText,h=no(),g,_=-1,v=()=>c_(i(),`.wui-topsearch-hit`,HTMLElement),y=e=>{let t=v();_=t.length===0?-1:(e+t.length)%t.length,t.forEach((e,t)=>{let n=t===_;e.classList.toggle(`is-active`,n),e.setAttribute(`aria-selected`,n?`true`:`false`)});let r=_>=0?t[_]:void 0;r?(n.setAttribute(`aria-activedescendant`,r.id),r.scrollIntoView?.({block:`nearest`})):n.removeAttribute(`aria-activedescendant`)},b=()=>{i().hidden=!0,n.setAttribute(`aria-expanded`,`false`),n.removeAttribute(`aria-activedescendant`),_=-1},x=()=>{i().hidden=!1,n.setAttribute(`aria-expanded`,`true`)},S=t=>{e.classList.toggle(`is-open`,t),a?.setAttribute(`aria-expanded`,t?`true`:`false`)},C=t=>{let n=new CustomEvent(`wui:search:select`,{bubbles:!0,cancelable:!0,detail:{href:t}});e.dispatchEvent(n)&&window.location.assign(t)},ee=async t=>{if(e.classList.add(`is-loading`),s===void 0)throw Error(`search has no data-src`);let n=await h.run(m_(s,c,t));if(n.kind!==`aborted`&&n.kind!==`stale`&&n.kind!==`session`){if(e.classList.remove(`is-loading`),n.ok){let e=o_(n.html),t=$(e,`[data-wui-count]`,HTMLElement);i().replaceChildren(e),v().forEach((e,t)=>{e.id=`${i().id}-opt-${t}`});let r=t?Number(t.getAttribute(`data-wui-count`)):v().length;o&&(o.textContent=r===0?f:r_(r===1?m:p,{count:r}))}else i().replaceChildren(d_(`wui-topsearch-empty`,Q().searchUnavailableMessage));_=-1,x()}};n.addEventListener(`input`,()=>{clearTimeout(g);let t=n.value.trim();t.length<u?(h.abort(),e.classList.remove(`is-loading`),i().replaceChildren(),b()):g=setTimeout(()=>ee(t),d)}),n.addEventListener(`keydown`,t=>{if(t.key===`ArrowDown`||t.key===`ArrowUp`){if(i().hidden||v().length===0)return;t.preventDefault(),y(_+(t.key===`ArrowDown`?1:-1))}else if(Mr(t)){let e=v(),r=_>=0?e[_]:void 0;!i().hidden&&r?(t.preventDefault(),C(u_(r))):l&&n.value.trim()!==``&&(t.preventDefault(),C(m_(l,c,n.value.trim())))}else t.key===`Escape`&&(i().hidden?e.classList.contains(`is-open`)&&(t.preventDefault(),t.stopPropagation(),S(!1),a?.focus()):(t.preventDefault(),t.stopPropagation(),b()))}),i().addEventListener(`click`,e=>{let t=s_(l_(e),`.wui-topsearch-hit`,HTMLElement);!t||e.ctrlKey||e.metaKey||e.shiftKey||e.button===1||(e.preventDefault(),C(u_(t)))}),a?.addEventListener(`click`,()=>{let t=!e.classList.contains(`is-open`);S(t),t&&n.focus()});let w=e=>{e.key!==`/`||e.ctrlKey||e.metaKey||e.altKey||p_(e.target)||(e.preventDefault(),S(!0),n.focus())},T=t=>{t.target instanceof Node&&e.contains(t.target)||(b(),e.classList.contains(`is-open`)&&S(!1))};document.addEventListener(`keydown`,w),document.addEventListener(`pointerdown`,T),t.push(()=>{clearTimeout(g),h.abort(),document.removeEventListener(`keydown`,w),document.removeEventListener(`pointerdown`,T)})}function g_(e){let t=[],n=e.dataset.wuiCollapsedCookie;n&&e.addEventListener(`wui:shell:collapse`,e=>{i_(n,!!e.detail?.collapsed)});let r=e.dataset.wuiFoldedCookie;r&&e.addEventListener(`wui:shell:nav-fold`,e=>{a_(r,e.detail?.key,!!e.detail?.folded)}),e.addEventListener(`click`,t=>{l_(t).closest(`[data-wui-tabbar-more]`)&&$(e,`[data-app-shell-menu]`,HTMLElement)?.click()});let i=$(e,`[data-wui-bell]`,HTMLElement),a=i?f_(i,t):null,o=$(e,`[data-wui-topsearch]`,HTMLElement);o&&h_(o,t);let s={el:e,setUnread(e){j(a,`WUI.shell: this <app-shell> has no <app-shell-notifications>.`).setUnread(e)},refreshNotifications(){return j(a,`WUI.shell: this <app-shell> has no <app-shell-notifications>.`).refresh()},get collapsed(){return e.classList.contains(`collapsed`)},set collapsed(t){if(!!t===e.classList.contains(`collapsed`))return;let n=$(e,`[data-app-shell-collapse]`,HTMLElement);n?n.click():e.classList.toggle(`collapsed`,!!t)}};t_.set(e,s);let c=n=>{if(n.target===e||n.target instanceof Node&&n.target.contains(e)){for(let e of t)e();t_.delete(e),delete e.dataset.wuiPartsWired,document.removeEventListener(`wui:teardown`,c)}};return document.addEventListener(`wui:teardown`,c),s}function __(e=document){let t=[];e instanceof HTMLElement&&e.matches(`[data-app-shell]`)&&t.push(e),t.push(...c_(e,`[data-app-shell]`,HTMLElement));for(let e of t)e.dataset.wuiPartsWired||(e.dataset.wuiPartsWired=`1`,g_(e))}function v_(e){let t=s_(e,`[data-app-shell]`,HTMLElement);return t?(t_.has(t)||__(t),t_.get(t)??null):null}var y_=`data-wui-submit-once`,b_=`data-wui-submit-pending`,x_=`wui-submit-spinner`,S_=new WeakSet,C_=new WeakMap;function w_(e){return e instanceof HTMLButtonElement||e instanceof HTMLInputElement?e:null}function T_(e){if(e.setAttribute(`aria-busy`,`true`),e.tagName===`INPUT`||e.querySelector(`.${x_}`))return;let t=e.ownerDocument.createElement(`span`);t.className=`spinner-border spinner-border-sm me-2 ${x_}`,t.setAttribute(`aria-hidden`,`true`),e.prepend(t)}function E_(e){e.removeAttribute(`aria-busy`),e.querySelector(`.${x_}`)?.remove()}function D_(e){return e.method===`post`&&e.target!==`_blank`&&e.getAttribute(`data-wui-submit-once`)!==`off`}function O_(e){let t=e.target;if(!(t instanceof HTMLFormElement)||!D_(t))return;if(t.hasAttribute(b_)){e.preventDefault();return}t.setAttribute(b_,``);let n=w_(e.submitter);setTimeout(()=>{t.hasAttribute(b_)&&(e.defaultPrevented?t.removeAttribute(b_):n&&(n.disabled=!0,T_(n),C_.set(t,n)))},0)}var k_=e=>[...e.querySelectorAll(`form[${b_}]`)].filter(e=>e instanceof HTMLFormElement);function A_(e){for(let t of k_(e)){t.removeAttribute(b_);let e=C_.get(t);e&&(e.disabled=!1,E_(e),C_.delete(t))}}function j_(e){let t=e.ownerDocument===null?e:e.ownerDocument;S_.has(t)||(S_.add(t),t.addEventListener(`submit`,O_,!0),t.defaultView?.addEventListener(`pageshow`,()=>A_(t)))}var M_=[`light`,`dark`,`auto`],N_=[`wave`,`circle`,`slide`,`blinds`,`fade`,`none`],P_=`wave`,F_=`theme`,I_={wave:1100,circle:700,slide:600,blinds:900,fade:350,none:0},L_=`wui-theme-switching`,R_=`wui:theme:change`,z_=`(prefers-color-scheme: dark)`,B_=e=>typeof window<`u`&&typeof window.matchMedia==`function`&&window.matchMedia(e).matches,V_=e=>M_.some(t=>t===e);function H_(e){return e===`dark`||e===`auto`&&B_(z_)?`dark`:`light`}function U_(e=F_){let t=null;try{t=window.localStorage.getItem(e)}catch(e){if(!(e instanceof DOMException))throw e}return V_(t)?t:`auto`}function W_(e,t=F_){try{window.localStorage.setItem(t,e)}catch(e){if(!(e instanceof DOMException))throw e}}function G_(e){let t=document.documentElement,n=H_(e);t.setAttribute(`data-theme`,e),t.setAttribute(`data-bs-theme`,n),document.dispatchEvent(new CustomEvent(R_,{detail:{mode:n,preference:e}}))}var K_=`((k)=>{var m;try{m=localStorage.getItem(k)}catch{m=null}if(m!=='light'&&m!=='dark')m='auto';var r=document.documentElement,q=window.matchMedia?window.matchMedia('(prefers-color-scheme: dark)'):null;function s(){var t=r.getAttribute('data-theme');r.setAttribute('data-bs-theme',t==='auto'?(q?.matches?'dark':'light'):t)}r.setAttribute('data-theme',m);s();if(q?.addEventListener)q.addEventListener('change',()=>{if(r.getAttribute('data-theme')==='auto')s()})})(`;function q_(e=F_){return`${K_}${JSON.stringify(String(e)).replace(/</g,`\\u003c`)})`}function J_(e,{includeAuto:t=!1}={}){return e===`light`?`dark`:e===`dark`&&t?`auto`:`light`}function Y_(e){if(typeof window>`u`||typeof window.matchMedia!=`function`)return()=>{};let t=window.matchMedia(z_),n=()=>e(t.matches?`dark`:`light`);return t.addEventListener(`change`,n),()=>t.removeEventListener(`change`,n)}var X_=60,Z_=e=>e<.5?4*e*e*e:1-(-2*e+2)**3/2,Q_=e=>e.toFixed(1),$_=(e,t)=>`${Q_(e)}px ${Q_(t)}px`,ev={amplitude:22,segments:36,cycles:1.5,ripples:2},tv=6,nv=(e,t,n,r,i)=>{let{amplitude:a,segments:o,cycles:s}=ev,c=n*(t+2*a),l=i?t+a-c:c-a,u=i?t+2*a:-2*a,d=[$_(0,u)];for(let t=0;t<=o;t++){let n=e*t/o,i=l+a*Math.sin(2*Math.PI*s*t/o+r);d.push($_(n,i))}return d.push($_(e,u)),`polygon(${d.join(`, `)})`},rv=(e,t,n,r)=>{let i=t/tv,a=[];for(let t=0;t<tv;t++){let o=t*i,s=i*n,c=r?o+i-s:o,l=r?o+i:o+s;a.push($_(0,c),$_(e,c),$_(e,l),$_(0,l))}return`polygon(${a.join(`, `)})`};function iv(e,{width:t,height:n,to:r=`dark`,origin:i}){let a=r===`dark`,o=[];for(let r=0;r<=X_;r++){let s=r/X_,c=Z_(s);switch(e){case`circle`:{let e=i?.x??t/2,r=i?.y??n/2,a=Math.hypot(Math.max(e,t-e),Math.max(r,n-r));o.push({clipPath:`circle(${Q_(a*c)}px at ${Q_(e)}px ${Q_(r)}px)`});break}case`slide`:{let e=n*(1-c);o.push({clipPath:a?`inset(${Q_(e)}px 0px 0px 0px)`:`inset(0px 0px ${Q_(e)}px 0px)`});break}case`blinds`:o.push({clipPath:rv(t,n,c,a)});break;case`fade`:o.push({clipPath:`none`,opacity:c});break;case`none`:return[];default:o.push({clipPath:nv(t,n,c,s*ev.ripples*2*Math.PI,a)})}}return o}var av=e=>{e instanceof DOMException&&(e.name===`AbortError`||e.name===`InvalidStateError`)||B(`[@webority/ui-elements] The theme view transition failed:`,e)};function ov(e,{effect:t=P_,to:n,origin:r,duration:i}={}){let a=document.documentElement,o=n!==void 0&&a.getAttribute(`data-bs-theme`)===n;if(t===`none`||o||B_(`(prefers-reduced-motion: reduce)`)||typeof document.startViewTransition!=`function`||typeof a.animate!=`function`)return e(),Promise.resolve(!1);a.classList.add(L_);let s=document.startViewTransition(e),c=i??I_[t]??I_.wave;return s.ready.then(()=>{let e=iv(t,{width:window.innerWidth,height:window.innerHeight,to:n,origin:r});a.animate(e,{duration:c,easing:`linear`,fill:`both`,pseudoElement:`::view-transition-new(root)`})}).catch(av),s.finished.catch(av).finally(()=>a.classList.remove(L_)).then(()=>!0)}function sv(){Ot(),i(`wui-select`,Xs),i(`wui-datepicker`,ra),i(`wui-dock`,ia),i(`wui-otp`,No),i(`wui-shortcuts`,vc),i(`wui-record-pager`,rs),i(`wui-data-table`,Br),i(`wui-hover-card`,ma),i(`wui-modal`,ha),i(`wui-navigation-menu`,wa),i(`wui-notification-center`,So),i(`wui-onboarding-checklist`,Ao),i(`wui-overflow`,Jo),i(`wui-rating`,ns),i(`wui-relative-time`,ys),i(`wui-show-more`,Sc),i(`wui-truncate`,Cc),i(`wui-whats-new`,jc)}return globalThis.WeborityUiElementsInternal||(globalThis.WeborityUiElementsInternal={version:`0.168.0`,modules:Xl}),Ei(),sv(),e.AVATAR_ACCEPT=Ql,e.AVATAR_MAX_SIZE_MB=$l,e.AVATAR_OUTPUT_SIZE=eu,e.AVATAR_OUTPUT_TYPE=tu,e.AVATAR_PREVIEW_SIZES=nu,e.BAR_BULK_IN_BAR_ATTRIBUTE=Ad,e.COLUMN_MAX_WIDTH=Wn,e.COLUMN_MIN_WIDTH=Un,e.COMMAND_SHORTCUT_ATTRIBUTE=yu,e.CONFIRM_DIALOG_ID=Gm,e.CONFIRM_TONES=Km,e.COPY_FEEDBACK_MS=zc,e.CSRF_META_NAME=Ua,e.CURRENCIES=Jt,e.CURRENCY_SYMBOLS=At,e.DATE_PATTERNS=Zt,e.DEFAULT_CSRF_HEADER=Wa,e.DEFAULT_CURRENCY=kt,e.DEFAULT_IMAGE_ACCEPT=Ou,e.DEFAULT_MAX_SIZE_MB=ku,e.DEFAULT_PASSWORD_RULES=Bd,e.DEFAULT_THEME_EFFECT=P_,e.DEFAULT_THEME_STORAGE_KEY=F_,e.DISCARD_EVENT=gg,e.DROP_OVER_CLASS=Jd,e.DURATION_UNITS=Xt,e.FILTER_POPOVER_MAX_CHIPS=gt,e.FLASH_STORAGE_KEY=Ym,e.FLASH_VARIANTS=qm,e.FORMAT_STYLES=qt,e.HTTP_KINDS=Ja,e.IST_TIME_ZONE=F,e.MASK_INPUT_TYPES=Zu,e.MASK_NAMES=od,e.MENTION_ID_PATTERN=Hc,e.MONEY_UNITS=Yt,e.NOTIFICATION_COUNT_CAP=ka,e.PIN_AT_VAR=dr,e.PIN_SIDES=qn,e.RESIZE_STEP=Gn,e.RESIZE_STEP_LARGE=Kn,e.ROW_DRAG_TYPE=Yd,e.ROW_DROP_EVENT=qd,e.ROW_HEIGHTS=Yn,e.ROW_MOVE_LIMIT=hr,e.ROW_MOVE_MS=gr,e.ROW_SAVE_ATTR=wr,e.ROW_SAVE_ERROR_CLASS=Tr,e.ROW_SAVE_STATES=Cr,e.SCROLL_EDGE_SELECTOR=wf,e.SEARCH_OPEN_KEY=ou,e.SELECT_CELL_CLASS=J,e.SHORTCUTS_OFF_ATTRIBUTE=Qe,e.SHORTCUT_EVENT=et,e.SHORTCUT_SCOPE_ATTRIBUTE=$e,e.SUBMIT_ONCE_ATTRIBUTE=y_,e.THEME_BOOT_SCRIPT_BODY=K_,e.THEME_CHANGE_EVENT=R_,e.THEME_EFFECTS=N_,e.THEME_EFFECT_DURATION=I_,e.THEME_MODES=M_,e.THEME_SWITCHING_CLASS=L_,e.TOAST_ACTION_METHODS=Ra,e.TOAST_ACTION_MS=rp,e.VIRTUAL_OVERSCAN=Jn,e.WHATS_NEW_READ_EVENT=wc,e.WUI_HEADERS=W,e.WuiDataTable=Br,e.WuiDatePicker=ra,e.WuiDock=ia,e.WuiHoverCard=ma,e.WuiNavigationMenu=wa,e.WuiNotificationCenter=So,e.WuiOnboardingChecklist=Ao,e.WuiOtp=No,e.WuiOverflow=Jo,e.WuiRating=ns,e.WuiRecordPager=rs,e.WuiRelativeTime=ys,e.WuiSelect=Xs,e.WuiShortcuts=vc,e.WuiShowMore=Sc,e.WuiTruncate=Cc,e.WuiWhatsNew=jc,e.acceptDroppedFiles=Gu,e.acceptLabel=Hu,e.addRowSelectCells=gl,e.addSelectColumn=_l,e.applyBarBulk=Ld,e.applyTheme=G_,e.ariaKeyShortcuts=lt,e.attachFileDrop=Ku,e.attachInputMask=xd,e.attachRowDrag=bf,e.attachScrollEdges=Ef,e.attachShiftRange=bl,e.avatarCropOptions=au,e.avatarUnreadableMessage=iu,e.barBulkCountText=Nd,e.buildPasswordRules=Ud,e.clampColumnWidth=ir,e.classifyStatus=Qa,e.closeRemotePane=Wm,e.collapseSearch=hu,e.configureCsrf=Ka,e.confirmAction=uh,e.copyTextToClipboard=Bc,e.createDiscardPrompt=Ag,e.createRequestQueue=no,e.createSelectHeaderCell=ul,e.createSelectRowCell=dl,e.createSelectSpacerCell=fl,e.currencyPrefix=Mt,e.deriveStepStatus=il,e.emptyValueLabel=I,e.evaluatePassword=Wd,e.fillText=P,e.formValues=Yh,e.formatCompact=Dn,e.formatCurrency=Tn,e.formatDate=Nn,e.formatDateTime=Ln,e.formatDuration=An,e.formatFileSize=zu,e.formatMasked=md,e.formatNumber=wn,e.formatPercent=On,e.formatRelativeTime=ds,e.formatValue=Fn,e.getServerTable=tp,e.getShell=v_,e.glyphSvg=V,e.groupCount=rr,e.groupItems=ar,e.groupNotificationsByDay=La,e.identityCell=Er,e.inShortcutScope=pt,e.initCollapsibleSearch=vu,e.initCommandShortcuts=Tu,e.initDrawerDiscard=Qg,e.initInputMasks=kd,e.initPageBarBulk=Rd,e.initRemoteModals=Rm,e.initRowDrag=Cf,e.initScrollEdges=Mf,e.initServerActions=jh,e.initServerTables=ep,e.initShellParts=__,e.initSubmitOnce=j_,e.initUnsavedChanges=pg,e.isCommandChord=Su,e.isCurrencyCode=jt,e.isHeicFile=ru,e.isImageFile=Lu,e.isImageOnlyAccept=Vu,e.isMaskPattern=cd,e.isPdfFile=Bu,e.isTimeZone=Rt,e.isTypingTarget=ut,e.loadRemoteDrawer=Vm,e.loadRemoteModal=zm,e.loadRemotePane=Um,e.maskedPostValue=_d,e.matchSegments=wl,e.matchesAccept=Uu,e.measureRows=br,e.mentionLabel=Gc,e.mentionTextFromValue=Jc,e.mentionValueFromText=Yc,e.mentionedIds=Xc,e.moveFocus=ht,e.nextTheme=J_,e.notificationCountText=Ma,e.notificationDayHeading=Ia,e.notificationTime=Fa,e.notificationTriggerLabel=Na,e.notificationUnreadAnnouncement=Pa,e.openSearch=mu,e.parseMentionValue=qc,e.parseToastAction=Va,e.passwordSatisfies=Gd,e.pinAtValue=fr,e.pinClasses=mr,e.pinOffsetVar=ur,e.planPins=pr,e.playRowMoves=xr,e.pluralText=Ke,e.postedMasked=pd,e.rawMasked=fd,e.readColumnWidths=cr,e.readCsrf=Xa,e.readStoredTheme=U_,e.readText=N,e.relativeTimeTitle=fs,e.resetUnsavedChanges=mg,e.resolveMask=ud,e.resolveTheme=H_,e.rowLabel=Dr,e.rowOrderChanged=Sr,e.runShortcut=mt,e.runToastAction=up,e.saveOutcomeText=Ar,e.setRowSaveState=Or,e.setText=Ue,e.settledRows=kr,e.shortcutKey=ct,e.shortcutName=st,e.shortcutsOff=ft,e.showResultToast=lp,e.stepperHeaderItems=al,e.storeTheme=W_,e.syncSelectAll=vl,e.syncTargets=Sf,e.themeBootScript=q_,e.themeKeyframes=iv,e.tickedKeys=sf,e.timeZoneLabel=Bn,e.toInstant=jn,e.todayIn=Wt,e.transitionTheme=ov,e.validateFile=Wu,e.virtualRange=or,e.wallClockOf=Ut,e.watchSystemTheme=Y_,e.whenElementsReady=Oi,e.withTrustedLabel=Ji,e.writeColumnWidths=lr,e.wuiFetch=to,e.zoneOffsetMs=Bt,e.zoneParts=zt,e})({});