@oslokommune/punkt-elements 17.1.2 → 18.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (249) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/dist/{accordion-BeLvLPrB.js → accordion-1_pdxTgJ.js} +27 -27
  3. package/dist/{accordion-B3GBlvUC.cjs → accordion-DobbH-Sv.cjs} +5 -5
  4. package/dist/{alert-Cs4Rmq_J.cjs → alert-COeHz6o2.cjs} +6 -6
  5. package/dist/{alert-DKK_Tb9J.js → alert-xspFetQ8.js} +26 -26
  6. package/dist/{async-directive-Da7TJpnq.cjs → async-directive-B5pcIMfO.cjs} +1 -1
  7. package/dist/{async-directive-BPf6K-V2.js → async-directive-D2Sht790.js} +5 -5
  8. package/dist/{backlink-D1y26pj3.js → backlink-C0jZFnZ2.js} +8 -8
  9. package/dist/{backlink-CMmrKTe4.cjs → backlink-ZMhqHaVs.cjs} +3 -3
  10. package/dist/base-elements/element.d.ts +13 -1
  11. package/dist/base-elements/input-element.d.ts +4 -2
  12. package/dist/{breadcrumbs-B6JGhJgC.cjs → breadcrumbs-BS64xd1s.cjs} +7 -7
  13. package/dist/{breadcrumbs-CcTQ3Grm.js → breadcrumbs-BvMownZN.js} +16 -16
  14. package/dist/{button-2-OSPJkj.js → button-C44vNLFC.js} +28 -28
  15. package/dist/{button-CE97NQIk.cjs → button-CR4CXtnj.cjs} +7 -7
  16. package/dist/{calendar-kn4SrtJy.cjs → calendar-DQ4byeom.cjs} +28 -27
  17. package/dist/{calendar-pOW3R5Pw.js → calendar-DgjCKMMV.js} +82 -68
  18. package/dist/{card-zQ0eKRMV.js → card-DhHqC265.js} +44 -44
  19. package/dist/{card-CETDFkxR.cjs → card-Dpqi6HVt.cjs} +26 -26
  20. package/dist/{checkbox-CH7NpINF.js → checkbox-BQ1K57AB.js} +23 -23
  21. package/dist/{checkbox-CQNr_sEg.cjs → checkbox-CXQxbiaX.cjs} +11 -11
  22. package/dist/{class-map-BeimMvPv.cjs → class-map-CzCE5pqG.cjs} +1 -1
  23. package/dist/{class-map-CnWCnBSX.js → class-map-F1DJHyb7.js} +3 -3
  24. package/dist/{combobox-Bvg0UO9w.cjs → combobox-BV4oDiII.cjs} +19 -18
  25. package/dist/{combobox-CRdYYlxu.js → combobox-DPck39I2.js} +55 -54
  26. package/dist/components/calendar/calendar.d.ts +21 -6
  27. package/dist/components/checkbox/checkbox.d.ts +4 -2
  28. package/dist/components/combobox/combobox-base.d.ts +2 -1
  29. package/dist/components/consent/strings.d.ts +1 -85
  30. package/dist/components/datepicker/datepicker-base.d.ts +0 -3
  31. package/dist/components/datepicker/datepicker-multiple.d.ts +0 -2
  32. package/dist/components/datepicker/datepicker-range.d.ts +0 -2
  33. package/dist/components/datepicker/datepicker-single.d.ts +0 -2
  34. package/dist/components/datepicker/datepicker-utils.d.ts +2 -1
  35. package/dist/components/fileupload/fileupload-base.d.ts +3 -2
  36. package/dist/components/header/header-service.d.ts +3 -1
  37. package/dist/components/header/header.d.ts +2 -1
  38. package/dist/components/helptext/helptext.d.ts +2 -1
  39. package/dist/components/index.d.ts +2 -0
  40. package/dist/components/input-wrapper/input-wrapper.d.ts +4 -2
  41. package/dist/components/radiobutton/radiobutton.d.ts +4 -2
  42. package/dist/components/searchinput/searchinput.d.ts +2 -1
  43. package/dist/{consent-DZEkhgJ1.js → consent-BneInZov.js} +10 -10
  44. package/dist/{consent-CyY3RyoC.cjs → consent-_N9foluG.cjs} +5 -5
  45. package/dist/controllers/strings-controller.d.ts +27 -0
  46. package/dist/{datepicker-VTqSDQk5.cjs → datepicker-9NX5qt2z.cjs} +38 -37
  47. package/dist/{datepicker-ButIas85.js → datepicker-nSSSr1U7.js} +104 -104
  48. package/dist/{directive-helpers-CI8YZqku.js → directive-helpers-BARw3nEZ.js} +1 -1
  49. package/dist/{directive-helpers-BlAV5EQD.cjs → directive-helpers-D6AAMFKs.cjs} +1 -1
  50. package/dist/docs/components/fileupload.d.ts +1 -0
  51. package/dist/element-B8OGznK0.cjs +2 -0
  52. package/dist/{element-ChsFgr_B.js → element-BKSPVgs2.js} +240 -100
  53. package/dist/{element-with-slot-Bj7nm7fO.cjs → element-with-slot-DTxILHVv.cjs} +1 -1
  54. package/dist/{element-with-slot-BvG9ctC-.js → element-with-slot-YUAUFRqw.js} +4 -4
  55. package/dist/fileupload-D05VSbEP.cjs +402 -0
  56. package/dist/{fileupload-D5IQ9HDe.js → fileupload-E0LGGNgj.js} +370 -380
  57. package/dist/{footer-DbYQUYNR.cjs → footer-DBApIdGh.cjs} +32 -32
  58. package/dist/{footer-DrR64HiK.js → footer-DYilVBMC.js} +91 -91
  59. package/dist/format-B8meU8Tm.cjs +1 -0
  60. package/dist/format-BTeSVkED.js +18 -0
  61. package/dist/{header-ClgIac6n.cjs → header-B7tbX-Ok.cjs} +84 -84
  62. package/dist/{header-menu-BAsUNKSx.cjs → header-menu-1FFWhvNc.cjs} +24 -24
  63. package/dist/{header-menu-hVPXsb8g.js → header-menu-D522-VTV.js} +75 -75
  64. package/dist/{header-KvJ1mGwA.js → header-v3GWAzOK.js} +267 -264
  65. package/dist/{heading-CFmiSuCQ.cjs → heading-CvytvcL7.cjs} +1 -1
  66. package/dist/{heading-g-_IUB5T.js → heading-rx_oSCqe.js} +16 -16
  67. package/dist/helptext-DYFdcylX.cjs +27 -0
  68. package/dist/{helptext-DZng1D5i.js → helptext-LShGPm-b.js} +18 -19
  69. package/dist/{icon-9iwd2F2l.cjs → icon-BmMC09mi.cjs} +1 -1
  70. package/dist/{icon-D-LA22xD.js → icon-HYU1f54x.js} +17 -17
  71. package/dist/{if-defined-CGzIlZ9-.js → if-defined-BF8XcDi5.js} +1 -1
  72. package/dist/if-defined-CVYApOgK.cjs +1 -0
  73. package/dist/{input-element-DBMNBplu.js → input-element-D07DmR34.js} +121 -120
  74. package/dist/input-element-DumGj_oJ.cjs +1 -0
  75. package/dist/input-wrapper-Cci_wTvD.js +308 -0
  76. package/dist/input-wrapper-DDfapoRX.cjs +58 -0
  77. package/dist/{link-DK7gvmnj.cjs → link-11g2ZNin.cjs} +4 -4
  78. package/dist/{link-D-Eqm5KH.js → link-CQK0SH4H.js} +13 -13
  79. package/dist/{linkcard-zqbg7Oqm.js → linkcard-B4GlmjJ6.js} +16 -16
  80. package/dist/linkcard-DNYsVlV6.cjs +13 -0
  81. package/dist/{listbox-Dc4rGdPi.cjs → listbox-BlFRhyI7.cjs} +15 -15
  82. package/dist/{listbox-va_E8afs.js → listbox-wd_OofyF.js} +100 -99
  83. package/dist/{loader-D_RDICnw.js → loader-0C3qVk16.js} +14 -14
  84. package/dist/{loader-CMUkVJmE.cjs → loader-B9u2qUlR.cjs} +5 -5
  85. package/dist/{messagebox-Cv8LaSxv.cjs → messagebox-BD5tGmT-.cjs} +5 -5
  86. package/dist/{messagebox-Cw-OWDya.js → messagebox-C-y1ICmr.js} +15 -15
  87. package/dist/{modal-BtInv031.cjs → modal-BzPGQYCs.cjs} +8 -8
  88. package/dist/{modal-D0t_X2dX.js → modal-Cghs3w-d.js} +20 -20
  89. package/dist/pkt-accordion.cjs +1 -1
  90. package/dist/pkt-accordion.js +1 -1
  91. package/dist/pkt-alert.cjs +1 -1
  92. package/dist/pkt-alert.js +1 -1
  93. package/dist/pkt-backlink.cjs +1 -1
  94. package/dist/pkt-backlink.js +1 -1
  95. package/dist/pkt-breadcrumbs.cjs +1 -1
  96. package/dist/pkt-breadcrumbs.js +1 -1
  97. package/dist/pkt-button.cjs +1 -1
  98. package/dist/pkt-button.js +1 -1
  99. package/dist/pkt-calendar.cjs +1 -1
  100. package/dist/pkt-calendar.js +1 -1
  101. package/dist/pkt-card.cjs +1 -1
  102. package/dist/pkt-card.js +1 -1
  103. package/dist/pkt-checkbox.cjs +1 -1
  104. package/dist/pkt-checkbox.js +1 -1
  105. package/dist/pkt-combobox.cjs +1 -1
  106. package/dist/pkt-combobox.js +1 -1
  107. package/dist/pkt-consent.cjs +1 -1
  108. package/dist/pkt-consent.js +1 -1
  109. package/dist/pkt-datepicker.cjs +1 -1
  110. package/dist/pkt-datepicker.js +1 -1
  111. package/dist/pkt-fileupload.cjs +1 -1
  112. package/dist/pkt-fileupload.js +1 -1
  113. package/dist/pkt-footer.cjs +1 -1
  114. package/dist/pkt-footer.js +1 -1
  115. package/dist/pkt-header-menu.cjs +1 -1
  116. package/dist/pkt-header-menu.js +1 -1
  117. package/dist/pkt-header.cjs +1 -1
  118. package/dist/pkt-header.js +1 -1
  119. package/dist/pkt-heading.cjs +1 -1
  120. package/dist/pkt-heading.js +1 -1
  121. package/dist/pkt-helptext.cjs +1 -1
  122. package/dist/pkt-helptext.js +1 -1
  123. package/dist/pkt-icon.cjs +1 -1
  124. package/dist/pkt-icon.js +1 -1
  125. package/dist/pkt-index.cjs +1 -1
  126. package/dist/pkt-index.js +35 -34
  127. package/dist/pkt-input-wrapper.cjs +1 -1
  128. package/dist/pkt-input-wrapper.js +1 -1
  129. package/dist/pkt-link.cjs +1 -1
  130. package/dist/pkt-link.js +1 -1
  131. package/dist/pkt-linkcard.cjs +1 -1
  132. package/dist/pkt-linkcard.js +1 -1
  133. package/dist/pkt-listbox.cjs +1 -1
  134. package/dist/pkt-listbox.js +1 -1
  135. package/dist/pkt-loader.cjs +1 -1
  136. package/dist/pkt-loader.js +1 -1
  137. package/dist/pkt-messagebox.cjs +1 -1
  138. package/dist/pkt-messagebox.js +1 -1
  139. package/dist/pkt-modal.cjs +1 -1
  140. package/dist/pkt-modal.js +1 -1
  141. package/dist/{pkt-options-controller-C5EBX2T0.cjs → pkt-options-controller-CEEAqXaB.cjs} +1 -1
  142. package/dist/{pkt-options-controller-B77vH3PE.js → pkt-options-controller-PtjhmTGk.js} +1 -1
  143. package/dist/pkt-progressbar.cjs +1 -1
  144. package/dist/pkt-progressbar.js +1 -1
  145. package/dist/pkt-radiobutton.cjs +1 -1
  146. package/dist/pkt-radiobutton.js +1 -1
  147. package/dist/pkt-searchinput.cjs +1 -1
  148. package/dist/pkt-searchinput.js +1 -1
  149. package/dist/pkt-select.cjs +1 -1
  150. package/dist/pkt-select.js +1 -1
  151. package/dist/pkt-tabs.cjs +1 -1
  152. package/dist/pkt-tabs.js +1 -1
  153. package/dist/pkt-tag.cjs +1 -1
  154. package/dist/pkt-tag.js +1 -1
  155. package/dist/pkt-textarea.cjs +1 -1
  156. package/dist/pkt-textarea.js +1 -1
  157. package/dist/pkt-textinput.cjs +1 -1
  158. package/dist/pkt-textinput.js +1 -1
  159. package/dist/pkt-timepicker.cjs +1 -1
  160. package/dist/pkt-timepicker.js +1 -1
  161. package/dist/{progressbar-CbcfLerF.js → progressbar-BexQQw1o.js} +21 -21
  162. package/dist/{progressbar-D5MmnQId.cjs → progressbar-X9mSvpjw.cjs} +5 -5
  163. package/dist/{radiobutton-BUnf3EPi.js → radiobutton-CkhTasn4.js} +24 -24
  164. package/dist/{radiobutton-DpsO1F-8.cjs → radiobutton-ln29Ad3U.cjs} +8 -8
  165. package/dist/{ref-CQoEIIp0.cjs → ref-CHbJYtKE.cjs} +1 -1
  166. package/dist/{ref-CWD6PjVd.js → ref-Chc_DZAb.js} +2 -2
  167. package/dist/{repeat-sY6B7fAT.cjs → repeat-CHDs__rN.cjs} +1 -1
  168. package/dist/{repeat-C02g7d5S.js → repeat-P9SMlKd5.js} +4 -4
  169. package/dist/searchinput-CPgMEAZZ.cjs +60 -0
  170. package/dist/{searchinput-DwnjsvJ1.js → searchinput-Da7dKHBH.js} +43 -43
  171. package/dist/{select-BOJi6H6T.cjs → select-DCuvdAuK.cjs} +4 -3
  172. package/dist/{select-DMre80qs.js → select-jabMSjft.js} +21 -20
  173. package/dist/shared-strings/consent.d.ts +71 -0
  174. package/dist/shared-strings/format.d.ts +21 -0
  175. package/dist/shared-strings/index.d.ts +14 -0
  176. package/dist/shared-strings/nb.d.ts +118 -0
  177. package/dist/shared-strings/resolve.d.ts +12 -0
  178. package/dist/shared-strings/store.d.ts +27 -0
  179. package/dist/shared-strings/types.d.ts +29 -0
  180. package/dist/shared-types/fileupload.d.ts +0 -27
  181. package/dist/shared-types/index.d.ts +1 -2
  182. package/dist/shared-utils/combobox/index.d.ts +1 -0
  183. package/dist/shared-utils/combobox/input-utils.d.ts +2 -1
  184. package/dist/shared-utils/combobox/messages.d.ts +7 -0
  185. package/dist/shared-utils/combobox/option-utils.d.ts +2 -1
  186. package/dist/shared-utils/combobox/selection-manager.d.ts +3 -2
  187. package/dist/{tabs-Cf9ai0FD.cjs → tabs-DV5CQNDL.cjs} +7 -7
  188. package/dist/{tabs-TvxgbrCF.js → tabs-D_hoi1zu.js} +32 -32
  189. package/dist/tag-BxYulmZn.cjs +27 -0
  190. package/dist/{tag-Ds6n1LIs.js → tag-DK5SgKry.js} +33 -32
  191. package/dist/tests/strings-override.test.d.ts +0 -0
  192. package/dist/{textarea-vfzIcXhX.js → textarea-BR7Riace.js} +30 -29
  193. package/dist/{textarea-BydiLM9Z.cjs → textarea-ffBD_VHq.cjs} +3 -2
  194. package/dist/{textinput-CMP2jPP_.js → textinput-CRNrsRNV.js} +28 -27
  195. package/dist/{textinput-DGdicNSx.cjs → textinput-CtHFzAux.cjs} +13 -12
  196. package/dist/timepicker-AfgJipo6.cjs +196 -0
  197. package/dist/{timepicker-ClwgYywH.js → timepicker-ixs_E5RY.js} +67 -64
  198. package/package.json +3 -3
  199. package/src/components/backlink/backlink.ts +1 -1
  200. package/src/components/breadcrumbs/breadcrumbs.ts +1 -1
  201. package/src/components/calendar/calendar.ts +56 -26
  202. package/src/components/checkbox/checkbox.test.ts +0 -2
  203. package/src/components/checkbox/checkbox.ts +8 -4
  204. package/src/components/combobox/combobox-base.ts +2 -1
  205. package/src/components/combobox/combobox-value.ts +10 -9
  206. package/src/components/combobox/combobox.selection.test.ts +5 -1
  207. package/src/components/combobox/combobox.ts +4 -1
  208. package/src/components/consent/strings.ts +1 -125
  209. package/src/components/datepicker/date-tags.ts +4 -1
  210. package/src/components/datepicker/datepicker-base.ts +2 -6
  211. package/src/components/datepicker/datepicker-multiple.ts +0 -3
  212. package/src/components/datepicker/datepicker-range.ts +4 -7
  213. package/src/components/datepicker/datepicker-single.ts +0 -3
  214. package/src/components/datepicker/datepicker-utils.test.ts +5 -5
  215. package/src/components/datepicker/datepicker-utils.ts +6 -11
  216. package/src/components/datepicker/datepicker.ts +8 -1
  217. package/src/components/fileupload/fileupload-base.ts +25 -16
  218. package/src/components/fileupload/fileupload-renderers.ts +2 -1
  219. package/src/components/fileupload/fileupload.test.ts +16 -0
  220. package/src/components/fileupload/fileupload.ts +19 -15
  221. package/src/components/header/header-global.ts +3 -3
  222. package/src/components/header/header-service.ts +13 -8
  223. package/src/components/header/header.ts +2 -1
  224. package/src/components/helptext/helptext.test.ts +1 -1
  225. package/src/components/helptext/helptext.ts +3 -3
  226. package/src/components/index.ts +9 -0
  227. package/src/components/input-wrapper/input-wrapper.ts +18 -10
  228. package/src/components/listbox/listbox.ts +3 -3
  229. package/src/components/radiobutton/radiobutton.ts +8 -4
  230. package/src/components/searchinput/searchinput.ts +5 -3
  231. package/src/components/select/select.ts +1 -0
  232. package/src/components/tag/tag.ts +2 -1
  233. package/src/components/textarea/textarea.ts +1 -0
  234. package/src/components/textinput/textinput.ts +1 -0
  235. package/src/components/timepicker/timepicker.ts +23 -21
  236. package/dist/element-BA8v6S7z.cjs +0 -2
  237. package/dist/fileupload-BeWiTAoW.cjs +0 -401
  238. package/dist/helptext-CTtKJcML.cjs +0 -27
  239. package/dist/if-defined-B89_ZeCj.cjs +0 -1
  240. package/dist/input-element-DYmQw-fH.cjs +0 -1
  241. package/dist/input-wrapper-BmxNvznr.js +0 -128
  242. package/dist/input-wrapper-D-fPaTbY.js +0 -176
  243. package/dist/input-wrapper-D5PR0rJn.cjs +0 -1
  244. package/dist/input-wrapper-Q-B-aBeb.cjs +0 -54
  245. package/dist/linkcard-B29cmZqh.cjs +0 -13
  246. package/dist/searchinput-Bh975rjX.cjs +0 -60
  247. package/dist/tag-CzojNU7z.cjs +0 -27
  248. package/dist/timepicker-DYrnLHqN.cjs +0 -195
  249. package/dist/translations/no.json.d.ts +0 -94
