@duetds/components 6.4.0 → 6.5.1

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 (504) hide show
  1. package/hydrate/index.js +120 -118
  2. package/lib/cjs/duet-action-button.cjs.entry.js +1 -1
  3. package/lib/cjs/duet-alert.cjs.entry.js +1 -1
  4. package/lib/cjs/duet-badge.cjs.entry.js +1 -1
  5. package/lib/cjs/duet-breadcrumb.cjs.entry.js +1 -1
  6. package/lib/cjs/duet-breadcrumbs.cjs.entry.js +1 -1
  7. package/lib/cjs/duet-button_2.cjs.entry.js +1 -1
  8. package/lib/cjs/duet-caption_4.cjs.entry.js +1 -1
  9. package/lib/cjs/duet-card.cjs.entry.js +1 -1
  10. package/lib/cjs/duet-checkbox.cjs.entry.js +1 -1
  11. package/lib/cjs/duet-choice_2.cjs.entry.js +2 -2
  12. package/lib/cjs/duet-collapsible.cjs.entry.js +1 -1
  13. package/lib/cjs/duet-combobox.cjs.entry.js +1 -1
  14. package/lib/cjs/duet-cookie-consent.cjs.entry.js +1 -1
  15. package/lib/cjs/duet-date-picker.cjs.entry.js +2 -2
  16. package/lib/cjs/duet-divider_2.cjs.entry.js +1 -1
  17. package/lib/cjs/duet-editable-table_3.cjs.entry.js +1 -1
  18. package/lib/cjs/duet-empty-state.cjs.entry.js +1 -1
  19. package/lib/cjs/duet-fieldset.cjs.entry.js +1 -1
  20. package/lib/cjs/duet-footer.cjs.entry.js +1 -1
  21. package/lib/cjs/duet-grid_2.cjs.entry.js +1 -1
  22. package/lib/cjs/duet-header_2.cjs.entry.js +1 -1
  23. package/lib/cjs/duet-hero.cjs.entry.js +1 -1
  24. package/lib/cjs/duet-icon.cjs.entry.js +1 -1
  25. package/lib/cjs/duet-input_2.cjs.entry.js +1 -1
  26. package/lib/cjs/duet-layout.cjs.entry.js +1 -1
  27. package/lib/cjs/duet-list_2.cjs.entry.js +1 -1
  28. package/lib/cjs/duet-menu-bar-button.cjs.entry.js +79 -0
  29. package/lib/cjs/duet-menu-bar-dropdown-link.cjs.entry.js +1 -1
  30. package/lib/cjs/duet-menu-bar-dropdown.cjs.entry.js +1 -1
  31. package/lib/cjs/duet-menu-bar-link.cjs.entry.js +2 -16
  32. package/lib/cjs/duet-menu-bar.cjs.entry.js +2 -2
  33. package/lib/cjs/duet-modal.cjs.entry.js +2 -2
  34. package/lib/cjs/duet-multiselect.cjs.entry.js +1 -1
  35. package/lib/cjs/duet-nav.cjs.entry.js +1 -1
  36. package/lib/cjs/duet-notification_2.cjs.entry.js +1 -1
  37. package/lib/cjs/duet-number-input.cjs.entry.js +1 -1
  38. package/lib/cjs/duet-pagination_2.cjs.entry.js +1 -1
  39. package/lib/cjs/duet-progress.cjs.entry.js +1 -1
  40. package/lib/cjs/duet-radio_2.cjs.entry.js +1 -1
  41. package/lib/cjs/duet-range-slider.cjs.entry.js +1 -1
  42. package/lib/cjs/duet-scrollable_3.cjs.entry.js +1 -1
  43. package/lib/cjs/duet-section-layout.cjs.entry.js +1 -1
  44. package/lib/cjs/duet-select.cjs.entry.js +1 -1
  45. package/lib/cjs/duet-slideout-lang.cjs.entry.js +2 -2
  46. package/lib/cjs/duet-slideout-link.cjs.entry.js +5 -4
  47. package/lib/cjs/duet-slideout-panel-dropdown.cjs.entry.js +6 -2
  48. package/lib/cjs/duet-slideout-panel.cjs.entry.js +5 -4
  49. package/lib/cjs/duet-slideout.cjs.entry.js +18 -7
  50. package/lib/cjs/duet-step_2.cjs.entry.js +1 -1
  51. package/lib/cjs/duet-submenu-bar-dropdown-link.cjs.entry.js +1 -1
  52. package/lib/cjs/duet-submenu-bar-dropdown.cjs.entry.js +1 -1
  53. package/lib/cjs/duet-submenu-bar-link.cjs.entry.js +1 -1
  54. package/lib/cjs/duet-submenu-bar.cjs.entry.js +1 -1
  55. package/lib/cjs/duet-textarea.cjs.entry.js +1 -1
  56. package/lib/cjs/duet-toggle.cjs.entry.js +1 -1
  57. package/lib/cjs/duet-toolbar-dropdown-link.cjs.entry.js +1 -1
  58. package/lib/cjs/duet-toolbar-dropdown.cjs.entry.js +1 -1
  59. package/lib/cjs/duet-toolbar-link.cjs.entry.js +1 -1
  60. package/lib/cjs/duet-toolbar.cjs.entry.js +1 -1
  61. package/lib/cjs/duet-tooltip.cjs.entry.js +1 -1
  62. package/lib/cjs/duet-tray.cjs.entry.js +1 -1
  63. package/lib/cjs/duet-upload-aria-status.cjs.entry.js +1 -1
  64. package/lib/cjs/duet-visually-hidden.cjs.entry.js +1 -1
  65. package/lib/cjs/duet.cjs.js +2 -2
  66. package/lib/cjs/{focus-utils-2b652cc4.js → focus-utils-51b5276c.js} +1 -1
  67. package/lib/cjs/{index-164ccd93.js → index-64cbfac2.js} +1 -1
  68. package/lib/cjs/loader.cjs.js +2 -2
  69. package/lib/collection/collection-manifest.json +1 -2
  70. package/lib/collection/components/duet-menu-bar/duet-menu-bar.css +22 -0
  71. package/lib/collection/components/{duet-slideout-panel-link/duet-slideout-panel-link.css → duet-menu-bar-button/duet-menu-bar-button.css} +23 -13
  72. package/lib/collection/components/duet-menu-bar-button/duet-menu-bar-button.js +156 -0
  73. package/lib/collection/components/duet-menu-bar-link/duet-menu-bar-link.css +6 -33
  74. package/lib/collection/components/duet-menu-bar-link/duet-menu-bar-link.js +0 -14
  75. package/lib/collection/components/duet-slideout/duet-slideout.css +27 -34
  76. package/lib/collection/components/duet-slideout/duet-slideout.js +45 -5
  77. package/lib/collection/components/duet-slideout-lang/duet-slideout-lang.css +1 -0
  78. package/lib/collection/components/duet-slideout-link/duet-slideout-link.css +9 -7
  79. package/lib/collection/components/duet-slideout-link/duet-slideout-link.js +27 -5
  80. package/lib/collection/components/duet-slideout-panel/duet-slideout-panel.css +30 -5
  81. package/lib/collection/components/duet-slideout-panel/duet-slideout-panel.js +20 -1
  82. package/lib/collection/components/duet-slideout-panel-dropdown/duet-slideout-panel-dropdown.css +21 -5
  83. package/lib/collection/components/duet-slideout-panel-dropdown/duet-slideout-panel-dropdown.js +4 -0
  84. package/lib/dist-custom-elements/duet-action-button.js +1 -1
  85. package/lib/dist-custom-elements/duet-alert.js +1 -1
  86. package/lib/dist-custom-elements/duet-badge.js +1 -1
  87. package/lib/dist-custom-elements/duet-breadcrumb.js +2 -2
  88. package/lib/dist-custom-elements/duet-breadcrumbs.js +2 -2
  89. package/lib/dist-custom-elements/duet-button.js +1 -1
  90. package/lib/dist-custom-elements/duet-caption.js +1 -1
  91. package/lib/dist-custom-elements/duet-card.js +3 -3
  92. package/lib/dist-custom-elements/duet-checkbox.js +1 -1
  93. package/lib/dist-custom-elements/duet-choice-group.js +6 -6
  94. package/lib/dist-custom-elements/duet-choice.js +5 -5
  95. package/lib/dist-custom-elements/duet-collapsible.js +2 -2
  96. package/lib/dist-custom-elements/duet-combobox.js +2 -2
  97. package/lib/dist-custom-elements/duet-cookie-consent.js +6 -6
  98. package/lib/dist-custom-elements/duet-date-picker.js +8 -8
  99. package/lib/dist-custom-elements/duet-divider.js +1 -1
  100. package/lib/dist-custom-elements/duet-editable-table.js +1 -1
  101. package/lib/dist-custom-elements/duet-empty-state.js +1 -1
  102. package/lib/dist-custom-elements/duet-fieldset.js +1 -1
  103. package/lib/dist-custom-elements/duet-footer.js +4 -4
  104. package/lib/dist-custom-elements/duet-grid-item.js +1 -1
  105. package/lib/dist-custom-elements/duet-grid.js +1 -1
  106. package/lib/dist-custom-elements/duet-header.js +8 -8
  107. package/lib/dist-custom-elements/duet-heading.js +1 -1
  108. package/lib/dist-custom-elements/duet-hero.js +9 -9
  109. package/lib/dist-custom-elements/duet-icon.js +1 -1
  110. package/lib/dist-custom-elements/duet-input.js +1 -1
  111. package/lib/dist-custom-elements/duet-label.js +1 -1
  112. package/lib/dist-custom-elements/duet-layout.js +1 -1
  113. package/lib/dist-custom-elements/duet-link.js +1 -1
  114. package/lib/dist-custom-elements/duet-list-item.js +1 -1
  115. package/lib/dist-custom-elements/duet-list.js +1 -1
  116. package/lib/dist-custom-elements/duet-logo.js +1 -1
  117. package/lib/dist-custom-elements/duet-menu-bar-button.d.ts +11 -0
  118. package/lib/dist-custom-elements/duet-menu-bar-button.js +104 -0
  119. package/lib/dist-custom-elements/duet-menu-bar-dropdown-link.js +2 -2
  120. package/lib/dist-custom-elements/duet-menu-bar-dropdown.js +2 -2
  121. package/lib/dist-custom-elements/duet-menu-bar-link.js +3 -17
  122. package/lib/dist-custom-elements/duet-menu-bar.js +3 -3
  123. package/lib/dist-custom-elements/duet-modal.js +7 -7
  124. package/lib/dist-custom-elements/duet-multiselect.js +8 -8
  125. package/lib/dist-custom-elements/duet-nav.js +1 -1
  126. package/lib/dist-custom-elements/duet-notification-drawer.js +4 -4
  127. package/lib/dist-custom-elements/duet-notification.js +2 -2
  128. package/lib/dist-custom-elements/duet-number-input.js +7 -7
  129. package/lib/dist-custom-elements/duet-pagination.js +7 -7
  130. package/lib/dist-custom-elements/duet-paragraph.js +1 -1
  131. package/lib/dist-custom-elements/duet-progress.js +1 -1
  132. package/lib/dist-custom-elements/duet-radio-group.js +6 -6
  133. package/lib/dist-custom-elements/duet-radio.js +1 -1
  134. package/lib/dist-custom-elements/duet-range-slider.js +2 -2
  135. package/lib/dist-custom-elements/duet-range-stepper.js +4 -4
  136. package/lib/dist-custom-elements/duet-scrollable.js +1 -1
  137. package/lib/dist-custom-elements/duet-section-layout.js +1 -1
  138. package/lib/dist-custom-elements/duet-select.js +1 -1
  139. package/lib/dist-custom-elements/duet-slideout-lang.js +4 -4
  140. package/lib/dist-custom-elements/duet-slideout-link.js +8 -6
  141. package/lib/dist-custom-elements/duet-slideout-panel-dropdown.js +7 -3
  142. package/lib/dist-custom-elements/duet-slideout-panel.js +6 -4
  143. package/lib/dist-custom-elements/duet-slideout.js +19 -7
  144. package/lib/dist-custom-elements/duet-spacer.js +1 -1
  145. package/lib/dist-custom-elements/duet-spinner.js +1 -1
  146. package/lib/dist-custom-elements/duet-step.js +4 -4
  147. package/lib/dist-custom-elements/duet-stepper.js +2 -2
  148. package/lib/dist-custom-elements/duet-submenu-bar-dropdown-link.js +2 -2
  149. package/lib/dist-custom-elements/duet-submenu-bar-dropdown.js +2 -2
  150. package/lib/dist-custom-elements/duet-submenu-bar-link.js +2 -2
  151. package/lib/dist-custom-elements/duet-submenu-bar.js +2 -2
  152. package/lib/dist-custom-elements/duet-tab-group.js +8 -8
  153. package/lib/dist-custom-elements/duet-tab.js +1 -1
  154. package/lib/dist-custom-elements/duet-table.js +1 -1
  155. package/lib/dist-custom-elements/duet-textarea.js +8 -8
  156. package/lib/dist-custom-elements/duet-toggle.js +2 -2
  157. package/lib/dist-custom-elements/duet-toolbar-dropdown-link.js +2 -2
  158. package/lib/dist-custom-elements/duet-toolbar-dropdown.js +2 -2
  159. package/lib/dist-custom-elements/duet-toolbar-link.js +2 -2
  160. package/lib/dist-custom-elements/duet-toolbar.js +1 -1
  161. package/lib/dist-custom-elements/duet-tooltip.js +1 -1
  162. package/lib/dist-custom-elements/duet-tray.js +3 -3
  163. package/lib/dist-custom-elements/duet-upload-aria-status.js +1 -1
  164. package/lib/dist-custom-elements/duet-upload.js +18 -18
  165. package/lib/dist-custom-elements/duet-visually-hidden.js +1 -1
  166. package/lib/dist-custom-elements/index.d.ts +1 -2
  167. package/lib/dist-custom-elements/index.js +2 -3
  168. package/lib/dist-custom-elements/{p-ff6fc54f.js → p-012ce9cd.js} +1 -1
  169. package/lib/dist-custom-elements/{p-c2463a4d.js → p-0d44f43d.js} +1 -1
  170. package/lib/dist-custom-elements/{p-532c54fb.js → p-0df84707.js} +1 -1
  171. package/lib/dist-custom-elements/{p-322d1aa1.js → p-1287c9f0.js} +3 -3
  172. package/lib/dist-custom-elements/{p-3e96f1ea.js → p-14c4ae63.js} +1 -1
  173. package/lib/dist-custom-elements/{p-5f1ada5a.js → p-19125b3a.js} +1 -1
  174. package/lib/dist-custom-elements/{p-d0e0ef81.js → p-1cfd49ee.js} +2 -2
  175. package/lib/dist-custom-elements/{p-6be9ba98.js → p-21cfd55b.js} +1 -1
  176. package/lib/dist-custom-elements/{p-bd2b0442.js → p-2cae1940.js} +1 -1
  177. package/lib/dist-custom-elements/{p-9ead813e.js → p-45377b84.js} +4 -4
  178. package/lib/dist-custom-elements/{p-b4d8113c.js → p-59d01811.js} +1 -1
  179. package/lib/dist-custom-elements/{p-605b6117.js → p-667f368c.js} +6 -6
  180. package/lib/dist-custom-elements/{p-2836cc93.js → p-6775ca86.js} +6 -6
  181. package/lib/dist-custom-elements/{p-4e60ac5b.js → p-688a047d.js} +3 -3
  182. package/lib/dist-custom-elements/{p-5ebb99dd.js → p-788c36f2.js} +5 -5
  183. package/lib/dist-custom-elements/{p-5bcd669c.js → p-84e4317d.js} +2 -2
  184. package/lib/dist-custom-elements/{p-ad412049.js → p-8ece8544.js} +1 -1
  185. package/lib/dist-custom-elements/{p-0046bd9c.js → p-8ef57d6b.js} +2 -2
  186. package/lib/dist-custom-elements/{p-a9ca4b1a.js → p-9c0459ca.js} +1 -1
  187. package/lib/dist-custom-elements/{p-69e61cbd.js → p-a7331687.js} +1 -1
  188. package/lib/dist-custom-elements/{p-7f93146e.js → p-a7fc05d9.js} +1 -1
  189. package/lib/dist-custom-elements/{p-882a5cfe.js → p-aa118c82.js} +3 -3
  190. package/lib/dist-custom-elements/{p-66c822ff.js → p-c5a072f2.js} +2 -2
  191. package/lib/dist-custom-elements/{p-7cb3ff25.js → p-cb5e8149.js} +1 -1
  192. package/lib/dist-custom-elements/{p-154a3f1c.js → p-dd54924c.js} +1 -1
  193. package/lib/dist-custom-elements/{p-979e0325.js → p-e36e0709.js} +1 -1
  194. package/lib/dist-custom-elements/{p-905a69b9.js → p-ea4a0707.js} +1 -1
  195. package/lib/dist-custom-elements/{p-4516d226.js → p-ef91ff76.js} +7 -7
  196. package/lib/dist-custom-elements/{p-d2401c36.js → p-f04e8a3b.js} +2 -2
  197. package/lib/dist-custom-elements/{p-671e7f8b.js → p-f0803854.js} +1 -1
  198. package/lib/dist-custom-elements/{p-1fdcf20f.js → p-fe6b0ed3.js} +1 -1
  199. package/lib/duet/duet.esm.js +1 -1
  200. package/lib/duet/duet.js +1 -1
  201. package/lib/duet/{p-68837c63.entry.js → p-0112579c.entry.js} +1 -1
  202. package/lib/duet/{p-88822dbd.system.entry.js → p-01b63777.system.entry.js} +1 -1
  203. package/lib/duet/{p-6af671d6.system.js → p-01fcb80e.system.js} +1 -1
  204. package/lib/duet/{p-6d4cfcb6.entry.js → p-03ee21a3.entry.js} +1 -1
  205. package/lib/duet/p-054a2d07.system.entry.js +4 -0
  206. package/lib/duet/{p-a9465ece.system.entry.js → p-0590a8c0.system.entry.js} +1 -1
  207. package/lib/duet/{p-ea91bf03.system.entry.js → p-09be550b.system.entry.js} +1 -1
  208. package/lib/duet/{p-e0a8bb43.entry.js → p-0b415c31.entry.js} +1 -1
  209. package/lib/duet/{p-83d8e53e.system.entry.js → p-16911df0.system.entry.js} +1 -1
  210. package/lib/duet/{p-4a282246.system.entry.js → p-17e21461.system.entry.js} +1 -1
  211. package/lib/duet/p-1ab5cbbc.entry.js +4 -0
  212. package/lib/duet/{p-933f25ba.entry.js → p-1c82d61e.entry.js} +1 -1
  213. package/lib/duet/{p-c6780fab.entry.js → p-1d08b9ed.entry.js} +1 -1
  214. package/lib/duet/{p-a5a295c0.system.entry.js → p-1d2a9cf6.system.entry.js} +1 -1
  215. package/lib/duet/{p-f4b76c99.system.entry.js → p-1f745490.system.entry.js} +1 -1
  216. package/lib/duet/{p-27a4c915.entry.js → p-233e91ea.entry.js} +1 -1
  217. package/lib/duet/{p-363d64ad.entry.js → p-24cb9a5c.entry.js} +1 -1
  218. package/lib/duet/{p-f68637c0.entry.js → p-26d917a0.entry.js} +1 -1
  219. package/lib/duet/{p-3bbf5056.entry.js → p-276895fe.entry.js} +1 -1
  220. package/lib/duet/{p-29f05da5.system.entry.js → p-2aed3283.system.entry.js} +1 -1
  221. package/lib/duet/{p-5e330ea8.entry.js → p-2afce187.entry.js} +1 -1
  222. package/lib/duet/{p-9b2b98f1.entry.js → p-2b5f338b.entry.js} +1 -1
  223. package/lib/duet/{p-201d6ec1.system.entry.js → p-2b73dd59.system.entry.js} +1 -1
  224. package/lib/duet/{p-3782e7bd.system.js → p-2c67137b.system.js} +1 -1
  225. package/lib/duet/{p-ac049db3.entry.js → p-2cea3fdb.entry.js} +1 -1
  226. package/lib/duet/{p-25ae871d.system.entry.js → p-2deda672.system.entry.js} +1 -1
  227. package/lib/duet/p-2e49d057.entry.js +4 -0
  228. package/lib/duet/{p-020ca1b6.system.entry.js → p-2fdbd2c6.system.entry.js} +1 -1
  229. package/lib/duet/{p-a3d9704b.system.entry.js → p-31e877bf.system.entry.js} +1 -1
  230. package/lib/duet/{p-3ff9ea7b.entry.js → p-3211450e.entry.js} +1 -1
  231. package/lib/duet/{p-ce29e9a8.system.entry.js → p-341a9eb0.system.entry.js} +1 -1
  232. package/lib/duet/p-35bb4ee9.entry.js +4 -0
  233. package/lib/duet/{p-27103116.entry.js → p-362174cc.entry.js} +1 -1
  234. package/lib/duet/{p-4c71d0e1.entry.js → p-37de9a2f.entry.js} +1 -1
  235. package/lib/duet/{p-aa7238b4.system.entry.js → p-3937796f.system.entry.js} +1 -1
  236. package/lib/duet/p-3d4aa492.system.entry.js +4 -0
  237. package/lib/duet/{p-ba5d5cd0.entry.js → p-3e5839c6.entry.js} +1 -1
  238. package/lib/duet/{p-1754b0d2.entry.js → p-3f2d8fe4.entry.js} +1 -1
  239. package/lib/duet/{p-4235cfd4.entry.js → p-3f375bef.entry.js} +1 -1
  240. package/lib/duet/{p-1b441904.system.entry.js → p-401a0998.system.entry.js} +1 -1
  241. package/lib/duet/{p-e7bdc3e3.entry.js → p-408a536f.entry.js} +1 -1
  242. package/lib/duet/{p-0fc9f792.entry.js → p-40ac94f6.entry.js} +1 -1
  243. package/lib/duet/{p-7dfd3e05.entry.js → p-42e7aa32.entry.js} +1 -1
  244. package/lib/duet/{p-651fafda.system.entry.js → p-437083ed.system.entry.js} +1 -1
  245. package/lib/duet/{p-cf9c0ba9.entry.js → p-44d2a1b5.entry.js} +1 -1
  246. package/lib/duet/{p-b16d25ab.entry.js → p-48aa12e2.entry.js} +1 -1
  247. package/lib/duet/{p-3cf79f67.system.entry.js → p-4970d360.system.entry.js} +1 -1
  248. package/lib/duet/p-4ab49eb4.js +4 -0
  249. package/lib/duet/{p-d6ecfe56.system.entry.js → p-4b838a9c.system.entry.js} +1 -1
  250. package/lib/duet/{p-c69632a2.system.entry.js → p-4c12d8ba.system.entry.js} +1 -1
  251. package/lib/duet/{p-e798f1ed.system.entry.js → p-4ce3c6a6.system.entry.js} +1 -1
  252. package/lib/duet/{p-6d8e829d.entry.js → p-4e37aedf.entry.js} +1 -1
  253. package/lib/duet/{p-cd9d47f5.system.entry.js → p-4e3e91fd.system.entry.js} +1 -1
  254. package/lib/duet/{p-a140fdcb.system.entry.js → p-525687a7.system.entry.js} +1 -1
  255. package/lib/duet/p-555192b0.system.entry.js +4 -0
  256. package/lib/duet/{p-b294e39d.system.entry.js → p-593f2330.system.entry.js} +1 -1
  257. package/lib/duet/{p-15739a81.system.entry.js → p-5983d1b7.system.entry.js} +1 -1
  258. package/lib/duet/{p-3526ba4d.system.entry.js → p-59d13b8d.system.entry.js} +1 -1
  259. package/lib/duet/{p-e18b47a1.entry.js → p-5bfb6d98.entry.js} +1 -1
  260. package/lib/duet/{p-26fa8de6.entry.js → p-5ce46c84.entry.js} +1 -1
  261. package/lib/duet/p-5feb0657.system.entry.js +4 -0
  262. package/lib/duet/p-64cca33a.entry.js +4 -0
  263. package/lib/duet/p-64d1cc95.entry.js +4 -0
  264. package/lib/duet/p-66f2c12f.system.entry.js +4 -0
  265. package/lib/duet/{p-7c34ca99.system.entry.js → p-672dcefc.system.entry.js} +1 -1
  266. package/lib/duet/{p-03ff3ed6.system.entry.js → p-6921cfa6.system.entry.js} +2 -2
  267. package/lib/duet/{p-f8f307f4.system.entry.js → p-6ab272dd.system.entry.js} +1 -1
  268. package/lib/duet/{p-f3e34507.entry.js → p-6afd7b03.entry.js} +1 -1
  269. package/lib/duet/{p-be05eaac.system.entry.js → p-6c5f600b.system.entry.js} +1 -1
  270. package/lib/duet/{p-09438348.entry.js → p-6cde8c43.entry.js} +1 -1
  271. package/lib/duet/{p-246da892.entry.js → p-6cf7ebc2.entry.js} +1 -1
  272. package/lib/duet/p-6d7d186f.entry.js +4 -0
  273. package/lib/duet/p-6e75fbd6.system.entry.js +4 -0
  274. package/lib/duet/{p-02332064.entry.js → p-704eb099.entry.js} +1 -1
  275. package/lib/duet/{p-0a343e6c.system.entry.js → p-75c38aee.system.entry.js} +1 -1
  276. package/lib/duet/{p-c3a7e038.system.entry.js → p-77e3c513.system.entry.js} +1 -1
  277. package/lib/duet/p-781aa86e.system.entry.js +4 -0
  278. package/lib/duet/{p-76835261.system.entry.js → p-7bd6683a.system.entry.js} +1 -1
  279. package/lib/duet/{p-28e309cf.entry.js → p-7c4798b2.entry.js} +1 -1
  280. package/lib/duet/{p-ecc5f30c.entry.js → p-7d54d6e1.entry.js} +1 -1
  281. package/lib/duet/{p-e968004c.entry.js → p-80c05a0f.entry.js} +1 -1
  282. package/lib/duet/{p-831f1019.system.entry.js → p-823de698.system.entry.js} +1 -1
  283. package/lib/duet/{p-2eb091c9.system.entry.js → p-85658cea.system.entry.js} +1 -1
  284. package/lib/duet/{p-e6f05953.system.entry.js → p-87f2c5d4.system.entry.js} +1 -1
  285. package/lib/duet/{p-3e278513.entry.js → p-890aabd1.entry.js} +1 -1
  286. package/lib/duet/{p-56c12873.system.entry.js → p-8e05ca49.system.entry.js} +1 -1
  287. package/lib/duet/{p-3117deb6.entry.js → p-8f69d87b.entry.js} +1 -1
  288. package/lib/duet/{p-729b0d66.system.entry.js → p-91893eb4.system.entry.js} +1 -1
  289. package/lib/duet/{p-1317aa26.system.entry.js → p-933256d2.system.entry.js} +1 -1
  290. package/lib/duet/{p-1373f6ca.entry.js → p-942e7a28.entry.js} +1 -1
  291. package/lib/duet/{p-43c7a428.system.entry.js → p-97816dce.system.entry.js} +1 -1
  292. package/lib/duet/{p-21124c1f.entry.js → p-9884486c.entry.js} +1 -1
  293. package/lib/duet/p-98c780ad.system.entry.js +4 -0
  294. package/lib/duet/{p-46c1d349.system.entry.js → p-99e33456.system.entry.js} +1 -1
  295. package/lib/duet/{p-954415a2.entry.js → p-9b4402ef.entry.js} +1 -1
  296. package/lib/duet/{p-d25b4394.entry.js → p-9b4de80f.entry.js} +1 -1
  297. package/lib/duet/{p-129bb559.system.entry.js → p-9c7ecd2a.system.entry.js} +1 -1
  298. package/lib/duet/{p-8810b6a2.entry.js → p-a3047a26.entry.js} +1 -1
  299. package/lib/duet/{p-48e43d00.entry.js → p-a9f36246.entry.js} +1 -1
  300. package/lib/duet/{p-c40ee0fe.js → p-ab11408b.js} +1 -1
  301. package/lib/duet/{p-12cdb87f.entry.js → p-ab4e81ca.entry.js} +1 -1
  302. package/lib/duet/{p-6917abaf.entry.js → p-ac1eaf2d.entry.js} +1 -1
  303. package/lib/duet/{p-38dc7f9b.entry.js → p-ae39325e.entry.js} +1 -1
  304. package/lib/duet/{p-e788148c.entry.js → p-b519684f.entry.js} +1 -1
  305. package/lib/duet/{p-047f5071.system.entry.js → p-b8decc75.system.entry.js} +1 -1
  306. package/lib/duet/{p-602376c0.system.entry.js → p-b94a478a.system.entry.js} +1 -1
  307. package/lib/duet/{p-72d0199b.system.entry.js → p-ba93a403.system.entry.js} +1 -1
  308. package/lib/duet/{p-d79ac44b.system.entry.js → p-c1f14850.system.entry.js} +1 -1
  309. package/lib/duet/p-c87eeeb5.system.js +4 -0
  310. package/lib/duet/{p-836893af.system.entry.js → p-d15c8354.system.entry.js} +1 -1
  311. package/lib/duet/{p-51cab7d1.system.entry.js → p-d30d6c41.system.entry.js} +1 -1
  312. package/lib/duet/{p-ff5d1690.entry.js → p-d39cf5b1.entry.js} +1 -1
  313. package/lib/duet/{p-a87d96ef.entry.js → p-d6b7e4e9.entry.js} +1 -1
  314. package/lib/duet/{p-e8a0df5a.entry.js → p-da31f5fc.entry.js} +1 -1
  315. package/lib/duet/{p-9d2eddb6.entry.js → p-da71d66d.entry.js} +1 -1
  316. package/lib/duet/{p-80129dd8.entry.js → p-de635e2e.entry.js} +1 -1
  317. package/lib/duet/{p-2edff55b.entry.js → p-e3165e41.entry.js} +1 -1
  318. package/lib/duet/{p-a205042e.system.entry.js → p-e4eb67fa.system.entry.js} +1 -1
  319. package/lib/duet/{p-a360fd9e.system.entry.js → p-e53e892f.system.entry.js} +1 -1
  320. package/lib/duet/{p-0aa05098.entry.js → p-e68499ea.entry.js} +1 -1
  321. package/lib/duet/{p-2052a736.entry.js → p-e781e62c.entry.js} +1 -1
  322. package/lib/duet/{p-af157cd4.system.entry.js → p-e7a8d51f.system.entry.js} +1 -1
  323. package/lib/duet/{p-5cd03fcc.system.entry.js → p-ec7699f0.system.entry.js} +1 -1
  324. package/lib/duet/{p-1f202456.system.entry.js → p-ec91cdca.system.entry.js} +1 -1
  325. package/lib/duet/{p-42733735.entry.js → p-f3301cbc.entry.js} +1 -1
  326. package/lib/duet/{p-6953d6e1.entry.js → p-f36dc895.entry.js} +1 -1
  327. package/lib/duet/{p-b0b27e49.entry.js → p-f54e0616.entry.js} +1 -1
  328. package/lib/duet/{p-ebf1699f.system.entry.js → p-f6a3085c.system.entry.js} +1 -1
  329. package/lib/duet/{p-ce68689b.entry.js → p-f9be45b3.entry.js} +1 -1
  330. package/lib/duet/{p-f7391f5a.system.entry.js → p-fb74bd6a.system.entry.js} +1 -1
  331. package/lib/duet/{p-448aa1de.system.entry.js → p-fd2c782d.system.entry.js} +1 -1
  332. package/lib/esm/duet-action-button.entry.js +1 -1
  333. package/lib/esm/duet-alert.entry.js +1 -1
  334. package/lib/esm/duet-badge.entry.js +1 -1
  335. package/lib/esm/duet-breadcrumb.entry.js +1 -1
  336. package/lib/esm/duet-breadcrumbs.entry.js +1 -1
  337. package/lib/esm/duet-button_2.entry.js +1 -1
  338. package/lib/esm/duet-caption_4.entry.js +1 -1
  339. package/lib/esm/duet-card.entry.js +1 -1
  340. package/lib/esm/duet-checkbox.entry.js +1 -1
  341. package/lib/esm/duet-choice_2.entry.js +2 -2
  342. package/lib/esm/duet-collapsible.entry.js +1 -1
  343. package/lib/esm/duet-combobox.entry.js +1 -1
  344. package/lib/esm/duet-cookie-consent.entry.js +1 -1
  345. package/lib/esm/duet-date-picker.entry.js +2 -2
  346. package/lib/esm/duet-divider_2.entry.js +1 -1
  347. package/lib/esm/duet-editable-table_3.entry.js +1 -1
  348. package/lib/esm/duet-empty-state.entry.js +1 -1
  349. package/lib/esm/duet-fieldset.entry.js +1 -1
  350. package/lib/esm/duet-footer.entry.js +1 -1
  351. package/lib/esm/duet-grid_2.entry.js +1 -1
  352. package/lib/esm/duet-header_2.entry.js +1 -1
  353. package/lib/esm/duet-hero.entry.js +1 -1
  354. package/lib/esm/duet-icon.entry.js +1 -1
  355. package/lib/esm/duet-input_2.entry.js +1 -1
  356. package/lib/esm/duet-layout.entry.js +1 -1
  357. package/lib/esm/duet-list_2.entry.js +1 -1
  358. package/lib/esm/duet-menu-bar-button.entry.js +75 -0
  359. package/lib/esm/duet-menu-bar-dropdown-link.entry.js +1 -1
  360. package/lib/esm/duet-menu-bar-dropdown.entry.js +1 -1
  361. package/lib/esm/duet-menu-bar-link.entry.js +2 -16
  362. package/lib/esm/duet-menu-bar.entry.js +2 -2
  363. package/lib/esm/duet-modal.entry.js +2 -2
  364. package/lib/esm/duet-multiselect.entry.js +1 -1
  365. package/lib/esm/duet-nav.entry.js +1 -1
  366. package/lib/esm/duet-notification_2.entry.js +1 -1
  367. package/lib/esm/duet-number-input.entry.js +1 -1
  368. package/lib/esm/duet-pagination_2.entry.js +1 -1
  369. package/lib/esm/duet-progress.entry.js +1 -1
  370. package/lib/esm/duet-radio_2.entry.js +1 -1
  371. package/lib/esm/duet-range-slider.entry.js +1 -1
  372. package/lib/esm/duet-scrollable_3.entry.js +1 -1
  373. package/lib/esm/duet-section-layout.entry.js +1 -1
  374. package/lib/esm/duet-select.entry.js +1 -1
  375. package/lib/esm/duet-slideout-lang.entry.js +2 -2
  376. package/lib/esm/duet-slideout-link.entry.js +5 -4
  377. package/lib/esm/duet-slideout-panel-dropdown.entry.js +6 -2
  378. package/lib/esm/duet-slideout-panel.entry.js +5 -4
  379. package/lib/esm/duet-slideout.entry.js +18 -7
  380. package/lib/esm/duet-step_2.entry.js +1 -1
  381. package/lib/esm/duet-submenu-bar-dropdown-link.entry.js +1 -1
  382. package/lib/esm/duet-submenu-bar-dropdown.entry.js +1 -1
  383. package/lib/esm/duet-submenu-bar-link.entry.js +1 -1
  384. package/lib/esm/duet-submenu-bar.entry.js +1 -1
  385. package/lib/esm/duet-textarea.entry.js +1 -1
  386. package/lib/esm/duet-toggle.entry.js +1 -1
  387. package/lib/esm/duet-toolbar-dropdown-link.entry.js +1 -1
  388. package/lib/esm/duet-toolbar-dropdown.entry.js +1 -1
  389. package/lib/esm/duet-toolbar-link.entry.js +1 -1
  390. package/lib/esm/duet-toolbar.entry.js +1 -1
  391. package/lib/esm/duet-tooltip.entry.js +1 -1
  392. package/lib/esm/duet-tray.entry.js +1 -1
  393. package/lib/esm/duet-upload-aria-status.entry.js +1 -1
  394. package/lib/esm/duet-visually-hidden.entry.js +1 -1
  395. package/lib/esm/duet.js +2 -2
  396. package/lib/esm/{focus-utils-2902ad62.js → focus-utils-f1a08e01.js} +1 -1
  397. package/lib/esm/{index-2315b38f.js → index-bcdc5466.js} +1 -1
  398. package/lib/esm/loader.js +2 -2
  399. package/lib/esm-es5/duet-action-button.entry.js +2 -2
  400. package/lib/esm-es5/duet-alert.entry.js +1 -1
  401. package/lib/esm-es5/duet-badge.entry.js +1 -1
  402. package/lib/esm-es5/duet-breadcrumb.entry.js +1 -1
  403. package/lib/esm-es5/duet-breadcrumbs.entry.js +1 -1
  404. package/lib/esm-es5/duet-button_2.entry.js +1 -1
  405. package/lib/esm-es5/duet-caption_4.entry.js +1 -1
  406. package/lib/esm-es5/duet-card.entry.js +1 -1
  407. package/lib/esm-es5/duet-checkbox.entry.js +1 -1
  408. package/lib/esm-es5/duet-choice_2.entry.js +1 -1
  409. package/lib/esm-es5/duet-collapsible.entry.js +1 -1
  410. package/lib/esm-es5/duet-combobox.entry.js +1 -1
  411. package/lib/esm-es5/duet-cookie-consent.entry.js +1 -1
  412. package/lib/esm-es5/duet-date-picker.entry.js +1 -1
  413. package/lib/esm-es5/duet-divider_2.entry.js +1 -1
  414. package/lib/esm-es5/duet-editable-table_3.entry.js +1 -1
  415. package/lib/esm-es5/duet-empty-state.entry.js +1 -1
  416. package/lib/esm-es5/duet-fieldset.entry.js +1 -1
  417. package/lib/esm-es5/duet-footer.entry.js +1 -1
  418. package/lib/esm-es5/duet-grid_2.entry.js +1 -1
  419. package/lib/esm-es5/duet-header_2.entry.js +1 -1
  420. package/lib/esm-es5/duet-hero.entry.js +1 -1
  421. package/lib/esm-es5/duet-icon.entry.js +1 -1
  422. package/lib/esm-es5/duet-input_2.entry.js +1 -1
  423. package/lib/esm-es5/duet-layout.entry.js +1 -1
  424. package/lib/esm-es5/duet-list_2.entry.js +1 -1
  425. package/lib/esm-es5/duet-menu-bar-button.entry.js +4 -0
  426. package/lib/esm-es5/duet-menu-bar-dropdown-link.entry.js +1 -1
  427. package/lib/esm-es5/duet-menu-bar-dropdown.entry.js +1 -1
  428. package/lib/esm-es5/duet-menu-bar-link.entry.js +1 -1
  429. package/lib/esm-es5/duet-menu-bar.entry.js +1 -1
  430. package/lib/esm-es5/duet-modal.entry.js +1 -1
  431. package/lib/esm-es5/duet-multiselect.entry.js +1 -1
  432. package/lib/esm-es5/duet-nav.entry.js +1 -1
  433. package/lib/esm-es5/duet-notification_2.entry.js +1 -1
  434. package/lib/esm-es5/duet-number-input.entry.js +1 -1
  435. package/lib/esm-es5/duet-pagination_2.entry.js +1 -1
  436. package/lib/esm-es5/duet-progress.entry.js +1 -1
  437. package/lib/esm-es5/duet-radio_2.entry.js +1 -1
  438. package/lib/esm-es5/duet-range-slider.entry.js +1 -1
  439. package/lib/esm-es5/duet-scrollable_3.entry.js +1 -1
  440. package/lib/esm-es5/duet-section-layout.entry.js +1 -1
  441. package/lib/esm-es5/duet-select.entry.js +1 -1
  442. package/lib/esm-es5/duet-slideout-lang.entry.js +1 -1
  443. package/lib/esm-es5/duet-slideout-link.entry.js +1 -1
  444. package/lib/esm-es5/duet-slideout-panel-dropdown.entry.js +1 -1
  445. package/lib/esm-es5/duet-slideout-panel.entry.js +1 -1
  446. package/lib/esm-es5/duet-slideout.entry.js +2 -2
  447. package/lib/esm-es5/duet-step_2.entry.js +1 -1
  448. package/lib/esm-es5/duet-submenu-bar-dropdown-link.entry.js +1 -1
  449. package/lib/esm-es5/duet-submenu-bar-dropdown.entry.js +1 -1
  450. package/lib/esm-es5/duet-submenu-bar-link.entry.js +1 -1
  451. package/lib/esm-es5/duet-submenu-bar.entry.js +1 -1
  452. package/lib/esm-es5/duet-textarea.entry.js +1 -1
  453. package/lib/esm-es5/duet-toggle.entry.js +2 -2
  454. package/lib/esm-es5/duet-toolbar-dropdown-link.entry.js +1 -1
  455. package/lib/esm-es5/duet-toolbar-dropdown.entry.js +1 -1
  456. package/lib/esm-es5/duet-toolbar-link.entry.js +1 -1
  457. package/lib/esm-es5/duet-toolbar.entry.js +1 -1
  458. package/lib/esm-es5/duet-tooltip.entry.js +1 -1
  459. package/lib/esm-es5/duet-tray.entry.js +1 -1
  460. package/lib/esm-es5/duet-upload-aria-status.entry.js +1 -1
  461. package/lib/esm-es5/duet-visually-hidden.entry.js +1 -1
  462. package/lib/esm-es5/duet.js +1 -1
  463. package/lib/esm-es5/{focus-utils-2902ad62.js → focus-utils-f1a08e01.js} +1 -1
  464. package/lib/esm-es5/{index-2315b38f.js → index-bcdc5466.js} +1 -1
  465. package/lib/esm-es5/loader.js +1 -1
  466. package/lib/types/components/{duet-slideout-panel-link/duet-slideout-panel-link.d.ts → duet-menu-bar-button/duet-menu-bar-button.d.ts} +13 -9
  467. package/lib/types/components/duet-menu-bar-link/duet-menu-bar-link.d.ts +0 -1
  468. package/lib/types/components/duet-slideout/duet-slideout.d.ts +5 -1
  469. package/lib/types/components/duet-slideout-link/duet-slideout-link.d.ts +6 -1
  470. package/lib/types/components/duet-slideout-panel/duet-slideout-panel.d.ts +4 -0
  471. package/lib/types/components.d.ts +52 -92
  472. package/package.json +5 -5
  473. package/lib/cjs/duet-slideout-panel-dropdown-link.cjs.entry.js +0 -41
  474. package/lib/cjs/duet-slideout-panel-link.cjs.entry.js +0 -41
  475. package/lib/collection/components/duet-slideout-panel-dropdown-link/duet-slideout-panel-dropdown-link.css +0 -47
  476. package/lib/collection/components/duet-slideout-panel-dropdown-link/duet-slideout-panel-dropdown-link.js +0 -123
  477. package/lib/collection/components/duet-slideout-panel-link/duet-slideout-panel-link.js +0 -123
  478. package/lib/dist-custom-elements/duet-slideout-panel-dropdown-link.d.ts +0 -11
  479. package/lib/dist-custom-elements/duet-slideout-panel-dropdown-link.js +0 -66
  480. package/lib/dist-custom-elements/duet-slideout-panel-link.d.ts +0 -11
  481. package/lib/dist-custom-elements/duet-slideout-panel-link.js +0 -66
  482. package/lib/duet/p-0452c32b.system.entry.js +0 -4
  483. package/lib/duet/p-0a47a876.entry.js +0 -4
  484. package/lib/duet/p-29dc425b.system.entry.js +0 -4
  485. package/lib/duet/p-35d94a81.js +0 -4
  486. package/lib/duet/p-3c2f1eae.system.entry.js +0 -4
  487. package/lib/duet/p-6cb90c42.system.entry.js +0 -4
  488. package/lib/duet/p-70187927.system.js +0 -4
  489. package/lib/duet/p-77743d03.entry.js +0 -4
  490. package/lib/duet/p-90530e4b.system.entry.js +0 -4
  491. package/lib/duet/p-a1dcbcdc.entry.js +0 -4
  492. package/lib/duet/p-a513fa02.system.entry.js +0 -4
  493. package/lib/duet/p-b0a49e56.entry.js +0 -4
  494. package/lib/duet/p-b2e4b3df.system.entry.js +0 -4
  495. package/lib/duet/p-bc2b248c.entry.js +0 -4
  496. package/lib/duet/p-c61601cd.system.entry.js +0 -4
  497. package/lib/duet/p-c832245b.entry.js +0 -4
  498. package/lib/duet/p-d3a1ec04.entry.js +0 -4
  499. package/lib/duet/p-dd11bb38.system.entry.js +0 -4
  500. package/lib/esm/duet-slideout-panel-dropdown-link.entry.js +0 -37
  501. package/lib/esm/duet-slideout-panel-link.entry.js +0 -37
  502. package/lib/esm-es5/duet-slideout-panel-dropdown-link.entry.js +0 -4
  503. package/lib/esm-es5/duet-slideout-panel-link.entry.js +0 -4
  504. package/lib/types/components/duet-slideout-panel-dropdown-link/duet-slideout-panel-dropdown-link.d.ts +0 -36
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * Built with Duet Design System
3
3
  */
