@duetds/components 9.7.2 → 9.7.3

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 (694) hide show
  1. package/hydrate/index.js +15 -14
  2. package/lib/cjs/{a11y-utils-ae1e63c4.js → a11y-utils-dff7b9d2.js} +1 -1
  3. package/lib/cjs/{app-globals-540cd51d.js → app-globals-30a48744.js} +1 -1
  4. package/lib/cjs/duet-action-button.cjs.entry.js +4 -4
  5. package/lib/cjs/duet-alert.cjs.entry.js +3 -3
  6. package/lib/cjs/duet-badge.cjs.entry.js +1 -1
  7. package/lib/cjs/duet-banner.cjs.entry.js +4 -4
  8. package/lib/cjs/duet-breadcrumb.cjs.entry.js +2 -2
  9. package/lib/cjs/duet-breadcrumbs.cjs.entry.js +4 -4
  10. package/lib/cjs/duet-button_2.cjs.entry.js +4 -4
  11. package/lib/cjs/duet-callout.cjs.entry.js +2 -2
  12. package/lib/cjs/duet-caption_4.cjs.entry.js +6 -6
  13. package/lib/cjs/duet-card.cjs.entry.js +4 -4
  14. package/lib/cjs/duet-checkbox.cjs.entry.js +1 -1
  15. package/lib/cjs/duet-checkmark.cjs.entry.js +1 -1
  16. package/lib/cjs/duet-chip.cjs.entry.js +2 -2
  17. package/lib/cjs/duet-choice_2.cjs.entry.js +3 -3
  18. package/lib/cjs/duet-collapsible.cjs.entry.js +3 -3
  19. package/lib/cjs/duet-combobox.cjs.entry.js +3 -3
  20. package/lib/cjs/duet-contact-card.cjs.entry.js +2 -2
  21. package/lib/cjs/duet-cookie-consent.cjs.entry.js +1 -1
  22. package/lib/cjs/duet-date-picker.cjs.entry.js +4 -4
  23. package/lib/cjs/duet-divider_2.cjs.entry.js +3 -3
  24. package/lib/cjs/duet-editable-table_3.cjs.entry.js +5 -5
  25. package/lib/cjs/duet-empty-state.cjs.entry.js +1 -1
  26. package/lib/cjs/duet-fieldset.cjs.entry.js +2 -2
  27. package/lib/cjs/duet-file-chooser.cjs.entry.js +1 -1
  28. package/lib/cjs/duet-footer.cjs.entry.js +3 -3
  29. package/lib/cjs/duet-grid_2.cjs.entry.js +2 -2
  30. package/lib/cjs/duet-header_2.cjs.entry.js +4 -4
  31. package/lib/cjs/duet-hero.cjs.entry.js +3 -3
  32. package/lib/cjs/duet-icon.cjs.entry.js +3 -3
  33. package/lib/cjs/duet-input_2.cjs.entry.js +5 -5
  34. package/lib/cjs/duet-layout.cjs.entry.js +2 -2
  35. package/lib/cjs/duet-list_2.cjs.entry.js +1 -1
  36. package/lib/cjs/duet-menu-bar-button.cjs.entry.js +1 -1
  37. package/lib/cjs/duet-menu-bar-dropdown-link.cjs.entry.js +2 -2
  38. package/lib/cjs/duet-menu-bar-dropdown.cjs.entry.js +1 -1
  39. package/lib/cjs/duet-menu-bar-item.cjs.entry.js +4 -4
  40. package/lib/cjs/duet-menu-bar-link.cjs.entry.js +1 -1
  41. package/lib/cjs/duet-menu-bar.cjs.entry.js +3 -3
  42. package/lib/cjs/duet-modal.cjs.entry.js +4 -4
  43. package/lib/cjs/duet-multiselect.cjs.entry.js +3 -3
  44. package/lib/cjs/duet-nav.cjs.entry.js +1 -1
  45. package/lib/cjs/duet-notification_2.cjs.entry.js +2 -2
  46. package/lib/cjs/duet-number-input.cjs.entry.js +3 -3
  47. package/lib/cjs/duet-overlay.cjs.entry.js +1 -1
  48. package/lib/cjs/duet-page-heading.cjs.entry.js +1 -1
  49. package/lib/cjs/duet-pagination_2.cjs.entry.js +4 -4
  50. package/lib/cjs/duet-phone-input.cjs.entry.js +3 -3
  51. package/lib/cjs/duet-popup-menu_2.cjs.entry.js +4 -4
  52. package/lib/cjs/duet-progress.cjs.entry.js +2 -2
  53. package/lib/cjs/duet-promo-card.cjs.entry.js +4 -4
  54. package/lib/cjs/duet-radio_2.cjs.entry.js +2 -2
  55. package/lib/cjs/duet-range-slider.cjs.entry.js +2 -2
  56. package/lib/cjs/duet-scrollable_3.cjs.entry.js +5 -5
  57. package/lib/cjs/duet-section-layout.cjs.entry.js +1 -1
  58. package/lib/cjs/duet-select.cjs.entry.js +2 -2
  59. package/lib/cjs/duet-shaped-image.cjs.entry.js +1 -1
  60. package/lib/cjs/duet-show-more.cjs.entry.js +2 -2
  61. package/lib/cjs/duet-slideout-lang.cjs.entry.js +2 -2
  62. package/lib/cjs/duet-slideout-link.cjs.entry.js +4 -4
  63. package/lib/cjs/duet-slideout-panel-dropdown.cjs.entry.js +1 -1
  64. package/lib/cjs/duet-slideout-panel.cjs.entry.js +6 -6
  65. package/lib/cjs/duet-slideout.cjs.entry.js +6 -6
  66. package/lib/cjs/duet-status-icon.cjs.entry.js +2 -2
  67. package/lib/cjs/duet-step_2.cjs.entry.js +1 -1
  68. package/lib/cjs/duet-submenu-bar-dropdown-link.cjs.entry.js +1 -1
  69. package/lib/cjs/duet-submenu-bar-dropdown.cjs.entry.js +2 -2
  70. package/lib/cjs/duet-submenu-bar-item.cjs.entry.js +4 -4
  71. package/lib/cjs/duet-submenu-bar-link.cjs.entry.js +1 -1
  72. package/lib/cjs/duet-submenu-bar.cjs.entry.js +2 -2
  73. package/lib/cjs/duet-textarea.cjs.entry.js +3 -3
  74. package/lib/cjs/duet-toggle.cjs.entry.js +1 -1
  75. package/lib/cjs/duet-toolbar-dropdown-link.cjs.entry.js +1 -1
  76. package/lib/cjs/duet-toolbar-dropdown.cjs.entry.js +1 -1
  77. package/lib/cjs/duet-toolbar-item.cjs.entry.js +4 -4
  78. package/lib/cjs/duet-toolbar-link.cjs.entry.js +1 -1
  79. package/lib/cjs/duet-toolbar.cjs.entry.js +1 -1
  80. package/lib/cjs/duet-tooltip-button_2.cjs.entry.js +7 -6
  81. package/lib/cjs/duet-tooltip.cjs.entry.js +3 -3
  82. package/lib/cjs/duet-tray.cjs.entry.js +5 -5
  83. package/lib/cjs/duet-upload-aria-status.cjs.entry.js +2 -2
  84. package/lib/cjs/duet-upload-item.cjs.entry.js +3 -3
  85. package/lib/cjs/duet-visually-hidden.cjs.entry.js +2 -2
  86. package/lib/cjs/duet.cjs.js +2 -2
  87. package/lib/cjs/{errorcodes.utils-b47aaa45.js → errorcodes.utils-653d3ef3.js} +1 -1
  88. package/lib/cjs/{focus-utils-c4163f8f.js → focus-utils-147b9ceb.js} +1 -1
  89. package/lib/cjs/{index-00821d28.js → index-a33450b5.js} +2 -2
  90. package/lib/cjs/{language-utils-77bf1c27.js → language-utils-1e374ec6.js} +1 -1
  91. package/lib/cjs/loader.cjs.js +2 -2
  92. package/lib/cjs/{slot-utils-55f6a689.js → slot-utils-9a6728d0.js} +1 -1
  93. package/lib/cjs/{token-utils-12717808.js → token-utils-6258d3f7.js} +1 -1
  94. package/lib/cjs/{tokens-57e06fe4.js → tokens-202c2577.js} +2 -2
  95. package/lib/cjs/{tokens.module-46ddb47a.js → tokens.module-a7c77c13.js} +2 -2
  96. package/lib/collection/components/duet-action-button/duet-action-button.js +2 -2
  97. package/lib/collection/components/duet-alert/duet-alert.js +1 -1
  98. package/lib/collection/components/duet-banner/duet-banner.js +1 -1
  99. package/lib/collection/components/duet-button/duet-button.js +5 -5
  100. package/lib/collection/components/duet-caption/duet-caption.js +1 -1
  101. package/lib/collection/components/duet-card/duet-card.js +3 -3
  102. package/lib/collection/components/duet-checkbox/duet-checkbox.js +3 -3
  103. package/lib/collection/components/duet-chip/duet-chip.js +6 -6
  104. package/lib/collection/components/duet-choice/duet-choice.js +3 -3
  105. package/lib/collection/components/duet-collapsible/duet-collapsible.js +3 -3
  106. package/lib/collection/components/duet-combobox/duet-combobox.js +3 -3
  107. package/lib/collection/components/duet-cookie-consent/duet-cookie-consent.js +1 -1
  108. package/lib/collection/components/duet-date-picker/duet-date-picker.js +4 -4
  109. package/lib/collection/components/duet-divider/duet-divider.js +1 -1
  110. package/lib/collection/components/duet-editable-table/duet-editable-table.js +5 -5
  111. package/lib/collection/components/duet-empty-state/duet-empty-state.js +1 -1
  112. package/lib/collection/components/duet-file-chooser/duet-file-chooser.js +1 -1
  113. package/lib/collection/components/duet-footer/duet-footer.js +7 -7
  114. package/lib/collection/components/duet-grid/duet-grid.js +3 -3
  115. package/lib/collection/components/duet-header/duet-header.js +15 -15
  116. package/lib/collection/components/duet-heading/duet-heading.js +1 -1
  117. package/lib/collection/components/duet-hero/duet-hero.js +5 -5
  118. package/lib/collection/components/duet-input/duet-input.js +8 -8
  119. package/lib/collection/components/duet-label/duet-label.js +2 -2
  120. package/lib/collection/components/duet-layout/duet-layout.js +1 -1
  121. package/lib/collection/components/duet-list/duet-list.js +3 -3
  122. package/lib/collection/components/duet-logo/duet-logo.js +1 -1
  123. package/lib/collection/components/duet-menu-bar/duet-menu-bar.js +1 -1
  124. package/lib/collection/components/duet-menu-bar-dropdown-link/duet-menu-bar-dropdown-link.css +1 -1
  125. package/lib/collection/components/duet-modal/duet-modal.js +4 -4
  126. package/lib/collection/components/duet-multiselect/duet-multiselect.js +6 -6
  127. package/lib/collection/components/duet-notification-drawer/duet-notification-drawer.js +1 -1
  128. package/lib/collection/components/duet-number-input/duet-number-input.js +4 -4
  129. package/lib/collection/components/duet-overlay/duet-overlay.js +1 -1
  130. package/lib/collection/components/duet-pagination/duet-pagination.js +2 -2
  131. package/lib/collection/components/duet-paragraph/duet-paragraph.js +3 -3
  132. package/lib/collection/components/duet-phone-input/duet-phone-input.js +4 -4
  133. package/lib/collection/components/duet-popup-menu/duet-popup-menu.js +1 -1
  134. package/lib/collection/components/duet-popup-menu-item/duet-popup-menu-item.js +2 -2
  135. package/lib/collection/components/duet-radio/duet-radio.js +3 -3
  136. package/lib/collection/components/duet-range-slider/duet-range-slider.js +2 -2
  137. package/lib/collection/components/duet-range-stepper/duet-range-stepper.js +1 -1
  138. package/lib/collection/components/duet-select/duet-select.js +5 -5
  139. package/lib/collection/components/duet-show-more/duet-show-more.js +1 -1
  140. package/lib/collection/components/duet-slideout/duet-slideout.js +1 -1
  141. package/lib/collection/components/duet-spacer/duet-spacer.js +2 -2
  142. package/lib/collection/components/duet-spinner/duet-spinner.js +1 -1
  143. package/lib/collection/components/duet-step/duet-step.js +2 -2
  144. package/lib/collection/components/duet-stepper/duet-stepper.js +1 -1
  145. package/lib/collection/components/duet-tab-group/duet-tab-group.js +5 -5
  146. package/lib/collection/components/duet-textarea/duet-textarea.js +4 -4
  147. package/lib/collection/components/duet-toggle/duet-toggle.js +1 -1
  148. package/lib/collection/components/duet-tooltip/duet-tooltip-button.js +3 -2
  149. package/lib/collection/components/duet-tooltip/duet-tooltip-popup.js +2 -2
  150. package/lib/collection/components/duet-tooltip/duet-tooltip.js +2 -2
  151. package/lib/collection/components/duet-tray/duet-tray.js +2 -2
  152. package/lib/collection/components/duet-upload/duet-upload.js +14 -14
  153. package/lib/collection/components/duet-upload-aria-status/duet-upload-aria-status.js +1 -1
  154. package/lib/collection/components/duet-upload-item/duet-upload-item.js +2 -2
  155. package/lib/collection/components/duet-visually-hidden/duet-visually-hidden.js +1 -1
  156. package/lib/dist-custom-elements/duet-action-button.js +1 -1
  157. package/lib/dist-custom-elements/duet-alert.js +1 -1
  158. package/lib/dist-custom-elements/duet-badge.js +1 -1
  159. package/lib/dist-custom-elements/duet-banner.js +4 -4
  160. package/lib/dist-custom-elements/duet-breadcrumb.js +3 -3
  161. package/lib/dist-custom-elements/duet-breadcrumbs.js +2 -2
  162. package/lib/dist-custom-elements/duet-button.js +1 -1
  163. package/lib/dist-custom-elements/duet-callout.js +2 -2
  164. package/lib/dist-custom-elements/duet-caption.js +1 -1
  165. package/lib/dist-custom-elements/duet-card.js +4 -4
  166. package/lib/dist-custom-elements/duet-checkbox.js +1 -1
  167. package/lib/dist-custom-elements/duet-checkmark.js +1 -1
  168. package/lib/dist-custom-elements/duet-chip.js +1 -1
  169. package/lib/dist-custom-elements/duet-choice-group.js +8 -8
  170. package/lib/dist-custom-elements/duet-choice.js +4 -4
  171. package/lib/dist-custom-elements/duet-collapsible.js +4 -4
  172. package/lib/dist-custom-elements/duet-combobox.js +15 -15
  173. package/lib/dist-custom-elements/duet-contact-card.js +8 -8
  174. package/lib/dist-custom-elements/duet-cookie-consent.js +6 -6
  175. package/lib/dist-custom-elements/duet-date-picker.js +13 -13
  176. package/lib/dist-custom-elements/duet-divider.js +1 -1
  177. package/lib/dist-custom-elements/duet-editable-table.js +7 -7
  178. package/lib/dist-custom-elements/duet-empty-state.js +1 -1
  179. package/lib/dist-custom-elements/duet-fieldset.js +1 -1
  180. package/lib/dist-custom-elements/duet-file-chooser.js +2 -2
  181. package/lib/dist-custom-elements/duet-footer.js +7 -7
  182. package/lib/dist-custom-elements/duet-grid-item.js +1 -1
  183. package/lib/dist-custom-elements/duet-grid.js +1 -1
  184. package/lib/dist-custom-elements/duet-header.js +9 -9
  185. package/lib/dist-custom-elements/duet-heading.js +1 -1
  186. package/lib/dist-custom-elements/duet-hero.js +9 -9
  187. package/lib/dist-custom-elements/duet-icon.js +1 -1
  188. package/lib/dist-custom-elements/duet-input.js +1 -1
  189. package/lib/dist-custom-elements/duet-label.js +1 -1
  190. package/lib/dist-custom-elements/duet-layout.js +1 -1
  191. package/lib/dist-custom-elements/duet-link.js +1 -1
  192. package/lib/dist-custom-elements/duet-list-item.js +1 -1
  193. package/lib/dist-custom-elements/duet-list.js +1 -1
  194. package/lib/dist-custom-elements/duet-logo.js +1 -1
  195. package/lib/dist-custom-elements/duet-menu-bar-button.js +2 -2
  196. package/lib/dist-custom-elements/duet-menu-bar-dropdown-link.js +3 -3
  197. package/lib/dist-custom-elements/duet-menu-bar-dropdown.js +2 -2
  198. package/lib/dist-custom-elements/duet-menu-bar-item.js +2 -2
  199. package/lib/dist-custom-elements/duet-menu-bar-link.js +2 -2
  200. package/lib/dist-custom-elements/duet-menu-bar.js +3 -3
  201. package/lib/dist-custom-elements/duet-modal.js +8 -8
  202. package/lib/dist-custom-elements/duet-multiselect.js +9 -9
  203. package/lib/dist-custom-elements/duet-nav.js +1 -1
  204. package/lib/dist-custom-elements/duet-notification-drawer.js +4 -4
  205. package/lib/dist-custom-elements/duet-notification.js +2 -2
  206. package/lib/dist-custom-elements/duet-number-input.js +11 -11
  207. package/lib/dist-custom-elements/duet-overlay.js +1 -1
  208. package/lib/dist-custom-elements/duet-page-heading.js +3 -3
  209. package/lib/dist-custom-elements/duet-pagination.js +14 -14
  210. package/lib/dist-custom-elements/duet-paragraph.js +1 -1
  211. package/lib/dist-custom-elements/duet-phone-input.js +16 -16
  212. package/lib/dist-custom-elements/duet-popup-menu-item.js +1 -1
  213. package/lib/dist-custom-elements/duet-popup-menu.js +1 -1
  214. package/lib/dist-custom-elements/duet-progress.js +1 -1
  215. package/lib/dist-custom-elements/duet-promo-card.js +4 -4
  216. package/lib/dist-custom-elements/duet-radio-group.js +8 -8
  217. package/lib/dist-custom-elements/duet-radio.js +1 -1
  218. package/lib/dist-custom-elements/duet-range-slider.js +3 -3
  219. package/lib/dist-custom-elements/duet-range-stepper.js +4 -4
  220. package/lib/dist-custom-elements/duet-scrollable.js +1 -1
  221. package/lib/dist-custom-elements/duet-section-layout.js +1 -1
  222. package/lib/dist-custom-elements/duet-select.js +1 -1
  223. package/lib/dist-custom-elements/duet-shaped-image.js +1 -1
  224. package/lib/dist-custom-elements/duet-show-more.js +1 -1
  225. package/lib/dist-custom-elements/duet-slideout-lang.js +2 -2
  226. package/lib/dist-custom-elements/duet-slideout-link.js +2 -2
  227. package/lib/dist-custom-elements/duet-slideout-panel-dropdown.js +2 -2
  228. package/lib/dist-custom-elements/duet-slideout-panel.js +3 -3
  229. package/lib/dist-custom-elements/duet-slideout.js +4 -4
  230. package/lib/dist-custom-elements/duet-spacer.js +1 -1
  231. package/lib/dist-custom-elements/duet-spinner.js +1 -1
  232. package/lib/dist-custom-elements/duet-status-icon.js +1 -1
  233. package/lib/dist-custom-elements/duet-step.js +4 -4
  234. package/lib/dist-custom-elements/duet-stepper.js +2 -2
  235. package/lib/dist-custom-elements/duet-submenu-bar-dropdown-link.js +2 -2
  236. package/lib/dist-custom-elements/duet-submenu-bar-dropdown.js +3 -3
  237. package/lib/dist-custom-elements/duet-submenu-bar-item.js +2 -2
  238. package/lib/dist-custom-elements/duet-submenu-bar-link.js +2 -2
  239. package/lib/dist-custom-elements/duet-submenu-bar.js +4 -4
  240. package/lib/dist-custom-elements/duet-tab-group.js +7 -7
  241. package/lib/dist-custom-elements/duet-tab.js +2 -2
  242. package/lib/dist-custom-elements/duet-table.js +1 -1
  243. package/lib/dist-custom-elements/duet-textarea.js +10 -10
  244. package/lib/dist-custom-elements/duet-toggle.js +2 -2
  245. package/lib/dist-custom-elements/duet-toolbar-dropdown-link.js +2 -2
  246. package/lib/dist-custom-elements/duet-toolbar-dropdown.js +2 -2
  247. package/lib/dist-custom-elements/duet-toolbar-item.js +2 -2
  248. package/lib/dist-custom-elements/duet-toolbar-link.js +2 -2
  249. package/lib/dist-custom-elements/duet-toolbar.js +1 -1
  250. package/lib/dist-custom-elements/duet-tooltip-button.js +1 -1
  251. package/lib/dist-custom-elements/duet-tooltip-popup.js +1 -1
  252. package/lib/dist-custom-elements/duet-tooltip.js +1 -1
  253. package/lib/dist-custom-elements/duet-tray.js +6 -6
  254. package/lib/dist-custom-elements/duet-upload-aria-status.js +1 -1
  255. package/lib/dist-custom-elements/duet-upload-item.js +1 -1
  256. package/lib/dist-custom-elements/duet-upload.js +20 -20
  257. package/lib/dist-custom-elements/duet-visually-hidden.js +1 -1
  258. package/lib/dist-custom-elements/index.js +1 -1
  259. package/lib/dist-custom-elements/{p-2c553cff.js → p-071f0e0e.js} +2 -2
  260. package/lib/dist-custom-elements/{p-28e818db.js → p-0bc0fae0.js} +3 -3
  261. package/lib/dist-custom-elements/{p-f6000a03.js → p-0e2efa7c.js} +2 -2
  262. package/lib/dist-custom-elements/{p-f2c2f3d2.js → p-0f369092.js} +2 -2
  263. package/lib/dist-custom-elements/{p-9b364696.js → p-16d626f7.js} +1 -1
  264. package/lib/dist-custom-elements/{p-e9121d56.js → p-1ab17905.js} +2 -2
  265. package/lib/dist-custom-elements/{p-5c9414bb.js → p-2912cf42.js} +1 -1
  266. package/lib/dist-custom-elements/{p-b16d3074.js → p-2bba1f11.js} +13 -13
  267. package/lib/dist-custom-elements/{p-ac057b32.js → p-2eed03e9.js} +2 -2
  268. package/lib/dist-custom-elements/{p-874675e6.js → p-3618ad6e.js} +1 -1
  269. package/lib/dist-custom-elements/{p-3fda4c4e.js → p-361ee963.js} +8 -8
  270. package/lib/dist-custom-elements/{p-9cd492a4.js → p-3cbf5b86.js} +2 -2
  271. package/lib/dist-custom-elements/{p-2f35ab6d.js → p-3ec4af1c.js} +5 -5
  272. package/lib/dist-custom-elements/{p-294be03e.js → p-43c6c2c7.js} +2 -2
  273. package/lib/dist-custom-elements/{p-a42d6be2.js → p-49865b1b.js} +7 -7
  274. package/lib/dist-custom-elements/{p-ef48f2c7.js → p-503b4e9a.js} +1 -1
  275. package/lib/dist-custom-elements/{p-bb35f7e7.js → p-5ad562f8.js} +1 -1
  276. package/lib/dist-custom-elements/{p-931ac5ac.js → p-5b3417af.js} +1 -1
  277. package/lib/dist-custom-elements/{p-d8dddc51.js → p-6c0e7ef6.js} +5 -5
  278. package/lib/dist-custom-elements/{p-4c179c1e.js → p-6f42296b.js} +2 -2
  279. package/lib/dist-custom-elements/{p-5830b545.js → p-6fd10f9f.js} +2 -2
  280. package/lib/dist-custom-elements/{p-3e0e12ca.js → p-731b9d6d.js} +4 -4
  281. package/lib/dist-custom-elements/{p-6e022235.js → p-77260ba8.js} +1 -1
  282. package/lib/dist-custom-elements/{p-d383dac5.js → p-78310bb8.js} +6 -6
  283. package/lib/dist-custom-elements/{p-821b01b0.js → p-7f7bbfd6.js} +3 -3
  284. package/lib/dist-custom-elements/{p-8dc35603.js → p-7f801ab9.js} +3 -3
  285. package/lib/dist-custom-elements/{p-90074c50.js → p-85baafd3.js} +5 -4
  286. package/lib/dist-custom-elements/{p-1bc9fed2.js → p-8bd8a028.js} +2 -2
  287. package/lib/dist-custom-elements/{p-e096b297.js → p-9839f95a.js} +5 -5
  288. package/lib/dist-custom-elements/{p-4ce79667.js → p-9f8ce24f.js} +2 -2
  289. package/lib/dist-custom-elements/{p-198d7866.js → p-ad4e9593.js} +2 -2
  290. package/lib/dist-custom-elements/{p-fcea7cb2.js → p-b8f0a57f.js} +10 -10
  291. package/lib/dist-custom-elements/{p-521ea41a.js → p-b9038c11.js} +2 -2
  292. package/lib/dist-custom-elements/{p-65a2c6d6.js → p-d22b3e1e.js} +5 -5
  293. package/lib/dist-custom-elements/{p-30c909e0.js → p-d3836623.js} +2 -2
  294. package/lib/dist-custom-elements/{p-3c061dcb.js → p-d40dea65.js} +1 -1
  295. package/lib/dist-custom-elements/{p-f0e6f0d8.js → p-d897581d.js} +1 -1
  296. package/lib/dist-custom-elements/{p-92f53ff1.js → p-da8bfcfd.js} +1 -1
  297. package/lib/dist-custom-elements/{p-cc3db4b5.js → p-de7c425c.js} +3 -3
  298. package/lib/dist-custom-elements/{p-1b9771cc.js → p-df59ab0d.js} +2 -2
  299. package/lib/dist-custom-elements/{p-cc4d7cd3.js → p-e1e94579.js} +2 -2
  300. package/lib/dist-custom-elements/{p-60321ce4.js → p-e2ba7871.js} +2 -2
  301. package/lib/dist-custom-elements/{p-b2209719.js → p-f161c655.js} +10 -10
  302. package/lib/duet/duet.esm.js +1 -1
  303. package/lib/duet/duet.js +1 -1
  304. package/lib/duet/{p-2fafdd81.entry.js → p-02222785.entry.js} +1 -1
  305. package/lib/duet/{p-15560f1b.entry.js → p-02367465.entry.js} +1 -1
  306. package/lib/duet/{p-611dd17d.entry.js → p-036cf847.entry.js} +1 -1
  307. package/lib/duet/{p-1c2eb6d0.system.entry.js → p-03ac358d.system.entry.js} +1 -1
  308. package/lib/duet/{p-3a85f7b2.system.entry.js → p-0461e7e9.system.entry.js} +1 -1
  309. package/lib/duet/{p-0511fd26.system.js → p-060cdb54.system.js} +1 -1
  310. package/lib/duet/{p-9eb022e9.system.entry.js → p-06f4c377.system.entry.js} +1 -1
  311. package/lib/duet/{p-2e66d74b.entry.js → p-0883306d.entry.js} +1 -1
  312. package/lib/duet/{p-c2a22f7e.entry.js → p-0cb26302.entry.js} +1 -1
  313. package/lib/duet/{p-f6000a03.js → p-0e2efa7c.js} +1 -1
  314. package/lib/duet/{p-ce1ee182.entry.js → p-0e753feb.entry.js} +1 -1
  315. package/lib/duet/{p-9b7649d6.system.entry.js → p-0e82b604.system.entry.js} +1 -1
  316. package/lib/duet/{p-fff58939.entry.js → p-0ed55531.entry.js} +1 -1
  317. package/lib/duet/{p-7f03dd39.entry.js → p-102dfbe4.entry.js} +1 -1
  318. package/lib/duet/{p-b562ad7e.entry.js → p-10524349.entry.js} +1 -1
  319. package/lib/duet/{p-32a2d722.entry.js → p-11ee216a.entry.js} +1 -1
  320. package/lib/duet/{p-229649f1.system.entry.js → p-14709e0a.system.entry.js} +2 -2
  321. package/lib/duet/{p-1004af75.js → p-17efced0.js} +1 -1
  322. package/lib/duet/{p-2683cdc8.entry.js → p-1844f05a.entry.js} +1 -1
  323. package/lib/duet/{p-9c75c38d.entry.js → p-18a96271.entry.js} +1 -1
  324. package/lib/duet/{p-d01c4f4b.entry.js → p-195ff1d3.entry.js} +1 -1
  325. package/lib/duet/{p-e4c8559c.system.js → p-1bf70e2e.system.js} +1 -1
  326. package/lib/duet/{p-d384e575.entry.js → p-1ce03a3a.entry.js} +1 -1
  327. package/lib/duet/{p-792c9b83.system.entry.js → p-1d05a412.system.entry.js} +1 -1
  328. package/lib/duet/{p-f11db08e.system.entry.js → p-1f9989a6.system.entry.js} +1 -1
  329. package/lib/duet/p-1fbf259e.js +4 -0
  330. package/lib/duet/{p-22a75312.entry.js → p-21d87f83.entry.js} +1 -1
  331. package/lib/duet/{p-bf9205ac.system.entry.js → p-23b7e9b5.system.entry.js} +1 -1
  332. package/lib/duet/{p-3bb14438.entry.js → p-23b80b3e.entry.js} +1 -1
  333. package/lib/duet/{p-db36e60c.entry.js → p-263edbd6.entry.js} +1 -1
  334. package/lib/duet/{p-0b3cb828.system.entry.js → p-281b2b5d.system.entry.js} +1 -1
  335. package/lib/duet/{p-34569fd2.entry.js → p-28b04b91.entry.js} +1 -1
  336. package/lib/duet/{p-0bc30861.system.entry.js → p-28df1178.system.entry.js} +1 -1
  337. package/lib/duet/{p-49ee5283.entry.js → p-2a0a2d22.entry.js} +1 -1
  338. package/lib/duet/{p-f6c64bac.entry.js → p-2b197ef4.entry.js} +1 -1
  339. package/lib/duet/{p-da4450d1.system.entry.js → p-2b71cb1a.system.entry.js} +1 -1
  340. package/lib/duet/{p-c4204738.entry.js → p-2b88e2a6.entry.js} +1 -1
  341. package/lib/duet/{p-7f85afa0.entry.js → p-2b9f6f73.entry.js} +1 -1
  342. package/lib/duet/{p-33433426.system.entry.js → p-2bb9d33b.system.entry.js} +1 -1
  343. package/lib/duet/{p-495e7223.system.entry.js → p-2c780825.system.entry.js} +1 -1
  344. package/lib/duet/{p-8b570e72.system.entry.js → p-2f5fcc3a.system.entry.js} +1 -1
  345. package/lib/duet/{p-706f68c0.entry.js → p-31dcdb86.entry.js} +1 -1
  346. package/lib/duet/{p-50551117.system.entry.js → p-32134eef.system.entry.js} +1 -1
  347. package/lib/duet/{p-7fed5b14.system.entry.js → p-341c73ed.system.entry.js} +1 -1
  348. package/lib/duet/{p-8d19eece.entry.js → p-3499470e.entry.js} +1 -1
  349. package/lib/duet/{p-10e56ab2.entry.js → p-35374149.entry.js} +1 -1
  350. package/lib/duet/{p-f1ba5666.system.entry.js → p-35df4480.system.entry.js} +1 -1
  351. package/lib/duet/{p-0af2a9fd.entry.js → p-38cdebd0.entry.js} +1 -1
  352. package/lib/duet/p-39748f5b.system.entry.js +4 -0
  353. package/lib/duet/{p-99e02dad.entry.js → p-3a302ff4.entry.js} +1 -1
  354. package/lib/duet/{p-a4c84b87.system.entry.js → p-3b6dd272.system.entry.js} +1 -1
  355. package/lib/duet/{p-9bd3407d.system.entry.js → p-3c1e1b2d.system.entry.js} +1 -1
  356. package/lib/duet/p-3c8f2480.entry.js +4 -0
  357. package/lib/duet/{p-dee5d396.system.entry.js → p-3cb26df9.system.entry.js} +1 -1
  358. package/lib/duet/{p-64a9d71c.system.entry.js → p-3e6d0c30.system.entry.js} +1 -1
  359. package/lib/duet/{p-fd3af4d2.entry.js → p-3ff1b416.entry.js} +1 -1
  360. package/lib/duet/{p-4952116e.entry.js → p-4347d3c9.entry.js} +1 -1
  361. package/lib/duet/{p-4d7186ca.system.entry.js → p-49fb1e7a.system.entry.js} +1 -1
  362. package/lib/duet/{p-6372e73b.entry.js → p-4ac51cbc.entry.js} +1 -1
  363. package/lib/duet/{p-f64e1189.system.entry.js → p-4fe2417b.system.entry.js} +1 -1
  364. package/lib/duet/{p-8097eb44.entry.js → p-50e9e9ab.entry.js} +1 -1
  365. package/lib/duet/{p-1cb66641.js → p-534b8454.js} +1 -1
  366. package/lib/duet/{p-e7185338.entry.js → p-561cea14.entry.js} +1 -1
  367. package/lib/duet/p-56df20b9.js +5 -0
  368. package/lib/duet/{p-5c8ad4d6.system.entry.js → p-58df7fa5.system.entry.js} +1 -1
  369. package/lib/duet/{p-926266f1.system.entry.js → p-59443b10.system.entry.js} +2 -2
  370. package/lib/duet/{p-ba08c98a.entry.js → p-5a9b782c.entry.js} +1 -1
  371. package/lib/duet/{p-7a2f8df9.entry.js → p-5b4fc043.entry.js} +1 -1
  372. package/lib/duet/{p-2d73a182.entry.js → p-5c6f4f5b.entry.js} +1 -1
  373. package/lib/duet/p-5de30279.js +4 -0
  374. package/lib/duet/{p-d30e2e4f.system.entry.js → p-5f93edb6.system.entry.js} +1 -1
  375. package/lib/duet/{p-0e883b85.entry.js → p-5fc533ae.entry.js} +1 -1
  376. package/lib/duet/{p-db9ef24f.system.entry.js → p-5fefa37e.system.entry.js} +1 -1
  377. package/lib/duet/p-6040e724.system.js +4 -0
  378. package/lib/duet/{p-79d7199e.entry.js → p-61d393a4.entry.js} +1 -1
  379. package/lib/duet/p-6312466b.system.js +5 -0
  380. package/lib/duet/{p-67e6cff0.system.entry.js → p-632353fd.system.entry.js} +1 -1
  381. package/lib/duet/{p-91d4e473.entry.js → p-63ea9155.entry.js} +1 -1
  382. package/lib/duet/{p-56ad7189.system.js → p-6409bcfb.system.js} +1 -1
  383. package/lib/duet/{p-a7e80b9d.system.entry.js → p-6430224c.system.entry.js} +1 -1
  384. package/lib/duet/{p-ef731dfb.system.js → p-64959c1d.system.js} +1 -1
  385. package/lib/duet/{p-4853837e.system.entry.js → p-65a74e17.system.entry.js} +2 -2
  386. package/lib/duet/{p-77d28810.system.entry.js → p-682277c7.system.entry.js} +1 -1
  387. package/lib/duet/{p-2c7d99df.system.entry.js → p-684afcde.system.entry.js} +1 -1
  388. package/lib/duet/p-6a5ea5bc.entry.js +4 -0
  389. package/lib/duet/{p-776ed377.system.entry.js → p-6b4d54d0.system.entry.js} +1 -1
  390. package/lib/duet/{p-4118597d.entry.js → p-6bf1d93b.entry.js} +1 -1
  391. package/lib/duet/{p-6f415c0f.system.entry.js → p-6bff5f9f.system.entry.js} +1 -1
  392. package/lib/duet/{p-69e3ec89.entry.js → p-71b5840a.entry.js} +1 -1
  393. package/lib/duet/{p-51e5cc18.system.entry.js → p-733a386f.system.entry.js} +1 -1
  394. package/lib/duet/{p-1b031645.system.entry.js → p-746c4bff.system.entry.js} +1 -1
  395. package/lib/duet/{p-56c617ae.entry.js → p-74ca330b.entry.js} +1 -1
  396. package/lib/duet/{p-fee19c9f.entry.js → p-7559dcad.entry.js} +1 -1
  397. package/lib/duet/p-796281c2.js +4 -0
  398. package/lib/duet/{p-4d3c01fa.system.entry.js → p-7a37a7d4.system.entry.js} +1 -1
  399. package/lib/duet/{p-25caa9f7.entry.js → p-7bc341d3.entry.js} +1 -1
  400. package/lib/duet/{p-c760a6bc.system.entry.js → p-7eff9ec4.system.entry.js} +1 -1
  401. package/lib/duet/{p-4f0be726.system.entry.js → p-7fa80fa6.system.entry.js} +1 -1
  402. package/lib/duet/{p-f8314996.system.entry.js → p-832dc848.system.entry.js} +1 -1
  403. package/lib/duet/{p-74331989.system.entry.js → p-883d13d2.system.entry.js} +1 -1
  404. package/lib/duet/{p-1144fc8e.system.entry.js → p-8d6996cb.system.entry.js} +1 -1
  405. package/lib/duet/{p-14857c6a.system.entry.js → p-917794fe.system.entry.js} +1 -1
  406. package/lib/duet/{p-9c155069.system.entry.js → p-91c5a1c8.system.entry.js} +1 -1
  407. package/lib/duet/{p-bd6a9171.system.entry.js → p-93541f56.system.entry.js} +1 -1
  408. package/lib/duet/{p-055e24d8.system.entry.js → p-93fb1172.system.entry.js} +1 -1
  409. package/lib/duet/p-9508ee67.system.js +4 -0
  410. package/lib/duet/{p-7443f659.system.entry.js → p-96a2950c.system.entry.js} +1 -1
  411. package/lib/duet/{p-81c3bbcc.system.entry.js → p-97992dea.system.entry.js} +1 -1
  412. package/lib/duet/{p-744b8ee1.js → p-97a065d3.js} +1 -1
  413. package/lib/duet/{p-f4a74e37.entry.js → p-97dcfc10.entry.js} +1 -1
  414. package/lib/duet/{p-142afd63.entry.js → p-98c3503e.entry.js} +1 -1
  415. package/lib/duet/{p-5c870999.entry.js → p-99917fe3.entry.js} +1 -1
  416. package/lib/duet/{p-101d8dd9.system.entry.js → p-9b22764a.system.entry.js} +1 -1
  417. package/lib/duet/{p-c0137b84.system.entry.js → p-9e410004.system.entry.js} +1 -1
  418. package/lib/duet/{p-0071a5b9.system.entry.js → p-9e498391.system.entry.js} +1 -1
  419. package/lib/duet/{p-fcafbcd4.entry.js → p-9f289df9.entry.js} +1 -1
  420. package/lib/duet/{p-b6f08326.entry.js → p-a0109bd5.entry.js} +1 -1
  421. package/lib/duet/{p-bf0f7acd.entry.js → p-a24875fa.entry.js} +1 -1
  422. package/lib/duet/{p-22064e74.entry.js → p-a2ed4290.entry.js} +1 -1
  423. package/lib/duet/{p-d3bde4cc.system.entry.js → p-a48872f4.system.entry.js} +1 -1
  424. package/lib/duet/{p-a6e8ceb0.system.entry.js → p-a79e89f7.system.entry.js} +1 -1
  425. package/lib/duet/{p-5475be04.entry.js → p-a7f744e6.entry.js} +1 -1
  426. package/lib/duet/{p-b49e5c58.system.entry.js → p-ad44b252.system.entry.js} +1 -1
  427. package/lib/duet/p-ae3420e6.system.js +4 -0
  428. package/lib/duet/{p-7cb195ba.entry.js → p-ae790ae1.entry.js} +1 -1
  429. package/lib/duet/{p-73eb17ac.entry.js → p-afed10df.entry.js} +1 -1
  430. package/lib/duet/{p-9a43132b.system.js → p-b1f363ec.system.js} +1 -1
  431. package/lib/duet/{p-5940d019.entry.js → p-b28b6056.entry.js} +1 -1
  432. package/lib/duet/{p-afd26f78.entry.js → p-b3f35171.entry.js} +1 -1
  433. package/lib/duet/{p-a234eaa5.system.entry.js → p-b4ad5c7e.system.entry.js} +1 -1
  434. package/lib/duet/{p-6d0be00f.entry.js → p-b73a17a4.entry.js} +1 -1
  435. package/lib/duet/p-b8119989.entry.js +4 -0
  436. package/lib/duet/p-b8a679d4.system.entry.js +4 -0
  437. package/lib/duet/{p-185cd6bd.system.entry.js → p-bbe6727f.system.entry.js} +1 -1
  438. package/lib/duet/{p-ed3748dc.js → p-c185dfa0.js} +1 -1
  439. package/lib/duet/{p-d159fb1f.system.entry.js → p-c18f8690.system.entry.js} +1 -1
  440. package/lib/duet/{p-05931a12.system.entry.js → p-c1974cab.system.entry.js} +1 -1
  441. package/lib/duet/{p-1d32c95c.system.entry.js → p-c4eda159.system.entry.js} +1 -1
  442. package/lib/duet/{p-e874b49c.entry.js → p-c57b845b.entry.js} +1 -1
  443. package/lib/duet/{p-a0a5581f.js → p-c594b223.js} +1 -1
  444. package/lib/duet/{p-453f791b.system.entry.js → p-c5f069a2.system.entry.js} +1 -1
  445. package/lib/duet/{p-04f1897d.system.entry.js → p-c6440b7a.system.entry.js} +1 -1
  446. package/lib/duet/{p-facb3115.entry.js → p-c6c6c25a.entry.js} +1 -1
  447. package/lib/duet/{p-c44b5ed2.system.entry.js → p-c9cab8c2.system.entry.js} +1 -1
  448. package/lib/duet/{p-d9e3c5d3.entry.js → p-c9edc2f5.entry.js} +1 -1
  449. package/lib/duet/{p-6cbe31c3.system.entry.js → p-c9fda76d.system.entry.js} +1 -1
  450. package/lib/duet/{p-3b2c0995.system.entry.js → p-ca52c41a.system.entry.js} +1 -1
  451. package/lib/duet/{p-1515a887.entry.js → p-cb395cd0.entry.js} +1 -1
  452. package/lib/duet/{p-24bace56.entry.js → p-cb9180df.entry.js} +1 -1
  453. package/lib/duet/{p-8b301afb.entry.js → p-cc05f17e.entry.js} +1 -1
  454. package/lib/duet/{p-e4d173cc.entry.js → p-cdf0bc59.entry.js} +1 -1
  455. package/lib/duet/{p-f51c3456.entry.js → p-d0346501.entry.js} +1 -1
  456. package/lib/duet/{p-a2fa6a72.system.entry.js → p-d2998633.system.entry.js} +1 -1
  457. package/lib/duet/{p-e80dd41f.system.entry.js → p-d56f03f8.system.entry.js} +1 -1
  458. package/lib/duet/{p-50a13103.system.entry.js → p-d6f6125e.system.entry.js} +1 -1
  459. package/lib/duet/{p-5080b864.system.entry.js → p-d73fbc78.system.entry.js} +1 -1
  460. package/lib/duet/{p-ae0b5812.entry.js → p-d786e65c.entry.js} +1 -1
  461. package/lib/duet/{p-0217b93f.system.entry.js → p-d7aa5d3b.system.entry.js} +1 -1
  462. package/lib/duet/{p-579d96f9.system.entry.js → p-d8aa6c84.system.entry.js} +1 -1
  463. package/lib/duet/{p-a62f7dce.entry.js → p-da373b15.entry.js} +1 -1
  464. package/lib/duet/{p-5c3f4962.system.entry.js → p-dbec9fa6.system.entry.js} +1 -1
  465. package/lib/duet/{p-60c66aa9.entry.js → p-de868afd.entry.js} +1 -1
  466. package/lib/duet/{p-f2ccd2cc.system.entry.js → p-dfc069a4.system.entry.js} +1 -1
  467. package/lib/duet/{p-820937d1.system.entry.js → p-e10bc642.system.entry.js} +1 -1
  468. package/lib/duet/{p-e51d65c9.entry.js → p-e191bcd7.entry.js} +1 -1
  469. package/lib/duet/{p-f7a870e4.entry.js → p-e1b912a0.entry.js} +1 -1
  470. package/lib/duet/{p-54188be3.system.entry.js → p-e1c09777.system.entry.js} +1 -1
  471. package/lib/duet/{p-5e0654cc.system.js → p-e27caa72.system.js} +1 -1
  472. package/lib/duet/{p-ebb8d192.entry.js → p-e282d081.entry.js} +1 -1
  473. package/lib/duet/{p-a0e30584.entry.js → p-e51b7a02.entry.js} +1 -1
  474. package/lib/duet/{p-63fef46e.system.entry.js → p-e8388ca9.system.entry.js} +1 -1
  475. package/lib/duet/{p-ce25bba1.entry.js → p-e9b67de4.entry.js} +1 -1
  476. package/lib/duet/p-e9be3542.system.js +4 -0
  477. package/lib/duet/{p-cab23b7f.entry.js → p-eab16154.entry.js} +1 -1
  478. package/lib/duet/{p-b40ce0fa.entry.js → p-ebdebc5b.entry.js} +1 -1
  479. package/lib/duet/{p-f6cbe5d9.system.entry.js → p-ec6119b3.system.entry.js} +1 -1
  480. package/lib/duet/{p-6d5e9383.entry.js → p-ed9a284a.entry.js} +1 -1
  481. package/lib/duet/{p-905072e0.entry.js → p-edc9b555.entry.js} +1 -1
  482. package/lib/duet/{p-bc20b234.system.entry.js → p-ee0e4a1f.system.entry.js} +1 -1
  483. package/lib/duet/{p-c3e52ce9.system.entry.js → p-f55bc4f2.system.entry.js} +1 -1
  484. package/lib/duet/{p-5ede36ae.entry.js → p-f830361c.entry.js} +1 -1
  485. package/lib/duet/{p-1d94d37d.system.entry.js → p-fb626606.system.entry.js} +1 -1
  486. package/lib/duet/{p-3b4f6e4b.entry.js → p-fceb4498.entry.js} +1 -1
  487. package/lib/duet/{p-b75e6fd7.entry.js → p-fd68976a.entry.js} +1 -1
  488. package/lib/duet/{p-d6806be3.system.entry.js → p-feea3395.system.entry.js} +1 -1
  489. package/lib/esm/{a11y-utils-3b7c95b9.js → a11y-utils-1b009bcf.js} +1 -1
  490. package/lib/esm/{app-globals-2c6c1103.js → app-globals-b9758fdf.js} +1 -1
  491. package/lib/esm/duet-action-button.entry.js +4 -4
  492. package/lib/esm/duet-alert.entry.js +3 -3
  493. package/lib/esm/duet-badge.entry.js +1 -1
  494. package/lib/esm/duet-banner.entry.js +4 -4
  495. package/lib/esm/duet-breadcrumb.entry.js +2 -2
  496. package/lib/esm/duet-breadcrumbs.entry.js +4 -4
  497. package/lib/esm/duet-button_2.entry.js +4 -4
  498. package/lib/esm/duet-callout.entry.js +2 -2
  499. package/lib/esm/duet-caption_4.entry.js +6 -6
  500. package/lib/esm/duet-card.entry.js +4 -4
  501. package/lib/esm/duet-checkbox.entry.js +1 -1
  502. package/lib/esm/duet-checkmark.entry.js +1 -1
  503. package/lib/esm/duet-chip.entry.js +2 -2
  504. package/lib/esm/duet-choice_2.entry.js +3 -3
  505. package/lib/esm/duet-collapsible.entry.js +3 -3
  506. package/lib/esm/duet-combobox.entry.js +3 -3
  507. package/lib/esm/duet-contact-card.entry.js +2 -2
  508. package/lib/esm/duet-cookie-consent.entry.js +1 -1
  509. package/lib/esm/duet-date-picker.entry.js +4 -4
  510. package/lib/esm/duet-divider_2.entry.js +3 -3
  511. package/lib/esm/duet-editable-table_3.entry.js +5 -5
  512. package/lib/esm/duet-empty-state.entry.js +1 -1
  513. package/lib/esm/duet-fieldset.entry.js +2 -2
  514. package/lib/esm/duet-file-chooser.entry.js +1 -1
  515. package/lib/esm/duet-footer.entry.js +3 -3
  516. package/lib/esm/duet-grid_2.entry.js +2 -2
  517. package/lib/esm/duet-header_2.entry.js +4 -4
  518. package/lib/esm/duet-hero.entry.js +3 -3
  519. package/lib/esm/duet-icon.entry.js +3 -3
  520. package/lib/esm/duet-input_2.entry.js +5 -5
  521. package/lib/esm/duet-layout.entry.js +2 -2
  522. package/lib/esm/duet-list_2.entry.js +1 -1
  523. package/lib/esm/duet-menu-bar-button.entry.js +1 -1
  524. package/lib/esm/duet-menu-bar-dropdown-link.entry.js +2 -2
  525. package/lib/esm/duet-menu-bar-dropdown.entry.js +1 -1
  526. package/lib/esm/duet-menu-bar-item.entry.js +4 -4
  527. package/lib/esm/duet-menu-bar-link.entry.js +1 -1
  528. package/lib/esm/duet-menu-bar.entry.js +3 -3
  529. package/lib/esm/duet-modal.entry.js +4 -4
  530. package/lib/esm/duet-multiselect.entry.js +3 -3
  531. package/lib/esm/duet-nav.entry.js +1 -1
  532. package/lib/esm/duet-notification_2.entry.js +2 -2
  533. package/lib/esm/duet-number-input.entry.js +3 -3
  534. package/lib/esm/duet-overlay.entry.js +1 -1
  535. package/lib/esm/duet-page-heading.entry.js +1 -1
  536. package/lib/esm/duet-pagination_2.entry.js +4 -4
  537. package/lib/esm/duet-phone-input.entry.js +3 -3
  538. package/lib/esm/duet-popup-menu_2.entry.js +4 -4
  539. package/lib/esm/duet-progress.entry.js +2 -2
  540. package/lib/esm/duet-promo-card.entry.js +4 -4
  541. package/lib/esm/duet-radio_2.entry.js +2 -2
  542. package/lib/esm/duet-range-slider.entry.js +2 -2
  543. package/lib/esm/duet-scrollable_3.entry.js +5 -5
  544. package/lib/esm/duet-section-layout.entry.js +1 -1
  545. package/lib/esm/duet-select.entry.js +2 -2
  546. package/lib/esm/duet-shaped-image.entry.js +1 -1
  547. package/lib/esm/duet-show-more.entry.js +2 -2
  548. package/lib/esm/duet-slideout-lang.entry.js +2 -2
  549. package/lib/esm/duet-slideout-link.entry.js +4 -4
  550. package/lib/esm/duet-slideout-panel-dropdown.entry.js +1 -1
  551. package/lib/esm/duet-slideout-panel.entry.js +6 -6
  552. package/lib/esm/duet-slideout.entry.js +6 -6
  553. package/lib/esm/duet-status-icon.entry.js +2 -2
  554. package/lib/esm/duet-step_2.entry.js +1 -1
  555. package/lib/esm/duet-submenu-bar-dropdown-link.entry.js +1 -1
  556. package/lib/esm/duet-submenu-bar-dropdown.entry.js +2 -2
  557. package/lib/esm/duet-submenu-bar-item.entry.js +4 -4
  558. package/lib/esm/duet-submenu-bar-link.entry.js +1 -1
  559. package/lib/esm/duet-submenu-bar.entry.js +2 -2
  560. package/lib/esm/duet-textarea.entry.js +3 -3
  561. package/lib/esm/duet-toggle.entry.js +1 -1
  562. package/lib/esm/duet-toolbar-dropdown-link.entry.js +1 -1
  563. package/lib/esm/duet-toolbar-dropdown.entry.js +1 -1
  564. package/lib/esm/duet-toolbar-item.entry.js +4 -4
  565. package/lib/esm/duet-toolbar-link.entry.js +1 -1
  566. package/lib/esm/duet-toolbar.entry.js +1 -1
  567. package/lib/esm/duet-tooltip-button_2.entry.js +7 -6
  568. package/lib/esm/duet-tooltip.entry.js +3 -3
  569. package/lib/esm/duet-tray.entry.js +5 -5
  570. package/lib/esm/duet-upload-aria-status.entry.js +2 -2
  571. package/lib/esm/duet-upload-item.entry.js +3 -3
  572. package/lib/esm/duet-visually-hidden.entry.js +2 -2
  573. package/lib/esm/duet.js +3 -3
  574. package/lib/esm/{errorcodes.utils-86af68b7.js → errorcodes.utils-fe38d5a8.js} +1 -1
  575. package/lib/esm/{focus-utils-9bbe977f.js → focus-utils-81b0913e.js} +1 -1
  576. package/lib/esm/{index-a830b2de.js → index-7fc39d5e.js} +2 -2
  577. package/lib/esm/{language-utils-40caac4f.js → language-utils-bbed41c3.js} +1 -1
  578. package/lib/esm/loader.js +3 -3
  579. package/lib/esm/{slot-utils-a481f2c6.js → slot-utils-b5cb1606.js} +1 -1
  580. package/lib/esm/{token-utils-a32eb753.js → token-utils-7360bb84.js} +1 -1
  581. package/lib/esm/{tokens-84fb2357.js → tokens-5ce17832.js} +2 -2
  582. package/lib/esm/{tokens.module-a746651a.js → tokens.module-821694bb.js} +2 -2
  583. package/lib/esm-es5/{a11y-utils-3b7c95b9.js → a11y-utils-1b009bcf.js} +1 -1
  584. package/lib/esm-es5/{app-globals-2c6c1103.js → app-globals-b9758fdf.js} +1 -1
  585. package/lib/esm-es5/duet-action-button.entry.js +1 -1
  586. package/lib/esm-es5/duet-alert.entry.js +1 -1
  587. package/lib/esm-es5/duet-badge.entry.js +1 -1
  588. package/lib/esm-es5/duet-banner.entry.js +1 -1
  589. package/lib/esm-es5/duet-breadcrumb.entry.js +1 -1
  590. package/lib/esm-es5/duet-breadcrumbs.entry.js +1 -1
  591. package/lib/esm-es5/duet-button_2.entry.js +1 -1
  592. package/lib/esm-es5/duet-callout.entry.js +1 -1
  593. package/lib/esm-es5/duet-caption_4.entry.js +1 -1
  594. package/lib/esm-es5/duet-card.entry.js +1 -1
  595. package/lib/esm-es5/duet-checkbox.entry.js +2 -2
  596. package/lib/esm-es5/duet-checkmark.entry.js +1 -1
  597. package/lib/esm-es5/duet-chip.entry.js +1 -1
  598. package/lib/esm-es5/duet-choice_2.entry.js +1 -1
  599. package/lib/esm-es5/duet-collapsible.entry.js +1 -1
  600. package/lib/esm-es5/duet-combobox.entry.js +1 -1
  601. package/lib/esm-es5/duet-contact-card.entry.js +1 -1
  602. package/lib/esm-es5/duet-cookie-consent.entry.js +1 -1
  603. package/lib/esm-es5/duet-date-picker.entry.js +1 -1
  604. package/lib/esm-es5/duet-divider_2.entry.js +1 -1
  605. package/lib/esm-es5/duet-editable-table_3.entry.js +1 -1
  606. package/lib/esm-es5/duet-empty-state.entry.js +1 -1
  607. package/lib/esm-es5/duet-fieldset.entry.js +1 -1
  608. package/lib/esm-es5/duet-file-chooser.entry.js +1 -1
  609. package/lib/esm-es5/duet-footer.entry.js +1 -1
  610. package/lib/esm-es5/duet-grid_2.entry.js +1 -1
  611. package/lib/esm-es5/duet-header_2.entry.js +1 -1
  612. package/lib/esm-es5/duet-hero.entry.js +1 -1
  613. package/lib/esm-es5/duet-icon.entry.js +1 -1
  614. package/lib/esm-es5/duet-input_2.entry.js +1 -1
  615. package/lib/esm-es5/duet-layout.entry.js +1 -1
  616. package/lib/esm-es5/duet-list_2.entry.js +1 -1
  617. package/lib/esm-es5/duet-menu-bar-button.entry.js +1 -1
  618. package/lib/esm-es5/duet-menu-bar-dropdown-link.entry.js +1 -1
  619. package/lib/esm-es5/duet-menu-bar-dropdown.entry.js +1 -1
  620. package/lib/esm-es5/duet-menu-bar-item.entry.js +1 -1
  621. package/lib/esm-es5/duet-menu-bar-link.entry.js +1 -1
  622. package/lib/esm-es5/duet-menu-bar.entry.js +1 -1
  623. package/lib/esm-es5/duet-modal.entry.js +1 -1
  624. package/lib/esm-es5/duet-multiselect.entry.js +1 -1
  625. package/lib/esm-es5/duet-nav.entry.js +1 -1
  626. package/lib/esm-es5/duet-notification_2.entry.js +1 -1
  627. package/lib/esm-es5/duet-number-input.entry.js +1 -1
  628. package/lib/esm-es5/duet-overlay.entry.js +1 -1
  629. package/lib/esm-es5/duet-page-heading.entry.js +1 -1
  630. package/lib/esm-es5/duet-pagination_2.entry.js +2 -2
  631. package/lib/esm-es5/duet-phone-input.entry.js +1 -1
  632. package/lib/esm-es5/duet-popup-menu_2.entry.js +1 -1
  633. package/lib/esm-es5/duet-progress.entry.js +1 -1
  634. package/lib/esm-es5/duet-promo-card.entry.js +1 -1
  635. package/lib/esm-es5/duet-radio_2.entry.js +1 -1
  636. package/lib/esm-es5/duet-range-slider.entry.js +1 -1
  637. package/lib/esm-es5/duet-scrollable_3.entry.js +1 -1
  638. package/lib/esm-es5/duet-section-layout.entry.js +1 -1
  639. package/lib/esm-es5/duet-select.entry.js +1 -1
  640. package/lib/esm-es5/duet-shaped-image.entry.js +1 -1
  641. package/lib/esm-es5/duet-show-more.entry.js +1 -1
  642. package/lib/esm-es5/duet-slideout-lang.entry.js +1 -1
  643. package/lib/esm-es5/duet-slideout-link.entry.js +1 -1
  644. package/lib/esm-es5/duet-slideout-panel-dropdown.entry.js +1 -1
  645. package/lib/esm-es5/duet-slideout-panel.entry.js +1 -1
  646. package/lib/esm-es5/duet-slideout.entry.js +1 -1
  647. package/lib/esm-es5/duet-status-icon.entry.js +1 -1
  648. package/lib/esm-es5/duet-step_2.entry.js +1 -1
  649. package/lib/esm-es5/duet-submenu-bar-dropdown-link.entry.js +1 -1
  650. package/lib/esm-es5/duet-submenu-bar-dropdown.entry.js +1 -1
  651. package/lib/esm-es5/duet-submenu-bar-item.entry.js +2 -2
  652. package/lib/esm-es5/duet-submenu-bar-link.entry.js +1 -1
  653. package/lib/esm-es5/duet-submenu-bar.entry.js +1 -1
  654. package/lib/esm-es5/duet-textarea.entry.js +2 -2
  655. package/lib/esm-es5/duet-toggle.entry.js +1 -1
  656. package/lib/esm-es5/duet-toolbar-dropdown-link.entry.js +1 -1
  657. package/lib/esm-es5/duet-toolbar-dropdown.entry.js +1 -1
  658. package/lib/esm-es5/duet-toolbar-item.entry.js +2 -2
  659. package/lib/esm-es5/duet-toolbar-link.entry.js +1 -1
  660. package/lib/esm-es5/duet-toolbar.entry.js +1 -1
  661. package/lib/esm-es5/duet-tooltip-button_2.entry.js +1 -1
  662. package/lib/esm-es5/duet-tooltip.entry.js +1 -1
  663. package/lib/esm-es5/duet-tray.entry.js +1 -1
  664. package/lib/esm-es5/duet-upload-aria-status.entry.js +1 -1
  665. package/lib/esm-es5/duet-upload-item.entry.js +2 -2
  666. package/lib/esm-es5/duet-visually-hidden.entry.js +1 -1
  667. package/lib/esm-es5/duet.js +1 -1
  668. package/lib/esm-es5/{errorcodes.utils-86af68b7.js → errorcodes.utils-fe38d5a8.js} +1 -1
  669. package/lib/esm-es5/{focus-utils-9bbe977f.js → focus-utils-81b0913e.js} +1 -1
  670. package/lib/esm-es5/index-7fc39d5e.js +4 -0
  671. package/lib/esm-es5/{language-utils-40caac4f.js → language-utils-bbed41c3.js} +1 -1
  672. package/lib/esm-es5/loader.js +2 -2
  673. package/lib/esm-es5/{slot-utils-a481f2c6.js → slot-utils-b5cb1606.js} +1 -1
  674. package/lib/esm-es5/{token-utils-a32eb753.js → token-utils-7360bb84.js} +1 -1
  675. package/lib/esm-es5/{tokens-84fb2357.js → tokens-5ce17832.js} +1 -1
  676. package/lib/esm-es5/{tokens.module-a746651a.js → tokens.module-821694bb.js} +1 -1
  677. package/lib/types/components/duet-tooltip/duet-tooltip.d.ts +1 -1
  678. package/lib/types/components.d.ts +2 -2
  679. package/package.json +4 -4
  680. package/lib/duet/p-10c530d1.js +0 -4
  681. package/lib/duet/p-171a126f.entry.js +0 -4
  682. package/lib/duet/p-2e346b26.system.entry.js +0 -4
  683. package/lib/duet/p-44b36dbf.js +0 -5
  684. package/lib/duet/p-4a3dae6f.js +0 -4
  685. package/lib/duet/p-50c18c14.system.js +0 -4
  686. package/lib/duet/p-5577da59.system.js +0 -4
  687. package/lib/duet/p-61ac836c.system.js +0 -4
  688. package/lib/duet/p-6e1f8ca5.system.entry.js +0 -4
  689. package/lib/duet/p-718585c1.entry.js +0 -4
  690. package/lib/duet/p-c3a69e37.js +0 -4
  691. package/lib/duet/p-cbbf6d6a.system.js +0 -4
  692. package/lib/duet/p-dcc6df5e.entry.js +0 -4
  693. package/lib/duet/p-f2d5c69e.system.js +0 -5
  694. package/lib/esm-es5/index-a830b2de.js +0 -4