@@ -1,43 +1,17 @@
1
- import { a as e, n as t, o as n, p as r, s as i, t as a } from "./element-ChsFgr_B.js";
2
- import { t as o } from "./class-map-CnWCnBSX.js";
3
- import "./alert-DKK_Tb9J.js";
4
- import "./icon-D-LA22xD.js";
5
- import { t as s } from "./if-defined-CGzIlZ9-.js";
6
- import { t as c } from "./converters-CkjLSYpa.js";
7
- import { n as l } from "./utils-BwF4QSrq.js";
8
- import "./input-wrapper-BmxNvznr.js";
9
- import { r as u } from "./focus-trap-DG3pEuyJ.js";
10
- import "./modal-D0t_X2dX.js";
11
- import "./progressbar-CbcfLerF.js";
12
- //#region ../../shared-types/fileupload.ts
13
- var d = {
14
- dropZoneDragMultiple: "Dra filer hit for å laste dem opp eller",
15
- dropZoneDragSingle: "Dra en fil hit for å laste den opp eller",
16
- dropZoneDragMultipleThumbnail: "Dra bilder hit for å laste dem opp eller",
17
- dropZoneDragSingleThumbnail: "Dra et bilde hit for å laste det opp eller",
18
- dropZoneDragActiveMultiple: "Slipp filene her",
19
- dropZoneDragActiveSingle: "Slipp filen her",
20
- dropZoneDragActiveMultipleThumbnail: "Slipp bildene her",
21
- dropZoneDragActiveSingleThumbnail: "Slipp bildet her",
22
- dropZoneOpenFileDialogMultiple: "velg filer",
23
- dropZoneOpenFileDialogSingle: "velg en fil",
24
- dropZoneOpenFileDialogMultipleThumbnail: "velg fra kamerarull",
25
- dropZoneOpenFileDialogSingleThumbnail: "velg fra kamerarull",
26
- supportedFormatsPrefix: "Format:",
27
- invalidFormatDefault: (e) => `Ugyldig filtype. Tillatte formater: ${e}`,
28
- sizeTooLargeDefault: (e) => `Filen er for stor. Maks størrelse er ${e}.`,
29
- requiredMissing: "Du må laste opp minst én fil.",
30
- genericValidationRejection: "Filen ble avvist av validering.",
31
- unknownFilename: "Ukjent fil",
32
- fileLabel: (e) => e === 1 ? "fil" : "filer",
33
- srFileAdded: (e) => `Filen «${e}» er lagt til`,
34
- srFilesAdded: (e) => `${e} filer er lagt til`,
35
- srFilesUploadedOfTotal: (e, t, n) => `${e} av ${t} ${n} lastet opp`,
36
- srFilesFailedOfTotal: (e, t, n) => `Feil ved opplasting: ${e} av ${t} ${n} feilet`
37
- };
38
- //#endregion
1
+ import { _ as e, d as t, l as n, n as r, s as i, t as a, u as o } from "./element-BKSPVgs2.js";
2
+ import { t as s } from "./class-map-F1DJHyb7.js";
3
+ import { n as c, t as l } from "./format-BTeSVkED.js";
4
+ import "./alert-xspFetQ8.js";
5
+ import "./icon-HYU1f54x.js";
6
+ import { t as u } from "./if-defined-BF8XcDi5.js";
7
+ import { t as d } from "./converters-CkjLSYpa.js";
8
+ import { n as f } from "./utils-BwF4QSrq.js";
9
+ import "./input-wrapper-Cci_wTvD.js";
10
+ import { r as p } from "./focus-trap-DG3pEuyJ.js";
11
+ import "./modal-Cghs3w-d.js";
12
+ import "./progressbar-BexQQw1o.js";
39
13
  //#region ../../shared-utils/fileupload/size.ts
