@duetds/components 6.2.10 → 6.2.11

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 (428) hide show
  1. package/hydrate/index.js +13 -9
  2. package/lib/cjs/duet-action-button.cjs.entry.js +1 -1
  3. package/lib/cjs/duet-alert.cjs.entry.js +1 -1
  4. package/lib/cjs/duet-badge.cjs.entry.js +1 -1
  5. package/lib/cjs/duet-breadcrumb.cjs.entry.js +1 -1
  6. package/lib/cjs/duet-breadcrumbs.cjs.entry.js +1 -1
  7. package/lib/cjs/duet-button_2.cjs.entry.js +1 -1
  8. package/lib/cjs/duet-caption_4.cjs.entry.js +1 -1
  9. package/lib/cjs/duet-card.cjs.entry.js +2 -2
  10. package/lib/cjs/duet-checkbox.cjs.entry.js +1 -1
  11. package/lib/cjs/duet-choice_2.cjs.entry.js +2 -2
  12. package/lib/cjs/duet-collapsible.cjs.entry.js +1 -1
  13. package/lib/cjs/duet-combobox.cjs.entry.js +1 -1
  14. package/lib/cjs/duet-cookie-consent.cjs.entry.js +1 -1
  15. package/lib/cjs/duet-date-picker.cjs.entry.js +2 -2
  16. package/lib/cjs/duet-divider_2.cjs.entry.js +1 -1
  17. package/lib/cjs/duet-editable-table_3.cjs.entry.js +1 -1
  18. package/lib/cjs/duet-empty-state.cjs.entry.js +1 -1
  19. package/lib/cjs/duet-fieldset.cjs.entry.js +1 -1
  20. package/lib/cjs/duet-footer.cjs.entry.js +1 -1
  21. package/lib/cjs/duet-grid_2.cjs.entry.js +1 -1
  22. package/lib/cjs/duet-header_2.cjs.entry.js +1 -1
  23. package/lib/cjs/duet-hero.cjs.entry.js +1 -1
  24. package/lib/cjs/duet-icon.cjs.entry.js +1 -1
  25. package/lib/cjs/duet-input_2.cjs.entry.js +7 -5
  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 +1 -1
  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-step_2.cjs.entry.js +1 -1
  45. package/lib/cjs/duet-submenu-bar-dropdown-link.cjs.entry.js +1 -1
  46. package/lib/cjs/duet-submenu-bar-dropdown.cjs.entry.js +1 -1
  47. package/lib/cjs/duet-submenu-bar-link.cjs.entry.js +1 -1
  48. package/lib/cjs/duet-submenu-bar.cjs.entry.js +1 -1
  49. package/lib/cjs/duet-textarea.cjs.entry.js +1 -1
  50. package/lib/cjs/duet-toggle.cjs.entry.js +1 -1
  51. package/lib/cjs/duet-toolbar-dropdown-link.cjs.entry.js +1 -1
  52. package/lib/cjs/duet-toolbar-dropdown.cjs.entry.js +1 -1
  53. package/lib/cjs/duet-toolbar-link.cjs.entry.js +1 -1
  54. package/lib/cjs/duet-toolbar.cjs.entry.js +1 -1
  55. package/lib/cjs/duet-tooltip.cjs.entry.js +7 -5
  56. package/lib/cjs/duet-tray.cjs.entry.js +1 -1
  57. package/lib/cjs/duet-upload-aria-status.cjs.entry.js +1 -1
  58. package/lib/cjs/duet-visually-hidden.cjs.entry.js +1 -1
  59. package/lib/cjs/duet.cjs.js +1 -1
  60. package/lib/cjs/{focus-utils-0b4dd324.js → focus-utils-9e300a05.js} +1 -1
  61. package/lib/cjs/{index-224e46cf.js → index-65a47ca8.js} +1 -1
  62. package/lib/cjs/loader.cjs.js +1 -1
  63. package/lib/collection/components/duet-card/duet-card.css +24 -0
  64. package/lib/collection/components/duet-card/duet-card.js +1 -1
  65. package/lib/collection/components/duet-input/duet-input.css +4 -0
  66. package/lib/collection/components/duet-input/duet-input.js +5 -3
  67. package/lib/collection/components/duet-tooltip/duet-tooltip.css +4 -4
  68. package/lib/collection/components/duet-tooltip/duet-tooltip.js +5 -3
  69. package/lib/dist-custom-elements/duet-action-button.js +1 -1
  70. package/lib/dist-custom-elements/duet-alert.js +1 -1
  71. package/lib/dist-custom-elements/duet-badge.js +1 -1
  72. package/lib/dist-custom-elements/duet-breadcrumb.js +2 -2
  73. package/lib/dist-custom-elements/duet-breadcrumbs.js +2 -2
  74. package/lib/dist-custom-elements/duet-button.js +1 -1
  75. package/lib/dist-custom-elements/duet-caption.js +1 -1
  76. package/lib/dist-custom-elements/duet-card.js +4 -4
  77. package/lib/dist-custom-elements/duet-checkbox.js +1 -1
  78. package/lib/dist-custom-elements/duet-choice-group.js +6 -6
  79. package/lib/dist-custom-elements/duet-choice.js +5 -5
  80. package/lib/dist-custom-elements/duet-collapsible.js +2 -2
  81. package/lib/dist-custom-elements/duet-combobox.js +2 -2
  82. package/lib/dist-custom-elements/duet-cookie-consent.js +6 -6
  83. package/lib/dist-custom-elements/duet-date-picker.js +8 -8
  84. package/lib/dist-custom-elements/duet-divider.js +1 -1
  85. package/lib/dist-custom-elements/duet-editable-table.js +1 -1
  86. package/lib/dist-custom-elements/duet-empty-state.js +1 -1
  87. package/lib/dist-custom-elements/duet-fieldset.js +1 -1
  88. package/lib/dist-custom-elements/duet-footer.js +4 -4
  89. package/lib/dist-custom-elements/duet-grid-item.js +1 -1
  90. package/lib/dist-custom-elements/duet-grid.js +1 -1
  91. package/lib/dist-custom-elements/duet-header.js +8 -8
  92. package/lib/dist-custom-elements/duet-heading.js +1 -1
  93. package/lib/dist-custom-elements/duet-hero.js +9 -9
  94. package/lib/dist-custom-elements/duet-icon.js +1 -1
  95. package/lib/dist-custom-elements/duet-input.js +1 -1
  96. package/lib/dist-custom-elements/duet-label.js +1 -1
  97. package/lib/dist-custom-elements/duet-layout.js +1 -1
  98. package/lib/dist-custom-elements/duet-link.js +1 -1
  99. package/lib/dist-custom-elements/duet-list-item.js +1 -1
  100. package/lib/dist-custom-elements/duet-list.js +1 -1
  101. package/lib/dist-custom-elements/duet-logo.js +1 -1
  102. package/lib/dist-custom-elements/duet-menu-bar-dropdown-link.js +2 -2
  103. package/lib/dist-custom-elements/duet-menu-bar-dropdown.js +2 -2
  104. package/lib/dist-custom-elements/duet-menu-bar-link.js +2 -2
  105. package/lib/dist-custom-elements/duet-menu-bar.js +2 -2
  106. package/lib/dist-custom-elements/duet-modal.js +7 -7
  107. package/lib/dist-custom-elements/duet-multiselect.js +8 -8
  108. package/lib/dist-custom-elements/duet-nav.js +1 -1
  109. package/lib/dist-custom-elements/duet-notification-drawer.js +4 -4
  110. package/lib/dist-custom-elements/duet-notification.js +2 -2
  111. package/lib/dist-custom-elements/duet-number-input.js +7 -7
  112. package/lib/dist-custom-elements/duet-pagination.js +7 -7
  113. package/lib/dist-custom-elements/duet-paragraph.js +1 -1
  114. package/lib/dist-custom-elements/duet-progress.js +1 -1
  115. package/lib/dist-custom-elements/duet-radio-group.js +6 -6
  116. package/lib/dist-custom-elements/duet-radio.js +1 -1
  117. package/lib/dist-custom-elements/duet-range-slider.js +2 -2
  118. package/lib/dist-custom-elements/duet-range-stepper.js +4 -4
  119. package/lib/dist-custom-elements/duet-scrollable.js +1 -1
  120. package/lib/dist-custom-elements/duet-section-layout.js +1 -1
  121. package/lib/dist-custom-elements/duet-select.js +1 -1
  122. package/lib/dist-custom-elements/duet-spacer.js +1 -1
  123. package/lib/dist-custom-elements/duet-spinner.js +1 -1
  124. package/lib/dist-custom-elements/duet-step.js +4 -4
  125. package/lib/dist-custom-elements/duet-stepper.js +2 -2
  126. package/lib/dist-custom-elements/duet-submenu-bar-dropdown-link.js +2 -2
  127. package/lib/dist-custom-elements/duet-submenu-bar-dropdown.js +2 -2
  128. package/lib/dist-custom-elements/duet-submenu-bar-link.js +2 -2
  129. package/lib/dist-custom-elements/duet-submenu-bar.js +1 -1
  130. package/lib/dist-custom-elements/duet-tab-group.js +8 -8
  131. package/lib/dist-custom-elements/duet-tab.js +1 -1
  132. package/lib/dist-custom-elements/duet-table.js +1 -1
  133. package/lib/dist-custom-elements/duet-textarea.js +8 -8
  134. package/lib/dist-custom-elements/duet-toggle.js +2 -2
  135. package/lib/dist-custom-elements/duet-toolbar-dropdown-link.js +2 -2
  136. package/lib/dist-custom-elements/duet-toolbar-dropdown.js +2 -2
  137. package/lib/dist-custom-elements/duet-toolbar-link.js +2 -2
  138. package/lib/dist-custom-elements/duet-toolbar.js +1 -1
  139. package/lib/dist-custom-elements/duet-tooltip.js +1 -1
  140. package/lib/dist-custom-elements/duet-tray.js +3 -3
  141. package/lib/dist-custom-elements/duet-upload-aria-status.js +1 -1
  142. package/lib/dist-custom-elements/duet-upload.js +18 -18
  143. package/lib/dist-custom-elements/duet-visually-hidden.js +1 -1
  144. package/lib/dist-custom-elements/index.js +1 -1
  145. package/lib/dist-custom-elements/{p-fb326641.js → p-0a6cd967.js} +1 -1
  146. package/lib/dist-custom-elements/{p-2aeee57c.js → p-1cc71fd1.js} +1 -1
  147. package/lib/dist-custom-elements/{p-6ef5b110.js → p-201fa17a.js} +1 -1
  148. package/lib/dist-custom-elements/{p-dae95b0c.js → p-20f6b246.js} +2 -2
  149. package/lib/dist-custom-elements/{p-7892eeaa.js → p-29d3be5e.js} +3 -3
  150. package/lib/dist-custom-elements/{p-92774fee.js → p-30b7f663.js} +1 -1
  151. package/lib/dist-custom-elements/{p-b4c3b41a.js → p-3db3f9f4.js} +1 -1
  152. package/lib/dist-custom-elements/{p-61d4610e.js → p-4d7a5987.js} +6 -6
  153. package/lib/dist-custom-elements/{p-1a874486.js → p-5dda7a5d.js} +1 -1
  154. package/lib/dist-custom-elements/{p-bfe09cf9.js → p-61321af0.js} +1 -1
  155. package/lib/dist-custom-elements/{p-d666af56.js → p-6f6ab590.js} +2 -2
  156. package/lib/dist-custom-elements/{p-3da550fe.js → p-7a17ddae.js} +3 -3
  157. package/lib/dist-custom-elements/{p-f8b110bb.js → p-839269c6.js} +1 -1
  158. package/lib/dist-custom-elements/{p-dc0fb75f.js → p-83efddec.js} +1 -1
  159. package/lib/dist-custom-elements/{p-a713c54c.js → p-8d733f50.js} +1 -1
  160. package/lib/dist-custom-elements/{p-01a21809.js → p-a47e36e6.js} +4 -4
  161. package/lib/dist-custom-elements/{p-233a851f.js → p-a8ed1569.js} +2 -2
  162. package/lib/dist-custom-elements/{p-81f99576.js → p-abec242f.js} +1 -1
  163. package/lib/dist-custom-elements/{p-00894ecb.js → p-af2bc5dc.js} +2 -2
  164. package/lib/dist-custom-elements/{p-539ff5d3.js → p-b1804185.js} +1 -1
  165. package/lib/dist-custom-elements/{p-6a344de8.js → p-b8c366b7.js} +1 -1
  166. package/lib/dist-custom-elements/{p-8342e3f6.js → p-bb576c58.js} +1 -1
  167. package/lib/dist-custom-elements/{p-3b659b54.js → p-d0a9c324.js} +7 -7
  168. package/lib/dist-custom-elements/{p-237a0891.js → p-d832f332.js} +1 -1
  169. package/lib/dist-custom-elements/{p-fd4dbc86.js → p-d9c9af49.js} +5 -5
  170. package/lib/dist-custom-elements/{p-d6ebb97f.js → p-dbe1ff64.js} +12 -10
  171. package/lib/dist-custom-elements/{p-b32aa2d9.js → p-e5db8afc.js} +1 -1
  172. package/lib/dist-custom-elements/{p-5bf86486.js → p-ef10689d.js} +2 -2
  173. package/lib/dist-custom-elements/{p-e1f53651.js → p-f8331a39.js} +1 -1
  174. package/lib/dist-custom-elements/{p-93b55d39.js → p-fb50673a.js} +9 -7
  175. package/lib/dist-custom-elements/{p-c920f23f.js → p-ff455eb0.js} +1 -1
  176. package/lib/duet/duet.esm.js +1 -1
  177. package/lib/duet/duet.js +1 -1
  178. package/lib/duet/{p-1fc897aa.system.entry.js → p-061f115a.system.entry.js} +1 -1
  179. package/lib/duet/{p-5e38fe1e.system.entry.js → p-0d3e49f1.system.entry.js} +1 -1
  180. package/lib/duet/{p-641677ac.entry.js → p-0d60f277.entry.js} +1 -1
  181. package/lib/duet/{p-5808ec61.entry.js → p-0dc08238.entry.js} +1 -1
  182. package/lib/duet/{p-bb50827a.system.entry.js → p-0f85fb24.system.entry.js} +1 -1
  183. package/lib/duet/{p-0e77d8ab.entry.js → p-12331bec.entry.js} +1 -1
  184. package/lib/duet/{p-da471cb6.entry.js → p-149293ef.entry.js} +1 -1
  185. package/lib/duet/{p-f247c8c3.system.entry.js → p-16902d92.system.entry.js} +1 -1
  186. package/lib/duet/{p-2f71c7b2.system.entry.js → p-1b230c44.system.entry.js} +1 -1
  187. package/lib/duet/p-1b98c971.system.entry.js +4 -0
  188. package/lib/duet/p-1d80e24a.system.entry.js +4 -0
  189. package/lib/duet/{p-ee57d652.entry.js → p-1d91892d.entry.js} +1 -1
  190. package/lib/duet/{p-955804aa.entry.js → p-21864966.entry.js} +1 -1
  191. package/lib/duet/{p-42e8e648.system.entry.js → p-246255ec.system.entry.js} +1 -1
  192. package/lib/duet/p-26d73124.entry.js +4 -0
  193. package/lib/duet/{p-f2fe5fb0.system.entry.js → p-2a8e5da6.system.entry.js} +1 -1
  194. package/lib/duet/p-2be78877.entry.js +4 -0
  195. package/lib/duet/{p-0350791a.entry.js → p-2dcb5ca0.entry.js} +1 -1
  196. package/lib/duet/{p-cf9e585a.entry.js → p-2de3cc10.entry.js} +1 -1
  197. package/lib/duet/{p-0bb40d05.system.entry.js → p-2de903ee.system.entry.js} +1 -1
  198. package/lib/duet/{p-befe04fc.system.entry.js → p-2dfe2ca3.system.entry.js} +1 -1
  199. package/lib/duet/{p-7b7df619.system.entry.js → p-34a52a78.system.entry.js} +1 -1
  200. package/lib/duet/{p-39add08d.system.entry.js → p-34f898f7.system.entry.js} +1 -1
  201. package/lib/duet/{p-12d08e01.system.entry.js → p-37139fee.system.entry.js} +1 -1
  202. package/lib/duet/{p-d84f695c.system.entry.js → p-3abf2665.system.entry.js} +1 -1
  203. package/lib/duet/{p-b66ec8f6.system.entry.js → p-3d885c47.system.entry.js} +1 -1
  204. package/lib/duet/{p-a0d55a31.entry.js → p-3e66fe1a.entry.js} +1 -1
  205. package/lib/duet/{p-e9cbfbb8.entry.js → p-3ea5b975.entry.js} +1 -1
  206. package/lib/duet/{p-8dbe7cfe.entry.js → p-3f055c40.entry.js} +1 -1
  207. package/lib/duet/{p-ef4b2321.system.entry.js → p-3f2e2f0f.system.entry.js} +1 -1
  208. package/lib/duet/{p-710eaaf7.system.entry.js → p-452f96ac.system.entry.js} +1 -1
  209. package/lib/duet/{p-028748d5.system.entry.js → p-46acf642.system.entry.js} +1 -1
  210. package/lib/duet/{p-62056001.system.entry.js → p-46e4b561.system.entry.js} +1 -1
  211. package/lib/duet/{p-93b18c00.entry.js → p-46e56fed.entry.js} +1 -1
  212. package/lib/duet/{p-cd75ffb9.entry.js → p-475d1bc7.entry.js} +1 -1
  213. package/lib/duet/{p-2bc09c90.system.entry.js → p-49250aa9.system.entry.js} +1 -1
  214. package/lib/duet/{p-ab5e1499.entry.js → p-4933732d.entry.js} +1 -1
  215. package/lib/duet/{p-b0a7225f.entry.js → p-49525d3d.entry.js} +1 -1
  216. package/lib/duet/{p-49d610fe.entry.js → p-4aa7c59a.entry.js} +1 -1
  217. package/lib/duet/{p-9e5ecda3.system.entry.js → p-4b22281a.system.entry.js} +1 -1
  218. package/lib/duet/{p-e716ec79.system.js → p-4c05c667.system.js} +1 -1
  219. package/lib/duet/{p-09659524.system.entry.js → p-506e3596.system.entry.js} +1 -1
  220. package/lib/duet/{p-7093d98d.system.entry.js → p-5329a6af.system.entry.js} +1 -1
  221. package/lib/duet/{p-82684800.entry.js → p-562ed27c.entry.js} +1 -1
  222. package/lib/duet/{p-674d4f89.system.entry.js → p-5810de18.system.entry.js} +1 -1
  223. package/lib/duet/{p-d3052583.entry.js → p-596eb569.entry.js} +1 -1
  224. package/lib/duet/{p-105b0537.system.entry.js → p-600e2390.system.entry.js} +1 -1
  225. package/lib/duet/{p-657e1a9c.entry.js → p-61336adf.entry.js} +1 -1
  226. package/lib/duet/{p-2eee9407.system.entry.js → p-6147b5c1.system.entry.js} +1 -1
  227. package/lib/duet/p-62d431bd.entry.js +4 -0
  228. package/lib/duet/{p-d99e107d.system.entry.js → p-6632af03.system.entry.js} +1 -1
  229. package/lib/duet/{p-9994bb1c.system.js → p-6753acd9.system.js} +1 -1
  230. package/lib/duet/{p-06448a15.entry.js → p-683d1434.entry.js} +1 -1
  231. package/lib/duet/{p-f726d3cd.entry.js → p-690fd6d7.entry.js} +1 -1
  232. package/lib/duet/{p-12349c89.entry.js → p-6c159000.entry.js} +1 -1
  233. package/lib/duet/{p-99d2a2d0.entry.js → p-6db01063.entry.js} +1 -1
  234. package/lib/duet/{p-678f2b73.entry.js → p-7037c77e.entry.js} +1 -1
  235. package/lib/duet/{p-d853f9c6.system.entry.js → p-708dcb1a.system.entry.js} +1 -1
  236. package/lib/duet/{p-9f254056.entry.js → p-73fdf834.entry.js} +1 -1
  237. package/lib/duet/{p-424630fe.system.entry.js → p-756faa95.system.entry.js} +1 -1
  238. package/lib/duet/{p-bb815395.entry.js → p-7ac3a6e0.entry.js} +1 -1
  239. package/lib/duet/{p-53f687b0.entry.js → p-7ba6cae4.entry.js} +1 -1
  240. package/lib/duet/{p-8f08f45f.system.entry.js → p-7dae10af.system.entry.js} +1 -1
  241. package/lib/duet/{p-c27d9227.system.entry.js → p-7e95730a.system.entry.js} +1 -1
  242. package/lib/duet/{p-9f6b3bfd.system.entry.js → p-7eeaa2cd.system.entry.js} +1 -1
  243. package/lib/duet/p-7f3d9beb.entry.js +4 -0
  244. package/lib/duet/{p-24699e5e.entry.js → p-7f648a0c.entry.js} +1 -1
  245. package/lib/duet/{p-ff4795a2.entry.js → p-80469fdd.entry.js} +1 -1
  246. package/lib/duet/{p-995518ff.system.entry.js → p-85aa1013.system.entry.js} +1 -1
  247. package/lib/duet/{p-ef99402e.system.entry.js → p-8709dc97.system.entry.js} +1 -1
  248. package/lib/duet/{p-1058f106.system.entry.js → p-87e2687c.system.entry.js} +1 -1
  249. package/lib/duet/{p-9fd6cbf8.entry.js → p-87f272ca.entry.js} +1 -1
  250. package/lib/duet/{p-d18491c4.system.js → p-8a57aaec.system.js} +1 -1
  251. package/lib/duet/{p-42ec81e1.system.entry.js → p-8e170437.system.entry.js} +1 -1
  252. package/lib/duet/{p-d39e4bd6.system.entry.js → p-91ba2ad0.system.entry.js} +1 -1
  253. package/lib/duet/{p-15dce9c1.system.entry.js → p-944f9dc6.system.entry.js} +1 -1
  254. package/lib/duet/{p-0c67567a.entry.js → p-95933e43.entry.js} +1 -1
  255. package/lib/duet/{p-c4a10f34.entry.js → p-9752d53b.entry.js} +1 -1
  256. package/lib/duet/{p-c197326e.entry.js → p-9760be33.entry.js} +1 -1
  257. package/lib/duet/{p-54f657e8.system.entry.js → p-97fa38b3.system.entry.js} +1 -1
  258. package/lib/duet/{p-aaf4e96c.system.entry.js → p-987a29f7.system.entry.js} +1 -1
  259. package/lib/duet/{p-e436c8bf.entry.js → p-99b58a7b.entry.js} +1 -1
  260. package/lib/duet/{p-56396196.entry.js → p-9cb8ebf9.entry.js} +1 -1
  261. package/lib/duet/{p-5127b7e2.system.entry.js → p-9ccad140.system.entry.js} +1 -1
  262. package/lib/duet/{p-b1439afc.system.entry.js → p-9dd980a4.system.entry.js} +1 -1
  263. package/lib/duet/{p-79e64f5c.entry.js → p-9e5155db.entry.js} +1 -1
  264. package/lib/duet/{p-4ff4401f.system.entry.js → p-a1ea8dbc.system.entry.js} +1 -1
  265. package/lib/duet/{p-27120216.entry.js → p-a60eb028.entry.js} +1 -1
  266. package/lib/duet/{p-26dcf56b.system.entry.js → p-acd9f501.system.entry.js} +1 -1
  267. package/lib/duet/{p-56e01c6c.entry.js → p-adc9d543.entry.js} +1 -1
  268. package/lib/duet/{p-205c020d.entry.js → p-af4699ec.entry.js} +1 -1
  269. package/lib/duet/{p-3c390274.system.entry.js → p-b3ee05d3.system.entry.js} +1 -1
  270. package/lib/duet/{p-94ce517f.system.entry.js → p-b4de62e6.system.entry.js} +1 -1
  271. package/lib/duet/{p-7dafa69b.system.entry.js → p-b636c691.system.entry.js} +1 -1
  272. package/lib/duet/{p-d8f50523.entry.js → p-bbdaa69f.entry.js} +1 -1
  273. package/lib/duet/p-bf276ba0.system.entry.js +4 -0
  274. package/lib/duet/{p-71f839cc.entry.js → p-c166792a.entry.js} +1 -1
  275. package/lib/duet/{p-3341858e.system.entry.js → p-c2bec9d7.system.entry.js} +1 -1
  276. package/lib/duet/{p-cbf3fa14.entry.js → p-c396c20c.entry.js} +1 -1
  277. package/lib/duet/{p-bf7f6cc2.system.entry.js → p-cb663d57.system.entry.js} +1 -1
  278. package/lib/duet/{p-60204584.entry.js → p-cbc2318e.entry.js} +1 -1
  279. package/lib/duet/{p-0d1ffccb.system.entry.js → p-cf4c1bf7.system.entry.js} +1 -1
  280. package/lib/duet/{p-950120a6.system.entry.js → p-d0135695.system.entry.js} +1 -1
  281. package/lib/duet/{p-1a49c50a.entry.js → p-d315b885.entry.js} +1 -1
  282. package/lib/duet/{p-96dba185.entry.js → p-d3d9744f.entry.js} +1 -1
  283. package/lib/duet/{p-668f8586.js → p-d75c51a6.js} +1 -1
  284. package/lib/duet/{p-e275890f.entry.js → p-d8e936ea.entry.js} +1 -1
  285. package/lib/duet/{p-0329cabc.system.entry.js → p-e0711e9e.system.entry.js} +1 -1
  286. package/lib/duet/{p-6dc3e5c0.system.entry.js → p-e165e825.system.entry.js} +1 -1
  287. package/lib/duet/{p-aa916a55.entry.js → p-e2385ded.entry.js} +1 -1
  288. package/lib/duet/{p-5bf6e8d8.system.entry.js → p-e45b703f.system.entry.js} +1 -1
  289. package/lib/duet/{p-6dbe3c5f.entry.js → p-e690ea1b.entry.js} +1 -1
  290. package/lib/duet/{p-3f424439.entry.js → p-e8ba077f.entry.js} +1 -1
  291. package/lib/duet/{p-41cf732d.entry.js → p-ef461e76.entry.js} +1 -1
  292. package/lib/duet/{p-d60436cb.entry.js → p-f1a5c03d.entry.js} +1 -1
  293. package/lib/duet/{p-e5f29f84.entry.js → p-f52e12f8.entry.js} +1 -1
  294. package/lib/duet/{p-5447faaf.system.entry.js → p-f7dd8f95.system.entry.js} +1 -1
  295. package/lib/duet/{p-99c46e8c.entry.js → p-ff369c3f.entry.js} +1 -1
  296. package/lib/duet/{p-db8ed4ea.js → p-ffa71b04.js} +1 -1
  297. package/lib/esm/duet-action-button.entry.js +1 -1
  298. package/lib/esm/duet-alert.entry.js +1 -1
  299. package/lib/esm/duet-badge.entry.js +1 -1
  300. package/lib/esm/duet-breadcrumb.entry.js +1 -1
  301. package/lib/esm/duet-breadcrumbs.entry.js +1 -1
  302. package/lib/esm/duet-button_2.entry.js +1 -1
  303. package/lib/esm/duet-caption_4.entry.js +1 -1
  304. package/lib/esm/duet-card.entry.js +2 -2
  305. package/lib/esm/duet-checkbox.entry.js +1 -1
  306. package/lib/esm/duet-choice_2.entry.js +2 -2
  307. package/lib/esm/duet-collapsible.entry.js +1 -1
  308. package/lib/esm/duet-combobox.entry.js +1 -1
  309. package/lib/esm/duet-cookie-consent.entry.js +1 -1
  310. package/lib/esm/duet-date-picker.entry.js +2 -2
  311. package/lib/esm/duet-divider_2.entry.js +1 -1
  312. package/lib/esm/duet-editable-table_3.entry.js +1 -1
  313. package/lib/esm/duet-empty-state.entry.js +1 -1
  314. package/lib/esm/duet-fieldset.entry.js +1 -1
  315. package/lib/esm/duet-footer.entry.js +1 -1
  316. package/lib/esm/duet-grid_2.entry.js +1 -1
  317. package/lib/esm/duet-header_2.entry.js +1 -1
  318. package/lib/esm/duet-hero.entry.js +1 -1
  319. package/lib/esm/duet-icon.entry.js +1 -1
  320. package/lib/esm/duet-input_2.entry.js +7 -5
  321. package/lib/esm/duet-layout.entry.js +1 -1
  322. package/lib/esm/duet-list_2.entry.js +1 -1
  323. package/lib/esm/duet-menu-bar-dropdown-link.entry.js +1 -1
  324. package/lib/esm/duet-menu-bar-dropdown.entry.js +1 -1
  325. package/lib/esm/duet-menu-bar-link.entry.js +1 -1
  326. package/lib/esm/duet-menu-bar.entry.js +1 -1
  327. package/lib/esm/duet-modal.entry.js +2 -2
  328. package/lib/esm/duet-multiselect.entry.js +1 -1
  329. package/lib/esm/duet-nav.entry.js +1 -1
  330. package/lib/esm/duet-notification_2.entry.js +1 -1
  331. package/lib/esm/duet-number-input.entry.js +1 -1
  332. package/lib/esm/duet-pagination_2.entry.js +1 -1
  333. package/lib/esm/duet-progress.entry.js +1 -1
  334. package/lib/esm/duet-radio_2.entry.js +1 -1
  335. package/lib/esm/duet-range-slider.entry.js +1 -1
  336. package/lib/esm/duet-scrollable_3.entry.js +1 -1
  337. package/lib/esm/duet-section-layout.entry.js +1 -1
  338. package/lib/esm/duet-select.entry.js +1 -1
  339. package/lib/esm/duet-step_2.entry.js +1 -1
  340. package/lib/esm/duet-submenu-bar-dropdown-link.entry.js +1 -1
  341. package/lib/esm/duet-submenu-bar-dropdown.entry.js +1 -1
  342. package/lib/esm/duet-submenu-bar-link.entry.js +1 -1
  343. package/lib/esm/duet-submenu-bar.entry.js +1 -1
  344. package/lib/esm/duet-textarea.entry.js +1 -1
  345. package/lib/esm/duet-toggle.entry.js +1 -1
  346. package/lib/esm/duet-toolbar-dropdown-link.entry.js +1 -1
  347. package/lib/esm/duet-toolbar-dropdown.entry.js +1 -1
  348. package/lib/esm/duet-toolbar-link.entry.js +1 -1
  349. package/lib/esm/duet-toolbar.entry.js +1 -1
  350. package/lib/esm/duet-tooltip.entry.js +7 -5
  351. package/lib/esm/duet-tray.entry.js +1 -1
  352. package/lib/esm/duet-upload-aria-status.entry.js +1 -1
  353. package/lib/esm/duet-visually-hidden.entry.js +1 -1
  354. package/lib/esm/duet.js +1 -1
  355. package/lib/esm/{focus-utils-e6e358d9.js → focus-utils-c81ea33a.js} +1 -1
  356. package/lib/esm/{index-c2ffa95d.js → index-ab069e8d.js} +1 -1
  357. package/lib/esm/loader.js +1 -1
  358. package/lib/esm-es5/duet-action-button.entry.js +1 -1
  359. package/lib/esm-es5/duet-alert.entry.js +1 -1
  360. package/lib/esm-es5/duet-badge.entry.js +1 -1
  361. package/lib/esm-es5/duet-breadcrumb.entry.js +1 -1
  362. package/lib/esm-es5/duet-breadcrumbs.entry.js +1 -1
  363. package/lib/esm-es5/duet-button_2.entry.js +1 -1
  364. package/lib/esm-es5/duet-caption_4.entry.js +1 -1
  365. package/lib/esm-es5/duet-card.entry.js +1 -1
  366. package/lib/esm-es5/duet-checkbox.entry.js +1 -1
  367. package/lib/esm-es5/duet-choice_2.entry.js +2 -2
  368. package/lib/esm-es5/duet-collapsible.entry.js +1 -1
  369. package/lib/esm-es5/duet-combobox.entry.js +1 -1
  370. package/lib/esm-es5/duet-cookie-consent.entry.js +1 -1
  371. package/lib/esm-es5/duet-date-picker.entry.js +1 -1
  372. package/lib/esm-es5/duet-divider_2.entry.js +1 -1
  373. package/lib/esm-es5/duet-editable-table_3.entry.js +1 -1
  374. package/lib/esm-es5/duet-empty-state.entry.js +1 -1
  375. package/lib/esm-es5/duet-fieldset.entry.js +1 -1
  376. package/lib/esm-es5/duet-footer.entry.js +1 -1
  377. package/lib/esm-es5/duet-grid_2.entry.js +2 -2
  378. package/lib/esm-es5/duet-header_2.entry.js +1 -1
  379. package/lib/esm-es5/duet-hero.entry.js +1 -1
  380. package/lib/esm-es5/duet-icon.entry.js +1 -1
  381. package/lib/esm-es5/duet-input_2.entry.js +1 -1
  382. package/lib/esm-es5/duet-layout.entry.js +1 -1
  383. package/lib/esm-es5/duet-list_2.entry.js +1 -1
  384. package/lib/esm-es5/duet-menu-bar-dropdown-link.entry.js +1 -1
  385. package/lib/esm-es5/duet-menu-bar-dropdown.entry.js +1 -1
  386. package/lib/esm-es5/duet-menu-bar-link.entry.js +1 -1
  387. package/lib/esm-es5/duet-menu-bar.entry.js +1 -1
  388. package/lib/esm-es5/duet-modal.entry.js +2 -2
  389. package/lib/esm-es5/duet-multiselect.entry.js +1 -1
  390. package/lib/esm-es5/duet-nav.entry.js +1 -1
  391. package/lib/esm-es5/duet-notification_2.entry.js +1 -1
  392. package/lib/esm-es5/duet-number-input.entry.js +1 -1
  393. package/lib/esm-es5/duet-pagination_2.entry.js +1 -1
  394. package/lib/esm-es5/duet-progress.entry.js +1 -1
  395. package/lib/esm-es5/duet-radio_2.entry.js +1 -1
  396. package/lib/esm-es5/duet-range-slider.entry.js +1 -1
  397. package/lib/esm-es5/duet-scrollable_3.entry.js +1 -1
  398. package/lib/esm-es5/duet-section-layout.entry.js +1 -1
  399. package/lib/esm-es5/duet-select.entry.js +1 -1
  400. package/lib/esm-es5/duet-step_2.entry.js +1 -1
  401. package/lib/esm-es5/duet-submenu-bar-dropdown-link.entry.js +1 -1
  402. package/lib/esm-es5/duet-submenu-bar-dropdown.entry.js +1 -1
  403. package/lib/esm-es5/duet-submenu-bar-link.entry.js +1 -1
  404. package/lib/esm-es5/duet-submenu-bar.entry.js +1 -1
  405. package/lib/esm-es5/duet-textarea.entry.js +1 -1
  406. package/lib/esm-es5/duet-toggle.entry.js +1 -1
  407. package/lib/esm-es5/duet-toolbar-dropdown-link.entry.js +1 -1
  408. package/lib/esm-es5/duet-toolbar-dropdown.entry.js +1 -1
  409. package/lib/esm-es5/duet-toolbar-link.entry.js +1 -1
  410. package/lib/esm-es5/duet-toolbar.entry.js +1 -1
  411. package/lib/esm-es5/duet-tooltip.entry.js +1 -1
  412. package/lib/esm-es5/duet-tray.entry.js +1 -1
  413. package/lib/esm-es5/duet-upload-aria-status.entry.js +1 -1
  414. package/lib/esm-es5/duet-visually-hidden.entry.js +1 -1
  415. package/lib/esm-es5/duet.js +1 -1
  416. package/lib/esm-es5/focus-utils-c81ea33a.js +4 -0
  417. package/lib/esm-es5/{index-c2ffa95d.js → index-ab069e8d.js} +1 -1
  418. package/lib/esm-es5/loader.js +1 -1
  419. package/lib/types/components/duet-card/duet-card.d.ts +1 -1
  420. package/package.json +5 -5
  421. package/lib/duet/p-13e4628c.entry.js +0 -4
  422. package/lib/duet/p-5872b816.entry.js +0 -4
  423. package/lib/duet/p-642811e6.system.entry.js +0 -4
  424. package/lib/duet/p-8f2a5b89.system.entry.js +0 -4
  425. package/lib/duet/p-ad7f63d0.system.entry.js +0 -4
  426. package/lib/duet/p-c6d5b4eb.entry.js +0 -4
  427. package/lib/duet/p-cd691c10.entry.js +0 -4
  428. package/lib/esm-es5/focus-utils-e6e358d9.js +0 -4
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * Built with Duet Design System
3
3
  */