4
- import{r as e,c as t,h as l,H as o,g as s}from"./p-c40ee0fe.js";import{a}from"./p-115c79b6.js";import{f as i,t as n}from"./p-c4d8cad0.js";import{i as c}from"./p-4ebf1618.js";import{c as r}from"./p-c1325e35.js";import{i as p}from"./p-54f35a79.js";import{s as d}from"./p-5a9d75e1.js";const u=class{constructor(l){e(this,l),this.duetToggle=t(this,"duetToggle",7),this.id=r("DuetCollapsible"),this.handleKeyDown=e=>{p(e)&&this.handleClick(e)},this.getFontSizeFromTokens=(e=this.headingSize)=>{if(e){const t=e.replace(/-/g,"_");return n[`font_size_${t}`]}return i},this.getEquivalentIconSize=(e=this.headingSize)=>{switch(e){case"x-small":case"small":case"medium":return"xx-small";case"large":return"x-small";case"x-large":return"small";case"xx-large":return"medium";case"xxx-large":return"x-large";case"xxxx-large":return"xxx-large";default:return"xx-small"}},this.handleClick=e=>{e.preventDefault(),this.open=!this.open,this.duetToggle.emit({component:"duet-collapsible",originalEvent:e})},this.theme="",this.heading="",this.headingWeight="semibold",this.headingSize=void 0,this.headingLevel=void 0,this.margin="auto",this.open=!1}componentWillLoad(){c(this)}async setFocus(e){this.nativeButton&&(this.element.classList.add("user-is-tabbing"),this.nativeButton.focus(e))}render(){const e=this.headingLevel?d(this.headingLevel):"div";return l(o,{class:{"duet-m-0":"none"===this.margin}},l(e,{class:{"duet-collapsible-heading":!0,"duet-theme-turva":"turva"===this.theme,"duet-collapsible-normal-weight":"normal"===this.headingWeight},style:{"font-size":this.getFontSizeFromTokens()},role:"button",tabindex:"0",ref:e=>this.nativeButton=e,"aria-expanded":this.open?"true":"false","aria-controls":this.id,onClick:this.handleClick,onKeyDown:this.handleKeyDown},l("div",{class:"duet-collapsible-heading-icon"},l("duet-icon",{margin:"none",color:"turva"===this.theme?"secondary-turva":"secondary",size:this.getEquivalentIconSize(),icon:a.svg})),l("div",{class:"duet-collapsible-heading-content",part:"duet-collapsible-heading-content"},this.heading)),l("div",{id:this.id,class:{"duet-collapsible-content":!0,"duet-theme-turva":"turva"===this.theme},part:"duet-collapsible-content"},l("slot",null)))}get element(){return s(this)}};u.style='*.sc-duet-collapsible,*.sc-duet-collapsible::after,*.sc-duet-collapsible::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.sc-duet-collapsible-h{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;margin-bottom:16px !important;display:block;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.5;color:#00294d}.duet-theme-turva.sc-duet-collapsible-h{font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";color:#171c3a}.duet-m-0.sc-duet-collapsible-h{margin:0 !important}.duet-collapsible-content.sc-duet-collapsible{display:none;padding-left:18px;margin-top:8px;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;-webkit-hyphens:auto;hyphens:auto;line-height:1.5;color:#00294d}@media (max-width: 35.9375em){.duet-collapsible-content.sc-duet-collapsible{font-size:0.875rem}}.duet-collapsible-content.duet-theme-turva.sc-duet-collapsible{font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";color:#171c3a}[open].sc-duet-collapsible-h>.duet-collapsible-content.sc-duet-collapsible{display:block}.duet-collapsible-heading.sc-duet-collapsible{-webkit-user-select:none;user-select:none;display:flex;align-items:center;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.5;color:#00294d;cursor:pointer;border-radius:4px}.duet-collapsible-heading.duet-collapsible-normal-weight.sc-duet-collapsible{font-weight:400}.duet-collapsible-heading.duet-theme-turva.sc-duet-collapsible{font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";color:#171c3a}.duet-collapsible-heading.sc-duet-collapsible .duet-collapsible-heading-content.sc-duet-collapsible{flex:1}.duet-collapsible-heading.sc-duet-collapsible:focus{outline:0}.user-is-tabbing.sc-duet-collapsible-h .duet-collapsible-heading.sc-duet-collapsible:focus{border-radius:4px;box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3), 0 0 0 1px #0077b3}.user-is-tabbing.duet-theme-turva.sc-duet-collapsible-h .duet-collapsible-heading.sc-duet-collapsible:focus{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}.duet-collapsible-heading-icon.sc-duet-collapsible{margin-right:8px !important;display:flex;align-items:center;justify-content:center;color:#00294d;transition:transform 300ms ease}.duet-collapsible-heading-icon.sc-duet-collapsible:last-child,.duet-collapsible-heading-icon.sc-duet-collapsible:last-of-type{margin-right:0 !important}[aria-expanded=true].sc-duet-collapsible .duet-collapsible-heading-icon.sc-duet-collapsible{transform:rotate(180deg)}';export{u as duet_collapsible}
4
+ import{r as e,c as t,h as l,H as o,g as s}from"./p-ab11408b.js";import{a}from"./p-115c79b6.js";import{f as i,t as n}from"./p-c4d8cad0.js";import{i as c}from"./p-4ebf1618.js";import{c as r}from"./p-c1325e35.js";import{i as p}from"./p-54f35a79.js";import{s as d}from"./p-5a9d75e1.js";const u=class{constructor(l){e(this,l),this.duetToggle=t(this,"duetToggle",7),this.id=r("DuetCollapsible"),this.handleKeyDown=e=>{p(e)&&this.handleClick(e)},this.getFontSizeFromTokens=(e=this.headingSize)=>{if(e){const t=e.replace(/-/g,"_");return n[`font_size_${t}`]}return i},this.getEquivalentIconSize=(e=this.headingSize)=>{switch(e){case"x-small":case"small":case"medium":return"xx-small";case"large":return"x-small";case"x-large":return"small";case"xx-large":return"medium";case"xxx-large":return"x-large";case"xxxx-large":return"xxx-large";default:return"xx-small"}},this.handleClick=e=>{e.preventDefault(),this.open=!this.open,this.duetToggle.emit({component:"duet-collapsible",originalEvent:e})},this.theme="",this.heading="",this.headingWeight="semibold",this.headingSize=void 0,this.headingLevel=void 0,this.margin="auto",this.open=!1}componentWillLoad(){c(this)}async setFocus(e){this.nativeButton&&(this.element.classList.add("user-is-tabbing"),this.nativeButton.focus(e))}render(){const e=this.headingLevel?d(this.headingLevel):"div";return l(o,{class:{"duet-m-0":"none"===this.margin}},l(e,{class:{"duet-collapsible-heading":!0,"duet-theme-turva":"turva"===this.theme,"duet-collapsible-normal-weight":"normal"===this.headingWeight},style:{"font-size":this.getFontSizeFromTokens()},role:"button",tabindex:"0",ref:e=>this.nativeButton=e,"aria-expanded":this.open?"true":"false","aria-controls":this.id,onClick:this.handleClick,onKeyDown:this.handleKeyDown},l("div",{class:"duet-collapsible-heading-icon"},l("duet-icon",{margin:"none",color:"turva"===this.theme?"secondary-turva":"secondary",size:this.getEquivalentIconSize(),icon:a.svg})),l("div",{class:"duet-collapsible-heading-content",part:"duet-collapsible-heading-content"},this.heading)),l("div",{id:this.id,class:{"duet-collapsible-content":!0,"duet-theme-turva":"turva"===this.theme},part:"duet-collapsible-content"},l("slot",null)))}get element(){return s(this)}};u.style='*.sc-duet-collapsible,*.sc-duet-collapsible::after,*.sc-duet-collapsible::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.sc-duet-collapsible-h{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;margin-bottom:16px !important;display:block;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.5;color:#00294d}.duet-theme-turva.sc-duet-collapsible-h{font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";color:#171c3a}.duet-m-0.sc-duet-collapsible-h{margin:0 !important}.duet-collapsible-content.sc-duet-collapsible{display:none;padding-left:18px;margin-top:8px;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;-webkit-hyphens:auto;hyphens:auto;line-height:1.5;color:#00294d}@media (max-width: 35.9375em){.duet-collapsible-content.sc-duet-collapsible{font-size:0.875rem}}.duet-collapsible-content.duet-theme-turva.sc-duet-collapsible{font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";color:#171c3a}[open].sc-duet-collapsible-h>.duet-collapsible-content.sc-duet-collapsible{display:block}.duet-collapsible-heading.sc-duet-collapsible{-webkit-user-select:none;user-select:none;display:flex;align-items:center;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.5;color:#00294d;cursor:pointer;border-radius:4px}.duet-collapsible-heading.duet-collapsible-normal-weight.sc-duet-collapsible{font-weight:400}.duet-collapsible-heading.duet-theme-turva.sc-duet-collapsible{font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";color:#171c3a}.duet-collapsible-heading.sc-duet-collapsible .duet-collapsible-heading-content.sc-duet-collapsible{flex:1}.duet-collapsible-heading.sc-duet-collapsible:focus{outline:0}.user-is-tabbing.sc-duet-collapsible-h .duet-collapsible-heading.sc-duet-collapsible:focus{border-radius:4px;box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3), 0 0 0 1px #0077b3}.user-is-tabbing.duet-theme-turva.sc-duet-collapsible-h .duet-collapsible-heading.sc-duet-collapsible:focus{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}.duet-collapsible-heading-icon.sc-duet-collapsible{margin-right:8px !important;display:flex;align-items:center;justify-content:center;color:#00294d;transition:transform 300ms ease}.duet-collapsible-heading-icon.sc-duet-collapsible:last-child,.duet-collapsible-heading-icon.sc-duet-collapsible:last-of-type{margin-right:0 !important}[aria-expanded=true].sc-duet-collapsible .duet-collapsible-heading-icon.sc-duet-collapsible{transform:rotate(180deg)}';export{u as duet_collapsible}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * Built with Duet Design System
3
3
  */
