@sync-in/server 1.3.2 → 1.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (454) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/README.md +3 -3
  3. package/package.json +14 -14
  4. package/server/applications/files/services/files-manager.service.js +11 -2
  5. package/server/applications/files/services/files-manager.service.js.map +1 -1
  6. package/server/applications/files/utils/send-file.js +1 -1
  7. package/server/applications/files/utils/send-file.js.map +1 -1
  8. package/server/applications/sync/services/sync-manager.service.js +1 -1
  9. package/server/applications/sync/services/sync-manager.service.js.map +1 -1
  10. package/server/applications/webdav/services/webdav-methods.service.js +28 -28
  11. package/server/applications/webdav/services/webdav-methods.service.js.map +1 -1
  12. package/static/3rdpartylicenses.txt +85 -85
  13. package/static/assets/codemirror/mode/gas/gas.js +2 -0
  14. package/static/chunk-2AC4RLMK.js +4 -0
  15. package/static/chunk-2FUMMTEK.js +1 -0
  16. package/static/chunk-3SC36MTD.js +1 -0
  17. package/static/chunk-3UFSZ24R.js +1 -0
  18. package/static/chunk-4GYSKJJC.js +4 -0
  19. package/static/chunk-67ENNMPZ.js +1 -0
  20. package/static/chunk-6QJL2YDQ.js +1 -0
  21. package/static/chunk-6WROUPVQ.js +1 -0
  22. package/static/chunk-DZNKFVGE.js +1 -0
  23. package/static/chunk-HX6BM5E5.js +1 -0
  24. package/static/chunk-J6YSVODR.js +1 -0
  25. package/static/chunk-JEF7STYA.js +1 -0
  26. package/static/chunk-JOPTBE35.js +24 -0
  27. package/static/chunk-JQOMI5VI.js +560 -0
  28. package/static/chunk-LHULGE6M.js +1 -0
  29. package/static/chunk-MGWQFMQF.js +1 -0
  30. package/static/chunk-MWMJMTGE.js +1 -0
  31. package/static/chunk-NJVHZKGK.js +1 -0
  32. package/static/chunk-OR75MKSH.js +1 -0
  33. package/static/chunk-OWYD7F64.js +1 -0
  34. package/static/chunk-Q2UU32ST.js +1 -0
  35. package/static/chunk-QNGY6EWB.js +1 -0
  36. package/static/chunk-QVWBPQWU.js +7 -0
  37. package/static/chunk-RTHDK2Z7.js +1 -0
  38. package/static/chunk-RTRJ3KFH.js +1 -0
  39. package/static/chunk-SDYSHQI5.js +1 -0
  40. package/static/chunk-TECWTVNM.js +1 -0
  41. package/static/chunk-TJICEVPI.js +1 -0
  42. package/static/chunk-UILGGLKW.js +1 -0
  43. package/static/{chunk-E27KCFP6.js → chunk-VCXIQZT4.js} +3 -3
  44. package/static/chunk-W37K2YDS.js +1 -0
  45. package/static/chunk-WA2KMN23.js +1 -0
  46. package/static/chunk-X7LCJ4LA.js +1 -0
  47. package/static/chunk-XCIDAKI5.js +1 -0
  48. package/static/chunk-ZGLYEYWA.js +1 -0
  49. package/static/index.html +2 -2
  50. package/static/main-64E5RI2M.js +10 -0
  51. package/static/{scripts-MQMRSPYD.js → scripts-263WP5VB.js} +2 -2
  52. package/static/{styles-TJJDSCD4.css → styles-3DONJ2Z4.css} +1 -1
  53. package/sync-in-server.js +12 -5
  54. package/static/assets/mimes/7zip.svg +0 -14
  55. package/static/assets/mimes/application-7zip.svg +0 -14
  56. package/static/assets/mimes/application-atom+xml.svg +0 -15
  57. package/static/assets/mimes/application-gzip.svg +0 -16
  58. package/static/assets/mimes/application-mathml+xml.svg +0 -188
  59. package/static/assets/mimes/application-mp4.svg +0 -18
  60. package/static/assets/mimes/application-msexcel.svg +0 -1
  61. package/static/assets/mimes/application-msword-template.svg +0 -1
  62. package/static/assets/mimes/application-pgp-encrypted.svg +0 -16
  63. package/static/assets/mimes/application-pgp-keys.svg +0 -16
  64. package/static/assets/mimes/application-pgp-signature.svg +0 -16
  65. package/static/assets/mimes/application-powerpoint.svg +0 -1
  66. package/static/assets/mimes/application-rdf+xml.svg +0 -14
  67. package/static/assets/mimes/application-rss+xml.svg +0 -15
  68. package/static/assets/mimes/application-rtf.svg +0 -14
  69. package/static/assets/mimes/application-text.svg +0 -14
  70. package/static/assets/mimes/application-vnd.ms-excel.sheet.binary.macroenabled.12.svg +0 -1
  71. package/static/assets/mimes/application-vnd.ms-excel.sheet.macroenabled.12.svg +0 -1
  72. package/static/assets/mimes/application-vnd.ms-excel.template.macroenabled.12.svg +0 -1
  73. package/static/assets/mimes/application-vnd.ms-powerpoint.presentation.macroenabled.12.svg +0 -1
  74. package/static/assets/mimes/application-vnd.ms-powerpoint.template.macroenabled.12.svg +0 -1
  75. package/static/assets/mimes/application-vnd.ms-word.document.macroenabled.12.svg +0 -1
  76. package/static/assets/mimes/application-vnd.ms-word.svg +0 -1
  77. package/static/assets/mimes/application-vnd.ms-word.template.macroenabled.12.svg +0 -1
  78. package/static/assets/mimes/application-vnd.mspowerpoint.svg +0 -1
  79. package/static/assets/mimes/application-vnd.oasis.opendocument.chart.svg +0 -1
  80. package/static/assets/mimes/application-vnd.oasis.opendocument.text-master.svg +0 -92
  81. package/static/assets/mimes/application-vnd.oasis.opendocument.text-web.svg +0 -18
  82. package/static/assets/mimes/application-vnd.openofficeorg.extension.svg +0 -59
  83. package/static/assets/mimes/application-vnd.openxmlformats-officedocument.presentationml.presentation.svg +0 -1
  84. package/static/assets/mimes/application-vnd.openxmlformats-officedocument.presentationml.slideshow.svg +0 -1
  85. package/static/assets/mimes/application-vnd.openxmlformats-officedocument.spreadsheetml.sheet.svg +0 -1
  86. package/static/assets/mimes/application-vnd.openxmlformats-officedocument.spreadsheetml.template.svg +0 -1
  87. package/static/assets/mimes/application-vnd.openxmlformats-officedocument.wordprocessingml.document.svg +0 -1
  88. package/static/assets/mimes/application-vnd.openxmlformats-officedocument.wordprocessingml.template.svg +0 -1
  89. package/static/assets/mimes/application-vnd.rn-realmedia.svg +0 -18
  90. package/static/assets/mimes/application-vnd.sun.xml.calc.svg +0 -1
  91. package/static/assets/mimes/application-vnd.sun.xml.writer-global.svg +0 -1
  92. package/static/assets/mimes/application-vnd.sun.xml.writer-template.svg +0 -1
  93. package/static/assets/mimes/application-vnd.sun.xml.writer.svg +0 -1
  94. package/static/assets/mimes/application-vnd.sun.xml.writer.template.svg +0 -14
  95. package/static/assets/mimes/application-wps-office.doc.svg +0 -1
  96. package/static/assets/mimes/application-wps-office.docx.svg +0 -1
  97. package/static/assets/mimes/application-wps-office.ppt.svg +0 -1
  98. package/static/assets/mimes/application-wps-office.pptx.svg +0 -1
  99. package/static/assets/mimes/application-wps-office.xls.svg +0 -1
  100. package/static/assets/mimes/application-wps-office.xlsx.svg +0 -1
  101. package/static/assets/mimes/application-x-7zip.svg +0 -14
  102. package/static/assets/mimes/application-x-ace.svg +0 -14
  103. package/static/assets/mimes/application-x-addon.svg +0 -59
  104. package/static/assets/mimes/application-x-ar.svg +0 -16
  105. package/static/assets/mimes/application-x-arc.svg +0 -14
  106. package/static/assets/mimes/application-x-archive.svg +0 -16
  107. package/static/assets/mimes/application-x-arj.svg +0 -14
  108. package/static/assets/mimes/application-x-audacity-project.svg +0 -24
  109. package/static/assets/mimes/application-x-bzdvi.svg +0 -14
  110. package/static/assets/mimes/application-x-bzip-compressed-tar.svg +0 -14
  111. package/static/assets/mimes/application-x-class-file.svg +0 -37
  112. package/static/assets/mimes/application-x-compress-tar.svg +0 -16
  113. package/static/assets/mimes/application-x-compress.svg +0 -16
  114. package/static/assets/mimes/application-x-compressed-tar.svg +0 -14
  115. package/static/assets/mimes/application-x-core.svg +0 -20
  116. package/static/assets/mimes/application-x-cpio.svg +0 -16
  117. package/static/assets/mimes/application-x-deb.svg +0 -14
  118. package/static/assets/mimes/application-x-designer.svg +0 -48
  119. package/static/assets/mimes/application-x-egon.svg +0 -12
  120. package/static/assets/mimes/application-x-extension-html.svg +0 -18
  121. package/static/assets/mimes/application-x-font-afm.svg +0 -14
  122. package/static/assets/mimes/application-x-font-snf.svg +0 -14
  123. package/static/assets/mimes/application-x-font-speedo.svg +0 -14
  124. package/static/assets/mimes/application-x-font-type1.svg +0 -14
  125. package/static/assets/mimes/application-x-gettext-translation.svg +0 -14
  126. package/static/assets/mimes/application-x-gnome-theme-package.svg +0 -109
  127. package/static/assets/mimes/application-x-gzdvi.svg +0 -16
  128. package/static/assets/mimes/application-x-gzip.svg +0 -16
  129. package/static/assets/mimes/application-x-httpd-php.svg +0 -18
  130. package/static/assets/mimes/application-x-iso9660-image.svg +0 -292
  131. package/static/assets/mimes/application-x-java-archive.svg +0 -16
  132. package/static/assets/mimes/application-x-jokosher.svg +0 -24
  133. package/static/assets/mimes/application-x-kcachegrind.svg +0 -273
  134. package/static/assets/mimes/application-x-kcsrc.svg +0 -109
  135. package/static/assets/mimes/application-x-keepass2.svg +0 -2
  136. package/static/assets/mimes/application-x-kgetlist.svg +0 -53
  137. package/static/assets/mimes/application-x-lha.svg +0 -14
  138. package/static/assets/mimes/application-x-lzma-compressed-tar.svg +0 -16
  139. package/static/assets/mimes/application-x-lzop.svg +0 -16
  140. package/static/assets/mimes/application-x-m4.svg +0 -14
  141. package/static/assets/mimes/application-x-matroska.svg +0 -18
  142. package/static/assets/mimes/application-x-mplayer2.svg +0 -18
  143. package/static/assets/mimes/application-x-ms-application.svg +0 -306
  144. package/static/assets/mimes/application-x-msdos-program.svg +0 -306
  145. package/static/assets/mimes/application-x-msdownload.svg +0 -306
  146. package/static/assets/mimes/application-x-msi.svg +0 -306
  147. package/static/assets/mimes/application-x-mswinurl.svg +0 -18
  148. package/static/assets/mimes/application-x-mswrite.svg +0 -1
  149. package/static/assets/mimes/application-x-object.svg +0 -273
  150. package/static/assets/mimes/application-x-ole-storage.svg +0 -273
  151. package/static/assets/mimes/application-x-pak.svg +0 -16
  152. package/static/assets/mimes/application-x-perl.svg +0 -15
  153. package/static/assets/mimes/application-x-php.svg +0 -18
  154. package/static/assets/mimes/application-x-python-bytecode.svg +0 -16
  155. package/static/assets/mimes/application-x-rar.svg +0 -14
  156. package/static/assets/mimes/application-x-rpm.svg +0 -14
  157. package/static/assets/mimes/application-x-ruby.svg +0 -22
  158. package/static/assets/mimes/application-x-sh.svg +0 -17
  159. package/static/assets/mimes/application-x-shared-library-la.svg +0 -62
  160. package/static/assets/mimes/application-x-shellscript.svg +0 -17
  161. package/static/assets/mimes/application-x-shockwave-flash.svg +0 -18
  162. package/static/assets/mimes/application-x-srt.svg +0 -210
  163. package/static/assets/mimes/application-x-tar.svg +0 -16
  164. package/static/assets/mimes/application-x-tarz.svg +0 -14
  165. package/static/assets/mimes/application-x-trash.svg +0 -14
  166. package/static/assets/mimes/application-x-tzo.svg +0 -14
  167. package/static/assets/mimes/application-x-wine-extension-pdd.svg +0 -14
  168. package/static/assets/mimes/application-x-zip.svg +0 -14
  169. package/static/assets/mimes/application-x-zoo.svg +0 -14
  170. package/static/assets/mimes/application-xhtml+xml.svg +0 -18
  171. package/static/assets/mimes/application-xml.svg +0 -18
  172. package/static/assets/mimes/application-xsd.svg +0 -18
  173. package/static/assets/mimes/application-xslt+xml.svg +0 -18
  174. package/static/assets/mimes/application-zip.svg +0 -14
  175. package/static/assets/mimes/applications-java.svg +0 -14
  176. package/static/assets/mimes/archive.svg +0 -16
  177. package/static/assets/mimes/ascii.svg +0 -14
  178. package/static/assets/mimes/audio-ac3.svg +0 -24
  179. package/static/assets/mimes/audio-flac.svg +0 -24
  180. package/static/assets/mimes/audio-mpeg.svg +0 -24
  181. package/static/assets/mimes/audio-vn.rn-realmedia.svg +0 -18
  182. package/static/assets/mimes/audio-vnd.rn-realvideo.svg +0 -18
  183. package/static/assets/mimes/audio-x-adpcm.svg +0 -24
  184. package/static/assets/mimes/audio-x-aiff.svg +0 -24
  185. package/static/assets/mimes/audio-x-flac+ogg.svg +0 -24
  186. package/static/assets/mimes/audio-x-flac.svg +0 -24
  187. package/static/assets/mimes/audio-x-it.svg +0 -24
  188. package/static/assets/mimes/audio-x-monkey.svg +0 -24
  189. package/static/assets/mimes/audio-x-mpegurl.svg +0 -24
  190. package/static/assets/mimes/audio-x-wav.svg +0 -24
  191. package/static/assets/mimes/audio-x-xi.svg +0 -24
  192. package/static/assets/mimes/audio-x-xm.svg +0 -24
  193. package/static/assets/mimes/binary.svg +0 -40
  194. package/static/assets/mimes/deb.svg +0 -14
  195. package/static/assets/mimes/divx.svg +0 -18
  196. package/static/assets/mimes/document.svg +0 -14
  197. package/static/assets/mimes/emblem-package.svg +0 -16
  198. package/static/assets/mimes/eps.svg +0 -24
  199. package/static/assets/mimes/exec.svg +0 -40
  200. package/static/assets/mimes/folder-tar.svg +0 -16
  201. package/static/assets/mimes/folder_tar.svg +0 -16
  202. package/static/assets/mimes/font-otf.svg +0 -14
  203. package/static/assets/mimes/font.svg +0 -14
  204. package/static/assets/mimes/font_bitmap.svg +0 -14
  205. package/static/assets/mimes/font_truetype.svg +0 -14
  206. package/static/assets/mimes/font_type1.svg +0 -14
  207. package/static/assets/mimes/fonts-package.svg +0 -16
  208. package/static/assets/mimes/gedit-plugin.svg +0 -59
  209. package/static/assets/mimes/gnome-exe-thumbnailer-generic-x.svg +0 -306
  210. package/static/assets/mimes/gnome-exe-thumbnailer-generic.svg +0 -306
  211. package/static/assets/mimes/gnome-exe-thumbnailer-template.svg +0 -306
  212. package/static/assets/mimes/gnome-fs-executable.svg +0 -40
  213. package/static/assets/mimes/gnome-mime-application-atom+xml.svg +0 -15
  214. package/static/assets/mimes/gnome-mime-application-msexcel.svg +0 -1
  215. package/static/assets/mimes/gnome-mime-application-msword.svg +0 -1
  216. package/static/assets/mimes/gnome-mime-application-ogg.svg +0 -24
  217. package/static/assets/mimes/gnome-mime-application-pdf.svg +0 -13
  218. package/static/assets/mimes/gnome-mime-application-postscript.svg +0 -14
  219. package/static/assets/mimes/gnome-mime-application-powerpoint.svg +0 -1
  220. package/static/assets/mimes/gnome-mime-application-rss+xml.svg +0 -15
  221. package/static/assets/mimes/gnome-mime-application-rtf.svg +0 -14
  222. package/static/assets/mimes/gnome-mime-application-vnd.ms-excel.svg +0 -1
  223. package/static/assets/mimes/gnome-mime-application-vnd.ms-powerpoint.svg +0 -1
  224. package/static/assets/mimes/gnome-mime-application-vnd.ms-word.svg +0 -1
  225. package/static/assets/mimes/gnome-mime-application-vnd.mspowerpoint.svg +0 -1
  226. package/static/assets/mimes/gnome-mime-application-vnd.oasis.opendocument.formula.svg +0 -188
  227. package/static/assets/mimes/gnome-mime-application-vnd.oasis.opendocument.text-web.svg +0 -18
  228. package/static/assets/mimes/gnome-mime-application-vnd.openxmlformats-officedocument.presentationml.presentation.svg +0 -1
  229. package/static/assets/mimes/gnome-mime-application-vnd.openxmlformats-officedocument.presentationml.slideshow.svg +0 -1
  230. package/static/assets/mimes/gnome-mime-application-vnd.openxmlformats-officedocument.spreadsheetml.sheet.svg +0 -1
  231. package/static/assets/mimes/gnome-mime-application-vnd.openxmlformats-officedocument.wordprocessingml.document.svg +0 -1
  232. package/static/assets/mimes/gnome-mime-application-vnd.rn-realmedia-secure.svg +0 -18
  233. package/static/assets/mimes/gnome-mime-application-vnd.rn-realmedia-vbr.svg +0 -18
  234. package/static/assets/mimes/gnome-mime-application-vnd.rn-realmedia.svg +0 -18
  235. package/static/assets/mimes/gnome-mime-application-wps-office.doc.svg +0 -1
  236. package/static/assets/mimes/gnome-mime-application-wps-office.docx.svg +0 -1
  237. package/static/assets/mimes/gnome-mime-application-wps-office.ppt.svg +0 -1
  238. package/static/assets/mimes/gnome-mime-application-wps-office.pptx.svg +0 -1
  239. package/static/assets/mimes/gnome-mime-application-wps-office.xls.svg +0 -1
  240. package/static/assets/mimes/gnome-mime-application-wps-office.xlsx.svg +0 -1
  241. package/static/assets/mimes/gnome-mime-application-x-7z-compressed.svg +0 -14
  242. package/static/assets/mimes/gnome-mime-application-x-7zip.svg +0 -14
  243. package/static/assets/mimes/gnome-mime-application-x-archive.svg +0 -16
  244. package/static/assets/mimes/gnome-mime-application-x-arj.svg +0 -16
  245. package/static/assets/mimes/gnome-mime-application-x-bittorrent.svg +0 -53
  246. package/static/assets/mimes/gnome-mime-application-x-bzip-compressed-tar.svg +0 -16
  247. package/static/assets/mimes/gnome-mime-application-x-bzip-compressed.svg +0 -16
  248. package/static/assets/mimes/gnome-mime-application-x-bzip.svg +0 -16
  249. package/static/assets/mimes/gnome-mime-application-x-class-file.svg +0 -14
  250. package/static/assets/mimes/gnome-mime-application-x-compress.svg +0 -16
  251. package/static/assets/mimes/gnome-mime-application-x-compressed-tar.svg +0 -16
  252. package/static/assets/mimes/gnome-mime-application-x-cpio-compressed.svg +0 -16
  253. package/static/assets/mimes/gnome-mime-application-x-cpio.svg +0 -16
  254. package/static/assets/mimes/gnome-mime-application-x-deb.svg +0 -14
  255. package/static/assets/mimes/gnome-mime-application-x-designer.svg +0 -48
  256. package/static/assets/mimes/gnome-mime-application-x-executable.svg +0 -40
  257. package/static/assets/mimes/gnome-mime-application-x-font-afm.svg +0 -14
  258. package/static/assets/mimes/gnome-mime-application-x-font-bdf.svg +0 -14
  259. package/static/assets/mimes/gnome-mime-application-x-font-linux-psf.svg +0 -14
  260. package/static/assets/mimes/gnome-mime-application-x-font-pcf.svg +0 -14
  261. package/static/assets/mimes/gnome-mime-application-x-font-sunos-news.svg +0 -14
  262. package/static/assets/mimes/gnome-mime-application-x-font-ttf.svg +0 -14
  263. package/static/assets/mimes/gnome-mime-application-x-glade.svg +0 -48
  264. package/static/assets/mimes/gnome-mime-application-x-gnome-app-info.svg +0 -109
  265. package/static/assets/mimes/gnome-mime-application-x-gnome-theme-package.svg +0 -109
  266. package/static/assets/mimes/gnome-mime-application-x-gzip.svg +0 -16
  267. package/static/assets/mimes/gnome-mime-application-x-gzpostscript.svg +0 -14
  268. package/static/assets/mimes/gnome-mime-application-x-jar.svg +0 -16
  269. package/static/assets/mimes/gnome-mime-application-x-java.svg +0 -14
  270. package/static/assets/mimes/gnome-mime-application-x-killustrator.svg +0 -12
  271. package/static/assets/mimes/gnome-mime-application-x-lha.svg +0 -16
  272. package/static/assets/mimes/gnome-mime-application-x-lhz.svg +0 -16
  273. package/static/assets/mimes/gnome-mime-application-x-lzma-compressed-tar.svg +0 -16
  274. package/static/assets/mimes/gnome-mime-application-x-lzma.svg +0 -16
  275. package/static/assets/mimes/gnome-mime-application-x-ms-dos-executable.svg +0 -306
  276. package/static/assets/mimes/gnome-mime-application-x-perl.svg +0 -15
  277. package/static/assets/mimes/gnome-mime-application-x-php.svg +0 -18
  278. package/static/assets/mimes/gnome-mime-application-x-python-bytecode.svg +0 -16
  279. package/static/assets/mimes/gnome-mime-application-x-rar.svg +0 -14
  280. package/static/assets/mimes/gnome-mime-application-x-rpm.svg +0 -14
  281. package/static/assets/mimes/gnome-mime-application-x-ruby.svg +0 -22
  282. package/static/assets/mimes/gnome-mime-application-x-shellscript.svg +0 -17
  283. package/static/assets/mimes/gnome-mime-application-x-shockwave-flash.svg +0 -18
  284. package/static/assets/mimes/gnome-mime-application-x-stuffit.svg +0 -16
  285. package/static/assets/mimes/gnome-mime-application-x-tar.svg +0 -16
  286. package/static/assets/mimes/gnome-mime-application-x-tarz.svg +0 -16
  287. package/static/assets/mimes/gnome-mime-application-x-tex.svg +0 -79
  288. package/static/assets/mimes/gnome-mime-application-x-theme.svg +0 -109
  289. package/static/assets/mimes/gnome-mime-application-x-zip.svg +0 -14
  290. package/static/assets/mimes/gnome-mime-application-xhtml+xml.svg +0 -18
  291. package/static/assets/mimes/gnome-mime-application-xml.svg +0 -18
  292. package/static/assets/mimes/gnome-mime-application-zip.svg +0 -14
  293. package/static/assets/mimes/gnome-mime-application.svg +0 -40
  294. package/static/assets/mimes/gnome-mime-audio.svg +0 -24
  295. package/static/assets/mimes/gnome-mime-image-vnd.adobe.photoshop.svg +0 -14
  296. package/static/assets/mimes/gnome-mime-image-x-cmu-raster.svg +0 -12
  297. package/static/assets/mimes/gnome-mime-image-x-killustrator.svg +0 -12
  298. package/static/assets/mimes/gnome-mime-image-x-psd.svg +0 -14
  299. package/static/assets/mimes/gnome-mime-image-x-xpixmap.svg +0 -12
  300. package/static/assets/mimes/gnome-mime-image.svg +0 -12
  301. package/static/assets/mimes/gnome-mime-text-html.svg +0 -18
  302. package/static/assets/mimes/gnome-mime-text-install.svg +0 -20
  303. package/static/assets/mimes/gnome-mime-text-plain.svg +0 -14
  304. package/static/assets/mimes/gnome-mime-text-vnd.wap.wml.svg +0 -18
  305. package/static/assets/mimes/gnome-mime-text-x-changelog.svg +0 -208
  306. package/static/assets/mimes/gnome-mime-text-x-copying.svg +0 -17
  307. package/static/assets/mimes/gnome-mime-text-x-csh.svg +0 -17
  308. package/static/assets/mimes/gnome-mime-text-x-gtkrc.svg +0 -109
  309. package/static/assets/mimes/gnome-mime-text-x-install.svg +0 -17
  310. package/static/assets/mimes/gnome-mime-text-x-java-source.svg +0 -14
  311. package/static/assets/mimes/gnome-mime-text-x-java.svg +0 -14
  312. package/static/assets/mimes/gnome-mime-text-x-makefile.svg +0 -176
  313. package/static/assets/mimes/gnome-mime-text-x-opml+xml.svg +0 -15
  314. package/static/assets/mimes/gnome-mime-text-x-opml.svg +0 -15
  315. package/static/assets/mimes/gnome-mime-text-x-python.svg +0 -16
  316. package/static/assets/mimes/gnome-mime-text-x-readme.svg +0 -15
  317. package/static/assets/mimes/gnome-mime-text-x-sh.svg +0 -17
  318. package/static/assets/mimes/gnome-mime-text-x-zsh.svg +0 -17
  319. package/static/assets/mimes/gnome-mime-text.svg +0 -14
  320. package/static/assets/mimes/gnome-mime-video-x-ms-asf.svg +0 -18
  321. package/static/assets/mimes/gnome-mime-video-x-ms-wmv.svg +0 -18
  322. package/static/assets/mimes/gnome-mime-video.svg +0 -18
  323. package/static/assets/mimes/gnome-mime-x-font-afm.svg +0 -14
  324. package/static/assets/mimes/gnome-mime-x-install.svg +0 -20
  325. package/static/assets/mimes/gnome-package.svg +0 -16
  326. package/static/assets/mimes/html.svg +0 -18
  327. package/static/assets/mimes/image-gif.svg +0 -12
  328. package/static/assets/mimes/image-jpeg.svg +0 -12
  329. package/static/assets/mimes/image-png.svg +0 -12
  330. package/static/assets/mimes/image-svg+xml-compressed.svg +0 -12
  331. package/static/assets/mimes/image-svg+xml.svg +0 -12
  332. package/static/assets/mimes/image-vnd.adobe.photoshop.svg +0 -14
  333. package/static/assets/mimes/image-vnd.microsoft.icon.svg +0 -12
  334. package/static/assets/mimes/image-x-psdimage-x-psd.svg +0 -14
  335. package/static/assets/mimes/image-x-xfig.svg +0 -12
  336. package/static/assets/mimes/image.svg +0 -12
  337. package/static/assets/mimes/internet-feed.svg +0 -15
  338. package/static/assets/mimes/libpeas-plugin.svg +0 -59
  339. package/static/assets/mimes/libreoffice-database.svg +0 -155
  340. package/static/assets/mimes/libreoffice-extension.svg +0 -59
  341. package/static/assets/mimes/libreoffice-extensionn.svg +0 -59
  342. package/static/assets/mimes/libreoffice-formula.svg +0 -188
  343. package/static/assets/mimes/libreoffice-oasis-formula.svg +0 -188
  344. package/static/assets/mimes/libreoffice34-extension.svg +0 -59
  345. package/static/assets/mimes/media-audio.svg +0 -24
  346. package/static/assets/mimes/media-video.svg +0 -18
  347. package/static/assets/mimes/mime-ascii.svg +0 -14
  348. package/static/assets/mimes/mime_ascii.svg +0 -14
  349. package/static/assets/mimes/misc.svg +0 -14
  350. package/static/assets/mimes/multipart-encrypted.svg +0 -273
  351. package/static/assets/mimes/music.svg +0 -24
  352. package/static/assets/mimes/none.svg +0 -110
  353. package/static/assets/mimes/openofficeorg3-extension.svg +0 -59
  354. package/static/assets/mimes/package.svg +0 -16
  355. package/static/assets/mimes/package_editors.svg +0 -14
  356. package/static/assets/mimes/pdf.svg +0 -13
  357. package/static/assets/mimes/preferences-certificate.svg +0 -28
  358. package/static/assets/mimes/preferences-plugin.svg +0 -59
  359. package/static/assets/mimes/rar.svg +0 -14
  360. package/static/assets/mimes/raw.svg +0 -12
  361. package/static/assets/mimes/scii.svg +0 -14
  362. package/static/assets/mimes/shellscript.svg +0 -17
  363. package/static/assets/mimes/sound.svg +0 -24
  364. package/static/assets/mimes/stock_certificate.svg +0 -28
  365. package/static/assets/mimes/stock_new-formula.svg +0 -188
  366. package/static/assets/mimes/stock_new-html.svg +0 -18
  367. package/static/assets/mimes/stock_script.svg +0 -17
  368. package/static/assets/mimes/stock_scripts.svg +0 -17
  369. package/static/assets/mimes/tar.svg +0 -16
  370. package/static/assets/mimes/text-css.svg +0 -18
  371. package/static/assets/mimes/text-enriched.svg +0 -14
  372. package/static/assets/mimes/text-htmlh.svg +0 -18
  373. package/static/assets/mimes/text-javascript.svg +0 -6
  374. package/static/assets/mimes/text-mht.svg +0 -18
  375. package/static/assets/mimes/text-plain.svg +0 -14
  376. package/static/assets/mimes/text-x-bibtex.svg +0 -79
  377. package/static/assets/mimes/text-x-gtkrc.svg +0 -109
  378. package/static/assets/mimes/text-x-java-source.svg +0 -14
  379. package/static/assets/mimes/text-x-lua.svg +0 -14
  380. package/static/assets/mimes/text-x-nfo.svg +0 -14
  381. package/static/assets/mimes/text-x-opml+xml.svg +0 -15
  382. package/static/assets/mimes/text-x-opml.svg +0 -15
  383. package/static/assets/mimes/text-x-tex.svg +0 -79
  384. package/static/assets/mimes/text-x-vala.svg +0 -14
  385. package/static/assets/mimes/text-x.svg +0 -14
  386. package/static/assets/mimes/text-xmcd.svg +0 -358
  387. package/static/assets/mimes/text.svg +0 -14
  388. package/static/assets/mimes/text2.svg +0 -14
  389. package/static/assets/mimes/tgz.svg +0 -16
  390. package/static/assets/mimes/txt.svg +0 -14
  391. package/static/assets/mimes/txt2.svg +0 -14
  392. package/static/assets/mimes/uri-mms.svg +0 -18
  393. package/static/assets/mimes/uri-mmst.svg +0 -18
  394. package/static/assets/mimes/uri-mmsu.svg +0 -18
  395. package/static/assets/mimes/uri-pnm.svg +0 -18
  396. package/static/assets/mimes/uri-rtspt.svg +0 -18
  397. package/static/assets/mimes/uri-rtspu.svg +0 -18
  398. package/static/assets/mimes/video-quicktime.svg +0 -18
  399. package/static/assets/mimes/video-vivo.svg +0 -18
  400. package/static/assets/mimes/video-wavelet.svg +0 -18
  401. package/static/assets/mimes/video-webm.svg +0 -18
  402. package/static/assets/mimes/video-x-anim.svg +0 -18
  403. package/static/assets/mimes/video-x-flic.svg +0 -18
  404. package/static/assets/mimes/video-x-google-vlc-plugin.svg +0 -18
  405. package/static/assets/mimes/video-x-javafx.svg +0 -18
  406. package/static/assets/mimes/video-x-matroska.svg +0 -18
  407. package/static/assets/mimes/video-x-mng.svg +0 -18
  408. package/static/assets/mimes/video-x-ms-asf-plugin.svg +0 -18
  409. package/static/assets/mimes/video-x-ms-asf.svg +0 -18
  410. package/static/assets/mimes/video-x-ms-wmp.svg +0 -18
  411. package/static/assets/mimes/video-x-ms-wmv.svg +0 -18
  412. package/static/assets/mimes/video-x-nsv.svg +0 -18
  413. package/static/assets/mimes/video-x-sgi-movie.svg +0 -18
  414. package/static/assets/mimes/video-x-theora+ogg.svg +0 -18
  415. package/static/assets/mimes/video-x-wmv.svg +0 -18
  416. package/static/assets/mimes/video.svg +0 -18
  417. package/static/assets/mimes/www.svg +0 -18
  418. package/static/assets/mimes/x-kde-nsplugin-generated.svg +0 -59
  419. package/static/assets/mimes/zip.svg +0 -14
  420. package/static/chunk-2LIE3SKB.js +0 -7
  421. package/static/chunk-3BKYCF53.js +0 -1
  422. package/static/chunk-6CFIZHYI.js +0 -1
  423. package/static/chunk-7FVU676A.js +0 -4
  424. package/static/chunk-7RNZNYVF.js +0 -1
  425. package/static/chunk-7SJOQRBE.js +0 -1
  426. package/static/chunk-BS5LXHXU.js +0 -1
  427. package/static/chunk-CPHC7U34.js +0 -1
  428. package/static/chunk-DVHXFWN7.js +0 -1
  429. package/static/chunk-DYRV5R67.js +0 -1
  430. package/static/chunk-EWJD5G76.js +0 -1
  431. package/static/chunk-EYXC4W63.js +0 -24
  432. package/static/chunk-FPEGN42P.js +0 -564
  433. package/static/chunk-GAL4ENT6.js +0 -1
  434. package/static/chunk-GSVMWC5N.js +0 -1
  435. package/static/chunk-HNWPHW2W.js +0 -1
  436. package/static/chunk-IPGNGPWY.js +0 -1
  437. package/static/chunk-J5O3CY2H.js +0 -1
  438. package/static/chunk-JRVJIJB5.js +0 -1
  439. package/static/chunk-MAWDGVNC.js +0 -1
  440. package/static/chunk-N3QPDPBV.js +0 -1
  441. package/static/chunk-NSXFB3SX.js +0 -1
  442. package/static/chunk-OVO4W2GF.js +0 -1
  443. package/static/chunk-SOLCSMU7.js +0 -1
  444. package/static/chunk-SY5HMUMM.js +0 -1
  445. package/static/chunk-SZKZH4MJ.js +0 -1
  446. package/static/chunk-UGSGMP2I.js +0 -1
  447. package/static/chunk-ULTPIQL3.js +0 -1
  448. package/static/chunk-VBWPPICY.js +0 -1
  449. package/static/chunk-VFSSL4TI.js +0 -1
  450. package/static/chunk-WGSPBZVN.js +0 -1
  451. package/static/chunk-X6UFHF4Q.js +0 -1
  452. package/static/chunk-XBHT4AH5.js +0 -1
  453. package/static/chunk-ZYB4TLJM.js +0 -4
  454. package/static/main-EDITZWHO.js +0 -10