4
- import{h as t,r as e,c as a,H as i,g as s}from"./p-668f8586.js";import{i as d}from"./p-4ebf1618.js";import{f as l,d as o}from"./p-0b3f675e.js";import{i as n}from"./p-54f35a79.js";import{g as r,s as u}from"./p-ede854e1.js";import{q as h,s as b}from"./p-9052b6f5.js";import{b as p}from"./p-79a9746e.js";import{c as m}from"./p-c1325e35.js";import{p as c}from"./p-5a9d75e1.js";const f=({data:e,groupId:a,alignment:i})=>{const s=`duet-editable-table duet-editable-table-content-${a}`;return"string"==typeof e?t("td",{innerHTML:e,class:s,part:`${a}content`,style:{verticalAlign:i}}):t("td",{class:s,part:`${a}content`,style:{verticalAlign:i}},e)},g=class{constructor(t){e(this,t),this.duetTableToggle=a(this,"duetTableToggle",7),this.duetMenuClick=a(this,"duetMenuClick",7),this.sortableDefaultLabel={fi:"Järjestä",en:"Click to sort",sv:"Klicka för att sortera"},this.actionColumnLabel={en:"Actions for rows",fi:"Toiminnot rivillä",sv:"Åtgärder för rader"},this.toggleColumn=(t,e)=>{e.preventDefault();const{sort_order:a,direction:i,index:s,key:d}=t;this.duetTableToggle.emit({sort_order:a,index:s,direction:i,key:d,component:"duet-editable-table",originalEvent:e})},this.handleKeyDown=(t,e)=>{n(e)&&this.toggleColumn(t,e)},this.margin="auto",this.variation="striped",this.sticky=!1,this.stickyDistance="with-links",this.breakpoint="small",this.actions=void 0,this.columns=void 0,this.rows=void 0,this.sortable=!1,this.groupId="",this.theme="",this.accessibleRole=void 0}componentWillLoad(){d(this)}createLabel(e){const{sort_order:a,direction:i,index:s,label:d}=e,l=r(d);return this.sortable?t("span",{class:"duet-table-label","data-index":s},t("duet-button",{size:"small",icon:a&&1===i?"action-arrow-down-small":a&&-1===i?"action-arrow-up-small":"action-subtract-small","icon-size":"medium-small","accessible-label":r(this.sortableDefaultLabel),variation:"plain",margin:"none","icon-right":!0,onClick:t=>this.toggleColumn(e,t),onKeyDown:t=>this.handleKeyDown(e,t)},l)):l}getSortedColumns(){return[...this.columns].sort(l(["index"]))}getRowSortOrder(){return[...this.columns].sort(l(["sort_order"])).filter((t=>t.sort_order)).map((t=>-1===t.direction?`-${t.key}`:t.key))}renderTableHeader(){if(!this.columns)return;const e=this.getSortedColumns();return t("tr",{class:{"duet-table-action-header":!!this.actions}},e.map((e=>{if(!1!==e.display){const a=this.createLabel(e);return""!==a?t("th",{scope:"col"},a):t("td",null)}})),this.actions&&t("th",{scope:"col",class:"duet-table-action-header-heading"},this.actions&&t("duet-visually-hidden",null,r(this.actionColumnLabel))))}renderActions(e,a){if(this.actions)return t("td",{class:"duet-text-right"},this.actions.map((i=>t("duet-action-button",{actionMeta:Object.assign({},(null==e?void 0:e.meta)||{},{index:a}),actionId:(null==e?void 0:e.uid)||(null==e?void 0:e.id)||null,actionName:i.name,theme:this.theme,iconName:i.icon,iconColor:i.color,iconSize:i.size,background:i.background}))))}renderTableBody(){const e=this.getSortedColumns(),a=this.getRowSortOrder();return[...this.rows].sort(l(a)).map(((a,i)=>t("tr",{class:{"duet-table-action-row":!!this.actions,"duet-editable-table-row":!0,[`duet-editable-table-row-${this.groupId}`]:!0},"data-meta":JSON.stringify(a.meta)},e.map((e=>{if(!1!==e.display)return t(f,{data:a[e.key]?a[e.key]:a.item,groupId:this.groupId})})),this.actions&&this.renderActions(a,i))))}render(){return t(i,{class:{[`duet-editable-table-${this.variation}`]:!0,"duet-editable-table":!0,[`duet-editable-table-${this.theme}`]:!0,"duet-editable-table-scrollable":"none-scrollable"===this.breakpoint,"duet-editable-table-sortable":this.sortable,"duet-editable-table-actions":!!this.actions,"duet-m-0":"none"===this.margin,"duet-theme-turva":"turva"===this.theme}},t("duet-table",{class:"duet-editable-table-table",sticky:this.sticky,stickyDistance:this.stickyDistance,margin:this.margin,theme:this.theme,variation:this.variation,breakpoint:this.breakpoint},t("table",{role:this.accessibleRole},t("caption",null,t("slot",{name:"tcaption"})),t("thead",null,t("tr",null,t("td",{class:"duet-editable-table-actions-menu",colSpan:99},t("slot",{name:"thead-first"}))),this.renderTableHeader(),t("tr",null,t("td",{class:"duet-editable-table-actions-menu",colSpan:99},t("slot",{name:"thead-last"})))),t("tbody",null,this.renderTableBody()),t("tfoot",null,t("tr",null,t("th",{class:"duet-editable-table-footer-menu",colSpan:99},t("slot",{name:"tfoot"})))))))}get element(){return s(this)}};g.style=".sc-duet-editable-table-h{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.duet-editable-table-actions-menu.sc-duet-editable-table{position:relative;padding:0 !important;margin:0}.duet-editable-table-actions-menu-button.sc-duet-editable-table{position:relative;right:-16px;float:right;padding:0}.duet-editable-table-actions-menu-icon.sc-duet-editable-table .duet-icon.sc-duet-editable-table{max-width:16px;max-height:16px}.duet-editable-table-row.duet-table-action-row.sc-duet-editable-table .duet-text-right.sc-duet-editable-table{text-align:right}.duet-editable-table-header.sc-duet-editable-table tr.sc-duet-editable-table .duet-editable-table-header-hidden.sc-duet-editable-table{padding:0 !important;font-size:0;border-bottom:0}";const y={none:0,"with-links":16*parseFloat(h),"without-links":16*parseFloat(b)},v=class{constructor(t){e(this,t),this.handleMediaQueryChange=t=>{this.matchesBreakpoint=t.matches},this.matchesBreakpoint=!0,this.theme=void 0,this.margin="auto",this.variation="striped",this.sticky=!1,this.stickyDistance="with-links",this.breakpoint="small"}connectedCallback(){this.mq=matchMedia("none"===this.breakpoint||"none-scrollable"===this.breakpoint?"all":p[this.breakpoint]),this.mq.addEventListener("change",o(this.handleMediaQueryChange,50)),this.handleMediaQueryChange(this.mq),this.observer=new MutationObserver((()=>o(this.copyHeadingsToCells(),50))),this.observer.observe(this.element,{childList:!0,subtree:!0})}componentWillLoad(){if(d(this),this.copyHeadingsToCells(),this.sticky&&"none-scrollable"===this.breakpoint&&console.warn('[DUET WARNING]: sticky and breakpoint="none-scrollable" are incompatible. Scrollable takes precedence'),this.sticky){const t=y[this.stickyDistance];this.element.querySelectorAll("thead th").forEach((e=>e.style.top=`${t}px`))}}componentDidLoad(){this.observer&&this.observer.takeRecords()}disconnectedCallback(){this.observer.disconnect(),this.observer=null,this.mq.removeListener(this.handleMediaQueryChange),this.mq=null,this.matchesBreakpoint=!0}copyHeadingsToCells(){const t=this.element.querySelectorAll("thead th"),e=this.element.querySelectorAll("tbody tr"),a=Array.from(t).map((t=>t.textContent.trim()));e.forEach((t=>{t.querySelectorAll("td").forEach(((t,e)=>{a[e]&&(t.dataset.heading=a[e])}))}))}render(){return t(i,{class:{[`duet-table-${this.variation}`]:!0,"duet-table-flattened":!this.matchesBreakpoint,"duet-table-sticky":this.matchesBreakpoint&&this.sticky,"duet-table-scrollable":"none-scrollable"===this.breakpoint,"duet-m-0":"none"===this.margin,"duet-theme-turva":"turva"===this.theme}},t("slot",null))}get element(){return s(this)}};v.style='duet-table{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;margin-bottom:20px !important;display:block;font-variant-numeric:tabular-nums}duet-table table,duet-table thead,duet-table tbody,duet-table tfoot,duet-table th,duet-table td,duet-table tr{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}duet-table.duet-m-0{margin:0 !important}duet-table table{width:100%;font-family:"localtapiola-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";font-size:1rem;text-align:left;border-spacing:0;border-collapse:separate}duet-table.duet-theme-turva table{font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"}duet-table td{-webkit-hyphens:auto;hyphens:auto;color:#00294d}duet-table.duet-theme-turva td{color:#171c3a}duet-table th{font-weight:600;line-height:1.25;color:#657787;text-align:left}duet-table.duet-theme-turva th{color:#747475}duet-table tbody th{font-weight:600;color:#00294d}duet-table.duet-theme-turva tbody th{color:#171c3a}duet-table .duet-table-action-row td:last-child{justify-self:end;padding-right:20px !important;white-space:nowrap}.duet-table-flattened table,.duet-table-flattened thead,.duet-table-flattened tbody,.duet-table-flattened tfoot,.duet-table-flattened th,.duet-table-flattened td,.duet-table-flattened tr{display:block}.duet-table-flattened thead tr{position:absolute !important;top:0;width:1px !important;height:1px !important;padding:0 !important;overflow:hidden !important;clip:rect(1px, 1px, 1px, 1px) !important;border:0 !important}.duet-table-flattened td{line-height:1.25}.duet-table-flattened td:not(:last-child){margin-bottom:16px !important}.duet-table-flattened tbody td,.duet-table-flattened tbody th,.duet-table-flattened tfoot td{padding:0 !important;text-align:left !important}.duet-table-flattened tbody th{font-weight:600;line-height:1.25;color:#657787;text-align:left}.duet-table-flattened td[data-heading]::before{margin-bottom:4px !important;display:block;font-size:1rem;font-weight:600;color:#00294d;content:attr(data-heading)}.duet-table-flattened.duet-theme-turva td[data-heading]::before{color:#171c3a}.duet-table-sticky thead th{position:sticky;top:0;background:white}.duet-table-striped td,.duet-table-striped th{padding:20px !important}@media (max-width: 35.9375em){.duet-table-striped td,.duet-table-striped th{padding:20px 12px !important}}.duet-table-striped tbody th{background:white}.duet-table-striped.duet-table-sticky thead th{border-bottom:1px solid #e1e3e6}.duet-table-striped.duet-table-sticky.duet-theme-turva thead th{border-bottom-color:#e4e4e6}.duet-table-striped tbody:not(:first-of-type) th{padding-top:40px !important}.duet-table-striped tbody:only-of-type tr:nth-of-type(odd){background:rgba(0, 80, 128, 0.04)}.duet-table-striped.duet-theme-turva tbody:only-of-type tr:nth-of-type(odd){background:rgba(23, 28, 58, 0.04)}.duet-table-striped tbody:not(:only-of-type) tr:nth-of-type(even){background:rgba(0, 80, 128, 0.04)}.duet-table-striped.duet-theme-turva tbody:not(:only-of-type) tr:nth-of-type(even){background:rgba(23, 28, 58, 0.04)}.duet-table-striped tfoot td{border-top:1px solid #e1e3e6}.duet-table-striped.duet-theme-turva tfoot td{border-top-color:#e4e4e6}.duet-table-striped.duet-table-flattened tbody:not(:first-of-type) th{padding-top:20px !important}.duet-table-striped.duet-table-flattened tr{padding:20px !important}.duet-table-striped.duet-table-flattened tfoot td{border-top:0}.duet-table-striped.duet-table-flattened tfoot tr{border-top:1px solid #e1e3e6}.duet-table-striped.duet-table-flattened.duet-theme-turva tfoot tr{border-top-color:#e4e4e6}.duet-table-fixed th,.duet-table-minimal th,.duet-table-plain th{padding:16px !important;border-bottom:1px solid #657787}.duet-table-fixed th:first-child,.duet-table-minimal th:first-child,.duet-table-plain th:first-child{padding-left:0 !important}.duet-table-fixed th:last-child,.duet-table-minimal th:last-child,.duet-table-plain th:last-child{padding-right:0 !important}.duet-theme-turva.duet-table-fixed th,.duet-theme-turva.duet-table-minimal th,.duet-theme-turva.duet-table-plain th{border-bottom-color:#444445}.duet-table-fixed tbody th,.duet-table-minimal tbody th,.duet-table-plain tbody th{padding-top:40px !important;border-bottom-color:#e1e3e6}.duet-theme-turva.duet-table-fixed tbody th,.duet-theme-turva.duet-table-minimal tbody th,.duet-theme-turva.duet-table-plain tbody th{border-bottom-color:#e4e4e6}.duet-table-fixed td,.duet-table-minimal td,.duet-table-plain td{padding:16px !important}.duet-table-fixed td:first-child,.duet-table-minimal td:first-child,.duet-table-plain td:first-child{padding-left:0 !important}.duet-table-fixed td:last-child,.duet-table-minimal td:last-child,.duet-table-plain td:last-child{padding-right:0 !important}.duet-table-fixed tbody td,.duet-table-minimal tbody td,.duet-table-plain tbody td{border-bottom:1px solid #e1e3e6}.duet-theme-turva.duet-table-fixed tbody td,.duet-theme-turva.duet-table-minimal tbody td,.duet-theme-turva.duet-table-plain tbody td{border-bottom-color:#e4e4e6}.duet-table-flattened.duet-table-fixed tbody:first-of-type th,.duet-table-flattened.duet-table-minimal tbody:first-of-type th,.duet-table-flattened.duet-table-plain tbody:first-of-type th{padding-top:0 !important}.duet-table-flattened.duet-table-fixed td,.duet-table-flattened.duet-table-minimal td,.duet-table-flattened.duet-table-plain td,.duet-table-flattened.duet-table-fixed tbody th,.duet-table-flattened.duet-table-minimal tbody th,.duet-table-flattened.duet-table-plain tbody th{border-bottom:0}.duet-table-flattened.duet-table-fixed tr,.duet-table-flattened.duet-table-minimal tr,.duet-table-flattened.duet-table-plain tr{padding:20px 0 !important}.duet-table-flattened.duet-table-fixed tbody th,.duet-table-flattened.duet-table-minimal tbody th,.duet-table-flattened.duet-table-plain tbody th{padding-top:20px !important}.duet-table-flattened.duet-table-fixed tfoot td,.duet-table-flattened.duet-table-minimal tfoot td,.duet-table-flattened.duet-table-plain tfoot td{margin-bottom:4px !important}.duet-table-flattened.duet-table-fixed tbody:not(:only-of-type) tr:first-child,.duet-table-flattened.duet-table-minimal tbody:not(:only-of-type) tr:first-child,.duet-table-flattened.duet-table-plain tbody:not(:only-of-type) tr:first-child{border-bottom:0}.duet-table-plain.duet-table-flattened tbody tr{border-bottom:1px solid #e1e3e6}.duet-table-plain.duet-table-flattened.duet-theme-turva tbody tr{border-bottom-color:#e4e4e6}.duet-table-minimal tbody tr,.duet-table-minimal tbody tr td{vertical-align:top;border-bottom:0 none}.duet-table-minimal tbody tr:last-of-type,.duet-table-minimal tbody tr:last-of-type td{border-bottom:1px solid #e1e3e6}.duet-table-minimal.duet-table-flattened tbody tr,.duet-table-minimal.duet-table-flattened tbody tr td{border-bottom:0 none}.duet-table-minimal.duet-table-flattened tbody tr td[data-heading]::before{display:none}.duet-table-minimal.duet-table-flattened tfoot{border-top:1px solid #e1e3e6}.duet-table-minimal.duet-table-flattened.duet-theme-turva tfoot{border-top-color:#e4e4e6}.duet-table-fixed table{table-layout:fixed}.duet-table-fixed tbody tr,.duet-table-fixed tbody tr td,.duet-table-fixed tbody tr td:first-child{padding:4px !important;vertical-align:text-bottom;border-bottom:0 none}.duet-table-fixed thead{display:none}.duet-table-fixed tbody tr,.duet-table-fixed tbody tr td{border-bottom:0 none}.duet-table-fixed:not(.duet-table-flattened) tfoot{border-top:1px solid #e1e3e6}.duet-table-fixed:not(.duet-table-flattened).duet-theme-turva tfoot{border-top-color:#e4e4e6}.duet-table-scrollable{position:relative;width:100%;overflow-x:auto;background:linear-gradient(90deg, #fff 0%, rgba(255, 255, 255, 0)), linear-gradient(-90deg, #fff 0%, rgba(255, 255, 255, 0)) 100% 0, radial-gradient(farthest-side at 0% 50%, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0)), radial-gradient(farthest-side at 100% 50%, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0)) 100% 0%;background-repeat:no-repeat;background-attachment:local, local, scroll, scroll;background-size:100px 100%, 100px 100%, 12px 100%, 12px 100%}.duet-table-selected-column{background:rgba(0, 119, 179, 0.08)}.duet-theme-turva .duet-table-selected-column{background:rgba(68, 68, 69, 0.08)}.duet-table-sortable tbody tr td:first-child,.duet-table-sortable thead tr th:first-child{padding:20px}.duet-table-sortable:not(.duet-table-flattened) tfoot{border-top:1px solid #e1e3e6}.duet-table-sortable:not(.duet-table-flattened).duet-theme-turva tfoot{border-top-color:#e4e4e6}.duet-table-actions table{table-layout:auto}.duet-table-actions thead th:last-child{width:1px;white-space:nowrap}.duet-editable-table-table.duet-table-flattened tr{display:grid;grid-template-columns:repeat(2, 1fr);grid-auto-rows:auto;gap:10px}.duet-editable-table-table.duet-table-flattened tr.duet-table-action-row td:last-child::before{padding:0;content:""}.duet-editable-table-table.duet-table-flattened td{grid-column:1/2}.duet-editable-table-table.duet-table-flattened td:first-child{grid-row:1;grid-column:1}.duet-editable-table-table.duet-table-flattened td:last-child{grid-row:1;grid-column:2}';const x=[{type:"default",system_message:"unknown error",message:{fi:"Tapahtui tuntematon virhe, ole hyvä ja yritä uudelleen.",sv:"Ett okänt fel uppstod, försök igen.",en:"An unknown error occured, please try again."}},{type:"400",system_message:"Bad Request: The server could not understand the request due to invalid syntax.",message:{fi:"Tiedostoa ei hyväksytty.",sv:"Servern avvisade din fil.",en:"The server rejected your file."}},{type:"401",system_message:"Not Authenticated: The client must authenticate itself to get the requested response...",message:{fi:"Vain kirjautunut käyttäjä voi lähettää tiedostoja.",sv:"Du måste vara inloggad för att ladda upp filer.",en:"You need to be logged in to upload files."}},{type:"403",system_message:"No Access: The client does not have access rights to the content.",message:{fi:"Ei oikeuksia lähettää tiedostoja.",sv:"Du har inte rätt åtkomsträttigheter för att ladda upp filer.",en:"You do not have the correct access rights to upload files."}},{type:"413",system_message:"Payload too large",message:{fi:"Tiedosto oli liian vastaanotettavaksi.",sv:"Filen var för stor för servern att hantera.",en:"The file was to large for the server to handle."}},{type:"415",system_message:"Unsupported media type",message:{fi:"Tiedoston tyyppi oli väärä.",sv:"Servern avvisade filen eftersom den hade fel typ.",en:"The server rejected the file because it had the wrong type."}},{type:"429",system_message:"Too many request from same address",message:{fi:"Liian monta yritystä, ole hyvä ja yritä myöhemmin uudelleen.",sv:"Servern har fått många förfrågningar från dig, försök igen senare.",en:"The server has received to many request from you, please try again later."}},{type:"500",system_message:"Internal Server Error",message:{fi:"Palvelin ilmoitti tuntemattomasta virheestä ja lataus epäonnistui.",sv:"Servern rapporterade ett okänt fel och uppladdningen misslyckades.",en:"The server reported an unknown error and the upload failed."}},{type:"duet-upload-100",system_message:"File extension not allowed",message:{fi:"Tiedoston tyyppi ei ole sallittu.",sv:"Du kan inte ladda upp filer av den type.",en:"You cannot upload files with that extension."}},{type:"duet-upload-001",system_message:"File transfer failed",message:{fi:"Tiedoston lähetys keskeytyi, ole hyvä ja yritä uudelleen.",sv:"Din anslutning till servern avbröts, försök igen.",en:"Your connection to the server was interrupted, try again."}},{type:"duet-upload-101",system_message:"File mimetype not allowed",message:{fi:"Tiedoston tyyppi ei ole sallittu.",sv:"Du kan inte ladda upp filer av den typ.",en:"You cannot upload files of that type."}},{type:"duet-upload-201",system_message:"File is too large",message:{fi:"Tiedosto on liian iso.",sv:"Filen är större än tillåtet.",en:"The file is larger than permitted."}},{type:"duet-upload-202",system_message:"The combined size of all files is too large",message:{fi:"Tiedostojen yhteenlaskettu koko on liian iso.",sv:"Du har nått den maximala kombinerade filstorleken.",en:"You have reached the maximum combined filesize."}},{type:"duet-upload-301",system_message:"The maximum file limit has been reached",message:{fi:"Liitteiden maksimimäärä saavutettu.",sv:"Maximalt antal bilagor har uppnåtts.",en:"Maximum number of attachments reached."}}],k=(t,e)=>{let a={type:void 0,system_message:void 0,message:void 0};return a=(e=c(e)).filter((e=>e.type==t))[0],a||(a=e.filter((t=>"default"===t.type))[0]),a},w=(t,e)=>{const a=k(t,e),i=r(a.message);return""!==i&&i?i:a.system_message},z=({data:e,errorCodes:a})=>{const{item:i,error:s}=e,{name:d}=i,{type:l}=s;return t("span",{class:"duet-upload-item-error",role:"status"},t("duet-paragraph",{class:"duet-upload-item-name",color:"danger",margin:"none",weight:"semi-bold"},t("duet-icon",{margin:"none",size:"x-small",name:"messaging-attachment"}),t("duet-spacer",{size:"xx-small",direction:"horizontal"}),d),t("duet-paragraph",{class:"duet-upload-item-error-label",size:"small",margin:"none",color:"danger"},w(l,a)))},T=({progress:e,name:a})=>t("span",{class:"duet-upload-item-name"},t("duet-icon",{margin:"none",size:"x-small",name:"messaging-attachment"}),t("duet-spacer",{size:"xx-small",direction:"horizontal"}),a,t("br",null),t("duet-progress",{progress:Math.ceil(e),"aria-hidden":!0})),S=({name:e})=>t("span",{class:"duet-upload-item-name"},t("duet-icon",{margin:"none",size:"x-small",name:"messaging-attachment"}),t("duet-spacer",{size:"xx-small",direction:"horizontal"}),e),E=({data:e,showLinks:a})=>{const{item:i,size:s,uploaded:d,url:l,meta:o}=e,{name:n}=i,r=t("span",{class:"duet-upload-item-name"},t("duet-icon",{margin:"none",size:"x-small",name:"messaging-attachment"}),t("duet-spacer",{size:"xx-small",direction:"horizontal"}),n),u=t("span",{class:"duet-upload-item-size",style:{fontSize:"14px",fontWeight:"400"}},"(",((t,e=2)=>{if(0===t)return"0 Bytes";const a=e<0?0:e,i=Math.floor(Math.log(t)/Math.log(1024));return parseFloat((t/Math.pow(1024,i)).toFixed(a))+" "+["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"][i]})(s),")"),h=t("duet-paragraph",{color:"secondary",margin:"none",weight:"semi-bold"},d&&l&&a?t("duet-link",{url:l,external:!0},r):r,t("duet-spacer",{size:"xx-small",direction:"horizontal"}),u),b=o&&o.badges?t("span",null,t("duet-spacer",{size:"xx-small"}),o.badges.map((e=>t("duet-badge",{color:"primary"},e)))):void 0;return t("span",{class:"duet-upload-item-success"},t("div",null,h),b)},j=(t,e,a)=>{const{allowedMimetypes:i,allowedExtensions:s,maxBytes:d}=e;let l=!1,o=k("default",a);if(t){const{name:e,type:n,size:r}=t,u=((t,e)=>{if(!e||!t)return!0;const a=e.split(",");let i=!1;return a.forEach((e=>{const a=e.split("/"),s=t.split("/");a[0]!==s[0]||a[1]!==s[1]&&"*"!==a[1]||(i=!0)})),i})(n,i),h="all"===s||""===s||" "===s||void 0===s||((t,e)=>{if(!e)return!0;const a=t.split(".");return e.split(",").includes(a[a.length-1])})(e.toLowerCase(),s),b=((t,e)=>!e||!t||e>=t)(r,d);u||(o=k("duet-upload-101",a)),h||(o=k("duet-upload-100",a)),b||(o=k("duet-upload-201",a)),l=u&&h&&b}else l=!1;return{valid:l,errorMessage:l?void 0:r(o.message),errorSystem:l?void 0:o.system_message,errorType:l?void 0:o.type}},M=({payload:t,options:e,onFailure:a,onSuccess:i,onProgress:s})=>{const{type:d="POST",xhr:l,uri:o,argument:n=null,headers:r=null}=e;l.open(d,`${o}${n||""}`,!0);const{data:u,name:h}=t;return r&&Object.keys(r).forEach((t=>{l.setRequestHeader(t,r[t])})),"POST"===d&&(l.onreadystatechange=()=>{l.readyState===XMLHttpRequest.DONE&&l.status>=200&&l.status<300&&i(l,h,l.status),l.readyState===XMLHttpRequest.DONE&&l.status>=300&&l.status<999&&a(l,h,l.status)},s(h)),l.send(u),l},F=class{constructor(i){e(this,i),this.duetChange=a(this,"duetChange",3),this.duetBlur=a(this,"duetBlur",7),this.duetFocus=a(this,"duetFocus",7),this.duetReady=a(this,"duetReady",7),this.duetDone=a(this,"duetDone",3),this.duetState=a(this,"duetState",3),this.duetDelete=a(this,"duetDelete",3),this.duetCancel=a(this,"duetCancel",3),this.duetProgress=a(this,"duetProgress",3),this.duetUpload=a(this,"duetUpload",3),this.buttonId=m("DuetButton"),this.labelId=m("DuetLabel"),this.uploadId=m("DuetUpload"),this.filesInProgress=new Map,this.fileMaxReached=!1,this.bytesMaxReached=!1,this.internalStatusMessageLabel=void 0,this.DefaultGroups={inprogress:"inprogress",success:"success",pending:"pending",failure:"failure"},this.kick=o((()=>{this.tick=Date.now()}),30),this.listenForActionEvents=()=>{this.element.addEventListener("duetActionEvent",(t=>{const e=t.detail,{action:a,id:i,originalEvent:s}=e;switch(a){case"delete":this.onDelete(i,s);break;case"cancel":this.onCancel(i,s)}}))},this.verifyValidity=()=>{const{invalid:t,valid:e}=this.getFilesAsArray(),a=this.valid;this.valid=0===t.length&&0!==e.length,this.valid!==a&&this.duetState.emit({originalEvent:void 0,data:{valid:this.valid,from:"componentWillRender"},component:"duet-upload"})},this.getGroupFromItemData=t=>t.valid&&100===t.progress?this.DefaultGroups.success:t.progress>0&&100!==t.progress?this.DefaultGroups.inprogress:t.valid?t.pending?this.DefaultGroups.pending:t.group?t.group:"none":this.DefaultGroups.failure,this.getItemHTMLFromItemData=(e,a)=>a===this.DefaultGroups.success?t(E,{data:e,showLinks:this.showLinks}):a===this.DefaultGroups.inprogress?t(T,{progress:e.progress,name:e.item.name}):a===this.DefaultGroups.pending?t(S,{name:e.item.name}):a===this.DefaultGroups.failure?t(z,{data:e,errorCodes:this.errorCodes}):e.group?e.html:"none",this.genHashName=()=>Date.now().toString(36)+Math.random(),this.updateValueInMap=(t,e,a,i=!0)=>{try{const i=this.files.get(t);i[e]=a,this.files.set(t,i)}catch(s){}i&&this.kick()},this.updateProgress=(t,e)=>{t.lengthComputable?(a=>{this.updateValueInMap(e,"progress",a),this.onProgress(e,a,t)})(t.loaded/t.total*100):console.log("cant read progress")},this.trackProgress=(t,e=!1)=>{e?this.filesInProgress.delete(t):this.filesInProgress.set(t,"inprogress"),0===this.filesInProgress.size&&this.onDone()},this.getFilesAsArray=()=>{const t=[],e=[];return this.files.forEach((a=>{a.valid&&!a.deleted?t.push(a):a.valid||a.deleted||e.push(a)})),{valid:t,invalid:e}},this.resetFormFields=()=>{this.nativeInput.value=""},this.startUpload=async(t,e)=>{this.metaData=e,this.nativeInput.click(),this.onUpload(t,e),t.stopPropagation(),t.preventDefault()},this.transferComplete=t=>{this.updateValueInMap(t,"progress",100,!1),this.trackProgress(t,!0)},this.transferDone=(t,e,a)=>{this.updateValueInMap(e,"status",a,!1),this.updateValueInMap(e,"uploaded",!0,!1);try{const a=JSON.parse(t.response);this.updateValueInMap(e,"url",a.url)}catch(i){this.updateValueInMap(e,"url",null),console.error("Server did not respond with expected response {url: string}")}},this.transferDoneWithFailure=(t,e,a)=>{try{const{error:a}=JSON.parse(t.response);this.updateValueInMap(e,"error",{message:a.message,type:a.type},!1)}catch(i){console.error("Server did not respond with expected response error:{message: string, type: int}"),this.updateValueInMap(e,"error",{type:a},!1)}this.updateValueInMap(e,"valid",!1,!0)},this.transferFailed=t=>{this.updateValueInMap(t,"error",w("duet-upload-001",this.errorCodes))},this.transferCanceled=t=>{this.files.delete(t),this.validateTotals(t),this.kick()},this.validateTotals=t=>{const e=((t,e)=>{let a=0;return!!(e&&(this.files.forEach((t=>{t.valid&&t.size&&(a+=t.size)})),a>e))})(0,this.maxBytesTotal),a=((t,e)=>{let a=0;return!!(e&&(this.files.forEach((t=>{t.valid&&a++})),a>e))})(0,this.maxFiles);return e&&t&&this.updateValueInMap(t,"error",w("duet-upload-202",this.errorCodes),!1),a&&t&&this.updateValueInMap(t,"error",w("duet-upload-301",this.errorCodes),!1),this.bytesMaxReached=e,this.fileMaxReached=a,{bytesMaxReached:e,fileMaxReached:a}},this.uploadFile=async(t,e=!1,a)=>{!e&&this.deferUpload?(this.updateValueInMap(t.item.name,"pending",!0,!1),this.updateValueInMap(t.item.name,"group","pending",!0)):e&&(this.updateValueInMap(t.item.name,"pending",!1,!1),this.updateValueInMap(t.item.name,"group",void 0,!0));try{if(!this.deferUpload||e){const e=new FormData;e.append("file",t.item),a&&e.append("key",a),e.append("uid",t.uid),e.append("name",t.item.name),e.append("metadata",JSON.stringify({uid:t.uid,url:this.uri,size:t.item.size,meta:t.meta})),t.xhr=await this.makeXHRPostRequest(e)}}catch(i){this.updateValueInMap(t.item.name,"valid",!1,!1)}},this.uploadPendingFiles=()=>{for(const[t,e]of this.files.entries())"pending"===e.group&&!0===e.pending&&this.uploadFile(e,!0,t)},this.getItemFromUID=t=>{for(const[e,a]of this.files.entries())if(a.uid===t)return{value:a,key:e};return null},this.onDelete=(t,e)=>{const a=this.getItemFromUID(t).key,i=this.files.get(a);this.files.delete(a),this.validateTotals(),this.kick(),this.duetDelete.emit({originalEvent:e,data:{deletion:i},component:"duet-upload"}),this.external||i.pending||this.makeXHRDeleteRequest(i),this.resetFormFields()},this.onCancel=(t,e)=>{const a=this.getItemFromUID(t).key,i=this.files.get(a);if(this.files.delete(a),this.external)this.kick();else{const{xhr:t}=i;t&&t.abort()}this.resetFormFields(),this.duetCancel.emit({originalEvent:e,data:{cancelled:i},component:"duet-upload"})},this.onUpload=(t,e)=>{this.duetUpload.emit({originalEvent:t,metaData:e,component:"duet-upload"})},this.onBlur=t=>{this.duetBlur.emit({originalEvent:t,component:"duet-upload"})},this.onProgress=(t,e,a)=>{this.duetChange.emit({originalEvent:a,data:{key:t,percentComplete:e},component:"duet-upload"})},this.onFocus=t=>{this.duetFocus.emit({originalEvent:t,component:"duet-upload"})},this.onReady=()=>{this.duetReady.emit({component:"duet-upload"})},this.onDone=()=>{this.duetDone.emit({component:"duet-upload",data:{files:this.files}})},this.filterMap=()=>{const t=[...this.files.values()],e=[],a=[],i=[],s=[];return t.forEach((t=>{const d=this.getGroupFromItemData(t),l=this.getItemHTMLFromItemData(t,d);d===this.DefaultGroups.success?s.push({uid:t.uid,item:l,group:d}):d===this.DefaultGroups.inprogress?e.push({uid:t.uid,item:l,group:d}):d===this.DefaultGroups.pending?i.push({uid:t.uid,item:l,group:d}):d===this.DefaultGroups.failure?a.push({uid:t.uid,item:l,group:d}):t.group&&e.push({uid:t.uid,item:l,group:t.group})})),{pending:i,failure:a,success:s,inprogress:e}},this.getColumns=t=>[{sort_order:1,direction:-1,index:0,key:t.id,label:t.label}],this.getActions=t=>this.actions.filter((e=>e.map.includes(t))),this.renderEditableTableGroups=()=>{const e=this.filterMap();return this.groups.map((a=>{const i=e[a.id];if(null==i?void 0:i.length)return t("duet-table",{variation:"plain",breakpoint:"none",role:"log",margin:this.hideGroups?"none":"auto"},t("table",{class:"duet-upload-editable-table"},t("thead",{class:"duet-upload-editable-table-header"},t("tr",null,t("th",{class:{"duet-upload-editable-table-header-hidden":this.hideGroups}},this.hideGroups?t("duet-visually-hidden",null,r(a.label)):r(a.label)))),t("tbody",null,t("tr",null,t("td",{class:"duet-upload-editable-table-data"},t("duet-editable-table",{breakpoint:"none",variation:"plain",groupId:a.id,columns:this.getColumns(a),actions:this.getActions(a.id),margin:"none",rows:i}))))))}))},this.tick=Date.now(),this.accessibleActiveDescendant=void 0,this.accessibleDescribedBy=void 0,this.accessibleControls=void 0,this.accessibleOwns=void 0,this.external=!1,this.middleware=null,this.deferUpload=!1,this.hideButton=!1,this.actions=[{icon:"action-delete",color:"color-danger",size:"x-small",background:"gray-lightest",name:"delete",map:["success","failure"],label:{fi:"Poista tiedosto",en:"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=void 0,this.showLinks=!1,this.caption=void 0,this.statusLabelDefaults={fi:{inProgress:"Lähetetään {filesUploaded} lähetettävästä {filesTotal} tiedostosta",inProgressWithErrors:"Lähetetään {filesInProgress} tiedostoa, lähetetty {filesUploaded} lähetettävästä {filesTotal} tiedostosta, {filesWithErrors} tiedostossa on virheitä",done:"Kaikki {filesTotal} tiedostoa lähetetty onnistuneesti",doneWithErrors:"Lähetys valmis, {filesUploaded} tiedostoa on lähetetty onnistuneesti, {filesWithErrors} tiedostossa oli virheitä",files:"tiedostot",file:"tiedosto"},sv:{inProgress:"Adding {filesUploaded} of {filesTotal}",inProgressWithErrors:"Laddar upp {filesInProgress}, {filesUploaded} uppladdad av {filesTotal}, {filesWithErrors} misslyckades",done:"Alla {filesTotal} har lagts till",doneWithErrors:"Handling slutförd, {filesUploaded} har lagts till, {filesWithErrors} misslyckades",files:"filer",file:"fil"},en:{inProgress:"Adding {filesUploaded} of {filesTotal}",inProgressWithErrors:"Uploading {filesInProgress}, {filesUploaded} uploaded of {filesTotal}, {filesWithErrors} failed",done:"All {filesTotal} added successfully",doneWithErrors:"Action completed, {filesUploaded} has been added successfully, {filesWithErrors} had errors",files:"File",file:"file"}},this.statusMessageLabel=r(this.statusLabelDefaults),this.buttonLabelDefaults={fi:"Lisää liite",sv:"Lägg till en bilaga",en:"Add an attachment"},this.buttonLabel=r(this.buttonLabelDefaults),this.accessibleButtonLabel=void 0,this.theme="",this.disabled=!1,this.identifier=void 0,this.margin="auto",this.required=!1,this.alignment="middle",this.hideGroups=!1,this.files=new Map,this.valid=!this.required,this.labelDefaults={fi:"Lisää liite",sv:"Lägg till en bilaga",en:"Add attachments"},this.label=r(this.labelDefaults),this.descriptionDefaults={en:"You may attach the following filetypes: {filetypes} - as well as the most common video files. You can upload {maxbytestotal} of files at a time, and add up to {maxfiles} attachments at a time each no larger than {maxbytes}.",sv:"Du kan bifoga följande filtyper: {filetypes} - samt de vanligaste videofilerna. Du kan ladda upp {maxbytestotal} av filer åt gången, och lägga till upp till {maxfiles} bilagor åt gången varje inte större än {maxbytes}.",fi:"Voit liittää seuraavat tiedostotyypit: {filetypes} - sekä yleisimmät videotiedostot. Voit lähettää {maxbytestotal} tiedostoa kerrallaan, ja lisätä enintään {maxfiles} liitettä kerrallaan, jokainen enintään {maxbytes} kokoisena."},this.description=r(this.descriptionDefaults),this.fileListEmptyDefaults={fi:"Ei vielä lisättyjä tiedostoja.",sv:"Inga filer har lagts till ännu.",en:"No files added yet."},this.fileListEmpty=r(this.fileListEmptyDefaults),this.error="",this.errorCodes=x,this.name=void 0,this.maxBytes=2e8,this.maxBytesTotal=void 0,this.maxFiles=99,this.allowedExtensions="all",this.allowedMimetypes="*",this.multiple=!0,this.limitSelection=!1,this.value=void 0,this.groups=[{id:this.DefaultGroups.pending,label:{en:"Files to upload",sv:"Filer att ladda",fi:"Ladattavat tiedostot"}},{id:this.DefaultGroups.success,label:{fi:"Valmiit tiedostot",sv:"Files success",en:"Files success"}},{id:this.DefaultGroups.failure,label:{fi:"Tiedostot, joissa on virheitä",sv:"Filer med fel",en:"Files with errors"}},{id:this.DefaultGroups.inprogress,label:{fi:"Kesken olevat tiedostot",sv:"Filer inprogress",en:"Files inprogress"}}]}watchValidHandler(t,e){t!==e&&this.kick()}componentWillLoad(){this.internalStatusMessageLabel="string"==typeof this.statusMessageLabel?u(this.groups):this.statusMessageLabel,d(this),this.listenForActionEvents(),this.onReady()}componentWillRender(){this.verifyValidity()}async setFocus(t){this.nativeInput&&this.nativeInput.focus(t)}async upload(t){await this.setFocus(),this.metaData=t,this.nativeInput.click()}async uploadPending(){this.uploadPendingFiles()}async refresh(){this.kick(),await this.setFocus()}async getFiles(){return!(!this.files||0===this.files.size)&&this.getFilesAsArray()}async updateValue(t,e,a){this.updateValueInMap(t,e,a)}render(){const e=this.identifier||this.uploadId,a=Math.round((this.maxBytesTotal?this.maxBytesTotal:this.maxBytes*this.maxFiles)/1024/1024),s=Math.round(this.maxBytes/1024/1024);let d=this.description.replace(/{maxfiles}/g,this.maxFiles.toString());return d=d.replace(/{maxbytes}/g,`${s.toString()} MB`),d=d.replace(/{maxbytestotal}/g,`${a.toString()} MB`),d=d.replace(/{filetypes}/g,this.allowedExtensions.split(",").join(", ")),t(i,{class:{"duet-m-0":"none"===this.margin}},t("duet-fieldset",{label:this.label,caption:d},t("slot",{name:"header"}),!this.files.size&&t("duet-label",{part:this.identifier?`${this.identifier}-empty-state`:"duet-upload-empty-state",theme:"turva"===this.theme?"turva":"default",size:"small",class:{"duet-upload-filelist-empty":!this.files.size,"duet-upload-filelist":!0,"duet-upload-filelist-filled":this.files.size},id:this.labelId,for:e},t("span",{class:{"duet-upload-filelist-empty-label":!this.files.size}},this.fileListEmpty)),!!this.files.size&&t("slot",{name:"fileheader"}),!!this.files.size&&t("duet-upload-aria-status",{invalid:this.getFilesAsArray().invalid.length,valid:this.getFilesAsArray().valid.length,inprogress:this.filesInProgress.size,total:this.files.size,statusMessageLabel:this.internalStatusMessageLabel}),!!this.files.size&&this.renderEditableTableGroups(),!!this.files.size&&t("slot",{name:"filefooter"}),t("duet-spacer",{size:"large"}),!this.hideButton&&t("duet-button",{id:this.buttonId,onClick:this.startUpload,"accessible-controls":e,disabled:this.fileMaxReached,"accessible-label":this.accessibleButtonLabel,"accessible-owns":e,size:"small",variation:"secondary",fixed:!0,icon:"action-add-circle",part:this.identifier?`${this.identifier}-button-upload`:"duet-upload-button-upload"},this.buttonLabel),t("duet-spacer",{size:"medium"}),(this.fileMaxReached||this.bytesMaxReached)&&t("duet-alert",{part:this.identifier?`${this.identifier}-error-notification`:"duet-upload-error-notification"},this.fileMaxReached&&w("duet-upload-301",this.errorCodes),this.bytesMaxReached&&w("duet-upload-202",this.errorCodes)),t("duet-spacer",{size:"medium"}),t("duet-visually-hidden",null,t("input",{ref:t=>{this.nativeInput=t},accept:this.limitSelection?`${this.allowedMimetypes},${this.allowedExtensions}`:void 0,onBlur:this.onBlur,onFocus:this.onFocus,onChange:t=>this.onChange(t),type:"file",class:{"duet-upload":!0},disabled:this.disabled,"aria-hidden":"true",required:this.required,name:this.name,id:this.identifier,multiple:this.multiple}))))}makeXHRPostRequest(t){const e=new XMLHttpRequest,a=t.get("name");e.upload.addEventListener("progress",(t=>{this.updateProgress(t,a)})),e.upload.addEventListener("load",(()=>{this.transferComplete(a)})),e.upload.addEventListener("error",(()=>{this.transferFailed(a)})),e.upload.addEventListener("abort",(()=>{this.transferCanceled(a)}));let i={payload:{data:t,name:a},options:{type:"POST",uri:this.uri,xhr:e,argument:null,headers:void 0},onFailure:this.transferDoneWithFailure,onSuccess:this.transferDone,onProgress:this.trackProgress};return this.middleware&&(i=this.middleware(i)),M(i)}makeXHRDeleteRequest(t){const{uid:e,item:a}=t,i=new XMLHttpRequest;let s={payload:{data:null,name},options:{type:"DELETE",xhr:i,uri:this.uri,argument:`?key=${e}&name=${a.name}`,headers:{"x-fileuid":e,"x-filename":a.name}},onFailure:this.transferDoneWithFailure,onSuccess:this.transferDone,onProgress:this.trackProgress};return this.middleware&&(s=this.middleware(s)),M(s)}async onChange(t){var e;const a=Array.from(null===(e=this.nativeInput)||void 0===e?void 0:e.files);if(a)for(const i of a){const{valid:t,errorMessage:e,errorType:a,errorSystem:s}=j(i,{maxBytes:this.maxBytes,allowedExtensions:this.allowedExtensions,allowedMimetypes:this.allowedMimetypes},this.errorCodes),d={uid:this.genHashName(),item:i,size:i.size,meta:this.metaData,uploaded:!1,valid:t,error:{type:t?void 0:a,message:t?void 0:e,system_message:t?void 0:s},progress:0,deleted:!1,xhr:!1,url:!1};this.files.set(i.name,d);const{bytesMaxReached:l,fileMaxReached:o}=this.validateTotals(i.name);l||o?this.updateValueInMap(i.name,"valid",!1,!1):t&&!this.external?await this.uploadFile(d):t&&this.external?(this.updateValueInMap(d.item.name,"pending",!0,!1),this.updateValueInMap(d.item.name,"group","pending",!0)):t||this.updateValueInMap(i.name,"valid",!1,!0),this.kick()}this.resetFormFields(),this.metaData=void 0,this.duetChange.emit({originalEvent:t,data:{files:this.files},component:"duet-upload"})}get element(){return s(this)}static get watchers(){return{valid:["watchValidHandler"]}}};F.style="*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}::slotted([slot=header]){margin-bottom:16px}::slotted([slot=fileheader]){margin:16px 0 0 0}::slotted([slot=filefooter]){margin-top:16px}.duet-upload{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.duet-upload-item-size{font-size:0.75rem;font-weight:400}.duet-upload-filelist{margin-bottom:25px}.duet-upload-filelist-empty{display:flex;align-items:center;justify-content:center;width:100%;height:75px;margin:0 auto;font-size:1rem;font-weight:400;background-color:#f5f8fa}.duet-upload-filelist-empty-label{font-size:1rem;font-weight:400}.duet-upload-editable-table-header-hidden{display:none}.duet-upload-editable-table tbody .duet-upload-editable-table-data{padding:0 !important;border:0}.duet-upload-editable-table duet-editable-table tfoot,.duet-upload-editable-table duet-editable-table thead{display:none}.duet-upload-editable-table duet-editable-table .duet-editable-table-content{padding-right:0 !important;padding-left:0 !important}.duet-upload-editable-table duet-editable-table duet-table .duet-table-action-row td{padding:1rem 0 !important}.duet-upload-editable-table duet-editable-table duet-table .duet-table-action-row td:last-child{padding-right:0 !important}.duet-upload-editable-table duet-editable-table .duet-editable-table-row-inprogress,.duet-upload-editable-table duet-editable-table .duet-editable-table-row-pending{position:relative}.duet-upload-editable-table duet-editable-table .duet-editable-table-row-inprogress duet-progress,.duet-upload-editable-table duet-editable-table .duet-editable-table-row-pending duet-progress{position:absolute;bottom:0;width:100%}.duet-upload-editable-table duet-editable-table .duet-editable-table-row-inprogress duet-action-button::part(button),.duet-upload-editable-table duet-editable-table .duet-editable-table-row-pending duet-action-button::part(button){border:0}.duet-upload-editable-table .duet-upload-item-name duet-icon{position:relative;top:2px}duet-paragraph::part(duet-paragraph){word-break:break-word}";export{g as duet_editable_table,v as duet_table,F as duet_upload}
4
+ import{h as t,r as e,c as a,H as i,g as s}from"./p-d75c51a6.js";import{i as d}from"./p-4ebf1618.js";import{f as l,d as o}from"./p-0b3f675e.js";import{i as n}from"./p-54f35a79.js";import{g as r,s as u}from"./p-ede854e1.js";import{q as h,s as b}from"./p-9052b6f5.js";import{b as p}from"./p-79a9746e.js";import{c as m}from"./p-c1325e35.js";import{p as c}from"./p-5a9d75e1.js";const f=({data:e,groupId:a,alignment:i})=>{const s=`duet-editable-table duet-editable-table-content-${a}`;return"string"==typeof e?t("td",{innerHTML:e,class:s,part:`${a}content`,style:{verticalAlign:i}}):t("td",{class:s,part:`${a}content`,style:{verticalAlign:i}},e)},g=class{constructor(t){e(this,t),this.duetTableToggle=a(this,"duetTableToggle",7),this.duetMenuClick=a(this,"duetMenuClick",7),this.sortableDefaultLabel={fi:"Järjestä",en:"Click to sort",sv:"Klicka för att sortera"},this.actionColumnLabel={en:"Actions for rows",fi:"Toiminnot rivillä",sv:"Åtgärder för rader"},this.toggleColumn=(t,e)=>{e.preventDefault();const{sort_order:a,direction:i,index:s,key:d}=t;this.duetTableToggle.emit({sort_order:a,index:s,direction:i,key:d,component:"duet-editable-table",originalEvent:e})},this.handleKeyDown=(t,e)=>{n(e)&&this.toggleColumn(t,e)},this.margin="auto",this.variation="striped",this.sticky=!1,this.stickyDistance="with-links",this.breakpoint="small",this.actions=void 0,this.columns=void 0,this.rows=void 0,this.sortable=!1,this.groupId="",this.theme="",this.accessibleRole=void 0}componentWillLoad(){d(this)}createLabel(e){const{sort_order:a,direction:i,index:s,label:d}=e,l=r(d);return this.sortable?t("span",{class:"duet-table-label","data-index":s},t("duet-button",{size:"small",icon:a&&1===i?"action-arrow-down-small":a&&-1===i?"action-arrow-up-small":"action-subtract-small","icon-size":"medium-small","accessible-label":r(this.sortableDefaultLabel),variation:"plain",margin:"none","icon-right":!0,onClick:t=>this.toggleColumn(e,t),onKeyDown:t=>this.handleKeyDown(e,t)},l)):l}getSortedColumns(){return[...this.columns].sort(l(["index"]))}getRowSortOrder(){return[...this.columns].sort(l(["sort_order"])).filter((t=>t.sort_order)).map((t=>-1===t.direction?`-${t.key}`:t.key))}renderTableHeader(){if(!this.columns)return;const e=this.getSortedColumns();return t("tr",{class:{"duet-table-action-header":!!this.actions}},e.map((e=>{if(!1!==e.display){const a=this.createLabel(e);return""!==a?t("th",{scope:"col"},a):t("td",null)}})),this.actions&&t("th",{scope:"col",class:"duet-table-action-header-heading"},this.actions&&t("duet-visually-hidden",null,r(this.actionColumnLabel))))}renderActions(e,a){if(this.actions)return t("td",{class:"duet-text-right"},this.actions.map((i=>t("duet-action-button",{actionMeta:Object.assign({},(null==e?void 0:e.meta)||{},{index:a}),actionId:(null==e?void 0:e.uid)||(null==e?void 0:e.id)||null,actionName:i.name,theme:this.theme,iconName:i.icon,iconColor:i.color,iconSize:i.size,background:i.background}))))}renderTableBody(){const e=this.getSortedColumns(),a=this.getRowSortOrder();return[...this.rows].sort(l(a)).map(((a,i)=>t("tr",{class:{"duet-table-action-row":!!this.actions,"duet-editable-table-row":!0,[`duet-editable-table-row-${this.groupId}`]:!0},"data-meta":JSON.stringify(a.meta)},e.map((e=>{if(!1!==e.display)return t(f,{data:a[e.key]?a[e.key]:a.item,groupId:this.groupId})})),this.actions&&this.renderActions(a,i))))}render(){return t(i,{class:{[`duet-editable-table-${this.variation}`]:!0,"duet-editable-table":!0,[`duet-editable-table-${this.theme}`]:!0,"duet-editable-table-scrollable":"none-scrollable"===this.breakpoint,"duet-editable-table-sortable":this.sortable,"duet-editable-table-actions":!!this.actions,"duet-m-0":"none"===this.margin,"duet-theme-turva":"turva"===this.theme}},t("duet-table",{class:"duet-editable-table-table",sticky:this.sticky,stickyDistance:this.stickyDistance,margin:this.margin,theme:this.theme,variation:this.variation,breakpoint:this.breakpoint},t("table",{role:this.accessibleRole},t("caption",null,t("slot",{name:"tcaption"})),t("thead",null,t("tr",null,t("td",{class:"duet-editable-table-actions-menu",colSpan:99},t("slot",{name:"thead-first"}))),this.renderTableHeader(),t("tr",null,t("td",{class:"duet-editable-table-actions-menu",colSpan:99},t("slot",{name:"thead-last"})))),t("tbody",null,this.renderTableBody()),t("tfoot",null,t("tr",null,t("th",{class:"duet-editable-table-footer-menu",colSpan:99},t("slot",{name:"tfoot"})))))))}get element(){return s(this)}};g.style=".sc-duet-editable-table-h{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.duet-editable-table-actions-menu.sc-duet-editable-table{position:relative;padding:0 !important;margin:0}.duet-editable-table-actions-menu-button.sc-duet-editable-table{position:relative;right:-16px;float:right;padding:0}.duet-editable-table-actions-menu-icon.sc-duet-editable-table .duet-icon.sc-duet-editable-table{max-width:16px;max-height:16px}.duet-editable-table-row.duet-table-action-row.sc-duet-editable-table .duet-text-right.sc-duet-editable-table{text-align:right}.duet-editable-table-header.sc-duet-editable-table tr.sc-duet-editable-table .duet-editable-table-header-hidden.sc-duet-editable-table{padding:0 !important;font-size:0;border-bottom:0}";const y={none:0,"with-links":16*parseFloat(h),"without-links":16*parseFloat(b)},v=class{constructor(t){e(this,t),this.handleMediaQueryChange=t=>{this.matchesBreakpoint=t.matches},this.matchesBreakpoint=!0,this.theme=void 0,this.margin="auto",this.variation="striped",this.sticky=!1,this.stickyDistance="with-links",this.breakpoint="small"}connectedCallback(){this.mq=matchMedia("none"===this.breakpoint||"none-scrollable"===this.breakpoint?"all":p[this.breakpoint]),this.mq.addEventListener("change",o(this.handleMediaQueryChange,50)),this.handleMediaQueryChange(this.mq),this.observer=new MutationObserver((()=>o(this.copyHeadingsToCells(),50))),this.observer.observe(this.element,{childList:!0,subtree:!0})}componentWillLoad(){if(d(this),this.copyHeadingsToCells(),this.sticky&&"none-scrollable"===this.breakpoint&&console.warn('[DUET WARNING]: sticky and breakpoint="none-scrollable" are incompatible. Scrollable takes precedence'),this.sticky){const t=y[this.stickyDistance];this.element.querySelectorAll("thead th").forEach((e=>e.style.top=`${t}px`))}}componentDidLoad(){this.observer&&this.observer.takeRecords()}disconnectedCallback(){this.observer.disconnect(),this.observer=null,this.mq.removeListener(this.handleMediaQueryChange),this.mq=null,this.matchesBreakpoint=!0}copyHeadingsToCells(){const t=this.element.querySelectorAll("thead th"),e=this.element.querySelectorAll("tbody tr"),a=Array.from(t).map((t=>t.textContent.trim()));e.forEach((t=>{t.querySelectorAll("td").forEach(((t,e)=>{a[e]&&(t.dataset.heading=a[e])}))}))}render(){return t(i,{class:{[`duet-table-${this.variation}`]:!0,"duet-table-flattened":!this.matchesBreakpoint,"duet-table-sticky":this.matchesBreakpoint&&this.sticky,"duet-table-scrollable":"none-scrollable"===this.breakpoint,"duet-m-0":"none"===this.margin,"duet-theme-turva":"turva"===this.theme}},t("slot",null))}get element(){return s(this)}};v.style='duet-table{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;margin-bottom:20px !important;display:block;font-variant-numeric:tabular-nums}duet-table table,duet-table thead,duet-table tbody,duet-table tfoot,duet-table th,duet-table td,duet-table tr{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}duet-table.duet-m-0{margin:0 !important}duet-table table{width:100%;font-family:"localtapiola-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";font-size:1rem;text-align:left;border-spacing:0;border-collapse:separate}duet-table.duet-theme-turva table{font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"}duet-table td{-webkit-hyphens:auto;hyphens:auto;color:#00294d}duet-table.duet-theme-turva td{color:#171c3a}duet-table th{font-weight:600;line-height:1.25;color:#657787;text-align:left}duet-table.duet-theme-turva th{color:#747475}duet-table tbody th{font-weight:600;color:#00294d}duet-table.duet-theme-turva tbody th{color:#171c3a}duet-table .duet-table-action-row td:last-child{justify-self:end;padding-right:20px !important;white-space:nowrap}.duet-table-flattened table,.duet-table-flattened thead,.duet-table-flattened tbody,.duet-table-flattened tfoot,.duet-table-flattened th,.duet-table-flattened td,.duet-table-flattened tr{display:block}.duet-table-flattened thead tr{position:absolute !important;top:0;width:1px !important;height:1px !important;padding:0 !important;overflow:hidden !important;clip:rect(1px, 1px, 1px, 1px) !important;border:0 !important}.duet-table-flattened td{line-height:1.25}.duet-table-flattened td:not(:last-child){margin-bottom:16px !important}.duet-table-flattened tbody td,.duet-table-flattened tbody th,.duet-table-flattened tfoot td{padding:0 !important;text-align:left !important}.duet-table-flattened tbody th{font-weight:600;line-height:1.25;color:#657787;text-align:left}.duet-table-flattened td[data-heading]::before{margin-bottom:4px !important;display:block;font-size:1rem;font-weight:600;color:#00294d;content:attr(data-heading)}.duet-table-flattened.duet-theme-turva td[data-heading]::before{color:#171c3a}.duet-table-sticky thead th{position:sticky;top:0;background:white}.duet-table-striped td,.duet-table-striped th{padding:20px !important}@media (max-width: 35.9375em){.duet-table-striped td,.duet-table-striped th{padding:20px 12px !important}}.duet-table-striped tbody th{background:white}.duet-table-striped.duet-table-sticky thead th{border-bottom:1px solid #e1e3e6}.duet-table-striped.duet-table-sticky.duet-theme-turva thead th{border-bottom-color:#e4e4e6}.duet-table-striped tbody:not(:first-of-type) th{padding-top:40px !important}.duet-table-striped tbody:only-of-type tr:nth-of-type(odd){background:rgba(0, 80, 128, 0.04)}.duet-table-striped.duet-theme-turva tbody:only-of-type tr:nth-of-type(odd){background:rgba(23, 28, 58, 0.04)}.duet-table-striped tbody:not(:only-of-type) tr:nth-of-type(even){background:rgba(0, 80, 128, 0.04)}.duet-table-striped.duet-theme-turva tbody:not(:only-of-type) tr:nth-of-type(even){background:rgba(23, 28, 58, 0.04)}.duet-table-striped tfoot td{border-top:1px solid #e1e3e6}.duet-table-striped.duet-theme-turva tfoot td{border-top-color:#e4e4e6}.duet-table-striped.duet-table-flattened tbody:not(:first-of-type) th{padding-top:20px !important}.duet-table-striped.duet-table-flattened tr{padding:20px !important}.duet-table-striped.duet-table-flattened tfoot td{border-top:0}.duet-table-striped.duet-table-flattened tfoot tr{border-top:1px solid #e1e3e6}.duet-table-striped.duet-table-flattened.duet-theme-turva tfoot tr{border-top-color:#e4e4e6}.duet-table-fixed th,.duet-table-minimal th,.duet-table-plain th{padding:16px !important;border-bottom:1px solid #657787}.duet-table-fixed th:first-child,.duet-table-minimal th:first-child,.duet-table-plain th:first-child{padding-left:0 !important}.duet-table-fixed th:last-child,.duet-table-minimal th:last-child,.duet-table-plain th:last-child{padding-right:0 !important}.duet-theme-turva.duet-table-fixed th,.duet-theme-turva.duet-table-minimal th,.duet-theme-turva.duet-table-plain th{border-bottom-color:#444445}.duet-table-fixed tbody th,.duet-table-minimal tbody th,.duet-table-plain tbody th{padding-top:40px !important;border-bottom-color:#e1e3e6}.duet-theme-turva.duet-table-fixed tbody th,.duet-theme-turva.duet-table-minimal tbody th,.duet-theme-turva.duet-table-plain tbody th{border-bottom-color:#e4e4e6}.duet-table-fixed td,.duet-table-minimal td,.duet-table-plain td{padding:16px !important}.duet-table-fixed td:first-child,.duet-table-minimal td:first-child,.duet-table-plain td:first-child{padding-left:0 !important}.duet-table-fixed td:last-child,.duet-table-minimal td:last-child,.duet-table-plain td:last-child{padding-right:0 !important}.duet-table-fixed tbody td,.duet-table-minimal tbody td,.duet-table-plain tbody td{border-bottom:1px solid #e1e3e6}.duet-theme-turva.duet-table-fixed tbody td,.duet-theme-turva.duet-table-minimal tbody td,.duet-theme-turva.duet-table-plain tbody td{border-bottom-color:#e4e4e6}.duet-table-flattened.duet-table-fixed tbody:first-of-type th,.duet-table-flattened.duet-table-minimal tbody:first-of-type th,.duet-table-flattened.duet-table-plain tbody:first-of-type th{padding-top:0 !important}.duet-table-flattened.duet-table-fixed td,.duet-table-flattened.duet-table-minimal td,.duet-table-flattened.duet-table-plain td,.duet-table-flattened.duet-table-fixed tbody th,.duet-table-flattened.duet-table-minimal tbody th,.duet-table-flattened.duet-table-plain tbody th{border-bottom:0}.duet-table-flattened.duet-table-fixed tr,.duet-table-flattened.duet-table-minimal tr,.duet-table-flattened.duet-table-plain tr{padding:20px 0 !important}.duet-table-flattened.duet-table-fixed tbody th,.duet-table-flattened.duet-table-minimal tbody th,.duet-table-flattened.duet-table-plain tbody th{padding-top:20px !important}.duet-table-flattened.duet-table-fixed tfoot td,.duet-table-flattened.duet-table-minimal tfoot td,.duet-table-flattened.duet-table-plain tfoot td{margin-bottom:4px !important}.duet-table-flattened.duet-table-fixed tbody:not(:only-of-type) tr:first-child,.duet-table-flattened.duet-table-minimal tbody:not(:only-of-type) tr:first-child,.duet-table-flattened.duet-table-plain tbody:not(:only-of-type) tr:first-child{border-bottom:0}.duet-table-plain.duet-table-flattened tbody tr{border-bottom:1px solid #e1e3e6}.duet-table-plain.duet-table-flattened.duet-theme-turva tbody tr{border-bottom-color:#e4e4e6}.duet-table-minimal tbody tr,.duet-table-minimal tbody tr td{vertical-align:top;border-bottom:0 none}.duet-table-minimal tbody tr:last-of-type,.duet-table-minimal tbody tr:last-of-type td{border-bottom:1px solid #e1e3e6}.duet-table-minimal.duet-table-flattened tbody tr,.duet-table-minimal.duet-table-flattened tbody tr td{border-bottom:0 none}.duet-table-minimal.duet-table-flattened tbody tr td[data-heading]::before{display:none}.duet-table-minimal.duet-table-flattened tfoot{border-top:1px solid #e1e3e6}.duet-table-minimal.duet-table-flattened.duet-theme-turva tfoot{border-top-color:#e4e4e6}.duet-table-fixed table{table-layout:fixed}.duet-table-fixed tbody tr,.duet-table-fixed tbody tr td,.duet-table-fixed tbody tr td:first-child{padding:4px !important;vertical-align:text-bottom;border-bottom:0 none}.duet-table-fixed thead{display:none}.duet-table-fixed tbody tr,.duet-table-fixed tbody tr td{border-bottom:0 none}.duet-table-fixed:not(.duet-table-flattened) tfoot{border-top:1px solid #e1e3e6}.duet-table-fixed:not(.duet-table-flattened).duet-theme-turva tfoot{border-top-color:#e4e4e6}.duet-table-scrollable{position:relative;width:100%;overflow-x:auto;background:linear-gradient(90deg, #fff 0%, rgba(255, 255, 255, 0)), linear-gradient(-90deg, #fff 0%, rgba(255, 255, 255, 0)) 100% 0, radial-gradient(farthest-side at 0% 50%, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0)), radial-gradient(farthest-side at 100% 50%, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0)) 100% 0%;background-repeat:no-repeat;background-attachment:local, local, scroll, scroll;background-size:100px 100%, 100px 100%, 12px 100%, 12px 100%}.duet-table-selected-column{background:rgba(0, 119, 179, 0.08)}.duet-theme-turva .duet-table-selected-column{background:rgba(68, 68, 69, 0.08)}.duet-table-sortable tbody tr td:first-child,.duet-table-sortable thead tr th:first-child{padding:20px}.duet-table-sortable:not(.duet-table-flattened) tfoot{border-top:1px solid #e1e3e6}.duet-table-sortable:not(.duet-table-flattened).duet-theme-turva tfoot{border-top-color:#e4e4e6}.duet-table-actions table{table-layout:auto}.duet-table-actions thead th:last-child{width:1px;white-space:nowrap}.duet-editable-table-table.duet-table-flattened tr{display:grid;grid-template-columns:repeat(2, 1fr);grid-auto-rows:auto;gap:10px}.duet-editable-table-table.duet-table-flattened tr.duet-table-action-row td:last-child::before{padding:0;content:""}.duet-editable-table-table.duet-table-flattened td{grid-column:1/2}.duet-editable-table-table.duet-table-flattened td:first-child{grid-row:1;grid-column:1}.duet-editable-table-table.duet-table-flattened td:last-child{grid-row:1;grid-column:2}';const x=[{type:"default",system_message:"unknown error",message:{fi:"Tapahtui tuntematon virhe, ole hyvä ja yritä uudelleen.",sv:"Ett okänt fel uppstod, försök igen.",en:"An unknown error occured, please try again."}},{type:"400",system_message:"Bad Request: The server could not understand the request due to invalid syntax.",message:{fi:"Tiedostoa ei hyväksytty.",sv:"Servern avvisade din fil.",en:"The server rejected your file."}},{type:"401",system_message:"Not Authenticated: The client must authenticate itself to get the requested response...",message:{fi:"Vain kirjautunut käyttäjä voi lähettää tiedostoja.",sv:"Du måste vara inloggad för att ladda upp filer.",en:"You need to be logged in to upload files."}},{type:"403",system_message:"No Access: The client does not have access rights to the content.",message:{fi:"Ei oikeuksia lähettää tiedostoja.",sv:"Du har inte rätt åtkomsträttigheter för att ladda upp filer.",en:"You do not have the correct access rights to upload files."}},{type:"413",system_message:"Payload too large",message:{fi:"Tiedosto oli liian vastaanotettavaksi.",sv:"Filen var för stor för servern att hantera.",en:"The file was to large for the server to handle."}},{type:"415",system_message:"Unsupported media type",message:{fi:"Tiedoston tyyppi oli väärä.",sv:"Servern avvisade filen eftersom den hade fel typ.",en:"The server rejected the file because it had the wrong type."}},{type:"429",system_message:"Too many request from same address",message:{fi:"Liian monta yritystä, ole hyvä ja yritä myöhemmin uudelleen.",sv:"Servern har fått många förfrågningar från dig, försök igen senare.",en:"The server has received to many request from you, please try again later."}},{type:"500",system_message:"Internal Server Error",message:{fi:"Palvelin ilmoitti tuntemattomasta virheestä ja lataus epäonnistui.",sv:"Servern rapporterade ett okänt fel och uppladdningen misslyckades.",en:"The server reported an unknown error and the upload failed."}},{type:"duet-upload-100",system_message:"File extension not allowed",message:{fi:"Tiedoston tyyppi ei ole sallittu.",sv:"Du kan inte ladda upp filer av den type.",en:"You cannot upload files with that extension."}},{type:"duet-upload-001",system_message:"File transfer failed",message:{fi:"Tiedoston lähetys keskeytyi, ole hyvä ja yritä uudelleen.",sv:"Din anslutning till servern avbröts, försök igen.",en:"Your connection to the server was interrupted, try again."}},{type:"duet-upload-101",system_message:"File mimetype not allowed",message:{fi:"Tiedoston tyyppi ei ole sallittu.",sv:"Du kan inte ladda upp filer av den typ.",en:"You cannot upload files of that type."}},{type:"duet-upload-201",system_message:"File is too large",message:{fi:"Tiedosto on liian iso.",sv:"Filen är större än tillåtet.",en:"The file is larger than permitted."}},{type:"duet-upload-202",system_message:"The combined size of all files is too large",message:{fi:"Tiedostojen yhteenlaskettu koko on liian iso.",sv:"Du har nått den maximala kombinerade filstorleken.",en:"You have reached the maximum combined filesize."}},{type:"duet-upload-301",system_message:"The maximum file limit has been reached",message:{fi:"Liitteiden maksimimäärä saavutettu.",sv:"Maximalt antal bilagor har uppnåtts.",en:"Maximum number of attachments reached."}}],k=(t,e)=>{let a={type:void 0,system_message:void 0,message:void 0};return a=(e=c(e)).filter((e=>e.type==t))[0],a||(a=e.filter((t=>"default"===t.type))[0]),a},w=(t,e)=>{const a=k(t,e),i=r(a.message);return""!==i&&i?i:a.system_message},z=({data:e,errorCodes:a})=>{const{item:i,error:s}=e,{name:d}=i,{type:l}=s;return t("span",{class:"duet-upload-item-error",role:"status"},t("duet-paragraph",{class:"duet-upload-item-name",color:"danger",margin:"none",weight:"semi-bold"},t("duet-icon",{margin:"none",size:"x-small",name:"messaging-attachment"}),t("duet-spacer",{size:"xx-small",direction:"horizontal"}),d),t("duet-paragraph",{class:"duet-upload-item-error-label",size:"small",margin:"none",color:"danger"},w(l,a)))},T=({progress:e,name:a})=>t("span",{class:"duet-upload-item-name"},t("duet-icon",{margin:"none",size:"x-small",name:"messaging-attachment"}),t("duet-spacer",{size:"xx-small",direction:"horizontal"}),a,t("br",null),t("duet-progress",{progress:Math.ceil(e),"aria-hidden":!0})),S=({name:e})=>t("span",{class:"duet-upload-item-name"},t("duet-icon",{margin:"none",size:"x-small",name:"messaging-attachment"}),t("duet-spacer",{size:"xx-small",direction:"horizontal"}),e),E=({data:e,showLinks:a})=>{const{item:i,size:s,uploaded:d,url:l,meta:o}=e,{name:n}=i,r=t("span",{class:"duet-upload-item-name"},t("duet-icon",{margin:"none",size:"x-small",name:"messaging-attachment"}),t("duet-spacer",{size:"xx-small",direction:"horizontal"}),n),u=t("span",{class:"duet-upload-item-size",style:{fontSize:"14px",fontWeight:"400"}},"(",((t,e=2)=>{if(0===t)return"0 Bytes";const a=e<0?0:e,i=Math.floor(Math.log(t)/Math.log(1024));return parseFloat((t/Math.pow(1024,i)).toFixed(a))+" "+["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"][i]})(s),")"),h=t("duet-paragraph",{color:"secondary",margin:"none",weight:"semi-bold"},d&&l&&a?t("duet-link",{url:l,external:!0},r):r,t("duet-spacer",{size:"xx-small",direction:"horizontal"}),u),b=o&&o.badges?t("span",null,t("duet-spacer",{size:"xx-small"}),o.badges.map((e=>t("duet-badge",{color:"primary"},e)))):void 0;return t("span",{class:"duet-upload-item-success"},t("div",null,h),b)},j=(t,e,a)=>{const{allowedMimetypes:i,allowedExtensions:s,maxBytes:d}=e;let l=!1,o=k("default",a);if(t){const{name:e,type:n,size:r}=t,u=((t,e)=>{if(!e||!t)return!0;const a=e.split(",");let i=!1;return a.forEach((e=>{const a=e.split("/"),s=t.split("/");a[0]!==s[0]||a[1]!==s[1]&&"*"!==a[1]||(i=!0)})),i})(n,i),h="all"===s||""===s||" "===s||void 0===s||((t,e)=>{if(!e)return!0;const a=t.split(".");return e.split(",").includes(a[a.length-1])})(e.toLowerCase(),s),b=((t,e)=>!e||!t||e>=t)(r,d);u||(o=k("duet-upload-101",a)),h||(o=k("duet-upload-100",a)),b||(o=k("duet-upload-201",a)),l=u&&h&&b}else l=!1;return{valid:l,errorMessage:l?void 0:r(o.message),errorSystem:l?void 0:o.system_message,errorType:l?void 0:o.type}},M=({payload:t,options:e,onFailure:a,onSuccess:i,onProgress:s})=>{const{type:d="POST",xhr:l,uri:o,argument:n=null,headers:r=null}=e;l.open(d,`${o}${n||""}`,!0);const{data:u,name:h}=t;return r&&Object.keys(r).forEach((t=>{l.setRequestHeader(t,r[t])})),"POST"===d&&(l.onreadystatechange=()=>{l.readyState===XMLHttpRequest.DONE&&l.status>=200&&l.status<300&&i(l,h,l.status),l.readyState===XMLHttpRequest.DONE&&l.status>=300&&l.status<999&&a(l,h,l.status)},s(h)),l.send(u),l},F=class{constructor(i){e(this,i),this.duetChange=a(this,"duetChange",3),this.duetBlur=a(this,"duetBlur",7),this.duetFocus=a(this,"duetFocus",7),this.duetReady=a(this,"duetReady",7),this.duetDone=a(this,"duetDone",3),this.duetState=a(this,"duetState",3),this.duetDelete=a(this,"duetDelete",3),this.duetCancel=a(this,"duetCancel",3),this.duetProgress=a(this,"duetProgress",3),this.duetUpload=a(this,"duetUpload",3),this.buttonId=m("DuetButton"),this.labelId=m("DuetLabel"),this.uploadId=m("DuetUpload"),this.filesInProgress=new Map,this.fileMaxReached=!1,this.bytesMaxReached=!1,this.internalStatusMessageLabel=void 0,this.DefaultGroups={inprogress:"inprogress",success:"success",pending:"pending",failure:"failure"},this.kick=o((()=>{this.tick=Date.now()}),30),this.listenForActionEvents=()=>{this.element.addEventListener("duetActionEvent",(t=>{const e=t.detail,{action:a,id:i,originalEvent:s}=e;switch(a){case"delete":this.onDelete(i,s);break;case"cancel":this.onCancel(i,s)}}))},this.verifyValidity=()=>{const{invalid:t,valid:e}=this.getFilesAsArray(),a=this.valid;this.valid=0===t.length&&0!==e.length,this.valid!==a&&this.duetState.emit({originalEvent:void 0,data:{valid:this.valid,from:"componentWillRender"},component:"duet-upload"})},this.getGroupFromItemData=t=>t.valid&&100===t.progress?this.DefaultGroups.success:t.progress>0&&100!==t.progress?this.DefaultGroups.inprogress:t.valid?t.pending?this.DefaultGroups.pending:t.group?t.group:"none":this.DefaultGroups.failure,this.getItemHTMLFromItemData=(e,a)=>a===this.DefaultGroups.success?t(E,{data:e,showLinks:this.showLinks}):a===this.DefaultGroups.inprogress?t(T,{progress:e.progress,name:e.item.name}):a===this.DefaultGroups.pending?t(S,{name:e.item.name}):a===this.DefaultGroups.failure?t(z,{data:e,errorCodes:this.errorCodes}):e.group?e.html:"none",this.genHashName=()=>Date.now().toString(36)+Math.random(),this.updateValueInMap=(t,e,a,i=!0)=>{try{const i=this.files.get(t);i[e]=a,this.files.set(t,i)}catch(s){}i&&this.kick()},this.updateProgress=(t,e)=>{t.lengthComputable?(a=>{this.updateValueInMap(e,"progress",a),this.onProgress(e,a,t)})(t.loaded/t.total*100):console.log("cant read progress")},this.trackProgress=(t,e=!1)=>{e?this.filesInProgress.delete(t):this.filesInProgress.set(t,"inprogress"),0===this.filesInProgress.size&&this.onDone()},this.getFilesAsArray=()=>{const t=[],e=[];return this.files.forEach((a=>{a.valid&&!a.deleted?t.push(a):a.valid||a.deleted||e.push(a)})),{valid:t,invalid:e}},this.resetFormFields=()=>{this.nativeInput.value=""},this.startUpload=async(t,e)=>{this.metaData=e,this.nativeInput.click(),this.onUpload(t,e),t.stopPropagation(),t.preventDefault()},this.transferComplete=t=>{this.updateValueInMap(t,"progress",100,!1),this.trackProgress(t,!0)},this.transferDone=(t,e,a)=>{this.updateValueInMap(e,"status",a,!1),this.updateValueInMap(e,"uploaded",!0,!1);try{const a=JSON.parse(t.response);this.updateValueInMap(e,"url",a.url)}catch(i){this.updateValueInMap(e,"url",null),console.error("Server did not respond with expected response {url: string}")}},this.transferDoneWithFailure=(t,e,a)=>{try{const{error:a}=JSON.parse(t.response);this.updateValueInMap(e,"error",{message:a.message,type:a.type},!1)}catch(i){console.error("Server did not respond with expected response error:{message: string, type: int}"),this.updateValueInMap(e,"error",{type:a},!1)}this.updateValueInMap(e,"valid",!1,!0)},this.transferFailed=t=>{this.updateValueInMap(t,"error",w("duet-upload-001",this.errorCodes))},this.transferCanceled=t=>{this.files.delete(t),this.validateTotals(t),this.kick()},this.validateTotals=t=>{const e=((t,e)=>{let a=0;return!!(e&&(this.files.forEach((t=>{t.valid&&t.size&&(a+=t.size)})),a>e))})(0,this.maxBytesTotal),a=((t,e)=>{let a=0;return!!(e&&(this.files.forEach((t=>{t.valid&&a++})),a>e))})(0,this.maxFiles);return e&&t&&this.updateValueInMap(t,"error",w("duet-upload-202",this.errorCodes),!1),a&&t&&this.updateValueInMap(t,"error",w("duet-upload-301",this.errorCodes),!1),this.bytesMaxReached=e,this.fileMaxReached=a,{bytesMaxReached:e,fileMaxReached:a}},this.uploadFile=async(t,e=!1,a)=>{!e&&this.deferUpload?(this.updateValueInMap(t.item.name,"pending",!0,!1),this.updateValueInMap(t.item.name,"group","pending",!0)):e&&(this.updateValueInMap(t.item.name,"pending",!1,!1),this.updateValueInMap(t.item.name,"group",void 0,!0));try{if(!this.deferUpload||e){const e=new FormData;e.append("file",t.item),a&&e.append("key",a),e.append("uid",t.uid),e.append("name",t.item.name),e.append("metadata",JSON.stringify({uid:t.uid,url:this.uri,size:t.item.size,meta:t.meta})),t.xhr=await this.makeXHRPostRequest(e)}}catch(i){this.updateValueInMap(t.item.name,"valid",!1,!1)}},this.uploadPendingFiles=()=>{for(const[t,e]of this.files.entries())"pending"===e.group&&!0===e.pending&&this.uploadFile(e,!0,t)},this.getItemFromUID=t=>{for(const[e,a]of this.files.entries())if(a.uid===t)return{value:a,key:e};return null},this.onDelete=(t,e)=>{const a=this.getItemFromUID(t).key,i=this.files.get(a);this.files.delete(a),this.validateTotals(),this.kick(),this.duetDelete.emit({originalEvent:e,data:{deletion:i},component:"duet-upload"}),this.external||i.pending||this.makeXHRDeleteRequest(i),this.resetFormFields()},this.onCancel=(t,e)=>{const a=this.getItemFromUID(t).key,i=this.files.get(a);if(this.files.delete(a),this.external)this.kick();else{const{xhr:t}=i;t&&t.abort()}this.resetFormFields(),this.duetCancel.emit({originalEvent:e,data:{cancelled:i},component:"duet-upload"})},this.onUpload=(t,e)=>{this.duetUpload.emit({originalEvent:t,metaData:e,component:"duet-upload"})},this.onBlur=t=>{this.duetBlur.emit({originalEvent:t,component:"duet-upload"})},this.onProgress=(t,e,a)=>{this.duetChange.emit({originalEvent:a,data:{key:t,percentComplete:e},component:"duet-upload"})},this.onFocus=t=>{this.duetFocus.emit({originalEvent:t,component:"duet-upload"})},this.onReady=()=>{this.duetReady.emit({component:"duet-upload"})},this.onDone=()=>{this.duetDone.emit({component:"duet-upload",data:{files:this.files}})},this.filterMap=()=>{const t=[...this.files.values()],e=[],a=[],i=[],s=[];return t.forEach((t=>{const d=this.getGroupFromItemData(t),l=this.getItemHTMLFromItemData(t,d);d===this.DefaultGroups.success?s.push({uid:t.uid,item:l,group:d}):d===this.DefaultGroups.inprogress?e.push({uid:t.uid,item:l,group:d}):d===this.DefaultGroups.pending?i.push({uid:t.uid,item:l,group:d}):d===this.DefaultGroups.failure?a.push({uid:t.uid,item:l,group:d}):t.group&&e.push({uid:t.uid,item:l,group:t.group})})),{pending:i,failure:a,success:s,inprogress:e}},this.getColumns=t=>[{sort_order:1,direction:-1,index:0,key:t.id,label:t.label}],this.getActions=t=>this.actions.filter((e=>e.map.includes(t))),this.renderEditableTableGroups=()=>{const e=this.filterMap();return this.groups.map((a=>{const i=e[a.id];if(null==i?void 0:i.length)return t("duet-table",{variation:"plain",breakpoint:"none",role:"log",margin:this.hideGroups?"none":"auto"},t("table",{class:"duet-upload-editable-table"},t("thead",{class:"duet-upload-editable-table-header"},t("tr",null,t("th",{class:{"duet-upload-editable-table-header-hidden":this.hideGroups}},this.hideGroups?t("duet-visually-hidden",null,r(a.label)):r(a.label)))),t("tbody",null,t("tr",null,t("td",{class:"duet-upload-editable-table-data"},t("duet-editable-table",{breakpoint:"none",variation:"plain",groupId:a.id,columns:this.getColumns(a),actions:this.getActions(a.id),margin:"none",rows:i}))))))}))},this.tick=Date.now(),this.accessibleActiveDescendant=void 0,this.accessibleDescribedBy=void 0,this.accessibleControls=void 0,this.accessibleOwns=void 0,this.external=!1,this.middleware=null,this.deferUpload=!1,this.hideButton=!1,this.actions=[{icon:"action-delete",color:"color-danger",size:"x-small",background:"gray-lightest",name:"delete",map:["success","failure"],label:{fi:"Poista tiedosto",en:"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=void 0,this.showLinks=!1,this.caption=void 0,this.statusLabelDefaults={fi:{inProgress:"Lähetetään {filesUploaded} lähetettävästä {filesTotal} tiedostosta",inProgressWithErrors:"Lähetetään {filesInProgress} tiedostoa, lähetetty {filesUploaded} lähetettävästä {filesTotal} tiedostosta, {filesWithErrors} tiedostossa on virheitä",done:"Kaikki {filesTotal} tiedostoa lähetetty onnistuneesti",doneWithErrors:"Lähetys valmis, {filesUploaded} tiedostoa on lähetetty onnistuneesti, {filesWithErrors} tiedostossa oli virheitä",files:"tiedostot",file:"tiedosto"},sv:{inProgress:"Adding {filesUploaded} of {filesTotal}",inProgressWithErrors:"Laddar upp {filesInProgress}, {filesUploaded} uppladdad av {filesTotal}, {filesWithErrors} misslyckades",done:"Alla {filesTotal} har lagts till",doneWithErrors:"Handling slutförd, {filesUploaded} har lagts till, {filesWithErrors} misslyckades",files:"filer",file:"fil"},en:{inProgress:"Adding {filesUploaded} of {filesTotal}",inProgressWithErrors:"Uploading {filesInProgress}, {filesUploaded} uploaded of {filesTotal}, {filesWithErrors} failed",done:"All {filesTotal} added successfully",doneWithErrors:"Action completed, {filesUploaded} has been added successfully, {filesWithErrors} had errors",files:"File",file:"file"}},this.statusMessageLabel=r(this.statusLabelDefaults),this.buttonLabelDefaults={fi:"Lisää liite",sv:"Lägg till en bilaga",en:"Add an attachment"},this.buttonLabel=r(this.buttonLabelDefaults),this.accessibleButtonLabel=void 0,this.theme="",this.disabled=!1,this.identifier=void 0,this.margin="auto",this.required=!1,this.alignment="middle",this.hideGroups=!1,this.files=new Map,this.valid=!this.required,this.labelDefaults={fi:"Lisää liite",sv:"Lägg till en bilaga",en:"Add attachments"},this.label=r(this.labelDefaults),this.descriptionDefaults={en:"You may attach the following filetypes: {filetypes} - as well as the most common video files. You can upload {maxbytestotal} of files at a time, and add up to {maxfiles} attachments at a time each no larger than {maxbytes}.",sv:"Du kan bifoga följande filtyper: {filetypes} - samt de vanligaste videofilerna. Du kan ladda upp {maxbytestotal} av filer åt gången, och lägga till upp till {maxfiles} bilagor åt gången varje inte större än {maxbytes}.",fi:"Voit liittää seuraavat tiedostotyypit: {filetypes} - sekä yleisimmät videotiedostot. Voit lähettää {maxbytestotal} tiedostoa kerrallaan, ja lisätä enintään {maxfiles} liitettä kerrallaan, jokainen enintään {maxbytes} kokoisena."},this.description=r(this.descriptionDefaults),this.fileListEmptyDefaults={fi:"Ei vielä lisättyjä tiedostoja.",sv:"Inga filer har lagts till ännu.",en:"No files added yet."},this.fileListEmpty=r(this.fileListEmptyDefaults),this.error="",this.errorCodes=x,this.name=void 0,this.maxBytes=2e8,this.maxBytesTotal=void 0,this.maxFiles=99,this.allowedExtensions="all",this.allowedMimetypes="*",this.multiple=!0,this.limitSelection=!1,this.value=void 0,this.groups=[{id:this.DefaultGroups.pending,label:{en:"Files to upload",sv:"Filer att ladda",fi:"Ladattavat tiedostot"}},{id:this.DefaultGroups.success,label:{fi:"Valmiit tiedostot",sv:"Files success",en:"Files success"}},{id:this.DefaultGroups.failure,label:{fi:"Tiedostot, joissa on virheitä",sv:"Filer med fel",en:"Files with errors"}},{id:this.DefaultGroups.inprogress,label:{fi:"Kesken olevat tiedostot",sv:"Filer inprogress",en:"Files inprogress"}}]}watchValidHandler(t,e){t!==e&&this.kick()}componentWillLoad(){this.internalStatusMessageLabel="string"==typeof this.statusMessageLabel?u(this.groups):this.statusMessageLabel,d(this),this.listenForActionEvents(),this.onReady()}componentWillRender(){this.verifyValidity()}async setFocus(t){this.nativeInput&&this.nativeInput.focus(t)}async upload(t){await this.setFocus(),this.metaData=t,this.nativeInput.click()}async uploadPending(){this.uploadPendingFiles()}async refresh(){this.kick(),await this.setFocus()}async getFiles(){return!(!this.files||0===this.files.size)&&this.getFilesAsArray()}async updateValue(t,e,a){this.updateValueInMap(t,e,a)}render(){const e=this.identifier||this.uploadId,a=Math.round((this.maxBytesTotal?this.maxBytesTotal:this.maxBytes*this.maxFiles)/1024/1024),s=Math.round(this.maxBytes/1024/1024);let d=this.description.replace(/{maxfiles}/g,this.maxFiles.toString());return d=d.replace(/{maxbytes}/g,`${s.toString()} MB`),d=d.replace(/{maxbytestotal}/g,`${a.toString()} MB`),d=d.replace(/{filetypes}/g,this.allowedExtensions.split(",").join(", ")),t(i,{class:{"duet-m-0":"none"===this.margin}},t("duet-fieldset",{label:this.label,caption:d},t("slot",{name:"header"}),!this.files.size&&t("duet-label",{part:this.identifier?`${this.identifier}-empty-state`:"duet-upload-empty-state",theme:"turva"===this.theme?"turva":"default",size:"small",class:{"duet-upload-filelist-empty":!this.files.size,"duet-upload-filelist":!0,"duet-upload-filelist-filled":this.files.size},id:this.labelId,for:e},t("span",{class:{"duet-upload-filelist-empty-label":!this.files.size}},this.fileListEmpty)),!!this.files.size&&t("slot",{name:"fileheader"}),!!this.files.size&&t("duet-upload-aria-status",{invalid:this.getFilesAsArray().invalid.length,valid:this.getFilesAsArray().valid.length,inprogress:this.filesInProgress.size,total:this.files.size,statusMessageLabel:this.internalStatusMessageLabel}),!!this.files.size&&this.renderEditableTableGroups(),!!this.files.size&&t("slot",{name:"filefooter"}),t("duet-spacer",{size:"large"}),!this.hideButton&&t("duet-button",{id:this.buttonId,onClick:this.startUpload,"accessible-controls":e,disabled:this.fileMaxReached,"accessible-label":this.accessibleButtonLabel,"accessible-owns":e,size:"small",variation:"secondary",fixed:!0,icon:"action-add-circle",part:this.identifier?`${this.identifier}-button-upload`:"duet-upload-button-upload"},this.buttonLabel),t("duet-spacer",{size:"medium"}),(this.fileMaxReached||this.bytesMaxReached)&&t("duet-alert",{part:this.identifier?`${this.identifier}-error-notification`:"duet-upload-error-notification"},this.fileMaxReached&&w("duet-upload-301",this.errorCodes),this.bytesMaxReached&&w("duet-upload-202",this.errorCodes)),t("duet-spacer",{size:"medium"}),t("duet-visually-hidden",null,t("input",{ref:t=>{this.nativeInput=t},accept:this.limitSelection?`${this.allowedMimetypes},${this.allowedExtensions}`:void 0,onBlur:this.onBlur,onFocus:this.onFocus,onChange:t=>this.onChange(t),type:"file",class:{"duet-upload":!0},disabled:this.disabled,"aria-hidden":"true",required:this.required,name:this.name,id:this.identifier,multiple:this.multiple}))))}makeXHRPostRequest(t){const e=new XMLHttpRequest,a=t.get("name");e.upload.addEventListener("progress",(t=>{this.updateProgress(t,a)})),e.upload.addEventListener("load",(()=>{this.transferComplete(a)})),e.upload.addEventListener("error",(()=>{this.transferFailed(a)})),e.upload.addEventListener("abort",(()=>{this.transferCanceled(a)}));let i={payload:{data:t,name:a},options:{type:"POST",uri:this.uri,xhr:e,argument:null,headers:void 0},onFailure:this.transferDoneWithFailure,onSuccess:this.transferDone,onProgress:this.trackProgress};return this.middleware&&(i=this.middleware(i)),M(i)}makeXHRDeleteRequest(t){const{uid:e,item:a}=t,i=new XMLHttpRequest;let s={payload:{data:null,name},options:{type:"DELETE",xhr:i,uri:this.uri,argument:`?key=${e}&name=${a.name}`,headers:{"x-fileuid":e,"x-filename":a.name}},onFailure:this.transferDoneWithFailure,onSuccess:this.transferDone,onProgress:this.trackProgress};return this.middleware&&(s=this.middleware(s)),M(s)}async onChange(t){var e;const a=Array.from(null===(e=this.nativeInput)||void 0===e?void 0:e.files);if(a)for(const i of a){const{valid:t,errorMessage:e,errorType:a,errorSystem:s}=j(i,{maxBytes:this.maxBytes,allowedExtensions:this.allowedExtensions,allowedMimetypes:this.allowedMimetypes},this.errorCodes),d={uid:this.genHashName(),item:i,size:i.size,meta:this.metaData,uploaded:!1,valid:t,error:{type:t?void 0:a,message:t?void 0:e,system_message:t?void 0:s},progress:0,deleted:!1,xhr:!1,url:!1};this.files.set(i.name,d);const{bytesMaxReached:l,fileMaxReached:o}=this.validateTotals(i.name);l||o?this.updateValueInMap(i.name,"valid",!1,!1):t&&!this.external?await this.uploadFile(d):t&&this.external?(this.updateValueInMap(d.item.name,"pending",!0,!1),this.updateValueInMap(d.item.name,"group","pending",!0)):t||this.updateValueInMap(i.name,"valid",!1,!0),this.kick()}this.resetFormFields(),this.metaData=void 0,this.duetChange.emit({originalEvent:t,data:{files:this.files},component:"duet-upload"})}get element(){return s(this)}static get watchers(){return{valid:["watchValidHandler"]}}};F.style="*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}::slotted([slot=header]){margin-bottom:16px}::slotted([slot=fileheader]){margin:16px 0 0 0}::slotted([slot=filefooter]){margin-top:16px}.duet-upload{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.duet-upload-item-size{font-size:0.75rem;font-weight:400}.duet-upload-filelist{margin-bottom:25px}.duet-upload-filelist-empty{display:flex;align-items:center;justify-content:center;width:100%;height:75px;margin:0 auto;font-size:1rem;font-weight:400;background-color:#f5f8fa}.duet-upload-filelist-empty-label{font-size:1rem;font-weight:400}.duet-upload-editable-table-header-hidden{display:none}.duet-upload-editable-table tbody .duet-upload-editable-table-data{padding:0 !important;border:0}.duet-upload-editable-table duet-editable-table tfoot,.duet-upload-editable-table duet-editable-table thead{display:none}.duet-upload-editable-table duet-editable-table .duet-editable-table-content{padding-right:0 !important;padding-left:0 !important}.duet-upload-editable-table duet-editable-table duet-table .duet-table-action-row td{padding:1rem 0 !important}.duet-upload-editable-table duet-editable-table duet-table .duet-table-action-row td:last-child{padding-right:0 !important}.duet-upload-editable-table duet-editable-table .duet-editable-table-row-inprogress,.duet-upload-editable-table duet-editable-table .duet-editable-table-row-pending{position:relative}.duet-upload-editable-table duet-editable-table .duet-editable-table-row-inprogress duet-progress,.duet-upload-editable-table duet-editable-table .duet-editable-table-row-pending duet-progress{position:absolute;bottom:0;width:100%}.duet-upload-editable-table duet-editable-table .duet-editable-table-row-inprogress duet-action-button::part(button),.duet-upload-editable-table duet-editable-table .duet-editable-table-row-pending duet-action-button::part(button){border:0}.duet-upload-editable-table .duet-upload-item-name duet-icon{position:relative;top:2px}duet-paragraph::part(duet-paragraph){word-break:break-word}";export{g as duet_editable_table,v as duet_table,F as duet_upload}
@@ -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 a,H as i,g as r}from"./p-668f8586.js";import{i as s}from"./p-4ebf1618.js";import{c as o}from"./p-c1325e35.js";import{c as d}from"./p-56118313.js";const u=({value:t,maxlength:e,label:i,theme:r})=>{if(null==e)return;const s=t.length,o=Math.max(e-s,0);return a("div",{class:"duet-character-count"},a("duet-caption",{margin:"none",theme:r,size:"small"},a("duet-visually-hidden",{"aria-live":"polite","aria-atomic":"true",class:"duet-textarea-counter-remaining"},o/e<=.1&&`${o} ${i}`),a("span",{"aria-hidden":"true"},s,"/",e)))},h=class{constructor(a){t(this,a),this.duetInput=e(this,"duetInput",7),this.duetChange=e(this,"duetChange",7),this.duetBlur=e(this,"duetBlur",7),this.duetFocus=e(this,"duetFocus",7),this.textareaId=o("DuetTextarea"),this.topCaptionId=o("DuetCaptionTop"),this.topCaptionPlaceholderId=o("DuetCaptionPlaceholderTop"),this.labelId=o("DuetLabel"),this.errorId=o("DuetError"),this.disallowPatternRegex=null,this.handleInput=t=>{this.disallowPatternRegex&&d(this.nativeInput,this.disallowPatternRegex),this.value=this.nativeInput.value,this.isCaptionVisible=!!this.caption,this.duetInput.emit({originalEvent:t,value:this.value,component:"duet-textarea"})},this.handleChange=t=>{this.value=this.nativeInput.value,this.duetChange.emit({originalEvent:t,value:this.value,component:"duet-textarea"})},this.handleBlur=t=>{this.duetBlur.emit({originalEvent:t,value:this.value,component:"duet-textarea"})},this.handleFocus=t=>{this.duetFocus.emit({originalEvent:t,value:this.value,component:"duet-textarea"})},this.margin="auto",this.accessibleActiveDescendant=void 0,this.accessibleAutocomplete=void 0,this.accessibleControls=void 0,this.accessibleDetails=void 0,this.accessibleLabelledBy=void 0,this.accessibleDescription=void 0,this.accessibleOwns=void 0,this.accessibleDescribedBy=void 0,this.theme="",this.expand=!1,this.disabled=!1,this.identifier=void 0,this.required=!1,this.label="label",this.labelHidden=!1,this.name=void 0,this.placeholder=void 0,this.caption=void 0,this.echoPlaceholder=!1,this.maxlength=void 0,this.minlength=void 0,this.error="",this.role=void 0,this.tooltip="",this.tooltipDirection="auto",this.value="",this.disallowPattern=null,this.counter=!1,this.counterLabel=void 0}disallowedPatternChange(){this.disallowPatternRegex=this.disallowPattern?new RegExp(this.disallowPattern,"g"):null}componentWillLoad(){s(this),this.disallowedPatternChange(),this.isCaptionVisible=!!this.caption,this.counter&&null==this.maxlength&&console.warn("[DUET WARNING]: counter will only take effect if maxlength is set"),this.counter||null==this.counterLabel||console.warn("[DUET WARNING]: counter-label is redundant unless used with counter"),this.counter&&!this.counterLabel&&console.warn("[DUET WARNING]: counter requires counter-label to be set")}async setFocus(t){this.nativeInput.focus(t)}render(){const t=this.identifier||this.textareaId;return a(i,{class:{"duet-m-0":"none"===this.margin,"duet-has-counter":this.counter&&!this.error,"duet-expand":this.expand}},a("div",{class:{"duet-textarea-container":!0,"duet-theme-turva":"turva"===this.theme,"duet-label-hidden":this.labelHidden,"duet-input-top-caption-shown":this.isCaptionVisible,"has-error":!!this.error}},a("duet-label",{theme:"turva"===this.theme?"turva":"default",class:{"duet-has-tooltip":!!this.tooltip},margin:this.isCaptionVisible?"small":"auto",id:this.labelId,for:t},this.label),this.tooltip&&a("duet-tooltip",{direction:this.tooltipDirection,accessibleInputLabel:this.label,theme:"turva"===this.theme?"turva":"default"},this.tooltip),this.caption&&a("duet-caption",{id:this.topCaptionId,size:"medium",theme:"turva"===this.theme?"turva":"default"},this.caption),a("div",{class:"duet-textarea-wrapper"},this.placeholder&&this.echoPlaceholder&&this.value&&a("duet-caption",{id:this.topCaptionPlaceholderId,class:"duet-textarea-placeholder",size:"small"},this.placeholder),a("textarea",{onInput:this.handleInput,onChange:this.handleChange,onBlur:this.handleBlur,onFocus:this.handleFocus,ref:t=>this.nativeInput=t,class:{"duet-textarea":!0,disabled:this.disabled},value:this.value,disabled:this.disabled,"aria-labelledby":this.accessibleLabelledBy?`${this.errorId} ${this.labelId} ${this.accessibleLabelledBy}`:`${this.errorId} ${this.labelId} `,"aria-controls":this.accessibleControls,"aria-autocomplete":this.accessibleAutocomplete,"aria-errormessage":this.error?this.errorId:null,"aria-activedescendant":this.accessibleActiveDescendant,"aria-owns":this.accessibleOwns,"aria-describedby":`${this.isCaptionVisible?this.topCaptionId:""} ${this.accessibleDescribedBy}`,"aria-details":this.accessibleDetails,"aria-description":this.accessibleDescription,placeholder:this.placeholder,spellcheck:"false",required:this.required,minlength:this.minlength,maxlength:this.maxlength,role:this.role,name:this.name,id:t})),a("duet-grid",{alignment:"stretch"},a("duet-grid-item",{margin:"none",fill:!0},a("div",{class:"duet-textarea-help",id:this.errorId,"aria-atomic":"true","aria-live":"polite","aria-relevant":"additions removals"},this.error&&a("span",null,this.error))),a("duet-grid-item",{margin:"none",class:"duet-character-count-caption"},this.counter&&a(u,{theme:this.theme,value:this.value,maxlength:this.maxlength,label:this.counterLabel})))))}get element(){return r(this)}static get watchers(){return{disallowPattern:["disallowedPatternChange"]}}};h.style='*.sc-duet-textarea,*.sc-duet-textarea::after,*.sc-duet-textarea::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.sc-duet-textarea-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;display:block;width:100%;max-width:100%;text-align:left}.sc-duet-textarea-h:last-child,.sc-duet-textarea-h:last-of-type{margin-right:0 !important}@media (min-width: 36em){.sc-duet-textarea-h{width:calc(50% - 16px - 3px)}.duet-expand.sc-duet-textarea-h{width:100% !important}}.duet-m-0.sc-duet-textarea-h{margin:0 !important}duet-tooltip.sc-duet-textarea{position:absolute;top:12px;right:0}@media (min-width: 48em){duet-tooltip.sc-duet-textarea{position:relative;top:4px;right:auto}}.duet-textarea-container.sc-duet-textarea{position:relative;width:100%;height:100%}.duet-textarea-container.sc-duet-textarea .duet-input-top-caption.sc-duet-textarea{display:none}.duet-textarea-container.duet-input-top-caption-shown.sc-duet-textarea .duet-input-top-caption.sc-duet-textarea{display:flex !important}.duet-textarea-wrapper.sc-duet-textarea{position:relative}.duet-textarea-placeholder.sc-duet-textarea{position:absolute;top:-9px;left:9px;z-index:200;display:block;width:auto;max-width:60%;padding:0 0.25rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;background:white}.duet-textarea.sc-duet-textarea{padding:15px !important;position:relative;z-index:100;display:block;width:100%;min-width:8rem;min-height:160px;font-family:"localtapiola-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";font-size:1rem;font-weight:400;font-variant-numeric:tabular-nums;line-height:1.25;color:#00294d;resize:vertical;background:white;border:1px solid #909599;border-radius:4px;transition:150ms ease}.duet-theme-turva.sc-duet-textarea .duet-textarea.sc-duet-textarea{font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";color:#171c3a;border-color:#747475}.has-error.sc-duet-textarea .duet-textarea.sc-duet-textarea{border-color:#de2362 !important}.duet-theme-turva.has-error.sc-duet-textarea .duet-textarea.sc-duet-textarea{border-color:#e02a0d !important}.duet-textarea.sc-duet-textarea::-webkit-input-placeholder{color:#657787;opacity:1 !important;transition:color 300ms ease}.duet-theme-turva.sc-duet-textarea .duet-textarea.sc-duet-textarea::-webkit-input-placeholder{color:#747475}.duet-textarea.sc-duet-textarea:focus::-webkit-input-placeholder{color:#cfd2d4}.duet-theme-turva.sc-duet-textarea .duet-textarea.sc-duet-textarea:focus::-webkit-input-placeholder{color:#cfcfd1}.duet-textarea.sc-duet-textarea::-moz-placeholder{color:#657787;opacity:1 !important}.duet-theme-turva.sc-duet-textarea .duet-textarea.sc-duet-textarea::-moz-placeholder{color:#747475}.duet-textarea.sc-duet-textarea:focus::-moz-placeholder{color:#cfd2d4}.duet-theme-turva.sc-duet-textarea .duet-textarea.sc-duet-textarea:focus::-moz-placeholder{color:#cfcfd1}.duet-textarea.sc-duet-textarea:-ms-input-placeholder{color:#657787}.duet-theme-turva.sc-duet-textarea .duet-textarea.sc-duet-textarea:-ms-input-placeholder{color:#747475}.duet-textarea.sc-duet-textarea:focus:-ms-input-placeholder{color:#cfd2d4}.duet-theme-turva.sc-duet-textarea .duet-textarea.sc-duet-textarea:focus:-ms-input-placeholder{color:#cfcfd1}.duet-textarea[disabled].sc-duet-textarea{color:#657787 !important;cursor:default !important;background:#f5f8fa !important;border-color:#f5f8fa !important}.duet-theme-turva.sc-duet-textarea .duet-textarea[disabled].sc-duet-textarea{color:#747475 !important;background:#f5f5f7 !important;border-color:#f5f5f7 !important}.duet-textarea.sc-duet-textarea:hover:not(:disabled){box-shadow:0 0 0 1px #909599}.duet-theme-turva.sc-duet-textarea .duet-textarea.sc-duet-textarea:hover:not(:disabled){box-shadow:0 0 0 1px #747475}.has-error.sc-duet-textarea .duet-textarea.sc-duet-textarea:hover:not(:disabled){box-shadow:0 0 0 1px #de2362}.duet-theme-turva.has-error.sc-duet-textarea .duet-textarea.sc-duet-textarea:hover:not(:disabled){box-shadow:0 0 0 1px #e02a0d}.duet-textarea.sc-duet-textarea:focus{border-color:#0077b3;outline:0;box-shadow:0 0 0 1px #0077b3;transition:none}.duet-theme-turva.sc-duet-textarea .duet-textarea.sc-duet-textarea:focus{border-color:#171c3a;box-shadow:0 0 0 1px #171c3a}.has-error.sc-duet-textarea .duet-textarea.sc-duet-textarea:focus{box-shadow:0 0 0 1px #de2362}.duet-theme-turva.has-error.sc-duet-textarea .duet-textarea.sc-duet-textarea:focus{box-shadow:0 0 0 1px #e02a0d}.duet-textarea.sc-duet-textarea:not(:focus):not(:hover):invalid{box-shadow:none}.duet-textarea-help.sc-duet-textarea{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;line-height:1.25}.duet-textarea-help.sc-duet-textarea span.sc-duet-textarea{display:block;margin-top:8px}.duet-theme-turva.sc-duet-textarea .duet-textarea-help.sc-duet-textarea{font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";color:#747475}.has-error.sc-duet-textarea .duet-textarea-help.sc-duet-textarea{color:#de2362}.duet-theme-turva.has-error.sc-duet-textarea .duet-textarea-help.sc-duet-textarea{color:#e02a0d}.duet-label-hidden.sc-duet-textarea duet-label.sc-duet-textarea{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);border:0}.duet-character-count.sc-duet-textarea{display:block;margin:8px 0 0 auto}';export{h as duet_textarea}
4
+ import{r as t,c as e,h as a,H as i,g as r}from"./p-d75c51a6.js";import{i as s}from"./p-4ebf1618.js";import{c as o}from"./p-c1325e35.js";import{c as d}from"./p-56118313.js";const u=({value:t,maxlength:e,label:i,theme:r})=>{if(null==e)return;const s=t.length,o=Math.max(e-s,0);return a("div",{class:"duet-character-count"},a("duet-caption",{margin:"none",theme:r,size:"small"},a("duet-visually-hidden",{"aria-live":"polite","aria-atomic":"true",class:"duet-textarea-counter-remaining"},o/e<=.1&&`${o} ${i}`),a("span",{"aria-hidden":"true"},s,"/",e)))},h=class{constructor(a){t(this,a),this.duetInput=e(this,"duetInput",7),this.duetChange=e(this,"duetChange",7),this.duetBlur=e(this,"duetBlur",7),this.duetFocus=e(this,"duetFocus",7),this.textareaId=o("DuetTextarea"),this.topCaptionId=o("DuetCaptionTop"),this.topCaptionPlaceholderId=o("DuetCaptionPlaceholderTop"),this.labelId=o("DuetLabel"),this.errorId=o("DuetError"),this.disallowPatternRegex=null,this.handleInput=t=>{this.disallowPatternRegex&&d(this.nativeInput,this.disallowPatternRegex),this.value=this.nativeInput.value,this.isCaptionVisible=!!this.caption,this.duetInput.emit({originalEvent:t,value:this.value,component:"duet-textarea"})},this.handleChange=t=>{this.value=this.nativeInput.value,this.duetChange.emit({originalEvent:t,value:this.value,component:"duet-textarea"})},this.handleBlur=t=>{this.duetBlur.emit({originalEvent:t,value:this.value,component:"duet-textarea"})},this.handleFocus=t=>{this.duetFocus.emit({originalEvent:t,value:this.value,component:"duet-textarea"})},this.margin="auto",this.accessibleActiveDescendant=void 0,this.accessibleAutocomplete=void 0,this.accessibleControls=void 0,this.accessibleDetails=void 0,this.accessibleLabelledBy=void 0,this.accessibleDescription=void 0,this.accessibleOwns=void 0,this.accessibleDescribedBy=void 0,this.theme="",this.expand=!1,this.disabled=!1,this.identifier=void 0,this.required=!1,this.label="label",this.labelHidden=!1,this.name=void 0,this.placeholder=void 0,this.caption=void 0,this.echoPlaceholder=!1,this.maxlength=void 0,this.minlength=void 0,this.error="",this.role=void 0,this.tooltip="",this.tooltipDirection="auto",this.value="",this.disallowPattern=null,this.counter=!1,this.counterLabel=void 0}disallowedPatternChange(){this.disallowPatternRegex=this.disallowPattern?new RegExp(this.disallowPattern,"g"):null}componentWillLoad(){s(this),this.disallowedPatternChange(),this.isCaptionVisible=!!this.caption,this.counter&&null==this.maxlength&&console.warn("[DUET WARNING]: counter will only take effect if maxlength is set"),this.counter||null==this.counterLabel||console.warn("[DUET WARNING]: counter-label is redundant unless used with counter"),this.counter&&!this.counterLabel&&console.warn("[DUET WARNING]: counter requires counter-label to be set")}async setFocus(t){this.nativeInput.focus(t)}render(){const t=this.identifier||this.textareaId;return a(i,{class:{"duet-m-0":"none"===this.margin,"duet-has-counter":this.counter&&!this.error,"duet-expand":this.expand}},a("div",{class:{"duet-textarea-container":!0,"duet-theme-turva":"turva"===this.theme,"duet-label-hidden":this.labelHidden,"duet-input-top-caption-shown":this.isCaptionVisible,"has-error":!!this.error}},a("duet-label",{theme:"turva"===this.theme?"turva":"default",class:{"duet-has-tooltip":!!this.tooltip},margin:this.isCaptionVisible?"small":"auto",id:this.labelId,for:t},this.label),this.tooltip&&a("duet-tooltip",{direction:this.tooltipDirection,accessibleInputLabel:this.label,theme:"turva"===this.theme?"turva":"default"},this.tooltip),this.caption&&a("duet-caption",{id:this.topCaptionId,size:"medium",theme:"turva"===this.theme?"turva":"default"},this.caption),a("div",{class:"duet-textarea-wrapper"},this.placeholder&&this.echoPlaceholder&&this.value&&a("duet-caption",{id:this.topCaptionPlaceholderId,class:"duet-textarea-placeholder",size:"small"},this.placeholder),a("textarea",{onInput:this.handleInput,onChange:this.handleChange,onBlur:this.handleBlur,onFocus:this.handleFocus,ref:t=>this.nativeInput=t,class:{"duet-textarea":!0,disabled:this.disabled},value:this.value,disabled:this.disabled,"aria-labelledby":this.accessibleLabelledBy?`${this.errorId} ${this.labelId} ${this.accessibleLabelledBy}`:`${this.errorId} ${this.labelId} `,"aria-controls":this.accessibleControls,"aria-autocomplete":this.accessibleAutocomplete,"aria-errormessage":this.error?this.errorId:null,"aria-activedescendant":this.accessibleActiveDescendant,"aria-owns":this.accessibleOwns,"aria-describedby":`${this.isCaptionVisible?this.topCaptionId:""} ${this.accessibleDescribedBy}`,"aria-details":this.accessibleDetails,"aria-description":this.accessibleDescription,placeholder:this.placeholder,spellcheck:"false",required:this.required,minlength:this.minlength,maxlength:this.maxlength,role:this.role,name:this.name,id:t})),a("duet-grid",{alignment:"stretch"},a("duet-grid-item",{margin:"none",fill:!0},a("div",{class:"duet-textarea-help",id:this.errorId,"aria-atomic":"true","aria-live":"polite","aria-relevant":"additions removals"},this.error&&a("span",null,this.error))),a("duet-grid-item",{margin:"none",class:"duet-character-count-caption"},this.counter&&a(u,{theme:this.theme,value:this.value,maxlength:this.maxlength,label:this.counterLabel})))))}get element(){return r(this)}static get watchers(){return{disallowPattern:["disallowedPatternChange"]}}};h.style='*.sc-duet-textarea,*.sc-duet-textarea::after,*.sc-duet-textarea::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.sc-duet-textarea-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;display:block;width:100%;max-width:100%;text-align:left}.sc-duet-textarea-h:last-child,.sc-duet-textarea-h:last-of-type{margin-right:0 !important}@media (min-width: 36em){.sc-duet-textarea-h{width:calc(50% - 16px - 3px)}.duet-expand.sc-duet-textarea-h{width:100% !important}}.duet-m-0.sc-duet-textarea-h{margin:0 !important}duet-tooltip.sc-duet-textarea{position:absolute;top:12px;right:0}@media (min-width: 48em){duet-tooltip.sc-duet-textarea{position:relative;top:4px;right:auto}}.duet-textarea-container.sc-duet-textarea{position:relative;width:100%;height:100%}.duet-textarea-container.sc-duet-textarea .duet-input-top-caption.sc-duet-textarea{display:none}.duet-textarea-container.duet-input-top-caption-shown.sc-duet-textarea .duet-input-top-caption.sc-duet-textarea{display:flex !important}.duet-textarea-wrapper.sc-duet-textarea{position:relative}.duet-textarea-placeholder.sc-duet-textarea{position:absolute;top:-9px;left:9px;z-index:200;display:block;width:auto;max-width:60%;padding:0 0.25rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;background:white}.duet-textarea.sc-duet-textarea{padding:15px !important;position:relative;z-index:100;display:block;width:100%;min-width:8rem;min-height:160px;font-family:"localtapiola-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";font-size:1rem;font-weight:400;font-variant-numeric:tabular-nums;line-height:1.25;color:#00294d;resize:vertical;background:white;border:1px solid #909599;border-radius:4px;transition:150ms ease}.duet-theme-turva.sc-duet-textarea .duet-textarea.sc-duet-textarea{font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";color:#171c3a;border-color:#747475}.has-error.sc-duet-textarea .duet-textarea.sc-duet-textarea{border-color:#de2362 !important}.duet-theme-turva.has-error.sc-duet-textarea .duet-textarea.sc-duet-textarea{border-color:#e02a0d !important}.duet-textarea.sc-duet-textarea::-webkit-input-placeholder{color:#657787;opacity:1 !important;transition:color 300ms ease}.duet-theme-turva.sc-duet-textarea .duet-textarea.sc-duet-textarea::-webkit-input-placeholder{color:#747475}.duet-textarea.sc-duet-textarea:focus::-webkit-input-placeholder{color:#cfd2d4}.duet-theme-turva.sc-duet-textarea .duet-textarea.sc-duet-textarea:focus::-webkit-input-placeholder{color:#cfcfd1}.duet-textarea.sc-duet-textarea::-moz-placeholder{color:#657787;opacity:1 !important}.duet-theme-turva.sc-duet-textarea .duet-textarea.sc-duet-textarea::-moz-placeholder{color:#747475}.duet-textarea.sc-duet-textarea:focus::-moz-placeholder{color:#cfd2d4}.duet-theme-turva.sc-duet-textarea .duet-textarea.sc-duet-textarea:focus::-moz-placeholder{color:#cfcfd1}.duet-textarea.sc-duet-textarea:-ms-input-placeholder{color:#657787}.duet-theme-turva.sc-duet-textarea .duet-textarea.sc-duet-textarea:-ms-input-placeholder{color:#747475}.duet-textarea.sc-duet-textarea:focus:-ms-input-placeholder{color:#cfd2d4}.duet-theme-turva.sc-duet-textarea .duet-textarea.sc-duet-textarea:focus:-ms-input-placeholder{color:#cfcfd1}.duet-textarea[disabled].sc-duet-textarea{color:#657787 !important;cursor:default !important;background:#f5f8fa !important;border-color:#f5f8fa !important}.duet-theme-turva.sc-duet-textarea .duet-textarea[disabled].sc-duet-textarea{color:#747475 !important;background:#f5f5f7 !important;border-color:#f5f5f7 !important}.duet-textarea.sc-duet-textarea:hover:not(:disabled){box-shadow:0 0 0 1px #909599}.duet-theme-turva.sc-duet-textarea .duet-textarea.sc-duet-textarea:hover:not(:disabled){box-shadow:0 0 0 1px #747475}.has-error.sc-duet-textarea .duet-textarea.sc-duet-textarea:hover:not(:disabled){box-shadow:0 0 0 1px #de2362}.duet-theme-turva.has-error.sc-duet-textarea .duet-textarea.sc-duet-textarea:hover:not(:disabled){box-shadow:0 0 0 1px #e02a0d}.duet-textarea.sc-duet-textarea:focus{border-color:#0077b3;outline:0;box-shadow:0 0 0 1px #0077b3;transition:none}.duet-theme-turva.sc-duet-textarea .duet-textarea.sc-duet-textarea:focus{border-color:#171c3a;box-shadow:0 0 0 1px #171c3a}.has-error.sc-duet-textarea .duet-textarea.sc-duet-textarea:focus{box-shadow:0 0 0 1px #de2362}.duet-theme-turva.has-error.sc-duet-textarea .duet-textarea.sc-duet-textarea:focus{box-shadow:0 0 0 1px #e02a0d}.duet-textarea.sc-duet-textarea:not(:focus):not(:hover):invalid{box-shadow:none}.duet-textarea-help.sc-duet-textarea{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;line-height:1.25}.duet-textarea-help.sc-duet-textarea span.sc-duet-textarea{display:block;margin-top:8px}.duet-theme-turva.sc-duet-textarea .duet-textarea-help.sc-duet-textarea{font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";color:#747475}.has-error.sc-duet-textarea .duet-textarea-help.sc-duet-textarea{color:#de2362}.duet-theme-turva.has-error.sc-duet-textarea .duet-textarea-help.sc-duet-textarea{color:#e02a0d}.duet-label-hidden.sc-duet-textarea duet-label.sc-duet-textarea{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);border:0}.duet-character-count.sc-duet-textarea{display:block;margin:8px 0 0 auto}';export{h as duet_textarea}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * Built with Duet Design System
3
3
  */
4
- System.register(["./p-9994bb1c.system.js","./p-33b3aba4.system.js"],(function(e){"use strict";var t,n,r,a,o;return{setters:[function(e){t=e.r;n=e.h;r=e.H;a=e.g},function(e){o=e.i}],execute:function(){var i="*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;width:100%}.duet-toolbar{display:flex;align-items:center;justify-content:center;background:white}.duet-toolbar .container{display:flex;align-items:center;justify-content:space-between;width:100%;max-width:1440px;height:36px;padding:0 28px}.duet-toolbar ::slotted(*){display:flex;align-items:center;justify-content:center;height:100%}.duet-toolbar.duet-theme-turva{background:white}";var s=e("duet_toolbar",function(){function e(e){t(this,e);this.theme=""}e.prototype.componentWillLoad=function(){o(this)};e.prototype.render=function(){return n(r,null,n("div",{class:{"duet-toolbar":true,"duet-theme-turva":this.theme==="turva"},role:"menubar"},n("div",{class:"container"},n("slot",{name:"left"}),n("slot",{name:"right"}))))};Object.defineProperty(e.prototype,"element",{get:function(){return a(this)},enumerable:false,configurable:true});return e}());s.style=i}}}));
4
+ System.register(["./p-6753acd9.system.js","./p-33b3aba4.system.js"],(function(e){"use strict";var t,n,r,a,o;return{setters:[function(e){t=e.r;n=e.h;r=e.H;a=e.g},function(e){o=e.i}],execute:function(){var i="*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;width:100%}.duet-toolbar{display:flex;align-items:center;justify-content:center;background:white}.duet-toolbar .container{display:flex;align-items:center;justify-content:space-between;width:100%;max-width:1440px;height:36px;padding:0 28px}.duet-toolbar ::slotted(*){display:flex;align-items:center;justify-content:center;height:100%}.duet-toolbar.duet-theme-turva{background:white}";var s=e("duet_toolbar",function(){function e(e){t(this,e);this.theme=""}e.prototype.componentWillLoad=function(){o(this)};e.prototype.render=function(){return n(r,null,n("div",{class:{"duet-toolbar":true,"duet-theme-turva":this.theme==="turva"},role:"menubar"},n("div",{class:"container"},n("slot",{name:"left"}),n("slot",{name:"right"}))))};Object.defineProperty(e.prototype,"element",{get:function(){return a(this)},enumerable:false,configurable:true});return e}());s.style=i}}}));
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * Built with Duet Design System
3
3
  */
4
- System.register(["./p-9994bb1c.system.js","./p-33b3aba4.system.js","./p-5f6bd5db.system.js"],(function(e){"use strict";var t,i,o,a,n,l;return{setters:[function(e){t=e.r;i=e.h;o=e.H;a=e.g},function(e){n=e.i},function(e){l=e.c}],execute:function(){var r='*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;margin-bottom:12px !important;display:block;width:100%}:host(.duet-m-0){margin:0 !important}fieldset{width:100%;min-width:0;border:0}legend{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-legend-wrapper{position:relative;display:block;width:100%;font-family:"localtapiola-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";font-size:1rem;font-weight:600;line-height:1.5;color:#00294d;text-align:left;background:transparent}.duet-theme-turva .duet-legend-wrapper{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-fieldset-label{margin-bottom:12px !important;margin-top:8px}.duet-legend-has-caption .duet-fieldset-label{margin-bottom:6px !important}.duet-legend-has-tooltip .duet-fieldset-label{padding-right:36px}@media (min-width: 48em){.duet-legend-has-tooltip .duet-fieldset-label{margin-bottom:3px !important;padding-right:0}}@media (min-width: 48em){.duet-legend-has-tooltip.duet-legend-has-caption .duet-fieldset-label{margin-bottom:-3px !important}}.duet-fieldset-caption{margin-bottom:12px !important}.duet-fieldset-help{display:block;font-family:"localtapiola-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";font-size:0.875rem;font-weight:400;line-height:1.25;color:#de2362;border-radius:4px}.duet-fieldset-help span{display:block;margin-top:12px}.duet-theme-turva .duet-fieldset-help{font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";color:#e02a0d}::slotted(duet-tooltip){position:absolute;top:4px;right:0}@media (min-width: 48em){::slotted(duet-tooltip){position:relative;right:auto}}.duet-legend-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);border:0}';var s=e("duet_fieldset",function(){function e(e){var i=this;t(this,e);this.errorId=l("DuetError");this.labelId=l("DuetLabel");this.checkHasTooltip=function(){i.hasTooltip=!!i.element.querySelector("[slot='tooltip']")};this.hasTooltip=false;this.theme="";this.margin="auto";this.caption=undefined;this.label=undefined;this.error=undefined;this.labelHidden=false}e.prototype.componentWillLoad=function(){n(this);this.checkHasTooltip()};e.prototype.render=function(){return i(o,{class:{"duet-m-0":this.margin==="none"}},i("fieldset",{"aria-labelledby":"".concat(this.errorId," ").concat(this.labelId),"aria-errormessage":this.error?this.errorId:null,class:{"duet-fieldset":true,"duet-theme-turva":this.theme==="turva"}},i("legend",{id:this.labelId},i("span",null,this.label),this.caption&&i("span",null,this.caption)),i("div",{class:{"duet-legend-wrapper":true,"duet-legend-has-caption":!!this.caption,"duet-legend-has-tooltip":this.hasTooltip,"duet-legend-hidden":this.labelHidden}},i("div",{class:"duet-fieldset-label"},i("span",{"aria-hidden":"true"},this.label),i("slot",{onSlotchange:this.checkHasTooltip,name:"tooltip"})),this.caption&&i("div",{class:"duet-fieldset-caption","aria-hidden":"true"},i("duet-caption",{margin:"none"},this.caption))),i("slot",null),i("span",{class:"duet-fieldset-help",id:this.errorId,"aria-atomic":"true","aria-live":"polite","aria-relevant":"additions removals"},this.error&&i("span",null,this.error))))};Object.defineProperty(e.prototype,"element",{get:function(){return a(this)},enumerable:false,configurable:true});return e}());s.style=r}}}));
4
+ System.register(["./p-6753acd9.system.js","./p-33b3aba4.system.js","./p-5f6bd5db.system.js"],(function(e){"use strict";var t,i,o,a,n,l;return{setters:[function(e){t=e.r;i=e.h;o=e.H;a=e.g},function(e){n=e.i},function(e){l=e.c}],execute:function(){var r='*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;margin-bottom:12px !important;display:block;width:100%}:host(.duet-m-0){margin:0 !important}fieldset{width:100%;min-width:0;border:0}legend{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-legend-wrapper{position:relative;display:block;width:100%;font-family:"localtapiola-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";font-size:1rem;font-weight:600;line-height:1.5;color:#00294d;text-align:left;background:transparent}.duet-theme-turva .duet-legend-wrapper{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-fieldset-label{margin-bottom:12px !important;margin-top:8px}.duet-legend-has-caption .duet-fieldset-label{margin-bottom:6px !important}.duet-legend-has-tooltip .duet-fieldset-label{padding-right:36px}@media (min-width: 48em){.duet-legend-has-tooltip .duet-fieldset-label{margin-bottom:3px !important;padding-right:0}}@media (min-width: 48em){.duet-legend-has-tooltip.duet-legend-has-caption .duet-fieldset-label{margin-bottom:-3px !important}}.duet-fieldset-caption{margin-bottom:12px !important}.duet-fieldset-help{display:block;font-family:"localtapiola-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";font-size:0.875rem;font-weight:400;line-height:1.25;color:#de2362;border-radius:4px}.duet-fieldset-help span{display:block;margin-top:12px}.duet-theme-turva .duet-fieldset-help{font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";color:#e02a0d}::slotted(duet-tooltip){position:absolute;top:4px;right:0}@media (min-width: 48em){::slotted(duet-tooltip){position:relative;right:auto}}.duet-legend-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);border:0}';var s=e("duet_fieldset",function(){function e(e){var i=this;t(this,e);this.errorId=l("DuetError");this.labelId=l("DuetLabel");this.checkHasTooltip=function(){i.hasTooltip=!!i.element.querySelector("[slot='tooltip']")};this.hasTooltip=false;this.theme="";this.margin="auto";this.caption=undefined;this.label=undefined;this.error=undefined;this.labelHidden=false}e.prototype.componentWillLoad=function(){n(this);this.checkHasTooltip()};e.prototype.render=function(){return i(o,{class:{"duet-m-0":this.margin==="none"}},i("fieldset",{"aria-labelledby":"".concat(this.errorId," ").concat(this.labelId),"aria-errormessage":this.error?this.errorId:null,class:{"duet-fieldset":true,"duet-theme-turva":this.theme==="turva"}},i("legend",{id:this.labelId},i("span",null,this.label),this.caption&&i("span",null,this.caption)),i("div",{class:{"duet-legend-wrapper":true,"duet-legend-has-caption":!!this.caption,"duet-legend-has-tooltip":this.hasTooltip,"duet-legend-hidden":this.labelHidden}},i("div",{class:"duet-fieldset-label"},i("span",{"aria-hidden":"true"},this.label),i("slot",{onSlotchange:this.checkHasTooltip,name:"tooltip"})),this.caption&&i("div",{class:"duet-fieldset-caption","aria-hidden":"true"},i("duet-caption",{margin:"none"},this.caption))),i("slot",null),i("span",{class:"duet-fieldset-help",id:this.errorId,"aria-atomic":"true","aria-live":"polite","aria-relevant":"additions removals"},this.error&&i("span",null,this.error))))};Object.defineProperty(e.prototype,"element",{get:function(){return a(this)},enumerable:false,configurable:true});return e}());s.style=r}}}));
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * Built with Duet Design System
3
3
  */
4
- System.register(["./p-9994bb1c.system.js","./p-e566ff11.system.js"],(function(t){"use strict";var e,i,a,n,d;return{setters:[function(t){e=t.r;i=t.h;a=t.H;n=t.g},function(t){d=t.i}],execute:function(){var o="*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;display:block;flex:1 0 auto;width:100%}:host(.duet-middle){display:flex}:host(.duet-middle) .duet-layout{padding:36px 28px !important}@media (min-width: 36em){:host(.duet-middle) .duet-layout{padding:48px 36px !important}}@media (min-width: 62em){:host(.duet-middle) .duet-layout{padding:56px !important}}:host(.duet-ie){height:100%}:host(.duet-middle.duet-ie){height:auto}.duet-layout{position:relative;padding:0 16px;margin:48px auto 36px}@media (min-width: 36em){.duet-layout{margin-top:72px}}.duet-layout.duet-m-0{margin-top:0 !important;margin-bottom:0 !important}@media (min-width: 36em){.duet-layout{padding:0 28px}}@media (min-width: 62em){.duet-layout{display:flex;flex-direction:row;padding:0 56px;margin-bottom:48px}}@media (min-width: 76.25em){.duet-layout{max-width:1110px;padding:0}}.duet-main{display:block;width:100%}@media (min-width: 62em){.duet-main{min-width:600px;margin:0 auto}.has-sidebar .duet-main{max-width:734px;margin-right:20px}}";var r=t("duet_section_layout",function(){function t(t){e(this,t);this.margin="auto";this.middle=false}t.prototype.render=function(){return i(a,{class:{"duet-middle":this.middle,"duet-ie":d()}},i("div",{class:{"duet-layout":true,"duet-m-0":this.margin==="none"}},i("section",{class:"duet-main"},i("slot",null))))};Object.defineProperty(t.prototype,"element",{get:function(){return n(this)},enumerable:false,configurable:true});return t}());r.style=o}}}));
4
+ System.register(["./p-6753acd9.system.js","./p-e566ff11.system.js"],(function(t){"use strict";var e,i,a,d,n;return{setters:[function(t){e=t.r;i=t.h;a=t.H;d=t.g},function(t){n=t.i}],execute:function(){var o="*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;display:block;flex:1 0 auto;width:100%}:host(.duet-middle){display:flex}:host(.duet-middle) .duet-layout{padding:36px 28px !important}@media (min-width: 36em){:host(.duet-middle) .duet-layout{padding:48px 36px !important}}@media (min-width: 62em){:host(.duet-middle) .duet-layout{padding:56px !important}}:host(.duet-ie){height:100%}:host(.duet-middle.duet-ie){height:auto}.duet-layout{position:relative;padding:0 16px;margin:48px auto 36px}@media (min-width: 36em){.duet-layout{margin-top:72px}}.duet-layout.duet-m-0{margin-top:0 !important;margin-bottom:0 !important}@media (min-width: 36em){.duet-layout{padding:0 28px}}@media (min-width: 62em){.duet-layout{display:flex;flex-direction:row;padding:0 56px;margin-bottom:48px}}@media (min-width: 76.25em){.duet-layout{max-width:1110px;padding:0}}.duet-main{display:block;width:100%}@media (min-width: 62em){.duet-main{min-width:600px;margin:0 auto}.has-sidebar .duet-main{max-width:734px;margin-right:20px}}";var r=t("duet_section_layout",function(){function t(t){e(this,t);this.margin="auto";this.middle=false}t.prototype.render=function(){return i(a,{class:{"duet-middle":this.middle,"duet-ie":n()}},i("div",{class:{"duet-layout":true,"duet-m-0":this.margin==="none"}},i("section",{class:"duet-main"},i("slot",null))))};Object.defineProperty(t.prototype,"element",{get:function(){return d(this)},enumerable:false,configurable:true});return t}());r.style=o}}}));
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * Built with Duet Design System
3
3
  */
4
- System.register(["./p-9994bb1c.system.js","./p-33b3aba4.system.js"],(function(e){"use strict";var t,n,a,r;return{setters:[function(e){t=e.r;n=e.h;a=e.H},function(e){r=e.i}],execute:function(){var o="*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;display:block;width:100%;height:100%}.duet-empty-state{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;width:100%;height:100%;padding:48px;color:#00294d;text-align:center;background:#f5f8fa;border-radius:4px}.duet-empty-state.duet-theme-turva{color:#171c3a;background:#f5f5f7}";var i=e("duet_empty_state",function(){function e(e){t(this,e);this.theme="";this.icon="messaging-question";this.size="medium"}e.prototype.componentWillLoad=function(){r(this)};e.prototype.render=function(){return n(a,null,n("div",{class:{"duet-empty-state":true,"duet-theme-turva":this.theme==="turva","duet-is-small":this.size==="small"}},n("duet-icon",{color:"currentColor",name:this.icon,size:this.size==="small"?"large":"x-large"}),n("div",null,n("slot",null))))};return e}());i.style=o}}}));
4
+ System.register(["./p-6753acd9.system.js","./p-33b3aba4.system.js"],(function(e){"use strict";var t,n,a,r;return{setters:[function(e){t=e.r;n=e.h;a=e.H},function(e){r=e.i}],execute:function(){var o="*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;display:block;width:100%;height:100%}.duet-empty-state{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;width:100%;height:100%;padding:48px;color:#00294d;text-align:center;background:#f5f8fa;border-radius:4px}.duet-empty-state.duet-theme-turva{color:#171c3a;background:#f5f5f7}";var i=e("duet_empty_state",function(){function e(e){t(this,e);this.theme="";this.icon="messaging-question";this.size="medium"}e.prototype.componentWillLoad=function(){r(this)};e.prototype.render=function(){return n(a,null,n("div",{class:{"duet-empty-state":true,"duet-theme-turva":this.theme==="turva","duet-is-small":this.size==="small"}},n("duet-icon",{color:"currentColor",name:this.icon,size:this.size==="small"?"large":"x-large"}),n("div",null,n("slot",null))))};return e}());i.style=o}}}));
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * Built with Duet Design System
3
3
  */
4
- System.register(["./p-9994bb1c.system.js","./p-33b3aba4.system.js","./p-5f6bd5db.system.js","./p-f69b64c9.system.js","./p-b6d51921.system.js"],(function(e){"use strict";var s,r,a,t,i,o,n;return{setters:[function(e){s=e.r;r=e.h;a=e.H;t=e.g},function(e){i=e.i},function(e){o=e.c},function(e){n=e.g},function(){}],execute:function(){var p="*,*::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:inherit}.duet-progress{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;display:block;width:100%;min-height:1px;}.duet-progress .progress-bar{position:relative;display:block;width:100%;height:inherit;min-height:1px;background-color:#f3f9fc;border-radius:0;box-shadow:none}.duet-theme-turva .duet-progress .progress-bar{background-color:#fcf3f4}.duet-progress .progress-bar>span{display:block;height:inherit;text-indent:-9999px;background-color:#0077b3;border-radius:0}.duet-theme-turva .duet-progress .progress-bar>span{background-color:#c60c30}.duet-progress progress[value]{display:flex;width:100%;height:inherit;min-height:1px;color:#0077b3;border:0 none;-webkit-appearance:none;-moz-appearance:none;appearance:none}.duet-theme-turva .duet-progress progress[value]{color:#c60c30}.duet-progress progress[value]::-webkit-progress-bar{background-color:#f3f9fc;border-radius:0}.duet-theme-turva .duet-progress progress[value]::-webkit-progress-bar{background-color:#fcf3f4}.duet-progress progress[value]::-webkit-progress-value{background-color:#0077b3;background-size:35px 20px, 100% 100%, 100% 100%;border-radius:0;-webkit-animation:animate-stripes 5s linear infinite;animation:animate-stripes 5s linear infinite}.duet-theme-turva .duet-progress progress[value]::-webkit-progress-value{background-color:#c60c30}.duet-progress progress[value] ::-moz-progress-bar{background-color:#f3f9fc}.duet-theme-turva .duet-progress progress[value] ::-moz-progress-bar{background-color:#fcf3f4}";var d=e("duet_progress",function(){function e(e){s(this,e);this.progressId=o("DuetProgress");this.progressLabelId=o("DuetProgressLabel");this.accessibleDescribedBy=undefined;this.accessibleDetails=undefined;this.accessibleLabelledBy=undefined;this.accessibleDescription=undefined;this.accessibleLabel=undefined;this.accessibleLabelUploadDefaults={fi:["lähetys valmis","lähetys käynnissä"],sv:["Uppladdningen är klar","Uppladdning pågår"],en:["upload completed","upload in progress"]};this.accessibleLabelUpload=n(this.accessibleLabelUploadDefaults);this.progress=0;this.caption=undefined;this.height="10px";this.theme=""}e.prototype.componentWillLoad=function(){i(this)};e.prototype.render=function(){return r(a,null,r("div",{"aria-live":this.accessibleLabel?"polite":"off","aria-hidden":this.accessibleLabel?"false":"true","aria-atomic":"true",style:{height:this.height},id:this.progressId,class:{"duet-progress":true,"duet-progress-done":this.progress===100,"duet-progress-start":this.progress===0,"duet-progress-inprogress":this.progress<99&&this.progress!==0,"duet-theme-turva":this.theme==="turva"}},r("duet-visually-hidden",null,r("label",{htmlFor:this.progressLabelId},this.progress!==0&&r("span",null,this.accessibleLabel,", ",this.accessibleLabelUpload[this.progress<99?1:0]))),this.caption&&r("div",{class:"duet-progress-caption"},r("span",null,this.caption)),r("progress",{id:this.progressLabelId,"aria-describedby":this.accessibleDescribedBy,"aria-labelledby":this.accessibleLabelledBy,"aria-details":this.accessibleDetails,"aria-description":this.accessibleDescription,role:"progressbar",value:this.progress,max:"100","aria-valuemin":"0","aria-valuemax":"100"},r("div",{class:"progress-bar"},r("span",{style:{width:"".concat(this.progress,"%;")}},"Progress: ",this.progress,"%")))))};Object.defineProperty(e.prototype,"element",{get:function(){return t(this)},enumerable:false,configurable:true});return e}());d.style=p}}}));
4
+ System.register(["./p-6753acd9.system.js","./p-33b3aba4.system.js","./p-5f6bd5db.system.js","./p-f69b64c9.system.js","./p-b6d51921.system.js"],(function(e){"use strict";var s,r,a,t,i,o,n;return{setters:[function(e){s=e.r;r=e.h;a=e.H;t=e.g},function(e){i=e.i},function(e){o=e.c},function(e){n=e.g},function(){}],execute:function(){var p="*,*::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:inherit}.duet-progress{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;display:block;width:100%;min-height:1px;}.duet-progress .progress-bar{position:relative;display:block;width:100%;height:inherit;min-height:1px;background-color:#f3f9fc;border-radius:0;box-shadow:none}.duet-theme-turva .duet-progress .progress-bar{background-color:#fcf3f4}.duet-progress .progress-bar>span{display:block;height:inherit;text-indent:-9999px;background-color:#0077b3;border-radius:0}.duet-theme-turva .duet-progress .progress-bar>span{background-color:#c60c30}.duet-progress progress[value]{display:flex;width:100%;height:inherit;min-height:1px;color:#0077b3;border:0 none;-webkit-appearance:none;-moz-appearance:none;appearance:none}.duet-theme-turva .duet-progress progress[value]{color:#c60c30}.duet-progress progress[value]::-webkit-progress-bar{background-color:#f3f9fc;border-radius:0}.duet-theme-turva .duet-progress progress[value]::-webkit-progress-bar{background-color:#fcf3f4}.duet-progress progress[value]::-webkit-progress-value{background-color:#0077b3;background-size:35px 20px, 100% 100%, 100% 100%;border-radius:0;-webkit-animation:animate-stripes 5s linear infinite;animation:animate-stripes 5s linear infinite}.duet-theme-turva .duet-progress progress[value]::-webkit-progress-value{background-color:#c60c30}.duet-progress progress[value] ::-moz-progress-bar{background-color:#f3f9fc}.duet-theme-turva .duet-progress progress[value] ::-moz-progress-bar{background-color:#fcf3f4}";var d=e("duet_progress",function(){function e(e){s(this,e);this.progressId=o("DuetProgress");this.progressLabelId=o("DuetProgressLabel");this.accessibleDescribedBy=undefined;this.accessibleDetails=undefined;this.accessibleLabelledBy=undefined;this.accessibleDescription=undefined;this.accessibleLabel=undefined;this.accessibleLabelUploadDefaults={fi:["lähetys valmis","lähetys käynnissä"],sv:["Uppladdningen är klar","Uppladdning pågår"],en:["upload completed","upload in progress"]};this.accessibleLabelUpload=n(this.accessibleLabelUploadDefaults);this.progress=0;this.caption=undefined;this.height="10px";this.theme=""}e.prototype.componentWillLoad=function(){i(this)};e.prototype.render=function(){return r(a,null,r("div",{"aria-live":this.accessibleLabel?"polite":"off","aria-hidden":this.accessibleLabel?"false":"true","aria-atomic":"true",style:{height:this.height},id:this.progressId,class:{"duet-progress":true,"duet-progress-done":this.progress===100,"duet-progress-start":this.progress===0,"duet-progress-inprogress":this.progress<99&&this.progress!==0,"duet-theme-turva":this.theme==="turva"}},r("duet-visually-hidden",null,r("label",{htmlFor:this.progressLabelId},this.progress!==0&&r("span",null,this.accessibleLabel,", ",this.accessibleLabelUpload[this.progress<99?1:0]))),this.caption&&r("div",{class:"duet-progress-caption"},r("span",null,this.caption)),r("progress",{id:this.progressLabelId,"aria-describedby":this.accessibleDescribedBy,"aria-labelledby":this.accessibleLabelledBy,"aria-details":this.accessibleDetails,"aria-description":this.accessibleDescription,role:"progressbar",value:this.progress,max:"100","aria-valuemin":"0","aria-valuemax":"100"},r("div",{class:"progress-bar"},r("span",{style:{width:"".concat(this.progress,"%;")}},"Progress: ",this.progress,"%")))))};Object.defineProperty(e.prototype,"element",{get:function(){return t(this)},enumerable:false,configurable:true});return e}());d.style=p}}}));
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * Built with Duet Design System
3
3
  */
4
- System.register(["./p-9994bb1c.system.js","./p-33b3aba4.system.js","./p-5f6bd5db.system.js","./p-f69b64c9.system.js","./p-b6d51921.system.js"],(function(e){"use strict";var t,i,s,a,n,o,r;return{setters:[function(e){t=e.r;i=e.c;s=e.h;a=e.H},function(e){n=e.i},function(e){o=e.c},function(e){r=e.g},function(){}],execute:function(){var d='*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;display:block;width:100%;max-height:999px;border-radius:4px;transition:opacity 300ms ease, visibility 300ms ease, transform 300ms ease, max-height 300ms ease}:host(:focus){outline:0}:host(.user-is-tabbing:focus){border-radius:4px;box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3), 0 0 0 1px #0077b3}:host(.user-is-tabbing.duet-theme-turva:focus){box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}:host(.duet-alert-is-dismissed){max-height:0;visibility:hidden;opacity:0;transform:scale(0.98)}:host(.duet-alert-is-dismissed) .duet-alert{margin:0 !important}.duet-alert{margin-bottom:16px !important;position:relative;width:100%;padding:16px;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;background:#f2f8fb;border:1px solid #0077b3;border-radius:4px;transition:margin 100ms 300ms ease}.duet-alert.duet-p-0{padding:0 !important}.duet-alert.duet-m-0{margin:0 !important}.duet-alert.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;background:#f3f4f5;border-color:#171c3a}.duet-alert.warning{background:#fffbf4;border-color:#f7b228}.duet-alert.warning.duet-theme-turva{background:#fffaf3;border-color:#faa40f}.duet-alert.danger{background:#fdf4f7;border-color:#de2362}.duet-alert.danger.duet-theme-turva{background:#fdf4f3;border-color:#e02a0d}.duet-alert.success{background:#f2f9f7;border-color:#00875a}.duet-alert.success.duet-theme-turva{background:#f3f9f6;border-color:#08874e}.duet-alert-dismiss{position:absolute;top:2px;right:2px}.duet-alert-container{display:inline-flex;align-items:center;justify-content:center;width:100%;margin:0 auto !important}.duet-alert-container span{width:100%}.duet-alert-has-icon .duet-alert-container{margin-top:2px !important}.duet-alert-icon{display:inline-block;align-self:center;width:20px;min-width:20px;height:20px;margin:0 16px 0 0 !important}.duet-alert-icon duet-icon{width:20px;height:20px}.duet-alert-is-dismissible{padding:16px 48px 16px 16px;text-align:left}.duet-alert-is-dismissible .duet-alert-container{text-align:left}';var u=e("duet_alert",function(){function e(e){var s=this;t(this,e);this.duetDismiss=i(this,"duetDismiss",7);this.descriptiveId=o("DuetAlert");this.handleDismiss=function(e){s.isDismissed=true;s.duetDismiss.emit({component:"duet-alert",originalEvent:e})};this.theme="";this.isDismissed=false;this.timeoutID=undefined;this.accessibleLabelDefaults={fi:"Sulje viesti",sv:"Stäng meddelandet",en:"Close the message"};this.accessibleLabel=r(this.accessibleLabelDefaults);this.announcements=true;this.icon="";this.autoDismiss=undefined;this.margin="auto";this.padding="auto";this.variation="default";this.dismissible=false}e.prototype.componentWillLoad=function(){n(this)};e.prototype.componentDidLoad=function(){var e=this;if(this.autoDismiss){this.timeoutID=setTimeout((function(){return e.handleDismiss()}),this.autoDismiss)}};e.prototype.disconnectedCallback=function(){if(this.timeoutID){clearTimeout(this.timeoutID)}};e.prototype.render=function(){var e;var t=this.theme==="turva"?"secondary-turva":"secondary";var i=this.variation==="danger"||this.variation==="warning"?"alert":"status";return s(a,{class:{"duet-theme-turva":this.theme==="turva","duet-alert-is-dismissed":this.isDismissed},role:this.announcements?i:undefined},s("div",{class:(e={"duet-alert":true,"duet-alert-has-icon":!!this.icon,"duet-alert-is-dismissible":this.dismissible,"duet-p-0":this.padding==="none","duet-m-0":this.margin==="none"},e[this.variation]=true,e["duet-theme-turva"]=this.theme==="turva",e)},s("div",{class:"duet-alert-container"},this.icon&&s("div",{class:"duet-alert-icon"},s("duet-icon",{size:"auto",name:this.icon,color:"currentColor"})),s("span",{id:this.descriptiveId},s("slot",null))),this.dismissible&&s("div",{class:"duet-alert-dismiss"},s("duet-button",{variation:"plain",accessibleLabel:this.accessibleLabel,accessibleDescribedBy:this.descriptiveId,color:t,iconSize:"medium",icon:"navigation-close",iconOnly:true,margin:"none",theme:this.theme,onClick:this.handleDismiss,fixed:true}))))};return e}());u.style=d}}}));
4
+ System.register(["./p-6753acd9.system.js","./p-33b3aba4.system.js","./p-5f6bd5db.system.js","./p-f69b64c9.system.js","./p-b6d51921.system.js"],(function(e){"use strict";var t,i,s,a,n,o,r;return{setters:[function(e){t=e.r;i=e.c;s=e.h;a=e.H},function(e){n=e.i},function(e){o=e.c},function(e){r=e.g},function(){}],execute:function(){var d='*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;display:block;width:100%;max-height:999px;border-radius:4px;transition:opacity 300ms ease, visibility 300ms ease, transform 300ms ease, max-height 300ms ease}:host(:focus){outline:0}:host(.user-is-tabbing:focus){border-radius:4px;box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3), 0 0 0 1px #0077b3}:host(.user-is-tabbing.duet-theme-turva:focus){box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}:host(.duet-alert-is-dismissed){max-height:0;visibility:hidden;opacity:0;transform:scale(0.98)}:host(.duet-alert-is-dismissed) .duet-alert{margin:0 !important}.duet-alert{margin-bottom:16px !important;position:relative;width:100%;padding:16px;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;background:#f2f8fb;border:1px solid #0077b3;border-radius:4px;transition:margin 100ms 300ms ease}.duet-alert.duet-p-0{padding:0 !important}.duet-alert.duet-m-0{margin:0 !important}.duet-alert.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;background:#f3f4f5;border-color:#171c3a}.duet-alert.warning{background:#fffbf4;border-color:#f7b228}.duet-alert.warning.duet-theme-turva{background:#fffaf3;border-color:#faa40f}.duet-alert.danger{background:#fdf4f7;border-color:#de2362}.duet-alert.danger.duet-theme-turva{background:#fdf4f3;border-color:#e02a0d}.duet-alert.success{background:#f2f9f7;border-color:#00875a}.duet-alert.success.duet-theme-turva{background:#f3f9f6;border-color:#08874e}.duet-alert-dismiss{position:absolute;top:2px;right:2px}.duet-alert-container{display:inline-flex;align-items:center;justify-content:center;width:100%;margin:0 auto !important}.duet-alert-container span{width:100%}.duet-alert-has-icon .duet-alert-container{margin-top:2px !important}.duet-alert-icon{display:inline-block;align-self:center;width:20px;min-width:20px;height:20px;margin:0 16px 0 0 !important}.duet-alert-icon duet-icon{width:20px;height:20px}.duet-alert-is-dismissible{padding:16px 48px 16px 16px;text-align:left}.duet-alert-is-dismissible .duet-alert-container{text-align:left}';var u=e("duet_alert",function(){function e(e){var s=this;t(this,e);this.duetDismiss=i(this,"duetDismiss",7);this.descriptiveId=o("DuetAlert");this.handleDismiss=function(e){s.isDismissed=true;s.duetDismiss.emit({component:"duet-alert",originalEvent:e})};this.theme="";this.isDismissed=false;this.timeoutID=undefined;this.accessibleLabelDefaults={fi:"Sulje viesti",sv:"Stäng meddelandet",en:"Close the message"};this.accessibleLabel=r(this.accessibleLabelDefaults);this.announcements=true;this.icon="";this.autoDismiss=undefined;this.margin="auto";this.padding="auto";this.variation="default";this.dismissible=false}e.prototype.componentWillLoad=function(){n(this)};e.prototype.componentDidLoad=function(){var e=this;if(this.autoDismiss){this.timeoutID=setTimeout((function(){return e.handleDismiss()}),this.autoDismiss)}};e.prototype.disconnectedCallback=function(){if(this.timeoutID){clearTimeout(this.timeoutID)}};e.prototype.render=function(){var e;var t=this.theme==="turva"?"secondary-turva":"secondary";var i=this.variation==="danger"||this.variation==="warning"?"alert":"status";return s(a,{class:{"duet-theme-turva":this.theme==="turva","duet-alert-is-dismissed":this.isDismissed},role:this.announcements?i:undefined},s("div",{class:(e={"duet-alert":true,"duet-alert-has-icon":!!this.icon,"duet-alert-is-dismissible":this.dismissible,"duet-p-0":this.padding==="none","duet-m-0":this.margin==="none"},e[this.variation]=true,e["duet-theme-turva"]=this.theme==="turva",e)},s("div",{class:"duet-alert-container"},this.icon&&s("div",{class:"duet-alert-icon"},s("duet-icon",{size:"auto",name:this.icon,color:"currentColor"})),s("span",{id:this.descriptiveId},s("slot",null))),this.dismissible&&s("div",{class:"duet-alert-dismiss"},s("duet-button",{variation:"plain",accessibleLabel:this.accessibleLabel,accessibleDescribedBy:this.descriptiveId,color:t,iconSize:"medium",icon:"navigation-close",iconOnly:true,margin:"none",theme:this.theme,onClick:this.handleDismiss,fixed:true}))))};return e}());u.style=d}}}));
@@ -1,4 +1,4 @@
1
1
  var __awaiter=this&&this.__awaiter||function(e,t,a,r){function i(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,o){function n(e){try{d(r.next(e))}catch(t){o(t)}}function s(e){try{d(r["throw"](e))}catch(t){o(t)}}function d(e){e.done?a(e.value):i(e.value).then(n,s)}d((r=r.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var a={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,n;return n={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(n[Symbol.iterator]=function(){return this}),n;function s(e){return function(t){return d([e,t])}}function d(n){if(r)throw new TypeError("Generator is already executing.");while(a)try{if(r=1,i&&(o=n[0]&2?i["return"]:n[0]?i["throw"]||((o=i["return"])&&o.call(i),0):i.next)&&!(o=o.call(i,n[1])).done)return o;if(i=0,o)n=[n[0]&2,o.value];switch(n[0]){case 0:case 1:o=n;break;case 4:a.label++;return{value:n[1],done:false};case 5:a.label++;i=n[1];n=[0];continue;case 7:n=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(n[0]===6||n[0]===2)){a=0;continue}if(n[0]===3&&(!o||n[1]>o[0]&&n[1]<o[3])){a.label=n[1];break}if(n[0]===6&&a.label<o[1]){a.label=o[1];o=n;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(n);break}if(o[2])a.ops.pop();a.trys.pop();continue}n=t.call(e,a)}catch(s){n=[6,s];i=0}finally{r=o=0}if(n[0]&5)throw n[1];return{value:n[0]?n[1]:void 0,done:true}}};
2
2
  /*!
3
3
  * Built with Duet Design System
4
- */System.register(["./p-9994bb1c.system.js","./p-33b3aba4.system.js","./p-5f6bd5db.system.js","./p-c466bad9.system.js"],(function(e){"use strict";var t,a,r,i,o,n,s,d;return{setters:[function(e){t=e.r;a=e.c;r=e.h;i=e.H;o=e.g},function(e){n=e.i},function(e){s=e.c},function(e){d=e.c}],execute:function(){var l='*.sc-duet-textarea,*.sc-duet-textarea::after,*.sc-duet-textarea::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.sc-duet-textarea-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;display:block;width:100%;max-width:100%;text-align:left}.sc-duet-textarea-h:last-child,.sc-duet-textarea-h:last-of-type{margin-right:0 !important}@media (min-width: 36em){.sc-duet-textarea-h{width:calc(50% - 16px - 3px)}.duet-expand.sc-duet-textarea-h{width:100% !important}}.duet-m-0.sc-duet-textarea-h{margin:0 !important}duet-tooltip.sc-duet-textarea{position:absolute;top:12px;right:0}@media (min-width: 48em){duet-tooltip.sc-duet-textarea{position:relative;top:4px;right:auto}}.duet-textarea-container.sc-duet-textarea{position:relative;width:100%;height:100%}.duet-textarea-container.sc-duet-textarea .duet-input-top-caption.sc-duet-textarea{display:none}.duet-textarea-container.duet-input-top-caption-shown.sc-duet-textarea .duet-input-top-caption.sc-duet-textarea{display:flex !important}.duet-textarea-wrapper.sc-duet-textarea{position:relative}.duet-textarea-placeholder.sc-duet-textarea{position:absolute;top:-9px;left:9px;z-index:200;display:block;width:auto;max-width:60%;padding:0 0.25rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;background:white}.duet-textarea.sc-duet-textarea{padding:15px !important;position:relative;z-index:100;display:block;width:100%;min-width:8rem;min-height:160px;font-family:"localtapiola-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";font-size:1rem;font-weight:400;font-variant-numeric:tabular-nums;line-height:1.25;color:#00294d;resize:vertical;background:white;border:1px solid #909599;border-radius:4px;transition:150ms ease}.duet-theme-turva.sc-duet-textarea .duet-textarea.sc-duet-textarea{font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";color:#171c3a;border-color:#747475}.has-error.sc-duet-textarea .duet-textarea.sc-duet-textarea{border-color:#de2362 !important}.duet-theme-turva.has-error.sc-duet-textarea .duet-textarea.sc-duet-textarea{border-color:#e02a0d !important}.duet-textarea.sc-duet-textarea::-webkit-input-placeholder{color:#657787;opacity:1 !important;transition:color 300ms ease}.duet-theme-turva.sc-duet-textarea .duet-textarea.sc-duet-textarea::-webkit-input-placeholder{color:#747475}.duet-textarea.sc-duet-textarea:focus::-webkit-input-placeholder{color:#cfd2d4}.duet-theme-turva.sc-duet-textarea .duet-textarea.sc-duet-textarea:focus::-webkit-input-placeholder{color:#cfcfd1}.duet-textarea.sc-duet-textarea::-moz-placeholder{color:#657787;opacity:1 !important}.duet-theme-turva.sc-duet-textarea .duet-textarea.sc-duet-textarea::-moz-placeholder{color:#747475}.duet-textarea.sc-duet-textarea:focus::-moz-placeholder{color:#cfd2d4}.duet-theme-turva.sc-duet-textarea .duet-textarea.sc-duet-textarea:focus::-moz-placeholder{color:#cfcfd1}.duet-textarea.sc-duet-textarea:-ms-input-placeholder{color:#657787}.duet-theme-turva.sc-duet-textarea .duet-textarea.sc-duet-textarea:-ms-input-placeholder{color:#747475}.duet-textarea.sc-duet-textarea:focus:-ms-input-placeholder{color:#cfd2d4}.duet-theme-turva.sc-duet-textarea .duet-textarea.sc-duet-textarea:focus:-ms-input-placeholder{color:#cfcfd1}.duet-textarea[disabled].sc-duet-textarea{color:#657787 !important;cursor:default !important;background:#f5f8fa !important;border-color:#f5f8fa !important}.duet-theme-turva.sc-duet-textarea .duet-textarea[disabled].sc-duet-textarea{color:#747475 !important;background:#f5f5f7 !important;border-color:#f5f5f7 !important}.duet-textarea.sc-duet-textarea:hover:not(:disabled){box-shadow:0 0 0 1px #909599}.duet-theme-turva.sc-duet-textarea .duet-textarea.sc-duet-textarea:hover:not(:disabled){box-shadow:0 0 0 1px #747475}.has-error.sc-duet-textarea .duet-textarea.sc-duet-textarea:hover:not(:disabled){box-shadow:0 0 0 1px #de2362}.duet-theme-turva.has-error.sc-duet-textarea .duet-textarea.sc-duet-textarea:hover:not(:disabled){box-shadow:0 0 0 1px #e02a0d}.duet-textarea.sc-duet-textarea:focus{border-color:#0077b3;outline:0;box-shadow:0 0 0 1px #0077b3;transition:none}.duet-theme-turva.sc-duet-textarea .duet-textarea.sc-duet-textarea:focus{border-color:#171c3a;box-shadow:0 0 0 1px #171c3a}.has-error.sc-duet-textarea .duet-textarea.sc-duet-textarea:focus{box-shadow:0 0 0 1px #de2362}.duet-theme-turva.has-error.sc-duet-textarea .duet-textarea.sc-duet-textarea:focus{box-shadow:0 0 0 1px #e02a0d}.duet-textarea.sc-duet-textarea:not(:focus):not(:hover):invalid{box-shadow:none}.duet-textarea-help.sc-duet-textarea{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;line-height:1.25}.duet-textarea-help.sc-duet-textarea span.sc-duet-textarea{display:block;margin-top:8px}.duet-theme-turva.sc-duet-textarea .duet-textarea-help.sc-duet-textarea{font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";color:#747475}.has-error.sc-duet-textarea .duet-textarea-help.sc-duet-textarea{color:#de2362}.duet-theme-turva.has-error.sc-duet-textarea .duet-textarea-help.sc-duet-textarea{color:#e02a0d}.duet-label-hidden.sc-duet-textarea duet-label.sc-duet-textarea{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);border:0}.duet-character-count.sc-duet-textarea{display:block;margin:8px 0 0 auto}';var u=function(e){var t=e.value,a=e.maxlength,i=e.label,o=e.theme;if(a==null){return}var n=t.length;var s=Math.max(a-n,0);var d=s/a<=.1;return r("div",{class:"duet-character-count"},r("duet-caption",{margin:"none",theme:o,size:"small"},r("duet-visually-hidden",{"aria-live":"polite","aria-atomic":"true",class:"duet-textarea-counter-remaining"},d&&"".concat(s," ").concat(i)),r("span",{"aria-hidden":"true"},n,"/",a)))};var c=e("duet_textarea",function(){function e(e){var r=this;t(this,e);this.duetInput=a(this,"duetInput",7);this.duetChange=a(this,"duetChange",7);this.duetBlur=a(this,"duetBlur",7);this.duetFocus=a(this,"duetFocus",7);this.textareaId=s("DuetTextarea");this.topCaptionId=s("DuetCaptionTop");this.topCaptionPlaceholderId=s("DuetCaptionPlaceholderTop");this.labelId=s("DuetLabel");this.errorId=s("DuetError");this.disallowPatternRegex=null;this.handleInput=function(e){if(r.disallowPatternRegex){d(r.nativeInput,r.disallowPatternRegex)}r.value=r.nativeInput.value;r.isCaptionVisible=!!r.caption;r.duetInput.emit({originalEvent:e,value:r.value,component:"duet-textarea"})};this.handleChange=function(e){r.value=r.nativeInput.value;r.duetChange.emit({originalEvent:e,value:r.value,component:"duet-textarea"})};this.handleBlur=function(e){r.duetBlur.emit({originalEvent:e,value:r.value,component:"duet-textarea"})};this.handleFocus=function(e){r.duetFocus.emit({originalEvent:e,value:r.value,component:"duet-textarea"})};this.margin="auto";this.accessibleActiveDescendant=undefined;this.accessibleAutocomplete=undefined;this.accessibleControls=undefined;this.accessibleDetails=undefined;this.accessibleLabelledBy=undefined;this.accessibleDescription=undefined;this.accessibleOwns=undefined;this.accessibleDescribedBy=undefined;this.theme="";this.expand=false;this.disabled=false;this.identifier=undefined;this.required=false;this.label="label";this.labelHidden=false;this.name=undefined;this.placeholder=undefined;this.caption=undefined;this.echoPlaceholder=false;this.maxlength=undefined;this.minlength=undefined;this.error="";this.role=undefined;this.tooltip="";this.tooltipDirection="auto";this.value="";this.disallowPattern=null;this.counter=false;this.counterLabel=undefined}e.prototype.disallowedPatternChange=function(){this.disallowPatternRegex=this.disallowPattern?new RegExp(this.disallowPattern,"g"):null};e.prototype.componentWillLoad=function(){n(this);this.disallowedPatternChange();this.isCaptionVisible=!!this.caption;if(this.counter&&this.maxlength==null){console.warn("[DUET WARNING]: counter will only take effect if maxlength is set")}if(!this.counter&&this.counterLabel!=null){console.warn("[DUET WARNING]: counter-label is redundant unless used with counter")}if(this.counter&&!this.counterLabel){console.warn("[DUET WARNING]: counter requires counter-label to be set")}};e.prototype.setFocus=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.nativeInput.focus(e);return[2]}))}))};e.prototype.render=function(){var e=this;var t=this.identifier||this.textareaId;return r(i,{class:{"duet-m-0":this.margin==="none","duet-has-counter":this.counter&&!this.error,"duet-expand":this.expand}},r("div",{class:{"duet-textarea-container":true,"duet-theme-turva":this.theme==="turva","duet-label-hidden":this.labelHidden,"duet-input-top-caption-shown":this.isCaptionVisible,"has-error":!!this.error}},r("duet-label",{theme:this.theme==="turva"?"turva":"default",class:{"duet-has-tooltip":!!this.tooltip},margin:this.isCaptionVisible?"small":"auto",id:this.labelId,for:t},this.label),this.tooltip&&r("duet-tooltip",{direction:this.tooltipDirection,accessibleInputLabel:this.label,theme:this.theme==="turva"?"turva":"default"},this.tooltip),this.caption&&r("duet-caption",{id:this.topCaptionId,size:"medium",theme:this.theme==="turva"?"turva":"default"},this.caption),r("div",{class:"duet-textarea-wrapper"},this.placeholder&&this.echoPlaceholder&&this.value&&r("duet-caption",{id:this.topCaptionPlaceholderId,class:"duet-textarea-placeholder",size:"small"},this.placeholder),r("textarea",{onInput:this.handleInput,onChange:this.handleChange,onBlur:this.handleBlur,onFocus:this.handleFocus,ref:function(t){return e.nativeInput=t},class:{"duet-textarea":true,disabled:this.disabled},value:this.value,disabled:this.disabled,"aria-labelledby":this.accessibleLabelledBy?"".concat(this.errorId," ").concat(this.labelId," ").concat(this.accessibleLabelledBy):"".concat(this.errorId," ").concat(this.labelId," "),"aria-controls":this.accessibleControls,"aria-autocomplete":this.accessibleAutocomplete,"aria-errormessage":this.error?this.errorId:null,"aria-activedescendant":this.accessibleActiveDescendant,"aria-owns":this.accessibleOwns,"aria-describedby":"".concat(this.isCaptionVisible?this.topCaptionId:""," ").concat(this.accessibleDescribedBy),"aria-details":this.accessibleDetails,"aria-description":this.accessibleDescription,placeholder:this.placeholder,spellcheck:"false",required:this.required,minlength:this.minlength,maxlength:this.maxlength,role:this.role,name:this.name,id:t})),r("duet-grid",{alignment:"stretch"},r("duet-grid-item",{margin:"none",fill:true},r("div",{class:"duet-textarea-help",id:this.errorId,"aria-atomic":"true","aria-live":"polite","aria-relevant":"additions removals"},this.error&&r("span",null,this.error))),r("duet-grid-item",{margin:"none",class:"duet-character-count-caption"},this.counter&&r(u,{theme:this.theme,value:this.value,maxlength:this.maxlength,label:this.counterLabel})))))};Object.defineProperty(e.prototype,"element",{get:function(){return o(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{disallowPattern:["disallowedPatternChange"]}},enumerable:false,configurable:true});return e}());c.style=l}}}));
4
+ */System.register(["./p-6753acd9.system.js","./p-33b3aba4.system.js","./p-5f6bd5db.system.js","./p-c466bad9.system.js"],(function(e){"use strict";var t,a,r,i,o,n,s,d;return{setters:[function(e){t=e.r;a=e.c;r=e.h;i=e.H;o=e.g},function(e){n=e.i},function(e){s=e.c},function(e){d=e.c}],execute:function(){var l='*.sc-duet-textarea,*.sc-duet-textarea::after,*.sc-duet-textarea::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.sc-duet-textarea-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;display:block;width:100%;max-width:100%;text-align:left}.sc-duet-textarea-h:last-child,.sc-duet-textarea-h:last-of-type{margin-right:0 !important}@media (min-width: 36em){.sc-duet-textarea-h{width:calc(50% - 16px - 3px)}.duet-expand.sc-duet-textarea-h{width:100% !important}}.duet-m-0.sc-duet-textarea-h{margin:0 !important}duet-tooltip.sc-duet-textarea{position:absolute;top:12px;right:0}@media (min-width: 48em){duet-tooltip.sc-duet-textarea{position:relative;top:4px;right:auto}}.duet-textarea-container.sc-duet-textarea{position:relative;width:100%;height:100%}.duet-textarea-container.sc-duet-textarea .duet-input-top-caption.sc-duet-textarea{display:none}.duet-textarea-container.duet-input-top-caption-shown.sc-duet-textarea .duet-input-top-caption.sc-duet-textarea{display:flex !important}.duet-textarea-wrapper.sc-duet-textarea{position:relative}.duet-textarea-placeholder.sc-duet-textarea{position:absolute;top:-9px;left:9px;z-index:200;display:block;width:auto;max-width:60%;padding:0 0.25rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;background:white}.duet-textarea.sc-duet-textarea{padding:15px !important;position:relative;z-index:100;display:block;width:100%;min-width:8rem;min-height:160px;font-family:"localtapiola-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";font-size:1rem;font-weight:400;font-variant-numeric:tabular-nums;line-height:1.25;color:#00294d;resize:vertical;background:white;border:1px solid #909599;border-radius:4px;transition:150ms ease}.duet-theme-turva.sc-duet-textarea .duet-textarea.sc-duet-textarea{font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";color:#171c3a;border-color:#747475}.has-error.sc-duet-textarea .duet-textarea.sc-duet-textarea{border-color:#de2362 !important}.duet-theme-turva.has-error.sc-duet-textarea .duet-textarea.sc-duet-textarea{border-color:#e02a0d !important}.duet-textarea.sc-duet-textarea::-webkit-input-placeholder{color:#657787;opacity:1 !important;transition:color 300ms ease}.duet-theme-turva.sc-duet-textarea .duet-textarea.sc-duet-textarea::-webkit-input-placeholder{color:#747475}.duet-textarea.sc-duet-textarea:focus::-webkit-input-placeholder{color:#cfd2d4}.duet-theme-turva.sc-duet-textarea .duet-textarea.sc-duet-textarea:focus::-webkit-input-placeholder{color:#cfcfd1}.duet-textarea.sc-duet-textarea::-moz-placeholder{color:#657787;opacity:1 !important}.duet-theme-turva.sc-duet-textarea .duet-textarea.sc-duet-textarea::-moz-placeholder{color:#747475}.duet-textarea.sc-duet-textarea:focus::-moz-placeholder{color:#cfd2d4}.duet-theme-turva.sc-duet-textarea .duet-textarea.sc-duet-textarea:focus::-moz-placeholder{color:#cfcfd1}.duet-textarea.sc-duet-textarea:-ms-input-placeholder{color:#657787}.duet-theme-turva.sc-duet-textarea .duet-textarea.sc-duet-textarea:-ms-input-placeholder{color:#747475}.duet-textarea.sc-duet-textarea:focus:-ms-input-placeholder{color:#cfd2d4}.duet-theme-turva.sc-duet-textarea .duet-textarea.sc-duet-textarea:focus:-ms-input-placeholder{color:#cfcfd1}.duet-textarea[disabled].sc-duet-textarea{color:#657787 !important;cursor:default !important;background:#f5f8fa !important;border-color:#f5f8fa !important}.duet-theme-turva.sc-duet-textarea .duet-textarea[disabled].sc-duet-textarea{color:#747475 !important;background:#f5f5f7 !important;border-color:#f5f5f7 !important}.duet-textarea.sc-duet-textarea:hover:not(:disabled){box-shadow:0 0 0 1px #909599}.duet-theme-turva.sc-duet-textarea .duet-textarea.sc-duet-textarea:hover:not(:disabled){box-shadow:0 0 0 1px #747475}.has-error.sc-duet-textarea .duet-textarea.sc-duet-textarea:hover:not(:disabled){box-shadow:0 0 0 1px #de2362}.duet-theme-turva.has-error.sc-duet-textarea .duet-textarea.sc-duet-textarea:hover:not(:disabled){box-shadow:0 0 0 1px #e02a0d}.duet-textarea.sc-duet-textarea:focus{border-color:#0077b3;outline:0;box-shadow:0 0 0 1px #0077b3;transition:none}.duet-theme-turva.sc-duet-textarea .duet-textarea.sc-duet-textarea:focus{border-color:#171c3a;box-shadow:0 0 0 1px #171c3a}.has-error.sc-duet-textarea .duet-textarea.sc-duet-textarea:focus{box-shadow:0 0 0 1px #de2362}.duet-theme-turva.has-error.sc-duet-textarea .duet-textarea.sc-duet-textarea:focus{box-shadow:0 0 0 1px #e02a0d}.duet-textarea.sc-duet-textarea:not(:focus):not(:hover):invalid{box-shadow:none}.duet-textarea-help.sc-duet-textarea{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;line-height:1.25}.duet-textarea-help.sc-duet-textarea span.sc-duet-textarea{display:block;margin-top:8px}.duet-theme-turva.sc-duet-textarea .duet-textarea-help.sc-duet-textarea{font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";color:#747475}.has-error.sc-duet-textarea .duet-textarea-help.sc-duet-textarea{color:#de2362}.duet-theme-turva.has-error.sc-duet-textarea .duet-textarea-help.sc-duet-textarea{color:#e02a0d}.duet-label-hidden.sc-duet-textarea duet-label.sc-duet-textarea{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);border:0}.duet-character-count.sc-duet-textarea{display:block;margin:8px 0 0 auto}';var u=function(e){var t=e.value,a=e.maxlength,i=e.label,o=e.theme;if(a==null){return}var n=t.length;var s=Math.max(a-n,0);var d=s/a<=.1;return r("div",{class:"duet-character-count"},r("duet-caption",{margin:"none",theme:o,size:"small"},r("duet-visually-hidden",{"aria-live":"polite","aria-atomic":"true",class:"duet-textarea-counter-remaining"},d&&"".concat(s," ").concat(i)),r("span",{"aria-hidden":"true"},n,"/",a)))};var c=e("duet_textarea",function(){function e(e){var r=this;t(this,e);this.duetInput=a(this,"duetInput",7);this.duetChange=a(this,"duetChange",7);this.duetBlur=a(this,"duetBlur",7);this.duetFocus=a(this,"duetFocus",7);this.textareaId=s("DuetTextarea");this.topCaptionId=s("DuetCaptionTop");this.topCaptionPlaceholderId=s("DuetCaptionPlaceholderTop");this.labelId=s("DuetLabel");this.errorId=s("DuetError");this.disallowPatternRegex=null;this.handleInput=function(e){if(r.disallowPatternRegex){d(r.nativeInput,r.disallowPatternRegex)}r.value=r.nativeInput.value;r.isCaptionVisible=!!r.caption;r.duetInput.emit({originalEvent:e,value:r.value,component:"duet-textarea"})};this.handleChange=function(e){r.value=r.nativeInput.value;r.duetChange.emit({originalEvent:e,value:r.value,component:"duet-textarea"})};this.handleBlur=function(e){r.duetBlur.emit({originalEvent:e,value:r.value,component:"duet-textarea"})};this.handleFocus=function(e){r.duetFocus.emit({originalEvent:e,value:r.value,component:"duet-textarea"})};this.margin="auto";this.accessibleActiveDescendant=undefined;this.accessibleAutocomplete=undefined;this.accessibleControls=undefined;this.accessibleDetails=undefined;this.accessibleLabelledBy=undefined;this.accessibleDescription=undefined;this.accessibleOwns=undefined;this.accessibleDescribedBy=undefined;this.theme="";this.expand=false;this.disabled=false;this.identifier=undefined;this.required=false;this.label="label";this.labelHidden=false;this.name=undefined;this.placeholder=undefined;this.caption=undefined;this.echoPlaceholder=false;this.maxlength=undefined;this.minlength=undefined;this.error="";this.role=undefined;this.tooltip="";this.tooltipDirection="auto";this.value="";this.disallowPattern=null;this.counter=false;this.counterLabel=undefined}e.prototype.disallowedPatternChange=function(){this.disallowPatternRegex=this.disallowPattern?new RegExp(this.disallowPattern,"g"):null};e.prototype.componentWillLoad=function(){n(this);this.disallowedPatternChange();this.isCaptionVisible=!!this.caption;if(this.counter&&this.maxlength==null){console.warn("[DUET WARNING]: counter will only take effect if maxlength is set")}if(!this.counter&&this.counterLabel!=null){console.warn("[DUET WARNING]: counter-label is redundant unless used with counter")}if(this.counter&&!this.counterLabel){console.warn("[DUET WARNING]: counter requires counter-label to be set")}};e.prototype.setFocus=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.nativeInput.focus(e);return[2]}))}))};e.prototype.render=function(){var e=this;var t=this.identifier||this.textareaId;return r(i,{class:{"duet-m-0":this.margin==="none","duet-has-counter":this.counter&&!this.error,"duet-expand":this.expand}},r("div",{class:{"duet-textarea-container":true,"duet-theme-turva":this.theme==="turva","duet-label-hidden":this.labelHidden,"duet-input-top-caption-shown":this.isCaptionVisible,"has-error":!!this.error}},r("duet-label",{theme:this.theme==="turva"?"turva":"default",class:{"duet-has-tooltip":!!this.tooltip},margin:this.isCaptionVisible?"small":"auto",id:this.labelId,for:t},this.label),this.tooltip&&r("duet-tooltip",{direction:this.tooltipDirection,accessibleInputLabel:this.label,theme:this.theme==="turva"?"turva":"default"},this.tooltip),this.caption&&r("duet-caption",{id:this.topCaptionId,size:"medium",theme:this.theme==="turva"?"turva":"default"},this.caption),r("div",{class:"duet-textarea-wrapper"},this.placeholder&&this.echoPlaceholder&&this.value&&r("duet-caption",{id:this.topCaptionPlaceholderId,class:"duet-textarea-placeholder",size:"small"},this.placeholder),r("textarea",{onInput:this.handleInput,onChange:this.handleChange,onBlur:this.handleBlur,onFocus:this.handleFocus,ref:function(t){return e.nativeInput=t},class:{"duet-textarea":true,disabled:this.disabled},value:this.value,disabled:this.disabled,"aria-labelledby":this.accessibleLabelledBy?"".concat(this.errorId," ").concat(this.labelId," ").concat(this.accessibleLabelledBy):"".concat(this.errorId," ").concat(this.labelId," "),"aria-controls":this.accessibleControls,"aria-autocomplete":this.accessibleAutocomplete,"aria-errormessage":this.error?this.errorId:null,"aria-activedescendant":this.accessibleActiveDescendant,"aria-owns":this.accessibleOwns,"aria-describedby":"".concat(this.isCaptionVisible?this.topCaptionId:""," ").concat(this.accessibleDescribedBy),"aria-details":this.accessibleDetails,"aria-description":this.accessibleDescription,placeholder:this.placeholder,spellcheck:"false",required:this.required,minlength:this.minlength,maxlength:this.maxlength,role:this.role,name:this.name,id:t})),r("duet-grid",{alignment:"stretch"},r("duet-grid-item",{margin:"none",fill:true},r("div",{class:"duet-textarea-help",id:this.errorId,"aria-atomic":"true","aria-live":"polite","aria-relevant":"additions removals"},this.error&&r("span",null,this.error))),r("duet-grid-item",{margin:"none",class:"duet-character-count-caption"},this.counter&&r(u,{theme:this.theme,value:this.value,maxlength:this.maxlength,label:this.counterLabel})))))};Object.defineProperty(e.prototype,"element",{get:function(){return o(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{disallowPattern:["disallowedPatternChange"]}},enumerable:false,configurable:true});return e}());c.style=l}}}));
@@ -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 i,H as n,g as s}from"./p-668f8586.js";import{i as u}from"./p-4ebf1618.js";import{c as r}from"./p-c1325e35.js";import{a,b as o,c as h,d,e as b}from"./p-54f35a79.js";import{a as l,b as m,g as c}from"./p-ede854e1.js";import"./p-5a9d75e1.js";function p(t,e){let i;if("string"==typeof t){let n=t.replace("−","-").replace("‐","-").replace("−","-").replace("–","-").replace("—","-");e&&(n=function(t,e,i=!1){let n;const s=new Intl.NumberFormat(e).format(.5).replace(/[0-9]/g,""),u=new Intl.NumberFormat("en-US").format(.5).replace(/[0-9]/g,""),r=new Intl.NumberFormat(e).format(1e3).replace(/[0-9]/g,""),a=new Intl.NumberFormat("en-US").format(1e3).replace(/[0-9]/g,"");return n=t.replace(s,"DECIMALSEPARATOR"),n=n.replace(r,i?"THOUSANDSEPARATOR":""),n=n.replace("DECIMALSEPARATOR",u),n=n.replace("THOUSANDSEPARATOR",a),n}(n,e,!1)),n=n.replace(/\s+/g,""),n=n.replace(/(?!^-?\d*\.{0,1}\d+$)/g,""),i=parseFloat(n)}if("number"==typeof t&&(i=parseFloat(String(t))),!isNaN(Number(i)))return Number(i);if(null==t)return null;throw new Error("Invalid value passed to SafeParseFloat")}const g=(t,e,i)=>Math.min(Math.max(t,e),i),v=class{constructor(i){t(this,i),this.duetChange=e(this,"duetChange",3),this.duetInput=e(this,"duetInput",3),this.duetBlur=e(this,"duetBlur",7),this.duetFocus=e(this,"duetFocus",7),this.inputId=r("DuetInput"),this.handleFocus=()=>{this.focusedValue=this.value},this.handleKeyDown=t=>{a(t)||o(t)?this.add(t):h(t)||d(t)?this.subtract(t):b(t)&&this.clearValue()},this.handleChange=t=>{const e=t.target;if(e&&e.value){let i=p(e.value,this.locale);(isNaN(i)||null==i)&&(i=this.min||0),this.setValue(i),this.duetInput.emit({component:"duet-number-input",originalEvent:t,value:p(this.value,this.locale).toString(),valueAsNumber:i})}else this.duetInput.emit({component:"duet-number-input",originalEvent:t,value:null,valueAsNumber:null})},this.handleBlur=t=>{const e=t.target;if(e){if(e.value){let n=p(e.value,this.locale);this.rounding&&(i=this.step,n=Math.round(n/i)*i),n=g(n,this.min,this.max),n===p(this.value,this.locale)&&n===p(this.focusedValue,this.locale)||(this.setValue(n),this.emitChange(t))}var i;this.duetChange.emit({originalEvent:t,value:null,valueAsNumber:null,component:"duet-number-input"})}},this.emitChange=t=>{const e=p(this.value,this.locale);this.duetChange.emit({originalEvent:t,value:e.toString(),valueAsNumber:e,component:"duet-number-input"})},this.localizeValue=t=>t.toLocaleString(this.locale),this.setValue=t=>{this.value=this.localizeValue(t),this.duetInputElement.value=`${this.value} ${this.unit}`},this.add=t=>{t&&t.preventDefault();const e=p(this.value,this.locale);if(e===this.max)return;let i=null==e?this.min:e+this.step;i%this.step!=0&&(i-=i%this.step);const n=g(i,this.min,this.max);this.value=this.localizeValue(n),this.emitChange(t)},this.subtract=t=>{t&&t.preventDefault();const e=p(this.value,this.locale);if(e===this.min)return;let i=e-this.step;i%this.step!=0&&(i+=this.step-i%this.step),i=g(i,this.min,this.max),this.value=this.localizeValue(i),this.emitChange(t)},this.language=l(),this.locale=m(this.language).locale,this.unit=m(this.language).money,this.focusedValue=void 0,this.accessibleActiveDescendant=void 0,this.accessibleControls=void 0,this.accessibleDetails=void 0,this.accessibleLabelledBy=void 0,this.accessibleDescription=void 0,this.accessibleOwns=void 0,this.accessibleDescribedBy=void 0,this.accessibleLiveDefaults={fi:"{current} euroa valittuna",en:"{current} euros selected",sv:"{current} euro valt"},this.accessibleLive=c(this.accessibleLiveDefaults,this.language),this.accessibleLiveEnabled=!0,this.accessibleAddDefaults={fi:"Lisää summaan",en:"Add to the amount",sv:"Lägg till beloppet"},this.accessibleAdd=c(this.accessibleAddDefaults,this.language),this.accessibleSubtractDefaults={fi:"Vähennä summasta",en:"Subtract from the amount",sv:"Dra från beloppet"},this.accessibleSubtract=c(this.accessibleSubtractDefaults,this.language),this.theme="",this.margin="auto",this.expand=!1,this.identifier=void 0,this.min=0,this.labelDefaults={fi:"Nimilappu",en:"Label",sv:"Etikett"},this.label=c(this.labelDefaults,this.language),this.labelHidden=!1,this.max=1e6,this.name=void 0,this.error="",this.tooltip="",this.step=5e3,this.rounding=!0,this.role=void 0,this.disabled=!1,this.required=!1,this.value=void 0}componentWillLoad(){u(this),this.value&&(this.value=this.localizeValue(p(this.value,this.locale)))}async setFocus(t){this.duetInputElement.setFocus(t)}clearValue(){this.value=null,this.duetInputElement.value=""}formatAnnouncement(){const t=p(this.value,this.locale);return null==t?"":this.accessibleLive.replace("{current}",t.toString(10))}render(){const t=this.identifier||this.inputId,e=`${this.localizeValue(this.max)} ${this.unit}`.length,s=p(this.value,this.locale);return i(n,{class:{"duet-theme-turva":"turva"===this.theme,"duet-expand":this.expand,"duet-m-0":"none"===this.margin}},i("div",{class:"duet-number-container"},i("duet-input",{ref:t=>this.duetInputElement=t,onDuetChange:t=>this.handleChange(t),onDuetFocus:this.handleFocus,onDuetBlur:t=>this.handleBlur(t),onKeyDown:t=>this.handleKeyDown(t),label:this.label,value:this.value?`${this.value} ${this.unit}`:"",error:this.error,"aria-valuemin":this.min,"aria-valuemax":this.max,"aria-valuenow":null!=s?s:"",maxlength:e,name:this.name,component:"number",required:this.required,disabled:this.disabled,role:this.role,labelHidden:this.labelHidden,tooltip:this.tooltip,identifier:t,theme:this.theme,margin:"none",expand:!0,numericKeyboard:!0,autoComplete:"off",type:"text",accessibleActiveDescendant:this.accessibleActiveDescendant,accessibleLabelledBy:this.accessibleLabelledBy,accessibleDescription:this.accessibleDescription,accessibleDetails:this.accessibleDetails,accessibleControls:this.accessibleControls,accessibleOwns:this.accessibleOwns,accessibleDescribedBy:this.accessibleDescribedBy},i("div",{class:{"duet-number-buttons":!0,"duet-no-label":this.labelHidden}},i("button",{"aria-controls":t,disabled:this.disabled,"aria-disabled":null==s||s===this.min?"true":"false",class:"duet-number-button duet-number-button-subtract",onClick:this.subtract,type:"button"},i("duet-visually-hidden",null,this.accessibleSubtract," ",this.step),i("duet-icon",{icon:'<svg fill="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" role="img"><path d="M.75 12.788a.75.75 0 0 1 0-1.5h22.5a.75.75 0 0 1 0 1.5z"/></svg>',size:"small",margin:"none",color:"turva"===this.theme?"secondary-turva":"secondary"})),i("button",{"aria-controls":t,disabled:this.disabled,"aria-disabled":s===this.max?"true":"false",class:"duet-number-button duet-number-button-add",onClick:this.add,type:"button"},i("duet-visually-hidden",null,this.accessibleAdd," ",this.step),i("duet-icon",{icon:'<svg fill="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" role="img"><path d="M12 24a.75.75 0 0 1-.75-.75v-10.5H.75a.75.75 0 0 1 0-1.5h10.5V.75a.75.75 0 0 1 1.5 0v10.5h10.5a.75.75 0 0 1 0 1.5h-10.5v10.5A.75.75 0 0 1 12 24z"/></svg>',size:"small",margin:"none",color:"turva"===this.theme?"secondary-turva":"secondary"})))),this.accessibleLiveEnabled&&i("duet-visually-hidden",{"aria-live":"polite","aria-atomic":"true","aria-relevant":"all"},this.formatAnnouncement())))}get element(){return s(this)}};v.style='*.sc-duet-number-input,*.sc-duet-number-input::after,*.sc-duet-number-input::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.sc-duet-number-input-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;display:inline-flex;width:100%;min-width:calc(33.333% - 8px);max-width:100%;line-height:1.25;text-align:left;vertical-align:bottom}.sc-duet-number-input-h:last-child,.sc-duet-number-input-h:last-of-type{margin-right:0 !important}@media (min-width: 36em){.sc-duet-number-input-h{width:calc(50% - 16px - 3px)}}.duet-expand.sc-duet-number-input-h{width:100% !important}.duet-m-0.sc-duet-number-input-h{margin:0 !important}.duet-number-container.sc-duet-number-input{position:relative;width:100%}.duet-number-buttons.sc-duet-number-input{-webkit-user-select:none;user-select:none;position:absolute;top:1px;right:1px;z-index:200;width:96px;height:calc(100% - 2px)}.duet-number-buttons.sc-duet-number-input .duet-number-button.sc-duet-number-input{position:relative;display:inline-flex;align-items:center;justify-content:center;width:50%;height:100%;text-align:center;cursor:pointer;background:transparent;-webkit-appearance:none;appearance:none}.duet-number-buttons.sc-duet-number-input .duet-number-button[aria-disabled=true].sc-duet-number-input,.duet-number-buttons.sc-duet-number-input .duet-number-button.sc-duet-number-input:disabled{pointer-events:none}.duet-number-buttons.sc-duet-number-input .duet-number-button[aria-disabled=true].sc-duet-number-input duet-icon.sc-duet-number-input,.duet-number-buttons.sc-duet-number-input .duet-number-button.sc-duet-number-input:disabled duet-icon.sc-duet-number-input{opacity:0.4}.duet-number-buttons.sc-duet-number-input .duet-number-button.sc-duet-number-input:active duet-icon.sc-duet-number-input{transform:translateY(1px)}.duet-number-buttons.sc-duet-number-input .duet-number-button.sc-duet-number-input:focus{outline:0}.user-is-tabbing.sc-duet-number-input-h .duet-number-buttons.sc-duet-number-input .duet-number-button.sc-duet-number-input:focus{z-index:2;box-shadow:0 0 0 2px #0077b3}.duet-theme-turva .user-is-tabbing.sc-duet-number-input-h .duet-number-buttons.sc-duet-number-input .duet-number-button.sc-duet-number-input:focus{box-shadow:0 0 0 2px #171c3a}.duet-number-buttons.sc-duet-number-input .duet-number-button.sc-duet-number-input:first-of-type{border-left:1px solid #cfd2d4}.duet-number-buttons.sc-duet-number-input .duet-number-button.sc-duet-number-input:first-of-type::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-number-buttons.sc-duet-number-input .duet-number-button.sc-duet-number-input:last-of-type{border-top-right-radius:4px;border-bottom-right-radius:4px}.duet-number-buttons.sc-duet-number-input .duet-number-button.sc-duet-number-input:last-of-type::before{position:absolute;top:20%;left:0;width:1px;height:60%;content:"";background:#e1e3e6}.duet-theme-turva.sc-duet-number-input-h .duet-number-buttons.sc-duet-number-input .duet-number-button.sc-duet-number-input:first-of-type::before{background:linear-gradient(to left, rgba(207, 207, 209, 0.2) 0%, rgba(207, 207, 209, 0.2) 1px, rgba(207, 207, 209, 0.1) 1px, rgba(207, 207, 209, 0) 100%)}.duet-theme-turva.sc-duet-number-input-h .duet-number-buttons.sc-duet-number-input .duet-number-button.sc-duet-number-input:last-of-type::before{background:#e4e4e6}';export{v as duet_number_input}
4
+ import{r as t,c as e,h as i,H as n,g as s}from"./p-d75c51a6.js";import{i as u}from"./p-4ebf1618.js";import{c as r}from"./p-c1325e35.js";import{a,b as o,c as h,d,e as b}from"./p-54f35a79.js";import{a as l,b as m,g as c}from"./p-ede854e1.js";import"./p-5a9d75e1.js";function p(t,e){let i;if("string"==typeof t){let n=t.replace("−","-").replace("‐","-").replace("−","-").replace("–","-").replace("—","-");e&&(n=function(t,e,i=!1){let n;const s=new Intl.NumberFormat(e).format(.5).replace(/[0-9]/g,""),u=new Intl.NumberFormat("en-US").format(.5).replace(/[0-9]/g,""),r=new Intl.NumberFormat(e).format(1e3).replace(/[0-9]/g,""),a=new Intl.NumberFormat("en-US").format(1e3).replace(/[0-9]/g,"");return n=t.replace(s,"DECIMALSEPARATOR"),n=n.replace(r,i?"THOUSANDSEPARATOR":""),n=n.replace("DECIMALSEPARATOR",u),n=n.replace("THOUSANDSEPARATOR",a),n}(n,e,!1)),n=n.replace(/\s+/g,""),n=n.replace(/(?!^-?\d*\.{0,1}\d+$)/g,""),i=parseFloat(n)}if("number"==typeof t&&(i=parseFloat(String(t))),!isNaN(Number(i)))return Number(i);if(null==t)return null;throw new Error("Invalid value passed to SafeParseFloat")}const g=(t,e,i)=>Math.min(Math.max(t,e),i),v=class{constructor(i){t(this,i),this.duetChange=e(this,"duetChange",3),this.duetInput=e(this,"duetInput",3),this.duetBlur=e(this,"duetBlur",7),this.duetFocus=e(this,"duetFocus",7),this.inputId=r("DuetInput"),this.handleFocus=()=>{this.focusedValue=this.value},this.handleKeyDown=t=>{a(t)||o(t)?this.add(t):h(t)||d(t)?this.subtract(t):b(t)&&this.clearValue()},this.handleChange=t=>{const e=t.target;if(e&&e.value){let i=p(e.value,this.locale);(isNaN(i)||null==i)&&(i=this.min||0),this.setValue(i),this.duetInput.emit({component:"duet-number-input",originalEvent:t,value:p(this.value,this.locale).toString(),valueAsNumber:i})}else this.duetInput.emit({component:"duet-number-input",originalEvent:t,value:null,valueAsNumber:null})},this.handleBlur=t=>{const e=t.target;if(e){if(e.value){let n=p(e.value,this.locale);this.rounding&&(i=this.step,n=Math.round(n/i)*i),n=g(n,this.min,this.max),n===p(this.value,this.locale)&&n===p(this.focusedValue,this.locale)||(this.setValue(n),this.emitChange(t))}var i;this.duetChange.emit({originalEvent:t,value:null,valueAsNumber:null,component:"duet-number-input"})}},this.emitChange=t=>{const e=p(this.value,this.locale);this.duetChange.emit({originalEvent:t,value:e.toString(),valueAsNumber:e,component:"duet-number-input"})},this.localizeValue=t=>t.toLocaleString(this.locale),this.setValue=t=>{this.value=this.localizeValue(t),this.duetInputElement.value=`${this.value} ${this.unit}`},this.add=t=>{t&&t.preventDefault();const e=p(this.value,this.locale);if(e===this.max)return;let i=null==e?this.min:e+this.step;i%this.step!=0&&(i-=i%this.step);const n=g(i,this.min,this.max);this.value=this.localizeValue(n),this.emitChange(t)},this.subtract=t=>{t&&t.preventDefault();const e=p(this.value,this.locale);if(e===this.min)return;let i=e-this.step;i%this.step!=0&&(i+=this.step-i%this.step),i=g(i,this.min,this.max),this.value=this.localizeValue(i),this.emitChange(t)},this.language=l(),this.locale=m(this.language).locale,this.unit=m(this.language).money,this.focusedValue=void 0,this.accessibleActiveDescendant=void 0,this.accessibleControls=void 0,this.accessibleDetails=void 0,this.accessibleLabelledBy=void 0,this.accessibleDescription=void 0,this.accessibleOwns=void 0,this.accessibleDescribedBy=void 0,this.accessibleLiveDefaults={fi:"{current} euroa valittuna",en:"{current} euros selected",sv:"{current} euro valt"},this.accessibleLive=c(this.accessibleLiveDefaults,this.language),this.accessibleLiveEnabled=!0,this.accessibleAddDefaults={fi:"Lisää summaan",en:"Add to the amount",sv:"Lägg till beloppet"},this.accessibleAdd=c(this.accessibleAddDefaults,this.language),this.accessibleSubtractDefaults={fi:"Vähennä summasta",en:"Subtract from the amount",sv:"Dra från beloppet"},this.accessibleSubtract=c(this.accessibleSubtractDefaults,this.language),this.theme="",this.margin="auto",this.expand=!1,this.identifier=void 0,this.min=0,this.labelDefaults={fi:"Nimilappu",en:"Label",sv:"Etikett"},this.label=c(this.labelDefaults,this.language),this.labelHidden=!1,this.max=1e6,this.name=void 0,this.error="",this.tooltip="",this.step=5e3,this.rounding=!0,this.role=void 0,this.disabled=!1,this.required=!1,this.value=void 0}componentWillLoad(){u(this),this.value&&(this.value=this.localizeValue(p(this.value,this.locale)))}async setFocus(t){this.duetInputElement.setFocus(t)}clearValue(){this.value=null,this.duetInputElement.value=""}formatAnnouncement(){const t=p(this.value,this.locale);return null==t?"":this.accessibleLive.replace("{current}",t.toString(10))}render(){const t=this.identifier||this.inputId,e=`${this.localizeValue(this.max)} ${this.unit}`.length,s=p(this.value,this.locale);return i(n,{class:{"duet-theme-turva":"turva"===this.theme,"duet-expand":this.expand,"duet-m-0":"none"===this.margin}},i("div",{class:"duet-number-container"},i("duet-input",{ref:t=>this.duetInputElement=t,onDuetChange:t=>this.handleChange(t),onDuetFocus:this.handleFocus,onDuetBlur:t=>this.handleBlur(t),onKeyDown:t=>this.handleKeyDown(t),label:this.label,value:this.value?`${this.value} ${this.unit}`:"",error:this.error,"aria-valuemin":this.min,"aria-valuemax":this.max,"aria-valuenow":null!=s?s:"",maxlength:e,name:this.name,component:"number",required:this.required,disabled:this.disabled,role:this.role,labelHidden:this.labelHidden,tooltip:this.tooltip,identifier:t,theme:this.theme,margin:"none",expand:!0,numericKeyboard:!0,autoComplete:"off",type:"text",accessibleActiveDescendant:this.accessibleActiveDescendant,accessibleLabelledBy:this.accessibleLabelledBy,accessibleDescription:this.accessibleDescription,accessibleDetails:this.accessibleDetails,accessibleControls:this.accessibleControls,accessibleOwns:this.accessibleOwns,accessibleDescribedBy:this.accessibleDescribedBy},i("div",{class:{"duet-number-buttons":!0,"duet-no-label":this.labelHidden}},i("button",{"aria-controls":t,disabled:this.disabled,"aria-disabled":null==s||s===this.min?"true":"false",class:"duet-number-button duet-number-button-subtract",onClick:this.subtract,type:"button"},i("duet-visually-hidden",null,this.accessibleSubtract," ",this.step),i("duet-icon",{icon:'<svg fill="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" role="img"><path d="M.75 12.788a.75.75 0 0 1 0-1.5h22.5a.75.75 0 0 1 0 1.5z"/></svg>',size:"small",margin:"none",color:"turva"===this.theme?"secondary-turva":"secondary"})),i("button",{"aria-controls":t,disabled:this.disabled,"aria-disabled":s===this.max?"true":"false",class:"duet-number-button duet-number-button-add",onClick:this.add,type:"button"},i("duet-visually-hidden",null,this.accessibleAdd," ",this.step),i("duet-icon",{icon:'<svg fill="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" role="img"><path d="M12 24a.75.75 0 0 1-.75-.75v-10.5H.75a.75.75 0 0 1 0-1.5h10.5V.75a.75.75 0 0 1 1.5 0v10.5h10.5a.75.75 0 0 1 0 1.5h-10.5v10.5A.75.75 0 0 1 12 24z"/></svg>',size:"small",margin:"none",color:"turva"===this.theme?"secondary-turva":"secondary"})))),this.accessibleLiveEnabled&&i("duet-visually-hidden",{"aria-live":"polite","aria-atomic":"true","aria-relevant":"all"},this.formatAnnouncement())))}get element(){return s(this)}};v.style='*.sc-duet-number-input,*.sc-duet-number-input::after,*.sc-duet-number-input::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.sc-duet-number-input-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;display:inline-flex;width:100%;min-width:calc(33.333% - 8px);max-width:100%;line-height:1.25;text-align:left;vertical-align:bottom}.sc-duet-number-input-h:last-child,.sc-duet-number-input-h:last-of-type{margin-right:0 !important}@media (min-width: 36em){.sc-duet-number-input-h{width:calc(50% - 16px - 3px)}}.duet-expand.sc-duet-number-input-h{width:100% !important}.duet-m-0.sc-duet-number-input-h{margin:0 !important}.duet-number-container.sc-duet-number-input{position:relative;width:100%}.duet-number-buttons.sc-duet-number-input{-webkit-user-select:none;user-select:none;position:absolute;top:1px;right:1px;z-index:200;width:96px;height:calc(100% - 2px)}.duet-number-buttons.sc-duet-number-input .duet-number-button.sc-duet-number-input{position:relative;display:inline-flex;align-items:center;justify-content:center;width:50%;height:100%;text-align:center;cursor:pointer;background:transparent;-webkit-appearance:none;appearance:none}.duet-number-buttons.sc-duet-number-input .duet-number-button[aria-disabled=true].sc-duet-number-input,.duet-number-buttons.sc-duet-number-input .duet-number-button.sc-duet-number-input:disabled{pointer-events:none}.duet-number-buttons.sc-duet-number-input .duet-number-button[aria-disabled=true].sc-duet-number-input duet-icon.sc-duet-number-input,.duet-number-buttons.sc-duet-number-input .duet-number-button.sc-duet-number-input:disabled duet-icon.sc-duet-number-input{opacity:0.4}.duet-number-buttons.sc-duet-number-input .duet-number-button.sc-duet-number-input:active duet-icon.sc-duet-number-input{transform:translateY(1px)}.duet-number-buttons.sc-duet-number-input .duet-number-button.sc-duet-number-input:focus{outline:0}.user-is-tabbing.sc-duet-number-input-h .duet-number-buttons.sc-duet-number-input .duet-number-button.sc-duet-number-input:focus{z-index:2;box-shadow:0 0 0 2px #0077b3}.duet-theme-turva .user-is-tabbing.sc-duet-number-input-h .duet-number-buttons.sc-duet-number-input .duet-number-button.sc-duet-number-input:focus{box-shadow:0 0 0 2px #171c3a}.duet-number-buttons.sc-duet-number-input .duet-number-button.sc-duet-number-input:first-of-type{border-left:1px solid #cfd2d4}.duet-number-buttons.sc-duet-number-input .duet-number-button.sc-duet-number-input:first-of-type::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-number-buttons.sc-duet-number-input .duet-number-button.sc-duet-number-input:last-of-type{border-top-right-radius:4px;border-bottom-right-radius:4px}.duet-number-buttons.sc-duet-number-input .duet-number-button.sc-duet-number-input:last-of-type::before{position:absolute;top:20%;left:0;width:1px;height:60%;content:"";background:#e1e3e6}.duet-theme-turva.sc-duet-number-input-h .duet-number-buttons.sc-duet-number-input .duet-number-button.sc-duet-number-input:first-of-type::before{background:linear-gradient(to left, rgba(207, 207, 209, 0.2) 0%, rgba(207, 207, 209, 0.2) 1px, rgba(207, 207, 209, 0.1) 1px, rgba(207, 207, 209, 0) 100%)}.duet-theme-turva.sc-duet-number-input-h .duet-number-buttons.sc-duet-number-input .duet-number-button.sc-duet-number-input:last-of-type::before{background:#e4e4e6}';export{v as duet_number_input}