4
- System.register(["./p-6af671d6.system.js","./p-33b3aba4.system.js"],(function(e){"use strict";var t,o,n,r,a;return{setters:[function(e){t=e.r;o=e.h;n=e.H;r=e.g},function(e){a=e.i}],execute:function(){var i='*,*::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%}.duet-toolbar-dropdown-link{display:flex;flex-direction:row;gap:0.5rem;align-items:center;justify-content:flex-start;height:100%;padding:0.5rem 20px;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:0.875rem;font-weight:400;line-height:1.25;color:#00294d;text-align:center;text-decoration:none}.duet-toolbar-dropdown-link.duet-theme-turva{font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";color:#171c3a}.duet-toolbar-dropdown-link.active,.duet-toolbar-dropdown-link.active:hover{color:white;background:#0077b3}.duet-toolbar-dropdown-link.active.duet-theme-turva,.duet-toolbar-dropdown-link.active:hover.duet-theme-turva{color:white;background:#c60c30}.duet-toolbar-dropdown-link:hover{background:#e6f2f8}.duet-toolbar-dropdown-link:hover.duet-theme-turva{background:#e4e4e6}';var l=e("duet_toolbar_dropdown_link",function(){function e(e){t(this,e);this.theme="";this.href="#";this.icon=undefined;this.active=false}e.prototype.componentWillLoad=function(){a(this)};e.prototype.render=function(){return o(n,null,o("a",{class:{"duet-toolbar-dropdown-link":true,"duet-theme-turva":this.theme==="turva",active:this.active},href:this.href,role:"menuitem"},this.icon&&o("duet-icon",{name:this.icon,size:"x-small",margin:"none"}),o("slot",null)))};Object.defineProperty(e.prototype,"element",{get:function(){return r(this)},enumerable:false,configurable:true});return e}());l.style=i}}}));
4
+ System.register(["./p-01fcb80e.system.js","./p-33b3aba4.system.js"],(function(e){"use strict";var t,o,n,r,a;return{setters:[function(e){t=e.r;o=e.h;n=e.H;r=e.g},function(e){a=e.i}],execute:function(){var i='*,*::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%}.duet-toolbar-dropdown-link{display:flex;flex-direction:row;gap:0.5rem;align-items:center;justify-content:flex-start;height:100%;padding:0.5rem 20px;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:0.875rem;font-weight:400;line-height:1.25;color:#00294d;text-align:center;text-decoration:none}.duet-toolbar-dropdown-link.duet-theme-turva{font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";color:#171c3a}.duet-toolbar-dropdown-link.active,.duet-toolbar-dropdown-link.active:hover{color:white;background:#0077b3}.duet-toolbar-dropdown-link.active.duet-theme-turva,.duet-toolbar-dropdown-link.active:hover.duet-theme-turva{color:white;background:#c60c30}.duet-toolbar-dropdown-link:hover{background:#e6f2f8}.duet-toolbar-dropdown-link:hover.duet-theme-turva{background:#e4e4e6}';var l=e("duet_toolbar_dropdown_link",function(){function e(e){t(this,e);this.theme="";this.href="#";this.icon=undefined;this.active=false}e.prototype.componentWillLoad=function(){a(this)};e.prototype.render=function(){return o(n,null,o("a",{class:{"duet-toolbar-dropdown-link":true,"duet-theme-turva":this.theme==="turva",active:this.active},href:this.href,role:"menuitem"},this.icon&&o("duet-icon",{name:this.icon,size:"x-small",margin:"none"}),o("slot",null)))};Object.defineProperty(e.prototype,"element",{get:function(){return r(this)},enumerable:false,configurable:true});return e}());l.style=i}}}));
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * Built with Duet Design System
3
3
  */