40
- function f(e) {
14
+ function m(e) {
41
15
  if (e == null || e === "") return;
42
16
  if (typeof e == "number") return Number.isFinite(e) && e > 0 ? e : void 0;
43
17
  let t = String(e).trim(), n = Number(t);
@@ -56,18 +30,18 @@ function f(e) {
56
30
  default: return;
57
31
  }
58
32
  }
59
- function p(e) {
33
+ function h(e) {
60
34
  return e < 1024 ? `${Math.round(e)} B` : e < 1048576 ? `${Math.round(e / 1024)} KB` : e < 1073741824 ? `${Math.round(e / 1048576)} MB` : `${Math.round(e / 1073741824)} GB`;
61
35
  }
62
36
  //#endregion
63
37
  //#region ../../shared-utils/fileupload/formats.ts
64
- function m(e) {
38
+ function g(e) {
65
39
  return Array.isArray(e) ? e.map((e) => String(e).trim().toLowerCase()).filter(Boolean) : [];
66
40
  }
67
- function h(e) {
41
+ function _(e) {
68
42
  return e ? e.split(",").map((e) => e.trim().toLowerCase()).filter(Boolean) : [];
69
43
  }
70
- function g(e, t, n) {
44
+ function v(e, t, n) {
71
45
  let r = e.toLowerCase().replace(/^\./, "");
72
46
  if (r.includes("/")) {
73
47
  if (r.endsWith("/*")) {
@@ -78,42 +52,42 @@ function g(e, t, n) {
78
52
  }
79
53
  return t === r;
80
54
  }
81
- function _(e, t) {
82
- let n = m(t);
55
+ function y(e, t) {
56
+ let n = g(t);
83
57
  if (n.length === 0) return !0;
84
58
  let r = e.name.split(".").pop()?.toLowerCase() ?? "", i = e.type.toLowerCase();
85
- return n.some((e) => g(e, r, i));
59
+ return n.some((e) => v(e, r, i));
86
60
  }
87
- function v(e, t) {
61
+ function b(e, t) {
88
62
  let n = (e ?? "").trim();
89
63
  if (n) return n;
90
- let r = m(t);
64
+ let r = g(t);
91
65
  return r.length === 0 ? "" : r.map((e) => e.includes("/") || e.startsWith(".") ? e : `.${e}`).join(", ");
92
66
  }
93
- function y(e) {
67
+ function x(e) {
94
68
  return e.includes("/") ? e : e.replace(/^\./, "").toUpperCase();
95
69
  }
96
- function b(e, t) {
97
- let n = m(e);
98
- if (n.length > 0) return n.map(y).join(", ");
99
- let r = h(t);
100
- return r.length > 0 ? r.map(y).join(", ") : "";
70
+ function S(e, t) {
71
+ let n = g(e);
72
+ if (n.length > 0) return n.map(x).join(", ");
73
+ let r = _(t);
74
+ return r.length > 0 ? r.map(x).join(", ") : "";
101
75
  }
102
76
  //#endregion
103
77
  //#region ../../shared-utils/fileupload/validation.ts
104
- function x(e, t, n) {
78
+ function C(e, t, n) {
105
79
  return ((e ?? "").trim() || t).replace(/\{(\w+)\}/g, (e, t) => n[t] ?? `{${t}}`);
106
80
  }
107
- function S(e, t) {
108
- let n = m(t.allowedFormats);
109
- if (n.length > 0 && !_(e, n)) {
110
- let e = n.join(", "), r = `Ugyldig filtype. Tillatte formater: ${e}`;
111
- return x(t.formatErrorMessage, r, { formats: e });
81
+ function w(e, t) {
82
+ let n = g(t.allowedFormats);
83
+ if (n.length > 0 && !y(e, n)) {
84
+ let e = n.join(", "), r = i.fileupload.invalidFormat;
85
+ return C(t.formatErrorMessage, r, { formats: e });
112
86
  }
113
- let r = f(t.maxFileSize);
87
+ let r = m(t.maxFileSize);
114
88
  if (r !== void 0 && e.size > r) {
115
- let e = p(r), n = `Filen er for stor. Maks størrelse er ${e}.`;
116
- return x(t.sizeErrorMessage, n, { maxSize: e });
89
+ let e = h(r), n = i.fileupload.sizeTooLarge;
90
+ return C(t.sizeErrorMessage, n, { maxSize: e });
117
91
  }
118
92
  if (t.onFileValidation) {
119
93
  let n = t.onFileValidation(e);
@@ -121,7 +95,7 @@ function S(e, t) {
121
95
  }
122
96
  return null;
123
97
  }
124
- function C(e) {
98
+ function T(e) {
125
99
  let t = e.file;
126
100
  if (t?.type?.startsWith("image/")) return !0;
127
101
  let n = e.attributes?.targetFilename || t?.name || "";
@@ -129,10 +103,10 @@ function C(e) {
129
103
  }
130
104
  //#endregion
131
105
  //#region ../../shared-utils/fileupload/transfers.ts
132
- function w(e) {
106
+ function E(e) {
133
107
  return typeof e == "number" ? "in-progress" : e === "error" ? "error" : "idle";
134
108
  }
135
- function T(e, t, n) {
109
+ function D(e, t, n) {
136
110
  let r = {
137
111
  "in-progress": 0,
138
112
  error: 1,
@@ -147,11 +121,11 @@ function T(e, t, n) {
147
121
  showProgress: r?.showProgress,
148
122
  lastProgress: r?.lastProgress
149
123
  };
150
- }).sort((e, t) => r[w(e.progress)] - r[w(t.progress)]);
124
+ }).sort((e, t) => r[E(e.progress)] - r[E(t.progress)]);
151
125
  }
152
126
  //#endregion
153
127
  //#region ../../shared-utils/fileupload/truncate.ts
154
- function E(e, t) {
128
+ function O(e, t) {
155
129
  return !t || t <= 0 || e.length <= t + 3 ? null : {
156
130
  head: e.slice(0, e.length - t),
157
131
  tail: e.slice(-t)
@@ -159,12 +133,12 @@ function E(e, t) {
159
133
  }
160
134
  //#endregion
161
135
  //#region ../../shared-utils/fileupload/navigation.ts
162
- function D(e, t, n) {
136
+ function k(e, t, n) {
163
137
  return n <= 0 ? 0 : t === "prev" ? e <= 0 ? n - 1 : e - 1 : e >= n - 1 ? 0 : e + 1;
164
138
  }
165
139
  //#endregion
166
140
  //#region ../../shared-utils/fileupload/announcements.ts
167
- function O(e, t) {
141
+ function A(e, t) {
168
142
  let n = e.length;
169
143
  if (n === 0 || !t || t.length === 0) return {
170
144
  totalCount: n,
@@ -184,10 +158,10 @@ function O(e, t) {
184
158
  }
185
159
  //#endregion
186
160
  //#region ../../shared-utils/fileupload/filename.ts
187
- function k(e, t = d.unknownFilename) {
161
+ function j(e, t = i.fileupload.unknownFilename) {
188
162
  return e.attributes?.targetFilename || e.file?.name || t;
189
163
  }
190
- var A = {
164
+ var M = {
191
165
  name: "pkt-fileupload",
192
166
  react: "PktFileUpload",
193
167
  "css-class": "pkt-fileupload",
@@ -491,9 +465,9 @@ var A = {
491
465
  }
492
466
  }
493
467
  }
494
- }, j = class extends a {
468
+ }, N = class extends a {
495
469
  constructor(...e) {
496
- super(...e), this.id = `pkt-fileupload-${l()}`, this.name = "files", this.label = "", this.helptext = "", this.helptextDropdown = "", this.helptextDropdownButton = A.props.helptextDropdownButton.default, this.required = !1, this.multiple = !1, this.disabled = !1, this.fullwidth = !1, this.uploadStrategy = "form", this.itemRenderer = "filename", this.accept = "", this.allowedFormats = [], this.formatErrorMessage = "", this.sizeErrorMessage = "", this.transfers = [], this.addCommentsEnabled = !1, this.renameFilesEnabled = !1, this.extraOperations = [], this.enableImagePreview = !1, this.hasError = !1, this.errorMessage = "", this.optionalTag = !1, this.optionalText = A.props.optionalText.default, this.requiredTag = !1, this.requiredText = A.props.requiredText.default, this.tagText = null, this.truncateTail = 4, this.files = [], this.isDragActive = !1, this.validationErrorMessage = null, this.addedAnnouncement = "", this.thumbnailUrls = {}, this.hasInitializedValue = !1, this.hasWarnedInvalidValueCombo = !1, this.thumbnailFileById = /* @__PURE__ */ new Map(), this.connectedForm = null, this.addedAnnouncementTimer = null, this.requiredSelectionMessage = d.requiredMissing, this.onNativeFileChange = (e) => {
470
+ super(...e), this.id = `pkt-fileupload-${f()}`, this.name = "files", this.label = "", this.helptext = "", this.helptextDropdown = "", this.helptextDropdownButton = M.props.helptextDropdownButton.default, this.required = !1, this.multiple = !1, this.disabled = !1, this.fullwidth = !1, this.uploadStrategy = "form", this.itemRenderer = "filename", this.accept = "", this.allowedFormats = [], this.formatErrorMessage = "", this.sizeErrorMessage = "", this.transfers = [], this.addCommentsEnabled = !1, this.renameFilesEnabled = !1, this.extraOperations = [], this.enableImagePreview = !1, this.hasError = !1, this.errorMessage = "", this.optionalTag = !1, this.requiredTag = !1, this.requiredText = M.props.requiredText.default, this.tagText = null, this.truncateTail = 4, this.files = [], this.isDragActive = !1, this.validationErrorMessage = null, this.addedAnnouncement = "", this.thumbnailUrls = {}, this.hasInitializedValue = !1, this.hasWarnedInvalidValueCombo = !1, this.thumbnailFileById = /* @__PURE__ */ new Map(), this.connectedForm = null, this.addedAnnouncementTimer = null, this.onNativeFileChange = (e) => {
497
471
  let t = e.target;
498
472
  this.addFiles(t.files ? Array.from(t.files) : []), this.uploadStrategy === "custom" && (t.value = "");
499
473
  }, this.openFileDialog = (e) => {
@@ -512,6 +486,9 @@ var A = {
512
486
  !this.required || this.uploadStrategy !== "custom" || this.getCurrentFiles().length > 0 || (this.validationErrorMessage = this.requiredSelectionMessage, e.preventDefault());
513
487
  };
514
488
  }
489
+ get requiredSelectionMessage() {
490
+ return this.pktStrings.get("fileupload").requiredMissing;
491
+ }
515
492
  get isControlled() {
516
493
  return this.value !== void 0;
517
494
  }
@@ -567,13 +544,13 @@ var A = {
567
544
  }
568
545
  this.validationErrorMessage = null;
569
546
  let n = t.map((e) => ({
570
- fileId: l(),
547
+ fileId: f(),
571
548
  file: e,
572
549
  attributes: { targetFilename: e.name }
573
- }));
574
- this.setAddedAnnouncement(n.length === 1 ? d.srFileAdded(n[0].attributes.targetFilename) : d.srFilesAdded(n.length));
575
- let r = this.getCurrentFiles(), i = this.multiple ? [...r, ...n] : [n[0]];
576
- this.commitFiles(i, "add", n.map((e) => e.fileId)), this.uploadStrategy === "custom" && n.forEach((e) => {
550
+ })), r = this.pktStrings.get("fileupload");
551
+ this.setAddedAnnouncement(n.length === 1 ? l(r.srFileAdded, { filename: n[0].attributes.targetFilename }) : l(r.srFilesAdded, { count: n.length }));
552
+ let i = this.getCurrentFiles(), a = this.multiple ? [...i, ...n] : [n[0]];
553
+ this.commitFiles(a, "add", n.map((e) => e.fileId)), this.uploadStrategy === "custom" && n.forEach((e) => {
577
554
  this.dispatchEvent(new CustomEvent("file-upload-requested", {
578
555
  detail: {
579
556
  fileId: e.fileId,
@@ -635,22 +612,22 @@ var A = {
635
612
  return this.transfers.find((t) => t.fileId === e);
636
613
  }
637
614
  isImageFile(e) {
638
- return C(e);
615
+ return T(e);
639
616
  }
640
617
  formatFileSize(e) {
641
- return p(e);
618
+ return h(e);
642
619
  }
643
620
  getResolvedAcceptValue() {
644
- return v(this.accept, this.allowedFormats);
621
+ return b(this.accept, this.allowedFormats);
645
622
  }
646
623
  getSupportedFormatsText() {
647
- return b(this.allowedFormats, this.accept);
624
+ return S(this.allowedFormats, this.accept);
648
625
  }
649
626
  getSortedFilesAndTransfers() {
650
- return T(this.getCurrentFiles(), this.transfers, this.uploadStrategy);
627
+ return D(this.getCurrentFiles(), this.transfers, this.uploadStrategy);
651
628
  }
652
629
  validateFile(e) {
653
- let t = S(e, {
630
+ let t = w(e, {
654
631
  allowedFormats: this.allowedFormats,
655
632
  maxFileSize: this.maxFileSize,
656
633
  formatErrorMessage: this.formatErrorMessage,
@@ -667,7 +644,7 @@ var A = {
667
644
  composed: !0,
668
645
  cancelable: !0
669
646
  });
670
- return this.dispatchEvent(r), n.errorMessage ? n.errorMessage : r.defaultPrevented ? d.genericValidationRejection : null;
647
+ return this.dispatchEvent(r), n.errorMessage ? n.errorMessage : r.defaultPrevented ? this.pktStrings.get("fileupload").genericValidationRejection : null;
671
648
  }
672
649
  syncThumbnailUrls(e) {
673
650
  if (!(typeof URL < "u" && typeof URL.createObjectURL == "function" && typeof URL.revokeObjectURL == "function")) {
@@ -701,12 +678,24 @@ var A = {
701
678
  }
702
679
  getSrUploadedMessage() {
703
680
  if (this.addedAnnouncement) return this.addedAnnouncement;
704
- let { totalCount: e, uploadedCount: t } = O(this.getCurrentFiles(), this.transfers);
705
- return e === 0 || t === 0 ? "" : d.srFilesUploadedOfTotal(t, e, d.fileLabel(e));
681
+ let { totalCount: e, uploadedCount: t } = A(this.getCurrentFiles(), this.transfers);
682
+ if (e === 0 || t === 0) return "";
683
+ let n = this.pktStrings.get("fileupload");
684
+ return l(n.srFilesUploadedOfTotal, {
685
+ uploaded: t,
686
+ total: e,
687
+ label: c(e, n.fileLabelOne, n.fileLabelOther)
688
+ });
706
689
  }
707
690
  getSrErrorsMessage() {
708
- let { totalCount: e, failedCount: t } = O(this.getCurrentFiles(), this.transfers);
709
- return e === 0 || t === 0 ? "" : d.srFilesFailedOfTotal(t, e, d.fileLabel(e));
691
+ let { totalCount: e, failedCount: t } = A(this.getCurrentFiles(), this.transfers);
692
+ if (e === 0 || t === 0) return "";
693
+ let n = this.pktStrings.get("fileupload");
694
+ return l(n.srFilesFailedOfTotal, {
695
+ failed: t,
696
+ total: e,
697
+ label: c(e, n.fileLabelOne, n.fileLabelOther)
698
+ });
710
699
  }
711
700
  syncFormSubmitListener() {
712
701
  let e = this.closest("form");
@@ -716,114 +705,114 @@ var A = {
716
705
  this.connectedForm &&= (this.connectedForm.removeEventListener("submit", this.onHostFormSubmit), null);
717
706
  }
718
707
  };
719
- t([n({ type: String })], j.prototype, "id", void 0), t([n({ type: String })], j.prototype, "name", void 0), t([n({ type: String })], j.prototype, "label", void 0), t([n({ type: String })], j.prototype, "helptext", void 0), t([n({
708
+ r([o({ type: String })], N.prototype, "id", void 0), r([o({ type: String })], N.prototype, "name", void 0), r([o({ type: String })], N.prototype, "label", void 0), r([o({ type: String })], N.prototype, "helptext", void 0), r([o({
720
709
  type: String,
721
710
  attribute: "helptext-dropdown"
722
- })], j.prototype, "helptextDropdown", void 0), t([n({
711
+ })], N.prototype, "helptextDropdown", void 0), r([o({
723
712
  type: String,
724
713
  attribute: "helptext-dropdown-button"
725
- })], j.prototype, "helptextDropdownButton", void 0), t([n({
714
+ })], N.prototype, "helptextDropdownButton", void 0), r([o({
726
715
  type: Boolean,
727
716
  reflect: !0
728
- })], j.prototype, "required", void 0), t([n({
717
+ })], N.prototype, "required", void 0), r([o({
729
718
  type: Boolean,
730
719
  reflect: !0
731
- })], j.prototype, "multiple", void 0), t([n({
720
+ })], N.prototype, "multiple", void 0), r([o({
732
721
  type: Boolean,
733
722
  reflect: !0
734
- })], j.prototype, "disabled", void 0), t([n({
723
+ })], N.prototype, "disabled", void 0), r([o({
735
724
  type: Boolean,
736
725
  reflect: !0,
737
726
  attribute: "fullwidth"
738
- })], j.prototype, "fullwidth", void 0), t([n({
727
+ })], N.prototype, "fullwidth", void 0), r([o({
739
728
  type: String,
740
729
  reflect: !0,
741
730
  attribute: "upload-strategy"
742
- })], j.prototype, "uploadStrategy", void 0), t([n({
731
+ })], N.prototype, "uploadStrategy", void 0), r([o({
743
732
  type: String,
744
733
  reflect: !0,
745
734
  attribute: "item-renderer"
746
- })], j.prototype, "itemRenderer", void 0), t([n({ type: String })], j.prototype, "accept", void 0), t([n({
747
- converter: c.csvToArray,
735
+ })], N.prototype, "itemRenderer", void 0), r([o({ type: String })], N.prototype, "accept", void 0), r([o({
736
+ converter: d.csvToArray,
748
737
  attribute: "allowed-formats"
749
- })], j.prototype, "allowedFormats", void 0), t([n({
738
+ })], N.prototype, "allowedFormats", void 0), r([o({
750
739
  type: String,
751
740
  attribute: "format-error-message"
752
- })], j.prototype, "formatErrorMessage", void 0), t([n({ attribute: "max-file-size" })], j.prototype, "maxFileSize", void 0), t([n({
741
+ })], N.prototype, "formatErrorMessage", void 0), r([o({ attribute: "max-file-size" })], N.prototype, "maxFileSize", void 0), r([o({
753
742
  type: String,
754
743
  attribute: "size-error-message"
755
- })], j.prototype, "sizeErrorMessage", void 0), t([n({ attribute: !1 })], j.prototype, "onFileValidation", void 0), t([n({ attribute: !1 })], j.prototype, "transfers", void 0), t([n({
744
+ })], N.prototype, "sizeErrorMessage", void 0), r([o({ attribute: !1 })], N.prototype, "onFileValidation", void 0), r([o({ attribute: !1 })], N.prototype, "transfers", void 0), r([o({
756
745
  type: Boolean,
757
746
  attribute: "add-comments-enabled"
758
- })], j.prototype, "addCommentsEnabled", void 0), t([n({
747
+ })], N.prototype, "addCommentsEnabled", void 0), r([o({
759
748
  type: Boolean,
760
749
  attribute: "rename-files-enabled"
761
- })], j.prototype, "renameFilesEnabled", void 0), t([n({ attribute: !1 })], j.prototype, "extraOperations", void 0), t([n({
750
+ })], N.prototype, "renameFilesEnabled", void 0), r([o({ attribute: !1 })], N.prototype, "extraOperations", void 0), r([o({
762
751
  type: Boolean,
763
752
  reflect: !0,
764
753
  attribute: "enable-image-preview"
765
- })], j.prototype, "enableImagePreview", void 0), t([n({
754
+ })], N.prototype, "enableImagePreview", void 0), r([o({
766
755
  type: Boolean,
767
756
  attribute: "has-error"
768
- })], j.prototype, "hasError", void 0), t([n({
757
+ })], N.prototype, "hasError", void 0), r([o({
769
758
  type: String,
770
759
  attribute: "error-message"
771
- })], j.prototype, "errorMessage", void 0), t([n({
760
+ })], N.prototype, "errorMessage", void 0), r([o({
772
761
  type: Boolean,
773
762
  attribute: "optional-tag"
774
- })], j.prototype, "optionalTag", void 0), t([n({
763
+ })], N.prototype, "optionalTag", void 0), r([o({
775
764
  type: String,
776
765
  attribute: "optional-text"
777
- })], j.prototype, "optionalText", void 0), t([n({
766
+ })], N.prototype, "optionalText", void 0), r([o({
778
767
  type: Boolean,
779
768
  attribute: "required-tag"
780
- })], j.prototype, "requiredTag", void 0), t([n({
769
+ })], N.prototype, "requiredTag", void 0), r([o({
781
770
  type: String,
782
771
  attribute: "required-text"
783
- })], j.prototype, "requiredText", void 0), t([n({
772
+ })], N.prototype, "requiredText", void 0), r([o({
784
773
  type: String,
785
774
  attribute: "tag-text"
786
- })], j.prototype, "tagText", void 0), t([n({
775
+ })], N.prototype, "tagText", void 0), r([o({
787
776
  type: Number,
788
777
  attribute: "truncate-tail"
789
- })], j.prototype, "truncateTail", void 0), t([n({ attribute: !1 })], j.prototype, "value", void 0), t([n({ attribute: !1 })], j.prototype, "defaultValue", void 0), t([e()], j.prototype, "files", void 0), t([e()], j.prototype, "isDragActive", void 0), t([e()], j.prototype, "validationErrorMessage", void 0), t([e()], j.prototype, "addedAnnouncement", void 0), t([e()], j.prototype, "thumbnailUrls", void 0);
778
+ })], N.prototype, "truncateTail", void 0), r([o({ attribute: !1 })], N.prototype, "value", void 0), r([o({ attribute: !1 })], N.prototype, "defaultValue", void 0), r([n()], N.prototype, "files", void 0), r([n()], N.prototype, "isDragActive", void 0), r([n()], N.prototype, "validationErrorMessage", void 0), r([n()], N.prototype, "addedAnnouncement", void 0), r([n()], N.prototype, "thumbnailUrls", void 0);
790
779
  //#endregion
791
780
  //#region src/components/fileupload/fileupload-operations.ts
792
- var M = "comments", N = (e) => {
781
+ var P = "comments", F = (e) => {
793
782
  let t = new Date(e);
794
783
  return Number.isNaN(t.getTime()) ? e : `${String(t.getDate()).padStart(2, "0")}.${String(t.getMonth() + 1).padStart(2, "0")}.${t.getFullYear()} kl. ${String(t.getHours()).padStart(2, "0")}:${String(t.getMinutes()).padStart(2, "0")}`;
795
- }, P = (e, t, n) => {
784
+ }, I = (e, t, n) => {
796
785
  e.key === "Enter" && (e.preventDefault(), e.stopPropagation(), t()), e.key === "Escape" && (e.preventDefault(), e.stopPropagation(), n());
797
- }, F = (e, t, n) => {
786
+ }, L = (e, t, n) => {
798
787
  e.key === "Escape" && (e.preventDefault(), e.stopPropagation(), n()), (e.metaKey || e.ctrlKey) && e.key === "Enter" && (e.preventDefault(), e.stopPropagation(), t());
799
- }, I = (e) => ({
788
+ }, R = (e) => ({
800
789
  id: "remove",
801
790
  title: "Slett",
802
791
  ariaLabel: "Slett fil",
803
792
  onClick: ({ file: t }) => e(t.fileId)
804
- }), L = () => ({
793
+ }), z = () => ({
805
794
  id: "rename",
806
795
  title: "Rediger",
807
796
  ariaLabel: "Rediger filnavn",
808
- renderInlineUI: (e) => {
809
- let t = e.getAttribute("targetFilename") || e.file.attributes?.targetFilename || e.file.file?.name || "", n = `pkt-fileupload-rename-${e.file.fileId}`, i = () => {
810
- let t = document.getElementById(n)?.value?.trim();
811
- t && e.setAttribute("targetFilename", t), e.close();
797
+ renderInlineUI: (t) => {
798
+ let n = t.getAttribute("targetFilename") || t.file.attributes?.targetFilename || t.file.file?.name || "", r = `pkt-fileupload-rename-${t.file.fileId}`, i = () => {
799
+ let e = document.getElementById(r)?.value?.trim();
800
+ e && t.setAttribute("targetFilename", e), t.close();
812
801
  };
813
- return r`
814
- <label for=${n} class="pkt-sr-only">Endre filnavn</label>
802
+ return e`
803
+ <label for=${r} class="pkt-sr-only">Endre filnavn</label>
815
804
  <input
816
- id=${n}
805
+ id=${r}
817
806
  type="text"
818
807
  class="pkt-fileupload__queue-display__item__rename-input"
819
- ?disabled=${e.disabled}
820
- .value=${t}
821
- @keydown=${(t) => P(t, i, e.close)}
808
+ ?disabled=${t.disabled}
809
+ .value=${n}
810
+ @keydown=${(e) => I(e, i, t.close)}
822
811
  />
823
812
  <button
824
813
  type="button"
825
814
  class="pkt-btn pkt-btn--secondary pkt-btn--small"
826
- ?disabled=${e.disabled}
815
+ ?disabled=${t.disabled}
827
816
  @click=${i}
828
817
  >
829
818
  Lagre
@@ -831,78 +820,78 @@ var M = "comments", N = (e) => {
831
820
  <button
832
821
  type="button"
833
822
  class="pkt-btn pkt-btn--tertiary pkt-btn--small"
834
- ?disabled=${e.disabled}
835
- @click=${e.close}
823
+ ?disabled=${t.disabled}
824
+ @click=${t.close}
836
825
  >
837
826
  Avbryt
838
827
  </button>
839
828
  `;
840
829
  },
841
- renderHidden: (e) => {
842
- let t = e.getAttribute("targetFilename") || e.file.attributes?.targetFilename || e.file.file?.name || "";
843
- return r`<input
830
+ renderHidden: (t) => {
831
+ let n = t.getAttribute("targetFilename") || t.file.attributes?.targetFilename || t.file.file?.name || "";
832
+ return e`<input
844
833
  type="hidden"
845
- name=${`${e.inputName}-targetFilename`}
846
- value=${t}
834
+ name=${`${t.inputName}-targetFilename`}
835
+ value=${n}
847
836
  />`;
848
837
  }
849
- }), R = () => ({
838
+ }), B = () => ({
850
839
  id: "comment",
851
- title: (e) => (e.attributes?.[M] ?? []).length > 0 ? "" : "Legg til kommentar",
840
+ title: (e) => (e.attributes?.[P] ?? []).length > 0 ? "" : "Legg til kommentar",
852
841
  ariaLabel: "Legg til kommentar",
853
- renderExtendedUI: (e) => {
854
- let t = (e.getAttribute(M) ?? [])[0], n = `pkt-fileupload-comment-${e.file.fileId}`, i = () => {
855
- let t = document.getElementById(n)?.value?.trim();
856
- t && e.setAttribute(M, [{
857
- text: t,
842
+ renderExtendedUI: (t) => {
843
+ let n = (t.getAttribute(P) ?? [])[0], r = `pkt-fileupload-comment-${t.file.fileId}`, i = () => {
844
+ let e = document.getElementById(r)?.value?.trim();
845
+ e && t.setAttribute(P, [{
846
+ text: e,
858
847
  timestamp: (/* @__PURE__ */ new Date()).toISOString()
859
- }]), e.close();
848
+ }]), t.close();
860
849
  };
861
- return r`
862
- <label for=${n} class="pkt-fileupload__queue-display__item__comment-label">
863
- ${t ? "Rediger kommentar" : "Legg til kommentar"}
850
+ return e`
851
+ <label for=${r} class="pkt-fileupload__queue-display__item__comment-label">
852
+ ${n ? "Rediger kommentar" : "Legg til kommentar"}
864
853
  </label>
865
854
  <textarea
866
- id=${n}
855
+ id=${r}
867
856
  class="pkt-fileupload__queue-display__item__comment-input"
868
- ?disabled=${e.disabled}
869
- .value=${t?.text ?? ""}
857
+ ?disabled=${t.disabled}
858
+ .value=${n?.text ?? ""}
870
859
  rows="2"
871
860
  placeholder="Skriv inn kommentar"
872
- @keydown=${(t) => F(t, i, e.close)}
861
+ @keydown=${(e) => L(e, i, t.close)}
873
862
  ></textarea>
874
863
  <button
875
864
  type="button"
876
865
  class="pkt-btn pkt-btn--secondary pkt-btn--small"
877
- ?disabled=${e.disabled}
866
+ ?disabled=${t.disabled}
878
867
  @click=${i}
879
868
  >
880
- ${t ? "Lagre kommentar" : "Legg til kommentar"}
869
+ ${n ? "Lagre kommentar" : "Legg til kommentar"}
881
870
  </button>
882
871
  <button
883
872
  type="button"
884
873
  class="pkt-btn pkt-btn--tertiary pkt-btn--small"
885
- ?disabled=${e.disabled}
886
- @click=${e.close}
874
+ ?disabled=${t.disabled}
875
+ @click=${t.close}
887
876
  >
888
877
  Avbryt
889
878
  </button>
890
879
  `;
891
880
  },
892
- renderContent: (e) => {
893
- if (e.isActive) return null;
894
- let t = e.getAttribute(M) ?? [];
895
- if (t.length === 0) return null;
896
- let n = t[0];
897
- return r`
881
+ renderContent: (t) => {
882
+ if (t.isActive) return null;
883
+ let n = t.getAttribute(P) ?? [];
884
+ if (n.length === 0) return null;
885
+ let r = n[0];
886
+ return e`
898
887
  <div class="pkt-fileupload__queue-display__item__comments">
899
888
  <div class="pkt-fileupload__queue-display__item__comment">
900
889
  <div class="pkt-fileupload__queue-display__item__comment__content">
901
890
  <span class="pkt-fileupload__queue-display__item__comment__text" aria-label="Kommentar tekst">
902
- ${n.text}
891
+ ${r.text}
903
892
  </span>
904
893
  <time class="pkt-fileupload__queue-display__item__comment__time">
905
- ${N(n.timestamp)}
894
+ ${F(r.timestamp)}
906
895
  </time>
907
896
  </div>
908
897
  <div class="pkt-fileupload__queue-display__item__comment__actions">
@@ -910,8 +899,8 @@ var M = "comments", N = (e) => {
910
899
  type="button"
911
900
  class="pkt-fileupload__queue-display__item__comment__action"
912
901
  aria-label="Rediger kommentar"
913
- ?disabled=${e.disabled}
914
- @click=${e.activate}
902
+ ?disabled=${t.disabled}
903
+ @click=${t.activate}
915
904
  >
916
905
  <pkt-icon name="edit"></pkt-icon>
917
906
  </button>
@@ -919,8 +908,8 @@ var M = "comments", N = (e) => {
919
908
  type="button"
920
909
  class="pkt-fileupload__queue-display__item__comment__action"
921
910
  aria-label="Slett kommentar"
922
- ?disabled=${e.disabled}
923
- @click=${() => e.setAttribute(M, void 0)}
911
+ ?disabled=${t.disabled}
912
+ @click=${() => t.setAttribute(P, void 0)}
924
913
  >
925
914
  <pkt-icon name="trash-can"></pkt-icon>
926
915
  </button>
@@ -929,32 +918,32 @@ var M = "comments", N = (e) => {
929
918
  </div>
930
919
  `;
931
920
  },
932
- renderHidden: (e) => {
933
- let t = e.getAttribute(M);
934
- return r`<input
921
+ renderHidden: (t) => {
922
+ let n = t.getAttribute(P);
923
+ return e`<input
935
924
  type="hidden"
936
- name=${`${e.inputName}-comments`}
937
- value=${t ? JSON.stringify(t) : ""}
925
+ name=${`${t.inputName}-comments`}
926
+ value=${n ? JSON.stringify(n) : ""}
938
927
  />`;
939
928
  }
940
- }), z = (e, t) => {
941
- let n = E(e, t);
942
- return n ? r`<span
929
+ }), V = (t, n) => {
930
+ let r = O(t, n);
931
+ return r ? e`<span
943
932
  class="pkt-fileupload__queue-display__item__title__head"
944
933
  data-pkt-truncate-part="first"
945
- >${n.head}</span
934
+ >${r.head}</span
946
935
  ><span
947
936
  class="pkt-fileupload__queue-display__item__title__tail"
948
937
  data-pkt-truncate-part="tail"
949
- >${n.tail}</span
950
- >` : r`<span data-pkt-truncate-part="first">${e}</span>`;
951
- }, B = (e, t, n) => r`
938
+ >${r.tail}</span
939
+ >` : e`<span data-pkt-truncate-part="first">${t}</span>`;
940
+ }, H = (t, n, r) => e`
952
941
  <p class="pkt-fileupload__queue-display__item__title">
953
- ${z(e, n)}${t ? r`<span class="pkt-fileupload__queue-display__item__filesize"> (${t})</span>` : null}
942
+ ${V(t, r)}${n ? e`<span class="pkt-fileupload__queue-display__item__filesize"> (${n})</span>` : null}
954
943
  </p>
955
- `, V = (e) => typeof e == "number" ? "in-progress" : e === "error" ? "error" : "idle", H = (e) => r`<span class="pkt-fileupload__queue-display__item__loading-text" aria-label="Laster opp fil"
956
- >${e ?? "Laster opp..."}</span
957
- >`, U = ({ operationId: e, file: t, inputName: n, disabled: r, isActive: i, onActivateOperation: a, onCloseOperation: o, getFileAttribute: s, setFileAttribute: c }) => ({
944
+ `, U = (e) => typeof e == "number" ? "in-progress" : e === "error" ? "error" : "idle", W = (t) => e`<span class="pkt-fileupload__queue-display__item__loading-text" aria-label="Laster opp fil"
945
+ >${t ?? "Laster opp..."}</span
946
+ >`, G = ({ operationId: e, file: t, inputName: n, disabled: r, isActive: i, onActivateOperation: a, onCloseOperation: o, getFileAttribute: s, setFileAttribute: c }) => ({
958
947
  file: t,
959
948
  inputName: n,
960
949
  disabled: r,
@@ -963,25 +952,25 @@ var M = "comments", N = (e) => {
963
952
  close: () => o(t.fileId),
964
953
  getAttribute: (e) => s(t.fileId, e),
965
954
  setAttribute: (e, n) => c(t.fileId, e, n)
966
- }), W = ({ file: e, fileSize: t, disabled: n, transferProgress: i, transferShowProgress: a, loadingText: o, truncateTail: s, onCancel: c, iconName: l = "document-text" }) => {
967
- let u = k(e), d = a ?? i !== 0;
968
- return r`
955
+ }), K = ({ file: t, fileSize: n, disabled: r, transferProgress: i, transferShowProgress: a, loadingText: o, truncateTail: s, onCancel: c, iconName: l = "document-text" }) => {
956
+ let u = j(t), d = a ?? i !== 0;
957
+ return e`
969
958
  <pkt-icon
970
959
  name=${l}
971
960
  class="pkt-fileupload__queue-display__item__icon pkt-icon--medium"
972
961
  aria-hidden="true"
973
962
  ></pkt-icon>
974
- ${B(u, t, s)}
963
+ ${H(u, n, s)}
975
964
  <button
976
965
  type="button"
977
966
  class="pkt-fileupload__queue-display__item__cancel-button"
978
967
  aria-label="Avbryt opplasting"
979
- ?disabled=${n}
980
- @click=${() => c(e.fileId)}
968
+ ?disabled=${r}
969
+ @click=${() => c(t.fileId)}
981
970
  >
982
971
  Avbryt
983
972
  </button>
984
- ${d ? r`
973
+ ${d ? e`
985
974
  <pkt-progressbar
986
975
  class="pkt-fileupload__queue-display__item__progress"
987
976
  valueCurrent=${Math.round(i * 100)}
@@ -992,27 +981,27 @@ var M = "comments", N = (e) => {
992
981
  <span class="pkt-fileupload__queue-display__item__percentage" aria-hidden="true"
993
982
  >${Math.round(i * 100)}%</span
994
983
  >
995
- ` : H(o)}
984
+ ` : W(o)}
996
985
  `;
997
- }, G = ({ file: e, fileSize: t, disabled: n, transferShowProgress: i, transferLastProgress: a, transferErrorMessage: o, truncateTail: s, onCancel: c }) => {
998
- let l = k(e), u = !!i, d = Math.round((a ?? 1) * 100);
999
- return r`
986
+ }, q = ({ file: t, fileSize: n, disabled: r, transferShowProgress: i, transferLastProgress: a, transferErrorMessage: o, truncateTail: s, onCancel: c }) => {
987
+ let l = j(t), u = !!i, d = Math.round((a ?? 1) * 100);
988
+ return e`
1000
989
  <pkt-icon
1001
990
  name="alert-error"
1002
991
  class="pkt-fileupload__queue-display__item__icon pkt-icon--medium"
1003
992
  aria-hidden="true"
1004
993
  ></pkt-icon>
1005
- ${B(l, t, s)}
994
+ ${H(l, n, s)}
1006
995
  <button
1007
996
  type="button"
1008
997
  class="pkt-fileupload__queue-display__item__cancel-button"
1009
998
  aria-label="Fjern fil som feilet under opplasting"
1010
- ?disabled=${n}
1011
- @click=${() => c(e.fileId)}
999
+ ?disabled=${r}
1000
+ @click=${() => c(t.fileId)}
1012
1001
  >
1013
1002
  Fjern
1014
1003
  </button>
1015
- ${u ? r`
1004
+ ${u ? e`
1016
1005
  <pkt-progressbar
1017
1006
  class="pkt-fileupload__queue-display__item__progress pkt-fileupload__queue-display__item__progress--error"
1018
1007
  valueCurrent=${d}
@@ -1021,32 +1010,32 @@ var M = "comments", N = (e) => {
1021
1010
  statusPlacement="following"
1022
1011
  ></pkt-progressbar>
1023
1012
  ` : null}
1024
- ${o ? r`<span class="pkt-fileupload__queue-display__item__error-message"
1013
+ ${o ? e`<span class="pkt-fileupload__queue-display__item__error-message"
1025
1014
  >${o}</span
1026
1015
  >` : null}
1027
1016
  `;
1028
- }, K = ({ file: e, disabled: t, inputName: n, operations: i, activeOperationId: a, onActivateOperation: o, onCloseOperation: c, getFileAttribute: l, setFileAttribute: u }) => {
1017
+ }, J = ({ file: t, disabled: n, inputName: r, operations: i, activeOperationId: a, onActivateOperation: o, onCloseOperation: s, getFileAttribute: c, setFileAttribute: l }) => {
1029
1018
  let d = i.find((e) => e.id === a);
1030
1019
  if (d?.renderInlineUI || d?.renderExtendedUI) return null;
1031
1020
  let f = i.map((i) => {
1032
- let d = U({
1021
+ let d = G({
1033
1022
  operationId: i.id,
1034
- file: e,
1035
- inputName: n,
1036
- disabled: t,
1023
+ file: t,
1024
+ inputName: r,
1025
+ disabled: n,
1037
1026
  isActive: i.id === a,
1038
1027
  onActivateOperation: o,
1039
- onCloseOperation: c,
1040
- getFileAttribute: l,
1041
- setFileAttribute: u
1042
- }), f = typeof i.title == "function" ? i.title(e) : i.title;
1028
+ onCloseOperation: s,
1029
+ getFileAttribute: c,
1030
+ setFileAttribute: l
1031
+ }), f = typeof i.title == "function" ? i.title(t) : i.title;
1043
1032
  if (!f) return null;
1044
- let p = typeof i.ariaLabel == "function" ? i.ariaLabel(e) : i.ariaLabel;
1045
- return r`<button
1033
+ let p = typeof i.ariaLabel == "function" ? i.ariaLabel(t) : i.ariaLabel;
1034
+ return e`<button
1046
1035
  type="button"
1047
1036
  class="pkt-fileupload__queue-display__item__operation"
1048
- aria-label=${s(p)}
1049
- ?disabled=${t}
1037
+ aria-label=${u(p)}
1038
+ ?disabled=${n}
1050
1039
  @click=${() => {
1051
1040
  (i.renderInlineUI || i.renderExtendedUI) && d.activate(), i.onClick?.(d);
1052
1041
  }}
@@ -1054,44 +1043,44 @@ var M = "comments", N = (e) => {
1054
1043
  ${f}
1055
1044
  </button>`;
1056
1045
  }).filter(Boolean);
1057
- return f.length === 0 ? null : r`<div class="pkt-fileupload__queue-display__item__actions">${f}</div>`;
1058
- }, q = ({ file: e, disabled: t, inputName: n, operations: i, activeOperationId: a, onActivateOperation: o, onCloseOperation: s, getFileAttribute: c, setFileAttribute: l }) => i.map((i) => {
1046
+ return f.length === 0 ? null : e`<div class="pkt-fileupload__queue-display__item__actions">${f}</div>`;
1047
+ }, Y = ({ file: t, disabled: n, inputName: r, operations: i, activeOperationId: a, onActivateOperation: o, onCloseOperation: s, getFileAttribute: c, setFileAttribute: l }) => i.map((i) => {
1059
1048
  if (!i.renderContent) return null;
1060
- let u = U({
1049
+ let u = G({
1061
1050
  operationId: i.id,
1062
- file: e,
1063
- inputName: n,
1064
- disabled: t,
1051
+ file: t,
1052
+ inputName: r,
1053
+ disabled: n,
1065
1054
  isActive: i.id === a,
1066
1055
  onActivateOperation: o,
1067
1056
  onCloseOperation: s,
1068
1057
  getFileAttribute: c,
1069
1058
  setFileAttribute: l
1070
1059
  }), d = i.renderContent(u);
1071
- return d == null ? null : r`<div class="pkt-fileupload__queue-display__item__operation-content">
1060
+ return d == null ? null : e`<div class="pkt-fileupload__queue-display__item__operation-content">
1072
1061
  ${d}
1073
1062
  </div>`;
1074
- }), J = ({ file: e, disabled: t, inputName: n, operations: i, activeOperationId: a, onActivateOperation: o, onCloseOperation: s, getFileAttribute: c, setFileAttribute: l }) => {
1063
+ }), X = ({ file: t, disabled: n, inputName: r, operations: i, activeOperationId: a, onActivateOperation: o, onCloseOperation: s, getFileAttribute: c, setFileAttribute: l }) => {
1075
1064
  if (!a) return null;
1076
1065
  let u = i.find((e) => e.id === a);
1077
1066
  if (!u?.renderExtendedUI) return null;
1078
- let d = U({
1067
+ let d = G({
1079
1068
  operationId: u.id,
1080
- file: e,
1081
- inputName: n,
1082
- disabled: t,
1069
+ file: t,
1070
+ inputName: r,
1071
+ disabled: n,
1083
1072
  isActive: !0,
1084
1073
  onActivateOperation: o,
1085
1074
  onCloseOperation: s,
1086
1075
  getFileAttribute: c,
1087
1076
  setFileAttribute: l
1088
1077
  });
1089
- return r`<div class="pkt-fileupload__queue-display__item__expanded-operation-ui">
1078
+ return e`<div class="pkt-fileupload__queue-display__item__expanded-operation-ui">
1090
1079
  ${u.renderExtendedUI(d)}
1091
1080
  </div>`;
1092
- }, Y = ({ file: e, disabled: t, inputName: n, operations: r, activeOperationId: i, onActivateOperation: a, onCloseOperation: o, getFileAttribute: s, setFileAttribute: c }) => r.map((r) => {
1081
+ }, Z = ({ file: e, disabled: t, inputName: n, operations: r, activeOperationId: i, onActivateOperation: a, onCloseOperation: o, getFileAttribute: s, setFileAttribute: c }) => r.map((r) => {
1093
1082
  if (!r.renderHidden) return null;
1094
- let l = U({
1083
+ let l = G({
1095
1084
  operationId: r.id,
1096
1085
  file: e,
1097
1086
  inputName: n,
@@ -1103,45 +1092,45 @@ var M = "comments", N = (e) => {
1103
1092
  setFileAttribute: c
1104
1093
  });
1105
1094
  return r.renderHidden(l);
1106
- }), X = (e, t, n) => {
1107
- let i = k(e);
1108
- return r`
1095
+ }), Q = (t, n, r) => {
1096
+ let i = j(t);
1097
+ return e`
1109
1098
  <pkt-icon
1110
1099
  name="document-text"
1111
1100
  class="pkt-fileupload__queue-display__item__icon pkt-icon--medium"
1112
1101
  aria-hidden="true"
1113
1102
  ></pkt-icon>
1114
- ${B(i, t, n)}
1103
+ ${H(i, n, r)}
1115
1104
  `;
1116
- }, Z = ({ file: e, thumbnailUrl: t, previewEnabled: n, canOpenPreview: i, truncateTail: a, onOpenPreview: c, onThumbnailImageError: l }) => {
1117
- let u = k(e), d = !!t, f = !!n && !!i, p = f && !!c;
1118
- return r`
1105
+ }, ee = ({ file: t, thumbnailUrl: n, previewEnabled: r, canOpenPreview: a, truncateTail: o, onOpenPreview: c, onThumbnailImageError: d }) => {
1106
+ let f = j(t), p = !!n, m = !!r && !!a, h = m && !!c;
1107
+ return e`
1119
1108
  <div
1120
- class=${o({
1109
+ class=${s({
1121
1110
  "pkt-fileupload__queue-display__item__thumbnail": !0,
1122
- "pkt-fileupload__queue-display__item__thumbnail--fallback": !d
1111
+ "pkt-fileupload__queue-display__item__thumbnail--fallback": !p
1123
1112
  })}
1124
1113
  >
1125
1114
  <button
1126
1115
  type="button"
1127
1116
  class="pkt-fileupload__queue-display__item__thumbnail__image-wrapper pkt-btn pkt-btn--medium pkt-btn--secondary pkt-btn--label-only"
1128
- aria-label=${`Forhåndsvis bilde ${u}`}
1129
- ?disabled=${!p}
1117
+ aria-label=${l(i.fileupload.previewImage, { filename: f })}
1118
+ ?disabled=${!h}
1130
1119
  @click=${() => {
1131
- !p || !c || c(e.fileId);
1120
+ !h || !c || c(t.fileId);
1132
1121
  }}
1133
1122
  >
1134
1123
  <span class="pkt-btn__text">
1135
- ${f ? r`<pkt-icon
1124
+ ${m ? e`<pkt-icon
1136
1125
  name="expand"
1137
1126
  class="pkt-fileupload__queue-display__item__thumbnail__expand-icon"
1138
1127
  aria-hidden="true"
1139
1128
  ></pkt-icon>` : null}
1140
- ${d ? r`<img
1141
- src=${s(t)}
1142
- alt=${u}
1143
- @error=${() => l?.(e.fileId)}
1144
- />` : r`<pkt-icon
1129
+ ${p ? e`<img
1130
+ src=${u(n)}
1131
+ alt=${f}
1132
+ @error=${() => d?.(t.fileId)}
1133
+ />` : e`<pkt-icon
1145
1134
  name="document-text"
1146
1135
  class="pkt-fileupload__queue-display__item__icon pkt-icon--medium"
1147
1136
  aria-hidden="true"
@@ -1149,61 +1138,61 @@ var M = "comments", N = (e) => {
1149
1138
  </span>
1150
1139
  </button>
1151
1140
  <span class="pkt-fileupload__queue-display__item__thumbnail__title"
1152
- >${z(u, a)}</span
1141
+ >${V(f, o)}</span
1153
1142
  >
1154
1143
  </div>
1155
1144
  `;
1156
- }, Q = ({ file: e, inputName: t, disabled: n, fileSize: i, operations: a, activeOperationId: s, onActivateOperation: c, onCloseOperation: l, getFileAttribute: u, setFileAttribute: d, transferProgress: f, transferErrorMessage: p, transferShowProgress: m, transferLastProgress: h, loadingText: g, truncateTail: _, onCancel: v }) => {
1157
- let y = V(f), b = a.find((e) => e.id === s), x = b?.renderInlineUI ? b.renderInlineUI(U({
1145
+ }, te = ({ file: t, inputName: n, disabled: r, fileSize: i, operations: a, activeOperationId: o, onActivateOperation: c, onCloseOperation: l, getFileAttribute: u, setFileAttribute: d, transferProgress: f, transferErrorMessage: p, transferShowProgress: m, transferLastProgress: h, loadingText: g, truncateTail: _, onCancel: v }) => {
1146
+ let y = U(f), b = a.find((e) => e.id === o), x = b?.renderInlineUI ? b.renderInlineUI(G({
1158
1147
  operationId: b.id,
1159
- file: e,
1160
- inputName: t,
1161
- disabled: n,
1148
+ file: t,
1149
+ inputName: n,
1150
+ disabled: r,
1162
1151
  isActive: !0,
1163
1152
  onActivateOperation: c,
1164
1153
  onCloseOperation: l,
1165
1154
  getFileAttribute: u,
1166
1155
  setFileAttribute: d
1167
1156
  })) : null;
1168
- return r`
1157
+ return e`
1169
1158
  <li
1170
- class=${o({
1159
+ class=${s({
1171
1160
  "pkt-fileupload__queue-display__item": !0,
1172
1161
  "pkt-fileupload__queue-display__item--in-progress": y === "in-progress",
1173
1162
  "pkt-fileupload__queue-display__item--error": y === "error",
1174
1163
  [`pkt-fileupload__queue-display__item--${f}`]: typeof f == "string"
1175
1164
  })}
1176
1165
  >
1177
- ${Y({
1178
- file: e,
1179
- disabled: n,
1180
- inputName: t,
1166
+ ${Z({
1167
+ file: t,
1168
+ disabled: r,
1169
+ inputName: n,
1181
1170
  operations: a,
1182
- activeOperationId: s,
1171
+ activeOperationId: o,
1183
1172
  onActivateOperation: c,
1184
1173
  onCloseOperation: l,
1185
1174
  getFileAttribute: u,
1186
1175
  setFileAttribute: d
1187
1176
  })}
1188
- ${y === "in-progress" ? W({
1189
- file: e,
1177
+ ${y === "in-progress" ? K({
1178
+ file: t,
1190
1179
  fileSize: i,
1191
- disabled: n,
1180
+ disabled: r,
1192
1181
  transferProgress: f,
1193
1182
  transferShowProgress: m,
1194
1183
  loadingText: g,
1195
1184
  truncateTail: _,
1196
1185
  onCancel: v
1197
- }) : y === "error" ? G({
1198
- file: e,
1186
+ }) : y === "error" ? q({
1187
+ file: t,
1199
1188
  fileSize: i,
1200
- disabled: n,
1189
+ disabled: r,
1201
1190
  transferShowProgress: m,
1202
1191
  transferLastProgress: h,
1203
1192
  transferErrorMessage: p,
1204
1193
  truncateTail: _,
1205
1194
  onCancel: v
1206
- }) : x ? r`
1195
+ }) : x ? e`
1207
1196
  <pkt-icon
1208
1197
  name="document-text"
1209
1198
  class="pkt-fileupload__queue-display__item__icon pkt-icon--medium"
@@ -1212,35 +1201,35 @@ var M = "comments", N = (e) => {
1212
1201
  <div class="pkt-fileupload__queue-display__item__inline-ui">
1213
1202
  ${x}
1214
1203
  </div>
1215
- ` : X(e, i, _)}
1216
- ${y === "idle" ? K({
1217
- file: e,
1218
- disabled: n,
1219
- inputName: t,
1204
+ ` : Q(t, i, _)}
1205
+ ${y === "idle" ? J({
1206
+ file: t,
1207
+ disabled: r,
1208
+ inputName: n,
1220
1209
  operations: a,
1221
- activeOperationId: s,
1210
+ activeOperationId: o,
1222
1211
  onActivateOperation: c,
1223
1212
  onCloseOperation: l,
1224
1213
  getFileAttribute: u,
1225
1214
  setFileAttribute: d
1226
1215
  }) : null}
1227
- ${y === "idle" ? q({
1228
- file: e,
1229
- disabled: n,
1230
- inputName: t,
1216
+ ${y === "idle" ? Y({
1217
+ file: t,
1218
+ disabled: r,
1219
+ inputName: n,
1231
1220
  operations: a,
1232
- activeOperationId: s,
1221
+ activeOperationId: o,
1233
1222
  onActivateOperation: c,
1234
1223
  onCloseOperation: l,
1235
1224
  getFileAttribute: u,
1236
1225
  setFileAttribute: d
1237
1226
  }) : null}
1238
- ${y === "idle" ? J({
1239
- file: e,
1240
- disabled: n,
1241
- inputName: t,
1227
+ ${y === "idle" ? X({
1228
+ file: t,
1229
+ disabled: r,
1230
+ inputName: n,
1242
1231
  operations: a,
1243
- activeOperationId: s,
1232
+ activeOperationId: o,
1244
1233
  onActivateOperation: c,
1245
1234
  onCloseOperation: l,
1246
1235
  getFileAttribute: u,
@@ -1248,31 +1237,31 @@ var M = "comments", N = (e) => {
1248
1237
  }) : null}
1249
1238
  </li>
1250
1239
  `;
1251
- }, ee = ({ file: e, inputName: t, disabled: n, fileSize: i, thumbnailUrl: a, previewEnabled: s, canOpenPreview: c, operations: l, activeOperationId: u, onActivateOperation: d, onCloseOperation: f, getFileAttribute: p, setFileAttribute: m, transferProgress: h, transferErrorMessage: g, transferShowProgress: _, transferLastProgress: v, loadingText: y, truncateTail: b, onCancel: x, onOpenPreview: S, onThumbnailImageError: C }) => {
1252
- let w = V(h), T = l.find((e) => e.id === u), E = T?.renderInlineUI ? T.renderInlineUI(U({
1240
+ }, ne = ({ file: t, inputName: n, disabled: r, fileSize: i, thumbnailUrl: a, previewEnabled: o, canOpenPreview: c, operations: l, activeOperationId: u, onActivateOperation: d, onCloseOperation: f, getFileAttribute: p, setFileAttribute: m, transferProgress: h, transferErrorMessage: g, transferShowProgress: _, transferLastProgress: v, loadingText: y, truncateTail: b, onCancel: x, onOpenPreview: S, onThumbnailImageError: C }) => {
1241
+ let w = U(h), T = l.find((e) => e.id === u), E = T?.renderInlineUI ? T.renderInlineUI(G({
1253
1242
  operationId: T.id,
1254
- file: e,
1255
- inputName: t,
1256
- disabled: n,
1243
+ file: t,
1244
+ inputName: n,
1245
+ disabled: r,
1257
1246
  isActive: !0,
1258
1247
  onActivateOperation: d,
1259
1248
  onCloseOperation: f,
1260
1249
  getFileAttribute: p,
1261
1250
  setFileAttribute: m
1262
1251
  })) : null;
1263
- return r`
1252
+ return e`
1264
1253
  <li
1265
- class=${o({
1254
+ class=${s({
1266
1255
  "pkt-fileupload__queue-display__item": !0,
1267
1256
  "pkt-fileupload__queue-display__item--in-progress": w === "in-progress",
1268
1257
  "pkt-fileupload__queue-display__item--error": w === "error",
1269
1258
  [`pkt-fileupload__queue-display__item--${h}`]: typeof h == "string"
1270
1259
  })}
1271
1260
  >
1272
- ${Y({
1273
- file: e,
1274
- disabled: n,
1275
- inputName: t,
1261
+ ${Z({
1262
+ file: t,
1263
+ disabled: r,
1264
+ inputName: n,
1276
1265
  operations: l,
1277
1266
  activeOperationId: u,
1278
1267
  onActivateOperation: d,
@@ -1280,26 +1269,26 @@ var M = "comments", N = (e) => {
1280
1269
  getFileAttribute: p,
1281
1270
  setFileAttribute: m
1282
1271
  })}
1283
- ${w === "in-progress" ? W({
1284
- file: e,
1272
+ ${w === "in-progress" ? K({
1273
+ file: t,
1285
1274
  fileSize: i,
1286
- disabled: n,
1275
+ disabled: r,
1287
1276
  transferProgress: h,
1288
1277
  transferShowProgress: _,
1289
1278
  loadingText: y,
1290
1279
  truncateTail: b,
1291
1280
  onCancel: x,
1292
1281
  iconName: "picture"
1293
- }) : w === "error" ? G({
1294
- file: e,
1282
+ }) : w === "error" ? q({
1283
+ file: t,
1295
1284
  fileSize: i,
1296
- disabled: n,
1285
+ disabled: r,
1297
1286
  transferShowProgress: _,
1298
1287
  transferLastProgress: v,
1299
1288
  transferErrorMessage: g,
1300
1289
  truncateTail: b,
1301
1290
  onCancel: x
1302
- }) : E ? r`
1291
+ }) : E ? e`
1303
1292
  <pkt-icon
1304
1293
  name="picture"
1305
1294
  class="pkt-fileupload__queue-display__item__icon pkt-icon--medium"
@@ -1308,19 +1297,19 @@ var M = "comments", N = (e) => {
1308
1297
  <div class="pkt-fileupload__queue-display__item__inline-ui">
1309
1298
  ${E}
1310
1299
  </div>
1311
- ` : Z({
1312
- file: e,
1300
+ ` : ee({
1301
+ file: t,
1313
1302
  thumbnailUrl: a,
1314
- previewEnabled: s,
1303
+ previewEnabled: o,
1315
1304
  canOpenPreview: c,
1316
1305
  truncateTail: b,
1317
1306
  onOpenPreview: S,
1318
1307
  onThumbnailImageError: C
1319
1308
  })}
1320
- ${w === "idle" ? K({
1321
- file: e,
1322
- disabled: n,
1323
- inputName: t,
1309
+ ${w === "idle" ? J({
1310
+ file: t,
1311
+ disabled: r,
1312
+ inputName: n,
1324
1313
  operations: l,
1325
1314
  activeOperationId: u,
1326
1315
  onActivateOperation: d,
@@ -1328,10 +1317,10 @@ var M = "comments", N = (e) => {
1328
1317
  getFileAttribute: p,
1329
1318
  setFileAttribute: m
1330
1319
  }) : null}
1331
- ${w === "idle" ? q({
1332
- file: e,
1333
- disabled: n,
1334
- inputName: t,
1320
+ ${w === "idle" ? Y({
1321
+ file: t,
1322
+ disabled: r,
1323
+ inputName: n,
1335
1324
  operations: l,
1336
1325
  activeOperationId: u,
1337
1326
  onActivateOperation: d,
@@ -1339,10 +1328,10 @@ var M = "comments", N = (e) => {
1339
1328
  getFileAttribute: p,
1340
1329
  setFileAttribute: m
1341
1330
  }) : null}
1342
- ${w === "idle" ? J({
1343
- file: e,
1344
- disabled: n,
1345
- inputName: t,
1331
+ ${w === "idle" ? X({
1332
+ file: t,
1333
+ disabled: r,
1334
+ inputName: n,
1346
1335
  operations: l,
1347
1336
  activeOperationId: u,
1348
1337
  onActivateOperation: d,
@@ -1352,14 +1341,14 @@ var M = "comments", N = (e) => {
1352
1341
  }) : null}
1353
1342
  </li>
1354
1343
  `;
1355
- }, $ = class extends j {
1344
+ }, $ = class extends N {
1356
1345
  constructor(...e) {
1357
1346
  super(...e), this.activeOperationByFileId = {}, this.isPreviewModalOpen = !1, this.previewCurrentIndex = 0, this.failedImageFileIds = {}, this.closePreview = () => {
1358
1347
  this.isPreviewModalOpen = !1;
1359
1348
  }, this.onPreviewKeyDown = (e, t) => {
1360
1349
  if (this.isPreviewModalOpen) {
1361
1350
  if (e.key === "Tab") {
1362
- u(e, e.currentTarget);
1351
+ p(e, e.currentTarget);
1363
1352
  return;
1364
1353
  }
1365
1354
  switch (e.key) {
@@ -1378,9 +1367,10 @@ var M = "comments", N = (e) => {
1378
1367
  super.updated(e), this.classList.add("pkt-fileupload-component");
1379
1368
  }
1380
1369
  render() {
1381
- let e = this.renderContent();
1382
- return this.label ? r`
1370
+ let t = this.renderContent();
1371
+ return this.label ? e`
1383
1372
  <pkt-input-wrapper
1373
+ .strings=${this.strings}
1384
1374
  .forId=${`${this.id}-input`}
1385
1375
  .label=${this.label}
1386
1376
  .helptext=${this.helptext}
@@ -1393,36 +1383,36 @@ var M = "comments", N = (e) => {
1393
1383
  ?requiredTag=${this.requiredTag}
1394
1384
  .requiredText=${this.requiredText}
1395
1385
  .tagText=${this.tagText}
1396
- class=${o({
1386
+ class=${s({
1397
1387
  "pkt-fileupload-wrapper": !0,
1398
1388
  "pkt-fileupload-wrapper--full-width": this.fullwidth
1399
1389
  })}
1400
1390
  >
1401
- ${e}
1391
+ ${t}
1402
1392
  </pkt-input-wrapper>
1403
- ` : e;
1393
+ ` : t;
1404
1394
  }
1405
1395
  renderContent() {
1406
- let e = this.getSortedFilesAndTransfers(), t = this.getPreviewableImages(e), n = this.getSupportedFormatsText(), i = [!this.label && this.helptext ? `${this.id}-helptext` : void 0, this.hasEffectiveError ? `${this.id}-error` : void 0].filter(Boolean).join(" ") || void 0, a = this.itemRenderer === "thumbnail" ? this.multiple ? {
1407
- dragInactive: d.dropZoneDragMultipleThumbnail,
1408
- dragActive: d.dropZoneDragActiveMultipleThumbnail,
1409
- openFileDialog: d.dropZoneOpenFileDialogMultipleThumbnail
1396
+ let t = this.getSortedFilesAndTransfers(), n = this.getPreviewableImages(t), r = this.pktStrings.get("fileupload"), i = this.getSupportedFormatsText(), a = [!this.label && this.helptext ? `${this.id}-helptext` : void 0, this.hasEffectiveError ? `${this.id}-error` : void 0].filter(Boolean).join(" ") || void 0, o = this.itemRenderer === "thumbnail" ? this.multiple ? {
1397
+ dragInactive: r.dropZoneDragMultipleThumbnail,
1398
+ dragActive: r.dropZoneDragActiveMultipleThumbnail,
1399
+ openFileDialog: r.dropZoneOpenFileDialogMultipleThumbnail
1410
1400
  } : {
1411
- dragInactive: d.dropZoneDragSingleThumbnail,
1412
- dragActive: d.dropZoneDragActiveSingleThumbnail,
1413
- openFileDialog: d.dropZoneOpenFileDialogSingleThumbnail
1401
+ dragInactive: r.dropZoneDragSingleThumbnail,
1402
+ dragActive: r.dropZoneDragActiveSingleThumbnail,
1403
+ openFileDialog: r.dropZoneOpenFileDialogSingleThumbnail
1414
1404
  } : this.multiple ? {
1415
- dragInactive: d.dropZoneDragMultiple,
1416
- dragActive: d.dropZoneDragActiveMultiple,
1417
- openFileDialog: d.dropZoneOpenFileDialogMultiple
1405
+ dragInactive: r.dropZoneDragMultiple,
1406
+ dragActive: r.dropZoneDragActiveMultiple,
1407
+ openFileDialog: r.dropZoneOpenFileDialogMultiple
1418
1408
  } : {
1419
- dragInactive: d.dropZoneDragSingle,
1420
- dragActive: d.dropZoneDragActiveSingle,
1421
- openFileDialog: d.dropZoneOpenFileDialogSingle
1409
+ dragInactive: r.dropZoneDragSingle,
1410
+ dragActive: r.dropZoneDragActiveSingle,
1411
+ openFileDialog: r.dropZoneOpenFileDialogSingle
1422
1412
  };
1423
- return r`
1413
+ return e`
1424
1414
  <div
1425
- class=${o({
1415
+ class=${s({
1426
1416
  "pkt-fileupload": !0,
1427
1417
  "pkt-fileupload--full-width": this.fullwidth,
1428
1418
  "pkt-fileupload--error": this.hasEffectiveError,
@@ -1438,7 +1428,7 @@ var M = "comments", N = (e) => {
1438
1428
  ${this.getSrErrorsMessage()}
1439
1429
  </div>
1440
1430
  <div
1441
- class=${o({
1431
+ class=${s({
1442
1432
  "pkt-fileupload__drop-zone": !0,
1443
1433
  "pkt-fileupload__drop-zone--drag-active": this.isDragActive,
1444
1434
  "pkt-fileupload__drop-zone--disabled": this.disabled
@@ -1451,18 +1441,18 @@ var M = "comments", N = (e) => {
1451
1441
  <input
1452
1442
  id=${`${this.id}-input`}
1453
1443
  type="file"
1454
- name=${s(this.uploadStrategy === "form" ? this.name : void 0)}
1444
+ name=${u(this.uploadStrategy === "form" ? this.name : void 0)}
1455
1445
  ?multiple=${this.multiple}
1456
1446
  ?disabled=${this.disabled}
1457
1447
  ?required=${this.required && this.uploadStrategy === "form"}
1458
1448
  accept=${this.getResolvedAcceptValue()}
1459
- aria-label=${s(this.label ? void 0 : this.multiple ? "Velg filer" : "Velg fil")}
1460
- aria-required=${s(this.required ? "true" : void 0)}
1461
- aria-invalid=${s(this.hasEffectiveError ? "true" : void 0)}
1462
- aria-describedby=${s(i)}
1449
+ aria-label=${u(this.label ? void 0 : this.multiple ? "Velg filer" : "Velg fil")}
1450
+ aria-required=${u(this.required ? "true" : void 0)}
1451
+ aria-invalid=${u(this.hasEffectiveError ? "true" : void 0)}
1452
+ aria-describedby=${u(a)}
1463
1453
  @change=${this.onNativeFileChange}
1464
1454
  />
1465
- ${this.uploadStrategy === "custom" ? e.map((e) => r`<input type="hidden" name=${this.name} value=${e.fileId} />`) : null}
1455
+ ${this.uploadStrategy === "custom" ? t.map((t) => e`<input type="hidden" name=${this.name} value=${t.fileId} />`) : null}
1466
1456
  <div class="pkt-fileupload__drop-zone__placeholder">
1467
1457
  <pkt-icon
1468
1458
  name="attachment"
@@ -1470,21 +1460,21 @@ var M = "comments", N = (e) => {
1470
1460
  aria-hidden="true"
1471
1461
  ></pkt-icon>
1472
1462
  <p class="pkt-fileupload__drop-zone__placeholder__title">
1473
- ${this.isDragActive ? `${a.dragActive} ...` : r`${a.dragInactive}
1463
+ ${this.isDragActive ? `${o.dragActive} ...` : e`${o.dragInactive}
1474
1464
  <button
1475
1465
  type="button"
1476
1466
  class="pkt-fileupload__drop-zone__placeholder__title__open-file-dialog"
1477
1467
  @click=${this.openFileDialog}
1478
1468
  >
1479
- ${a.openFileDialog}
1469
+ ${o.openFileDialog}
1480
1470
  </button>`}
1481
1471
  </p>
1482
- ${n ? r`<p class="pkt-fileupload__drop-zone__placeholder__formats">
1483
- ${d.supportedFormatsPrefix} ${n}
1472
+ ${i ? e`<p class="pkt-fileupload__drop-zone__placeholder__formats">
1473
+ ${r.supportedFormatsPrefix} ${i}
1484
1474
  </p>` : null}
1485
1475
  </div>
1486
1476
  </div>
1487
- ${this.hasEffectiveError ? r`
1477
+ ${this.hasEffectiveError ? e`
1488
1478
  <pkt-alert
1489
1479
  skin="error"
1490
1480
  role="alert"
@@ -1496,10 +1486,10 @@ var M = "comments", N = (e) => {
1496
1486
  ${this.effectiveErrorMessage}
1497
1487
  </pkt-alert>
1498
1488
  ` : null}
1499
- ${e.length > 0 ? r`<ul class="pkt-fileupload__queue-display">
1500
- ${e.map((e) => this.renderQueueItem(e, t))}
1489
+ ${t.length > 0 ? e`<ul class="pkt-fileupload__queue-display">
1490
+ ${t.map((e) => this.renderQueueItem(e, n))}
1501
1491
  </ul>` : null}
1502
- ${this.renderPreviewModal(t)}
1492
+ ${this.renderPreviewModal(n)}
1503
1493
  </div>
1504
1494
  `;
1505
1495
  }
@@ -1507,7 +1497,7 @@ var M = "comments", N = (e) => {
1507
1497
  let n = typeof e.file?.size == "number" ? this.formatFileSize(e.file.size) : "", r = this.getQueueItemOperations();
1508
1498
  if (this.itemRenderer === "thumbnail") {
1509
1499
  let i = this.canOpenPreview(e), a = this.failedImageFileIds[e.fileId]?.thumbnail ? void 0 : this.getThumbnailUrl(e);
1510
- return ee({
1500
+ return ne({
1511
1501
  file: e,
1512
1502
  inputName: this.name,
1513
1503
  disabled: this.disabled,
@@ -1532,7 +1522,7 @@ var M = "comments", N = (e) => {
1532
1522
  onThumbnailImageError: (e) => this.markImageFailed(e, "thumbnail")
1533
1523
  });
1534
1524
  }
1535
- return Q({
1525
+ return te({
1536
1526
  file: e,
1537
1527
  inputName: this.name,
1538
1528
  disabled: this.disabled,
@@ -1578,28 +1568,28 @@ var M = "comments", N = (e) => {
1578
1568
  });
1579
1569
  }
1580
1570
  navigatePreview(e, t) {
1581
- t.length !== 0 && (this.previewCurrentIndex = D(this.previewCurrentIndex, e, t.length));
1571
+ t.length !== 0 && (this.previewCurrentIndex = k(this.previewCurrentIndex, e, t.length));
1582
1572
  }
1583
- renderPreviewModal(e) {
1584
- if (!this.enableImagePreview || e.length === 0) return null;
1585
- let t = e[this.previewCurrentIndex];
1586
- if (!t) return null;
1587
- let n = e.length > 1, i = this.getThumbnailUrl(t), a = !!i && !this.failedImageFileIds[t.fileId]?.preview, o = t.attributes?.targetFilename || t.file?.name || "Forhåndsvisning";
1588
- return r`
1573
+ renderPreviewModal(t) {
1574
+ if (!this.enableImagePreview || t.length === 0) return null;
1575
+ let n = this.pktStrings.get("fileupload"), r = t[this.previewCurrentIndex];
1576
+ if (!r) return null;
1577
+ let i = t.length > 1, a = this.getThumbnailUrl(r), o = !!a && !this.failedImageFileIds[r.fileId]?.preview, s = r.attributes?.targetFilename || r.file?.name || n.previewFallbackName;
1578
+ return e`
1589
1579
  <pkt-modal
1590
1580
  .open=${this.isPreviewModalOpen}
1591
- .headingText=${o}
1581
+ .headingText=${s}
1592
1582
  closeOnBackdropClick
1593
1583
  class="pkt-fileupload__image-preview-modal"
1594
1584
  @close=${this.closePreview}
1595
- @keydown=${(t) => this.onPreviewKeyDown(t, e)}
1585
+ @keydown=${(e) => this.onPreviewKeyDown(e, t)}
1596
1586
  >
1597
1587
  <div class="pkt-fileupload__image-preview">
1598
- ${n ? r`<button
1588
+ ${i ? e`<button
1599
1589
  type="button"
1600
1590
  class="pkt-fileupload__image-preview__nav pkt-fileupload__image-preview__nav--prev pkt-btn pkt-btn--medium pkt-btn--secondary pkt-btn--icon-only"
1601
- aria-label=${`Forrige bilde ${this.previewCurrentIndex} / ${e.length}`}
1602
- @click=${() => this.navigatePreview("prev", e)}
1591
+ aria-label=${`Forrige bilde ${this.previewCurrentIndex} / ${t.length}`}
1592
+ @click=${() => this.navigatePreview("prev", t)}
1603
1593
  >
1604
1594
  <pkt-icon
1605
1595
  class="pkt-btn__icon pkt-icon"
@@ -1610,26 +1600,26 @@ var M = "comments", N = (e) => {
1610
1600
  </button>` : null}
1611
1601
 
1612
1602
  <div class="pkt-fileupload__image-preview__content">
1613
- ${a ? r`<img
1614
- src=${i}
1615
- alt=${`${o} - ${this.previewCurrentIndex + 1} av ${e.length}`}
1603
+ ${o ? e`<img
1604
+ src=${a}
1605
+ alt=${`${s} - ${this.previewCurrentIndex + 1} av ${t.length}`}
1616
1606
  class="pkt-fileupload__image-preview__image"
1617
- @error=${() => this.markImageFailed(t.fileId, "preview")}
1618
- />` : r`<pkt-icon
1607
+ @error=${() => this.markImageFailed(r.fileId, "preview")}
1608
+ />` : e`<pkt-icon
1619
1609
  name="picture"
1620
1610
  class="pkt-fileupload__queue-display__item__icon pkt-icon--medium"
1621
1611
  aria-hidden="true"
1622
1612
  ></pkt-icon>`}
1623
1613
  </div>
1624
1614
 
1625
- ${n ? r`<span class="pkt-fileupload__image-preview__counter">
1626
- ${this.previewCurrentIndex + 1} / ${e.length}
1615
+ ${i ? e`<span class="pkt-fileupload__image-preview__counter">
1616
+ ${this.previewCurrentIndex + 1} / ${t.length}
1627
1617
  </span>` : null}
1628
- ${n ? r`<button
1618
+ ${i ? e`<button
1629
1619
  type="button"
1630
1620
  class="pkt-fileupload__image-preview__nav pkt-fileupload__image-preview__nav--next pkt-btn pkt-btn--medium pkt-btn--secondary pkt-btn--icon-only"
1631
- aria-label=${`Neste bilde ${this.previewCurrentIndex + 2} / ${e.length}`}
1632
- @click=${() => this.navigatePreview("next", e)}
1621
+ aria-label=${`Neste bilde ${this.previewCurrentIndex + 2} / ${t.length}`}
1622
+ @click=${() => this.navigatePreview("next", t)}
1633
1623
  >
1634
1624
  <pkt-icon
1635
1625
  class="pkt-btn__icon pkt-icon"
@@ -1644,7 +1634,7 @@ var M = "comments", N = (e) => {
1644
1634
  }
1645
1635
  getQueueItemOperations() {
1646
1636
  let e = [];
1647
- return this.renameFilesEnabled && this.itemRenderer !== "thumbnail" && e.push(L()), this.addCommentsEnabled && this.itemRenderer !== "thumbnail" && e.push(R()), e.push(...this.extraOperations), e.push(I((e) => this.removeFileItem(e))), e;
1637
+ return this.renameFilesEnabled && this.itemRenderer !== "thumbnail" && e.push(z()), this.addCommentsEnabled && this.itemRenderer !== "thumbnail" && e.push(B()), e.push(...this.extraOperations), e.push(R((e) => this.removeFileItem(e))), e;
1648
1638
  }
1649
1639
  activateOperation(e, t) {
1650
1640
  this.activeOperationByFileId = {
@@ -1672,9 +1662,9 @@ var M = "comments", N = (e) => {
1672
1662
  n === void 0 && delete i[t], this.updateFileItem(e, { attributes: i });
1673
1663
  }
1674
1664
  };
1675
- t([e()], $.prototype, "activeOperationByFileId", void 0), t([e()], $.prototype, "isPreviewModalOpen", void 0), t([e()], $.prototype, "previewCurrentIndex", void 0), t([e()], $.prototype, "failedImageFileIds", void 0), $ = t([i("pkt-fileupload")], $);
1665
+ r([n()], $.prototype, "activeOperationByFileId", void 0), r([n()], $.prototype, "isPreviewModalOpen", void 0), r([n()], $.prototype, "previewCurrentIndex", void 0), r([n()], $.prototype, "failedImageFileIds", void 0), $ = r([t("pkt-fileupload")], $);
1676
1666
  //#endregion
1677
1667
  //#region src/components/fileupload/index.ts
1678
- var te = $;
1668
+ var re = $;
1679
1669
  //#endregion
1680
- export { $ as n, te as t };
1670
+ export { $ as n, re as t };