@duetds/components 6.3.1 → 6.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (479) hide show
  1. package/hydrate/index.js +46 -26
  2. package/lib/cjs/duet-action-button.cjs.entry.js +6 -12
  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 +3 -3
  12. package/lib/cjs/duet-collapsible.cjs.entry.js +1 -1
  13. package/lib/cjs/duet-combobox.cjs.entry.js +4 -3
  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 +4 -3
  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 +26 -7
  24. package/lib/cjs/duet-icon.cjs.entry.js +1 -1
  25. package/lib/cjs/duet-input_2.cjs.entry.js +3 -2
  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-dropdown-link.cjs.entry.js +1 -1
  29. package/lib/cjs/duet-menu-bar-dropdown.cjs.entry.js +1 -1
  30. package/lib/cjs/duet-menu-bar-link.cjs.entry.js +1 -1
  31. package/lib/cjs/duet-menu-bar.cjs.entry.js +1 -1
  32. package/lib/cjs/duet-modal.cjs.entry.js +2 -2
  33. package/lib/cjs/duet-multiselect.cjs.entry.js +1 -1
  34. package/lib/cjs/duet-nav.cjs.entry.js +1 -1
  35. package/lib/cjs/duet-notification_2.cjs.entry.js +1 -1
  36. package/lib/cjs/duet-number-input.cjs.entry.js +1 -1
  37. package/lib/cjs/duet-pagination_2.cjs.entry.js +4 -4
  38. package/lib/cjs/duet-progress.cjs.entry.js +1 -1
  39. package/lib/cjs/duet-radio_2.cjs.entry.js +1 -1
  40. package/lib/cjs/duet-range-slider.cjs.entry.js +1 -1
  41. package/lib/cjs/duet-scrollable_3.cjs.entry.js +1 -1
  42. package/lib/cjs/duet-section-layout.cjs.entry.js +1 -1
  43. package/lib/cjs/duet-select.cjs.entry.js +1 -1
  44. package/lib/cjs/duet-slideout-lang.cjs.entry.js +1 -1
  45. package/lib/cjs/duet-slideout-link.cjs.entry.js +1 -1
  46. package/lib/cjs/duet-slideout-panel-dropdown-link.cjs.entry.js +1 -1
  47. package/lib/cjs/duet-slideout-panel-dropdown.cjs.entry.js +1 -1
  48. package/lib/cjs/duet-slideout-panel-link.cjs.entry.js +1 -1
  49. package/lib/cjs/duet-slideout-panel.cjs.entry.js +2 -2
  50. package/lib/cjs/duet-slideout.cjs.entry.js +2 -2
  51. package/lib/cjs/duet-step_2.cjs.entry.js +1 -1
  52. package/lib/cjs/duet-submenu-bar-dropdown-link.cjs.entry.js +1 -1
  53. package/lib/cjs/duet-submenu-bar-dropdown.cjs.entry.js +1 -1
  54. package/lib/cjs/duet-submenu-bar-link.cjs.entry.js +1 -1
  55. package/lib/cjs/duet-submenu-bar.cjs.entry.js +1 -1
  56. package/lib/cjs/duet-textarea.cjs.entry.js +1 -1
  57. package/lib/cjs/duet-toggle.cjs.entry.js +1 -1
  58. package/lib/cjs/duet-toolbar-dropdown-link.cjs.entry.js +1 -1
  59. package/lib/cjs/duet-toolbar-dropdown.cjs.entry.js +1 -1
  60. package/lib/cjs/duet-toolbar-link.cjs.entry.js +1 -1
  61. package/lib/cjs/duet-toolbar.cjs.entry.js +1 -1
  62. package/lib/cjs/duet-tooltip.cjs.entry.js +1 -1
  63. package/lib/cjs/duet-tray.cjs.entry.js +1 -1
  64. package/lib/cjs/duet-upload-aria-status.cjs.entry.js +1 -1
  65. package/lib/cjs/duet-visually-hidden.cjs.entry.js +1 -1
  66. package/lib/cjs/duet.cjs.js +2 -2
  67. package/lib/cjs/{focus-utils-1024552d.js → focus-utils-1690e8b7.js} +1 -1
  68. package/lib/cjs/{index-5c182924.js → index-f29ea71f.js} +1 -1
  69. package/lib/cjs/loader.cjs.js +2 -2
  70. package/lib/collection/components/duet-action-button/duet-action-button.js +16 -24
  71. package/lib/collection/components/duet-choice/duet-choice.js +3 -1
  72. package/lib/collection/components/duet-combobox/duet-combobox.js +21 -2
  73. package/lib/collection/components/duet-hero/duet-hero.css +200 -0
  74. package/lib/collection/components/duet-hero/duet-hero.js +50 -7
  75. package/lib/collection/components/duet-input/duet-input.js +2 -1
  76. package/lib/collection/components/duet-pagination/duet-pagination.js +2 -2
  77. package/lib/collection/components/duet-range-stepper/duet-range-stepper.js +1 -1
  78. package/lib/collection/components/duet-upload/duet-upload.js +3 -2
  79. package/lib/dist-custom-elements/duet-action-button.js +1 -1
  80. package/lib/dist-custom-elements/duet-alert.js +1 -1
  81. package/lib/dist-custom-elements/duet-badge.js +1 -1
  82. package/lib/dist-custom-elements/duet-breadcrumb.js +2 -2
  83. package/lib/dist-custom-elements/duet-breadcrumbs.js +2 -2
  84. package/lib/dist-custom-elements/duet-button.js +1 -1
  85. package/lib/dist-custom-elements/duet-caption.js +1 -1
  86. package/lib/dist-custom-elements/duet-card.js +3 -3
  87. package/lib/dist-custom-elements/duet-checkbox.js +1 -1
  88. package/lib/dist-custom-elements/duet-choice-group.js +6 -6
  89. package/lib/dist-custom-elements/duet-choice.js +6 -6
  90. package/lib/dist-custom-elements/duet-collapsible.js +2 -2
  91. package/lib/dist-custom-elements/duet-combobox.js +6 -4
  92. package/lib/dist-custom-elements/duet-cookie-consent.js +6 -6
  93. package/lib/dist-custom-elements/duet-date-picker.js +8 -8
  94. package/lib/dist-custom-elements/duet-divider.js +1 -1
  95. package/lib/dist-custom-elements/duet-editable-table.js +1 -1
  96. package/lib/dist-custom-elements/duet-empty-state.js +1 -1
  97. package/lib/dist-custom-elements/duet-fieldset.js +1 -1
  98. package/lib/dist-custom-elements/duet-footer.js +4 -4
  99. package/lib/dist-custom-elements/duet-grid-item.js +1 -1
  100. package/lib/dist-custom-elements/duet-grid.js +1 -1
  101. package/lib/dist-custom-elements/duet-header.js +8 -8
  102. package/lib/dist-custom-elements/duet-heading.js +1 -1
  103. package/lib/dist-custom-elements/duet-hero.js +35 -15
  104. package/lib/dist-custom-elements/duet-icon.js +1 -1
  105. package/lib/dist-custom-elements/duet-input.js +1 -1
  106. package/lib/dist-custom-elements/duet-label.js +1 -1
  107. package/lib/dist-custom-elements/duet-layout.js +1 -1
  108. package/lib/dist-custom-elements/duet-link.js +1 -1
  109. package/lib/dist-custom-elements/duet-list-item.js +1 -1
  110. package/lib/dist-custom-elements/duet-list.js +1 -1
  111. package/lib/dist-custom-elements/duet-logo.js +1 -1
  112. package/lib/dist-custom-elements/duet-menu-bar-dropdown-link.js +2 -2
  113. package/lib/dist-custom-elements/duet-menu-bar-dropdown.js +2 -2
  114. package/lib/dist-custom-elements/duet-menu-bar-link.js +2 -2
  115. package/lib/dist-custom-elements/duet-menu-bar.js +2 -2
  116. package/lib/dist-custom-elements/duet-modal.js +7 -7
  117. package/lib/dist-custom-elements/duet-multiselect.js +8 -8
  118. package/lib/dist-custom-elements/duet-nav.js +1 -1
  119. package/lib/dist-custom-elements/duet-notification-drawer.js +4 -4
  120. package/lib/dist-custom-elements/duet-notification.js +2 -2
  121. package/lib/dist-custom-elements/duet-number-input.js +7 -7
  122. package/lib/dist-custom-elements/duet-pagination.js +9 -9
  123. package/lib/dist-custom-elements/duet-paragraph.js +1 -1
  124. package/lib/dist-custom-elements/duet-progress.js +1 -1
  125. package/lib/dist-custom-elements/duet-radio-group.js +6 -6
  126. package/lib/dist-custom-elements/duet-radio.js +1 -1
  127. package/lib/dist-custom-elements/duet-range-slider.js +2 -2
  128. package/lib/dist-custom-elements/duet-range-stepper.js +5 -5
  129. package/lib/dist-custom-elements/duet-scrollable.js +1 -1
  130. package/lib/dist-custom-elements/duet-section-layout.js +1 -1
  131. package/lib/dist-custom-elements/duet-select.js +1 -1
  132. package/lib/dist-custom-elements/duet-slideout-lang.js +3 -3
  133. package/lib/dist-custom-elements/duet-slideout-link.js +2 -2
  134. package/lib/dist-custom-elements/duet-slideout-panel-dropdown-link.js +2 -2
  135. package/lib/dist-custom-elements/duet-slideout-panel-dropdown.js +2 -2
  136. package/lib/dist-custom-elements/duet-slideout-panel-link.js +2 -2
  137. package/lib/dist-custom-elements/duet-slideout-panel.js +2 -2
  138. package/lib/dist-custom-elements/duet-slideout.js +2 -2
  139. package/lib/dist-custom-elements/duet-spacer.js +1 -1
  140. package/lib/dist-custom-elements/duet-spinner.js +1 -1
  141. package/lib/dist-custom-elements/duet-step.js +4 -4
  142. package/lib/dist-custom-elements/duet-stepper.js +2 -2
  143. package/lib/dist-custom-elements/duet-submenu-bar-dropdown-link.js +2 -2
  144. package/lib/dist-custom-elements/duet-submenu-bar-dropdown.js +2 -2
  145. package/lib/dist-custom-elements/duet-submenu-bar-link.js +2 -2
  146. package/lib/dist-custom-elements/duet-submenu-bar.js +2 -2
  147. package/lib/dist-custom-elements/duet-tab-group.js +8 -8
  148. package/lib/dist-custom-elements/duet-tab.js +1 -1
  149. package/lib/dist-custom-elements/duet-table.js +1 -1
  150. package/lib/dist-custom-elements/duet-textarea.js +8 -8
  151. package/lib/dist-custom-elements/duet-toggle.js +2 -2
  152. package/lib/dist-custom-elements/duet-toolbar-dropdown-link.js +2 -2
  153. package/lib/dist-custom-elements/duet-toolbar-dropdown.js +2 -2
  154. package/lib/dist-custom-elements/duet-toolbar-link.js +2 -2
  155. package/lib/dist-custom-elements/duet-toolbar.js +1 -1
  156. package/lib/dist-custom-elements/duet-tooltip.js +1 -1
  157. package/lib/dist-custom-elements/duet-tray.js +3 -3
  158. package/lib/dist-custom-elements/duet-upload-aria-status.js +1 -1
  159. package/lib/dist-custom-elements/duet-upload.js +21 -20
  160. package/lib/dist-custom-elements/duet-visually-hidden.js +1 -1
  161. package/lib/dist-custom-elements/index.js +1 -1
  162. package/lib/dist-custom-elements/{p-b80d6bc3.js → p-07304f72.js} +1 -1
  163. package/lib/dist-custom-elements/{p-c288afb5.js → p-09f1b4d3.js} +2 -2
  164. package/lib/dist-custom-elements/{p-33f765ba.js → p-23555c40.js} +1 -1
  165. package/lib/dist-custom-elements/{p-6cf0920b.js → p-2db1f59a.js} +2 -2
  166. package/lib/dist-custom-elements/{p-e48d2549.js → p-37af5e4e.js} +1 -1
  167. package/lib/dist-custom-elements/{p-f63d4452.js → p-50596909.js} +1 -1
  168. package/lib/dist-custom-elements/{p-ddfd47c6.js → p-52acd123.js} +2 -2
  169. package/lib/dist-custom-elements/{p-946de108.js → p-55a97b61.js} +1 -1
  170. package/lib/dist-custom-elements/{p-8d44ec43.js → p-5ce3afc3.js} +1 -1
  171. package/lib/dist-custom-elements/{p-2fe868ea.js → p-5d1468ee.js} +1 -1
  172. package/lib/dist-custom-elements/{p-fae65a8a.js → p-5fe9f827.js} +1 -1
  173. package/lib/dist-custom-elements/{p-7c5d4e0d.js → p-788adf64.js} +1 -1
  174. package/lib/dist-custom-elements/{p-743d9f51.js → p-79eb8ec9.js} +1 -1
  175. package/lib/dist-custom-elements/{p-e7e99092.js → p-94e3ec93.js} +1 -1
  176. package/lib/dist-custom-elements/{p-109ee32c.js → p-a1f7f989.js} +2 -2
  177. package/lib/dist-custom-elements/{p-035ecaa2.js → p-a32e318c.js} +1 -1
  178. package/lib/dist-custom-elements/{p-cae5bd13.js → p-a5decd0e.js} +3 -3
  179. package/lib/dist-custom-elements/{p-e3fead64.js → p-a8128c54.js} +9 -15
  180. package/lib/dist-custom-elements/{p-2ebba09a.js → p-b2c7b7ee.js} +4 -4
  181. package/lib/dist-custom-elements/{p-5de79ec7.js → p-b571afc1.js} +1 -1
  182. package/lib/dist-custom-elements/{p-49a0152c.js → p-b85f3cda.js} +2 -2
  183. package/lib/dist-custom-elements/{p-57387b36.js → p-be0ba45a.js} +1 -1
  184. package/lib/dist-custom-elements/{p-ed049602.js → p-be7b0a77.js} +1 -1
  185. package/lib/dist-custom-elements/{p-878b06a3.js → p-c1b863e9.js} +1 -1
  186. package/lib/dist-custom-elements/{p-6f99cfd4.js → p-ca708c6c.js} +1 -1
  187. package/lib/dist-custom-elements/{p-16873d44.js → p-cf8d26ef.js} +8 -7
  188. package/lib/dist-custom-elements/{p-1362f0bf.js → p-d3bc5a14.js} +5 -5
  189. package/lib/dist-custom-elements/{p-66d8d978.js → p-d5460fb0.js} +7 -7
  190. package/lib/dist-custom-elements/{p-576a86ec.js → p-da4e7133.js} +1 -1
  191. package/lib/dist-custom-elements/{p-89ed456a.js → p-e5658e86.js} +3 -3
  192. package/lib/dist-custom-elements/{p-caffcc4c.js → p-ec570477.js} +6 -6
  193. package/lib/duet/duet.esm.js +1 -1
  194. package/lib/duet/duet.js +1 -1
  195. package/lib/duet/{p-f6884d0c.entry.js → p-000f082e.entry.js} +1 -1
  196. package/lib/duet/{p-a0db2a7e.entry.js → p-0012bd37.entry.js} +1 -1
  197. package/lib/duet/{p-8a20ddbc.entry.js → p-065ed09f.entry.js} +1 -1
  198. package/lib/duet/{p-fc87b7d1.system.entry.js → p-06a1d0e3.system.entry.js} +1 -1
  199. package/lib/duet/{p-b0db7981.system.entry.js → p-0a3fd45a.system.entry.js} +1 -1
  200. package/lib/duet/{p-bfa860e4.entry.js → p-0c3cc1bf.entry.js} +1 -1
  201. package/lib/duet/{p-e77874ed.entry.js → p-0c461e03.entry.js} +1 -1
  202. package/lib/duet/{p-61aab72e.entry.js → p-0c75f4e8.entry.js} +1 -1
  203. package/lib/duet/{p-f671905b.system.entry.js → p-0d86f229.system.entry.js} +1 -1
  204. package/lib/duet/{p-f2b280a2.entry.js → p-0f6bc3fd.entry.js} +1 -1
  205. package/lib/duet/{p-545b0f8e.entry.js → p-0fbdbbcf.entry.js} +1 -1
  206. package/lib/duet/{p-4ad2a650.system.entry.js → p-11f68edb.system.entry.js} +1 -1
  207. package/lib/duet/{p-59d1a27f.system.entry.js → p-13e9d118.system.entry.js} +1 -1
  208. package/lib/duet/{p-232ebb6f.entry.js → p-159232e7.entry.js} +1 -1
  209. package/lib/duet/{p-f5083ced.entry.js → p-15f01c78.entry.js} +1 -1
  210. package/lib/duet/{p-f7d2b72a.entry.js → p-1766203d.entry.js} +1 -1
  211. package/lib/duet/{p-7df74ccb.entry.js → p-17b5d3ca.entry.js} +1 -1
  212. package/lib/duet/{p-83bcaf0a.entry.js → p-1fd12935.entry.js} +1 -1
  213. package/lib/duet/{p-5e4f3d3d.system.entry.js → p-21570db4.system.entry.js} +1 -1
  214. package/lib/duet/{p-7532e95c.system.entry.js → p-22a0ca25.system.entry.js} +1 -1
  215. package/lib/duet/{p-ecbefd75.entry.js → p-25e58997.entry.js} +1 -1
  216. package/lib/duet/{p-01a896f3.entry.js → p-263f189a.entry.js} +1 -1
  217. package/lib/duet/{p-51835258.system.entry.js → p-2d8b68a5.system.entry.js} +1 -1
  218. package/lib/duet/{p-0a89fe2b.entry.js → p-316d8fa1.entry.js} +1 -1
  219. package/lib/duet/{p-df63c123.system.entry.js → p-328e9c3c.system.entry.js} +1 -1
  220. package/lib/duet/p-38c61124.entry.js +4 -0
  221. package/lib/duet/p-3f8d0b27.entry.js +4 -0
  222. package/lib/duet/{p-24dadb65.system.entry.js → p-40893248.system.entry.js} +1 -1
  223. package/lib/duet/{p-1d1a983e.entry.js → p-41481bce.entry.js} +1 -1
  224. package/lib/duet/{p-4a86008c.system.entry.js → p-428d362d.system.entry.js} +2 -2
  225. package/lib/duet/{p-e5552640.system.entry.js → p-42cfdd80.system.entry.js} +1 -1
  226. package/lib/duet/{p-4033ecb1.entry.js → p-46452a06.entry.js} +1 -1
  227. package/lib/duet/{p-b9978fb3.system.entry.js → p-47839213.system.entry.js} +1 -1
  228. package/lib/duet/{p-98c06919.system.entry.js → p-479768b4.system.entry.js} +1 -1
  229. package/lib/duet/{p-d5b8cae9.entry.js → p-48f7872e.entry.js} +1 -1
  230. package/lib/duet/{p-10464740.entry.js → p-4f15ae74.entry.js} +1 -1
  231. package/lib/duet/{p-b24b6a43.system.entry.js → p-54c005a9.system.entry.js} +1 -1
  232. package/lib/duet/{p-b5a1486e.system.js → p-5655fb50.system.js} +1 -1
  233. package/lib/duet/{p-cde1cbe9.entry.js → p-56f93eb0.entry.js} +1 -1
  234. package/lib/duet/{p-d769cffa.entry.js → p-58e77074.entry.js} +1 -1
  235. package/lib/duet/{p-aa9efd9d.system.entry.js → p-5c65208e.system.entry.js} +1 -1
  236. package/lib/duet/{p-3e4f3175.system.entry.js → p-5cc22733.system.entry.js} +1 -1
  237. package/lib/duet/{p-13d0fafd.entry.js → p-632de445.entry.js} +1 -1
  238. package/lib/duet/{p-a9770baa.system.entry.js → p-63dfa3a2.system.entry.js} +1 -1
  239. package/lib/duet/{p-c0a218e2.entry.js → p-65a7c76b.entry.js} +1 -1
  240. package/lib/duet/{p-fea44d95.entry.js → p-67154f28.entry.js} +1 -1
  241. package/lib/duet/{p-ac612525.system.entry.js → p-6845e7b1.system.entry.js} +1 -1
  242. package/lib/duet/{p-10a28fb5.entry.js → p-6d9074f6.entry.js} +1 -1
  243. package/lib/duet/{p-9b0f4a02.system.entry.js → p-6eca3b8a.system.entry.js} +1 -1
  244. package/lib/duet/{p-e777808f.system.entry.js → p-6ef29718.system.entry.js} +1 -1
  245. package/lib/duet/p-6f4ec52a.entry.js +4 -0
  246. package/lib/duet/{p-b3e246bf.system.entry.js → p-7068bd7e.system.entry.js} +1 -1
  247. package/lib/duet/{p-5210d857.entry.js → p-7160a29a.entry.js} +1 -1
  248. package/lib/duet/{p-601fb30b.system.entry.js → p-72711eec.system.entry.js} +1 -1
  249. package/lib/duet/{p-1140f6fd.entry.js → p-770046b8.entry.js} +1 -1
  250. package/lib/duet/{p-9d45c0b9.entry.js → p-7b2cba4e.entry.js} +1 -1
  251. package/lib/duet/{p-71de1f57.entry.js → p-7ff8db6a.entry.js} +1 -1
  252. package/lib/duet/{p-c6196d66.system.entry.js → p-8069d1c8.system.entry.js} +2 -2
  253. package/lib/duet/{p-8f3bc618.entry.js → p-81e67bdc.entry.js} +1 -1
  254. package/lib/duet/{p-3412d92c.entry.js → p-869f96f3.entry.js} +1 -1
  255. package/lib/duet/{p-113ecc64.system.entry.js → p-8868c04b.system.entry.js} +1 -1
  256. package/lib/duet/{p-aba56144.system.entry.js → p-89b95023.system.entry.js} +1 -1
  257. package/lib/duet/p-8afd48ba.system.js +4 -0
  258. package/lib/duet/{p-9f5279fb.system.entry.js → p-8b2045e9.system.entry.js} +1 -1
  259. package/lib/duet/{p-0510de39.entry.js → p-8d232eb3.entry.js} +1 -1
  260. package/lib/duet/{p-fb7bd8aa.entry.js → p-8e508bed.entry.js} +1 -1
  261. package/lib/duet/{p-c5b23ff7.system.entry.js → p-9749810a.system.entry.js} +1 -1
  262. package/lib/duet/{p-c9e92671.system.entry.js → p-9a225ed6.system.entry.js} +1 -1
  263. package/lib/duet/p-9ca52cec.entry.js +4 -0
  264. package/lib/duet/{p-59d5e17d.system.entry.js → p-9d253e94.system.entry.js} +1 -1
  265. package/lib/duet/{p-c79aebab.system.entry.js → p-9d3d9fe6.system.entry.js} +1 -1
  266. package/lib/duet/{p-f715ffa6.entry.js → p-9e596bdb.entry.js} +1 -1
  267. package/lib/duet/{p-99b702e1.entry.js → p-9f713724.entry.js} +1 -1
  268. package/lib/duet/p-9feb3d67.entry.js +4 -0
  269. package/lib/duet/{p-3787f096.system.entry.js → p-a33c7f2d.system.entry.js} +1 -1
  270. package/lib/duet/{p-a480c60b.system.entry.js → p-a534447c.system.entry.js} +1 -1
  271. package/lib/duet/{p-62c0c4a6.entry.js → p-a617282a.entry.js} +1 -1
  272. package/lib/duet/{p-8a80b53a.entry.js → p-a71ecde9.entry.js} +1 -1
  273. package/lib/duet/{p-2aedebd0.system.entry.js → p-ab776ced.system.entry.js} +1 -1
  274. package/lib/duet/{p-5f58534f.system.entry.js → p-acfb0e9c.system.entry.js} +1 -1
  275. package/lib/duet/{p-084ab491.entry.js → p-aeb43991.entry.js} +1 -1
  276. package/lib/duet/{p-2eee3cb8.entry.js → p-aee475b1.entry.js} +1 -1
  277. package/lib/duet/{p-23e33998.entry.js → p-af9eae36.entry.js} +1 -1
  278. package/lib/duet/{p-0646568d.system.entry.js → p-b06907e8.system.entry.js} +1 -1
  279. package/lib/duet/{p-d3c94a35.system.entry.js → p-b0887fb4.system.entry.js} +1 -1
  280. package/lib/duet/{p-45466185.system.entry.js → p-b1592f76.system.entry.js} +1 -1
  281. package/lib/duet/{p-fa431fbd.system.entry.js → p-b192533c.system.entry.js} +1 -1
  282. package/lib/duet/{p-a8c55b54.system.entry.js → p-b508fd53.system.entry.js} +1 -1
  283. package/lib/duet/{p-562340da.entry.js → p-b6c3b983.entry.js} +1 -1
  284. package/lib/duet/p-b75cfe3d.entry.js +4 -0
  285. package/lib/duet/{p-978fa922.system.entry.js → p-b8d4bdea.system.entry.js} +1 -1
  286. package/lib/duet/{p-73366a48.entry.js → p-b8f47583.entry.js} +1 -1
  287. package/lib/duet/{p-1611a708.system.entry.js → p-b99d9ce7.system.entry.js} +1 -1
  288. package/lib/duet/{p-60ec8b91.system.entry.js → p-ba9e4e1a.system.entry.js} +1 -1
  289. package/lib/duet/{p-73e3dfcb.system.entry.js → p-bb5d4947.system.entry.js} +1 -1
  290. package/lib/duet/{p-a1ed9a6c.js → p-bba1a9b4.js} +1 -1
  291. package/lib/duet/{p-545556dd.system.entry.js → p-be4529e2.system.entry.js} +1 -1
  292. package/lib/duet/{p-50ceabf8.entry.js → p-be7e33e4.entry.js} +1 -1
  293. package/lib/duet/{p-e94e0a90.system.js → p-bf86a521.system.js} +1 -1
  294. package/lib/duet/{p-103e4463.entry.js → p-c0a75c83.entry.js} +1 -1
  295. package/lib/duet/p-c2cd3359.system.entry.js +4 -0
  296. package/lib/duet/{p-5e441e14.system.entry.js → p-c7a152b2.system.entry.js} +1 -1
  297. package/lib/duet/{p-ac9e77c5.entry.js → p-ca19a87c.entry.js} +1 -1
  298. package/lib/duet/{p-199bdcfe.entry.js → p-cb3ee0d1.entry.js} +1 -1
  299. package/lib/duet/{p-f61bf6cb.system.entry.js → p-cb403f2f.system.entry.js} +1 -1
  300. package/lib/duet/{p-ef614d21.entry.js → p-cd6dfc49.entry.js} +1 -1
  301. package/lib/duet/{p-76230e02.system.entry.js → p-cf185bb5.system.entry.js} +1 -1
  302. package/lib/duet/{p-ff42a105.entry.js → p-cfd0d996.entry.js} +1 -1
  303. package/lib/duet/{p-a5e798ab.system.entry.js → p-d0efcb5a.system.entry.js} +1 -1
  304. package/lib/duet/{p-0e84325b.entry.js → p-d1654e53.entry.js} +1 -1
  305. package/lib/duet/{p-de7fa734.system.entry.js → p-d38b550f.system.entry.js} +1 -1
  306. package/lib/duet/{p-82e6186f.system.entry.js → p-d5b1cd16.system.entry.js} +1 -1
  307. package/lib/duet/{p-a8809939.system.entry.js → p-d5b7544c.system.entry.js} +1 -1
  308. package/lib/duet/{p-e2aa7fbf.system.entry.js → p-d7655b86.system.entry.js} +1 -1
  309. package/lib/duet/{p-c486deb8.system.entry.js → p-d7e9e5d6.system.entry.js} +1 -1
  310. package/lib/duet/{p-cd68803e.entry.js → p-da5dd21f.entry.js} +1 -1
  311. package/lib/duet/{p-73635412.system.entry.js → p-dabe17c8.system.entry.js} +1 -1
  312. package/lib/duet/{p-dbed654f.entry.js → p-dbaac562.entry.js} +1 -1
  313. package/lib/duet/{p-819c4c6c.system.entry.js → p-df003337.system.entry.js} +1 -1
  314. package/lib/duet/p-dfa98799.entry.js +4 -0
  315. package/lib/duet/{p-70b5c7e0.entry.js → p-e5bbb8e4.entry.js} +1 -1
  316. package/lib/duet/p-e699b320.system.entry.js +4 -0
  317. package/lib/duet/{p-4afa5eac.system.entry.js → p-e6ba4211.system.entry.js} +1 -1
  318. package/lib/duet/{p-dffd1b5e.system.entry.js → p-e993c3a3.system.entry.js} +1 -1
  319. package/lib/duet/{p-7e095bff.js → p-ee0992c4.js} +1 -1
  320. package/lib/duet/{p-cbe35220.system.entry.js → p-f27a611f.system.entry.js} +1 -1
  321. package/lib/duet/{p-62b8f13c.entry.js → p-f36ad167.entry.js} +1 -1
  322. package/lib/duet/{p-1f6ee122.entry.js → p-f36eadb5.entry.js} +1 -1
  323. package/lib/duet/{p-5a74dc48.system.entry.js → p-f3cac06e.system.entry.js} +1 -1
  324. package/lib/duet/{p-31858f97.system.entry.js → p-f3f25297.system.entry.js} +1 -1
  325. package/lib/duet/{p-4261d660.entry.js → p-f42b6f99.entry.js} +1 -1
  326. package/lib/duet/{p-f6127f90.system.entry.js → p-fc21a025.system.entry.js} +1 -1
  327. package/lib/duet/{p-a1d62452.entry.js → p-fd689ff2.entry.js} +1 -1
  328. package/lib/esm/duet-action-button.entry.js +6 -12
  329. package/lib/esm/duet-alert.entry.js +1 -1
  330. package/lib/esm/duet-badge.entry.js +1 -1
  331. package/lib/esm/duet-breadcrumb.entry.js +1 -1
  332. package/lib/esm/duet-breadcrumbs.entry.js +1 -1
  333. package/lib/esm/duet-button_2.entry.js +1 -1
  334. package/lib/esm/duet-caption_4.entry.js +1 -1
  335. package/lib/esm/duet-card.entry.js +1 -1
  336. package/lib/esm/duet-checkbox.entry.js +1 -1
  337. package/lib/esm/duet-choice_2.entry.js +3 -3
  338. package/lib/esm/duet-collapsible.entry.js +1 -1
  339. package/lib/esm/duet-combobox.entry.js +4 -3
  340. package/lib/esm/duet-cookie-consent.entry.js +1 -1
  341. package/lib/esm/duet-date-picker.entry.js +2 -2
  342. package/lib/esm/duet-divider_2.entry.js +1 -1
  343. package/lib/esm/duet-editable-table_3.entry.js +4 -3
  344. package/lib/esm/duet-empty-state.entry.js +1 -1
  345. package/lib/esm/duet-fieldset.entry.js +1 -1
  346. package/lib/esm/duet-footer.entry.js +1 -1
  347. package/lib/esm/duet-grid_2.entry.js +1 -1
  348. package/lib/esm/duet-header_2.entry.js +1 -1
  349. package/lib/esm/duet-hero.entry.js +26 -7
  350. package/lib/esm/duet-icon.entry.js +1 -1
  351. package/lib/esm/duet-input_2.entry.js +3 -2
  352. package/lib/esm/duet-layout.entry.js +1 -1
  353. package/lib/esm/duet-list_2.entry.js +1 -1
  354. package/lib/esm/duet-menu-bar-dropdown-link.entry.js +1 -1
  355. package/lib/esm/duet-menu-bar-dropdown.entry.js +1 -1
  356. package/lib/esm/duet-menu-bar-link.entry.js +1 -1
  357. package/lib/esm/duet-menu-bar.entry.js +1 -1
  358. package/lib/esm/duet-modal.entry.js +2 -2
  359. package/lib/esm/duet-multiselect.entry.js +1 -1
  360. package/lib/esm/duet-nav.entry.js +1 -1
  361. package/lib/esm/duet-notification_2.entry.js +1 -1
  362. package/lib/esm/duet-number-input.entry.js +1 -1
  363. package/lib/esm/duet-pagination_2.entry.js +4 -4
  364. package/lib/esm/duet-progress.entry.js +1 -1
  365. package/lib/esm/duet-radio_2.entry.js +1 -1
  366. package/lib/esm/duet-range-slider.entry.js +1 -1
  367. package/lib/esm/duet-scrollable_3.entry.js +1 -1
  368. package/lib/esm/duet-section-layout.entry.js +1 -1
  369. package/lib/esm/duet-select.entry.js +1 -1
  370. package/lib/esm/duet-slideout-lang.entry.js +1 -1
  371. package/lib/esm/duet-slideout-link.entry.js +1 -1
  372. package/lib/esm/duet-slideout-panel-dropdown-link.entry.js +1 -1
  373. package/lib/esm/duet-slideout-panel-dropdown.entry.js +1 -1
  374. package/lib/esm/duet-slideout-panel-link.entry.js +1 -1
  375. package/lib/esm/duet-slideout-panel.entry.js +2 -2
  376. package/lib/esm/duet-slideout.entry.js +2 -2
  377. package/lib/esm/duet-step_2.entry.js +1 -1
  378. package/lib/esm/duet-submenu-bar-dropdown-link.entry.js +1 -1
  379. package/lib/esm/duet-submenu-bar-dropdown.entry.js +1 -1
  380. package/lib/esm/duet-submenu-bar-link.entry.js +1 -1
  381. package/lib/esm/duet-submenu-bar.entry.js +1 -1
  382. package/lib/esm/duet-textarea.entry.js +1 -1
  383. package/lib/esm/duet-toggle.entry.js +1 -1
  384. package/lib/esm/duet-toolbar-dropdown-link.entry.js +1 -1
  385. package/lib/esm/duet-toolbar-dropdown.entry.js +1 -1
  386. package/lib/esm/duet-toolbar-link.entry.js +1 -1
  387. package/lib/esm/duet-toolbar.entry.js +1 -1
  388. package/lib/esm/duet-tooltip.entry.js +1 -1
  389. package/lib/esm/duet-tray.entry.js +1 -1
  390. package/lib/esm/duet-upload-aria-status.entry.js +1 -1
  391. package/lib/esm/duet-visually-hidden.entry.js +1 -1
  392. package/lib/esm/duet.js +2 -2
  393. package/lib/esm/{focus-utils-97bd2937.js → focus-utils-39aaa6cf.js} +1 -1
  394. package/lib/esm/{index-e20a2ed2.js → index-85a8b3af.js} +1 -1
  395. package/lib/esm/loader.js +2 -2
  396. package/lib/esm-es5/duet-action-button.entry.js +1 -1
  397. package/lib/esm-es5/duet-alert.entry.js +1 -1
  398. package/lib/esm-es5/duet-badge.entry.js +1 -1
  399. package/lib/esm-es5/duet-breadcrumb.entry.js +1 -1
  400. package/lib/esm-es5/duet-breadcrumbs.entry.js +1 -1
  401. package/lib/esm-es5/duet-button_2.entry.js +1 -1
  402. package/lib/esm-es5/duet-caption_4.entry.js +1 -1
  403. package/lib/esm-es5/duet-card.entry.js +1 -1
  404. package/lib/esm-es5/duet-checkbox.entry.js +1 -1
  405. package/lib/esm-es5/duet-choice_2.entry.js +2 -2
  406. package/lib/esm-es5/duet-collapsible.entry.js +2 -2
  407. package/lib/esm-es5/duet-combobox.entry.js +1 -1
  408. package/lib/esm-es5/duet-cookie-consent.entry.js +1 -1
  409. package/lib/esm-es5/duet-date-picker.entry.js +1 -1
  410. package/lib/esm-es5/duet-divider_2.entry.js +1 -1
  411. package/lib/esm-es5/duet-editable-table_3.entry.js +2 -2
  412. package/lib/esm-es5/duet-empty-state.entry.js +1 -1
  413. package/lib/esm-es5/duet-fieldset.entry.js +1 -1
  414. package/lib/esm-es5/duet-footer.entry.js +1 -1
  415. package/lib/esm-es5/duet-grid_2.entry.js +2 -2
  416. package/lib/esm-es5/duet-header_2.entry.js +1 -1
  417. package/lib/esm-es5/duet-hero.entry.js +2 -2
  418. package/lib/esm-es5/duet-icon.entry.js +1 -1
  419. package/lib/esm-es5/duet-input_2.entry.js +1 -1
  420. package/lib/esm-es5/duet-layout.entry.js +1 -1
  421. package/lib/esm-es5/duet-list_2.entry.js +1 -1
  422. package/lib/esm-es5/duet-menu-bar-dropdown-link.entry.js +1 -1
  423. package/lib/esm-es5/duet-menu-bar-dropdown.entry.js +1 -1
  424. package/lib/esm-es5/duet-menu-bar-link.entry.js +1 -1
  425. package/lib/esm-es5/duet-menu-bar.entry.js +1 -1
  426. package/lib/esm-es5/duet-modal.entry.js +2 -2
  427. package/lib/esm-es5/duet-multiselect.entry.js +2 -2
  428. package/lib/esm-es5/duet-nav.entry.js +1 -1
  429. package/lib/esm-es5/duet-notification_2.entry.js +1 -1
  430. package/lib/esm-es5/duet-number-input.entry.js +1 -1
  431. package/lib/esm-es5/duet-pagination_2.entry.js +1 -1
  432. package/lib/esm-es5/duet-progress.entry.js +1 -1
  433. package/lib/esm-es5/duet-radio_2.entry.js +1 -1
  434. package/lib/esm-es5/duet-range-slider.entry.js +1 -1
  435. package/lib/esm-es5/duet-scrollable_3.entry.js +1 -1
  436. package/lib/esm-es5/duet-section-layout.entry.js +1 -1
  437. package/lib/esm-es5/duet-select.entry.js +1 -1
  438. package/lib/esm-es5/duet-slideout-lang.entry.js +1 -1
  439. package/lib/esm-es5/duet-slideout-link.entry.js +1 -1
  440. package/lib/esm-es5/duet-slideout-panel-dropdown-link.entry.js +1 -1
  441. package/lib/esm-es5/duet-slideout-panel-dropdown.entry.js +1 -1
  442. package/lib/esm-es5/duet-slideout-panel-link.entry.js +1 -1
  443. package/lib/esm-es5/duet-slideout-panel.entry.js +1 -1
  444. package/lib/esm-es5/duet-slideout.entry.js +1 -1
  445. package/lib/esm-es5/duet-step_2.entry.js +1 -1
  446. package/lib/esm-es5/duet-submenu-bar-dropdown-link.entry.js +1 -1
  447. package/lib/esm-es5/duet-submenu-bar-dropdown.entry.js +1 -1
  448. package/lib/esm-es5/duet-submenu-bar-link.entry.js +1 -1
  449. package/lib/esm-es5/duet-submenu-bar.entry.js +1 -1
  450. package/lib/esm-es5/duet-textarea.entry.js +1 -1
  451. package/lib/esm-es5/duet-toggle.entry.js +1 -1
  452. package/lib/esm-es5/duet-toolbar-dropdown-link.entry.js +1 -1
  453. package/lib/esm-es5/duet-toolbar-dropdown.entry.js +1 -1
  454. package/lib/esm-es5/duet-toolbar-link.entry.js +1 -1
  455. package/lib/esm-es5/duet-toolbar.entry.js +1 -1
  456. package/lib/esm-es5/duet-tooltip.entry.js +1 -1
  457. package/lib/esm-es5/duet-tray.entry.js +1 -1
  458. package/lib/esm-es5/duet-upload-aria-status.entry.js +1 -1
  459. package/lib/esm-es5/duet-visually-hidden.entry.js +1 -1
  460. package/lib/esm-es5/duet.js +1 -1
  461. package/lib/esm-es5/focus-utils-39aaa6cf.js +4 -0
  462. package/lib/esm-es5/{index-e20a2ed2.js → index-85a8b3af.js} +1 -1
  463. package/lib/esm-es5/loader.js +1 -1
  464. package/lib/types/components/duet-action-button/duet-action-button.d.ts +3 -3
  465. package/lib/types/components/duet-combobox/duet-combobox.d.ts +4 -0
  466. package/lib/types/components/duet-hero/duet-hero.d.ts +8 -2
  467. package/lib/types/components.d.ts +28 -12
  468. package/package.json +5 -5
  469. package/lib/duet/p-11fe5fcd.entry.js +0 -4
  470. package/lib/duet/p-1b9b7b83.entry.js +0 -4
  471. package/lib/duet/p-30ffcba0.system.entry.js +0 -4
  472. package/lib/duet/p-32e8cef0.entry.js +0 -4
  473. package/lib/duet/p-3aa8996c.system.js +0 -4
  474. package/lib/duet/p-5e0ff5ee.entry.js +0 -4
  475. package/lib/duet/p-9306806c.entry.js +0 -4
  476. package/lib/duet/p-a6680923.entry.js +0 -4
  477. package/lib/duet/p-db49aee8.system.entry.js +0 -4
  478. package/lib/duet/p-df257e8e.entry.js +0 -4
  479. package/lib/esm-es5/focus-utils-97bd2937.js +0 -4