4
- import{r as t,h as i,g as e,H as d}from"./p-c40ee0fe.js";import{m as r,a as n,b as a}from"./p-c4d8cad0.js";import{w as s,a as m}from"./p-12721178.js";import{i as o}from"./p-4ebf1618.js";function g(t){return"duet-grid-item"===t.tagName.toLowerCase()}const u=class{constructor(i){t(this,i),this.mql=[window.matchMedia(r.replace(/'/g,"")),window.matchMedia(n.replace(/'/g,"")),window.matchMedia(a.replace(/'/g,""))],this.distributeFormElement=!1,this.responsive=!1,this.breakpoint="small",this.direction="horizontal",this.alignment="top",this.distribution="default",this.mobile=""}outerHeight(t){const i=t.offsetHeight,e=window.getComputedStyle(t);return["top","bottom"].map((t=>parseInt(e[`margin-${t}`]))).reduce(((t,i)=>t+i),i)}async connectedCallback(){const t=this.element;if(this.distributeFormElement="form_distribute"===this.alignment,this.mutationO=s(t,"duet-grid-item",(()=>{this.updateGridItems()})),this.distributeFormElement){this.mutation1=m(t,"duet-input",(()=>{this.updateGridItemsWithInputFields()}));for(let t=0;t<this.mql.length;t++)this.mql[t].addEventListener&&this.mql[t].addEventListener("change",this.updateGridItemsWithInputFields.bind(this))}this.updateGridItems()}disconnectedCallback(){this.mutationO&&(this.mutationO.disconnect(),this.mutationO=void 0),this.mutation1&&(this.mutation1.disconnect(),this.mutation1=void 0);for(let t=0;t<this.mql.length;t++)this.mql[t].removeEventListener&&this.mql[t].removeEventListener("change",this.updateGridItemsWithInputFields.bind(this))}async updateGridItems(){Array.from(this.element.children).filter(g).forEach((t=>{t.responsive=this.responsive,t.breakpoint=this.breakpoint}))}async updateGridItemsWithInputFields(){const t=Array.from(this.element.children).filter(g),i=!!window&&"column"===window.getComputedStyle(this.element).flexDirection;let e=0;const d=[];t.forEach((t=>{const i=t.querySelector("span.duet-input-error"),e=i?this.outerHeight(i):0;d.push(e)})),e=Math.max(...d),t.forEach((t=>{const d=t.querySelector("span.duet-input-error"),r=d?this.outerHeight(d):0;r<e&&!i?t.setAttribute("style",`padding-bottom: ${e-r}px;`):(r===e||i)&&t.setAttribute("style","padding-bottom: 0px;")}))}render(){return i(d,{class:{"duet-grid":!0,"duet-no-stacking":!this.responsive,"duet-grid-align-top":"top"===this.alignment,"duet-grid-align-bottom":"bottom"===this.alignment||"form_distribute"===this.alignment,"duet-grid-align-center":"center"===this.alignment,"duet-grid-align-stretch":"stretch"===this.alignment,"duet-grid-align-baseline":"baseline"===this.alignment,"duet-grid-distribution-left":"left"===this.distribution,"duet-grid-distribution-right":"right"===this.distribution,"duet-grid-distribution-center":"center"===this.distribution,"duet-grid-distribution-between":"space-between"===this.distribution,"duet-grid-distribution-around":"space-around"===this.distribution,"duet-grid-distribution-evenly":"space-evenly"===this.distribution,"duet-grid-mobile-left":"left"===this.mobile,"duet-grid-mobile-center":"center"===this.mobile,"duet-grid-mobile-right":"right"===this.mobile,"duet-grid-direction-horizontal":"horizontal"===this.direction,"duet-grid-direction-vertical":"vertical"===this.direction,"duet-grid-breakpoint-small":"small"===this.breakpoint,"duet-grid-breakpoint-medium":"medium"===this.breakpoint,"duet-grid-breakpoint-x-large":"x-large"===this.breakpoint}})}get element(){return e(this)}static get watchers(){return{responsive:["updateGridItems"],breakpoint:["updateGridItems"]}}};u.style=".sc-duet-grid-h{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;display:flex !important;flex-direction:column !important;align-items:flex-start !important;justify-content:flex-start !important;width:100%;max-width:100%;height:auto}@media (min-width: 36em){.duet-grid-breakpoint-small.sc-duet-grid-h{flex-direction:row !important}}@media (min-width: 48em){.duet-grid-breakpoint-medium.sc-duet-grid-h{flex-direction:row !important}}@media (min-width: 64.0625em){.duet-grid-breakpoint-x-large.sc-duet-grid-h{flex-direction:row !important}}.duet-grid-wrap.sc-duet-grid-h{flex-wrap:wrap !important}.duet-no-stacking.sc-duet-grid-h{flex-direction:row !important}.duet-grid-direction-vertical.duet-grid-breakpoint-small.sc-duet-grid-h{flex-direction:column !important}@media (min-width: 36em){.duet-grid-direction-vertical.duet-grid-breakpoint-small.sc-duet-grid-h{flex-direction:column !important}}.duet-grid-direction-vertical.duet-grid-breakpoint-medium.sc-duet-grid-h{flex-direction:column !important}@media (min-width: 48em){.duet-grid-direction-vertical.duet-grid-breakpoint-medium.sc-duet-grid-h{flex-direction:column !important}}.duet-grid-direction-vertical.duet-grid-breakpoint-x-large.sc-duet-grid-h{flex-direction:column !important}@media (min-width: 64.0625em){.duet-grid-direction-vertical.duet-grid-breakpoint-x-large.sc-duet-grid-h{flex-direction:column !important}}.duet-grid-align-top.duet-no-stacking.sc-duet-grid-h{align-items:flex-start !important}.duet-grid-align-bottom.duet-no-stacking.sc-duet-grid-h{align-items:flex-end !important}.duet-grid-align-center.duet-no-stacking.sc-duet-grid-h{align-items:center !important}.duet-grid-align-stretch.duet-no-stacking.sc-duet-grid-h{align-items:stretch !important}.duet-grid-align-baseline.duet-no-stacking.sc-duet-grid-h{align-items:baseline !important}@media (min-width: 36em){.duet-grid-align-top.duet-grid-breakpoint-small.sc-duet-grid-h{align-items:flex-start !important}}@media (min-width: 36em){.duet-grid-align-bottom.duet-grid-breakpoint-small.sc-duet-grid-h{align-items:flex-end !important}}@media (min-width: 36em){.duet-grid-align-center.duet-grid-breakpoint-small.sc-duet-grid-h{align-items:center !important}}@media (min-width: 36em){.duet-grid-align-stretch.duet-grid-breakpoint-small.sc-duet-grid-h{align-items:stretch !important}}@media (min-width: 36em){.duet-grid-align-baseline.duet-grid-breakpoint-small.sc-duet-grid-h{align-items:baseline !important}}@media (min-width: 48em){.duet-grid-align-top.duet-grid-breakpoint-medium.sc-duet-grid-h{align-items:flex-start !important}}@media (min-width: 48em){.duet-grid-align-bottom.duet-grid-breakpoint-medium.sc-duet-grid-h{align-items:flex-end !important}}@media (min-width: 48em){.duet-grid-align-center.duet-grid-breakpoint-medium.sc-duet-grid-h{align-items:center !important}}@media (min-width: 48em){.duet-grid-align-stretch.duet-grid-breakpoint-medium.sc-duet-grid-h{align-items:stretch !important}}@media (min-width: 48em){.duet-grid-align-baseline.duet-grid-breakpoint-medium.sc-duet-grid-h{align-items:baseline !important}}@media (min-width: 64.0625em){.duet-grid-align-top.duet-grid-breakpoint-x-large.sc-duet-grid-h{align-items:flex-start !important}}@media (min-width: 64.0625em){.duet-grid-align-bottom.duet-grid-breakpoint-x-large.sc-duet-grid-h{align-items:flex-end !important}}@media (min-width: 64.0625em){.duet-grid-align-center.duet-grid-breakpoint-x-large.sc-duet-grid-h{align-items:center !important}}@media (min-width: 64.0625em){.duet-grid-align-stretch.duet-grid-breakpoint-x-large.sc-duet-grid-h{align-items:stretch !important}}@media (min-width: 64.0625em){.duet-grid-align-baseline.duet-grid-breakpoint-x-large.sc-duet-grid-h{align-items:baseline !important}}.duet-grid-distribution-left.sc-duet-grid-h{justify-content:flex-start !important}.duet-grid-distribution-right.sc-duet-grid-h{justify-content:flex-end !important}.duet-grid-distribution-center.sc-duet-grid-h{justify-content:center !important}.duet-grid-distribution-between.sc-duet-grid-h{justify-content:space-between !important}.duet-grid-distribution-around.sc-duet-grid-h{justify-content:space-around !important}.duet-grid-distribution-evenly.sc-duet-grid-h{justify-content:space-evenly !important}@media (max-width: 35.9375em){.duet-grid-mobile-left.sc-duet-grid-h{align-items:flex-start !important;justify-content:flex-start !important;text-align:left !important}}@media (max-width: 35.9375em){.duet-grid-mobile-center.sc-duet-grid-h{align-items:center !important;justify-content:center !important;text-align:center !important}.duet-grid-mobile-center.sc-duet-grid-h *.sc-duet-grid{text-align:center !important}}@media (max-width: 35.9375em){.duet-grid-mobile-right.sc-duet-grid-h{align-items:flex-end !important;justify-content:flex-end !important;text-align:right !important}.duet-grid-mobile-right.sc-duet-grid-h *.sc-duet-grid{text-align:right !important}}";const l=class{constructor(i){t(this,i),this.fill=!1,this.maxWidth=void 0,this.minWidth=void 0,this.theme="",this.margin="auto",this.responsive=!1,this.breakpoint="small"}componentWillLoad(){o(this)}render(){return i(d,{style:{"min-width":this.minWidth,"max-width":this.maxWidth},class:{"duet-m-0":"none"===this.margin,"duet-theme-turva":"turva"===this.theme,"duet-grid-item":!0,"duet-grid-item-fill":this.fill,"duet-grid-item-responsive":this.responsive,"duet-grid-item-br-medium":"medium"===this.breakpoint,"duet-grid-item-br-x-large":"x-large"===this.breakpoint}})}};l.style='.sc-duet-grid-item-h{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;margin-bottom:16px !important;min-width:0;max-width:100%;flex:0 0 auto;padding-right:8px;padding-left:8px;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-style:normal;font-weight:400;line-height:1.5;color:#00294d}.sc-duet-grid-item-h:first-child,.sc-duet-grid-item-h:first-of-type{padding-left:0}.sc-duet-grid-item-h:last-child,.sc-duet-grid-item-h:last-of-type{padding-right:0}@media (max-width: 35.9375em){.duet-grid-item-responsive.sc-duet-grid-item-h{width:100% !important;min-width:0 !important;max-width:100% !important;padding-right:0;padding-left:0}}@media screen and (max-width: 47.9375em){.duet-grid-item-br-medium.sc-duet-grid-item-h{width:100% !important;min-width:0 !important;max-width:100% !important}}@media screen and (max-width: 47.9375em){.duet-grid-item-responsive.duet-grid-item-br-medium.sc-duet-grid-item-h{padding-right:0;padding-left:0}}@media screen and (max-width: 64em){.duet-grid-item-br-x-large.sc-duet-grid-item-h{width:100% !important;min-width:0 !important;max-width:100% !important}}@media screen and (max-width: 64em){.duet-grid-item-responsive.duet-grid-item-br-x-large.sc-duet-grid-item-h{padding-right:0;padding-left:0}}.duet-grid-item-fill.sc-duet-grid-item-h{flex:1 1 auto;width:100%}.duet-theme-turva.sc-duet-grid-item-h{font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";color:#171c3a}.duet-m-0.sc-duet-grid-item-h{padding:0 !important;margin:0 !important}';export{u as duet_grid,l as duet_grid_item}
4
+ import{r as t,h as i,g as e,H as d}from"./p-ab11408b.js";import{m as r,a as n,b as a}from"./p-c4d8cad0.js";import{w as s,a as m}from"./p-12721178.js";import{i as o}from"./p-4ebf1618.js";function g(t){return"duet-grid-item"===t.tagName.toLowerCase()}const u=class{constructor(i){t(this,i),this.mql=[window.matchMedia(r.replace(/'/g,"")),window.matchMedia(n.replace(/'/g,"")),window.matchMedia(a.replace(/'/g,""))],this.distributeFormElement=!1,this.responsive=!1,this.breakpoint="small",this.direction="horizontal",this.alignment="top",this.distribution="default",this.mobile=""}outerHeight(t){const i=t.offsetHeight,e=window.getComputedStyle(t);return["top","bottom"].map((t=>parseInt(e[`margin-${t}`]))).reduce(((t,i)=>t+i),i)}async connectedCallback(){const t=this.element;if(this.distributeFormElement="form_distribute"===this.alignment,this.mutationO=s(t,"duet-grid-item",(()=>{this.updateGridItems()})),this.distributeFormElement){this.mutation1=m(t,"duet-input",(()=>{this.updateGridItemsWithInputFields()}));for(let t=0;t<this.mql.length;t++)this.mql[t].addEventListener&&this.mql[t].addEventListener("change",this.updateGridItemsWithInputFields.bind(this))}this.updateGridItems()}disconnectedCallback(){this.mutationO&&(this.mutationO.disconnect(),this.mutationO=void 0),this.mutation1&&(this.mutation1.disconnect(),this.mutation1=void 0);for(let t=0;t<this.mql.length;t++)this.mql[t].removeEventListener&&this.mql[t].removeEventListener("change",this.updateGridItemsWithInputFields.bind(this))}async updateGridItems(){Array.from(this.element.children).filter(g).forEach((t=>{t.responsive=this.responsive,t.breakpoint=this.breakpoint}))}async updateGridItemsWithInputFields(){const t=Array.from(this.element.children).filter(g),i=!!window&&"column"===window.getComputedStyle(this.element).flexDirection;let e=0;const d=[];t.forEach((t=>{const i=t.querySelector("span.duet-input-error"),e=i?this.outerHeight(i):0;d.push(e)})),e=Math.max(...d),t.forEach((t=>{const d=t.querySelector("span.duet-input-error"),r=d?this.outerHeight(d):0;r<e&&!i?t.setAttribute("style",`padding-bottom: ${e-r}px;`):(r===e||i)&&t.setAttribute("style","padding-bottom: 0px;")}))}render(){return i(d,{class:{"duet-grid":!0,"duet-no-stacking":!this.responsive,"duet-grid-align-top":"top"===this.alignment,"duet-grid-align-bottom":"bottom"===this.alignment||"form_distribute"===this.alignment,"duet-grid-align-center":"center"===this.alignment,"duet-grid-align-stretch":"stretch"===this.alignment,"duet-grid-align-baseline":"baseline"===this.alignment,"duet-grid-distribution-left":"left"===this.distribution,"duet-grid-distribution-right":"right"===this.distribution,"duet-grid-distribution-center":"center"===this.distribution,"duet-grid-distribution-between":"space-between"===this.distribution,"duet-grid-distribution-around":"space-around"===this.distribution,"duet-grid-distribution-evenly":"space-evenly"===this.distribution,"duet-grid-mobile-left":"left"===this.mobile,"duet-grid-mobile-center":"center"===this.mobile,"duet-grid-mobile-right":"right"===this.mobile,"duet-grid-direction-horizontal":"horizontal"===this.direction,"duet-grid-direction-vertical":"vertical"===this.direction,"duet-grid-breakpoint-small":"small"===this.breakpoint,"duet-grid-breakpoint-medium":"medium"===this.breakpoint,"duet-grid-breakpoint-x-large":"x-large"===this.breakpoint}})}get element(){return e(this)}static get watchers(){return{responsive:["updateGridItems"],breakpoint:["updateGridItems"]}}};u.style=".sc-duet-grid-h{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;display:flex !important;flex-direction:column !important;align-items:flex-start !important;justify-content:flex-start !important;width:100%;max-width:100%;height:auto}@media (min-width: 36em){.duet-grid-breakpoint-small.sc-duet-grid-h{flex-direction:row !important}}@media (min-width: 48em){.duet-grid-breakpoint-medium.sc-duet-grid-h{flex-direction:row !important}}@media (min-width: 64.0625em){.duet-grid-breakpoint-x-large.sc-duet-grid-h{flex-direction:row !important}}.duet-grid-wrap.sc-duet-grid-h{flex-wrap:wrap !important}.duet-no-stacking.sc-duet-grid-h{flex-direction:row !important}.duet-grid-direction-vertical.duet-grid-breakpoint-small.sc-duet-grid-h{flex-direction:column !important}@media (min-width: 36em){.duet-grid-direction-vertical.duet-grid-breakpoint-small.sc-duet-grid-h{flex-direction:column !important}}.duet-grid-direction-vertical.duet-grid-breakpoint-medium.sc-duet-grid-h{flex-direction:column !important}@media (min-width: 48em){.duet-grid-direction-vertical.duet-grid-breakpoint-medium.sc-duet-grid-h{flex-direction:column !important}}.duet-grid-direction-vertical.duet-grid-breakpoint-x-large.sc-duet-grid-h{flex-direction:column !important}@media (min-width: 64.0625em){.duet-grid-direction-vertical.duet-grid-breakpoint-x-large.sc-duet-grid-h{flex-direction:column !important}}.duet-grid-align-top.duet-no-stacking.sc-duet-grid-h{align-items:flex-start !important}.duet-grid-align-bottom.duet-no-stacking.sc-duet-grid-h{align-items:flex-end !important}.duet-grid-align-center.duet-no-stacking.sc-duet-grid-h{align-items:center !important}.duet-grid-align-stretch.duet-no-stacking.sc-duet-grid-h{align-items:stretch !important}.duet-grid-align-baseline.duet-no-stacking.sc-duet-grid-h{align-items:baseline !important}@media (min-width: 36em){.duet-grid-align-top.duet-grid-breakpoint-small.sc-duet-grid-h{align-items:flex-start !important}}@media (min-width: 36em){.duet-grid-align-bottom.duet-grid-breakpoint-small.sc-duet-grid-h{align-items:flex-end !important}}@media (min-width: 36em){.duet-grid-align-center.duet-grid-breakpoint-small.sc-duet-grid-h{align-items:center !important}}@media (min-width: 36em){.duet-grid-align-stretch.duet-grid-breakpoint-small.sc-duet-grid-h{align-items:stretch !important}}@media (min-width: 36em){.duet-grid-align-baseline.duet-grid-breakpoint-small.sc-duet-grid-h{align-items:baseline !important}}@media (min-width: 48em){.duet-grid-align-top.duet-grid-breakpoint-medium.sc-duet-grid-h{align-items:flex-start !important}}@media (min-width: 48em){.duet-grid-align-bottom.duet-grid-breakpoint-medium.sc-duet-grid-h{align-items:flex-end !important}}@media (min-width: 48em){.duet-grid-align-center.duet-grid-breakpoint-medium.sc-duet-grid-h{align-items:center !important}}@media (min-width: 48em){.duet-grid-align-stretch.duet-grid-breakpoint-medium.sc-duet-grid-h{align-items:stretch !important}}@media (min-width: 48em){.duet-grid-align-baseline.duet-grid-breakpoint-medium.sc-duet-grid-h{align-items:baseline !important}}@media (min-width: 64.0625em){.duet-grid-align-top.duet-grid-breakpoint-x-large.sc-duet-grid-h{align-items:flex-start !important}}@media (min-width: 64.0625em){.duet-grid-align-bottom.duet-grid-breakpoint-x-large.sc-duet-grid-h{align-items:flex-end !important}}@media (min-width: 64.0625em){.duet-grid-align-center.duet-grid-breakpoint-x-large.sc-duet-grid-h{align-items:center !important}}@media (min-width: 64.0625em){.duet-grid-align-stretch.duet-grid-breakpoint-x-large.sc-duet-grid-h{align-items:stretch !important}}@media (min-width: 64.0625em){.duet-grid-align-baseline.duet-grid-breakpoint-x-large.sc-duet-grid-h{align-items:baseline !important}}.duet-grid-distribution-left.sc-duet-grid-h{justify-content:flex-start !important}.duet-grid-distribution-right.sc-duet-grid-h{justify-content:flex-end !important}.duet-grid-distribution-center.sc-duet-grid-h{justify-content:center !important}.duet-grid-distribution-between.sc-duet-grid-h{justify-content:space-between !important}.duet-grid-distribution-around.sc-duet-grid-h{justify-content:space-around !important}.duet-grid-distribution-evenly.sc-duet-grid-h{justify-content:space-evenly !important}@media (max-width: 35.9375em){.duet-grid-mobile-left.sc-duet-grid-h{align-items:flex-start !important;justify-content:flex-start !important;text-align:left !important}}@media (max-width: 35.9375em){.duet-grid-mobile-center.sc-duet-grid-h{align-items:center !important;justify-content:center !important;text-align:center !important}.duet-grid-mobile-center.sc-duet-grid-h *.sc-duet-grid{text-align:center !important}}@media (max-width: 35.9375em){.duet-grid-mobile-right.sc-duet-grid-h{align-items:flex-end !important;justify-content:flex-end !important;text-align:right !important}.duet-grid-mobile-right.sc-duet-grid-h *.sc-duet-grid{text-align:right !important}}";const l=class{constructor(i){t(this,i),this.fill=!1,this.maxWidth=void 0,this.minWidth=void 0,this.theme="",this.margin="auto",this.responsive=!1,this.breakpoint="small"}componentWillLoad(){o(this)}render(){return i(d,{style:{"min-width":this.minWidth,"max-width":this.maxWidth},class:{"duet-m-0":"none"===this.margin,"duet-theme-turva":"turva"===this.theme,"duet-grid-item":!0,"duet-grid-item-fill":this.fill,"duet-grid-item-responsive":this.responsive,"duet-grid-item-br-medium":"medium"===this.breakpoint,"duet-grid-item-br-x-large":"x-large"===this.breakpoint}})}};l.style='.sc-duet-grid-item-h{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;margin-bottom:16px !important;min-width:0;max-width:100%;flex:0 0 auto;padding-right:8px;padding-left:8px;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-style:normal;font-weight:400;line-height:1.5;color:#00294d}.sc-duet-grid-item-h:first-child,.sc-duet-grid-item-h:first-of-type{padding-left:0}.sc-duet-grid-item-h:last-child,.sc-duet-grid-item-h:last-of-type{padding-right:0}@media (max-width: 35.9375em){.duet-grid-item-responsive.sc-duet-grid-item-h{width:100% !important;min-width:0 !important;max-width:100% !important;padding-right:0;padding-left:0}}@media screen and (max-width: 47.9375em){.duet-grid-item-br-medium.sc-duet-grid-item-h{width:100% !important;min-width:0 !important;max-width:100% !important}}@media screen and (max-width: 47.9375em){.duet-grid-item-responsive.duet-grid-item-br-medium.sc-duet-grid-item-h{padding-right:0;padding-left:0}}@media screen and (max-width: 64em){.duet-grid-item-br-x-large.sc-duet-grid-item-h{width:100% !important;min-width:0 !important;max-width:100% !important}}@media screen and (max-width: 64em){.duet-grid-item-responsive.duet-grid-item-br-x-large.sc-duet-grid-item-h{padding-right:0;padding-left:0}}.duet-grid-item-fill.sc-duet-grid-item-h{flex:1 1 auto;width:100%}.duet-theme-turva.sc-duet-grid-item-h{font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";color:#171c3a}.duet-m-0.sc-duet-grid-item-h{padding:0 !important;margin:0 !important}';export{u as duet_grid,l as duet_grid_item}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * Built with Duet Design System
3
3
  */
4
- import{r as a,c as e,h as d,F as i,H as t,g as r}from"./p-c40ee0fe.js";import{i as n}from"./p-4ebf1618.js";import{c as o}from"./p-c1325e35.js";import{i as p}from"./p-54f35a79.js";import{s as m}from"./p-5a9d75e1.js";import{g as s}from"./p-79a9746e.js";import"./p-9052b6f5.js";const x=class{constructor(d){a(this,d),this.duetToggle=e(this,"duetToggle",7),this.cardId=o("DuetCard"),this.togglePanel=a=>{a.preventDefault(),this.open=!this.open,this.duetToggle.emit({component:"duet-card",originalEvent:a})},this.handleKeyDown=a=>{p(a)&&this.togglePanel(a)},this.accessibleLabel=void 0,this.heading="",this.secondaryHeading="",this.variation="default",this.collapsible=!1,this.open=!0,this.headingLevel="h2",this.icon=void 0,this.image=void 0,this.background="gray-lightest",this.padding="small",this.margin="auto",this.theme="",this.url=void 0,this.shadowBreakpoint=void 0}componentWillLoad(){n(this),this.hasHeadingSlot=!!this.element.querySelector(":scope > [slot='heading']"),this.hasFooter=!!this.element.querySelector("[slot='footer']")}renderHeading(){const a=m(this.headingLevel);return d(a,Object.assign({class:"duet-card-heading"},this.collapsible?{role:"button",tabindex:"0","aria-controls":this.cardId,"aria-expanded":this.open?"true":"false",onClick:this.togglePanel,onKeyDown:this.handleKeyDown}:{}),d("div",{class:"duet-card-heading-grid"},this.icon&&d(i,null,d("duet-icon",{class:"duet-card-icon",name:this.icon,size:"medium",margin:"none",color:"currentColor"}),d("duet-spacer",{direction:"horizontal",size:"small"})),d("div",{class:"duet-card-heading-text"},this.heading?this.heading:d("slot",{name:"heading"})),this.secondaryHeading&&d(i,null,d("duet-spacer",{direction:"horizontal",size:"small"}),d("div",{class:"duet-card-secondary-heading duet-card-secondary-heading--inline"},this.secondaryHeading)),this.collapsible&&d(i,null,d("duet-spacer",{direction:"horizontal",size:"small"}),d("duet-icon",{class:"duet-card-caret",icon:'<svg fill="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" role="img"><path d="M.75 17.939a.752.752 0 0 1-.53-1.281L10.94 5.94c.283-.284.659-.44 1.059-.44.401 0 .777.156 1.06.438l10.721 10.72a.752.752 0 0 1-.53 1.281.743.743 0 0 1-.53-.22L12 7 1.28 17.719a.743.743 0 0 1-.53.22z"/></svg>',size:"small",margin:"none",color:"currentColor"}))),this.secondaryHeading&&d("div",{class:"duet-card-secondary-heading duet-card-secondary-heading--new-line"},this.secondaryHeading),d("slot",{name:"below-heading"}))}async setFocus(a){this.nativeCard&&this.nativeCard.focus(a)}render(){const a=this.url?"a":"div",e={backgroundColor:s(this.background)};return d(t,{class:{"duet-m-0":"none"===this.margin,"duet-card-info":"info"===this.variation}},d(a,{href:this.url,style:e,ref:a=>this.nativeCard=a,"aria-label":this.accessibleLabel,class:{"duet-card":!0,[this.padding]:!0,[this.variation]:!0,[`shadow-${this.shadowBreakpoint}`]:!!this.shadowBreakpoint,"duet-p-0":"none"===this.padding,"duet-theme-turva":"turva"===this.theme,"duet-card-has-bg":"gray-lightest"!==this.background,"duet-card-has-icon":!!this.icon,"duet-card-collapsed":this.collapsible&&!this.open}},this.image&&d("div",{class:"duet-card-image-mask"},d("img",{src:this.image,class:"duet-card-image",loading:"lazy",alt:"","aria-hidden":"true"})),(this.heading||this.hasHeadingSlot)&&this.renderHeading(),d("div",{class:"duet-card-content",id:this.cardId},d("slot",null),this.hasFooter&&d("div",{class:"duet-card-footer"},d("slot",{name:"footer"})))))}get element(){return r(this)}};x.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;margin-bottom:20px !important;display:flex;width:100%;vertical-align:top}:host(.duet-card-info){margin-bottom:16px !important}:host(.duet-m-0){margin:0 !important}.duet-card{padding:20px !important;position:relative;display:block;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-style:normal;font-weight:400;line-height:1.5;color:#00294d;text-decoration:none;border-radius:4px;box-shadow:0 2px 6px 0 rgba(0, 41, 77, 0.07), 0 -1px 0 0 rgba(0, 0, 0, 0.09), -1px 0 0 0 rgba(0, 0, 0, 0.07), 1px 0 0 0 rgba(0, 0, 0, 0.07), 0 1px 0 0 rgba(0, 0, 0, 0.07)}.duet-card.duet-p-0{padding:0 !important}.duet-card.duet-m-0{margin:0 !important}.duet-card:focus{outline:0;box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3), 0 0 0 1px #0077b3}.duet-theme-turva .duet-card:focus,.duet-card:focus.duet-theme-turva{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}@media (max-width: 20.5em){.duet-card.shadow-xxx-small{box-shadow:none}}@media (max-width: 22.5em){.duet-card.shadow-xx-small{box-shadow:none}}@media (max-width: 35.9375em){.duet-card.shadow-x-small{box-shadow:none}}@media (min-width: 36em){.duet-card.shadow-small{box-shadow:none}}@media (min-width: 48em){.duet-card.shadow-medium{box-shadow:none}}@media (min-width: 62em){.duet-card.shadow-large{box-shadow:none}}@media (min-width: 64.0625em){.duet-card.shadow-x-large{box-shadow:none}}@media (min-width: 76.25em){.duet-card.shadow-xx-large{box-shadow:none}}@media (min-width: 106.25em){.duet-card.shadow-xxx-large{box-shadow:none}}@media (min-width: 36em){.duet-card{padding:28px !important}}.duet-card.duet-theme-turva{font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";color:#171c3a;box-shadow:0 2px 6px 0 rgba(117, 117, 117, 0.13), 0 -1px 0 0 rgba(0, 0, 0, 0.09), -1px 0 0 0 rgba(0, 0, 0, 0.07), 1px 0 0 0 rgba(0, 0, 0, 0.07), 0 1px 0 0 rgba(0, 0, 0, 0.07)}@media (min-width: 36em){.duet-card.xx-small{padding:12px !important}}@media (min-width: 36em){.duet-card.x-small{padding:20px !important}}@media (min-width: 36em){.duet-card.medium{padding:28px !important}}@media (min-width: 48em){.duet-card.medium{padding:36px !important}}@media (min-width: 36em){.duet-card.large{padding:36px !important}}@media (min-width: 48em){.duet-card.large{padding:48px !important}}@media (min-width: 36em){.duet-card.x-large{padding:48px !important}}@media (min-width: 48em){.duet-card.x-large{padding:72px !important}}.duet-card.duet-card-collapsed{padding-bottom:0 !important}@media (min-width: 36em){.duet-card.duet-card-collapsed{padding-bottom:0 !important}}.duet-card.info{background:rgba(0, 80, 128, 0.04) !important;box-shadow:none}.duet-card.info.duet-theme-turva{background:rgba(23, 28, 58, 0.035) !important}.duet-card.plain{box-shadow:none}.duet-card.plain:not(.duet-card-has-bg){background:transparent !important}.duet-card-heading-grid{display:flex;flex-direction:row}.duet-card-icon{align-self:center}.duet-card-heading-text{flex:1;word-break:break-word}.duet-card-secondary-heading{font-size:1rem;font-weight:600;word-break:break-word}.duet-card-secondary-heading--inline{display:block;flex:1;align-self:flex-start;line-height:1.875;text-align:right}@media (max-width: 22.5em){.duet-card-secondary-heading--inline{display:none}}.duet-card-secondary-heading--new-line{display:none}@media (max-width: 22.5em){.duet-card-secondary-heading--new-line{display:block}}.duet-card-heading{position:relative;display:block;padding:16px 20px;margin:-20px -20px 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:1.25rem;font-weight:800;color:#00294d;border-bottom:1px solid #e1e3e6}@media (min-width: 36em){.duet-card-heading{padding:15px 28px 16px !important;margin:-28px -28px 20px}}.duet-card-heading[role=button]{-webkit-user-select:none;user-select:none;cursor:pointer;border-radius:4px;-webkit-appearance:none;-webkit-tap-highlight-color:transparent;appearance:none}.duet-card-heading[role=button]:focus{outline:0}:host(.user-is-tabbing) .duet-card-heading[role=button]:focus{border-radius:4px;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-card-heading[role=button]:focus{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}.duet-card-collapsed .duet-card-heading{margin-bottom:0 !important;border-bottom:0 !important}.duet-theme-turva .duet-card-heading{font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";color:#171c3a;border-color:#e4e4e6}@media (min-width: 36em){.xx-small .duet-card-heading{padding:6px 12px 7px !important;margin:-12px -12px 12px}}@media (min-width: 48em){.xx-small .duet-card-heading{padding:6px 12px 7px !important;margin:-12px -12px 12px}}@media (min-width: 36em){.x-small .duet-card-heading{padding:10px 20px 11px !important;margin:-20px -20px 20px}}@media (min-width: 48em){.x-small .duet-card-heading{padding:10px 20px 11px !important;margin:-20px -20px 20px}}.medium .duet-card-heading{margin:-20px -20px 20px}@media (min-width: 36em){.medium .duet-card-heading{padding:15px 28px 16px !important;margin:-28px -28px 20px}}@media (min-width: 48em){.medium .duet-card-heading{padding:19px 36px 20px !important;margin:-36px -36px 28px}}.large .duet-card-heading{margin:-20px -20px 20px}@media (min-width: 36em){.large .duet-card-heading{padding:19px 36px 20px !important;margin:-36px -36px 28px}}@media (min-width: 48em){.large .duet-card-heading{padding:26px 48px 27px !important;margin:-48px -48px 36px}}.x-large .duet-card-heading{margin:-20px -20px 20px}@media (min-width: 36em){.x-large .duet-card-heading{padding:26px 48px 27px !important;margin:-48px -48px 36px}}@media (min-width: 48em){.x-large .duet-card-heading{padding:39px 72px 40px !important;margin:-72px -72px 48px}}.none .duet-card-heading{padding:0 0 20px !important;margin:0 0 20px}.duet-card-footer{padding:20px;margin:20px -20px -20px;font-size:0.875rem;line-height:1.25;background:#f5f8fa;border-bottom-right-radius:4px;border-bottom-left-radius:4px}.duet-theme-turva .duet-card-footer{background:#f5f5f7}@media (min-width: 36em){.duet-card-footer{padding:15px 28px 16px !important;margin:20px -28px -28px}}@media (min-width: 48em){.duet-card-footer{padding:15px 28px 16px !important;margin:20px -28px -28px}}@media (min-width: 36em){.xx-small .duet-card-footer{padding:10px 20px 11px !important;padding-left:12px !important;margin:12px -12px -12px}}@media (min-width: 36em){.x-small .duet-card-footer{padding:15px 28px 16px !important;padding-left:20px !important;margin:20px -20px -20px}}@media (min-width: 36em){.medium .duet-card-footer{padding:15px 28px 16px !important;margin:20px -28px -28px}}@media (min-width: 48em){.medium .duet-card-footer{padding:19px 36px 20px !important;margin:28px -36px -36px}}@media (min-width: 36em){.large .duet-card-footer{padding:19px 36px 20px !important;margin:28px -36px -36px}}@media (min-width: 48em){.large .duet-card-footer{padding:26px 48px 27px !important;margin:36px -48px -48px}}@media (min-width: 36em){.x-large .duet-card-footer{padding:26px 48px 27px !important;margin:36px -48px -48px}}@media (min-width: 48em){.x-large .duet-card-footer{padding:39px 72px 40px !important;margin:48px -72px -72px}}.none .duet-card-footer{padding:12px 0 !important;margin:20px 0 0}.duet-card-content{width:100%}.duet-card-collapsed .duet-card-content{display:none}.duet-card-caret{position:relative;top:6px;align-self:flex-start;transition:300ms ease}[aria-expanded=false] .duet-card-caret{transform:rotate(-180deg)}.duet-card-image-mask{position:relative;width:calc(100% + 40px);margin:-20px 0 20px -20px;overflow:hidden;border-top-left-radius:4px;border-top-right-radius:4px}@media (min-width: 36em){.small .duet-card-image-mask{width:calc(100% + 56px);margin:-28px 0 28px -28px}}@media (min-width: 36em){.medium .duet-card-image-mask{width:calc(100% + 56px);margin:-28px 0 28px -28px}}@media (min-width: 48em){.medium .duet-card-image-mask{width:calc(100% + 72px);margin:-36px 0 28px -36px}}@media (min-width: 36em){.large .duet-card-image-mask{width:calc(100% + 72px);margin:-36px 0 36px -36px}}@media (min-width: 48em){.large .duet-card-image-mask{width:calc(100% + 96px);margin:-48px 0 36px -48px}}@media (min-width: 36em){.x-large .duet-card-image-mask{width:calc(100% + 96px);margin:-48px 0 36px -48px}}@media (min-width: 48em){.x-large .duet-card-image-mask{width:calc(100% + 144px);margin:-72px 0 36px -72px}}.none .duet-card-image-mask{width:100%;margin:0 0 20px}.duet-card-image{display:block;width:102%;min-width:1px;max-width:102%;height:auto;min-height:1px;margin-left:-1%;transition:transform 300ms ease;transform:scale(1.0001)}a.duet-card{transition:box-shadow 300ms ease, background-position 300ms ease}a.duet-card:hover{box-shadow:0 2px 6px 0 rgba(0, 41, 77, 0.07), 0 -1px 0 0 rgba(0, 0, 0, 0.09), -1px 0 0 0 rgba(0, 0, 0, 0.07), 1px 0 0 0 rgba(0, 0, 0, 0.07), 0 1px 0 0 rgba(0, 0, 0, 0.07), 0 2px 10px 0 rgba(0, 41, 77, 0.1)}a.duet-card:hover .duet-card-image{transform:scale(1.024)}.duet-theme-turva a.duet-card:hover{box-shadow:0 2px 6px 0 rgba(117, 117, 117, 0.13), 0 -1px 0 0 rgba(0, 0, 0, 0.09), -1px 0 0 0 rgba(0, 0, 0, 0.07), 1px 0 0 0 rgba(0, 0, 0, 0.07), 0 1px 0 0 rgba(0, 0, 0, 0.07), 0 2px 10px 0 rgba(117, 117, 117, 0.15)}a.duet-card:active{transition:none;transform:translateY(1px)}';export{x as duet_card}
4
+ import{r as a,c as e,h as d,F as i,H as t,g as r}from"./p-ab11408b.js";import{i as n}from"./p-4ebf1618.js";import{c as o}from"./p-c1325e35.js";import{i as p}from"./p-54f35a79.js";import{s as m}from"./p-5a9d75e1.js";import{g as s}from"./p-79a9746e.js";import"./p-9052b6f5.js";const x=class{constructor(d){a(this,d),this.duetToggle=e(this,"duetToggle",7),this.cardId=o("DuetCard"),this.togglePanel=a=>{a.preventDefault(),this.open=!this.open,this.duetToggle.emit({component:"duet-card",originalEvent:a})},this.handleKeyDown=a=>{p(a)&&this.togglePanel(a)},this.accessibleLabel=void 0,this.heading="",this.secondaryHeading="",this.variation="default",this.collapsible=!1,this.open=!0,this.headingLevel="h2",this.icon=void 0,this.image=void 0,this.background="gray-lightest",this.padding="small",this.margin="auto",this.theme="",this.url=void 0,this.shadowBreakpoint=void 0}componentWillLoad(){n(this),this.hasHeadingSlot=!!this.element.querySelector(":scope > [slot='heading']"),this.hasFooter=!!this.element.querySelector("[slot='footer']")}renderHeading(){const a=m(this.headingLevel);return d(a,Object.assign({class:"duet-card-heading"},this.collapsible?{role:"button",tabindex:"0","aria-controls":this.cardId,"aria-expanded":this.open?"true":"false",onClick:this.togglePanel,onKeyDown:this.handleKeyDown}:{}),d("div",{class:"duet-card-heading-grid"},this.icon&&d(i,null,d("duet-icon",{class:"duet-card-icon",name:this.icon,size:"medium",margin:"none",color:"currentColor"}),d("duet-spacer",{direction:"horizontal",size:"small"})),d("div",{class:"duet-card-heading-text"},this.heading?this.heading:d("slot",{name:"heading"})),this.secondaryHeading&&d(i,null,d("duet-spacer",{direction:"horizontal",size:"small"}),d("div",{class:"duet-card-secondary-heading duet-card-secondary-heading--inline"},this.secondaryHeading)),this.collapsible&&d(i,null,d("duet-spacer",{direction:"horizontal",size:"small"}),d("duet-icon",{class:"duet-card-caret",icon:'<svg fill="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" role="img"><path d="M.75 17.939a.752.752 0 0 1-.53-1.281L10.94 5.94c.283-.284.659-.44 1.059-.44.401 0 .777.156 1.06.438l10.721 10.72a.752.752 0 0 1-.53 1.281.743.743 0 0 1-.53-.22L12 7 1.28 17.719a.743.743 0 0 1-.53.22z"/></svg>',size:"small",margin:"none",color:"currentColor"}))),this.secondaryHeading&&d("div",{class:"duet-card-secondary-heading duet-card-secondary-heading--new-line"},this.secondaryHeading),d("slot",{name:"below-heading"}))}async setFocus(a){this.nativeCard&&this.nativeCard.focus(a)}render(){const a=this.url?"a":"div",e={backgroundColor:s(this.background)};return d(t,{class:{"duet-m-0":"none"===this.margin,"duet-card-info":"info"===this.variation}},d(a,{href:this.url,style:e,ref:a=>this.nativeCard=a,"aria-label":this.accessibleLabel,class:{"duet-card":!0,[this.padding]:!0,[this.variation]:!0,[`shadow-${this.shadowBreakpoint}`]:!!this.shadowBreakpoint,"duet-p-0":"none"===this.padding,"duet-theme-turva":"turva"===this.theme,"duet-card-has-bg":"gray-lightest"!==this.background,"duet-card-has-icon":!!this.icon,"duet-card-collapsed":this.collapsible&&!this.open}},this.image&&d("div",{class:"duet-card-image-mask"},d("img",{src:this.image,class:"duet-card-image",loading:"lazy",alt:"","aria-hidden":"true"})),(this.heading||this.hasHeadingSlot)&&this.renderHeading(),d("div",{class:"duet-card-content",id:this.cardId},d("slot",null),this.hasFooter&&d("div",{class:"duet-card-footer"},d("slot",{name:"footer"})))))}get element(){return r(this)}};x.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;margin-bottom:20px !important;display:flex;width:100%;vertical-align:top}:host(.duet-card-info){margin-bottom:16px !important}:host(.duet-m-0){margin:0 !important}.duet-card{padding:20px !important;position:relative;display:block;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-style:normal;font-weight:400;line-height:1.5;color:#00294d;text-decoration:none;border-radius:4px;box-shadow:0 2px 6px 0 rgba(0, 41, 77, 0.07), 0 -1px 0 0 rgba(0, 0, 0, 0.09), -1px 0 0 0 rgba(0, 0, 0, 0.07), 1px 0 0 0 rgba(0, 0, 0, 0.07), 0 1px 0 0 rgba(0, 0, 0, 0.07)}.duet-card.duet-p-0{padding:0 !important}.duet-card.duet-m-0{margin:0 !important}.duet-card:focus{outline:0;box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3), 0 0 0 1px #0077b3}.duet-theme-turva .duet-card:focus,.duet-card:focus.duet-theme-turva{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}@media (max-width: 20.5em){.duet-card.shadow-xxx-small{box-shadow:none}}@media (max-width: 22.5em){.duet-card.shadow-xx-small{box-shadow:none}}@media (max-width: 35.9375em){.duet-card.shadow-x-small{box-shadow:none}}@media (min-width: 36em){.duet-card.shadow-small{box-shadow:none}}@media (min-width: 48em){.duet-card.shadow-medium{box-shadow:none}}@media (min-width: 62em){.duet-card.shadow-large{box-shadow:none}}@media (min-width: 64.0625em){.duet-card.shadow-x-large{box-shadow:none}}@media (min-width: 76.25em){.duet-card.shadow-xx-large{box-shadow:none}}@media (min-width: 106.25em){.duet-card.shadow-xxx-large{box-shadow:none}}@media (min-width: 36em){.duet-card{padding:28px !important}}.duet-card.duet-theme-turva{font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";color:#171c3a;box-shadow:0 2px 6px 0 rgba(117, 117, 117, 0.13), 0 -1px 0 0 rgba(0, 0, 0, 0.09), -1px 0 0 0 rgba(0, 0, 0, 0.07), 1px 0 0 0 rgba(0, 0, 0, 0.07), 0 1px 0 0 rgba(0, 0, 0, 0.07)}@media (min-width: 36em){.duet-card.xx-small{padding:12px !important}}@media (min-width: 36em){.duet-card.x-small{padding:20px !important}}@media (min-width: 36em){.duet-card.medium{padding:28px !important}}@media (min-width: 48em){.duet-card.medium{padding:36px !important}}@media (min-width: 36em){.duet-card.large{padding:36px !important}}@media (min-width: 48em){.duet-card.large{padding:48px !important}}@media (min-width: 36em){.duet-card.x-large{padding:48px !important}}@media (min-width: 48em){.duet-card.x-large{padding:72px !important}}.duet-card.duet-card-collapsed{padding-bottom:0 !important}@media (min-width: 36em){.duet-card.duet-card-collapsed{padding-bottom:0 !important}}.duet-card.info{background:rgba(0, 80, 128, 0.04) !important;box-shadow:none}.duet-card.info.duet-theme-turva{background:rgba(23, 28, 58, 0.035) !important}.duet-card.plain{box-shadow:none}.duet-card.plain:not(.duet-card-has-bg){background:transparent !important}.duet-card-heading-grid{display:flex;flex-direction:row}.duet-card-icon{align-self:center}.duet-card-heading-text{flex:1;word-break:break-word}.duet-card-secondary-heading{font-size:1rem;font-weight:600;word-break:break-word}.duet-card-secondary-heading--inline{display:block;flex:1;align-self:flex-start;line-height:1.875;text-align:right}@media (max-width: 22.5em){.duet-card-secondary-heading--inline{display:none}}.duet-card-secondary-heading--new-line{display:none}@media (max-width: 22.5em){.duet-card-secondary-heading--new-line{display:block}}.duet-card-heading{position:relative;display:block;padding:16px 20px;margin:-20px -20px 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:1.25rem;font-weight:800;color:#00294d;border-bottom:1px solid #e1e3e6}@media (min-width: 36em){.duet-card-heading{padding:15px 28px 16px !important;margin:-28px -28px 20px}}.duet-card-heading[role=button]{-webkit-user-select:none;user-select:none;cursor:pointer;border-radius:4px;-webkit-appearance:none;-webkit-tap-highlight-color:transparent;appearance:none}.duet-card-heading[role=button]:focus{outline:0}:host(.user-is-tabbing) .duet-card-heading[role=button]:focus{border-radius:4px;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-card-heading[role=button]:focus{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}.duet-card-collapsed .duet-card-heading{margin-bottom:0 !important;border-bottom:0 !important}.duet-theme-turva .duet-card-heading{font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";color:#171c3a;border-color:#e4e4e6}@media (min-width: 36em){.xx-small .duet-card-heading{padding:6px 12px 7px !important;margin:-12px -12px 12px}}@media (min-width: 48em){.xx-small .duet-card-heading{padding:6px 12px 7px !important;margin:-12px -12px 12px}}@media (min-width: 36em){.x-small .duet-card-heading{padding:10px 20px 11px !important;margin:-20px -20px 20px}}@media (min-width: 48em){.x-small .duet-card-heading{padding:10px 20px 11px !important;margin:-20px -20px 20px}}.medium .duet-card-heading{margin:-20px -20px 20px}@media (min-width: 36em){.medium .duet-card-heading{padding:15px 28px 16px !important;margin:-28px -28px 20px}}@media (min-width: 48em){.medium .duet-card-heading{padding:19px 36px 20px !important;margin:-36px -36px 28px}}.large .duet-card-heading{margin:-20px -20px 20px}@media (min-width: 36em){.large .duet-card-heading{padding:19px 36px 20px !important;margin:-36px -36px 28px}}@media (min-width: 48em){.large .duet-card-heading{padding:26px 48px 27px !important;margin:-48px -48px 36px}}.x-large .duet-card-heading{margin:-20px -20px 20px}@media (min-width: 36em){.x-large .duet-card-heading{padding:26px 48px 27px !important;margin:-48px -48px 36px}}@media (min-width: 48em){.x-large .duet-card-heading{padding:39px 72px 40px !important;margin:-72px -72px 48px}}.none .duet-card-heading{padding:0 0 20px !important;margin:0 0 20px}.duet-card-footer{padding:20px;margin:20px -20px -20px;font-size:0.875rem;line-height:1.25;background:#f5f8fa;border-bottom-right-radius:4px;border-bottom-left-radius:4px}.duet-theme-turva .duet-card-footer{background:#f5f5f7}@media (min-width: 36em){.duet-card-footer{padding:15px 28px 16px !important;margin:20px -28px -28px}}@media (min-width: 48em){.duet-card-footer{padding:15px 28px 16px !important;margin:20px -28px -28px}}@media (min-width: 36em){.xx-small .duet-card-footer{padding:10px 20px 11px !important;padding-left:12px !important;margin:12px -12px -12px}}@media (min-width: 36em){.x-small .duet-card-footer{padding:15px 28px 16px !important;padding-left:20px !important;margin:20px -20px -20px}}@media (min-width: 36em){.medium .duet-card-footer{padding:15px 28px 16px !important;margin:20px -28px -28px}}@media (min-width: 48em){.medium .duet-card-footer{padding:19px 36px 20px !important;margin:28px -36px -36px}}@media (min-width: 36em){.large .duet-card-footer{padding:19px 36px 20px !important;margin:28px -36px -36px}}@media (min-width: 48em){.large .duet-card-footer{padding:26px 48px 27px !important;margin:36px -48px -48px}}@media (min-width: 36em){.x-large .duet-card-footer{padding:26px 48px 27px !important;margin:36px -48px -48px}}@media (min-width: 48em){.x-large .duet-card-footer{padding:39px 72px 40px !important;margin:48px -72px -72px}}.none .duet-card-footer{padding:12px 0 !important;margin:20px 0 0}.duet-card-content{width:100%}.duet-card-collapsed .duet-card-content{display:none}.duet-card-caret{position:relative;top:6px;align-self:flex-start;transition:300ms ease}[aria-expanded=false] .duet-card-caret{transform:rotate(-180deg)}.duet-card-image-mask{position:relative;width:calc(100% + 40px);margin:-20px 0 20px -20px;overflow:hidden;border-top-left-radius:4px;border-top-right-radius:4px}@media (min-width: 36em){.small .duet-card-image-mask{width:calc(100% + 56px);margin:-28px 0 28px -28px}}@media (min-width: 36em){.medium .duet-card-image-mask{width:calc(100% + 56px);margin:-28px 0 28px -28px}}@media (min-width: 48em){.medium .duet-card-image-mask{width:calc(100% + 72px);margin:-36px 0 28px -36px}}@media (min-width: 36em){.large .duet-card-image-mask{width:calc(100% + 72px);margin:-36px 0 36px -36px}}@media (min-width: 48em){.large .duet-card-image-mask{width:calc(100% + 96px);margin:-48px 0 36px -48px}}@media (min-width: 36em){.x-large .duet-card-image-mask{width:calc(100% + 96px);margin:-48px 0 36px -48px}}@media (min-width: 48em){.x-large .duet-card-image-mask{width:calc(100% + 144px);margin:-72px 0 36px -72px}}.none .duet-card-image-mask{width:100%;margin:0 0 20px}.duet-card-image{display:block;width:102%;min-width:1px;max-width:102%;height:auto;min-height:1px;margin-left:-1%;transition:transform 300ms ease;transform:scale(1.0001)}a.duet-card{transition:box-shadow 300ms ease, background-position 300ms ease}a.duet-card:hover{box-shadow:0 2px 6px 0 rgba(0, 41, 77, 0.07), 0 -1px 0 0 rgba(0, 0, 0, 0.09), -1px 0 0 0 rgba(0, 0, 0, 0.07), 1px 0 0 0 rgba(0, 0, 0, 0.07), 0 1px 0 0 rgba(0, 0, 0, 0.07), 0 2px 10px 0 rgba(0, 41, 77, 0.1)}a.duet-card:hover .duet-card-image{transform:scale(1.024)}.duet-theme-turva a.duet-card:hover{box-shadow:0 2px 6px 0 rgba(117, 117, 117, 0.13), 0 -1px 0 0 rgba(0, 0, 0, 0.09), -1px 0 0 0 rgba(0, 0, 0, 0.07), 1px 0 0 0 rgba(0, 0, 0, 0.07), 0 1px 0 0 rgba(0, 0, 0, 0.07), 0 2px 10px 0 rgba(117, 117, 117, 0.15)}a.duet-card:active{transition:none;transform:translateY(1px)}';export{x as duet_card}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * Built with Duet Design System
3
3
  */
4
- import{r as e,c as o,h as t,H as a,g as n}from"./p-c40ee0fe.js";import{i}from"./p-4ebf1618.js";const r=class{constructor(t){e(this,t),this.duetCookieConsent=o(this,"duetCookieConsent",7),this.handleClick=e=>{e.preventDefault(),this.duetCookieConsent.emit({component:"duet-cookie-consent"})},this.accessibleLabel="Hyväksyn evästeiden käytön",this.theme=""}componentWillLoad(){i(this)}render(){return t(a,{tabindex:"0"},t("div",{class:{"duet-cookie-consent":!0,"duet-theme-turva":"turva"===this.theme}},t("div",{class:"duet-cookie-consent-content"},t("div",{class:"expand"},t("slot",null)),t("duet-spacer",{size:"large",direction:"horizontal"}),t("div",null,t("duet-button",{variation:"negative",size:"small",onClick:this.handleClick,margin:"none","aria-label":this.accessibleLabel,theme:this.theme},"OK")))))}get element(){return n(this)}};r.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;position:fixed;right:0;bottom:0;left:0;z-index:950;display:block;width:100%;box-shadow:0 2px 20px 0 rgba(0, 0, 0, 0.2)}@media (min-width: 48em){:host{right:28px;bottom:28px;left:auto;width:25rem}}:host(:focus){outline:0}:host(.user-is-tabbing:focus){border-radius:4px;box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3), 0 0 0 1px #0077b3}:host(.user-is-tabbing.duet-theme-turva:focus){box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}.duet-cookie-consent{padding:20px;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:0.875rem;color:white !important;background-color:rgba(0, 21, 39, 0.9)}@supports (-webkit-backdrop-filter: none) or (backdrop-filter: none){.duet-cookie-consent{background:rgba(0, 21, 39, 0.8);-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px)}}.duet-cookie-consent.duet-theme-turva{font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";background-color:rgba(12, 14, 29, 0.9)}@supports (-webkit-backdrop-filter: none) or (backdrop-filter: none){.duet-cookie-consent.duet-theme-turva{background:rgba(12, 14, 29, 0.8)}}@media (min-width: 48em){.duet-cookie-consent{padding:20px;border-radius:4px}}.duet-cookie-consent-content{display:flex;align-items:center;max-width:1110px;margin:0 auto}.duet-cookie-consent-content .expand{flex:1}::slotted(a){font-weight:600;color:white !important;text-decoration:underline;white-space:nowrap}::slotted(a[target=_blank]){padding-right:16px;background:url("data:image/svg+xml;base64,PHN2ZyBmaWxsPSIjZmZmIiB2aWV3Qm94PSIwIDAgMjQgMjQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEwLjUgMmExLjUgMS41IDAgMDEuMTQgM0gzLjc1Yy0uMzggMC0uNy4yOC0uNzQuNjVsLS4wMS4xdjE0LjVjMCAuMzguMjguNy42NS43NGwuMS4wMWgxNC41Yy4zOCAwIC43LS4yOC43NC0uNjVsLjAxLS4xdi02Ljg5YTEuNSAxLjUgMCAwMTMgMHY2Ljg5QTMuNzUgMy43NSAwIDAxMTguMjUgMjRIMy43NUEzLjc1IDMuNzUgMCAwMTAgMjAuMjVWNS43NUEzLjc1IDMuNzUgMCAwMTMuNzUgMnptMTItMmMuNzggMCAxLjQyLjYgMS41IDEuMzZWNy41YTEuNSAxLjUgMCAwMS0zIC4xNFY1LjEybC01LjQ0IDUuNDRhMS41IDEuNSAwIDAxLTIuMjItMmwuMS0uMTJMMTguODggM0gxNi41QTEuNSAxLjUgMCAwMTE1IDEuNjRWMS41YzAtLjc4LjYtMS40MiAxLjM2LTEuNWguMTR6Ii8+PC9zdmc+") no-repeat right 50%;background-size:12px 10px}::slotted(a:focus){outline:0;box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3), 0 0 0 1px #0077b3}.duet-theme-turva ::slotted(a:focus){outline:0;box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}';export{r as duet_cookie_consent}
4
+ import{r as e,c as o,h as t,H as a,g as n}from"./p-ab11408b.js";import{i}from"./p-4ebf1618.js";const r=class{constructor(t){e(this,t),this.duetCookieConsent=o(this,"duetCookieConsent",7),this.handleClick=e=>{e.preventDefault(),this.duetCookieConsent.emit({component:"duet-cookie-consent"})},this.accessibleLabel="Hyväksyn evästeiden käytön",this.theme=""}componentWillLoad(){i(this)}render(){return t(a,{tabindex:"0"},t("div",{class:{"duet-cookie-consent":!0,"duet-theme-turva":"turva"===this.theme}},t("div",{class:"duet-cookie-consent-content"},t("div",{class:"expand"},t("slot",null)),t("duet-spacer",{size:"large",direction:"horizontal"}),t("div",null,t("duet-button",{variation:"negative",size:"small",onClick:this.handleClick,margin:"none","aria-label":this.accessibleLabel,theme:this.theme},"OK")))))}get element(){return n(this)}};r.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;position:fixed;right:0;bottom:0;left:0;z-index:950;display:block;width:100%;box-shadow:0 2px 20px 0 rgba(0, 0, 0, 0.2)}@media (min-width: 48em){:host{right:28px;bottom:28px;left:auto;width:25rem}}:host(:focus){outline:0}:host(.user-is-tabbing:focus){border-radius:4px;box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3), 0 0 0 1px #0077b3}:host(.user-is-tabbing.duet-theme-turva:focus){box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}.duet-cookie-consent{padding:20px;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:0.875rem;color:white !important;background-color:rgba(0, 21, 39, 0.9)}@supports (-webkit-backdrop-filter: none) or (backdrop-filter: none){.duet-cookie-consent{background:rgba(0, 21, 39, 0.8);-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px)}}.duet-cookie-consent.duet-theme-turva{font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";background-color:rgba(12, 14, 29, 0.9)}@supports (-webkit-backdrop-filter: none) or (backdrop-filter: none){.duet-cookie-consent.duet-theme-turva{background:rgba(12, 14, 29, 0.8)}}@media (min-width: 48em){.duet-cookie-consent{padding:20px;border-radius:4px}}.duet-cookie-consent-content{display:flex;align-items:center;max-width:1110px;margin:0 auto}.duet-cookie-consent-content .expand{flex:1}::slotted(a){font-weight:600;color:white !important;text-decoration:underline;white-space:nowrap}::slotted(a[target=_blank]){padding-right:16px;background:url("data:image/svg+xml;base64,PHN2ZyBmaWxsPSIjZmZmIiB2aWV3Qm94PSIwIDAgMjQgMjQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEwLjUgMmExLjUgMS41IDAgMDEuMTQgM0gzLjc1Yy0uMzggMC0uNy4yOC0uNzQuNjVsLS4wMS4xdjE0LjVjMCAuMzguMjguNy42NS43NGwuMS4wMWgxNC41Yy4zOCAwIC43LS4yOC43NC0uNjVsLjAxLS4xdi02Ljg5YTEuNSAxLjUgMCAwMTMgMHY2Ljg5QTMuNzUgMy43NSAwIDAxMTguMjUgMjRIMy43NUEzLjc1IDMuNzUgMCAwMTAgMjAuMjVWNS43NUEzLjc1IDMuNzUgMCAwMTMuNzUgMnptMTItMmMuNzggMCAxLjQyLjYgMS41IDEuMzZWNy41YTEuNSAxLjUgMCAwMS0zIC4xNFY1LjEybC01LjQ0IDUuNDRhMS41IDEuNSAwIDAxLTIuMjItMmwuMS0uMTJMMTguODggM0gxNi41QTEuNSAxLjUgMCAwMTE1IDEuNjRWMS41YzAtLjc4LjYtMS40MiAxLjM2LTEuNWguMTR6Ii8+PC9zdmc+") no-repeat right 50%;background-size:12px 10px}::slotted(a:focus){outline:0;box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3), 0 0 0 1px #0077b3}.duet-theme-turva ::slotted(a:focus){outline:0;box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}';export{r as duet_cookie_consent}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * Built with Duet Design System
3
3
  */
4
- System.register(["./p-6af671d6.system.js","./p-33b3aba4.system.js"],(function(e){"use strict";var t,n,o,r,a;return{setters:[function(e){t=e.r;n=e.h;o=e.H;r=e.g},function(e){a=e.i}],execute:function(){var i='*,*::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;height:100%}.duet-menu-bar-dropdown{position:relative;height:100%}.duet-menu-bar-dropdown button{position:relative;display:flex;gap:8px;align-items:center;justify-content:center;height:100%;min-height:5rem;padding:0 12px;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:0.875rem;font-weight:400;line-height:1.25;color:#004d80;text-align:center;text-decoration:none;cursor:pointer}@media (min-width: 62em){.duet-menu-bar-dropdown button{padding:0 20px}}@media (min-width: 64.0625em){.duet-menu-bar-dropdown button{padding:0 28px}}.duet-menu-bar-dropdown button:hover{color:#0077b3}.duet-menu-bar-dropdown button .label{display:flex;gap:0.5rem;align-items:center;justify-content:center}.duet-menu-bar-dropdown button.active{color:#0077b3}.duet-menu-bar-dropdown button.active .caret{transform:rotate(180deg)}.duet-theme-turva .duet-menu-bar-dropdown button.active{color:#c60c30}.duet-menu-bar-dropdown button.active::after{position:absolute;top:auto;bottom:2px;left:0;display:block;width:100%;height:2px;content:"";background:#0077b3;transition:300ms ease;transform:translateY(2px)}.duet-theme-turva .duet-menu-bar-dropdown button.active::after{background:#c60c30}.duet-menu-bar-dropdown .items{position:absolute;right:0%;left:auto;z-index:600;display:flex;flex-direction:column;align-items:center;justify-content:center;min-width:225px;padding:1rem 0;color:#00294d;background:#f3f9fc;border-radius:0 0 8px 8px;box-shadow:0 6px 6px 0 rgba(0, 41, 77, 0.1)}.duet-menu-bar-dropdown .items.hidden{display:none}.duet-menu-bar-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:#940925}.duet-menu-bar-dropdown.duet-theme-turva button:hover{color:#c60c30}.duet-menu-bar-dropdown.duet-theme-turva button.active{color:#c60c30}.duet-menu-bar-dropdown.duet-theme-turva button.active::after{background:#c60c30}.duet-menu-bar-dropdown.duet-theme-turva .items{background:#f5f5f7}';var d=e("duet_menu_bar_dropdown",function(){function e(e){var n=this;t(this,e);this.onClick=function(){n.open=!n.open};this.getVariant=function(){var e=n.element.parentElement.getAttribute("slot");switch(e){case"center":return"right";case"right":return"right";default:return"right"}};this.theme="";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)};e.prototype.render=function(){var e;return n(o,null,n("div",{class:(e={"duet-menu-bar-dropdown":true,"duet-theme-turva":this.theme==="turva",active:this.open},e["duet-menu-bar-dropdown--slot-".concat(this.getVariant())]=true,e)},n("button",{"aria-haspopup":"menu","aria-controls":"menu","aria-expanded":this.open?"true":"false",id:"button",type:"button",class:{active:this.open},onClick:this.onClick},this.icon&&n("duet-icon",{name:this.icon,size:"x-small",margin:"none"}),n("div",{class:"label"},n("slot",{name:"label"}),n("duet-icon",{class:"caret",name:"action-arrow-down-small",margin:"none",size:"xxx-small"}))),n("div",{tabindex:"-1",role:"menu",id:"menu","aria-labelledby":"button",class:{items:true,hidden:!this.open}},n("slot",null))))};Object.defineProperty(e.prototype,"element",{get:function(){return r(this)},enumerable:false,configurable:true});return e}());d.style=i}}}));
4
+ System.register(["./p-01fcb80e.system.js","./p-33b3aba4.system.js"],(function(e){"use strict";var t,n,o,r,a;return{setters:[function(e){t=e.r;n=e.h;o=e.H;r=e.g},function(e){a=e.i}],execute:function(){var i='*,*::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;height:100%}.duet-menu-bar-dropdown{position:relative;height:100%}.duet-menu-bar-dropdown button{position:relative;display:flex;gap:8px;align-items:center;justify-content:center;height:100%;min-height:5rem;padding:0 12px;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:0.875rem;font-weight:400;line-height:1.25;color:#004d80;text-align:center;text-decoration:none;cursor:pointer}@media (min-width: 62em){.duet-menu-bar-dropdown button{padding:0 20px}}@media (min-width: 64.0625em){.duet-menu-bar-dropdown button{padding:0 28px}}.duet-menu-bar-dropdown button:hover{color:#0077b3}.duet-menu-bar-dropdown button .label{display:flex;gap:0.5rem;align-items:center;justify-content:center}.duet-menu-bar-dropdown button.active{color:#0077b3}.duet-menu-bar-dropdown button.active .caret{transform:rotate(180deg)}.duet-theme-turva .duet-menu-bar-dropdown button.active{color:#c60c30}.duet-menu-bar-dropdown button.active::after{position:absolute;top:auto;bottom:2px;left:0;display:block;width:100%;height:2px;content:"";background:#0077b3;transition:300ms ease;transform:translateY(2px)}.duet-theme-turva .duet-menu-bar-dropdown button.active::after{background:#c60c30}.duet-menu-bar-dropdown .items{position:absolute;right:0%;left:auto;z-index:600;display:flex;flex-direction:column;align-items:center;justify-content:center;min-width:225px;padding:1rem 0;color:#00294d;background:#f3f9fc;border-radius:0 0 8px 8px;box-shadow:0 6px 6px 0 rgba(0, 41, 77, 0.1)}.duet-menu-bar-dropdown .items.hidden{display:none}.duet-menu-bar-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:#940925}.duet-menu-bar-dropdown.duet-theme-turva button:hover{color:#c60c30}.duet-menu-bar-dropdown.duet-theme-turva button.active{color:#c60c30}.duet-menu-bar-dropdown.duet-theme-turva button.active::after{background:#c60c30}.duet-menu-bar-dropdown.duet-theme-turva .items{background:#f5f5f7}';var d=e("duet_menu_bar_dropdown",function(){function e(e){var n=this;t(this,e);this.onClick=function(){n.open=!n.open};this.getVariant=function(){var e=n.element.parentElement.getAttribute("slot");switch(e){case"center":return"right";case"right":return"right";default:return"right"}};this.theme="";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)};e.prototype.render=function(){var e;return n(o,null,n("div",{class:(e={"duet-menu-bar-dropdown":true,"duet-theme-turva":this.theme==="turva",active:this.open},e["duet-menu-bar-dropdown--slot-".concat(this.getVariant())]=true,e)},n("button",{"aria-haspopup":"menu","aria-controls":"menu","aria-expanded":this.open?"true":"false",id:"button",type:"button",class:{active:this.open},onClick:this.onClick},this.icon&&n("duet-icon",{name:this.icon,size:"x-small",margin:"none"}),n("div",{class:"label"},n("slot",{name:"label"}),n("duet-icon",{class:"caret",name:"action-arrow-down-small",margin:"none",size:"xxx-small"}))),n("div",{tabindex:"-1",role:"menu",id:"menu","aria-labelledby":"button",class:{items:true,hidden:!this.open}},n("slot",null))))};Object.defineProperty(e.prototype,"element",{get:function(){return r(this)},enumerable:false,configurable:true});return e}());d.style=i}}}));
@@ -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 a,H as i,g as s}from"./p-c40ee0fe.js";import{i as d}from"./p-4ebf1618.js";import{f as l,d as o}from"./p-0b3f675e.js";import{i as n}from"./p-54f35a79.js";import{g as r,s as u}from"./p-ede854e1.js";import{q as h,s as b}from"./p-9052b6f5.js";import{b as p}from"./p-79a9746e.js";import{c as m}from"./p-c1325e35.js";import{p as c}from"./p-5a9d75e1.js";const f=({data:e,groupId:a,alignment:i})=>{const s=`duet-editable-table duet-editable-table-content-${a}`;return"string"==typeof e?t("td",{innerHTML:e,class:s,part:`${a}content`,style:{verticalAlign:i}}):t("td",{class:s,part:`${a}content`,style:{verticalAlign:i}},e)},g=class{constructor(t){e(this,t),this.duetTableToggle=a(this,"duetTableToggle",7),this.duetMenuClick=a(this,"duetMenuClick",7),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:a,direction:i,index:s,key:d}=t;this.duetTableToggle.emit({sort_order:a,index:s,direction:i,key:d,component:"duet-editable-table",originalEvent:e})},this.handleKeyDown=(t,e)=>{n(e)&&this.toggleColumn(t,e)},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}componentWillLoad(){d(this)}createLabel(e){const{sort_order:a,direction:i,index:s,label:d}=e,l=r(d);return this.sortable?t("span",{class:"duet-table-label","data-index":s},t("duet-button",{size:"small",icon:a&&1===i?"action-arrow-down-small":a&&-1===i?"action-arrow-up-small":"action-subtract-small","icon-size":"medium-small","accessible-label":r(this.sortableDefaultLabel),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(l(["index"]))}getRowSortOrder(){return[...this.columns].sort(l(["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 a=this.createLabel(e);return""!==a?t("th",{scope:"col"},a):t("td",null)}})),this.actions&&t("th",{scope:"col",class:"duet-table-action-header-heading"},this.actions&&t("duet-visually-hidden",null,r(this.actionColumnLabel))))}renderActions(e,a){if(this.actions)return t("td",{class:"duet-text-right"},this.actions.map((i=>t("duet-action-button",{actionMeta:Object.assign({},(null==e?void 0:e.meta)||{},{index:a}),actionId:(null==e?void 0:e.uid)||(null==e?void 0:e.id)||null,actionName:i.name,theme:this.theme,iconName:i.icon,iconColor:i.color,iconSize:i.size,background:i.background,"accessible-label":`${r(i.label)} ${e.name||""}`}))))}renderTableBody(){const e=this.getSortedColumns(),a=this.getRowSortOrder();return[...this.rows].sort(l(a)).map(((a,i)=>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(a.meta)},e.map((e=>{if(!1!==e.display)return t(f,{data:a[e.key]?a[e.key]:a.item,groupId:this.groupId})})),this.actions&&this.renderActions(a,i))))}render(){return t(i,{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},t("table",{role:this.accessibleRole},t("caption",null,t("slot",{name:"tcaption"})),t("thead",null,t("tr",null,t("td",{class:"duet-editable-table-actions-menu",colSpan:99},t("slot",{name:"thead-first"}))),this.renderTableHeader(),t("tr",null,t("td",{class:"duet-editable-table-actions-menu",colSpan:99},t("slot",{name:"thead-last"})))),t("tbody",null,this.renderTableBody()),t("tfoot",null,t("tr",null,t("th",{class:"duet-editable-table-footer-menu",colSpan:99},t("slot",{name:"tfoot"})))))))}get element(){return s(this)}};g.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 y={none:0,"with-links":16*parseFloat(h),"without-links":16*parseFloat(b)},v=class{constructor(t){e(this,t),this.headingSelector="thead tr > :not(*.duet-editable-table-actions-menu",this.handleMediaQueryChange=t=>{this.matchesBreakpoint=t.matches},this.matchesBreakpoint=!0,this.theme=void 0,this.margin="auto",this.variation="striped",this.sticky=!1,this.stickyDistance="with-links",this.breakpoint="small"}connectedCallback(){this.mq=matchMedia("none"===this.breakpoint||"none-scrollable"===this.breakpoint?"all":p[this.breakpoint]),this.mq.addEventListener("change",o(this.handleMediaQueryChange,50)),this.handleMediaQueryChange(this.mq),this.observer=new MutationObserver((()=>o(this.copyHeadingsToCells(),50))),this.observer.observe(this.element,{childList:!0,subtree:!0})}componentWillLoad(){if(d(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=y[this.stickyDistance];this.element.querySelectorAll(this.headingSelector).forEach((e=>e.style.top=`${t}px`))}}componentDidLoad(){this.observer&&this.observer.takeRecords()}disconnectedCallback(){this.observer.disconnect(),this.observer=null,this.mq.removeListener(this.handleMediaQueryChange),this.mq=null,this.matchesBreakpoint=!0}copyHeadingsToCells(){const t=this.element.querySelectorAll(this.headingSelector),e=this.element.querySelectorAll("tbody tr"),a=Array.from(t).map((t=>t.textContent.trim()));e.forEach((t=>{t.querySelectorAll("td").forEach(((t,e)=>{a[e]&&(t.dataset.heading=a[e])}))}))}render(){return t(i,{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}},t("slot",null))}get element(){return s(this)}};v.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-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:#00294d}duet-table.duet-theme-turva td{color:#171c3a}duet-table th{font-weight:600;line-height:1.25;color:#657787;text-align:left}duet-table.duet-theme-turva th{color:#747475}duet-table tbody th{font-weight:600;color:#00294d}duet-table.duet-theme-turva tbody th{color:#171c3a}duet-table .duet-table-action-row td:last-child{justify-self:end;padding-right:20px !important;white-space:nowrap}.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 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:#657787;text-align:left}.duet-table-flattened td[data-heading]::before{margin-bottom:4px !important;display:block;font-size:1rem;font-weight:600;color:#00294d;content:attr(data-heading)}.duet-table-flattened.duet-theme-turva td[data-heading]::before{color:#171c3a}.duet-table-sticky thead th{position:sticky;top:0;background:white}.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:white}.duet-table-striped.duet-table-sticky thead th{border-bottom:1px solid #e1e3e6}.duet-table-striped.duet-table-sticky.duet-theme-turva thead th{border-bottom-color:#e4e4e6}.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(0, 80, 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(0, 80, 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 #e1e3e6}.duet-table-striped.duet-theme-turva tfoot td{border-top-color:#e4e4e6}.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 #e1e3e6}.duet-table-striped.duet-table-flattened.duet-theme-turva tfoot tr{border-top-color:#e4e4e6}.duet-table-fixed th,.duet-table-minimal th,.duet-table-plain th{padding:16px !important;border-bottom:1px solid #657787}.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:#444445}.duet-table-fixed tbody th,.duet-table-minimal tbody th,.duet-table-plain tbody th{padding-top:40px !important;border-bottom-color:#e1e3e6}.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:#e4e4e6}.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 #e1e3e6}.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:#e4e4e6}.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 #e1e3e6}.duet-table-plain.duet-table-flattened.duet-theme-turva tbody tr{border-bottom-color:#e4e4e6}.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 #e1e3e6}.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 #e1e3e6}.duet-table-minimal.duet-table-flattened.duet-theme-turva tfoot{border-top-color:#e4e4e6}.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 #e1e3e6}.duet-table-fixed:not(.duet-table-flattened).duet-theme-turva tfoot{border-top-color:#e4e4e6}.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(68, 68, 69, 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 #e1e3e6}.duet-table-sortable:not(.duet-table-flattened).duet-theme-turva tfoot{border-top-color:#e4e4e6}.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 x=[{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-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."}}],k=(t,e)=>{let a={type:void 0,system_message:void 0,message:void 0};return a=(e=c(e)).filter((e=>e.type==t))[0],a||(a=e.filter((t=>"default"===t.type))[0]),a},w=(t,e)=>{const a=k(t,e),i=r(a.message);return""!==i&&i?i:a.system_message},z=({data:e,errorCodes:a})=>{const{item:i,error:s}=e,{name:d}=i,{type:l}=s;return t("span",{class:"duet-upload-item-error",role:"status"},t("duet-paragraph",{class:"duet-upload-item-name",color:"danger",margin:"none",weight:"semi-bold"},t("duet-icon",{margin:"none",size:"x-small",name:"messaging-attachment"}),t("duet-spacer",{size:"xx-small",direction:"horizontal"}),d),t("duet-paragraph",{class:"duet-upload-item-error-label",size:"small",margin:"none",color:"danger"},w(l,a)))},T=({progress:e,name:a})=>t("span",{class:"duet-upload-item-name"},t("duet-icon",{margin:"none",size:"x-small",name:"messaging-attachment"}),t("duet-spacer",{size:"xx-small",direction:"horizontal"}),a,t("br",null),t("duet-progress",{progress:Math.ceil(e),"aria-hidden":!0})),S=({name:e})=>t("span",{class:"duet-upload-item-name"},t("duet-icon",{margin:"none",size:"x-small",name:"messaging-attachment"}),t("duet-spacer",{size:"xx-small",direction:"horizontal"}),e),E=({data:e,showLinks:a})=>{const{item:i,size:s,uploaded:d,url:l,meta:o}=e,{name:n}=i,r=t("span",{class:"duet-upload-item-name"},t("duet-icon",{margin:"none",size:"x-small",name:"messaging-attachment"}),t("duet-spacer",{size:"xx-small",direction:"horizontal"}),n),u=t("span",{class:"duet-upload-item-size",style:{fontSize:"14px",fontWeight:"400"}},"(",((t,e=2)=>{if(0===t)return"0 Bytes";const a=e<0?0:e,i=Math.floor(Math.log(t)/Math.log(1024));return parseFloat((t/Math.pow(1024,i)).toFixed(a))+" "+["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"][i]})(s),")"),h=t("duet-paragraph",{color:"secondary",margin:"none",weight:"semi-bold"},d&&l&&a?t("duet-link",{url:l,external:!0},r):r,t("duet-spacer",{size:"xx-small",direction:"horizontal"}),u),b=o&&o.badges?t("span",null,t("duet-spacer",{size:"xx-small"}),o.badges.map((e=>t("duet-badge",{color:"primary"},e)))):void 0;return t("span",{class:"duet-upload-item-success"},t("div",null,h),b)},j=(t,e,a)=>{const{allowedMimetypes:i,allowedExtensions:s,maxBytes:d}=e;let l=!1,o=k("default",a);if(t){const{name:e,type:n,size:r}=t,u=((t,e)=>{if(!e||!t)return!0;const a=e.split(",");let i=!1;return a.forEach((e=>{const a=e.split("/"),s=t.split("/");a[0]!==s[0]||a[1]!==s[1]&&"*"!==a[1]||(i=!0)})),i})(n,i),h="all"===s||""===s||" "===s||void 0===s||((t,e)=>{if(!e)return!0;const a=t.split(".");return e.split(",").includes(a[a.length-1])})(e.toLowerCase(),s),b=((t,e)=>!e||!t||e>=t)(r,d);u||(o=k("duet-upload-101",a)),h||(o=k("duet-upload-100",a)),b||(o=k("duet-upload-201",a)),l=u&&h&&b}else l=!1;return{valid:l,errorMessage:l?void 0:r(o.message),errorSystem:l?void 0:o.system_message,errorType:l?void 0:o.type}},M=({payload:t,options:e,onFailure:a,onSuccess:i,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:u,name:h}=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&&i(l,h,l.status),l.readyState===XMLHttpRequest.DONE&&l.status>=300&&l.status<999&&a(l,h,l.status)},s(h)),l.send(u),l},F=class{constructor(i){e(this,i),this.duetChange=a(this,"duetChange",3),this.duetBlur=a(this,"duetBlur",7),this.duetFocus=a(this,"duetFocus",7),this.duetReady=a(this,"duetReady",7),this.duetDone=a(this,"duetDone",3),this.duetState=a(this,"duetState",3),this.duetDelete=a(this,"duetDelete",3),this.duetCancel=a(this,"duetCancel",3),this.duetProgress=a(this,"duetProgress",3),this.duetUpload=a(this,"duetUpload",3),this.buttonId=m("DuetButton"),this.labelId=m("DuetLabel"),this.uploadId=m("DuetUpload"),this.filesInProgress=new Map,this.fileMaxReached=!1,this.bytesMaxReached=!1,this.internalStatusMessageLabel=void 0,this.DefaultGroups={inprogress:"inprogress",success:"success",pending:"pending",failure:"failure"},this.kick=o((()=>{this.tick=Date.now()}),30),this.listenForActionEvents=()=>{this.element.addEventListener("duetActionEvent",(t=>{const e=t.detail,{action:a,id:i,originalEvent:s}=e;switch(a){case"delete":this.onDelete(i,s);break;case"cancel":this.onCancel(i,s)}}))},this.verifyValidity=()=>{const{invalid:t,valid:e}=this.getFilesAsArray(),a=this.valid;this.valid=0===t.length&&0!==e.length,this.valid!==a&&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.getItemHTMLFromItemData=(e,a)=>a===this.DefaultGroups.success?t(E,{data:e,showLinks:this.showLinks}):a===this.DefaultGroups.inprogress?t(T,{progress:e.progress,name:e.item.name}):a===this.DefaultGroups.pending?t(S,{name:e.item.name}):a===this.DefaultGroups.failure?t(z,{data:e,errorCodes:this.errorCodes}):e.group?e.html:"none",this.genHashName=()=>Date.now().toString(36)+Math.random(),this.updateValueInMap=(t,e,a,i=!0)=>{try{const i=this.files.get(t);i[e]=a,this.files.set(t,i)}catch(s){}i&&this.kick()},this.updateProgress=(t,e)=>{t.lengthComputable?(a=>{this.updateValueInMap(e,"progress",a),this.onProgress(e,a,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((a=>{a.valid&&!a.deleted?t.push(a):a.valid||a.deleted||e.push(a)})),{valid:t,invalid:e}},this.resetFormFields=()=>{this.nativeInput.value=""},this.startUpload=async(t,e)=>{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,a)=>{this.updateValueInMap(e,"status",a,!1),this.updateValueInMap(e,"uploaded",!0,!1);try{const a=JSON.parse(t.response);this.updateValueInMap(e,"url",a.url)}catch(i){this.updateValueInMap(e,"url",null),console.error("Server did not respond with expected response {url: string}")}},this.transferDoneWithFailure=(t,e,a)=>{try{const{error:a}=JSON.parse(t.response);this.updateValueInMap(e,"error",{message:a.message,type:a.type},!1)}catch(i){console.error("Server did not respond with expected response error:{message: string, type: int}"),this.updateValueInMap(e,"error",{type:a},!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 a=0;return!!(e&&(this.files.forEach((t=>{t.valid&&t.size&&(a+=t.size)})),a>e))})(0,this.maxBytesTotal),a=((t,e)=>{let a=0;return!!(e&&(this.files.forEach((t=>{t.valid&&a++})),a>e))})(0,this.maxFiles);return e&&t&&this.updateValueInMap(t,"error",w("duet-upload-202",this.errorCodes),!1),a&&t&&this.updateValueInMap(t,"error",w("duet-upload-301",this.errorCodes),!1),this.bytesMaxReached=e,this.fileMaxReached=a,{bytesMaxReached:e,fileMaxReached:a}},this.uploadFile=async(t,e=!1,a)=>{!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),a&&e.append("key",a),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(i){this.updateValueInMap(t.item.name,"valid",!1,!1)}},this.uploadPendingFiles=()=>{for(const[t,e]of this.files.entries())"pending"===e.group&&!0===e.pending&&this.uploadFile(e,!0,t)},this.getItemFromUID=t=>{for(const[e,a]of this.files.entries())if(a.uid===t)return{value:a,key:e};return null},this.onDelete=(t,e)=>{const a=this.getItemFromUID(t).key,i=this.files.get(a);this.files.delete(a),this.validateTotals(),this.kick(),this.duetDelete.emit({originalEvent:e,data:{deletion:i},component:"duet-upload"}),this.external||i.pending||this.makeXHRDeleteRequest(i),this.resetFormFields()},this.onCancel=(t,e)=>{const a=this.getItemFromUID(t).key,i=this.files.get(a);if(this.files.delete(a),this.external)this.kick();else{const{xhr:t}=i;t&&t.abort()}this.resetFormFields(),this.duetCancel.emit({originalEvent:e,data:{cancelled:i},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,a)=>{this.duetChange.emit({originalEvent:a,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=[...this.files.values()],e=[],a=[],i=[],s=[];return t.forEach((t=>{const d=this.getGroupFromItemData(t),l=this.getItemHTMLFromItemData(t,d);d===this.DefaultGroups.success?s.push({uid:t.uid,item:l,group:d,name:t.item.name}):d===this.DefaultGroups.inprogress?e.push({uid:t.uid,item:l,group:d,name:t.item.name}):d===this.DefaultGroups.pending?i.push({uid:t.uid,item:l,group:d,name:t.item.name}):d===this.DefaultGroups.failure?a.push({uid:t.uid,item:l,group:d,name:t.item.name}):t.group&&e.push({uid:t.uid,item:l,group:t.group,name:t.item.name})})),{pending:i,failure:a,success:s,inprogress:e}},this.getColumns=t=>[{sort_order:1,direction:-1,index:0,key:t.id,label:t.label}],this.getActions=t=>this.actions.filter((e=>e.map.includes(t))),this.renderEditableTableGroups=()=>{const e=this.filterMap();return this.groups.map((a=>{const i=e[a.id];if(null==i?void 0:i.length)return t("duet-table",{variation:"plain",breakpoint:"none",role:"log",margin:this.hideGroups?"none":"auto"},t("table",{class:"duet-upload-editable-table"},t("thead",{class:"duet-upload-editable-table-header"},t("tr",null,t("th",{class:{"duet-upload-editable-table-header-hidden":this.hideGroups}},this.hideGroups?t("duet-visually-hidden",null,r(a.label)):r(a.label)))),t("tbody",null,t("tr",null,t("td",{class:"duet-upload-editable-table-data"},t("duet-editable-table",{breakpoint:"none",variation:"plain",groupId:a.id,columns:this.getColumns(a),actions:this.getActions(a.id),margin:"none",rows:i}))))))}))},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} lähetettävästä {filesTotal} tiedostosta",inProgressWithErrors:"Lähetetään {filesInProgress} tiedostoa, lähetetty {filesUploaded} lähetettävästä {filesTotal} tiedostosta, {filesWithErrors} tiedostossa on virheitä",done:"Kaikki {filesTotal} tiedostoa lähetetty onnistuneesti",doneWithErrors:"Lähetys valmis, {filesUploaded} tiedostoa on lähetetty onnistuneesti, {filesWithErrors} tiedostossa oli virheitä",files:"tiedostot",file:"tiedosto"},sv:{inProgress:"Adding {filesUploaded} of {filesTotal}",inProgressWithErrors:"Laddar upp {filesInProgress}, {filesUploaded} uppladdad av {filesTotal}, {filesWithErrors} misslyckades",done:"Alla {filesTotal} har lagts till",doneWithErrors:"Handling slutförd, {filesUploaded} har lagts till, {filesWithErrors} misslyckades",files:"filer",file:"fil"},en:{inProgress:"Adding {filesUploaded} of {filesTotal}",inProgressWithErrors:"Uploading {filesInProgress}, {filesUploaded} uploaded of {filesTotal}, {filesWithErrors} failed",done:"All {filesTotal} added successfully",doneWithErrors:"Action completed, {filesUploaded} has been added successfully, {filesWithErrors} had errors",files:"File",file:"file"}},this.statusMessageLabel=r(this.statusLabelDefaults),this.buttonLabelDefaults={fi:"Lisää liite",sv:"Lägg till en bilaga",en:"Add an attachment"},this.buttonLabel=r(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=r(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=r(this.descriptionDefaults),this.fileListEmptyDefaults={fi:"Ei vielä lisättyjä tiedostoja.",sv:"Inga filer har lagts till ännu.",en:"No files added yet."},this.fileListEmpty=r(this.fileListEmptyDefaults),this.error="",this.errorCodes=x,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.value=void 0,this.groups=[{id:this.DefaultGroups.pending,label:{en:"Files to upload",sv:"Filer att ladda",fi:"Ladattavat tiedostot"}},{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"}}]}watchValidHandler(t,e){t!==e&&this.kick()}componentWillLoad(){this.internalStatusMessageLabel="string"==typeof this.statusMessageLabel?u(this.groups):this.statusMessageLabel,d(this),this.listenForActionEvents(),this.onReady()}componentWillRender(){this.verifyValidity()}async setFocus(t){this.nativeInput&&this.nativeInput.focus(t)}async upload(t){await this.setFocus(),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,a){this.updateValueInMap(t,e,a)}render(){const e=this.identifier||this.uploadId,a=Math.round((this.maxBytesTotal?this.maxBytesTotal:this.maxBytes*this.maxFiles)/1024/1024),s=Math.round(this.maxBytes/1024/1024);let d=this.description.replace(/{maxfiles}/g,this.maxFiles.toString());return d=d.replace(/{maxbytes}/g,`${s.toString()} MB`),d=d.replace(/{maxbytestotal}/g,`${a.toString()} MB`),d=d.replace(/{filetypes}/g,this.allowedExtensions.split(",").join(", ")),t(i,{class:{"duet-m-0":"none"===this.margin}},t("duet-fieldset",{label:this.label,caption:d},t("slot",{name:"header"}),!this.files.size&&t("duet-label",{part:this.identifier?`${this.identifier}-empty-state`:"duet-upload-empty-state",theme:"turva"===this.theme?"turva":"default",size:"small",class:{"duet-upload-filelist-empty":!this.files.size,"duet-upload-filelist":!0,"duet-upload-filelist-filled":this.files.size},id:this.labelId,for:e},t("span",{class:{"duet-upload-filelist-empty-label":!this.files.size}},this.fileListEmpty)),!!this.files.size&&t("slot",{name:"fileheader"}),!!this.files.size&&t("duet-upload-aria-status",{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.renderEditableTableGroups(),!!this.files.size&&t("slot",{name:"filefooter"}),t("duet-spacer",{size:"large"}),!this.hideButton&&t("duet-button",{id:this.buttonId,onClick:this.startUpload,"accessible-controls":e,disabled:this.fileMaxReached,"accessible-label":this.accessibleButtonLabel,"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),t("duet-spacer",{size:"medium"}),(this.fileMaxReached||this.bytesMaxReached)&&t("duet-alert",{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)),t("duet-spacer",{size:"medium"}),t("duet-visually-hidden",{"aria-hidden":"true"},t("input",{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,a=t.get("name");e.upload.addEventListener("progress",(t=>{this.updateProgress(t,a)})),e.upload.addEventListener("load",(()=>{this.transferComplete(a)})),e.upload.addEventListener("error",(()=>{this.transferFailed(a)})),e.upload.addEventListener("abort",(()=>{this.transferCanceled(a)}));let i={payload:{data:t,name:a},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&&(i=this.middleware(i)),M(i)}makeXHRDeleteRequest(t){const{uid:e,item:a}=t,i=new XMLHttpRequest;let s={payload:{data:null,name},options:{type:"DELETE",xhr:i,uri:this.uri,argument:`?key=${e}&name=${a.name}`,headers:{"x-fileuid":e,"x-filename":a.name}},onFailure:this.transferDoneWithFailure,onSuccess:this.transferDone,onProgress:this.trackProgress};return this.middleware&&(s=this.middleware(s)),M(s)}async onChange(t){var e;const a=Array.from(null===(e=this.nativeInput)||void 0===e?void 0:e.files);if(a)for(const i of a){const{valid:t,errorMessage:e,errorType:a,errorSystem:s}=j(i,{maxBytes:this.maxBytes,allowedExtensions:this.allowedExtensions,allowedMimetypes:this.allowedMimetypes},this.errorCodes),d={uid:this.genHashName(),item:i,size:i.size,meta:this.metaData,uploaded:!1,valid:t,error:{type:t?void 0:a,message:t?void 0:e,system_message:t?void 0:s},progress:0,deleted:!1,xhr:!1,url:!1};this.files.set(i.name,d);const{bytesMaxReached:l,fileMaxReached:o}=this.validateTotals(i.name);l||o?this.updateValueInMap(i.name,"valid",!1,!1):t&&!this.external?await this.uploadFile(d):t&&this.external?(this.updateValueInMap(d.item.name,"pending",!0,!1),this.updateValueInMap(d.item.name,"group","pending",!0)):t||this.updateValueInMap(i.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"]}}};F.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}.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:#f5f8fa}.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-upload-editable-table .duet-upload-item-name duet-icon{position:relative;top:2px}duet-paragraph::part(duet-paragraph){word-break:break-word}";export{g as duet_editable_table,v as duet_table,F as duet_upload}
4
+ import{h as t,r as e,c as a,H as i,g as s}from"./p-ab11408b.js";import{i as d}from"./p-4ebf1618.js";import{f as l,d as o}from"./p-0b3f675e.js";import{i as n}from"./p-54f35a79.js";import{g as r,s as u}from"./p-ede854e1.js";import{q as h,s as b}from"./p-9052b6f5.js";import{b as p}from"./p-79a9746e.js";import{c as m}from"./p-c1325e35.js";import{p as c}from"./p-5a9d75e1.js";const f=({data:e,groupId:a,alignment:i})=>{const s=`duet-editable-table duet-editable-table-content-${a}`;return"string"==typeof e?t("td",{innerHTML:e,class:s,part:`${a}content`,style:{verticalAlign:i}}):t("td",{class:s,part:`${a}content`,style:{verticalAlign:i}},e)},g=class{constructor(t){e(this,t),this.duetTableToggle=a(this,"duetTableToggle",7),this.duetMenuClick=a(this,"duetMenuClick",7),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:a,direction:i,index:s,key:d}=t;this.duetTableToggle.emit({sort_order:a,index:s,direction:i,key:d,component:"duet-editable-table",originalEvent:e})},this.handleKeyDown=(t,e)=>{n(e)&&this.toggleColumn(t,e)},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}componentWillLoad(){d(this)}createLabel(e){const{sort_order:a,direction:i,index:s,label:d}=e,l=r(d);return this.sortable?t("span",{class:"duet-table-label","data-index":s},t("duet-button",{size:"small",icon:a&&1===i?"action-arrow-down-small":a&&-1===i?"action-arrow-up-small":"action-subtract-small","icon-size":"medium-small","accessible-label":r(this.sortableDefaultLabel),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(l(["index"]))}getRowSortOrder(){return[...this.columns].sort(l(["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 a=this.createLabel(e);return""!==a?t("th",{scope:"col"},a):t("td",null)}})),this.actions&&t("th",{scope:"col",class:"duet-table-action-header-heading"},this.actions&&t("duet-visually-hidden",null,r(this.actionColumnLabel))))}renderActions(e,a){if(this.actions)return t("td",{class:"duet-text-right"},this.actions.map((i=>t("duet-action-button",{actionMeta:Object.assign({},(null==e?void 0:e.meta)||{},{index:a}),actionId:(null==e?void 0:e.uid)||(null==e?void 0:e.id)||null,actionName:i.name,theme:this.theme,iconName:i.icon,iconColor:i.color,iconSize:i.size,background:i.background,"accessible-label":`${r(i.label)} ${e.name||""}`}))))}renderTableBody(){const e=this.getSortedColumns(),a=this.getRowSortOrder();return[...this.rows].sort(l(a)).map(((a,i)=>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(a.meta)},e.map((e=>{if(!1!==e.display)return t(f,{data:a[e.key]?a[e.key]:a.item,groupId:this.groupId})})),this.actions&&this.renderActions(a,i))))}render(){return t(i,{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},t("table",{role:this.accessibleRole},t("caption",null,t("slot",{name:"tcaption"})),t("thead",null,t("tr",null,t("td",{class:"duet-editable-table-actions-menu",colSpan:99},t("slot",{name:"thead-first"}))),this.renderTableHeader(),t("tr",null,t("td",{class:"duet-editable-table-actions-menu",colSpan:99},t("slot",{name:"thead-last"})))),t("tbody",null,this.renderTableBody()),t("tfoot",null,t("tr",null,t("th",{class:"duet-editable-table-footer-menu",colSpan:99},t("slot",{name:"tfoot"})))))))}get element(){return s(this)}};g.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 y={none:0,"with-links":16*parseFloat(h),"without-links":16*parseFloat(b)},v=class{constructor(t){e(this,t),this.headingSelector="thead tr > :not(*.duet-editable-table-actions-menu",this.handleMediaQueryChange=t=>{this.matchesBreakpoint=t.matches},this.matchesBreakpoint=!0,this.theme=void 0,this.margin="auto",this.variation="striped",this.sticky=!1,this.stickyDistance="with-links",this.breakpoint="small"}connectedCallback(){this.mq=matchMedia("none"===this.breakpoint||"none-scrollable"===this.breakpoint?"all":p[this.breakpoint]),this.mq.addEventListener("change",o(this.handleMediaQueryChange,50)),this.handleMediaQueryChange(this.mq),this.observer=new MutationObserver((()=>o(this.copyHeadingsToCells(),50))),this.observer.observe(this.element,{childList:!0,subtree:!0})}componentWillLoad(){if(d(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=y[this.stickyDistance];this.element.querySelectorAll(this.headingSelector).forEach((e=>e.style.top=`${t}px`))}}componentDidLoad(){this.observer&&this.observer.takeRecords()}disconnectedCallback(){this.observer.disconnect(),this.observer=null,this.mq.removeListener(this.handleMediaQueryChange),this.mq=null,this.matchesBreakpoint=!0}copyHeadingsToCells(){const t=this.element.querySelectorAll(this.headingSelector),e=this.element.querySelectorAll("tbody tr"),a=Array.from(t).map((t=>t.textContent.trim()));e.forEach((t=>{t.querySelectorAll("td").forEach(((t,e)=>{a[e]&&(t.dataset.heading=a[e])}))}))}render(){return t(i,{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}},t("slot",null))}get element(){return s(this)}};v.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-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:#00294d}duet-table.duet-theme-turva td{color:#171c3a}duet-table th{font-weight:600;line-height:1.25;color:#657787;text-align:left}duet-table.duet-theme-turva th{color:#747475}duet-table tbody th{font-weight:600;color:#00294d}duet-table.duet-theme-turva tbody th{color:#171c3a}duet-table .duet-table-action-row td:last-child{justify-self:end;padding-right:20px !important;white-space:nowrap}.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 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:#657787;text-align:left}.duet-table-flattened td[data-heading]::before{margin-bottom:4px !important;display:block;font-size:1rem;font-weight:600;color:#00294d;content:attr(data-heading)}.duet-table-flattened.duet-theme-turva td[data-heading]::before{color:#171c3a}.duet-table-sticky thead th{position:sticky;top:0;background:white}.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:white}.duet-table-striped.duet-table-sticky thead th{border-bottom:1px solid #e1e3e6}.duet-table-striped.duet-table-sticky.duet-theme-turva thead th{border-bottom-color:#e4e4e6}.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(0, 80, 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(0, 80, 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 #e1e3e6}.duet-table-striped.duet-theme-turva tfoot td{border-top-color:#e4e4e6}.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 #e1e3e6}.duet-table-striped.duet-table-flattened.duet-theme-turva tfoot tr{border-top-color:#e4e4e6}.duet-table-fixed th,.duet-table-minimal th,.duet-table-plain th{padding:16px !important;border-bottom:1px solid #657787}.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:#444445}.duet-table-fixed tbody th,.duet-table-minimal tbody th,.duet-table-plain tbody th{padding-top:40px !important;border-bottom-color:#e1e3e6}.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:#e4e4e6}.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 #e1e3e6}.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:#e4e4e6}.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 #e1e3e6}.duet-table-plain.duet-table-flattened.duet-theme-turva tbody tr{border-bottom-color:#e4e4e6}.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 #e1e3e6}.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 #e1e3e6}.duet-table-minimal.duet-table-flattened.duet-theme-turva tfoot{border-top-color:#e4e4e6}.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 #e1e3e6}.duet-table-fixed:not(.duet-table-flattened).duet-theme-turva tfoot{border-top-color:#e4e4e6}.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(68, 68, 69, 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 #e1e3e6}.duet-table-sortable:not(.duet-table-flattened).duet-theme-turva tfoot{border-top-color:#e4e4e6}.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 x=[{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-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."}}],k=(t,e)=>{let a={type:void 0,system_message:void 0,message:void 0};return a=(e=c(e)).filter((e=>e.type==t))[0],a||(a=e.filter((t=>"default"===t.type))[0]),a},w=(t,e)=>{const a=k(t,e),i=r(a.message);return""!==i&&i?i:a.system_message},z=({data:e,errorCodes:a})=>{const{item:i,error:s}=e,{name:d}=i,{type:l}=s;return t("span",{class:"duet-upload-item-error",role:"status"},t("duet-paragraph",{class:"duet-upload-item-name",color:"danger",margin:"none",weight:"semi-bold"},t("duet-icon",{margin:"none",size:"x-small",name:"messaging-attachment"}),t("duet-spacer",{size:"xx-small",direction:"horizontal"}),d),t("duet-paragraph",{class:"duet-upload-item-error-label",size:"small",margin:"none",color:"danger"},w(l,a)))},T=({progress:e,name:a})=>t("span",{class:"duet-upload-item-name"},t("duet-icon",{margin:"none",size:"x-small",name:"messaging-attachment"}),t("duet-spacer",{size:"xx-small",direction:"horizontal"}),a,t("br",null),t("duet-progress",{progress:Math.ceil(e),"aria-hidden":!0})),S=({name:e})=>t("span",{class:"duet-upload-item-name"},t("duet-icon",{margin:"none",size:"x-small",name:"messaging-attachment"}),t("duet-spacer",{size:"xx-small",direction:"horizontal"}),e),E=({data:e,showLinks:a})=>{const{item:i,size:s,uploaded:d,url:l,meta:o}=e,{name:n}=i,r=t("span",{class:"duet-upload-item-name"},t("duet-icon",{margin:"none",size:"x-small",name:"messaging-attachment"}),t("duet-spacer",{size:"xx-small",direction:"horizontal"}),n),u=t("span",{class:"duet-upload-item-size",style:{fontSize:"14px",fontWeight:"400"}},"(",((t,e=2)=>{if(0===t)return"0 Bytes";const a=e<0?0:e,i=Math.floor(Math.log(t)/Math.log(1024));return parseFloat((t/Math.pow(1024,i)).toFixed(a))+" "+["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"][i]})(s),")"),h=t("duet-paragraph",{color:"secondary",margin:"none",weight:"semi-bold"},d&&l&&a?t("duet-link",{url:l,external:!0},r):r,t("duet-spacer",{size:"xx-small",direction:"horizontal"}),u),b=o&&o.badges?t("span",null,t("duet-spacer",{size:"xx-small"}),o.badges.map((e=>t("duet-badge",{color:"primary"},e)))):void 0;return t("span",{class:"duet-upload-item-success"},t("div",null,h),b)},j=(t,e,a)=>{const{allowedMimetypes:i,allowedExtensions:s,maxBytes:d}=e;let l=!1,o=k("default",a);if(t){const{name:e,type:n,size:r}=t,u=((t,e)=>{if(!e||!t)return!0;const a=e.split(",");let i=!1;return a.forEach((e=>{const a=e.split("/"),s=t.split("/");a[0]!==s[0]||a[1]!==s[1]&&"*"!==a[1]||(i=!0)})),i})(n,i),h="all"===s||""===s||" "===s||void 0===s||((t,e)=>{if(!e)return!0;const a=t.split(".");return e.split(",").includes(a[a.length-1])})(e.toLowerCase(),s),b=((t,e)=>!e||!t||e>=t)(r,d);u||(o=k("duet-upload-101",a)),h||(o=k("duet-upload-100",a)),b||(o=k("duet-upload-201",a)),l=u&&h&&b}else l=!1;return{valid:l,errorMessage:l?void 0:r(o.message),errorSystem:l?void 0:o.system_message,errorType:l?void 0:o.type}},M=({payload:t,options:e,onFailure:a,onSuccess:i,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:u,name:h}=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&&i(l,h,l.status),l.readyState===XMLHttpRequest.DONE&&l.status>=300&&l.status<999&&a(l,h,l.status)},s(h)),l.send(u),l},F=class{constructor(i){e(this,i),this.duetChange=a(this,"duetChange",3),this.duetBlur=a(this,"duetBlur",7),this.duetFocus=a(this,"duetFocus",7),this.duetReady=a(this,"duetReady",7),this.duetDone=a(this,"duetDone",3),this.duetState=a(this,"duetState",3),this.duetDelete=a(this,"duetDelete",3),this.duetCancel=a(this,"duetCancel",3),this.duetProgress=a(this,"duetProgress",3),this.duetUpload=a(this,"duetUpload",3),this.buttonId=m("DuetButton"),this.labelId=m("DuetLabel"),this.uploadId=m("DuetUpload"),this.filesInProgress=new Map,this.fileMaxReached=!1,this.bytesMaxReached=!1,this.internalStatusMessageLabel=void 0,this.DefaultGroups={inprogress:"inprogress",success:"success",pending:"pending",failure:"failure"},this.kick=o((()=>{this.tick=Date.now()}),30),this.listenForActionEvents=()=>{this.element.addEventListener("duetActionEvent",(t=>{const e=t.detail,{action:a,id:i,originalEvent:s}=e;switch(a){case"delete":this.onDelete(i,s);break;case"cancel":this.onCancel(i,s)}}))},this.verifyValidity=()=>{const{invalid:t,valid:e}=this.getFilesAsArray(),a=this.valid;this.valid=0===t.length&&0!==e.length,this.valid!==a&&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.getItemHTMLFromItemData=(e,a)=>a===this.DefaultGroups.success?t(E,{data:e,showLinks:this.showLinks}):a===this.DefaultGroups.inprogress?t(T,{progress:e.progress,name:e.item.name}):a===this.DefaultGroups.pending?t(S,{name:e.item.name}):a===this.DefaultGroups.failure?t(z,{data:e,errorCodes:this.errorCodes}):e.group?e.html:"none",this.genHashName=()=>Date.now().toString(36)+Math.random(),this.updateValueInMap=(t,e,a,i=!0)=>{try{const i=this.files.get(t);i[e]=a,this.files.set(t,i)}catch(s){}i&&this.kick()},this.updateProgress=(t,e)=>{t.lengthComputable?(a=>{this.updateValueInMap(e,"progress",a),this.onProgress(e,a,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((a=>{a.valid&&!a.deleted?t.push(a):a.valid||a.deleted||e.push(a)})),{valid:t,invalid:e}},this.resetFormFields=()=>{this.nativeInput.value=""},this.startUpload=async(t,e)=>{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,a)=>{this.updateValueInMap(e,"status",a,!1),this.updateValueInMap(e,"uploaded",!0,!1);try{const a=JSON.parse(t.response);this.updateValueInMap(e,"url",a.url)}catch(i){this.updateValueInMap(e,"url",null),console.error("Server did not respond with expected response {url: string}")}},this.transferDoneWithFailure=(t,e,a)=>{try{const{error:a}=JSON.parse(t.response);this.updateValueInMap(e,"error",{message:a.message,type:a.type},!1)}catch(i){console.error("Server did not respond with expected response error:{message: string, type: int}"),this.updateValueInMap(e,"error",{type:a},!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 a=0;return!!(e&&(this.files.forEach((t=>{t.valid&&t.size&&(a+=t.size)})),a>e))})(0,this.maxBytesTotal),a=((t,e)=>{let a=0;return!!(e&&(this.files.forEach((t=>{t.valid&&a++})),a>e))})(0,this.maxFiles);return e&&t&&this.updateValueInMap(t,"error",w("duet-upload-202",this.errorCodes),!1),a&&t&&this.updateValueInMap(t,"error",w("duet-upload-301",this.errorCodes),!1),this.bytesMaxReached=e,this.fileMaxReached=a,{bytesMaxReached:e,fileMaxReached:a}},this.uploadFile=async(t,e=!1,a)=>{!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),a&&e.append("key",a),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(i){this.updateValueInMap(t.item.name,"valid",!1,!1)}},this.uploadPendingFiles=()=>{for(const[t,e]of this.files.entries())"pending"===e.group&&!0===e.pending&&this.uploadFile(e,!0,t)},this.getItemFromUID=t=>{for(const[e,a]of this.files.entries())if(a.uid===t)return{value:a,key:e};return null},this.onDelete=(t,e)=>{const a=this.getItemFromUID(t).key,i=this.files.get(a);this.files.delete(a),this.validateTotals(),this.kick(),this.duetDelete.emit({originalEvent:e,data:{deletion:i},component:"duet-upload"}),this.external||i.pending||this.makeXHRDeleteRequest(i),this.resetFormFields()},this.onCancel=(t,e)=>{const a=this.getItemFromUID(t).key,i=this.files.get(a);if(this.files.delete(a),this.external)this.kick();else{const{xhr:t}=i;t&&t.abort()}this.resetFormFields(),this.duetCancel.emit({originalEvent:e,data:{cancelled:i},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,a)=>{this.duetChange.emit({originalEvent:a,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=[...this.files.values()],e=[],a=[],i=[],s=[];return t.forEach((t=>{const d=this.getGroupFromItemData(t),l=this.getItemHTMLFromItemData(t,d);d===this.DefaultGroups.success?s.push({uid:t.uid,item:l,group:d,name:t.item.name}):d===this.DefaultGroups.inprogress?e.push({uid:t.uid,item:l,group:d,name:t.item.name}):d===this.DefaultGroups.pending?i.push({uid:t.uid,item:l,group:d,name:t.item.name}):d===this.DefaultGroups.failure?a.push({uid:t.uid,item:l,group:d,name:t.item.name}):t.group&&e.push({uid:t.uid,item:l,group:t.group,name:t.item.name})})),{pending:i,failure:a,success:s,inprogress:e}},this.getColumns=t=>[{sort_order:1,direction:-1,index:0,key:t.id,label:t.label}],this.getActions=t=>this.actions.filter((e=>e.map.includes(t))),this.renderEditableTableGroups=()=>{const e=this.filterMap();return this.groups.map((a=>{const i=e[a.id];if(null==i?void 0:i.length)return t("duet-table",{variation:"plain",breakpoint:"none",role:"log",margin:this.hideGroups?"none":"auto"},t("table",{class:"duet-upload-editable-table"},t("thead",{class:"duet-upload-editable-table-header"},t("tr",null,t("th",{class:{"duet-upload-editable-table-header-hidden":this.hideGroups}},this.hideGroups?t("duet-visually-hidden",null,r(a.label)):r(a.label)))),t("tbody",null,t("tr",null,t("td",{class:"duet-upload-editable-table-data"},t("duet-editable-table",{breakpoint:"none",variation:"plain",groupId:a.id,columns:this.getColumns(a),actions:this.getActions(a.id),margin:"none",rows:i}))))))}))},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} lähetettävästä {filesTotal} tiedostosta",inProgressWithErrors:"Lähetetään {filesInProgress} tiedostoa, lähetetty {filesUploaded} lähetettävästä {filesTotal} tiedostosta, {filesWithErrors} tiedostossa on virheitä",done:"Kaikki {filesTotal} tiedostoa lähetetty onnistuneesti",doneWithErrors:"Lähetys valmis, {filesUploaded} tiedostoa on lähetetty onnistuneesti, {filesWithErrors} tiedostossa oli virheitä",files:"tiedostot",file:"tiedosto"},sv:{inProgress:"Adding {filesUploaded} of {filesTotal}",inProgressWithErrors:"Laddar upp {filesInProgress}, {filesUploaded} uppladdad av {filesTotal}, {filesWithErrors} misslyckades",done:"Alla {filesTotal} har lagts till",doneWithErrors:"Handling slutförd, {filesUploaded} har lagts till, {filesWithErrors} misslyckades",files:"filer",file:"fil"},en:{inProgress:"Adding {filesUploaded} of {filesTotal}",inProgressWithErrors:"Uploading {filesInProgress}, {filesUploaded} uploaded of {filesTotal}, {filesWithErrors} failed",done:"All {filesTotal} added successfully",doneWithErrors:"Action completed, {filesUploaded} has been added successfully, {filesWithErrors} had errors",files:"File",file:"file"}},this.statusMessageLabel=r(this.statusLabelDefaults),this.buttonLabelDefaults={fi:"Lisää liite",sv:"Lägg till en bilaga",en:"Add an attachment"},this.buttonLabel=r(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=r(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=r(this.descriptionDefaults),this.fileListEmptyDefaults={fi:"Ei vielä lisättyjä tiedostoja.",sv:"Inga filer har lagts till ännu.",en:"No files added yet."},this.fileListEmpty=r(this.fileListEmptyDefaults),this.error="",this.errorCodes=x,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.value=void 0,this.groups=[{id:this.DefaultGroups.pending,label:{en:"Files to upload",sv:"Filer att ladda",fi:"Ladattavat tiedostot"}},{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"}}]}watchValidHandler(t,e){t!==e&&this.kick()}componentWillLoad(){this.internalStatusMessageLabel="string"==typeof this.statusMessageLabel?u(this.groups):this.statusMessageLabel,d(this),this.listenForActionEvents(),this.onReady()}componentWillRender(){this.verifyValidity()}async setFocus(t){this.nativeInput&&this.nativeInput.focus(t)}async upload(t){await this.setFocus(),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,a){this.updateValueInMap(t,e,a)}render(){const e=this.identifier||this.uploadId,a=Math.round((this.maxBytesTotal?this.maxBytesTotal:this.maxBytes*this.maxFiles)/1024/1024),s=Math.round(this.maxBytes/1024/1024);let d=this.description.replace(/{maxfiles}/g,this.maxFiles.toString());return d=d.replace(/{maxbytes}/g,`${s.toString()} MB`),d=d.replace(/{maxbytestotal}/g,`${a.toString()} MB`),d=d.replace(/{filetypes}/g,this.allowedExtensions.split(",").join(", ")),t(i,{class:{"duet-m-0":"none"===this.margin}},t("duet-fieldset",{label:this.label,caption:d},t("slot",{name:"header"}),!this.files.size&&t("duet-label",{part:this.identifier?`${this.identifier}-empty-state`:"duet-upload-empty-state",theme:"turva"===this.theme?"turva":"default",size:"small",class:{"duet-upload-filelist-empty":!this.files.size,"duet-upload-filelist":!0,"duet-upload-filelist-filled":this.files.size},id:this.labelId,for:e},t("span",{class:{"duet-upload-filelist-empty-label":!this.files.size}},this.fileListEmpty)),!!this.files.size&&t("slot",{name:"fileheader"}),!!this.files.size&&t("duet-upload-aria-status",{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.renderEditableTableGroups(),!!this.files.size&&t("slot",{name:"filefooter"}),t("duet-spacer",{size:"large"}),!this.hideButton&&t("duet-button",{id:this.buttonId,onClick:this.startUpload,"accessible-controls":e,disabled:this.fileMaxReached,"accessible-label":this.accessibleButtonLabel,"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),t("duet-spacer",{size:"medium"}),(this.fileMaxReached||this.bytesMaxReached)&&t("duet-alert",{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)),t("duet-spacer",{size:"medium"}),t("duet-visually-hidden",{"aria-hidden":"true"},t("input",{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,a=t.get("name");e.upload.addEventListener("progress",(t=>{this.updateProgress(t,a)})),e.upload.addEventListener("load",(()=>{this.transferComplete(a)})),e.upload.addEventListener("error",(()=>{this.transferFailed(a)})),e.upload.addEventListener("abort",(()=>{this.transferCanceled(a)}));let i={payload:{data:t,name:a},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&&(i=this.middleware(i)),M(i)}makeXHRDeleteRequest(t){const{uid:e,item:a}=t,i=new XMLHttpRequest;let s={payload:{data:null,name},options:{type:"DELETE",xhr:i,uri:this.uri,argument:`?key=${e}&name=${a.name}`,headers:{"x-fileuid":e,"x-filename":a.name}},onFailure:this.transferDoneWithFailure,onSuccess:this.transferDone,onProgress:this.trackProgress};return this.middleware&&(s=this.middleware(s)),M(s)}async onChange(t){var e;const a=Array.from(null===(e=this.nativeInput)||void 0===e?void 0:e.files);if(a)for(const i of a){const{valid:t,errorMessage:e,errorType:a,errorSystem:s}=j(i,{maxBytes:this.maxBytes,allowedExtensions:this.allowedExtensions,allowedMimetypes:this.allowedMimetypes},this.errorCodes),d={uid:this.genHashName(),item:i,size:i.size,meta:this.metaData,uploaded:!1,valid:t,error:{type:t?void 0:a,message:t?void 0:e,system_message:t?void 0:s},progress:0,deleted:!1,xhr:!1,url:!1};this.files.set(i.name,d);const{bytesMaxReached:l,fileMaxReached:o}=this.validateTotals(i.name);l||o?this.updateValueInMap(i.name,"valid",!1,!1):t&&!this.external?await this.uploadFile(d):t&&this.external?(this.updateValueInMap(d.item.name,"pending",!0,!1),this.updateValueInMap(d.item.name,"group","pending",!0)):t||this.updateValueInMap(i.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"]}}};F.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}.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:#f5f8fa}.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-upload-editable-table .duet-upload-item-name duet-icon{position:relative;top:2px}duet-paragraph::part(duet-paragraph){word-break:break-word}";export{g as duet_editable_table,v as duet_table,F as duet_upload}