@@ -1,4 +1,4 @@
1
1
  var __awaiter=this&&this.__awaiter||function(e,t,n,o){function i(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,a){function r(e){try{d(o.next(e))}catch(e){a(e)}}function s(e){try{d(o["throw"](e))}catch(e){a(e)}}function d(e){e.done?n(e.value):i(e.value).then(r,s)}d((o=o.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},o,i,a,r;return r={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function s(e){return function(t){return d([e,t])}}function d(s){if(o)throw new TypeError("Generator is already executing.");while(r&&(r=0,s[0]&&(n=0)),n)try{if(o=1,i&&(a=s[0]&2?i["return"]:s[0]?i["throw"]||((a=i["return"])&&a.call(i),0):i.next)&&!(a=a.call(i,s[1])).done)return a;if(i=0,a)s=[s[0]&2,a.value];switch(s[0]){case 0:case 1:a=s;break;case 4:n.label++;return{value:s[1],done:false};case 5:n.label++;i=s[1];s=[0];continue;case 7:s=n.ops.pop();n.trys.pop();continue;default:if(!(a=n.trys,a=a.length>0&&a[a.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!a||s[1]>a[0]&&s[1]<a[3])){n.label=s[1];break}if(s[0]===6&&n.label<a[1]){n.label=a[1];a=s;break}if(a&&n.label<a[2]){n.label=a[2];n.ops.push(s);break}if(a[2])n.ops.pop();n.trys.pop();continue}s=t.call(e,n)}catch(e){s=[6,e];i=0}finally{o=a=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};
2
2
  /*!
3
3
  * Built with Duet Design System
4
- */System.register(["./p-f2d5c69e.system.js","./p-e216bea4.system.js"],(function(e){"use strict";var t,n,o,i,a;return{setters:[function(e){t=e.r;n=e.h;o=e.H;i=e.g},function(e){a=e.i}],execute:function(){var r='*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;width:100%;height:100%}:host slot:not([name=label])::slotted(*){position:relative;top:-0.5rem;opacity:0;transition:top 0.3s ease-in, opacity 0.3s ease-in}:host([open]) slot:not([name=label])::slotted(*){top:0;opacity:1}.duet-slideout-panel-dropdown{position:relative;width:100%;height:100%}.duet-slideout-panel-dropdown button{position:relative;display:flex;gap:20px;align-items:center;justify-content:flex-start;width:100%;height:100%;padding:8px 0;font-family:"localtapiola-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";font-size:1.25rem;font-weight:800;line-height:1.25;color:rgb(8, 42, 77);text-align:center;text-decoration:none;cursor:pointer}.duet-slideout-panel-dropdown button .label{position:relative;display:flex;gap:0.5rem;align-items:center;justify-content:center}.duet-slideout-panel-dropdown button:focus{outline:0;box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3), 0 0 0 1px #0077b3}.duet-slideout-panel-dropdown button.active .label::after{position:absolute;top:auto;bottom:0;left:0;display:block;width:calc(100% - 18px);height:1px;content:"";background:rgb(0, 119, 179);transform:translateY(1px)}.duet-slideout-panel-dropdown .items{display:flex;flex-direction:column;align-items:center;justify-content:center;width:100%;max-height:1000px;padding:4px 20px 8px 44px;overflow-y:auto;visibility:visible;transition:max-height 0.3s ease-in, padding-bottom 0.3s ease-in;-ms-overflow-style:none;scrollbar-width:none}.duet-slideout-panel-dropdown .items::-webkit-scrollbar{display:none}.duet-slideout-panel-dropdown .items.hidden{max-height:0;padding:0;overflow:hidden;visibility:hidden;transition:max-height 0.3s ease-out, padding-bottom 0.3s ease-out}.duet-slideout-panel-dropdown.duet-theme-turva button{font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";color:rgb(23, 28, 58)}.duet-slideout-panel-dropdown.duet-theme-turva button:focus{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}.duet-slideout-panel-dropdown.duet-theme-turva button.active .label::after{background:rgb(198, 12, 48)}slot{--active-height:1px;--active-translate-y:translateY(1px);font-size:1rem;font-weight:400;color:rgb(8, 42, 77)}.duet-theme-turva slot{color:rgb(23, 28, 58)}slot[name=label]{font-size:1rem;font-weight:600}';var s=r;var d=e("duet_slideout_panel_dropdown",function(){function e(e){var n=this;t(this,e);this.onClick=function(){n.open=!n.open};this.theme="";this.active=false;this.open=false;this.icon=undefined}e.prototype.handleFocus=function(e){var t=this;var n=e.composedPath().every((function(e){return e!==t.element}));if(n){this.open=false}};e.prototype.componentWillLoad=function(){a(this);var e=this.element.querySelectorAll("duet-slideout-link");e.forEach((function(e){e.menuItem=true}))};e.prototype.setFocus=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.button.focus(e);return[2]}))}))};e.prototype.render=function(){var e=this;return n(o,{key:"35bf0d91a006cd0fb6a50012f5f48b8b84d5ecac"},n("div",{key:"aebfdab784d0a2921fc1f5b461b881c241ef5066",class:{"duet-slideout-panel-dropdown":true,"duet-theme-turva":this.theme==="turva",active:this.open}},n("button",{key:"f3174e8f9f070b3c8cd4da9e6db8b695982f236b",ref:function(t){return e.button=t},"aria-haspopup":"menu","aria-controls":"menu","aria-expanded":this.open?"true":"false","aria-current":this.active?"true":"false",id:"button",type:"button",class:{active:this.active},onClick:this.onClick},this.icon&&n("duet-icon",{key:"02b31af38cf8ef821d9bd8b83ede34c900b58c41",name:this.icon,size:"medium",margin:"none",color:"secondary"}),n("span",{key:"1244f292f215410cba0750e205392e5d5fcd9ab7",class:"label"},n("slot",{key:"a55379905e5ec24ec617910fccdba8f351494d11",name:"label"}),n("duet-icon",{key:"c63d4943d43087e6ec52e7e54f8a4211daebeadd",class:"caret",name:"action-arrow-down-small",margin:"none",size:"xx-small",color:"secondary"}))),n("div",{key:"31e1e8a311b9ee173852bcbf3733cc846d7f87da",tabindex:"-1",role:"menu",id:"menu","aria-labelledby":"button",class:{items:true,hidden:!this.open}},n("slot",{key:"b7365965b0950b899e494162007d51130444478d"}))))};Object.defineProperty(e.prototype,"element",{get:function(){return i(this)},enumerable:false,configurable:true});return e}());d.style=s}}}));
4
+ */System.register(["./p-6312466b.system.js","./p-e216bea4.system.js"],(function(e){"use strict";var t,n,o,i,a;return{setters:[function(e){t=e.r;n=e.h;o=e.H;i=e.g},function(e){a=e.i}],execute:function(){var r='*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;width:100%;height:100%}:host slot:not([name=label])::slotted(*){position:relative;top:-0.5rem;opacity:0;transition:top 0.3s ease-in, opacity 0.3s ease-in}:host([open]) slot:not([name=label])::slotted(*){top:0;opacity:1}.duet-slideout-panel-dropdown{position:relative;width:100%;height:100%}.duet-slideout-panel-dropdown button{position:relative;display:flex;gap:20px;align-items:center;justify-content:flex-start;width:100%;height:100%;padding:8px 0;font-family:"localtapiola-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";font-size:1.25rem;font-weight:800;line-height:1.25;color:rgb(8, 42, 77);text-align:center;text-decoration:none;cursor:pointer}.duet-slideout-panel-dropdown button .label{position:relative;display:flex;gap:0.5rem;align-items:center;justify-content:center}.duet-slideout-panel-dropdown button:focus{outline:0;box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3), 0 0 0 1px #0077b3}.duet-slideout-panel-dropdown button.active .label::after{position:absolute;top:auto;bottom:0;left:0;display:block;width:calc(100% - 18px);height:1px;content:"";background:rgb(0, 119, 179);transform:translateY(1px)}.duet-slideout-panel-dropdown .items{display:flex;flex-direction:column;align-items:center;justify-content:center;width:100%;max-height:1000px;padding:4px 20px 8px 44px;overflow-y:auto;visibility:visible;transition:max-height 0.3s ease-in, padding-bottom 0.3s ease-in;-ms-overflow-style:none;scrollbar-width:none}.duet-slideout-panel-dropdown .items::-webkit-scrollbar{display:none}.duet-slideout-panel-dropdown .items.hidden{max-height:0;padding:0;overflow:hidden;visibility:hidden;transition:max-height 0.3s ease-out, padding-bottom 0.3s ease-out}.duet-slideout-panel-dropdown.duet-theme-turva button{font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";color:rgb(23, 28, 58)}.duet-slideout-panel-dropdown.duet-theme-turva button:focus{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}.duet-slideout-panel-dropdown.duet-theme-turva button.active .label::after{background:rgb(198, 12, 48)}slot{--active-height:1px;--active-translate-y:translateY(1px);font-size:1rem;font-weight:400;color:rgb(8, 42, 77)}.duet-theme-turva slot{color:rgb(23, 28, 58)}slot[name=label]{font-size:1rem;font-weight:600}';var s=r;var d=e("duet_slideout_panel_dropdown",function(){function e(e){var n=this;t(this,e);this.onClick=function(){n.open=!n.open};this.theme="";this.active=false;this.open=false;this.icon=undefined}e.prototype.handleFocus=function(e){var t=this;var n=e.composedPath().every((function(e){return e!==t.element}));if(n){this.open=false}};e.prototype.componentWillLoad=function(){a(this);var e=this.element.querySelectorAll("duet-slideout-link");e.forEach((function(e){e.menuItem=true}))};e.prototype.setFocus=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.button.focus(e);return[2]}))}))};e.prototype.render=function(){var e=this;return n(o,{key:"35bf0d91a006cd0fb6a50012f5f48b8b84d5ecac"},n("div",{key:"aebfdab784d0a2921fc1f5b461b881c241ef5066",class:{"duet-slideout-panel-dropdown":true,"duet-theme-turva":this.theme==="turva",active:this.open}},n("button",{key:"f3174e8f9f070b3c8cd4da9e6db8b695982f236b",ref:function(t){return e.button=t},"aria-haspopup":"menu","aria-controls":"menu","aria-expanded":this.open?"true":"false","aria-current":this.active?"true":"false",id:"button",type:"button",class:{active:this.active},onClick:this.onClick},this.icon&&n("duet-icon",{key:"02b31af38cf8ef821d9bd8b83ede34c900b58c41",name:this.icon,size:"medium",margin:"none",color:"secondary"}),n("span",{key:"1244f292f215410cba0750e205392e5d5fcd9ab7",class:"label"},n("slot",{key:"a55379905e5ec24ec617910fccdba8f351494d11",name:"label"}),n("duet-icon",{key:"c63d4943d43087e6ec52e7e54f8a4211daebeadd",class:"caret",name:"action-arrow-down-small",margin:"none",size:"xx-small",color:"secondary"}))),n("div",{key:"31e1e8a311b9ee173852bcbf3733cc846d7f87da",tabindex:"-1",role:"menu",id:"menu","aria-labelledby":"button",class:{items:true,hidden:!this.open}},n("slot",{key:"b7365965b0950b899e494162007d51130444478d"}))))};Object.defineProperty(e.prototype,"element",{get:function(){return i(this)},enumerable:false,configurable:true});return e}());d.style=s}}}));
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * Built with Duet Design System
3
3
  */