@@ -1 +0,0 @@
1
- import{a as fe,b as he,c as _e,d as ve,f as xe,i as Se}from"./chunk-ZYB4TLJM.js";import{a as Ce,b as be}from"./chunk-3BKYCF53.js";import{f as ge}from"./chunk-X6UFHF4Q.js";import{J as re,K as le,Q as E,Sb as pe,ub as me,xb as ce,yb as ue,zb as de}from"./chunk-7FVU676A.js";import{Ad as Q,Bb as L,Bd as Y,Bf as ae,Dc as R,Dd as Z,Eb as h,Fb as u,Gf as oe,Me as ne,Qb as s,Rb as b,Sa as o,Sb as T,Tb as N,Xa as S,Xc as V,Yc as M,_c as p,_d as ee,_f as se,ab as P,ad as j,bc as v,bd as B,cc as x,cd as q,dc as O,ed as g,fb as d,jd as H,kd as X,lb as l,ld as $,md as z,nb as C,nd as W,pa as A,pb as w,qa as I,rb as f,sb as y,tb as G,td as J,ub as F,ud as K,vb as n,ve as te,wa as k,wb as a,xb as c,xe as ie}from"./chunk-FPEGN42P.js";import{a as U}from"./chunk-GAL4ENT6.js";function Te(i,m){if(i&1&&(c(0,"fa-icon",42),n(1,"span"),s(2),a()),i&2){let e=u();l("icon",e.icons.faPen),o(2),b(e.guest.fullName)}}function Ee(i,m){if(i&1&&(c(0,"fa-icon",42),n(1,"span",43),s(2,"New guest"),a()),i&2){let e=u();l("icon",e.icons.faPlus)}}function De(i,m){if(i&1&&c(0,"fa-icon",2),i&2){let e=u();l("icon",e.icons.faSpinner)}}function we(i,m){i&1&&(n(0,"h4",3)(1,"span",43),s(2,"Edit guest"),a()())}function ye(i,m){if(i&1&&(c(0,"fa-icon",44),n(1,"span",45),s(2,"Account"),a()),i&2){let e=u();l("icon",e.icons.faAddressCard)}}function Ge(i,m){if(i&1&&c(0,"app-password-strength-bar",22),i&2){let e=u();l("passwordToCheck",e.guestForm.value.password)}}function Fe(i,m){if(i&1&&(n(0,"option",26),s(1),a()),i&2){let e=m.$implicit;l("ngValue",e),o(),b(e)}}function Ne(i,m){if(i&1&&(n(0,"option",34),s(1),a()),i&2){let e=m.$implicit,r=u();l("ngValue",r.allNotifications.indexOf(e)),o(),b(e)}}function Ue(i,m){if(i&1&&(n(0,"div"),s(1),v(2,"amDateFormat"),a(),n(3,"div"),s(4),v(5,"amDateFormat"),a()),i&2){let e=u(2);o(),N("",x(2,4,e.guest.currentAccess)," - ",e.guest.currentIp,""),o(3),N("",x(5,6,e.guest.lastAccess)," - ",e.guest.lastIp,"")}}function Ae(i,m){i&1&&(n(0,"span",37),s(1,"never"),a())}function Ie(i,m){if(i&1&&(n(0,"div",11)(1,"div",12)(2,"label",46),s(3,"Creation date"),a(),n(4,"div",47),s(5),v(6,"amDateFormat"),a()(),n(7,"div",48)(8,"label",49),s(9,"Last accesses"),a(),n(10,"div",50),d(11,Ue,6,8)(12,Ae,2,0,"span",37),a()()()),i&2){let e=u();o(5),b(x(6,2,e.guest.createdAt)),o(6),f(e.guest.lastAccess?11:12)}}function ke(i,m){if(i&1&&(c(0,"fa-icon",44),n(1,"span",51),s(2,"Managers"),a(),n(3,"span"),s(4),a()),i&2){let e=u();l("icon",e.icons.faUsersGear),o(4),T("(",e.guestForm.value.managers.length||0,")")}}function Pe(i,m){i&1&&(n(0,"small",37),s(1,"At least one manager is required"),a())}function Le(i,m){if(i&1){let e=L();n(0,"button",52),h("click",function(){A(e);let t=u();return I(t.confirmDeletion=!0)}),s(1," Remove "),a()}if(i&2){let e=u();l("disabled",e.confirmDeletion)}}var st=(()=>{class i{constructor(e,r,t){this.locale=e,this.layout=r,this.userService=t,this.guest=null,this.guestChange=new k,this.user=this.userService.user,this.icons={GROUPS:ce.GROUPS,faPlus:ae,faPen:ne,faUsersGear:se,faSpinner:oe,faAddressCard:te,faUsers:ee,faShieldHalved:ie},this.allNotifications=Object.values(E),this.defaultPassword=this.layout.translateString(ue),this.languages=this.layout.getLanguages(!0),this.submitted=!1,this.loading=!1,this.confirmDeletion=!1}ngOnInit(){this.guestForm=new q({login:new g(this.guest?.login||"",[p.required,p.pattern(re)]),email:new g(this.guest?.email||"",[p.required,p.maxLength(255),p.email]),firstName:new g(this.guest?.firstName||"",[p.required,p.maxLength(255)]),lastName:new g(this.guest?.lastName||"",p.maxLength(255)),password:new g(this.guest?this.defaultPassword:"",p.maxLength(255)),language:new g(this.guest?.language||null),notification:new g(this.guest?.notification||Object.values(E).indexOf(E.APPLICATION_EMAIL)),isActive:new g(this.guest?this.guest.isActive:!0),managers:new g(this.guest?.managers||[me(this.user)])})}updatePassword(e){this.guestForm.controls.password.setValue(e),this.guestForm.controls.password.markAsDirty()}updateManagers(e){this.guestForm.controls.managers.setValue(e),this.guestForm.controls.managers.markAsDirty(),this.guestForm.controls.managers.setErrors(e.length?null:{incorrect:!0})}searchMembers(e){let r={search:e,ignoreUserIds:this.guestForm.value.managers.map(t=>t.id),usersRole:le.USER,onlyUsers:!0};return this.userService.searchMembers(r)}onCancel(){this.confirmDeletion?this.confirmDeletion=!1:this.layout.closeDialog()}onSubmit(){if(this.submitted=!0,this.confirmDeletion)this.userService.deleteGuest(this.guest.id).subscribe({next:()=>{this.guestChange.emit(["delete",this.guest]),this.layout.sendNotification("success","Guest deleted",this.guest.login),this.layout.closeDialog()},error:e=>this.onError(e)});else if(!this.guest)this.userService.createGuest(this.makeDto(!0)).subscribe({next:e=>{this.guestChange.emit(["add",e]),this.layout.sendNotification("success","Guest created",this.guestForm.value.login),this.layout.closeDialog()},error:e=>this.onError(e)});else{let e=this.makeDto();if(!Object.keys(e).length){this.loading=!1,this.submitted=!1;return}this.userService.updateGuest(this.guest.id,e).subscribe({next:r=>{r?this.guestChange.emit(["update",r]):this.guestChange.emit(["delete",this.guest]),this.layout.sendNotification("success","Guest updated",this.guestForm.value.login),this.layout.closeDialog()},error:r=>this.onError(r)})}}makeDto(e=!1){let r={};if(e)r=U({},this.guestForm.value);else for(let t in this.guestForm.controls)this.guestForm.controls[t].dirty&&(r[t]=this.guestForm.controls[t].value);for(let t in r)switch(t){case"language":r[t]=r[t]===de?null:r[t];break;case"managers":r[t]=r[t].map(_=>_.id);break}return r}onError(e){this.layout.sendNotification("error","Guest error",this.guestForm.value.login,e),this.submitted=!1,this.confirmDeletion=!1}static{this.\u0275fac=function(r){return new(r||i)(S(K),S(pe),S(ge))}}static{this.\u0275cmp=P({type:i,selectors:[["app-user-guest-dialog"]],inputs:{guest:"guest"},outputs:{guestChange:"guestChange"},decls:70,vars:40,consts:[[1,"modal-header","align-items-center"],[1,"modal-title"],["animation","spin","size","sm",1,"ms-2",3,"icon"],[1,"modal-title","ms-auto"],["aria-label","Close","type","button",3,"click"],[1,"modal-body",3,"formGroup"],["type","pills",3,"justified"],[1,"my-3"],["customClass","tab-dialog form-validation",3,"selectTab"],["tabHeading",""],[1,"d-flex","flex-column"],[1,"d-flex","col-12","pb-3"],[1,"flex-fill","col-6","pe-4"],["for","login","l10nTranslate",""],["id","login","appAutofocus","","formControlName","login","autocomplete","off","type","text",1,"form-control","form-control-sm",3,"autoSelect"],[1,"flex-fill","col-6","ps-4"],["for","email","l10nTranslate",""],["id","email","formControlName","email","autocomplete","off","type","email",1,"form-control","form-control-sm"],["for","firstName","l10nTranslate",""],["id","firstName","formControlName","firstName","autocomplete","off","type","text",1,"form-control","form-control-sm"],["for","lastName","l10nTranslate",""],["id","lastName","formControlName","lastName","autocomplete","off","type","text",1,"form-control","form-control-sm"],[1,"position-absolute","pe-4",2,"right","50%","padding-top","6px",3,"passwordToCheck"],["id","password","placeholder","Set a password",3,"passwordChange","password","showGenerator","showLabel","isRequired"],["for","language","l10nTranslate",""],["id","language","formControlName","language",1,"form-control","form-select","form-select-sm"],[3,"ngValue"],[1,"d-flex","flex-column","col-6","pe-4"],["for","account","l10nTranslate",""],["id","account",1,"form-check","form-switch","form-check-inline"],["for","isActive",1,"form-check-label"],["formControlName","isActive","id","isActive","type","checkbox",1,"form-check-input"],["for","notification","l10nTranslate",""],["id","notification","formControlName","notification",1,"form-control","form-select","form-select-sm"],["l10nTranslate","",3,"ngValue"],["customClass","tab-dialog",3,"selectTab"],[3,"membersChange","members","withPermissions","customPlaceholder","searchFunction"],["l10nTranslate","",1,"text-danger"],[1,"modal-footer"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-danger",3,"disabled"],["data-dismiss","modal","type","button","l10nTranslate","",1,"btn","btn-sm","btn-secondary","ms-auto",3,"click"],["type","button","l10nTranslate","",3,"click","disabled"],[1,"me-2",3,"icon"],["l10nTranslate",""],[3,"icon"],["l10nTranslate","",1,"ms-2"],["for","created","l10nTranslate",""],["id","created"],[1,"d-flex","flex-column","align-items-end","col-6","ps-4"],["for","access","l10nTranslate",""],["id","access",1,"text-align-end"],["l10nTranslate","",1,"ms-2","me-1"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-danger",3,"click","disabled"]],template:function(r,t){r&1&&(n(0,"div",0)(1,"h4",1),d(2,Te,3,2)(3,Ee,3,1)(4,De,1,1,"fa-icon",2),a(),d(5,we,3,0,"h4",3),n(6,"button",4),h("click",function(){return t.layout.closeDialog()}),a()(),n(7,"div",5)(8,"tabset",6),c(9,"hr",7),n(10,"tab",8),h("selectTab",function(){return t.tabView=null}),d(11,ye,3,1,"ng-template",9),n(12,"div",10)(13,"div",11)(14,"div",12)(15,"label",13),s(16,"Login"),a(),c(17,"input",14),a(),n(18,"div",15)(19,"label",16),s(20,"Email"),a(),c(21,"input",17),a()(),n(22,"div",11)(23,"div",12)(24,"label",18),s(25,"First name"),a(),c(26,"input",19),a(),n(27,"div",15)(28,"label",20),s(29,"Last name"),a(),c(30,"input",21),a()(),n(31,"div",11)(32,"div",12),d(33,Ge,1,1,"app-password-strength-bar",22),n(34,"app-input-password",23),h("passwordChange",function(D){return t.updatePassword(D)}),a()(),n(35,"div",15)(36,"label",24),s(37,"Language"),a(),n(38,"select",25),G(39,Fe,2,2,"option",26,y),a()()(),n(41,"div",11)(42,"div",27)(43,"label",28),s(44,"Account status"),a(),n(45,"div",29)(46,"label",30),c(47,"input",31),n(48,"span"),s(49),v(50,"translate"),v(51,"titlecase"),a()()()(),n(52,"div",15)(53,"label",32),s(54,"Notification"),a(),n(55,"select",33),G(56,Ne,2,2,"option",34,y),a()()(),d(58,Ie,13,4,"div",11),a()(),n(59,"tab",35),h("selectTab",function(){return t.tabView="managers"}),d(60,ke,5,2,"ng-template",9),n(61,"div",7)(62,"app-user-search",36),h("membersChange",function(D){return t.updateManagers(D)}),a(),d(63,Pe,2,0,"small",37),a()()()(),n(64,"div",38),d(65,Le,2,1,"button",39),n(66,"button",40),h("click",function(){return t.onCancel()}),s(67,"Cancel"),a(),n(68,"button",41),h("click",function(){return t.onSubmit()}),s(69),a()()),r&2&&(o(2),f(t.guest?2:3),o(2),f(t.loading?4:-1),o(),f(t.guest?5:-1),o(),w("btn-close btn-close-white ",t.guest?"ms-2":"ms-auto"," ms-2"),o(),l("formGroup",t.guestForm),o(),l("justified",!0),o(9),C("is-invalid",t.guestForm.controls.login.invalid),l("autoSelect",!1),o(4),C("is-invalid",t.guestForm.controls.email.invalid),o(5),C("is-invalid",t.guestForm.controls.firstName.invalid),o(7),f(t.guestForm.value.password!==t.defaultPassword?33:-1),o(),l("password",t.guestForm.value.password)("showGenerator",!0)("showLabel",!0)("isRequired",!0),o(5),F(t.languages),o(9),C("text-danger",!t.guestForm.value.isActive),o(),T(" ",x(51,38,O(50,35,t.guestForm.value.isActive?"active":"suspended",t.locale.language))," "),o(7),F(t.allNotifications),o(2),f(t.guest?58:-1),o(4),l("members",t.guestForm.value.managers)("withPermissions",!1)("customPlaceholder","Type to search for managers to add")("searchFunction",t.searchMembers.bind(t)),o(),f(t.guestForm.value.managers.length?-1:63),o(2),f(t.guest!=null&&t.guest.id?65:-1),o(3),w("btn btn-sm ",t.confirmDeletion?"btn-danger":"btn-primary",""),l("disabled",t.guestForm.invalid||t.submitted),o(),T(" ",t.confirmDeletion?"Confirm deletion":"Confirm"," "))},dependencies:[Z,Y,fe,J,z,W,M,V,$,j,B,H,X,Ce,be,xe,Q,R,Se,he,_e,ve],encapsulation:2})}}return i})();export{st as a};
@@ -1 +0,0 @@
1
- import{e as j}from"./chunk-WGSPBZVN.js";import"./chunk-N3QPDPBV.js";import"./chunk-3BKYCF53.js";import"./chunk-CPHC7U34.js";import"./chunk-X6UFHF4Q.js";import{Ea as I}from"./chunk-7FVU676A.js";import{c as T,d as w,h as D,k as A}from"./chunk-ZZ3LHYOY.js";import{b as L,e as b}from"./chunk-UGSGMP2I.js";import{Ad as U,Bd as y,Dd as E,Eb as g,Fb as p,Ma as u,Qb as c,Rb as k,Sa as o,Tb as S,Xa as h,ab as C,bc as x,dc as _,fb as f,lb as m,rb as v,ud as P,vb as n,wb as l,xb as r}from"./chunk-FPEGN42P.js";import"./chunk-GAL4ENT6.js";function R(e,s){if(e&1&&r(0,"img",6),e&2){let i=p();m("src",i.mimeUrl,u)}}function z(e,s){if(e&1&&r(0,"fa-icon",7),e&2){let i=p();m("icon",i.icons.SPACES)("fixedWidth",!1)}}function M(e,s){if(e&1&&(r(0,"img",14),n(1,"span",15),c(2),l()),e&2){let i=p();m("src",i.link.owner.avatar,u),o(2),k(i.link.owner.fullName)}}function N(e,s){e&1&&(n(0,"span",13),c(1,"You have been invited to join this space"),l())}function B(e,s){if(e&1&&(n(0,"span"),c(1),x(2,"translate"),x(3,"translate"),l()),e&2){let i=p();o(),S("",_(2,2,"share with you this",i.locale.language)," ",_(3,5,i.link.share.isDir?"directory":"file",i.locale.language),"")}}function F(e,s){e&1&&(n(0,"span",13),c(1,"You have been invited to join this share"),l())}var Q=(()=>{class e{constructor(i,a,t){this.locale=i,this.activatedRoute=a,this.linksService=t,this.icons={SPACES:I.SPACES},this.logoUrl=A,this.mimeUrl=null,this.activatedRoute.params.subscribe(d=>this.linkUUID=d.uuid),this.activatedRoute.data.subscribe(d=>this.setLink(d.link))}setLink(i){i.space||(this.mimeUrl=D(i.share.isDir?i.share.hasParent?w:T:i.share.mime)),this.link=i}followLink(){this.linksService.linkAccess(this.linkUUID,this.link)}static{this.\u0275fac=function(a){return new(a||e)(h(P),h(L),h(j))}}static{this.\u0275cmp=C({type:e,selectors:[["app-public-link"]],decls:18,vars:5,consts:[[1,"link-page"],[1,"header"],["routerLink",""],["alt","","height","40",3,"src"],[1,"d-flex","flex-column","align-content-center"],[1,"resource","d-flex","flex-column","align-items-center","mt-3","mx-auto","cursor-pointer",3,"click"],["alt","","height","96",1,"no-select-pointer",3,"src"],[1,"circle-primary-icon",2,"min-width","128px","min-height","128px","font-size","64px",3,"icon","fixedWidth"],[1,"error-code"],[1,"error-text","no-select"],[1,"hr"],[1,"d-flex","justify-content-center","align-items-center"],[1,"solve"],["l10nTranslate",""],["alt","","width","42","height","42",1,"avatar-base-img","me-3",3,"src"],[1,"oops","me-2"]],template:function(a,t){a&1&&(n(0,"div",0)(1,"div",1)(2,"a",2),r(3,"img",3),l()(),n(4,"div",4)(5,"div",5),g("click",function(){return t.followLink()}),f(6,R,1,1,"img",6)(7,z,1,2,"fa-icon",7),n(8,"span",8),c(9),l()()(),n(10,"div",9),r(11,"span",10),n(12,"div",11),f(13,M,3,2),n(14,"span",12),f(15,N,2,0,"span",13)(16,B,4,8,"span")(17,F,2,0,"span",13),l()()()()),a&2&&(o(3),m("src",t.logoUrl,u),o(3),v(t.mimeUrl?6:7),o(3),k((t.link.share==null?null:t.link.share.name)||(t.link.space==null?null:t.link.space.name)),o(4),v(t.link.owner?13:-1),o(2),v(t.link.space?15:t.link.owner?16:17))},dependencies:[b,E,U,y],encapsulation:2})}}return e})();export{Q as PublicLinkComponent};
@@ -1 +0,0 @@
1
- import{e as ne}from"./chunk-SZKZH4MJ.js";import{f as se}from"./chunk-CPHC7U34.js";import{b as re,c as E}from"./chunk-X6UFHF4Q.js";import{$a as ee,K as g,M as S,N as W,da as A,ea as h,f as z,fa as J,fb as te,ga as l,ha as K,ia as o,ja as Q,ka as X,la as Y,ma as Z,rb as ie,tb as u,vb as v}from"./chunk-7FVU676A.js";import{d as F}from"./chunk-UGSGMP2I.js";import{Ad as V,Bb as G,Bd as q,Eb as y,Fb as I,G as P,Mc as B,Qb as U,Sa as d,Sb as j,Xa as T,ab as C,bc as $,ca as R,cc as k,dc as L,ha as f,lb as O,pa as M,qa as w,sb as N,tb as b,ub as D,ud as H,v as n,vb as _,wa as x,wb as c}from"./chunk-FPEGN42P.js";var a=class{constructor(r){this.isAdmin=!1,this.newly=0,this.applications=[],this.currentAccessHover=!1,this.setGroups(r),this.setManagers(r),Object.assign(this,r),this.isAdmin=r.role===g.ADMINISTRATOR,this.userRoleText=te(g[r.role]),this.avatarUrl=ie(r.login),this.userIsActiveText=this.isActive?"active":"suspended",this.hTimeAgo=(0,z.default)(this.currentAccess).fromNow(!0),this.newly=ee(this.currentAccess),this.permissions&&(this.applications=this.permissions.split(S))}setGroups(r){r?.groups&&(r.groups=r.groups.map(e=>new u(e)))}setManagers(r){r?.managers&&(r.managers=r.managers.map(e=>new u(e)))}};var m=class{constructor(r){Object.assign(this,r),this.permissions&&(this.applications=this.permissions.split(S))}};var we=(()=>{class s{constructor(e,t,i){this.http=e,this.router=t,this.authService=i}listUsers(e=!1){return this.http.get(e?K:J).pipe(n(t=>t.map(i=>new a(i))))}getUser(e,t=!1){return this.http.get(`${t?l:h}/${e}`).pipe(n(i=>t?new E(i):new a(i)))}createUser(e,t=!1){return this.http.post(t?l:h,e).pipe(n(i=>t?new E(i):new a(i)))}updateUser(e,t,i=!1){return this.http.put(`${i?l:h}/${e}`,t).pipe(n(p=>i?new E(p):new a(p)))}deleteUser(e,t,i=!1){return i?this.http.delete(`${l}/${e}`):this.http.request("delete",`${h}/${e}`,{body:t})}browseGroup(e,t=!1){return this.http.get(`${t?X:Q}${e?`/${e}`:""}`).pipe(n(i=>new re(i)))}getGroup(e){return this.http.get(`${o}/${e}`).pipe(n(t=>new m(t)))}createGroup(e){return this.http.post(o,e).pipe(n(t=>new m(t)))}updateGroup(e,t){return this.http.put(`${o}/${e}`,t).pipe(n(i=>new m(i)))}deleteGroup(e){return this.http.delete(`${o}/${e}`)}addUsersToGroup(e,t){return this.http.patch(`${o}/${e}/${A.USERS}`,t)}updateUserFromGroup(e,t,i){return this.http.patch(`${o}/${e}/${A.USERS}/${t}`,i)}removeUserFromGroup(e,t){return this.http.delete(`${o}/${e}/${A.USERS}/${t}`)}searchMembers(e,t=!1){return this.http.request("search",Y,{body:e}).pipe(n(i=>i.map(p=>(t&&delete p.description,new u(p)))),P(()=>[]))}impersonateUser(e,t){return this.http.post(`${Z}/${e}`,t)}initImpersonateUser(e){this.authService.initUserFromResponse(e,!0),this.router.navigate([v.BASE,v.ACCOUNT]).catch(t=>console.error(t))}static{this.\u0275fac=function(t){return new(t||s)(f(B),f(F),f(se))}}static{this.\u0275prov=R({token:s,factory:s.\u0275fac,providedIn:"root"})}}return s})();function ae(s,r){if(s&1){let e=G();_(0,"div",3)(1,"label",4)(2,"input",5),y("change",function(i){let p=M(e).$implicit,oe=I();return w(oe.updatePermissions(p,i))}),c(),U(3),$(4,"translate"),$(5,"capitalize"),c()()}if(s&2){let e=r.$implicit,t=I();d(2),O("checked",t.permissions.indexOf(e)>-1)("value",e),d(),j(" ",k(5,6,L(4,3,e,t.locale.language))," ")}}var je=(()=>{class s{constructor(e){this.locale=e,this.permissions=[],this.permissionsChange=new x,this.allApplications=Object.values(W)}updatePermissions(e,t){t.target.checked?this.permissions.push(e):this.permissions.splice(this.permissions.indexOf(e),1),this.permissionsChange.emit(this.permissions)}static{this.\u0275fac=function(t){return new(t||s)(T(H))}}static{this.\u0275cmp=C({type:s,selectors:[["app-admin-permissions"]],inputs:{permissions:"permissions"},outputs:{permissionsChange:"permissionsChange"},decls:6,vars:0,consts:[[1,"d-flex","flex-column","col-12","pb-3"],["for","permissions","l10nTranslate",""],["id","permissions",1,"form-check","form-switch","form-check-inline"],[1,"d-flex"],[1,"form-check-label"],["type","checkbox",1,"form-check-input",3,"change","checked","value"]],template:function(t,i){t&1&&(_(0,"div",0)(1,"label",1),U(2,"Permissions"),c(),_(3,"div",2),b(4,ae,6,8,"div",3,N),c()()),t&2&&(d(4),D(i.allApplications))},dependencies:[ne,q,V],encapsulation:2})}}return s})();export{a,we as b,je as c};
@@ -1 +0,0 @@
1
- import{f as F}from"./chunk-X6UFHF4Q.js";import{Bb as h,Ma as O,Qb as C,Rb as H,Sb as k,T,W as g,eb as d,na as N,vb as u}from"./chunk-7FVU676A.js";import{d as R}from"./chunk-UGSGMP2I.js";import{$ as x,G as p,Mc as A,O as _,Z as m,ca as I,ha as o,p as n,q as S,v as a}from"./chunk-FPEGN42P.js";var c=function(r){return r.ACCESS="access",r.REFRESH="refresh",r.WS="ws",r.CSRF="csrf",r}(c||{});var i=function(r){return r.BASE="/api/auth",r.LOGIN="login",r.LOGOUT="logout",r.REFRESH="refresh",r.TOKEN="token",r.TOKEN_REFRESH="token/refresh",r.WS="socket.io",r}(i||{}),P=`${i.BASE}/${i.LOGIN}`,U=`${i.BASE}/${i.LOGOUT}`,f=`${i.BASE}/${i.REFRESH}`,v=`${i.BASE}/${i.TOKEN}`,w=`${i.BASE}/${i.TOKEN_REFRESH}`,M=`/${i.WS}`;var E="sync-in-csrf";var j=[c.REFRESH,c.ACCESS,c.WS,c.CSRF];var K="Client token is expired";var l={BASE:"auth",LOGIN:"login"};var fe=(()=>{class r{constructor(e,t,s,L,b,G){this.http=e,this.router=t,this.store=s,this.userService=L,this.layout=b,this.electron=G,this._refreshExpiration=parseInt(localStorage.getItem("refresh_expiration")||"0",10)||0,this._accessExpiration=parseInt(localStorage.getItem("access_expiration")||"0",10)||0}get refreshExpiration(){return this._refreshExpiration}set refreshExpiration(e){this._refreshExpiration=e!==0?e+60:e,localStorage.setItem("refresh_expiration",e.toString())}get accessExpiration(){return this._accessExpiration}set accessExpiration(e){this._accessExpiration=e!==0?e+60:e,localStorage.setItem("access_expiration",e.toString())}login(e,t){return this.http.post(P,{login:e,password:t}).pipe(a(s=>(this.accessExpiration=s.token.access_expiration,this.refreshExpiration=s.token.refresh_expiration,this.userService.initUser(s.user),{success:!0,message:null})),p(s=>(console.warn(s),n({success:!1,message:s.error.message||s.message}))))}loginElectron(){return this.electron.authenticate().pipe(m(e=>this.http.post(T,e).pipe(a(t=>(this.accessExpiration=t.token.access_expiration,this.refreshExpiration=t.token.refresh_expiration,this.userService.initUser(t.user),t?.client_token_update&&this.electron.send(h.SERVER.AUTHENTICATION_TOKEN_UPDATE,t.client_token_update),!0)),p(t=>(console.warn(t),t.error.message===K?this.electron.send(h.SERVER.AUTHENTICATION_TOKEN_EXPIRED):this.electron.send(h.SERVER.AUTHENTICATION_FAILED),n(!1))))))}logout(e=!0,t=!1){if((e||t)&&this.store.userImpersonate()){this.logoutImpersonateUser();return}this.userService.disconnectWebSocket(),this.clearCookies().pipe(_(()=>{this.accessExpiration=0,this.refreshExpiration=0,this.layout.clean(),this.store.clean(),e&&this.router.navigate([l.BASE,l.LOGIN]).catch(s=>console.error(s)),t&&this.layout.sendNotification("warning","Session has expired","Please sign in")})).subscribe()}logoutImpersonateUser(){this.http.post(N,null).subscribe({next:e=>{this.userService.disconnectWebSocket(),this.initUserFromResponse(e),this.router.navigate([u.BASE,u.ACCOUNT]).catch(t=>console.error(t))},error:e=>{console.error(e),this.layout.sendNotification("error","Impersonate identity","logout",e)}})}initUserFromResponse(e,t=!1){e!==null&&(this.accessExpiration=e.token.access_expiration,this.refreshExpiration=e.token.refresh_expiration,this.userService.initUser(e.user,t))}isLogged(){return!this.refreshTokenHasExpired()}refreshToken(){return this.http.post(f,null).pipe(a(e=>(this.accessExpiration=e.access_expiration,this.refreshExpiration=e.refresh_expiration,console.debug("refresh token done"),!0)),p(e=>(console.debug("token has expired"),this.electron.enabled?(console.debug("login with app"),this.loginElectron()):(this.logout(!0,!0),S(()=>e)))))}checkUserAuthAndLoad(e){return this.refreshTokenHasExpired()?this.electron.enabled?this.loginElectron():(this.returnUrl=e.length>1?e:null,this.logout(),n(!1)):this.store.user.getValue()?n(!0):this.http.get(g).pipe(x(t=>this.userService.initUser(t.user)),a(()=>!0),p(t=>(t.status===401?this.logout():console.warn(t),n(!1))))}checkCSRF(e){return e.headers.has(E)?e.clone({headers:e.headers.set(E,d(E))}):e}refreshTokenHasExpired(){return this.refreshExpiration===0||O()>=this.refreshExpiration}clearCookies(){return this.http.post(U,null)}static{this.\u0275fac=function(t){return new(t||r)(o(A),o(R),o(C),o(F),o(k),o(H))}}static{this.\u0275prov=I({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();export{P as a,U as b,f as c,E as d,l as e,fe as f};
@@ -1 +0,0 @@
1
- import{k as x}from"./chunk-ZZ3LHYOY.js";import{b as u,e as v}from"./chunk-UGSGMP2I.js";import{Bd as h,Dd as E,Ma as s,Qb as c,Rb as f,Sa as o,Ud as b,Xa as p,ab as d,cg as g,lb as l,vb as t,wb as i,xb as r}from"./chunk-FPEGN42P.js";import"./chunk-GAL4ENT6.js";var U=(()=>{class n{constructor(a){this.activatedRoute=a,this.logoUrl=x,this.icons={faExclamationCircle:b},this.activatedRoute.params.subscribe(e=>this.error=g[e.error])}static{this.\u0275fac=function(e){return new(e||n)(p(u))}}static{this.\u0275cmp=d({type:n,selectors:[["app-public-link-error"]],decls:14,vars:3,consts:[[1,"link-page"],[1,"header"],["routerLink",""],["alt","","height","40",3,"src"],["size","4x",1,"text-white",3,"icon"],["l10nTranslate","",1,"error-code","mt-2",2,"font-size","24px"],[1,"error-text"],[1,"hr"],["l10nTranslate",""]],template:function(e,m){e&1&&(t(0,"div",0)(1,"div",1)(2,"a",2),r(3,"img",3),i()(),r(4,"fa-icon",4),t(5,"div",5),c(6,"Link error"),i(),t(7,"div",6),r(8,"span",7)(9,"br"),t(10,"span",8),c(11),i(),r(12,"br")(13,"br"),i()()),e&2&&(o(3),l("src",m.logoUrl,s),o(),l("icon",m.icons.faExclamationCircle),o(7),f(m.error))},dependencies:[v,h,E],encapsulation:2})}}return n})();export{U as PublicLinkErrorComponent};
@@ -1 +0,0 @@
1
- import{a as Te}from"./chunk-EWJD5G76.js";import{a as D}from"./chunk-VFSSL4TI.js";import"./chunk-6CFIZHYI.js";import{a as B,b as R,c as ge,d as ke}from"./chunk-NSXFB3SX.js";import{a as ye,b as be,c as we,e as ve}from"./chunk-WGSPBZVN.js";import"./chunk-N3QPDPBV.js";import"./chunk-3BKYCF53.js";import"./chunk-CPHC7U34.js";import"./chunk-X6UFHF4Q.js";import{Cb as ue,Da as pe,Db as Ce,Eb as fe,Fa as _e,Qb as xe,Sb as he,Ua as me,gb as de,v as G,w as Y}from"./chunk-7FVU676A.js";import"./chunk-ZZ3LHYOY.js";import{b as j}from"./chunk-UGSGMP2I.js";import{$e as oe,Ad as q,Bb as y,Bd as K,Dd as J,Eb as C,Ec as z,Fb as r,He as ee,L as N,Ma as P,Mb as L,Me as te,Nb as S,Ob as V,Oe as ie,Qb as u,Rb as v,Sa as o,Sb as I,Tb as $,Ve as ne,Xa as w,Xd as X,ab as O,bc as g,dc as k,fb as f,kb as Q,lb as p,mb as T,mf as re,nb as F,ob as U,of as ae,pa as _,pb as A,pe as Z,pf as le,qa as m,qb as W,qf as se,rb as h,tb as M,ub as E,ud as H,vb as l,wb as c,wf as ce,xb as x}from"./chunk-FPEGN42P.js";import"./chunk-GAL4ENT6.js";var Fe=["MainContextMenu"],Me=["TargetContextMenu"],Le=(t,s)=>s.id,Se=(t,s)=>s.key;function Ee(t,s){if(t&1&&(l(0,"span",30),u(1),c()),t&2){let e=r().$implicit,n=r(2);T("font-size",n.galleryMode.textSize,"px"),o(),I(" ",e.hTimeAccessAgo," ")}}function Ae(t,s){if(t&1){let e=y();l(0,"div",21),C("click",function(){let i=_(e).$implicit,a=r(2);return m(a.onSelect(i))})("contextmenu",function(i){let a=_(e).$implicit,d=r(2);return m(d.onTargetContextMenu(i,a))})("pressup",function(i){let a=_(e).$implicit,d=r(2);return m(d.onTargetContextMenu(i,a))})("tap",function(){_(e);let i=r(2);return m(i.openLinkDialog())}),l(1,"div",22)(2,"img",23),C("error",function(){let i=_(e).$implicit;return m(i.fallBackMimeUrl())}),c(),l(3,"span",24),f(4,Ee,2,3,"span",25),c(),l(5,"span",26),x(6,"app-share-repository",27),c()(),l(7,"div",28)(8,"span",29),u(9),c()()()}if(t&2){let e=s.$implicit,n=s.$index,i=r(2);T("height",i.galleryMode.dimensions,"px")("width",i.galleryMode.dimensions,"px"),F("selected",e.id===(i.selected==null?null:i.selected.id))("disabled",!e.link.isActive),o(),Q("rowIndex",n),o(),p("src",e.mimeUrl,P)("height",i.galleryMode.image)("width",i.galleryMode.image),o(2),h(e.newly?4:-1),o(2),p("share",e)("galleryMode",i.galleryMode),o(2),T("font-size",i.galleryMode.textSize,"px"),o(),v(e.name)}}function Ie(t,s){if(t&1){let e=y();l(0,"div",13)(1,"app-virtual-scroll",18),g(2,"searchFilter"),C("contextmenu",function(i){_(e);let a=r();return m(a.onContextMenu(i))}),l(3,"div",19),M(4,Ae,10,18,"div",20,Le),c()()()}if(t&2){let e=r();o(),p("childHeight",e.galleryMode.dimensions)("childWidth",e.galleryMode.dimensions)("items",k(2,5,e.shares,e.inputFilter.search()))("galleryMode",!0)("resizeOffset",110),o(3),E(e.scrollView==null?null:e.scrollView.viewPortItems)}}function $e(t,s){if(t&1&&x(0,"fa-icon",37),t&2){let e=r(4);p("icon",e.sortTable.sortParam.asc?e.icons.faArrowDown:e.icons.faArrowUp)("fixedWidth",!1)}}function Pe(t,s){if(t&1){let e=y();l(0,"th",36),C("click",function(){_(e);let i=r().$implicit,a=r(2);return m(a.sortBy(i.key))}),u(1),f(2,$e,1,2,"fa-icon",37),c()}if(t&2){let e=r().$implicit,n=r(2);U(e.value.class),T("width",e.value.width,"%"),F("text-align-center",e.value.textCenter)("cursor-pointer",e.value.sortable),o(),I(" ",e.value.label," "),o(),h(n.sortTable.sortParam.column===e.key?2:-1)}}function Be(t,s){if(t&1&&f(0,Pe,3,11,"th",35),t&2){let e=s.$implicit;h(e.value.show?0:-1)}}function Re(t,s){if(t&1){let e=y();l(0,"div",40)(1,"img",43),C("error",function(){_(e);let i=r(3).$implicit;return m(i.fallBackMimeUrl())}),c(),l(2,"div",44)(3,"span",29),u(4),c(),l(5,"span",45),u(6),c()()()}if(t&2){let e=r(3).$implicit;o(),p("src",e.mimeUrl,P),o(3),v(e.name),o(2),v(e.description)}}function De(t,s){if(t&1&&(l(0,"span"),u(1),c()),t&2){let e=r(4).$implicit;o(),v(e.link.email||"")}}function Ne(t,s){if(t&1&&(l(0,"span",41)(1,"span"),u(2),c(),f(3,De,2,1,"span"),c()),t&2){let e=r(3).$implicit;o(2),v(e.link.name),o(),h(e.link.email?3:-1)}}function Oe(t,s){if(t&1&&x(0,"app-share-repository",42),t&2){let e=r(3).$implicit;p("share",e)}}function Qe(t,s){if(t&1&&(l(0,"span"),u(1),c()),t&2){let e=r(4).$implicit;A("badge rounded-pill ",e.link.nbAccess>=e.link.limitAccess?"bg-danger":"bg-success",""),o(),$(" ",e.link.nbAccess,"/",e.link.limitAccess," ")}}function Ue(t,s){if(t&1&&(l(0,"span",47),u(1),c()),t&2){let e=r(4).$implicit;o(),v(e.link.nbAccess)}}function We(t,s){if(t&1&&(l(0,"span",49),u(1),g(2,"translate"),c()),t&2){let e=r(5).$implicit,n=r(2);o(),$("",e.hTimeExpirationAgo,"\xA0",k(2,2,e.hTimeExpirationAgo===1?"day":"days",n.locale.language),"")}}function ze(t,s){if(t&1&&(l(0,"span"),x(1,"fa-icon",37),f(2,We,3,5,"span",49),c()),t&2){let e=r(4).$implicit,n=r(2);A("badge rounded-pill bg-",e.hTimeExpirationAgo>=1?"warning":"danger"," ms-1"),o(),p("icon",n.icons.faClock)("fixedWidth",!1),o(),h(e.hTimeExpirationAgo>=1?2:-1)}}function je(t,s){if(t&1&&(l(0,"span",48),x(1,"fa-icon",6),c()),t&2){let e=r(6);o(),p("icon",e.icons.faLock)}}function He(t,s){if(t&1&&f(0,Qe,2,5,"span",46)(1,Ue,2,1,"span",47)(2,ze,3,6,"span",46)(3,je,2,1,"span",48),t&2){let e=r(3).$implicit;h(e.link.limitAccess?0:1),o(2),h(e.link.expiresAt?2:-1),o(),h(e.link.requireAuth?3:-1)}}function qe(t,s){if(t&1&&x(0,"app-file-permissions",50),t&2){let e=r(4).$implicit;p("permissions",e.hPerms)}}function Ke(t,s){if(t&1&&f(0,qe,1,1,"app-file-permissions",50),t&2){let e=r(3).$implicit;h(e.link.permissions?0:-1)}}function Ge(t,s){if(t&1&&u(0),t&2){let e=r(4).$implicit;I(" ",e.hTimeAccessAgo," ")}}function Ye(t,s){t&1&&(l(0,"span",51),u(1,"never"),c())}function Je(t,s){if(t&1&&f(0,Ge,1,1)(1,Ye,2,0,"span",51),t&2){let e=r(3).$implicit;h(e.link.currentAccess?0:1)}}function Xe(t,s){if(t&1&&(l(0,"td"),f(1,Re,7,3,"div",40)(2,Ne,4,2,"span",41)(3,Oe,1,1,"app-share-repository",42)(4,He,4,3)(5,Ke,1,1)(6,Je,2,1),c()),t&2){let e,n=r().$implicit,i=r().$implicit;W("",n.value.class," ",n.value.newly!==void 0?"props-newly-"+i[n.value.newly]:"",""),T("width",n.value.width,"%"),F("text-align-center",n.value.textCenter),o(),h((e=n.key)==="name"?1:e==="link"?2:e==="from"?3:e==="infos"?4:e==="permissions"?5:e==="accessed"?6:-1)}}function Ze(t,s){if(t&1&&f(0,Xe,7,9,"td",39),t&2){let e=s.$implicit;h(e.value.show?0:-1)}}function et(t,s){if(t&1){let e=y();l(0,"tr",38),C("click",function(){let i=_(e).$implicit,a=r(2);return m(a.onSelect(i))})("contextmenu",function(i){let a=_(e).$implicit,d=r(2);return m(d.onTargetContextMenu(i,a))})("pressup",function(i){let a=_(e).$implicit,d=r(2);return m(d.onTargetContextMenu(i,a))})("tap",function(){_(e);let i=r(2);return m(i.openLinkDialog())}),M(1,Ze,1,1,null,null,Se),g(3,"keyvalue"),c()}if(t&2){let e=s.$implicit,n=r(2);F("selected",e.id===(n.selected==null?null:n.selected.id))("disabled",!e.link.isActive),o(),E(k(3,4,n.tableHeaders,n.originalOrderKeyValue))}}function tt(t,s){if(t&1){let e=y();l(0,"table",31)(1,"thead")(2,"tr"),M(3,Be,1,1,null,null,Se),g(5,"keyvalue"),c()()(),l(6,"app-virtual-scroll",32),g(7,"searchFilter"),C("contextmenu",function(i){_(e);let a=r();return m(a.onContextMenu(i))}),l(8,"table",31)(9,"tbody",33),M(10,et,4,7,"tr",34,Le),c()()()}if(t&2){let e=r();o(3),E(k(5,2,e.tableHeaders,e.originalOrderKeyValue)),o(3),p("bufferAmount",5)("items",k(7,5,e.shares,e.inputFilter.search())),o(4),E(e.scrollView==null?null:e.scrollView.viewPortItems)}}function it(t,s){if(t&1&&(l(0,"span",51),x(1,"fa-icon",6),u(2,"Refresh"),c()),t&2){let e=r();o(),p("icon",e.icons.faArrowRotateRight)}}function nt(t,s){if(t&1&&(l(0,"span",51),x(1,"fa-icon",6),u(2,"Go to"),c()),t&2){let e=r();o(),p("icon",e.icons.faMapMarkerAlt)}}function ot(t,s){if(t&1&&(l(0,"span",51),x(1,"fa-icon",6),u(2,"Edit link"),c()),t&2){let e=r();o(),p("icon",e.icons.faPen)}}function rt(t,s){if(t&1&&(l(0,"span",51),x(1,"fa-icon",6),u(2,"Copy link"),c()),t&2){let e=r();o(),p("icon",e.icons.faClipboard)}}function at(t,s){}function lt(t,s){if(t&1&&(l(0,"span",51),x(1,"fa-icon",6),u(2,"Informations"),c()),t&2){let e=r();o(),p("icon",e.icons.faCircleInfo)}}var $t=(()=>{class t{constructor(e,n,i,a,d,b){this.locale=e,this.activatedRoute=n,this.store=i,this.layout=a,this.linksService=d,this.sharesService=b,this.icons={faLink:se,faArrowRotateRight:ie,faArrowDown:le,faArrowUp:ce,faMapMarkerAlt:ae,faPen:te,faEllipsisH:re,faClock:oe,faLock:X,faClipboard:Z,faClipboardCheck:ee,faCircleInfo:ne},this.originalOrderKeyValue=de,this.TAB_MENU=me,this.loading=!1,this.linkWasCopied=!1,this.shares=[],this.selected=null,this.tableHeaders={name:{label:"Name",width:30,textCenter:!1,class:"",show:!0,sortable:!0},link:{label:"Link",width:15,textCenter:!1,class:"d-none d-sm-table-cell",show:!0,sortable:!0},from:{label:"Shared from",width:15,textCenter:!1,class:"d-none d-md-table-cell",show:!0},infos:{label:"Infos",width:15,textCenter:!0,class:"d-none d-lg-table-cell",show:!0,sortable:!0},permissions:{label:"Permissions",width:10,textCenter:!0,class:"d-none d-lg-table-cell",show:!0,sortable:!0},accessed:{label:"Accessed",width:10,textCenter:!0,class:"d-none d-lg-table-cell",newly:"newly",show:!0,sortable:!0}},this.sortSettings={default:[{prop:"name",type:"string"}],link:[{prop:"link.name",type:"string"}],name:[{prop:"name",type:"string"}],infos:[{prop:"link.nbAccess",type:"number"}],permissions:[{prop:"link.permissions",type:"length"}],accessed:[{prop:"link.currentAccess",type:"date"}]},this.sortTable=new ke(this.constructor.name,this.sortSettings),this.btnSortFields={name:"Name",link:"Link",accessed:"Accessed"},this.loadShareLinks(),this.activatedRoute.queryParams.subscribe(Ve=>this.focusOnSelect=Ve.select),this.layout.setBreadcrumbIcon(this.icons.faLink),this.layout.setBreadcrumbNav({url:`/${_e.LINKS}/${pe.SHARED_BY_LINKS}`,translating:!0,sameLink:!0})}ngOnInit(){this.galleryMode=this.btnNavigationView.currentView()}loadShareLinks(){this.loading=!0,this.onSelect(),this.linksService.shareLinksList().subscribe({next:e=>{this.sortBy(this.sortTable.sortParam.column,!1,e),this.loading=!1,this.focusOnSelect?this.focusOn(this.focusOnSelect):this.scrollView.scrollInto(-1)},error:e=>{this.shares=[],this.loading=!1,this.layout.sendNotification("error","Links",e.error.message)}})}sortBy(e,n=!0,i){this.shares=this.sortTable.sortBy(e,n,i||this.shares)}onSelect(e=null){this.selected=e,this.store.linkSelection.set(this.selected)}openLinkDialog(){this.linksService.shareLink(this.selected.id).subscribe(e=>{this.layout.openDialog(we,"md",{initialState:{share:e}}).content.shareChange.pipe(N(1)).subscribe(i=>{let[a,d]=i;a==="update"?this.selected=Object.assign(this.selected,d):a==="delete"&&(this.onSelect(),this.sortBy(this.sortTable.sortParam.column,!1,this.shares.filter(b=>b.id!==d.id)))})})}onContextMenu(e){e.preventDefault(),e.stopPropagation(),this.layout.openContextMenu(e,this.mainContextMenu)}onTargetContextMenu(e,n){e.preventDefault(),e.type==="contextmenu"&&e.stopPropagation(),this.onSelect(n),this.layout.openContextMenu(e,this.targetContextMenu)}focusOn(e){let n=this.shares.find(i=>i.name===e);n&&(setTimeout(()=>this.scrollView.scrollInto(n),100),this.onSelect(n))}copyToClipboard(){this.selected&&(this.linksService.copyLinkToClipboard(this.selected.link.uuid),this.linkWasCopied=!0,this.layout.sendNotification("info","Link copied",this.selected.file.name||this.selected.name),setTimeout(()=>this.linkWasCopied=!1,3e3))}goTo(e){e=e||this.selected,this.sharesService.goTo(e)}static{this.\u0275fac=function(n){return new(n||t)(w(H),w(j),w(xe),w(he),w(ve),w(be))}}static{this.\u0275cmp=O({type:t,selectors:[["app-shared-links"]],viewQuery:function(n,i){if(n&1&&(L(R,5),L(B,7),L(D,7),L(Fe,7),L(Me,7)),n&2){let a;S(a=V())&&(i.scrollView=a.first),S(a=V())&&(i.inputFilter=a.first),S(a=V())&&(i.btnNavigationView=a.first),S(a=V())&&(i.mainContextMenu=a.first),S(a=V())&&(i.targetContextMenu=a.first)}},decls:33,vars:36,consts:[["MainContextMenu",""],["TargetContextMenu",""],[1,"app-top-menu"],["container","body","type","button",1,"d-none","d-sm-block","btn","btn-sm","btn-secondary","me-1",3,"click","tooltip"],[3,"icon","animation"],["container","body","type","button",1,"btn","btn-sm","btn-secondary","me-1",3,"click","disabled","tooltip"],[3,"icon"],["container","body","type","button",3,"click","disabled","tooltip"],["container","body","type","button",1,"btn","btn-sm","btn-secondary",3,"click","disabled","tooltip"],[1,"ms-auto"],[1,"btn-group","btn-group-sm","me-1"],[1,"d-none","d-sm-block"],[3,"sortBy","switchView","sortParams","sortFields"],[1,"app-thumbs"],[1,"app-foot-menu"],[1,"mx-auto"],["contextMenuItem","",3,"execute"],["contextMenuItem","",3,"divider"],[3,"contextmenu","childHeight","childWidth","items","galleryMode","resizeOffset"],["tabindex","-1",1,"row","g-0"],[1,"card",3,"selected","disabled","height","width"],[1,"card",3,"click","contextmenu","pressup","tap"],[1,"card-body"],["alt","","draggable","true",3,"error","src","height","width"],[1,"label-top-right"],[1,"badge","rounded-pill","bg-warning",3,"font-size"],[1,"label-bottom-left"],[3,"share","galleryMode"],[1,"card-footer","text-center","text-truncate","p-1"],["draggable","false",1,"no-pointer-events"],[1,"badge","rounded-pill","bg-warning"],[1,"app-table"],[3,"contextmenu","bufferAmount","items"],["tabindex","-1"],[3,"selected","disabled"],["l10nTranslate","",3,"width","text-align-center","cursor-pointer","class"],["l10nTranslate","",3,"click"],[3,"icon","fixedWidth"],[3,"click","contextmenu","pressup","tap"],[3,"width","text-align-center","class"],[1,"d-flex","align-items-center"],[1,"d-flex","flex-column"],[3,"share"],["alt","","draggable","false","height","30","width","30",3,"error","src"],[1,"d-flex","flex-column","text-truncate"],["draggable","false",1,"no-pointer-events","text-muted","fs-xxxs"],[3,"class"],[1,"badge","rounded-pill","bg-success"],[1,"badge","rounded-pill","bg-gray-dark","ms-1"],[1,"ms-2"],["tooltipPlacement","auto",3,"permissions"],["l10nTranslate",""]],template:function(n,i){if(n&1){let a=y();l(0,"div",2)(1,"button",3),g(2,"translate"),C("click",function(){return _(a),m(i.loadShareLinks())}),x(3,"fa-icon",4),c(),l(4,"button",5),g(5,"translate"),C("click",function(){return _(a),m(i.openLinkDialog())}),x(6,"fa-icon",6),c(),l(7,"button",7),g(8,"translate"),C("click",function(){return _(a),m(i.copyToClipboard())}),x(9,"fa-icon",6),c(),l(10,"button",8),g(11,"translate"),C("click",function(){return _(a),m(i.goTo())}),x(12,"fa-icon",6),c(),l(13,"div",9)(14,"div",10),x(15,"app-input-filter",11),c(),l(16,"app-navigation-view",12),C("sortBy",function(b){return _(a),m(i.sortBy(b))})("switchView",function(b){return _(a),m(i.galleryMode=b)}),c()()(),f(17,Ie,6,8,"div",13)(18,tt,12,8),l(19,"div",14)(20,"span",15),u(21),g(22,"translate"),c()(),l(23,"context-menu",null,0),f(25,it,3,1,"ng-template",16),C("execute",function(){return _(a),m(i.loadShareLinks())}),c(),l(26,"context-menu",null,1),f(28,nt,3,1,"ng-template",16),C("execute",function(){return _(a),m(i.goTo())}),f(29,ot,3,1,"ng-template",16),C("execute",function(){return _(a),m(i.openLinkDialog())}),f(30,rt,3,1,"ng-template",16),C("execute",function(){return _(a),m(i.copyToClipboard())}),f(31,at,0,0,"ng-template",17)(32,lt,3,1,"ng-template",16),C("execute",function(){return _(a),m(i.layout.showRSideBarTab(i.TAB_MENU.SELECTION))}),c()}n&2&&(o(),p("tooltip",k(2,21,"Refresh",i.locale.language)),o(2),p("icon",i.icons.faArrowRotateRight)("animation",i.loading?"spin":null),o(),p("disabled",!i.selected)("tooltip",k(5,24,"Edit link",i.locale.language)),o(2),p("icon",i.icons.faPen),o(),A("btn btn-sm me-1 ",i.linkWasCopied?"btn-info":"btn-secondary",""),p("disabled",!i.selected)("tooltip",k(8,27,"Copy link",i.locale.language)),o(2),p("icon",i.linkWasCopied?i.icons.faClipboardCheck:i.icons.faClipboard),o(),p("disabled",!i.selected)("tooltip",k(11,30,"Go to",i.locale.language)),o(2),p("icon",i.icons.faMapMarkerAlt),o(4),p("sortParams",i.sortTable.sortParam)("sortFields",i.btnSortFields),o(),h(i.galleryMode!=null&&i.galleryMode.enabled?17:18),o(4),$("",i.shares.length," ",k(22,33,"shares",i.locale.language),""),o(10),p("divider",!0))},dependencies:[fe,Ce,ue,J,z,K,q,D,Y,G,B,R,ge,ye,Te],encapsulation:2})}}return t})();export{$t as LinksComponent};
@@ -1 +0,0 @@
1
- import{gb as L,v as F,w as O}from"./chunk-7FVU676A.js";import{Ad as v,Bd as T,Dd as E,Ec as g,Fb as o,Qb as y,Xa as l,ab as m,bc as s,dc as r,fb as c,lb as f,oa as a,rb as u,tb as d,ub as P,ud as x,vb as C,wb as h,xb as _}from"./chunk-FPEGN42P.js";var k=(e,n)=>n.key;function D(e,n){e&1&&(C(0,"span",0),y(1,"No permissions"),h())}function I(e,n){if(e&1&&(_(0,"fa-icon",1),s(1,"translate")),e&2){let i=n.$implicit,t=o(2);f("icon",i.value.icon)("tooltip",r(1,3,i.value.text,t.locale.language))("placement",t.tooltipPlacement)}}function K(e,n){if(e&1&&(d(0,I,2,6,"fa-icon",1,k),s(2,"keyvalue")),e&2){let i=o();P(r(2,0,i.permissions,i.originalOrderKeyValue))}}var w=(()=>{class e{constructor(i){this.locale=i,this.permissions={},this.tooltipPlacement="top",this.replaceEmptyPermissions=!1,this.hasPermissions=!1,this.originalOrderKeyValue=L}ngOnChanges(){this.hasPermissions=!!Object.keys(this.permissions).length}static{this.\u0275fac=function(t){return new(t||e)(l(x))}}static{this.\u0275cmp=m({type:e,selectors:[["app-file-permissions"]],inputs:{permissions:"permissions",tooltipPlacement:"tooltipPlacement",replaceEmptyPermissions:"replaceEmptyPermissions"},features:[a],decls:2,vars:1,consts:[["l10nTranslate",""],[1,"cursor-pointer","fs-md",3,"icon","tooltip","placement"]],template:function(t,p){t&1&&c(0,D,2,0,"span",0)(1,K,3,3),t&2&&u(p.replaceEmptyPermissions&&!p.hasPermissions?0:1)},dependencies:[O,F,T,E,g,v],encapsulation:2})}}return e})();export{w as a};
@@ -1,24 +0,0 @@
1
- import{a as p2}from"./chunk-EWJD5G76.js";import{c as c2}from"./chunk-JXZCNFW7.js";import{a as i2}from"./chunk-GSVMWC5N.js";import{a as t2,b as n2,c as r2,d as o2,e as s2,f as Qt,i as a2}from"./chunk-ZYB4TLJM.js";import{a as d2,b as Jt,c as u2,e as Zt}from"./chunk-WGSPBZVN.js";import{a as l2,d as xt,g as ct}from"./chunk-N3QPDPBV.js";import{f as Xt}from"./chunk-X6UFHF4Q.js";import{Da as Yt,Ea as q,Fa as nt,Fb as e2,Ka as Yn,La as Xn,Ma as Qn,N as Ve,Qb as st,Sb as H,Ua as rt,Wa as ot,Xa as Jn,ib as zi,pa as it,qa as Z,ra as Ne,rb as Zn,ta as Gn,ua as qn,wa as Wn}from"./chunk-7FVU676A.js";import{c as Me,d as f2,h as je,m as at}from"./chunk-ZZ3LHYOY.js";import{d as wn}from"./chunk-UGSGMP2I.js";import{$ as mn,$b as Nn,Ab as ye,Ad as zn,Bb as P,Bc as ke,Bd as oe,Bf as Hn,C as pn,Ce as Fn,Dd as se,Df as $n,Eb as b,Ee as kn,Fb as u,Fc as Ln,Gb as Sn,Gf as Kt,Hb as xn,If as Un,Jb as En,Kc as Di,L as Ye,Lb as Ct,Ma as Ft,Mb as Vt,Mc as Ht,Nb as Se,Ob as xe,Oe as Vn,Pb as wi,Qb as p,Ra as Mi,Rb as F,Sa as c,Sb as J,Ta as Li,Ub as Je,Vb as Ze,Vc as An,Wa as Qe,Wb as et,X as hn,Xa as v,Xb as Oi,Xc as On,Ya as Ai,Yb as Fe,Yc as $t,Zb as _t,_d as Tn,_e as jn,ab as w,ac as jt,ad as Ut,ag as Kn,bb as gn,bc as fe,be as In,ca as _e,cb as Te,cc as Bt,da as vn,db as bn,dc as yt,f as fn,fb as g,fc as St,fd as Gt,ha as X,lb as f,mb as Ie,nb as G,oa as Pt,ob as Cn,pa as S,pb as kt,pd as qt,qa as x,rb as A,sd as Wt,se as Rn,tb as _n,td as Dn,te as Pn,u as un,ub as yn,ud as tt,v as Ei,vb as l,wa as B,wb as d,xa as Ni,xb as C,xc as Mn,yb as Re,yc as Ee,yf as Bn,za as Xe,zb as Pe}from"./chunk-FPEGN42P.js";import{a as Q,b as ze}from"./chunk-GAL4ENT6.js";var No={prefix:"far",iconName:"trash-can",icon:[448,512,[61460,"trash-alt"],"f2ed","M170.5 51.6L151.5 80l145 0-19-28.4c-1.5-2.2-4-3.6-6.7-3.6l-93.7 0c-2.7 0-5.2 1.3-6.7 3.6zm147-26.6L354.2 80 368 80l48 0 8 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-8 0 0 304c0 44.2-35.8 80-80 80l-224 0c-44.2 0-80-35.8-80-80l0-304-8 0c-13.3 0-24-10.7-24-24S10.7 80 24 80l8 0 48 0 13.8 0 36.7-55.1C140.9 9.4 158.4 0 177.1 0l93.7 0c18.7 0 36.2 9.4 46.6 24.9zM80 128l0 304c0 17.7 14.3 32 32 32l224 0c17.7 0 32-14.3 32-32l0-304L80 128zm80 64l0 208c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-208c0-8.8 7.2-16 16-16s16 7.2 16 16zm80 0l0 208c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-208c0-8.8 7.2-16 16-16s16 7.2 16 16zm80 0l0 208c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-208c0-8.8 7.2-16 16-16s16 7.2 16 16z"]};var Mo={prefix:"far",iconName:"file-lines",icon:[384,512,[128441,128462,61686,"file-alt","file-text"],"f15c","M64 464c-8.8 0-16-7.2-16-16L48 64c0-8.8 7.2-16 16-16l160 0 0 80c0 17.7 14.3 32 32 32l80 0 0 288c0 8.8-7.2 16-16 16L64 464zM64 0C28.7 0 0 28.7 0 64L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-293.5c0-17-6.7-33.3-18.7-45.3L274.7 18.7C262.7 6.7 246.5 0 229.5 0L64 0zm56 256c-13.3 0-24 10.7-24 24s10.7 24 24 24l144 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-144 0zm0 96c-13.3 0-24 10.7-24 24s10.7 24 24 24l144 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-144 0z"]};var Lo={prefix:"far",iconName:"flag",icon:[448,512,[127988,61725],"f024","M48 24C48 10.7 37.3 0 24 0S0 10.7 0 24L0 64 0 350.5 0 400l0 88c0 13.3 10.7 24 24 24s24-10.7 24-24l0-100 80.3-20.1c41.1-10.3 84.6-5.5 122.5 13.4c44.2 22.1 95.5 24.8 141.7 7.4l34.7-13c12.5-4.7 20.8-16.6 20.8-30l0-279.7c0-23-24.2-38-44.8-27.7l-9.6 4.8c-46.3 23.2-100.8 23.2-147.1 0c-35.1-17.6-75.4-22-113.5-12.5L48 52l0-28zm0 77.5l96.6-24.2c27-6.7 55.5-3.6 80.4 8.8c54.9 27.4 118.7 29.7 175 6.8l0 241.8-24.4 9.1c-33.7 12.6-71.2 10.7-103.4-5.4c-48.2-24.1-103.3-30.1-155.6-17.1L48 338.5l0-237z"]};var Ao={prefix:"far",iconName:"user",icon:[448,512,[128100,62144],"f007","M304 128a80 80 0 1 0 -160 0 80 80 0 1 0 160 0zM96 128a128 128 0 1 1 256 0A128 128 0 1 1 96 128zM49.3 464l349.5 0c-8.9-63.3-63.3-112-129-112l-91.4 0c-65.7 0-120.1 48.7-129 112zM0 482.3C0 383.8 79.8 304 178.3 304l91.4 0C368.2 304 448 383.8 448 482.3c0 16.4-13.3 29.7-29.7 29.7L29.7 512C13.3 512 0 498.7 0 482.3z"]};var wo={prefix:"far",iconName:"window-restore",icon:[512,512,[],"f2d2","M432 48L208 48c-17.7 0-32 14.3-32 32l0 16-48 0 0-16c0-44.2 35.8-80 80-80L432 0c44.2 0 80 35.8 80 80l0 224c0 44.2-35.8 80-80 80l-16 0 0-48 16 0c17.7 0 32-14.3 32-32l0-224c0-17.7-14.3-32-32-32zM48 448c0 8.8 7.2 16 16 16l256 0c8.8 0 16-7.2 16-16l0-192L48 256l0 192zM64 128l256 0c35.3 0 64 28.7 64 64l0 256c0 35.3-28.7 64-64 64L64 512c-35.3 0-64-28.7-64-64L0 192c0-35.3 28.7-64 64-64z"]};var h2={prefix:"far",iconName:"folder-closed",icon:[512,512,[],"e185","M251.7 127.6s0 0 0 0c10.5 10.5 24.7 16.4 39.6 16.4L448 144c8.8 0 16 7.2 16 16l0 32L48 192l0-96c0-8.8 7.2-16 16-16l133.5 0c4.2 0 8.3 1.7 11.3 4.7l33.9-33.9L208.8 84.7l42.9 42.9zM48 240l416 0 0 176c0 8.8-7.2 16-16 16L64 432c-8.8 0-16-7.2-16-16l0-176zM285.7 93.7L242.7 50.7c-12-12-28.3-18.7-45.3-18.7L64 32C28.7 32 0 60.7 0 96L0 416c0 35.3 28.7 64 64 64l384 0c35.3 0 64-28.7 64-64l0-256c0-35.3-28.7-64-64-64L291.3 96c-2.1 0-4.2-.8-5.7-2.3z"]};var D1={prefix:"far",iconName:"file-zipper",icon:[384,512,["file-archive"],"f1c6","M64 464c-8.8 0-16-7.2-16-16L48 64c0-8.8 7.2-16 16-16l48 0c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l48 0 0 80c0 17.7 14.3 32 32 32l80 0 0 288c0 8.8-7.2 16-16 16L64 464zM64 0C28.7 0 0 28.7 0 64L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-293.5c0-17-6.7-33.3-18.7-45.3L274.7 18.7C262.7 6.7 246.5 0 229.5 0L64 0zm48 112c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16s-7.2-16-16-16l-32 0c-8.8 0-16 7.2-16 16zm0 64c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16s-7.2-16-16-16l-32 0c-8.8 0-16 7.2-16 16zm-6.3 71.8L82.1 335.9c-1.4 5.4-2.1 10.9-2.1 16.4c0 35.2 28.8 63.7 64 63.7s64-28.5 64-63.7c0-5.5-.7-11.1-2.1-16.4l-23.5-88.2c-3.7-14-16.4-23.8-30.9-23.8l-14.8 0c-14.5 0-27.2 9.7-30.9 23.8zM128 336l32 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16s7.2-16 16-16z"]},Oo=D1;var Do={prefix:"far",iconName:"comment-dots",icon:[512,512,[128172,62075,"commenting"],"f4ad","M168.2 384.9c-15-5.4-31.7-3.1-44.6 6.4c-8.2 6-22.3 14.8-39.4 22.7c5.6-14.7 9.9-31.3 11.3-49.4c1-12.9-3.3-25.7-11.8-35.5C60.4 302.8 48 272 48 240c0-79.5 83.3-160 208-160s208 80.5 208 160s-83.3 160-208 160c-31.6 0-61.3-5.5-87.8-15.1zM26.3 423.8c-1.6 2.7-3.3 5.4-5.1 8.1l-.3 .5c-1.6 2.3-3.2 4.6-4.8 6.9c-3.5 4.7-7.3 9.3-11.3 13.5c-4.6 4.6-5.9 11.4-3.4 17.4c2.5 6 8.3 9.9 14.8 9.9c5.1 0 10.2-.3 15.3-.8l.7-.1c4.4-.5 8.8-1.1 13.2-1.9c.8-.1 1.6-.3 2.4-.5c17.8-3.5 34.9-9.5 50.1-16.1c22.9-10 42.4-21.9 54.3-30.6c31.8 11.5 67 17.9 104.1 17.9c141.4 0 256-93.1 256-208S397.4 32 256 32S0 125.1 0 240c0 45.1 17.7 86.8 47.7 120.9c-1.9 24.5-11.4 46.3-21.4 62.9zM144 272a32 32 0 1 0 0-64 32 32 0 1 0 0 64zm144-32a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zm80 32a32 32 0 1 0 0-64 32 32 0 1 0 0 64z"]};var zo={prefix:"far",iconName:"clock",icon:[512,512,[128339,"clock-four"],"f017","M464 256A208 208 0 1 1 48 256a208 208 0 1 1 416 0zM0 256a256 256 0 1 0 512 0A256 256 0 1 0 0 256zM232 120l0 136c0 8 4 15.5 10.7 20l96 64c11 7.4 25.9 4.4 33.3-6.7s4.4-25.9-6.7-33.3L280 243.2 280 120c0-13.3-10.7-24-24-24s-24 10.7-24 24z"]};var To={prefix:"far",iconName:"bell",icon:[448,512,[128276,61602],"f0f3","M224 0c-17.7 0-32 14.3-32 32l0 19.2C119 66 64 130.6 64 208l0 25.4c0 45.4-15.5 89.5-43.8 124.9L5.3 377c-5.8 7.2-6.9 17.1-2.9 25.4S14.8 416 24 416l400 0c9.2 0 17.6-5.3 21.6-13.6s2.9-18.2-2.9-25.4l-14.9-18.6C399.5 322.9 384 278.8 384 233.4l0-25.4c0-77.4-55-142-128-156.8L256 32c0-17.7-14.3-32-32-32zm0 96c61.9 0 112 50.1 112 112l0 25.4c0 47.9 13.9 94.6 39.7 134.6L72.3 368C98.1 328 112 281.3 112 233.4l0-25.4c0-61.9 50.1-112 112-112zm64 352l-64 0-64 0c0 17 6.7 33.3 18.7 45.3s28.3 18.7 45.3 18.7s33.3-6.7 45.3-18.7s18.7-28.3 18.7-45.3z"]},ei={prefix:"far",iconName:"file",icon:[384,512,[128196,128459,61462],"f15b","M320 464c8.8 0 16-7.2 16-16l0-288-80 0c-17.7 0-32-14.3-32-32l0-80L64 48c-8.8 0-16 7.2-16 16l0 384c0 8.8 7.2 16 16 16l256 0zM0 64C0 28.7 28.7 0 64 0L229.5 0c17 0 33.3 6.7 45.3 18.7l90.5 90.5c12 12 18.7 28.3 18.7 45.3L384 448c0 35.3-28.7 64-64 64L64 512c-35.3 0-64-28.7-64-64L0 64z"]};var m2=(()=>{class t{transform(e,i=0,r=void 0){return ot(e,i,r)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275pipe=bn({name:"pathSlice",type:t,pure:!0})}}return t})();var Pi=function(t,n){return Pi=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,i){e.__proto__=i}||function(e,i){for(var r in i)i.hasOwnProperty(r)&&(e[r]=i[r])},Pi(t,n)};function M2(t,n){Pi(t,n);function e(){this.constructor=t}t.prototype=n===null?Object.create(n):(e.prototype=n.prototype,new e)}var W=function(){return W=Object.assign||function(n){for(var e,i=1,r=arguments.length;i<r;i++){e=arguments[i];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(n[o]=e[o])}return n},W.apply(this,arguments)};function L2(t,n){var e=typeof Symbol=="function"&&t[Symbol.iterator];if(!e)return t;var i=e.call(t),r,o=[],s;try{for(;(n===void 0||n-- >0)&&!(r=i.next()).done;)o.push(r.value)}catch(a){s={error:a}}finally{try{r&&!r.done&&(e=i.return)&&e.call(i)}finally{if(s)throw s.error}}return o}function Fi(){for(var t=[],n=0;n<arguments.length;n++)t=t.concat(L2(arguments[n]));return t}var z1="An invariant failed, however the error is obfuscated because this is an production build.",ni=[];Object.freeze(ni);var $i={};Object.freeze($i);var T1={};function ki(){return typeof window<"u"?window:typeof global<"u"?global:T1}function K(){return++m.mobxGuid}function O(t){throw Nt(!1,t),"X"}function Nt(t,n){if(!t)throw new Error("[mobx] "+(n||z1))}var v2=[];function he(t,n){return!1}function Ui(t){var n=!1;return function(){if(!n)return n=!0,t.apply(this,arguments)}}var g2=function(){};function I1(t){var n=[];return t.forEach(function(e){n.indexOf(e)===-1&&n.push(e)}),n}function Gi(t){return t!==null&&typeof t=="object"}function ut(t){if(t===null||typeof t!="object")return!1;var n=Object.getPrototypeOf(t);return n===Object.prototype||n===null}function R1(t){return pt(t)||qe(t)?t:Array.isArray(t)?new Map(t):ut(t)?new Map(Object.entries(t)):O("Cannot convert to map from '"+t+"'")}function P1(t,n){for(var e=0;e<n.length;e++)Ue(t,n[e],t[n[e]])}function Ue(t,n,e){Object.defineProperty(t,n,{enumerable:!1,writable:!0,configurable:!0,value:e})}function wt(t,n,e){Object.defineProperty(t,n,{enumerable:!1,writable:!1,configurable:!0,value:e})}function Oe(t,n){var e="isMobX"+t;return n.prototype[e]=!0,function(i){return Gi(i)&&i[e]===!0}}function F1(t,n){return typeof t=="number"&&typeof n=="number"&&isNaN(t)&&isNaN(n)}function pt(t){return ki().Map!==void 0&&t instanceof ki().Map}function Ot(t){return t instanceof Set}function dt(t){for(var n=[];;){var e=t.next();if(e.done)break;n.push(e.value)}return n}function A2(){return typeof Symbol=="function"&&Symbol.toPrimitive||"@@toPrimitive"}function w2(t){return t===null?null:typeof t=="object"?""+t:t}function qi(){return typeof Symbol=="function"&&Symbol.iterator||"@@iterator"}function Wi(t,n){wt(t,qi(),n)}function Mt(t){return t[qi()]=k1,t}function Ki(){return typeof Symbol=="function"&&Symbol.toStringTag||"@@toStringTag"}function k1(){return this}var li=function(){function t(n){n===void 0&&(n="Atom@"+K()),this.name=n,this.isPendingUnobservation=!1,this.isBeingObserved=!1,this.observers=[],this.observersIndexes={},this.diffValue=0,this.lastAccessedBy=0,this.lowestObserverState=L.NOT_TRACKING}return t.prototype.onBecomeUnobserved=function(){},t.prototype.onBecomeObserved=function(){},t.prototype.reportObserved=function(){return $2(this)},t.prototype.reportChanged=function(){me(),a0(this),ve()},t.prototype.toString=function(){return this.name},t}(),Yi=Oe("Atom",li);function V1(t,n,e){n===void 0&&(n=g2),e===void 0&&(e=g2);var i=new li(t);return C0(i,n),K2(i,e),i}function O2(t,n){return t===n}function j1(t,n){return Zi(t,n)}function B1(t,n){return Zi(t,n,1)}function H1(t,n){return F1(t,n)||O2(t,n)}var ft={identity:O2,structural:j1,default:H1,shallow:B1},$1={},U1={};function G1(t,n){var e=n?$1:U1;return e[t]||(e[t]={configurable:!0,enumerable:n,get:function(){return He(this),this[t]},set:function(i){He(this),this[t]=i}})}function He(t){if(t.__mobxDidRunLazyInitializers!==!0){var n=t.__mobxDecorators;if(n){Ue(t,"__mobxDidRunLazyInitializers",!0);for(var e in n){var i=n[e];i.propertyCreator(t,i.prop,i.descriptor,i.decoratorTarget,i.decoratorArguments)}}}}function D2(t,n){return function(){var i,r=function(s,a,h,D){if(D===!0)return n(s,a,h,s,i),null;if(!Object.prototype.hasOwnProperty.call(s,"__mobxDecorators")){var T=s.__mobxDecorators;Ue(s,"__mobxDecorators",W({},T))}return s.__mobxDecorators[a]={prop:a,propertyCreator:n,descriptor:h,decoratorTarget:s,decoratorArguments:i},G1(a,t)};return q1(arguments)?(i=ni,r.apply(null,arguments)):(i=Array.prototype.slice.call(arguments),r)}}function q1(t){return(t.length===2||t.length===3)&&typeof t[1]=="string"||t.length===4&&t[3]===!0}function Dt(t,n,e){return Q2(t)?t:Array.isArray(t)?E.array(t,{name:e}):ut(t)?E.object(t,void 0,{name:e}):pt(t)?E.map(t,{name:e}):Ot(t)?E.set(t,{name:e}):t}function W1(t,n,e){return t==null||At(t)||pi(t)||qe(t)||mt(t)?t:Array.isArray(t)?E.array(t,{name:e,deep:!1}):ut(t)?E.object(t,void 0,{name:e,deep:!1}):pt(t)?E.map(t,{name:e,deep:!1}):Ot(t)?E.set(t,{name:e,deep:!1}):O(!1)}function Lt(t){return t}function K1(t,n,e){return Zi(t,n)?n:t}function di(t){var n=D2(!0,function(i,r,o,s,a){var h=o?o.initializer?o.initializer.call(i):o.value:void 0;T0(i,r,h,t)}),e=(typeof process<"u"&&process.env,n);return e.enhancer=t,e}var z2={deep:!0,name:void 0,defaultDecorator:void 0},Y1={deep:!1,name:void 0,defaultDecorator:void 0};Object.freeze(z2);Object.freeze(Y1);function lt(t){return t==null?z2:typeof t=="string"?{name:t,deep:!0}:t}function ti(t){return t.defaultDecorator?t.defaultDecorator.enhancer:t.deep===!1?Lt:Dt}var Xi=di(Dt),X1=di(W1),T2=di(Lt),Q1=di(K1);function J1(t,n,e){if(typeof arguments[1]=="string")return Xi.apply(null,arguments);if(Q2(t))return t;var i=ut(t)?E.object(t,n,e):Array.isArray(t)?E.array(t,n):pt(t)?E.map(t,n):Ot(t)?E.set(t,n):t;if(i!==t)return i;O(!1)}var b2={box:function(t,n){arguments.length>2&&ue("box");var e=lt(n);return new Ae(t,ti(e),e.name,!0,e.equals)},shallowBox:function(t,n){return arguments.length>2&&ue("shallowBox"),he("observable.shallowBox","observable.box(value, { deep: false })"),E.box(t,{name:n,deep:!1})},array:function(t,n){arguments.length>2&&ue("array");var e=lt(n);return new be(t,ti(e),e.name)},shallowArray:function(t,n){return arguments.length>2&&ue("shallowArray"),he("observable.shallowArray","observable.array(values, { deep: false })"),E.array(t,{name:n,deep:!1})},map:function(t,n){arguments.length>2&&ue("map");var e=lt(n);return new hi(t,ti(e),e.name)},shallowMap:function(t,n){return arguments.length>2&&ue("shallowMap"),he("observable.shallowMap","observable.map(values, { deep: false })"),E.map(t,{name:n,deep:!1})},set:function(t,n){arguments.length>2&&ue("set");var e=lt(n);return new mi(t,ti(e),e.name)},object:function(t,n,e){typeof arguments[1]=="string"&&ue("object");var i=lt(e);return _0({},t,n,i)},shallowObject:function(t,n){return typeof arguments[1]=="string"&&ue("shallowObject"),he("observable.shallowObject","observable.object(values, {}, { deep: false })"),E.object(t,{},{name:n,deep:!1})},ref:T2,shallow:X1,deep:Xi,struct:Q1},E=J1;Object.keys(b2).forEach(function(t){return E[t]=b2[t]});function ue(t){O("Expected one or two arguments to observable."+t+". Did you accidentally try to use observable."+t+" as decorator?")}var ri=D2(!1,function(t,n,e,i,r){var o=e.get,s=e.set,a=r[0]||{};I0(t,n,W({get:o,set:s},a))}),Z1=ri({equals:ft.structural}),I=function(n,e,i){if(typeof e=="string"||n!==null&&typeof n=="object"&&arguments.length===1)return ri.apply(null,arguments);var r=typeof e=="object"?e:{};return r.get=n,r.set=typeof e=="function"?e:r.set,r.name=r.name||n.name||"",new we(r)};I.struct=Z1;var L=function(t){return t[t.NOT_TRACKING=-1]="NOT_TRACKING",t[t.UP_TO_DATE=0]="UP_TO_DATE",t[t.POSSIBLY_STALE=1]="POSSIBLY_STALE",t[t.STALE=2]="STALE",t}(L||{}),ce=function(t){return t[t.NONE=0]="NONE",t[t.LOG=1]="LOG",t[t.BREAK=2]="BREAK",t}(ce||{}),oi=function(){function t(n){this.cause=n}return t}();function Et(t){return t instanceof oi}function Vi(t){switch(t.dependenciesState){case L.UP_TO_DATE:return!1;case L.NOT_TRACKING:case L.STALE:return!0;case L.POSSIBLY_STALE:{for(var n=ht(),e=t.observing,i=e.length,r=0;r<i;r++){var o=e[r];if(ui(o)){if(m.disableErrorBoundaries)o.get();else try{o.get()}catch{return Le(n),!0}if(t.dependenciesState===L.STALE)return Le(n),!0}}return k2(t),Le(n),!1}}}function fi(t){var n=t.observers.length>0;m.computationDepth>0&&n&&O(!1),!m.allowStateChanges&&(n||m.enforceActions==="strict")&&O(!1)}function I2(t,n,e){var i=P2(!0);k2(t),t.newObserving=new Array(t.observing.length+100),t.unboundDepsCount=0,t.runId=++m.runId;var r=m.trackingDerivation;m.trackingDerivation=t;var o;if(m.disableErrorBoundaries===!0)o=n.call(e);else try{o=n.call(e)}catch(s){o=new oi(s)}return m.trackingDerivation=r,e0(t),t.observing.length===0&&void 0,F2(i),o}function e0(t){for(var n=t.observing,e=t.observing=t.newObserving,i=L.UP_TO_DATE,r=0,o=t.unboundDepsCount,s=0;s<o;s++){var a=e[s];a.diffValue===0&&(a.diffValue=1,r!==s&&(e[r]=a),r++),a.dependenciesState>i&&(i=a.dependenciesState)}for(e.length=r,t.newObserving=null,o=n.length;o--;){var a=n[o];a.diffValue===0&&B2(a,t),a.diffValue=0}for(;r--;){var a=e[r];a.diffValue===1&&(a.diffValue=0,s0(a,t))}i!==L.UP_TO_DATE&&(t.dependenciesState=i,t.onBecomeStale())}function ji(t){var n=t.observing;t.observing=[];for(var e=n.length;e--;)B2(n[e],t);t.dependenciesState=L.NOT_TRACKING}function R2(t){var n=ht(),e=t();return Le(n),e}function ht(){var t=m.trackingDerivation;return m.trackingDerivation=null,t}function Le(t){m.trackingDerivation=t}function P2(t){var n=m.allowStateReads;return m.allowStateReads=t,n}function F2(t){m.allowStateReads=t}function k2(t){if(t.dependenciesState!==L.UP_TO_DATE){t.dependenciesState=L.UP_TO_DATE;for(var n=t.observing,e=n.length;e--;)n[e].lowestObserverState=L.UP_TO_DATE}}var si=0,t0=1;function Be(t,n){var e=function(){return i0(t,n,this,arguments)};return e.isMobxAction=!0,e}function i0(t,n,e,i){var r=n0(t,e,i);try{return n.apply(e,i)}catch(o){throw r.error=o,o}finally{r0(r)}}function n0(t,n,e){var i=j()&&!!t,r=0;if(i){r=Date.now();var o=e&&e.length||0,s=new Array(o);if(o>0)for(var a=0;a<o;a++)s[a]=e[a];ee({type:"action",name:t,object:n,arguments:s})}var h=ht();me();var D=V2(!0),T=P2(!0),Y={prevDerivation:h,prevAllowStateChanges:D,prevAllowStateReads:T,notifySpy:i,startTime:r,actionId:t0++,parentActionId:si};return si=Y.actionId,Y}function r0(t){si!==t.actionId&&O("invalid action stack. did you forget to finish an action?"),si=t.parentActionId,t.error!==void 0&&(m.suppressReactionErrors=!0),j2(t.prevAllowStateChanges),F2(t.prevAllowStateReads),ve(),Le(t.prevDerivation),t.notifySpy&&te({time:Date.now()-t.startTime}),m.suppressReactionErrors=!1}function V2(t){var n=m.allowStateChanges;return m.allowStateChanges=t,n}function j2(t){m.allowStateChanges=t}var Ae=function(t){M2(n,t);function n(e,i,r,o,s){r===void 0&&(r="ObservableValue@"+K()),o===void 0&&(o=!0),s===void 0&&(s=ft.default);var a=t.call(this,r)||this;return a.enhancer=i,a.name=r,a.equals=s,a.hasUnreportedChange=!1,a.value=i(e,void 0,r),o&&j()&&$e({type:"create",name:a.name,newValue:""+a.value}),a}return n.prototype.dehanceValue=function(e){return this.dehancer!==void 0?this.dehancer(e):e},n.prototype.set=function(e){var i=this.value;if(e=this.prepareNewValue(e),e!==m.UNCHANGED){var r=j();r&&ee({type:"update",name:this.name,newValue:e,oldValue:i}),this.setNewValue(e),r&&te()}},n.prototype.prepareNewValue=function(e){if(fi(this),le(this)){var i=de(this,{object:this,type:"update",newValue:e});if(!i)return m.UNCHANGED;e=i.newValue}return e=this.enhancer(e,this.value,this.name),this.equals(this.value,e)?m.UNCHANGED:e},n.prototype.setNewValue=function(e){var i=this.value;this.value=e,this.reportChanged(),ie(this)&&ne(this,{type:"update",object:this,newValue:e,oldValue:i})},n.prototype.get=function(){return this.reportObserved(),this.dehanceValue(this.value)},n.prototype.intercept=function(e){return Tt(this,e)},n.prototype.observe=function(e,i){return i&&e({object:this,type:"update",newValue:this.value,oldValue:void 0}),It(this,e)},n.prototype.toJSON=function(){return this.get()},n.prototype.toString=function(){return this.name+"["+this.value+"]"},n.prototype.valueOf=function(){return w2(this.get())},n}(li);Ae.prototype[A2()]=Ae.prototype.valueOf;var Fo=Oe("ObservableValue",Ae),we=function(){function t(n){this.dependenciesState=L.NOT_TRACKING,this.observing=[],this.newObserving=null,this.isBeingObserved=!1,this.isPendingUnobservation=!1,this.observers=[],this.observersIndexes={},this.diffValue=0,this.runId=0,this.lastAccessedBy=0,this.lowestObserverState=L.UP_TO_DATE,this.unboundDepsCount=0,this.__mapid="#"+K(),this.value=new oi(null),this.isComputing=!1,this.isRunningSetter=!1,this.isTracing=ce.NONE,this.derivation=n.get,this.name=n.name||"ComputedValue@"+K(),n.set&&(this.setter=Be(this.name+"-setter",n.set)),this.equals=n.equals||(n.compareStructural||n.struct?ft.structural:ft.default),this.scope=n.context,this.requiresReaction=!!n.requiresReaction,this.keepAlive=!!n.keepAlive}return t.prototype.onBecomeStale=function(){l0(this)},t.prototype.onBecomeUnobserved=function(){},t.prototype.onBecomeObserved=function(){},t.prototype.get=function(){this.isComputing&&O("Cycle detected in computation "+this.name+": "+this.derivation),m.inBatch===0&&this.observers.length===0&&!this.keepAlive?Vi(this)&&(this.warnAboutUntrackedRead(),me(),this.value=this.computeValue(!1),ve()):($2(this),Vi(this)&&this.trackAndCompute()&&c0(this));var n=this.value;if(Et(n))throw n.cause;return n},t.prototype.peek=function(){var n=this.computeValue(!1);if(Et(n))throw n.cause;return n},t.prototype.set=function(n){if(this.setter){Nt(!this.isRunningSetter,"The setter of computed value '"+this.name+"' is trying to update itself. Did you intend to update an _observable_ value, instead of the computed property?"),this.isRunningSetter=!0;try{this.setter.call(this.scope,n)}finally{this.isRunningSetter=!1}}else Nt(!1,!1)},t.prototype.trackAndCompute=function(){j()&&$e({object:this.scope,type:"compute",name:this.name});var n=this.value,e=this.dependenciesState===L.NOT_TRACKING,i=this.computeValue(!0),r=e||Et(n)||Et(i)||!this.equals(n,i);return r&&(this.value=i),r},t.prototype.computeValue=function(n){this.isComputing=!0,m.computationDepth++;var e;if(n)e=I2(this,this.derivation,this.scope);else if(m.disableErrorBoundaries===!0)e=this.derivation.call(this.scope);else try{e=this.derivation.call(this.scope)}catch(i){e=new oi(i)}return m.computationDepth--,this.isComputing=!1,e},t.prototype.suspend=function(){this.keepAlive||(ji(this),this.value=void 0)},t.prototype.observe=function(n,e){var i=this,r=!0,o=void 0;return zt(function(){var s=i.get();if(!r||e){var a=ht();n({type:"update",object:i,newValue:s,oldValue:o}),Le(a)}r=!1,o=s})},t.prototype.warnAboutUntrackedRead=function(){},t.prototype.toJSON=function(){return this.get()},t.prototype.toString=function(){return this.name+"["+this.derivation.toString()+"]"},t.prototype.valueOf=function(){return w2(this.get())},t}();we.prototype[A2()]=we.prototype.valueOf;var ui=Oe("ComputedValue",we);var Ti=function(){function t(){this.version=5,this.UNCHANGED={},this.trackingDerivation=null,this.computationDepth=0,this.runId=0,this.mobxGuid=0,this.inBatch=0,this.pendingUnobservations=[],this.pendingReactions=[],this.isRunningReactions=!1,this.allowStateChanges=!0,this.allowStateReads=!0,this.enforceActions=!1,this.spyListeners=[],this.globalReactionErrorHandlers=[],this.computedRequiresReaction=!1,this.reactionRequiresObservable=!1,this.observableRequiresReaction=!1,this.computedConfigurable=!1,this.disableErrorBoundaries=!1,this.suppressReactionErrors=!1}return t}(),Ii=!0,o0=!1,m=function(){var t=ki();return t.__mobxInstanceCount>0&&!t.__mobxGlobals&&(Ii=!1),t.__mobxGlobals&&t.__mobxGlobals.version!==new Ti().version&&(Ii=!1),Ii?t.__mobxGlobals?(t.__mobxInstanceCount+=1,t.__mobxGlobals.UNCHANGED||(t.__mobxGlobals.UNCHANGED={}),t.__mobxGlobals):(t.__mobxInstanceCount=1,t.__mobxGlobals=new Ti):(setTimeout(function(){o0||O("There are multiple, different versions of MobX active. Make sure MobX is loaded only once or use `configure({ isolateGlobalState: true })`")},1),new Ti)}();function s0(t,n){var e=t.observers.length;e&&(t.observersIndexes[n.__mapid]=e),t.observers[e]=n,t.lowestObserverState>n.dependenciesState&&(t.lowestObserverState=n.dependenciesState)}function B2(t,n){if(t.observers.length===1)t.observers.length=0,H2(t);else{var e=t.observers,i=t.observersIndexes,r=e.pop();if(r!==n){var o=i[n.__mapid]||0;o?i[r.__mapid]=o:delete i[r.__mapid],e[o]=r}delete i[n.__mapid]}}function H2(t){t.isPendingUnobservation===!1&&(t.isPendingUnobservation=!0,m.pendingUnobservations.push(t))}function me(){m.inBatch++}function ve(){if(--m.inBatch===0){q2();for(var t=m.pendingUnobservations,n=0;n<t.length;n++){var e=t[n];e.isPendingUnobservation=!1,e.observers.length===0&&(e.isBeingObserved&&(e.isBeingObserved=!1,e.onBecomeUnobserved()),e instanceof we&&e.suspend())}m.pendingUnobservations=[]}}function $2(t){var n=m.trackingDerivation;return n!==null?(n.runId!==t.lastAccessedBy&&(t.lastAccessedBy=n.runId,n.newObserving[n.unboundDepsCount++]=t,t.isBeingObserved||(t.isBeingObserved=!0,t.onBecomeObserved())),!0):(t.observers.length===0&&m.inBatch>0&&H2(t),!1)}function a0(t){if(t.lowestObserverState!==L.STALE){t.lowestObserverState=L.STALE;for(var n=t.observers,e=n.length;e--;){var i=n[e];i.dependenciesState===L.UP_TO_DATE&&(i.isTracing!==ce.NONE&&U2(i,t),i.onBecomeStale()),i.dependenciesState=L.STALE}}}function c0(t){if(t.lowestObserverState!==L.STALE){t.lowestObserverState=L.STALE;for(var n=t.observers,e=n.length;e--;){var i=n[e];i.dependenciesState===L.POSSIBLY_STALE?i.dependenciesState=L.STALE:i.dependenciesState===L.UP_TO_DATE&&(t.lowestObserverState=L.UP_TO_DATE)}}}function l0(t){if(t.lowestObserverState===L.UP_TO_DATE){t.lowestObserverState=L.POSSIBLY_STALE;for(var n=t.observers,e=n.length;e--;){var i=n[e];i.dependenciesState===L.UP_TO_DATE&&(i.dependenciesState=L.POSSIBLY_STALE,i.isTracing!==ce.NONE&&U2(i,t),i.onBecomeStale())}}}function U2(t,n){if(console.log("[mobx.trace] '"+t.name+"' is invalidated due to a change in: '"+n.name+"'"),t.isTracing===ce.BREAK){var e=[];G2(y0(t),e,1),new Function(`debugger;
2
- /*
3
- Tracing '`+t.name+`'
4
-
5
- You are entering this break point because derivation '`+t.name+"' is being traced and '"+n.name+`' is now forcing it to update.
6
- Just follow the stacktrace you should now see in the devtools to see precisely what piece of your code is causing this update
7
- The stackframe you are looking for is at least ~6-8 stack-frames up.
8
-
9
- `+(t instanceof we?t.derivation.toString().replace(/[*]\//g,"/"):"")+`
10
-
11
- The dependencies for this derivation are:
12
-
13
- `+e.join(`
14
- `)+`
15
- */
16
- `)()}}function G2(t,n,e){if(n.length>=1e3){n.push("(and many more)");return}n.push(""+new Array(e).join(" ")+t.name),t.dependencies&&t.dependencies.forEach(function(i){return G2(i,n,e+1)})}var ai=function(){function t(n,e,i,r){n===void 0&&(n="Reaction@"+K()),r===void 0&&(r=!1),this.name=n,this.onInvalidate=e,this.errorHandler=i,this.requiresObservable=r,this.observing=[],this.newObserving=[],this.dependenciesState=L.NOT_TRACKING,this.diffValue=0,this.runId=0,this.unboundDepsCount=0,this.__mapid="#"+K(),this.isDisposed=!1,this._isScheduled=!1,this._isTrackPending=!1,this._isRunning=!1,this.isTracing=ce.NONE}return t.prototype.onBecomeStale=function(){this.schedule()},t.prototype.schedule=function(){this._isScheduled||(this._isScheduled=!0,m.pendingReactions.push(this),q2())},t.prototype.isScheduled=function(){return this._isScheduled},t.prototype.runReaction=function(){if(!this.isDisposed){if(me(),this._isScheduled=!1,Vi(this)){this._isTrackPending=!0;try{this.onInvalidate(),this._isTrackPending&&j()&&$e({name:this.name,type:"scheduled-reaction"})}catch(n){this.reportExceptionInDerivation(n)}}ve()}},t.prototype.track=function(n){me();var e=j(),i;e&&(i=Date.now(),ee({name:this.name,type:"reaction"})),this._isRunning=!0;var r=I2(this,n,void 0);this._isRunning=!1,this._isTrackPending=!1,this.isDisposed&&ji(this),Et(r)&&this.reportExceptionInDerivation(r.cause),e&&te({time:Date.now()-i}),ve()},t.prototype.reportExceptionInDerivation=function(n){var e=this;if(this.errorHandler){this.errorHandler(n,this);return}if(m.disableErrorBoundaries)throw n;var i="[mobx] Encountered an uncaught exception that was thrown by a reaction or observer component, in: '"+this+"'";m.suppressReactionErrors?console.warn("[mobx] (error in reaction '"+this.name+"' suppressed, fix error of causing action below)"):console.error(i,n),j()&&$e({type:"error",name:this.name,message:i,error:""+n}),m.globalReactionErrorHandlers.forEach(function(r){return r(n,e)})},t.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this._isRunning||(me(),ji(this),ve()))},t.prototype.getDisposer=function(){var n=this.dispose.bind(this);return n.$mobx=this,n},t.prototype.toString=function(){return"Reaction["+this.name+"]"},t.prototype.trace=function(n){n===void 0&&(n=!1),x0(this,n)},t}();var C2=100,d0=function(t){return t()};function q2(){m.inBatch>0||m.isRunningReactions||d0(f0)}function f0(){m.isRunningReactions=!0;for(var t=m.pendingReactions,n=0;t.length>0;){++n===C2&&(console.error("Reaction doesn't converge to a stable state after "+C2+" iterations."+(" Probably there is a cycle in the reactive function: "+t[0])),t.splice(0));for(var e=t.splice(0),i=0,r=e.length;i<r;i++)e[i].runReaction()}m.isRunningReactions=!1}var ci=Oe("Reaction",ai);function j(){return!!m.spyListeners.length}function $e(t){if(m.spyListeners.length)for(var n=m.spyListeners,e=0,i=n.length;e<i;e++)n[e](t)}function ee(t){var n=W({},t,{spyReportStart:!0});$e(n)}var u0={spyReportEnd:!0};function te(t){$e(t?W({},t,{spyReportEnd:!0}):u0)}function p0(t){return m.spyListeners.push(t),Ui(function(){m.spyListeners=m.spyListeners.filter(function(n){return n!==t})})}function h0(){O(!1)}function _2(t){return function(n,e,i){if(i){if(i.value)return{value:Be(t,i.value),enumerable:!1,configurable:!0,writable:!0};var r=i.initializer;return{enumerable:!1,configurable:!0,writable:!0,initializer:function(){return Be(t,r.call(this))}}}return m0(t).apply(this,arguments)}}function m0(t){return function(n,e,i){Object.defineProperty(n,e,{configurable:!0,enumerable:!1,get:function(){},set:function(r){Ue(this,e,N(t,r))}})}}function v0(t,n,e,i){return i===!0?(Ri(t,n,e.value),null):e?{configurable:!0,enumerable:!1,get:function(){return Ri(this,n,e.value||e.initializer.call(this)),this[n]},set:h0}:{enumerable:!1,configurable:!0,set:function(r){Ri(this,n,r)},get:function(){}}}var N=function(n,e,i,r){if(arguments.length===1&&typeof n=="function")return Be(n.name||"<unnamed action>",n);if(arguments.length===2&&typeof e=="function")return Be(n,e);if(arguments.length===1&&typeof n=="string")return _2(n);if(r===!0)n[e]=Be(n.name||e,i.value);else return _2(e).apply(null,arguments)};N.bound=v0;function Ri(t,n,e){Ue(t,n,Be(n,e.bind(t)))}function zt(t,n){n===void 0&&(n=$i);var e=n&&n.name||t.name||"Autorun@"+K(),i=!n.scheduler&&!n.delay,r;if(i)r=new ai(e,function(){this.track(a)},n.onError,n.requiresObservable);else{var o=W2(n),s=!1;r=new ai(e,function(){s||(s=!0,o(function(){s=!1,r.isDisposed||r.track(a)}))},n.onError,n.requiresObservable)}function a(){t(r)}return r.schedule(),r.getDisposer()}var g0=function(t){return t()};function W2(t){return t.scheduler?t.scheduler:t.delay?function(n){return setTimeout(n,t.delay)}:g0}function Ge(t,n,e){e===void 0&&(e=$i),typeof e=="boolean"&&(e={fireImmediately:e},he("Using fireImmediately as argument is deprecated. Use '{ fireImmediately: true }' instead"));var i=e.name||"Reaction@"+K(),r=N(i,e.onError?b0(e.onError,n):n),o=!e.scheduler&&!e.delay,s=W2(e),a=!0,h=!1,D,T=e.compareStructural?ft.structural:e.equals||ft.default,Y=new ai(i,function(){a||o?De():h||(h=!0,s(De))},e.onError,e.requiresObservable);function De(){if(h=!1,!Y.isDisposed){var ln=!1;Y.track(function(){var dn=t(Y);ln=a||!T(D,dn),D=dn}),a&&e.fireImmediately&&r(D,Y),!a&&ln===!0&&r(D,Y),a&&(a=!1)}}return Y.schedule(),Y.getDisposer()}function b0(t,n){return function(){try{return n.apply(this,arguments)}catch(e){t.call(this,e)}}}function C0(t,n,e){return Y2("onBecomeObserved",t,n,e)}function K2(t,n,e){return Y2("onBecomeUnobserved",t,n,e)}function Y2(t,n,e,i){var r=typeof i=="function"?ge(n,e):ge(n),o=typeof i=="function"?i:e,s=r[t];return typeof s!="function"?O(!1):(r[t]=function(){s.call(this),o.call(this)},function(){r[t]=s})}function _0(t,n,e,i){if(0&&e)for(var r in e);i=lt(i);var o=i.defaultDecorator||(i.deep===!1?T2:Xi);He(t),Ji(t,i.name,o.enhancer),me();try{for(var r in n){var s=Object.getOwnPropertyDescriptor(n,r),a=e&&r in e?e[r]:s.get?ri:o,h=a(t,r,s,!0);h&&Object.defineProperty(t,r,h)}}finally{ve()}return t}function y0(t,n){return X2(ge(t,n))}function X2(t){var n={name:t.name};return t.observing&&t.observing.length>0&&(n.dependencies=I1(t.observing).map(X2)),n}function S0(t,n){if(t==null)return!1;if(n!==void 0){if(At(t)){var e=t.$mobx;return e.values&&!!e.values[n]}return!1}return At(t)||!!t.$mobx||Yi(t)||ci(t)||ui(t)}function Q2(t){return arguments.length!==1&&O(!1),S0(t)}function x0(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var e=!1;typeof t[t.length-1]=="boolean"&&(e=t.pop());var i=E0(t);if(!i)return O(!1);i.isTracing===ce.NONE&&console.log("[mobx.trace] '"+i.name+"' tracing enabled"),i.isTracing=e?ce.BREAK:ce.LOG}function E0(t){switch(t.length){case 0:return m.trackingDerivation;case 1:return ge(t[0]);case 2:return ge(t[0],t[1])}}function pe(t,n){n===void 0&&(n=void 0),me();try{return t.apply(n)}finally{ve()}}function le(t){return t.interceptors!==void 0&&t.interceptors.length>0}function Tt(t,n){var e=t.interceptors||(t.interceptors=[]);return e.push(n),Ui(function(){var i=e.indexOf(n);i!==-1&&e.splice(i,1)})}function de(t,n){var e=ht();try{var i=t.interceptors;if(i)for(var r=0,o=i.length;r<o&&(n=i[r](n),Nt(!n||n.type,"Intercept handlers should return nothing or a change object"),!!n);r++);return n}finally{Le(e)}}function ie(t){return t.changeListeners!==void 0&&t.changeListeners.length>0}function It(t,n){var e=t.changeListeners||(t.changeListeners=[]);return e.push(n),Ui(function(){var i=e.indexOf(n);i!==-1&&e.splice(i,1)})}function ne(t,n){var e=ht(),i=t.changeListeners;if(i){i=i.slice();for(var r=0,o=i.length;r<o;r++)i[r](n);Le(e)}}var N0=1e4,M0=function(){var t=!1,n={};return Object.defineProperty(n,"0",{set:function(){t=!0}}),Object.create(n)[0]=1,t===!1}(),Bi=0,Qi=function(){function t(){}return t}();function L0(t,n){typeof Object.setPrototypeOf<"u"?Object.setPrototypeOf(t.prototype,n):typeof t.prototype.__proto__<"u"?t.prototype.__proto__=n:t.prototype=n}L0(Qi,Array.prototype);Object.isFrozen(Array)&&["constructor","push","shift","concat","pop","unshift","replace","find","findIndex","splice","reverse","sort"].forEach(function(t){Object.defineProperty(Qi.prototype,t,{configurable:!0,writable:!0,value:Array.prototype[t]})});var J2=function(){function t(n,e,i,r){this.array=i,this.owned=r,this.values=[],this.lastKnownLength=0,this.atom=new li(n||"ObservableArray@"+K()),this.enhancer=function(o,s){return e(o,s,n+"[..]")}}return t.prototype.dehanceValue=function(n){return this.dehancer!==void 0?this.dehancer(n):n},t.prototype.dehanceValues=function(n){return this.dehancer!==void 0&&n.length>0?n.map(this.dehancer):n},t.prototype.intercept=function(n){return Tt(this,n)},t.prototype.observe=function(n,e){return e===void 0&&(e=!1),e&&n({object:this.array,type:"splice",index:0,added:this.values.slice(),addedCount:this.values.length,removed:[],removedCount:0}),It(this,n)},t.prototype.getArrayLength=function(){return this.atom.reportObserved(),this.values.length},t.prototype.setArrayLength=function(n){if(typeof n!="number"||n<0)throw new Error("[mobx.array] Out of range: "+n);var e=this.values.length;if(n!==e)if(n>e){for(var i=new Array(n-e),r=0;r<n-e;r++)i[r]=void 0;this.spliceWithArray(e,0,i)}else this.spliceWithArray(n,e-n)},t.prototype.updateArrayLength=function(n,e){if(n!==this.lastKnownLength)throw new Error("[mobx] Modification exception: the internal structure of an observable array was changed. Did you use peek() to change it?");this.lastKnownLength+=e,e>0&&n+e+1>Bi&&e1(n+e+1)},t.prototype.spliceWithArray=function(n,e,i){var r=this;fi(this.atom);var o=this.values.length;if(n===void 0?n=0:n>o?n=o:n<0&&(n=Math.max(0,o+n)),arguments.length===1?e=o-n:e==null?e=0:e=Math.max(0,Math.min(e,o-n)),i===void 0&&(i=ni),le(this)){var s=de(this,{object:this.array,type:"splice",index:n,removedCount:e,added:i});if(!s)return ni;e=s.removedCount,i=s.added}i=i.length===0?i:i.map(function(D){return r.enhancer(D,void 0)});var a=i.length-e;this.updateArrayLength(o,a);var h=this.spliceItemsIntoValues(n,e,i);return(e!==0||i.length!==0)&&this.notifyArraySplice(n,i,h),this.dehanceValues(h)},t.prototype.spliceItemsIntoValues=function(n,e,i){var r;if(i.length<N0)return(r=this.values).splice.apply(r,Fi([n,e],i));var o=this.values.slice(n,n+e);return this.values=this.values.slice(0,n).concat(i,this.values.slice(n+e)),o},t.prototype.notifyArrayChildUpdate=function(n,e,i){var r=!this.owned&&j(),o=ie(this),s=o||r?{object:this.array,type:"update",index:n,newValue:e,oldValue:i}:null;r&&ee(W({},s,{name:this.atom.name})),this.atom.reportChanged(),o&&ne(this,s),r&&te()},t.prototype.notifyArraySplice=function(n,e,i){var r=!this.owned&&j(),o=ie(this),s=o||r?{object:this.array,type:"splice",index:n,removed:i,added:e,removedCount:i.length,addedCount:e.length}:null;r&&ee(W({},s,{name:this.atom.name})),this.atom.reportChanged(),o&&ne(this,s),r&&te()},t}(),be=function(t){M2(n,t);function n(e,i,r,o){r===void 0&&(r="ObservableArray@"+K()),o===void 0&&(o=!1);var s=t.call(this)||this,a=new J2(r,i,s,o);if(wt(s,"$mobx",a),e&&e.length){var h=V2(!0);s.spliceWithArray(0,0,e),j2(h)}return M0&&Object.defineProperty(a.array,"0",A0),s}return n.prototype.intercept=function(e){return this.$mobx.intercept(e)},n.prototype.observe=function(e,i){return i===void 0&&(i=!1),this.$mobx.observe(e,i)},n.prototype.clear=function(){return this.splice(0)},n.prototype.concat=function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];return this.$mobx.atom.reportObserved(),Array.prototype.concat.apply(this.peek(),e.map(function(r){return pi(r)?r.peek():r}))},n.prototype.replace=function(e){return this.$mobx.spliceWithArray(0,this.$mobx.values.length,e)},n.prototype.toJS=function(){return this.slice()},n.prototype.toJSON=function(){return this.toJS()},n.prototype.peek=function(){return this.$mobx.atom.reportObserved(),this.$mobx.dehanceValues(this.$mobx.values)},n.prototype.find=function(e,i,r){r===void 0&&(r=0),arguments.length===3&&he("The array.find fromIndex argument to find will not be supported anymore in the next major");var o=this.findIndex.apply(this,arguments);return o===-1?void 0:this.get(o)},n.prototype.findIndex=function(e,i,r){r===void 0&&(r=0),arguments.length===3&&he("The array.findIndex fromIndex argument to find will not be supported anymore in the next major");for(var o=this.peek(),s=o.length,a=r;a<s;a++)if(e.call(i,o[a],a,this))return a;return-1},n.prototype.splice=function(e,i){for(var r=[],o=2;o<arguments.length;o++)r[o-2]=arguments[o];switch(arguments.length){case 0:return[];case 1:return this.$mobx.spliceWithArray(e);case 2:return this.$mobx.spliceWithArray(e,i)}return this.$mobx.spliceWithArray(e,i,r)},n.prototype.spliceWithArray=function(e,i,r){return this.$mobx.spliceWithArray(e,i,r)},n.prototype.push=function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];var r=this.$mobx;return r.spliceWithArray(r.values.length,0,e),r.values.length},n.prototype.pop=function(){return this.splice(Math.max(this.$mobx.values.length-1,0),1)[0]},n.prototype.shift=function(){return this.splice(0,1)[0]},n.prototype.unshift=function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];var r=this.$mobx;return r.spliceWithArray(0,0,e),r.values.length},n.prototype.reverse=function(){var e=this.slice();return e.reverse.apply(e,arguments)},n.prototype.sort=function(e){var i=this.slice();return i.sort.apply(i,arguments)},n.prototype.remove=function(e){var i=this.$mobx.dehanceValues(this.$mobx.values).indexOf(e);return i>-1?(this.splice(i,1),!0):!1},n.prototype.move=function(e,i){he("observableArray.move is deprecated, use .slice() & .replace() instead");function r(a){if(a<0)throw new Error("[mobx.array] Index out of bounds: "+a+" is negative");var h=this.$mobx.values.length;if(a>=h)throw new Error("[mobx.array] Index out of bounds: "+a+" is not smaller than "+h)}if(r.call(this,e),r.call(this,i),e!==i){var o=this.$mobx.values,s;e<i?s=Fi(o.slice(0,e),o.slice(e+1,i+1),[o[e]],o.slice(i+1)):s=Fi(o.slice(0,i),[o[e]],o.slice(i,e),o.slice(e+1)),this.replace(s)}},n.prototype.get=function(e){var i=this.$mobx;if(i){if(e<i.values.length)return i.atom.reportObserved(),i.dehanceValue(i.values[e]);console.warn("[mobx.array] Attempt to read an array index ("+e+") that is out of bounds ("+i.values.length+"). Please check length first. Out of bound indices will not be tracked by MobX")}},n.prototype.set=function(e,i){var r=this.$mobx,o=r.values;if(e<o.length){fi(r.atom);var s=o[e];if(le(r)){var a=de(r,{type:"update",object:this,index:e,newValue:i});if(!a)return;i=a.newValue}i=r.enhancer(i,s);var h=i!==s;h&&(o[e]=i,r.notifyArrayChildUpdate(e,i,s))}else if(e===o.length)r.spliceWithArray(e,0,[i]);else throw new Error("[mobx.array] Index out of bounds, "+e+" is larger than "+o.length)},n}(Qi);Wi(be.prototype,function(){this.$mobx.atom.reportObserved();var t=this,n=0;return Mt({next:function(){return n<t.length?{value:t[n++],done:!1}:{done:!0,value:void 0}}})});Object.defineProperty(be.prototype,"length",{enumerable:!1,configurable:!0,get:function(){return this.$mobx.getArrayLength()},set:function(t){this.$mobx.setArrayLength(t)}});Ue(be.prototype,Ki(),"Array");["every","filter","forEach","indexOf","join","lastIndexOf","map","reduce","reduceRight","slice","some","toString","toLocaleString"].forEach(function(t){var n=Array.prototype[t];Nt(typeof n=="function","Base function not defined on Array prototype: '"+t+"'"),Ue(be.prototype,t,function(){return n.apply(this.peek(),arguments)})});P1(be.prototype,["constructor","intercept","observe","clear","concat","get","replace","toJS","toJSON","peek","find","findIndex","splice","spliceWithArray","push","pop","set","shift","unshift","reverse","sort","remove","move","toString","toLocaleString"]);var A0=Z2(0);function Z2(t){return{enumerable:!1,configurable:!1,get:function(){return this.get(t)},set:function(n){this.set(t,n)}}}function w0(t){Object.defineProperty(be.prototype,""+t,Z2(t))}function e1(t){for(var n=Bi;n<t;n++)w0(n);Bi=t}e1(1e3);var O0=Oe("ObservableArrayAdministration",J2);function pi(t){return Gi(t)&&O0(t.$mobx)}var D0={},hi=function(){function t(n,e,i){if(e===void 0&&(e=Dt),i===void 0&&(i="ObservableMap@"+K()),this.enhancer=e,this.name=i,this.$mobx=D0,this._keys=new be(void 0,Lt,this.name+".keys()",!0),typeof Map!="function")throw new Error("mobx.map requires Map polyfill for the current browser. Check babel-polyfill or core-js/es6/map.js");this._data=new Map,this._hasMap=new Map,this.merge(n)}return t.prototype._has=function(n){return this._data.has(n)},t.prototype.has=function(n){var e=this;if(!m.trackingDerivation)return this._has(n);var i=this._hasMap.get(n);if(!i){var r=i=new Ae(this._has(n),Lt,this.name+"."+ii(n)+"?",!1);this._hasMap.set(n,r),K2(r,function(){return e._hasMap.delete(n)})}return i.get()},t.prototype.set=function(n,e){var i=this._has(n);if(le(this)){var r=de(this,{type:i?"update":"add",object:this,newValue:e,name:n});if(!r)return this;e=r.newValue}return i?this._updateValue(n,e):this._addValue(n,e),this},t.prototype.delete=function(n){var e=this;if(le(this)){var i=de(this,{type:"delete",object:this,name:n});if(!i)return!1}if(this._has(n)){var r=j(),o=ie(this),i=o||r?{type:"delete",object:this,oldValue:this._data.get(n).value,name:n}:null;return r&&ee(W({},i,{name:this.name,key:n})),pe(function(){e._keys.remove(n),e._updateHasMapEntry(n,!1);var a=e._data.get(n);a.setNewValue(void 0),e._data.delete(n)}),o&&ne(this,i),r&&te(),!0}return!1},t.prototype._updateHasMapEntry=function(n,e){var i=this._hasMap.get(n);i&&i.setNewValue(e)},t.prototype._updateValue=function(n,e){var i=this._data.get(n);if(e=i.prepareNewValue(e),e!==m.UNCHANGED){var r=j(),o=ie(this),s=o||r?{type:"update",object:this,oldValue:i.value,name:n,newValue:e}:null;r&&ee(W({},s,{name:this.name,key:n})),i.setNewValue(e),o&&ne(this,s),r&&te()}},t.prototype._addValue=function(n,e){var i=this;pe(function(){var a=new Ae(e,i.enhancer,i.name+"."+ii(n),!1);i._data.set(n,a),e=a.value,i._updateHasMapEntry(n,!0),i._keys.push(n)});var r=j(),o=ie(this),s=o||r?{type:"add",object:this,name:n,newValue:e}:null;r&&ee(W({},s,{name:this.name,key:n})),o&&ne(this,s),r&&te()},t.prototype.get=function(n){return this.has(n)?this.dehanceValue(this._data.get(n).get()):this.dehanceValue(void 0)},t.prototype.dehanceValue=function(n){return this.dehancer!==void 0?this.dehancer(n):n},t.prototype.keys=function(){return this._keys[qi()]()},t.prototype.values=function(){var n=this,e=0;return Mt({next:function(){return e<n._keys.length?{value:n.get(n._keys[e++]),done:!1}:{value:void 0,done:!0}}})},t.prototype.entries=function(){var n=this,e=0;return Mt({next:function(){if(e<n._keys.length){var i=n._keys[e++];return{value:[i,n.get(i)],done:!1}}return{done:!0}}})},t.prototype.forEach=function(n,e){var i=this;this._keys.forEach(function(r){return n.call(e,i.get(r),r,i)})},t.prototype.merge=function(n){var e=this;return qe(n)&&(n=n.toJS()),pe(function(){ut(n)?Object.keys(n).forEach(function(i){return e.set(i,n[i])}):Array.isArray(n)?n.forEach(function(i){var r=L2(i,2),o=r[0],s=r[1];return e.set(o,s)}):pt(n)?n.constructor!==Map?O("Cannot initialize from classes that inherit from Map: "+n.constructor.name):n.forEach(function(i,r){return e.set(r,i)}):n!=null&&O("Cannot initialize map from "+n)}),this},t.prototype.clear=function(){var n=this;pe(function(){R2(function(){n._keys.slice().forEach(function(e){return n.delete(e)})})})},t.prototype.replace=function(n){var e=this;return pe(function(){for(var i=R1(n),r=e._keys,o=Array.from(i.keys()),s=!1,a=0;a<r.length;a++){var h=r[a];r.length===o.length&&h!==o[a]&&(s=!0),i.has(h)||(s=!0,e.delete(h))}i.forEach(function(D,T){e._data.has(T)||(s=!0),e.set(T,D)}),s&&e._keys.replace(o)}),this},Object.defineProperty(t.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),t.prototype.toPOJO=function(){var n=this,e={};return this._keys.forEach(function(i){return e[typeof i=="symbol"?i:ii(i)]=n.get(i)}),e},t.prototype.toJS=function(){var n=this,e=new Map;return this._keys.forEach(function(i){return e.set(i,n.get(i))}),e},t.prototype.toJSON=function(){return this.toPOJO()},t.prototype.toString=function(){var n=this;return this.name+"[{ "+this._keys.map(function(e){return ii(e)+": "+(""+n.get(e))}).join(", ")+" }]"},t.prototype.observe=function(n,e){return It(this,n)},t.prototype.intercept=function(n){return Tt(this,n)},t}();function ii(t){return t&&t.toString?t.toString():new String(t).toString()}Wi(hi.prototype,function(){return this.entries()});wt(hi.prototype,Ki(),"Map");var qe=Oe("ObservableMap",hi),z0={},mi=function(){function t(n,e,i){if(e===void 0&&(e=Dt),i===void 0&&(i="ObservableSet@"+K()),this.name=i,this.$mobx=z0,this._data=new Set,this._atom=V1(this.name),typeof Set!="function")throw new Error("mobx.set requires Set polyfill for the current browser. Check babel-polyfill or core-js/es6/set.js");this.enhancer=function(r,o){return e(r,o,i)},n&&this.replace(n)}return t.prototype.dehanceValue=function(n){return this.dehancer!==void 0?this.dehancer(n):n},t.prototype.clear=function(){var n=this;pe(function(){R2(function(){n._data.forEach(function(e){n.delete(e)})})})},t.prototype.forEach=function(n,e){var i=this;this._data.forEach(function(r){n.call(e,r,r,i)})},Object.defineProperty(t.prototype,"size",{get:function(){return this._atom.reportObserved(),this._data.size},enumerable:!0,configurable:!0}),t.prototype.add=function(n){var e=this;if(fi(this._atom),le(this)){var i=de(this,{type:"add",object:this,newValue:n});if(!i)return this}if(!this.has(n)){pe(function(){e._data.add(e.enhancer(n,void 0)),e._atom.reportChanged()});var r=j(),o=ie(this),i=o||r?{type:"add",object:this,newValue:n}:null;o&&ne(this,i)}return this},t.prototype.delete=function(n){var e=this;if(le(this)){var i=de(this,{type:"delete",object:this,oldValue:n});if(!i)return!1}if(this.has(n)){var r=j(),o=ie(this),i=o||r?{type:"delete",object:this,oldValue:n}:null;return pe(function(){e._atom.reportChanged(),e._data.delete(n)}),o&&ne(this,i),!0}return!1},t.prototype.has=function(n){return this._atom.reportObserved(),this._data.has(this.dehanceValue(n))},t.prototype.entries=function(){var n=0,e=dt(this.keys()),i=dt(this.values());return Mt({next:function(){var r=n;return n+=1,r<i.length?{value:[e[r],i[r]],done:!1}:{done:!0}}})},t.prototype.keys=function(){return this.values()},t.prototype.values=function(){this._atom.reportObserved();var n=this,e=0,i;return this._data.values!==void 0?i=dt(this._data.values()):(i=[],this._data.forEach(function(r){return i.push(r)})),Mt({next:function(){return e<i.length?{value:n.dehanceValue(i[e++]),done:!1}:{done:!0}}})},t.prototype.replace=function(n){var e=this;return mt(n)&&(n=n.toJS()),pe(function(){Array.isArray(n)?(e.clear(),n.forEach(function(i){return e.add(i)})):Ot(n)?(e.clear(),n.forEach(function(i){return e.add(i)})):n!=null&&O("Cannot initialize set from "+n)}),this},t.prototype.observe=function(n,e){return It(this,n)},t.prototype.intercept=function(n){return Tt(this,n)},t.prototype.toJS=function(){return new Set(this)},t.prototype.toString=function(){return this.name+"[ "+dt(this.keys()).join(", ")+" ]"},t}();Wi(mi.prototype,function(){return this.values()});wt(mi.prototype,Ki(),"Set");var mt=Oe("ObservableSet",mi),t1=function(){function t(n,e,i){this.target=n,this.name=e,this.defaultEnhancer=i,this.values={}}return t.prototype.read=function(n,e){if(!(this.target!==n&&(this.illegalAccess(n,e),!this.values[e])))return this.values[e].get()},t.prototype.write=function(n,e,i){var r=this.target;r!==n&&this.illegalAccess(n,e);var o=this.values[e];if(o instanceof we){o.set(i);return}if(le(this)){var s=de(this,{type:"update",object:r,name:e,newValue:i});if(!s)return;i=s.newValue}if(i=o.prepareNewValue(i),i!==m.UNCHANGED){var a=ie(this),h=j(),s=a||h?{type:"update",object:r,oldValue:o.value,name:e,newValue:i}:null;h&&ee(W({},s,{name:this.name,key:e})),o.setNewValue(i),a&&ne(this,s),h&&te()}},t.prototype.remove=function(n){if(this.values[n]){var e=this.target;if(le(this)){var i=de(this,{object:e,name:n,type:"remove"});if(!i)return}try{me();var r=ie(this),o=j(),s=this.values[n].get();this.keys&&this.keys.remove(n),delete this.values[n],delete this.target[n];var i=r||o?{type:"remove",object:e,oldValue:s,name:n}:null;o&&ee(W({},i,{name:this.name,key:n})),r&&ne(this,i),o&&te()}finally{ve()}}},t.prototype.illegalAccess=function(n,e){console.warn("Property '"+e+"' of '"+n+"' was accessed through the prototype chain. Use 'decorate' instead to declare the prop or access it statically through it's owner")},t.prototype.observe=function(n,e){return It(this,n)},t.prototype.intercept=function(n){return Tt(this,n)},t.prototype.getKeys=function(){var n=this;return this.keys===void 0&&(this.keys=new be(Object.keys(this.values).filter(function(e){return n.values[e]instanceof Ae}),Lt,"keys("+this.name+")",!0)),this.keys.slice()},t}();function Ji(t,n,e){n===void 0&&(n=""),e===void 0&&(e=Dt);var i=t.$mobx;return i||(ut(t)||(n=(t.constructor.name||"ObservableObject")+"@"+K()),n||(n="ObservableObject@"+K()),i=new t1(t,n,e),wt(t,"$mobx",i),i)}function T0(t,n,e,i){var r=Ji(t);if(le(r)){var o=de(r,{object:t,name:n,type:"add",newValue:e});if(!o)return;e=o.newValue}var s=r.values[n]=new Ae(e,i,r.name+"."+n,!1);e=s.value,Object.defineProperty(t,n,R0(n)),r.keys&&r.keys.push(n),F0(r,t,n,e)}function I0(t,n,e){var i=Ji(t);e.name=i.name+"."+n,e.context=t,i.values[n]=new we(e),Object.defineProperty(t,n,P0(n))}var y2=Object.create(null),S2=Object.create(null);function R0(t){return y2[t]||(y2[t]={configurable:!0,enumerable:!0,get:function(){return this.$mobx.read(this,t)},set:function(n){this.$mobx.write(this,t,n)}})}function x2(t){var n=t.$mobx;return n||(He(t),t.$mobx)}function P0(t){return S2[t]||(S2[t]={configurable:m.computedConfigurable,enumerable:!1,get:function(){return x2(this).read(this,t)},set:function(n){x2(this).write(this,t,n)}})}function F0(t,n,e,i){var r=ie(t),o=j(),s=r||o?{type:"add",object:n,name:e,newValue:i}:null;o&&ee(W({},s,{name:t.name,key:e})),r&&ne(t,s),o&&te()}var k0=Oe("ObservableObjectAdministration",t1);function At(t){return Gi(t)?(He(t),k0(t.$mobx)):!1}function ge(t,n){if(typeof t=="object"&&t!==null){if(pi(t))return n!==void 0&&O(!1),t.$mobx.atom;if(mt(t))return t.$mobx;if(qe(t)){var e=t;if(n===void 0)return ge(e._keys);var i=e._data.get(n)||e._hasMap.get(n);return i||O(!1),i}if(He(t),n&&!t.$mobx&&t[n],At(t)){if(!n)return O(!1);var i=t.$mobx.values[n];return i||O(!1),i}if(Yi(t)||ui(t)||ci(t))return t}else if(typeof t=="function"&&ci(t.$mobx))return t.$mobx;return O(!1)}function i1(t,n){if(t||O("Expecting some object"),n!==void 0)return i1(ge(t,n));if(Yi(t)||ui(t)||ci(t)||qe(t)||mt(t))return t;if(He(t),t.$mobx)return t.$mobx;O(!1)}function V0(t,n){var e;return n!==void 0?e=ge(t,n):At(t)||qe(t)||mt(t)?e=i1(t):e=ge(t),e.name}var E2=Object.prototype.toString;function Zi(t,n,e){return e===void 0&&(e=-1),Hi(t,n,e)}function Hi(t,n,e,i,r){if(t===n)return t!==0||1/t===1/n;if(t==null||n==null)return!1;if(t!==t)return n!==n;var o=typeof t;if(o!=="function"&&o!=="object"&&typeof n!="object")return!1;t=N2(t),n=N2(n);var s=E2.call(t);if(s!==E2.call(n))return!1;switch(s){case"[object RegExp]":case"[object String]":return""+t==""+n;case"[object Number]":return+t!=+t?+n!=+n:+t==0?1/+t===1/n:+t==+n;case"[object Date]":case"[object Boolean]":return+t==+n;case"[object Symbol]":return typeof Symbol<"u"&&Symbol.valueOf.call(t)===Symbol.valueOf.call(n)}var a=s==="[object Array]";if(!a){if(typeof t!="object"||typeof n!="object")return!1;var h=t.constructor,D=n.constructor;if(h!==D&&!(typeof h=="function"&&h instanceof h&&typeof D=="function"&&D instanceof D)&&"constructor"in t&&"constructor"in n)return!1}if(e===0)return!1;e<0&&(e=-1),i=i||[],r=r||[];for(var T=i.length;T--;)if(i[T]===t)return r[T]===n;if(i.push(t),r.push(n),a){if(T=t.length,T!==n.length)return!1;for(;T--;)if(!Hi(t[T],n[T],e-1,i,r))return!1}else{var Y=Object.keys(t),De=void 0;if(T=Y.length,Object.keys(n).length!==T)return!1;for(;T--;)if(De=Y[T],!(j0(n,De)&&Hi(t[De],n[De],e-1,i,r)))return!1}return i.pop(),r.pop(),!0}function N2(t){return pi(t)?t.peek():pt(t)||qe(t)||Ot(t)||mt(t)?dt(t.entries()):t}function j0(t,n){return Object.prototype.hasOwnProperty.call(t,n)}(function(){function t(){}if(t.name!=="testCodeMinification"&&!1)var n})();var B0="$mobx";typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__=="object"&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({spy:p0,extras:{getDebugName:V0},$mobx:B0});var H0=t=>({$implicit:t});function $0(t,n){t&1&&(l(0,"span"),p(1,"loading..."),d())}var U0=["*"],gt=()=>({dontDetach:!0});function G0(t,n){if(t&1&&(Re(0),l(1,"div"),xn(2),d(),Pe()),t&2){let e=u();c(),Ie("height",e.getTotalHeight())}}function q0(t,n){if(t&1){let e=P();Re(0),l(1,"input",1),b("click",function(r){S(e);let o=u();return x(o.node.mouseAction("checkboxClick",r))}),d(),Pe()}if(t&2){let e=u();c(),f("checked",e.node.isSelected)("indeterminate",e.node.isPartiallySelected)}}function W0(t,n){if(t&1){let e=P();l(0,"span",3),b("click",function(r){S(e);let o=u(2);return x(o.node.mouseAction("expanderClick",r))}),C(1,"span",4),d()}if(t&2){let e=u(2);G("toggle-children-wrapper-expanded",e.node.isExpanded)("toggle-children-wrapper-collapsed",e.node.isCollapsed)}}function K0(t,n){t&1&&C(0,"span",5)}function Y0(t,n){if(t&1&&(Re(0),g(1,W0,2,4,"span",1)(2,K0,1,0,"span",2),Pe()),t&2){let e=u();c(),f("ngIf",e.node.hasChildren),c(),f("ngIf",!e.node.hasChildren)}}var X0=(t,n,e)=>({$implicit:t,node:n,index:e});function Q0(t,n){if(t&1&&(l(0,"span"),p(1),d()),t&2){let e=u();c(),F(e.node.displayField)}}var l1=(t,n,e,i)=>({$implicit:t,node:n,index:e,templates:i});function J0(t,n){if(t&1&&C(0,"tree-node-checkbox",4),t&2){let e=u(2);f("node",e.node)}}function Z0(t,n){if(t&1){let e=P();l(0,"div",2),g(1,J0,1,1,"tree-node-checkbox",3),C(2,"tree-node-expander",4),l(3,"div",5),b("click",function(r){S(e);let o=u();return x(o.node.mouseAction("click",r))})("dblclick",function(r){S(e);let o=u();return x(o.node.mouseAction("dblClick",r))})("mouseover",function(r){S(e);let o=u();return x(o.node.mouseAction("mouseOver",r))})("mouseout",function(r){S(e);let o=u();return x(o.node.mouseAction("mouseOut",r))})("contextmenu",function(r){S(e);let o=u();return x(o.node.mouseAction("contextMenu",r))})("treeDrop",function(r){S(e);let o=u();return x(o.node.onDrop(r))})("treeDropDragOver",function(r){S(e);let o=u();return x(o.node.mouseAction("dragOver",r))})("treeDropDragLeave",function(r){S(e);let o=u();return x(o.node.mouseAction("dragLeave",r))})("treeDropDragEnter",function(r){S(e);let o=u();return x(o.node.mouseAction("dragEnter",r))}),C(4,"tree-node-content",6),d()()}if(t&2){let e=u();Ie("padding-left",e.node.getNodePadding()),c(),f("ngIf",e.node.options.useCheckbox),c(),f("node",e.node),c(),G("node-content-wrapper-active",e.node.isActive)("node-content-wrapper-focused",e.node.isFocused),f("treeAllowDrop",e.node.allowDrop)("allowDragoverStyling",e.node.allowDragoverStyling())("treeDrag",e.node)("treeDragEnabled",e.node.allowDrag()),c(),f("node",e.node)("index",e.index)("template",e.templates.treeNodeTemplate)}}function er(t,n){if(t&1&&C(0,"tree-node-collection",4),t&2){let e=u(3);f("nodes",e.node.children)("templates",e.templates)("treeModel",e.node.treeModel)}}function tr(t,n){if(t&1&&C(0,"tree-loading-component",5),t&2){let e=u(3);Ie("padding-left",e.node.getNodePadding()),f("template",e.templates.loadingTemplate)("node",e.node)}}function ir(t,n){if(t&1&&(l(0,"div"),g(1,er,1,3,"tree-node-collection",2)(2,tr,1,4,"tree-loading-component",3),d()),t&2){let e=u(2);G("tree-children",!0)("tree-children-no-padding",e.node.options.levelPadding),c(),f("ngIf",e.node.children),c(),f("ngIf",!e.node.children)}}function nr(t,n){if(t&1&&(Re(0),g(1,ir,3,6,"div",1),Pe()),t&2){let e=u();c(),f("treeAnimateOpen",e.node.isExpanded)("treeAnimateOpenSpeed",e.node.options.animateSpeed)("treeAnimateOpenAcceleration",e.node.options.animateAcceleration)("treeAnimateOpenEnabled",e.node.options.animateExpand)}}function rr(t,n){if(t&1&&C(0,"tree-node",2),t&2){let e=n.$implicit,i=n.index,r=u(2);f("node",e)("index",i)("templates",r.templates)}}function or(t,n){if(t&1&&(Re(0),l(1,"div"),g(2,rr,1,3,"tree-node",1),d(),Pe()),t&2){let e=u();c(),Ie("margin-top",e.marginTop),c(),f("ngForOf",e.viewportNodes)("ngForTrackBy",e.trackNode)}}function sr(t,n){if(t&1&&C(0,"tree-node-drop-slot",6),t&2){let e=u(3);f("dropIndex",e.node.index)("node",e.node.parent)}}function ar(t,n){if(t&1&&(l(0,"div"),g(1,sr,1,2,"tree-node-drop-slot",3),C(2,"tree-node-wrapper",4)(3,"tree-node-children",5)(4,"tree-node-drop-slot",6),d()),t&2){let e=u(2);Cn(e.node.getClass()),G("tree-node",!0)("tree-node-expanded",e.node.isExpanded&&e.node.hasChildren)("tree-node-collapsed",e.node.isCollapsed&&e.node.hasChildren)("tree-node-leaf",e.node.isLeaf)("tree-node-active",e.node.isActive)("tree-node-focused",e.node.isFocused),c(),f("ngIf",e.index===0),c(),f("node",e.node)("index",e.index)("templates",e.templates),c(),f("node",e.node)("templates",e.templates),c(),f("dropIndex",e.node.index+1)("node",e.node.parent)}}function cr(t,n){if(t&1&&(Re(0),g(1,ar,5,22,"div",1),ye(2,2),Pe()),t&2){let e=u();c(),f("ngIf",!e.templates.treeNodeFullTemplate),c(),f("ngTemplateOutlet",e.templates.treeNodeFullTemplate)("ngTemplateOutletContext",jt(3,l1,e.node,e.node,e.index,e.templates))}}var lr=["loadingTemplate"],dr=["treeNodeTemplate"],fr=["treeNodeWrapperTemplate"],ur=["treeNodeFullTemplate"],pr=["viewport"],hr=(t,n,e,i)=>({loadingTemplate:t,treeNodeTemplate:n,treeNodeWrapperTemplate:e,treeNodeFullTemplate:i});function mr(t,n){if(t&1&&C(0,"tree-node-collection",4),t&2){let e=u();f("nodes",e.treeModel.roots)("treeModel",e.treeModel)("templates",jt(3,hr,e.loadingTemplate,e.treeNodeTemplate,e.treeNodeWrapperTemplate,e.treeNodeFullTemplate))}}function vr(t,n){if(t&1&&C(0,"tree-node-drop-slot",5),t&2){let e=u();f("dropIndex",0)("node",e.treeModel.virtualRoot)}}var bt=(()=>{class t{constructor(e,i){this.templateRef=e,this.viewContainer=i,this.templateBindings={}}ngOnInit(){this.view=this.viewContainer.createEmbeddedView(this.templateRef),this.dispose&&this.dispose(),this.shouldDetach()&&this.view.detach(),this.autoDetect(this.view)}shouldDetach(){return this.treeMobxAutorun&&this.treeMobxAutorun.detach}autoDetect(e){this.dispose=zt(()=>e.detectChanges())}ngOnDestroy(){this.dispose&&this.dispose()}static{this.\u0275fac=function(i){return new(i||t)(v(Li),v(Ai))}}static{this.\u0275dir=Te({type:t,selectors:[["","treeMobxAutorun",""]],inputs:{treeMobxAutorun:"treeMobxAutorun"}})}}return t})(),$={LEFT:37,UP:38,RIGHT:39,DOWN:40,ENTER:13,SPACE:32,CONTEXT_MENU:32},z={TOGGLE_ACTIVE:(t,n,e)=>n&&n.toggleActivated(),TOGGLE_ACTIVE_MULTI:(t,n,e)=>n&&n.toggleActivated(!0),TOGGLE_SELECTED:(t,n,e)=>n&&n.toggleSelected(),ACTIVATE:(t,n,e)=>n.setIsActive(!0),DEACTIVATE:(t,n,e)=>n.setIsActive(!1),SELECT:(t,n,e)=>n.setIsSelected(!0),DESELECT:(t,n,e)=>n.setIsSelected(!1),FOCUS:(t,n,e)=>n.focus(),TOGGLE_EXPANDED:(t,n,e)=>n.hasChildren&&n.toggleExpanded(),EXPAND:(t,n,e)=>n.expand(),COLLAPSE:(t,n,e)=>n.collapse(),DRILL_DOWN:(t,n,e)=>t.focusDrillDown(),DRILL_UP:(t,n,e)=>t.focusDrillUp(),NEXT_NODE:(t,n,e)=>t.focusNextNode(),PREVIOUS_NODE:(t,n,e)=>t.focusPreviousNode(),MOVE_NODE:(t,n,e,{from:i,to:r})=>{e.ctrlKey?t.copyNode(i,r):t.moveNode(i,r)}},vt={mouse:{click:z.TOGGLE_ACTIVE,dblClick:null,contextMenu:null,expanderClick:z.TOGGLE_EXPANDED,checkboxClick:z.TOGGLE_SELECTED,drop:z.MOVE_NODE},keys:{[$.RIGHT]:z.DRILL_DOWN,[$.LEFT]:z.DRILL_UP,[$.DOWN]:z.NEXT_NODE,[$.UP]:z.PREVIOUS_NODE,[$.SPACE]:z.TOGGLE_ACTIVE,[$.ENTER]:z.TOGGLE_ACTIVE}},bi=class{get hasChildrenField(){return this.options.hasChildrenField||"hasChildren"}get childrenField(){return this.options.childrenField||"children"}get displayField(){return this.options.displayField||"name"}get idField(){return this.options.idField||"id"}get isExpandedField(){return this.options.isExpandedField||"isExpanded"}get getChildren(){return this.options.getChildren}get levelPadding(){return this.options.levelPadding||0}get useVirtualScroll(){return this.options.useVirtualScroll}get animateExpand(){return this.options.animateExpand}get animateSpeed(){return this.options.animateSpeed||1}get animateAcceleration(){return this.options.animateAcceleration||1.2}get scrollOnActivate(){return this.options.scrollOnActivate===void 0?!0:this.options.scrollOnActivate}get rtl(){return!!this.options.rtl}get rootId(){return this.options.rootId}get useCheckbox(){return this.options.useCheckbox}get useTriState(){return this.options.useTriState===void 0?!0:this.options.useTriState}get scrollContainer(){return this.options.scrollContainer}get allowDragoverStyling(){return this.options.allowDragoverStyling===void 0?!0:this.options.allowDragoverStyling}constructor(n={}){this.options=n,this.actionMapping={mouse:{click:this.options?.actionMapping?.mouse?.click??vt.mouse.click,dblClick:this.options?.actionMapping?.mouse?.dblClick??vt.mouse.dblClick,contextMenu:this.options?.actionMapping?.mouse?.contextMenu??vt.mouse.contextMenu,expanderClick:this.options?.actionMapping?.mouse?.expanderClick??vt.mouse.expanderClick,checkboxClick:this.options?.actionMapping?.mouse?.checkboxClick??vt.mouse.checkboxClick,drop:this.options?.actionMapping?.mouse?.drop??vt.mouse.drop,dragStart:this.options?.actionMapping?.mouse?.dragStart??void 0,drag:this.options?.actionMapping?.mouse?.drag??void 0,dragEnd:this.options?.actionMapping?.mouse?.dragEnd??void 0,dragOver:this.options?.actionMapping?.mouse?.dragOver??void 0,dragLeave:this.options?.actionMapping?.mouse?.dragLeave??void 0,dragEnter:this.options?.actionMapping?.mouse?.dragEnter??void 0,mouseOver:this.options?.actionMapping?.mouse?.mouseOver??void 0,mouseOut:this.options?.actionMapping?.mouse?.mouseOut??void 0},keys:{[$.RIGHT]:z.DRILL_DOWN,[$.LEFT]:z.DRILL_UP,[$.DOWN]:z.NEXT_NODE,[$.UP]:z.PREVIOUS_NODE,[$.SPACE]:z.TOGGLE_ACTIVE,[$.ENTER]:z.TOGGLE_ACTIVE}},this.options?.actionMapping?.keys&&(this.actionMapping.keys=Q(Q({},this.actionMapping.keys),this.options.actionMapping.keys)),n.rtl&&(this.actionMapping.keys[$.RIGHT]=n.actionMapping?.keys[$.RIGHT]||z.DRILL_UP,this.actionMapping.keys[$.LEFT]=n.actionMapping?.keys[$.LEFT]||z.DRILL_DOWN)}getNodeClone(n){if(this.options.getNodeClone)return this.options.getNodeClone(n);let e=Object.assign({},n.data);return e.id&&delete e.id,e}allowDrop(n,e,i){return this.options.allowDrop instanceof Function?this.options.allowDrop(n,e,i):this.options.allowDrop===void 0?!0:this.options.allowDrop}allowDrag(n){return this.options.allowDrag instanceof Function?this.options.allowDrag(n):this.options.allowDrag}nodeClass(n){return this.options.nodeClass?this.options.nodeClass(n):""}nodeHeight(n){if(n.data.virtual)return 0;let e=this.options.nodeHeight||22;return typeof e=="function"&&(e=e(n)),e+(n.index===0?2:1)*this.dropSlotHeight}get dropSlotHeight(){return typeof this.options.dropSlotHeight=="number"?this.options.dropSlotHeight:2}},R={toggleExpanded:"toggleExpanded",activate:"activate",deactivate:"deactivate",nodeActivate:"nodeActivate",nodeDeactivate:"nodeDeactivate",select:"select",deselect:"deselect",focus:"focus",blur:"blur",initialized:"initialized",updateData:"updateData",moveNode:"moveNode",copyNode:"copyNode",event:"event",loadNodeChildren:"loadNodeChildren",changeFilter:"changeFilter",stateChange:"stateChange"},U=function(t,n,e,i){var r=arguments.length,o=r<3?n:i===null?i=Object.getOwnPropertyDescriptor(n,e):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,n,e,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(n,e,o):s(n,e))||o);return r>3&&o&&Object.defineProperty(n,e,o),o},k=class t{get isHidden(){return this.treeModel.isHidden(this)}get isExpanded(){return this.treeModel.isExpanded(this)}get isActive(){return this.treeModel.isActive(this)}get isFocused(){return this.treeModel.isNodeFocused(this)}get isSelected(){return this.isSelectable()?this.treeModel.isSelected(this):this.children.some(n=>n.isSelected)}get isAllSelected(){return this.isSelectable()?this.treeModel.isSelected(this):this.children.every(n=>n.isAllSelected)}get isPartiallySelected(){return this.isSelected&&!this.isAllSelected}get level(){return this.parent?this.parent.level+1:0}get path(){return this.parent?[...this.parent.path,this.id]:[]}get elementRef(){throw`Element Ref is no longer supported since introducing virtual scroll
17
-
18
- You may use a template to obtain a reference to the element`}get originalNode(){return this._originalNode}constructor(n,e,i,r){this.data=n,this.parent=e,this.treeModel=i,this.position=0,this.allowDrop=(o,s)=>this.options.allowDrop(o,{parent:this,index:0},s),this.allowDragoverStyling=()=>this.options.allowDragoverStyling,(this.id===void 0||this.id===null)&&(this.id=gr()),this.index=r,this.getField("children")&&this._initChildren(),this.autoLoadChildren()}get hasChildren(){return!!(this.getField("hasChildren")||this.children&&this.children.length>0)}get isCollapsed(){return!this.isExpanded}get isLeaf(){return!this.hasChildren}get isRoot(){return this.parent.data.virtual}get realParent(){return this.isRoot?null:this.parent}get options(){return this.treeModel.options}fireEvent(n){this.treeModel.fireEvent(n)}get displayField(){return this.getField("display")}get id(){return this.getField("id")}set id(n){this.setField("id",n)}getField(n){return this.data[this.options[`${n}Field`]]}setField(n,e){this.data[this.options[`${n}Field`]]=e}_findAdjacentSibling(n,e=!1){let i=this._getParentsChildren(e),r=i.indexOf(this);return i.length>r+n?i[r+n]:null}findNextSibling(n=!1){return this._findAdjacentSibling(1,n)}findPreviousSibling(n=!1){return this._findAdjacentSibling(-1,n)}getVisibleChildren(){return this.visibleChildren}get visibleChildren(){return(this.children||[]).filter(n=>!n.isHidden)}getFirstChild(n=!1){let e=n?this.visibleChildren:this.children;return e!=null&&e.length?e[0]:null}getLastChild(n=!1){let e=n?this.visibleChildren:this.children;return e!=null&&e.length?e[e.length-1]:null}findNextNode(n=!0,e=!1){return n&&this.isExpanded&&this.getFirstChild(e)||this.findNextSibling(e)||this.parent&&this.parent.findNextNode(!1,e)}findPreviousNode(n=!1){let e=this.findPreviousSibling(n);return e?e._getLastOpenDescendant(n):this.realParent}_getLastOpenDescendant(n=!1){let e=this.getLastChild(n);return this.isCollapsed||!e?this:e._getLastOpenDescendant(n)}_getParentsChildren(n=!1){return this.parent&&(n?this.parent.getVisibleChildren():this.parent.children)||[]}getIndexInParent(n=!1){return this._getParentsChildren(n).indexOf(this)}isDescendantOf(n){return this===n?!0:this.parent&&this.parent.isDescendantOf(n)}getNodePadding(){return this.options.levelPadding*(this.level-1)+"px"}getClass(){return[this.options.nodeClass(this),`tree-node-level-${this.level}`].join(" ")}onDrop(n){this.mouseAction("drop",n.event,{from:n.element,to:{parent:this,index:0,dropOnNode:!0}})}allowDrag(){return this.options.allowDrag(this)}loadNodeChildren(){return this.options.getChildren?Promise.resolve(this.options.getChildren(this)).then(n=>{n&&(this.setField("children",n),this._initChildren(),this.options.useTriState&&this.treeModel.isSelected(this)&&this.setIsSelected(!0),this.children.forEach(e=>{e.getField("isExpanded")&&e.hasChildren&&e.expand()}))}).then(()=>{this.fireEvent({eventName:R.loadNodeChildren,node:this})}):Promise.resolve()}expand(){return this.isExpanded||this.toggleExpanded(),this}collapse(){return this.isExpanded&&this.toggleExpanded(),this}doForAll(n){Promise.resolve(n(this)).then(()=>{this.children&&this.children.forEach(e=>e.doForAll(n))})}expandAll(){this.doForAll(n=>n.expand())}collapseAll(){this.doForAll(n=>n.collapse())}ensureVisible(){return this.realParent&&(this.realParent.expand(),this.realParent.ensureVisible()),this}toggleExpanded(){return this.setIsExpanded(!this.isExpanded),this}setIsExpanded(n){return this.hasChildren&&this.treeModel.setExpandedNode(this,n),this}autoLoadChildren(){this.handler=Ge(()=>this.isExpanded,n=>{!this.children&&this.hasChildren&&n&&this.loadNodeChildren()},{fireImmediately:!0})}dispose(){this.children&&this.children.forEach(n=>n.dispose()),this.handler&&this.handler(),this.parent=null,this.children=null}setIsActive(n,e=!1){return this.treeModel.setActiveNode(this,n,e),n&&this.focus(this.options.scrollOnActivate),this}isSelectable(){return this.isLeaf||!this.children||!this.options.useTriState}setIsSelected(n){return this.isSelectable()?this.treeModel.setSelectedNode(this,n):this.visibleChildren.forEach(e=>e.setIsSelected(n)),this}toggleSelected(){return this.setIsSelected(!this.isSelected),this}toggleActivated(n=!1){return this.setIsActive(!this.isActive,n),this}setActiveAndVisible(n=!1){return this.setIsActive(!0,n).ensureVisible(),setTimeout(this.scrollIntoView.bind(this)),this}scrollIntoView(n=!1){this.treeModel.virtualScroll.scrollIntoView(this,n)}focus(n=!0){let e=this.treeModel.getFocusedNode();return this.treeModel.setFocusedNode(this),n&&this.scrollIntoView(),e&&this.fireEvent({eventName:R.blur,node:e}),this.fireEvent({eventName:R.focus,node:this}),this}blur(){let n=this.treeModel.getFocusedNode();return this.treeModel.setFocusedNode(null),n&&this.fireEvent({eventName:R.blur,node:this}),this}setIsHidden(n){this.treeModel.setIsHidden(this,n)}hide(){this.setIsHidden(!0)}show(){this.setIsHidden(!1)}mouseAction(n,e,i=null){this.treeModel.setFocus(!0);let o=this.options.actionMapping.mouse[n];o&&o(this.treeModel,this,e,i)}getSelfHeight(){return this.options.nodeHeight(this)}_initChildren(){this.children=this.getField("children").map((n,e)=>new t(n,this,this.treeModel,e))}};U([I],k.prototype,"isHidden",null);U([I],k.prototype,"isExpanded",null);U([I],k.prototype,"isActive",null);U([I],k.prototype,"isFocused",null);U([I],k.prototype,"isSelected",null);U([I],k.prototype,"isAllSelected",null);U([I],k.prototype,"isPartiallySelected",null);U([E],k.prototype,"children",void 0);U([E],k.prototype,"index",void 0);U([E],k.prototype,"position",void 0);U([E],k.prototype,"height",void 0);U([I],k.prototype,"level",null);U([I],k.prototype,"path",null);U([I],k.prototype,"visibleChildren",null);U([N],k.prototype,"setIsSelected",null);U([N],k.prototype,"_initChildren",null);function gr(){return Math.floor(Math.random()*1e13)}var M=function(t,n,e,i){var r=arguments.length,o=r<3?n:i===null?i=Object.getOwnPropertyDescriptor(n,e):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,n,e,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(n,e,o):s(n,e))||o);return r>3&&o&&Object.defineProperty(n,e,o),o},_=(()=>{class t{constructor(){this.options=new bi,this.eventNames=Object.keys(R),this.expandedNodeIds={},this.selectedLeafNodeIds={},this.activeNodeIds={},this.hiddenNodeIds={},this.focusedNodeId=null,this.firstUpdate=!0,this.subscriptions=[]}static{this.focusedTree=null}fireEvent(e){e.treeModel=this,this.events[e.eventName].emit(e),this.events.event.emit(e)}subscribe(e,i){let r=this.events[e].subscribe(i);this.subscriptions.push(r)}getFocusedNode(){return this.focusedNode}getActiveNode(){return this.activeNodes[0]}getActiveNodes(){return this.activeNodes}getVisibleRoots(){return this.virtualRoot.visibleChildren}getFirstRoot(e=!1){let i=e?this.getVisibleRoots():this.roots;return i!=null&&i.length?i[0]:null}getLastRoot(e=!1){let i=e?this.getVisibleRoots():this.roots;return i!=null&&i.length?i[i.length-1]:null}get isFocused(){return t.focusedTree===this}isNodeFocused(e){return this.focusedNode===e}isEmptyTree(){return this.roots&&this.roots.length===0}get focusedNode(){return this.focusedNodeId?this.getNodeById(this.focusedNodeId):null}get expandedNodes(){return Object.keys(this.expandedNodeIds).filter(i=>this.expandedNodeIds[i]).map(i=>this.getNodeById(i)).filter(Boolean)}get activeNodes(){return Object.keys(this.activeNodeIds).filter(i=>this.activeNodeIds[i]).map(i=>this.getNodeById(i)).filter(Boolean)}get hiddenNodes(){return Object.keys(this.hiddenNodeIds).filter(i=>this.hiddenNodeIds[i]).map(i=>this.getNodeById(i)).filter(Boolean)}get selectedLeafNodes(){return Object.keys(this.selectedLeafNodeIds).filter(i=>this.selectedLeafNodeIds[i]).map(i=>this.getNodeById(i)).filter(Boolean)}getNodeByPath(e,i=null){if(!e)return null;if(i=i||this.virtualRoot,e.length===0)return i;if(!i.children)return null;let r=e.shift(),o=i.children.find(s=>s.id===r);return o?this.getNodeByPath(e,o):null}getNodeById(e){let i=e.toString();return this.getNodeBy(r=>r.id.toString()===i)}getNodeBy(e,i=null){if(i=i||this.virtualRoot,!i.children)return null;let r=i.children.find(e);if(r)return r;for(let o of i.children){let s=this.getNodeBy(e,o);if(s)return s}}isExpanded(e){return this.expandedNodeIds[e.id]}isHidden(e){return this.hiddenNodeIds[e.id]}isActive(e){return this.activeNodeIds[e.id]}isSelected(e){return this.selectedLeafNodeIds[e.id]}ngOnDestroy(){this.dispose(),this.unsubscribeAll()}dispose(){this.virtualRoot&&this.virtualRoot.dispose()}unsubscribeAll(){this.subscriptions.forEach(e=>e.unsubscribe()),this.subscriptions=[]}setData({nodes:e,options:i=null,events:r=null}){i&&(this.options=new bi(i)),r&&(this.events=r),e&&(this.nodes=e),this.update()}update(){let e={id:this.options.rootId,virtual:!0,[this.options.childrenField]:this.nodes};this.dispose(),this.virtualRoot=new k(e,null,this,0),this.roots=this.virtualRoot.children,this.firstUpdate?this.roots&&(this.firstUpdate=!1,this._calculateExpandedNodes()):this.fireEvent({eventName:R.updateData})}setFocusedNode(e){this.focusedNodeId=e?e.id:null}setFocus(e){t.focusedTree=e?this:null}doForAll(e){this.roots.forEach(i=>i.doForAll(e))}focusNextNode(){let e=this.getFocusedNode(),i=e?e.findNextNode(!0,!0):this.getFirstRoot(!0);i&&i.focus()}focusPreviousNode(){let e=this.getFocusedNode(),i=e?e.findPreviousNode(!0):this.getLastRoot(!0);i&&i.focus()}focusDrillDown(){let e=this.getFocusedNode();if(e&&e.isCollapsed&&e.hasChildren)e.toggleExpanded();else{let i=e?e.getFirstChild(!0):this.getFirstRoot(!0);i&&i.focus()}}focusDrillUp(){let e=this.getFocusedNode();if(e)if(e.isExpanded)e.toggleExpanded();else{let i=e.realParent;i&&i.focus()}}setActiveNode(e,i,r=!1){r?this._setActiveNodeMulti(e,i):this._setActiveNodeSingle(e,i),i?(e.focus(this.options.scrollOnActivate),this.fireEvent({eventName:R.activate,node:e}),this.fireEvent({eventName:R.nodeActivate,node:e})):(this.fireEvent({eventName:R.deactivate,node:e}),this.fireEvent({eventName:R.nodeDeactivate,node:e}))}setSelectedNode(e,i){this.selectedLeafNodeIds=Object.assign({},this.selectedLeafNodeIds,{[e.id]:i}),i?(e.focus(),this.fireEvent({eventName:R.select,node:e})):this.fireEvent({eventName:R.deselect,node:e})}setExpandedNode(e,i){this.expandedNodeIds=Object.assign({},this.expandedNodeIds,{[e.id]:i}),this.fireEvent({eventName:R.toggleExpanded,node:e,isExpanded:i})}expandAll(){this.roots.forEach(e=>e.expandAll())}collapseAll(){this.roots.forEach(e=>e.collapseAll())}setIsHidden(e,i){this.hiddenNodeIds=Object.assign({},this.hiddenNodeIds,{[e.id]:i})}setHiddenNodeIds(e){this.hiddenNodeIds=e.reduce((i,r)=>Object.assign(i,{[r]:!0}),{})}performKeyAction(e,i){let r=this.options.actionMapping.keys[i.keyCode];return r?(i.preventDefault(),r(this,e,i),!0):!1}filterNodes(e,i=!0){let r;if(!e)return this.clearFilter();if(e&&typeof e.valueOf()=="string")r=s=>s.displayField.toLowerCase().indexOf(e.toLowerCase())!==-1;else if(e&&typeof e=="function")r=e;else{console.error("Don't know what to do with filter",e),console.error("Should be either a string or function");return}let o={};this.roots.forEach(s=>this._filterNode(o,s,r,i)),this.hiddenNodeIds=o,this.fireEvent({eventName:R.changeFilter})}clearFilter(){this.hiddenNodeIds={},this.fireEvent({eventName:R.changeFilter})}moveNode(e,i){let r=e.getIndexInParent(),o=e.parent;if(!this.canMoveNode(e,i,r))return;let s=o.getField("children");i.parent.getField("children")||i.parent.setField("children",[]);let a=i.parent.getField("children"),h=s.splice(r,1)[0],D=o===i.parent&&i.index>r?i.index-1:i.index;a.splice(D,0,h),o.treeModel.update(),i.parent.treeModel!==o.treeModel&&i.parent.treeModel.update(),this.fireEvent({eventName:R.moveNode,node:h,to:{parent:i.parent.data,index:D},from:{parent:o.data,index:r}})}copyNode(e,i){let r=e.getIndexInParent();if(!this.canMoveNode(e,i,r))return;i.parent.getField("children")||i.parent.setField("children",[]);let o=i.parent.getField("children"),s=this.options.getNodeClone(e);o.splice(i.index,0,s),e.treeModel.update(),i.parent.treeModel!==e.treeModel&&i.parent.treeModel.update(),this.fireEvent({eventName:R.copyNode,node:s,to:{parent:i.parent.data,index:i.index}})}getState(){return{expandedNodeIds:this.expandedNodeIds,selectedLeafNodeIds:this.selectedLeafNodeIds,activeNodeIds:this.activeNodeIds,hiddenNodeIds:this.hiddenNodeIds,focusedNodeId:this.focusedNodeId}}setState(e){e&&Object.assign(this,{expandedNodeIds:e.expandedNodeIds||{},selectedLeafNodeIds:e.selectedLeafNodeIds||{},activeNodeIds:e.activeNodeIds||{},hiddenNodeIds:e.hiddenNodeIds||{},focusedNodeId:e.focusedNodeId})}subscribeToState(e){zt(()=>e(this.getState()))}canMoveNode(e,i,r=void 0){let o=r||e.getIndexInParent();return e.parent===i.parent&&r===i.index?!1:!i.parent.isDescendantOf(e)}calculateExpandedNodes(){this._calculateExpandedNodes()}_filterNode(e,i,r,o){let s=r(i);return i.children&&i.children.forEach(a=>{this._filterNode(e,a,r,o)&&(s=!0)}),s||(e[i.id]=!0),o&&s&&i.ensureVisible(),s}_calculateExpandedNodes(e=null){e=e||this.virtualRoot,e.data[this.options.isExpandedField]&&(this.expandedNodeIds=Object.assign({},this.expandedNodeIds,{[e.id]:!0})),e.children&&e.children.forEach(i=>this._calculateExpandedNodes(i))}_setActiveNodeSingle(e,i){this.activeNodes.filter(r=>r!==e).forEach(r=>{this.fireEvent({eventName:R.deactivate,node:r}),this.fireEvent({eventName:R.nodeDeactivate,node:r})}),i?this.activeNodeIds={[e.id]:!0}:this.activeNodeIds={}}_setActiveNodeMulti(e,i){this.activeNodeIds=Object.assign({},this.activeNodeIds,{[e.id]:i})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=_e({token:t,factory:t.\u0275fac})}}return t})();M([E],_.prototype,"roots",void 0);M([E],_.prototype,"expandedNodeIds",void 0);M([E],_.prototype,"selectedLeafNodeIds",void 0);M([E],_.prototype,"activeNodeIds",void 0);M([E],_.prototype,"hiddenNodeIds",void 0);M([E],_.prototype,"focusedNodeId",void 0);M([E],_.prototype,"virtualRoot",void 0);M([I],_.prototype,"focusedNode",null);M([I],_.prototype,"expandedNodes",null);M([I],_.prototype,"activeNodes",null);M([I],_.prototype,"hiddenNodes",null);M([I],_.prototype,"selectedLeafNodes",null);M([N],_.prototype,"setData",null);M([N],_.prototype,"update",null);M([N],_.prototype,"setFocusedNode",null);M([N],_.prototype,"setFocus",null);M([N],_.prototype,"doForAll",null);M([N],_.prototype,"focusNextNode",null);M([N],_.prototype,"focusPreviousNode",null);M([N],_.prototype,"focusDrillDown",null);M([N],_.prototype,"focusDrillUp",null);M([N],_.prototype,"setActiveNode",null);M([N],_.prototype,"setSelectedNode",null);M([N],_.prototype,"setExpandedNode",null);M([N],_.prototype,"expandAll",null);M([N],_.prototype,"collapseAll",null);M([N],_.prototype,"setIsHidden",null);M([N],_.prototype,"setHiddenNodeIds",null);M([N],_.prototype,"filterNodes",null);M([N],_.prototype,"clearFilter",null);M([N],_.prototype,"moveNode",null);M([N],_.prototype,"copyNode",null);M([N],_.prototype,"setState",null);var en=(()=>{class t{constructor(){this._draggedElement=null}set(e){this._draggedElement=e}get(){return this._draggedElement}isDragging(){return!!this.get()}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=_e({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})(),Ce=function(t,n,e,i){var r=arguments.length,o=r<3?n:i===null?i=Object.getOwnPropertyDescriptor(n,e):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,n,e,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(n,e,o):s(n,e))||o);return r>3&&o&&Object.defineProperty(n,e,o),o},n1=500,vi=150,re=(()=>{class t{get y(){return this.yBlocks*vi}get totalHeight(){return this.treeModel.virtualRoot?this.treeModel.virtualRoot.height:0}constructor(e){this.treeModel=e,this.yBlocks=0,this.x=0,this.viewportHeight=null,this.viewport=null,e.virtualScroll=this,this._dispose=[zt(()=>this.fixScroll())]}fireEvent(e){this.treeModel.fireEvent(e)}init(){let e=this.recalcPositions.bind(this);e(),this._dispose=[...this._dispose,Ge(()=>this.treeModel.roots,e),Ge(()=>this.treeModel.expandedNodeIds,e),Ge(()=>this.treeModel.hiddenNodeIds,e)],this.treeModel.subscribe(R.loadNodeChildren,e)}isEnabled(){return this.treeModel.options.useVirtualScroll}_setYBlocks(e){this.yBlocks=e}recalcPositions(){this.treeModel.virtualRoot.height=this._getPositionAfter(this.treeModel.getVisibleRoots(),0)}_getPositionAfter(e,i){let r=i;return e.forEach(o=>{o.position=r,r=this._getPositionAfterNode(o,r)}),r}_getPositionAfterNode(e,i){let r=e.getSelfHeight()+i;return e.children&&e.isExpanded&&(r=this._getPositionAfter(e.visibleChildren,r)),e.height=r-i,r}clear(){this._dispose.forEach(e=>e())}setViewport(e){Object.assign(this,{viewport:e,x:e.scrollLeft,yBlocks:Math.round(e.scrollTop/vi),viewportHeight:e.getBoundingClientRect?e.getBoundingClientRect().height:0})}scrollIntoView(e,i,r=!0){if(e.options.scrollContainer){let o=e.options.scrollContainer,s=o.getBoundingClientRect().height,a=o.getBoundingClientRect().top,h=this.viewport.getBoundingClientRect().top+e.position-a;(i||h<o.scrollTop||h+e.getSelfHeight()>o.scrollTop+s)&&(o.scrollTop=r?h-s/2:h)}else(i||e.position<this.y||e.position+e.getSelfHeight()>this.y+this.viewportHeight)&&this.viewport&&(this.viewport.scrollTop=r?e.position-this.viewportHeight/2:e.position,this._setYBlocks(Math.floor(this.viewport.scrollTop/vi)))}getViewportNodes(e){if(!e)return[];let i=e.filter(h=>!h.isHidden);if(!this.isEnabled())return i;if(!this.viewportHeight||!i.length)return[];let r=i.slice(-1)[0];if(!r.height&&r.position===0)return[];let o=r1(i,h=>h.position+n1>this.y||h.position+h.height>this.y),s=r1(i,h=>h.position-n1>this.y+this.viewportHeight,o),a=[];for(let h=o;h<=s;h++)a.push(i[h]);return a}fixScroll(){let e=Math.max(0,this.totalHeight-this.viewportHeight);this.y<0&&this._setYBlocks(0),this.y>e&&this._setYBlocks(e/vi)}static{this.\u0275fac=function(i){return new(i||t)(X(_))}}static{this.\u0275prov=_e({token:t,factory:t.\u0275fac})}}return t})();Ce([E],re.prototype,"yBlocks",void 0);Ce([E],re.prototype,"x",void 0);Ce([E],re.prototype,"viewportHeight",void 0);Ce([I],re.prototype,"y",null);Ce([I],re.prototype,"totalHeight",null);Ce([N],re.prototype,"_setYBlocks",null);Ce([N],re.prototype,"recalcPositions",null);Ce([N],re.prototype,"setViewport",null);Ce([N],re.prototype,"scrollIntoView",null);function r1(t,n,e=0){let i=e,r=t.length-1;for(;i!==r;){let o=Math.floor((i+r)/2);n(t[o])?r=o:i===o?i=r:i=o}return i}var br=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=w({type:t,selectors:[["tree-loading-component"]],inputs:{template:"template",node:"node"},decls:2,vars:5,consts:[[4,"ngIf"],[3,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(i,r){i&1&&(g(0,$0,2,0,"span",0),ye(1,1)),i&2&&(f("ngIf",!r.template),c(),f("ngTemplateOutlet",r.template)("ngTemplateOutletContext",_t(3,H0,r.node)))},dependencies:[Ee,ke],encapsulation:2})}}return t})(),Cr=(()=>{class t{constructor(e,i){this.elementRef=e,this.virtualScroll=i,this.setViewport=this.throttle(()=>{this.virtualScroll.setViewport(this.elementRef.nativeElement)},17),this.scrollEventHandler=this.setViewport.bind(this)}ngOnInit(){this.virtualScroll.init()}ngAfterViewInit(){setTimeout(()=>{this.setViewport(),this.virtualScroll.fireEvent({eventName:R.initialized})}),this.elementRef.nativeElement.addEventListener("scroll",this.scrollEventHandler)}ngOnDestroy(){this.virtualScroll.clear(),this.elementRef.nativeElement.removeEventListener("scroll",this.scrollEventHandler)}getTotalHeight(){return this.virtualScroll.isEnabled()&&this.virtualScroll.totalHeight+"px"||"auto"}throttle(e,i){let r=0;return function(){let o=Date.now();o-r>=i&&(e(),r=o)}}static{this.\u0275fac=function(i){return new(i||t)(v(Xe),v(re))}}static{this.\u0275cmp=w({type:t,selectors:[["tree-viewport"]],features:[Oi([re])],ngContentSelectors:U0,decls:1,vars:2,consts:[[4,"treeMobxAutorun"]],template:function(i,r){i&1&&(Sn(),g(0,G0,3,2,"ng-container",0)),i&2&&f("treeMobxAutorun",Fe(1,gt))},dependencies:[bt],encapsulation:2})}}return t})();function _r(...t){return N(...t)}var yr=Object.assign(_r,N);function Sr(...t){return I(...t)}var xr=Object.assign(Sr,I);function Er(...t){return E(...t)}var o1=Object.assign(Er,E),s1="is-dragging-over",a1="is-dragging-over-disabled",d1=(()=>{class t{set treeAllowDrop(e){e instanceof Function?this._allowDrop=e:this._allowDrop=(i,r)=>e}allowDrop(e){return this._allowDrop(this.treeDraggedElement.get(),e)}constructor(e,i,r,o){this.el=e,this.renderer=i,this.treeDraggedElement=r,this.ngZone=o,this.allowDragoverStyling=!0,this.onDropCallback=new B,this.onDragOverCallback=new B,this.onDragLeaveCallback=new B,this.onDragEnterCallback=new B,this._allowDrop=(s,a)=>!0,this.dragOverEventHandler=this.onDragOver.bind(this),this.dragEnterEventHandler=this.onDragEnter.bind(this),this.dragLeaveEventHandler=this.onDragLeave.bind(this)}ngAfterViewInit(){let e=this.el.nativeElement;this.ngZone.runOutsideAngular(()=>{e.addEventListener("dragover",this.dragOverEventHandler),e.addEventListener("dragenter",this.dragEnterEventHandler),e.addEventListener("dragleave",this.dragLeaveEventHandler)})}ngOnDestroy(){let e=this.el.nativeElement;e.removeEventListener("dragover",this.dragOverEventHandler),e.removeEventListener("dragenter",this.dragEnterEventHandler),e.removeEventListener("dragleave",this.dragLeaveEventHandler)}onDragOver(e){if(!this.allowDrop(e))return this.allowDragoverStyling?this.addDisabledClass():void 0;this.onDragOverCallback.emit({event:e,element:this.treeDraggedElement.get()}),e.preventDefault(),this.allowDragoverStyling&&this.addClass()}onDragEnter(e){this.allowDrop(e)&&(e.preventDefault(),this.onDragEnterCallback.emit({event:e,element:this.treeDraggedElement.get()}))}onDragLeave(e){if(!this.allowDrop(e))return this.allowDragoverStyling?this.removeDisabledClass():void 0;this.onDragLeaveCallback.emit({event:e,element:this.treeDraggedElement.get()}),this.allowDragoverStyling&&this.removeClass()}onDrop(e){this.allowDrop(e)&&(e.preventDefault(),this.onDropCallback.emit({event:e,element:this.treeDraggedElement.get()}),this.allowDragoverStyling&&this.removeClass(),this.treeDraggedElement.set(null))}addClass(){this.renderer.addClass(this.el.nativeElement,s1)}removeClass(){this.renderer.removeClass(this.el.nativeElement,s1)}addDisabledClass(){this.renderer.addClass(this.el.nativeElement,a1)}removeDisabledClass(){this.renderer.removeClass(this.el.nativeElement,a1)}static{this.\u0275fac=function(i){return new(i||t)(v(Xe),v(Qe),v(en),v(Ni))}}static{this.\u0275dir=Te({type:t,selectors:[["","treeDrop",""]],hostBindings:function(i,r){i&1&&b("drop",function(s){return r.onDrop(s)})},inputs:{allowDragoverStyling:"allowDragoverStyling",treeAllowDrop:"treeAllowDrop"},outputs:{onDropCallback:"treeDrop",onDragOverCallback:"treeDropDragOver",onDragLeaveCallback:"treeDropDragLeave",onDragEnterCallback:"treeDropDragEnter"}})}}return t})(),f1=(()=>{class t{onDrop(e){this.node.mouseAction("drop",e.event,{from:e.element,to:{parent:this.node,index:this.dropIndex}})}allowDrop(e,i){return this.node.options.allowDrop(e,{parent:this.node,index:this.dropIndex},i)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=w({type:t,selectors:[["TreeNodeDropSlot"],["tree-node-drop-slot"]],inputs:{node:"node",dropIndex:"dropIndex"},decls:1,vars:2,consts:[[1,"node-drop-slot",3,"treeDrop","treeAllowDrop","allowDragoverStyling"]],template:function(i,r){i&1&&(l(0,"div",0),b("treeDrop",function(s){return r.onDrop(s)}),d()),i&2&&f("treeAllowDrop",r.allowDrop.bind(r))("allowDragoverStyling",!0)},dependencies:[d1],encapsulation:2})}}return t})(),Nr=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=w({type:t,selectors:[["tree-node-checkbox"]],inputs:{node:"node"},decls:1,vars:2,consts:[[4,"treeMobxAutorun"],["type","checkbox",1,"tree-node-checkbox",3,"click","checked","indeterminate"]],template:function(i,r){i&1&&g(0,q0,2,2,"ng-container",0),i&2&&f("treeMobxAutorun",Fe(1,gt))},dependencies:[bt],encapsulation:2})}}return t})(),tn=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=w({type:t,selectors:[["tree-node-expander"]],inputs:{node:"node"},decls:1,vars:2,consts:[[4,"treeMobxAutorun"],["class","toggle-children-wrapper",3,"toggle-children-wrapper-expanded","toggle-children-wrapper-collapsed","click",4,"ngIf"],["class","toggle-children-placeholder",4,"ngIf"],[1,"toggle-children-wrapper",3,"click"],[1,"toggle-children"],[1,"toggle-children-placeholder"]],template:function(i,r){i&1&&g(0,Y0,3,2,"ng-container",0),i&2&&f("treeMobxAutorun",Fe(1,gt))},dependencies:[bt,Ee],encapsulation:2})}}return t})();var Mr=(()=>{class t{constructor(e,i,r,o){this.el=e,this.renderer=i,this.treeDraggedElement=r,this.ngZone=o,this.dragEventHandler=this.onDrag.bind(this)}ngAfterViewInit(){let e=this.el.nativeElement;this.ngZone.runOutsideAngular(()=>{e.addEventListener("drag",this.dragEventHandler)})}ngDoCheck(){this.renderer.setAttribute(this.el.nativeElement,"draggable",this.treeDragEnabled?"true":"false")}ngOnDestroy(){this.el.nativeElement.removeEventListener("drag",this.dragEventHandler)}onDragStart(e){e.dataTransfer.setData("text",e.target.id),this.treeDraggedElement.set(this.draggedElement),this.draggedElement.mouseAction&&this.draggedElement.mouseAction("dragStart",e)}onDrag(e){this.draggedElement.mouseAction&&this.draggedElement.mouseAction("drag",e)}onDragEnd(){this.draggedElement.mouseAction&&this.draggedElement.mouseAction("dragEnd"),this.treeDraggedElement.set(null)}static{this.\u0275fac=function(i){return new(i||t)(v(Xe),v(Qe),v(en),v(Ni))}}static{this.\u0275dir=Te({type:t,selectors:[["","treeDrag",""]],hostBindings:function(i,r){i&1&&b("dragstart",function(s){return r.onDragStart(s)})("dragend",function(){return r.onDragEnd()})},inputs:{draggedElement:[0,"treeDrag","draggedElement"],treeDragEnabled:"treeDragEnabled"}})}}return t})(),nn=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=w({type:t,selectors:[["tree-node-content"]],inputs:{node:"node",index:"index",template:"template"},decls:2,vars:7,consts:[[4,"ngIf"],[3,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(i,r){i&1&&(g(0,Q0,2,1,"span",0),ye(1,1)),i&2&&(f("ngIf",!r.template),c(),f("ngTemplateOutlet",r.template)("ngTemplateOutletContext",Nn(3,X0,r.node,r.node,r.index)))},dependencies:[Ee,ke],encapsulation:2})}}return t})(),Lr=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=w({type:t,selectors:[["tree-node-wrapper"]],inputs:{node:"node",index:"index",templates:"templates"},decls:2,vars:8,consts:[["class","node-wrapper",3,"padding-left",4,"ngIf"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"node-wrapper"],[3,"node",4,"ngIf"],[3,"node"],[1,"node-content-wrapper",3,"click","dblclick","mouseover","mouseout","contextmenu","treeDrop","treeDropDragOver","treeDropDragLeave","treeDropDragEnter","treeAllowDrop","allowDragoverStyling","treeDrag","treeDragEnabled"],[3,"node","index","template"]],template:function(i,r){i&1&&(g(0,Z0,5,15,"div",0),ye(1,1)),i&2&&(f("ngIf",!r.templates.treeNodeWrapperTemplate),c(),f("ngTemplateOutlet",r.templates.treeNodeWrapperTemplate)("ngTemplateOutletContext",jt(3,l1,r.node,r.node,r.index,r.templates)))},dependencies:[Ee,Nr,tn,Mr,d1,nn,ke],encapsulation:2})}}return t})(),c1=1.005,Ar=(()=>{class t{set isOpen(e){e?(this._show(),this.isEnabled&&this._isOpen===!1&&this._animateOpen()):this.isEnabled?this._animateClose():this._hide(),this._isOpen=!!e}constructor(e,i,r){this.renderer=e,this.templateRef=i,this.viewContainerRef=r}_show(){this.innerElement||(this.innerElement=this.viewContainerRef.createEmbeddedView(this.templateRef).rootNodes[0])}_hide(){this.viewContainerRef.clear(),this.innerElement=null}_animateOpen(){let e=this.animateSpeed,i=this.animateAcceleration,r=0;this.renderer.setStyle(this.innerElement,"max-height","0"),setTimeout(()=>{let o=setInterval(()=>{if(!this._isOpen||!this.innerElement)return clearInterval(o);r+=e;let s=Math.round(r);this.renderer.setStyle(this.innerElement,"max-height",`${s}px`);let a=this.innerElement.getBoundingClientRect?this.innerElement.getBoundingClientRect().height:0;e*=i,i*=c1,a<s&&(this.renderer.setStyle(this.innerElement,"max-height",null),clearInterval(o))},17)})}_animateClose(){if(!this.innerElement)return;let e=this.animateSpeed,i=this.animateAcceleration,r=this.innerElement.getBoundingClientRect().height,o=setInterval(()=>{if(this._isOpen||!this.innerElement)return clearInterval(o);r-=e,this.renderer.setStyle(this.innerElement,"max-height",`${r}px`),e*=i,i*=c1,r<=0&&(this.viewContainerRef.clear(),this.innerElement=null,clearInterval(o))},17)}static{this.\u0275fac=function(i){return new(i||t)(v(Qe),v(Li),v(Ai))}}static{this.\u0275dir=Te({type:t,selectors:[["","treeAnimateOpen",""]],inputs:{animateSpeed:[0,"treeAnimateOpenSpeed","animateSpeed"],animateAcceleration:[0,"treeAnimateOpenAcceleration","animateAcceleration"],isEnabled:[0,"treeAnimateOpenEnabled","isEnabled"],isOpen:[0,"treeAnimateOpen","isOpen"]}})}}return t})(),gi=function(t,n,e,i){var r=arguments.length,o=r<3?n:i===null?i=Object.getOwnPropertyDescriptor(n,e):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,n,e,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(n,e,o):s(n,e))||o);return r>3&&o&&Object.defineProperty(n,e,o),o},wr=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=w({type:t,selectors:[["tree-node-children"]],inputs:{node:"node",templates:"templates"},decls:1,vars:2,consts:[[4,"treeMobxAutorun"],[3,"tree-children","tree-children-no-padding",4,"treeAnimateOpen","treeAnimateOpenSpeed","treeAnimateOpenAcceleration","treeAnimateOpenEnabled"],[3,"nodes","templates","treeModel",4,"ngIf"],["class","tree-node-loading",3,"padding-left","template","node",4,"ngIf"],[3,"nodes","templates","treeModel"],[1,"tree-node-loading",3,"template","node"]],template:function(i,r){i&1&&g(0,nr,2,4,"ng-container",0),i&2&&f("treeMobxAutorun",Fe(1,gt))},dependencies:()=>[bt,Ar,Ee,u1,br],encapsulation:2})}}return t})(),u1=(()=>{class t{constructor(){this._dispose=[]}get nodes(){return this._nodes}set nodes(e){this.setNodes(e)}get marginTop(){let e=this.viewportNodes&&this.viewportNodes.length&&this.viewportNodes[0];return`${e&&e.parent?e.position-e.parent.position-e.parent.getSelfHeight():0}px`}setNodes(e){this._nodes=e}ngOnInit(){this.virtualScroll=this.treeModel.virtualScroll,this._dispose=[Ge(()=>this.virtualScroll.getViewportNodes(this.nodes).map(e=>e.index),e=>{this.viewportNodes=e.map(i=>this.nodes[i])},{compareStructural:!0,fireImmediately:!0}),Ge(()=>this.nodes,e=>{this.viewportNodes=this.virtualScroll.getViewportNodes(e)})]}ngOnDestroy(){this._dispose.forEach(e=>e())}trackNode(e,i){return i.id}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=w({type:t,selectors:[["tree-node-collection"]],inputs:{nodes:"nodes",treeModel:"treeModel",templates:"templates"},decls:1,vars:2,consts:[[4,"treeMobxAutorun"],[3,"node","index","templates",4,"ngFor","ngForOf","ngForTrackBy"],[3,"node","index","templates"]],template:function(i,r){i&1&&g(0,or,3,4,"ng-container",0),i&2&&f("treeMobxAutorun",Fe(1,gt))},dependencies:()=>[bt,Mn,Or],encapsulation:2})}}return gi([o1],t.prototype,"_nodes",void 0),gi([o1],t.prototype,"viewportNodes",void 0),gi([xr],t.prototype,"marginTop",null),gi([yr],t.prototype,"setNodes",null),t})(),Or=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=w({type:t,selectors:[["TreeNode"],["tree-node"]],inputs:{node:"node",index:"index",templates:"templates"},decls:1,vars:2,consts:[[4,"treeMobxAutorun"],[3,"class","tree-node","tree-node-expanded","tree-node-collapsed","tree-node-leaf","tree-node-active","tree-node-focused",4,"ngIf"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"dropIndex","node",4,"ngIf"],[3,"node","index","templates"],[3,"node","templates"],[3,"dropIndex","node"]],template:function(i,r){i&1&&g(0,cr,3,8,"ng-container",0),i&2&&f("treeMobxAutorun",Fe(1,gt))},dependencies:[bt,Ee,f1,Lr,wr,ke],encapsulation:2})}}return t})(),p1=(()=>{class t{set nodes(e){}set options(e){}set focused(e){this.treeModel.setFocus(e)}set state(e){this.treeModel.setState(e)}constructor(e,i){this.treeModel=e,this.treeDraggedElement=i,e.eventNames.forEach(r=>this[r]=new B),e.subscribeToState(r=>this.stateChange.emit(r))}onKeydown(e){if(!this.treeModel.isFocused||["input","textarea"].includes(document.activeElement.tagName.toLowerCase()))return;let i=this.treeModel.getFocusedNode();this.treeModel.performKeyAction(i,e)}onMousedown(e){function i(r,o){return r?r.localName===o?!1:i(r.parentElement,o):!0}i(e.target,"tree-root")&&this.treeModel.setFocus(!1)}ngOnChanges(e){(e.options||e.nodes)&&this.treeModel.setData({options:e.options&&e.options.currentValue,nodes:e.nodes&&e.nodes.currentValue,events:this.pick(this,this.treeModel.eventNames)})}sizeChanged(){this.viewportComponent.setViewport()}pick(e,i){return i.reduce((r,o)=>(e&&e.hasOwnProperty(o)&&(r[o]=e[o]),r),{})}static{this.\u0275fac=function(i){return new(i||t)(v(_),v(en))}}static{this.\u0275cmp=w({type:t,selectors:[["Tree"],["tree-root"]],contentQueries:function(i,r,o){if(i&1&&(Ct(o,lr,5),Ct(o,dr,5),Ct(o,fr,5),Ct(o,ur,5)),i&2){let s;Se(s=xe())&&(r.loadingTemplate=s.first),Se(s=xe())&&(r.treeNodeTemplate=s.first),Se(s=xe())&&(r.treeNodeWrapperTemplate=s.first),Se(s=xe())&&(r.treeNodeFullTemplate=s.first)}},viewQuery:function(i,r){if(i&1&&Vt(pr,5),i&2){let o;Se(o=xe())&&(r.viewportComponent=o.first)}},hostBindings:function(i,r){i&1&&b("keydown",function(s){return r.onKeydown(s)},!1,Mi)("mousedown",function(s){return r.onMousedown(s)},!1,Mi)},inputs:{nodes:"nodes",options:"options",focused:"focused",state:"state"},outputs:{toggleExpanded:"toggleExpanded",activate:"activate",deactivate:"deactivate",nodeActivate:"nodeActivate",nodeDeactivate:"nodeDeactivate",select:"select",deselect:"deselect",focus:"focus",blur:"blur",updateData:"updateData",initialized:"initialized",moveNode:"moveNode",copyNode:"copyNode",loadNodeChildren:"loadNodeChildren",changeFilter:"changeFilter",event:"event",stateChange:"stateChange"},features:[Oi([_]),Pt],decls:5,vars:6,consts:[["viewport",""],[1,"angular-tree-component"],[3,"nodes","treeModel","templates",4,"ngIf"],["class","empty-tree-drop-slot",3,"dropIndex","node",4,"ngIf"],[3,"nodes","treeModel","templates"],[1,"empty-tree-drop-slot",3,"dropIndex","node"]],template:function(i,r){i&1&&(l(0,"tree-viewport",null,0)(2,"div",1),g(3,mr,1,8,"tree-node-collection",2)(4,vr,1,2,"tree-node-drop-slot",3),d()()),i&2&&(c(2),G("node-dragging",r.treeDraggedElement.isDragging())("angular-tree-component-rtl",r.treeModel.options.rtl),c(),f("ngIf",r.treeModel.roots),c(),f("ngIf",r.treeModel.isEmptyTree()))},dependencies:[Cr,Ee,u1,f1],encapsulation:2})}}return t})(),h1=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275mod=gn({type:t})}static{this.\u0275inj=vn({imports:[Ln]})}}return t})();var y=function(t){return t.MAKE="make",t.COPY="copy",t.MOVE="move",t.DELETE="delete",t.COMPRESS="compress",t.DECOMPRESS="decompress",t.DOWNLOAD="download",t.UPLOAD="upload",t.TOUCH="touch",t.THUMBNAIL="thumbnail",t}(y||{});var ts=".selected",is="drag-over";var Ci=(()=>{class t{constructor(e,i,r){this.elementRef=e,this.renderer=i,this.layout=r,this.overFlowX="hidden",this.resizeOffset=80,this.useMaxHeight=!0,this.renderer.setStyle(e.nativeElement,"overflow-y","auto"),this.renderer.setStyle(e.nativeElement,"scrollbar-width","thin"),this.resizeSubscription=this.layout.resizeEvent.pipe(hn(1)).subscribe(()=>this.onResize())}ngAfterViewInit(){this.renderer.setStyle(this.elementRef.nativeElement,"overflow-x",this.overFlowX),this.onResize()}ngOnDestroy(){this.resizeSubscription.unsubscribe()}scrollTop(){this.renderer.setProperty(this.elementRef.nativeElement,"scrollTop","0")}scrollIntoView(e=0){setTimeout(()=>this.elementRef.nativeElement.scrollTo({left:0,top:e,behavior:"smooth"}),50)}onResize(){this.renderer.setStyle(this.elementRef.nativeElement,this.useMaxHeight?"max-height":"height",`${window.innerHeight-this.resizeOffset-1}px`)}static{this.\u0275fac=function(i){return new(i||t)(v(Xe),v(Qe),v(H))}}static{this.\u0275dir=Te({type:t,selectors:[["","appAutoResize",""]],inputs:{overFlowX:"overFlowX",resizeOffset:"resizeOffset",useMaxHeight:"useMaxHeight"}})}}return t})();var V={BASE:qn.BASE,OPERATION:"operation",TASK_OPERATION:"task/operation",TASKS:"tasks",TASKS_DOWNLOAD:"download",RECENTS:"recents",SEARCH:"search",ONLY_OFFICE:"onlyoffice",ONLY_OFFICE_SETTINGS:"settings",ONLY_OFFICE_DOCUMENT:"document",ONLY_OFFICE_CALLBACK:"callback"},on=`${V.BASE}/${V.OPERATION}`,ls=`${on}/${y.THUMBNAIL}`,sn=`${on}/${y.MAKE}`,ds=`${on}/${y.UPLOAD}`,an=`${V.BASE}/${V.TASK_OPERATION}`,m1=`${an}/${y.DOWNLOAD}`,v1=`${an}/${y.COMPRESS}`,g1=`${an}/${y.DECOMPRESS}`,Rt=`${V.BASE}/${V.TASKS}`,b1=`${V.BASE}/${V.TASKS}/${V.TASKS_DOWNLOAD}`,C1=`${V.BASE}/${V.RECENTS}`,_1=`${V.BASE}/${V.SEARCH}`,cn=`${V.BASE}/${V.ONLY_OFFICE}`,fs=`${cn}/${V.ONLY_OFFICE_SETTINGS}`,us=`${cn}/${V.ONLY_OFFICE_DOCUMENT}`,ps=`${cn}/${V.ONLY_OFFICE_CALLBACK}`;var _i=class{constructor(n){Object.assign(this,n),this.mimeUrl=je(this.mime),this.setInfos()}setInfos(){let n=this.path.split("/")[0],e=this.path.split("/")[1]===Ne.PERSONAL;this.showedPath=this.path.split("/").slice(e?2:1).join("/"),this.iconClass=n===Z.SHARES?"purple":"primary",this.icon=n===Z.SHARES?q.SHARES:e?q.PERSONAL:q.SPACES}fallBackMimeUrl(){this.mimeUrl=at}};var yi=class{constructor(n){this.inTrash=!1,Object.assign(this,n),this.mimeUrl=je(this.mime),this.iconClass=this.shareId?"purple":"primary",this.icon=this.shareId?q.SHARES:this.spaceId?q.SPACES:q.PERSONAL,this.showedPath=this.path.split("/").slice(this.path.split("/")[1]===Ne.PERSONAL?2:1).join("/"),this.inTrash=this.path.split("/")[0]===Z.TRASH}fallBackMimeUrl(){this.mimeUrl=at}};var Ke=function(t){return t[t.PENDING=0]="PENDING",t[t.SUCCESS=1]="SUCCESS",t[t.ERROR=2]="ERROR",t}(Ke||{}),Si=class{constructor(n,e,i,r){this.props={},this.id=n,this.type=e,this.path=i,this.name=r,(e===y.COPY||e===y.MOVE||e===y.DOWNLOAD)&&(this.props={progress:1},e!==y.DOWNLOAD&&(this.props.src={name:r,path:i}))}};var S1=(()=>{class t{constructor(e,i,r){this.http=e,this.layout=i,this.store=r,this.onDone={[y.DELETE]:{title:"Deletion",fileEvent:{delete:!0}},[y.MOVE]:{title:"Move",fileEvent:{delete:!0,reloadFocusOnDst:!0}},[y.COPY]:{title:"Copy",fileEvent:{reload:!0,focus:!0}},[y.DOWNLOAD]:{title:"Download",fileEvent:{reload:!0,focus:!0}},[y.UPLOAD]:{title:"Upload",fileEvent:{reload:!0,focus:!0}},[y.COMPRESS]:{title:"Compression",fileEvent:{reload:!0,focus:!0}},[y.DECOMPRESS]:{title:"Decompression",fileEvent:{reload:!0,focus:!0}}},this.watcher=null,this.watch=pn(1e3,1e3).pipe(mn(()=>this.doWatch())),this.loadAll()}addTask(e){e.status===Ke.PENDING?(this.store.filesActiveTasks.next([e,...this.store.filesActiveTasks.getValue()]),this.startWatch()):this.store.filesEndedTasks.next([e,...this.store.filesEndedTasks.getValue()])}createUploadTask(e,i,r){let o=new Si(Jn(),y.UPLOAD,e,i);return o.status=Ke.PENDING,o.startedAt=Qn(null,!0),o.props={progress:1,size:0,totalSize:r},this.store.filesActiveTasks.next([o,...this.store.filesActiveTasks.getValue()]),this.layout.showRSideBarTab(rt.TASKS,!0),o}removeAll(){this.http.delete(Rt).subscribe({next:()=>this.clearEndedTasks(),error:e=>console.error(e)})}remove(e){this.http.delete(`${Rt}/${e.id}`).subscribe({next:()=>this.deleteTask(e.id,!1),error:i=>console.error(i)})}loadAll(){this.http.get(Rt).subscribe({next:e=>e.forEach(i=>this.addTask(i)),error:e=>console.error(e)})}doWatch(){this.store.filesActiveTasks.getValue().length?this.fetchActiveTasks():this.stopWatch()}startWatch(){(!this.watcher||this.watcher.closed)&&(this.layout.showRSideBarTab(rt.TASKS,!0),this.watcher=this.watch.subscribe())}stopWatch(){(this.watcher||!this.watcher.closed)&&(setTimeout(()=>this.layout.hideRSideBarTab(rt.TASKS),3e3),this.watcher.unsubscribe())}fetchActiveTasks(){for(let e of this.store.filesActiveTasks.getValue().filter(i=>i.type!==y.UPLOAD))this.http.get(`${Rt}/${e.id}`).subscribe({next:i=>this.updateTask(i),error:i=>{i.status===404&&(e.result=i.error.message,e.status=Ke.ERROR,this.updateTask(e)),console.warn(i)}})}updateTask(e){if(e.status===Ke.PENDING){let i=this.findTask(e.id,!0);Object.assign(i,e)}else this.deleteTask(e.id,!0),this.addTask(e),this.taskDone(e)}findTask(e,i){return i?this.store.filesActiveTasks.getValue().find(r=>r.id===e):this.store.filesEndedTasks.getValue().find(r=>r.id===e)}deleteTask(e,i){i?this.store.filesActiveTasks.next(this.store.filesActiveTasks.getValue().filter(r=>r.id!==e)):this.store.filesEndedTasks.next(this.store.filesEndedTasks.getValue().filter(r=>r.id!==e))}taskDone(e){if(e.type in this.onDone){if(this.onDone[e.type].fileEvent){let i=ze(Q({},this.onDone[e.type].fileEvent),{status:e.status});e.type===y.COPY||e.type===y.MOVE?(i.filePath=e.props.src.path,i.fileName=e.props.src.name,i.fileDstPath=e.path):(i.filePath=e.path,i.fileName=e.name,e.type===y.COMPRESS&&(i.archiveId=e.props.compressInDirectory===!1?e.id:null)),this.store.filesOnEvent.next(i)}e.status===Ke.SUCCESS?e.type===y.DELETE?this.removeDeletedChildTasks(e):this.layout.sendNotification("info",`${this.onDone[e.type].title} done`,e.name):this.layout.sendNotification("error",`${this.onDone[e.type].title} failed`,e.name,{error:{message:e.result}})}}removeDeletedChildTasks(e){if(e.path.startsWith(Z.SHARES))this.remove(e);else if(e.path.startsWith(Z.TRASH)){for(let i of this.store.filesEndedTasks.getValue().filter(r=>r.id!==e.id&&r.type===y.DELETE&&r.path.startsWith(Z.FILES))){let r=e.path.replace(Z.TRASH,Z.FILES);new RegExp(`^${c2(`${r}/${e.name}`)}(/|$)`).test(`${i.path}/${i.name}`)&&this.remove(i)}this.remove(e)}}clearEndedTasks(){this.store.filesEndedTasks.next([])}static{this.\u0275fac=function(i){return new(i||t)(X(Ht),X(H),X(st))}}static{this.\u0275prov=_e({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var x1=(()=>{class t{constructor(e,i,r,o,s){this.http=e,this.layout=i,this.store=r,this.sanitizer=o,this.filesTasksService=s,this.treeNodeSelected=null,this.treeCopyMoveOn=new fn,this.clipboardAction="copyPaste"}getTreeNode(e,i=!1){return un(this.http.get(`${Wn}/${e}`,{params:i?new Di().set("showFiles",i):null}))}addToClipboard(e){if(e.length)if(!this.store.filesClipboard.getValue().length)this.layout.showRSideBarTab(rt.CLIPBOARD,!0),this.store.filesClipboard.next(e);else{let i=e.filter(r=>this.store.filesClipboard.getValue().indexOf(r)===-1);i.length&&this.store.filesClipboard.next([...i,...this.store.filesClipboard.getValue()])}}removeFromClipboard(e){this.store.filesClipboard.next(this.store.filesClipboard.getValue().filter(i=>i.id!==e.id))}clearClipboard(){this.store.filesClipboard.next([])}onPasteClipboard(e){let i=e||this.clipboardAction;if(this.store.filesClipboard.getValue().length){let r=this.currentRoute;this.copyMove([...this.store.filesClipboard.getValue()],r,i==="copyPaste"?y.COPY:y.MOVE),this.clearClipboard()}}download(e){zi(e.dataUrl)}copyMove(e,i,r){let o=r===y.MOVE;for(let s of e){o&&(s.isBeingDeleted=!0);let a={dstDirectory:i};this.http.request(r,s.taskUrl,{body:a}).subscribe({next:h=>this.filesTasksService.addTask(h),error:h=>{o&&(s.isBeingDeleted=!1),this.layout.sendNotification("error",r==="move"?"Move failed":"Copy failed",s.name,h)}})}}rename(e,i){if(!this.isValidName(i))return;let o={dstDirectory:e.path.split("/").slice(0,-1).join("/")||".",dstName:i};this.http.request(y.MOVE,e.dataUrl,{body:o}).subscribe({next:s=>{e.rename(s.name),e.isEditable=!1},error:s=>this.layout.sendNotification("error","Rename",e.name,s)})}delete(e){for(let i of e)i.isBeingDeleted=!0,this.http.delete(i.taskUrl).subscribe({next:r=>this.filesTasksService.addTask(r),error:r=>{i.isBeingDeleted=!1,this.layout.sendNotification("error","Deletion failed",i.name,r)}})}make(e,i,r=null,o=!1){if(!this.isValidName(i))return;r=r||this.currentRoute;let s={type:e};if(o)return this.http.post(`${sn}/${r}/${i}`,s);this.http.post(`${sn}/${r}/${i}`,s).subscribe({next:()=>this.store.filesOnEvent.next({filePath:r,fileName:i,focus:!0,reload:!0}),error:a=>this.layout.sendNotification("error","Creation failed",i,a)})}compress(e){let i=this.currentRoute;this.http.post(`${v1}/${i}/${e.name}.${e.extension}`,e).subscribe({next:r=>this.filesTasksService.addTask(r),error:r=>this.layout.sendNotification("error","Compression failed",e.name,r)})}decompress(e){let i=this.currentRoute;this.http.post(`${g1}/${i}/${e.name}`,null).subscribe({next:r=>this.filesTasksService.addTask(r),error:r=>this.layout.sendNotification("error","Compression failed",e.name,r)})}downloadFromUrl(e,i){if(!this.isValidName(i))return;let r=this.currentRoute,o={url:e};this.http.post(`${m1}/${r}/${i}`,o).subscribe({next:s=>this.filesTasksService.addTask(s),error:s=>this.layout.sendNotification("error","Download failed",e,s)})}downloadTaskArchive(e){zi(`${b1}/${e}`)}loadRecents(e){this.http.get(C1,{params:new Di().set("limit",e)}).pipe(Ei(i=>i.map(r=>new yi(r)))).subscribe({next:i=>{this.store.filesRecents.update(r=>[...i,...r.slice(e)])},error:i=>this.layout.sendNotification("error","Files","Unable to load",i)})}search(e){return this.http.request("search",_1,{body:e}).pipe(Ei(i=>i.map(r=>(r.content&&(r.content=this.sanitizer.bypassSecurityTrustHtml(r.content)),new _i(r)))))}isValidName(e){try{return Xn(e),!0}catch(i){return this.layout.sendNotification("error","Rename",`${this.layout.translateString(i.message)} : ${Yn}`),!1}}static{this.\u0275fac=function(i){return new(i||t)(X(Ht),X(H),X(st),X(An),X(S1))}}static{this.\u0275prov=_e({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Pr=["tree"];function Fr(t,n){if(t&1&&(l(0,"span",8),p(1),d()),t&2){let e=u(2);c(),F(e.errorMsg)}}function kr(t,n){t&1&&(l(0,"span",9),p(1,"Navigation Tree"),d())}function Vr(t,n){if(t&1){let e=P();l(0,"div",3)(1,"button",6),b("click",function(){S(e);let r=u();return x(r.onRefresh())}),C(2,"fa-icon",7),d(),g(3,Fr,2,1,"span",8)(4,kr,2,0,"span",9),d()}if(t&2){let e=u();c(2),f("icon",e.icons.faArrowRotateRight),c(),A(e.errorMsg?3:4)}}function jr(t,n){if(t&1&&(l(0,"span")(1,"span"),p(2),d()()),t&2){let e=u(2);c(2),F(e.store.filesSelection()[0].name)}}function Br(t,n){if(t&1&&(l(0,"span"),C(1,"fa-icon",18),d()),t&2){let e=u(2);c(),f("icon",e.icons.faQuestion)}}function Hr(t,n){if(t&1&&(l(0,"span")(1,"span"),p(2),d(),p(3,"\xA0"),l(4,"span",9),p(5,"items"),d()()),t&2){let e=u(2);c(2),F(e.store.filesSelection().length)}}function $r(t,n){if(t&1){let e=P();l(0,"div",10)(1,"div",11)(2,"span",12)(3,"span",9),p(4,"Source"),d(),p(5,":"),d(),g(6,jr,3,1,"span")(7,Br,2,1,"span")(8,Hr,6,1,"span"),d(),l(9,"div",13)(10,"span",12)(11,"span",9),p(12,"Destination"),d(),p(13,":"),d(),l(14,"span"),p(15),d()(),l(16,"div",14)(17,"button",15),b("click",function(){S(e);let r=u();return x(r.actionMove())}),C(18,"fa-icon",7),p(19," Move "),d(),l(20,"button",15),b("click",function(){S(e);let r=u();return x(r.actionCopy())}),C(21,"fa-icon",7),p(22," Copy "),d(),l(23,"button",16),b("click",function(){S(e);let r=u();return x(r.actionCancel())}),C(24,"fa-icon",7),p(25," Cancel "),d()()(),C(26,"hr",17)}if(t&2){let e,i=u();c(6),A((e=i.store.filesSelection().length)===1?6:e===0?7:8),c(9),F((i.selection==null?null:i.selection.data.name)||""),c(2),f("disabled",!i.selection||!i.store.filesSelection().length||!i.srcAllowed||!i.dstAllowed),c(),f("icon",i.icons.faArrowsAlt),c(2),f("disabled",!i.selection||!i.store.filesSelection().length||!i.dstAllowed),c(),f("icon",i.icons.faClone),c(3),f("icon",i.icons.faTimes)}}function Ur(t,n){if(t&1){let e=P();l(0,"div",19),b("click",function(r){let o=S(e).$implicit;return x(o.mouseAction("click",r))})("tap",function(r){let o=S(e).$implicit;return x(o.mouseAction("dblClick",r))}),C(1,"tree-node-expander",20),l(2,"div",21),C(3,"tree-node-content",22),d()()}if(t&2){let e=n.index,i=n.$implicit;Ie("padding-left",i.getNodePadding()),G("tree-selected",i.isActive)("tree-disabled",!i.data.enabled),c(),G("toggle-children-file",!i.data.isDir)("toggle-children-shared",i.data.inShare),f("node",i),c(),G("node-content-wrapper-active",i.isActive),c(),f("index",e)("node",i)}}function Gr(t,n){if(t&1&&(l(0,"span"),C(1,"fa-icon",23),d()),t&2){let e=u();c(),f("icon",e.icons.faSpinner)}}var E1=(()=>{class t{constructor(e,i,r,o,s){this.layout=e,this.router=i,this.user=r,this.filesService=o,this.store=s,this.selected=new B,this.showFiles=!1,this.allowShares=!0,this.allowSpaces=!0,this.enableCopyMove=!0,this.enableNavigateTo=!0,this.sideBarHeader=!0,this.resizeOffset=80,this.toggleNodesAtStartup=!1,this.icons={faArrowRotateRight:Vn,faArrowsAlt:kn,faClone:Un,faTimes:$n,faFolder:In,faFile:ei,faQuestion:Fn,faAnglesRight:Pn,faSpinner:Kt},this.options={actionMapping:{mouse:{click:(a,h,D)=>this.onSelect(a,h,D),dblClick:(a,h)=>this.onOpen(h),expanderClick:()=>null}},animateExpand:!1,levelPadding:10,useVirtualScroll:!1,nodeHeight:30,dropSlotHeight:0,allowDrag:!1,allowDrop:!1,getChildren:a=>this.getTreeNode(a)},this.srcAllowed=!0,this.dstAllowed=!0,this.errorMsg=null,this.copyMoveOnHeight=80,this._copyMoveOn=!1,this.subscriptions=[],this.preventDblClick=!1,this.enableCopyMove&&this.subscriptions.push(e2(this.store.filesSelection).subscribe(()=>this.checkAllowed(this.selection)))}get selection(){return this.filesService.treeNodeSelected}set selection(e){this.filesService.treeNodeSelected=e,e&&([0,-1,-2].indexOf(e.data.id)===-1?this.selected.emit(e.data):this.selected.emit(null))}get copyMoveOn(){return this._copyMoveOn}set copyMoveOn(e){this._copyMoveOn!==e&&(this._copyMoveOn=e,e?this.resizeOffset+=this.copyMoveOnHeight:this.resizeOffset-=this.copyMoveOnHeight,setTimeout(()=>this.layout.resizeEvent.next(),0))}ngOnInit(){this.enableCopyMove&&this.subscriptions.push(this.filesService.treeCopyMoveOn.subscribe(()=>this.onCopyMove())),this.initRoot(),setTimeout(()=>this.focusLastNode(),100)}ngOnDestroy(){this.subscriptions.forEach(e=>e.unsubscribe())}onRefresh(){this.tree.treeModel.activeNodes.length?this.tree.treeModel.activeNodes.forEach(e=>{e.loadNodeChildren().then(()=>this.tree.treeModel.update())}):(this.user.userHavePermission(Ve.PERSONAL_SPACE)&&this.tree.treeModel.getNodeById(0).loadNodeChildren().then(()=>this.tree.treeModel.update()),this.user.userHavePermission(Ve.SPACES)&&this.tree.treeModel.getNodeById(-1).loadNodeChildren().then(()=>this.tree.treeModel.update()),this.allowShares&&this.user.userHavePermission(Ve.SHARES)&&this.tree.treeModel.getNodeById(-2).loadNodeChildren().then(()=>this.tree.treeModel.update()))}actionCancel(){this.copyMoveOn=!1,this.errorMsg=null,this.srcAllowed=!0,this.dstAllowed=!0}actionCopy(){this.filesService.copyMove(this.store.filesSelection(),this.selection.data.path,y.COPY),this.copyMoveOn=!1}actionMove(){this.filesService.copyMove(this.store.filesSelection(),this.selection.data.path,y.MOVE),this.copyMoveOn=!1}initRoot(){if(this.nodes=[],this.user.userHavePermission(Ve.PERSONAL_SPACE)){let e={id:0,name:this.layout.translateString(Yt.PERSONAL_FILES),path:`${nt.FILES}/${Ne.PERSONAL}`,isDir:!0,inShare:!1,mime:Me,quotaIsExceeded:this.store.user.getValue().quotaIsExceeded,enabled:!0,permissions:Gn,children:null,hasChildren:!0,isExpanded:!1};this.checkToggleNodeAtStartup(e,!0)}if(this.allowSpaces&&this.user.userHavePermission(Ve.SPACES)){let e={id:-1,name:this.layout.translateString(Yt.SPACES),path:nt.SPACES,isDir:!0,mime:Me,inShare:!1,hasChildren:!0,quotaIsExceeded:!1,enabled:!0,permissions:"",children:null,isExpanded:!1};this.checkToggleNodeAtStartup(e)}if(this.allowShares&&this.user.userHavePermission(Ve.SHARES)){let e={id:-2,name:this.layout.translateString(Yt.SHARES),path:nt.SHARES,isDir:!0,mime:Me,inShare:!0,hasChildren:!0,quotaIsExceeded:!1,enabled:!0,permissions:"",children:null,isExpanded:!1};this.checkToggleNodeAtStartup(e)}}checkToggleNodeAtStartup(e,i=!1){this.toggleNodesAtStartup?this.getTreeNode(e).then(r=>{e.children=r,i?this.nodes.unshift(e):this.nodes.push(e),this.tree.treeModel.update(),this.toggleExpand(this.tree,this.tree.treeModel.getNodeById(e.id),null)}):(i?this.nodes.unshift(e):this.nodes.push(e),this.tree.treeModel.update())}focusLastNode(){this.selection&&(this.selection=this.tree.treeModel.getNodeById(this.selection.data.id),this.selection&&z.ACTIVATE(this.tree,this.selection,null))}getTreeNode(e){return this.filesService.getTreeNode(e?.data?.path||e?.path||e,this.showFiles)}collapseChildren(e,i){for(let r of i)[0,-1,-2].indexOf(r.id)===-1&&r.id!==e.id&&(r.data.isExpanded=!1,r.collapse())}toggleExpand(e,i,r){z.TOGGLE_EXPANDED(e,i,r),i.data.isExpanded=!!i.data.isExpanded}onOpen(e){if(!this.copyMoveOn&&this.enableNavigateTo&&e.data.enabled){clearTimeout(this.preventTimer),this.preventDblClick=!0;let i=e.data.path.split("/");i[0]!==nt.SPACES&&i.unshift(nt.SPACES),this.router.navigate(i).catch(r=>console.error(r))}}onSelect(e,i,r){if(!i.data.enabled){this.layout.sendNotification("warning",i.data.name,`${i.data.inShare?"Share":"Space"} is disabled`);return}z.ACTIVATE(e,i,r),this.preventTimer=setTimeout(()=>{this.checkAllowed(i),this.selection=i,this.preventDblClick||i.hasChildren&&(this.collapseChildren(i,i.parent.children),this.toggleExpand(e,i,r)),this.preventDblClick=!1},200)}checkAllowed(e){if(this.copyMoveOn){if(this.store.filesSelection().length)for(let i of this.store.filesSelection()){if(i.root?.alias){this.errorMsg="You can not move an anchored file",this.srcAllowed=!1,this.dstAllowed=!0;return}if(i.lock&&i.lock.ownerLogin!==this.store.user.getValue().login){this.errorMsg="You can not move a locked file",this.srcAllowed=!1,this.dstAllowed=!0;return}}if(e){if([-1,-2].indexOf(e.data.id)>-1){this.errorMsg=null,this.srcAllowed=!0,this.dstAllowed=!1;return}else if(e.data.permissions.indexOf(it.ADD)===-1){this.errorMsg="You are not allowed to write here",this.srcAllowed=!0,this.dstAllowed=!1;return}else if(e.data.quotaIsExceeded){this.errorMsg="No more space available",this.srcAllowed=!0,this.dstAllowed=!1;return}}this.errorMsg=null,this.srcAllowed=!0,this.dstAllowed=!0}}onCopyMove(){this.onRefresh(),this.copyMoveOn=!0,this.checkAllowed(this.selection)}static{this.\u0275fac=function(i){return new(i||t)(v(H),v(wn),v(Xt),v(x1),v(st))}}static{this.\u0275cmp=w({type:t,selectors:[["app-files-tree"]],viewQuery:function(i,r){if(i&1&&Vt(Pr,7),i&2){let o;Se(o=xe())&&(r.tree=o.first)}},inputs:{showFiles:"showFiles",allowShares:"allowShares",allowSpaces:"allowSpaces",enableCopyMove:"enableCopyMove",enableNavigateTo:"enableNavigateTo",sideBarHeader:"sideBarHeader",resizeOffset:"resizeOffset",toggleNodesAtStartup:"toggleNodesAtStartup"},outputs:{selected:"selected"},decls:9,vars:7,consts:[["tree",""],["treeNodeWrapperTemplate",""],["loadingTemplate",""],[1,"sidebar-component-title"],["appAutoResize","",3,"overFlowX","resizeOffset","useMaxHeight"],[3,"nodes","options"],[1,"btn","btn-xs","btn-secondary",3,"click"],[3,"icon"],["l10nTranslate","",1,"text-danger","fs-xxs","p-2"],["l10nTranslate",""],[1,"px-2","pt-2","pb-0","fs-xs"],[1,"text-start","text-truncate"],["l10nTranslate","",1,"fs-xs","fw-bold","me-2"],[1,"text-start","text-truncate","mt-1"],[1,"d-flex","justify-content-between","mt-2"],["type","button","l10nTranslate","",1,"btn","btn-xxs","btn-primary",3,"click","disabled"],["type","button","l10nTranslate","",1,"btn","btn-xxs","btn-secondary",3,"click"],[1,"mx-0","mt-2","mb-0"],[1,"fw-bold","me-1",3,"icon"],[1,"node-wrapper",3,"click","tap"],[3,"node"],[1,"node-content-wrapper"],[3,"index","node"],["animation","spin",1,"fw-bold",3,"icon"]],template:function(i,r){i&1&&(g(0,Vr,5,2,"div",3)(1,$r,27,7),l(2,"div",4)(3,"tree-root",5,0),g(5,Ur,4,15,"ng-template",null,1,St)(7,Gr,2,1,"ng-template",null,2,St),d()()),i&2&&(A(r.sideBarHeader?0:-1),c(),A(r.copyMoveOn?1:-1),c(),f("overFlowX","auto")("resizeOffset",r.resizeOffset)("useMaxHeight",!1),c(),f("nodes",r.nodes)("options",r.options))},dependencies:[Ci,h1,p1,nn,tn,oe,se],encapsulation:2})}}return t})();function qr(t,n){if(t&1&&(l(0,"span"),C(1,"fa-icon",10),p(2),fe(3,"pathSlice"),d()),t&2){let e=u();c(),f("icon",e.selection.isDir?e.icons.faFolderClosed:e.icons.faFile),c(),J(" ",yt(3,2,e.selection.path,-1)," ")}}function Wr(t,n){t&1&&(l(0,"span",2),p(1,"Select a file"),d())}function Kr(t,n){if(t&1&&(l(0,"span",7),p(1),d()),t&2){let e=u();c(),F(e.errorSelection)}}var N1=(()=>{class t{constructor(e){this.layout=e,this.currentRoots=[],this.submitEvent=new B,this.allowSpaces=!1,this.toggleNodesAtStartup=!0,this.mustHaveShareOutsidePermission=!1,this.icons={faFile:ei,faFolderClosed:h2},this.errorSelection=null,this.selection=null}onSelect(e){if(e){if(this.mustHaveShareOutsidePermission){if(e.permissions.indexOf(it.SHARE_OUTSIDE)===-1){this.errorSelection=this.layout.translateString("You do not have share permission"),this.selection=null;return}if(e.path.split("/").length<=2){this.errorSelection=this.layout.translateString("You can not share a space"),this.selection=null;return}}let i=e,r=this.currentRoots.find(o=>o.file.id===i.id);r?(this.errorSelection=this.layout.translateString("This item is already selected"),this.selection=null):(r=this.currentRoots.find(o=>i.path.startsWith(o.file.path)),r?(this.errorSelection=`${this.layout.translateString("Parent item is already selected")}: ${r.file.path}`,this.selection=null):(this.errorSelection=null,this.selection=i))}else this.selection=null,this.errorSelection=null}onSubmit(){this.submitEvent.emit({id:this.selection.id,name:this.selection.name,path:this.selection.path,mime:this.selection.mime,permissions:this.selection.permissions}),this.layout.closeDialog()}static{this.\u0275fac=function(i){return new(i||t)(v(H))}}static{this.\u0275cmp=w({type:t,selectors:[["app-files-tree-dialog"]],inputs:{currentRoots:"currentRoots",allowSpaces:"allowSpaces",toggleNodesAtStartup:"toggleNodesAtStartup",mustHaveShareOutsidePermission:"mustHaveShareOutsidePermission"},outputs:{submitEvent:"submitEvent"},decls:13,vars:11,consts:[[1,"modal-header"],[1,"modal-title"],["l10nTranslate",""],["aria-label","Close","type","button",1,"btn-close","btn-close-white",3,"click"],[1,"modal-body","py-2","px-0"],[3,"selected","enableNavigateTo","enableCopyMove","showFiles","allowShares","allowSpaces","sideBarHeader","toggleNodesAtStartup","resizeOffset"],[1,"modal-footer"],[1,"me-auto","fs-sm","text-danger","text-truncate"],["data-dismiss","modal","type","button","l10nTranslate","",1,"btn","btn-sm","btn-secondary",3,"click"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-primary",3,"click","disabled"],[3,"icon"]],template:function(i,r){i&1&&(l(0,"div",0)(1,"h4",1),g(2,qr,4,5,"span")(3,Wr,2,0,"span",2),d(),l(4,"button",3),b("click",function(){return r.layout.closeDialog()}),d()(),l(5,"div",4)(6,"app-files-tree",5),b("selected",function(s){return r.onSelect(s)}),d()(),l(7,"div",6),g(8,Kr,2,1,"span",7),l(9,"button",8),b("click",function(){return r.layout.closeDialog()}),p(10,"Cancel"),d(),l(11,"button",9),b("click",function(){return r.onSubmit()}),p(12,"Confirm"),d()()),i&2&&(c(2),A(r.selection?2:3),c(4),f("enableNavigateTo",!1)("enableCopyMove",!1)("showFiles",!0)("allowShares",!1)("allowSpaces",r.allowSpaces)("sideBarHeader",!1)("toggleNodesAtStartup",r.toggleNodesAtStartup)("resizeOffset",200),c(2),A(r.errorSelection?8:-1),c(3),f("disabled",!r.selection))},dependencies:[oe,E1,se,m2],encapsulation:2})}}return t})();function Xr(t,n){if(t&1){let e=P();l(0,"input",12),fe(1,"translate"),b("ngModelChange",function(r){S(e);let o=u();return x(o.checkInput(r,!0))}),d()}if(t&2){let e=u();G("is-invalid",!e.rootNameIsValid),f("ngModel",e.newSpaceRoot.name)("placeholder",yt(1,4,"Name",e.locale.language))}}function Qr(t,n){if(t&1&&(l(0,"span",9),p(1),d()),t&2){let e=u();c(),F(e.error)}}function Jr(t,n){if(t&1){let e=P();l(0,"button",13),b("click",function(){S(e);let r=u();return x(r.onSubmit())}),p(1,"Confirm"),d()}}function Zr(t,n){if(t&1){let e=P();l(0,"button",14),b("click",function(){S(e);let r=u();return x(r.onValidRoot())}),p(1,"Check the location"),d()}}var L1=(()=>{class t{constructor(e,i,r){this.locale=e,this.layout=i,this.spacesService=r,this.currentRoots=[],this.submitEvent=new B,this.withRootName=!0,this.icons={faFolderClosed:Rn},this.newSpaceRoot={name:"",externalPath:""},this.rootNameIsValid=!1,this.rootPathIsValid=!1,this.rootIsValid=!1}ngOnInit(){this.withRootName||(this.rootNameIsValid=!0)}keyEnter(){this.rootIsValid?this.onSubmit():this.onValidRoot()}onValidRoot(){if(this.withRootName&&!this.newSpaceRoot.name||!this.newSpaceRoot.externalPath){this.error="Name and location are required";return}this.newSpaceRoot.externalPath[0]!=="/"&&(this.newSpaceRoot.externalPath="/"+this.newSpaceRoot.externalPath);for(let e of this.currentRoots)if(this.newSpaceRoot.externalPath.startsWith(e.externalPath)){this.rootPathIsValid=!1,this.error="Parent location already exists in files";return}this.spacesService.checkSpaceRootPath(this.newSpaceRoot.externalPath).subscribe({next:()=>{this.rootPathIsValid=!0,this.rootNameIsValid=!0,this.rootIsValid=!0,this.error=null},error:e=>{this.rootPathIsValid=!1,this.error=e.error.message}})}onSubmit(){this.submitEvent.emit(this.newSpaceRoot),this.layout.closeDialog()}checkInput(e,i=!1){i?(this.newSpaceRoot.name=e,this.rootNameIsValid=!!e):(this.newSpaceRoot.externalPath=e,this.rootPathIsValid=!!e),this.rootIsValid&&(this.rootIsValid=!1)}static{this.\u0275fac=function(i){return new(i||t)(v(tt),v(H),v(ct))}}static{this.\u0275cmp=w({type:t,selectors:[["app-space-root-path-dialog"]],hostBindings:function(i,r){i&1&&b("keyup.enter",function(){return r.keyEnter()})},inputs:{currentRoots:"currentRoots",withRootName:"withRootName"},outputs:{submitEvent:"submitEvent"},decls:14,vars:13,consts:[[1,"modal-header","align-items-center"],[1,"modal-title"],[1,"me-2",3,"icon"],["l10nTranslate",""],["aria-label","Close","type","button",1,"btn-close","btn-close-white",3,"click"],[1,"modal-body","form-validation"],["appAutofocus","","type","text","required","",1,"form-control","form-control-sm","my-2",3,"ngModel","is-invalid","placeholder"],["appAutofocus","","type","text","required","",1,"form-control","form-control-sm","my-4",3,"ngModelChange","autoFocus","ngModel","placeholder"],[1,"modal-footer"],["l10nTranslate","",1,"me-auto","fs-sm","text-danger","text-truncate"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-primary"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-success"],["appAutofocus","","type","text","required","",1,"form-control","form-control-sm","my-2",3,"ngModelChange","ngModel","placeholder"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-primary",3,"click"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-success",3,"click"]],template:function(i,r){i&1&&(l(0,"div",0)(1,"h4",1),C(2,"fa-icon",2),l(3,"span",3),p(4,"Add an external location"),d()(),l(5,"button",4),b("click",function(){return r.layout.closeDialog()}),d()(),l(6,"div",5),g(7,Xr,2,7,"input",6),l(8,"input",7),fe(9,"translate"),b("ngModelChange",function(s){return r.checkInput(s)}),d()(),l(10,"div",8),g(11,Qr,2,1,"span",9)(12,Jr,2,0,"button",10)(13,Zr,2,0,"button",11),d()),i&2&&(c(2),f("icon",r.icons.faFolderClosed),c(5),A(r.withRootName?7:-1),c(),G("is-invalid",!r.rootPathIsValid),En("placeholder","",yt(9,10,"Location",r.locale.language),": /home/sync-in/data"),f("autoFocus",!r.withRootName)("ngModel",r.newSpaceRoot.externalPath),c(3),A(r.error?11:-1),c(),A(r.rootIsValid?12:13))},dependencies:[se,oe,zn,Wt,$t,Ut,qt,Gt,Qt],encapsulation:2})}}return t})();var A1=(()=>{class t{constructor(e){this.locale=e}ngOnInit(){this.setFilePath()}ngOnChanges(){this.setFilePath()}setFilePath(){let e=this.share.file?ot(this.share.file.name,-1):"";e?this.fileName=e:this.share.parent?.id?this.fileName=this.share.parent.name:this.share instanceof xt&&this.share.externalPath&&(this.fileName=this.share.externalPath)}static{this.\u0275fac=function(i){return new(i||t)(v(tt))}}static{this.\u0275cmp=w({type:t,selectors:[["app-share-file-name"]],inputs:{share:"share"},features:[Pt],decls:5,vars:2,consts:[[1,"d-flex","align-items-center","text-truncate"],["draggable","false","height","30","width","30","alt","",3,"error","src"],[1,"d-flex","flex-column","text-truncate","ms-2"],[1,"text-truncate"]],template:function(i,r){i&1&&(l(0,"div",0)(1,"img",1),b("error",function(){return r.share.fallBackMimeUrl()}),d(),l(2,"div",2)(3,"div",3),p(4),d()()()),i&2&&(c(),f("src",r.share.mimeUrl,Ft),c(3),J(" ",r.fileName," "))},encapsulation:2})}}return t})();function io(t,n){if(t&1&&(l(0,"span"),p(1),d()),t&2){let e=u();c(),F(e.share.name)}}function no(t,n){t&1&&(l(0,"span",3),p(1,"Create a new share"),d())}function ro(t,n){if(t&1&&C(0,"fa-icon",4),t&2){let e=u();f("icon",e.icons.faSpinner)}}function oo(t,n){t&1&&(l(0,"h4",5)(1,"span",3),p(2,"Edit share"),d()())}function so(t,n){if(t&1&&(C(0,"fa-icon",39),l(1,"span",40),p(2,"Settings"),d()),t&2){let e=u();f("icon",e.icons.faCog)}}function ao(t,n){if(t&1&&(l(0,"div",19)(1,"label",41),p(2,"File"),d(),C(3,"app-share-file-name",42),d()),t&2){let e=u();c(3),f("share",e.share)}}function co(t,n){if(t&1&&(l(0,"div",49)(1,"label",50),p(2,"Deactivation date"),d(),l(3,"div",51),p(4),fe(5,"amDateFormat"),d()()),t&2){let e=u(2);c(4),F(Bt(5,1,e.share.disabledAt))}}function lo(t,n){if(t&1&&(l(0,"div",31)(1,"div",43)(2,"label",44),p(3,"Creation date"),d(),l(4,"div",45),p(5),fe(6,"amDateFormat"),d()(),l(7,"div",46)(8,"label",47),p(9,"Modification date"),d(),l(10,"div",48),p(11),fe(12,"amDateFormat"),d()(),g(13,co,6,3,"div",49),d()),t&2){let e=u();c(5),F(Bt(6,3,e.share.createdAt)),c(6),F(Bt(12,5,e.share.modifiedAt)),c(2),A(e.share.disabledAt&&!e.share.enabled?13:-1)}}function fo(t,n){if(t&1&&(C(0,"fa-icon",39),l(1,"span",52),p(2,"Members"),d(),l(3,"span"),p(4),d()),t&2){let e=u();f("icon",e.icons.faUsers),c(4),J("(",e.share.members.length,")")}}function uo(t,n){if(t&1&&(C(0,"fa-icon",39),l(1,"span",52),p(2,"Links"),d(),l(3,"span"),p(4),d()),t&2){let e=u();f("icon",e.icons.LINKS),c(4),J("(",e.share.links.length,")")}}function po(t,n){if(t&1){let e=P();l(0,"button",54),b("click",function(){S(e);let r=u(2);return x(r.confirmDeletion=!0)}),p(1," Remove "),d()}if(t&2){let e=u(2);f("disabled",e.confirmDeletion)}}function ho(t,n){if(t&1){let e=P();l(0,"button",57),b("click",function(){S(e);let r=u(3);return x(r.openAdminRootDialog())}),C(1,"fa-icon",39),p(2," External location "),d()}if(t&2){let e=u(3);c(),f("icon",e.icons.faUserShield)}}function mo(t,n){if(t&1){let e=P();l(0,"button",55),b("click",function(){S(e);let r=u(2);return x(r.openSelectRootDialog())}),C(1,"fa-icon",39)(2,"fa-icon",39),p(3," File "),d(),g(4,ho,3,1,"button",56)}if(t&2){let e=u(2);c(),f("icon",e.icons.faPlus),c(),f("icon",e.icons.SHARES),c(2),A(e.user.isAdmin?4:-1)}}function vo(t,n){if(t&1&&g(0,po,2,1,"button",53)(1,mo,5,3),t&2){let e=u();A(e.share.id?0:e.allowFilesOptions?1:-1)}}function go(t,n){if(t&1){let e=P();l(0,"button",55),b("click",function(){S(e);let r=u();return x(r.openCreateLinkDialog())}),C(1,"fa-icon",39)(2,"fa-icon",39),p(3," Link "),d()}if(t&2){let e=u();c(),f("icon",e.icons.faPlus),c(),f("icon",e.icons.LINKS)}}var w1=(()=>{class t{constructor(e,i,r,o,s,a){this.locale=e,this.layout=i,this.userService=r,this.sharesService=o,this.linksService=s,this.spacesService=a,this.parentShareId=null,this.parentSpaceId=null,this.isSharesRepo=!1,this.inSharesList=!1,this.allowFilesOptions=!0,this.shareChange=new B,this.icons={SHARED:q.SHARED_WITH_OTHERS,SHARES:q.SHARES,LINKS:q.LINKS,faPlus:Hn,faSpinner:Kt,faUserShield:Bn,faUsers:Tn,faCog:jn},this.user=this.userService.user,this.allowedPermissions=[],this.confirmDeletion=!1,this.loading=!1,this.submitted=!1}ngOnInit(){this.share||([this.share,this.parentShareId]=this.sharesService.initShareFromFile(this.user,this.file,this.isSharesRepo,this.inSharesList)),this.allowedPermissions=Object.keys(this.share.hPerms)}searchMembers(e){let i={search:e,ignoreUserIds:[this.user.id,...this.share.parent?.ownerId?[this.share.parent.ownerId]:[],...this.share.members.filter(r=>r.isUser).map(r=>r.id)],ignoreGroupIds:this.share.members.filter(r=>r.isGroup).map(r=>r.id)};return this.userService.searchMembers(i,[it.SHARE_INSIDE])}openSelectRootDialog(){this.layout.openDialog(N1,"xl",{initialState:{toggleNodesAtStartup:!1,allowSpaces:!0,mustHaveShareOutsidePermission:!0}}).content.submitEvent.pipe(Ye(1)).subscribe(i=>{let r=i.path.split("/"),o={id:i.id,name:i.name,path:ot(i.path,2),permissions:i.permissions,mime:i.mime,ownerId:r[1]===Ne.PERSONAL?this.user.id:null,inTrash:!1,isDir:i.mime===Me,space:{alias:r[1],name:r[1],root:{alias:"",name:""}}},s=ze(Q({},this.share),{file:o,externalPath:null});s.name=s.file.name,this.share=new xt(s),this.allowedPermissions=Object.keys(this.share.hPerms)})}openAdminRootDialog(){this.layout.openDialog(L1,null,{initialState:{withRootName:!1}}).content.submitEvent.pipe(Ye(1)).subscribe(i=>{let r=ze(Q({},this.share),{file:null,externalPath:i.externalPath,name:i.externalPath.split("/").at(-1)});this.share=new xt(r),this.allowedPermissions=Object.keys(this.share.hPerms)})}openEditLinkDialog(e){this.linksService.editLinkDialog(e,this.share,Kn.SHARE)}openCreateLinkDialog(){this.linksService.createLinkDialog(this.share)}cantSubmit(){return this.submitted||!this.share.externalPath&&!this.share.file}onSubmit(){this.loading=!0,this.submitted=!0,this.confirmDeletion?(this.parentShareId?this.sharesService.deleteShareChild(this.parentShareId,this.share.id):this.parentSpaceId?this.spacesService.deleteSpaceShare(this.parentSpaceId,this.share.id):this.sharesService.deleteShare(this.share.id)).subscribe({next:()=>{this.loading=!1,this.shareChange.emit(["delete",this.share]),this.layout.closeDialog()},error:i=>{this.onError(),this.layout.sendNotification("error","Delete share",this.share.name,i)}}):this.share.id===0?this.sharesService.createShare(this.share).subscribe({next:e=>{this.loading=!1,this.share=e,this.shareChange.emit(["add",e]),this.layout.closeDialog()},error:e=>{this.onError(),this.layout.sendNotification("error","Create share",this.share.name,e)}}):(this.parentShareId?this.sharesService.updateShareChild(this.parentShareId,this.share.id,this.share):this.parentSpaceId?this.spacesService.updateSpaceShare(this.parentSpaceId,this.share):this.sharesService.updateShare(this.share)).subscribe({next:i=>{this.loading=!1,this.share=i,this.shareChange.emit(["update",i]),this.layout.closeDialog()},error:i=>{this.onError(),this.layout.sendNotification("error","Edit share",this.share.name,i)}})}onCancel(){this.confirmDeletion?this.confirmDeletion=!1:this.layout.closeDialog()}onError(){this.confirmDeletion=!1,this.submitted=!1,this.loading=!1}static{this.\u0275fac=function(i){return new(i||t)(v(tt),v(H),v(Xt),v(Jt),v(Zt),v(ct))}}static{this.\u0275cmp=w({type:t,selectors:[["app-share-dialog"]],inputs:{share:"share",file:"file",parentShareId:"parentShareId",parentSpaceId:"parentSpaceId",isSharesRepo:"isSharesRepo",inSharesList:"inSharesList",allowFilesOptions:"allowFilesOptions"},outputs:{shareChange:"shareChange"},decls:57,vars:39,consts:[[1,"modal-header","align-items-center"],[1,"modal-title"],[1,"me-2",3,"icon"],["l10nTranslate",""],["animation","spin","size","sm",1,"ms-2",3,"icon"],[1,"modal-title","ms-auto"],["aria-label","Close","type","button",3,"click"],[1,"modal-body"],["type","pills",3,"justified"],[1,"my-3"],["customClass","tab-dialog form-validation",3,"selectTab"],["tabHeading",""],[1,"d-flex","col-12"],[1,"d-flex","flex-column","col-6","pe-2"],[1,"mb-3","px-0",2,"max-width","80%"],["for","name","l10nTranslate",""],["id","name","type","text","appAutofocus","","required","",3,"ngModelChange","ngModel"],["for","description","l10nTranslate",""],["id","description","type","text",1,"form-control","form-control-sm",3,"ngModelChange","ngModel"],[1,"mb-3","px-0"],["for","switchStatus","l10nTranslate",""],[1,"d-flex","align-items-center","form-check","form-switch","cursor-pointer"],["id","switchStatus","type","checkbox","role","button",1,"form-check-input",3,"ngModelChange","ngModel"],["for","switchStatus","l10nTranslate","",1,"form-check-label","mb-0","ms-2"],[1,"col-6"],[1,"mb-3"],["for","from","l10nTranslate",""],["id","from",3,"share","showFullPath"],["for","permissions","l10nTranslate",""],[1,"d-flex"],["id","permissions",3,"permissions","replaceEmptyPermissions"],[1,"d-flex","d-none","d-lg-flex","mt-auto"],["customClass","tab-dialog",3,"selectTab"],[3,"membersChange","members","withPermissions","filterPermissions","allowedPermissions","searchFunction"],[3,"membersChange","members","filterPermissions","allowedPermissions","withPermissions","editFunction","hideInput"],[1,"modal-footer"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-success"],["data-dismiss","modal","type","button","l10nTranslate","",1,"btn","btn-sm","btn-secondary","ms-auto",3,"click"],["type","button","l10nTranslate","",3,"click","disabled"],[3,"icon"],["l10nTranslate","",1,"ms-2"],["for","shareFilePath","l10nTranslate","",1,"no-select"],["id","shareFilePath",3,"share"],[1,"d-flex","flex-column","align-items-start","col-4","px-0"],["for","created","l10nTranslate",""],["id","created"],[1,"d-flex","flex-column","align-items-center","col-4","px-0"],["for","modified","l10nTranslate",""],["id","modified"],[1,"d-flex","flex-column","align-items-end","col-4","text-danger","px-0"],["for","disabled","l10nTranslate",""],["id","disabled"],["l10nTranslate","",1,"ms-2","me-1"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-danger",3,"disabled"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-danger",3,"click","disabled"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-success",3,"click"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-warning"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-warning",3,"click"]],template:function(i,r){i&1&&(l(0,"div",0)(1,"h4",1),C(2,"fa-icon",2),g(3,io,2,1,"span")(4,no,2,0,"span",3)(5,ro,1,1,"fa-icon",4),d(),g(6,oo,3,0,"h4",5),l(7,"button",6),b("click",function(){return r.layout.closeDialog()}),d()(),l(8,"div",7)(9,"tabset",8),C(10,"hr",9),l(11,"tab",10),b("selectTab",function(){return r.tabView=null}),g(12,so,3,1,"ng-template",11),l(13,"div",12)(14,"div",13)(15,"div",14)(16,"label",15),p(17," Share name "),d(),l(18,"input",16),et("ngModelChange",function(s){return Ze(r.share.name,s)||(r.share.name=s),s}),d()(),l(19,"div",14)(20,"label",17),p(21," Description "),d(),l(22,"input",18),et("ngModelChange",function(s){return Ze(r.share.description,s)||(r.share.description=s),s}),d()(),l(23,"div",19)(24,"label",20),p(25,"Share status"),d(),l(26,"div",21)(27,"input",22),et("ngModelChange",function(s){return Ze(r.share.enabled,s)||(r.share.enabled=s),s}),d(),l(28,"label",23),p(29),d()()()(),l(30,"div",24),g(31,ao,4,1,"div",19),l(32,"div",25)(33,"label",26),p(34,"Shared from"),d(),C(35,"app-share-repository",27),d(),l(36,"div",25)(37,"label",28),p(38,"File permissions"),d(),l(39,"div",29),C(40,"app-file-permissions",30),d()(),g(41,lo,14,7,"div",31),d()()(),l(42,"tab",32),b("selectTab",function(){return r.tabView="members"}),g(43,fo,5,2,"ng-template",11),l(44,"div",9)(45,"app-user-search",33),et("membersChange",function(s){return Ze(r.share.members,s)||(r.share.members=s),s}),d()()(),l(46,"tab",32),b("selectTab",function(){return r.tabView="links"}),g(47,uo,5,2,"ng-template",11),l(48,"div",9)(49,"app-user-search",34),et("membersChange",function(s){return Ze(r.share.links,s)||(r.share.links=s),s}),d()()()()(),l(50,"div",35),g(51,vo,2,1)(52,go,4,2,"button",36),l(53,"button",37),b("click",function(){return r.onCancel()}),p(54,"Cancel"),d(),l(55,"button",38),b("click",function(){return r.onSubmit()}),p(56),d()()),i&2&&(c(2),f("icon",r.icons.SHARED),c(),A(r.share.id?3:4),c(2),A(r.loading?5:-1),c(),A(r.share.id?6:-1),c(),kt("btn-close btn-close-white ",r.share.id?"ms-2":"ms-auto"," ms-2"),c(2),f("justified",!0),c(9),kt("form-control form-control-sm ",r.share.name?"":"is-invalid",""),Je("ngModel",r.share.name),c(4),Je("ngModel",r.share.description),c(5),Je("ngModel",r.share.enabled),c(2),J(" ",r.share.enabled?"enabled":"disabled"," "),c(2),A(r.share.file!=null&&r.share.file.name||r.share.externalPath?31:-1),c(4),f("share",r.share)("showFullPath",!0),c(5),f("permissions",r.share.hPerms)("replaceEmptyPermissions",!0),c(),A(r.share!=null&&r.share.id?41:-1),c(4),Je("members",r.share.members),f("withPermissions",!0)("filterPermissions",!0)("allowedPermissions",r.allowedPermissions)("searchFunction",r.searchMembers.bind(r)),c(4),Je("members",r.share.links),f("filterPermissions",!0)("allowedPermissions",r.allowedPermissions)("withPermissions",!0)("editFunction",r.openEditLinkDialog.bind(r))("hideInput",!0),c(2),A(r.tabView?-1:51),c(),A(r.tabView==="links"?52:-1),c(3),kt("btn btn-sm ",r.confirmDeletion?"btn-danger":"btn-primary",""),f("disabled",r.cantSubmit()),c(),J(" ",r.confirmDeletion?"Confirm deletion":"Confirm"," "))},dependencies:[se,oe,t2,s2,r2,n2,o2,Qt,Dn,$t,On,Ut,qt,Wt,Gt,a2,d2,A1,p2],encapsulation:2})}}return t})();var xi=class{constructor(n){this.isShareLink=!1,Object.assign(this,n),this.owner.avatarUrl=Zn(this.owner.login),this.isShareLink=this.type===l2.LINK,this.setMimeUrl()}fallBackMimeUrl(){this.mimeUrl=at}setMimeUrl(){!this.file||this.file.mime===Me?this.mimeUrl=je(f2):this.mimeUrl=je(this.file.mime)}};var O1=t=>({$implicit:t}),bo=(t,n)=>n.id;function Co(t,n){if(t&1&&C(0,"fa-icon",17),t&2){let e=u(3);f("icon",e.icons.LINKS)}}function _o(t,n){t&1&&ye(0)}function yo(t,n){if(t&1&&(l(0,"ul"),g(1,_o,1,0,"ng-container",10),d()),t&2){let e=u().$implicit;u(2);let i=wi(15);c(),f("ngTemplateOutlet",i)("ngTemplateOutletContext",_t(2,O1,e.children))}}function So(t,n){if(t&1){let e=P();l(0,"li")(1,"div",14),b("click",function(){let r=S(e).$implicit,o=u(2);return x(o.onSelect(r))})("dblclick",function(){S(e);let r=u(2);return x(r.openChildShare())}),l(2,"div",15)(3,"img",16),b("error",function(){let r=S(e).$implicit;return x(r.fallBackMimeUrl())}),d(),g(4,Co,1,1,"fa-icon",17),l(5,"span",18),p(6),d()(),l(7,"div",19)(8,"span",20),p(9),d(),C(10,"app-user-avatar",21),d()(),g(11,yo,2,4,"ul"),d()}if(t&2){let e=n.$implicit,i=u(2);c(),G("selected",i.selected&&i.selected.id===e.id),c(2),f("src",e.mimeUrl,Ft),c(),A(e.isShareLink?4:-1),c(2),F(e.name),c(3),F(e.owner.fullName),c(),f("user",e.owner)("height",26)("width",26),c(),A((e.children==null?null:e.children.length)>0?11:-1)}}function xo(t,n){if(t&1&&_n(0,So,12,10,"li",null,bo),t&2){let e=n.$implicit,i=u();yn(i.toShares(e))}}function Eo(t,n){t&1&&ye(0)}var zc=(()=>{class t{constructor(e,i,r,o){this.layout=e,this.sharesService=i,this.linksService=r,this.spacesService=o,this.fromAdmin=!1,this.sharesCountEvent=new B,this.icons={SHARED:q.SHARED_WITH_OTHERS,LINKS:q.LINKS},this.loading=!1,this.childSharesLength=0}ngOnInit(){this.loadChildShares()}toShares(e){return e}loadChildShares(){this.loading=!0;let e;if(this.share)e=this.sharesService.listChildShares(this.share.id);else if(this.space)e=this.spacesService.listSpaceShares(this.space.id);else{console.error("share or space not defined");return}e.subscribe({next:i=>{this.childSharesLength=i.length,this.sharesCountEvent.emit(i.length),this.setShares(i.map(r=>new xi(r))),this.loading=!1},error:i=>{this.childShares=[],this.childSharesLength=0,this.loading=!1,this.layout.sendNotification("error","Child shares",i.error.message)}})}onSelect(e){this.selected=e}openChildShare(){if(this.selected.isShareLink){let e;if(this.share)e=this.linksService.shareLinkChild(this.share.id,this.selected.id);else if(this.space)e=this.spacesService.getSpaceShareLink(this.space.id,this.selected.id);else{console.error("share or space not defined");return}e.subscribe({next:i=>{this.layout.openDialog(u2,"md",{initialState:{share:i}}).content.shareChange.pipe(Ye(1)).subscribe(o=>{let[s,a]=o;s==="update"?this.selected.name=a.name:this.loadChildShares()})},error:i=>this.layout.sendNotification("error","Edit children shares",this.selected.name,i)})}else{let e;if(this.share)e=this.sharesService.getShareChild(this.share.id,this.selected.id);else if(this.space)e=this.spacesService.getSpaceShare(this.space.id,this.selected.id);else{console.error("share or space not defined");return}e.subscribe({next:i=>{this.layout.openDialog(w1,"lg",{initialState:ze(Q(Q({},this.share?{parentShareId:this.share.id}:{}),this.space?{parentSpaceId:this.space.id}:{}),{share:i})}).content.shareChange.pipe(Ye(1)).subscribe(o=>{let[s,a]=o;s==="update"?(this.selected.name=a.name,this.selected.alias=a.alias):this.loadChildShares()})},error:i=>this.layout.sendNotification("error","Edit children shares",this.selected.name,i)})}}setShares(e){let i={id:this.share?.id||0,children:[]};this.recurseChildrenShares(e,i),this.childShares=i.children}recurseChildrenShares(e,i){for(let r of e)r.parentId===i.id?(i.children=i.children??[],i.children.push(r),this.recurseChildrenShares(e,r)):i.id===0&&!r.parentId&&(i.children=i.children??[],i.children.push(r),this.recurseChildrenShares(e,r))}static{this.\u0275fac=function(i){return new(i||t)(v(H),v(Jt),v(Zt),v(ct))}}static{this.\u0275cmp=w({type:t,selectors:[["app-shared-children-dialog"]],inputs:{fromAdmin:"fromAdmin",share:"share",space:"space"},outputs:{sharesCountEvent:"sharesCountEvent"},decls:22,vars:9,consts:[["recursiveList",""],[1,"modal-header","align-items-center"],[1,"modal-title","w-100"],[1,"d-flex"],[1,"me-2",3,"icon"],[1,"ms-auto","me-2"],["l10nTranslate",""],["aria-label","Close","type","button",1,"btn-close","btn-close-white",3,"click"],["appAutoResize","",1,"modal-body",2,"padding-right","24px",3,"resizeOffset"],[1,"tree"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"modal-footer"],["l10nTranslate","","type","button",1,"btn","btn-sm","btn-primary",3,"click","disabled"],["data-dismiss","modal","l10nTranslate","","type","button",1,"btn","btn-sm","btn-secondary",3,"click"],[1,"app-div-hovered",3,"click","dblclick"],[1,"me-auto","text-truncate"],["alt","","draggable","false","height","28",3,"error","src"],[1,"align-middle","ms-1",3,"icon"],[1,"ms-1","align-middle"],[1,"d-flex","align-items-center"],[1,"fs-xxxs","me-2"],["tooltipPlacement","top","container","body",3,"user","height","width"]],template:function(i,r){if(i&1){let o=P();l(0,"div",1)(1,"h4",2)(2,"div",3)(3,"div"),C(4,"fa-icon",4),l(5,"span"),p(6),d()(),l(7,"div",5)(8,"span",6),p(9,"Child shares"),d(),p(10),d()()(),l(11,"button",7),b("click",function(){return S(o),x(r.layout.closeDialog())}),d()(),l(12,"div",8)(13,"ul",9),g(14,xo,2,0,"ng-template",null,0,St)(16,Eo,1,0,"ng-container",10),d()(),l(17,"div",11)(18,"button",12),b("click",function(){return S(o),x(r.openChildShare())}),p(19,"Edit"),d(),l(20,"button",13),b("click",function(){return S(o),x(r.layout.closeDialog())}),p(21,"Close"),d()()}if(i&2){let o=wi(15);c(4),f("icon",r.icons.SHARED),c(2),F((r.share==null?null:r.share.name)||(r.space==null?null:r.space.name)),c(4),J("\xA0(",r.childSharesLength,") "),c(2),f("resizeOffset",170),c(4),f("ngTemplateOutlet",o)("ngTemplateOutletContext",_t(7,O1,r.childShares)),c(2),f("disabled",!r.selected)}},dependencies:[Ci,ke,oe,se,i2],styles:[`ul.tree[_ngcontent-%COMP%], ul.tree[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{list-style:none;margin:0;padding:0}ul.tree[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{margin-left:18px}ul.tree[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{margin:0;padding:0;line-height:30px;border-left:1px solid rgb(100,100,100);white-space:nowrap}ul.tree[_ngcontent-%COMP%] li[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{display:inline-flex;width:100%;cursor:pointer;border-radius:4px}ul.tree[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:last-child{border-left:none}ul.tree[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:before{position:relative;top:-.3em;height:1.2rem;width:1rem;color:#fff;border-bottom:1px solid rgb(100,100,100);content:"";display:inline-block}ul.tree[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:last-child:before{border-left:1px solid rgb(100,100,100)}
19
-
20
-
21
-
22
-
23
-
24
- `]})}}return t})();export{ts as a,is as b,Ci as c,No as d,Mo as e,Lo as f,Ao as g,wo as h,h2 as i,Oo as j,Do as k,zo as l,To as m,ei as n,y as o,on as p,ls as q,ds as r,an as s,fs as t,Ke as u,S1 as v,x1 as w,m2 as x,E1 as y,N1 as z,L1 as A,w1 as B,zc as C};