@@ -1,4 +1,4 @@
1
1
  var __awaiter=this&&this.__awaiter||function(e,t,a,i){function n(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,r){function l(e){try{s(i.next(e))}catch(t){r(t)}}function o(e){try{s(i["throw"](e))}catch(t){r(t)}}function s(e){e.done?a(e.value):n(e.value).then(l,o)}s((i=i.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var a={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},i,n,r,l;return l={next:o(0),throw:o(1),return:o(2)},typeof Symbol==="function"&&(l[Symbol.iterator]=function(){return this}),l;function o(e){return function(t){return s([e,t])}}function s(l){if(i)throw new TypeError("Generator is already executing.");while(a)try{if(i=1,n&&(r=l[0]&2?n["return"]:l[0]?n["throw"]||((r=n["return"])&&r.call(n),0):n.next)&&!(r=r.call(n,l[1])).done)return r;if(n=0,r)l=[l[0]&2,r.value];switch(l[0]){case 0:case 1:r=l;break;case 4:a.label++;return{value:l[1],done:false};case 5:a.label++;n=l[1];l=[0];continue;case 7:l=a.ops.pop();a.trys.pop();continue;default:if(!(r=a.trys,r=r.length>0&&r[r.length-1])&&(l[0]===6||l[0]===2)){a=0;continue}if(l[0]===3&&(!r||l[1]>r[0]&&l[1]<r[3])){a.label=l[1];break}if(l[0]===6&&a.label<r[1]){a.label=r[1];r=l;break}if(r&&a.label<r[2]){a.label=r[2];a.ops.push(l);break}if(r[2])a.ops.pop();a.trys.pop();continue}l=t.call(e,a)}catch(o){l=[6,o];n=0}finally{i=r=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,t,a){if(a||arguments.length===2)for(var i=0,n=t.length,r;i<n;i++){if(r||!(i in t)){if(!r)r=Array.prototype.slice.call(t,0,i);r[i]=t[i]}}return e.concat(r||Array.prototype.slice.call(t))};
2
2
  /*!
3
3
  * Built with Duet Design System
4
- */System.register(["./p-b5a1486e.system.js","./p-33b3aba4.system.js","./p-34ea0849.system.js","./p-a63f753e.system.js","./p-f69b64c9.system.js","./p-17063917.system.js","./p-5d46f619.system.js","./p-5f6bd5db.system.js","./p-b6d51921.system.js"],(function(e){"use strict";var t,a,i,n,r,l,o,s,d,u,p,f,c,h,b,m;return{setters:[function(e){t=e.h;a=e.r;i=e.c;n=e.H;r=e.g},function(e){l=e.i},function(e){o=e.f;s=e.d},function(e){d=e.i},function(e){u=e.g;p=e.s},function(e){f=e.q;c=e.s},function(e){h=e.b},function(e){b=e.c},function(e){m=e.p}],execute:function(){var g=function(e,a){var i=e.data,n=e.groupId,r=e.alignment;var l="duet-editable-table duet-editable-table-content-".concat(n);if(typeof i==="string"){return t("td",{innerHTML:i,class:l,part:"".concat(n,"content"),style:{verticalAlign:r}})}else{return t("td",{class:l,part:"".concat(n,"content"),style:{verticalAlign:r}},i)}};var y=".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}";var v=e("duet_editable_table",function(){function e(e){var t=this;a(this,e);this.duetTableToggle=i(this,"duetTableToggle",7);this.duetMenuClick=i(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=function(e,a){a.preventDefault();var i=e.sort_order,n=e.direction,r=e.index,l=e.key;t.duetTableToggle.emit({sort_order:i,index:r,direction:n,key:l,component:"duet-editable-table",originalEvent:a})};this.handleKeyDown=function(e,a){if(d(a)){t.toggleColumn(e,a)}};this.margin="auto";this.variation="striped";this.sticky=false;this.stickyDistance="with-links";this.breakpoint="small";this.actions=undefined;this.columns=undefined;this.rows=undefined;this.sortable=false;this.groupId="";this.theme="";this.accessibleRole=undefined}e.prototype.componentWillLoad=function(){l(this)};e.prototype.createLabel=function(e){var a=this;var i=e.sort_order,n=e.direction,r=e.index,l=e.label;var o=u(l);if(!this.sortable){return o}var s=function(){if(!!i&&n===1){return"action-arrow-down-small"}else if(!!i&&n===-1){return"action-arrow-up-small"}return"action-subtract-small"};return t("span",{class:"duet-table-label","data-index":r},t("duet-button",{size:"small",icon:s(),"icon-size":"medium-small","accessible-label":u(this.sortableDefaultLabel),variation:"plain",margin:"none","icon-right":true,onClick:function(t){return a.toggleColumn(e,t)},onKeyDown:function(t){return a.handleKeyDown(e,t)}},o))};e.prototype.getSortedColumns=function(){return __spreadArray([],this.columns,true).sort(o(["index"]))};e.prototype.getRowSortOrder=function(){var e=__spreadArray([],this.columns,true).sort(o(["sort_order"]));return e.filter((function(e){return e.sort_order})).map((function(e){return e.direction===-1?"-".concat(e.key):e.key}))};e.prototype.renderTableHeader=function(){var e=this;if(!this.columns){return}var a=this.getSortedColumns();return t("tr",{class:{"duet-table-action-header":!!this.actions}},a.map((function(a){if(a.display!==false){var i=e.createLabel(a);return i!==""?t("th",{scope:"col"},i):t("td",null)}})),this.actions&&t("th",{scope:"col",class:"duet-table-action-header-heading"},this.actions&&t("duet-visually-hidden",null,u(this.actionColumnLabel))))};e.prototype.renderActions=function(e,a){var i=this;if(!this.actions){return}return t("td",{class:"duet-text-right"},this.actions.map((function(n){return t("duet-action-button",{actionMeta:Object.assign({},(e===null||e===void 0?void 0:e.meta)||{},{index:a}),actionId:(e===null||e===void 0?void 0:e.uid)||(e===null||e===void 0?void 0:e.id)||null,actionName:n.name,theme:i.theme,iconName:n.icon,iconColor:n.color,iconSize:n.size,background:n.background})})))};e.prototype.renderTableBody=function(){var e=this;var a=this.getSortedColumns();var i=this.getRowSortOrder();var n=__spreadArray([],this.rows,true).sort(o(i));return n.map((function(i,n){var r;return t("tr",{class:(r={"duet-table-action-row":!!e.actions,"duet-editable-table-row":true},r["duet-editable-table-row-".concat(e.groupId)]=true,r),"data-meta":JSON.stringify(i.meta)},a.map((function(a){var n=i[a.key]?i[a.key]:i.item;if(a.display!==false){return t(g,{data:n,groupId:e.groupId})}})),e.actions&&e.renderActions(i,n))}))};e.prototype.render=function(){var e;return t(n,{class:(e={},e["duet-editable-table-".concat(this.variation)]=true,e["duet-editable-table"]=true,e["duet-editable-table-".concat(this.theme)]=true,e["duet-editable-table-scrollable"]=this.breakpoint==="none-scrollable",e["duet-editable-table-sortable"]=this.sortable,e["duet-editable-table-actions"]=!!this.actions,e["duet-m-0"]=this.margin==="none",e["duet-theme-turva"]=this.theme==="turva",e)},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"})))))))};Object.defineProperty(e.prototype,"element",{get:function(){return r(this)},enumerable:false,configurable:true});return e}());v.style=y;var x='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}';var k={none:0,"with-links":parseFloat(f)*16,"without-links":parseFloat(c)*16};var w=e("duet_table",function(){function e(e){var t=this;a(this,e);this.handleMediaQueryChange=function(e){t.matchesBreakpoint=e.matches};this.matchesBreakpoint=true;this.theme=undefined;this.margin="auto";this.variation="striped";this.sticky=false;this.stickyDistance="with-links";this.breakpoint="small"}e.prototype.connectedCallback=function(){var e=this;var t=this.breakpoint==="none"||this.breakpoint==="none-scrollable"?"all":h[this.breakpoint];this.mq=matchMedia(t);this.mq.addEventListener("change",s(this.handleMediaQueryChange,50));this.handleMediaQueryChange(this.mq);this.observer=new MutationObserver((function(){return s(e.copyHeadingsToCells(),50)}));this.observer.observe(this.element,{childList:true,subtree:true})};e.prototype.componentWillLoad=function(){l(this);this.copyHeadingsToCells();if(this.sticky&&this.breakpoint==="none-scrollable"){console.warn('[DUET WARNING]: sticky and breakpoint="none-scrollable" are incompatible. Scrollable takes precedence')}if(this.sticky){var e=k[this.stickyDistance];var t=this.element.querySelectorAll("thead th");t.forEach((function(t){return t.style.top="".concat(e,"px")}))}};e.prototype.componentDidLoad=function(){this.observer?this.observer.takeRecords():null};e.prototype.disconnectedCallback=function(){this.observer.disconnect();this.observer=null;this.mq.removeListener(this.handleMediaQueryChange);this.mq=null;this.matchesBreakpoint=true};e.prototype.copyHeadingsToCells=function(){var e=this.element.querySelectorAll("thead th");var t=this.element.querySelectorAll("tbody tr");var a=Array.from(e).map((function(e){return e.textContent.trim()}));t.forEach((function(e){e.querySelectorAll("td").forEach((function(e,t){if(a[t]){e.dataset.heading=a[t]}}))}))};e.prototype.render=function(){var e;return t(n,{class:(e={},e["duet-table-".concat(this.variation)]=true,e["duet-table-flattened"]=!this.matchesBreakpoint,e["duet-table-sticky"]=this.matchesBreakpoint&&this.sticky,e["duet-table-scrollable"]=this.breakpoint==="none-scrollable",e["duet-m-0"]=this.margin==="none",e["duet-theme-turva"]=this.theme==="turva",e)},t("slot",null))};Object.defineProperty(e.prototype,"element",{get:function(){return r(this)},enumerable:false,configurable:true});return e}());w.style=x;var D=[{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."}}];var M=function(e,t){var a={type:undefined,system_message:undefined,message:undefined};t=m(t);a=t.filter((function(t){return t.type==e}))[0];if(!a){a=t.filter((function(e){return e.type==="default"}))[0]}return a};var _=function(e,t){var a=M(e,t);var i=u(a.message);if(i===""||!i){return a.system_message}else{return i}};var z=function(e){var a=e.data,i=e.errorCodes;var n=a.item,r=a.error;var l=n.name;var o=r.type;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"}),l),t("duet-paragraph",{class:"duet-upload-item-error-label",size:"small",margin:"none",color:"danger"},_(o,i)))};var I=function(e){var a=e.progress,i=e.name;return 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"}),i,t("br",null),t("duet-progress",{progress:Math.ceil(a),"aria-hidden":true}))};var F=function(e){var a=e.name;return 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)};var E=function(e,t){if(t===void 0){t=2}if(e===0){return"0 Bytes"}var a=1024;var i=t<0?0:t;var n=["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"];var r=Math.floor(Math.log(e)/Math.log(a));return parseFloat((e/Math.pow(a,r)).toFixed(i))+" "+n[r]};var T=function(e){var a=e.data,i=e.showLinks;var n=a.item,r=a.size,l=a.uploaded,o=a.url,s=a.meta;var d=n.name;var u=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"}),d);var p=t("span",{class:"duet-upload-item-size",style:{fontSize:"14px",fontWeight:"400"}},"(",E(r),")");var f=l&&o&&i?t("duet-paragraph",{color:"secondary",margin:"none",weight:"semi-bold"},t("duet-link",{url:o,external:true},u),t("duet-spacer",{size:"xx-small",direction:"horizontal"}),p):t("duet-paragraph",{color:"secondary",margin:"none",weight:"semi-bold"},u,t("duet-spacer",{size:"xx-small",direction:"horizontal"}),p);var c=s&&s.badges?t("span",null,t("duet-spacer",{size:"xx-small"}),s.badges.map((function(e){return t("duet-badge",{color:"primary"},e)}))):undefined;return t("span",{class:"duet-upload-item-success"},t("div",null,f),c)};var L=function(e,t){if(!t){return true}var a=e.split(".");var i=t.split(",");var n=a[a.length-1];return i.includes(n)};var S=function(e,t){if(!t||!e){return true}var a=t.split(",");var i=false;a.forEach((function(t){var a=t.split("/");var n=e.split("/");if(a[0]===n[0]&&(a[1]===n[1]||a[1]==="*")){i=true}}));return i};var C=function(e,t){if(!t||!e){return true}return t>=e};var A=function(e,t,a){var i=t.allowedMimetypes,n=t.allowedExtensions,r=t.maxBytes;var l=false;var o=M("default",a);if(e){var s=e.name,d=e.type,p=e.size;var f=S(d,i);var c=n==="all"||n===""||n===" "||n===undefined?true:L(s.toLowerCase(),n);var h=C(p,r);if(!f){o=M("duet-upload-101",a)}if(!c){o=M("duet-upload-100",a)}if(!h){o=M("duet-upload-201",a)}l=f&&c&&h}else{l=false}return{valid:l,errorMessage:l?undefined:u(o.message),errorSystem:l?undefined:o.system_message,errorType:l?undefined:o.type}};var P=function(e,t){var a=0;if(t){e.forEach((function(e){if(e.valid&&e.size){a+=e.size}}));if(a>t){return true}}return false};var B=function(e,t){var a=0;if(t){e.forEach((function(e){if(e.valid){a++}}));if(a>t){return true}}return false};var R=function(e){var t=e.payload,a=e.options,i=e.onFailure,n=e.onSuccess,r=e.onProgress;var l=a.type,o=l===void 0?"POST":l,s=a.xhr,d=a.uri,u=a.argument,p=u===void 0?null:u,f=a.headers,c=f===void 0?null:f;s.open(o,"".concat(d).concat(p||""),true);var h=t.data,b=t.name;if(c){Object.keys(c).forEach((function(e){s.setRequestHeader(e,c[e])}))}if(o==="POST"){s.onreadystatechange=function(){if(s.readyState===XMLHttpRequest.DONE&&s.status>=200&&s.status<300){n(s,b,s.status)}if(s.readyState===XMLHttpRequest.DONE&&s.status>=300&&s.status<999){i(s,b,s.status)}};r(b)}s.send(h);return s};var j="*,*::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}";var V=e("duet_upload",function(){function e(e){var n=this;a(this,e);this.duetChange=i(this,"duetChange",3);this.duetBlur=i(this,"duetBlur",7);this.duetFocus=i(this,"duetFocus",7);this.duetReady=i(this,"duetReady",7);this.duetDone=i(this,"duetDone",3);this.duetState=i(this,"duetState",3);this.duetDelete=i(this,"duetDelete",3);this.duetCancel=i(this,"duetCancel",3);this.duetProgress=i(this,"duetProgress",3);this.duetUpload=i(this,"duetUpload",3);this.buttonId=b("DuetButton");this.labelId=b("DuetLabel");this.uploadId=b("DuetUpload");this.filesInProgress=new Map;this.fileMaxReached=false;this.bytesMaxReached=false;this.internalStatusMessageLabel=undefined;this.DefaultGroups={inprogress:"inprogress",success:"success",pending:"pending",failure:"failure"};this.kick=s((function(){n.tick=Date.now()}),30);this.listenForActionEvents=function(){n.element.addEventListener("duetActionEvent",(function(e){var t=e.detail;var a=t.action,i=t.id,r=t.originalEvent;switch(a){case"delete":n.onDelete(i,r);break;case"cancel":n.onCancel(i,r);break}}))};this.verifyValidity=function(){var e=n.getFilesAsArray(),t=e.invalid,a=e.valid;var i=n.valid;n.valid=t.length===0&&a.length!==0;if(n.valid!==i){n.duetState.emit({originalEvent:undefined,data:{valid:n.valid,from:"componentWillRender"},component:"duet-upload"})}};this.getGroupFromItemData=function(e){if(e.valid&&e.progress===100){return n.DefaultGroups.success}else if(e.progress>0&&e.progress!==100){return n.DefaultGroups.inprogress}else if(!e.valid){return n.DefaultGroups.failure}else if(e.pending){return n.DefaultGroups.pending}else if(e.group){return e.group}else{return"none"}};this.getItemHTMLFromItemData=function(e,a){if(a===n.DefaultGroups.success){return t(T,{data:e,showLinks:n.showLinks})}else if(a===n.DefaultGroups.inprogress){return t(I,{progress:e.progress,name:e.item.name})}else if(a===n.DefaultGroups.pending){return t(F,{name:e.item.name})}else if(a===n.DefaultGroups.failure){return t(z,{data:e,errorCodes:n.errorCodes})}else if(e.group){return e.html}else{return"none"}};this.genHashName=function(){return Date.now().toString(36)+Math.random()};this.updateValueInMap=function(e,t,a,i){if(i===void 0){i=true}try{var r=n.files.get(e);r[t]=a;n.files.set(e,r)}catch(l){}if(i){n.kick()}};this.updateProgress=function(e,t){var a=function(a){n.updateValueInMap(t,"progress",a);n.onProgress(t,a,e)};if(e.lengthComputable){var i=e.loaded/e.total*100;a(i)}else{console.log("cant read progress")}};this.trackProgress=function(e,t){if(t===void 0){t=false}if(t){n.filesInProgress.delete(e)}else{n.filesInProgress.set(e,"inprogress")}if(n.filesInProgress.size===0){n.onDone()}};this.getFilesAsArray=function(){var e=[];var t=[];n.files.forEach((function(a){if(a.valid&&!a.deleted){e.push(a)}else if(!a.valid&&!a.deleted){t.push(a)}}));return{valid:e,invalid:t}};this.resetFormFields=function(){n.nativeInput.value=""};this.startUpload=function(e,t){if(t===void 0){t=undefined}return __awaiter(n,void 0,void 0,(function(){return __generator(this,(function(a){this.metaData=t;this.nativeInput.click();this.onUpload(e,t);e.stopPropagation();e.preventDefault();return[2]}))}))};this.transferComplete=function(e){n.updateValueInMap(e,"progress",100,false);n.trackProgress(e,true)};this.transferDone=function(e,t,a){n.updateValueInMap(t,"status",a,false);n.updateValueInMap(t,"uploaded",true,false);try{var i=JSON.parse(e.response);n.updateValueInMap(t,"url",i.url)}catch(r){n.updateValueInMap(t,"url",null);console.error("Server did not respond with expected response {url: string}")}return};this.transferDoneWithFailure=function(e,t,a){try{var i=JSON.parse(e.response).error;n.updateValueInMap(t,"error",{message:i.message,type:i.type},false)}catch(r){console.error("Server did not respond with expected response error:{message: string, type: int}");n.updateValueInMap(t,"error",{type:a},false)}n.updateValueInMap(t,"valid",false,true)};this.transferFailed=function(e){n.updateValueInMap(e,"error",_("duet-upload-001",n.errorCodes))};this.transferCanceled=function(e){n.files.delete(e);n.validateTotals(e);n.kick()};this.validateTotals=function(e){var t=P(n.files,n.maxBytesTotal);var a=B(n.files,n.maxFiles);if(t&&e){n.updateValueInMap(e,"error",_("duet-upload-202",n.errorCodes),false)}if(a&&e){n.updateValueInMap(e,"error",_("duet-upload-301",n.errorCodes),false)}n.bytesMaxReached=t;n.fileMaxReached=a;return{bytesMaxReached:t,fileMaxReached:a}};this.uploadFile=function(e,t,a){if(t===void 0){t=false}return __awaiter(n,void 0,void 0,(function(){var i,n,r;return __generator(this,(function(l){switch(l.label){case 0:if(!t&&this.deferUpload){this.updateValueInMap(e.item.name,"pending",true,false);this.updateValueInMap(e.item.name,"group","pending",true)}else if(t){this.updateValueInMap(e.item.name,"pending",false,false);this.updateValueInMap(e.item.name,"group",undefined,true)}l.label=1;case 1:l.trys.push([1,4,,5]);if(!(!this.deferUpload||t))return[3,3];i=new FormData;i.append("file",e.item);if(a){i.append("key",a)}i.append("uid",e.uid);i.append("name",e.item.name);i.append("metadata",JSON.stringify({uid:e.uid,url:this.uri,size:e.item.size,meta:e.meta}));n=e;return[4,this.makeXHRPostRequest(i)];case 2:n.xhr=l.sent();l.label=3;case 3:return[3,5];case 4:r=l.sent();this.updateValueInMap(e.item.name,"valid",false,false);return[3,5];case 5:return[2]}}))}))};this.uploadPendingFiles=function(){for(var e=0,t=n.files.entries();e<t.length;e++){var a=t[e],i=a[0],r=a[1];if(r.group==="pending"&&r.pending===true){n.uploadFile(r,true,i)}}};this.getItemFromUID=function(e){for(var t=0,a=n.files.entries();t<a.length;t++){var i=a[t],r=i[0],l=i[1];if(l.uid===e){return{value:l,key:r}}}return null};this.onDelete=function(e,t){var a=n.getItemFromUID(e);var i=a.key;var r=n.files.get(i);n.files.delete(i);n.validateTotals();n.kick();n.duetDelete.emit({originalEvent:t,data:{deletion:r},component:"duet-upload"});if(!n.external&&!r.pending){n.makeXHRDeleteRequest(r)}n.resetFormFields()};this.onCancel=function(e,t){var a=n.getItemFromUID(e).key;var i=n.files.get(a);n.files.delete(a);if(!n.external){var r=i.xhr;if(r){r.abort()}}else{n.kick()}n.resetFormFields();n.duetCancel.emit({originalEvent:t,data:{cancelled:i},component:"duet-upload"})};this.onUpload=function(e,t){n.duetUpload.emit({originalEvent:e,metaData:t,component:"duet-upload"})};this.onBlur=function(e){n.duetBlur.emit({originalEvent:e,component:"duet-upload"})};this.onProgress=function(e,t,a){n.duetChange.emit({originalEvent:a,data:{key:e,percentComplete:t},component:"duet-upload"})};this.onFocus=function(e){n.duetFocus.emit({originalEvent:e,component:"duet-upload"})};this.onReady=function(){n.duetReady.emit({component:"duet-upload"})};this.onDone=function(){n.duetDone.emit({component:"duet-upload",data:{files:n.files}})};this.filterMap=function(){var e=__spreadArray([],n.files.values(),true);var t=[];var a=[];var i=[];var r=[];e.forEach((function(e){var l=n.getGroupFromItemData(e);var o=n.getItemHTMLFromItemData(e,l);if(l===n.DefaultGroups.success){r.push({uid:e.uid,item:o,group:l})}else if(l===n.DefaultGroups.inprogress){t.push({uid:e.uid,item:o,group:l})}else if(l===n.DefaultGroups.pending){i.push({uid:e.uid,item:o,group:l})}else if(l===n.DefaultGroups.failure){a.push({uid:e.uid,item:o,group:l})}else if(e.group){t.push({uid:e.uid,item:o,group:e.group})}}));return{pending:i,failure:a,success:r,inprogress:t}};this.getColumns=function(e){return[{sort_order:1,direction:-1,index:0,key:e.id,label:e.label}]};this.getActions=function(e){return n.actions.filter((function(t){return t.map.includes(e)}))};this.renderEditableTableGroups=function(){var e=n.filterMap();var a=n.groups.map((function(a){var i=e[a.id];if(!(i===null||i===void 0?void 0:i.length)){return}return t("duet-table",{variation:"plain",breakpoint:"none",role:"log",margin:n.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":n.hideGroups}},!n.hideGroups?u(a.label):t("duet-visually-hidden",null,u(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:n.getColumns(a),actions:n.getActions(a.id),margin:"none",rows:i}))))))}));return a};this.tick=Date.now();this.accessibleActiveDescendant=undefined;this.accessibleDescribedBy=undefined;this.accessibleControls=undefined;this.accessibleOwns=undefined;this.external=false;this.middleware=null;this.deferUpload=false;this.hideButton=false;this.actions=[{icon:"action-delete",color:"color-danger",size:"x-small",background:"gray-lightest",name:"delete",map:["success","failure"],label:{fi:"Poista tiedosto",en:"Poista tiedosto",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=undefined;this.showLinks=false;this.caption=undefined;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=u(this.statusLabelDefaults);this.buttonLabelDefaults={fi:"Lisää liite",sv:"Lägg till en bilaga",en:"Add an attachment"};this.buttonLabel=u(this.buttonLabelDefaults);this.accessibleButtonLabel=undefined;this.theme="";this.disabled=false;this.identifier=undefined;this.margin="auto";this.required=false;this.alignment="middle";this.hideGroups=false;this.files=new Map;this.valid=!this.required;this.labelDefaults={fi:"Lisää liite",sv:"Lägg till en bilaga",en:"Add attachments"};this.label=u(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=u(this.descriptionDefaults);this.fileListEmptyDefaults={fi:"Ei vielä lisättyjä tiedostoja.",sv:"Inga filer har lagts till ännu.",en:"No files added yet."};this.fileListEmpty=u(this.fileListEmptyDefaults);this.error="";this.errorCodes=D;this.name=undefined;this.maxBytes=2e8;this.maxBytesTotal=undefined;this.maxFiles=99;this.allowedExtensions="all";this.allowedMimetypes="*";this.multiple=true;this.limitSelection=false;this.value=undefined;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"}}]}e.prototype.watchValidHandler=function(e,t){if(e!==t){this.kick()}};e.prototype.componentWillLoad=function(){if(typeof this.statusMessageLabel==="string"){this.internalStatusMessageLabel=p(this.groups)}else{this.internalStatusMessageLabel=this.statusMessageLabel}l(this);this.listenForActionEvents();this.onReady()};e.prototype.componentWillRender=function(){this.verifyValidity()};e.prototype.setFocus=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){if(this.nativeInput){this.nativeInput.focus(e)}return[2]}))}))};e.prototype.upload=function(e){if(e===void 0){e=undefined}return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:return[4,this.setFocus()];case 1:t.sent();this.metaData=e;this.nativeInput.click();return[2]}}))}))};e.prototype.uploadPending=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.uploadPendingFiles();return[2]}))}))};e.prototype.refresh=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:this.kick();return[4,this.setFocus()];case 1:e.sent();return[2]}}))}))};e.prototype.getFiles=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){if(!this.files||this.files.size===0){return[2,false]}return[2,this.getFilesAsArray()]}))}))};e.prototype.updateValue=function(e,t,a){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(i){this.updateValueInMap(e,t,a);return[2]}))}))};e.prototype.render=function(){var e=this;var a=this.identifier||this.uploadId;var i=Math.round((this.maxBytesTotal?this.maxBytesTotal:this.maxBytes*this.maxFiles)/1024/1024);var r=Math.round(this.maxBytes/1024/1024);var l=this.description.replace(/{maxfiles}/g,this.maxFiles.toString());l=l.replace(/{maxbytes}/g,"".concat(r.toString()," MB"));l=l.replace(/{maxbytestotal}/g,"".concat(i.toString()," MB"));l=l.replace(/{filetypes}/g,this.allowedExtensions.split(",").join(", "));return t(n,{class:{"duet-m-0":this.margin==="none"}},t("duet-fieldset",{label:this.label,caption:l},t("slot",{name:"header"}),!this.files.size&&t("duet-label",{part:this.identifier?"".concat(this.identifier,"-empty-state"):"duet-upload-empty-state",theme:this.theme==="turva"?"turva":"default",size:"small",class:{"duet-upload-filelist-empty":!this.files.size,"duet-upload-filelist":true,"duet-upload-filelist-filled":this.files.size},id:this.labelId,for:a},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":a,disabled:this.fileMaxReached,"accessible-label":this.accessibleButtonLabel,"accessible-owns":a,size:"small",variation:"secondary",fixed:true,icon:"action-add-circle",part:this.identifier?"".concat(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?"".concat(this.identifier,"-error-notification"):"duet-upload-error-notification"},this.fileMaxReached&&_("duet-upload-301",this.errorCodes),this.bytesMaxReached&&_("duet-upload-202",this.errorCodes)),t("duet-spacer",{size:"medium"}),t("duet-visually-hidden",null,t("input",{ref:function(t){e.nativeInput=t},accept:!this.limitSelection?undefined:"".concat(this.allowedMimetypes,",").concat(this.allowedExtensions),onBlur:this.onBlur,onFocus:this.onFocus,onChange:function(t){return e.onChange(t)},type:"file",class:{"duet-upload":true},disabled:this.disabled,"aria-hidden":"true",required:this.required,name:this.name,id:this.identifier,multiple:this.multiple}))))};e.prototype.makeXHRPostRequest=function(e){var t=this;var a=new XMLHttpRequest;var i=e.get("name");a.upload.addEventListener("progress",(function(e){t.updateProgress(e,i)}));a.upload.addEventListener("load",(function(){t.transferComplete(i)}));a.upload.addEventListener("error",(function(){t.transferFailed(i)}));a.upload.addEventListener("abort",(function(){t.transferCanceled(i)}));var n={payload:{data:e,name:i},options:{type:"POST",uri:this.uri,xhr:a,argument:null,headers:undefined},onFailure:this.transferDoneWithFailure,onSuccess:this.transferDone,onProgress:this.trackProgress};if(this.middleware){n=this.middleware(n)}return R(n)};e.prototype.makeXHRDeleteRequest=function(e){var t=e.uid,a=e.item;var i=new XMLHttpRequest;var n={"x-fileuid":t,"x-filename":a.name};var r={payload:{data:null,name:name},options:{type:"DELETE",xhr:i,uri:this.uri,argument:"?key=".concat(t,"&name=").concat(a.name),headers:n},onFailure:this.transferDoneWithFailure,onSuccess:this.transferDone,onProgress:this.trackProgress};if(this.middleware){r=this.middleware(r)}return R(r)};e.prototype.onChange=function(e){return __awaiter(this,void 0,void 0,(function(){var t,a,i,n,r,l,o,s,d,u,p,f,c,h,b;return __generator(this,(function(m){switch(m.label){case 0:a=Array.from((t=this.nativeInput)===null||t===void 0?void 0:t.files);if(!a)return[3,8];i=0,n=a;m.label=1;case 1:if(!(i<n.length))return[3,8];r=n[i];l=A(r,{maxBytes:this.maxBytes,allowedExtensions:this.allowedExtensions,allowedMimetypes:this.allowedMimetypes},this.errorCodes),o=l.valid,s=l.errorMessage,d=l.errorType,u=l.errorSystem;p=this.genHashName();f={uid:p,item:r,size:r.size,meta:this.metaData,uploaded:false,valid:o,error:{type:o?undefined:d,message:o?undefined:s,system_message:o?undefined:u},progress:0,deleted:false,xhr:false,url:false};this.files.set(r.name,f);c=this.validateTotals(r.name),h=c.bytesMaxReached,b=c.fileMaxReached;if(!h)return[3,2];this.updateValueInMap(r.name,"valid",false,false);return[3,6];case 2:if(!b)return[3,3];this.updateValueInMap(r.name,"valid",false,false);return[3,6];case 3:if(!(o&&!this.external))return[3,5];return[4,this.uploadFile(f)];case 4:m.sent();return[3,6];case 5:if(o&&this.external){this.updateValueInMap(f.item.name,"pending",true,false);this.updateValueInMap(f.item.name,"group","pending",true)}else if(!o){this.updateValueInMap(r.name,"valid",false,true)}m.label=6;case 6:this.kick();m.label=7;case 7:i++;return[3,1];case 8:this.resetFormFields();this.metaData=undefined;this.duetChange.emit({originalEvent:e,data:{files:this.files},component:"duet-upload"});return[2]}}))}))};Object.defineProperty(e.prototype,"element",{get:function(){return r(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{valid:["watchValidHandler"]}},enumerable:false,configurable:true});return e}());V.style=j}}}));
4
+ */System.register(["./p-5655fb50.system.js","./p-33b3aba4.system.js","./p-34ea0849.system.js","./p-a63f753e.system.js","./p-f69b64c9.system.js","./p-17063917.system.js","./p-5d46f619.system.js","./p-5f6bd5db.system.js","./p-b6d51921.system.js"],(function(e){"use strict";var t,a,i,n,r,l,o,s,d,u,p,f,c,h,b,m;return{setters:[function(e){t=e.h;a=e.r;i=e.c;n=e.H;r=e.g},function(e){l=e.i},function(e){o=e.f;s=e.d},function(e){d=e.i},function(e){u=e.g;p=e.s},function(e){f=e.q;c=e.s},function(e){h=e.b},function(e){b=e.c},function(e){m=e.p}],execute:function(){var g=function(e,a){var i=e.data,n=e.groupId,r=e.alignment;var l="duet-editable-table duet-editable-table-content-".concat(n);if(typeof i==="string"){return t("td",{innerHTML:i,class:l,part:"".concat(n,"content"),style:{verticalAlign:r}})}else{return t("td",{class:l,part:"".concat(n,"content"),style:{verticalAlign:r}},i)}};var y=".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}";var v=e("duet_editable_table",function(){function e(e){var t=this;a(this,e);this.duetTableToggle=i(this,"duetTableToggle",7);this.duetMenuClick=i(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=function(e,a){a.preventDefault();var i=e.sort_order,n=e.direction,r=e.index,l=e.key;t.duetTableToggle.emit({sort_order:i,index:r,direction:n,key:l,component:"duet-editable-table",originalEvent:a})};this.handleKeyDown=function(e,a){if(d(a)){t.toggleColumn(e,a)}};this.margin="auto";this.variation="striped";this.sticky=false;this.stickyDistance="with-links";this.breakpoint="small";this.actions=undefined;this.columns=undefined;this.rows=undefined;this.sortable=false;this.groupId="";this.theme="";this.accessibleRole=undefined}e.prototype.componentWillLoad=function(){l(this)};e.prototype.createLabel=function(e){var a=this;var i=e.sort_order,n=e.direction,r=e.index,l=e.label;var o=u(l);if(!this.sortable){return o}var s=function(){if(!!i&&n===1){return"action-arrow-down-small"}else if(!!i&&n===-1){return"action-arrow-up-small"}return"action-subtract-small"};return t("span",{class:"duet-table-label","data-index":r},t("duet-button",{size:"small",icon:s(),"icon-size":"medium-small","accessible-label":u(this.sortableDefaultLabel),variation:"plain",margin:"none","icon-right":true,onClick:function(t){return a.toggleColumn(e,t)},onKeyDown:function(t){return a.handleKeyDown(e,t)}},o))};e.prototype.getSortedColumns=function(){return __spreadArray([],this.columns,true).sort(o(["index"]))};e.prototype.getRowSortOrder=function(){var e=__spreadArray([],this.columns,true).sort(o(["sort_order"]));return e.filter((function(e){return e.sort_order})).map((function(e){return e.direction===-1?"-".concat(e.key):e.key}))};e.prototype.renderTableHeader=function(){var e=this;if(!this.columns){return}var a=this.getSortedColumns();return t("tr",{class:{"duet-table-action-header":!!this.actions}},a.map((function(a){if(a.display!==false){var i=e.createLabel(a);return i!==""?t("th",{scope:"col"},i):t("td",null)}})),this.actions&&t("th",{scope:"col",class:"duet-table-action-header-heading"},this.actions&&t("duet-visually-hidden",null,u(this.actionColumnLabel))))};e.prototype.renderActions=function(e,a){var i=this;if(!this.actions){return}return t("td",{class:"duet-text-right"},this.actions.map((function(n){return t("duet-action-button",{actionMeta:Object.assign({},(e===null||e===void 0?void 0:e.meta)||{},{index:a}),actionId:(e===null||e===void 0?void 0:e.uid)||(e===null||e===void 0?void 0:e.id)||null,actionName:n.name,theme:i.theme,iconName:n.icon,iconColor:n.color,iconSize:n.size,background:n.background})})))};e.prototype.renderTableBody=function(){var e=this;var a=this.getSortedColumns();var i=this.getRowSortOrder();var n=__spreadArray([],this.rows,true).sort(o(i));return n.map((function(i,n){var r;return t("tr",{class:(r={"duet-table-action-row":!!e.actions,"duet-editable-table-row":true},r["duet-editable-table-row-".concat(e.groupId)]=true,r),"data-meta":JSON.stringify(i.meta)},a.map((function(a){var n=i[a.key]?i[a.key]:i.item;if(a.display!==false){return t(g,{data:n,groupId:e.groupId})}})),e.actions&&e.renderActions(i,n))}))};e.prototype.render=function(){var e;return t(n,{class:(e={},e["duet-editable-table-".concat(this.variation)]=true,e["duet-editable-table"]=true,e["duet-editable-table-".concat(this.theme)]=true,e["duet-editable-table-scrollable"]=this.breakpoint==="none-scrollable",e["duet-editable-table-sortable"]=this.sortable,e["duet-editable-table-actions"]=!!this.actions,e["duet-m-0"]=this.margin==="none",e["duet-theme-turva"]=this.theme==="turva",e)},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"})))))))};Object.defineProperty(e.prototype,"element",{get:function(){return r(this)},enumerable:false,configurable:true});return e}());v.style=y;var x='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}';var k={none:0,"with-links":parseFloat(f)*16,"without-links":parseFloat(c)*16};var w=e("duet_table",function(){function e(e){var t=this;a(this,e);this.handleMediaQueryChange=function(e){t.matchesBreakpoint=e.matches};this.matchesBreakpoint=true;this.theme=undefined;this.margin="auto";this.variation="striped";this.sticky=false;this.stickyDistance="with-links";this.breakpoint="small"}e.prototype.connectedCallback=function(){var e=this;var t=this.breakpoint==="none"||this.breakpoint==="none-scrollable"?"all":h[this.breakpoint];this.mq=matchMedia(t);this.mq.addEventListener("change",s(this.handleMediaQueryChange,50));this.handleMediaQueryChange(this.mq);this.observer=new MutationObserver((function(){return s(e.copyHeadingsToCells(),50)}));this.observer.observe(this.element,{childList:true,subtree:true})};e.prototype.componentWillLoad=function(){l(this);this.copyHeadingsToCells();if(this.sticky&&this.breakpoint==="none-scrollable"){console.warn('[DUET WARNING]: sticky and breakpoint="none-scrollable" are incompatible. Scrollable takes precedence')}if(this.sticky){var e=k[this.stickyDistance];var t=this.element.querySelectorAll("thead th");t.forEach((function(t){return t.style.top="".concat(e,"px")}))}};e.prototype.componentDidLoad=function(){this.observer?this.observer.takeRecords():null};e.prototype.disconnectedCallback=function(){this.observer.disconnect();this.observer=null;this.mq.removeListener(this.handleMediaQueryChange);this.mq=null;this.matchesBreakpoint=true};e.prototype.copyHeadingsToCells=function(){var e=this.element.querySelectorAll("thead th");var t=this.element.querySelectorAll("tbody tr");var a=Array.from(e).map((function(e){return e.textContent.trim()}));t.forEach((function(e){e.querySelectorAll("td").forEach((function(e,t){if(a[t]){e.dataset.heading=a[t]}}))}))};e.prototype.render=function(){var e;return t(n,{class:(e={},e["duet-table-".concat(this.variation)]=true,e["duet-table-flattened"]=!this.matchesBreakpoint,e["duet-table-sticky"]=this.matchesBreakpoint&&this.sticky,e["duet-table-scrollable"]=this.breakpoint==="none-scrollable",e["duet-m-0"]=this.margin==="none",e["duet-theme-turva"]=this.theme==="turva",e)},t("slot",null))};Object.defineProperty(e.prototype,"element",{get:function(){return r(this)},enumerable:false,configurable:true});return e}());w.style=x;var D=[{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."}}];var M=function(e,t){var a={type:undefined,system_message:undefined,message:undefined};t=m(t);a=t.filter((function(t){return t.type==e}))[0];if(!a){a=t.filter((function(e){return e.type==="default"}))[0]}return a};var _=function(e,t){var a=M(e,t);var i=u(a.message);if(i===""||!i){return a.system_message}else{return i}};var I=function(e){var a=e.data,i=e.errorCodes;var n=a.item,r=a.error;var l=n.name;var o=r.type;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"}),l),t("duet-paragraph",{class:"duet-upload-item-error-label",size:"small",margin:"none",color:"danger"},_(o,i)))};var z=function(e){var a=e.progress,i=e.name;return 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"}),i,t("br",null),t("duet-progress",{progress:Math.ceil(a),"aria-hidden":true}))};var F=function(e){var a=e.name;return 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)};var E=function(e,t){if(t===void 0){t=2}if(e===0){return"0 Bytes"}var a=1024;var i=t<0?0:t;var n=["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"];var r=Math.floor(Math.log(e)/Math.log(a));return parseFloat((e/Math.pow(a,r)).toFixed(i))+" "+n[r]};var T=function(e){var a=e.data,i=e.showLinks;var n=a.item,r=a.size,l=a.uploaded,o=a.url,s=a.meta;var d=n.name;var u=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"}),d);var p=t("span",{class:"duet-upload-item-size",style:{fontSize:"14px",fontWeight:"400"}},"(",E(r),")");var f=l&&o&&i?t("duet-paragraph",{color:"secondary",margin:"none",weight:"semi-bold"},t("duet-link",{url:o,external:true},u),t("duet-spacer",{size:"xx-small",direction:"horizontal"}),p):t("duet-paragraph",{color:"secondary",margin:"none",weight:"semi-bold"},u,t("duet-spacer",{size:"xx-small",direction:"horizontal"}),p);var c=s&&s.badges?t("span",null,t("duet-spacer",{size:"xx-small"}),s.badges.map((function(e){return t("duet-badge",{color:"primary"},e)}))):undefined;return t("span",{class:"duet-upload-item-success"},t("div",null,f),c)};var L=function(e,t){if(!t){return true}var a=e.split(".");var i=t.split(",");var n=a[a.length-1];return i.includes(n)};var S=function(e,t){if(!t||!e){return true}var a=t.split(",");var i=false;a.forEach((function(t){var a=t.split("/");var n=e.split("/");if(a[0]===n[0]&&(a[1]===n[1]||a[1]==="*")){i=true}}));return i};var C=function(e,t){if(!t||!e){return true}return t>=e};var A=function(e,t,a){var i=t.allowedMimetypes,n=t.allowedExtensions,r=t.maxBytes;var l=false;var o=M("default",a);if(e){var s=e.name,d=e.type,p=e.size;var f=S(d,i);var c=n==="all"||n===""||n===" "||n===undefined?true:L(s.toLowerCase(),n);var h=C(p,r);if(!f){o=M("duet-upload-101",a)}if(!c){o=M("duet-upload-100",a)}if(!h){o=M("duet-upload-201",a)}l=f&&c&&h}else{l=false}return{valid:l,errorMessage:l?undefined:u(o.message),errorSystem:l?undefined:o.system_message,errorType:l?undefined:o.type}};var P=function(e,t){var a=0;if(t){e.forEach((function(e){if(e.valid&&e.size){a+=e.size}}));if(a>t){return true}}return false};var B=function(e,t){var a=0;if(t){e.forEach((function(e){if(e.valid){a++}}));if(a>t){return true}}return false};var R=function(e){var t=e.payload,a=e.options,i=e.onFailure,n=e.onSuccess,r=e.onProgress;var l=a.type,o=l===void 0?"POST":l,s=a.xhr,d=a.uri,u=a.argument,p=u===void 0?null:u,f=a.headers,c=f===void 0?null:f;s.open(o,"".concat(d).concat(p||""),true);var h=t.data,b=t.name;if(c){Object.keys(c).forEach((function(e){s.setRequestHeader(e,c[e])}))}if(o==="POST"){s.onreadystatechange=function(){if(s.readyState===XMLHttpRequest.DONE&&s.status>=200&&s.status<300){n(s,b,s.status)}if(s.readyState===XMLHttpRequest.DONE&&s.status>=300&&s.status<999){i(s,b,s.status)}};r(b)}s.send(h);return s};var j="*,*::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}";var V=e("duet_upload",function(){function e(e){var n=this;a(this,e);this.duetChange=i(this,"duetChange",3);this.duetBlur=i(this,"duetBlur",7);this.duetFocus=i(this,"duetFocus",7);this.duetReady=i(this,"duetReady",7);this.duetDone=i(this,"duetDone",3);this.duetState=i(this,"duetState",3);this.duetDelete=i(this,"duetDelete",3);this.duetCancel=i(this,"duetCancel",3);this.duetProgress=i(this,"duetProgress",3);this.duetUpload=i(this,"duetUpload",3);this.buttonId=b("DuetButton");this.labelId=b("DuetLabel");this.uploadId=b("DuetUpload");this.filesInProgress=new Map;this.fileMaxReached=false;this.bytesMaxReached=false;this.internalStatusMessageLabel=undefined;this.DefaultGroups={inprogress:"inprogress",success:"success",pending:"pending",failure:"failure"};this.kick=s((function(){n.tick=Date.now()}),30);this.listenForActionEvents=function(){n.element.addEventListener("duetActionEvent",(function(e){var t=e.detail;var a=t.action,i=t.id,r=t.originalEvent;switch(a){case"delete":n.onDelete(i,r);break;case"cancel":n.onCancel(i,r);break}}))};this.verifyValidity=function(){var e=n.getFilesAsArray(),t=e.invalid,a=e.valid;var i=n.valid;n.valid=t.length===0&&a.length!==0;if(n.valid!==i){n.duetState.emit({originalEvent:undefined,data:{valid:n.valid,from:"componentWillRender"},component:"duet-upload"})}};this.getGroupFromItemData=function(e){if(e.valid&&e.progress===100){return n.DefaultGroups.success}else if(e.progress>0&&e.progress!==100){return n.DefaultGroups.inprogress}else if(!e.valid){return n.DefaultGroups.failure}else if(e.pending){return n.DefaultGroups.pending}else if(e.group){return e.group}else{return"none"}};this.getItemHTMLFromItemData=function(e,a){if(a===n.DefaultGroups.success){return t(T,{data:e,showLinks:n.showLinks})}else if(a===n.DefaultGroups.inprogress){return t(z,{progress:e.progress,name:e.item.name})}else if(a===n.DefaultGroups.pending){return t(F,{name:e.item.name})}else if(a===n.DefaultGroups.failure){return t(I,{data:e,errorCodes:n.errorCodes})}else if(e.group){return e.html}else{return"none"}};this.genHashName=function(){return Date.now().toString(36)+Math.random()};this.updateValueInMap=function(e,t,a,i){if(i===void 0){i=true}try{var r=n.files.get(e);r[t]=a;n.files.set(e,r)}catch(l){}if(i){n.kick()}};this.updateProgress=function(e,t){var a=function(a){n.updateValueInMap(t,"progress",a);n.onProgress(t,a,e)};if(e.lengthComputable){var i=e.loaded/e.total*100;a(i)}else{console.log("cant read progress")}};this.trackProgress=function(e,t){if(t===void 0){t=false}if(t){n.filesInProgress.delete(e)}else{n.filesInProgress.set(e,"inprogress")}if(n.filesInProgress.size===0){n.onDone()}};this.getFilesAsArray=function(){var e=[];var t=[];n.files.forEach((function(a){if(a.valid&&!a.deleted){e.push(a)}else if(!a.valid&&!a.deleted){t.push(a)}}));return{valid:e,invalid:t}};this.resetFormFields=function(){n.nativeInput.value=""};this.startUpload=function(e,t){if(t===void 0){t=undefined}return __awaiter(n,void 0,void 0,(function(){return __generator(this,(function(a){this.metaData=t;this.nativeInput.click();this.onUpload(e,t);e.stopPropagation();e.preventDefault();return[2]}))}))};this.transferComplete=function(e){n.updateValueInMap(e,"progress",100,false);n.trackProgress(e,true)};this.transferDone=function(e,t,a){n.updateValueInMap(t,"status",a,false);n.updateValueInMap(t,"uploaded",true,false);try{var i=JSON.parse(e.response);n.updateValueInMap(t,"url",i.url)}catch(r){n.updateValueInMap(t,"url",null);console.error("Server did not respond with expected response {url: string}")}return};this.transferDoneWithFailure=function(e,t,a){try{var i=JSON.parse(e.response).error;n.updateValueInMap(t,"error",{message:i.message,type:i.type},false)}catch(r){console.error("Server did not respond with expected response error:{message: string, type: int}");n.updateValueInMap(t,"error",{type:a},false)}n.updateValueInMap(t,"valid",false,true)};this.transferFailed=function(e){n.updateValueInMap(e,"error",_("duet-upload-001",n.errorCodes))};this.transferCanceled=function(e){n.files.delete(e);n.validateTotals(e);n.kick()};this.validateTotals=function(e){var t=P(n.files,n.maxBytesTotal);var a=B(n.files,n.maxFiles);if(t&&e){n.updateValueInMap(e,"error",_("duet-upload-202",n.errorCodes),false)}if(a&&e){n.updateValueInMap(e,"error",_("duet-upload-301",n.errorCodes),false)}n.bytesMaxReached=t;n.fileMaxReached=a;return{bytesMaxReached:t,fileMaxReached:a}};this.uploadFile=function(e,t,a){if(t===void 0){t=false}return __awaiter(n,void 0,void 0,(function(){var i,n,r;return __generator(this,(function(l){switch(l.label){case 0:if(!t&&this.deferUpload){this.updateValueInMap(e.item.name,"pending",true,false);this.updateValueInMap(e.item.name,"group","pending",true)}else if(t){this.updateValueInMap(e.item.name,"pending",false,false);this.updateValueInMap(e.item.name,"group",undefined,true)}l.label=1;case 1:l.trys.push([1,4,,5]);if(!(!this.deferUpload||t))return[3,3];i=new FormData;i.append("file",e.item);if(a){i.append("key",a)}i.append("uid",e.uid);i.append("name",e.item.name);i.append("metadata",JSON.stringify({uid:e.uid,url:this.uri,size:e.item.size,meta:e.meta}));n=e;return[4,this.makeXHRPostRequest(i)];case 2:n.xhr=l.sent();l.label=3;case 3:return[3,5];case 4:r=l.sent();this.updateValueInMap(e.item.name,"valid",false,false);return[3,5];case 5:return[2]}}))}))};this.uploadPendingFiles=function(){for(var e=0,t=n.files.entries();e<t.length;e++){var a=t[e],i=a[0],r=a[1];if(r.group==="pending"&&r.pending===true){n.uploadFile(r,true,i)}}};this.getItemFromUID=function(e){for(var t=0,a=n.files.entries();t<a.length;t++){var i=a[t],r=i[0],l=i[1];if(l.uid===e){return{value:l,key:r}}}return null};this.onDelete=function(e,t){var a=n.getItemFromUID(e);var i=a.key;var r=n.files.get(i);n.files.delete(i);n.validateTotals();n.kick();n.duetDelete.emit({originalEvent:t,data:{deletion:r},component:"duet-upload"});if(!n.external&&!r.pending){n.makeXHRDeleteRequest(r)}n.resetFormFields()};this.onCancel=function(e,t){var a=n.getItemFromUID(e).key;var i=n.files.get(a);n.files.delete(a);if(!n.external){var r=i.xhr;if(r){r.abort()}}else{n.kick()}n.resetFormFields();n.duetCancel.emit({originalEvent:t,data:{cancelled:i},component:"duet-upload"})};this.onUpload=function(e,t){n.duetUpload.emit({originalEvent:e,metaData:t,component:"duet-upload"})};this.onBlur=function(e){n.duetBlur.emit({originalEvent:e,component:"duet-upload"})};this.onProgress=function(e,t,a){n.duetChange.emit({originalEvent:a,data:{key:e,percentComplete:t},component:"duet-upload"})};this.onFocus=function(e){n.duetFocus.emit({originalEvent:e,component:"duet-upload"})};this.onReady=function(){n.duetReady.emit({component:"duet-upload"})};this.onDone=function(){n.duetDone.emit({component:"duet-upload",data:{files:n.files}})};this.filterMap=function(){var e=__spreadArray([],n.files.values(),true);var t=[];var a=[];var i=[];var r=[];e.forEach((function(e){var l=n.getGroupFromItemData(e);var o=n.getItemHTMLFromItemData(e,l);if(l===n.DefaultGroups.success){r.push({uid:e.uid,item:o,group:l})}else if(l===n.DefaultGroups.inprogress){t.push({uid:e.uid,item:o,group:l})}else if(l===n.DefaultGroups.pending){i.push({uid:e.uid,item:o,group:l})}else if(l===n.DefaultGroups.failure){a.push({uid:e.uid,item:o,group:l})}else if(e.group){t.push({uid:e.uid,item:o,group:e.group})}}));return{pending:i,failure:a,success:r,inprogress:t}};this.getColumns=function(e){return[{sort_order:1,direction:-1,index:0,key:e.id,label:e.label}]};this.getActions=function(e){return n.actions.filter((function(t){return t.map.includes(e)}))};this.renderEditableTableGroups=function(){var e=n.filterMap();var a=n.groups.map((function(a){var i=e[a.id];if(!(i===null||i===void 0?void 0:i.length)){return}return t("duet-table",{variation:"plain",breakpoint:"none",role:"log",margin:n.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":n.hideGroups}},!n.hideGroups?u(a.label):t("duet-visually-hidden",null,u(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:n.getColumns(a),actions:n.getActions(a.id),margin:"none",rows:i}))))))}));return a};this.tick=Date.now();this.accessibleActiveDescendant=undefined;this.accessibleDescribedBy=undefined;this.accessibleControls=undefined;this.accessibleOwns=undefined;this.external=false;this.middleware=null;this.deferUpload=false;this.hideButton=false;this.actions=[{icon:"action-delete",color:"color-danger",size:"x-small",background:"gray-lightest",name:"delete",map:["success","failure"],label:{fi:"Poista tiedosto",en:"Poista tiedosto",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=undefined;this.showLinks=false;this.caption=undefined;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=u(this.statusLabelDefaults);this.buttonLabelDefaults={fi:"Lisää liite",sv:"Lägg till en bilaga",en:"Add an attachment"};this.buttonLabel=u(this.buttonLabelDefaults);this.accessibleButtonLabel=undefined;this.theme="";this.disabled=false;this.identifier=undefined;this.margin="auto";this.required=false;this.alignment="middle";this.hideGroups=false;this.files=new Map;this.valid=!this.required;this.labelDefaults={fi:"Lisää liite",sv:"Lägg till en bilaga",en:"Add attachments"};this.label=u(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=u(this.descriptionDefaults);this.fileListEmptyDefaults={fi:"Ei vielä lisättyjä tiedostoja.",sv:"Inga filer har lagts till ännu.",en:"No files added yet."};this.fileListEmpty=u(this.fileListEmptyDefaults);this.error="";this.errorCodes=D;this.name=undefined;this.maxBytes=2e8;this.maxBytesTotal=undefined;this.maxFiles=99;this.allowedExtensions="all";this.allowedMimetypes="*";this.multiple=true;this.limitSelection=false;this.value=undefined;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"}}]}e.prototype.watchValidHandler=function(e,t){if(e!==t){this.kick()}};e.prototype.componentWillLoad=function(){if(typeof this.statusMessageLabel==="string"){this.internalStatusMessageLabel=p(this.groups)}else{this.internalStatusMessageLabel=this.statusMessageLabel}l(this);this.listenForActionEvents();this.onReady()};e.prototype.componentWillRender=function(){this.verifyValidity()};e.prototype.setFocus=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){if(this.nativeInput){this.nativeInput.focus(e)}return[2]}))}))};e.prototype.upload=function(e){if(e===void 0){e=undefined}return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:return[4,this.setFocus()];case 1:t.sent();this.metaData=e;this.nativeInput.click();return[2]}}))}))};e.prototype.uploadPending=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.uploadPendingFiles();return[2]}))}))};e.prototype.refresh=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:this.kick();return[4,this.setFocus()];case 1:e.sent();return[2]}}))}))};e.prototype.getFiles=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){if(!this.files||this.files.size===0){return[2,false]}return[2,this.getFilesAsArray()]}))}))};e.prototype.updateValue=function(e,t,a){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(i){this.updateValueInMap(e,t,a);return[2]}))}))};e.prototype.render=function(){var e=this;var a=this.identifier||this.uploadId;var i=Math.round((this.maxBytesTotal?this.maxBytesTotal:this.maxBytes*this.maxFiles)/1024/1024);var r=Math.round(this.maxBytes/1024/1024);var l=this.description.replace(/{maxfiles}/g,this.maxFiles.toString());l=l.replace(/{maxbytes}/g,"".concat(r.toString()," MB"));l=l.replace(/{maxbytestotal}/g,"".concat(i.toString()," MB"));l=l.replace(/{filetypes}/g,this.allowedExtensions.split(",").join(", "));return t(n,{class:{"duet-m-0":this.margin==="none"}},t("duet-fieldset",{label:this.label,caption:l},t("slot",{name:"header"}),!this.files.size&&t("duet-label",{part:this.identifier?"".concat(this.identifier,"-empty-state"):"duet-upload-empty-state",theme:this.theme==="turva"?"turva":"default",size:"small",class:{"duet-upload-filelist-empty":!this.files.size,"duet-upload-filelist":true,"duet-upload-filelist-filled":this.files.size},id:this.labelId,for:a},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":a,disabled:this.fileMaxReached,"accessible-label":this.accessibleButtonLabel,"accessible-owns":a,size:"small",variation:"secondary",fixed:true,icon:"action-add-circle",part:this.identifier?"".concat(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?"".concat(this.identifier,"-error-notification"):"duet-upload-error-notification"},this.fileMaxReached&&_("duet-upload-301",this.errorCodes),this.bytesMaxReached&&_("duet-upload-202",this.errorCodes)),t("duet-spacer",{size:"medium"}),t("duet-visually-hidden",{"aria-hidden":"true"},t("input",{ref:function(t){e.nativeInput=t},accept:!this.limitSelection?undefined:"".concat(this.allowedMimetypes,",").concat(this.allowedExtensions),onBlur:this.onBlur,onFocus:this.onFocus,onChange:function(t){return e.onChange(t)},type:"file",class:{"duet-upload":true},disabled:this.disabled,"aria-hidden":"true",required:this.required,name:this.name,id:this.identifier,multiple:this.multiple,tabIndex:-1}))))};e.prototype.makeXHRPostRequest=function(e){var t=this;var a=new XMLHttpRequest;var i=e.get("name");a.upload.addEventListener("progress",(function(e){t.updateProgress(e,i)}));a.upload.addEventListener("load",(function(){t.transferComplete(i)}));a.upload.addEventListener("error",(function(){t.transferFailed(i)}));a.upload.addEventListener("abort",(function(){t.transferCanceled(i)}));var n={payload:{data:e,name:i},options:{type:"POST",uri:this.uri,xhr:a,argument:null,headers:undefined},onFailure:this.transferDoneWithFailure,onSuccess:this.transferDone,onProgress:this.trackProgress};if(this.middleware){n=this.middleware(n)}return R(n)};e.prototype.makeXHRDeleteRequest=function(e){var t=e.uid,a=e.item;var i=new XMLHttpRequest;var n={"x-fileuid":t,"x-filename":a.name};var r={payload:{data:null,name:name},options:{type:"DELETE",xhr:i,uri:this.uri,argument:"?key=".concat(t,"&name=").concat(a.name),headers:n},onFailure:this.transferDoneWithFailure,onSuccess:this.transferDone,onProgress:this.trackProgress};if(this.middleware){r=this.middleware(r)}return R(r)};e.prototype.onChange=function(e){return __awaiter(this,void 0,void 0,(function(){var t,a,i,n,r,l,o,s,d,u,p,f,c,h,b;return __generator(this,(function(m){switch(m.label){case 0:a=Array.from((t=this.nativeInput)===null||t===void 0?void 0:t.files);if(!a)return[3,8];i=0,n=a;m.label=1;case 1:if(!(i<n.length))return[3,8];r=n[i];l=A(r,{maxBytes:this.maxBytes,allowedExtensions:this.allowedExtensions,allowedMimetypes:this.allowedMimetypes},this.errorCodes),o=l.valid,s=l.errorMessage,d=l.errorType,u=l.errorSystem;p=this.genHashName();f={uid:p,item:r,size:r.size,meta:this.metaData,uploaded:false,valid:o,error:{type:o?undefined:d,message:o?undefined:s,system_message:o?undefined:u},progress:0,deleted:false,xhr:false,url:false};this.files.set(r.name,f);c=this.validateTotals(r.name),h=c.bytesMaxReached,b=c.fileMaxReached;if(!h)return[3,2];this.updateValueInMap(r.name,"valid",false,false);return[3,6];case 2:if(!b)return[3,3];this.updateValueInMap(r.name,"valid",false,false);return[3,6];case 3:if(!(o&&!this.external))return[3,5];return[4,this.uploadFile(f)];case 4:m.sent();return[3,6];case 5:if(o&&this.external){this.updateValueInMap(f.item.name,"pending",true,false);this.updateValueInMap(f.item.name,"group","pending",true)}else if(!o){this.updateValueInMap(r.name,"valid",false,true)}m.label=6;case 6:this.kick();m.label=7;case 7:i++;return[3,1];case 8:this.resetFormFields();this.metaData=undefined;this.duetChange.emit({originalEvent:e,data:{files:this.files},component:"duet-upload"});return[2]}}))}))};Object.defineProperty(e.prototype,"element",{get:function(){return r(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{valid:["watchValidHandler"]}},enumerable:false,configurable:true});return e}());V.style=j}}}));
@@ -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 o}from"./p-a1ed9a6c.js";import{i as d}from"./p-4ebf1618.js";import{c as s}from"./p-c1325e35.js";import{F as n}from"./p-7e095bff.js";import{a as r,g as c}from"./p-ede854e1.js";import"./p-5a9d75e1.js";const l={day:"numeric",month:"long"},u={day:"numeric",month:"long",year:"numeric"},p={fi:{buttonLabel:"Valitse päivämäärä",prevMonthLabel:"Edellinen kuukausi",nextMonthLabel:"Seuraava kuukausi",monthSelectLabel:"Kuukausi",yearSelectLabel:"Vuosi",closeLabel:"Sulje ikkuna",selected:"Valittu päivämäärä on",keyboardInstruction:"Voit navigoida päivämääriä nuolinäppäimillä",dayLabels:["Maanantai","Tiistai","Keskiviikko","Torstai","Perjantai","Lauantai","Sunnuntai"],monthLabels:["Tammikuu","Helmikuu","Maaliskuu","Huhtikuu","Toukokuu","Kesäkuu","Heinäkuu","Elokuu","Syyskuu","Lokakuu","Marraskuu","Joulukuu"],monthLabelsShort:["Tammi","Helmi","Maalis","Huhti","Touko","Kesä","Heinä","Elo","Syys","Loka","Marras","Joulu"],formatterShort:new Intl.DateTimeFormat("fi-FI",l),formatterLong:new Intl.DateTimeFormat("fi-FI",u)},en:{buttonLabel:"Choose date",prevMonthLabel:"Previous month",nextMonthLabel:"Next month",monthSelectLabel:"Month",yearSelectLabel:"Year",closeLabel:"Close window",selected:"Selected date is",keyboardInstruction:"You can use arrow keys to navigate dates",dayLabels:["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],monthLabels:["January","February","March","April","May","June","July","August","September","October","November","December"],monthLabelsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],formatterShort:new Intl.DateTimeFormat("en-GB",l),formatterLong:new Intl.DateTimeFormat("en-GB",u)},sv:{buttonLabel:"Välj datum",prevMonthLabel:"Föregående månad",nextMonthLabel:"Nästa månad",monthSelectLabel:"Månad",yearSelectLabel:"År",closeLabel:"Stäng fönstret",selected:"Valt datum är",keyboardInstruction:"Använd piltangenterna för att navigera i kalender",dayLabels:["Måndag","Tisdag","Onsdag","Torsdag","Fredag","Lördag","Söndag"],monthLabels:["Januari","Februari","Mars","April","Maj","Juni","Juli","Augusti","September","Oktober","November","December"],monthLabelsShort:["Jan","Feb","Mars","April","Maj","Juni","Juli","Aug","Sep","Okt","Nov","Dec"],formatterShort:new Intl.DateTimeFormat("sv-SE",l),formatterLong:new Intl.DateTimeFormat("sv-SE",u)}};const h=({onClick:e,placeholder:a,name:i,inputLabel:o,value:d,valueAsDate:s,formattedValue:n,language:r,identifier:c,theme:l,disabled:u,error:h,role:m,required:b,tooltip:g,tooltipDirection:f,labelHidden:k,buttonRef:v,inputRef:y,onInput:x,onBlur:w,onFocus:S,accessibleActiveDescendant:D,accessibleControls:M,accessibleOwns:I,accessibleDescribedBy:L,echoPlaceholder:A,caption:F})=>{const{buttonLabel:V,selected:j,formatterLong:C}=p[r];return t("div",{class:{"duet-theme-turva":"turva"===l,"duet-date-input":!0}},t("duet-input",{label:o,value:n,placeholder:a,id:c,disabled:u,theme:l,error:h,role:m,required:b,tooltip:g,tooltipDirection:f,margin:"none",component:"date",labelHidden:k,accessibleAutocomplete:"none",onDuetInput:x,onDuetFocus:S,onDuetBlur:w,autoComplete:"off",disallowPattern:"[^0-9\\.\\-\\/]",expand:!0,ref:y,accessibleActiveDescendant:D,accessibleControls:M,accessibleOwns:I,accessibleDescribedBy:L,echoPlaceholder:A,caption:F},t("button",{class:{"duet-date-button":!0,"duet-no-label":k},onClick:e,disabled:u,ref:v,type:"button"},t("duet-icon",{icon:'<svg fill="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" role="img"><path d="M2.25 24A2.252 2.252 0 0 1 0 21.75V5.25A2.252 2.252 0 0 1 2.25 3H6V.75a.75.75 0 0 1 1.5 0V3h9V.75a.75.75 0 0 1 1.5 0V3h3.75A2.252 2.252 0 0 1 24 5.25v16.5A2.252 2.252 0 0 1 21.75 24zm-.75-2.25c0 .414.336.75.75.75h19.5a.75.75 0 0 0 .75-.75V10.5h-21zM22.5 9V5.25a.75.75 0 0 0-.75-.75H18V6a.75.75 0 0 1-1.5 0V4.5h-9V6A.75.75 0 0 1 6 6V4.5H2.25a.75.75 0 0 0-.75.75V9z"/><circle cx="5.625" cy="13.875" r="1.125"/><circle cx="5.625" cy="19.125" r="1.125"/><circle cx="12" cy="13.875" r="1.125"/><circle cx="12" cy="19.125" r="1.125"/><circle cx="18.375" cy="13.875" r="1.125"/><path d="M18.375 20.25c-.62 0-1.125-.505-1.125-1.125a1.127 1.127 0 0 1 1.171-1.122l.027.003a1.118 1.118 0 0 1 1.052 1.12c0 .619-.505 1.124-1.125 1.124z"/></svg>',margin:"none",size:"small",color:"currentColor"}),t("duet-visually-hidden",null,V,s&&t("span",null,", ",j," ",C.format(s))))),t("input",{type:"hidden",name:i,value:d}))},m=/^(\d{1,2})[\.\-\/](\d{1,2})[\.\-\/](\d{4})$/,b=/^(\d{4})-(\d{2})-(\d{2})$/;function g(t,e,a){var i=parseInt(a,10),o=parseInt(e,10),d=parseInt(t,10);if(Number.isInteger(d)&&Number.isInteger(o)&&Number.isInteger(i)&&o>0&&o<=12&&i>0&&i<=31&&d>0)return new Date(d,o-1,i)}function f(t){if(!t)return;const e=t.match(m);return e?g(e[3],e[2],e[1]):void 0}function k(t){if(!t)return;const e=t.match(b);return e?g(e[1],e[2],e[3]):void 0}function v(t,e){if(!t)return"";var a=t.getDate().toString(10),i=(t.getMonth()+1).toString(10),o=t.getFullYear().toString(10);return t.getDate()<10&&(a=`0${a}`),t.getMonth()<9&&(i=`0${i}`),e.replace(/MM/i,i).replace(/YYYY/i,o).replace(/DD/i,a)}function y(t,e){return null!=t&&null!=e&&t.getFullYear()===e.getFullYear()&&t.getMonth()===e.getMonth()&&t.getDate()===e.getDate()}function x(t,e){var a=new Date(t);return a.setDate(a.getDate()+e),a}function w(t,e=1){var a=new Date(t),i=a.getDay(),o=(i<e?7:0)+i-e;return a.setDate(a.getDate()-o),a}function S(t,e=1){var a=new Date(t),i=a.getDay(),o=6+(i<e?-7:0)-(i-e);return a.setDate(a.getDate()+o),a}function D(t){return new Date(t.getFullYear(),t.getMonth(),1)}function M(t){return new Date(t.getFullYear(),t.getMonth()+1,0)}function I(t,e){const a=new Date(t);return a.setMonth(e),a}function L(t,e){const a=new Date(t);return a.setFullYear(e),a}function A(t,e,a){return F(t,e,a)===t}function F(t,e,a){const i=t.getTime();return e&&e instanceof Date&&i<e.getTime()?e:a&&a instanceof Date&&i>a.getTime()?a:t}const V=({focusedDay:e,today:a,day:i,language:o,onDaySelect:d,onKeyboardNavigation:s,ref:n,inRange:r,isSelected:c})=>{const l=y(i,a),u=y(i,e),h=i.getMonth()!==e.getMonth(),m=!r,{formatterShort:b}=p[o];return t("button",{class:{"duet-date-table-button":!0,outside:m,disabled:h,today:l},tabIndex:u?0:-1,onClick:function(t){d(t,i)},onKeyDown:s,"aria-disabled":m||h,"aria-pressed":c?"true":"false",type:"button",ref:n},t("span",{"aria-hidden":"true"},i.getDate()),t("duet-visually-hidden",null,b.format(i)))};function j(t){var e;const a=t.trim().split("+"),i=a.pop();return["shift"===(null===(e=a[0])||void 0===e?void 0:e.toLowerCase()),i]}function C(t){const e=Object.keys(t).map((e=>[j(e),t[e]]));return function(t){if(!(t instanceof KeyboardEvent))return;const a=e.find((([[e,a]])=>(a.toUpperCase()===t.key.toUpperCase()||a===t.code)&&e===t.shiftKey));a&&(a[1](t),t.preventDefault())}}const z=({selectedDate:e,focusedDate:a,labelledById:i,theme:o,language:d,min:s,max:n,onDateSelect:r,onKeyboardNavigation:c,focusedDayRef:l,onFocusEnter:u,onFocusExit:h})=>{const{dayLabels:m}=p[d],b=new Date,g=function(t,e=1){return function(t,e){const a=[];let i=t;for(;!y(i,e);)a.push(i),i=x(i,1);return a.push(i),a}(w(D(t),e),S(M(t),e))}(a);return t("table",{class:{"duet-date-table":!0,"duet-theme-turva":"turva"===o},"aria-labelledby":i,onFocusin:u,onFocusout:function(t){const e=t.relatedTarget;e&&!t.currentTarget.contains(e)&&h(t)}},t("thead",null,t("tr",null,m.map((e=>t("th",{scope:"col"},t("span",{"aria-hidden":"true"},e.substr(0,2)),t("duet-visually-hidden",null,e)))))),t("tbody",null,function(t){const e=[];for(let a=0;a<t.length;a+=7)e.push(t.slice(a,a+7));return e}(g).map((i=>t("tr",{class:"duet-date-table-row"},i.map((i=>t("td",{class:"duet-date-table-cell"},t(V,{day:i,today:b,language:d,focusedDay:a,inRange:A(i,s,n),isSelected:y(i,e),onDaySelect:r,onKeyboardNavigation:c,ref:t=>{t&&y(i,a)&&l(t)}})))))))))},E=class{constructor(t){e(this,t),this.duetChange=a(this,"duetChange",7),this.duetBlur=a(this,"duetBlur",7),this.duetFocus=a(this,"duetFocus",7),this.monthSelectId=s("DuetDatePicker"),this.yearSelectId=s("DuetDatePicker"),this.dialogLabelId=s("DuetDatePicker"),this.initialTouchX=null,this.initialTouchY=null,this.focusTarget=null,this.enableActiveFocus=()=>{this.focusTarget="day-button"},this.disableActiveFocus=()=>{this.focusTarget=null},this.toggleOpen=t=>{t.preventDefault(),this.open?this.hide(!1):this.show()},this.handleBlur=t=>{t.stopPropagation(),this.duetBlur.emit({component:"duet-date-picker"})},this.handleFocus=t=>{t.stopPropagation(),this.duetFocus.emit({component:"duet-date-picker"})},this.handleTouchStart=t=>{const e=t.changedTouches[0];this.initialTouchX=e.pageX,this.initialTouchY=e.pageY},this.handleTouchMove=t=>{t.preventDefault()},this.handleTouchEnd=t=>{const e=t.changedTouches[0],a=e.pageX-this.initialTouchX,i=e.pageY-this.initialTouchY,o=Math.abs(a)>=70&&Math.abs(i)<=70,d=Math.abs(i)>=70&&Math.abs(a)<=70&&i>0;o?this.addMonths(a<0?1:-1):d&&(this.hide(),t.preventDefault()),this.initialTouchY=null,this.initialTouchX=null},this.handleNextMonthClick=t=>{t.preventDefault(),this.addMonths(1)},this.handlePreviousMonthClick=t=>{t.preventDefault(),this.addMonths(-1)},this.handleEscKey=C({Escape:()=>this.hide(),Esc:()=>this.hide()}),this.handleKeyboardNavigation=C({ArrowRight:()=>this.addDays(1),Right:()=>this.addDays(1),ArrowLeft:()=>this.addDays(-1),Left:()=>this.addDays(-1),ArrowDown:()=>this.addDays(7),Down:()=>this.addDays(7),ArrowUp:()=>this.addDays(-7),Up:()=>this.addDays(-7),Home:()=>this.startOfWeek(),End:()=>this.endOfWeek(),PageUp:()=>this.addMonths(-1),PageDown:()=>this.addMonths(1),"Shift+PageUp":()=>this.addYears(-1),"Shift+PageDown":()=>this.addYears(1)}),this.handleDaySelect=(t,e)=>{const a=k(this.min),i=k(this.max);this.determineValidity(e),A(e,a,i)&&(this.setValue(e),this.hide())},this.handleMonthSelect=t=>{this.setMonth(parseInt(t.target.value,10))},this.handleYearSelect=t=>{this.setYear(parseInt(t.target.value,10))},this.handleInputChange=t=>{this.inputValue=t.detail.value;const e=f(this.inputValue);this.determineValidity(e),(e||""===this.inputValue)&&this.setValue(e)},this.open=!1,this.focusedDay=new Date,this.inputValue="",this.theme="",this.expand=!1,this.name="",this.identifier="",this.label="",this.caption=void 0,this.margin="auto",this.language=r(),this.placeholderDefaults={fi:"pp.kk.vvvv",en:"dd.mm.yyyy",sv:"dd.mm.åååå"},this.placeholder=c(this.placeholderDefaults,this.language),this.echoPlaceholder=!1,this.disabled=!1,this.error="",this.labelHidden=!1,this.role=void 0,this.accessibleActiveDescendant=void 0,this.accessibleControls=void 0,this.accessibleOwns=void 0,this.accessibleDescribedBy=void 0,this.required=!1,this.direction="right",this.tooltip="",this.tooltipDirection="auto",this.value="",this.min="",this.max="",this.incrementYears=10,this.validity=void 0}updateValidity(){this.determineValidity(k(this.value))}updateInternalValue(){const t=k(this.value),e=f(this.inputValue);t?y(t,e)||(this.inputValue=v(t,"dd.mm.yyyy")):this.inputValue=""}componentWillLoad(){d(this),this.determineValidity(k(this.value)),this.updateInternalValue()}componentDidUpdate(){switch(this.focusTarget){case"toggle-button":this.datePickerButton.focus(),this.focusTarget=null;break;case"day-button":this.focusedDayNode.focus();break;case"month-select":this.monthSelectNode.focus(),this.focusTarget=null}}async setFocus(t){this.datePickerInput.setFocus(t)}async show(){this.open=!0,this.focusTarget="month-select",this.setFocusedDay(k(this.value)||new Date)}async hide(t=!0){this.open=!1,t&&(this.focusTarget="toggle-button")}addDays(t){this.setFocusedDay(x(this.focusedDay,t))}addMonths(t){this.setMonth(this.focusedDay.getMonth()+t)}addYears(t){this.setYear(this.focusedDay.getFullYear()+t)}startOfWeek(){this.setFocusedDay(w(this.focusedDay))}endOfWeek(){this.setFocusedDay(S(this.focusedDay))}setMonth(t){const e=I(D(this.focusedDay),t),a=M(e),i=I(this.focusedDay,t);this.setFocusedDay(F(i,e,a))}setYear(t){const e=L(D(this.focusedDay),t),a=M(e),i=L(this.focusedDay,t);this.setFocusedDay(F(i,e,a))}setFocusedDay(t){this.focusedDay=F(t,k(this.min),k(this.max))}determineValidity(t){var e,a;const i=""!==(null!==(a=null===(e=this.datePickerInput)||void 0===e?void 0:e.value)&&void 0!==a?a:"")&&null==t,o=this.required&&null==t,d=!!t&&!A(t,null,k(this.max)),s=!!t&&!A(t,k(this.min));this.validity={patternMismatch:!1,customError:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:o,badInput:i,rangeUnderflow:s,rangeOverflow:d,valid:!(o||i||s||d)}}setValue(t){const e=function(t){return v(t,"YYYY-MM-DD")}(t);e!==this.value&&(this.value=e,this.duetChange.emit({component:"duet-date-picker",value:this.value,valueAsDate:t}))}handleDocumentClick(t){this.open&&t.composedPath().every((t=>t!==this.dialogWrapperNode&&t!==this.datePickerButton))&&this.hide(!1)}render(){const e=k(this.value),a=(e||this.focusedDay).getFullYear(),o=this.focusedDay.getMonth(),d=this.focusedDay.getFullYear(),s=p[this.language],r=k(this.min),c=k(this.max),l=null!=r&&r.getMonth()===o&&r.getFullYear()===d,u=null!=c&&c.getMonth()===o&&c.getFullYear()===d;let m=a-this.incrementYears,b=a+this.incrementYears;return r&&(m=Math.max(m,r.getFullYear())),c&&(b=Math.min(b,c.getFullYear())),t(i,{class:{"duet-expand":this.expand,"duet-m-0":"none"===this.margin}},t("div",{class:"duet-date"},t(h,{value:this.value,valueAsDate:e,formattedValue:this.inputValue,language:this.language,onInput:this.handleInputChange,onBlur:this.handleBlur,onFocus:this.handleFocus,onClick:this.toggleOpen,name:this.name,disabled:this.disabled,error:this.error,role:this.role,required:this.required,theme:this.theme,tooltip:this.tooltip,tooltipDirection:this.tooltipDirection,labelHidden:this.labelHidden,placeholder:this.placeholder,inputLabel:this.label,identifier:this.identifier,buttonRef:t=>this.datePickerButton=t,inputRef:t=>this.datePickerInput=t,accessibleActiveDescendant:this.accessibleActiveDescendant,accessibleControls:this.accessibleControls,accessibleOwns:this.accessibleOwns,accessibleDescribedBy:this.accessibleDescribedBy,echoPlaceholder:this.echoPlaceholder,caption:this.caption})),t("div",{class:{"duet-theme-turva":"turva"===this.theme,"duet-date-dialog":!0,left:"left"===this.direction,error:!!this.error,active:this.open},role:"dialog","aria-modal":"true","aria-hidden":this.open?"false":"true","aria-labelledby":this.dialogLabelId,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd},t(n,{moveFocusTo:this.focusedDayNode}),t("div",{class:"duet-date-dialog-wrapper",onKeyDown:this.handleEscKey,ref:t=>this.dialogWrapperNode=t},t("duet-visually-hidden",{"aria-live":"polite"},s.keyboardInstruction),t("div",{class:"duet-date-dialog-mobile-header"},t("duet-label",{margin:"none"},this.label),t("button",{class:"duet-date-picker-close",ref:t=>this.closeButtonNode=t,onClick:()=>this.hide(),type:"button"},t("duet-icon",{name:"navigation-close-small",margin:"none",color:"currentColor",size:"xx-small"}),t("duet-visually-hidden",null,s.closeLabel))),t("div",{class:"duet-date-dialog-header"},t("div",{class:"duet-date-dialog-dropdowns"},t("duet-visually-hidden",null,t("h2",{id:this.dialogLabelId,"aria-live":"polite","aria-atomic":"true"},s.monthLabels[o]," ",this.focusedDay.getFullYear())),t("duet-visually-hidden",null,t("label",{htmlFor:this.monthSelectId},s.monthSelectLabel)),t("div",{class:"duet-date-dialog-select"},t("select",{id:this.monthSelectId,class:"duet-date-month-select",ref:t=>this.monthSelectNode=t,onChange:this.handleMonthSelect},s.monthLabels.map(((e,a)=>t("option",{key:e,value:a,selected:a===o,disabled:!A(new Date(d,a,1),r?D(r):null,c?M(c):null)},e)))),t("div",{class:"duet-date-dialog-select-label","aria-hidden":"true"},t("span",null,s.monthLabelsShort[o]),t("duet-icon",{name:"action-arrow-down-small",color:"currentColor",margin:"none",size:"xxx-small"}))),t("duet-visually-hidden",null,t("label",{htmlFor:this.yearSelectId},s.yearSelectLabel)),t("div",{class:"duet-date-dialog-select"},t("select",{id:this.yearSelectId,class:"duet-date-year-select",onChange:this.handleYearSelect},function(t,e){for(var a=[],i=t;i<=e;i++)a.push(i);return a}(m,b).map((e=>t("option",{key:e,selected:e===d},e)))),t("div",{class:"duet-date-dialog-select-label","aria-hidden":"true"},t("span",null,this.focusedDay.getFullYear()),t("duet-icon",{name:"action-arrow-down-small",color:"currentColor",margin:"none",size:"xxx-small"})))),t("div",{class:"duet-date-dialog-buttons"},t("duet-action-button",{class:"duet-date-dialog-prev",onClick:this.handlePreviousMonthClick,disabled:l,"icon-name":"action-arrow-left-small"},s.prevMonthLabel),t("duet-action-button",{class:"duet-date-dialog-next",onClick:this.handleNextMonthClick,disabled:u,"icon-name":"action-arrow-right-small"},s.nextMonthLabel))),t(z,{selectedDate:e,focusedDate:this.focusedDay,onDateSelect:this.handleDaySelect,onKeyboardNavigation:this.handleKeyboardNavigation,labelledById:this.dialogLabelId,language:this.language,theme:this.theme,min:r,max:c,focusedDayRef:t=>this.focusedDayNode=t,onFocusEnter:this.enableActiveFocus,onFocusExit:this.disableActiveFocus})),t(n,{moveFocusTo:this.closeButtonNode})))}get element(){return o(this)}static get watchers(){return{min:["updateValidity"],max:["updateValidity"],value:["updateValidity","updateInternalValue"],required:["updateValidity"]}}};E.style='*.sc-duet-date-picker,*.sc-duet-date-picker::after,*.sc-duet-date-picker::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.sc-duet-date-picker-h{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;margin-right:16px !important;margin-bottom:12px !important;position:relative;display:inline-flex;width:100%;min-width:calc(33.333% - 8px);max-width:100%;text-align:left;vertical-align:top}.sc-duet-date-picker-h:last-child,.sc-duet-date-picker-h:last-of-type{margin-right:0 !important}@media (min-width: 36em){.sc-duet-date-picker-h{width:calc(50% - 16px - 3px)}}.duet-expand.sc-duet-date-picker-h{width:100% !important}.duet-m-0.sc-duet-date-picker-h{margin:0 !important}.duet-date.sc-duet-date-picker{position:relative;width:100%}.duet-date.sc-duet-date-picker button.sc-duet-date-picker,.duet-date-dialog.sc-duet-date-picker button.sc-duet-date-picker{max-width:initial !important;min-height:initial !important;padding:0 !important;margin:0 !important;transition:initial}.duet-date-button.sc-duet-date-picker{-webkit-user-select:none;user-select:none;position:absolute;top:1px;right:1px;z-index:200;display:flex;align-items:center;justify-content:center;width:48px;height:calc(100% - 2px);color:#00294d;cursor:pointer;background:transparent !important;border-left:1px solid #cfd2d4 !important;border-radius:0 4px 4px 0 !important}.duet-theme-turva.sc-duet-date-picker .duet-date-button.sc-duet-date-picker{color:#171c3a;border-color:#cfcfd1}.duet-date-button.sc-duet-date-picker::before{position:absolute;top:0;left:-6px;width:6px;height:100%;content:"";background:linear-gradient(to left, rgba(207, 210, 212, 0.2) 0%, rgba(207, 210, 212, 0.2) 1px, rgba(207, 210, 212, 0.1) 1px, rgba(207, 210, 212, 0) 100%)}.duet-date-button.sc-duet-date-picker:disabled{pointer-events:none;cursor:default;background:#f5f8fa !important;border:0 !important}.duet-theme-turva.sc-duet-date-picker .duet-date-button.sc-duet-date-picker:disabled{background:#f5f5f7 !important}.duet-date-button.sc-duet-date-picker:disabled::before{display:none}.duet-date-button.sc-duet-date-picker:disabled duet-icon.sc-duet-date-picker{opacity:0.4}.duet-date-button.sc-duet-date-picker duet-icon.sc-duet-date-picker{transform:translateY(-1px)}.duet-date-button.sc-duet-date-picker:active duet-icon.sc-duet-date-picker{transform:translateY(0)}.duet-date-button.sc-duet-date-picker:focus{color:#0077b3;border-color:transparent;outline:0;box-shadow:0 0 0 2px #0077b3}.duet-theme-turva.sc-duet-date-picker .duet-date-button.sc-duet-date-picker:focus{color:#171c3a;box-shadow:0 0 0 2px #171c3a}.duet-date-dialog.sc-duet-date-picker{position:absolute;top:100%;left:0;z-index:900;display:flex;width:100%;visibility:hidden;opacity:0;transition:transform 300ms ease, opacity 300ms ease, visibility 300ms ease;transform:scale(0.96) translateZ(0) translateY(-20px);transform-origin:top right}@media (min-width: 36em){.duet-date-dialog.left.sc-duet-date-picker{right:0;left:auto;width:auto}}@media (max-width: 35.9375em){.duet-date-dialog.sc-duet-date-picker{position:fixed;top:0;right:0;bottom:0;background:rgba(0, 41, 77, 0.75);transition:opacity 400ms ease, visibility 400ms ease;transform:translateZ(0);transform-origin:bottom center}.duet-date-dialog.duet-theme-turva.sc-duet-date-picker{background:rgba(23, 28, 58, 0.75)}}.duet-date-dialog.active.sc-duet-date-picker{visibility:visible;opacity:1;transition-property:transform, opacity;transform:scale(1.0001) translateZ(0) translateY(0)}@media (min-width: 36em){.duet-date-dialog.error.sc-duet-date-picker{top:calc(100% - 28px);margin-top:4px}}.duet-date-dialog-wrapper.sc-duet-date-picker{position:relative;z-index:600;width:100%;min-width:290px;max-width:310px;padding:16px 16px 20px;margin-top:8px;margin-left:auto;background:white;border:1px solid #e1e3e6;border-radius:4px;box-shadow:0 4px 10px 0 rgba(0, 41, 77, 0.15);transform:none}.duet-theme-turva.sc-duet-date-picker .duet-date-dialog-wrapper.sc-duet-date-picker{border-color:#e4e4e6}@media (max-width: 35.9375em){.duet-date-dialog-wrapper.sc-duet-date-picker{position:absolute;bottom:0;left:0;z-index:900;max-width:none;min-height:25em;padding:0 8% 20px;margin:0;visibility:hidden;border:0;border-radius:0;border-top-left-radius:4px;border-top-right-radius:4px;opacity:0;transition:transform 400ms ease, opacity 400ms ease, visibility 400ms ease;transform:translateZ(0) translateY(100%)}.active.sc-duet-date-picker .duet-date-dialog-wrapper.sc-duet-date-picker{visibility:visible;opacity:1;transition-property:transform, opacity;transform:translateZ(0) translateY(0)}}.duet-date-table.sc-duet-date-picker{width:100%;font-family:"localtapiola-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";font-size:1rem;font-weight:400;line-height:1.25;color:#00294d;text-align:center;border-spacing:0;border-collapse:collapse}.duet-date-table.duet-theme-turva.sc-duet-date-picker{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-date-table.sc-duet-date-picker th.sc-duet-date-picker{padding-bottom:8px;font-size:0.75rem;font-weight:600;line-height:1.25;text-decoration:none;text-transform:uppercase;letter-spacing:1px}.duet-date-table.sc-duet-date-picker .duet-date-table-cell.sc-duet-date-picker{text-align:center}.duet-date-table-button.sc-duet-date-picker{position:relative;z-index:100;display:inline-block !important;width:36.9230769231px !important;height:36.9230769231px !important;min-height:initial !important;padding:0 !important;margin:0 !important;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;font-variant-numeric:tabular-nums;line-height:1.25 !important;color:#00294d !important;text-align:center;vertical-align:initial !important;cursor:pointer;background:transparent !important;border-radius:50% !important;transition:initial !important}.duet-theme-turva.sc-duet-date-picker .duet-date-table-button.sc-duet-date-picker{font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol" !important;color:#171c3a !important}.duet-date-table-button.sc-duet-date-picker:hover{background:#e6f2f8 !important}.duet-theme-turva.sc-duet-date-picker .duet-date-table-button.sc-duet-date-picker:hover{background:#f9e6ea !important}.duet-date-table-button.today.sc-duet-date-picker{z-index:200;color:#004d80 !important;background:#f3f9fc !important;box-shadow:0 0 0 1px #0077b3 !important}.duet-theme-turva.sc-duet-date-picker .duet-date-table-button.today.sc-duet-date-picker{color:#940925 !important;background:#fcf3f4 !important;box-shadow:0 0 0 1px #c60c30 !important}.duet-date-table-button[aria-pressed=true].sc-duet-date-picker,.duet-date-table-button.sc-duet-date-picker:focus{color:white !important;background:#0077b3 !important;outline:0}.duet-theme-turva.sc-duet-date-picker .duet-date-table-button[aria-pressed=true].sc-duet-date-picker,.duet-theme-turva.sc-duet-date-picker .duet-date-table-button.sc-duet-date-picker:focus{color:white !important;background:#c60c30 !important}.duet-date-table-button.sc-duet-date-picker:active{z-index:200;color:white !important;background:#0077b3 !important;box-shadow:0 0 5px #0077b3 !important}.duet-theme-turva.sc-duet-date-picker .duet-date-table-button.sc-duet-date-picker:active{color:white !important;background:#c60c30 !important;box-shadow:0 0 5px #c60c30 !important}.duet-date-table-button.sc-duet-date-picker:focus{z-index:200;box-shadow:0 0 5px #0077b3 !important}.duet-theme-turva.sc-duet-date-picker .duet-date-table-button.sc-duet-date-picker:focus{box-shadow:0 0 5px #c60c30 !important}.duet-date-table-button.disabled.sc-duet-date-picker{color:#909599 !important;cursor:default;background:transparent !important;box-shadow:none !important}.duet-theme-turva.sc-duet-date-picker .duet-date-table-button.disabled.sc-duet-date-picker{color:#747475 !important;background:transparent !important;box-shadow:none !important}.duet-date-table-button.outside.sc-duet-date-picker{color:#909599 !important;pointer-events:none;cursor:default;background:#f5f8fa !important;box-shadow:none;opacity:0.75}.duet-theme-turva.sc-duet-date-picker .duet-date-table-button.outside.sc-duet-date-picker{color:#747475;background:#f5f5f7;box-shadow:none}.duet-date-dialog-header.sc-duet-date-picker{margin-bottom:16px !important;display:flex;align-items:center;justify-content:space-between;width:100%}.duet-date-dialog-buttons.sc-duet-date-picker{white-space:nowrap}.duet-date-dialog-buttons.sc-duet-date-picker .sc-duet-date-picker::part(button){border:0}.duet-date-dialog-select.sc-duet-date-picker{position:relative;display:inline-flex;margin-top:4px}.duet-date-dialog-select.sc-duet-date-picker .duet-date-dialog-select-label.sc-duet-date-picker{position:relative;z-index:1;display:flex;align-items:center;width:100%;padding:0 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:1.25rem;font-weight:600;line-height:1.25;color:#00294d;pointer-events:none;border-radius:4px}.duet-theme-turva.sc-duet-date-picker .duet-date-dialog-select.sc-duet-date-picker .duet-date-dialog-select-label.sc-duet-date-picker{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-date-dialog-select.sc-duet-date-picker span.sc-duet-date-picker{margin-right:4px}.duet-date-dialog-select.sc-duet-date-picker select.sc-duet-date-picker{position:absolute;top:0;left:0;z-index:2;width:100%;height:100%;font-size:1rem;cursor:pointer;opacity:0}.duet-date-dialog-select.sc-duet-date-picker select.sc-duet-date-picker:focus+.duet-date-dialog-select-label.sc-duet-date-picker{box-shadow:0 0 0 2px #0077b3}.duet-theme-turva.sc-duet-date-picker .duet-date-dialog-select.sc-duet-date-picker select.sc-duet-date-picker:focus+.duet-date-dialog-select-label.sc-duet-date-picker{box-shadow:0 0 0 2px #171c3a}.duet-date-dialog-mobile-header.sc-duet-date-picker{position:relative;display:flex;align-items:center;justify-content:space-between;width:120%;padding:12px 20px;margin-bottom:20px;margin-left:-10%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;border-bottom:1px solid #cfd2d4}@media (min-width: 36em){.duet-date-dialog-mobile-header.sc-duet-date-picker{position:absolute;top:-8px;right:-8px;width:auto;padding:0;margin:0;overflow:visible;border:0}}.duet-theme-turva.sc-duet-date-picker .duet-date-dialog-mobile-header.sc-duet-date-picker{border-color:#cfcfd1}.duet-date-dialog-mobile-header.sc-duet-date-picker duet-label.sc-duet-date-picker{display:inline-block;max-width:84%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@media (min-width: 36em){.duet-date-dialog-mobile-header.sc-duet-date-picker duet-label.sc-duet-date-picker{display:none}}.duet-date-picker-close.sc-duet-date-picker{display:flex;align-items:center;justify-content:center;width:24px;height:24px !important;padding:0 !important;color:#00294d !important;cursor:pointer;background:#f5f8fa !important;border-radius:50%;-webkit-appearance:none;appearance:none}@media (min-width: 36em){.duet-date-picker-close.sc-duet-date-picker{opacity:0}}.duet-theme-turva.sc-duet-date-picker .duet-date-picker-close.sc-duet-date-picker{background:#f5f5f7 !important}.duet-date-picker-close.sc-duet-date-picker:hover{background:#f5f8fa !important}.duet-theme-turva.sc-duet-date-picker .duet-date-picker-close.sc-duet-date-picker:hover{background:#f5f5f7 !important}.duet-date-picker-close.sc-duet-date-picker:focus{outline:none;box-shadow:0 0 0 2px #0077b3}@media (min-width: 36em){.duet-date-picker-close.sc-duet-date-picker:focus{opacity:1}}.duet-theme-turva.sc-duet-date-picker .duet-date-picker-close.sc-duet-date-picker:focus{box-shadow:0 0 0 2px #171c3a}';export{E as duet_date_picker}
4
+ import{h as t,r as e,c as a,H as i,g as o}from"./p-bba1a9b4.js";import{i as d}from"./p-4ebf1618.js";import{c as s}from"./p-c1325e35.js";import{F as n}from"./p-ee0992c4.js";import{a as r,g as c}from"./p-ede854e1.js";import"./p-5a9d75e1.js";const l={day:"numeric",month:"long"},u={day:"numeric",month:"long",year:"numeric"},p={fi:{buttonLabel:"Valitse päivämäärä",prevMonthLabel:"Edellinen kuukausi",nextMonthLabel:"Seuraava kuukausi",monthSelectLabel:"Kuukausi",yearSelectLabel:"Vuosi",closeLabel:"Sulje ikkuna",selected:"Valittu päivämäärä on",keyboardInstruction:"Voit navigoida päivämääriä nuolinäppäimillä",dayLabels:["Maanantai","Tiistai","Keskiviikko","Torstai","Perjantai","Lauantai","Sunnuntai"],monthLabels:["Tammikuu","Helmikuu","Maaliskuu","Huhtikuu","Toukokuu","Kesäkuu","Heinäkuu","Elokuu","Syyskuu","Lokakuu","Marraskuu","Joulukuu"],monthLabelsShort:["Tammi","Helmi","Maalis","Huhti","Touko","Kesä","Heinä","Elo","Syys","Loka","Marras","Joulu"],formatterShort:new Intl.DateTimeFormat("fi-FI",l),formatterLong:new Intl.DateTimeFormat("fi-FI",u)},en:{buttonLabel:"Choose date",prevMonthLabel:"Previous month",nextMonthLabel:"Next month",monthSelectLabel:"Month",yearSelectLabel:"Year",closeLabel:"Close window",selected:"Selected date is",keyboardInstruction:"You can use arrow keys to navigate dates",dayLabels:["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],monthLabels:["January","February","March","April","May","June","July","August","September","October","November","December"],monthLabelsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],formatterShort:new Intl.DateTimeFormat("en-GB",l),formatterLong:new Intl.DateTimeFormat("en-GB",u)},sv:{buttonLabel:"Välj datum",prevMonthLabel:"Föregående månad",nextMonthLabel:"Nästa månad",monthSelectLabel:"Månad",yearSelectLabel:"År",closeLabel:"Stäng fönstret",selected:"Valt datum är",keyboardInstruction:"Använd piltangenterna för att navigera i kalender",dayLabels:["Måndag","Tisdag","Onsdag","Torsdag","Fredag","Lördag","Söndag"],monthLabels:["Januari","Februari","Mars","April","Maj","Juni","Juli","Augusti","September","Oktober","November","December"],monthLabelsShort:["Jan","Feb","Mars","April","Maj","Juni","Juli","Aug","Sep","Okt","Nov","Dec"],formatterShort:new Intl.DateTimeFormat("sv-SE",l),formatterLong:new Intl.DateTimeFormat("sv-SE",u)}};const h=({onClick:e,placeholder:a,name:i,inputLabel:o,value:d,valueAsDate:s,formattedValue:n,language:r,identifier:c,theme:l,disabled:u,error:h,role:m,required:b,tooltip:g,tooltipDirection:f,labelHidden:k,buttonRef:v,inputRef:y,onInput:x,onBlur:w,onFocus:S,accessibleActiveDescendant:D,accessibleControls:M,accessibleOwns:I,accessibleDescribedBy:L,echoPlaceholder:A,caption:F})=>{const{buttonLabel:V,selected:j,formatterLong:C}=p[r];return t("div",{class:{"duet-theme-turva":"turva"===l,"duet-date-input":!0}},t("duet-input",{label:o,value:n,placeholder:a,id:c,disabled:u,theme:l,error:h,role:m,required:b,tooltip:g,tooltipDirection:f,margin:"none",component:"date",labelHidden:k,accessibleAutocomplete:"none",onDuetInput:x,onDuetFocus:S,onDuetBlur:w,autoComplete:"off",disallowPattern:"[^0-9\\.\\-\\/]",expand:!0,ref:y,accessibleActiveDescendant:D,accessibleControls:M,accessibleOwns:I,accessibleDescribedBy:L,echoPlaceholder:A,caption:F},t("button",{class:{"duet-date-button":!0,"duet-no-label":k},onClick:e,disabled:u,ref:v,type:"button"},t("duet-icon",{icon:'<svg fill="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" role="img"><path d="M2.25 24A2.252 2.252 0 0 1 0 21.75V5.25A2.252 2.252 0 0 1 2.25 3H6V.75a.75.75 0 0 1 1.5 0V3h9V.75a.75.75 0 0 1 1.5 0V3h3.75A2.252 2.252 0 0 1 24 5.25v16.5A2.252 2.252 0 0 1 21.75 24zm-.75-2.25c0 .414.336.75.75.75h19.5a.75.75 0 0 0 .75-.75V10.5h-21zM22.5 9V5.25a.75.75 0 0 0-.75-.75H18V6a.75.75 0 0 1-1.5 0V4.5h-9V6A.75.75 0 0 1 6 6V4.5H2.25a.75.75 0 0 0-.75.75V9z"/><circle cx="5.625" cy="13.875" r="1.125"/><circle cx="5.625" cy="19.125" r="1.125"/><circle cx="12" cy="13.875" r="1.125"/><circle cx="12" cy="19.125" r="1.125"/><circle cx="18.375" cy="13.875" r="1.125"/><path d="M18.375 20.25c-.62 0-1.125-.505-1.125-1.125a1.127 1.127 0 0 1 1.171-1.122l.027.003a1.118 1.118 0 0 1 1.052 1.12c0 .619-.505 1.124-1.125 1.124z"/></svg>',margin:"none",size:"small",color:"currentColor"}),t("duet-visually-hidden",null,V,s&&t("span",null,", ",j," ",C.format(s))))),t("input",{type:"hidden",name:i,value:d}))},m=/^(\d{1,2})[\.\-\/](\d{1,2})[\.\-\/](\d{4})$/,b=/^(\d{4})-(\d{2})-(\d{2})$/;function g(t,e,a){var i=parseInt(a,10),o=parseInt(e,10),d=parseInt(t,10);if(Number.isInteger(d)&&Number.isInteger(o)&&Number.isInteger(i)&&o>0&&o<=12&&i>0&&i<=31&&d>0)return new Date(d,o-1,i)}function f(t){if(!t)return;const e=t.match(m);return e?g(e[3],e[2],e[1]):void 0}function k(t){if(!t)return;const e=t.match(b);return e?g(e[1],e[2],e[3]):void 0}function v(t,e){if(!t)return"";var a=t.getDate().toString(10),i=(t.getMonth()+1).toString(10),o=t.getFullYear().toString(10);return t.getDate()<10&&(a=`0${a}`),t.getMonth()<9&&(i=`0${i}`),e.replace(/MM/i,i).replace(/YYYY/i,o).replace(/DD/i,a)}function y(t,e){return null!=t&&null!=e&&t.getFullYear()===e.getFullYear()&&t.getMonth()===e.getMonth()&&t.getDate()===e.getDate()}function x(t,e){var a=new Date(t);return a.setDate(a.getDate()+e),a}function w(t,e=1){var a=new Date(t),i=a.getDay(),o=(i<e?7:0)+i-e;return a.setDate(a.getDate()-o),a}function S(t,e=1){var a=new Date(t),i=a.getDay(),o=6+(i<e?-7:0)-(i-e);return a.setDate(a.getDate()+o),a}function D(t){return new Date(t.getFullYear(),t.getMonth(),1)}function M(t){return new Date(t.getFullYear(),t.getMonth()+1,0)}function I(t,e){const a=new Date(t);return a.setMonth(e),a}function L(t,e){const a=new Date(t);return a.setFullYear(e),a}function A(t,e,a){return F(t,e,a)===t}function F(t,e,a){const i=t.getTime();return e&&e instanceof Date&&i<e.getTime()?e:a&&a instanceof Date&&i>a.getTime()?a:t}const V=({focusedDay:e,today:a,day:i,language:o,onDaySelect:d,onKeyboardNavigation:s,ref:n,inRange:r,isSelected:c})=>{const l=y(i,a),u=y(i,e),h=i.getMonth()!==e.getMonth(),m=!r,{formatterShort:b}=p[o];return t("button",{class:{"duet-date-table-button":!0,outside:m,disabled:h,today:l},tabIndex:u?0:-1,onClick:function(t){d(t,i)},onKeyDown:s,"aria-disabled":m||h,"aria-pressed":c?"true":"false",type:"button",ref:n},t("span",{"aria-hidden":"true"},i.getDate()),t("duet-visually-hidden",null,b.format(i)))};function j(t){var e;const a=t.trim().split("+"),i=a.pop();return["shift"===(null===(e=a[0])||void 0===e?void 0:e.toLowerCase()),i]}function C(t){const e=Object.keys(t).map((e=>[j(e),t[e]]));return function(t){if(!(t instanceof KeyboardEvent))return;const a=e.find((([[e,a]])=>(a.toUpperCase()===t.key.toUpperCase()||a===t.code)&&e===t.shiftKey));a&&(a[1](t),t.preventDefault())}}const z=({selectedDate:e,focusedDate:a,labelledById:i,theme:o,language:d,min:s,max:n,onDateSelect:r,onKeyboardNavigation:c,focusedDayRef:l,onFocusEnter:u,onFocusExit:h})=>{const{dayLabels:m}=p[d],b=new Date,g=function(t,e=1){return function(t,e){const a=[];let i=t;for(;!y(i,e);)a.push(i),i=x(i,1);return a.push(i),a}(w(D(t),e),S(M(t),e))}(a);return t("table",{class:{"duet-date-table":!0,"duet-theme-turva":"turva"===o},"aria-labelledby":i,onFocusin:u,onFocusout:function(t){const e=t.relatedTarget;e&&!t.currentTarget.contains(e)&&h(t)}},t("thead",null,t("tr",null,m.map((e=>t("th",{scope:"col"},t("span",{"aria-hidden":"true"},e.substr(0,2)),t("duet-visually-hidden",null,e)))))),t("tbody",null,function(t){const e=[];for(let a=0;a<t.length;a+=7)e.push(t.slice(a,a+7));return e}(g).map((i=>t("tr",{class:"duet-date-table-row"},i.map((i=>t("td",{class:"duet-date-table-cell"},t(V,{day:i,today:b,language:d,focusedDay:a,inRange:A(i,s,n),isSelected:y(i,e),onDaySelect:r,onKeyboardNavigation:c,ref:t=>{t&&y(i,a)&&l(t)}})))))))))},E=class{constructor(t){e(this,t),this.duetChange=a(this,"duetChange",7),this.duetBlur=a(this,"duetBlur",7),this.duetFocus=a(this,"duetFocus",7),this.monthSelectId=s("DuetDatePicker"),this.yearSelectId=s("DuetDatePicker"),this.dialogLabelId=s("DuetDatePicker"),this.initialTouchX=null,this.initialTouchY=null,this.focusTarget=null,this.enableActiveFocus=()=>{this.focusTarget="day-button"},this.disableActiveFocus=()=>{this.focusTarget=null},this.toggleOpen=t=>{t.preventDefault(),this.open?this.hide(!1):this.show()},this.handleBlur=t=>{t.stopPropagation(),this.duetBlur.emit({component:"duet-date-picker"})},this.handleFocus=t=>{t.stopPropagation(),this.duetFocus.emit({component:"duet-date-picker"})},this.handleTouchStart=t=>{const e=t.changedTouches[0];this.initialTouchX=e.pageX,this.initialTouchY=e.pageY},this.handleTouchMove=t=>{t.preventDefault()},this.handleTouchEnd=t=>{const e=t.changedTouches[0],a=e.pageX-this.initialTouchX,i=e.pageY-this.initialTouchY,o=Math.abs(a)>=70&&Math.abs(i)<=70,d=Math.abs(i)>=70&&Math.abs(a)<=70&&i>0;o?this.addMonths(a<0?1:-1):d&&(this.hide(),t.preventDefault()),this.initialTouchY=null,this.initialTouchX=null},this.handleNextMonthClick=t=>{t.preventDefault(),this.addMonths(1)},this.handlePreviousMonthClick=t=>{t.preventDefault(),this.addMonths(-1)},this.handleEscKey=C({Escape:()=>this.hide(),Esc:()=>this.hide()}),this.handleKeyboardNavigation=C({ArrowRight:()=>this.addDays(1),Right:()=>this.addDays(1),ArrowLeft:()=>this.addDays(-1),Left:()=>this.addDays(-1),ArrowDown:()=>this.addDays(7),Down:()=>this.addDays(7),ArrowUp:()=>this.addDays(-7),Up:()=>this.addDays(-7),Home:()=>this.startOfWeek(),End:()=>this.endOfWeek(),PageUp:()=>this.addMonths(-1),PageDown:()=>this.addMonths(1),"Shift+PageUp":()=>this.addYears(-1),"Shift+PageDown":()=>this.addYears(1)}),this.handleDaySelect=(t,e)=>{const a=k(this.min),i=k(this.max);this.determineValidity(e),A(e,a,i)&&(this.setValue(e),this.hide())},this.handleMonthSelect=t=>{this.setMonth(parseInt(t.target.value,10))},this.handleYearSelect=t=>{this.setYear(parseInt(t.target.value,10))},this.handleInputChange=t=>{this.inputValue=t.detail.value;const e=f(this.inputValue);this.determineValidity(e),(e||""===this.inputValue)&&this.setValue(e)},this.open=!1,this.focusedDay=new Date,this.inputValue="",this.theme="",this.expand=!1,this.name="",this.identifier="",this.label="",this.caption=void 0,this.margin="auto",this.language=r(),this.placeholderDefaults={fi:"pp.kk.vvvv",en:"dd.mm.yyyy",sv:"dd.mm.åååå"},this.placeholder=c(this.placeholderDefaults,this.language),this.echoPlaceholder=!1,this.disabled=!1,this.error="",this.labelHidden=!1,this.role=void 0,this.accessibleActiveDescendant=void 0,this.accessibleControls=void 0,this.accessibleOwns=void 0,this.accessibleDescribedBy=void 0,this.required=!1,this.direction="right",this.tooltip="",this.tooltipDirection="auto",this.value="",this.min="",this.max="",this.incrementYears=10,this.validity=void 0}updateValidity(){this.determineValidity(k(this.value))}updateInternalValue(){const t=k(this.value),e=f(this.inputValue);t?y(t,e)||(this.inputValue=v(t,"dd.mm.yyyy")):this.inputValue=""}componentWillLoad(){d(this),this.determineValidity(k(this.value)),this.updateInternalValue()}componentDidUpdate(){switch(this.focusTarget){case"toggle-button":this.datePickerButton.focus(),this.focusTarget=null;break;case"day-button":this.focusedDayNode.focus();break;case"month-select":this.monthSelectNode.focus(),this.focusTarget=null}}async setFocus(t){this.datePickerInput.setFocus(t)}async show(){this.open=!0,this.focusTarget="month-select",this.setFocusedDay(k(this.value)||new Date)}async hide(t=!0){this.open=!1,t&&(this.focusTarget="toggle-button")}addDays(t){this.setFocusedDay(x(this.focusedDay,t))}addMonths(t){this.setMonth(this.focusedDay.getMonth()+t)}addYears(t){this.setYear(this.focusedDay.getFullYear()+t)}startOfWeek(){this.setFocusedDay(w(this.focusedDay))}endOfWeek(){this.setFocusedDay(S(this.focusedDay))}setMonth(t){const e=I(D(this.focusedDay),t),a=M(e),i=I(this.focusedDay,t);this.setFocusedDay(F(i,e,a))}setYear(t){const e=L(D(this.focusedDay),t),a=M(e),i=L(this.focusedDay,t);this.setFocusedDay(F(i,e,a))}setFocusedDay(t){this.focusedDay=F(t,k(this.min),k(this.max))}determineValidity(t){var e,a;const i=""!==(null!==(a=null===(e=this.datePickerInput)||void 0===e?void 0:e.value)&&void 0!==a?a:"")&&null==t,o=this.required&&null==t,d=!!t&&!A(t,null,k(this.max)),s=!!t&&!A(t,k(this.min));this.validity={patternMismatch:!1,customError:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:o,badInput:i,rangeUnderflow:s,rangeOverflow:d,valid:!(o||i||s||d)}}setValue(t){const e=function(t){return v(t,"YYYY-MM-DD")}(t);e!==this.value&&(this.value=e,this.duetChange.emit({component:"duet-date-picker",value:this.value,valueAsDate:t}))}handleDocumentClick(t){this.open&&t.composedPath().every((t=>t!==this.dialogWrapperNode&&t!==this.datePickerButton))&&this.hide(!1)}render(){const e=k(this.value),a=(e||this.focusedDay).getFullYear(),o=this.focusedDay.getMonth(),d=this.focusedDay.getFullYear(),s=p[this.language],r=k(this.min),c=k(this.max),l=null!=r&&r.getMonth()===o&&r.getFullYear()===d,u=null!=c&&c.getMonth()===o&&c.getFullYear()===d;let m=a-this.incrementYears,b=a+this.incrementYears;return r&&(m=Math.max(m,r.getFullYear())),c&&(b=Math.min(b,c.getFullYear())),t(i,{class:{"duet-expand":this.expand,"duet-m-0":"none"===this.margin}},t("div",{class:"duet-date"},t(h,{value:this.value,valueAsDate:e,formattedValue:this.inputValue,language:this.language,onInput:this.handleInputChange,onBlur:this.handleBlur,onFocus:this.handleFocus,onClick:this.toggleOpen,name:this.name,disabled:this.disabled,error:this.error,role:this.role,required:this.required,theme:this.theme,tooltip:this.tooltip,tooltipDirection:this.tooltipDirection,labelHidden:this.labelHidden,placeholder:this.placeholder,inputLabel:this.label,identifier:this.identifier,buttonRef:t=>this.datePickerButton=t,inputRef:t=>this.datePickerInput=t,accessibleActiveDescendant:this.accessibleActiveDescendant,accessibleControls:this.accessibleControls,accessibleOwns:this.accessibleOwns,accessibleDescribedBy:this.accessibleDescribedBy,echoPlaceholder:this.echoPlaceholder,caption:this.caption})),t("div",{class:{"duet-theme-turva":"turva"===this.theme,"duet-date-dialog":!0,left:"left"===this.direction,error:!!this.error,active:this.open},role:"dialog","aria-modal":"true","aria-hidden":this.open?"false":"true","aria-labelledby":this.dialogLabelId,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd},t(n,{moveFocusTo:this.focusedDayNode}),t("div",{class:"duet-date-dialog-wrapper",onKeyDown:this.handleEscKey,ref:t=>this.dialogWrapperNode=t},t("duet-visually-hidden",{"aria-live":"polite"},s.keyboardInstruction),t("div",{class:"duet-date-dialog-mobile-header"},t("duet-label",{margin:"none"},this.label),t("button",{class:"duet-date-picker-close",ref:t=>this.closeButtonNode=t,onClick:()=>this.hide(),type:"button"},t("duet-icon",{name:"navigation-close-small",margin:"none",color:"currentColor",size:"xx-small"}),t("duet-visually-hidden",null,s.closeLabel))),t("div",{class:"duet-date-dialog-header"},t("div",{class:"duet-date-dialog-dropdowns"},t("duet-visually-hidden",null,t("h2",{id:this.dialogLabelId,"aria-live":"polite","aria-atomic":"true"},s.monthLabels[o]," ",this.focusedDay.getFullYear())),t("duet-visually-hidden",null,t("label",{htmlFor:this.monthSelectId},s.monthSelectLabel)),t("div",{class:"duet-date-dialog-select"},t("select",{id:this.monthSelectId,class:"duet-date-month-select",ref:t=>this.monthSelectNode=t,onChange:this.handleMonthSelect},s.monthLabels.map(((e,a)=>t("option",{key:e,value:a,selected:a===o,disabled:!A(new Date(d,a,1),r?D(r):null,c?M(c):null)},e)))),t("div",{class:"duet-date-dialog-select-label","aria-hidden":"true"},t("span",null,s.monthLabelsShort[o]),t("duet-icon",{name:"action-arrow-down-small",color:"currentColor",margin:"none",size:"xxx-small"}))),t("duet-visually-hidden",null,t("label",{htmlFor:this.yearSelectId},s.yearSelectLabel)),t("div",{class:"duet-date-dialog-select"},t("select",{id:this.yearSelectId,class:"duet-date-year-select",onChange:this.handleYearSelect},function(t,e){for(var a=[],i=t;i<=e;i++)a.push(i);return a}(m,b).map((e=>t("option",{key:e,selected:e===d},e)))),t("div",{class:"duet-date-dialog-select-label","aria-hidden":"true"},t("span",null,this.focusedDay.getFullYear()),t("duet-icon",{name:"action-arrow-down-small",color:"currentColor",margin:"none",size:"xxx-small"})))),t("div",{class:"duet-date-dialog-buttons"},t("duet-action-button",{class:"duet-date-dialog-prev",onClick:this.handlePreviousMonthClick,disabled:l,"icon-name":"action-arrow-left-small"},s.prevMonthLabel),t("duet-action-button",{class:"duet-date-dialog-next",onClick:this.handleNextMonthClick,disabled:u,"icon-name":"action-arrow-right-small"},s.nextMonthLabel))),t(z,{selectedDate:e,focusedDate:this.focusedDay,onDateSelect:this.handleDaySelect,onKeyboardNavigation:this.handleKeyboardNavigation,labelledById:this.dialogLabelId,language:this.language,theme:this.theme,min:r,max:c,focusedDayRef:t=>this.focusedDayNode=t,onFocusEnter:this.enableActiveFocus,onFocusExit:this.disableActiveFocus})),t(n,{moveFocusTo:this.closeButtonNode})))}get element(){return o(this)}static get watchers(){return{min:["updateValidity"],max:["updateValidity"],value:["updateValidity","updateInternalValue"],required:["updateValidity"]}}};E.style='*.sc-duet-date-picker,*.sc-duet-date-picker::after,*.sc-duet-date-picker::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.sc-duet-date-picker-h{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;margin-right:16px !important;margin-bottom:12px !important;position:relative;display:inline-flex;width:100%;min-width:calc(33.333% - 8px);max-width:100%;text-align:left;vertical-align:top}.sc-duet-date-picker-h:last-child,.sc-duet-date-picker-h:last-of-type{margin-right:0 !important}@media (min-width: 36em){.sc-duet-date-picker-h{width:calc(50% - 16px - 3px)}}.duet-expand.sc-duet-date-picker-h{width:100% !important}.duet-m-0.sc-duet-date-picker-h{margin:0 !important}.duet-date.sc-duet-date-picker{position:relative;width:100%}.duet-date.sc-duet-date-picker button.sc-duet-date-picker,.duet-date-dialog.sc-duet-date-picker button.sc-duet-date-picker{max-width:initial !important;min-height:initial !important;padding:0 !important;margin:0 !important;transition:initial}.duet-date-button.sc-duet-date-picker{-webkit-user-select:none;user-select:none;position:absolute;top:1px;right:1px;z-index:200;display:flex;align-items:center;justify-content:center;width:48px;height:calc(100% - 2px);color:#00294d;cursor:pointer;background:transparent !important;border-left:1px solid #cfd2d4 !important;border-radius:0 4px 4px 0 !important}.duet-theme-turva.sc-duet-date-picker .duet-date-button.sc-duet-date-picker{color:#171c3a;border-color:#cfcfd1}.duet-date-button.sc-duet-date-picker::before{position:absolute;top:0;left:-6px;width:6px;height:100%;content:"";background:linear-gradient(to left, rgba(207, 210, 212, 0.2) 0%, rgba(207, 210, 212, 0.2) 1px, rgba(207, 210, 212, 0.1) 1px, rgba(207, 210, 212, 0) 100%)}.duet-date-button.sc-duet-date-picker:disabled{pointer-events:none;cursor:default;background:#f5f8fa !important;border:0 !important}.duet-theme-turva.sc-duet-date-picker .duet-date-button.sc-duet-date-picker:disabled{background:#f5f5f7 !important}.duet-date-button.sc-duet-date-picker:disabled::before{display:none}.duet-date-button.sc-duet-date-picker:disabled duet-icon.sc-duet-date-picker{opacity:0.4}.duet-date-button.sc-duet-date-picker duet-icon.sc-duet-date-picker{transform:translateY(-1px)}.duet-date-button.sc-duet-date-picker:active duet-icon.sc-duet-date-picker{transform:translateY(0)}.duet-date-button.sc-duet-date-picker:focus{color:#0077b3;border-color:transparent;outline:0;box-shadow:0 0 0 2px #0077b3}.duet-theme-turva.sc-duet-date-picker .duet-date-button.sc-duet-date-picker:focus{color:#171c3a;box-shadow:0 0 0 2px #171c3a}.duet-date-dialog.sc-duet-date-picker{position:absolute;top:100%;left:0;z-index:900;display:flex;width:100%;visibility:hidden;opacity:0;transition:transform 300ms ease, opacity 300ms ease, visibility 300ms ease;transform:scale(0.96) translateZ(0) translateY(-20px);transform-origin:top right}@media (min-width: 36em){.duet-date-dialog.left.sc-duet-date-picker{right:0;left:auto;width:auto}}@media (max-width: 35.9375em){.duet-date-dialog.sc-duet-date-picker{position:fixed;top:0;right:0;bottom:0;background:rgba(0, 41, 77, 0.75);transition:opacity 400ms ease, visibility 400ms ease;transform:translateZ(0);transform-origin:bottom center}.duet-date-dialog.duet-theme-turva.sc-duet-date-picker{background:rgba(23, 28, 58, 0.75)}}.duet-date-dialog.active.sc-duet-date-picker{visibility:visible;opacity:1;transition-property:transform, opacity;transform:scale(1.0001) translateZ(0) translateY(0)}@media (min-width: 36em){.duet-date-dialog.error.sc-duet-date-picker{top:calc(100% - 28px);margin-top:4px}}.duet-date-dialog-wrapper.sc-duet-date-picker{position:relative;z-index:600;width:100%;min-width:290px;max-width:310px;padding:16px 16px 20px;margin-top:8px;margin-left:auto;background:white;border:1px solid #e1e3e6;border-radius:4px;box-shadow:0 4px 10px 0 rgba(0, 41, 77, 0.15);transform:none}.duet-theme-turva.sc-duet-date-picker .duet-date-dialog-wrapper.sc-duet-date-picker{border-color:#e4e4e6}@media (max-width: 35.9375em){.duet-date-dialog-wrapper.sc-duet-date-picker{position:absolute;bottom:0;left:0;z-index:900;max-width:none;min-height:25em;padding:0 8% 20px;margin:0;visibility:hidden;border:0;border-radius:0;border-top-left-radius:4px;border-top-right-radius:4px;opacity:0;transition:transform 400ms ease, opacity 400ms ease, visibility 400ms ease;transform:translateZ(0) translateY(100%)}.active.sc-duet-date-picker .duet-date-dialog-wrapper.sc-duet-date-picker{visibility:visible;opacity:1;transition-property:transform, opacity;transform:translateZ(0) translateY(0)}}.duet-date-table.sc-duet-date-picker{width:100%;font-family:"localtapiola-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";font-size:1rem;font-weight:400;line-height:1.25;color:#00294d;text-align:center;border-spacing:0;border-collapse:collapse}.duet-date-table.duet-theme-turva.sc-duet-date-picker{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-date-table.sc-duet-date-picker th.sc-duet-date-picker{padding-bottom:8px;font-size:0.75rem;font-weight:600;line-height:1.25;text-decoration:none;text-transform:uppercase;letter-spacing:1px}.duet-date-table.sc-duet-date-picker .duet-date-table-cell.sc-duet-date-picker{text-align:center}.duet-date-table-button.sc-duet-date-picker{position:relative;z-index:100;display:inline-block !important;width:36.9230769231px !important;height:36.9230769231px !important;min-height:initial !important;padding:0 !important;margin:0 !important;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;font-variant-numeric:tabular-nums;line-height:1.25 !important;color:#00294d !important;text-align:center;vertical-align:initial !important;cursor:pointer;background:transparent !important;border-radius:50% !important;transition:initial !important}.duet-theme-turva.sc-duet-date-picker .duet-date-table-button.sc-duet-date-picker{font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol" !important;color:#171c3a !important}.duet-date-table-button.sc-duet-date-picker:hover{background:#e6f2f8 !important}.duet-theme-turva.sc-duet-date-picker .duet-date-table-button.sc-duet-date-picker:hover{background:#f9e6ea !important}.duet-date-table-button.today.sc-duet-date-picker{z-index:200;color:#004d80 !important;background:#f3f9fc !important;box-shadow:0 0 0 1px #0077b3 !important}.duet-theme-turva.sc-duet-date-picker .duet-date-table-button.today.sc-duet-date-picker{color:#940925 !important;background:#fcf3f4 !important;box-shadow:0 0 0 1px #c60c30 !important}.duet-date-table-button[aria-pressed=true].sc-duet-date-picker,.duet-date-table-button.sc-duet-date-picker:focus{color:white !important;background:#0077b3 !important;outline:0}.duet-theme-turva.sc-duet-date-picker .duet-date-table-button[aria-pressed=true].sc-duet-date-picker,.duet-theme-turva.sc-duet-date-picker .duet-date-table-button.sc-duet-date-picker:focus{color:white !important;background:#c60c30 !important}.duet-date-table-button.sc-duet-date-picker:active{z-index:200;color:white !important;background:#0077b3 !important;box-shadow:0 0 5px #0077b3 !important}.duet-theme-turva.sc-duet-date-picker .duet-date-table-button.sc-duet-date-picker:active{color:white !important;background:#c60c30 !important;box-shadow:0 0 5px #c60c30 !important}.duet-date-table-button.sc-duet-date-picker:focus{z-index:200;box-shadow:0 0 5px #0077b3 !important}.duet-theme-turva.sc-duet-date-picker .duet-date-table-button.sc-duet-date-picker:focus{box-shadow:0 0 5px #c60c30 !important}.duet-date-table-button.disabled.sc-duet-date-picker{color:#909599 !important;cursor:default;background:transparent !important;box-shadow:none !important}.duet-theme-turva.sc-duet-date-picker .duet-date-table-button.disabled.sc-duet-date-picker{color:#747475 !important;background:transparent !important;box-shadow:none !important}.duet-date-table-button.outside.sc-duet-date-picker{color:#909599 !important;pointer-events:none;cursor:default;background:#f5f8fa !important;box-shadow:none;opacity:0.75}.duet-theme-turva.sc-duet-date-picker .duet-date-table-button.outside.sc-duet-date-picker{color:#747475;background:#f5f5f7;box-shadow:none}.duet-date-dialog-header.sc-duet-date-picker{margin-bottom:16px !important;display:flex;align-items:center;justify-content:space-between;width:100%}.duet-date-dialog-buttons.sc-duet-date-picker{white-space:nowrap}.duet-date-dialog-buttons.sc-duet-date-picker .sc-duet-date-picker::part(button){border:0}.duet-date-dialog-select.sc-duet-date-picker{position:relative;display:inline-flex;margin-top:4px}.duet-date-dialog-select.sc-duet-date-picker .duet-date-dialog-select-label.sc-duet-date-picker{position:relative;z-index:1;display:flex;align-items:center;width:100%;padding:0 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:1.25rem;font-weight:600;line-height:1.25;color:#00294d;pointer-events:none;border-radius:4px}.duet-theme-turva.sc-duet-date-picker .duet-date-dialog-select.sc-duet-date-picker .duet-date-dialog-select-label.sc-duet-date-picker{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-date-dialog-select.sc-duet-date-picker span.sc-duet-date-picker{margin-right:4px}.duet-date-dialog-select.sc-duet-date-picker select.sc-duet-date-picker{position:absolute;top:0;left:0;z-index:2;width:100%;height:100%;font-size:1rem;cursor:pointer;opacity:0}.duet-date-dialog-select.sc-duet-date-picker select.sc-duet-date-picker:focus+.duet-date-dialog-select-label.sc-duet-date-picker{box-shadow:0 0 0 2px #0077b3}.duet-theme-turva.sc-duet-date-picker .duet-date-dialog-select.sc-duet-date-picker select.sc-duet-date-picker:focus+.duet-date-dialog-select-label.sc-duet-date-picker{box-shadow:0 0 0 2px #171c3a}.duet-date-dialog-mobile-header.sc-duet-date-picker{position:relative;display:flex;align-items:center;justify-content:space-between;width:120%;padding:12px 20px;margin-bottom:20px;margin-left:-10%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;border-bottom:1px solid #cfd2d4}@media (min-width: 36em){.duet-date-dialog-mobile-header.sc-duet-date-picker{position:absolute;top:-8px;right:-8px;width:auto;padding:0;margin:0;overflow:visible;border:0}}.duet-theme-turva.sc-duet-date-picker .duet-date-dialog-mobile-header.sc-duet-date-picker{border-color:#cfcfd1}.duet-date-dialog-mobile-header.sc-duet-date-picker duet-label.sc-duet-date-picker{display:inline-block;max-width:84%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@media (min-width: 36em){.duet-date-dialog-mobile-header.sc-duet-date-picker duet-label.sc-duet-date-picker{display:none}}.duet-date-picker-close.sc-duet-date-picker{display:flex;align-items:center;justify-content:center;width:24px;height:24px !important;padding:0 !important;color:#00294d !important;cursor:pointer;background:#f5f8fa !important;border-radius:50%;-webkit-appearance:none;appearance:none}@media (min-width: 36em){.duet-date-picker-close.sc-duet-date-picker{opacity:0}}.duet-theme-turva.sc-duet-date-picker .duet-date-picker-close.sc-duet-date-picker{background:#f5f5f7 !important}.duet-date-picker-close.sc-duet-date-picker:hover{background:#f5f8fa !important}.duet-theme-turva.sc-duet-date-picker .duet-date-picker-close.sc-duet-date-picker:hover{background:#f5f5f7 !important}.duet-date-picker-close.sc-duet-date-picker:focus{outline:none;box-shadow:0 0 0 2px #0077b3}@media (min-width: 36em){.duet-date-picker-close.sc-duet-date-picker:focus{opacity:1}}.duet-theme-turva.sc-duet-date-picker .duet-date-picker-close.sc-duet-date-picker:focus{box-shadow:0 0 0 2px #171c3a}';export{E as duet_date_picker}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * Built with Duet Design System
3
3
  */
4
- System.register(["./p-b5a1486e.system.js","./p-33b3aba4.system.js"],(function(e){"use strict";var n,t,o,r,i;return{setters:[function(e){n=e.r;t=e.h;o=e.H;r=e.g},function(e){i=e.i}],execute:function(){var a='*,*::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-submenu-bar-dropdown-link{display:flex;flex-direction:row;gap:0.5rem;align-items:center;justify-content:flex-start;height:100%;padding:8px 20px 8px 60px;font-family:"localtapiola-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";font-size:1rem;font-weight:400;line-height:1.25;color:#00294d;text-align:center;text-decoration:none}@media (min-width: 62em){.duet-submenu-bar-dropdown-link{padding:0.675rem 16px;font-size:0.875rem}}.duet-submenu-bar-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}@media (min-width: 62em){.duet-submenu-bar-dropdown-link:hover{color:#004d80;background:#f3f9fc}.duet-submenu-bar-dropdown-link:hover.duet-theme-turva{color:#940925;background:#e4e4e6}}.duet-submenu-bar-dropdown-link.highlight{color:#0077b3}.duet-submenu-bar-dropdown-link.highlight.duet-theme-turva{color:#c60c30}';var s=e("duet_submenu_bar_dropdown_link",function(){function e(e){n(this,e);this.theme="";this.href="#";this.icon=undefined;this.caret=false;this.highlight=false}e.prototype.componentWillLoad=function(){i(this)};e.prototype.render=function(){return t(o,null,t("a",{class:{"duet-submenu-bar-dropdown-link":true,"duet-theme-turva":this.theme==="turva",highlight:this.highlight},href:this.href,role:"menuitem"},this.icon&&t("duet-icon",{name:this.icon,size:"x-small",margin:"none",color:"currentColor"}),t("slot",null),this.caret&&t("duet-icon",{name:"action-arrow-right-small",size:"xxx-small",margin:"none"})))};Object.defineProperty(e.prototype,"element",{get:function(){return r(this)},enumerable:false,configurable:true});return e}());s.style=a}}}));
4
+ System.register(["./p-5655fb50.system.js","./p-33b3aba4.system.js"],(function(e){"use strict";var n,t,o,r,i;return{setters:[function(e){n=e.r;t=e.h;o=e.H;r=e.g},function(e){i=e.i}],execute:function(){var a='*,*::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-submenu-bar-dropdown-link{display:flex;flex-direction:row;gap:0.5rem;align-items:center;justify-content:flex-start;height:100%;padding:8px 20px 8px 60px;font-family:"localtapiola-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";font-size:1rem;font-weight:400;line-height:1.25;color:#00294d;text-align:center;text-decoration:none}@media (min-width: 62em){.duet-submenu-bar-dropdown-link{padding:0.675rem 16px;font-size:0.875rem}}.duet-submenu-bar-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}@media (min-width: 62em){.duet-submenu-bar-dropdown-link:hover{color:#004d80;background:#f3f9fc}.duet-submenu-bar-dropdown-link:hover.duet-theme-turva{color:#940925;background:#e4e4e6}}.duet-submenu-bar-dropdown-link.highlight{color:#0077b3}.duet-submenu-bar-dropdown-link.highlight.duet-theme-turva{color:#c60c30}';var s=e("duet_submenu_bar_dropdown_link",function(){function e(e){n(this,e);this.theme="";this.href="#";this.icon=undefined;this.caret=false;this.highlight=false}e.prototype.componentWillLoad=function(){i(this)};e.prototype.render=function(){return t(o,null,t("a",{class:{"duet-submenu-bar-dropdown-link":true,"duet-theme-turva":this.theme==="turva",highlight:this.highlight},href:this.href,role:"menuitem"},this.icon&&t("duet-icon",{name:this.icon,size:"x-small",margin:"none",color:"currentColor"}),t("slot",null),this.caret&&t("duet-icon",{name:"action-arrow-right-small",size:"xxx-small",margin:"none"})))};Object.defineProperty(e.prototype,"element",{get:function(){return r(this)},enumerable:false,configurable:true});return e}());s.style=a}}}));
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * Built with Duet Design System
3
3
  */
4
- import{r as t,c as e,h as o,H as n,g as i}from"./p-a1ed9a6c.js";import{i as r}from"./p-4ebf1618.js";import{D as u}from"./p-76f00bd5.js";import{a,g as d}from"./p-ede854e1.js";import{g as s}from"./p-79a9746e.js";import"./p-5a9d75e1.js";import"./p-9052b6f5.js";const b=class{constructor(o){t(this,o),this.duetFocus=e(this,"duetFocus",7),this.duetBlur=e(this,"duetBlur",7),this.handleClick=t=>{!this.url&&this.element.closest("form")&&(t.preventDefault(),this.proxyButton.click())},this.onFocus=()=>{this.duetFocus.emit()},this.onBlur=()=>{this.duetBlur.emit()},this.accessibleLabel=void 0,this.accessibleControls=void 0,this.accessiblePopup="false",this.accessibleActiveDescendant=void 0,this.accessibleOwns=void 0,this.accessibleDescribedBy=void 0,this.accessibleDetails=void 0,this.accessibleLabelledBy=void 0,this.accessibleDescription=void 0,this.accessibleExpanded=void 0,this.accessiblePressed=void 0,this.loading=!1,this.variation="default",this.negative=!1,this.theme="",this.margin="auto",this.padding="auto",this.centerText=!1,this.wrapping="auto",this.expand=!1,this.fixed=!1,this.disabled=!1,this.name=void 0,this.value=void 0,this.identifier=void 0,this.submit=!1,this.external=!1,this.language=a(),this.accessibleLabelExternalDefaults=u,this.accessibleLabelExternal=d(this.accessibleLabelExternalDefaults),this.icon="",this.color="",this.iconRight=!1,this.iconSize="medium",this.size="medium",this.iconOnly=!1,this.url=void 0}componentWillLoad(){r(this),this.url&&this.external&&this.icon&&console.warn("[DUET]: Button used as an external link will override any icon that is set")}connectedCallback(){this.proxyButton=document.createElement("button"),this.proxyButton.style.display="none",this.syncToProxyButton(),!this.url&&this.element.closest("form")&&this.element.insertAdjacentElement("beforebegin",this.proxyButton)}disconnectedCallback(){this.proxyButton.remove(),this.proxyButton=null}syncToProxyButton(){this.proxyButton.type=this.getButtonType(),this.proxyButton.disabled=this.disabled,null!=this.name?this.proxyButton.name=this.name:this.proxyButton.removeAttribute("name"),null!=this.value?this.proxyButton.value=this.value:this.proxyButton.removeAttribute("value")}getButtonType(){return this.submit?"submit":"button"}async setFocus(t){this.nativeButton&&this.nativeButton.focus(t)}render(){const t=this.external&&this.url,e=t?"action-new-window":this.icon,i=!!t||this.iconRight,r=o("span",{class:"duet-button-contents",style:{color:s(this.color)}},e&&o("div",{"aria-hidden":"true",class:{"duet-button-icon":!0,left:!i,right:i,[this.iconSize]:!0}},o("duet-icon",{size:"auto",margin:"none",name:e,color:"currentColor"})),o("slot",null)),u={onFocus:this.onFocus,onBlur:this.onBlur,ref:t=>this.nativeButton=t,id:this.identifier,class:{"duet-m-0":"none"===this.margin,"duet-p-0":"none"===this.padding,"duet-no-wrap":"none"===this.wrapping,"duet-button":!0,"duet-button-is-small":"small"===this.size,"duet-button-icon-only":this.iconOnly,"duet-button-text-center":this.centerText,"duet-button-negative":this.negative||"negative"===this.variation,[this.variation]:!0,disabled:this.disabled,icon:!!e,"icon-right":i,[this.iconSize]:!0},"aria-controls":this.accessibleControls,"aria-label":this.accessibleLabel,"aria-expanded":null!=this.accessibleExpanded?this.accessibleExpanded.toString():void 0,"aria-activedescendant":this.accessibleActiveDescendant,"aria-owns":this.accessibleOwns,"aria-describedby":this.accessibleDescribedBy,"aria-labelledby":this.accessibleLabelledBy,"aria-details":this.accessibleDetails,"aria-description":this.accessibleDescription};return o(n,{onClick:this.handleClick,class:{"duet-m-0":"none"===this.margin,"duet-small":"small"===this.size,"duet-fixed":this.fixed,"duet-expand":this.expand,"input-button":"input-button-primary"===this.variation||"input-button-secondary"===this.variation}},o("div",{class:{"duet-button-container":!0,"duet-button-is-loading":this.loading,"duet-theme-turva":"turva"===this.theme,"duet-button-negative":this.negative||"negative"===this.variation,[this.variation]:!0}},this.url?o("a",Object.assign({},u,{href:this.url,target:this.external?"_blank":"_self",rel:this.external?"noopener":void 0}),r,this.external&&o("duet-visually-hidden",null,", ",this.accessibleLabelExternal)):o("button",Object.assign({},u,{type:this.getButtonType(),disabled:this.disabled,name:this.name,value:this.value,"aria-pressed":null!=this.accessiblePressed?this.accessiblePressed.toString():void 0,"aria-haspopup":null!=this.accessiblePopup?this.accessiblePopup.toString():void 0,"aria-disabled":this.disabled}),r),this.loading&&o("duet-spinner",{color:"currentColor"})))}get element(){return i(this)}static get watchers(){return{disabled:["syncToProxyButton"],submit:["syncToProxyButton"],value:["syncToProxyButton"],name:["syncToProxyButton"]}}};b.style='*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;margin-right:8px !important;margin-bottom:12px !important;position:relative;z-index:1;display:inline-flex;width:auto;max-width:100%;vertical-align:bottom;-webkit-tap-highlight-color:transparent}:host:last-child,:host:last-of-type{margin-right:0 !important}@media (max-width: 35.9375em){:host{width:100%}}:host(.input-button){z-index:250}:host(.duet-small){margin-right:2px !important;margin-bottom:8px !important}:host(.duet-small):last-child,:host(.duet-small):last-of-type{margin-right:0 !important}@media (max-width: 35.9375em){:host(.duet-small){width:auto}}:host(.duet-expand){width:100% !important}:host(.duet-m-0){margin:0 !important}:host(.duet-fixed){width:auto !important}:host(:last-child){margin-right:0 !important}.duet-button-container{position:relative;width:100%}.duet-button{padding:14px 27px 15px !important;-webkit-user-select:none;user-select:none;position:relative;z-index:100;display:block;width:100%;min-width:8rem;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;-webkit-hyphens:auto;hyphens:auto;line-height:1.1;color:#0077b3 !important;text-align:center;text-decoration:none;cursor:pointer;background:transparent;border-style:solid;border-width:2px;border-radius:20rem;transition:background-color 300ms ease, color 300ms ease, border 300ms ease, box-shadow 300ms ease}.duet-button.duet-p-0{padding:0 !important}.duet-button.duet-m-0{margin:0 !important}.duet-button:not(.input-button-primary,.input-button-secondary){font-variant-numeric:tabular-nums}.duet-button.duet-button-text-center{text-align:center !important}.duet-button.duet-button-is-small:not(.duet-button-icon-only){padding:9px 19px 10px !important;min-width:5.3333333333rem;font-size:0.875rem}.duet-button.duet-button-is-small:not(.duet-button-icon-only).icon{padding-left:48px !important}.duet-button.duet-button-is-small:not(.duet-button-icon-only).icon-right{padding-right:48px !important;padding-left:20px !important}.duet-theme-turva .duet-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:#c60c30 !important}.duet-button .duet-button-contents{position:relative;display:inline-block;margin:0 auto;pointer-events:none}.duet-button.duet-no-wrap{white-space:nowrap}.duet-button.icon{padding-left:52px !important}.duet-button.icon-right{padding-right:52px !important;padding-left:28px !important}.duet-button svg{width:100%;min-width:100%;fill:currentColor}.duet-button .duet-button-icon{position:absolute;top:50%;left:-28px;display:flex;align-items:center;justify-content:center;width:16px;height:16px;margin:0 !important;transform:translateY(-50%)}.duet-button .duet-button-icon duet-icon{width:16px;height:16px}.duet-button .duet-button-icon.right{right:-28px;left:auto}.duet-button .duet-button-icon.large{left:-32px;width:20px;height:20px}.duet-button .duet-button-icon.large duet-icon{width:20px;height:20px}.duet-button .duet-button-icon.large.right{right:-32px;left:auto}.duet-button .duet-button-icon.medium-small{left:-16px;width:10px;height:10px;padding-top:1px}.duet-button .duet-button-icon.medium-small duet-icon{width:10px;height:10px}.duet-button .duet-button-icon.medium-small.right{right:-16px;left:auto}.duet-button .duet-button-icon.small{left:-16px;width:7px;height:7px}.duet-button .duet-button-icon.small duet-icon{width:7px;height:7px}.duet-button .duet-button-icon.small.right{right:-16px;left:auto}.duet-button:focus{outline:0;box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3), 0 0 0 1px #0077b3}.duet-theme-turva .duet-button:focus{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}.duet-button:active:not([disabled]){opacity:0.75;transition:none}.duet-button.default{border-color:#e1e3e6}.duet-theme-turva .duet-button.default{color:#c60c30 !important;border-color:#e4e4e6}.duet-button.default:hover{border-color:#0077b3}.duet-theme-turva .duet-button.default:hover{border-color:#c60c30}.duet-button.default.duet-button-negative{background-color:white}.duet-theme-turva .duet-button.default.duet-button-negative{background-color:#e4e4e6 !important}.duet-button.default.duet-button-negative:hover{color:#0077b3 !important;border-color:#0077b3}.duet-theme-turva .duet-button.default.duet-button-negative:hover{color:#c60c30 !important;border-color:#c60c30}.duet-button.primary,.duet-button.input-button-primary{color:white !important;background:#0077b3;border-color:#0077b3}.duet-theme-turva .duet-button.primary,.duet-theme-turva .duet-button.input-button-primary{color:white !important;background:#c60c30;border-color:#c60c30}.duet-button.primary:hover,.duet-button.input-button-primary:hover{background:#005f8f;border-color:#005f8f;box-shadow:0 4px 20px rgba(34, 34, 34, 0.1)}.duet-theme-turva .duet-button.primary:hover,.duet-theme-turva .duet-button.input-button-primary:hover{background:#940925;border-color:#940925}.duet-button.primary:focus,.duet-button.input-button-primary:focus{outline:0;box-shadow:0 0 0 1px white, 0 0 0 4px rgba(0, 119, 179, 0.75)}.duet-theme-turva .duet-button.primary:focus,.duet-theme-turva .duet-button.input-button-primary:focus{box-shadow:0 0 0 1px white, 0 0 0 4px rgba(23, 28, 58, 0.7)}.duet-button.secondary,.duet-button.input-button-secondary{color:#00294d !important;background:transparent;border-color:#00294d}.duet-theme-turva .duet-button.secondary,.duet-theme-turva .duet-button.input-button-secondary{color:#171c3a !important;border-color:#171c3a}.duet-button.secondary:hover,.duet-button.input-button-secondary:hover{color:#0077b3 !important;border-color:#0077b3}.duet-theme-turva .duet-button.secondary:hover,.duet-theme-turva .duet-button.input-button-secondary:hover{color:#c60c30 !important;border-color:#c60c30}.duet-button.secondary.duet-button-negative,.duet-button.input-button-secondary.duet-button-negative{color:#e1e3e6 !important;border-color:white}.duet-theme-turva .duet-button.secondary.duet-button-negative,.duet-theme-turva .duet-button.input-button-secondary.duet-button-negative{color:#e4e4e6 !important}.duet-button.secondary.duet-button-negative:hover,.duet-button.input-button-secondary.duet-button-negative:hover{color:#0077b3 !important;border-color:#0077b3}.duet-theme-turva .duet-button.secondary.duet-button-negative:hover,.duet-theme-turva .duet-button.input-button-secondary.duet-button-negative:hover{color:#c60c30 !important;border-color:#c60c30}.duet-button.negative{color:#00294d !important;background:white;border-color:white}.duet-theme-turva .duet-button.negative{color:#171c3a !important}.duet-button.negative:hover{color:white !important;background:transparent;border-color:white}.duet-button.negative:focus{outline:0;box-shadow:0 0 0 1px #00294d, 0 0 0 4px rgba(255, 255, 255, 0.7)}.duet-theme-turva .duet-button.negative:focus{box-shadow:0 0 0 1px #171c3a, 0 0 0 4px rgba(255, 255, 255, 0.7)}.duet-button.destructive-primary{color:white !important;background:#de2362;border-color:#de2362}.duet-theme-turva .duet-button.destructive-primary{color:white !important;background:#e02a0d;border-color:#e02a0d}.duet-button.destructive-primary:hover{background:#b21c4e;border-color:#b21c4e;box-shadow:0 4px 20px rgba(34, 34, 34, 0.1)}.duet-theme-turva .duet-button.destructive-primary:hover{background:#b3220a}.duet-button.destructive,.duet-button.destructive-secondary{color:#de2362 !important;background:white;border-color:#de2362}.duet-theme-turva .duet-button.destructive,.duet-theme-turva .duet-button.destructive-secondary{color:#e02a0d !important;background:white;border-color:#e02a0d}.duet-button.destructive:hover,.duet-button.destructive-secondary:hover{color:white !important;background:#b21c4e;border-color:#b21c4e}.duet-theme-turva .duet-button.destructive:hover,.duet-theme-turva .duet-button.destructive-secondary:hover{color:white !important;background:#b3220a;border-color:#b3220a}.duet-button.plain{min-width:48px;padding-right:0 !important;padding-left:0 !important;line-height:1.5;text-align:left;background:transparent;border:0;border-color:transparent;border-radius:4px}.duet-theme-turva .duet-button.plain{color:#c60c30 !important;background:transparent;border-color:transparent}.duet-button.plain.icon{padding-left:20px !important}.duet-button.plain.icon.icon-right{padding-right:20px !important;padding-left:0 !important}.duet-button.plain.icon.medium{padding-left:24px !important}.duet-button.plain.icon.medium.icon-right{padding-right:24px !important;padding-left:0 !important}.duet-button.plain.icon.large{padding-left:30px !important}.duet-button.plain.icon.large.icon-right{padding-right:30px !important;padding-left:0 !important}.duet-button.plain .duet-button-icon.left{left:-16.6666666667px !important}.duet-button.plain .duet-button-icon.left.medium{left:-24px !important}.duet-button.plain .duet-button-icon.left.large{left:-30px !important}.duet-button.plain .duet-button-icon.right{right:-16.6666666667px !important}.duet-button.plain .duet-button-icon.right.medium{right:-24px !important}.duet-button.plain .duet-button-icon.right.large{right:-30px !important}.duet-button.plain[disabled]{color:#657787 !important;cursor:not-allowed;background:transparent !important;border-color:transparent !important}.duet-theme-turva .duet-button.plain[disabled]{color:transparent !important;cursor:not-allowed;background:transparent !important;border-color:#e4e4e6 !important}.duet-button.plain:hover{color:#004d80 !important;background:transparent !important}.duet-theme-turva .duet-button.plain:hover{color:#940925 !important}.duet-button.plain.duet-button-negative{color:white !important}.duet-theme-turva .duet-button.plain.duet-button-negative{color:#e4e4e6 !important}.duet-button.plain.duet-button-negative:hover{color:#0077b3 !important}.duet-theme-turva .duet-button.plain.duet-button-negative:hover{color:#c60c30 !important}.duet-button.duet-button-icon-only{min-width:48px;min-height:48px;padding:0 !important}.duet-button.duet-button-icon-only .duet-button-contents{position:static}.duet-button.duet-button-icon-only .duet-button-icon.left.large,.duet-button.duet-button-icon-only .duet-button-icon.left.medium,.duet-button.duet-button-icon-only .duet-button-icon.left.small{position:absolute;top:50% !important;left:50% !important;padding:0;margin:0;transform:translateX(-50%) translateY(-50%)}.duet-button.duet-button.input-button-primary,.duet-button.duet-button.input-button-secondary{box-sizing:content-box;min-width:48px;min-height:48px;padding:0 !important;border-width:1px;border-top-left-radius:0;border-top-right-radius:4px;border-bottom-right-radius:4px;border-bottom-left-radius:0}.duet-button.duet-button.input-button-primary .duet-button-contents,.duet-button.duet-button.input-button-secondary .duet-button-contents{position:static}.duet-button.duet-button.input-button-primary .duet-button-icon.left.large,.duet-button.duet-button.input-button-primary .duet-button-icon.left.medium,.duet-button.duet-button.input-button-primary .duet-button-icon.left.small,.duet-button.duet-button.input-button-secondary .duet-button-icon.left.large,.duet-button.duet-button.input-button-secondary .duet-button-icon.left.medium,.duet-button.duet-button.input-button-secondary .duet-button-icon.left.small{position:absolute;top:50% !important;left:50% !important;padding:0;margin:0;transform:translateX(-50%) translateY(-50%)}.duet-button[disabled],.duet-button[disabled]:hover,.duet-button.duet-button-negative[disabled],.duet-button.duet-button-negative[disabled]:hover{color:#657787 !important;cursor:not-allowed;background:#e1e3e6 !important;border-color:#e1e3e6 !important;box-shadow:none !important}.duet-theme-turva .duet-button[disabled],.duet-theme-turva .duet-button[disabled]:hover,.duet-theme-turva .duet-button.duet-button-negative [disabled],.duet-theme-turva .duet-button.duet-button-negative [disabled]:hover{color:#747475 !important;cursor:not-allowed;background:#e4e4e6 !important;border-color:#e4e4e6 !important}.duet-button-is-loading.primary,.duet-button-is-loading.input-button-primary{color:white}.duet-button-is-loading.default{color:#0077b3}.duet-button-is-loading.default.duet-theme-turva{color:#c60c30}.duet-button-is-loading .duet-button-contents{visibility:hidden;opacity:0}';const p=class{constructor(e){t(this,e),this.accessibleLabel=void 0,this.color="gray-lightest",this.size="small",this.theme=""}componentWillLoad(){r(this)}render(){const t="currentColor"===this.color?"currentColor":s(this.color);return o(n,{class:{"duet-custom-color":"currentColor"!==this.color&&"turva"!==this.theme&&"default"!==this.theme,"duet-theme-turva":"turva"===this.theme&&"currentColor"!==this.color,"duet-theme-default":"default"===this.theme&&"currentColor"!==this.color}},o("div",{class:{"duet-spinner":!0,[this.size]:!0},style:{color:t},"aria-label":this.accessibleLabel}))}};p.style=':host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;position:absolute;top:50%;left:50%;z-index:800;max-width:100%}:host(.duet-theme-default) .duet-spinner{color:#0077b3 !important}:host(.duet-theme-turva) .duet-spinner{color:#c60c30 !important}:host(.duet-custom-color){color:inherit}*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.duet-spinner{-webkit-user-select:none;user-select:none;position:absolute;top:50%;left:50%;z-index:800;width:24px;height:24px;color:#0077b3;border:2px solid transparent;border-left:2px solid currentColor;border-radius:50%;transform:translateZ(0) translateX(-50%) translateY(-50%);transform-origin:0% 0%;animation:duetRotate 0.6s linear infinite}.duet-spinner::after{position:absolute;top:50%;left:50%;z-index:200;box-sizing:content-box;width:100%;height:100%;overflow:hidden;content:"";border:2px solid currentColor;border-radius:50%;opacity:0.3;transform:translateZ(0) translateX(-50%) translateY(-50%);transform-origin:0% 0%}.duet-spinner.medium{width:36px;height:36px;border-width:4px}.duet-spinner.medium::after{border-width:4px}.duet-spinner.large{width:72px;height:72px;border-width:8px}.duet-spinner.large::after{border-width:8px}@keyframes duetRotate{0%{transform:translateZ(0) rotate(0deg) translateX(-50%) translateY(-50%)}100%{transform:translateZ(0) rotate(360deg) translateX(-50%) translateY(-50%)}}';export{b as duet_button,p as duet_spinner}
4
+ import{r as t,c as e,h as o,H as n,g as i}from"./p-bba1a9b4.js";import{i as r}from"./p-4ebf1618.js";import{D as u}from"./p-76f00bd5.js";import{a,g as d}from"./p-ede854e1.js";import{g as s}from"./p-79a9746e.js";import"./p-5a9d75e1.js";import"./p-9052b6f5.js";const b=class{constructor(o){t(this,o),this.duetFocus=e(this,"duetFocus",7),this.duetBlur=e(this,"duetBlur",7),this.handleClick=t=>{!this.url&&this.element.closest("form")&&(t.preventDefault(),this.proxyButton.click())},this.onFocus=()=>{this.duetFocus.emit()},this.onBlur=()=>{this.duetBlur.emit()},this.accessibleLabel=void 0,this.accessibleControls=void 0,this.accessiblePopup="false",this.accessibleActiveDescendant=void 0,this.accessibleOwns=void 0,this.accessibleDescribedBy=void 0,this.accessibleDetails=void 0,this.accessibleLabelledBy=void 0,this.accessibleDescription=void 0,this.accessibleExpanded=void 0,this.accessiblePressed=void 0,this.loading=!1,this.variation="default",this.negative=!1,this.theme="",this.margin="auto",this.padding="auto",this.centerText=!1,this.wrapping="auto",this.expand=!1,this.fixed=!1,this.disabled=!1,this.name=void 0,this.value=void 0,this.identifier=void 0,this.submit=!1,this.external=!1,this.language=a(),this.accessibleLabelExternalDefaults=u,this.accessibleLabelExternal=d(this.accessibleLabelExternalDefaults),this.icon="",this.color="",this.iconRight=!1,this.iconSize="medium",this.size="medium",this.iconOnly=!1,this.url=void 0}componentWillLoad(){r(this),this.url&&this.external&&this.icon&&console.warn("[DUET]: Button used as an external link will override any icon that is set")}connectedCallback(){this.proxyButton=document.createElement("button"),this.proxyButton.style.display="none",this.syncToProxyButton(),!this.url&&this.element.closest("form")&&this.element.insertAdjacentElement("beforebegin",this.proxyButton)}disconnectedCallback(){this.proxyButton.remove(),this.proxyButton=null}syncToProxyButton(){this.proxyButton.type=this.getButtonType(),this.proxyButton.disabled=this.disabled,null!=this.name?this.proxyButton.name=this.name:this.proxyButton.removeAttribute("name"),null!=this.value?this.proxyButton.value=this.value:this.proxyButton.removeAttribute("value")}getButtonType(){return this.submit?"submit":"button"}async setFocus(t){this.nativeButton&&this.nativeButton.focus(t)}render(){const t=this.external&&this.url,e=t?"action-new-window":this.icon,i=!!t||this.iconRight,r=o("span",{class:"duet-button-contents",style:{color:s(this.color)}},e&&o("div",{"aria-hidden":"true",class:{"duet-button-icon":!0,left:!i,right:i,[this.iconSize]:!0}},o("duet-icon",{size:"auto",margin:"none",name:e,color:"currentColor"})),o("slot",null)),u={onFocus:this.onFocus,onBlur:this.onBlur,ref:t=>this.nativeButton=t,id:this.identifier,class:{"duet-m-0":"none"===this.margin,"duet-p-0":"none"===this.padding,"duet-no-wrap":"none"===this.wrapping,"duet-button":!0,"duet-button-is-small":"small"===this.size,"duet-button-icon-only":this.iconOnly,"duet-button-text-center":this.centerText,"duet-button-negative":this.negative||"negative"===this.variation,[this.variation]:!0,disabled:this.disabled,icon:!!e,"icon-right":i,[this.iconSize]:!0},"aria-controls":this.accessibleControls,"aria-label":this.accessibleLabel,"aria-expanded":null!=this.accessibleExpanded?this.accessibleExpanded.toString():void 0,"aria-activedescendant":this.accessibleActiveDescendant,"aria-owns":this.accessibleOwns,"aria-describedby":this.accessibleDescribedBy,"aria-labelledby":this.accessibleLabelledBy,"aria-details":this.accessibleDetails,"aria-description":this.accessibleDescription};return o(n,{onClick:this.handleClick,class:{"duet-m-0":"none"===this.margin,"duet-small":"small"===this.size,"duet-fixed":this.fixed,"duet-expand":this.expand,"input-button":"input-button-primary"===this.variation||"input-button-secondary"===this.variation}},o("div",{class:{"duet-button-container":!0,"duet-button-is-loading":this.loading,"duet-theme-turva":"turva"===this.theme,"duet-button-negative":this.negative||"negative"===this.variation,[this.variation]:!0}},this.url?o("a",Object.assign({},u,{href:this.url,target:this.external?"_blank":"_self",rel:this.external?"noopener":void 0}),r,this.external&&o("duet-visually-hidden",null,", ",this.accessibleLabelExternal)):o("button",Object.assign({},u,{type:this.getButtonType(),disabled:this.disabled,name:this.name,value:this.value,"aria-pressed":null!=this.accessiblePressed?this.accessiblePressed.toString():void 0,"aria-haspopup":null!=this.accessiblePopup?this.accessiblePopup.toString():void 0,"aria-disabled":this.disabled}),r),this.loading&&o("duet-spinner",{color:"currentColor"})))}get element(){return i(this)}static get watchers(){return{disabled:["syncToProxyButton"],submit:["syncToProxyButton"],value:["syncToProxyButton"],name:["syncToProxyButton"]}}};b.style='*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;margin-right:8px !important;margin-bottom:12px !important;position:relative;z-index:1;display:inline-flex;width:auto;max-width:100%;vertical-align:bottom;-webkit-tap-highlight-color:transparent}:host:last-child,:host:last-of-type{margin-right:0 !important}@media (max-width: 35.9375em){:host{width:100%}}:host(.input-button){z-index:250}:host(.duet-small){margin-right:2px !important;margin-bottom:8px !important}:host(.duet-small):last-child,:host(.duet-small):last-of-type{margin-right:0 !important}@media (max-width: 35.9375em){:host(.duet-small){width:auto}}:host(.duet-expand){width:100% !important}:host(.duet-m-0){margin:0 !important}:host(.duet-fixed){width:auto !important}:host(:last-child){margin-right:0 !important}.duet-button-container{position:relative;width:100%}.duet-button{padding:14px 27px 15px !important;-webkit-user-select:none;user-select:none;position:relative;z-index:100;display:block;width:100%;min-width:8rem;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;-webkit-hyphens:auto;hyphens:auto;line-height:1.1;color:#0077b3 !important;text-align:center;text-decoration:none;cursor:pointer;background:transparent;border-style:solid;border-width:2px;border-radius:20rem;transition:background-color 300ms ease, color 300ms ease, border 300ms ease, box-shadow 300ms ease}.duet-button.duet-p-0{padding:0 !important}.duet-button.duet-m-0{margin:0 !important}.duet-button:not(.input-button-primary,.input-button-secondary){font-variant-numeric:tabular-nums}.duet-button.duet-button-text-center{text-align:center !important}.duet-button.duet-button-is-small:not(.duet-button-icon-only){padding:9px 19px 10px !important;min-width:5.3333333333rem;font-size:0.875rem}.duet-button.duet-button-is-small:not(.duet-button-icon-only).icon{padding-left:48px !important}.duet-button.duet-button-is-small:not(.duet-button-icon-only).icon-right{padding-right:48px !important;padding-left:20px !important}.duet-theme-turva .duet-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:#c60c30 !important}.duet-button .duet-button-contents{position:relative;display:inline-block;margin:0 auto;pointer-events:none}.duet-button.duet-no-wrap{white-space:nowrap}.duet-button.icon{padding-left:52px !important}.duet-button.icon-right{padding-right:52px !important;padding-left:28px !important}.duet-button svg{width:100%;min-width:100%;fill:currentColor}.duet-button .duet-button-icon{position:absolute;top:50%;left:-28px;display:flex;align-items:center;justify-content:center;width:16px;height:16px;margin:0 !important;transform:translateY(-50%)}.duet-button .duet-button-icon duet-icon{width:16px;height:16px}.duet-button .duet-button-icon.right{right:-28px;left:auto}.duet-button .duet-button-icon.large{left:-32px;width:20px;height:20px}.duet-button .duet-button-icon.large duet-icon{width:20px;height:20px}.duet-button .duet-button-icon.large.right{right:-32px;left:auto}.duet-button .duet-button-icon.medium-small{left:-16px;width:10px;height:10px;padding-top:1px}.duet-button .duet-button-icon.medium-small duet-icon{width:10px;height:10px}.duet-button .duet-button-icon.medium-small.right{right:-16px;left:auto}.duet-button .duet-button-icon.small{left:-16px;width:7px;height:7px}.duet-button .duet-button-icon.small duet-icon{width:7px;height:7px}.duet-button .duet-button-icon.small.right{right:-16px;left:auto}.duet-button:focus{outline:0;box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3), 0 0 0 1px #0077b3}.duet-theme-turva .duet-button:focus{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}.duet-button:active:not([disabled]){opacity:0.75;transition:none}.duet-button.default{border-color:#e1e3e6}.duet-theme-turva .duet-button.default{color:#c60c30 !important;border-color:#e4e4e6}.duet-button.default:hover{border-color:#0077b3}.duet-theme-turva .duet-button.default:hover{border-color:#c60c30}.duet-button.default.duet-button-negative{background-color:white}.duet-theme-turva .duet-button.default.duet-button-negative{background-color:#e4e4e6 !important}.duet-button.default.duet-button-negative:hover{color:#0077b3 !important;border-color:#0077b3}.duet-theme-turva .duet-button.default.duet-button-negative:hover{color:#c60c30 !important;border-color:#c60c30}.duet-button.primary,.duet-button.input-button-primary{color:white !important;background:#0077b3;border-color:#0077b3}.duet-theme-turva .duet-button.primary,.duet-theme-turva .duet-button.input-button-primary{color:white !important;background:#c60c30;border-color:#c60c30}.duet-button.primary:hover,.duet-button.input-button-primary:hover{background:#005f8f;border-color:#005f8f;box-shadow:0 4px 20px rgba(34, 34, 34, 0.1)}.duet-theme-turva .duet-button.primary:hover,.duet-theme-turva .duet-button.input-button-primary:hover{background:#940925;border-color:#940925}.duet-button.primary:focus,.duet-button.input-button-primary:focus{outline:0;box-shadow:0 0 0 1px white, 0 0 0 4px rgba(0, 119, 179, 0.75)}.duet-theme-turva .duet-button.primary:focus,.duet-theme-turva .duet-button.input-button-primary:focus{box-shadow:0 0 0 1px white, 0 0 0 4px rgba(23, 28, 58, 0.7)}.duet-button.secondary,.duet-button.input-button-secondary{color:#00294d !important;background:transparent;border-color:#00294d}.duet-theme-turva .duet-button.secondary,.duet-theme-turva .duet-button.input-button-secondary{color:#171c3a !important;border-color:#171c3a}.duet-button.secondary:hover,.duet-button.input-button-secondary:hover{color:#0077b3 !important;border-color:#0077b3}.duet-theme-turva .duet-button.secondary:hover,.duet-theme-turva .duet-button.input-button-secondary:hover{color:#c60c30 !important;border-color:#c60c30}.duet-button.secondary.duet-button-negative,.duet-button.input-button-secondary.duet-button-negative{color:#e1e3e6 !important;border-color:white}.duet-theme-turva .duet-button.secondary.duet-button-negative,.duet-theme-turva .duet-button.input-button-secondary.duet-button-negative{color:#e4e4e6 !important}.duet-button.secondary.duet-button-negative:hover,.duet-button.input-button-secondary.duet-button-negative:hover{color:#0077b3 !important;border-color:#0077b3}.duet-theme-turva .duet-button.secondary.duet-button-negative:hover,.duet-theme-turva .duet-button.input-button-secondary.duet-button-negative:hover{color:#c60c30 !important;border-color:#c60c30}.duet-button.negative{color:#00294d !important;background:white;border-color:white}.duet-theme-turva .duet-button.negative{color:#171c3a !important}.duet-button.negative:hover{color:white !important;background:transparent;border-color:white}.duet-button.negative:focus{outline:0;box-shadow:0 0 0 1px #00294d, 0 0 0 4px rgba(255, 255, 255, 0.7)}.duet-theme-turva .duet-button.negative:focus{box-shadow:0 0 0 1px #171c3a, 0 0 0 4px rgba(255, 255, 255, 0.7)}.duet-button.destructive-primary{color:white !important;background:#de2362;border-color:#de2362}.duet-theme-turva .duet-button.destructive-primary{color:white !important;background:#e02a0d;border-color:#e02a0d}.duet-button.destructive-primary:hover{background:#b21c4e;border-color:#b21c4e;box-shadow:0 4px 20px rgba(34, 34, 34, 0.1)}.duet-theme-turva .duet-button.destructive-primary:hover{background:#b3220a}.duet-button.destructive,.duet-button.destructive-secondary{color:#de2362 !important;background:white;border-color:#de2362}.duet-theme-turva .duet-button.destructive,.duet-theme-turva .duet-button.destructive-secondary{color:#e02a0d !important;background:white;border-color:#e02a0d}.duet-button.destructive:hover,.duet-button.destructive-secondary:hover{color:white !important;background:#b21c4e;border-color:#b21c4e}.duet-theme-turva .duet-button.destructive:hover,.duet-theme-turva .duet-button.destructive-secondary:hover{color:white !important;background:#b3220a;border-color:#b3220a}.duet-button.plain{min-width:48px;padding-right:0 !important;padding-left:0 !important;line-height:1.5;text-align:left;background:transparent;border:0;border-color:transparent;border-radius:4px}.duet-theme-turva .duet-button.plain{color:#c60c30 !important;background:transparent;border-color:transparent}.duet-button.plain.icon{padding-left:20px !important}.duet-button.plain.icon.icon-right{padding-right:20px !important;padding-left:0 !important}.duet-button.plain.icon.medium{padding-left:24px !important}.duet-button.plain.icon.medium.icon-right{padding-right:24px !important;padding-left:0 !important}.duet-button.plain.icon.large{padding-left:30px !important}.duet-button.plain.icon.large.icon-right{padding-right:30px !important;padding-left:0 !important}.duet-button.plain .duet-button-icon.left{left:-16.6666666667px !important}.duet-button.plain .duet-button-icon.left.medium{left:-24px !important}.duet-button.plain .duet-button-icon.left.large{left:-30px !important}.duet-button.plain .duet-button-icon.right{right:-16.6666666667px !important}.duet-button.plain .duet-button-icon.right.medium{right:-24px !important}.duet-button.plain .duet-button-icon.right.large{right:-30px !important}.duet-button.plain[disabled]{color:#657787 !important;cursor:not-allowed;background:transparent !important;border-color:transparent !important}.duet-theme-turva .duet-button.plain[disabled]{color:transparent !important;cursor:not-allowed;background:transparent !important;border-color:#e4e4e6 !important}.duet-button.plain:hover{color:#004d80 !important;background:transparent !important}.duet-theme-turva .duet-button.plain:hover{color:#940925 !important}.duet-button.plain.duet-button-negative{color:white !important}.duet-theme-turva .duet-button.plain.duet-button-negative{color:#e4e4e6 !important}.duet-button.plain.duet-button-negative:hover{color:#0077b3 !important}.duet-theme-turva .duet-button.plain.duet-button-negative:hover{color:#c60c30 !important}.duet-button.duet-button-icon-only{min-width:48px;min-height:48px;padding:0 !important}.duet-button.duet-button-icon-only .duet-button-contents{position:static}.duet-button.duet-button-icon-only .duet-button-icon.left.large,.duet-button.duet-button-icon-only .duet-button-icon.left.medium,.duet-button.duet-button-icon-only .duet-button-icon.left.small{position:absolute;top:50% !important;left:50% !important;padding:0;margin:0;transform:translateX(-50%) translateY(-50%)}.duet-button.duet-button.input-button-primary,.duet-button.duet-button.input-button-secondary{box-sizing:content-box;min-width:48px;min-height:48px;padding:0 !important;border-width:1px;border-top-left-radius:0;border-top-right-radius:4px;border-bottom-right-radius:4px;border-bottom-left-radius:0}.duet-button.duet-button.input-button-primary .duet-button-contents,.duet-button.duet-button.input-button-secondary .duet-button-contents{position:static}.duet-button.duet-button.input-button-primary .duet-button-icon.left.large,.duet-button.duet-button.input-button-primary .duet-button-icon.left.medium,.duet-button.duet-button.input-button-primary .duet-button-icon.left.small,.duet-button.duet-button.input-button-secondary .duet-button-icon.left.large,.duet-button.duet-button.input-button-secondary .duet-button-icon.left.medium,.duet-button.duet-button.input-button-secondary .duet-button-icon.left.small{position:absolute;top:50% !important;left:50% !important;padding:0;margin:0;transform:translateX(-50%) translateY(-50%)}.duet-button[disabled],.duet-button[disabled]:hover,.duet-button.duet-button-negative[disabled],.duet-button.duet-button-negative[disabled]:hover{color:#657787 !important;cursor:not-allowed;background:#e1e3e6 !important;border-color:#e1e3e6 !important;box-shadow:none !important}.duet-theme-turva .duet-button[disabled],.duet-theme-turva .duet-button[disabled]:hover,.duet-theme-turva .duet-button.duet-button-negative [disabled],.duet-theme-turva .duet-button.duet-button-negative [disabled]:hover{color:#747475 !important;cursor:not-allowed;background:#e4e4e6 !important;border-color:#e4e4e6 !important}.duet-button-is-loading.primary,.duet-button-is-loading.input-button-primary{color:white}.duet-button-is-loading.default{color:#0077b3}.duet-button-is-loading.default.duet-theme-turva{color:#c60c30}.duet-button-is-loading .duet-button-contents{visibility:hidden;opacity:0}';const p=class{constructor(e){t(this,e),this.accessibleLabel=void 0,this.color="gray-lightest",this.size="small",this.theme=""}componentWillLoad(){r(this)}render(){const t="currentColor"===this.color?"currentColor":s(this.color);return o(n,{class:{"duet-custom-color":"currentColor"!==this.color&&"turva"!==this.theme&&"default"!==this.theme,"duet-theme-turva":"turva"===this.theme&&"currentColor"!==this.color,"duet-theme-default":"default"===this.theme&&"currentColor"!==this.color}},o("div",{class:{"duet-spinner":!0,[this.size]:!0},style:{color:t},"aria-label":this.accessibleLabel}))}};p.style=':host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;position:absolute;top:50%;left:50%;z-index:800;max-width:100%}:host(.duet-theme-default) .duet-spinner{color:#0077b3 !important}:host(.duet-theme-turva) .duet-spinner{color:#c60c30 !important}:host(.duet-custom-color){color:inherit}*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.duet-spinner{-webkit-user-select:none;user-select:none;position:absolute;top:50%;left:50%;z-index:800;width:24px;height:24px;color:#0077b3;border:2px solid transparent;border-left:2px solid currentColor;border-radius:50%;transform:translateZ(0) translateX(-50%) translateY(-50%);transform-origin:0% 0%;animation:duetRotate 0.6s linear infinite}.duet-spinner::after{position:absolute;top:50%;left:50%;z-index:200;box-sizing:content-box;width:100%;height:100%;overflow:hidden;content:"";border:2px solid currentColor;border-radius:50%;opacity:0.3;transform:translateZ(0) translateX(-50%) translateY(-50%);transform-origin:0% 0%}.duet-spinner.medium{width:36px;height:36px;border-width:4px}.duet-spinner.medium::after{border-width:4px}.duet-spinner.large{width:72px;height:72px;border-width:8px}.duet-spinner.large::after{border-width:8px}@keyframes duetRotate{0%{transform:translateZ(0) rotate(0deg) translateX(-50%) translateY(-50%)}100%{transform:translateZ(0) rotate(360deg) translateX(-50%) translateY(-50%)}}';export{b as duet_button,p as duet_spinner}
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Built with Duet Design System
3
3
  */
4
- import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-e20a2ed2.js';
4
+ import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-85a8b3af.js';
5
5
  import { i as inheritGlobalTheme } from './themeable-component-cb76be7c.js';
6
6
  import { c as createID } from './create-id-981107da.js';
7
7
  import { d as debounce } from './js-utils-fa98b8cd.js';
@@ -49,17 +49,11 @@ const DuetActionButton = class {
49
49
  this.accessibleLabelledBy = undefined;
50
50
  this.accessibleDescription = undefined;
51
51
  this.accessibleLabelsDefaults = {
52
- en: {
53
- label: "Click to activate action",
54
- },
55
- fi: {
56
- label: "Klikkaa toiminnon aktivointiin",
57
- },
58
- sv: {
59
- label: "Klicka för att aktivera åtgärd",
60
- },
52
+ en: "Click to activate action",
53
+ fi: "Klikkaa toiminnon aktivointiin",
54
+ sv: "Klicka för att aktivera åtgärd",
61
55
  };
62
- this.accessibleLabels = getLocaleString(this.accessibleLabelsDefaults);
56
+ this.accessibleLabel = getLocaleString(this.accessibleLabelsDefaults);
63
57
  this.accessibleControls = "";
64
58
  }
65
59
  //handle a11y keyboard navigation events
@@ -124,7 +118,7 @@ const DuetActionButton = class {
124
118
  "duet-action-button": true,
125
119
  "duet-action-button--disabled": this.disabled,
126
120
  [`duet-action-button--${this.theme}`]: this.theme !== "",
127
- }, type: "button", onClick: e => this.onMouseHandler(e), "aria-label": this.accessibleLabels.label, "aria-labelledby": this.accessibleLabelledBy, "aria-description": this.accessibleDescription, "aria-describedby": this.accessibleDescribedBy, "aria-details": this.accessibleDetails, "aria-controls": this.accessibleControls, title: this.getTitle() }, h("duet-icon", { part: "icon", name: this.iconName, color: this.iconColor, margin: "none", size: this.iconSize }), h("duet-visually-hidden", null, h("slot", null)))));
121
+ }, type: "button", onClick: e => this.onMouseHandler(e), "aria-label": this.accessibleLabel, "aria-labelledby": this.accessibleLabelledBy, "aria-description": this.accessibleDescription, "aria-describedby": this.accessibleDescribedBy, "aria-details": this.accessibleDetails, "aria-controls": this.accessibleControls, title: this.getTitle() }, h("duet-icon", { part: "icon", name: this.iconName, color: this.iconColor, margin: "none", size: this.iconSize }), h("duet-visually-hidden", null, h("slot", null)))));
128
122
  }
129
123
  get element() { return getElement(this); }
130
124
  };
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Built with Duet Design System
3
3
  */
4
- import { r as registerInstance, c as createEvent, h, H as Host } from './index-e20a2ed2.js';
4
+ import { r as registerInstance, c as createEvent, h, H as Host } from './index-85a8b3af.js';
5
5
  import { i as inheritGlobalTheme } from './themeable-component-cb76be7c.js';
6
6
  import { c as createID } from './create-id-981107da.js';
7
7
  import { g as getLocaleString } from './language-utils-bf701d37.js';