4
- import{r as t,h as e,H as a,g as o,c as i}from"./p-44b36dbf.js";import{i as r}from"./p-aaa7a7bd.js";import{h as s,a as n}from"./p-1cb66641.js";import{s as l,u as d,o as b,p as u,d as c,b as h,a as p,c as g}from"./p-a45e3f8b.js";import{g as m,c as f,d as x,a as v}from"./p-744b8ee1.js";import{d as k}from"./p-10c530d1.js";import{c as w}from"./p-5e59e970.js";import"./p-9c3c64b9.js";import"./p-1004af75.js";const y=class{constructor(e){t(this,e),this.currentIndex=0,this.scrollPaneElement=void 0,this.hasCollapseButtonLabelSlot=!1,this.resizeObserver=new ResizeObserver((t=>{if(1===(null==t?void 0:t.length)){const e=this.getOverlayWidth();this.checkScrollingNeeded(t[0].target,e)}})),this.collapsedOnClick=()=>{this.collapsed=!this.collapsed},this.scrollPaneAtStart=!0,this.needsScrolling=!0,this.scrollPaneAtEnd=!1,this.childrenData={},this.theme="",this.identifier="",this.collapsed=!1,this.buttons=!0,this.buttonAlignment="center",this.buttonPosition="relative",this.center=!1,this.padding="none",this.gap="large",this.selected=0,this.stretch=!1}watchPropHandler(t){this.scrollToElement(t,"center")}componentWillLoad(){r(this),this.hasCollapseButtonLabelSlot=s(this.element,"collapse-button-label")}componentDidLoad(){requestAnimationFrame((()=>{this.scrollPaneElement&&(this.checkScrollingNeeded(this.scrollPaneElement,"absolute"===this.buttonPosition?0:5),this.updateScrollButtons(),this.resizeObserver.observe(this.scrollPaneElement))}))}disconnectedCallback(){this.resizeObserver.disconnect()}getScrollPaneElements(){return n(this.element)}checkScrollingNeeded(t=this.scrollPaneElement,e=5){var a;if(!t)return;const o=(null===(a=t.parentElement)||void 0===a?void 0:a.getBoundingClientRect().width)||0,i=t.scrollWidth,r=2*this.getOverlayWidth();this.needsScrolling=i-r>o+e,this.needsScrolling?this.updateScrollButtons():(this.scrollPaneAtStart=!0,this.scrollPaneAtEnd=!0)}getLastVisibleElement(){const t=this.getScrollPaneElements().find((t=>t.getBoundingClientRect().x+t.getBoundingClientRect().width-this.scrollPaneElement.getBoundingClientRect().x>this.scrollPaneElement.clientWidth)),e=this.getScrollPaneElements().indexOf(t);return t.clientWidth>this.scrollPaneElement.clientWidth?e:e-1}getFirstVisibleElement(){const t=this.getScrollPaneElements(),e=t.find((t=>t.getBoundingClientRect().x>this.scrollPaneElement.getBoundingClientRect().x)),a=e?t.indexOf(e):t.length;var o=Math.max(a-1,0);return t[o].clientWidth>this.scrollPaneElement.clientWidth?o:a}updateScrollButtons(t=null,e=this.scrollPaneElement){if(!this.buttons)return;if(t&&t.clientWidth>this.scrollPaneElement.clientWidth){const e=this.getScrollPaneElements().indexOf(t);return 0==e&&(this.scrollPaneAtStart=!0),void(e==this.getScrollPaneElements().length-1&&(this.scrollPaneAtEnd=!0))}e.scrollLeft<=0?this.scrollPaneAtStart=!0:e.scrollLeft>0&&(this.scrollPaneAtStart=!1);const a=Math.round(e.clientWidth+e.scrollLeft+this.getOverlayWidth()),o=Math.round(e.scrollWidth);this.scrollPaneAtEnd=a>=o}scrollToElement(t=this.currentIndex,e){const a=this.getScrollPaneElements();if(!a||0===a.length)return;t+1>=a.length&&(t=a.length-1),t<0&&(t=0);let o=a[0].getBoundingClientRect().x,i=5;const r=()=>{if(a[0].getBoundingClientRect().x===o){if(i--,0!==i)return void window.requestAnimationFrame(r);this.updateScrollButtons(a[t])}else window.requestAnimationFrame(r),o=a[0].getBoundingClientRect().x};a[t].scrollIntoView({behavior:"smooth",block:"nearest",inline:e}),window.requestAnimationFrame(r)}scrollLeft(){this.scrollPaneAtEnd=!1;const t=this.getFirstVisibleElement();this.scrollToElement(t-1,"center")}scrollRight(){this.scrollPaneAtStart=!1;const t=this.getLastVisibleElement();this.scrollToElement(t+1,"center")}getOverlayWidth(){return"absolute"===this.buttonPosition?0:10}renderButton(t){const a="turva"===this.theme?"color-primary-darker-turva":"color-primary",o="turva"===this.theme?"color-gray-turva":"color-gray",i=()=>{"left"===t?this.scrollLeft():this.scrollRight()},r="left"===t?this.scrollPaneAtStart:this.scrollPaneAtEnd;return e("div",{class:{"duet-scrollable-button-container":!0,[`${t}`]:!0,"duet-scrollable-button-container--occluded":!this.needsScrolling,[`duet-scrollable-button-container--${this.buttonPosition}`]:!0},hidden:!this.buttons||"absolute"===this.buttonPosition&&r},e("span",{part:`${this.identifier}-button-${t}`,"aria-hidden":"true",class:{"duet-scrollable-button":!0,[`duet-scrollable-button--${this.buttonPosition}`]:!0,[`duet-scrollable-button--${this.buttonAlignment}`]:!0,[`duet-scrollable-button--${t}`]:!0},onClick:()=>{i(),document.activeElement&&document.activeElement.blur()},hidden:!this.buttons||r},e("duet-icon",{color:r?o:a,name:"left"===t?"action-arrow-left":"action-arrow-right",size:"absolute"===this.buttonPosition?"x-small":"small",margin:"none"})))}render(){return e(a,{key:"13b04f9678d2d876b3813ff3be4400c6d3cb8706",class:{"duet-theme-turva":"turva"===this.theme,"duet-theme-default":"default"===this.theme}},this.hasCollapseButtonLabelSlot&&e("div",{key:"5459a8a656904d8cf5930623b0590b533055be36",class:{collapse:!0,hide:!this.needsScrolling&&!this.collapsed}},e("duet-button",{key:"0e1a7e9dd6e442d653ce8dbdc19831b3299d47c5",variation:"plain",margin:"none","center-text":!0,onClick:()=>this.collapsedOnClick()},e("slot",{key:"8c534bbeea9b0f15915958ae3947ca479a141a07",name:"collapse-button-label"}))),e("div",{key:"333736ff3035d3ba6e12b6f73c38fad12af6ec6a",class:{"duet-scrollable-items":!0,buttons:this.buttons,center:this.center,"duet-theme-turva":"turva"===this.theme}},this.buttons&&this.renderButton("left"),e("div",{key:"78c52fc83f55f4e9ab7bd9a3d12ec2c7a88f2e3f",class:{"duet-scrollable-list":!0,[`duet-scrollable-list--${this.buttonPosition}`]:!0,[`gap-${this.gap}`]:!0,collapsed:this.collapsed,[`duet-overflow-padding--${this.padding}`]:"none"!==this.padding,[`duet-scrollable-list--${this.buttonPosition}`]:"absolute"===this.buttonPosition,"duet-scrollable-stretch":this.stretch},onScroll:()=>this.updateScrollButtons(),ref:t=>this.scrollPaneElement=t},e("slot",{key:"95205e7b789573b3f5bfa2e542d81e2068968e93"})),this.buttons&&this.renderButton("right")))}get element(){return o(this)}static get watchers(){return{selected:["watchPropHandler"]}}};y.style="*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;-webkit-tap-highlight-color:transparent}:host{position:relative !important}:host .duet-scrollable-items{position:relative;display:flex}:host .duet-scrollable-items.buttons .duet-scrollable-button-container{position:relative;flex:0 0 auto;flex-basis:40px}:host .duet-scrollable-items.buttons .duet-scrollable-button-container--occluded{flex-basis:0;flex-shrink:1;width:0;padding:10px 0;overflow:hidden;visibility:hidden}:host .duet-scrollable-items.buttons .duet-scrollable-button-container--absolute{position:absolute;top:0;z-index:210;width:auto;height:100%;padding:0 16px;background-color:rgb(255, 255, 255)}:host .duet-scrollable-items.buttons .duet-scrollable-button-container--absolute.left{left:0}:host .duet-scrollable-items.buttons .duet-scrollable-button-container--absolute.right{right:0}:host .duet-scrollable-items.buttons .duet-scrollable-button-container .duet-scrollable-button{position:absolute;display:flex;flex:0 0 auto;flex-basis:40px;align-items:center;height:100%;cursor:pointer;transition:transform 300ms ease}:host .duet-scrollable-items.buttons .duet-scrollable-button-container .duet-scrollable-button:active duet-icon{transition:transform 300ms ease;transform:scale(0.8)}:host .duet-scrollable-items.buttons .duet-scrollable-button-container .duet-scrollable-button--left{left:0;padding:10px 10px 10px 0}:host .duet-scrollable-items.buttons .duet-scrollable-button-container .duet-scrollable-button--right{right:0;padding:10px 0 10px 10px}:host .duet-scrollable-items.buttons .duet-scrollable-button-container .duet-scrollable-button--top{align-items:flex-start}:host .duet-scrollable-items.buttons .duet-scrollable-button-container .duet-scrollable-button--bottom{align-items:flex-end}:host .duet-scrollable-items.buttons .duet-scrollable-button-container .duet-scrollable-button--absolute{padding:0 7px;border:1px solid rgb(212, 223, 229)}:host .duet-scrollable-items.buttons .duet-scrollable-button-container .duet-scrollable-button--absolute.duet-scrollable-button--left{border-radius:8px 0 0 8px}:host .duet-scrollable-items.buttons .duet-scrollable-button-container .duet-scrollable-button--absolute.duet-scrollable-button--right{border-radius:0 8px 8px 0}:host .duet-scrollable-items.buttons .duet-scrollable-button-container .duet-scrollable-button--absolute:hover{border-color:rgb(0, 119, 179);border-width:2px;}.duet-theme-turva :host .duet-scrollable-items.buttons .duet-scrollable-button-container .duet-scrollable-button--absolute:hover{border-color:rgb(113, 118, 132)}:host .duet-scrollable-items.buttons .duet-scrollable-button-container .duet-scrollable-button[hidden]{display:none !important}:host .duet-scrollable-items.duet-theme-turva .duet-scrollable-button-container .duet-scrollable-button--absolute:hover{border-color:rgb(113, 118, 132)}:host .duet-scrollable-items .duet-scrollable-list{display:flex;flex-wrap:nowrap;padding-inline:10px;margin-inline:-10px;overflow-x:auto;overflow-y:hidden;white-space:nowrap;scroll-snap-type:x mandatory;scroll-behavior:smooth;scroll-margin:0 20px;-ms-overflow-style:-ms-autohiding-scrollbar;-webkit-overflow-scrolling:touch;-webkit-mask:linear-gradient(to right, transparent 0, #fff 10px), linear-gradient(to left, transparent 0, #fff 10px);-webkit-mask-size:50% 100%, 50% 100%;-webkit-mask-position:left, right;-webkit-mask-repeat:no-repeat;mask:linear-gradient(to right, transparent 0, #fff 10px), linear-gradient(to left, transparent 0, #fff 10px);mask-size:50% 100%, 50% 100%;mask-position:left, right;mask-repeat:no-repeat;}:host .duet-scrollable-items .duet-scrollable-list--absolute{padding-right:0;padding-left:2px;margin-inline:0;-webkit-mask:none !important;mask:none !important}:host .duet-scrollable-items .duet-scrollable-list:not(.buttons){white-space:normal}:host .duet-scrollable-items .duet-scrollable-list::-webkit-scrollbar{display:none}:host .duet-scrollable-items .duet-scrollable-list.collapsed{flex-wrap:wrap}:host .duet-scrollable-items .duet-scrollable-list.gap-none{gap:0}:host .duet-scrollable-items .duet-scrollable-list.gap-large{gap:20px}:host .duet-scrollable-items .duet-scrollable-list.duet-overflow-padding--xx-small{padding-top:4px;padding-bottom:4px}:host .duet-scrollable-items .duet-scrollable-list.duet-overflow-padding--x-small{padding-top:8px;padding-bottom:8px}:host .duet-scrollable-items .duet-scrollable-list.duet-overflow-padding--small{padding-top:12px;padding-bottom:12px}:host .duet-scrollable-items .duet-scrollable-list.duet-overflow-padding--medium{padding-top:16px;padding-bottom:16px}:host .duet-scrollable-items .duet-scrollable-list.duet-scrollable-stretch{width:100%}:host .duet-scrollable-items.center{justify-content:center}:host .duet-scrollable-items.center .duet-scrollable-list.collapsed{justify-content:center}.collapse{width:100%;text-align:center}.collapse.hide{visibility:hidden}::slotted(*){flex-shrink:0;margin-left:0;-webkit-transition:-webkit-transform 0.2s ease-in-out;transition:-webkit-transform 0.2s ease-in-out;transition:transform 0.2s ease-in-out;transition:transform 0.2s ease-in-out, -webkit-transform 0.2s ease-in-out;scroll-snap-align:center}";const z=class{constructor(e){t(this,e),this.setupContentElement=()=>{this.contentId&&(this.tabpanelElement=document.getElementById(this.contentId),this.tabpanelElement&&(this.tabpanelElement.setAttribute("role","tabpanel"),this.tabpanelElement.setAttribute("tabindex","-1"),this.tabpanelElement.removeEventListener("focus",this.tabpanelElementFocusListener),this.tabpanelElement.removeEventListener("blur",this.tabpanelElementBlurListener),this.tabpanelElement.addEventListener("focus",this.tabpanelElementFocusListener),this.tabpanelElement.addEventListener("blur",this.tabpanelElementBlurListener),this.accessibleDescription&&this.tabpanelElement.setAttribute("aria-description",this.accessibleDescription),this.accessibleLabelledBy&&this.tabpanelElement.setAttribute("aria-labelledby",this.accessibleLabelledBy),this.tabpanelElement.toggleAttribute("hidden",!this.selected)))},this.tabpanelElementFocusListener=()=>{this.element.classList.contains("user-is-tabbing")&&(this.tabpanelElement.style.outline="0",this.tabpanelElement.style.boxShadow=k("turva"===this.theme?"focus-turva":"focus"))},this.tabpanelElementBlurListener=()=>{this.tabpanelElement.style.outline=null,this.tabpanelElement.style.boxShadow=null},this.theme="",this.label=void 0,this.caption=void 0,this.selected=void 0,this.notificationMark=void 0,this.accessibleDescriptionDefault=null,this.accessibleDescription=this.accessibleDescriptionDefault?m(this.accessibleDescriptionDefault):null,this.accessibleLabelledBy=void 0,this.contentId=void 0}componentWillLoad(){r(this)}connectedCallback(){f(this,{prop:"accessibleDescription",defaults:"accessibleDescriptionDefault"}),l(this),this.setupContentElement()}disconnectedCallback(){x(this),d(this),this.tabpanelElement&&(this.tabpanelElement.removeEventListener("focus",this.tabpanelElementFocusListener.bind(this)),this.tabpanelElement.removeEventListener("blur",this.tabpanelElementBlurListener.bind(this)),this.tabpanelElement=void 0)}setupSelected(t,e){!!t!=!!e&&this.setupContentElement()}async setFocus(t){this.tabpanelElement.focus(t)}render(){return e("div",{ref:t=>{this.contentId||(this.tabpanelElement=t)},role:"tabpanel",class:{"duet-theme-turva":"turva"===this.theme,"duet-tab":!0,selected:this.selected,"has-content-id":!!this.contentId},"aria-description":this.accessibleDescription,"aria-labelledby":this.accessibleLabelledBy,tabindex:"-1"},e("slot",null))}get element(){return o(this)}static get watchers(){return{selected:["setupSelected"]}}};z.style=".sc-duet-tab-h{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;display:block;width:100%}.duet-tab.sc-duet-tab{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;display:none;width:100%}.duet-tab.selected.sc-duet-tab{display:block}.duet-tab.has-content-id.sc-duet-tab,.duet-tab.has-content-id.selected.sc-duet-tab{display:none}.user-is-tabbing.sc-duet-tab-h .duet-tab.sc-duet-tab:focus{outline:0;box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3), 0 0 0 1px #0077b3}.user-is-tabbing.sc-duet-tab-h .duet-tab.duet-theme-turva.sc-duet-tab:focus{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}";const S=class{constructor(e){t(this,e),this.duetChange=i(this,"duetChange",3),this.duetTabChange=i(this,"duetTabChange",7),this.duetTabChangeRequested=i(this,"duetTabChangeRequested",7),this.id=w("DuetTabGroup"),this.handleKeyDown=t=>{let e;c(t)||h(t)?e=t.target.previousElementSibling:(p(t)||g(t))&&(e=t.target.nextElementSibling),b(t)&&!u(t)&&(t.preventDefault(),this.element.querySelector(":scope > duet-tab[selected]").setFocus()),e&&(t.preventDefault(),e.click(),e.focus())},this.onTabSelect=t=>{this.tabChangeConfirm?t!==this.selected&&this.duetTabChangeRequested.emit({value:t,component:"duet-tab-group"}):this.openTab(t)},this.scrollToActive=()=>{setTimeout((()=>{const t=this.tabsContainer.querySelector(".selected");t&&t.scrollIntoView({behavior:"smooth",inline:"center",block:"nearest"})}),50)},this.tabs=[],this.selected=void 0,this.theme="",this.scrolls=!0,this.collapses=!1,this.accessibleLabel=void 0,this.variation="default",this.language=v(),this.labelDefaults={fi:"Valitse",en:"Choose",sv:"Välj"},this.label=m(this.labelDefaults,this.language),this.labelHidden=!0,this.identifier=this.id,this.margin="auto",this.padding="auto",this.setTabIndex=!0,this.tabChangeConfirm=!1,this.switchLargeBreakpoint="small",this.fillSpace=!1,this.stretch=!1}async connectedCallback(){"undefined"!=typeof MutationObserver&&(this.mutationO=new MutationObserver((()=>{this.updateTabs()})),this.mutationO.observe(this.element,{attributes:!0,attributeFilter:["label"],childList:!0,characterData:!0,subtree:!0})),await this.updateTabs(),l(this)}disconnectedCallback(){this.mutationO&&(this.mutationO.disconnect(),this.mutationO=void 0),d(this)}componentWillLoad(){r(this)}componentDidLoad(){this.intersectionObserver=new IntersectionObserver((t=>{t.length>0&&t[0].isIntersecting&&(this.scrollToActive(),this.intersectionObserver.disconnect())}),{root:null,threshold:0}),this.intersectionObserver.observe(this.element)}async openTab(t){if(t>=this.tabs.length)throw new Error(`[duet-tabs] Index ${t} is out of bounds of tabs length`);this.selected=t,this.tabs.forEach(((e,a)=>{e.selected=a===t})),this.scrollToActive();const e={value:t,component:"duet-tab-group"};this.duetChange.emit(e),this.duetTabChange.emit(e)}async refresh(){console.log("[duet-tabs] Refresh method is deprecated and will be removed in the future version.")}getTabs(){const t=Array.from(this.element.querySelectorAll("duet-tab")).filter((t=>t.closest("duet-tab-group")===this.element));if(0===t.length)throw new Error("[duet-tabs] Must have at least one tab");return t}getButtonId(t){return`${this.id}-button-${t}`}getTabId(t){return`${this.id}-tab-${t}`}getAccessibleDescription(t){return this.tabs[t].getAttribute("accessible-description")||null}async updateTabs(){this.selected=void 0,this.tabs=this.getTabs(),this.tabs.forEach(((t,e)=>{t.id=this.getTabId(e),t.selected&&(void 0===this.selected?this.selected=e:t.selected=!1)})),void 0===this.selected&&(this.selected=0,this.tabs[0].selected=!0)}isCentered(){return window&&"center"==window.getComputedStyle(this.element).textAlign}render(){const t="plain-scrolling"===this.variation?"duet-tab-variation-plain":`duet-tab-variation-${this.variation}`,a="checked"===this.variation||"plain-scrolling"===this.variation,o=`switch-large-at-${this.switchLargeBreakpoint?this.switchLargeBreakpoint:"small"}`,i=this.tabs.map(((t,a)=>e("button",{role:"tab",id:this.getButtonId(a),"aria-selected":t.selected?"true":"false","aria-description":this.getAccessibleDescription(a),tabindex:t.selected?"0":"-1",part:`${this.identifier}-button ${t.selected?`${this.identifier}-button--selected`:""}`,type:"button",class:{"duet-p-0":"none"===this.padding,"duet-tab-button":!0,"stackable-tab":"checked"===this.variation&&this.tabs.length<=3,selected:t.selected,[`duet-notification-mark-${t.notificationMark}`]:!!t.notificationMark,[o]:!!["default","plain","plain-scrolling"].includes(this.variation)},onClick:()=>this.onTabSelect(a),onKeyDown:t=>this.handleKeyDown(t)},"checked"===this.variation?e("div",{class:{"checked-tab-content":!0,"stackable-checked-tab-content":this.tabs.length<=3}},e("div",{class:{"checked-tab-description":!0,"stackable-description":this.tabs.length<=3}},e("p",null,t.label),e("p",{class:{"tab-caption":!0,selected:t.selected}},t.caption)),e("div",{class:{"stackable-checkmark":this.tabs.length<=3}},e("duet-checkmark",{theme:this.theme,checked:t.selected,type:"radio","presentation-only":!0,center:!0}))):t.label)));return e("div",{key:"b7f2848d57cafb3d41287f90b8c48b6870ca6e02",class:{"duet-tab-group":!0,"duet-theme-turva":"turva"===this.theme,[t]:!0,"duet-tab-plain-scrolling":"plain-scrolling"===this.variation,"duet-tab-group-scrolls":!0},"aria-label":this.accessibleLabel},e("div",{key:"d96384958ba83c00c34e4e49d08ea6d90ace8b96",role:"tablist",class:{"duet-m-0":"none"===this.margin||"checked"===this.variation,"duet-tab-group-tabs":!0,"duet-tab-group-hidden":this.tabs.length>3&&!a,"duet-tab-group-fill-space":this.fillSpace&&!this.stretch&&"default"===this.variation,"duet-tab-group-stretch":this.stretch},ref:t=>{this.tabsContainer=t}},"checked"===this.variation?i:e("div",{class:{"duet-tab-group-scrollable-wrapper":!0,"duet-tab-group-fill-space-wrapper":this.fillSpace&&"default"===this.variation}},this.fillSpace&&!this.stretch&&"default"===this.variation&&e("div",{class:"duet-scrollable-stretch-overlay"},e("div",{class:"background"}),e("div",{class:"border"})),e("duet-scrollable",{selected:this.selected,identifier:this.identifier,gap:["default","plain","plain-scrolling"].includes(this.variation)?"none":"large",buttonPosition:"default"===this.variation?"absolute":"relative",center:this.isCentered()?this.isCentered():"center"==this.element.style.textAlign,theme:this.theme,stretch:this.stretch},i))),e("div",{key:"1af41aa98fb13ebd5fb4f8913a8ae2a990007271",class:{"duet-tab-group-content":!0,"duet-m-0":"none"===this.margin,"checked-group-content":"checked"===this.variation}},e("slot",{key:"2a232778878cbcd955bf24d008384d1dc02659e9"})))}get element(){return o(this)}};S.style='*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;-webkit-tap-highlight-color:transparent;display:block;width:100%}.duet-tab-group-tabs{margin-bottom:28px !important;display:block;width:100%;max-width:100%;padding-top:2px;list-style:none}.duet-tab-group-tabs.duet-m-0{margin:0 !important}.duet-tab-variation-plain .duet-tab-group-tabs{border-bottom:1px solid rgb(212, 223, 229)}.duet-theme-turva.duet-tab-variation-plain .duet-tab-group-tabs{border-bottom-color:rgb(222, 224, 228)}.duet-tab-variation-checked .duet-tab-group-tabs{display:flex;gap:4px;padding-top:0;padding-right:12px;padding-left:12px;overflow-x:scroll;-ms-overflow-style:none;scrollbar-width:none;}.duet-tab-variation-checked .duet-tab-group-tabs::-webkit-scrollbar{display:none}@media (min-width: 36em){.duet-tab-variation-checked .duet-tab-group-tabs{gap:8px;padding-right:16px;padding-left:16px;overflow:visible}}.duet-tab-plain-scrolling .duet-tab-group-tabs{display:flex;overflow-x:scroll;scroll-behavior:smooth;-ms-overflow-style:none;scrollbar-width:none;}.duet-tab-plain-scrolling .duet-tab-group-tabs::-webkit-scrollbar{display:none}@media (min-width: 36em){.duet-tab-plain-scrolling .duet-tab-group-tabs{display:block;overflow:auto}}.duet-tab-group-tabs .duet-tab-group-scrollable-wrapper{}.duet-tab-group-tabs .duet-tab-group-scrollable-wrapper.duet-tab-group-fill-space-wrapper{position:relative;width:100%;overflow:hidden;border-radius:8px;}.duet-tab-group-tabs .duet-tab-group-scrollable-wrapper.duet-tab-group-fill-space-wrapper .duet-scrollable-stretch-overlay{display:contents}.duet-tab-group-tabs .duet-tab-group-scrollable-wrapper.duet-tab-group-fill-space-wrapper .duet-scrollable-stretch-overlay .background,.duet-tab-group-tabs .duet-tab-group-scrollable-wrapper.duet-tab-group-fill-space-wrapper .duet-scrollable-stretch-overlay .border{position:absolute;width:100%;height:100%;pointer-events:none;border-radius:8px}.duet-tab-group-tabs .duet-tab-group-scrollable-wrapper.duet-tab-group-fill-space-wrapper .duet-scrollable-stretch-overlay .background{z-index:100;background:rgb(245, 248, 250)}.duet-tab-group-tabs .duet-tab-group-scrollable-wrapper.duet-tab-group-fill-space-wrapper .duet-scrollable-stretch-overlay .background::after{position:absolute;top:0;left:0;width:100%;height:100%;margin-block:1px;content:"";border-radius:8px;box-shadow:0 3px 2px -1px rgba(0, 41, 77, 0.1) inset, 0 0 0 rgb(212, 223, 229)}.duet-theme-turva .duet-tab-group-tabs .duet-tab-group-scrollable-wrapper.duet-tab-group-fill-space-wrapper .duet-scrollable-stretch-overlay .background::after{box-shadow:0 3px 2px -1px rgba(23, 28, 58, 0.1) inset, 0 0 0 rgb(222, 224, 228)}.duet-tab-group-tabs .duet-tab-group-scrollable-wrapper.duet-tab-group-fill-space-wrapper .duet-scrollable-stretch-overlay .border{z-index:206;border:1px solid rgb(212, 223, 229)}@media (min-width: 36em){duet-select{display:none !important}}.duet-tab-button{-webkit-user-select:none;user-select:none;position:relative;z-index:100;display:inline-block;width:auto;padding:20px;margin-left:-2px;overflow:visible;font-family:"localtapiola-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";font-size:1rem;font-weight:600;line-height:1.1;text-align:left;text-decoration:none;cursor:pointer;border-right:2px solid rgb(212, 223, 229);border-radius:0;transition:150ms ease}.duet-tab-button.duet-p-0{padding:0 !important}.duet-tab-button.duet-m-0{margin:0 !important}.duet-tab-group-stretch .duet-tab-button{flex:1 1 0;min-width:fit-content;text-align:center}.duet-tab-button.duet-notification-mark-warning::after{position:absolute;top:6px;right:6px;display:inline-block;width:6px;height:6px;content:"";border-radius:50%;background:rgb(247, 178, 40);box-shadow:0 0 0 1px #dea024}.duet-tab-variation-plain .duet-tab-button.duet-notification-mark-warning::after{top:calc(50% - 0.5rem - 6px);right:-6px}.duet-tab-button.duet-notification-mark-danger::after{position:absolute;top:6px;right:6px;display:inline-block;width:6px;height:6px;content:"";border-radius:50%;background:rgb(214, 28, 82);box-shadow:0 0 0 1px #c1194a}.duet-tab-variation-plain .duet-tab-button.duet-notification-mark-danger::after{top:calc(50% - 0.5rem - 6px);right:-6px}.duet-theme-turva .duet-tab-button{font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";color:rgb(23, 28, 58)}.duet-theme-turva .duet-tab-button.duet-notification-mark-warning::after{position:absolute;top:6px;right:6px;display:inline-block;width:6px;height:6px;content:"";border-radius:50%;background:rgb(247, 178, 40);box-shadow:0 0 0 1px #dea024}.duet-tab-variation-plain .duet-theme-turva .duet-tab-button.duet-notification-mark-warning::after{top:calc(50% - 0.5rem - 6px);right:-6px}.duet-theme-turva .duet-tab-button.duet-notification-mark-danger::after{position:absolute;top:6px;right:6px;display:inline-block;width:6px;height:6px;content:"";border-radius:50%;background:rgb(214, 28, 82);box-shadow:0 0 0 1px #c1194a}.duet-tab-variation-plain .duet-theme-turva .duet-tab-button.duet-notification-mark-danger::after{top:calc(50% - 0.5rem - 6px);right:-6px}.duet-tab-button.duet-p-0{padding:0 !important}.duet-tab-button:hover{z-index:200;border-color:rgb(127, 150, 165)}.duet-theme-turva .duet-tab-button:hover{border-color:rgba(199, 202, 207, 0.8)}.duet-tab-button:active{opacity:0.75;transition:none}.duet-tab-button.selected{z-index:201;color:rgb(0, 119, 179);background:rgb(255, 255, 255);border-bottom:3px solid rgb(0, 119, 179);outline:0;box-shadow:none !important}.duet-theme-turva .duet-tab-button.selected{color:rgb(198, 12, 48);border-color:rgb(222, 224, 228);border-bottom-color:rgb(198, 12, 48)}.duet-tab-button:focus{z-index:205;outline:0}:host(.user-is-tabbing) .duet-tab-button:focus{box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3), 0 0 0 1px #0077b3}:host(.user-is-tabbing) .duet-theme-turva .duet-tab-button:focus{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}.duet-tab-variation-default .duet-tab-button{z-index:200;padding:11px 20px 13px 20px;overflow:hidden;font-size:0.875rem;color:rgb(62, 84, 102);background:rgb(245, 248, 250);border:1px solid rgb(212, 223, 229)}.duet-tab-variation-default .duet-tab-button.switch-large-at-always{padding:15px 28px 17px 28px;font-size:1rem}@media (min-width: 36em){.duet-tab-variation-default .duet-tab-button.switch-large-at-small{padding:15px 28px 17px 28px;font-size:1rem}}.duet-tab-variation-default .duet-tab-button.selected{color:rgb(8, 42, 77);background:rgb(255, 255, 255);transition:none}.duet-tab-variation-default .duet-tab-button.selected::before{position:absolute;right:-1px;bottom:0;z-index:300;display:block;width:calc(100% + 2px);height:2px;content:"";background-color:rgb(0, 119, 179)}.duet-tab-variation-default .duet-tab-button.selected:focus-visible{outline:2px solid rgba(0, 119, 179, 0.8);outline-offset:-5px;box-shadow:none !important}.duet-tab-variation-default .duet-tab-button.selected:focus-visible::before{height:0}.duet-tab-variation-default .duet-tab-button:not(.selected){box-shadow:0 3px 2px -1px rgba(0, 41, 77, 0.1) inset, 0 0 0 rgb(212, 223, 229)}.duet-tab-variation-default .duet-tab-button:hover:not(.selected){color:rgb(30, 45, 59);background:rgb(228, 236, 239)}.duet-tab-variation-default .duet-tab-button:first-child{border-radius:8px 0 0 8px}.duet-tab-variation-default .duet-tab-button:last-child{border-radius:0 8px 8px 0}.duet-tab-variation-default .duet-tab-group-fill-space .duet-tab-button{z-index:200}.duet-tab-variation-default .duet-tab-group-fill-space .duet-tab-button:last-child{border-radius:0}.duet-theme-turva.duet-tab-variation-default .duet-tab-group-fill-space .duet-tab-button::before{height:3px}.duet-theme-turva.duet-tab-variation-default .duet-tab-button{color:rgb(71, 78, 101)}.duet-theme-turva.duet-tab-variation-default .duet-tab-button.selected{color:rgb(23, 28, 58);background:rgb(255, 255, 255)}.duet-theme-turva.duet-tab-variation-default .duet-tab-button.selected::before{background-color:rgb(198, 12, 48)}.duet-theme-turva.duet-tab-variation-default .duet-tab-button:not(.selected){z-index:200;box-shadow:0 3px 2px -1px rgba(23, 28, 58, 0.1) inset, 0 0 0 rgb(222, 224, 228)}.duet-theme-turva.duet-tab-variation-default .duet-tab-button:hover:not(.selected){z-index:200;color:rgb(45, 52, 79);background:rgb(234, 235, 239)}.duet-theme-turva.duet-tab-variation-default .duet-tab-button:focus-visible{border-color:rgb(222, 224, 228);outline-color:rgba(199, 202, 207, 0.8)}.duet-tab-variation-plain .duet-tab-button{display:inline-block;width:auto;padding:12px 0;margin-left:0;font-size:0.875rem;color:rgb(81, 105, 123);border-width:0;border-bottom:2px solid transparent;border-radius:0;transition:none}.duet-tab-variation-plain .duet-tab-button.switch-large-at-always{padding:20px 0;font-size:1rem}@media (min-width: 36em){.duet-tab-variation-plain .duet-tab-button.switch-large-at-small{padding:20px 0;font-size:1rem}}.duet-tab-variation-plain .duet-tab-button:hover{color:rgb(8, 42, 77);border-bottom:2px solid rgb(0, 119, 179)}.duet-tab-variation-plain .duet-tab-button.selected{color:rgb(8, 42, 77);border-bottom:2px solid rgb(0, 119, 179)}.duet-tab-variation-plain .duet-tab-button+.duet-tab-button{margin-left:36px}.duet-theme-turva.duet-tab-variation-plain .duet-tab-button{color:rgb(71, 78, 101)}.duet-theme-turva.duet-tab-variation-plain .duet-tab-button:hover{color:rgb(45, 52, 79);border-bottom:2px solid rgb(198, 12, 48)}.duet-theme-turva.duet-tab-variation-plain .duet-tab-button.selected{color:rgb(23, 28, 58);border-bottom:2px solid rgb(198, 12, 48)}.duet-tab-variation-checked .duet-tab-button{position:relative;display:inline-block;flex-basis:0;flex-grow:1;width:200px;min-width:200px;padding:8px 4px;border-color:rgb(181, 198, 208);border-top:2px solid rgb(181, 198, 208);border-bottom-color:rgb(0, 119, 179);border-left:2px solid rgb(181, 198, 208);border-radius:4px 4px 0 0;transition:none}.duet-theme-turva.duet-tab-variation-checked .duet-tab-button{border-color:rgb(181, 198, 208);border-bottom-color:rgb(113, 118, 132)}@media (min-width: 36em){.duet-tab-variation-checked .duet-tab-button{min-width:0;padding:16px}}.duet-tab-variation-checked .duet-tab-button.stackable-tab{min-width:0}.duet-tab-variation-checked .duet-tab-button:first-child{margin-left:auto}.duet-tab-variation-checked .duet-tab-button:last-child{margin-right:auto}.duet-tab-variation-checked .duet-tab-button:active{opacity:1;transition:none}.duet-tab-variation-checked .duet-tab-button.selected{color:rgb(0, 119, 179);background:linear-gradient(180deg, rgb(240, 247, 250) 0%, rgb(255, 255, 255) 100%);border-color:rgb(0, 119, 179);border-bottom-color:#fff}.duet-theme-turva.duet-tab-variation-checked .duet-tab-button.selected{color:rgb(23, 28, 58);background:linear-gradient(180deg, rgb(245, 247, 250) 0%, rgb(255, 255, 255) 100%);border-color:rgb(113, 118, 132);border-bottom-color:#fff}.duet-tab-variation-checked .duet-tab-button .checked-tab-content{display:flex;flex-direction:row;justify-content:space-between}.duet-tab-variation-checked .duet-tab-button .checked-tab-content.stackable-checked-tab-content{flex-direction:column;height:100%}@media (min-width: 36em){.duet-tab-variation-checked .duet-tab-button .checked-tab-content.stackable-checked-tab-content{flex-direction:row}}.duet-tab-variation-checked .duet-tab-button .checked-tab-content .checked-tab-description{display:flex;flex-direction:column;overflow:hidden;overflow-wrap:break-word}.duet-tab-variation-checked .duet-tab-button .checked-tab-content .checked-tab-description.stackable-description{text-align:center}@media (min-width: 36em){.duet-tab-variation-checked .duet-tab-button .checked-tab-content .checked-tab-description.stackable-description{text-align:left}}.duet-tab-variation-checked .duet-tab-button .checked-tab-content .checked-tab-description .tab-caption{margin-top:4px;font-size:0.875rem;font-weight:400;color:rgb(98, 121, 138)}@media (min-width: 36em){.duet-tab-variation-checked .duet-tab-button .checked-tab-content .checked-tab-description .tab-caption{font-size:1rem;text-align:left}}.duet-theme-turva.duet-tab-variation-checked .duet-tab-button .checked-tab-content .checked-tab-description .tab-caption{color:rgb(113, 118, 132)}.duet-tab-variation-checked .duet-tab-button .checked-tab-content .checked-tab-description .tab-caption.selected{color:rgb(0, 119, 179)}.duet-theme-turva.duet-tab-variation-checked .duet-tab-button .checked-tab-content .checked-tab-description .tab-caption.selected{color:rgb(113, 118, 132)}.duet-tab-variation-checked .duet-tab-button .checked-tab-content .stackable-checkmark{order:-1;margin-top:8px;margin-bottom:8px}@media (min-width: 36em){.duet-tab-variation-checked .duet-tab-button .checked-tab-content .stackable-checkmark{order:1}}.duet-tab-group-content{position:relative;width:100%;font-family:"localtapiola-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";font-size:1rem;font-weight:400;line-height:1.5;color:rgb(8, 42, 77);text-align:left}.duet-tab-group-content:focus{outline:0;box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3), 0 0 0 1px #0077b3 !important}.duet-theme-turva .duet-tab-group-content:focus,.duet-tab-group-content:focus.duet-theme-turva{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a !important}.duet-tab-group-content.checked-group-content{padding:28px 0 28px 0}.duet-tab-group-content.checked-group-content::after{position:absolute;top:-2px;left:0;width:100%;height:2px;content:" ";background-color:rgb(0, 119, 179)}.duet-theme-turva .duet-tab-group-content{font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";color:rgb(23, 28, 58)}.duet-theme-turva .duet-tab-group-content.checked-group-content::after{background-color:rgb(113, 118, 132)}';export{y as duet_scrollable,z as duet_tab,S as duet_tab_group}
4
+ import{r as t,h as e,H as a,g as o,c as i}from"./p-56df20b9.js";import{i as r}from"./p-aaa7a7bd.js";import{h as s,a as n}from"./p-534b8454.js";import{s as l,u as d,o as b,p as u,d as c,b as h,a as p,c as g}from"./p-a45e3f8b.js";import{g as m,c as f,d as x,a as v}from"./p-97a065d3.js";import{d as k}from"./p-5de30279.js";import{c as w}from"./p-5e59e970.js";import"./p-9c3c64b9.js";import"./p-17efced0.js";const y=class{constructor(e){t(this,e),this.currentIndex=0,this.scrollPaneElement=void 0,this.hasCollapseButtonLabelSlot=!1,this.resizeObserver=new ResizeObserver((t=>{if(1===(null==t?void 0:t.length)){const e=this.getOverlayWidth();this.checkScrollingNeeded(t[0].target,e)}})),this.collapsedOnClick=()=>{this.collapsed=!this.collapsed},this.scrollPaneAtStart=!0,this.needsScrolling=!0,this.scrollPaneAtEnd=!1,this.childrenData={},this.theme="",this.identifier="",this.collapsed=!1,this.buttons=!0,this.buttonAlignment="center",this.buttonPosition="relative",this.center=!1,this.padding="none",this.gap="large",this.selected=0,this.stretch=!1}watchPropHandler(t){this.scrollToElement(t,"center")}componentWillLoad(){r(this),this.hasCollapseButtonLabelSlot=s(this.element,"collapse-button-label")}componentDidLoad(){requestAnimationFrame((()=>{this.scrollPaneElement&&(this.checkScrollingNeeded(this.scrollPaneElement,"absolute"===this.buttonPosition?0:5),this.updateScrollButtons(),this.resizeObserver.observe(this.scrollPaneElement))}))}disconnectedCallback(){this.resizeObserver.disconnect()}getScrollPaneElements(){return n(this.element)}checkScrollingNeeded(t=this.scrollPaneElement,e=5){var a;if(!t)return;const o=(null===(a=t.parentElement)||void 0===a?void 0:a.getBoundingClientRect().width)||0,i=t.scrollWidth,r=2*this.getOverlayWidth();this.needsScrolling=i-r>o+e,this.needsScrolling?this.updateScrollButtons():(this.scrollPaneAtStart=!0,this.scrollPaneAtEnd=!0)}getLastVisibleElement(){const t=this.getScrollPaneElements().find((t=>t.getBoundingClientRect().x+t.getBoundingClientRect().width-this.scrollPaneElement.getBoundingClientRect().x>this.scrollPaneElement.clientWidth)),e=this.getScrollPaneElements().indexOf(t);return t.clientWidth>this.scrollPaneElement.clientWidth?e:e-1}getFirstVisibleElement(){const t=this.getScrollPaneElements(),e=t.find((t=>t.getBoundingClientRect().x>this.scrollPaneElement.getBoundingClientRect().x)),a=e?t.indexOf(e):t.length;var o=Math.max(a-1,0);return t[o].clientWidth>this.scrollPaneElement.clientWidth?o:a}updateScrollButtons(t=null,e=this.scrollPaneElement){if(!this.buttons)return;if(t&&t.clientWidth>this.scrollPaneElement.clientWidth){const e=this.getScrollPaneElements().indexOf(t);return 0==e&&(this.scrollPaneAtStart=!0),void(e==this.getScrollPaneElements().length-1&&(this.scrollPaneAtEnd=!0))}e.scrollLeft<=0?this.scrollPaneAtStart=!0:e.scrollLeft>0&&(this.scrollPaneAtStart=!1);const a=Math.round(e.clientWidth+e.scrollLeft+this.getOverlayWidth()),o=Math.round(e.scrollWidth);this.scrollPaneAtEnd=a>=o}scrollToElement(t=this.currentIndex,e){const a=this.getScrollPaneElements();if(!a||0===a.length)return;t+1>=a.length&&(t=a.length-1),t<0&&(t=0);let o=a[0].getBoundingClientRect().x,i=5;const r=()=>{if(a[0].getBoundingClientRect().x===o){if(i--,0!==i)return void window.requestAnimationFrame(r);this.updateScrollButtons(a[t])}else window.requestAnimationFrame(r),o=a[0].getBoundingClientRect().x};a[t].scrollIntoView({behavior:"smooth",block:"nearest",inline:e}),window.requestAnimationFrame(r)}scrollLeft(){this.scrollPaneAtEnd=!1;const t=this.getFirstVisibleElement();this.scrollToElement(t-1,"center")}scrollRight(){this.scrollPaneAtStart=!1;const t=this.getLastVisibleElement();this.scrollToElement(t+1,"center")}getOverlayWidth(){return"absolute"===this.buttonPosition?0:10}renderButton(t){const a="turva"===this.theme?"color-primary-darker-turva":"color-primary",o="turva"===this.theme?"color-gray-turva":"color-gray",i=()=>{"left"===t?this.scrollLeft():this.scrollRight()},r="left"===t?this.scrollPaneAtStart:this.scrollPaneAtEnd;return e("div",{class:{"duet-scrollable-button-container":!0,[`${t}`]:!0,"duet-scrollable-button-container--occluded":!this.needsScrolling,[`duet-scrollable-button-container--${this.buttonPosition}`]:!0},hidden:!this.buttons||"absolute"===this.buttonPosition&&r},e("span",{part:`${this.identifier}-button-${t}`,"aria-hidden":"true",class:{"duet-scrollable-button":!0,[`duet-scrollable-button--${this.buttonPosition}`]:!0,[`duet-scrollable-button--${this.buttonAlignment}`]:!0,[`duet-scrollable-button--${t}`]:!0},onClick:()=>{i(),document.activeElement&&document.activeElement.blur()},hidden:!this.buttons||r},e("duet-icon",{color:r?o:a,name:"left"===t?"action-arrow-left":"action-arrow-right",size:"absolute"===this.buttonPosition?"x-small":"small",margin:"none"})))}render(){return e(a,{key:"13b04f9678d2d876b3813ff3be4400c6d3cb8706",class:{"duet-theme-turva":"turva"===this.theme,"duet-theme-default":"default"===this.theme}},this.hasCollapseButtonLabelSlot&&e("div",{key:"5459a8a656904d8cf5930623b0590b533055be36",class:{collapse:!0,hide:!this.needsScrolling&&!this.collapsed}},e("duet-button",{key:"0e1a7e9dd6e442d653ce8dbdc19831b3299d47c5",variation:"plain",margin:"none","center-text":!0,onClick:()=>this.collapsedOnClick()},e("slot",{key:"8c534bbeea9b0f15915958ae3947ca479a141a07",name:"collapse-button-label"}))),e("div",{key:"333736ff3035d3ba6e12b6f73c38fad12af6ec6a",class:{"duet-scrollable-items":!0,buttons:this.buttons,center:this.center,"duet-theme-turva":"turva"===this.theme}},this.buttons&&this.renderButton("left"),e("div",{key:"78c52fc83f55f4e9ab7bd9a3d12ec2c7a88f2e3f",class:{"duet-scrollable-list":!0,[`duet-scrollable-list--${this.buttonPosition}`]:!0,[`gap-${this.gap}`]:!0,collapsed:this.collapsed,[`duet-overflow-padding--${this.padding}`]:"none"!==this.padding,[`duet-scrollable-list--${this.buttonPosition}`]:"absolute"===this.buttonPosition,"duet-scrollable-stretch":this.stretch},onScroll:()=>this.updateScrollButtons(),ref:t=>this.scrollPaneElement=t},e("slot",{key:"95205e7b789573b3f5bfa2e542d81e2068968e93"})),this.buttons&&this.renderButton("right")))}get element(){return o(this)}static get watchers(){return{selected:["watchPropHandler"]}}};y.style="*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;-webkit-tap-highlight-color:transparent}:host{position:relative !important}:host .duet-scrollable-items{position:relative;display:flex}:host .duet-scrollable-items.buttons .duet-scrollable-button-container{position:relative;flex:0 0 auto;flex-basis:40px}:host .duet-scrollable-items.buttons .duet-scrollable-button-container--occluded{flex-basis:0;flex-shrink:1;width:0;padding:10px 0;overflow:hidden;visibility:hidden}:host .duet-scrollable-items.buttons .duet-scrollable-button-container--absolute{position:absolute;top:0;z-index:210;width:auto;height:100%;padding:0 16px;background-color:rgb(255, 255, 255)}:host .duet-scrollable-items.buttons .duet-scrollable-button-container--absolute.left{left:0}:host .duet-scrollable-items.buttons .duet-scrollable-button-container--absolute.right{right:0}:host .duet-scrollable-items.buttons .duet-scrollable-button-container .duet-scrollable-button{position:absolute;display:flex;flex:0 0 auto;flex-basis:40px;align-items:center;height:100%;cursor:pointer;transition:transform 300ms ease}:host .duet-scrollable-items.buttons .duet-scrollable-button-container .duet-scrollable-button:active duet-icon{transition:transform 300ms ease;transform:scale(0.8)}:host .duet-scrollable-items.buttons .duet-scrollable-button-container .duet-scrollable-button--left{left:0;padding:10px 10px 10px 0}:host .duet-scrollable-items.buttons .duet-scrollable-button-container .duet-scrollable-button--right{right:0;padding:10px 0 10px 10px}:host .duet-scrollable-items.buttons .duet-scrollable-button-container .duet-scrollable-button--top{align-items:flex-start}:host .duet-scrollable-items.buttons .duet-scrollable-button-container .duet-scrollable-button--bottom{align-items:flex-end}:host .duet-scrollable-items.buttons .duet-scrollable-button-container .duet-scrollable-button--absolute{padding:0 7px;border:1px solid rgb(212, 223, 229)}:host .duet-scrollable-items.buttons .duet-scrollable-button-container .duet-scrollable-button--absolute.duet-scrollable-button--left{border-radius:8px 0 0 8px}:host .duet-scrollable-items.buttons .duet-scrollable-button-container .duet-scrollable-button--absolute.duet-scrollable-button--right{border-radius:0 8px 8px 0}:host .duet-scrollable-items.buttons .duet-scrollable-button-container .duet-scrollable-button--absolute:hover{border-color:rgb(0, 119, 179);border-width:2px;}.duet-theme-turva :host .duet-scrollable-items.buttons .duet-scrollable-button-container .duet-scrollable-button--absolute:hover{border-color:rgb(113, 118, 132)}:host .duet-scrollable-items.buttons .duet-scrollable-button-container .duet-scrollable-button[hidden]{display:none !important}:host .duet-scrollable-items.duet-theme-turva .duet-scrollable-button-container .duet-scrollable-button--absolute:hover{border-color:rgb(113, 118, 132)}:host .duet-scrollable-items .duet-scrollable-list{display:flex;flex-wrap:nowrap;padding-inline:10px;margin-inline:-10px;overflow-x:auto;overflow-y:hidden;white-space:nowrap;scroll-snap-type:x mandatory;scroll-behavior:smooth;scroll-margin:0 20px;-ms-overflow-style:-ms-autohiding-scrollbar;-webkit-overflow-scrolling:touch;-webkit-mask:linear-gradient(to right, transparent 0, #fff 10px), linear-gradient(to left, transparent 0, #fff 10px);-webkit-mask-size:50% 100%, 50% 100%;-webkit-mask-position:left, right;-webkit-mask-repeat:no-repeat;mask:linear-gradient(to right, transparent 0, #fff 10px), linear-gradient(to left, transparent 0, #fff 10px);mask-size:50% 100%, 50% 100%;mask-position:left, right;mask-repeat:no-repeat;}:host .duet-scrollable-items .duet-scrollable-list--absolute{padding-right:0;padding-left:2px;margin-inline:0;-webkit-mask:none !important;mask:none !important}:host .duet-scrollable-items .duet-scrollable-list:not(.buttons){white-space:normal}:host .duet-scrollable-items .duet-scrollable-list::-webkit-scrollbar{display:none}:host .duet-scrollable-items .duet-scrollable-list.collapsed{flex-wrap:wrap}:host .duet-scrollable-items .duet-scrollable-list.gap-none{gap:0}:host .duet-scrollable-items .duet-scrollable-list.gap-large{gap:20px}:host .duet-scrollable-items .duet-scrollable-list.duet-overflow-padding--xx-small{padding-top:4px;padding-bottom:4px}:host .duet-scrollable-items .duet-scrollable-list.duet-overflow-padding--x-small{padding-top:8px;padding-bottom:8px}:host .duet-scrollable-items .duet-scrollable-list.duet-overflow-padding--small{padding-top:12px;padding-bottom:12px}:host .duet-scrollable-items .duet-scrollable-list.duet-overflow-padding--medium{padding-top:16px;padding-bottom:16px}:host .duet-scrollable-items .duet-scrollable-list.duet-scrollable-stretch{width:100%}:host .duet-scrollable-items.center{justify-content:center}:host .duet-scrollable-items.center .duet-scrollable-list.collapsed{justify-content:center}.collapse{width:100%;text-align:center}.collapse.hide{visibility:hidden}::slotted(*){flex-shrink:0;margin-left:0;-webkit-transition:-webkit-transform 0.2s ease-in-out;transition:-webkit-transform 0.2s ease-in-out;transition:transform 0.2s ease-in-out;transition:transform 0.2s ease-in-out, -webkit-transform 0.2s ease-in-out;scroll-snap-align:center}";const z=class{constructor(e){t(this,e),this.setupContentElement=()=>{this.contentId&&(this.tabpanelElement=document.getElementById(this.contentId),this.tabpanelElement&&(this.tabpanelElement.setAttribute("role","tabpanel"),this.tabpanelElement.setAttribute("tabindex","-1"),this.tabpanelElement.removeEventListener("focus",this.tabpanelElementFocusListener),this.tabpanelElement.removeEventListener("blur",this.tabpanelElementBlurListener),this.tabpanelElement.addEventListener("focus",this.tabpanelElementFocusListener),this.tabpanelElement.addEventListener("blur",this.tabpanelElementBlurListener),this.accessibleDescription&&this.tabpanelElement.setAttribute("aria-description",this.accessibleDescription),this.accessibleLabelledBy&&this.tabpanelElement.setAttribute("aria-labelledby",this.accessibleLabelledBy),this.tabpanelElement.toggleAttribute("hidden",!this.selected)))},this.tabpanelElementFocusListener=()=>{this.element.classList.contains("user-is-tabbing")&&(this.tabpanelElement.style.outline="0",this.tabpanelElement.style.boxShadow=k("turva"===this.theme?"focus-turva":"focus"))},this.tabpanelElementBlurListener=()=>{this.tabpanelElement.style.outline=null,this.tabpanelElement.style.boxShadow=null},this.theme="",this.label=void 0,this.caption=void 0,this.selected=void 0,this.notificationMark=void 0,this.accessibleDescriptionDefault=null,this.accessibleDescription=this.accessibleDescriptionDefault?m(this.accessibleDescriptionDefault):null,this.accessibleLabelledBy=void 0,this.contentId=void 0}componentWillLoad(){r(this)}connectedCallback(){f(this,{prop:"accessibleDescription",defaults:"accessibleDescriptionDefault"}),l(this),this.setupContentElement()}disconnectedCallback(){x(this),d(this),this.tabpanelElement&&(this.tabpanelElement.removeEventListener("focus",this.tabpanelElementFocusListener.bind(this)),this.tabpanelElement.removeEventListener("blur",this.tabpanelElementBlurListener.bind(this)),this.tabpanelElement=void 0)}setupSelected(t,e){!!t!=!!e&&this.setupContentElement()}async setFocus(t){this.tabpanelElement.focus(t)}render(){return e("div",{ref:t=>{this.contentId||(this.tabpanelElement=t)},role:"tabpanel",class:{"duet-theme-turva":"turva"===this.theme,"duet-tab":!0,selected:this.selected,"has-content-id":!!this.contentId},"aria-description":this.accessibleDescription,"aria-labelledby":this.accessibleLabelledBy,tabindex:"-1"},e("slot",null))}get element(){return o(this)}static get watchers(){return{selected:["setupSelected"]}}};z.style=".sc-duet-tab-h{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;display:block;width:100%}.duet-tab.sc-duet-tab{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;display:none;width:100%}.duet-tab.selected.sc-duet-tab{display:block}.duet-tab.has-content-id.sc-duet-tab,.duet-tab.has-content-id.selected.sc-duet-tab{display:none}.user-is-tabbing.sc-duet-tab-h .duet-tab.sc-duet-tab:focus{outline:0;box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3), 0 0 0 1px #0077b3}.user-is-tabbing.sc-duet-tab-h .duet-tab.duet-theme-turva.sc-duet-tab:focus{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}";const S=class{constructor(e){t(this,e),this.duetChange=i(this,"duetChange",3),this.duetTabChange=i(this,"duetTabChange",7),this.duetTabChangeRequested=i(this,"duetTabChangeRequested",7),this.id=w("DuetTabGroup"),this.handleKeyDown=t=>{let e;c(t)||h(t)?e=t.target.previousElementSibling:(p(t)||g(t))&&(e=t.target.nextElementSibling),b(t)&&!u(t)&&(t.preventDefault(),this.element.querySelector(":scope > duet-tab[selected]").setFocus()),e&&(t.preventDefault(),e.click(),e.focus())},this.onTabSelect=t=>{this.tabChangeConfirm?t!==this.selected&&this.duetTabChangeRequested.emit({value:t,component:"duet-tab-group"}):this.openTab(t)},this.scrollToActive=()=>{setTimeout((()=>{const t=this.tabsContainer.querySelector(".selected");t&&t.scrollIntoView({behavior:"smooth",inline:"center",block:"nearest"})}),50)},this.tabs=[],this.selected=void 0,this.theme="",this.scrolls=!0,this.collapses=!1,this.accessibleLabel=void 0,this.variation="default",this.language=v(),this.labelDefaults={fi:"Valitse",en:"Choose",sv:"Välj"},this.label=m(this.labelDefaults,this.language),this.labelHidden=!0,this.identifier=this.id,this.margin="auto",this.padding="auto",this.setTabIndex=!0,this.tabChangeConfirm=!1,this.switchLargeBreakpoint="small",this.fillSpace=!1,this.stretch=!1}async connectedCallback(){"undefined"!=typeof MutationObserver&&(this.mutationO=new MutationObserver((()=>{this.updateTabs()})),this.mutationO.observe(this.element,{attributes:!0,attributeFilter:["label"],childList:!0,characterData:!0,subtree:!0})),await this.updateTabs(),l(this)}disconnectedCallback(){this.mutationO&&(this.mutationO.disconnect(),this.mutationO=void 0),d(this)}componentWillLoad(){r(this)}componentDidLoad(){this.intersectionObserver=new IntersectionObserver((t=>{t.length>0&&t[0].isIntersecting&&(this.scrollToActive(),this.intersectionObserver.disconnect())}),{root:null,threshold:0}),this.intersectionObserver.observe(this.element)}async openTab(t){if(t>=this.tabs.length)throw new Error(`[duet-tabs] Index ${t} is out of bounds of tabs length`);this.selected=t,this.tabs.forEach(((e,a)=>{e.selected=a===t})),this.scrollToActive();const e={value:t,component:"duet-tab-group"};this.duetChange.emit(e),this.duetTabChange.emit(e)}async refresh(){console.log("[duet-tabs] Refresh method is deprecated and will be removed in the future version.")}getTabs(){const t=Array.from(this.element.querySelectorAll("duet-tab")).filter((t=>t.closest("duet-tab-group")===this.element));if(0===t.length)throw new Error("[duet-tabs] Must have at least one tab");return t}getButtonId(t){return`${this.id}-button-${t}`}getTabId(t){return`${this.id}-tab-${t}`}getAccessibleDescription(t){return this.tabs[t].getAttribute("accessible-description")||null}async updateTabs(){this.selected=void 0,this.tabs=this.getTabs(),this.tabs.forEach(((t,e)=>{t.id=this.getTabId(e),t.selected&&(void 0===this.selected?this.selected=e:t.selected=!1)})),void 0===this.selected&&(this.selected=0,this.tabs[0].selected=!0)}isCentered(){return window&&"center"==window.getComputedStyle(this.element).textAlign}render(){const t="plain-scrolling"===this.variation?"duet-tab-variation-plain":`duet-tab-variation-${this.variation}`,a="checked"===this.variation||"plain-scrolling"===this.variation,o=`switch-large-at-${this.switchLargeBreakpoint?this.switchLargeBreakpoint:"small"}`,i=this.tabs.map(((t,a)=>e("button",{role:"tab",id:this.getButtonId(a),"aria-selected":t.selected?"true":"false","aria-description":this.getAccessibleDescription(a),tabindex:t.selected?"0":"-1",part:`${this.identifier}-button ${t.selected?`${this.identifier}-button--selected`:""}`,type:"button",class:{"duet-p-0":"none"===this.padding,"duet-tab-button":!0,"stackable-tab":"checked"===this.variation&&this.tabs.length<=3,selected:t.selected,[`duet-notification-mark-${t.notificationMark}`]:!!t.notificationMark,[o]:!!["default","plain","plain-scrolling"].includes(this.variation)},onClick:()=>this.onTabSelect(a),onKeyDown:t=>this.handleKeyDown(t)},"checked"===this.variation?e("div",{class:{"checked-tab-content":!0,"stackable-checked-tab-content":this.tabs.length<=3}},e("div",{class:{"checked-tab-description":!0,"stackable-description":this.tabs.length<=3}},e("p",null,t.label),e("p",{class:{"tab-caption":!0,selected:t.selected}},t.caption)),e("div",{class:{"stackable-checkmark":this.tabs.length<=3}},e("duet-checkmark",{theme:this.theme,checked:t.selected,type:"radio","presentation-only":!0,center:!0}))):t.label)));return e("div",{key:"b7f2848d57cafb3d41287f90b8c48b6870ca6e02",class:{"duet-tab-group":!0,"duet-theme-turva":"turva"===this.theme,[t]:!0,"duet-tab-plain-scrolling":"plain-scrolling"===this.variation,"duet-tab-group-scrolls":!0},"aria-label":this.accessibleLabel},e("div",{key:"d96384958ba83c00c34e4e49d08ea6d90ace8b96",role:"tablist",class:{"duet-m-0":"none"===this.margin||"checked"===this.variation,"duet-tab-group-tabs":!0,"duet-tab-group-hidden":this.tabs.length>3&&!a,"duet-tab-group-fill-space":this.fillSpace&&!this.stretch&&"default"===this.variation,"duet-tab-group-stretch":this.stretch},ref:t=>{this.tabsContainer=t}},"checked"===this.variation?i:e("div",{class:{"duet-tab-group-scrollable-wrapper":!0,"duet-tab-group-fill-space-wrapper":this.fillSpace&&"default"===this.variation}},this.fillSpace&&!this.stretch&&"default"===this.variation&&e("div",{class:"duet-scrollable-stretch-overlay"},e("div",{class:"background"}),e("div",{class:"border"})),e("duet-scrollable",{selected:this.selected,identifier:this.identifier,gap:["default","plain","plain-scrolling"].includes(this.variation)?"none":"large",buttonPosition:"default"===this.variation?"absolute":"relative",center:this.isCentered()?this.isCentered():"center"==this.element.style.textAlign,theme:this.theme,stretch:this.stretch},i))),e("div",{key:"1af41aa98fb13ebd5fb4f8913a8ae2a990007271",class:{"duet-tab-group-content":!0,"duet-m-0":"none"===this.margin,"checked-group-content":"checked"===this.variation}},e("slot",{key:"2a232778878cbcd955bf24d008384d1dc02659e9"})))}get element(){return o(this)}};S.style='*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;-webkit-tap-highlight-color:transparent;display:block;width:100%}.duet-tab-group-tabs{margin-bottom:28px !important;display:block;width:100%;max-width:100%;padding-top:2px;list-style:none}.duet-tab-group-tabs.duet-m-0{margin:0 !important}.duet-tab-variation-plain .duet-tab-group-tabs{border-bottom:1px solid rgb(212, 223, 229)}.duet-theme-turva.duet-tab-variation-plain .duet-tab-group-tabs{border-bottom-color:rgb(222, 224, 228)}.duet-tab-variation-checked .duet-tab-group-tabs{display:flex;gap:4px;padding-top:0;padding-right:12px;padding-left:12px;overflow-x:scroll;-ms-overflow-style:none;scrollbar-width:none;}.duet-tab-variation-checked .duet-tab-group-tabs::-webkit-scrollbar{display:none}@media (min-width: 36em){.duet-tab-variation-checked .duet-tab-group-tabs{gap:8px;padding-right:16px;padding-left:16px;overflow:visible}}.duet-tab-plain-scrolling .duet-tab-group-tabs{display:flex;overflow-x:scroll;scroll-behavior:smooth;-ms-overflow-style:none;scrollbar-width:none;}.duet-tab-plain-scrolling .duet-tab-group-tabs::-webkit-scrollbar{display:none}@media (min-width: 36em){.duet-tab-plain-scrolling .duet-tab-group-tabs{display:block;overflow:auto}}.duet-tab-group-tabs .duet-tab-group-scrollable-wrapper{}.duet-tab-group-tabs .duet-tab-group-scrollable-wrapper.duet-tab-group-fill-space-wrapper{position:relative;width:100%;overflow:hidden;border-radius:8px;}.duet-tab-group-tabs .duet-tab-group-scrollable-wrapper.duet-tab-group-fill-space-wrapper .duet-scrollable-stretch-overlay{display:contents}.duet-tab-group-tabs .duet-tab-group-scrollable-wrapper.duet-tab-group-fill-space-wrapper .duet-scrollable-stretch-overlay .background,.duet-tab-group-tabs .duet-tab-group-scrollable-wrapper.duet-tab-group-fill-space-wrapper .duet-scrollable-stretch-overlay .border{position:absolute;width:100%;height:100%;pointer-events:none;border-radius:8px}.duet-tab-group-tabs .duet-tab-group-scrollable-wrapper.duet-tab-group-fill-space-wrapper .duet-scrollable-stretch-overlay .background{z-index:100;background:rgb(245, 248, 250)}.duet-tab-group-tabs .duet-tab-group-scrollable-wrapper.duet-tab-group-fill-space-wrapper .duet-scrollable-stretch-overlay .background::after{position:absolute;top:0;left:0;width:100%;height:100%;margin-block:1px;content:"";border-radius:8px;box-shadow:0 3px 2px -1px rgba(0, 41, 77, 0.1) inset, 0 0 0 rgb(212, 223, 229)}.duet-theme-turva .duet-tab-group-tabs .duet-tab-group-scrollable-wrapper.duet-tab-group-fill-space-wrapper .duet-scrollable-stretch-overlay .background::after{box-shadow:0 3px 2px -1px rgba(23, 28, 58, 0.1) inset, 0 0 0 rgb(222, 224, 228)}.duet-tab-group-tabs .duet-tab-group-scrollable-wrapper.duet-tab-group-fill-space-wrapper .duet-scrollable-stretch-overlay .border{z-index:206;border:1px solid rgb(212, 223, 229)}@media (min-width: 36em){duet-select{display:none !important}}.duet-tab-button{-webkit-user-select:none;user-select:none;position:relative;z-index:100;display:inline-block;width:auto;padding:20px;margin-left:-2px;overflow:visible;font-family:"localtapiola-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";font-size:1rem;font-weight:600;line-height:1.1;text-align:left;text-decoration:none;cursor:pointer;border-right:2px solid rgb(212, 223, 229);border-radius:0;transition:150ms ease}.duet-tab-button.duet-p-0{padding:0 !important}.duet-tab-button.duet-m-0{margin:0 !important}.duet-tab-group-stretch .duet-tab-button{flex:1 1 0;min-width:fit-content;text-align:center}.duet-tab-button.duet-notification-mark-warning::after{position:absolute;top:6px;right:6px;display:inline-block;width:6px;height:6px;content:"";border-radius:50%;background:rgb(247, 178, 40);box-shadow:0 0 0 1px #dea024}.duet-tab-variation-plain .duet-tab-button.duet-notification-mark-warning::after{top:calc(50% - 0.5rem - 6px);right:-6px}.duet-tab-button.duet-notification-mark-danger::after{position:absolute;top:6px;right:6px;display:inline-block;width:6px;height:6px;content:"";border-radius:50%;background:rgb(214, 28, 82);box-shadow:0 0 0 1px #c1194a}.duet-tab-variation-plain .duet-tab-button.duet-notification-mark-danger::after{top:calc(50% - 0.5rem - 6px);right:-6px}.duet-theme-turva .duet-tab-button{font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";color:rgb(23, 28, 58)}.duet-theme-turva .duet-tab-button.duet-notification-mark-warning::after{position:absolute;top:6px;right:6px;display:inline-block;width:6px;height:6px;content:"";border-radius:50%;background:rgb(247, 178, 40);box-shadow:0 0 0 1px #dea024}.duet-tab-variation-plain .duet-theme-turva .duet-tab-button.duet-notification-mark-warning::after{top:calc(50% - 0.5rem - 6px);right:-6px}.duet-theme-turva .duet-tab-button.duet-notification-mark-danger::after{position:absolute;top:6px;right:6px;display:inline-block;width:6px;height:6px;content:"";border-radius:50%;background:rgb(214, 28, 82);box-shadow:0 0 0 1px #c1194a}.duet-tab-variation-plain .duet-theme-turva .duet-tab-button.duet-notification-mark-danger::after{top:calc(50% - 0.5rem - 6px);right:-6px}.duet-tab-button.duet-p-0{padding:0 !important}.duet-tab-button:hover{z-index:200;border-color:rgb(127, 150, 165)}.duet-theme-turva .duet-tab-button:hover{border-color:rgba(199, 202, 207, 0.8)}.duet-tab-button:active{opacity:0.75;transition:none}.duet-tab-button.selected{z-index:201;color:rgb(0, 119, 179);background:rgb(255, 255, 255);border-bottom:3px solid rgb(0, 119, 179);outline:0;box-shadow:none !important}.duet-theme-turva .duet-tab-button.selected{color:rgb(198, 12, 48);border-color:rgb(222, 224, 228);border-bottom-color:rgb(198, 12, 48)}.duet-tab-button:focus{z-index:205;outline:0}:host(.user-is-tabbing) .duet-tab-button:focus{box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3), 0 0 0 1px #0077b3}:host(.user-is-tabbing) .duet-theme-turva .duet-tab-button:focus{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}.duet-tab-variation-default .duet-tab-button{z-index:200;padding:11px 20px 13px 20px;overflow:hidden;font-size:0.875rem;color:rgb(62, 84, 102);background:rgb(245, 248, 250);border:1px solid rgb(212, 223, 229)}.duet-tab-variation-default .duet-tab-button.switch-large-at-always{padding:15px 28px 17px 28px;font-size:1rem}@media (min-width: 36em){.duet-tab-variation-default .duet-tab-button.switch-large-at-small{padding:15px 28px 17px 28px;font-size:1rem}}.duet-tab-variation-default .duet-tab-button.selected{color:rgb(8, 42, 77);background:rgb(255, 255, 255);transition:none}.duet-tab-variation-default .duet-tab-button.selected::before{position:absolute;right:-1px;bottom:0;z-index:300;display:block;width:calc(100% + 2px);height:2px;content:"";background-color:rgb(0, 119, 179)}.duet-tab-variation-default .duet-tab-button.selected:focus-visible{outline:2px solid rgba(0, 119, 179, 0.8);outline-offset:-5px;box-shadow:none !important}.duet-tab-variation-default .duet-tab-button.selected:focus-visible::before{height:0}.duet-tab-variation-default .duet-tab-button:not(.selected){box-shadow:0 3px 2px -1px rgba(0, 41, 77, 0.1) inset, 0 0 0 rgb(212, 223, 229)}.duet-tab-variation-default .duet-tab-button:hover:not(.selected){color:rgb(30, 45, 59);background:rgb(228, 236, 239)}.duet-tab-variation-default .duet-tab-button:first-child{border-radius:8px 0 0 8px}.duet-tab-variation-default .duet-tab-button:last-child{border-radius:0 8px 8px 0}.duet-tab-variation-default .duet-tab-group-fill-space .duet-tab-button{z-index:200}.duet-tab-variation-default .duet-tab-group-fill-space .duet-tab-button:last-child{border-radius:0}.duet-theme-turva.duet-tab-variation-default .duet-tab-group-fill-space .duet-tab-button::before{height:3px}.duet-theme-turva.duet-tab-variation-default .duet-tab-button{color:rgb(71, 78, 101)}.duet-theme-turva.duet-tab-variation-default .duet-tab-button.selected{color:rgb(23, 28, 58);background:rgb(255, 255, 255)}.duet-theme-turva.duet-tab-variation-default .duet-tab-button.selected::before{background-color:rgb(198, 12, 48)}.duet-theme-turva.duet-tab-variation-default .duet-tab-button:not(.selected){z-index:200;box-shadow:0 3px 2px -1px rgba(23, 28, 58, 0.1) inset, 0 0 0 rgb(222, 224, 228)}.duet-theme-turva.duet-tab-variation-default .duet-tab-button:hover:not(.selected){z-index:200;color:rgb(45, 52, 79);background:rgb(234, 235, 239)}.duet-theme-turva.duet-tab-variation-default .duet-tab-button:focus-visible{border-color:rgb(222, 224, 228);outline-color:rgba(199, 202, 207, 0.8)}.duet-tab-variation-plain .duet-tab-button{display:inline-block;width:auto;padding:12px 0;margin-left:0;font-size:0.875rem;color:rgb(81, 105, 123);border-width:0;border-bottom:2px solid transparent;border-radius:0;transition:none}.duet-tab-variation-plain .duet-tab-button.switch-large-at-always{padding:20px 0;font-size:1rem}@media (min-width: 36em){.duet-tab-variation-plain .duet-tab-button.switch-large-at-small{padding:20px 0;font-size:1rem}}.duet-tab-variation-plain .duet-tab-button:hover{color:rgb(8, 42, 77);border-bottom:2px solid rgb(0, 119, 179)}.duet-tab-variation-plain .duet-tab-button.selected{color:rgb(8, 42, 77);border-bottom:2px solid rgb(0, 119, 179)}.duet-tab-variation-plain .duet-tab-button+.duet-tab-button{margin-left:36px}.duet-theme-turva.duet-tab-variation-plain .duet-tab-button{color:rgb(71, 78, 101)}.duet-theme-turva.duet-tab-variation-plain .duet-tab-button:hover{color:rgb(45, 52, 79);border-bottom:2px solid rgb(198, 12, 48)}.duet-theme-turva.duet-tab-variation-plain .duet-tab-button.selected{color:rgb(23, 28, 58);border-bottom:2px solid rgb(198, 12, 48)}.duet-tab-variation-checked .duet-tab-button{position:relative;display:inline-block;flex-basis:0;flex-grow:1;width:200px;min-width:200px;padding:8px 4px;border-color:rgb(181, 198, 208);border-top:2px solid rgb(181, 198, 208);border-bottom-color:rgb(0, 119, 179);border-left:2px solid rgb(181, 198, 208);border-radius:4px 4px 0 0;transition:none}.duet-theme-turva.duet-tab-variation-checked .duet-tab-button{border-color:rgb(181, 198, 208);border-bottom-color:rgb(113, 118, 132)}@media (min-width: 36em){.duet-tab-variation-checked .duet-tab-button{min-width:0;padding:16px}}.duet-tab-variation-checked .duet-tab-button.stackable-tab{min-width:0}.duet-tab-variation-checked .duet-tab-button:first-child{margin-left:auto}.duet-tab-variation-checked .duet-tab-button:last-child{margin-right:auto}.duet-tab-variation-checked .duet-tab-button:active{opacity:1;transition:none}.duet-tab-variation-checked .duet-tab-button.selected{color:rgb(0, 119, 179);background:linear-gradient(180deg, rgb(240, 247, 250) 0%, rgb(255, 255, 255) 100%);border-color:rgb(0, 119, 179);border-bottom-color:#fff}.duet-theme-turva.duet-tab-variation-checked .duet-tab-button.selected{color:rgb(23, 28, 58);background:linear-gradient(180deg, rgb(245, 247, 250) 0%, rgb(255, 255, 255) 100%);border-color:rgb(113, 118, 132);border-bottom-color:#fff}.duet-tab-variation-checked .duet-tab-button .checked-tab-content{display:flex;flex-direction:row;justify-content:space-between}.duet-tab-variation-checked .duet-tab-button .checked-tab-content.stackable-checked-tab-content{flex-direction:column;height:100%}@media (min-width: 36em){.duet-tab-variation-checked .duet-tab-button .checked-tab-content.stackable-checked-tab-content{flex-direction:row}}.duet-tab-variation-checked .duet-tab-button .checked-tab-content .checked-tab-description{display:flex;flex-direction:column;overflow:hidden;overflow-wrap:break-word}.duet-tab-variation-checked .duet-tab-button .checked-tab-content .checked-tab-description.stackable-description{text-align:center}@media (min-width: 36em){.duet-tab-variation-checked .duet-tab-button .checked-tab-content .checked-tab-description.stackable-description{text-align:left}}.duet-tab-variation-checked .duet-tab-button .checked-tab-content .checked-tab-description .tab-caption{margin-top:4px;font-size:0.875rem;font-weight:400;color:rgb(98, 121, 138)}@media (min-width: 36em){.duet-tab-variation-checked .duet-tab-button .checked-tab-content .checked-tab-description .tab-caption{font-size:1rem;text-align:left}}.duet-theme-turva.duet-tab-variation-checked .duet-tab-button .checked-tab-content .checked-tab-description .tab-caption{color:rgb(113, 118, 132)}.duet-tab-variation-checked .duet-tab-button .checked-tab-content .checked-tab-description .tab-caption.selected{color:rgb(0, 119, 179)}.duet-theme-turva.duet-tab-variation-checked .duet-tab-button .checked-tab-content .checked-tab-description .tab-caption.selected{color:rgb(113, 118, 132)}.duet-tab-variation-checked .duet-tab-button .checked-tab-content .stackable-checkmark{order:-1;margin-top:8px;margin-bottom:8px}@media (min-width: 36em){.duet-tab-variation-checked .duet-tab-button .checked-tab-content .stackable-checkmark{order:1}}.duet-tab-group-content{position:relative;width:100%;font-family:"localtapiola-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";font-size:1rem;font-weight:400;line-height:1.5;color:rgb(8, 42, 77);text-align:left}.duet-tab-group-content:focus{outline:0;box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3), 0 0 0 1px #0077b3 !important}.duet-theme-turva .duet-tab-group-content:focus,.duet-tab-group-content:focus.duet-theme-turva{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a !important}.duet-tab-group-content.checked-group-content{padding:28px 0 28px 0}.duet-tab-group-content.checked-group-content::after{position:absolute;top:-2px;left:0;width:100%;height:2px;content:" ";background-color:rgb(0, 119, 179)}.duet-theme-turva .duet-tab-group-content{font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";color:rgb(23, 28, 58)}.duet-theme-turva .duet-tab-group-content.checked-group-content::after{background-color:rgb(113, 118, 132)}';export{y as duet_scrollable,z as duet_tab,S as duet_tab_group}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * Built with Duet Design System
3
3
  */
4
- import{r as t,h as e,g as i}from"./p-44b36dbf.js";import{i as a}from"./p-aaa7a7bd.js";import{s as o,u as r}from"./p-a45e3f8b.js";import{a as d,g as n,c as s,d as c}from"./p-744b8ee1.js";import{a as l}from"./p-115c79b6.js";import"./p-9c3c64b9.js";const b=class{constructor(e){t(this,e),this.language=d(),this.accessibleLabelUnreadDefaults={en:"Unread",fi:"Lukematon",sv:"Oläst"},this.accessibleLabelUnread=n(this.accessibleLabelUnreadDefaults,this.language),this.url="#",this.date="",this.highlight=!1,this.external=!1,this.theme=""}componentWillLoad(){a(this)}connectedCallback(){s(this,{prop:"accessibleLabelUnread",defaults:"accessibleLabelUnreadDefaults"}),o(this)}disconnectedCallback(){c(this),r(this)}async setFocus(t){this.linkElement.focus(t)}render(){return e("div",{key:"50b14b431dd3fa0271fed4ad88b3844db5d470c2",role:"listitem",class:{"duet-notification":!0,"duet-notification-highlight":this.highlight,"duet-theme-turva":"turva"===this.theme}},e("a",{key:"69d83dd84ef5cb3e5cadc59ef13262ba5a2403b5",ref:t=>this.linkElement=t,href:this.url,target:this.external?"_blank":"_self"},e("div",{key:"c84b368567d5c30a73d072a857d09546762d4e3b",class:"duet-notification-container"},e("div",{key:"b643d6050a37393d3014f04d1255b39a1db22be7",class:"duet-notification-badge-container"},this.highlight&&e("div",{key:"f2ffc87634082ee3ca83962e5be69f8521a8ca8a",class:"duet-notification-badge"},e("duet-visually-hidden",{key:"150e736d8b12304b0a2bf4341462b861f7e1dfdb"},this.accessibleLabelUnread,":"))),e("div",{key:"17934b56fbc1d360d9caf028b545edb6a8fe06e3",class:"duet-notification-content"},e("slot",{key:"3546c2b5e14a00d7b254f59985315a13d79bcc4f"})),e("div",{key:"ac03337c739922c3db5c1e8b63593f92edba315d",class:"duet-notification-date"},this.date))))}get element(){return i(this)}};b.style="*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;display:block;width:100%}:host(:not([highlight])) ::slotted(duet-heading),:host(:not([highlight])) ::slotted(duet-paragraph){opacity:0.7}.duet-notification{display:block;padding:16px;padding-bottom:0;cursor:pointer}:host(:first-of-type) .duet-notification{border-top-left-radius:8px;border-top-right-radius:8px}:host(:last-of-type) .duet-notification{border-bottom:0;border-bottom-right-radius:8px;border-bottom-left-radius:8px}.duet-notification.duet-theme-turva{color:rgb(23, 28, 58);border-bottom-color:rgb(222, 224, 228)}.duet-notification.duet-notification-highlight{font-weight:600}.duet-notification.duet-notification-highlight.duet-theme-turva{background:rgb(245, 247, 250)}@media (min-width: 62em){.duet-notification:hover{background:rgb(240, 247, 250)}.duet-notification:hover.duet-theme-turva{background:rgb(245, 247, 250)}}.duet-notification a{text-decoration:none}.duet-notification a:focus{outline:0}:host(.user-is-tabbing) .duet-notification:focus-within{z-index:1;box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3), 0 0 0 1px #0077b3}:host(.user-is-tabbing) .duet-notification:focus-within.duet-theme-turva{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}.duet-notification-container{position:relative;display:flex;padding-bottom:16px;border-bottom:1px solid rgb(212, 223, 229)}.duet-notification-badge-container{position:relative;width:16px}.duet-notification-badge{position:absolute;top:6px;left:-2px;width:8px;height:8px;background:rgb(0, 119, 179);border-radius:50%}.duet-theme-turva .duet-notification-badge{background:rgb(198, 12, 48)}.duet-notification-content{flex:1}.duet-notification-date{position:absolute;top:2px;right:0;width:96px;font-size:0.75rem;font-weight:600;line-height:1.25;color:rgb(8, 42, 77);text-align:right;text-transform:uppercase;opacity:0.7}@media (max-width: 35.9375em){.duet-notification-date{width:auto}}.duet-theme-turva .duet-notification-date{color:rgb(113, 118, 132)}@media (min-width: 62em){:host(:not([highlight])) ::slotted(duet-heading),:host(:not([highlight])) ::slotted(duet-paragraph){opacity:1}.duet-notification{padding:16px;border-bottom:1px solid rgb(212, 223, 229)}.duet-notification:hover{background:rgb(228, 241, 247)}.duet-notification.duet-notification-highlight{font-weight:600;background:rgb(240, 247, 250)}.duet-notification-container{padding-bottom:0;border-bottom-style:none}}::slotted(duet-heading){padding-right:80px !important}::slotted(duet-paragraph){margin-bottom:2px !important}";const h=class{constructor(e){t(this,e),this.handleKeyDown=t=>{this.isOpen&&27===t.keyCode&&this.close()},this.toggleMenu=t=>{t.stopPropagation(),this.isOpen?this.close():this.open()},this.updateNotificationState=()=>{this.hasNotifications=this.element.children.length>0},this.isOpen=!1,this.hasNotifications=void 0,this.icon="",this.label="Label",this.language=d(),this.accessibleLabelNotificationsDefaults={en:"No notifications",fi:"Ei ilmoituksia",sv:"Inga notifikationer"},this.accessibleLabelNotifications=n(this.accessibleLabelNotificationsDefaults),this.badge=!1,this.theme="",this.direction="left"}componentWillLoad(){a(this),this.updateNotificationState()}connectedCallback(){this.observer=new MutationObserver(this.updateNotificationState),this.observer.observe(this.element,{childList:!0}),o(this)}disconnectedCallback(){this.observer.disconnect(),this.observer=null,r(this)}handleClickFocusOutside(t){this.isOpen&&!this.element.contains(t.target)&&this.close(!1)}async setFocus(t){this.drawerButtonEl.focus(t)}async open(){const t=this.element.closest("duet-header");t&&t.closeMenus(),this.isOpen=!0,this.drawerContentEl.scrollTop=0}async close(t=!0){this.isOpen=!1,t&&this.setFocus({preventScroll:!0})}render(){return e("div",{key:"52951b68e698b9c831642c1c135dfcb53a48a40c",class:{"duet-drawer":!0,"duet-theme-turva":"turva"===this.theme},onKeyDown:this.handleKeyDown},e("button",{key:"e713e9ace0ffc56428e71ca55c37a360971cbe15",ref:t=>this.drawerButtonEl=t,type:"button",class:"duet-drawer-toggle",id:"duet-drawer-toggle","aria-controls":"duet-drawer-content","aria-expanded":this.isOpen?"true":"false",onClick:this.toggleMenu},this.icon&&e("div",{key:"a4c21f480f37e714d9c62d75bf787ba7216fb381",class:"duet-drawer-icon"},e("duet-icon",{key:"e95aeefaa6b5323e37f0852fe9e5fd4b6f5f8233",margin:"none",size:"x-small",name:this.icon,color:"currentColor"}),this.badge&&e("div",{key:"9944b7bc548e2d8b9c753cbc5e2ee9e60817bdb9",class:"duet-drawer-badge"})),e("span",{key:"cb880634e09f12b30bf67452ac7563ac80b6fcc0",class:"duet-drawer-label"},this.label),e("div",{key:"6416fe4067667f4b7b9977d824ff5570ae86def0",class:"duet-drawer-caret"},e("duet-icon",{key:"6e3e61d447a93c57946cde7067668047a5e6506a",margin:"none",size:"auto",icon:l.svg,color:"currentColor"}))),e("div",{key:"982db8ff68314474dd59f68b9caa66c57634d5ac",id:"duet-drawer-content",class:{"duet-drawer-content":!0,"duet-drawer-right":"right"===this.direction,"duet-drawer-left":"left"===this.direction,"duet-drawer-open":this.isOpen},ref:t=>this.drawerContentEl=t},this.hasNotifications?e("div",{role:"list"},e("slot",null)):e("duet-empty-state",{size:"small"},e("duet-paragraph",{size:"small",margin:"none"},this.accessibleLabelNotifications))))}get element(){return i(this)}};h.style='*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;display:block;width:100%}.duet-drawer{position:relative}@media (min-width: 62em){.duet-drawer{display:inline-block}}.duet-drawer-toggle{position:relative;display:flex;align-items:center;width:100%;height:48px;padding:0 20px;overflow:hidden;font-family:"localtapiola-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";font-size:1rem;font-weight:400;font-variant-numeric:tabular-nums;line-height:48px;color:rgb(8, 42, 77);text-align:left;text-decoration:none;text-overflow:ellipsis;white-space:nowrap;cursor:pointer;background-color:rgb(255, 255, 255);border-bottom:1px solid rgb(212, 223, 229);border-radius:0;-webkit-appearance:none;appearance:none}@media (min-width: 62em){.duet-drawer-toggle{z-index:200;width:auto;max-width:200px;padding:0 30px 0 12px;overflow:hidden;font-size:0.875rem;line-height:4rem;border:0;border-radius:4px;transition:border 300ms ease}}.duet-theme-turva .duet-drawer-toggle{font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";color:rgb(23, 28, 58);background-color:rgb(255, 255, 255);border-color:rgb(222, 224, 228)}.duet-drawer-toggle:active{opacity:0.75}.duet-drawer-toggle:focus{outline:0}:host(.user-is-tabbing) .duet-drawer-toggle:focus{box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3), 0 0 0 1px #0077b3}:host(.user-is-tabbing) .duet-theme-turva .duet-drawer-toggle:focus{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}.duet-drawer-toggle:hover{color:rgb(0, 75, 129)}.duet-theme-turva .duet-drawer-toggle:hover{color:rgb(113, 118, 132)}.duet-drawer-toggle::after{display:none !important}@media (min-width: 62em){.duet-drawer-toggle::after{position:absolute;top:auto;bottom:0;left:0;display:block !important;width:100%;height:3px;content:"";background:rgb(0, 119, 179);transition:300ms ease;transform:translateY(3px)}.duet-theme-turva .duet-drawer-toggle::after{background:rgb(198, 12, 48)}}.duet-drawer-toggle[aria-expanded=true],.duet-drawer-toggle[aria-expanded=true]:hover{color:rgb(0, 75, 129);border-bottom:1px solid rgb(245, 248, 250);border-radius:0}.duet-theme-turva .duet-drawer-toggle[aria-expanded=true],.duet-theme-turva .duet-drawer-toggle[aria-expanded=true]:hover{color:rgb(113, 118, 132);border-color:rgb(245, 247, 250)}@media (min-width: 62em){.duet-drawer-toggle[aria-expanded=true],.duet-drawer-toggle[aria-expanded=true]:hover{border:0}.duet-drawer-toggle[aria-expanded=true]::after,.duet-drawer-toggle[aria-expanded=true]:hover::after{left:0;width:100%;transform:translateY(0)}}.duet-drawer-icon{position:relative;display:inline-flex;min-width:12px;margin-right:12px;font-size:0;line-height:normal;vertical-align:baseline}@media (min-width: 62em){.duet-drawer-icon{margin-right:8px}}.duet-drawer-label{line-height:1}.duet-drawer-caret{position:absolute;top:50%;right:20px;display:flex;width:10px;height:10px;margin-left:8px;line-height:normal;pointer-events:none;transition:300ms ease;transform:translateY(-50%);transform-origin:50% 50%}@media (min-width: 62em){.duet-drawer-caret{right:16px;width:7px;height:7px}}.duet-drawer-caret duet-icon{width:10px}.duet-drawer-toggle[aria-expanded=true] .duet-drawer-caret{transform:translateY(-50%) rotate(180deg)}.duet-drawer-badge{position:absolute;top:0;right:0;display:inline-block;width:6px;height:6px;background:rgb(247, 178, 40);border-radius:50%;box-shadow:0 0 0 1px #c18b1f}.duet-theme-turva .duet-drawer-badge{background:rgb(247, 178, 40)}.duet-drawer-content{display:none;background-color:rgb(255, 255, 255);border-bottom:1px solid rgb(212, 223, 229)}.duet-drawer-content:focus{outline:0}.duet-theme-turva .duet-drawer-content{background-color:rgb(255, 255, 255);border-color:rgb(212, 223, 229)}@media (min-width: 62em){.duet-drawer-content{position:absolute;top:100%;z-index:600;display:block;width:450px;max-height:420px;padding-left:0;overflow-y:auto;visibility:hidden;background-color:rgb(255, 255, 255);border:1px solid rgb(212, 223, 229);border-radius:4px;border-top-left-radius:0;border-top-right-radius:0;box-shadow:0 4px 10px 0 rgba(0, 41, 77, 0.15);opacity:0;transition:300ms ease;transform:scale(0.95) translateZ(0) translateY(-10px);transform-origin:50% 0}.duet-theme-turva .duet-drawer-content{background-color:rgb(255, 255, 255)}.duet-drawer-content.duet-drawer-left{right:0}.duet-drawer-content.duet-drawer-right{left:0}}.duet-drawer-content.duet-drawer-open{display:block}@media (min-width: 62em){.duet-drawer-content.duet-drawer-open{visibility:visible;opacity:1;transform:scale(1) translateZ(0) translateY(0)}}';export{b as duet_notification,h as duet_notification_drawer}
4
+ import{r as t,h as e,g as i}from"./p-56df20b9.js";import{i as a}from"./p-aaa7a7bd.js";import{s as o,u as r}from"./p-a45e3f8b.js";import{a as d,g as n,c as s,d as c}from"./p-97a065d3.js";import{a as l}from"./p-115c79b6.js";import"./p-9c3c64b9.js";const b=class{constructor(e){t(this,e),this.language=d(),this.accessibleLabelUnreadDefaults={en:"Unread",fi:"Lukematon",sv:"Oläst"},this.accessibleLabelUnread=n(this.accessibleLabelUnreadDefaults,this.language),this.url="#",this.date="",this.highlight=!1,this.external=!1,this.theme=""}componentWillLoad(){a(this)}connectedCallback(){s(this,{prop:"accessibleLabelUnread",defaults:"accessibleLabelUnreadDefaults"}),o(this)}disconnectedCallback(){c(this),r(this)}async setFocus(t){this.linkElement.focus(t)}render(){return e("div",{key:"50b14b431dd3fa0271fed4ad88b3844db5d470c2",role:"listitem",class:{"duet-notification":!0,"duet-notification-highlight":this.highlight,"duet-theme-turva":"turva"===this.theme}},e("a",{key:"69d83dd84ef5cb3e5cadc59ef13262ba5a2403b5",ref:t=>this.linkElement=t,href:this.url,target:this.external?"_blank":"_self"},e("div",{key:"c84b368567d5c30a73d072a857d09546762d4e3b",class:"duet-notification-container"},e("div",{key:"b643d6050a37393d3014f04d1255b39a1db22be7",class:"duet-notification-badge-container"},this.highlight&&e("div",{key:"f2ffc87634082ee3ca83962e5be69f8521a8ca8a",class:"duet-notification-badge"},e("duet-visually-hidden",{key:"150e736d8b12304b0a2bf4341462b861f7e1dfdb"},this.accessibleLabelUnread,":"))),e("div",{key:"17934b56fbc1d360d9caf028b545edb6a8fe06e3",class:"duet-notification-content"},e("slot",{key:"3546c2b5e14a00d7b254f59985315a13d79bcc4f"})),e("div",{key:"ac03337c739922c3db5c1e8b63593f92edba315d",class:"duet-notification-date"},this.date))))}get element(){return i(this)}};b.style="*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;display:block;width:100%}:host(:not([highlight])) ::slotted(duet-heading),:host(:not([highlight])) ::slotted(duet-paragraph){opacity:0.7}.duet-notification{display:block;padding:16px;padding-bottom:0;cursor:pointer}:host(:first-of-type) .duet-notification{border-top-left-radius:8px;border-top-right-radius:8px}:host(:last-of-type) .duet-notification{border-bottom:0;border-bottom-right-radius:8px;border-bottom-left-radius:8px}.duet-notification.duet-theme-turva{color:rgb(23, 28, 58);border-bottom-color:rgb(222, 224, 228)}.duet-notification.duet-notification-highlight{font-weight:600}.duet-notification.duet-notification-highlight.duet-theme-turva{background:rgb(245, 247, 250)}@media (min-width: 62em){.duet-notification:hover{background:rgb(240, 247, 250)}.duet-notification:hover.duet-theme-turva{background:rgb(245, 247, 250)}}.duet-notification a{text-decoration:none}.duet-notification a:focus{outline:0}:host(.user-is-tabbing) .duet-notification:focus-within{z-index:1;box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3), 0 0 0 1px #0077b3}:host(.user-is-tabbing) .duet-notification:focus-within.duet-theme-turva{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}.duet-notification-container{position:relative;display:flex;padding-bottom:16px;border-bottom:1px solid rgb(212, 223, 229)}.duet-notification-badge-container{position:relative;width:16px}.duet-notification-badge{position:absolute;top:6px;left:-2px;width:8px;height:8px;background:rgb(0, 119, 179);border-radius:50%}.duet-theme-turva .duet-notification-badge{background:rgb(198, 12, 48)}.duet-notification-content{flex:1}.duet-notification-date{position:absolute;top:2px;right:0;width:96px;font-size:0.75rem;font-weight:600;line-height:1.25;color:rgb(8, 42, 77);text-align:right;text-transform:uppercase;opacity:0.7}@media (max-width: 35.9375em){.duet-notification-date{width:auto}}.duet-theme-turva .duet-notification-date{color:rgb(113, 118, 132)}@media (min-width: 62em){:host(:not([highlight])) ::slotted(duet-heading),:host(:not([highlight])) ::slotted(duet-paragraph){opacity:1}.duet-notification{padding:16px;border-bottom:1px solid rgb(212, 223, 229)}.duet-notification:hover{background:rgb(228, 241, 247)}.duet-notification.duet-notification-highlight{font-weight:600;background:rgb(240, 247, 250)}.duet-notification-container{padding-bottom:0;border-bottom-style:none}}::slotted(duet-heading){padding-right:80px !important}::slotted(duet-paragraph){margin-bottom:2px !important}";const h=class{constructor(e){t(this,e),this.handleKeyDown=t=>{this.isOpen&&27===t.keyCode&&this.close()},this.toggleMenu=t=>{t.stopPropagation(),this.isOpen?this.close():this.open()},this.updateNotificationState=()=>{this.hasNotifications=this.element.children.length>0},this.isOpen=!1,this.hasNotifications=void 0,this.icon="",this.label="Label",this.language=d(),this.accessibleLabelNotificationsDefaults={en:"No notifications",fi:"Ei ilmoituksia",sv:"Inga notifikationer"},this.accessibleLabelNotifications=n(this.accessibleLabelNotificationsDefaults),this.badge=!1,this.theme="",this.direction="left"}componentWillLoad(){a(this),this.updateNotificationState()}connectedCallback(){this.observer=new MutationObserver(this.updateNotificationState),this.observer.observe(this.element,{childList:!0}),o(this)}disconnectedCallback(){this.observer.disconnect(),this.observer=null,r(this)}handleClickFocusOutside(t){this.isOpen&&!this.element.contains(t.target)&&this.close(!1)}async setFocus(t){this.drawerButtonEl.focus(t)}async open(){const t=this.element.closest("duet-header");t&&t.closeMenus(),this.isOpen=!0,this.drawerContentEl.scrollTop=0}async close(t=!0){this.isOpen=!1,t&&this.setFocus({preventScroll:!0})}render(){return e("div",{key:"52951b68e698b9c831642c1c135dfcb53a48a40c",class:{"duet-drawer":!0,"duet-theme-turva":"turva"===this.theme},onKeyDown:this.handleKeyDown},e("button",{key:"e713e9ace0ffc56428e71ca55c37a360971cbe15",ref:t=>this.drawerButtonEl=t,type:"button",class:"duet-drawer-toggle",id:"duet-drawer-toggle","aria-controls":"duet-drawer-content","aria-expanded":this.isOpen?"true":"false",onClick:this.toggleMenu},this.icon&&e("div",{key:"a4c21f480f37e714d9c62d75bf787ba7216fb381",class:"duet-drawer-icon"},e("duet-icon",{key:"e95aeefaa6b5323e37f0852fe9e5fd4b6f5f8233",margin:"none",size:"x-small",name:this.icon,color:"currentColor"}),this.badge&&e("div",{key:"9944b7bc548e2d8b9c753cbc5e2ee9e60817bdb9",class:"duet-drawer-badge"})),e("span",{key:"cb880634e09f12b30bf67452ac7563ac80b6fcc0",class:"duet-drawer-label"},this.label),e("div",{key:"6416fe4067667f4b7b9977d824ff5570ae86def0",class:"duet-drawer-caret"},e("duet-icon",{key:"6e3e61d447a93c57946cde7067668047a5e6506a",margin:"none",size:"auto",icon:l.svg,color:"currentColor"}))),e("div",{key:"982db8ff68314474dd59f68b9caa66c57634d5ac",id:"duet-drawer-content",class:{"duet-drawer-content":!0,"duet-drawer-right":"right"===this.direction,"duet-drawer-left":"left"===this.direction,"duet-drawer-open":this.isOpen},ref:t=>this.drawerContentEl=t},this.hasNotifications?e("div",{role:"list"},e("slot",null)):e("duet-empty-state",{size:"small"},e("duet-paragraph",{size:"small",margin:"none"},this.accessibleLabelNotifications))))}get element(){return i(this)}};h.style='*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;display:block;width:100%}.duet-drawer{position:relative}@media (min-width: 62em){.duet-drawer{display:inline-block}}.duet-drawer-toggle{position:relative;display:flex;align-items:center;width:100%;height:48px;padding:0 20px;overflow:hidden;font-family:"localtapiola-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";font-size:1rem;font-weight:400;font-variant-numeric:tabular-nums;line-height:48px;color:rgb(8, 42, 77);text-align:left;text-decoration:none;text-overflow:ellipsis;white-space:nowrap;cursor:pointer;background-color:rgb(255, 255, 255);border-bottom:1px solid rgb(212, 223, 229);border-radius:0;-webkit-appearance:none;appearance:none}@media (min-width: 62em){.duet-drawer-toggle{z-index:200;width:auto;max-width:200px;padding:0 30px 0 12px;overflow:hidden;font-size:0.875rem;line-height:4rem;border:0;border-radius:4px;transition:border 300ms ease}}.duet-theme-turva .duet-drawer-toggle{font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";color:rgb(23, 28, 58);background-color:rgb(255, 255, 255);border-color:rgb(222, 224, 228)}.duet-drawer-toggle:active{opacity:0.75}.duet-drawer-toggle:focus{outline:0}:host(.user-is-tabbing) .duet-drawer-toggle:focus{box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3), 0 0 0 1px #0077b3}:host(.user-is-tabbing) .duet-theme-turva .duet-drawer-toggle:focus{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}.duet-drawer-toggle:hover{color:rgb(0, 75, 129)}.duet-theme-turva .duet-drawer-toggle:hover{color:rgb(113, 118, 132)}.duet-drawer-toggle::after{display:none !important}@media (min-width: 62em){.duet-drawer-toggle::after{position:absolute;top:auto;bottom:0;left:0;display:block !important;width:100%;height:3px;content:"";background:rgb(0, 119, 179);transition:300ms ease;transform:translateY(3px)}.duet-theme-turva .duet-drawer-toggle::after{background:rgb(198, 12, 48)}}.duet-drawer-toggle[aria-expanded=true],.duet-drawer-toggle[aria-expanded=true]:hover{color:rgb(0, 75, 129);border-bottom:1px solid rgb(245, 248, 250);border-radius:0}.duet-theme-turva .duet-drawer-toggle[aria-expanded=true],.duet-theme-turva .duet-drawer-toggle[aria-expanded=true]:hover{color:rgb(113, 118, 132);border-color:rgb(245, 247, 250)}@media (min-width: 62em){.duet-drawer-toggle[aria-expanded=true],.duet-drawer-toggle[aria-expanded=true]:hover{border:0}.duet-drawer-toggle[aria-expanded=true]::after,.duet-drawer-toggle[aria-expanded=true]:hover::after{left:0;width:100%;transform:translateY(0)}}.duet-drawer-icon{position:relative;display:inline-flex;min-width:12px;margin-right:12px;font-size:0;line-height:normal;vertical-align:baseline}@media (min-width: 62em){.duet-drawer-icon{margin-right:8px}}.duet-drawer-label{line-height:1}.duet-drawer-caret{position:absolute;top:50%;right:20px;display:flex;width:10px;height:10px;margin-left:8px;line-height:normal;pointer-events:none;transition:300ms ease;transform:translateY(-50%);transform-origin:50% 50%}@media (min-width: 62em){.duet-drawer-caret{right:16px;width:7px;height:7px}}.duet-drawer-caret duet-icon{width:10px}.duet-drawer-toggle[aria-expanded=true] .duet-drawer-caret{transform:translateY(-50%) rotate(180deg)}.duet-drawer-badge{position:absolute;top:0;right:0;display:inline-block;width:6px;height:6px;background:rgb(247, 178, 40);border-radius:50%;box-shadow:0 0 0 1px #c18b1f}.duet-theme-turva .duet-drawer-badge{background:rgb(247, 178, 40)}.duet-drawer-content{display:none;background-color:rgb(255, 255, 255);border-bottom:1px solid rgb(212, 223, 229)}.duet-drawer-content:focus{outline:0}.duet-theme-turva .duet-drawer-content{background-color:rgb(255, 255, 255);border-color:rgb(212, 223, 229)}@media (min-width: 62em){.duet-drawer-content{position:absolute;top:100%;z-index:600;display:block;width:450px;max-height:420px;padding-left:0;overflow-y:auto;visibility:hidden;background-color:rgb(255, 255, 255);border:1px solid rgb(212, 223, 229);border-radius:4px;border-top-left-radius:0;border-top-right-radius:0;box-shadow:0 4px 10px 0 rgba(0, 41, 77, 0.15);opacity:0;transition:300ms ease;transform:scale(0.95) translateZ(0) translateY(-10px);transform-origin:50% 0}.duet-theme-turva .duet-drawer-content{background-color:rgb(255, 255, 255)}.duet-drawer-content.duet-drawer-left{right:0}.duet-drawer-content.duet-drawer-right{left:0}}.duet-drawer-content.duet-drawer-open{display:block}@media (min-width: 62em){.duet-drawer-content.duet-drawer-open{visibility:visible;opacity:1;transform:scale(1) translateZ(0) translateY(0)}}';export{b as duet_notification,h as duet_notification_drawer}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * Built with Duet Design System
3
3
  */
4
- import{h as t,r as e,c as i,H as a,g as s,F as d}from"./p-44b36dbf.js";import{i as l}from"./p-aaa7a7bd.js";import{f as o,d as n}from"./p-9e371678.js";import{i as r}from"./p-a45e3f8b.js";import{a as h,c as u,d as b,g as p,s as c}from"./p-744b8ee1.js";import{p as m,s as f}from"./p-1004af75.js";import{b as g,a as y}from"./p-10c530d1.js";import{c as v}from"./p-5e59e970.js";import{p as x}from"./p-9c3c64b9.js";import{g as k,a as w}from"./p-c3a69e37.js";const T=({data:e,groupId:i,alignment:a})=>{const s=`duet-editable-table duet-editable-table-content-${i}`;return"string"==typeof e?t("td",{innerHTML:e,class:s,part:`${i}content`,style:{verticalAlign:a}}):t("td",{class:s,part:`${i}content`,style:{verticalAlign:a}},e)},L=class{constructor(t){e(this,t),this.duetTableToggle=i(this,"duetTableToggle",7),this.duetMenuClick=i(this,"duetMenuClick",7),this.hasHeadSlotFirst=!1,this.hasHeadSlotLast=!1,this.hasFootSlot=!1,this.sortableDefaultLabel={fi:"Järjestä",en:"Click to sort",sv:"Klicka för att sortera"},this.actionColumnLabel={en:"Actions for rows",fi:"Toiminnot rivillä",sv:"Åtgärder för rader"},this.toggleColumn=(t,e)=>{e.preventDefault();const{sort_order:i,direction:a,index:s,key:d}=t;this.duetTableToggle.emit({sort_order:i,index:s,direction:a,key:d,component:"duet-editable-table",originalEvent:e})},this.handleKeyDown=(t,e)=>{r(e)&&this.toggleColumn(t,e)},this.language=h(),this.margin="auto",this.variation="striped",this.sticky=!1,this.stickyDistance="with-links",this.breakpoint="small",this.actions=void 0,this.columns=void 0,this.rows=void 0,this.sortable=!1,this.groupId="",this.theme="",this.accessibleRole=void 0,this.hideHeadVisually=!1}componentWillLoad(){l(this),this.hasHeadSlotFirst=!!this.element.querySelector("[slot='thead-first']"),this.hasHeadSlotLast=!!this.element.querySelector("[slot='thead-last']"),this.hasFootSlot=!!this.element.querySelector("[slot='tfoot']")}connectedCallback(){u(this)}disconnectedCallback(){b(this)}createLabel(e){const{sort_order:i,direction:a,index:s,label:d}=e,l=p(d);return this.sortable?t("span",{class:"duet-table-label","data-index":s},t("duet-button",{size:"small",icon:i&&1===a?"action-arrow-down-small":i&&-1===a?"action-arrow-up-small":"action-subtract-small","icon-size":"medium-small","accessible-label":this.sortableDefaultLabel[this.language],variation:"plain",margin:"none","icon-right":!0,onClick:t=>this.toggleColumn(e,t),onKeyDown:t=>this.handleKeyDown(e,t)},l)):l}getSortedColumns(){return[...this.columns].sort(o(["index"]))}getRowSortOrder(){return[...this.columns].sort(o(["sort_order"])).filter((t=>t.sort_order)).map((t=>-1===t.direction?`-${t.key}`:t.key))}renderTableHeader(){if(!this.columns)return;const e=this.getSortedColumns();return t("tr",{class:{"duet-table-action-header":!!this.actions}},e.map((e=>{if(!1!==e.display){const i=this.createLabel(e);return""!==i?t("th",{scope:"col"},i):t("td",null)}})),this.actions&&t("th",{scope:"col",class:"duet-table-action-header-heading"},this.actions&&t("duet-visually-hidden",null,this.actionColumnLabel[this.language])))}renderActions(e,i){if(this.actions)return t("td",{class:"duet-text-right"},this.actions.map((a=>t("duet-action-button",{actionMeta:Object.assign({},(null==e?void 0:e.meta)||{},{index:i}),actionId:(null==e?void 0:e.uid)||(null==e?void 0:e.id)||null,actionName:a.name,theme:this.theme,iconName:a.icon,iconColor:a.color,iconSize:a.size,background:a.background,"accessible-label":`${e.actionDescription||""} ${p(a.label)} `}))))}renderTableBody(){const e=this.getSortedColumns(),i=this.getRowSortOrder();return[...this.rows].sort(o(i)).map(((i,a)=>t("tr",{class:{"duet-table-action-row":!!this.actions,"duet-editable-table-row":!0,[`duet-editable-table-row-${this.groupId}`]:!0},"data-meta":JSON.stringify(i.meta)},e.map((e=>{if(!1!==e.display)return t(T,{data:i[e.key]?i[e.key]:i.item,groupId:this.groupId})})),this.actions&&this.renderActions(i,a))))}render(){return t(a,{class:{[`duet-editable-table-${this.variation}`]:!0,"duet-editable-table":!0,[`duet-editable-table-${this.theme}`]:!0,"duet-editable-table-scrollable":"none-scrollable"===this.breakpoint,"duet-editable-table-sortable":this.sortable,"duet-editable-table-actions":!!this.actions,"duet-m-0":"none"===this.margin,"duet-theme-turva":"turva"===this.theme}},t("duet-table",{class:"duet-editable-table-table",sticky:this.sticky,stickyDistance:this.stickyDistance,margin:this.margin,theme:this.theme,variation:this.variation,breakpoint:this.breakpoint,"hide-head-visually":this.hideHeadVisually},t("table",{role:this.accessibleRole},t("caption",null,t("slot",{name:"tcaption"})),t("thead",null,this.hasHeadSlotFirst&&t("tr",null,t("td",{class:"duet-editable-table-actions-menu",colSpan:99},t("slot",{name:"thead-first"}))),this.renderTableHeader(),this.hasHeadSlotLast&&t("tr",null,t("td",{class:"duet-editable-table-actions-menu",colSpan:99},t("slot",{name:"thead-last"})))),t("tbody",null,this.renderTableBody()),this.hasFootSlot&&t("tfoot",null,t("tr",null,t("td",{class:"duet-editable-table-footer-menu",colSpan:99},t("slot",{name:"tfoot"})))))))}get element(){return s(this)}};L.style=".sc-duet-editable-table-h{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.duet-editable-table-actions-menu.sc-duet-editable-table{position:relative;padding:0 !important;margin:0}.duet-editable-table-actions-menu-button.sc-duet-editable-table{position:relative;right:-16px;float:right;padding:0}.duet-editable-table-actions-menu-icon.sc-duet-editable-table .duet-icon.sc-duet-editable-table{max-width:16px;max-height:16px}.duet-editable-table-row.duet-table-action-row.sc-duet-editable-table .duet-text-right.sc-duet-editable-table{text-align:right}.duet-editable-table-header.sc-duet-editable-table tr.sc-duet-editable-table .duet-editable-table-header-hidden.sc-duet-editable-table{padding:0 !important;font-size:0;border-bottom:0}";const S={none:0,"with-links":16*parseFloat(m),"without-links":16*parseFloat(f)},E=class{constructor(t){e(this,t),this.headingSelector="thead tr > :not(*.duet-editable-table-actions-menu)",this.handleMediaQueryChange=t=>{this.matchesBreakpoint=g.includes(this.breakpoint)?!t.matches:t.matches},this.matchesBreakpoint=!0,this.language=h(),this.theme=void 0,this.margin="auto",this.variation="striped",this.sticky=!1,this.stickyDistance="with-links",this.breakpoint="small",this.hideHeadVisually=!1}watchLanguageStateHandler(t,e){t!==e&&setTimeout((()=>this.copyHeadingsToCells()),50)}connectedCallback(){this.mq=matchMedia("none"===this.breakpoint||"none-scrollable"===this.breakpoint?"all":y[this.breakpoint]),this.mq.addEventListener("change",n(this.handleMediaQueryChange,50)),this.handleMediaQueryChange(this.mq),this.observer=new MutationObserver((()=>n(this.copyHeadingsToCells(),50))),this.observer.observe(this.element,{childList:!0,subtree:!0})}componentWillLoad(){if(l(this),this.copyHeadingsToCells(),this.sticky&&"none-scrollable"===this.breakpoint&&console.warn('[DUET WARNING]: sticky and breakpoint="none-scrollable" are incompatible. Scrollable takes precedence'),this.sticky){const t=S[this.stickyDistance];this.element.querySelectorAll(this.headingSelector).forEach((e=>e.style.top=`${t}px`))}}componentDidLoad(){this.observer&&this.observer.takeRecords(),u(this)}disconnectedCallback(){this.observer.disconnect(),this.observer=null,this.mq.removeListener(this.handleMediaQueryChange),this.mq=null,this.matchesBreakpoint=!0,b(this)}copyHeadingsToCells(){const t=this.element.querySelectorAll(this.headingSelector),e=this.element.querySelectorAll("tbody tr"),i=Array.from(t).map((t=>t.textContent.trim()));e.forEach((t=>{t.querySelectorAll("td").forEach(((t,e)=>{if(i[e]){const a=t.querySelector(".duet-table-cell-heading");if(!a||a.textContent!==i[e]){null==a||a.remove();const s=document.createElement("span");s.textContent=i[e],s.classList.add("duet-table-cell-heading"),s.setAttribute("aria-hidden","true"),s.inert=!0,t.prepend(s)}}}))}))}render(){return t(a,{key:"27ca97cd0ab8838a914fad68c44307707b13c646",class:{[`duet-table-${this.variation}`]:!0,"duet-table-flattened":!this.matchesBreakpoint,"duet-table-sticky":this.matchesBreakpoint&&this.sticky,"duet-table-scrollable":"none-scrollable"===this.breakpoint,"duet-m-0":"none"===this.margin,"duet-theme-turva":"turva"===this.theme,"duet-table-hide-head-visually":this.hideHeadVisually}},t("slot",{key:"ef1fc8226a4cbf04cac71ba4e5a9968791806281"}))}get element(){return s(this)}static get watchers(){return{language:["watchLanguageStateHandler"]}}};E.style='duet-table{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;margin-bottom:20px !important;display:block;font-variant-numeric:tabular-nums}duet-table table,duet-table thead,duet-table tbody,duet-table tfoot,duet-table th,duet-table td,duet-table tr{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}duet-table.duet-m-0{margin:0 !important}duet-table table{width:100%;font-family:"localtapiola-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";font-size:1rem;text-align:left;border-spacing:0;border-collapse:separate}duet-table.duet-table-hide-head-visually.duet-table-hide-head-visually thead,duet-table.duet-table-hide-head-visually.duet-table-hide-head-visually thead *{position:absolute !important;top:0;width:1px !important;height:1px !important;padding:0 !important;overflow:hidden !important;clip:rect(1px, 1px, 1px, 1px) !important;border:0 !important}duet-table.duet-theme-turva table{font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"}duet-table td{-webkit-hyphens:auto;hyphens:auto;color:rgb(8, 42, 77)}duet-table.duet-theme-turva td{color:rgb(23, 28, 58)}duet-table th{font-weight:600;line-height:1.25;color:rgb(98, 121, 138);text-align:left}duet-table.duet-theme-turva th{color:rgb(143, 147, 158)}duet-table tbody th{font-weight:600;color:rgb(8, 42, 77)}duet-table.duet-theme-turva tbody th{color:rgb(23, 28, 58)}duet-table .duet-table-action-row td:last-child{justify-self:end;padding-right:20px !important;white-space:nowrap}duet-table span.duet-table-cell-heading{display:none}.duet-table-flattened table,.duet-table-flattened thead,.duet-table-flattened tbody,.duet-table-flattened tfoot,.duet-table-flattened th,.duet-table-flattened td,.duet-table-flattened tr{display:block}.duet-table-flattened thead tr{position:absolute !important;top:0;width:1px !important;height:1px !important;padding:0 !important;overflow:hidden !important;clip:rect(1px, 1px, 1px, 1px) !important;border:0 !important}.duet-table-flattened td{line-height:1.25}.duet-table-flattened td:not(:last-child){margin-bottom:16px !important}.duet-table-flattened td span.duet-table-cell-heading{margin-bottom:4px !important;display:block;font-size:1rem;font-weight:600;color:rgb(8, 42, 77)}.duet-table-flattened.duet-theme-turva td span.duet-table-cell-heading{color:rgb(23, 28, 58)}.duet-table-flattened tbody td,.duet-table-flattened tbody th,.duet-table-flattened tfoot td{padding:0 !important;text-align:left !important}.duet-table-flattened tbody th{font-weight:600;line-height:1.25;color:rgb(98, 121, 138);text-align:left}.duet-table-sticky thead th{position:sticky;top:0;background:rgb(255, 255, 255)}.duet-table-striped td,.duet-table-striped th{padding:20px !important}@media (max-width: 35.9375em){.duet-table-striped td,.duet-table-striped th{padding:20px 12px !important}}.duet-table-striped tbody th{background:rgb(255, 255, 255)}.duet-table-striped.duet-table-sticky thead th{border-bottom:1px solid rgb(212, 223, 229)}.duet-table-striped.duet-table-sticky.duet-theme-turva thead th{border-bottom-color:rgb(222, 224, 228)}.duet-table-striped tbody:not(:first-of-type) th{padding-top:40px !important}.duet-table-striped tbody:only-of-type tr:nth-of-type(odd){background:rgba(4, 81, 128, 0.04)}.duet-table-striped.duet-theme-turva tbody:only-of-type tr:nth-of-type(odd){background:rgba(23, 28, 58, 0.04)}.duet-table-striped tbody:not(:only-of-type) tr:nth-of-type(even){background:rgba(4, 81, 128, 0.04)}.duet-table-striped.duet-theme-turva tbody:not(:only-of-type) tr:nth-of-type(even){background:rgba(23, 28, 58, 0.04)}.duet-table-striped tfoot td{border-top:1px solid rgb(212, 223, 229)}.duet-table-striped.duet-theme-turva tfoot td{border-top-color:rgb(222, 224, 228)}.duet-table-striped.duet-table-flattened tbody:not(:first-of-type) th{padding-top:20px !important}.duet-table-striped.duet-table-flattened tr{padding:20px !important}.duet-table-striped.duet-table-flattened tfoot td{border-top:0}.duet-table-striped.duet-table-flattened tfoot tr{border-top:1px solid rgb(212, 223, 229)}.duet-table-striped.duet-table-flattened.duet-theme-turva tfoot tr{border-top-color:rgb(222, 224, 228)}.duet-table-fixed th,.duet-table-minimal th,.duet-table-plain th{padding:16px !important;border-bottom:1px solid rgb(98, 121, 138)}.duet-table-fixed th:first-child,.duet-table-minimal th:first-child,.duet-table-plain th:first-child{padding-left:0 !important}.duet-table-fixed th:last-child,.duet-table-minimal th:last-child,.duet-table-plain th:last-child{padding-right:0 !important}.duet-theme-turva.duet-table-fixed th,.duet-theme-turva.duet-table-minimal th,.duet-theme-turva.duet-table-plain th{border-bottom-color:rgb(113, 118, 132)}.duet-table-fixed tbody th,.duet-table-minimal tbody th,.duet-table-plain tbody th{padding-top:40px !important;border-bottom-color:rgb(212, 223, 229)}.duet-theme-turva.duet-table-fixed tbody th,.duet-theme-turva.duet-table-minimal tbody th,.duet-theme-turva.duet-table-plain tbody th{border-bottom-color:rgb(222, 224, 228)}.duet-table-fixed td,.duet-table-minimal td,.duet-table-plain td{padding:16px !important}.duet-table-fixed td:first-child,.duet-table-minimal td:first-child,.duet-table-plain td:first-child{padding-left:0 !important}.duet-table-fixed td:last-child,.duet-table-minimal td:last-child,.duet-table-plain td:last-child{padding-right:0 !important}.duet-table-fixed tbody td,.duet-table-minimal tbody td,.duet-table-plain tbody td{border-bottom:1px solid rgb(212, 223, 229)}.duet-theme-turva.duet-table-fixed tbody td,.duet-theme-turva.duet-table-minimal tbody td,.duet-theme-turva.duet-table-plain tbody td{border-bottom-color:rgb(222, 224, 228)}.duet-table-flattened.duet-table-fixed tbody:first-of-type th,.duet-table-flattened.duet-table-minimal tbody:first-of-type th,.duet-table-flattened.duet-table-plain tbody:first-of-type th{padding-top:0 !important}.duet-table-flattened.duet-table-fixed td,.duet-table-flattened.duet-table-minimal td,.duet-table-flattened.duet-table-plain td,.duet-table-flattened.duet-table-fixed tbody th,.duet-table-flattened.duet-table-minimal tbody th,.duet-table-flattened.duet-table-plain tbody th{border-bottom:0}.duet-table-flattened.duet-table-fixed tr,.duet-table-flattened.duet-table-minimal tr,.duet-table-flattened.duet-table-plain tr{padding:20px 0 !important}.duet-table-flattened.duet-table-fixed tbody th,.duet-table-flattened.duet-table-minimal tbody th,.duet-table-flattened.duet-table-plain tbody th{padding-top:20px !important}.duet-table-flattened.duet-table-fixed tfoot td,.duet-table-flattened.duet-table-minimal tfoot td,.duet-table-flattened.duet-table-plain tfoot td{margin-bottom:4px !important}.duet-table-flattened.duet-table-fixed tbody:not(:only-of-type) tr:first-child,.duet-table-flattened.duet-table-minimal tbody:not(:only-of-type) tr:first-child,.duet-table-flattened.duet-table-plain tbody:not(:only-of-type) tr:first-child{border-bottom:0}.duet-table-plain.duet-table-flattened tbody tr{border-bottom:1px solid rgb(212, 223, 229)}.duet-table-plain.duet-table-flattened.duet-theme-turva tbody tr{border-bottom-color:rgb(222, 224, 228)}.duet-table-minimal tbody tr,.duet-table-minimal tbody tr td{vertical-align:top;border-bottom:0 none}.duet-table-minimal tbody tr:last-of-type,.duet-table-minimal tbody tr:last-of-type td{border-bottom:1px solid rgb(212, 223, 229)}.duet-table-minimal.duet-table-flattened tbody tr,.duet-table-minimal.duet-table-flattened tbody tr td{border-bottom:0 none}.duet-table-minimal.duet-table-flattened tbody tr td[data-heading]::before{display:none}.duet-table-minimal.duet-table-flattened tfoot{border-top:1px solid rgb(212, 223, 229)}.duet-table-minimal.duet-table-flattened.duet-theme-turva tfoot{border-top-color:rgb(222, 224, 228)}.duet-table-fixed table{table-layout:fixed}.duet-table-fixed tbody tr,.duet-table-fixed tbody tr td,.duet-table-fixed tbody tr td:first-child{padding:4px !important;vertical-align:text-bottom;border-bottom:0 none}.duet-table-fixed thead{display:none}.duet-table-fixed tbody tr,.duet-table-fixed tbody tr td{border-bottom:0 none}.duet-table-fixed:not(.duet-table-flattened) tfoot{border-top:1px solid rgb(212, 223, 229)}.duet-table-fixed:not(.duet-table-flattened).duet-theme-turva tfoot{border-top-color:rgb(222, 224, 228)}.duet-table-scrollable{position:relative;width:100%;overflow-x:auto;background:linear-gradient(90deg, #fff 0%, rgba(255, 255, 255, 0)), linear-gradient(-90deg, #fff 0%, rgba(255, 255, 255, 0)) 100% 0, radial-gradient(farthest-side at 0% 50%, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0)), radial-gradient(farthest-side at 100% 50%, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0)) 100% 0%;background-repeat:no-repeat;background-attachment:local, local, scroll, scroll;background-size:100px 100%, 100px 100%, 12px 100%, 12px 100%}.duet-table-selected-column{background:rgba(0, 119, 179, 0.08)}.duet-theme-turva .duet-table-selected-column{background:rgba(113, 118, 132, 0.08)}.duet-table-sortable tbody tr td:first-child,.duet-table-sortable thead tr th:first-child{padding:20px}.duet-table-sortable:not(.duet-table-flattened) tfoot{border-top:1px solid rgb(212, 223, 229)}.duet-table-sortable:not(.duet-table-flattened).duet-theme-turva tfoot{border-top-color:rgb(222, 224, 228)}.duet-table-actions table{table-layout:auto}.duet-table-actions thead th:last-child{width:1px;white-space:nowrap}.duet-editable-table-table.duet-table-flattened tr{display:grid;grid-template-columns:repeat(2, 1fr);grid-auto-rows:auto;gap:10px}.duet-editable-table-table.duet-table-flattened tr.duet-table-action-row td:last-child::before{padding:0;content:""}.duet-editable-table-table.duet-table-flattened td{grid-column:1/2}.duet-editable-table-table.duet-table-flattened td:first-child{grid-row:1;grid-column:1}.duet-editable-table-table.duet-table-flattened td:last-child{grid-row:1;grid-column:2}';const j=[{type:"default",system_message:"unknown error",message:{fi:"Tapahtui tuntematon virhe, ole hyvä ja yritä uudelleen.",sv:"Ett okänt fel uppstod, försök igen.",en:"An unknown error occured, please try again."}},{type:"400",system_message:"Bad Request: The server could not understand the request due to invalid syntax.",message:{fi:"Tiedostoa ei hyväksytty.",sv:"Servern avvisade din fil.",en:"The server rejected your file."}},{type:"401",system_message:"Not Authenticated: The client must authenticate itself to get the requested response...",message:{fi:"Vain kirjautunut käyttäjä voi lähettää tiedostoja.",sv:"Du måste vara inloggad för att ladda upp filer.",en:"You need to be logged in to upload files."}},{type:"403",system_message:"No Access: The client does not have access rights to the content.",message:{fi:"Ei oikeuksia lähettää tiedostoja.",sv:"Du har inte rätt åtkomsträttigheter för att ladda upp filer.",en:"You do not have the correct access rights to upload files."}},{type:"413",system_message:"Payload too large",message:{fi:"Tiedosto oli liian vastaanotettavaksi.",sv:"Filen var för stor för servern att hantera.",en:"The file was to large for the server to handle."}},{type:"415",system_message:"Unsupported media type",message:{fi:"Tiedoston tyyppi oli väärä.",sv:"Servern avvisade filen eftersom den hade fel typ.",en:"The server rejected the file because it had the wrong type."}},{type:"429",system_message:"Too many request from same address",message:{fi:"Liian monta yritystä, ole hyvä ja yritä myöhemmin uudelleen.",sv:"Servern har fått många förfrågningar från dig, försök igen senare.",en:"The server has received to many request from you, please try again later."}},{type:"500",system_message:"Internal Server Error",message:{fi:"Palvelin ilmoitti tuntemattomasta virheestä ja lataus epäonnistui.",sv:"Servern rapporterade ett okänt fel och uppladdningen misslyckades.",en:"The server reported an unknown error and the upload failed."}},{type:"duet-upload-100",system_message:"File extension not allowed",message:{fi:"Tiedoston tyyppi ei ole sallittu.",sv:"Du kan inte ladda upp filer av den type.",en:"You cannot upload files with that extension."}},{type:"duet-upload-001",system_message:"File transfer failed",message:{fi:"Tiedoston lähetys keskeytyi, ole hyvä ja yritä uudelleen.",sv:"Din anslutning till servern avbröts, försök igen.",en:"Your connection to the server was interrupted, try again."}},{type:"duet-upload-101",system_message:"File mimetype not allowed",message:{fi:"Tiedoston tyyppi ei ole sallittu.",sv:"Du kan inte ladda upp filer av den typ.",en:"You cannot upload files of that type."}},{type:"duet-upload-201",system_message:"File is too large",message:{fi:"Tiedosto on liian iso.",sv:"Filen är större än tillåtet.",en:"The file is larger than permitted."}},{type:"duet-upload-202",system_message:"The combined size of all files is too large",message:{fi:"Tiedostojen yhteenlaskettu koko on liian iso.",sv:"Du har nått den maximala kombinerade filstorleken.",en:"You have reached the maximum combined filesize."}},{type:"duet-upload-203",system_message:"Files to upload exceed total byte size limit",message:{fi:"Yritit lisätä tiedostoja, jotka ylittäisivät suurimman sallitun yhteenlasketun koon.",sv:"Du försökte lägga till filer som skulle överskrida den maximala kombinerade storleken.",en:"You tried to add files that would exceed the maximum combined size."}},{type:"duet-upload-301",system_message:"The maximum file limit has been reached",message:{fi:"Liitteiden maksimimäärä saavutettu.",sv:"Maximalt antal bilagor har uppnåtts.",en:"Maximum number of attachments reached."}},{type:"duet-upload-302",system_message:"Files to upload exceeds limits",message:{fi:"Et voi lähettää enempää kuin enimmäismäärän liitteitä.",sv:"Du kan inte ladda upp fler än det maximala antalet bilagor.",en:"You can't upload more than maximum number of attachments."}}],$={fi:"Liiteluettelo",sv:"Lista över bilagor",en:"Attachments list"},M=({label:e,categoryLabel:i})=>t("div",{class:"items-header",tabindex:"-1","aria-label":p($)},i&&t("duet-heading",{class:"category-header",border:"solid",color:"gray-darker",level:"h3","visual-level":"h6",weight:"semibold",margin:"none","aria-hidden":"true"},p(i)),t("duet-heading",{class:{"filename-header":!0,"no-category":!i},border:"solid",color:"gray-darker",level:"h3","visual-level":"h6",weight:"semibold",margin:"none","aria-hidden":"true"},p(e))),z=(t,e,i)=>{const{allowedMimetypes:a,allowedExtensions:s,maxBytes:d}=e;let l=!1,o=k("default",i);if(t){const{name:e,type:n,size:r}=t,h=((t,e)=>{if(!e||!t)return!0;const i=e.split(",");let a=!1;return i.forEach((e=>{const i=e.split("/"),s=t.split("/");i[0]!==s[0]||i[1]!==s[1]&&"*"!==i[1]||(a=!0)})),a})(n,a),u="all"===s||""===s||" "===s||void 0===s||((t,e)=>{if(!e)return!0;const i=t.split(".");return e.split(",").includes(i[i.length-1])})(e.toLowerCase(),s),b=((t,e)=>!e||!t||e>=t)(r,d);h||(o=k("duet-upload-101",i)),u||(o=k("duet-upload-100",i)),b||(o=k("duet-upload-201",i)),l=h&&u&&b}else l=!1;return{valid:l,errorMessage:l?void 0:p(o.message),errorSystem:l?void 0:o.system_message,errorType:l?void 0:o.type}},F=({payload:t,options:e,onFailure:i,onSuccess:a,onProgress:s})=>{const{type:d="POST",xhr:l,uri:o,argument:n=null,headers:r=null}=e;l.open(d,`${o}${n||""}`,!0);const{data:h,name:u}=t;return r&&Object.keys(r).forEach((t=>{l.setRequestHeader(t,r[t])})),"POST"===d&&(l.onreadystatechange=()=>{l.readyState===XMLHttpRequest.DONE&&l.status>=200&&l.status<300&&a(l,u,l.status),l.readyState===XMLHttpRequest.DONE&&l.status>=300&&l.status<999&&i(l,u,l.status)},s(u)),l.send(h),l},C=class{constructor(a){e(this,a),this.duetChange=i(this,"duetChange",3),this.duetBlur=i(this,"duetBlur",7),this.duetFocus=i(this,"duetFocus",7),this.duetReady=i(this,"duetReady",7),this.duetDone=i(this,"duetDone",3),this.duetState=i(this,"duetState",3),this.duetDelete=i(this,"duetDelete",3),this.duetCancel=i(this,"duetCancel",3),this.duetProgress=i(this,"duetProgress",3),this.duetUpload=i(this,"duetUpload",3),this.linkClick=i(this,"linkClick",3),this.buttonId=v("DuetButton"),this.labelId=v("DuetLabel"),this.uploadId=v("DuetUpload"),this.filesInProgress=new Map,this.fileMaxReached=!1,this.bytesMaxReached=!1,this.filesToUploadExceedsLimit=!1,this.filesToUploadTotalSizeIsAboveMax=!1,this.internalStatusMessageLabel=void 0,this.itemRefs=new Map,this.DefaultGroups={inprogress:"inprogress",success:"success",pending:"pending",failure:"failure"},this.kick=n((()=>{this.tick=Date.now()}),30),this.categoryLabel={en:"Category",sv:"Filtyp",fi:"Tiedostotyyppi"},this.listenForActionEvents=()=>{this.element.addEventListener("duetActionEvent",(t=>{const e=t.detail,{action:i,id:a,originalEvent:s}=e;switch(i){case"delete":this.onDelete(a,s);break;case"cancel":this.onCancel(a,s)}}))},this.verifyValidity=()=>{const{invalid:t,valid:e}=this.getFilesAsArray(),i=this.valid;this.valid=0===t.length&&0!==e.length,this.valid!==i&&this.duetState.emit({originalEvent:void 0,data:{valid:this.valid,from:"componentWillRender"},component:"duet-upload"})},this.getGroupFromItemData=t=>t.valid&&100===t.progress?this.DefaultGroups.success:t.progress>0&&100!==t.progress?this.DefaultGroups.inprogress:t.valid?t.pending?this.DefaultGroups.pending:t.group?t.group:"none":this.DefaultGroups.failure,this.mapFilesToUploadItems=(e,i,a,s)=>i===this.DefaultGroups.success?t("duet-upload-item",{theme:this.theme,actions:this.getActions(i,s),type:"success",data:e,showLinks:this.showLinks,linkClickEvent:this.emitEvent?this.linkClick:void 0,categoryLabel:this.categoryLabel,label:this.uploadedItemsHeaderLabel,showCategory:a,buttonTitles:this.processedButtonTitles,ref:t=>{this.itemRefs.set(e.uid,t)}}):i===this.DefaultGroups.inprogress?t("duet-upload-item",{theme:this.theme,actions:this.getActions(i,s),type:"inprogress",data:e,showLinks:this.showLinks,categoryLabel:this.categoryLabel,label:this.uploadedItemsHeaderLabel,showCategory:a,buttonTitles:this.processedButtonTitles,ref:t=>{this.itemRefs.set(e.uid,t)}}):i===this.DefaultGroups.pending?t("duet-upload-item",{theme:this.theme,actions:this.getActions(i,s),type:"pending",data:e,showLinks:this.showLinks,categoryLabel:this.categoryLabel,label:this.uploadedItemsHeaderLabel,showCategory:a,buttonTitles:this.processedButtonTitles,ref:t=>{this.itemRefs.set(e.uid,t)}}):i===this.DefaultGroups.failure?t("duet-upload-item",{theme:this.theme,actions:this.getActions(i,s),type:"failure",data:e,showLinks:this.showLinks,errorCodes:this.errorCodes,categoryLabel:this.categoryLabel,label:this.uploadedItemsHeaderLabel,showCategory:a,buttonTitles:this.processedButtonTitles,ref:t=>{this.itemRefs.set(e.uid,t)}}):e.group?e.html:"none",this.genHashName=()=>Date.now().toString(36)+Math.random(),this.updateValueInMap=(t,e,i,a=!0)=>{try{const a=this.files.get(t);a[e]=i,this.files.set(t,a),this.external&&"url"!==e&&this.trackProgress(t,"uploaded"===e)}catch(t){}a&&this.kick()},this.updateProgress=(t,e)=>{t.lengthComputable?(i=>{this.updateValueInMap(e,"progress",i),this.onProgress(e,i,t)})(t.loaded/t.total*100):console.log("cant read progress")},this.trackProgress=(t,e=!1)=>{e?this.filesInProgress.delete(t):this.filesInProgress.set(t,"inprogress"),0===this.filesInProgress.size&&this.onDone()},this.getFilesAsArray=()=>{const t=[],e=[];return this.files.forEach((i=>{i.valid&&!i.deleted?t.push(i):i.valid||i.deleted||e.push(i)})),{valid:t,invalid:e}},this.resetFormFields=()=>{this.nativeInput.value=""},this.startUpload=async(t,e)=>{const{bytesMaxReached:i,fileMaxReached:a}=this.validateTotals();i||a?this.kick():(this.metaData=e,this.nativeInput.click(),this.onUpload(t,e),t.stopPropagation(),t.preventDefault())},this.transferComplete=t=>{this.updateValueInMap(t,"progress",100,!1),this.trackProgress(t,!0)},this.transferDone=(t,e,i)=>{this.updateValueInMap(e,"status",i,!1),this.updateValueInMap(e,"uploaded",!0,!1);try{const i=JSON.parse(t.response);this.updateValueInMap(e,"url",i.url)}catch(t){this.updateValueInMap(e,"url",null),console.error("Server did not respond with expected response {url: string}")}},this.transferDoneWithFailure=(t,e,i)=>{try{const{error:i}=JSON.parse(t.response);this.updateValueInMap(e,"error",{message:i.message,type:i.type},!1)}catch(t){console.error("Server did not respond with expected response error:{message: string, type: int}"),this.updateValueInMap(e,"error",{type:i},!1)}this.updateValueInMap(e,"valid",!1,!0)},this.transferFailed=t=>{this.updateValueInMap(t,"error",w("duet-upload-001",this.errorCodes))},this.transferCanceled=t=>{this.files.delete(t),this.validateTotals(t),this.kick()},this.validateTotals=t=>{const e=((t,e)=>{let i=0;return!!(e&&(this.files.forEach((t=>{t.valid&&t.size&&(i+=t.size)})),i>=e))})(0,this.maxBytesTotal),i=((t,e)=>{let i=0;return!!(e&&(this.files.forEach((t=>{t.valid&&i++})),i>=e))})(0,this.maxFiles);return e&&t&&this.updateValueInMap(t,"error",w("duet-upload-202",this.errorCodes),!1),i&&t&&this.updateValueInMap(t,"error",w("duet-upload-301",this.errorCodes),!1),this.bytesMaxReached=e,this.fileMaxReached=i,{bytesMaxReached:e,fileMaxReached:i}},this.uploadFile=async(t,e=!1,i)=>{!e&&this.deferUpload?(this.updateValueInMap(t.item.name,"pending",!0,!1),this.updateValueInMap(t.item.name,"group","pending",!0)):e&&(this.updateValueInMap(t.item.name,"pending",!1,!1),this.updateValueInMap(t.item.name,"group",void 0,!0));try{if(!this.deferUpload||e){const e=new FormData;e.append("file",t.item),i&&e.append("key",i),e.append("uid",t.uid),e.append("name",t.item.name),e.append("metadata",JSON.stringify({uid:t.uid,url:this.uri,size:t.item.size,meta:t.meta})),t.xhr=await this.makeXHRPostRequest(e)}}catch(e){this.updateValueInMap(t.item.name,"valid",!1,!1)}},this.uploadPendingFiles=()=>{for(const[t,e]of Array.from(this.files.entries()))"pending"===e.group&&!0===e.pending&&this.uploadFile(e,!0,t)},this.getItemFromUID=t=>{for(const[e,i]of Array.from(this.files.entries()))if(i.uid===t)return{value:i,key:e};return null},this.handleExternalUploadButton=(t,e)=>{this.externalUploadButton&&(this.externalUploadButton.disabled=!(!t&&!e))},this.onDelete=(t,e)=>{const i=this.getItemFromUID(t).key,a=this.files.get(i);this.files.delete(i);const{bytesMaxReached:s,fileMaxReached:d}=this.validateTotals();this.handleExternalUploadButton(s,d),this.kick(),this.duetDelete.emit({originalEvent:e,data:{deletion:a},component:"duet-upload"}),this.external||a.pending||this.makeXHRDeleteRequest(a),this.resetFormFields()},this.onCancel=(t,e)=>{const i=this.getItemFromUID(t).key,a=this.files.get(i);this.files.delete(i);const{bytesMaxReached:s,fileMaxReached:d}=this.validateTotals();if(this.handleExternalUploadButton(s,d),!this.external){const{xhr:t}=a;t&&t.abort()}this.kick(),this.resetFormFields(),this.duetCancel.emit({originalEvent:e,data:{cancelled:a},component:"duet-upload"})},this.onUpload=(t,e)=>{this.duetUpload.emit({originalEvent:t,metaData:e,component:"duet-upload"})},this.onBlur=t=>{this.duetBlur.emit({originalEvent:t,component:"duet-upload"})},this.onProgress=(t,e,i)=>{this.duetChange.emit({originalEvent:i,data:{key:t,percentComplete:e},component:"duet-upload"})},this.onFocus=t=>{this.duetFocus.emit({originalEvent:t,component:"duet-upload"})},this.onReady=()=>{this.duetReady.emit({component:"duet-upload"})},this.onDone=()=>{this.duetDone.emit({component:"duet-upload",data:{files:this.files}})},this.filterMap=()=>{const t=Array.from(this.files.values()),e=[],i=[],a=[],s=[];let d=!1;return t.forEach((t=>{const l=this.getGroupFromItemData(t);t.meta&&t.meta.badges&&(d=!0),l===this.DefaultGroups.success?s.push({uid:t.uid,data:t}):l===this.DefaultGroups.inprogress?e.push({uid:t.uid,data:t}):l===this.DefaultGroups.pending?a.push({uid:t.uid,data:t}):l===this.DefaultGroups.failure?i.push({uid:t.uid,data:t}):t.group&&e.push({uid:t.uid,data:t})})),{pending:a,failure:i,success:s,inprogress:e,hasCategory:d}},this.getActions=(t,e)=>e.filter((e=>e.map.includes(t))),this.renderUploadedItems=()=>{this.itemRefs.clear();const e=this.filterMap(),i=e.hasCategory,a=this.hideCancelButton?this.actions.filter((t=>"cancel"!==t.name)):this.actions,s=this.groups.map((s=>{const l=e[s.id];if(null==l?void 0:l.length)return t(d,null,!this.hideGroups&&t(M,{categoryLabel:i?this.categoryLabel:void 0,label:s.label}),l.map((t=>this.mapFilesToUploadItems(t.data,s.id,i,a))))}));return t(d,null,this.showUploadedItemsHeader&&t(M,{categoryLabel:i?this.categoryLabel:void 0,label:this.uploadedItemsHeaderLabel}),s)},this.tick=Date.now(),this.accessibleActiveDescendant=void 0,this.accessibleDescribedBy=void 0,this.accessibleControls=void 0,this.accessibleOwns=void 0,this.external=!1,this.middleware=null,this.deferUpload=!1,this.hideButton=!1,this.actions=[{icon:"action-delete",color:"color-danger",size:"x-small",background:"gray-lightest",name:"delete",map:["success","failure"],label:{fi:"Poista tiedosto",en:"Delete the file",sv:"Ta bort filen"}},{icon:"navigation-close",color:"primary",size:"x-small",background:"gray-lightest",name:"cancel",map:["inprogress","pending"],label:{fi:"Keskeytä lähetys",en:"Cancel the upload",sv:"Stop överföringen"}}],this.uri=void 0,this.showLinks=!1,this.caption=void 0,this.statusLabelDefaults={fi:{inProgress:"Lähetetään {filesUploaded}, yhteensä lähetettävänä {filesTotal}.",inProgressWithErrors:"Lähetetään {filesInProgress}, lähetetty {filesUploaded}, yhteensä lähetettävänä {filesTotal}, {filesWithErrors} epäonnistui",done:"Lähetys valmis, {filesTotal} lisätty onnistuneesti",doneWithErrors:"Lähetys valmis, {filesUploaded} lisätty onnistuneesti, {filesWithErrors} epäonnistui",files:"tiedostoa",file:"tiedosto"},sv:{inProgress:"Laddar upp {filesUploaded} av {filesTotal}",inProgressWithErrors:"Laddar upp {filesInProgress}, {filesUploaded} uppladdad av {filesTotal}, {filesWithErrors} misslyckades",done:"Uppladdningen slutförd, {filesTotal} har lagts till",doneWithErrors:"Uppladdningen slutförd, {filesUploaded} har lagts till, {filesWithErrors} misslyckades",files:"filer",file:"fil"},en:{inProgress:"Uploading {filesUploaded} of {filesTotal}",inProgressWithErrors:"Uploading {filesInProgress}, {filesUploaded} uploaded of {filesTotal}, {filesWithErrors} failed",done:"Upload completed, {filesTotal} added successfully",doneWithErrors:"Upload completed, {filesUploaded} added successfully, {filesWithErrors} failed.",files:"files",file:"file"}},this.statusMessageLabel=p(this.statusLabelDefaults),this.buttonLabelDefaults={fi:"Lisää liite",sv:"Lägg till en bilaga",en:"Add an attachment"},this.buttonLabel=p(this.buttonLabelDefaults),this.accessibleButtonLabel=void 0,this.theme="",this.disabled=!1,this.identifier=void 0,this.margin="auto",this.required=!1,this.alignment="middle",this.hideGroups=!1,this.files=new Map,this.valid=!this.required,this.labelDefaults={fi:"Lisää liite",sv:"Lägg till en bilaga",en:"Add attachments"},this.label=p(this.labelDefaults),this.descriptionDefaults={en:"You may attach the following filetypes: {filetypes} - as well as the most common video files. You can upload {maxbytestotal} of files at a time, and add up to {maxfiles} attachments at a time each no larger than {maxbytes}.",sv:"Du kan bifoga följande filtyper: {filetypes} - samt de vanligaste videofilerna. Du kan ladda upp {maxbytestotal} av filer åt gången, och lägga till upp till {maxfiles} bilagor åt gången varje inte större än {maxbytes}.",fi:"Voit liittää seuraavat tiedostotyypit: {filetypes} - sekä yleisimmät videotiedostot. Voit lähettää {maxbytestotal} tiedostoa kerrallaan, ja lisätä enintään {maxfiles} liitettä kerrallaan, jokainen enintään {maxbytes} kokoisena."},this.description=p(this.descriptionDefaults),this.fileListEmptyDefaults={fi:"Ei vielä lisättyjä tiedostoja.",sv:"Inga filer har lagts till ännu.",en:"No files added yet."},this.fileListEmpty=p(this.fileListEmptyDefaults),this.error="",this.errorCodes=j,this.name=void 0,this.maxBytes=2e8,this.maxBytesTotal=void 0,this.maxFiles=99,this.allowedExtensions="all",this.allowedMimetypes="",this.multiple=!0,this.limitSelection=!1,this.hideCancelButton=!1,this.value=void 0,this.externalUploadButtonId=void 0,this.captionOnBottom=!1,this.showUploadedItemsHeader=!1,this.uploadedItemsHeaderLabel={fi:"Ladattu tiedosto",sv:"Lägg till en bilaga",en:"Uploaded file"},this.headerHeadingLevel="h3",this.hideHeader=!1,this.emitEvent=!1,this.actionButtonTitles={cancel:!1,delete:!1},this.renameDuplicates=!1,this.groups=[{id:this.DefaultGroups.success,label:{fi:"Valmiit tiedostot",sv:"Files success",en:"Files success"}},{id:this.DefaultGroups.failure,label:{fi:"Tiedostot, joissa on virheitä",sv:"Filer med fel",en:"Files with errors"}},{id:this.DefaultGroups.inprogress,label:{fi:"Kesken olevat tiedostot",sv:"Filer inprogress",en:"Files inprogress"}},{id:this.DefaultGroups.pending,label:{en:"Files to upload",sv:"Filer att ladda",fi:"Ladattavat tiedostot"}}]}watchValidHandler(t,e){t!==e&&this.kick()}componentWillLoad(){this.internalStatusMessageLabel="string"==typeof this.statusMessageLabel?c(this.groups):this.statusMessageLabel,l(this),this.listenForActionEvents(),this.onReady(),this.externalUploadButton=document.querySelector(`#${this.externalUploadButtonId}`),this.processedButtonTitles=x(this.actionButtonTitles)}componentWillRender(){this.verifyValidity()}async setFocus(t){this.nativeInput&&this.nativeInput.focus(t)}async upload(t){const{bytesMaxReached:e,fileMaxReached:i}=this.validateTotals();if(e||i)return this.handleExternalUploadButton(e,i),void this.kick();this.metaData=t,this.nativeInput.click()}async uploadPending(){this.uploadPendingFiles()}async refresh(){this.kick(),await this.setFocus()}async getFiles(){return!(!this.files||0===this.files.size)&&this.getFilesAsArray()}async updateValue(t,e,i){this.updateValueInMap(t,e,i)}async focusActionButton(t){var e;await(null===(e=this.itemRefs.get(t))||void 0===e?void 0:e.focusActionButton())}render(){const e=this.identifier||this.uploadId,i=Math.round((this.maxBytesTotal?this.maxBytesTotal:this.maxBytes*this.maxFiles)/1024/1024),s=Math.round(this.maxBytes/1024/1024);let l=this.description.replace(/{maxfiles}/g,this.maxFiles.toString());return l=l.replace(/{maxbytes}/g,`${s.toString()} MB`),l=l.replace(/{maxbytestotal}/g,`${i.toString()} MB`),l=l.replace(/{filetypes}/g,this.allowedExtensions.split(",").join(", ")),this.externalUploadButton&&(this.externalUploadButton.accessibleLabel=`${this.externalUploadButton.innerText}. ${l}`),t(a,{key:"3289ebfcf7be2cb204e3109f4bd774c023c1311b",class:{"duet-m-0":"none"===this.margin}},t("duet-fieldset",{key:"d7df1dc6a9f7d71d9f2dc5cfea209bae0767111e","label-heading-level":this.headerHeadingLevel,"label-hidden":this.hideHeader,label:this.label},t("slot",{key:"0cc5766408e69476d186039cce9325df4a0cea3d",name:"header"}),!this.files.size&&t("duet-empty-state",{key:"8441562b8677278cadc9f054163de15716507753",id:this.labelId,part:this.identifier?`${this.identifier}-empty-state`:"duet-upload-empty-state",icon:"messaging-attachment"},t("duet-paragraph",{key:"d077aa4e3663bf9faca0ba05ec2dce5ba4666286",margin:"none"},this.fileListEmpty)),!!this.files.size&&t("slot",{key:"e70ef44d5bc02d5e0eefdd0cdd34ebc6323cd85a",name:"fileheader"}),!!this.files.size&&t("duet-upload-aria-status",{key:"16b0035978c73e97c5148ba569a318b2736f53e2",invalid:this.getFilesAsArray().invalid.length,valid:this.getFilesAsArray().valid.length,inprogress:this.filesInProgress.size,total:this.files.size,statusMessageLabel:this.internalStatusMessageLabel}),!!this.files.size&&this.renderUploadedItems(),!!this.files.size&&t("slot",{key:"f500f8ede694b648fc115e2c9c0a575958c39bbb",name:"filefooter"}),t("slot",{key:"1ee35a65d6b56561a9c17f5a6dea294826eca780",name:"uploadfooter"}),this.captionOnBottom&&t("duet-caption",{key:"37e7c183776e7103f0e68cf130fce9cdf0215055",margin:"none",size:"small"},t("div",{key:"66ae65e6cadb22b5373cb54019885615facb8ea0",class:"upload-bottom-caption"},l)),t("slot",{key:"2e8ef445f7637398102d0be1547e27081c9ecf2d",name:"afterfooter"}),!this.hideButton&&t(d,{key:"0449ef097df354a51990e2694ce270b43e0920f4"},t("duet-spacer",{key:"76fcd53d37a524972a778bd974d156eb03a9aba6",size:"large"}),t("duet-button",{key:"4cd5efca2ac98ee8ea478e9a7269a5d2e702b7ef",id:this.buttonId,onClick:this.startUpload,"accessible-controls":e,disabled:this.fileMaxReached,"accessible-label":this.accessibleButtonLabel||`${this.buttonLabel}. ${l}`,"accessible-owns":e,size:"small",variation:"secondary",fixed:!0,icon:"action-add-circle",part:this.identifier?`${this.identifier}-button-upload`:"duet-upload-button-upload"},this.buttonLabel)),(this.fileMaxReached||this.bytesMaxReached||this.filesToUploadExceedsLimit||this.filesToUploadTotalSizeIsAboveMax)&&t(d,{key:"2f4db6f88150427eb99c623c1404f0556848a3e2"},t("duet-spacer",{key:"d9a182225a80cf3b31272bc3f45db3ae7f8456a2",size:"medium"}),t("duet-alert",{key:"8d2209357e096a6c47fe1465d8ca66d900c8935b",part:this.identifier?`${this.identifier}-error-notification`:"duet-upload-error-notification"},this.fileMaxReached&&w("duet-upload-301",this.errorCodes),this.bytesMaxReached&&w("duet-upload-202",this.errorCodes),this.filesToUploadExceedsLimit&&w("duet-upload-302",this.errorCodes),this.filesToUploadTotalSizeIsAboveMax&&w("duet-upload-203",this.errorCodes))),t("duet-visually-hidden",{key:"4be261bd112017729973d2def23f9b384d11b556","aria-hidden":"true"},t("input",{key:"03b8b40bd9488b6de5091aa5ae46e4d146732f17",ref:t=>{this.nativeInput=t},accept:this.limitSelection?`${this.allowedMimetypes},${this.allowedExtensions}`:void 0,onBlur:this.onBlur,onFocus:this.onFocus,onChange:t=>this.onChange(t),type:"file",class:{"duet-upload":!0},disabled:this.disabled,"aria-hidden":"true",required:this.required,name:this.name,id:this.identifier,multiple:this.multiple,tabIndex:-1}))))}makeXHRPostRequest(t){const e=new XMLHttpRequest,i=t.get("name");e.upload.addEventListener("progress",(t=>{this.updateProgress(t,i)})),e.upload.addEventListener("load",(()=>{this.transferComplete(i)})),e.upload.addEventListener("error",(()=>{this.transferFailed(i)})),e.upload.addEventListener("abort",(()=>{this.transferCanceled(i)}));let a={payload:{data:t,name:i},options:{type:"POST",uri:this.uri,xhr:e,argument:null,headers:void 0},onFailure:this.transferDoneWithFailure,onSuccess:this.transferDone,onProgress:this.trackProgress};return this.middleware&&(a=this.middleware(a)),F(a)}makeXHRDeleteRequest(t){const{uid:e,item:i}=t,a=new XMLHttpRequest;let s={payload:{data:null,name},options:{type:"DELETE",xhr:a,uri:this.uri,argument:`?key=${e}&name=${i.name}`,headers:{"x-fileuid":e,"x-filename":i.name}},onFailure:this.transferDoneWithFailure,onSuccess:this.transferDone,onProgress:this.trackProgress};return this.middleware&&(s=this.middleware(s)),F(s)}escapeSpecialCharacters(t){return(t+"").replace(/[\\"'(){}\[\]*?$^+]/g,"\\$&").replace(/\u0000/g,"\\0")}getRenamedFileName(t,e){const i=new RegExp(`${this.escapeSpecialCharacters(t)} \\(\\d+\\).${e}`),a=Array.from(this.files.entries()).map((t=>{const[e,i]=t;return e})).filter((a=>i.test(a)||a===`${t}.${e}`)).sort(((t,e)=>t.split(".").slice(0,-1).join(".")>e.split(".").slice(0,-1).join(".")?1:-1)).pop().split(".").slice(0,-1).join(".");if(a===t)return`${t} (1).${e}`;const s=parseInt(a.split("(").pop().slice(0,-1));return`${t} (${s+1}).${e}`}renameFiles(t){return t.map((t=>{if(this.files.get(t.name)){const e=t.name.split("."),i=e.pop(),a=e.join("."),s=this.getRenamedFileName(a,i);return new File([t],s,{type:t.type,lastModified:t.lastModified})}return t}))}async onChange(t){var e;let i=Array.from(null===(e=this.nativeInput)||void 0===e?void 0:e.files);if(this.filesToUploadExceedsLimit=!1,this.files.size+i.length>this.maxFiles)return this.filesToUploadExceedsLimit=!0,void this.kick();if(this.filesToUploadTotalSizeIsAboveMax=!1,((t,e,i)=>{let a=0;return!!(i&&(this.files.forEach((t=>{t.valid&&t.size&&(a+=t.size)})),e.forEach((t=>{t.size&&(a+=t.size)})),a>=i))})(0,i,this.maxBytesTotal))return this.filesToUploadTotalSizeIsAboveMax=!0,void this.kick();if(i){this.renameDuplicates&&(i=this.renameFiles(i));for(const t of i){const{valid:e,errorMessage:i,errorType:a,errorSystem:s}=z(t,{maxBytes:this.maxBytes,allowedExtensions:this.allowedExtensions,allowedMimetypes:this.allowedMimetypes},this.errorCodes),d={uid:this.genHashName(),item:t,size:t.size,meta:this.metaData,uploaded:!1,valid:e,error:{type:e?void 0:a,message:e?void 0:i,system_message:e?void 0:s},progress:0,deleted:!1,xhr:!1,url:!1};this.files.set(t.name,d),e&&!this.external?await this.uploadFile(d):e&&this.external?(this.updateValueInMap(d.item.name,"pending",!0,!1),this.updateValueInMap(d.item.name,"group","pending",!0)):e||this.updateValueInMap(t.name,"valid",!1,!0),this.kick()}}this.resetFormFields(),this.metaData=void 0,this.duetChange.emit({originalEvent:t,data:{files:this.files},component:"duet-upload"})}get element(){return s(this)}static get watchers(){return{valid:["watchValidHandler"]}}};C.style="*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}::slotted([slot=header]){margin-bottom:16px}::slotted([slot=fileheader]){margin:16px 0 0 0}::slotted([slot=filefooter]){margin-top:16px}::slotted([slot=uploadfooter]){margin-top:20px}.duet-upload{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.duet-upload-item-size{font-size:0.75rem;font-weight:400}.duet-upload-filelist{margin-bottom:25px}.duet-upload-filelist-empty{display:flex;align-items:center;justify-content:center;width:100%;height:75px;margin:0 auto;font-size:1rem;font-weight:400;background-color:rgb(245, 248, 250)}.duet-upload-filelist-empty-label{font-size:1rem;font-weight:400}.duet-upload-editable-table-header-hidden{display:none}.duet-upload-editable-table tbody .duet-upload-editable-table-data{padding:0 !important;border:0}.duet-upload-editable-table duet-editable-table tfoot,.duet-upload-editable-table duet-editable-table thead{display:none}.duet-upload-editable-table duet-editable-table .duet-editable-table-content{padding-right:0 !important;padding-left:0 !important}.duet-upload-editable-table duet-editable-table duet-table .duet-table-action-row td{padding:1rem 0 !important}.duet-upload-editable-table duet-editable-table duet-table .duet-table-action-row td:last-child{padding-right:0 !important}.duet-upload-editable-table duet-editable-table .duet-editable-table-row-inprogress,.duet-upload-editable-table duet-editable-table .duet-editable-table-row-pending{position:relative}.duet-upload-editable-table duet-editable-table .duet-editable-table-row-inprogress duet-progress,.duet-upload-editable-table duet-editable-table .duet-editable-table-row-pending duet-progress{position:absolute;bottom:0;width:100%}.duet-upload-editable-table duet-editable-table .duet-editable-table-row-inprogress duet-action-button::part(button),.duet-upload-editable-table duet-editable-table .duet-editable-table-row-pending duet-action-button::part(button){border:0}duet-paragraph::part(duet-paragraph){word-break:break-word}duet-editable-table tfoot{display:none}.upload-bottom-caption{margin-top:12px;margin-bottom:16px;line-height:1.4rem}.items-header{display:none;flex-direction:row;margin-bottom:0}@media (min-width: 36em){.items-header{display:flex}}.items-header:not(:last-child),.items-header:not(:first-child){margin-top:12px}.items-header .category-header{width:35%}.items-header .filename-header{width:65%}.items-header .filename-header.no-category{width:100%}.upload-item-row{display:flex;flex-direction:column;gap:16px;align-content:center;align-items:center;padding:16px 0 16px 0;border-bottom:1px solid rgb(212, 223, 229)}@media (min-width: 36em){.upload-item-row{flex-direction:row;gap:10px}}.upload-item-row .item-categories{width:100%}@media (min-width: 36em){.upload-item-row .item-categories{width:35%}}.upload-item-row .item-name{position:relative;bottom:2px;width:100%;text-align:left}@media (min-width: 36em){.upload-item-row .item-name{width:50%}.upload-item-row .item-name.no-category{width:85%}}.upload-item-row .item-categories .heading,.upload-item-row .item-name .heading{display:block}@media (min-width: 36em){.upload-item-row .item-categories .heading,.upload-item-row .item-name .heading{display:none}}.upload-item-row .item-actions{width:100%;margin-left:-8px;text-align:left}@media (min-width: 36em){.upload-item-row .item-actions{width:15%;padding-top:0;margin-left:auto;text-align:right}}.upload-item-row .duet-upload-item-name duet-icon{position:relative;top:4px}.upload-item-row .duet-upload-item-name duet-progress{display:block;margin-top:16px}";export{L as duet_editable_table,E as duet_table,C as duet_upload}
4
+ import{h as t,r as e,c as i,H as a,g as s,F as d}from"./p-56df20b9.js";import{i as l}from"./p-aaa7a7bd.js";import{f as o,d as n}from"./p-9e371678.js";import{i as r}from"./p-a45e3f8b.js";import{a as h,c as u,d as b,g as p,s as c}from"./p-97a065d3.js";import{p as m,s as f}from"./p-17efced0.js";import{b as g,a as y}from"./p-5de30279.js";import{c as v}from"./p-5e59e970.js";import{p as x}from"./p-9c3c64b9.js";import{g as k,a as w}from"./p-796281c2.js";const T=({data:e,groupId:i,alignment:a})=>{const s=`duet-editable-table duet-editable-table-content-${i}`;return"string"==typeof e?t("td",{innerHTML:e,class:s,part:`${i}content`,style:{verticalAlign:a}}):t("td",{class:s,part:`${i}content`,style:{verticalAlign:a}},e)},L=class{constructor(t){e(this,t),this.duetTableToggle=i(this,"duetTableToggle",7),this.duetMenuClick=i(this,"duetMenuClick",7),this.hasHeadSlotFirst=!1,this.hasHeadSlotLast=!1,this.hasFootSlot=!1,this.sortableDefaultLabel={fi:"Järjestä",en:"Click to sort",sv:"Klicka för att sortera"},this.actionColumnLabel={en:"Actions for rows",fi:"Toiminnot rivillä",sv:"Åtgärder för rader"},this.toggleColumn=(t,e)=>{e.preventDefault();const{sort_order:i,direction:a,index:s,key:d}=t;this.duetTableToggle.emit({sort_order:i,index:s,direction:a,key:d,component:"duet-editable-table",originalEvent:e})},this.handleKeyDown=(t,e)=>{r(e)&&this.toggleColumn(t,e)},this.language=h(),this.margin="auto",this.variation="striped",this.sticky=!1,this.stickyDistance="with-links",this.breakpoint="small",this.actions=void 0,this.columns=void 0,this.rows=void 0,this.sortable=!1,this.groupId="",this.theme="",this.accessibleRole=void 0,this.hideHeadVisually=!1}componentWillLoad(){l(this),this.hasHeadSlotFirst=!!this.element.querySelector("[slot='thead-first']"),this.hasHeadSlotLast=!!this.element.querySelector("[slot='thead-last']"),this.hasFootSlot=!!this.element.querySelector("[slot='tfoot']")}connectedCallback(){u(this)}disconnectedCallback(){b(this)}createLabel(e){const{sort_order:i,direction:a,index:s,label:d}=e,l=p(d);return this.sortable?t("span",{class:"duet-table-label","data-index":s},t("duet-button",{size:"small",icon:i&&1===a?"action-arrow-down-small":i&&-1===a?"action-arrow-up-small":"action-subtract-small","icon-size":"medium-small","accessible-label":this.sortableDefaultLabel[this.language],variation:"plain",margin:"none","icon-right":!0,onClick:t=>this.toggleColumn(e,t),onKeyDown:t=>this.handleKeyDown(e,t)},l)):l}getSortedColumns(){return[...this.columns].sort(o(["index"]))}getRowSortOrder(){return[...this.columns].sort(o(["sort_order"])).filter((t=>t.sort_order)).map((t=>-1===t.direction?`-${t.key}`:t.key))}renderTableHeader(){if(!this.columns)return;const e=this.getSortedColumns();return t("tr",{class:{"duet-table-action-header":!!this.actions}},e.map((e=>{if(!1!==e.display){const i=this.createLabel(e);return""!==i?t("th",{scope:"col"},i):t("td",null)}})),this.actions&&t("th",{scope:"col",class:"duet-table-action-header-heading"},this.actions&&t("duet-visually-hidden",null,this.actionColumnLabel[this.language])))}renderActions(e,i){if(this.actions)return t("td",{class:"duet-text-right"},this.actions.map((a=>t("duet-action-button",{actionMeta:Object.assign({},(null==e?void 0:e.meta)||{},{index:i}),actionId:(null==e?void 0:e.uid)||(null==e?void 0:e.id)||null,actionName:a.name,theme:this.theme,iconName:a.icon,iconColor:a.color,iconSize:a.size,background:a.background,"accessible-label":`${e.actionDescription||""} ${p(a.label)} `}))))}renderTableBody(){const e=this.getSortedColumns(),i=this.getRowSortOrder();return[...this.rows].sort(o(i)).map(((i,a)=>t("tr",{class:{"duet-table-action-row":!!this.actions,"duet-editable-table-row":!0,[`duet-editable-table-row-${this.groupId}`]:!0},"data-meta":JSON.stringify(i.meta)},e.map((e=>{if(!1!==e.display)return t(T,{data:i[e.key]?i[e.key]:i.item,groupId:this.groupId})})),this.actions&&this.renderActions(i,a))))}render(){return t(a,{class:{[`duet-editable-table-${this.variation}`]:!0,"duet-editable-table":!0,[`duet-editable-table-${this.theme}`]:!0,"duet-editable-table-scrollable":"none-scrollable"===this.breakpoint,"duet-editable-table-sortable":this.sortable,"duet-editable-table-actions":!!this.actions,"duet-m-0":"none"===this.margin,"duet-theme-turva":"turva"===this.theme}},t("duet-table",{class:"duet-editable-table-table",sticky:this.sticky,stickyDistance:this.stickyDistance,margin:this.margin,theme:this.theme,variation:this.variation,breakpoint:this.breakpoint,"hide-head-visually":this.hideHeadVisually},t("table",{role:this.accessibleRole},t("caption",null,t("slot",{name:"tcaption"})),t("thead",null,this.hasHeadSlotFirst&&t("tr",null,t("td",{class:"duet-editable-table-actions-menu",colSpan:99},t("slot",{name:"thead-first"}))),this.renderTableHeader(),this.hasHeadSlotLast&&t("tr",null,t("td",{class:"duet-editable-table-actions-menu",colSpan:99},t("slot",{name:"thead-last"})))),t("tbody",null,this.renderTableBody()),this.hasFootSlot&&t("tfoot",null,t("tr",null,t("td",{class:"duet-editable-table-footer-menu",colSpan:99},t("slot",{name:"tfoot"})))))))}get element(){return s(this)}};L.style=".sc-duet-editable-table-h{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.duet-editable-table-actions-menu.sc-duet-editable-table{position:relative;padding:0 !important;margin:0}.duet-editable-table-actions-menu-button.sc-duet-editable-table{position:relative;right:-16px;float:right;padding:0}.duet-editable-table-actions-menu-icon.sc-duet-editable-table .duet-icon.sc-duet-editable-table{max-width:16px;max-height:16px}.duet-editable-table-row.duet-table-action-row.sc-duet-editable-table .duet-text-right.sc-duet-editable-table{text-align:right}.duet-editable-table-header.sc-duet-editable-table tr.sc-duet-editable-table .duet-editable-table-header-hidden.sc-duet-editable-table{padding:0 !important;font-size:0;border-bottom:0}";const S={none:0,"with-links":16*parseFloat(m),"without-links":16*parseFloat(f)},E=class{constructor(t){e(this,t),this.headingSelector="thead tr > :not(*.duet-editable-table-actions-menu)",this.handleMediaQueryChange=t=>{this.matchesBreakpoint=g.includes(this.breakpoint)?!t.matches:t.matches},this.matchesBreakpoint=!0,this.language=h(),this.theme=void 0,this.margin="auto",this.variation="striped",this.sticky=!1,this.stickyDistance="with-links",this.breakpoint="small",this.hideHeadVisually=!1}watchLanguageStateHandler(t,e){t!==e&&setTimeout((()=>this.copyHeadingsToCells()),50)}connectedCallback(){this.mq=matchMedia("none"===this.breakpoint||"none-scrollable"===this.breakpoint?"all":y[this.breakpoint]),this.mq.addEventListener("change",n(this.handleMediaQueryChange,50)),this.handleMediaQueryChange(this.mq),this.observer=new MutationObserver((()=>n(this.copyHeadingsToCells(),50))),this.observer.observe(this.element,{childList:!0,subtree:!0})}componentWillLoad(){if(l(this),this.copyHeadingsToCells(),this.sticky&&"none-scrollable"===this.breakpoint&&console.warn('[DUET WARNING]: sticky and breakpoint="none-scrollable" are incompatible. Scrollable takes precedence'),this.sticky){const t=S[this.stickyDistance];this.element.querySelectorAll(this.headingSelector).forEach((e=>e.style.top=`${t}px`))}}componentDidLoad(){this.observer&&this.observer.takeRecords(),u(this)}disconnectedCallback(){this.observer.disconnect(),this.observer=null,this.mq.removeListener(this.handleMediaQueryChange),this.mq=null,this.matchesBreakpoint=!0,b(this)}copyHeadingsToCells(){const t=this.element.querySelectorAll(this.headingSelector),e=this.element.querySelectorAll("tbody tr"),i=Array.from(t).map((t=>t.textContent.trim()));e.forEach((t=>{t.querySelectorAll("td").forEach(((t,e)=>{if(i[e]){const a=t.querySelector(".duet-table-cell-heading");if(!a||a.textContent!==i[e]){null==a||a.remove();const s=document.createElement("span");s.textContent=i[e],s.classList.add("duet-table-cell-heading"),s.setAttribute("aria-hidden","true"),s.inert=!0,t.prepend(s)}}}))}))}render(){return t(a,{key:"27ca97cd0ab8838a914fad68c44307707b13c646",class:{[`duet-table-${this.variation}`]:!0,"duet-table-flattened":!this.matchesBreakpoint,"duet-table-sticky":this.matchesBreakpoint&&this.sticky,"duet-table-scrollable":"none-scrollable"===this.breakpoint,"duet-m-0":"none"===this.margin,"duet-theme-turva":"turva"===this.theme,"duet-table-hide-head-visually":this.hideHeadVisually}},t("slot",{key:"ef1fc8226a4cbf04cac71ba4e5a9968791806281"}))}get element(){return s(this)}static get watchers(){return{language:["watchLanguageStateHandler"]}}};E.style='duet-table{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;margin-bottom:20px !important;display:block;font-variant-numeric:tabular-nums}duet-table table,duet-table thead,duet-table tbody,duet-table tfoot,duet-table th,duet-table td,duet-table tr{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}duet-table.duet-m-0{margin:0 !important}duet-table table{width:100%;font-family:"localtapiola-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";font-size:1rem;text-align:left;border-spacing:0;border-collapse:separate}duet-table.duet-table-hide-head-visually.duet-table-hide-head-visually thead,duet-table.duet-table-hide-head-visually.duet-table-hide-head-visually thead *{position:absolute !important;top:0;width:1px !important;height:1px !important;padding:0 !important;overflow:hidden !important;clip:rect(1px, 1px, 1px, 1px) !important;border:0 !important}duet-table.duet-theme-turva table{font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"}duet-table td{-webkit-hyphens:auto;hyphens:auto;color:rgb(8, 42, 77)}duet-table.duet-theme-turva td{color:rgb(23, 28, 58)}duet-table th{font-weight:600;line-height:1.25;color:rgb(98, 121, 138);text-align:left}duet-table.duet-theme-turva th{color:rgb(143, 147, 158)}duet-table tbody th{font-weight:600;color:rgb(8, 42, 77)}duet-table.duet-theme-turva tbody th{color:rgb(23, 28, 58)}duet-table .duet-table-action-row td:last-child{justify-self:end;padding-right:20px !important;white-space:nowrap}duet-table span.duet-table-cell-heading{display:none}.duet-table-flattened table,.duet-table-flattened thead,.duet-table-flattened tbody,.duet-table-flattened tfoot,.duet-table-flattened th,.duet-table-flattened td,.duet-table-flattened tr{display:block}.duet-table-flattened thead tr{position:absolute !important;top:0;width:1px !important;height:1px !important;padding:0 !important;overflow:hidden !important;clip:rect(1px, 1px, 1px, 1px) !important;border:0 !important}.duet-table-flattened td{line-height:1.25}.duet-table-flattened td:not(:last-child){margin-bottom:16px !important}.duet-table-flattened td span.duet-table-cell-heading{margin-bottom:4px !important;display:block;font-size:1rem;font-weight:600;color:rgb(8, 42, 77)}.duet-table-flattened.duet-theme-turva td span.duet-table-cell-heading{color:rgb(23, 28, 58)}.duet-table-flattened tbody td,.duet-table-flattened tbody th,.duet-table-flattened tfoot td{padding:0 !important;text-align:left !important}.duet-table-flattened tbody th{font-weight:600;line-height:1.25;color:rgb(98, 121, 138);text-align:left}.duet-table-sticky thead th{position:sticky;top:0;background:rgb(255, 255, 255)}.duet-table-striped td,.duet-table-striped th{padding:20px !important}@media (max-width: 35.9375em){.duet-table-striped td,.duet-table-striped th{padding:20px 12px !important}}.duet-table-striped tbody th{background:rgb(255, 255, 255)}.duet-table-striped.duet-table-sticky thead th{border-bottom:1px solid rgb(212, 223, 229)}.duet-table-striped.duet-table-sticky.duet-theme-turva thead th{border-bottom-color:rgb(222, 224, 228)}.duet-table-striped tbody:not(:first-of-type) th{padding-top:40px !important}.duet-table-striped tbody:only-of-type tr:nth-of-type(odd){background:rgba(4, 81, 128, 0.04)}.duet-table-striped.duet-theme-turva tbody:only-of-type tr:nth-of-type(odd){background:rgba(23, 28, 58, 0.04)}.duet-table-striped tbody:not(:only-of-type) tr:nth-of-type(even){background:rgba(4, 81, 128, 0.04)}.duet-table-striped.duet-theme-turva tbody:not(:only-of-type) tr:nth-of-type(even){background:rgba(23, 28, 58, 0.04)}.duet-table-striped tfoot td{border-top:1px solid rgb(212, 223, 229)}.duet-table-striped.duet-theme-turva tfoot td{border-top-color:rgb(222, 224, 228)}.duet-table-striped.duet-table-flattened tbody:not(:first-of-type) th{padding-top:20px !important}.duet-table-striped.duet-table-flattened tr{padding:20px !important}.duet-table-striped.duet-table-flattened tfoot td{border-top:0}.duet-table-striped.duet-table-flattened tfoot tr{border-top:1px solid rgb(212, 223, 229)}.duet-table-striped.duet-table-flattened.duet-theme-turva tfoot tr{border-top-color:rgb(222, 224, 228)}.duet-table-fixed th,.duet-table-minimal th,.duet-table-plain th{padding:16px !important;border-bottom:1px solid rgb(98, 121, 138)}.duet-table-fixed th:first-child,.duet-table-minimal th:first-child,.duet-table-plain th:first-child{padding-left:0 !important}.duet-table-fixed th:last-child,.duet-table-minimal th:last-child,.duet-table-plain th:last-child{padding-right:0 !important}.duet-theme-turva.duet-table-fixed th,.duet-theme-turva.duet-table-minimal th,.duet-theme-turva.duet-table-plain th{border-bottom-color:rgb(113, 118, 132)}.duet-table-fixed tbody th,.duet-table-minimal tbody th,.duet-table-plain tbody th{padding-top:40px !important;border-bottom-color:rgb(212, 223, 229)}.duet-theme-turva.duet-table-fixed tbody th,.duet-theme-turva.duet-table-minimal tbody th,.duet-theme-turva.duet-table-plain tbody th{border-bottom-color:rgb(222, 224, 228)}.duet-table-fixed td,.duet-table-minimal td,.duet-table-plain td{padding:16px !important}.duet-table-fixed td:first-child,.duet-table-minimal td:first-child,.duet-table-plain td:first-child{padding-left:0 !important}.duet-table-fixed td:last-child,.duet-table-minimal td:last-child,.duet-table-plain td:last-child{padding-right:0 !important}.duet-table-fixed tbody td,.duet-table-minimal tbody td,.duet-table-plain tbody td{border-bottom:1px solid rgb(212, 223, 229)}.duet-theme-turva.duet-table-fixed tbody td,.duet-theme-turva.duet-table-minimal tbody td,.duet-theme-turva.duet-table-plain tbody td{border-bottom-color:rgb(222, 224, 228)}.duet-table-flattened.duet-table-fixed tbody:first-of-type th,.duet-table-flattened.duet-table-minimal tbody:first-of-type th,.duet-table-flattened.duet-table-plain tbody:first-of-type th{padding-top:0 !important}.duet-table-flattened.duet-table-fixed td,.duet-table-flattened.duet-table-minimal td,.duet-table-flattened.duet-table-plain td,.duet-table-flattened.duet-table-fixed tbody th,.duet-table-flattened.duet-table-minimal tbody th,.duet-table-flattened.duet-table-plain tbody th{border-bottom:0}.duet-table-flattened.duet-table-fixed tr,.duet-table-flattened.duet-table-minimal tr,.duet-table-flattened.duet-table-plain tr{padding:20px 0 !important}.duet-table-flattened.duet-table-fixed tbody th,.duet-table-flattened.duet-table-minimal tbody th,.duet-table-flattened.duet-table-plain tbody th{padding-top:20px !important}.duet-table-flattened.duet-table-fixed tfoot td,.duet-table-flattened.duet-table-minimal tfoot td,.duet-table-flattened.duet-table-plain tfoot td{margin-bottom:4px !important}.duet-table-flattened.duet-table-fixed tbody:not(:only-of-type) tr:first-child,.duet-table-flattened.duet-table-minimal tbody:not(:only-of-type) tr:first-child,.duet-table-flattened.duet-table-plain tbody:not(:only-of-type) tr:first-child{border-bottom:0}.duet-table-plain.duet-table-flattened tbody tr{border-bottom:1px solid rgb(212, 223, 229)}.duet-table-plain.duet-table-flattened.duet-theme-turva tbody tr{border-bottom-color:rgb(222, 224, 228)}.duet-table-minimal tbody tr,.duet-table-minimal tbody tr td{vertical-align:top;border-bottom:0 none}.duet-table-minimal tbody tr:last-of-type,.duet-table-minimal tbody tr:last-of-type td{border-bottom:1px solid rgb(212, 223, 229)}.duet-table-minimal.duet-table-flattened tbody tr,.duet-table-minimal.duet-table-flattened tbody tr td{border-bottom:0 none}.duet-table-minimal.duet-table-flattened tbody tr td[data-heading]::before{display:none}.duet-table-minimal.duet-table-flattened tfoot{border-top:1px solid rgb(212, 223, 229)}.duet-table-minimal.duet-table-flattened.duet-theme-turva tfoot{border-top-color:rgb(222, 224, 228)}.duet-table-fixed table{table-layout:fixed}.duet-table-fixed tbody tr,.duet-table-fixed tbody tr td,.duet-table-fixed tbody tr td:first-child{padding:4px !important;vertical-align:text-bottom;border-bottom:0 none}.duet-table-fixed thead{display:none}.duet-table-fixed tbody tr,.duet-table-fixed tbody tr td{border-bottom:0 none}.duet-table-fixed:not(.duet-table-flattened) tfoot{border-top:1px solid rgb(212, 223, 229)}.duet-table-fixed:not(.duet-table-flattened).duet-theme-turva tfoot{border-top-color:rgb(222, 224, 228)}.duet-table-scrollable{position:relative;width:100%;overflow-x:auto;background:linear-gradient(90deg, #fff 0%, rgba(255, 255, 255, 0)), linear-gradient(-90deg, #fff 0%, rgba(255, 255, 255, 0)) 100% 0, radial-gradient(farthest-side at 0% 50%, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0)), radial-gradient(farthest-side at 100% 50%, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0)) 100% 0%;background-repeat:no-repeat;background-attachment:local, local, scroll, scroll;background-size:100px 100%, 100px 100%, 12px 100%, 12px 100%}.duet-table-selected-column{background:rgba(0, 119, 179, 0.08)}.duet-theme-turva .duet-table-selected-column{background:rgba(113, 118, 132, 0.08)}.duet-table-sortable tbody tr td:first-child,.duet-table-sortable thead tr th:first-child{padding:20px}.duet-table-sortable:not(.duet-table-flattened) tfoot{border-top:1px solid rgb(212, 223, 229)}.duet-table-sortable:not(.duet-table-flattened).duet-theme-turva tfoot{border-top-color:rgb(222, 224, 228)}.duet-table-actions table{table-layout:auto}.duet-table-actions thead th:last-child{width:1px;white-space:nowrap}.duet-editable-table-table.duet-table-flattened tr{display:grid;grid-template-columns:repeat(2, 1fr);grid-auto-rows:auto;gap:10px}.duet-editable-table-table.duet-table-flattened tr.duet-table-action-row td:last-child::before{padding:0;content:""}.duet-editable-table-table.duet-table-flattened td{grid-column:1/2}.duet-editable-table-table.duet-table-flattened td:first-child{grid-row:1;grid-column:1}.duet-editable-table-table.duet-table-flattened td:last-child{grid-row:1;grid-column:2}';const j=[{type:"default",system_message:"unknown error",message:{fi:"Tapahtui tuntematon virhe, ole hyvä ja yritä uudelleen.",sv:"Ett okänt fel uppstod, försök igen.",en:"An unknown error occured, please try again."}},{type:"400",system_message:"Bad Request: The server could not understand the request due to invalid syntax.",message:{fi:"Tiedostoa ei hyväksytty.",sv:"Servern avvisade din fil.",en:"The server rejected your file."}},{type:"401",system_message:"Not Authenticated: The client must authenticate itself to get the requested response...",message:{fi:"Vain kirjautunut käyttäjä voi lähettää tiedostoja.",sv:"Du måste vara inloggad för att ladda upp filer.",en:"You need to be logged in to upload files."}},{type:"403",system_message:"No Access: The client does not have access rights to the content.",message:{fi:"Ei oikeuksia lähettää tiedostoja.",sv:"Du har inte rätt åtkomsträttigheter för att ladda upp filer.",en:"You do not have the correct access rights to upload files."}},{type:"413",system_message:"Payload too large",message:{fi:"Tiedosto oli liian vastaanotettavaksi.",sv:"Filen var för stor för servern att hantera.",en:"The file was to large for the server to handle."}},{type:"415",system_message:"Unsupported media type",message:{fi:"Tiedoston tyyppi oli väärä.",sv:"Servern avvisade filen eftersom den hade fel typ.",en:"The server rejected the file because it had the wrong type."}},{type:"429",system_message:"Too many request from same address",message:{fi:"Liian monta yritystä, ole hyvä ja yritä myöhemmin uudelleen.",sv:"Servern har fått många förfrågningar från dig, försök igen senare.",en:"The server has received to many request from you, please try again later."}},{type:"500",system_message:"Internal Server Error",message:{fi:"Palvelin ilmoitti tuntemattomasta virheestä ja lataus epäonnistui.",sv:"Servern rapporterade ett okänt fel och uppladdningen misslyckades.",en:"The server reported an unknown error and the upload failed."}},{type:"duet-upload-100",system_message:"File extension not allowed",message:{fi:"Tiedoston tyyppi ei ole sallittu.",sv:"Du kan inte ladda upp filer av den type.",en:"You cannot upload files with that extension."}},{type:"duet-upload-001",system_message:"File transfer failed",message:{fi:"Tiedoston lähetys keskeytyi, ole hyvä ja yritä uudelleen.",sv:"Din anslutning till servern avbröts, försök igen.",en:"Your connection to the server was interrupted, try again."}},{type:"duet-upload-101",system_message:"File mimetype not allowed",message:{fi:"Tiedoston tyyppi ei ole sallittu.",sv:"Du kan inte ladda upp filer av den typ.",en:"You cannot upload files of that type."}},{type:"duet-upload-201",system_message:"File is too large",message:{fi:"Tiedosto on liian iso.",sv:"Filen är större än tillåtet.",en:"The file is larger than permitted."}},{type:"duet-upload-202",system_message:"The combined size of all files is too large",message:{fi:"Tiedostojen yhteenlaskettu koko on liian iso.",sv:"Du har nått den maximala kombinerade filstorleken.",en:"You have reached the maximum combined filesize."}},{type:"duet-upload-203",system_message:"Files to upload exceed total byte size limit",message:{fi:"Yritit lisätä tiedostoja, jotka ylittäisivät suurimman sallitun yhteenlasketun koon.",sv:"Du försökte lägga till filer som skulle överskrida den maximala kombinerade storleken.",en:"You tried to add files that would exceed the maximum combined size."}},{type:"duet-upload-301",system_message:"The maximum file limit has been reached",message:{fi:"Liitteiden maksimimäärä saavutettu.",sv:"Maximalt antal bilagor har uppnåtts.",en:"Maximum number of attachments reached."}},{type:"duet-upload-302",system_message:"Files to upload exceeds limits",message:{fi:"Et voi lähettää enempää kuin enimmäismäärän liitteitä.",sv:"Du kan inte ladda upp fler än det maximala antalet bilagor.",en:"You can't upload more than maximum number of attachments."}}],$={fi:"Liiteluettelo",sv:"Lista över bilagor",en:"Attachments list"},M=({label:e,categoryLabel:i})=>t("div",{class:"items-header",tabindex:"-1","aria-label":p($)},i&&t("duet-heading",{class:"category-header",border:"solid",color:"gray-darker",level:"h3","visual-level":"h6",weight:"semibold",margin:"none","aria-hidden":"true"},p(i)),t("duet-heading",{class:{"filename-header":!0,"no-category":!i},border:"solid",color:"gray-darker",level:"h3","visual-level":"h6",weight:"semibold",margin:"none","aria-hidden":"true"},p(e))),z=(t,e,i)=>{const{allowedMimetypes:a,allowedExtensions:s,maxBytes:d}=e;let l=!1,o=k("default",i);if(t){const{name:e,type:n,size:r}=t,h=((t,e)=>{if(!e||!t)return!0;const i=e.split(",");let a=!1;return i.forEach((e=>{const i=e.split("/"),s=t.split("/");i[0]!==s[0]||i[1]!==s[1]&&"*"!==i[1]||(a=!0)})),a})(n,a),u="all"===s||""===s||" "===s||void 0===s||((t,e)=>{if(!e)return!0;const i=t.split(".");return e.split(",").includes(i[i.length-1])})(e.toLowerCase(),s),b=((t,e)=>!e||!t||e>=t)(r,d);h||(o=k("duet-upload-101",i)),u||(o=k("duet-upload-100",i)),b||(o=k("duet-upload-201",i)),l=h&&u&&b}else l=!1;return{valid:l,errorMessage:l?void 0:p(o.message),errorSystem:l?void 0:o.system_message,errorType:l?void 0:o.type}},F=({payload:t,options:e,onFailure:i,onSuccess:a,onProgress:s})=>{const{type:d="POST",xhr:l,uri:o,argument:n=null,headers:r=null}=e;l.open(d,`${o}${n||""}`,!0);const{data:h,name:u}=t;return r&&Object.keys(r).forEach((t=>{l.setRequestHeader(t,r[t])})),"POST"===d&&(l.onreadystatechange=()=>{l.readyState===XMLHttpRequest.DONE&&l.status>=200&&l.status<300&&a(l,u,l.status),l.readyState===XMLHttpRequest.DONE&&l.status>=300&&l.status<999&&i(l,u,l.status)},s(u)),l.send(h),l},C=class{constructor(a){e(this,a),this.duetChange=i(this,"duetChange",3),this.duetBlur=i(this,"duetBlur",7),this.duetFocus=i(this,"duetFocus",7),this.duetReady=i(this,"duetReady",7),this.duetDone=i(this,"duetDone",3),this.duetState=i(this,"duetState",3),this.duetDelete=i(this,"duetDelete",3),this.duetCancel=i(this,"duetCancel",3),this.duetProgress=i(this,"duetProgress",3),this.duetUpload=i(this,"duetUpload",3),this.linkClick=i(this,"linkClick",3),this.buttonId=v("DuetButton"),this.labelId=v("DuetLabel"),this.uploadId=v("DuetUpload"),this.filesInProgress=new Map,this.fileMaxReached=!1,this.bytesMaxReached=!1,this.filesToUploadExceedsLimit=!1,this.filesToUploadTotalSizeIsAboveMax=!1,this.internalStatusMessageLabel=void 0,this.itemRefs=new Map,this.DefaultGroups={inprogress:"inprogress",success:"success",pending:"pending",failure:"failure"},this.kick=n((()=>{this.tick=Date.now()}),30),this.categoryLabel={en:"Category",sv:"Filtyp",fi:"Tiedostotyyppi"},this.listenForActionEvents=()=>{this.element.addEventListener("duetActionEvent",(t=>{const e=t.detail,{action:i,id:a,originalEvent:s}=e;switch(i){case"delete":this.onDelete(a,s);break;case"cancel":this.onCancel(a,s)}}))},this.verifyValidity=()=>{const{invalid:t,valid:e}=this.getFilesAsArray(),i=this.valid;this.valid=0===t.length&&0!==e.length,this.valid!==i&&this.duetState.emit({originalEvent:void 0,data:{valid:this.valid,from:"componentWillRender"},component:"duet-upload"})},this.getGroupFromItemData=t=>t.valid&&100===t.progress?this.DefaultGroups.success:t.progress>0&&100!==t.progress?this.DefaultGroups.inprogress:t.valid?t.pending?this.DefaultGroups.pending:t.group?t.group:"none":this.DefaultGroups.failure,this.mapFilesToUploadItems=(e,i,a,s)=>i===this.DefaultGroups.success?t("duet-upload-item",{theme:this.theme,actions:this.getActions(i,s),type:"success",data:e,showLinks:this.showLinks,linkClickEvent:this.emitEvent?this.linkClick:void 0,categoryLabel:this.categoryLabel,label:this.uploadedItemsHeaderLabel,showCategory:a,buttonTitles:this.processedButtonTitles,ref:t=>{this.itemRefs.set(e.uid,t)}}):i===this.DefaultGroups.inprogress?t("duet-upload-item",{theme:this.theme,actions:this.getActions(i,s),type:"inprogress",data:e,showLinks:this.showLinks,categoryLabel:this.categoryLabel,label:this.uploadedItemsHeaderLabel,showCategory:a,buttonTitles:this.processedButtonTitles,ref:t=>{this.itemRefs.set(e.uid,t)}}):i===this.DefaultGroups.pending?t("duet-upload-item",{theme:this.theme,actions:this.getActions(i,s),type:"pending",data:e,showLinks:this.showLinks,categoryLabel:this.categoryLabel,label:this.uploadedItemsHeaderLabel,showCategory:a,buttonTitles:this.processedButtonTitles,ref:t=>{this.itemRefs.set(e.uid,t)}}):i===this.DefaultGroups.failure?t("duet-upload-item",{theme:this.theme,actions:this.getActions(i,s),type:"failure",data:e,showLinks:this.showLinks,errorCodes:this.errorCodes,categoryLabel:this.categoryLabel,label:this.uploadedItemsHeaderLabel,showCategory:a,buttonTitles:this.processedButtonTitles,ref:t=>{this.itemRefs.set(e.uid,t)}}):e.group?e.html:"none",this.genHashName=()=>Date.now().toString(36)+Math.random(),this.updateValueInMap=(t,e,i,a=!0)=>{try{const a=this.files.get(t);a[e]=i,this.files.set(t,a),this.external&&"url"!==e&&this.trackProgress(t,"uploaded"===e)}catch(t){}a&&this.kick()},this.updateProgress=(t,e)=>{t.lengthComputable?(i=>{this.updateValueInMap(e,"progress",i),this.onProgress(e,i,t)})(t.loaded/t.total*100):console.log("cant read progress")},this.trackProgress=(t,e=!1)=>{e?this.filesInProgress.delete(t):this.filesInProgress.set(t,"inprogress"),0===this.filesInProgress.size&&this.onDone()},this.getFilesAsArray=()=>{const t=[],e=[];return this.files.forEach((i=>{i.valid&&!i.deleted?t.push(i):i.valid||i.deleted||e.push(i)})),{valid:t,invalid:e}},this.resetFormFields=()=>{this.nativeInput.value=""},this.startUpload=async(t,e)=>{const{bytesMaxReached:i,fileMaxReached:a}=this.validateTotals();i||a?this.kick():(this.metaData=e,this.nativeInput.click(),this.onUpload(t,e),t.stopPropagation(),t.preventDefault())},this.transferComplete=t=>{this.updateValueInMap(t,"progress",100,!1),this.trackProgress(t,!0)},this.transferDone=(t,e,i)=>{this.updateValueInMap(e,"status",i,!1),this.updateValueInMap(e,"uploaded",!0,!1);try{const i=JSON.parse(t.response);this.updateValueInMap(e,"url",i.url)}catch(t){this.updateValueInMap(e,"url",null),console.error("Server did not respond with expected response {url: string}")}},this.transferDoneWithFailure=(t,e,i)=>{try{const{error:i}=JSON.parse(t.response);this.updateValueInMap(e,"error",{message:i.message,type:i.type},!1)}catch(t){console.error("Server did not respond with expected response error:{message: string, type: int}"),this.updateValueInMap(e,"error",{type:i},!1)}this.updateValueInMap(e,"valid",!1,!0)},this.transferFailed=t=>{this.updateValueInMap(t,"error",w("duet-upload-001",this.errorCodes))},this.transferCanceled=t=>{this.files.delete(t),this.validateTotals(t),this.kick()},this.validateTotals=t=>{const e=((t,e)=>{let i=0;return!!(e&&(this.files.forEach((t=>{t.valid&&t.size&&(i+=t.size)})),i>=e))})(0,this.maxBytesTotal),i=((t,e)=>{let i=0;return!!(e&&(this.files.forEach((t=>{t.valid&&i++})),i>=e))})(0,this.maxFiles);return e&&t&&this.updateValueInMap(t,"error",w("duet-upload-202",this.errorCodes),!1),i&&t&&this.updateValueInMap(t,"error",w("duet-upload-301",this.errorCodes),!1),this.bytesMaxReached=e,this.fileMaxReached=i,{bytesMaxReached:e,fileMaxReached:i}},this.uploadFile=async(t,e=!1,i)=>{!e&&this.deferUpload?(this.updateValueInMap(t.item.name,"pending",!0,!1),this.updateValueInMap(t.item.name,"group","pending",!0)):e&&(this.updateValueInMap(t.item.name,"pending",!1,!1),this.updateValueInMap(t.item.name,"group",void 0,!0));try{if(!this.deferUpload||e){const e=new FormData;e.append("file",t.item),i&&e.append("key",i),e.append("uid",t.uid),e.append("name",t.item.name),e.append("metadata",JSON.stringify({uid:t.uid,url:this.uri,size:t.item.size,meta:t.meta})),t.xhr=await this.makeXHRPostRequest(e)}}catch(e){this.updateValueInMap(t.item.name,"valid",!1,!1)}},this.uploadPendingFiles=()=>{for(const[t,e]of Array.from(this.files.entries()))"pending"===e.group&&!0===e.pending&&this.uploadFile(e,!0,t)},this.getItemFromUID=t=>{for(const[e,i]of Array.from(this.files.entries()))if(i.uid===t)return{value:i,key:e};return null},this.handleExternalUploadButton=(t,e)=>{this.externalUploadButton&&(this.externalUploadButton.disabled=!(!t&&!e))},this.onDelete=(t,e)=>{const i=this.getItemFromUID(t).key,a=this.files.get(i);this.files.delete(i);const{bytesMaxReached:s,fileMaxReached:d}=this.validateTotals();this.handleExternalUploadButton(s,d),this.kick(),this.duetDelete.emit({originalEvent:e,data:{deletion:a},component:"duet-upload"}),this.external||a.pending||this.makeXHRDeleteRequest(a),this.resetFormFields()},this.onCancel=(t,e)=>{const i=this.getItemFromUID(t).key,a=this.files.get(i);this.files.delete(i);const{bytesMaxReached:s,fileMaxReached:d}=this.validateTotals();if(this.handleExternalUploadButton(s,d),!this.external){const{xhr:t}=a;t&&t.abort()}this.kick(),this.resetFormFields(),this.duetCancel.emit({originalEvent:e,data:{cancelled:a},component:"duet-upload"})},this.onUpload=(t,e)=>{this.duetUpload.emit({originalEvent:t,metaData:e,component:"duet-upload"})},this.onBlur=t=>{this.duetBlur.emit({originalEvent:t,component:"duet-upload"})},this.onProgress=(t,e,i)=>{this.duetChange.emit({originalEvent:i,data:{key:t,percentComplete:e},component:"duet-upload"})},this.onFocus=t=>{this.duetFocus.emit({originalEvent:t,component:"duet-upload"})},this.onReady=()=>{this.duetReady.emit({component:"duet-upload"})},this.onDone=()=>{this.duetDone.emit({component:"duet-upload",data:{files:this.files}})},this.filterMap=()=>{const t=Array.from(this.files.values()),e=[],i=[],a=[],s=[];let d=!1;return t.forEach((t=>{const l=this.getGroupFromItemData(t);t.meta&&t.meta.badges&&(d=!0),l===this.DefaultGroups.success?s.push({uid:t.uid,data:t}):l===this.DefaultGroups.inprogress?e.push({uid:t.uid,data:t}):l===this.DefaultGroups.pending?a.push({uid:t.uid,data:t}):l===this.DefaultGroups.failure?i.push({uid:t.uid,data:t}):t.group&&e.push({uid:t.uid,data:t})})),{pending:a,failure:i,success:s,inprogress:e,hasCategory:d}},this.getActions=(t,e)=>e.filter((e=>e.map.includes(t))),this.renderUploadedItems=()=>{this.itemRefs.clear();const e=this.filterMap(),i=e.hasCategory,a=this.hideCancelButton?this.actions.filter((t=>"cancel"!==t.name)):this.actions,s=this.groups.map((s=>{const l=e[s.id];if(null==l?void 0:l.length)return t(d,null,!this.hideGroups&&t(M,{categoryLabel:i?this.categoryLabel:void 0,label:s.label}),l.map((t=>this.mapFilesToUploadItems(t.data,s.id,i,a))))}));return t(d,null,this.showUploadedItemsHeader&&t(M,{categoryLabel:i?this.categoryLabel:void 0,label:this.uploadedItemsHeaderLabel}),s)},this.tick=Date.now(),this.accessibleActiveDescendant=void 0,this.accessibleDescribedBy=void 0,this.accessibleControls=void 0,this.accessibleOwns=void 0,this.external=!1,this.middleware=null,this.deferUpload=!1,this.hideButton=!1,this.actions=[{icon:"action-delete",color:"color-danger",size:"x-small",background:"gray-lightest",name:"delete",map:["success","failure"],label:{fi:"Poista tiedosto",en:"Delete the file",sv:"Ta bort filen"}},{icon:"navigation-close",color:"primary",size:"x-small",background:"gray-lightest",name:"cancel",map:["inprogress","pending"],label:{fi:"Keskeytä lähetys",en:"Cancel the upload",sv:"Stop överföringen"}}],this.uri=void 0,this.showLinks=!1,this.caption=void 0,this.statusLabelDefaults={fi:{inProgress:"Lähetetään {filesUploaded}, yhteensä lähetettävänä {filesTotal}.",inProgressWithErrors:"Lähetetään {filesInProgress}, lähetetty {filesUploaded}, yhteensä lähetettävänä {filesTotal}, {filesWithErrors} epäonnistui",done:"Lähetys valmis, {filesTotal} lisätty onnistuneesti",doneWithErrors:"Lähetys valmis, {filesUploaded} lisätty onnistuneesti, {filesWithErrors} epäonnistui",files:"tiedostoa",file:"tiedosto"},sv:{inProgress:"Laddar upp {filesUploaded} av {filesTotal}",inProgressWithErrors:"Laddar upp {filesInProgress}, {filesUploaded} uppladdad av {filesTotal}, {filesWithErrors} misslyckades",done:"Uppladdningen slutförd, {filesTotal} har lagts till",doneWithErrors:"Uppladdningen slutförd, {filesUploaded} har lagts till, {filesWithErrors} misslyckades",files:"filer",file:"fil"},en:{inProgress:"Uploading {filesUploaded} of {filesTotal}",inProgressWithErrors:"Uploading {filesInProgress}, {filesUploaded} uploaded of {filesTotal}, {filesWithErrors} failed",done:"Upload completed, {filesTotal} added successfully",doneWithErrors:"Upload completed, {filesUploaded} added successfully, {filesWithErrors} failed.",files:"files",file:"file"}},this.statusMessageLabel=p(this.statusLabelDefaults),this.buttonLabelDefaults={fi:"Lisää liite",sv:"Lägg till en bilaga",en:"Add an attachment"},this.buttonLabel=p(this.buttonLabelDefaults),this.accessibleButtonLabel=void 0,this.theme="",this.disabled=!1,this.identifier=void 0,this.margin="auto",this.required=!1,this.alignment="middle",this.hideGroups=!1,this.files=new Map,this.valid=!this.required,this.labelDefaults={fi:"Lisää liite",sv:"Lägg till en bilaga",en:"Add attachments"},this.label=p(this.labelDefaults),this.descriptionDefaults={en:"You may attach the following filetypes: {filetypes} - as well as the most common video files. You can upload {maxbytestotal} of files at a time, and add up to {maxfiles} attachments at a time each no larger than {maxbytes}.",sv:"Du kan bifoga följande filtyper: {filetypes} - samt de vanligaste videofilerna. Du kan ladda upp {maxbytestotal} av filer åt gången, och lägga till upp till {maxfiles} bilagor åt gången varje inte större än {maxbytes}.",fi:"Voit liittää seuraavat tiedostotyypit: {filetypes} - sekä yleisimmät videotiedostot. Voit lähettää {maxbytestotal} tiedostoa kerrallaan, ja lisätä enintään {maxfiles} liitettä kerrallaan, jokainen enintään {maxbytes} kokoisena."},this.description=p(this.descriptionDefaults),this.fileListEmptyDefaults={fi:"Ei vielä lisättyjä tiedostoja.",sv:"Inga filer har lagts till ännu.",en:"No files added yet."},this.fileListEmpty=p(this.fileListEmptyDefaults),this.error="",this.errorCodes=j,this.name=void 0,this.maxBytes=2e8,this.maxBytesTotal=void 0,this.maxFiles=99,this.allowedExtensions="all",this.allowedMimetypes="",this.multiple=!0,this.limitSelection=!1,this.hideCancelButton=!1,this.value=void 0,this.externalUploadButtonId=void 0,this.captionOnBottom=!1,this.showUploadedItemsHeader=!1,this.uploadedItemsHeaderLabel={fi:"Ladattu tiedosto",sv:"Lägg till en bilaga",en:"Uploaded file"},this.headerHeadingLevel="h3",this.hideHeader=!1,this.emitEvent=!1,this.actionButtonTitles={cancel:!1,delete:!1},this.renameDuplicates=!1,this.groups=[{id:this.DefaultGroups.success,label:{fi:"Valmiit tiedostot",sv:"Files success",en:"Files success"}},{id:this.DefaultGroups.failure,label:{fi:"Tiedostot, joissa on virheitä",sv:"Filer med fel",en:"Files with errors"}},{id:this.DefaultGroups.inprogress,label:{fi:"Kesken olevat tiedostot",sv:"Filer inprogress",en:"Files inprogress"}},{id:this.DefaultGroups.pending,label:{en:"Files to upload",sv:"Filer att ladda",fi:"Ladattavat tiedostot"}}]}watchValidHandler(t,e){t!==e&&this.kick()}componentWillLoad(){this.internalStatusMessageLabel="string"==typeof this.statusMessageLabel?c(this.groups):this.statusMessageLabel,l(this),this.listenForActionEvents(),this.onReady(),this.externalUploadButton=document.querySelector(`#${this.externalUploadButtonId}`),this.processedButtonTitles=x(this.actionButtonTitles)}componentWillRender(){this.verifyValidity()}async setFocus(t){this.nativeInput&&this.nativeInput.focus(t)}async upload(t){const{bytesMaxReached:e,fileMaxReached:i}=this.validateTotals();if(e||i)return this.handleExternalUploadButton(e,i),void this.kick();this.metaData=t,this.nativeInput.click()}async uploadPending(){this.uploadPendingFiles()}async refresh(){this.kick(),await this.setFocus()}async getFiles(){return!(!this.files||0===this.files.size)&&this.getFilesAsArray()}async updateValue(t,e,i){this.updateValueInMap(t,e,i)}async focusActionButton(t){var e;await(null===(e=this.itemRefs.get(t))||void 0===e?void 0:e.focusActionButton())}render(){const e=this.identifier||this.uploadId,i=Math.round((this.maxBytesTotal?this.maxBytesTotal:this.maxBytes*this.maxFiles)/1024/1024),s=Math.round(this.maxBytes/1024/1024);let l=this.description.replace(/{maxfiles}/g,this.maxFiles.toString());return l=l.replace(/{maxbytes}/g,`${s.toString()} MB`),l=l.replace(/{maxbytestotal}/g,`${i.toString()} MB`),l=l.replace(/{filetypes}/g,this.allowedExtensions.split(",").join(", ")),this.externalUploadButton&&(this.externalUploadButton.accessibleLabel=`${this.externalUploadButton.innerText}. ${l}`),t(a,{key:"3289ebfcf7be2cb204e3109f4bd774c023c1311b",class:{"duet-m-0":"none"===this.margin}},t("duet-fieldset",{key:"d7df1dc6a9f7d71d9f2dc5cfea209bae0767111e","label-heading-level":this.headerHeadingLevel,"label-hidden":this.hideHeader,label:this.label},t("slot",{key:"0cc5766408e69476d186039cce9325df4a0cea3d",name:"header"}),!this.files.size&&t("duet-empty-state",{key:"8441562b8677278cadc9f054163de15716507753",id:this.labelId,part:this.identifier?`${this.identifier}-empty-state`:"duet-upload-empty-state",icon:"messaging-attachment"},t("duet-paragraph",{key:"d077aa4e3663bf9faca0ba05ec2dce5ba4666286",margin:"none"},this.fileListEmpty)),!!this.files.size&&t("slot",{key:"e70ef44d5bc02d5e0eefdd0cdd34ebc6323cd85a",name:"fileheader"}),!!this.files.size&&t("duet-upload-aria-status",{key:"16b0035978c73e97c5148ba569a318b2736f53e2",invalid:this.getFilesAsArray().invalid.length,valid:this.getFilesAsArray().valid.length,inprogress:this.filesInProgress.size,total:this.files.size,statusMessageLabel:this.internalStatusMessageLabel}),!!this.files.size&&this.renderUploadedItems(),!!this.files.size&&t("slot",{key:"f500f8ede694b648fc115e2c9c0a575958c39bbb",name:"filefooter"}),t("slot",{key:"1ee35a65d6b56561a9c17f5a6dea294826eca780",name:"uploadfooter"}),this.captionOnBottom&&t("duet-caption",{key:"37e7c183776e7103f0e68cf130fce9cdf0215055",margin:"none",size:"small"},t("div",{key:"66ae65e6cadb22b5373cb54019885615facb8ea0",class:"upload-bottom-caption"},l)),t("slot",{key:"2e8ef445f7637398102d0be1547e27081c9ecf2d",name:"afterfooter"}),!this.hideButton&&t(d,{key:"0449ef097df354a51990e2694ce270b43e0920f4"},t("duet-spacer",{key:"76fcd53d37a524972a778bd974d156eb03a9aba6",size:"large"}),t("duet-button",{key:"4cd5efca2ac98ee8ea478e9a7269a5d2e702b7ef",id:this.buttonId,onClick:this.startUpload,"accessible-controls":e,disabled:this.fileMaxReached,"accessible-label":this.accessibleButtonLabel||`${this.buttonLabel}. ${l}`,"accessible-owns":e,size:"small",variation:"secondary",fixed:!0,icon:"action-add-circle",part:this.identifier?`${this.identifier}-button-upload`:"duet-upload-button-upload"},this.buttonLabel)),(this.fileMaxReached||this.bytesMaxReached||this.filesToUploadExceedsLimit||this.filesToUploadTotalSizeIsAboveMax)&&t(d,{key:"2f4db6f88150427eb99c623c1404f0556848a3e2"},t("duet-spacer",{key:"d9a182225a80cf3b31272bc3f45db3ae7f8456a2",size:"medium"}),t("duet-alert",{key:"8d2209357e096a6c47fe1465d8ca66d900c8935b",part:this.identifier?`${this.identifier}-error-notification`:"duet-upload-error-notification"},this.fileMaxReached&&w("duet-upload-301",this.errorCodes),this.bytesMaxReached&&w("duet-upload-202",this.errorCodes),this.filesToUploadExceedsLimit&&w("duet-upload-302",this.errorCodes),this.filesToUploadTotalSizeIsAboveMax&&w("duet-upload-203",this.errorCodes))),t("duet-visually-hidden",{key:"4be261bd112017729973d2def23f9b384d11b556","aria-hidden":"true"},t("input",{key:"03b8b40bd9488b6de5091aa5ae46e4d146732f17",ref:t=>{this.nativeInput=t},accept:this.limitSelection?`${this.allowedMimetypes},${this.allowedExtensions}`:void 0,onBlur:this.onBlur,onFocus:this.onFocus,onChange:t=>this.onChange(t),type:"file",class:{"duet-upload":!0},disabled:this.disabled,"aria-hidden":"true",required:this.required,name:this.name,id:this.identifier,multiple:this.multiple,tabIndex:-1}))))}makeXHRPostRequest(t){const e=new XMLHttpRequest,i=t.get("name");e.upload.addEventListener("progress",(t=>{this.updateProgress(t,i)})),e.upload.addEventListener("load",(()=>{this.transferComplete(i)})),e.upload.addEventListener("error",(()=>{this.transferFailed(i)})),e.upload.addEventListener("abort",(()=>{this.transferCanceled(i)}));let a={payload:{data:t,name:i},options:{type:"POST",uri:this.uri,xhr:e,argument:null,headers:void 0},onFailure:this.transferDoneWithFailure,onSuccess:this.transferDone,onProgress:this.trackProgress};return this.middleware&&(a=this.middleware(a)),F(a)}makeXHRDeleteRequest(t){const{uid:e,item:i}=t,a=new XMLHttpRequest;let s={payload:{data:null,name},options:{type:"DELETE",xhr:a,uri:this.uri,argument:`?key=${e}&name=${i.name}`,headers:{"x-fileuid":e,"x-filename":i.name}},onFailure:this.transferDoneWithFailure,onSuccess:this.transferDone,onProgress:this.trackProgress};return this.middleware&&(s=this.middleware(s)),F(s)}escapeSpecialCharacters(t){return(t+"").replace(/[\\"'(){}\[\]*?$^+]/g,"\\$&").replace(/\u0000/g,"\\0")}getRenamedFileName(t,e){const i=new RegExp(`${this.escapeSpecialCharacters(t)} \\(\\d+\\).${e}`),a=Array.from(this.files.entries()).map((t=>{const[e,i]=t;return e})).filter((a=>i.test(a)||a===`${t}.${e}`)).sort(((t,e)=>t.split(".").slice(0,-1).join(".")>e.split(".").slice(0,-1).join(".")?1:-1)).pop().split(".").slice(0,-1).join(".");if(a===t)return`${t} (1).${e}`;const s=parseInt(a.split("(").pop().slice(0,-1));return`${t} (${s+1}).${e}`}renameFiles(t){return t.map((t=>{if(this.files.get(t.name)){const e=t.name.split("."),i=e.pop(),a=e.join("."),s=this.getRenamedFileName(a,i);return new File([t],s,{type:t.type,lastModified:t.lastModified})}return t}))}async onChange(t){var e;let i=Array.from(null===(e=this.nativeInput)||void 0===e?void 0:e.files);if(this.filesToUploadExceedsLimit=!1,this.files.size+i.length>this.maxFiles)return this.filesToUploadExceedsLimit=!0,void this.kick();if(this.filesToUploadTotalSizeIsAboveMax=!1,((t,e,i)=>{let a=0;return!!(i&&(this.files.forEach((t=>{t.valid&&t.size&&(a+=t.size)})),e.forEach((t=>{t.size&&(a+=t.size)})),a>=i))})(0,i,this.maxBytesTotal))return this.filesToUploadTotalSizeIsAboveMax=!0,void this.kick();if(i){this.renameDuplicates&&(i=this.renameFiles(i));for(const t of i){const{valid:e,errorMessage:i,errorType:a,errorSystem:s}=z(t,{maxBytes:this.maxBytes,allowedExtensions:this.allowedExtensions,allowedMimetypes:this.allowedMimetypes},this.errorCodes),d={uid:this.genHashName(),item:t,size:t.size,meta:this.metaData,uploaded:!1,valid:e,error:{type:e?void 0:a,message:e?void 0:i,system_message:e?void 0:s},progress:0,deleted:!1,xhr:!1,url:!1};this.files.set(t.name,d),e&&!this.external?await this.uploadFile(d):e&&this.external?(this.updateValueInMap(d.item.name,"pending",!0,!1),this.updateValueInMap(d.item.name,"group","pending",!0)):e||this.updateValueInMap(t.name,"valid",!1,!0),this.kick()}}this.resetFormFields(),this.metaData=void 0,this.duetChange.emit({originalEvent:t,data:{files:this.files},component:"duet-upload"})}get element(){return s(this)}static get watchers(){return{valid:["watchValidHandler"]}}};C.style="*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}::slotted([slot=header]){margin-bottom:16px}::slotted([slot=fileheader]){margin:16px 0 0 0}::slotted([slot=filefooter]){margin-top:16px}::slotted([slot=uploadfooter]){margin-top:20px}.duet-upload{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.duet-upload-item-size{font-size:0.75rem;font-weight:400}.duet-upload-filelist{margin-bottom:25px}.duet-upload-filelist-empty{display:flex;align-items:center;justify-content:center;width:100%;height:75px;margin:0 auto;font-size:1rem;font-weight:400;background-color:rgb(245, 248, 250)}.duet-upload-filelist-empty-label{font-size:1rem;font-weight:400}.duet-upload-editable-table-header-hidden{display:none}.duet-upload-editable-table tbody .duet-upload-editable-table-data{padding:0 !important;border:0}.duet-upload-editable-table duet-editable-table tfoot,.duet-upload-editable-table duet-editable-table thead{display:none}.duet-upload-editable-table duet-editable-table .duet-editable-table-content{padding-right:0 !important;padding-left:0 !important}.duet-upload-editable-table duet-editable-table duet-table .duet-table-action-row td{padding:1rem 0 !important}.duet-upload-editable-table duet-editable-table duet-table .duet-table-action-row td:last-child{padding-right:0 !important}.duet-upload-editable-table duet-editable-table .duet-editable-table-row-inprogress,.duet-upload-editable-table duet-editable-table .duet-editable-table-row-pending{position:relative}.duet-upload-editable-table duet-editable-table .duet-editable-table-row-inprogress duet-progress,.duet-upload-editable-table duet-editable-table .duet-editable-table-row-pending duet-progress{position:absolute;bottom:0;width:100%}.duet-upload-editable-table duet-editable-table .duet-editable-table-row-inprogress duet-action-button::part(button),.duet-upload-editable-table duet-editable-table .duet-editable-table-row-pending duet-action-button::part(button){border:0}duet-paragraph::part(duet-paragraph){word-break:break-word}duet-editable-table tfoot{display:none}.upload-bottom-caption{margin-top:12px;margin-bottom:16px;line-height:1.4rem}.items-header{display:none;flex-direction:row;margin-bottom:0}@media (min-width: 36em){.items-header{display:flex}}.items-header:not(:last-child),.items-header:not(:first-child){margin-top:12px}.items-header .category-header{width:35%}.items-header .filename-header{width:65%}.items-header .filename-header.no-category{width:100%}.upload-item-row{display:flex;flex-direction:column;gap:16px;align-content:center;align-items:center;padding:16px 0 16px 0;border-bottom:1px solid rgb(212, 223, 229)}@media (min-width: 36em){.upload-item-row{flex-direction:row;gap:10px}}.upload-item-row .item-categories{width:100%}@media (min-width: 36em){.upload-item-row .item-categories{width:35%}}.upload-item-row .item-name{position:relative;bottom:2px;width:100%;text-align:left}@media (min-width: 36em){.upload-item-row .item-name{width:50%}.upload-item-row .item-name.no-category{width:85%}}.upload-item-row .item-categories .heading,.upload-item-row .item-name .heading{display:block}@media (min-width: 36em){.upload-item-row .item-categories .heading,.upload-item-row .item-name .heading{display:none}}.upload-item-row .item-actions{width:100%;margin-left:-8px;text-align:left}@media (min-width: 36em){.upload-item-row .item-actions{width:15%;padding-top:0;margin-left:auto;text-align:right}}.upload-item-row .duet-upload-item-name duet-icon{position:relative;top:4px}.upload-item-row .duet-upload-item-name duet-progress{display:block;margin-top:16px}";export{L as duet_editable_table,E as duet_table,C as duet_upload}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * Built with Duet Design System
3
3
  */
4
- import{r as e,h as t,H as r}from"./p-44b36dbf.js";import{i as a}from"./p-aaa7a7bd.js";const c=class{constructor(t){e(this,t),this.theme="",this.checked=!1,this.presentationOnly=!1,this.center=!1,this.type="checkbox"}componentWillLoad(){a(this)}render(){return t(r,{key:"265d69c7fac47ab340e1bce60afeecacfad74b6a",class:{"duet-theme-turva":"turva"===this.theme}},t("div",{key:"450d7b7f3fcc4e48c25b138b2faa1c948a1c3bea",role:this.presentationOnly?"presentation":null,class:{checked:this.checked}},t("div",{key:"cbc25ccaf46a53ec786f3fa24eeed574666d93cc",class:{"duet-checkmark-container":!0,center:this.center,"duet-checkmark-radio":"radio"===this.type}},this.checked&&t("div",{key:"034ea9806dbba29937fdf57e3fba5f1ff5130160",class:"duet-checkmark"}))))}};c.style=".duet-checkmark-container{position:relative;width:20px;height:20px;margin-left:auto;border:1px solid rgb(127, 150, 165);border-radius:4px;transition:border 300ms ease}.duet-checkmark-container.center{margin-right:auto}.duet-theme-turva .duet-checkmark-container{border-color:rgb(143, 147, 158)}.checked .duet-checkmark-container{background:rgb(0, 119, 179);border-color:rgb(0, 119, 179);transition:none}.duet-theme-turva .checked .duet-checkmark-container{background:rgb(23, 28, 58);border-color:rgb(23, 28, 58) !important}.duet-checkmark-container.duet-checkmark-radio{border-radius:50%}[disabled]+label .duet-checkmark-container{border-color:rgb(181, 198, 208) !important}.duet-theme-turva [disabled]+label .duet-checkmark-container{border-color:rgb(199, 202, 207) !important}.checked [disabled]+label .duet-checkmark-container{background:rgb(181, 198, 208) !important}.duet-theme-turva .checked [disabled]+label .duet-checkmark-container{background:rgb(199, 202, 207) !important}.duet-checkmark{position:absolute;top:10px;left:3px;width:5.3333333333px;height:11.8518518519px;border-top:2px solid rgb(255, 255, 255);border-right:2px solid rgb(255, 255, 255);opacity:1;transform:scaleX(-1) rotate(135deg) translateZ(0);transform-origin:left top;animation-name:duet-checkmark;animation-duration:600ms;animation-timing-function:ease-out;animation-fill-mode:forwards}@keyframes duet-checkmark{0%{width:0;height:0;opacity:1}20%{width:5.3333333333px;height:0;opacity:1}40%,100%{width:5.3333333333px;height:11.8518518519px;opacity:1}}";export{c as duet_checkmark}
4
+ import{r as e,h as t,H as r}from"./p-56df20b9.js";import{i as a}from"./p-aaa7a7bd.js";const c=class{constructor(t){e(this,t),this.theme="",this.checked=!1,this.presentationOnly=!1,this.center=!1,this.type="checkbox"}componentWillLoad(){a(this)}render(){return t(r,{key:"265d69c7fac47ab340e1bce60afeecacfad74b6a",class:{"duet-theme-turva":"turva"===this.theme}},t("div",{key:"450d7b7f3fcc4e48c25b138b2faa1c948a1c3bea",role:this.presentationOnly?"presentation":null,class:{checked:this.checked}},t("div",{key:"cbc25ccaf46a53ec786f3fa24eeed574666d93cc",class:{"duet-checkmark-container":!0,center:this.center,"duet-checkmark-radio":"radio"===this.type}},this.checked&&t("div",{key:"034ea9806dbba29937fdf57e3fba5f1ff5130160",class:"duet-checkmark"}))))}};c.style=".duet-checkmark-container{position:relative;width:20px;height:20px;margin-left:auto;border:1px solid rgb(127, 150, 165);border-radius:4px;transition:border 300ms ease}.duet-checkmark-container.center{margin-right:auto}.duet-theme-turva .duet-checkmark-container{border-color:rgb(143, 147, 158)}.checked .duet-checkmark-container{background:rgb(0, 119, 179);border-color:rgb(0, 119, 179);transition:none}.duet-theme-turva .checked .duet-checkmark-container{background:rgb(23, 28, 58);border-color:rgb(23, 28, 58) !important}.duet-checkmark-container.duet-checkmark-radio{border-radius:50%}[disabled]+label .duet-checkmark-container{border-color:rgb(181, 198, 208) !important}.duet-theme-turva [disabled]+label .duet-checkmark-container{border-color:rgb(199, 202, 207) !important}.checked [disabled]+label .duet-checkmark-container{background:rgb(181, 198, 208) !important}.duet-theme-turva .checked [disabled]+label .duet-checkmark-container{background:rgb(199, 202, 207) !important}.duet-checkmark{position:absolute;top:10px;left:3px;width:5.3333333333px;height:11.8518518519px;border-top:2px solid rgb(255, 255, 255);border-right:2px solid rgb(255, 255, 255);opacity:1;transform:scaleX(-1) rotate(135deg) translateZ(0);transform-origin:left top;animation-name:duet-checkmark;animation-duration:600ms;animation-timing-function:ease-out;animation-fill-mode:forwards}@keyframes duet-checkmark{0%{width:0;height:0;opacity:1}20%{width:5.3333333333px;height:0;opacity:1}40%,100%{width:5.3333333333px;height:11.8518518519px;opacity:1}}";export{c as duet_checkmark}