@sync-in/server 1.4.0 → 1.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (229) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/README.md +2 -1
  3. package/package.json +5 -5
  4. package/server/applications/comments/comments.controller.spec.js +103 -4
  5. package/server/applications/comments/comments.controller.spec.js.map +1 -1
  6. package/server/applications/comments/services/comments-manager.service.spec.js +409 -9
  7. package/server/applications/comments/services/comments-manager.service.spec.js.map +1 -1
  8. package/server/applications/files/adapters/files-indexer-mysql.service.spec.js +333 -0
  9. package/server/applications/files/adapters/files-indexer-mysql.service.spec.js.map +1 -0
  10. package/server/applications/files/constants/routes.js +6 -1
  11. package/server/applications/files/constants/routes.js.map +1 -1
  12. package/server/applications/files/files-only-office.controller.js +11 -0
  13. package/server/applications/files/files-only-office.controller.js.map +1 -1
  14. package/server/applications/files/files-only-office.controller.spec.js +97 -3
  15. package/server/applications/files/files-only-office.controller.spec.js.map +1 -1
  16. package/server/applications/files/files-tasks.controller.spec.js +91 -1
  17. package/server/applications/files/files-tasks.controller.spec.js.map +1 -1
  18. package/server/applications/files/files.controller.spec.js +268 -46
  19. package/server/applications/files/files.controller.spec.js.map +1 -1
  20. package/server/applications/files/guards/files-only-office.guard.spec.js +77 -1
  21. package/server/applications/files/guards/files-only-office.guard.spec.js.map +1 -1
  22. package/server/applications/files/services/files-only-office-manager.service.js +5 -0
  23. package/server/applications/files/services/files-only-office-manager.service.js.map +1 -1
  24. package/server/applications/links/links.controller.spec.js +91 -58
  25. package/server/applications/links/links.controller.spec.js.map +1 -1
  26. package/server/applications/links/services/links-manager.service.js +4 -6
  27. package/server/applications/links/services/links-manager.service.js.map +1 -1
  28. package/server/applications/links/services/links-manager.service.spec.js +378 -14
  29. package/server/applications/links/services/links-manager.service.spec.js.map +1 -1
  30. package/server/applications/links/services/links-queries.service.js +1 -1
  31. package/server/applications/links/services/links-queries.service.js.map +1 -1
  32. package/server/applications/notifications/notifications.controller.spec.js +56 -1
  33. package/server/applications/notifications/notifications.controller.spec.js.map +1 -1
  34. package/server/applications/notifications/services/notifications-manager.service.spec.js +461 -5
  35. package/server/applications/notifications/services/notifications-manager.service.spec.js.map +1 -1
  36. package/server/applications/shares/services/shares-manager.service.spec.js +590 -14
  37. package/server/applications/shares/services/shares-manager.service.spec.js.map +1 -1
  38. package/server/applications/sync/interceptors/sync-diff-gzip-body.interceptor.spec.js +120 -0
  39. package/server/applications/sync/interceptors/sync-diff-gzip-body.interceptor.spec.js.map +1 -0
  40. package/server/applications/sync/services/sync-clients-manager.service.spec.js +548 -8
  41. package/server/applications/sync/services/sync-clients-manager.service.spec.js.map +1 -1
  42. package/server/applications/sync/services/sync-manager.service.spec.js +837 -5
  43. package/server/applications/sync/services/sync-manager.service.spec.js.map +1 -1
  44. package/server/applications/sync/services/sync-paths-manager.service.spec.js +900 -7
  45. package/server/applications/sync/services/sync-paths-manager.service.spec.js.map +1 -1
  46. package/server/applications/users/services/admin-users-manager.service.js +22 -24
  47. package/server/applications/users/services/admin-users-manager.service.js.map +1 -1
  48. package/server/applications/users/services/admin-users-manager.service.spec.js +763 -17
  49. package/server/applications/users/services/admin-users-manager.service.spec.js.map +1 -1
  50. package/server/applications/users/services/users-manager.service.js +1 -1
  51. package/server/applications/users/services/users-manager.service.js.map +1 -1
  52. package/server/applications/users/services/users-manager.service.spec.js +938 -49
  53. package/server/applications/users/services/users-manager.service.spec.js.map +1 -1
  54. package/server/applications/webdav/decorators/if-header.decorator.js +4 -1
  55. package/server/applications/webdav/decorators/if-header.decorator.js.map +1 -1
  56. package/server/applications/webdav/filters/webdav.filter.spec.js +77 -0
  57. package/server/applications/webdav/filters/webdav.filter.spec.js.map +1 -0
  58. package/server/applications/webdav/guards/webdav-protocol.guard.js +3 -7
  59. package/server/applications/webdav/guards/webdav-protocol.guard.js.map +1 -1
  60. package/server/applications/webdav/guards/webdav-protocol.guard.spec.js +580 -0
  61. package/server/applications/webdav/guards/webdav-protocol.guard.spec.js.map +1 -0
  62. package/server/applications/webdav/services/webdav-methods.service.spec.js +1582 -3
  63. package/server/applications/webdav/services/webdav-methods.service.spec.js.map +1 -1
  64. package/server/applications/webdav/services/webdav-spaces.service.spec.js +390 -2
  65. package/server/applications/webdav/services/webdav-spaces.service.spec.js.map +1 -1
  66. package/server/applications/webdav/webdav.controller.js +2 -2
  67. package/server/applications/webdav/webdav.controller.js.map +1 -1
  68. package/server/authentication/guards/auth-basic.guard.js.map +1 -1
  69. package/server/authentication/guards/auth-digest.guard.js +1 -2
  70. package/server/authentication/guards/auth-digest.guard.js.map +1 -1
  71. package/server/authentication/guards/auth-local.guard.js.map +1 -1
  72. package/server/infrastructure/context/interceptors/context.interceptor.spec.js +135 -0
  73. package/server/infrastructure/context/interceptors/context.interceptor.spec.js.map +1 -0
  74. package/static/3rdpartylicenses.txt +26 -26
  75. package/static/assets/pdfjs/build/pdf.mjs +1177 -255
  76. package/static/assets/pdfjs/build/pdf.mjs.map +1 -1
  77. package/static/assets/pdfjs/build/pdf.sandbox.mjs +25 -2
  78. package/static/assets/pdfjs/build/pdf.sandbox.mjs.map +1 -1
  79. package/static/assets/pdfjs/build/pdf.worker.mjs +140 -16
  80. package/static/assets/pdfjs/build/pdf.worker.mjs.map +1 -1
  81. package/static/assets/pdfjs/version +1 -1
  82. package/static/assets/pdfjs/web/debugger.css +31 -0
  83. package/static/assets/pdfjs/web/debugger.mjs +144 -2
  84. package/static/assets/pdfjs/web/images/comment-editButton.svg +6 -1
  85. package/static/assets/pdfjs/web/locale/ach/viewer.ftl +0 -63
  86. package/static/assets/pdfjs/web/locale/af/viewer.ftl +0 -71
  87. package/static/assets/pdfjs/web/locale/an/viewer.ftl +0 -63
  88. package/static/assets/pdfjs/web/locale/ast/viewer.ftl +0 -60
  89. package/static/assets/pdfjs/web/locale/az/viewer.ftl +0 -63
  90. package/static/assets/pdfjs/web/locale/be/viewer.ftl +38 -0
  91. package/static/assets/pdfjs/web/locale/bg/viewer.ftl +0 -37
  92. package/static/assets/pdfjs/web/locale/bn/viewer.ftl +0 -63
  93. package/static/assets/pdfjs/web/locale/bo/viewer.ftl +0 -63
  94. package/static/assets/pdfjs/web/locale/br/viewer.ftl +0 -37
  95. package/static/assets/pdfjs/web/locale/brx/viewer.ftl +0 -63
  96. package/static/assets/pdfjs/web/locale/bs/viewer.ftl +22 -0
  97. package/static/assets/pdfjs/web/locale/ca/viewer.ftl +0 -54
  98. package/static/assets/pdfjs/web/locale/cak/viewer.ftl +0 -54
  99. package/static/assets/pdfjs/web/locale/ckb/viewer.ftl +0 -63
  100. package/static/assets/pdfjs/web/locale/cs/viewer.ftl +38 -0
  101. package/static/assets/pdfjs/web/locale/cy/viewer.ftl +38 -0
  102. package/static/assets/pdfjs/web/locale/da/viewer.ftl +38 -0
  103. package/static/assets/pdfjs/web/locale/de/viewer.ftl +38 -0
  104. package/static/assets/pdfjs/web/locale/dsb/viewer.ftl +38 -0
  105. package/static/assets/pdfjs/web/locale/el/viewer.ftl +38 -0
  106. package/static/assets/pdfjs/web/locale/en-CA/viewer.ftl +38 -0
  107. package/static/assets/pdfjs/web/locale/en-GB/viewer.ftl +38 -0
  108. package/static/assets/pdfjs/web/locale/en-US/viewer.ftl +25 -0
  109. package/static/assets/pdfjs/web/locale/eo/viewer.ftl +38 -0
  110. package/static/assets/pdfjs/web/locale/es-AR/viewer.ftl +38 -0
  111. package/static/assets/pdfjs/web/locale/es-CL/viewer.ftl +38 -0
  112. package/static/assets/pdfjs/web/locale/es-MX/viewer.ftl +0 -6
  113. package/static/assets/pdfjs/web/locale/et/viewer.ftl +0 -57
  114. package/static/assets/pdfjs/web/locale/fa/viewer.ftl +0 -37
  115. package/static/assets/pdfjs/web/locale/ff/viewer.ftl +0 -63
  116. package/static/assets/pdfjs/web/locale/fi/viewer.ftl +38 -0
  117. package/static/assets/pdfjs/web/locale/fr/viewer.ftl +38 -0
  118. package/static/assets/pdfjs/web/locale/fy-NL/viewer.ftl +38 -0
  119. package/static/assets/pdfjs/web/locale/ga-IE/viewer.ftl +0 -71
  120. package/static/assets/pdfjs/web/locale/gd/viewer.ftl +0 -54
  121. package/static/assets/pdfjs/web/locale/gl/viewer.ftl +8 -0
  122. package/static/assets/pdfjs/web/locale/gn/viewer.ftl +38 -0
  123. package/static/assets/pdfjs/web/locale/gu-IN/viewer.ftl +0 -63
  124. package/static/assets/pdfjs/web/locale/he/viewer.ftl +38 -0
  125. package/static/assets/pdfjs/web/locale/hi-IN/viewer.ftl +0 -60
  126. package/static/assets/pdfjs/web/locale/hsb/viewer.ftl +38 -0
  127. package/static/assets/pdfjs/web/locale/hu/viewer.ftl +38 -0
  128. package/static/assets/pdfjs/web/locale/hy-AM/viewer.ftl +0 -49
  129. package/static/assets/pdfjs/web/locale/hye/viewer.ftl +0 -60
  130. package/static/assets/pdfjs/web/locale/ia/viewer.ftl +38 -0
  131. package/static/assets/pdfjs/web/locale/is/viewer.ftl +0 -3
  132. package/static/assets/pdfjs/web/locale/it/viewer.ftl +31 -0
  133. package/static/assets/pdfjs/web/locale/ja/viewer.ftl +8 -0
  134. package/static/assets/pdfjs/web/locale/ka/viewer.ftl +48 -10
  135. package/static/assets/pdfjs/web/locale/kab/viewer.ftl +5 -0
  136. package/static/assets/pdfjs/web/locale/kk/viewer.ftl +8 -0
  137. package/static/assets/pdfjs/web/locale/km/viewer.ftl +0 -63
  138. package/static/assets/pdfjs/web/locale/kn/viewer.ftl +0 -71
  139. package/static/assets/pdfjs/web/locale/ko/viewer.ftl +38 -0
  140. package/static/assets/pdfjs/web/locale/lij/viewer.ftl +0 -63
  141. package/static/assets/pdfjs/web/locale/lo/viewer.ftl +0 -54
  142. package/static/assets/pdfjs/web/locale/lt/viewer.ftl +0 -60
  143. package/static/assets/pdfjs/web/locale/ltg/viewer.ftl +0 -63
  144. package/static/assets/pdfjs/web/locale/lv/viewer.ftl +0 -63
  145. package/static/assets/pdfjs/web/locale/meh/viewer.ftl +0 -75
  146. package/static/assets/pdfjs/web/locale/mk/viewer.ftl +0 -63
  147. package/static/assets/pdfjs/web/locale/ml/viewer.ftl +0 -3
  148. package/static/assets/pdfjs/web/locale/mr/viewer.ftl +0 -63
  149. package/static/assets/pdfjs/web/locale/ms/viewer.ftl +0 -63
  150. package/static/assets/pdfjs/web/locale/my/viewer.ftl +0 -71
  151. package/static/assets/pdfjs/web/locale/nb-NO/viewer.ftl +44 -6
  152. package/static/assets/pdfjs/web/locale/ne-NP/viewer.ftl +0 -71
  153. package/static/assets/pdfjs/web/locale/nl/viewer.ftl +38 -0
  154. package/static/assets/pdfjs/web/locale/nn-NO/viewer.ftl +45 -1
  155. package/static/assets/pdfjs/web/locale/oc/viewer.ftl +0 -31
  156. package/static/assets/pdfjs/web/locale/pa-IN/viewer.ftl +38 -0
  157. package/static/assets/pdfjs/web/locale/pl/viewer.ftl +39 -1
  158. package/static/assets/pdfjs/web/locale/pt-BR/viewer.ftl +38 -0
  159. package/static/assets/pdfjs/web/locale/ro/viewer.ftl +355 -1
  160. package/static/assets/pdfjs/web/locale/ru/viewer.ftl +38 -0
  161. package/static/assets/pdfjs/web/locale/sat/viewer.ftl +0 -54
  162. package/static/assets/pdfjs/web/locale/sc/viewer.ftl +0 -38
  163. package/static/assets/pdfjs/web/locale/scn/viewer.ftl +0 -92
  164. package/static/assets/pdfjs/web/locale/sco/viewer.ftl +0 -60
  165. package/static/assets/pdfjs/web/locale/si/viewer.ftl +0 -51
  166. package/static/assets/pdfjs/web/locale/sk/viewer.ftl +38 -0
  167. package/static/assets/pdfjs/web/locale/skr/viewer.ftl +0 -27
  168. package/static/assets/pdfjs/web/locale/sl/viewer.ftl +8 -0
  169. package/static/assets/pdfjs/web/locale/son/viewer.ftl +0 -71
  170. package/static/assets/pdfjs/web/locale/sr/viewer.ftl +0 -33
  171. package/static/assets/pdfjs/web/locale/sv-SE/viewer.ftl +38 -0
  172. package/static/assets/pdfjs/web/locale/szl/viewer.ftl +0 -63
  173. package/static/assets/pdfjs/web/locale/ta/viewer.ftl +0 -63
  174. package/static/assets/pdfjs/web/locale/te/viewer.ftl +0 -60
  175. package/static/assets/pdfjs/web/locale/tg/viewer.ftl +38 -0
  176. package/static/assets/pdfjs/web/locale/tl/viewer.ftl +0 -63
  177. package/static/assets/pdfjs/web/locale/tr/viewer.ftl +40 -2
  178. package/static/assets/pdfjs/web/locale/trs/viewer.ftl +0 -72
  179. package/static/assets/pdfjs/web/locale/ur/viewer.ftl +0 -60
  180. package/static/assets/pdfjs/web/locale/uz/viewer.ftl +0 -71
  181. package/static/assets/pdfjs/web/locale/vi/viewer.ftl +38 -0
  182. package/static/assets/pdfjs/web/locale/wo/viewer.ftl +0 -77
  183. package/static/assets/pdfjs/web/locale/xh/viewer.ftl +0 -71
  184. package/static/assets/pdfjs/web/locale/zh-CN/viewer.ftl +38 -0
  185. package/static/assets/pdfjs/web/locale/zh-TW/viewer.ftl +38 -0
  186. package/static/assets/pdfjs/web/viewer.css +649 -120
  187. package/static/assets/pdfjs/web/viewer.html +19 -0
  188. package/static/assets/pdfjs/web/viewer.mjs +489 -38
  189. package/static/assets/pdfjs/web/viewer.mjs.map +1 -1
  190. package/static/chunk-22EANI6R.js +1 -0
  191. package/static/{chunk-N2LYWNTC.js → chunk-2456KVFZ.js} +1 -1
  192. package/static/{chunk-YCINY2YI.js → chunk-2LVCLKCK.js} +1 -1
  193. package/static/{chunk-5YKWZT33.js → chunk-2V5S7DWD.js} +1 -1
  194. package/static/{chunk-3GC2BQZD.js → chunk-44YDXGNZ.js} +1 -1
  195. package/static/{chunk-W3QXNDI5.js → chunk-4LSJLWYV.js} +1 -1
  196. package/static/{chunk-T55FAU2O.js → chunk-4UT5VH7R.js} +1 -1
  197. package/static/{chunk-VMQMD36Z.js → chunk-5GOMMRRE.js} +1 -1
  198. package/static/{chunk-TXPODW5Q.js → chunk-5J4VRDKB.js} +1 -1
  199. package/static/{chunk-FQ4AFNGE.js → chunk-6PVKNZ7Q.js} +1 -1
  200. package/static/{chunk-XE5YHU5J.js → chunk-BIUNUYZ5.js} +1 -1
  201. package/static/{chunk-X43VWRFP.js → chunk-DFQKHCDR.js} +1 -1
  202. package/static/{chunk-TDQAEVZN.js → chunk-EE2TDTY4.js} +1 -1
  203. package/static/{chunk-MOVWEZ7J.js → chunk-ESNDJ5T6.js} +1 -1
  204. package/static/{chunk-TCFKH6K6.js → chunk-GDKKLLEU.js} +1 -1
  205. package/static/{chunk-VHYIXL7R.js → chunk-GSR2MCQG.js} +1 -1
  206. package/static/{chunk-LJIGRUEF.js → chunk-HR7KS5BR.js} +1 -1
  207. package/static/chunk-HW2H3ISM.js +559 -0
  208. package/static/{chunk-HZA7R43P.js → chunk-IMB3C547.js} +1 -1
  209. package/static/{chunk-B2Y2RNFP.js → chunk-J4ALHUDX.js} +1 -1
  210. package/static/{chunk-PF4K7MVG.js → chunk-KP6LSQTK.js} +1 -1
  211. package/static/{chunk-C23BPTJZ.js → chunk-LUZCOHFN.js} +1 -1
  212. package/static/{chunk-GBCYYDCI.js → chunk-MHSCCXVL.js} +1 -1
  213. package/static/{chunk-PY3BGNJN.js → chunk-OMRQYBXV.js} +1 -1
  214. package/static/chunk-P7CTJ5BG.js +27 -0
  215. package/static/{chunk-Y2CDUS4J.js → chunk-P7PX67IR.js} +4 -4
  216. package/static/{chunk-VMUOUCEI.js → chunk-PPO7DBVO.js} +1 -1
  217. package/static/{chunk-TTQ37MUV.js → chunk-RSS6GYNE.js} +1 -1
  218. package/static/{chunk-WWIC7UW3.js → chunk-SLGGINMR.js} +1 -1
  219. package/static/{chunk-KZQCFEPT.js → chunk-UHD5XD3G.js} +1 -1
  220. package/static/{chunk-TNW2CGK6.js → chunk-UPYYAJCJ.js} +1 -1
  221. package/static/{chunk-6F55D74O.js → chunk-VHYPQ3D4.js} +1 -1
  222. package/static/{chunk-DGVNNICG.js → chunk-YQSDS6BO.js} +1 -1
  223. package/static/{chunk-MTRNPGS4.js → chunk-ZC5NIT55.js} +1 -1
  224. package/static/index.html +1 -1
  225. package/static/main-FYD34UEC.js +7 -0
  226. package/static/chunk-RSNLYAN6.js +0 -560
  227. package/static/chunk-WHMS3PJ3.js +0 -24
  228. package/static/chunk-ZZ3LHYOY.js +0 -1
  229. package/static/main-7LDKYVXO.js +0 -10
@@ -0,0 +1,7 @@
1
+ import{a as Tt,c as e3,d as Mo}from"./chunk-5J4VRDKB.js";import{a as Mt,d as q4,e as Jt}from"./chunk-4UT5VH7R.js";import{a as e5,b as n5,c as o5}from"./chunk-PPO7DBVO.js";import{B as i5,C as qi,a as Vo,b as i2,c as t1,d as Bo,e as i3,f as Uo,g as Ho,h as $o,i as Go,j as Wo,k as Gi,l as qo,m as Yo,n as jo,o as V1,p as Ko,q as Qo,r as Xo,s as Zo,t as Jo,u as v2,v as Wi,w as E1,y as t5}from"./chunk-P7CTJ5BG.js";import{a as dt}from"./chunk-J4ALHUDX.js";import{a as n3}from"./chunk-UPYYAJCJ.js";import{a as ho,b as Ri,c as Ii,d as Co}from"./chunk-5GOMMRRE.js";import{b as zo}from"./chunk-JXZCNFW7.js";import{a as ge}from"./chunk-DFQKHCDR.js";import{a as e2}from"./chunk-ZC5NIT55.js";import{a as Be,b as Ue,c as He,d as Oi}from"./chunk-IMB3C547.js";import{a as R1,b as xo,c as vo,f as Ve,h as I1,i as To}from"./chunk-GSR2MCQG.js";import{a as F1,b as Xe,c as Ie,d as Oe}from"./chunk-2V5S7DWD.js";import{a as Eo,b as Vi,c as Fo,d as Io,e as Oo}from"./chunk-SLGGINMR.js";import{a as t3,g as Ro}from"./chunk-2LVCLKCK.js";import{a as yo,b as bo}from"./chunk-6PVKNZ7Q.js";import{a as R0,b as I0,c as O0,d as Yn,e as Jn,f as Te}from"./chunk-YQSDS6BO.js";import{a as B0,b as so,c as fo,f as u1,g as Fi}from"./chunk-ESNDJ5T6.js";import{$a as io,B as bt,Ba as Qn,C as V0,D as U0,Db as Qe,E as H0,Ea as Ke,Eb as co,F as $0,Fa as K4,Fb as mo,G as H4,Gb as Re,H as $4,Ha as Qt,Hb as o1,I as Pi,Ia as Q4,Ib as O,J as G4,Ja as y1,Ka as X4,Kb as po,L as g2,M as zt,Mb as uo,O as Ye,Ob as _o,P as Ai,Pa as Z4,Q as ct,Qa as Et,R as W4,S as Y4,Sa as J4,Sb as So,T as jn,Ta as Xt,Ua as Xn,Ub as go,V as x2,Xa as J1,Za as eo,_a as to,a as Wn,ab as no,b as N0,c as L0,cb as ee,d as k0,db as Ni,eb as Fe,f as vt,fb as v1,gb as B,h as a1,hb as oo,i as ye,ib as Zt,kb as q,l as D0,lb as te,m as qn,mb as wt,nb as mt,ob as ao,p as yt,pa as Yt,q as J2,qa as jt,qb as ro,r as S2,ra as Kt,rb as be,sa as S1,sb as Li,ta as je,tb as pt,u as ei,ua as le,ub as ki,v as z1,vb as Di,w as Ht,wa as Kn,wb as L,x as F0,xa as j4,yb as lo}from"./chunk-P7PX67IR.js";import{b as wo,c as ce,d as t2,e as Bi,f as Ui,g as Po,h as O1,i as Ao,j as Hi,k as No,m as $i,n as Lo,o as ko,p as Do}from"./chunk-22EANI6R.js";import{a as C0,b as j2,c as Bt,d as i1,e as Ut,f as S0,g as g0}from"./chunk-BIUNUYZ5.js";import{$ as O2,$b as H1,$c as K2,$e as gi,Ac as a0,Ae as c4,Af as k4,Bd as w0,Be as m4,Ca as On,Cb as _,Cd as P0,Dc as Vt,Dd as A0,De as hi,Df as Wt,E as Pe,Eb as c,Ec as q2,Ed as Z,Ef as D4,Fa as C2,Fd as D,Fe as Ci,Ff as F4,G as R2,Ga as X,Gc as Q1,Gd as he,Ge as p4,Gf as De,Hd as G0,He as d4,Hf as zi,I as G3,Ib as r1,Ie as f4,If as lt,Ja as H2,Jb as s1,Jc as Y2,Jd as W0,Jf as R4,Ka as Ae,Kb as l1,Kc as r0,Kd as q0,Ke as u4,Kf as I4,L as w1,Lb as C1,Lc as s0,Ld as ti,M as W3,Ma as r,Mb as n1,Mc as l0,Md as ii,Me as _4,Mf as O4,Nb as U,Nc as c0,Nd as Y0,Ne as h4,O as I2,Ob as E,Oc as ot,Od as j0,Oe as C4,Of as Mi,Pa as K3,Pb as p,Pc as m0,Pd as K0,Pe as S4,Pf as Ei,Qa as Ne,Qb as y,Qc as p0,Ra as xt,Rb as k,Rc as d0,Rd as Q0,Re as g4,Sb as Y1,Sc as f0,Sd as X0,Ta as Q3,Tb as c1,Td as Z0,Te as Si,U as q3,Ub as m1,Uc as u0,Ue as Ce,Uf as Se,Vb as p1,Vc as _0,Vd as ni,Ve as x4,Vf as qt,Wb as Vn,Wc as h0,We as $1,Wf as V4,Xa as w,Xb as I,Xd as oi,Xe as rt,Xf as B4,Yb as qe,Yc as x0,Yd as ai,Z as _2,Za as X3,Zb as Bn,Zc as N,Zd as J0,Ze as v4,Zf as wi,_a as Z3,_b as ve,_c as $n,_d as e4,_e as st,_f as U4,aa as f1,ab as V,ac as de,ad as X1,ae as at,af as y4,ba as Rn,bb as h1,bc as e0,be as t4,bf as Z1,ca as D1,cb as $2,cd as Gn,ce as i4,cf as b4,dc as z,de as ri,dg as Zn,ec as e1,ed as _1,ee as si,fc as M,fd as Q2,ff as xi,g as U3,ga as V2,gc as re,ge as li,gf as T4,ha as x,hc as se,hd as v0,he as n4,ib as J3,ie as ci,if as z4,ja as In,jb as h,jc as t0,jd as g1,je as mi,jf as vi,kb as C,kd as X2,ke as pi,kf as ke,lb as q1,lc as P1,ld as y0,le as o4,lf as M4,ma as S,mc as Ot,me as a4,mf as yi,na as g,nb as F,nd as b0,ne as di,oa as Y3,ob as R,oc as Le,od as T0,oe as fi,of as $t,p as u2,pa as B2,pb as d,pd as fe,pf as E4,q as It,qb as s,qc as Un,qd as ue,qe as ui,rb as l,rd as _e,rf as w4,sb as u,sd as z0,sf as P4,t as H3,ta as U2,td as M0,tf as bi,uc as i0,uf as A4,v as ae,vc as G2,vd as E0,vf as Ti,w as $3,wa as j3,wc as n0,wd as x1,we as r4,wf as N4,xc as Hn,xd as Z2,xe as s4,xf as Gt,ya as h2,yb as N1,yc as W2,yd as K,ye as _i,yf as L4,zb as b,zc as o0,ze as l4}from"./chunk-HW2H3ISM.js";import{a as K1,b as it,c as B3,j as nt}from"./chunk-RTRJ3KFH.js";var a5=(()=>{let n=class n{constructor(){this.locale=x(K),this.l10nLoader=x(w0),this.bsLocaleService=x(F0);let t=x(x0);t.fixedWidth=!0,k0("bs5"),Wn("fr",L0),Wn("en",N0),this.l10nLoader.init().then(()=>{bt.default.locale(this.locale.language),this.bsLocaleService.use(this.locale.language)})}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=w({type:n,selectors:[["app-root"]],decls:1,vars:0,template:function(o,a){o&1&&u(0,"router-outlet")},dependencies:[Bt],encapsulation:2});let i=n;return i})();function r5(i){return new f1(3e3,!1)}function Hr(){return new f1(3100,!1)}function $r(){return new f1(3101,!1)}function Gr(i){return new f1(3001,!1)}function Wr(i){return new f1(3003,!1)}function qr(i){return new f1(3004,!1)}function l5(i,n){return new f1(3005,!1)}function c5(){return new f1(3006,!1)}function m5(){return new f1(3007,!1)}function p5(i,n){return new f1(3008,!1)}function d5(i){return new f1(3002,!1)}function f5(i,n,e,t,o){return new f1(3010,!1)}function u5(){return new f1(3011,!1)}function _5(){return new f1(3012,!1)}function h5(){return new f1(3200,!1)}function C5(){return new f1(3202,!1)}function S5(){return new f1(3013,!1)}function g5(i){return new f1(3014,!1)}function x5(i){return new f1(3015,!1)}function v5(i){return new f1(3016,!1)}function y5(i,n){return new f1(3404,!1)}function Yr(i){return new f1(3502,!1)}function b5(i){return new f1(3503,!1)}function T5(){return new f1(3300,!1)}function z5(i){return new f1(3504,!1)}function M5(i){return new f1(3301,!1)}function E5(i,n){return new f1(3302,!1)}function w5(i){return new f1(3303,!1)}function P5(i,n){return new f1(3400,!1)}function A5(i){return new f1(3401,!1)}function N5(i){return new f1(3402,!1)}function L5(i,n){return new f1(3505,!1)}function Ze(i){switch(i.length){case 0:return new yt;case 1:return i[0];default:return new J2(i)}}function s3(i,n,e=new Map,t=new Map){let o=[],a=[],m=-1,f=null;if(n.forEach(v=>{let T=v.get("offset"),A=T==m,P=A&&f||new Map;v.forEach((Y,G)=>{let W=G,J=Y;if(G!=="offset")switch(W=i.normalizePropertyName(W,o),J){case S2:J=e.get(G);break;case ye:J=t.get(G);break;default:J=i.normalizeStyleValue(G,W,J,o);break}P.set(W,J)}),A||a.push(P),f=P,m=T}),o.length)throw Yr(o);return a}function Yi(i,n,e,t){switch(n){case"start":i.onStart(()=>t(e&&o3(e,"start",i)));break;case"done":i.onDone(()=>t(e&&o3(e,"done",i)));break;case"destroy":i.onDestroy(()=>t(e&&o3(e,"destroy",i)));break}}function o3(i,n,e){let t=e.totalTime,o=!!e.disabled,a=ji(i.element,i.triggerName,i.fromState,i.toState,n||i.phaseName,t??i.totalTime,o),m=i._data;return m!=null&&(a._data=m),a}function ji(i,n,e,t,o="",a=0,m){return{element:i,triggerName:n,fromState:e,toState:t,phaseName:o,totalTime:a,disabled:!!m}}function ie(i,n,e){let t=i.get(n);return t||i.set(n,t=e),t}function l3(i){let n=i.indexOf(":"),e=i.substring(1,n),t=i.slice(n+1);return[e,t]}var jr=typeof document>"u"?null:document.documentElement;function Ki(i){let n=i.parentNode||i.host||null;return n===jr?null:n}function Kr(i){return i.substring(1,6)=="ebkit"}var Pt=null,s5=!1;function k5(i){Pt||(Pt=Qr()||{},s5=Pt.style?"WebkitAppearance"in Pt.style:!1);let n=!0;return Pt.style&&!Kr(i)&&(n=i in Pt.style,!n&&s5&&(n="Webkit"+i.charAt(0).toUpperCase()+i.slice(1)in Pt.style)),n}function Qr(){return typeof document<"u"?document.body:null}function c3(i,n){for(;n;){if(n===i)return!0;n=Ki(n)}return!1}function m3(i,n,e){if(e)return Array.from(i.querySelectorAll(n));let t=i.querySelector(n);return t?[t]:[]}var Xr=1e3,p3="{{",Zr="}}",d3="ng-enter",Qi="ng-leave",y2="ng-trigger",b2=".ng-trigger",f3="ng-animating",Xi=".ng-animating";function $e(i){if(typeof i=="number")return i;let n=i.match(/^(-?[\.\d]+)(m?s)/);return!n||n.length<2?0:a3(parseFloat(n[1]),n[2])}function a3(i,n){switch(n){case"s":return i*Xr;default:return i}}function T2(i,n,e){return i.hasOwnProperty("duration")?i:e6(i,n,e)}var Jr=/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i;function e6(i,n,e){let t,o=0,a="";if(typeof i=="string"){let m=i.match(Jr);if(m===null)return n.push(r5(i)),{duration:0,delay:0,easing:""};t=a3(parseFloat(m[1]),m[2]);let f=m[3];f!=null&&(o=a3(parseFloat(f),m[4]));let v=m[5];v&&(a=v)}else t=i;if(!e){let m=!1,f=n.length;t<0&&(n.push(Hr()),m=!0),o<0&&(n.push($r()),m=!0),m&&n.splice(f,0,r5(i))}return{duration:t,delay:o,easing:a}}function D5(i){return i.length?i[0]instanceof Map?i:i.map(n=>new Map(Object.entries(n))):[]}function ze(i,n,e){n.forEach((t,o)=>{let a=Zi(o);e&&!e.has(o)&&e.set(o,i.style[a]),i.style[a]=t})}function ft(i,n){n.forEach((e,t)=>{let o=Zi(t);i.style[o]=""})}function n2(i){return Array.isArray(i)?i.length==1?i[0]:D0(i):i}function F5(i,n,e){let t=n.params||{},o=u3(i);o.length&&o.forEach(a=>{t.hasOwnProperty(a)||e.push(Gr(a))})}var r3=new RegExp(`${p3}\\s*(.+?)\\s*${Zr}`,"g");function u3(i){let n=[];if(typeof i=="string"){let e;for(;e=r3.exec(i);)n.push(e[1]);r3.lastIndex=0}return n}function o2(i,n,e){let t=`${i}`,o=t.replace(r3,(a,m)=>{let f=n[m];return f==null&&(e.push(Wr(m)),f=""),f.toString()});return o==t?i:o}var t6=/-+([a-z0-9])/g;function Zi(i){return i.replace(t6,(...n)=>n[1].toUpperCase())}function R5(i,n){return i===0||n===0}function I5(i,n,e){if(e.size&&n.length){let t=n[0],o=[];if(e.forEach((a,m)=>{t.has(m)||o.push(m),t.set(m,a)}),o.length)for(let a=1;a<n.length;a++){let m=n[a];o.forEach(f=>m.set(f,Ji(i,f)))}}return n}function ne(i,n,e){switch(n.type){case a1.Trigger:return i.visitTrigger(n,e);case a1.State:return i.visitState(n,e);case a1.Transition:return i.visitTransition(n,e);case a1.Sequence:return i.visitSequence(n,e);case a1.Group:return i.visitGroup(n,e);case a1.Animate:return i.visitAnimate(n,e);case a1.Keyframes:return i.visitKeyframes(n,e);case a1.Style:return i.visitStyle(n,e);case a1.Reference:return i.visitReference(n,e);case a1.AnimateChild:return i.visitAnimateChild(n,e);case a1.AnimateRef:return i.visitAnimateRef(n,e);case a1.Query:return i.visitQuery(n,e);case a1.Stagger:return i.visitStagger(n,e);default:throw qr(n.type)}}function Ji(i,n){return window.getComputedStyle(i)[n]}var N3=(()=>{class i{validateStyleProperty(e){return k5(e)}containsElement(e,t){return c3(e,t)}getParentElement(e){return Ki(e)}query(e,t,o){return m3(e,t,o)}computeStyle(e,t,o){return o||""}animate(e,t,o,a,m,f=[],v){return new yt(o,a)}static \u0275fac=function(t){return new(t||i)};static \u0275prov=D1({token:i,factory:i.\u0275fac})}return i})(),Nt=class{static NOOP=new N3},Lt=class{};var i6=new Set(["width","height","minWidth","minHeight","maxWidth","maxHeight","left","top","bottom","right","fontSize","outlineWidth","outlineOffset","paddingTop","paddingLeft","paddingBottom","paddingRight","marginTop","marginLeft","marginBottom","marginRight","borderRadius","borderWidth","borderTopWidth","borderLeftWidth","borderRightWidth","borderBottomWidth","textIndent","perspective"]),an=class extends Lt{normalizePropertyName(n,e){return Zi(n)}normalizeStyleValue(n,e,t,o){let a="",m=t.toString().trim();if(i6.has(e)&&t!==0&&t!=="0")if(typeof t=="number")a="px";else{let f=t.match(/^[+-]?[\d\.]+([a-z]*)$/);f&&f[1].length==0&&o.push(l5(n,t))}return m+a}};var rn="*";function n6(i,n){let e=[];return typeof i=="string"?i.split(/\s*,\s*/).forEach(t=>o6(t,e,n)):e.push(i),e}function o6(i,n,e){if(i[0]==":"){let v=a6(i,e);if(typeof v=="function"){n.push(v);return}i=v}let t=i.match(/^(\*|[-\w]+)\s*(<?[=-]>)\s*(\*|[-\w]+)$/);if(t==null||t.length<4)return e.push(x5(i)),n;let o=t[1],a=t[2],m=t[3];n.push(O5(o,m));let f=o==rn&&m==rn;a[0]=="<"&&!f&&n.push(O5(m,o))}function a6(i,n){switch(i){case":enter":return"void => *";case":leave":return"* => void";case":increment":return(e,t)=>parseFloat(t)>parseFloat(e);case":decrement":return(e,t)=>parseFloat(t)<parseFloat(e);default:return n.push(v5(i)),"* => *"}}var en=new Set(["true","1"]),tn=new Set(["false","0"]);function O5(i,n){let e=en.has(i)||tn.has(i),t=en.has(n)||tn.has(n);return(o,a)=>{let m=i==rn||i==o,f=n==rn||n==a;return!m&&e&&typeof o=="boolean"&&(m=o?en.has(i):tn.has(i)),!f&&t&&typeof a=="boolean"&&(f=a?en.has(n):tn.has(n)),m&&f}}var j5=":self",r6=new RegExp(`s*${j5}s*,?`,"g");function K5(i,n,e,t){return new x3(i).build(n,e,t)}var V5="",x3=class{_driver;constructor(n){this._driver=n}build(n,e,t){let o=new v3(e);return this._resetContextStyleTimingState(o),ne(this,n2(n),o)}_resetContextStyleTimingState(n){n.currentQuerySelector=V5,n.collectedStyles=new Map,n.collectedStyles.set(V5,new Map),n.currentTime=0}visitTrigger(n,e){let t=e.queryCount=0,o=e.depCount=0,a=[],m=[];return n.name.charAt(0)=="@"&&e.errors.push(c5()),n.definitions.forEach(f=>{if(this._resetContextStyleTimingState(e),f.type==a1.State){let v=f,T=v.name;T.toString().split(/\s*,\s*/).forEach(A=>{v.name=A,a.push(this.visitState(v,e))}),v.name=T}else if(f.type==a1.Transition){let v=this.visitTransition(f,e);t+=v.queryCount,o+=v.depCount,m.push(v)}else e.errors.push(m5())}),{type:a1.Trigger,name:n.name,states:a,transitions:m,queryCount:t,depCount:o,options:null}}visitState(n,e){let t=this.visitStyle(n.styles,e),o=n.options&&n.options.params||null;if(t.containsDynamicStyles){let a=new Set,m=o||{};t.styles.forEach(f=>{f instanceof Map&&f.forEach(v=>{u3(v).forEach(T=>{m.hasOwnProperty(T)||a.add(T)})})}),a.size&&e.errors.push(p5(n.name,[...a.values()]))}return{type:a1.State,name:n.name,style:t,options:o?{params:o}:null}}visitTransition(n,e){e.queryCount=0,e.depCount=0;let t=ne(this,n2(n.animation),e),o=n6(n.expr,e.errors);return{type:a1.Transition,matchers:o,animation:t,queryCount:e.queryCount,depCount:e.depCount,options:At(n.options)}}visitSequence(n,e){return{type:a1.Sequence,steps:n.steps.map(t=>ne(this,t,e)),options:At(n.options)}}visitGroup(n,e){let t=e.currentTime,o=0,a=n.steps.map(m=>{e.currentTime=t;let f=ne(this,m,e);return o=Math.max(o,e.currentTime),f});return e.currentTime=o,{type:a1.Group,steps:a,options:At(n.options)}}visitAnimate(n,e){let t=m6(n.timings,e.errors);e.currentAnimateTimings=t;let o,a=n.styles?n.styles:qn({});if(a.type==a1.Keyframes)o=this.visitKeyframes(a,e);else{let m=n.styles,f=!1;if(!m){f=!0;let T={};t.easing&&(T.easing=t.easing),m=qn(T)}e.currentTime+=t.duration+t.delay;let v=this.visitStyle(m,e);v.isEmptyStep=f,o=v}return e.currentAnimateTimings=null,{type:a1.Animate,timings:t,style:o,options:null}}visitStyle(n,e){let t=this._makeStyleAst(n,e);return this._validateStyleAst(t,e),t}_makeStyleAst(n,e){let t=[],o=Array.isArray(n.styles)?n.styles:[n.styles];for(let f of o)typeof f=="string"?f===ye?t.push(f):e.errors.push(d5(f)):t.push(new Map(Object.entries(f)));let a=!1,m=null;return t.forEach(f=>{if(f instanceof Map&&(f.has("easing")&&(m=f.get("easing"),f.delete("easing")),!a)){for(let v of f.values())if(v.toString().indexOf(p3)>=0){a=!0;break}}}),{type:a1.Style,styles:t,easing:m,offset:n.offset,containsDynamicStyles:a,options:null}}_validateStyleAst(n,e){let t=e.currentAnimateTimings,o=e.currentTime,a=e.currentTime;t&&a>0&&(a-=t.duration+t.delay),n.styles.forEach(m=>{typeof m!="string"&&m.forEach((f,v)=>{let T=e.collectedStyles.get(e.currentQuerySelector),A=T.get(v),P=!0;A&&(a!=o&&a>=A.startTime&&o<=A.endTime&&(e.errors.push(f5(v,A.startTime,A.endTime,a,o)),P=!1),a=A.startTime),P&&T.set(v,{startTime:a,endTime:o}),e.options&&F5(f,e.options,e.errors)})})}visitKeyframes(n,e){let t={type:a1.Keyframes,styles:[],options:null};if(!e.currentAnimateTimings)return e.errors.push(u5()),t;let o=1,a=0,m=[],f=!1,v=!1,T=0,A=n.steps.map(A1=>{let L1=this._makeStyleAst(A1,e),G1=L1.offset!=null?L1.offset:c6(L1.styles),B1=0;return G1!=null&&(a++,B1=L1.offset=G1),v=v||B1<0||B1>1,f=f||B1<T,T=B1,m.push(B1),L1});v&&e.errors.push(_5()),f&&e.errors.push(h5());let P=n.steps.length,Y=0;a>0&&a<P?e.errors.push(C5()):a==0&&(Y=o/(P-1));let G=P-1,W=e.currentTime,J=e.currentAnimateTimings,T1=J.duration;return A.forEach((A1,L1)=>{let G1=Y>0?L1==G?1:Y*L1:m[L1],B1=G1*T1;e.currentTime=W+J.delay+B1,J.duration=B1,this._validateStyleAst(A1,e),A1.offset=G1,t.styles.push(A1)}),t}visitReference(n,e){return{type:a1.Reference,animation:ne(this,n2(n.animation),e),options:At(n.options)}}visitAnimateChild(n,e){return e.depCount++,{type:a1.AnimateChild,options:At(n.options)}}visitAnimateRef(n,e){return{type:a1.AnimateRef,animation:this.visitReference(n.animation,e),options:At(n.options)}}visitQuery(n,e){let t=e.currentQuerySelector,o=n.options||{};e.queryCount++,e.currentQuery=n;let[a,m]=s6(n.selector);e.currentQuerySelector=t.length?t+" "+a:a,ie(e.collectedStyles,e.currentQuerySelector,new Map);let f=ne(this,n2(n.animation),e);return e.currentQuery=null,e.currentQuerySelector=t,{type:a1.Query,selector:a,limit:o.limit||0,optional:!!o.optional,includeSelf:m,animation:f,originalSelector:n.selector,options:At(n.options)}}visitStagger(n,e){e.currentQuery||e.errors.push(S5());let t=n.timings==="full"?{duration:0,delay:0,easing:"full"}:T2(n.timings,e.errors,!0);return{type:a1.Stagger,animation:ne(this,n2(n.animation),e),timings:t,options:null}}};function s6(i){let n=!!i.split(/\s*,\s*/).find(e=>e==j5);return n&&(i=i.replace(r6,"")),i=i.replace(/@\*/g,b2).replace(/@\w+/g,e=>b2+"-"+e.slice(1)).replace(/:animating/g,Xi),[i,n]}function l6(i){return i?K1({},i):null}var v3=class{errors;queryCount=0;depCount=0;currentTransition=null;currentQuery=null;currentQuerySelector=null;currentAnimateTimings=null;currentTime=0;collectedStyles=new Map;options=null;unsupportedCSSPropertiesFound=new Set;constructor(n){this.errors=n}};function c6(i){if(typeof i=="string")return null;let n=null;if(Array.isArray(i))i.forEach(e=>{if(e instanceof Map&&e.has("offset")){let t=e;n=parseFloat(t.get("offset")),t.delete("offset")}});else if(i instanceof Map&&i.has("offset")){let e=i;n=parseFloat(e.get("offset")),e.delete("offset")}return n}function m6(i,n){if(i.hasOwnProperty("duration"))return i;if(typeof i=="number"){let a=T2(i,n).duration;return _3(a,0,"")}let e=i;if(e.split(/\s+/).some(a=>a.charAt(0)=="{"&&a.charAt(1)=="{")){let a=_3(0,0,"");return a.dynamic=!0,a.strValue=e,a}let o=T2(e,n);return _3(o.duration,o.delay,o.easing)}function At(i){return i?(i=K1({},i),i.params&&(i.params=l6(i.params))):i={},i}function _3(i,n,e){return{duration:i,delay:n,easing:e}}function L3(i,n,e,t,o,a,m=null,f=!1){return{type:1,element:i,keyframes:n,preStyleProps:e,postStyleProps:t,duration:o,delay:a,totalTime:o+a,easing:m,subTimeline:f}}var M2=class{_map=new Map;get(n){return this._map.get(n)||[]}append(n,e){let t=this._map.get(n);t||this._map.set(n,t=[]),t.push(...e)}has(n){return this._map.has(n)}clear(){this._map.clear()}},p6=1,d6=":enter",f6=new RegExp(d6,"g"),u6=":leave",_6=new RegExp(u6,"g");function Q5(i,n,e,t,o,a=new Map,m=new Map,f,v,T=[]){return new y3().buildKeyframes(i,n,e,t,o,a,m,f,v,T)}var y3=class{buildKeyframes(n,e,t,o,a,m,f,v,T,A=[]){T=T||new M2;let P=new b3(n,e,T,o,a,A,[]);P.options=v;let Y=v.delay?$e(v.delay):0;P.currentTimeline.delayNextStep(Y),P.currentTimeline.setStyles([m],null,P.errors,v),ne(this,t,P);let G=P.timelines.filter(W=>W.containsAnimation());if(G.length&&f.size){let W;for(let J=G.length-1;J>=0;J--){let T1=G[J];if(T1.element===e){W=T1;break}}W&&!W.allowOnlyTimelineStyles()&&W.setStyles([f],null,P.errors,v)}return G.length?G.map(W=>W.buildKeyframes()):[L3(e,[],[],[],0,Y,"",!1)]}visitTrigger(n,e){}visitState(n,e){}visitTransition(n,e){}visitAnimateChild(n,e){let t=e.subInstructions.get(e.element);if(t){let o=e.createSubContext(n.options),a=e.currentTimeline.currentTime,m=this._visitSubInstructions(t,o,o.options);a!=m&&e.transformIntoNewTimeline(m)}e.previousNode=n}visitAnimateRef(n,e){let t=e.createSubContext(n.options);t.transformIntoNewTimeline(),this._applyAnimationRefDelays([n.options,n.animation.options],e,t),this.visitReference(n.animation,t),e.transformIntoNewTimeline(t.currentTimeline.currentTime),e.previousNode=n}_applyAnimationRefDelays(n,e,t){for(let o of n){let a=o?.delay;if(a){let m=typeof a=="number"?a:$e(o2(a,o?.params??{},e.errors));t.delayNextStep(m)}}}_visitSubInstructions(n,e,t){let a=e.currentTimeline.currentTime,m=t.duration!=null?$e(t.duration):null,f=t.delay!=null?$e(t.delay):null;return m!==0&&n.forEach(v=>{let T=e.appendInstructionToTimeline(v,m,f);a=Math.max(a,T.duration+T.delay)}),a}visitReference(n,e){e.updateOptions(n.options,!0),ne(this,n.animation,e),e.previousNode=n}visitSequence(n,e){let t=e.subContextCount,o=e,a=n.options;if(a&&(a.params||a.delay)&&(o=e.createSubContext(a),o.transformIntoNewTimeline(),a.delay!=null)){o.previousNode.type==a1.Style&&(o.currentTimeline.snapshotCurrentStyles(),o.previousNode=sn);let m=$e(a.delay);o.delayNextStep(m)}n.steps.length&&(n.steps.forEach(m=>ne(this,m,o)),o.currentTimeline.applyStylesToKeyframe(),o.subContextCount>t&&o.transformIntoNewTimeline()),e.previousNode=n}visitGroup(n,e){let t=[],o=e.currentTimeline.currentTime,a=n.options&&n.options.delay?$e(n.options.delay):0;n.steps.forEach(m=>{let f=e.createSubContext(n.options);a&&f.delayNextStep(a),ne(this,m,f),o=Math.max(o,f.currentTimeline.currentTime),t.push(f.currentTimeline)}),t.forEach(m=>e.currentTimeline.mergeTimelineCollectedStyles(m)),e.transformIntoNewTimeline(o),e.previousNode=n}_visitTiming(n,e){if(n.dynamic){let t=n.strValue,o=e.params?o2(t,e.params,e.errors):t;return T2(o,e.errors)}else return{duration:n.duration,delay:n.delay,easing:n.easing}}visitAnimate(n,e){let t=e.currentAnimateTimings=this._visitTiming(n.timings,e),o=e.currentTimeline;t.delay&&(e.incrementTime(t.delay),o.snapshotCurrentStyles());let a=n.style;a.type==a1.Keyframes?this.visitKeyframes(a,e):(e.incrementTime(t.duration),this.visitStyle(a,e),o.applyStylesToKeyframe()),e.currentAnimateTimings=null,e.previousNode=n}visitStyle(n,e){let t=e.currentTimeline,o=e.currentAnimateTimings;!o&&t.hasCurrentStyleProperties()&&t.forwardFrame();let a=o&&o.easing||n.easing;n.isEmptyStep?t.applyEmptyStep(a):t.setStyles(n.styles,a,e.errors,e.options),e.previousNode=n}visitKeyframes(n,e){let t=e.currentAnimateTimings,o=e.currentTimeline.duration,a=t.duration,f=e.createSubContext().currentTimeline;f.easing=t.easing,n.styles.forEach(v=>{let T=v.offset||0;f.forwardTime(T*a),f.setStyles(v.styles,v.easing,e.errors,e.options),f.applyStylesToKeyframe()}),e.currentTimeline.mergeTimelineCollectedStyles(f),e.transformIntoNewTimeline(o+a),e.previousNode=n}visitQuery(n,e){let t=e.currentTimeline.currentTime,o=n.options||{},a=o.delay?$e(o.delay):0;a&&(e.previousNode.type===a1.Style||t==0&&e.currentTimeline.hasCurrentStyleProperties())&&(e.currentTimeline.snapshotCurrentStyles(),e.previousNode=sn);let m=t,f=e.invokeQuery(n.selector,n.originalSelector,n.limit,n.includeSelf,!!o.optional,e.errors);e.currentQueryTotal=f.length;let v=null;f.forEach((T,A)=>{e.currentQueryIndex=A;let P=e.createSubContext(n.options,T);a&&P.delayNextStep(a),T===e.element&&(v=P.currentTimeline),ne(this,n.animation,P),P.currentTimeline.applyStylesToKeyframe();let Y=P.currentTimeline.currentTime;m=Math.max(m,Y)}),e.currentQueryIndex=0,e.currentQueryTotal=0,e.transformIntoNewTimeline(m),v&&(e.currentTimeline.mergeTimelineCollectedStyles(v),e.currentTimeline.snapshotCurrentStyles()),e.previousNode=n}visitStagger(n,e){let t=e.parentContext,o=e.currentTimeline,a=n.timings,m=Math.abs(a.duration),f=m*(e.currentQueryTotal-1),v=m*e.currentQueryIndex;switch(a.duration<0?"reverse":a.easing){case"reverse":v=f-v;break;case"full":v=t.currentStaggerTime;break}let A=e.currentTimeline;v&&A.delayNextStep(v);let P=A.currentTime;ne(this,n.animation,e),e.previousNode=n,t.currentStaggerTime=o.currentTime-P+(o.startTime-t.currentTimeline.startTime)}},sn={},b3=class i{_driver;element;subInstructions;_enterClassName;_leaveClassName;errors;timelines;parentContext=null;currentTimeline;currentAnimateTimings=null;previousNode=sn;subContextCount=0;options={};currentQueryIndex=0;currentQueryTotal=0;currentStaggerTime=0;constructor(n,e,t,o,a,m,f,v){this._driver=n,this.element=e,this.subInstructions=t,this._enterClassName=o,this._leaveClassName=a,this.errors=m,this.timelines=f,this.currentTimeline=v||new ln(this._driver,e,0),f.push(this.currentTimeline)}get params(){return this.options.params}updateOptions(n,e){if(!n)return;let t=n,o=this.options;t.duration!=null&&(o.duration=$e(t.duration)),t.delay!=null&&(o.delay=$e(t.delay));let a=t.params;if(a){let m=o.params;m||(m=this.options.params={}),Object.keys(a).forEach(f=>{(!e||!m.hasOwnProperty(f))&&(m[f]=o2(a[f],m,this.errors))})}}_copyOptions(){let n={};if(this.options){let e=this.options.params;if(e){let t=n.params={};Object.keys(e).forEach(o=>{t[o]=e[o]})}}return n}createSubContext(n=null,e,t){let o=e||this.element,a=new i(this._driver,o,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(o,t||0));return a.previousNode=this.previousNode,a.currentAnimateTimings=this.currentAnimateTimings,a.options=this._copyOptions(),a.updateOptions(n),a.currentQueryIndex=this.currentQueryIndex,a.currentQueryTotal=this.currentQueryTotal,a.parentContext=this,this.subContextCount++,a}transformIntoNewTimeline(n){return this.previousNode=sn,this.currentTimeline=this.currentTimeline.fork(this.element,n),this.timelines.push(this.currentTimeline),this.currentTimeline}appendInstructionToTimeline(n,e,t){let o={duration:e??n.duration,delay:this.currentTimeline.currentTime+(t??0)+n.delay,easing:""},a=new T3(this._driver,n.element,n.keyframes,n.preStyleProps,n.postStyleProps,o,n.stretchStartingKeyframe);return this.timelines.push(a),o}incrementTime(n){this.currentTimeline.forwardTime(this.currentTimeline.duration+n)}delayNextStep(n){n>0&&this.currentTimeline.delayNextStep(n)}invokeQuery(n,e,t,o,a,m){let f=[];if(o&&f.push(this.element),n.length>0){n=n.replace(f6,"."+this._enterClassName),n=n.replace(_6,"."+this._leaveClassName);let v=t!=1,T=this._driver.query(this.element,n,v);t!==0&&(T=t<0?T.slice(T.length+t,T.length):T.slice(0,t)),f.push(...T)}return!a&&f.length==0&&m.push(g5(e)),f}},ln=class i{_driver;element;startTime;_elementTimelineStylesLookup;duration=0;easing=null;_previousKeyframe=new Map;_currentKeyframe=new Map;_keyframes=new Map;_styleSummary=new Map;_localTimelineStyles=new Map;_globalTimelineStyles;_pendingStyles=new Map;_backFill=new Map;_currentEmptyStepKeyframe=null;constructor(n,e,t,o){this._driver=n,this.element=e,this.startTime=t,this._elementTimelineStylesLookup=o,this._elementTimelineStylesLookup||(this._elementTimelineStylesLookup=new Map),this._globalTimelineStyles=this._elementTimelineStylesLookup.get(e),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(e,this._localTimelineStyles)),this._loadKeyframe()}containsAnimation(){switch(this._keyframes.size){case 0:return!1;case 1:return this.hasCurrentStyleProperties();default:return!0}}hasCurrentStyleProperties(){return this._currentKeyframe.size>0}get currentTime(){return this.startTime+this.duration}delayNextStep(n){let e=this._keyframes.size===1&&this._pendingStyles.size;this.duration||e?(this.forwardTime(this.currentTime+n),e&&this.snapshotCurrentStyles()):this.startTime+=n}fork(n,e){return this.applyStylesToKeyframe(),new i(this._driver,n,e||this.currentTime,this._elementTimelineStylesLookup)}_loadKeyframe(){this._currentKeyframe&&(this._previousKeyframe=this._currentKeyframe),this._currentKeyframe=this._keyframes.get(this.duration),this._currentKeyframe||(this._currentKeyframe=new Map,this._keyframes.set(this.duration,this._currentKeyframe))}forwardFrame(){this.duration+=p6,this._loadKeyframe()}forwardTime(n){this.applyStylesToKeyframe(),this.duration=n,this._loadKeyframe()}_updateStyle(n,e){this._localTimelineStyles.set(n,e),this._globalTimelineStyles.set(n,e),this._styleSummary.set(n,{time:this.currentTime,value:e})}allowOnlyTimelineStyles(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}applyEmptyStep(n){n&&this._previousKeyframe.set("easing",n);for(let[e,t]of this._globalTimelineStyles)this._backFill.set(e,t||ye),this._currentKeyframe.set(e,ye);this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(n,e,t,o){e&&this._previousKeyframe.set("easing",e);let a=o&&o.params||{},m=h6(n,this._globalTimelineStyles);for(let[f,v]of m){let T=o2(v,a,t);this._pendingStyles.set(f,T),this._localTimelineStyles.has(f)||this._backFill.set(f,this._globalTimelineStyles.get(f)??ye),this._updateStyle(f,T)}}applyStylesToKeyframe(){this._pendingStyles.size!=0&&(this._pendingStyles.forEach((n,e)=>{this._currentKeyframe.set(e,n)}),this._pendingStyles.clear(),this._localTimelineStyles.forEach((n,e)=>{this._currentKeyframe.has(e)||this._currentKeyframe.set(e,n)}))}snapshotCurrentStyles(){for(let[n,e]of this._localTimelineStyles)this._pendingStyles.set(n,e),this._updateStyle(n,e)}getFinalKeyframe(){return this._keyframes.get(this.duration)}get properties(){let n=[];for(let e in this._currentKeyframe)n.push(e);return n}mergeTimelineCollectedStyles(n){n._styleSummary.forEach((e,t)=>{let o=this._styleSummary.get(t);(!o||e.time>o.time)&&this._updateStyle(t,e.value)})}buildKeyframes(){this.applyStylesToKeyframe();let n=new Set,e=new Set,t=this._keyframes.size===1&&this.duration===0,o=[];this._keyframes.forEach((f,v)=>{let T=new Map([...this._backFill,...f]);T.forEach((A,P)=>{A===S2?n.add(P):A===ye&&e.add(P)}),t||T.set("offset",v/this.duration),o.push(T)});let a=[...n.values()],m=[...e.values()];if(t){let f=o[0],v=new Map(f);f.set("offset",0),v.set("offset",1),o=[f,v]}return L3(this.element,o,a,m,this.duration,this.startTime,this.easing,!1)}},T3=class extends ln{keyframes;preStyleProps;postStyleProps;_stretchStartingKeyframe;timings;constructor(n,e,t,o,a,m,f=!1){super(n,e,m.delay),this.keyframes=t,this.preStyleProps=o,this.postStyleProps=a,this._stretchStartingKeyframe=f,this.timings={duration:m.duration,delay:m.delay,easing:m.easing}}containsAnimation(){return this.keyframes.length>1}buildKeyframes(){let n=this.keyframes,{delay:e,duration:t,easing:o}=this.timings;if(this._stretchStartingKeyframe&&e){let a=[],m=t+e,f=e/m,v=new Map(n[0]);v.set("offset",0),a.push(v);let T=new Map(n[0]);T.set("offset",B5(f)),a.push(T);let A=n.length-1;for(let P=1;P<=A;P++){let Y=new Map(n[P]),G=Y.get("offset"),W=e+G*t;Y.set("offset",B5(W/m)),a.push(Y)}t=m,e=0,o="",n=a}return L3(this.element,n,this.preStyleProps,this.postStyleProps,t,e,o,!0)}};function B5(i,n=3){let e=Math.pow(10,n-1);return Math.round(i*e)/e}function h6(i,n){let e=new Map,t;return i.forEach(o=>{if(o==="*"){t??=n.keys();for(let a of t)e.set(a,ye)}else for(let[a,m]of o)e.set(a,m)}),e}function U5(i,n,e,t,o,a,m,f,v,T,A,P,Y){return{type:0,element:i,triggerName:n,isRemovalTransition:o,fromState:e,fromStyles:a,toState:t,toStyles:m,timelines:f,queriedElements:v,preStyleProps:T,postStyleProps:A,totalTime:P,errors:Y}}var h3={},cn=class{_triggerName;ast;_stateStyles;constructor(n,e,t){this._triggerName=n,this.ast=e,this._stateStyles=t}match(n,e,t,o){return C6(this.ast.matchers,n,e,t,o)}buildStyles(n,e,t){let o=this._stateStyles.get("*");return n!==void 0&&(o=this._stateStyles.get(n?.toString())||o),o?o.buildStyles(e,t):new Map}build(n,e,t,o,a,m,f,v,T,A){let P=[],Y=this.ast.options&&this.ast.options.params||h3,G=f&&f.params||h3,W=this.buildStyles(t,G,P),J=v&&v.params||h3,T1=this.buildStyles(o,J,P),A1=new Set,L1=new Map,G1=new Map,B1=o==="void",Ft={params:X5(J,Y),delay:this.ast.options?.delay},Ee=A?[]:Q5(n,e,this.ast.animation,a,m,W,T1,Ft,T,P),W1=0;return Ee.forEach(j1=>{W1=Math.max(j1.duration+j1.delay,W1)}),P.length?U5(e,this._triggerName,t,o,B1,W,T1,[],[],L1,G1,W1,P):(Ee.forEach(j1=>{let Ct=j1.element,Rt=ie(L1,Ct,new Set);j1.preStyleProps.forEach(St=>Rt.add(St));let R3=ie(G1,Ct,new Set);j1.postStyleProps.forEach(St=>R3.add(St)),Ct!==e&&A1.add(Ct)}),U5(e,this._triggerName,t,o,B1,W,T1,Ee,[...A1.values()],L1,G1,W1))}};function C6(i,n,e,t,o){return i.some(a=>a(n,e,t,o))}function X5(i,n){let e=K1({},n);return Object.entries(i).forEach(([t,o])=>{o!=null&&(e[t]=o)}),e}var z3=class{styles;defaultParams;normalizer;constructor(n,e,t){this.styles=n,this.defaultParams=e,this.normalizer=t}buildStyles(n,e){let t=new Map,o=X5(n,this.defaultParams);return this.styles.styles.forEach(a=>{typeof a!="string"&&a.forEach((m,f)=>{m&&(m=o2(m,o,e));let v=this.normalizer.normalizePropertyName(f,e);m=this.normalizer.normalizeStyleValue(f,v,m,e),t.set(f,m)})}),t}};function S6(i,n,e){return new M3(i,n,e)}var M3=class{name;ast;_normalizer;transitionFactories=[];fallbackTransition;states=new Map;constructor(n,e,t){this.name=n,this.ast=e,this._normalizer=t,e.states.forEach(o=>{let a=o.options&&o.options.params||{};this.states.set(o.name,new z3(o.style,a,t))}),H5(this.states,"true","1"),H5(this.states,"false","0"),e.transitions.forEach(o=>{this.transitionFactories.push(new cn(n,o,this.states))}),this.fallbackTransition=g6(n,this.states)}get containsQueries(){return this.ast.queryCount>0}matchTransition(n,e,t,o){return this.transitionFactories.find(m=>m.match(n,e,t,o))||null}matchStyles(n,e,t){return this.fallbackTransition.buildStyles(n,e,t)}};function g6(i,n,e){let t=[(m,f)=>!0],o={type:a1.Sequence,steps:[],options:null},a={type:a1.Transition,animation:o,matchers:t,options:null,queryCount:0,depCount:0};return new cn(i,a,n)}function H5(i,n,e){i.has(n)?i.has(e)||i.set(e,i.get(n)):i.has(e)&&i.set(n,i.get(e))}var x6=new M2,E3=class{bodyNode;_driver;_normalizer;_animations=new Map;_playersById=new Map;players=[];constructor(n,e,t){this.bodyNode=n,this._driver=e,this._normalizer=t}register(n,e){let t=[],o=[],a=K5(this._driver,e,t,o);if(t.length)throw b5(t);this._animations.set(n,a)}_buildPlayer(n,e,t){let o=n.element,a=s3(this._normalizer,n.keyframes,e,t);return this._driver.animate(o,a,n.duration,n.delay,n.easing,[],!0)}create(n,e,t={}){let o=[],a=this._animations.get(n),m,f=new Map;if(a?(m=Q5(this._driver,e,a,d3,Qi,new Map,new Map,t,x6,o),m.forEach(A=>{let P=ie(f,A.element,new Map);A.postStyleProps.forEach(Y=>P.set(Y,null))})):(o.push(T5()),m=[]),o.length)throw z5(o);f.forEach((A,P)=>{A.forEach((Y,G)=>{A.set(G,this._driver.computeStyle(P,G,ye))})});let v=m.map(A=>{let P=f.get(A.element);return this._buildPlayer(A,new Map,P)}),T=Ze(v);return this._playersById.set(n,T),T.onDestroy(()=>this.destroy(n)),this.players.push(T),T}destroy(n){let e=this._getPlayer(n);e.destroy(),this._playersById.delete(n);let t=this.players.indexOf(e);t>=0&&this.players.splice(t,1)}_getPlayer(n){let e=this._playersById.get(n);if(!e)throw M5(n);return e}listen(n,e,t,o){let a=ji(e,"","","");return Yi(this._getPlayer(n),t,a,o),()=>{}}command(n,e,t,o){if(t=="register"){this.register(n,o[0]);return}if(t=="create"){let m=o[0]||{};this.create(n,e,m);return}let a=this._getPlayer(n);switch(t){case"play":a.play();break;case"pause":a.pause();break;case"reset":a.reset();break;case"restart":a.restart();break;case"finish":a.finish();break;case"init":a.init();break;case"setPosition":a.setPosition(parseFloat(o[0]));break;case"destroy":this.destroy(n);break}}},$5="ng-animate-queued",v6=".ng-animate-queued",C3="ng-animate-disabled",y6=".ng-animate-disabled",b6="ng-star-inserted",T6=".ng-star-inserted",z6=[],Z5={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},M6={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},Me="__ng_removed",E2=class{namespaceId;value;options;get params(){return this.options.params}constructor(n,e=""){this.namespaceId=e;let t=n&&n.hasOwnProperty("value"),o=t?n.value:n;if(this.value=w6(o),t){let a=n,{value:m}=a,f=B3(a,["value"]);this.options=f}else this.options={};this.options.params||(this.options.params={})}absorbOptions(n){let e=n.params;if(e){let t=this.options.params;Object.keys(e).forEach(o=>{t[o]==null&&(t[o]=e[o])})}}},z2="void",S3=new E2(z2),w3=class{id;hostElement;_engine;players=[];_triggers=new Map;_queue=[];_elementListeners=new Map;_hostClassName;constructor(n,e,t){this.id=n,this.hostElement=e,this._engine=t,this._hostClassName="ng-tns-"+n,xe(e,this._hostClassName)}listen(n,e,t,o){if(!this._triggers.has(e))throw E5(t,e);if(t==null||t.length==0)throw w5(e);if(!P6(t))throw P5(t,e);let a=ie(this._elementListeners,n,[]),m={name:e,phase:t,callback:o};a.push(m);let f=ie(this._engine.statesByElement,n,new Map);return f.has(e)||(xe(n,y2),xe(n,y2+"-"+e),f.set(e,S3)),()=>{this._engine.afterFlush(()=>{let v=a.indexOf(m);v>=0&&a.splice(v,1),this._triggers.has(e)||f.delete(e)})}}register(n,e){return this._triggers.has(n)?!1:(this._triggers.set(n,e),!0)}_getTrigger(n){let e=this._triggers.get(n);if(!e)throw A5(n);return e}trigger(n,e,t,o=!0){let a=this._getTrigger(e),m=new w2(this.id,e,n),f=this._engine.statesByElement.get(n);f||(xe(n,y2),xe(n,y2+"-"+e),this._engine.statesByElement.set(n,f=new Map));let v=f.get(e),T=new E2(t,this.id);if(!(t&&t.hasOwnProperty("value"))&&v&&T.absorbOptions(v.options),f.set(e,T),v||(v=S3),!(T.value===z2)&&v.value===T.value){if(!L6(v.params,T.params)){let J=[],T1=a.matchStyles(v.value,v.params,J),A1=a.matchStyles(T.value,T.params,J);J.length?this._engine.reportError(J):this._engine.afterFlush(()=>{ft(n,T1),ze(n,A1)})}return}let Y=ie(this._engine.playersByElement,n,[]);Y.forEach(J=>{J.namespaceId==this.id&&J.triggerName==e&&J.queued&&J.destroy()});let G=a.matchTransition(v.value,T.value,n,T.params),W=!1;if(!G){if(!o)return;G=a.fallbackTransition,W=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:n,triggerName:e,transition:G,fromState:v,toState:T,player:m,isFallbackTransition:W}),W||(xe(n,$5),m.onStart(()=>{a2(n,$5)})),m.onDone(()=>{let J=this.players.indexOf(m);J>=0&&this.players.splice(J,1);let T1=this._engine.playersByElement.get(n);if(T1){let A1=T1.indexOf(m);A1>=0&&T1.splice(A1,1)}}),this.players.push(m),Y.push(m),m}deregister(n){this._triggers.delete(n),this._engine.statesByElement.forEach(e=>e.delete(n)),this._elementListeners.forEach((e,t)=>{this._elementListeners.set(t,e.filter(o=>o.name!=n))})}clearElementCache(n){this._engine.statesByElement.delete(n),this._elementListeners.delete(n);let e=this._engine.playersByElement.get(n);e&&(e.forEach(t=>t.destroy()),this._engine.playersByElement.delete(n))}_signalRemovalForInnerTriggers(n,e){let t=this._engine.driver.query(n,b2,!0);t.forEach(o=>{if(o[Me])return;let a=this._engine.fetchNamespacesByElement(o);a.size?a.forEach(m=>m.triggerLeaveAnimation(o,e,!1,!0)):this.clearElementCache(o)}),this._engine.afterFlushAnimationsDone(()=>t.forEach(o=>this.clearElementCache(o)))}triggerLeaveAnimation(n,e,t,o){let a=this._engine.statesByElement.get(n),m=new Map;if(a){let f=[];if(a.forEach((v,T)=>{if(m.set(T,v.value),this._triggers.has(T)){let A=this.trigger(n,T,z2,o);A&&f.push(A)}}),f.length)return this._engine.markElementAsRemoved(this.id,n,!0,e,m),t&&Ze(f).onDone(()=>this._engine.processLeaveNode(n)),!0}return!1}prepareLeaveAnimationListeners(n){let e=this._elementListeners.get(n),t=this._engine.statesByElement.get(n);if(e&&t){let o=new Set;e.forEach(a=>{let m=a.name;if(o.has(m))return;o.add(m);let v=this._triggers.get(m).fallbackTransition,T=t.get(m)||S3,A=new E2(z2),P=new w2(this.id,m,n);this._engine.totalQueuedPlayers++,this._queue.push({element:n,triggerName:m,transition:v,fromState:T,toState:A,player:P,isFallbackTransition:!0})})}}removeNode(n,e){let t=this._engine;if(n.childElementCount&&this._signalRemovalForInnerTriggers(n,e),this.triggerLeaveAnimation(n,e,!0))return;let o=!1;if(t.totalAnimations){let a=t.players.length?t.playersByQueriedElement.get(n):[];if(a&&a.length)o=!0;else{let m=n;for(;m=m.parentNode;)if(t.statesByElement.get(m)){o=!0;break}}}if(this.prepareLeaveAnimationListeners(n),o)t.markElementAsRemoved(this.id,n,!1,e);else{let a=n[Me];(!a||a===Z5)&&(t.afterFlush(()=>this.clearElementCache(n)),t.destroyInnerAnimations(n),t._onRemovalComplete(n,e))}}insertNode(n,e){xe(n,this._hostClassName)}drainQueuedTransitions(n){let e=[];return this._queue.forEach(t=>{let o=t.player;if(o.destroyed)return;let a=t.element,m=this._elementListeners.get(a);m&&m.forEach(f=>{if(f.name==t.triggerName){let v=ji(a,t.triggerName,t.fromState.value,t.toState.value);v._data=n,Yi(t.player,f.phase,v,f.callback)}}),o.markedForDestroy?this._engine.afterFlush(()=>{o.destroy()}):e.push(t)}),this._queue=[],e.sort((t,o)=>{let a=t.transition.ast.depCount,m=o.transition.ast.depCount;return a==0||m==0?a-m:this._engine.driver.containsElement(t.element,o.element)?1:-1})}destroy(n){this.players.forEach(e=>e.destroy()),this._signalRemovalForInnerTriggers(this.hostElement,n)}},P3=class{bodyNode;driver;_normalizer;players=[];newHostElements=new Map;playersByElement=new Map;playersByQueriedElement=new Map;statesByElement=new Map;disabledNodes=new Set;totalAnimations=0;totalQueuedPlayers=0;_namespaceLookup={};_namespaceList=[];_flushFns=[];_whenQuietFns=[];namespacesByHostElement=new Map;collectedEnterElements=[];collectedLeaveElements=[];onRemovalComplete=(n,e)=>{};_onRemovalComplete(n,e){this.onRemovalComplete(n,e)}constructor(n,e,t){this.bodyNode=n,this.driver=e,this._normalizer=t}get queuedPlayers(){let n=[];return this._namespaceList.forEach(e=>{e.players.forEach(t=>{t.queued&&n.push(t)})}),n}createNamespace(n,e){let t=new w3(n,e,this);return this.bodyNode&&this.driver.containsElement(this.bodyNode,e)?this._balanceNamespaceList(t,e):(this.newHostElements.set(e,t),this.collectEnterElement(e)),this._namespaceLookup[n]=t}_balanceNamespaceList(n,e){let t=this._namespaceList,o=this.namespacesByHostElement;if(t.length-1>=0){let m=!1,f=this.driver.getParentElement(e);for(;f;){let v=o.get(f);if(v){let T=t.indexOf(v);t.splice(T+1,0,n),m=!0;break}f=this.driver.getParentElement(f)}m||t.unshift(n)}else t.push(n);return o.set(e,n),n}register(n,e){let t=this._namespaceLookup[n];return t||(t=this.createNamespace(n,e)),t}registerTrigger(n,e,t){let o=this._namespaceLookup[n];o&&o.register(e,t)&&this.totalAnimations++}destroy(n,e){n&&(this.afterFlush(()=>{}),this.afterFlushAnimationsDone(()=>{let t=this._fetchNamespace(n);this.namespacesByHostElement.delete(t.hostElement);let o=this._namespaceList.indexOf(t);o>=0&&this._namespaceList.splice(o,1),t.destroy(e),delete this._namespaceLookup[n]}))}_fetchNamespace(n){return this._namespaceLookup[n]}fetchNamespacesByElement(n){let e=new Set,t=this.statesByElement.get(n);if(t){for(let o of t.values())if(o.namespaceId){let a=this._fetchNamespace(o.namespaceId);a&&e.add(a)}}return e}trigger(n,e,t,o){if(nn(e)){let a=this._fetchNamespace(n);if(a)return a.trigger(e,t,o),!0}return!1}insertNode(n,e,t,o){if(!nn(e))return;let a=e[Me];if(a&&a.setForRemoval){a.setForRemoval=!1,a.setForMove=!0;let m=this.collectedLeaveElements.indexOf(e);m>=0&&this.collectedLeaveElements.splice(m,1)}if(n){let m=this._fetchNamespace(n);m&&m.insertNode(e,t)}o&&this.collectEnterElement(e)}collectEnterElement(n){this.collectedEnterElements.push(n)}markElementAsDisabled(n,e){e?this.disabledNodes.has(n)||(this.disabledNodes.add(n),xe(n,C3)):this.disabledNodes.has(n)&&(this.disabledNodes.delete(n),a2(n,C3))}removeNode(n,e,t){if(nn(e)){let o=n?this._fetchNamespace(n):null;o?o.removeNode(e,t):this.markElementAsRemoved(n,e,!1,t);let a=this.namespacesByHostElement.get(e);a&&a.id!==n&&a.removeNode(e,t)}else this._onRemovalComplete(e,t)}markElementAsRemoved(n,e,t,o,a){this.collectedLeaveElements.push(e),e[Me]={namespaceId:n,setForRemoval:o,hasAnimation:t,removedBeforeQueried:!1,previousTriggersValues:a}}listen(n,e,t,o,a){return nn(e)?this._fetchNamespace(n).listen(e,t,o,a):()=>{}}_buildInstruction(n,e,t,o,a){return n.transition.build(this.driver,n.element,n.fromState.value,n.toState.value,t,o,n.fromState.options,n.toState.options,e,a)}destroyInnerAnimations(n){let e=this.driver.query(n,b2,!0);e.forEach(t=>this.destroyActiveAnimationsForElement(t)),this.playersByQueriedElement.size!=0&&(e=this.driver.query(n,Xi,!0),e.forEach(t=>this.finishActiveQueriedAnimationOnElement(t)))}destroyActiveAnimationsForElement(n){let e=this.playersByElement.get(n);e&&e.forEach(t=>{t.queued?t.markedForDestroy=!0:t.destroy()})}finishActiveQueriedAnimationOnElement(n){let e=this.playersByQueriedElement.get(n);e&&e.forEach(t=>t.finish())}whenRenderingDone(){return new Promise(n=>{if(this.players.length)return Ze(this.players).onDone(()=>n());n()})}processLeaveNode(n){let e=n[Me];if(e&&e.setForRemoval){if(n[Me]=Z5,e.namespaceId){this.destroyInnerAnimations(n);let t=this._fetchNamespace(e.namespaceId);t&&t.clearElementCache(n)}this._onRemovalComplete(n,e.setForRemoval)}n.classList?.contains(C3)&&this.markElementAsDisabled(n,!1),this.driver.query(n,y6,!0).forEach(t=>{this.markElementAsDisabled(t,!1)})}flush(n=-1){let e=[];if(this.newHostElements.size&&(this.newHostElements.forEach((t,o)=>this._balanceNamespaceList(t,o)),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(let t=0;t<this.collectedEnterElements.length;t++){let o=this.collectedEnterElements[t];xe(o,b6)}if(this._namespaceList.length&&(this.totalQueuedPlayers||this.collectedLeaveElements.length)){let t=[];try{e=this._flushAnimations(t,n)}finally{for(let o=0;o<t.length;o++)t[o]()}}else for(let t=0;t<this.collectedLeaveElements.length;t++){let o=this.collectedLeaveElements[t];this.processLeaveNode(o)}if(this.totalQueuedPlayers=0,this.collectedEnterElements.length=0,this.collectedLeaveElements.length=0,this._flushFns.forEach(t=>t()),this._flushFns=[],this._whenQuietFns.length){let t=this._whenQuietFns;this._whenQuietFns=[],e.length?Ze(e).onDone(()=>{t.forEach(o=>o())}):t.forEach(o=>o())}}reportError(n){throw N5(n)}_flushAnimations(n,e){let t=new M2,o=[],a=new Map,m=[],f=new Map,v=new Map,T=new Map,A=new Set;this.disabledNodes.forEach(H=>{A.add(H);let j=this.driver.query(H,v6,!0);for(let Q=0;Q<j.length;Q++)A.add(j[Q])});let P=this.bodyNode,Y=Array.from(this.statesByElement.keys()),G=q5(Y,this.collectedEnterElements),W=new Map,J=0;G.forEach((H,j)=>{let Q=d3+J++;W.set(j,Q),H.forEach(d1=>xe(d1,Q))});let T1=[],A1=new Set,L1=new Set;for(let H=0;H<this.collectedLeaveElements.length;H++){let j=this.collectedLeaveElements[H],Q=j[Me];Q&&Q.setForRemoval&&(T1.push(j),A1.add(j),Q.hasAnimation?this.driver.query(j,T6,!0).forEach(d1=>A1.add(d1)):L1.add(j))}let G1=new Map,B1=q5(Y,Array.from(A1));B1.forEach((H,j)=>{let Q=Qi+J++;G1.set(j,Q),H.forEach(d1=>xe(d1,Q))}),n.push(()=>{G.forEach((H,j)=>{let Q=W.get(j);H.forEach(d1=>a2(d1,Q))}),B1.forEach((H,j)=>{let Q=G1.get(j);H.forEach(d1=>a2(d1,Q))}),T1.forEach(H=>{this.processLeaveNode(H)})});let Ft=[],Ee=[];for(let H=this._namespaceList.length-1;H>=0;H--)this._namespaceList[H].drainQueuedTransitions(e).forEach(Q=>{let d1=Q.player,k1=Q.element;if(Ft.push(d1),this.collectedEnterElements.length){let U1=k1[Me];if(U1&&U1.setForMove){if(U1.previousTriggersValues&&U1.previousTriggersValues.has(Q.triggerName)){let gt=U1.previousTriggersValues.get(Q.triggerName),pe=this.statesByElement.get(Q.element);if(pe&&pe.has(Q.triggerName)){let F2=pe.get(Q.triggerName);F2.value=gt,pe.set(Q.triggerName,F2)}}d1.destroy();return}}let we=!P||!this.driver.containsElement(P,k1),oe=G1.get(k1),tt=W.get(k1),M1=this._buildInstruction(Q,t,tt,oe,we);if(M1.errors&&M1.errors.length){Ee.push(M1);return}if(we){d1.onStart(()=>ft(k1,M1.fromStyles)),d1.onDestroy(()=>ze(k1,M1.toStyles)),o.push(d1);return}if(Q.isFallbackTransition){d1.onStart(()=>ft(k1,M1.fromStyles)),d1.onDestroy(()=>ze(k1,M1.toStyles)),o.push(d1);return}let V3=[];M1.timelines.forEach(U1=>{U1.stretchStartingKeyframe=!0,this.disabledNodes.has(U1.element)||V3.push(U1)}),M1.timelines=V3,t.append(k1,M1.timelines);let Ur={instruction:M1,player:d1,element:k1};m.push(Ur),M1.queriedElements.forEach(U1=>ie(f,U1,[]).push(d1)),M1.preStyleProps.forEach((U1,gt)=>{if(U1.size){let pe=v.get(gt);pe||v.set(gt,pe=new Set),U1.forEach((F2,Fn)=>pe.add(Fn))}}),M1.postStyleProps.forEach((U1,gt)=>{let pe=T.get(gt);pe||T.set(gt,pe=new Set),U1.forEach((F2,Fn)=>pe.add(Fn))})});if(Ee.length){let H=[];Ee.forEach(j=>{H.push(L5(j.triggerName,j.errors))}),Ft.forEach(j=>j.destroy()),this.reportError(H)}let W1=new Map,j1=new Map;m.forEach(H=>{let j=H.element;t.has(j)&&(j1.set(j,j),this._beforeAnimationBuild(H.player.namespaceId,H.instruction,W1))}),o.forEach(H=>{let j=H.element;this._getPreviousPlayers(j,!1,H.namespaceId,H.triggerName,null).forEach(d1=>{ie(W1,j,[]).push(d1),d1.destroy()})});let Ct=T1.filter(H=>Y5(H,v,T)),Rt=new Map;W5(Rt,this.driver,L1,T,ye).forEach(H=>{Y5(H,v,T)&&Ct.push(H)});let St=new Map;G.forEach((H,j)=>{W5(St,this.driver,new Set(H),v,S2)}),Ct.forEach(H=>{let j=Rt.get(H),Q=St.get(H);Rt.set(H,new Map([...j?.entries()??[],...Q?.entries()??[]]))});let Dn=[],I3=[],O3={};m.forEach(H=>{let{element:j,player:Q,instruction:d1}=H;if(t.has(j)){if(A.has(j)){Q.onDestroy(()=>ze(j,d1.toStyles)),Q.disabled=!0,Q.overrideTotalTime(d1.totalTime),o.push(Q);return}let k1=O3;if(j1.size>1){let oe=j,tt=[];for(;oe=oe.parentNode;){let M1=j1.get(oe);if(M1){k1=M1;break}tt.push(oe)}tt.forEach(M1=>j1.set(M1,k1))}let we=this._buildAnimation(Q.namespaceId,d1,W1,a,St,Rt);if(Q.setRealPlayer(we),k1===O3)Dn.push(Q);else{let oe=this.playersByElement.get(k1);oe&&oe.length&&(Q.parentPlayer=Ze(oe)),o.push(Q)}}else ft(j,d1.fromStyles),Q.onDestroy(()=>ze(j,d1.toStyles)),I3.push(Q),A.has(j)&&o.push(Q)}),I3.forEach(H=>{let j=a.get(H.element);if(j&&j.length){let Q=Ze(j);H.setRealPlayer(Q)}}),o.forEach(H=>{H.parentPlayer?H.syncPlayerEvents(H.parentPlayer):H.destroy()});for(let H=0;H<T1.length;H++){let j=T1[H],Q=j[Me];if(a2(j,Qi),Q&&Q.hasAnimation)continue;let d1=[];if(f.size){let we=f.get(j);we&&we.length&&d1.push(...we);let oe=this.driver.query(j,Xi,!0);for(let tt=0;tt<oe.length;tt++){let M1=f.get(oe[tt]);M1&&M1.length&&d1.push(...M1)}}let k1=d1.filter(we=>!we.destroyed);k1.length?A6(this,j,k1):this.processLeaveNode(j)}return T1.length=0,Dn.forEach(H=>{this.players.push(H),H.onDone(()=>{H.destroy();let j=this.players.indexOf(H);this.players.splice(j,1)}),H.play()}),Dn}afterFlush(n){this._flushFns.push(n)}afterFlushAnimationsDone(n){this._whenQuietFns.push(n)}_getPreviousPlayers(n,e,t,o,a){let m=[];if(e){let f=this.playersByQueriedElement.get(n);f&&(m=f)}else{let f=this.playersByElement.get(n);if(f){let v=!a||a==z2;f.forEach(T=>{T.queued||!v&&T.triggerName!=o||m.push(T)})}}return(t||o)&&(m=m.filter(f=>!(t&&t!=f.namespaceId||o&&o!=f.triggerName))),m}_beforeAnimationBuild(n,e,t){let o=e.triggerName,a=e.element,m=e.isRemovalTransition?void 0:n,f=e.isRemovalTransition?void 0:o;for(let v of e.timelines){let T=v.element,A=T!==a,P=ie(t,T,[]);this._getPreviousPlayers(T,A,m,f,e.toState).forEach(G=>{let W=G.getRealPlayer();W.beforeDestroy&&W.beforeDestroy(),G.destroy(),P.push(G)})}ft(a,e.fromStyles)}_buildAnimation(n,e,t,o,a,m){let f=e.triggerName,v=e.element,T=[],A=new Set,P=new Set,Y=e.timelines.map(W=>{let J=W.element;A.add(J);let T1=J[Me];if(T1&&T1.removedBeforeQueried)return new yt(W.duration,W.delay);let A1=J!==v,L1=N6((t.get(J)||z6).map(W1=>W1.getRealPlayer())).filter(W1=>{let j1=W1;return j1.element?j1.element===J:!1}),G1=a.get(J),B1=m.get(J),Ft=s3(this._normalizer,W.keyframes,G1,B1),Ee=this._buildPlayer(W,Ft,L1);if(W.subTimeline&&o&&P.add(J),A1){let W1=new w2(n,f,J);W1.setRealPlayer(Ee),T.push(W1)}return Ee});T.forEach(W=>{ie(this.playersByQueriedElement,W.element,[]).push(W),W.onDone(()=>E6(this.playersByQueriedElement,W.element,W))}),A.forEach(W=>xe(W,f3));let G=Ze(Y);return G.onDestroy(()=>{A.forEach(W=>a2(W,f3)),ze(v,e.toStyles)}),P.forEach(W=>{ie(o,W,[]).push(G)}),G}_buildPlayer(n,e,t){return e.length>0?this.driver.animate(n.element,e,n.duration,n.delay,n.easing,t):new yt(n.duration,n.delay)}},w2=class{namespaceId;triggerName;element;_player=new yt;_containsRealPlayer=!1;_queuedCallbacks=new Map;destroyed=!1;parentPlayer=null;markedForDestroy=!1;disabled=!1;queued=!0;totalTime=0;constructor(n,e,t){this.namespaceId=n,this.triggerName=e,this.element=t}setRealPlayer(n){this._containsRealPlayer||(this._player=n,this._queuedCallbacks.forEach((e,t)=>{e.forEach(o=>Yi(n,t,void 0,o))}),this._queuedCallbacks.clear(),this._containsRealPlayer=!0,this.overrideTotalTime(n.totalTime),this.queued=!1)}getRealPlayer(){return this._player}overrideTotalTime(n){this.totalTime=n}syncPlayerEvents(n){let e=this._player;e.triggerCallback&&n.onStart(()=>e.triggerCallback("start")),n.onDone(()=>this.finish()),n.onDestroy(()=>this.destroy())}_queueEvent(n,e){ie(this._queuedCallbacks,n,[]).push(e)}onDone(n){this.queued&&this._queueEvent("done",n),this._player.onDone(n)}onStart(n){this.queued&&this._queueEvent("start",n),this._player.onStart(n)}onDestroy(n){this.queued&&this._queueEvent("destroy",n),this._player.onDestroy(n)}init(){this._player.init()}hasStarted(){return this.queued?!1:this._player.hasStarted()}play(){!this.queued&&this._player.play()}pause(){!this.queued&&this._player.pause()}restart(){!this.queued&&this._player.restart()}finish(){this._player.finish()}destroy(){this.destroyed=!0,this._player.destroy()}reset(){!this.queued&&this._player.reset()}setPosition(n){this.queued||this._player.setPosition(n)}getPosition(){return this.queued?0:this._player.getPosition()}triggerCallback(n){let e=this._player;e.triggerCallback&&e.triggerCallback(n)}};function E6(i,n,e){let t=i.get(n);if(t){if(t.length){let o=t.indexOf(e);t.splice(o,1)}t.length==0&&i.delete(n)}return t}function w6(i){return i??null}function nn(i){return i&&i.nodeType===1}function P6(i){return i=="start"||i=="done"}function G5(i,n){let e=i.style.display;return i.style.display=n??"none",e}function W5(i,n,e,t,o){let a=[];e.forEach(v=>a.push(G5(v)));let m=[];t.forEach((v,T)=>{let A=new Map;v.forEach(P=>{let Y=n.computeStyle(T,P,o);A.set(P,Y),(!Y||Y.length==0)&&(T[Me]=M6,m.push(T))}),i.set(T,A)});let f=0;return e.forEach(v=>G5(v,a[f++])),m}function q5(i,n){let e=new Map;if(i.forEach(f=>e.set(f,[])),n.length==0)return e;let t=1,o=new Set(n),a=new Map;function m(f){if(!f)return t;let v=a.get(f);if(v)return v;let T=f.parentNode;return e.has(T)?v=T:o.has(T)?v=t:v=m(T),a.set(f,v),v}return n.forEach(f=>{let v=m(f);v!==t&&e.get(v).push(f)}),e}function xe(i,n){i.classList?.add(n)}function a2(i,n){i.classList?.remove(n)}function A6(i,n,e){Ze(e).onDone(()=>i.processLeaveNode(n))}function N6(i){let n=[];return J5(i,n),n}function J5(i,n){for(let e=0;e<i.length;e++){let t=i[e];t instanceof J2?J5(t.players,n):n.push(t)}}function L6(i,n){let e=Object.keys(i),t=Object.keys(n);if(e.length!=t.length)return!1;for(let o=0;o<e.length;o++){let a=e[o];if(!n.hasOwnProperty(a)||i[a]!==n[a])return!1}return!0}function Y5(i,n,e){let t=e.get(i);if(!t)return!1;let o=n.get(i);return o?t.forEach(a=>o.add(a)):n.set(i,t),e.delete(i),!0}var r2=class{_driver;_normalizer;_transitionEngine;_timelineEngine;_triggerCache={};onRemovalComplete=(n,e)=>{};constructor(n,e,t){this._driver=e,this._normalizer=t,this._transitionEngine=new P3(n.body,e,t),this._timelineEngine=new E3(n.body,e,t),this._transitionEngine.onRemovalComplete=(o,a)=>this.onRemovalComplete(o,a)}registerTrigger(n,e,t,o,a){let m=n+"-"+o,f=this._triggerCache[m];if(!f){let v=[],T=[],A=K5(this._driver,a,v,T);if(v.length)throw y5(o,v);f=S6(o,A,this._normalizer),this._triggerCache[m]=f}this._transitionEngine.registerTrigger(e,o,f)}register(n,e){this._transitionEngine.register(n,e)}destroy(n,e){this._transitionEngine.destroy(n,e)}onInsert(n,e,t,o){this._transitionEngine.insertNode(n,e,t,o)}onRemove(n,e,t){this._transitionEngine.removeNode(n,e,t)}disableAnimations(n,e){this._transitionEngine.markElementAsDisabled(n,e)}process(n,e,t,o){if(t.charAt(0)=="@"){let[a,m]=l3(t),f=o;this._timelineEngine.command(a,e,m,f)}else this._transitionEngine.trigger(n,e,t,o)}listen(n,e,t,o,a){if(t.charAt(0)=="@"){let[m,f]=l3(t);return this._timelineEngine.listen(m,e,f,a)}return this._transitionEngine.listen(n,e,t,o,a)}flush(n=-1){this._transitionEngine.flush(n)}get players(){return[...this._transitionEngine.players,...this._timelineEngine.players]}whenRenderingDone(){return this._transitionEngine.whenRenderingDone()}afterFlushAnimationsDone(n){this._transitionEngine.afterFlushAnimationsDone(n)}};function k6(i,n){let e=null,t=null;return Array.isArray(n)&&n.length?(e=g3(n[0]),n.length>1&&(t=g3(n[n.length-1]))):n instanceof Map&&(e=g3(n)),e||t?new D6(i,e,t):null}var D6=(()=>{class i{_element;_startStyles;_endStyles;static initialStylesByElement=new WeakMap;_state=0;_initialStyles;constructor(e,t,o){this._element=e,this._startStyles=t,this._endStyles=o;let a=i.initialStylesByElement.get(e);a||i.initialStylesByElement.set(e,a=new Map),this._initialStyles=a}start(){this._state<1&&(this._startStyles&&ze(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(ze(this._element,this._initialStyles),this._endStyles&&(ze(this._element,this._endStyles),this._endStyles=null),this._state=1)}destroy(){this.finish(),this._state<3&&(i.initialStylesByElement.delete(this._element),this._startStyles&&(ft(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(ft(this._element,this._endStyles),this._endStyles=null),ze(this._element,this._initialStyles),this._state=3)}}return i})();function g3(i){let n=null;return i.forEach((e,t)=>{F6(t)&&(n=n||new Map,n.set(t,e))}),n}function F6(i){return i==="display"||i==="position"}var mn=class{element;keyframes;options;_specialStyles;_onDoneFns=[];_onStartFns=[];_onDestroyFns=[];_duration;_delay;_initialized=!1;_finished=!1;_started=!1;_destroyed=!1;_finalKeyframe;_originalOnDoneFns=[];_originalOnStartFns=[];domPlayer;time=0;parentPlayer=null;currentSnapshot=new Map;constructor(n,e,t,o){this.element=n,this.keyframes=e,this.options=t,this._specialStyles=o,this._duration=t.duration,this._delay=t.delay||0,this.time=this._duration+this._delay}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(n=>n()),this._onDoneFns=[])}init(){this._buildPlayer(),this._preparePlayerBeforeStart()}_buildPlayer(){if(this._initialized)return;this._initialized=!0;let n=this.keyframes;this.domPlayer=this._triggerWebAnimation(this.element,n,this.options),this._finalKeyframe=n.length?n[n.length-1]:new Map;let e=()=>this._onFinish();this.domPlayer.addEventListener("finish",e),this.onDestroy(()=>{this.domPlayer.removeEventListener("finish",e)})}_preparePlayerBeforeStart(){this._delay?this._resetDomPlayerState():this.domPlayer.pause()}_convertKeyframesToObject(n){let e=[];return n.forEach(t=>{e.push(Object.fromEntries(t))}),e}_triggerWebAnimation(n,e,t){return n.animate(this._convertKeyframesToObject(e),t)}onStart(n){this._originalOnStartFns.push(n),this._onStartFns.push(n)}onDone(n){this._originalOnDoneFns.push(n),this._onDoneFns.push(n)}onDestroy(n){this._onDestroyFns.push(n)}play(){this._buildPlayer(),this.hasStarted()||(this._onStartFns.forEach(n=>n()),this._onStartFns=[],this._started=!0,this._specialStyles&&this._specialStyles.start()),this.domPlayer.play()}pause(){this.init(),this.domPlayer.pause()}finish(){this.init(),this._specialStyles&&this._specialStyles.finish(),this._onFinish(),this.domPlayer.finish()}reset(){this._resetDomPlayerState(),this._destroyed=!1,this._finished=!1,this._started=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}_resetDomPlayerState(){this.domPlayer&&this.domPlayer.cancel()}restart(){this.reset(),this.play()}hasStarted(){return this._started}destroy(){this._destroyed||(this._destroyed=!0,this._resetDomPlayerState(),this._onFinish(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(n=>n()),this._onDestroyFns=[])}setPosition(n){this.domPlayer===void 0&&this.init(),this.domPlayer.currentTime=n*this.time}getPosition(){return+(this.domPlayer.currentTime??0)/this.time}get totalTime(){return this._delay+this._duration}beforeDestroy(){let n=new Map;this.hasStarted()&&this._finalKeyframe.forEach((t,o)=>{o!=="offset"&&n.set(o,this._finished?t:Ji(this.element,o))}),this.currentSnapshot=n}triggerCallback(n){let e=n==="start"?this._onStartFns:this._onDoneFns;e.forEach(t=>t()),e.length=0}},pn=class{validateStyleProperty(n){return!0}validateAnimatableStyleProperty(n){return!0}containsElement(n,e){return c3(n,e)}getParentElement(n){return Ki(n)}query(n,e,t){return m3(n,e,t)}computeStyle(n,e,t){return Ji(n,e)}animate(n,e,t,o,a,m=[]){let f=o==0?"both":"forwards",v={duration:t,delay:o,fill:f};a&&(v.easing=a);let T=new Map,A=m.filter(G=>G instanceof mn);R5(t,o)&&A.forEach(G=>{G.currentSnapshot.forEach((W,J)=>T.set(J,W))});let P=D5(e).map(G=>new Map(G));P=I5(n,P,T);let Y=k6(n,P);return new mn(n,P,v,Y)}};var on="@",ea="@.disabled",dn=class{namespaceId;delegate;engine;_onDestroy;\u0275type=0;constructor(n,e,t,o){this.namespaceId=n,this.delegate=e,this.engine=t,this._onDestroy=o}get data(){return this.delegate.data}destroyNode(n){this.delegate.destroyNode?.(n)}destroy(){this.engine.destroy(this.namespaceId,this.delegate),this.engine.afterFlushAnimationsDone(()=>{queueMicrotask(()=>{this.delegate.destroy()})}),this._onDestroy?.()}createElement(n,e){return this.delegate.createElement(n,e)}createComment(n){return this.delegate.createComment(n)}createText(n){return this.delegate.createText(n)}appendChild(n,e){this.delegate.appendChild(n,e),this.engine.onInsert(this.namespaceId,e,n,!1)}insertBefore(n,e,t,o=!0){this.delegate.insertBefore(n,e,t),this.engine.onInsert(this.namespaceId,e,n,o)}removeChild(n,e,t){this.parentNode(e)&&this.engine.onRemove(this.namespaceId,e,this.delegate)}selectRootElement(n,e){return this.delegate.selectRootElement(n,e)}parentNode(n){return this.delegate.parentNode(n)}nextSibling(n){return this.delegate.nextSibling(n)}setAttribute(n,e,t,o){this.delegate.setAttribute(n,e,t,o)}removeAttribute(n,e,t){this.delegate.removeAttribute(n,e,t)}addClass(n,e){this.delegate.addClass(n,e)}removeClass(n,e){this.delegate.removeClass(n,e)}setStyle(n,e,t,o){this.delegate.setStyle(n,e,t,o)}removeStyle(n,e,t){this.delegate.removeStyle(n,e,t)}setProperty(n,e,t){e.charAt(0)==on&&e==ea?this.disableAnimations(n,!!t):this.delegate.setProperty(n,e,t)}setValue(n,e){this.delegate.setValue(n,e)}listen(n,e,t,o){return this.delegate.listen(n,e,t,o)}disableAnimations(n,e){this.engine.disableAnimations(n,e)}},A3=class extends dn{factory;constructor(n,e,t,o,a){super(e,t,o,a),this.factory=n,this.namespaceId=e}setProperty(n,e,t){e.charAt(0)==on?e.charAt(1)=="."&&e==ea?(t=t===void 0?!0:!!t,this.disableAnimations(n,t)):this.engine.process(this.namespaceId,n,e.slice(1),t):this.delegate.setProperty(n,e,t)}listen(n,e,t,o){if(e.charAt(0)==on){let a=R6(n),m=e.slice(1),f="";return m.charAt(0)!=on&&([m,f]=I6(m)),this.engine.listen(this.namespaceId,a,m,f,v=>{let T=v._data||-1;this.factory.scheduleListenerCallback(T,t,v)})}return this.delegate.listen(n,e,t,o)}};function R6(i){switch(i){case"body":return document.body;case"document":return document;case"window":return window;default:return i}}function I6(i){let n=i.indexOf("."),e=i.substring(0,n),t=i.slice(n+1);return[e,t]}var fn=class{delegate;engine;_zone;_currentId=0;_microtaskId=1;_animationCallbacksBuffer=[];_rendererCache=new Map;_cdRecurDepth=0;constructor(n,e,t){this.delegate=n,this.engine=e,this._zone=t,e.onRemovalComplete=(o,a)=>{a?.removeChild(null,o)}}createRenderer(n,e){let o=this.delegate.createRenderer(n,e);if(!n||!e?.data?.animation){let T=this._rendererCache,A=T.get(o);if(!A){let P=()=>T.delete(o);A=new dn("",o,this.engine,P),T.set(o,A)}return A}let a=e.id,m=e.id+"-"+this._currentId;this._currentId++,this.engine.register(m,n);let f=T=>{Array.isArray(T)?T.forEach(f):this.engine.registerTrigger(a,m,n,T.name,T)};return e.data.animation.forEach(f),new A3(this,m,o,this.engine)}begin(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin()}_scheduleCountTask(){queueMicrotask(()=>{this._microtaskId++})}scheduleListenerCallback(n,e,t){if(n>=0&&n<this._microtaskId){this._zone.run(()=>e(t));return}let o=this._animationCallbacksBuffer;o.length==0&&queueMicrotask(()=>{this._zone.run(()=>{o.forEach(a=>{let[m,f]=a;m(f)}),this._animationCallbacksBuffer=[]})}),o.push([e,t])}end(){this._cdRecurDepth--,this._cdRecurDepth==0&&this._zone.runOutsideAngular(()=>{this._scheduleCountTask(),this.engine.flush(this._microtaskId)}),this.delegate.end&&this.delegate.end()}whenRenderingDone(){return this.engine.whenRenderingDone()}componentReplaced(n){this.engine.flush(),this.delegate.componentReplaced?.(n)}};var U6=(()=>{class i extends r2{constructor(e,t,o){super(e,t,o)}ngOnDestroy(){this.flush()}static \u0275fac=function(t){return new(t||i)(V2(B2),V2(Nt),V2(Lt))};static \u0275prov=D1({token:i,factory:i.\u0275fac})}return i})();function H6(){return new an}function $6(i,n,e){return new fn(i,n,e)}var ta=[{provide:Lt,useFactory:H6},{provide:r2,useClass:U6},{provide:K3,useFactory:$6,deps:[r0,r2,$2]}],tu=[{provide:Nt,useClass:N3},{provide:On,useValue:"NoopAnimations"},...ta],G6=[{provide:Nt,useFactory:()=>new pn},{provide:On,useFactory:()=>"BrowserAnimations"},...ta];function ia(){return Q3("NgEagerAnimations"),[...G6]}var na=(()=>{let n=class n extends _0{constructor(){super(...arguments),this.overrides={pinch:{enable:!1},swipe:{enable:!1},pan:{enable:!1},rotate:{enable:!1},tap:{taps:2,interval:600}}}};n.\u0275fac=(()=>{let t;return function(a){return(t||(t=j3(n)))(a||n)}})(),n.\u0275prov=D1({token:n,factory:n.\u0275fac,providedIn:"root"});let i=n;return i})();var P2=i=>i.url;var oa=()=>x(u1).user.isAdmin;var aa=[{path:Mt.BASE,pathMatch:"prefix",canActivate:[oa],children:[{path:Mt.USERS,data:{type:g2.USER},loadComponent:()=>import("./chunk-VHYPQ3D4.js").then(i=>i.AdminUsersComponent)},{path:Mt.GUESTS,data:{type:g2.GUEST},loadComponent:()=>import("./chunk-VHYPQ3D4.js").then(i=>i.AdminUsersComponent)},{path:Mt.GROUPS,children:[{path:"**",resolve:{routes:P2},data:{type:Tt.USER},loadComponent:()=>import("./chunk-GDKKLLEU.js").then(i=>i.AdminGroupsComponent)}]},{path:Mt.PGROUPS,children:[{path:"**",resolve:{routes:P2},data:{type:Tt.PERSONAL},loadComponent:()=>import("./chunk-GDKKLLEU.js").then(i=>i.AdminGroupsComponent)}]},{path:"**",redirectTo:Mt.USERS}]}];var ra=i=>x(Oo).linkValidation(i.params.uuid).pipe(_2(n=>n===!1?u2(!1):(i.data=it(K1({},i.data),{link:n}),u2(!0))));var sa=[{path:Zn.LINK,children:[{path:":uuid",loadComponent:()=>import("./chunk-UHD5XD3G.js").then(i=>i.PublicLinkComponent),canActivate:[ra]},{path:`:uuid/${Zn.AUTH}`,loadComponent:()=>import("./chunk-OMRQYBXV.js").then(i=>i.PublicLinkAuthComponent)},{path:":uuid/:error",loadComponent:()=>import("./chunk-RSS6GYNE.js").then(i=>i.PublicLinkErrorComponent)}]}];var un={BASE:`${Y4}/comments`,RECENTS:"recents",SPACES:"spaces"},A2=`${un.BASE}/${un.SPACES}`,la=`${un.BASE}/${un.RECENTS}`;var _n=class{constructor(n){Object.assign(this,n),this.author&&(this.author.avatarUrl=Zt(this.author.login)),this.mimeUrl=O1(this.file.mime),this.icon=this.file.fromShare?o1.SHARES:this.file.fromSpace?o1.SPACES:o1.PERSONAL,this.iconClass=this.file.fromShare?"purple":"primary",this.showedPath=[...this.file.path.split("/").slice(this.file.path.split("/")[1]===mt.PERSONAL?2:1),this.file.name].join("/")}};var s2=class{constructor(n){this.wasModified=!1,Object.assign(this,n),this.author.avatarUrl=Zt(this.author.login),this.wasModified=this.createdAt!==this.modifiedAt,this.dateToShow=this.wasModified?this.modifiedAt:this.createdAt}};var hn=(()=>{let n=class n{constructor(){this.store=x(q),this.layout=x(L),this.http=x(ot)}getComments(t){return this.http.get(`${A2}/${t.path}`).pipe(ae(o=>o.map(a=>new s2(a))))}createComment(t,o){return this.http.post(`${A2}/${t.path}`,o).pipe(ae(a=>new s2(a)))}updateComment(t,o){return this.http.patch(`${A2}/${t.path}`,o).pipe(ae(a=>new s2(a)))}deleteComment(t,o){return this.http.request("delete",`${A2}/${t.path}`,{body:o})}loadRecents(t){this.http.get(la,{params:new l0().set("limit",t)}).pipe(ae(o=>o.map(a=>new _n(a)))).subscribe({next:o=>{this.store.commentsRecents.update(a=>[...o,...a.slice(t)])},error:o=>this.layout.sendNotification("error","Comments","Unable to load",o)})}};n.\u0275fac=function(o){return new(o||n)},n.\u0275prov=D1({token:n,factory:n.\u0275fac,providedIn:"root"});let i=n;return i})();var W6=(i,n)=>n.id;function q6(i,n){if(i&1&&u(0,"fa-icon",2),i&2){let e=c(2);d("icon",e.icons.faTrashAlt)}}function Y6(i,n){if(i&1){let e=b();s(0,"ul",8)(1,"li",9),_("click",function(){let o=S(e).$implicit,a=c();return g(a.goToFile(o))}),s(2,"div",10),u(3,"app-user-avatar",11),l(),s(4,"div",12)(5,"span",13)(6,"span"),p(7),l()(),s(8,"span"),h(9,q6,1,1,"fa-icon",2),u(10,"fa-icon",14),s(11,"span"),p(12),l()()(),s(13,"div",15)(14,"span",16),p(15),z(16,"amTimeAgo"),l()()()()}if(i&2){let e=n.$implicit,t=n.$index,o=n.$count;U("border-0",t===o-1),r(3),d("user",e.author),r(4),y(e.content),r(),E(I("product-description text-",e.iconClass)),r(),C(e.file.inTrash?9:-1),r(),d("icon",e.icon),r(2),y(e.showedPath),r(3),y(M(16,11,e.modifiedAt,!0))}}function j6(i,n){if(i&1&&(s(0,"div",7),u(1,"fa-icon",17),s(2,"div",18),p(3,"No recent comments"),l()()),i&2){let e=c();r(),d("icon",e.icons.faCommentDots)}}var ca=(()=>{let n=class n{constructor(){this.moreElements=!1,this.icons={faCommentDots:Gi,faMagnifyingGlassPlus:di,faMagnifyingGlassMinus:mi,faTrashAlt:rt},this.router=x(i1),this.layout=x(L),this.store=x(q),this.commentsService=x(hn),this.nbInitialComments=10,this.nbComments=this.nbInitialComments,this.comments=P1(()=>this.store.commentsRecents().slice(0,this.nbComments)),this.load()}switchMore(){this.moreElements?(this.moreElements=!1,this.nbComments=this.nbInitialComments):(this.moreElements=!0,this.nbComments*=5),this.load()}goToFile(t){this.router.navigate([O.SPACES,...t.file.path.split("/")],{queryParams:{select:t.file.name}}).then(()=>this.layout.showRSideBarTab(y1.COMMENTS,!0))}load(){this.commentsService.loadRecents(this.nbComments)}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=w({type:n,selectors:[["app-comments-recents-widget"]],decls:10,vars:3,consts:[[1,"box-transparent"],[1,"box-header"],[3,"icon"],["l10nTranslate","",1,"box-title"],["role","button",1,"ms-auto","btn-link",3,"click","icon"],[1,"box-body","px-0","py-0"],[1,"products-list","product-list-in-box",3,"border-0"],[1,"d-flex","flex-column","justify-content-center","text-align-center","text-gray","mt-5"],[1,"products-list","product-list-in-box"],[1,"item",3,"click"],[1,"product-img"],[3,"user"],[1,"product-info"],[1,"product-title"],[1,"me-1",3,"icon"],[1,"product-badge"],[1,"badge","rounded-pill","bg-warning"],["size","4x",3,"icon"],["l10nTranslate","",1,"mt-4"]],template:function(o,a){o&1&&(s(0,"div",0)(1,"div",1),u(2,"fa-icon",2),s(3,"span",3),p(4,"Comments"),l(),s(5,"fa-icon",4),_("click",function(){return a.switchMore()}),l()(),s(6,"div",5),F(7,Y6,17,14,"ul",6,W6,!1,j6,4,1,"div",7),l()()),o&2&&(r(2),d("icon",a.icons.faCommentDots),r(3),d("icon",a.moreElements?a.icons.faMagnifyingGlassMinus:a.icons.faMagnifyingGlassPlus),r(2),R(a.comments()))},dependencies:[D,N,ge,I1],encapsulation:2});let i=n;return i})();var K6=(i,n)=>n.id;function Q6(i,n){if(i&1&&u(0,"fa-icon",2),i&2){let e=c(2);d("icon",e.icons.faTrashAlt)}}function X6(i,n){if(i&1){let e=b();s(0,"ul",8)(1,"li",9),_("click",function(){let o=S(e).$implicit,a=c();return g(a.goToFile(o))}),s(2,"div",10)(3,"img",11),_("error",function(){let o=S(e).$implicit;return g(o.fallBackMimeUrl())}),l()(),s(4,"div",12)(5,"span",13)(6,"span"),p(7),l()(),s(8,"span"),h(9,Q6,1,1,"fa-icon",2),u(10,"fa-icon",14),s(11,"span"),p(12),l()()(),s(13,"div",15)(14,"span",16),p(15),z(16,"amTimeAgo"),l()()()()}if(i&2){let e=n.$implicit,t=n.$index,o=n.$count;U("border-0",t===o-1),r(3),d("src",e.mimeUrl,X),r(4),y(e.name),r(),E(I("product-description text-",e.iconClass)),r(),C(e.inTrash?9:-1),r(),d("icon",e.icon),r(2),y(e.showedPath),r(3),y(M(16,11,e.mtime,!0))}}function Z6(i,n){if(i&1&&(s(0,"div",7),u(1,"fa-icon",17),s(2,"div",18),p(3,"No recent files"),l()()),i&2){let e=c();r(),d("icon",e.icons.faFileLines)}}var ma=(()=>{let n=class n{constructor(){this.moreElements=!1,this.icons={faFileLines:Wo,faMagnifyingGlassPlus:di,faMagnifyingGlassMinus:mi,faTrashAlt:rt},this.router=x(i1),this.store=x(q),this.filesService=x(E1),this.nbInitialFiles=10,this.nbFiles=this.nbInitialFiles,this.files=P1(()=>this.store.filesRecents().slice(0,this.nbFiles)),this.load()}switchMore(){this.moreElements?(this.moreElements=!1,this.nbFiles=this.nbInitialFiles):(this.moreElements=!0,this.nbFiles*=5),this.load()}goToFile(t){this.router.navigate([O.SPACES,...t.path.split("/")],{queryParams:{select:t.name}}).catch(console.error)}load(){this.filesService.loadRecents(this.nbFiles)}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=w({type:n,selectors:[["app-files-recents-widget"]],decls:10,vars:3,consts:[[1,"box-transparent"],[1,"box-header"],[3,"icon"],["l10nTranslate","",1,"box-title"],["role","button",1,"ms-auto","btn-link",3,"click","icon"],[1,"box-body","px-0","py-0"],[1,"products-list","product-list-in-box",3,"border-0"],[1,"d-flex","flex-column","justify-content-center","text-align-center","text-gray","mt-5"],[1,"products-list","product-list-in-box"],[1,"item",3,"click"],[1,"product-img"],["alt","",3,"error","src"],[1,"product-info"],[1,"product-title"],[1,"me-1",3,"icon"],[1,"product-badge"],[1,"badge","rounded-pill","bg-warning"],["size","4x",3,"icon"],["l10nTranslate","",1,"mt-4"]],template:function(o,a){o&1&&(s(0,"div",0)(1,"div",1),u(2,"fa-icon",2),s(3,"span",3),p(4,"Files"),l(),s(5,"fa-icon",4),_("click",function(){return a.switchMore()}),l()(),s(6,"div",5),F(7,X6,17,14,"ul",6,K6,!1,Z6,4,1,"div",7),l()()),o&2&&(r(2),d("icon",a.icons.faFileLines),r(3),d("icon",a.moreElements?a.icons.faMagnifyingGlassMinus:a.icons.faMagnifyingGlassPlus),r(2),R(a.files()))},dependencies:[D,N,I1],encapsulation:2});let i=n;return i})();var pa=(()=>{let n=class n{constructor(){this.layout=x(L),this.layout.setBreadcrumbIcon(mo),this.layout.setBreadcrumbNav({url:`/${Qe.BASE}/${co}`,translating:!0,sameLink:!0})}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=w({type:n,selectors:[["app-recents"]],decls:6,vars:2,consts:[["appAutoResize","",1,"fs-xs","px-2",3,"useMaxHeight","resizeOffset"],[1,"row"],[1,"col-md-6"]],template:function(o,a){o&1&&(s(0,"div",0)(1,"div",1)(2,"div",2),u(3,"app-files-recents-widget"),l(),s(4,"div",2),u(5,"app-comments-recents-widget"),l()()()),o&2&&d("useMaxHeight",!1)("resizeOffset",40)},dependencies:[t1,ma,ca],encapsulation:2});let i=n;return i})();var da=[{path:Pi.BASE,pathMatch:"full",redirectTo:Qe.BASE},{path:Qe.BASE,component:pa}];var N2={BASE:"search"},J6="Search",Cn=ai,fa={title:J6,link:N2.BASE,icon:Cn,level:2,submenus:[]};var ts=(i,n)=>n.id;function is(i,n){if(i&1){let e=b();s(0,"span",5)(1,"fa-icon",12),_("click",function(){S(e);let o=c();return g(o.clearSearch())}),l()()}if(i&2){let e=c();r(),d("icon",e.icons.faTimes)}}function ns(i,n){if(i&1&&(s(0,"div",10),p(1),l()),i&2){let e=c();r(),y(e.errorMessage)}}function os(i,n){if(i&1&&(s(0,"div")(1,"span"),p(2,"..."),l(),u(3,"span",22),s(4,"span"),p(5,"..."),l()()),i&2){let e=n.$implicit;r(3),d("innerHTML",e,C2)}}function as(i,n){if(i&1&&(u(0,"hr",20),s(1,"div",21),F(2,os,6,1,"div",null,q1),l()),i&2){let e=c().$implicit;r(2),R(e.matches)}}function rs(i,n){if(i&1){let e=b();s(0,"div",13),_("click",function(){let o=S(e).$implicit,a=c();return g(a.selectedId=o.id)})("tap",function(){let o=S(e).$implicit,a=c();return g(a.goTo(o))}),s(1,"div",14)(2,"img",15),_("error",function(){let o=S(e).$implicit;return g(o.fallBackMimeUrl())}),l(),s(3,"div",16)(4,"span",17),p(5),l(),s(6,"div"),u(7,"fa-icon",18),s(8,"span",19)(9,"span"),p(10),l()()()()(),h(11,as,4,0),l()}if(i&2){let e=n.$implicit,t=c();U("selected",e.id===t.selectedId),r(2),d("src",e.mimeUrl,X),r(3),y(e.name),r(),E(I("d-flex align-items-center text-",e.iconClass)),r(),d("icon",e.icon),r(3),y(e.showedPath),r(),C(e.matches!=null&&e.matches.length?11:-1)}}var ua=(()=>{let n=class n{constructor(){this.locale=x(K),this.store=x(q),this.searchContent=P1(()=>this.store.currentSearch().content),this.icons={SEARCH_ICON:Cn,faSpinner:Z1,faTrashCan:$1,faTimes:ke,faFont:k4},this.minCharsToSearch=3,this.loading=!1,this.errorMessage=null,this.selectedId=null,this.router=x(i1),this.layout=x(L),this.filesService=x(E1),this.layout.setBreadcrumbIcon(Cn),this.layout.setBreadcrumbNav({url:`/${N2.BASE}`,translating:!1,sameLink:!0})}setCurrentSearch(t){this.store.currentSearch.update(o=>it(K1({},o),{content:t.target.value}))}doSearch(){this.searchContent().length<this.minCharsToSearch||(this.errorMessage=null,this.loading=!0,this.selectedId=null,this.filesService.search(this.store.currentSearch()).subscribe({next:t=>{this.store.filesSearch.set(t),this.loading=!1},error:t=>{this.store.filesSearch.set([]),this.errorMessage=t.error.message,this.loading=!1}}))}toggleFullText(){this.store.currentSearch.update(t=>it(K1({},t),{fullText:!t.fullText}))}clearSearch(){this.store.currentSearch.update(t=>it(K1({},t),{content:""})),this.store.filesSearch.set([])}goTo(t){this.router.navigate([O.SPACES,...t.path.split("/")],{queryParams:{select:t.name}}).catch(console.error)}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=w({type:n,selectors:[["app-files-search"]],viewQuery:function(o,a){if(o&1&&r1(F1,7),o&2){let m;s1(m=l1())&&(a.inputFilter=m.first)}},decls:16,vars:19,consts:[[1,"app-top-menu"],[1,"input-group",2,"width","45%"],["role","button","type","button",1,"btn","btn-sm","btn-secondary",3,"click","disabled"],[3,"icon","animation"],["name","search","type","text","appAutofocus","","autocomplete","",1,"flex-fill","form-control","form-control-sm",2,"padding-right","24px",3,"input","keyup.enter","keyup.escape","value","placeholder"],[1,"cursor-pointer",2,"position","absolute","right","40px","top","3px","z-index","1001","font-size","1rem"],["placement","bottom","role","button","type","button","btnCheckbox","",1,"btn","btn-sm","btn-outline-secondary-alt","fs-xxs",3,"ngModelChange","ngModel","tooltip"],[3,"icon"],[1,"d-none","d-sm-block","ms-auto"],["appAutoResize","",1,"fs-xs"],[1,"p-3","text-danger","fw-500"],[1,"app-div-striped","py-2",3,"selected"],["role","button",3,"click","icon"],[1,"app-div-striped","py-2",3,"click","tap"],[1,"d-flex","align-items-center","text-truncate","px-2","py-1"],["alt","","draggable","false","height","28",3,"error","src"],[1,"d-flex","flex-column","text-truncate","ms-2",2,"height","34px"],[1,"fs-xxs","text-truncate"],[1,"me-1",3,"icon"],[1,"fs-xxxs","text-truncate"],[1,"m-0"],[1,"d-flex","flex-column","px-2","py-1"],[1,"fs-xxxs",3,"innerHTML"]],template:function(o,a){o&1&&(s(0,"div",0)(1,"div",1)(2,"button",2),_("click",function(){return a.doSearch()}),u(3,"fa-icon",3),l(),s(4,"input",4),z(5,"translate"),_("input",function(f){return a.setCurrentSearch(f)})("keyup.enter",function(){return a.doSearch()})("keyup.escape",function(){return a.clearSearch()}),l(),h(6,is,2,1,"span",5),s(7,"button",6),z(8,"translate"),_("ngModelChange",function(){return a.toggleFullText()}),u(9,"fa-icon",7),l()(),u(10,"app-input-filter",8),l(),s(11,"div",9),h(12,ns,2,1,"div",10),F(13,rs,12,10,"div",11,ts),z(15,"searchFilter"),l()),o&2&&(r(2),d("disabled",a.searchContent().length<a.minCharsToSearch),r(),d("icon",a.loading?a.icons.faSpinner:a.icons.SEARCH_ICON)("animation",a.loading?"spin":null),r(),d("value",a.searchContent())("placeholder",M(5,10,a.store.currentSearch().fullText?"Search for content":"Search for files",a.locale.language)),r(2),C(a.searchContent()?6:-1),r(),d("ngModel",a.store.currentSearch().fullText)("tooltip",M(8,13,"Search for content",a.locale.language)),r(2),d("icon",a.icons.faFont),r(3),C(a.errorMessage?12:-1),r(),R(M(15,16,a.store.filesSearch(),a.inputFilter.search())))},dependencies:[F1,N,Ve,Fi,x1,_1,g1,t1,z1,Z,Ie],encapsulation:2});let i=n;return i})();var _a=[{path:N2.BASE,component:ua}];var ha=(()=>{let n=class n{constructor(){this.uploadFiles=new h1,this.elementRef=x(h2),this.renderer=x(Ne)}ngOnInit(){let t=document.createElement("input");this.renderer.setAttribute(t,"type","file"),this.renderer.setStyle(t,"display","none"),this.renderer.setStyle(t,"position","absolute"),this.elementRef.nativeElement.appendChild(t),this.eventElement=this.renderer.listen(this.elementRef.nativeElement,"click",()=>t.click()),this.options?.isMultiple&&this.renderer.setAttribute(t,"multiple","multiple"),this.options?.isDirectory&&this.renderer.setAttribute(t,"webkitdirectory","webkitdirectory"),this.eventInput=this.renderer.listen(t,"change",o=>{o.target.value&&(this.uploadFiles.next({files:o.target.files,isDirectory:this.options?.isDirectory||!1}),o.target.value="")})}ngOnDestroy(){try{this.eventElement(),this.eventInput()}catch(t){console.warn(t)}}};n.\u0275fac=function(o){return new(o||n)},n.\u0275dir=X3({type:n,selectors:[["","appUploadFiles",""]],inputs:{options:"options"},outputs:{uploadFiles:"uploadFiles"}});let i=n;return i})();function ls(i,n){i&1&&(s(0,"span",3),p(1,"Compress and Save"),l())}function cs(i,n){i&1&&(s(0,"span",3),p(1,"Compress and Download"),l())}function ms(i,n){if(i&1){let e=b();s(0,"div",15)(1,"label",12)(2,"input",13),p1("ngModelChange",function(o){S(e);let a=c();return m1(a.archiveProps.compressInDirectory,o)||(a.archiveProps.compressInDirectory=o),g(o)}),l(),s(3,"span",19),p(4,"Save in the current directory"),l()()()}if(i&2){let e=c();r(2),c1("ngModel",e.archiveProps.compressInDirectory)}}var Sn=(()=>{let n=class n{constructor(){this.archiveProps={name:"",files:[],compressInDirectory:!0,extension:"tar"},this.submitEvent=new h1,this.disableInDirCompression=!1,this.locale=x(K),this.layout=x(L),this.compression=!1,this.icons={faFileArchive:oi},this.submitted=!1,this.filesService=x(E1)}ngOnInit(){this.disableInDirCompression&&(this.archiveProps.compressInDirectory=!1)}onEnter(){this.onSubmit()}onSubmit(){this.archiveProps.name&&!this.submitted&&(this.submitted=!0,this.filesService.compress(this.archiveProps),this.submitEvent.emit(),this.layout.closeDialog())}setCompression(t){this.archiveProps.extension=t?"tgz":"tar"}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=w({type:n,selectors:[["app-files-compression-dialog"]],hostBindings:function(o,a){o&1&&_("keyup.enter",function(){return a.onEnter()},Ae)},inputs:{archiveProps:"archiveProps"},outputs:{submitEvent:"submitEvent"},decls:29,vars:16,consts:[[1,"modal-header"],[1,"modal-title"],[3,"icon"],["l10nTranslate",""],[1,"fs-xs","ms-1"],["aria-label","Close","type","button",1,"btn-close","btn-close-white",3,"click"],[1,"modal-body"],[1,"input-group","input-group-sm"],["appAutofocus","","type","text",1,"form-control","form-control-sm","fs-xs",3,"ngModelChange","ngModel","placeholder"],[1,"input-group-text"],[2,"min-width","40px"],[1,"form-check","mb-0","mt-2","ps-0"],[1,"form-check-label","ps-1"],["type","checkbox",3,"ngModelChange","ngModel"],["l10nTranslate","",1,"fs-xs","me-1"],[1,"form-check","mb-0","mt-1","ps-0"],[1,"modal-footer"],["data-dismiss","modal","type","button","l10nTranslate","",1,"btn","btn-sm","btn-secondary",3,"click"],["l10nTranslate","","type","button",1,"btn","btn-sm","btn-primary",3,"click","disabled"],["l10nTranslate","",1,"fs-xs"]],template:function(o,a){o&1&&(s(0,"div",0)(1,"h4",1),u(2,"fa-icon",2),h(3,ls,2,0,"span",3)(4,cs,2,0,"span",3),s(5,"span",4),p(6),z(7,"translate"),l()(),s(8,"button",5),_("click",function(){return a.layout.closeDialog()}),l()(),s(9,"div",6)(10,"div",7)(11,"input",8),z(12,"translate"),p1("ngModelChange",function(f){return m1(a.archiveProps.name,f)||(a.archiveProps.name=f),f}),l(),s(13,"div",9)(14,"span",10),p(15),l()()(),s(16,"div",11)(17,"label",12)(18,"input",13),p1("ngModelChange",function(f){return m1(a.compression,f)||(a.compression=f),f}),_("ngModelChange",function(f){return a.setCompression(f)}),l(),s(19,"span",14),p(20,"Enable compression"),l(),s(21,"small",3),p(22,"(this may take longer)"),l()()(),h(23,ms,5,1,"div",15),l(),s(24,"div",16)(25,"button",17),_("click",function(){return a.layout.closeDialog()}),p(26,"Cancel"),l(),s(27,"button",18),_("click",function(){return a.onSubmit()}),p(28,"Confirm"),l()()),o&2&&(r(2),d("icon",a.icons.faFileArchive),r(),C(a.archiveProps.compressInDirectory?3:4),r(3),Y1("(",a.archiveProps.files.length," ",M(7,10,a.archiveProps.files.length>1?"items":"item",a.locale.language),")"),r(5),c1("ngModel",a.archiveProps.name),d("placeholder",M(12,13,"Archive name",a.locale.language)),r(4),k(".",a.archiveProps.extension),r(3),c1("ngModel",a.compression),r(5),C(a.disableInDirCompression?-1:23),r(4),d("disabled",!a.archiveProps.name||a.submitted))},dependencies:[N,x1,X1,K2,_1,g1,Ve,D,Z],encapsulation:2,changeDetection:0});let i=n;return i})();var Ca={"Microsoft Word":".docx","Microsoft Excel":".xlsx","Microsoft PowerPoint":".pptx","Open Document Text":".odt","Open Document Spreadsheet":".ods","Open Document Presentation":".odp","Rich Text Format":".rtf",Text:".txt"};var ds=["InputText"],fs=(i,n)=>n.key;function us(i,n){if(i&1&&u(0,"fa-icon",3),i&2){let e=c();d("icon",e.icons.faGlobe)}}function _s(i,n){if(i&1&&u(0,"fa-icon",3),i&2){let e=c();d("icon",e.icons.faFolderClosed)}}function hs(i,n){if(i&1&&u(0,"fa-icon",3),i&2){let e=c();d("icon",e.icons.faFileAlt)}}function Cs(i,n){if(i&1){let e=b();s(0,"li",20)(1,"a",21),_("click",function(){let o=S(e).$implicit,a=c(3);return g(a.onSelectDocType(o.key))}),p(2),l()()}if(i&2){let e=n.$implicit;r(2),y(e.key)}}function Ss(i,n){if(i&1&&(s(0,"ul",19),F(1,Cs,3,1,"li",20,fs),z(3,"keyvalue"),l()),i&2){let e=c(2);r(),R(M(3,0,e.docTypes,e.originalOrderKeyValue))}}function gs(i,n){if(i&1&&(s(0,"div",7)(1,"button",15)(2,"span",16),p(3),l(),u(4,"fa-icon",17),l(),V(5,Ss,4,3,"ul",18),l()),i&2){let e=c();r(3),y(e.selectedDocType),r(),d("icon",e.icons.faCaretDown)}}function xs(i,n){if(i&1){let e=b();s(0,"div",8)(1,"span",9),u(2,"fa-icon",3),l(),s(3,"input",22),z(4,"translate"),p1("ngModelChange",function(o){S(e);let a=c();return m1(a.downloadProp.url,o)||(a.downloadProp.url=o),g(o)}),_("keydown.control.v",function(){S(e);let o=c();return g(o.pasteUrl())})("keydown.meta.v",function(){S(e);let o=c();return g(o.pasteUrl())}),l()()}if(i&2){let e=c();r(2),d("icon",e.icons.faGlobe),r(),c1("ngModel",e.downloadProp.url),d("placeholder",M(4,3,e.downloadProp.placeholder,e.locale.language))}}function vs(i,n){if(i&1&&u(0,"fa-icon",3),i&2){let e=c();d("icon",e.icons.faFolderClosed)}}function ys(i,n){if(i&1&&u(0,"fa-icon",3),i&2){let e=c();d("icon",e.icons.faFileAlt)}}function bs(i,n){if(i&1&&(s(0,"span",12),p(1),l()),i&2){let e=c();r(),y(e.error)}}var Sa=(()=>{let n=class n{constructor(){this.refreshFiles=new h1,this.locale=x(K),this.layout=x(L),this.originalOrderKeyValue=J1,this.icons={faCaretDown:I4,faGlobe:Wt,faFolderClosed:V4,faFileAlt:yi},this.fileProp={title:"",name:"",placeholder:""},this.downloadProp={title:"Download from an external link",url:"",placeholder:"URL (https://...)"},this.selectedDocType="Text",this.docTypes=Ca,this.submitted=!1,this.filesService=x(E1)}ngOnInit(){this.inputType==="download"?(this.fileProp.title="Download from URL",this.fileProp.placeholder="File name"):this.inputType==="file"?(this.fileProp.name=`${this.layout.translateString("New document")}.txt`,this.fileProp.title="New document",this.fileProp.placeholder="Document name",this.updateFileSelection()):(this.fileProp.title="New folder",this.fileProp.placeholder="Folder name")}onSelectDocType(t){this.selectedDocType=t;let o=this.fileNamePosition();this.fileProp.name=`${this.fileProp.name.substring(0,o<0?this.fileProp.name.length:o)}${this.docTypes[t]}`,this.updateFileSelection()}onEnter(){this.fileProp.name&&this.onSubmit()}onSubmit(){if(this.submitted=!0,this.files.find(t=>t.name.toLowerCase()===this.fileProp.name.toLowerCase())){this.error="This name is already used",this.submitted=!1;return}if(this.inputType==="download"){if(!zo.test(this.downloadProp.url)){this.error="Malformed URL",this.submitted=!1;return}this.filesService.downloadFromUrl(this.downloadProp.url,this.fileProp.name)}else this.filesService.make(this.inputType,this.fileProp.name);this.layout.closeDialog()}pasteUrl(){setTimeout(()=>{this.fileProp.name=this.downloadProp.url.split("/").slice(-1)[0]},200)}fileNamePosition(){return this.fileProp.name.lastIndexOf(".")}updateFileSelection(){setTimeout(()=>{this.inputText.nativeElement.focus(),this.inputText.nativeElement.setSelectionRange(0,this.fileNamePosition())},0)}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=w({type:n,selectors:[["app-files-files-new-dialog"]],viewQuery:function(o,a){if(o&1&&r1(ds,7),o&2){let m;s1(m=l1())&&(a.inputText=m.first)}},hostBindings:function(o,a){o&1&&_("keyup.enter",function(){return a.onEnter()},Ae)},inputs:{files:"files",inputType:"inputType"},outputs:{refreshFiles:"refreshFiles"},decls:24,vars:12,consts:[["InputText",""],[1,"modal-header"],[1,"modal-title"],[3,"icon"],["l10nTranslate","",1,"ms-1"],["aria-label","Close","type","button",1,"btn-close","btn-close-white",3,"click"],[1,"modal-body"],["dropdown","",1,"btn-group","btn-group-sm","mb-3"],[1,"input-group","input-group-sm","my-2"],[1,"input-group-text"],["type","text","appAutofocus","",1,"form-control","fs-xs",3,"ngModelChange","ngModel","placeholder"],[1,"modal-footer"],["l10nTranslate","",1,"me-auto","fs-xs","text-danger"],["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"],["aria-controls","dropdown-animated","dropdownToggle","","id","button-animated","type","button",1,"btn","btn-primary","dropdown-toggle"],["l10nTranslate",""],[1,"ms-3",3,"icon"],["aria-labelledby","button-animated","class","dropdown-menu","id","dropdown-animated","role","menu",4,"dropdownMenu"],["aria-labelledby","button-animated","id","dropdown-animated","role","menu",1,"dropdown-menu"],["role","menuitem"],["l10nTranslate","",1,"dropdown-item",3,"click"],["type","text","appAutofocus","",1,"form-control","fs-xs",3,"ngModelChange","keydown.control.v","keydown.meta.v","ngModel","placeholder"]],template:function(o,a){if(o&1){let m=b();s(0,"div",1)(1,"h4",2),h(2,us,1,1,"fa-icon",3)(3,_s,1,1,"fa-icon",3)(4,hs,1,1,"fa-icon",3),s(5,"span",4),p(6),l()(),s(7,"button",5),_("click",function(){return S(m),g(a.layout.closeDialog())}),l()(),s(8,"div",6),h(9,gs,6,2,"div",7),h(10,xs,5,6,"div",8),s(11,"div",8)(12,"span",9),h(13,vs,1,1,"fa-icon",3)(14,ys,1,1,"fa-icon",3),l(),s(15,"input",10,0),z(17,"translate"),p1("ngModelChange",function(v){return S(m),m1(a.fileProp.name,v)||(a.fileProp.name=v),g(v)}),l()()(),s(18,"div",11),h(19,bs,2,1,"span",12),s(20,"button",13),_("click",function(){return S(m),g(a.layout.closeDialog())}),p(21,"Cancel"),l(),s(22,"button",14),_("click",function(){return S(m),g(a.onSubmit())}),p(23,"Confirm "),l()()}if(o&2){let m;r(2),C((m=a.inputType)==="download"?2:m==="directory"?3:m==="file"?4:-1),r(4),y(a.fileProp.title),r(3),C(a.inputType==="file"?9:-1),r(),C(a.inputType==="download"?10:-1),r(3),C(a.inputType==="directory"?13:14),r(2),c1("ngModel",a.fileProp.name),d("placeholder",M(17,9,a.fileProp.placeholder,a.locale.language)),r(4),C(a.error?19:-1),r(3),d("disabled",!a.fileProp.name||a.inputType==="download"&&!a.downloadProp.url||a.submitted)}},dependencies:[N,D,Oi,Ue,He,Be,x1,X1,_1,g1,Ve,Z,Q1],encapsulation:2});let i=n;return i})();var ga=i=>({arg:i});function Ts(i,n){if(i&1&&u(0,"fa-icon",4),i&2){let e=c();d("icon",e.icons.faSpinner)}}function zs(i,n){if(i&1&&(u(0,"div",10),z(1,"translate")),i&2){let e=c(2);d("innerHTML",re(1,1,e.permanently?"delete_multiple_files":"trash_multiple_files",e.locale.language,H1(5,ga,e.files.length)),C2)}}function Ms(i,n){if(i&1&&(u(0,"div",10),z(1,"translate")),i&2){let e=c(2);d("innerHTML",re(1,1,e.permanently?"delete_one_file":"trash_one_file",e.locale.language,H1(5,ga,e.files[0].name)),C2)}}function Es(i,n){if(i&1&&h(0,zs,2,7,"div",10)(1,Ms,2,7,"div",10),i&2){let e=c();C(e.files.length>1?0:e.files.length===1?1:-1)}}function ws(i,n){if(i&1&&(s(0,"div",3),p(1),l()),i&2){let e=c();r(),y(e.permanently?"Permanent deletion":"Moving to trash")}}var xa=(()=>{let n=class n{constructor(){this.files=[],this.permanently=!1,this.removeFiles=new h1,this.locale=x(K),this.layout=x(L),this.icons={faTrashCan:$1,faSpinner:Z1},this.submitted=!1}onEnter(){this.onSubmit()}onSubmit(){this.submitted||(this.submitted=!0,this.removeFiles.next(),this.layout.closeDialog())}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=w({type:n,selectors:[["app-files-trash-dialog"]],hostBindings:function(o,a){o&1&&_("keyup.enter",function(){return a.onEnter()},Ae)},inputs:{files:"files",permanently:"permanently"},outputs:{removeFiles:"removeFiles"},decls:16,vars:4,consts:[[1,"modal-header"],["l10nTranslate","",1,"modal-title"],[1,"me-1",3,"icon"],["l10nTranslate",""],["animation","spin",1,"ms-2",3,"icon"],["aria-label","Close","type","button",1,"btn-close","btn-close-white",3,"click"],[1,"modal-body"],[1,"modal-footer"],["data-dismiss","modal","type","button","l10nTranslate","",1,"btn","btn-sm","btn-secondary",3,"click"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-danger",3,"click","disabled"],[3,"innerHTML"]],template:function(o,a){if(o&1&&(s(0,"div",0)(1,"h4",1),u(2,"fa-icon",2),s(3,"span",3),p(4,"Trash"),l(),h(5,Ts,1,1,"fa-icon",4),l(),s(6,"button",5),_("click",function(){return a.layout.closeDialog()}),l()(),s(7,"div",6)(8,"div"),h(9,Es,2,1)(10,ws,2,1,"div",3),l()(),s(11,"div",7)(12,"button",8),_("click",function(){return a.layout.closeDialog()}),p(13,"Cancel"),l(),s(14,"button",9),_("click",function(){return a.onSubmit()}),p(15,"Confirm"),l()()),o&2){let m;r(2),d("icon",a.icons.faTrashCan),r(3),C(a.submitted?5:-1),r(4),C((m=a.submitted)===!1?9:m===!0?10:-1),r(5),d("disabled",a.submitted)}},dependencies:[D,N,Z],encapsulation:2,changeDetection:0});let i=n;return i})();function Ps(i,n){if(i&1&&u(0,"fa-icon",4),i&2){let e=c();d("icon",e.icons.faSpinner)}}var va=(()=>{let n=class n{constructor(){this.files=[],this.layout=x(L),this.icons={faTrashCan:$1,faSpinner:Z1},this.submitted=!1,this.filesService=x(E1)}onEnter(){this.onSubmit()}onSubmit(){this.submitted||(this.submitted=!0,this.filesService.delete(this.files),this.layout.closeDialog(),this.submitted=!1)}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=w({type:n,selectors:[["app-files-trash-empty-dialog"]],hostBindings:function(o,a){o&1&&_("keyup.enter",function(){return a.onEnter()},Ae)},inputs:{files:"files"},decls:17,vars:3,consts:[[1,"modal-header"],["l10nTranslate","",1,"modal-title"],[1,"me-1",3,"icon"],["l10nTranslate",""],["animation","spin",1,"ms-2",3,"icon"],["aria-label","Close","type","button",1,"btn-close","btn-close-white",3,"click"],[1,"modal-body"],[1,"modal-footer"],["data-dismiss","modal","type","button","l10nTranslate","",1,"btn","btn-sm","btn-secondary",3,"click"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-danger",3,"click","disabled"]],template:function(o,a){o&1&&(s(0,"div",0)(1,"h4",1),u(2,"fa-icon",2),s(3,"span",3),p(4,"Trash"),l(),h(5,Ps,1,1,"fa-icon",4),l(),s(6,"button",5),_("click",function(){return a.layout.closeDialog()}),l()(),s(7,"div",6)(8,"div",3),p(9,"Would you like to empty the trash ?"),l(),s(10,"small",3),p(11,"All items will be permanently deleted"),l()(),s(12,"div",7)(13,"button",8),_("click",function(){return a.layout.closeDialog()}),p(14,"Cancel"),l(),s(15,"button",9),_("click",function(){return a.onSubmit()}),p(16,"Confirm"),l()()),o&2&&(r(2),d("icon",a.icons.faTrashCan),r(3),C(a.submitted?5:-1),r(10),d("disabled",a.submitted))},dependencies:[N,D],encapsulation:2});let i=n;return i})();var c2={VIEWABLE:new Map([["doc","word"],["docm","word"],["docx","word"],["dot","word"],["dotm","word"],["dotx","word"],["epub","word"],["fb2","word"],["fodt","word"],["gdoc","word"],["htm","word"],["html","word"],["hwp","word"],["hwpx","word"],["md","word"],["mht","word"],["mhtml","word"],["odt","word"],["ott","word"],["pages","word"],["rtf","word"],["stw","word"],["sxw","word"],["txt","word"],["wps","word"],["wpt","word"],["xml","word"],["md","word"],["csv","cell"],["et","cell"],["ett","cell"],["fods","cell"],["gsheet","cell"],["numbers","cell"],["ods","cell"],["ots","cell"],["sxc","cell"],["xls","cell"],["xlsm","cell"],["xlsx","cell"],["xlt","cell"],["xltm","cell"],["xltx","cell"],["dps","slide"],["dpt","slide"],["fodp","slide"],["gslide","slide"],["key","slide"],["odg","slide"],["odp","slide"],["otp","slide"],["pot","slide"],["potm","slide"],["potx","slide"],["pps","slide"],["ppsm","slide"],["ppsx","slide"],["ppt","slide"],["pptm","slide"],["pptx","slide"],["sxi","slide"],["djvu","pdf"],["docxf","pdf"],["oform","pdf"],["oxps","pdf"],["pdf","pdf"],["xps","pdf"],["vsdm","diagram"],["vsdx","diagram"],["vssm","diagram"],["vssx","diagram"],["vstm","diagram"],["vstx","diagram"]]),EDITABLE:new Map([["docm","word"],["docx","word"],["dotm","word"],["dotx","word"],["epub","word"],["fb2","word"],["html","word"],["odt","word"],["ott","word"],["rtf","word"],["txt","word"],["md","word"],["xlsb","cell"],["xlsm","cell"],["xlsx","cell"],["xltm","cell"],["xltx","cell"],["csv","cell"],["ods","cell"],["ots","cell"],["potm","slide"],["potx","slide"],["ppsm","slide"],["ppsx","slide"],["pptm","slide"],["pptx","slide"],["odp","slide"],["otp","slide"],["pdf","pdf"]])};var gn=class{constructor(n,e,t=!1){this.shares=[],this.links=[],this.spaces=[],this.syncs=[],this.newly=0,this.isRenamed=!1,this.isImage=!1,this.isViewable=!1,this.isEditable=!1,this.isCompressible=!0,this.isBeingDeleted=!1,this.isSelected=!1,this.isDisabled=!1,this.canBeReShared=!1,this.haveThumbnail=!1,this.setShares(Ke("shares",n)),Object.assign(this,n),this.path=`${e}/${this.path!=="."?`${this.path}/`:""}${this.root?.alias||this.name}`,this.mime=this.getMime(this.mime,t),this.hTimeAgo=(0,bt.default)(this.mtime).fromNow(!0),this.newly=Et(this.mtime),this.setMimeUrl(),this.setHSize(),this.setRoot(t)}get dataUrl(){return`${Ko}/${this.path}`}get taskUrl(){return`${Zo}/${this.path}`}get thumbnailUrl(){return`${Qo}/${this.path}`}fallBackMimeUrl(){this.mimeUrl=$i}rename(n){this.name=n,this.path=[...this.path.split("/").slice(0,-1),this.name].join("/")}getType(n){return this.isDir?n?t2:ce:wo}getMime(n,e){if(this.isDir)return this.isViewable=!1,this.getType(e);if(n){let t=n.split("-"),o=t[t.length-1],a=this.name.split(".").pop().toLowerCase();return this.shortMime=t[0],a==="pdf"?(this.shortMime=o,this.isViewable=!0,this.isEditable=c2.EDITABLE.has(a)):c2.EDITABLE.has(a)||c2.VIEWABLE.has(a)?(this.shortMime="document",this.isEditable=c2.EDITABLE.has(a),this.isViewable=this.isEditable||c2.VIEWABLE.has(a)):o==="html"?(this.isViewable=!0,this.isEditable=!0):a==="mp4"?(this.isViewable=!0,this.shortMime="media",this.haveThumbnail=!0):this.shortMime==="image"?(this.isImage=!0,this.isViewable=!0,this.haveThumbnail=!0):["video","audio"].indexOf(this.shortMime)>-1?Lo.has(n)?this.isViewable=!1:(this.shortMime="media",this.isViewable=!0,this.haveThumbnail=!0):ko.has(n)?(this.isCompressible=!1,this.isViewable=!1):Do.has(a)||(this.isViewable=!0,this.shortMime="text"),n}else return this.isViewable=!0,this.shortMime="text",this.getType(e)}setMimeUrl(){this.mimeUrl=O1(this.mime)}setRoot(n){this.root&&(this.root.enabled===!1&&(this.isDisabled=!0),this.root.hPerms=_o(this.root.permissions,this.isDir?[]:[te.DELETE,te.ADD]),this.root?.owner?.login&&(this.root.owner.avatarUrl=Zt(this.root.owner.login)),this.canBeReShared=n&&te.SHARE_OUTSIDE in this.root.hPerms)}setHSize(){this.hSize=this.isDir?"\u25CF":Z4(this.size,0,!0)}setShares(n){if(n?.length)for(let e of n)e.type===0?this.shares.push(e):this.links.push(e)}};var ya=(()=>{let n=class n{constructor(){this.supportUploadDirectory=no(),this.http=x(ot),this.filesService=x(E1),this.filesTasksService=x(Wi)}addFiles(t){return nt(this,null,function*(){let o=`${Xo}/${this.filesService.currentRoute}`,a=[];for(let[m,f]of Object.entries(this.sortFiles(t))){let v=`${this.filesService.currentRoute}/${m}`.split("/").slice(0,-1).join("/").normalize(),T=`${this.filesService.currentRoute}/${m}`.split("/").slice(-1)[0].normalize(),A=this.filesTasksService.createUploadTask(v,T,f.size);a.unshift([A,this.uploadFiles(`${o}/${m}`,f.form).pipe(Pe(P=>P.type===c0.UploadProgress),O2(P=>this.updateProgress(A,P)))])}for(let[m,f]of a)try{yield H3(f),m.props.progress=100,m.status=v2.SUCCESS}catch(v){m.status=v2.ERROR,v.status===0?m.result=v.statusText:m.result=v.error.message}finally{this.filesTasksService.updateTask(m)}})}onDropFiles(t){t.dataTransfer.items&&t.dataTransfer.items[0]?.webkitGetAsEntry?this.webkitReadDataTransfer(t):this.addFiles(t.dataTransfer.files).catch(console.error)}uploadFiles(t,o){return this.http.post(t,o,{reportProgress:!0,observe:"events"})}updateProgress(t,o){t.props.size=o.loaded,t.props.progress=Math.round(100*o.loaded/o.total)}sortFiles(t){let o={};for(let a of t){let m=a.relativePath||a.webkitRelativePath,f=m?m.split("/")[0]:a.name;f in o||(o[f]={nb:0,size:0,form:new FormData}),o[f].form.append("file",a,m||a.name),o[f].nb++,o[f].size+=a.size}return o}webkitReadDataTransfer(t){let o=t.dataTransfer.items.length,a=[],m=P=>{P.readEntries(function(Y){if(Y.length){o+=Y.length;for(let G of Y)G.isFile?G.file(W=>{f(G,W)},v):G.isDirectory&&m(G.createReader());m(P)}else T()},v)},f=(P,Y)=>{A(P,Y),a.push(Y),T()},v=P=>{throw T(),P},T=()=>{--o==0&&this.addFiles(a).catch(console.error)},A=(P,Y)=>{P.fullPath&&P.fullPath!==`/${Y.name}`&&(Y.relativePath=P.fullPath.startsWith("/")?P.fullPath.slice(1):P.fullPath)};for(let P of t.dataTransfer.items){let Y=P.webkitGetAsEntry();if(!Y){T();return}Y.isFile?f(Y,P.getAsFile()):m(Y.createReader())}}};n.\u0275fac=function(o){return new(o||n)},n.\u0275prov=D1({token:n,factory:n.\u0275fac,providedIn:"root"});let i=n;return i})();var ba=(()=>{let n=class n{constructor(){this.inPersonalSpace=!1,this.http=x(ot),this.layout=x(L),this.breadCrumbFilesRepo=!1,this.inShareRepo=!1,this.inRootSpace=!1}setEnvironment(t,o){this.breadCrumbFilesRepo=O.FILES===t,this.inPersonalSpace=o.length&&o[0].path===O.PERSONAL,this.inShareRepo=t===O.SHARES,this.inRootSpace=this.inShareRepo?o.length===0:o.length===1,this.browseApi=J4(`${lo}/${t}`,o,!1),this.breadCrumbUrl=`/${O.SPACES}/${t}${Xt(o)}`,this.breadCrumbIcon=this.inShareRepo?o1.SHARED_WITH_ME:this.breadCrumbFilesRepo?this.inPersonalSpace&&this.breadCrumbFilesRepo?o1.PERSONAL:o1.SPACES:o1.TRASH}loadFiles(){return this.http.get(this.browseApi).pipe(O2(()=>{this.layout.setBreadcrumbIcon(this.breadCrumbIcon),this.layout.setBreadcrumbNav(this.breadcrumbNav())}),R2(t=>It(()=>t)))}breadcrumbNav(){return{url:this.inPersonalSpace&&this.inRootSpace?`${this.breadCrumbUrl}/${Re.SHORT_PERSONAL_FILES}`:this.inShareRepo&&this.inRootSpace?`${this.breadCrumbUrl}/${Re.SHARED_WITH_ME}`:this.breadCrumbUrl,translating:this.inRootSpace&&(this.inPersonalSpace||this.inShareRepo),sameLink:this.inRootSpace&&(this.inPersonalSpace||this.inShareRepo),firstLink:this.inPersonalSpace&&this.breadCrumbFilesRepo?null:this.breadCrumbFilesRepo?O.SPACES:this.inShareRepo?O.SPACES_SHARES:O.TRASH,mutateLevel:this.inPersonalSpace&&!this.breadCrumbFilesRepo&&!this.inRootSpace?{0:{setTitle:Re.PERSONAL_FILES,translateTitle:!0}}:null,splicing:this.inPersonalSpace?!this.breadCrumbFilesRepo&&!this.inRootSpace?2:3:2}}};n.\u0275fac=function(o){return new(o||n)},n.\u0275prov=D1({token:n,factory:n.\u0275fac,providedIn:"root"});let i=n;return i})();function As(i,n){if(i&1&&u(0,"fa-icon",4),i&2){let e=c();d("icon",e.icons.faSpinner)}}var Ta=(()=>{let n=class n{constructor(){this.addAnchoredFiles=new h1,this.locale=x(K),this.layout=x(L),this.icons={faAnchor:Ti,faPlus:De,faSpinner:Z1,SPACES:o1.SPACES},this.space={roots:[]},this.submitted=!1,this.loading=!1,this.userService=x(u1),this.user=this.userService.user,this.spacesService=x(Ro)}ngOnInit(){for(let t of this.files)this.space.roots.push({id:t.id,name:t.name,alias:t.name,permissions:"",createdAt:new Date,isRenamed:!1,hPerms:uo("",[te.SHARE_INSIDE]),isDir:t.mime===ce,owner:{id:this.user.id,login:this.user.login},file:t})}onSetSpace(t){this.selectedSpace=t}onSearchSpaces(t){return this.spacesService.searchSpaces({search:t,shareInsidePermission:!0,limit:6})}onSubmit(){!this.selectedSpace||!this.space.roots.length||(this.loading=!0,this.submitted=!0,this.spacesService.createUserSpaceRoots(this.selectedSpace.id,this.space.roots).subscribe({next:t=>{t.length&&this.addAnchoredFiles.emit({space:this.selectedSpace,fileNames:t.map(o=>o.file.path.split("/").at(-1))}),this.layout.closeDialog()},error:t=>{this.layout.sendNotification("error","Anchor files to a space",t.error.message),this.loading=!1,this.submitted=!1}}))}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=w({type:n,selectors:[["app-space-anchor-file-dialog"]],inputs:{files:"files"},decls:22,vars:13,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"],["aria-label","Close","type","button",1,"btn-close","btn-close-white","ms-auto",3,"click"],[1,"modal-body"],[1,"mb-3"],["for","space","l10nTranslate",""],["id","space",3,"data","searchFunction","active","itemIcon","placeholder"],["for","files","l10nTranslate",""],["id","files",3,"space","user","showUsers"],[1,"modal-footer"],["data-dismiss","modal","type","button","l10nTranslate","",1,"btn","btn-sm","btn-secondary","ms-auto",3,"click"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-primary",3,"click","disabled"]],template:function(o,a){o&1&&(s(0,"div",0)(1,"h4",1),u(2,"fa-icon",2),s(3,"span",3),p(4,"Anchor files to a space"),l()(),h(5,As,1,1,"fa-icon",4),s(6,"button",5),_("click",function(){return a.layout.closeDialog()}),l()(),s(7,"div",6)(8,"div",7)(9,"label",8),p(10,"Space"),l(),s(11,"app-select",9),z(12,"translate"),_("data",function(f){return a.onSetSpace(f)}),l()(),s(13,"div",7)(14,"label",10),p(15,"Files"),l(),u(16,"app-space-manage-roots",11),l()(),s(17,"div",12)(18,"button",13),_("click",function(){return a.layout.closeDialog()}),p(19,"Cancel"),l(),s(20,"button",14),_("click",function(){return a.onSubmit()}),p(21," Confirm "),l()()),o&2&&(r(2),d("icon",a.icons.faAnchor),r(3),C(a.loading?5:-1),r(6),d("searchFunction",a.onSearchSpaces.bind(a))("active",a.selectedSpace)("itemIcon",a.icons.SPACES)("placeholder",M(12,10,"Type to search for space to select",a.locale.language)),r(5),d("space",a.space)("user",a.user)("showUsers",!1),r(4),d("disabled",a.submitted||!a.selectedSpace||!a.space.roots.length))},dependencies:[N,D,n5,Mo,Z],encapsulation:2});let i=n;return i})();var Ns=["MainContextMenu"],Ls=["MainReadOnlyContextMenu"],ks=["FileContextMenu"],Ds=i=>({nb:i}),Fs=()=>({isMultiple:!0}),Rs=()=>({isDirectory:!0}),Ea=(i,n)=>n.id,wa=(i,n)=>n.key;function Is(i,n){if(i&1){let e=b();s(0,"a",33),_("uploadFiles",function(o){S(e);let a=c(3);return g(a.onUploadFiles(o,!0))}),s(1,"span",22),u(2,"fa-icon",10),p(3,"Upload folders"),l()()}if(i&2){let e=c(3);d("options",ve(2,Rs)),r(2),d("icon",e.icons.faUpload)}}function Os(i,n){if(i&1){let e=b();s(0,"ul",28)(1,"li",29)(2,"a",30),_("click",function(){S(e);let o=c(2);return g(o.openNewDialog("directory"))}),s(3,"span",22),u(4,"fa-icon",10),p(5,"New folder"),l()()(),s(6,"li",29)(7,"a",30),_("click",function(){S(e);let o=c(2);return g(o.openNewDialog("file"))}),s(8,"span",22),u(9,"fa-icon",10),p(10,"New document"),l()()(),s(11,"li",29)(12,"a",30),_("click",function(){S(e);let o=c(2);return g(o.openNewDialog("download"))}),s(13,"span",22),u(14,"fa-icon",10),p(15,"Download from URL"),l()()(),s(16,"li",29)(17,"a",31),_("uploadFiles",function(o){S(e);let a=c(2);return g(a.onUploadFiles(o))}),s(18,"span",22),u(19,"fa-icon",10),p(20,"Upload files"),l()(),h(21,Is,4,3,"a",32),l()()}if(i&2){let e=c(2);r(4),d("icon",e.icons.PERSONAL),r(5),d("icon",e.icons.faFileAlt),r(5),d("icon",e.icons.faGlobe),r(3),d("options",ve(6,Fs)),r(2),d("icon",e.icons.faUpload),r(2),C(e.supportUploadFolder?21:-1)}}function Vs(i,n){if(i&1){let e=b();s(0,"div",26),_("onShown",function(){S(e);let o=c();return g(o.initUpload())}),s(1,"button",27),z(2,"translate"),u(3,"fa-icon",10),l(),V(4,Os,22,7,"ul",13),l()}if(i&2){let e=c();r(),d("tooltip",M(2,2,"New",e.locale.language)),r(2),d("icon",e.icons.faPlus)}}function Bs(i,n){if(i&1){let e=b();s(0,"li",29)(1,"a",30),_("click",function(){S(e);let o=c(3);return g(o.openSpaceAnchorFileDialog())}),s(2,"span",22),u(3,"fa-icon",10),p(4,"Anchor to a space"),l()()()}if(i&2){let e=c(3);r(3),d("icon",e.icons.faAnchor)}}function Us(i,n){if(i&1){let e=b();s(0,"ul",28)(1,"li",29)(2,"a",30),_("click",function(){S(e);let o=c(2);return g(o.openShareDialog())}),s(3,"span",22),u(4,"fa-icon",10),p(5,"New share"),l()()(),s(6,"li",29)(7,"a",30),_("click",function(){S(e);let o=c(2);return g(o.openShareLinkDialog())}),s(8,"span",22),u(9,"fa-icon",10),p(10,"New share link"),l()()(),h(11,Bs,5,1,"li",29),l()}if(i&2){let e=c(2);r(4),d("icon",e.icons.SHARES),r(5),d("icon",e.icons.faLink),r(2),C(e.isFilesRepo?11:-1)}}function Hs(i,n){if(i&1&&(s(0,"div",11)(1,"button",27),z(2,"translate"),u(3,"fa-icon",10),l(),V(4,Us,12,3,"ul",13),l()),i&2){let e=c();d("isDisabled",!e.hasSelection||e.inSharesList&&!e.selection[0].canBeReShared),r(),d("tooltip",M(2,3,"Share",e.locale.language)),r(2),d("icon",e.icons.SHARES)}}function $s(i,n){if(i&1){let e=b();s(0,"button",9),z(1,"translate"),_("click",function(){S(e);let o=c(2);return g(o.openEmptyTrashDialog())}),u(2,"fa-icon",10),l()}if(i&2){let e=c(2);d("disabled",!e.stats.elements)("tooltip",M(1,3,"Empty",e.locale.language)),r(2),d("icon",e.icons.TRASH)}}function Gs(i,n){if(i&1){let e=b();s(0,"button",9),z(1,"translate"),_("click",function(){S(e);let o=c();return g(o.openTrashDialog(!0))}),u(2,"fa-icon",10),l(),h(3,$s,3,6,"button",34)}if(i&2){let e=c();d("disabled",!e.hasSelection)("tooltip",M(1,4,"Remove",e.locale.language)),r(2),d("icon",e.icons.faBan),r(),C(e.inRootSpace?3:-1)}}function Ws(i,n){if(i&1){let e=b();s(0,"li",29)(1,"a",30),_("click",function(){S(e);let o=c(3);return g(o.shortcutView())}),s(2,"span",22),u(3,"fa-icon",10),p(4,"View"),l()()()}if(i&2){let e=c(3);r(3),d("icon",e.icons.faEye)}}function qs(i,n){if(i&1){let e=b();s(0,"li",29)(1,"a",30),_("click",function(){S(e);let o=c(3);return g(o.shortcutEdit())}),s(2,"span",22),u(3,"fa-icon",10),p(4,"Edit"),l()()()}if(i&2){let e=c(3);r(3),d("icon",e.icons.faPen)}}function Ys(i,n){if(i&1){let e=b();s(0,"li",29)(1,"a",30),_("click",function(){S(e);let o=c(3);return g(o.shortcutRename())}),s(2,"span",22),u(3,"fa-icon",10),p(4,"Rename"),l()()()}if(i&2){let e=c(3);r(3),d("icon",e.icons.faSpellCheck)}}function js(i,n){if(i&1){let e=b();s(0,"li",29)(1,"a",30),_("click",function(){S(e);let o=c(3);return g(o.addToSync())}),s(2,"span",22),u(3,"fa-icon",10),p(4,"Synchronize"),l()()()}if(i&2){let e=c(3);r(3),d("icon",e.icons.faRotate)}}function Ks(i,n){if(i&1){let e=b();s(0,"li",29)(1,"a",30),_("click",function(){S(e);let o=c(3);return g(o.decompressFile())}),s(2,"span",22),u(3,"fa-icon",10),p(4,"Decompress"),l()()()}if(i&2){let e=c(3);r(3),d("icon",e.icons.faFileArchive)}}function Qs(i,n){if(i&1){let e=b();h(0,Ws,5,1,"li",29),h(1,qs,5,1,"li",29),h(2,Ys,5,1,"li",29),s(3,"li",29)(4,"a",30),_("click",function(){S(e);let o=c(2);return g(o.layout.showRSideBarTab(o.TAB_MENU.COMMENTS,!0))}),s(5,"span",22),u(6,"fa-icon",10),p(7,"Comment"),l()()(),h(8,js,5,1,"li",29),h(9,Ks,5,1,"li",29)}if(i&2){let e=c(2);C(e.selection[0].isViewable?0:-1),r(),C(e.selection[0].isEditable?1:-1),r(),C(e.inSharesList?-1:2),r(4),d("icon",e.icons.faCommentDots),r(2),C(e.isElectronApp&&e.selection[0].isDir?8:-1),r(),C(!e.inSharesList&&!e.selection[0].isCompressible?9:-1)}}function Xs(i,n){if(i&1){let e=b();s(0,"li",29)(1,"a",30),_("click",function(){S(e);let o=c(2);return g(o.openCompressionDialog())}),s(2,"span",22),u(3,"fa-icon",10),p(4,"Compress"),l()()()}if(i&2){let e=c(2);r(3),d("icon",e.icons.faFileArchive)}}function Zs(i,n){if(i&1){let e=b();s(0,"li",29)(1,"a",30),_("click",function(){S(e);let o=c(2);return g(o.copyMoveFiles())}),s(2,"span",22),u(3,"fa-icon",10),p(4,"Copy/Move"),l()()()}if(i&2){let e=c(2);r(3),d("icon",e.icons.faArrowsAlt)}}function Js(i,n){if(i&1){let e=b();s(0,"a",30),_("click",function(){S(e);let o=c(3);return g(o.openTrashDialog(!0))}),s(1,"span",22),u(2,"fa-icon",10),p(3,"Remove"),l()()}if(i&2){let e=c(3);r(2),d("icon",e.icons.faBan)}}function el(i,n){if(i&1){let e=b();s(0,"a",30),_("click",function(){S(e);let o=c(3);return g(o.openTrashDialog())}),s(1,"span",22),u(2,"fa-icon",10),p(3,"Trash"),l()()}if(i&2){let e=c(3);r(2),d("icon",e.icons.TRASH)}}function tl(i,n){if(i&1&&(u(0,"li",35),s(1,"li",29),h(2,Js,4,1,"a",36)(3,el,4,1,"a",36),l()),i&2){let e=c(2);r(2),C(e.isTrashRepo?2:3)}}function il(i,n){if(i&1){let e=b();s(0,"ul",28),h(1,Qs,10,6),h(2,Xs,5,1,"li",29),h(3,Zs,5,1,"li",29),s(4,"li",29)(5,"a",30),_("click",function(){S(e);let o=c();return g(o.addToClipboard())}),s(6,"span",22),u(7,"fa-icon",10),p(8,"Clipboard"),l()()(),s(9,"li",29)(10,"a",30),_("click",function(){S(e);let o=c();return g(o.layout.showRSideBarTab(o.TAB_MENU.SELECTION))}),s(11,"span",22),u(12,"fa-icon",10),p(13,"Informations"),l()()(),h(14,tl,4,1),l()}if(i&2){let e=c();r(),C(e.selection.length===1?1:-1),r(),C(e.canCompress?2:-1),r(),C(e.hasDisabledItemsInSelection?-1:3),r(4),d("icon",e.icons.faClipboardList),r(5),d("icon",e.icons.faCircleInfo),r(2),C(e.inSharesList?-1:14)}}function nl(i,n){i&1&&u(0,"div")}function ol(i,n){if(i&1){let e=b();s(0,"img",56),_("error",function(){S(e);let o=c().$implicit;return g(o.isImage=!1)}),l()}if(i&2){let e=c().$implicit,t=c(2);n1("height",t.galleryMode.image,"px"),d("src",qe("",e.thumbnailUrl,"?size=",t.galleryMode.imageRes),X)}}function al(i,n){if(i&1){let e=b();s(0,"img",57),_("error",function(){S(e);let o=c().$implicit;return g(o.fallBackMimeUrl())}),l()}if(i&2){let e=c().$implicit,t=c(2);d("src",e.mimeUrl,X)("height",t.galleryMode.image)("width",t.galleryMode.image)}}function rl(i,n){if(i&1&&(s(0,"span",46),u(1,"fa-icon",10),l()),i&2){let e=c().$implicit,t=c(2);d("tooltip",Vn(e.lock.owner)),r(),d("icon",e.lock.isExclusive?t.icons.faLock:t.icons.faLockOpen)}}function sl(i,n){if(i&1){let e=b();s(0,"span",58),_("click",function(){S(e);let o=c(3);return g(o.layout.showRSideBarTab(o.TAB_MENU.SELECTION,!0))}),u(1,"fa-icon",10),p(2),l()}if(i&2){let e=c().$implicit,t=c(2);n1("font-size",t.galleryMode.textSize,"px"),r(),d("icon",t.icons.SHARES),r(),k("\xA0",e.shares.length," ")}}function ll(i,n){if(i&1){let e=b();s(0,"span",59),_("click",function(){S(e);let o=c(3);return g(o.layout.showRSideBarTab(o.TAB_MENU.SELECTION,!0))}),u(1,"fa-icon",10),p(2),l()}if(i&2){let e=c().$implicit,t=c(2);n1("font-size",t.galleryMode.textSize,"px"),r(),d("icon",t.icons.SPACES),r(),k("\xA0",e.spaces.length," ")}}function cl(i,n){if(i&1){let e=b();s(0,"span",60),_("click",function(){S(e);let o=c(3);return g(o.layout.showRSideBarTab(o.TAB_MENU.SELECTION,!0))}),u(1,"fa-icon",10),p(2),l()}if(i&2){let e=c().$implicit,t=c(2);n1("font-size",t.galleryMode.textSize,"px"),r(),d("icon",t.icons.LINKS),r(),k("\xA0",e.links.length," ")}}function ml(i,n){if(i&1){let e=b();s(0,"span",60),_("click",function(){S(e);let o=c(3);return g(o.layout.showRSideBarTab(o.TAB_MENU.SELECTION,!0))}),u(1,"fa-icon",10),p(2),l()}if(i&2){let e=c().$implicit,t=c(2);n1("font-size",t.galleryMode.textSize,"px"),r(),d("icon",t.icons.SYNC),r(),k("\xA0",e.syncs.length," ")}}function pl(i,n){if(i&1){let e=b();s(0,"span",61),_("click",function(){S(e);let o=c(3);return g(o.layout.showRSideBarTab(o.TAB_MENU.COMMENTS,!0))}),u(1,"fa-icon",10),l()}if(i&2){let e=c(3);n1("font-size",e.galleryMode.textSize,"px"),r(),d("icon",e.icons.faCommentDots)}}function dl(i,n){if(i&1&&(s(0,"span",51),u(1,"app-user-avatar",62),l()),i&2){let e=c().$implicit,t=c(2);r(),d("user",e.root.owner)("height",t.galleryMode.dimensions/3)("width",t.galleryMode.dimensions/3)("fontSize",t.galleryMode.faSize/2)}}function fl(i,n){if(i&1&&(s(0,"span",52)(1,"span",63),p(2),l()()),i&2){let e=c().$implicit,t=c(2);r(),n1("font-size",t.galleryMode.textSize,"px"),r(),y(e.hTimeAgo)}}function ul(i,n){if(i&1){let e=b();s(0,"input",64),_("renamingInProgress",function(o){S(e);let a=c(3);return g(a.setRenamingInProgress(o))})("updateObject",function(o){S(e);let a=c(3);return g(a.renameFile(o))}),l()}if(i&2){let e=c().$implicit,t=c(2);n1("font-size",t.galleryMode.textSize,"px"),d("inputObject",e)("fullWidth",!0)("textCenter",!0)}}function _l(i,n){if(i&1&&(s(0,"span",65),p(1),l()),i&2){let e=c().$implicit,t=c(2);n1("font-size",t.galleryMode.textSize,"px"),r(),y(e.name)}}function hl(i,n){if(i&1){let e=b();s(0,"div",41),_("click",function(o){let a=S(e).$implicit,m=c(2);return g(m.onSelect(o,a))})("contextmenu",function(o){let a=S(e).$implicit,m=c(2);return g(m.onTargetContextMenu(o,a))})("pressup",function(o){let a=S(e).$implicit,m=c(2);return g(m.onTargetContextMenu(o,a))})("tap",function(){let o=S(e).$implicit,a=c(2);return g(a.browse(o))}),s(1,"div",42),h(2,ol,1,5,"img",43)(3,al,1,3,"img",44),s(4,"span",45),h(5,rl,2,3,"span",46),h(6,sl,3,4,"span",47),h(7,ll,3,4,"span",48),h(8,cl,3,4,"span",49),h(9,ml,3,4,"span",49),h(10,pl,2,3,"span",50),l(),h(11,dl,2,4,"span",51),h(12,fl,3,3,"span",52),l(),s(13,"div",53),h(14,ul,1,5,"input",54)(15,_l,2,3,"span",55),l()()}if(i&2){let e=n.$implicit,t=n.$index,o=c(2);n1("height",o.galleryMode.dimensions,"px")("width",o.galleryMode.dimensions,"px"),U("disabled",e.isDisabled)("deleted",e.isBeingDeleted)("selected",e.isSelected),r(),J3("rowIndex",t),r(),C(e.isImage?2:3),r(3),C(e.lock?5:-1),r(),C(e.shares.length?6:-1),r(),C(e.spaces.length?7:-1),r(),C(e.links.length?8:-1),r(),C(e.syncs.length?9:-1),r(),C(e.hasComments?10:-1),r(),C(e.root?11:-1),r(),C(e.newly?12:-1),r(2),C(e.isRenamed?14:15)}}function Cl(i,n){if(i&1){let e=b();s(0,"div",18)(1,"app-virtual-scroll",37),z(2,"searchFilter"),_("contextmenu",function(o){S(e);let a=c();return g(a.onContextMenu(o))}),V(3,nl,1,0,"div",38),s(4,"div",39),F(5,hl,16,21,"div",40,Ea),l()()()}if(i&2){let e=c(),t=C1(33);r(),d("childHeight",e.galleryMode.dimensions)("childWidth",e.galleryMode.dimensions)("items",re(2,6,e.files,e.inputFilter.search(),"name"))("galleryMode",!0)("resizeOffset",110),r(2),d("ngTemplateOutlet",t),r(2),R(e.scrollView==null?null:e.scrollView.viewPortItems)}}function Sl(i,n){if(i&1&&u(0,"fa-icon",72),i&2){let e=c(4);d("icon",e.sortTable.sortParam.asc?e.icons.faArrowDown:e.icons.faArrowUp)("fixedWidth",!1)}}function gl(i,n){if(i&1){let e=b();s(0,"th",71),_("click",function(){S(e);let o=c().$implicit,a=c(2);return g(a.sortBy(o.key))}),p(1),h(2,Sl,1,2,"fa-icon",72),l()}if(i&2){let e=c().$implicit,t=c(2);E(e.value.class),n1("width",e.value.width,"%"),U("text-align-center",e.value.textCenter)("cursor-pointer",e.value.sortable),r(),k(" ",e.value.label," "),r(),C(t.sortTable.sortParam.column===e.key?2:-1)}}function xl(i,n){if(i&1&&h(0,gl,3,10,"th",70),i&2){let e=n.$implicit;C(e.value.show?0:-1)}}function vl(i,n){i&1&&u(0,"div")}function yl(i,n){if(i&1){let e=b();s(0,"input",79),_("renamingInProgress",function(o){S(e);let a=c(6);return g(a.setRenamingInProgress(o))})("updateObject",function(o){S(e);let a=c(6);return g(a.renameFile(o))}),l()}if(i&2){let e=c(4).$implicit;d("inputObject",e)}}function bl(i,n){if(i&1&&(s(0,"span",80),p(1),l()),i&2){let e=c(5).$implicit;r(),y(e.root.description)}}function Tl(i,n){if(i&1&&(s(0,"div",78)(1,"span",65),p(2),l(),h(3,bl,2,1,"span",80),l()),i&2){let e=c(4).$implicit,t=c(2);r(2),y(e.name),r(),C(t.inSharesList&&(e.root!=null&&e.root.description)?3:-1)}}function zl(i,n){if(i&1){let e=b();s(0,"div",75)(1,"img",76),_("error",function(){S(e);let o=c(3).$implicit;return g(o.fallBackMimeUrl())}),l(),h(2,yl,1,1,"input",77)(3,Tl,4,2,"div",78),l()}if(i&2){let e=c(3).$implicit;r(),d("src",e.mimeUrl,X),r(),C(e.isRenamed?2:3)}}function Ml(i,n){if(i&1&&(s(0,"div",81),u(1,"app-user-avatar",82),l()),i&2){let e=c(4).$implicit;r(),d("user",e.root.owner)}}function El(i,n){if(i&1&&h(0,Ml,2,1,"div",81),i&2){let e=c(3).$implicit;C(e.root?0:-1)}}function wl(i,n){if(i&1&&(s(0,"span",46),u(1,"fa-icon",10),l()),i&2){let e=c(4).$implicit,t=c(2);d("tooltip",Vn(e.lock.owner)),r(),d("icon",e.lock.isExclusive?t.icons.faLock:t.icons.faLockOpen)}}function Pl(i,n){if(i&1){let e=b();s(0,"span",60),_("click",function(){S(e);let o=c(6);return g(o.layout.showRSideBarTab(o.TAB_MENU.SELECTION,!0))}),u(1,"fa-icon",10),p(2),l()}if(i&2){let e=c(4).$implicit,t=c(2);r(),d("icon",t.icons.SHARES),r(),k("\xA0",e.shares.length," ")}}function Al(i,n){if(i&1){let e=b();s(0,"span",60),_("click",function(){S(e);let o=c(6);return g(o.layout.showRSideBarTab(o.TAB_MENU.SELECTION,!0))}),u(1,"fa-icon",10),p(2),l()}if(i&2){let e=c(4).$implicit,t=c(2);r(),d("icon",t.icons.LINKS),r(),k("\xA0",e.links.length," ")}}function Nl(i,n){if(i&1){let e=b();s(0,"span",60),_("click",function(){S(e);let o=c(6);return g(o.layout.showRSideBarTab(o.TAB_MENU.SELECTION,!0))}),u(1,"fa-icon",10),p(2),l()}if(i&2){let e=c(4).$implicit,t=c(2);r(),d("icon",t.icons.SPACES),r(),k("\xA0",e.spaces.length," ")}}function Ll(i,n){if(i&1){let e=b();s(0,"span",60),_("click",function(){S(e);let o=c(6);return g(o.layout.showRSideBarTab(o.TAB_MENU.SELECTION,!0))}),u(1,"fa-icon",10),p(2),l()}if(i&2){let e=c(4).$implicit,t=c(2);r(),d("icon",t.icons.SYNC),r(),k("\xA0",e.syncs.length," ")}}function kl(i,n){if(i&1){let e=b();s(0,"span",61),_("click",function(){S(e);let o=c(6);return g(o.layout.showRSideBarTab(o.TAB_MENU.COMMENTS,!0))}),u(1,"fa-icon",10),l()}if(i&2){let e=c(6);r(),d("icon",e.icons.faCommentDots)}}function Dl(i,n){if(i&1&&(h(0,wl,2,3,"span",46),h(1,Pl,3,2,"span",83),h(2,Al,3,2,"span",83),h(3,Nl,3,2,"span",83),h(4,Ll,3,2,"span",83),h(5,kl,2,1,"span",84)),i&2){let e=c(3).$implicit;C(e.lock?0:-1),r(),C(e.shares.length?1:-1),r(),C(e.links.length?2:-1),r(),C(e.spaces.length?3:-1),r(),C(e.syncs.length?4:-1),r(),C(e.hasComments?5:-1)}}function Fl(i,n){if(i&1&&u(0,"app-file-permissions",85),i&2){let e=c(4).$implicit;d("permissions",e.root.hPerms)}}function Rl(i,n){if(i&1&&h(0,Fl,1,1,"app-file-permissions",85),i&2){let e=c(3).$implicit;C(e.root&&e.root.permissions?0:-1)}}function Il(i,n){if(i&1&&p(0),i&2){let e=c(3).$implicit;k(" ",e.hSize," ")}}function Ol(i,n){if(i&1&&p(0),i&2){let e=c(3).$implicit;k(" ",e.hTimeAgo," ")}}function Vl(i,n){if(i&1&&(s(0,"td"),h(1,zl,4,2,"div",75)(2,El,1,1)(3,Dl,6,6)(4,Rl,1,1)(5,Il,1,1)(6,Ol,1,1),l()),i&2){let e,t=c().$implicit,o=c().$implicit;E(qe("",t.value.class," ",t.value.newly?"prop-newly-"+o[t.value.newly]:"")),n1("width",t.value.width,"%"),U("text-align-center",t.value.textCenter),r(),C((e=t.key)==="name"?1:e==="anchored"?2:e==="infos"?3:e==="permissions"?4:e==="size"?5:e==="mtime"?6:-1)}}function Bl(i,n){if(i&1&&h(0,Vl,7,9,"td",74),i&2){let e=n.$implicit;C(e.value.show?0:-1)}}function Ul(i,n){if(i&1){let e=b();s(0,"tr",73),_("click",function(o){let a=S(e).$implicit,m=c(2);return g(m.onSelect(o,a))})("contextmenu",function(o){let a=S(e).$implicit,m=c(2);return g(m.onTargetContextMenu(o,a))})("pressup",function(o){let a=S(e).$implicit,m=c(2);return g(m.onTargetContextMenu(o,a))})("tap",function(){let o=S(e).$implicit,a=c(2);return g(a.browse(o))}),F(1,Bl,1,1,null,null,wa),z(3,"keyvalue"),l()}if(i&2){let e=n.$implicit,t=c(2);U("disabled",e.isDisabled)("deleted",e.isBeingDeleted)("selected",e.isSelected),r(),R(M(3,6,t.tableHeaders,t.originalOrderKeyValue))}}function Hl(i,n){if(i&1){let e=b();s(0,"table",66)(1,"thead")(2,"tr"),F(3,xl,1,1,null,null,wa),z(5,"keyvalue"),l()()(),s(6,"app-virtual-scroll",67),z(7,"searchFilter"),_("contextmenu",function(o){S(e);let a=c();return g(a.onContextMenu(o))}),V(8,vl,1,0,"div",38),s(9,"table",66)(10,"tbody",68),F(11,Ul,4,9,"tr",69,Ea),l()()()}if(i&2){let e=c(),t=C1(33);r(3),R(M(5,3,e.tableHeaders,e.originalOrderKeyValue)),r(3),d("bufferAmount",5)("items",re(7,6,e.files,e.inputFilter.search(),"name")),r(2),d("ngTemplateOutlet",t),r(3),R(e.scrollView==null?null:e.scrollView.viewPortItems)}}function $l(i,n){if(i&1&&(s(0,"span",20),p(1),z(2,"translate"),l()),i&2){let e=c();r(),Y1("",e.stats.dirs," ",M(2,2,e.stats.dirs>1?"directories":"directory",e.locale.language))}}function Gl(i,n){if(i&1&&(s(0,"span"),p(1),z(2,"translate"),l()),i&2){let e=c();r(),Y1("",e.stats.files," ",M(2,2,e.stats.files>1?"files":"file",e.locale.language))}}function Wl(i,n){i&1&&(s(0,"div",86)(1,"span",22),p(2,"Forbidden resource"),l()())}function ql(i,n){i&1&&(s(0,"div",86)(1,"span",22),p(2,"Location not found"),l()())}function Yl(i,n){i&1&&(s(0,"div",86)(1,"span",22),p(2,"Server Error"),l()())}function jl(i,n){i&1&&(s(0,"div",87)(1,"span",22),p(2,"Drag and drop your files here"),l()())}function Kl(i,n){if(i&1&&h(0,Wl,3,0,"div",86)(1,ql,3,0,"div",86)(2,Yl,3,0,"div",86)(3,jl,3,0,"div",87),i&2){let e=c();C(e.forbiddenResource?0:e.locationNotFound?1:e.serverError?2:!e.isTrashRepo&&!e.loading&&!e.stats.elements?3:-1)}}function Ql(i,n){if(i&1&&(s(0,"span",22),u(1,"fa-icon",10),p(2,"View"),l()),i&2){let e=c(3);r(),d("icon",e.icons.faEye)}}function Xl(i,n){if(i&1){let e=b();V(0,Ql,3,1,"ng-template",25),_("execute",function(){S(e);let o=c(2);return g(o.shortcutView())})}}function Zl(i,n){if(i&1&&(s(0,"span",22),u(1,"fa-icon",10),p(2,"Edit"),l()),i&2){let e=c(3);r(),d("icon",e.icons.faPen)}}function Jl(i,n){if(i&1){let e=b();V(0,Zl,3,1,"ng-template",25),_("execute",function(){S(e);let o=c(2);return g(o.shortcutEdit())})}}function e8(i,n){if(i&1&&(s(0,"span",22),u(1,"fa-icon",10),p(2,"Rename"),l()),i&2){let e=c(3);r(),d("icon",e.icons.faSpellCheck)}}function t8(i,n){if(i&1){let e=b();V(0,e8,3,1,"ng-template",25),_("execute",function(){S(e);let o=c(2);return g(o.shortcutRename())})}}function i8(i,n){if(i&1&&(s(0,"span",22),u(1,"fa-icon",10),p(2,"Comment"),l()),i&2){let e=c(2);r(),d("icon",e.icons.faCommentDots)}}function n8(i,n){if(i&1&&(s(0,"span",22),u(1,"fa-icon",10),p(2,"Synchronize"),l()),i&2){let e=c(3);r(),d("icon",e.icons.faRotate)}}function o8(i,n){if(i&1){let e=b();V(0,n8,3,1,"ng-template",25),_("execute",function(){S(e);let o=c(2);return g(o.addToSync())})}}function a8(i,n){if(i&1){let e=b();h(0,Xl,1,0,null,23),h(1,Jl,1,0,null,23),h(2,t8,1,0,null,23),V(3,i8,3,1,"ng-template",25),_("execute",function(){S(e);let o=c();return g(o.layout.showRSideBarTab(o.TAB_MENU.COMMENTS,!0))}),h(4,o8,1,0,null,23)}if(i&2){let e=c();C(e.selection[0].isViewable?0:-1),r(),C(e.selection[0].isEditable?1:-1),r(),C(e.inSharesList?-1:2),r(2),C(e.isElectronApp&&e.selection[0].isDir?4:-1)}}function r8(i,n){if(i&1&&(s(0,"span",22),u(1,"fa-icon",10),p(2,"Compress"),l()),i&2){let e=c(2);r(),d("icon",e.icons.faFileArchive)}}function s8(i,n){if(i&1){let e=b();V(0,r8,3,1,"ng-template",25),_("execute",function(){S(e);let o=c();return g(o.openCompressionDialog())})}}function l8(i,n){if(i&1&&(s(0,"span",22),u(1,"fa-icon",10),p(2,"Decompress"),l()),i&2){let e=c(2);r(),d("icon",e.icons.faFileArchive)}}function c8(i,n){if(i&1){let e=b();V(0,l8,3,1,"ng-template",25),_("execute",function(){S(e);let o=c();return g(o.decompressFile())})}}function m8(i,n){if(i&1&&(s(0,"span",22),u(1,"fa-icon",10),p(2,"Copy/Move"),l()),i&2){let e=c(2);r(),d("icon",e.icons.faArrowsAlt)}}function p8(i,n){if(i&1){let e=b();V(0,m8,3,1,"ng-template",25),_("execute",function(){S(e);let o=c();return g(o.copyMoveFiles())})}}function d8(i,n){if(i&1&&(s(0,"span",22),u(1,"fa-icon",10),p(2,"Share"),l()),i&2){let e=c(2);r(),d("icon",e.icons.SHARES)}}function f8(i,n){if(i&1&&V(0,d8,3,1,"ng-template",24),i&2){c();let e=C1(46);d("subMenu",e)}}function u8(i,n){if(i&1&&(s(0,"span",22),u(1,"fa-icon",10),p(2,"Clipboard"),l()),i&2){let e=c();r(),d("icon",e.icons.faClipboardList)}}function _8(i,n){if(i&1&&(s(0,"span",22),u(1,"fa-icon",10),p(2,"Download"),l()),i&2){let e=c(2);r(),d("icon",e.icons.faDownload)}}function h8(i,n){if(i&1){let e=b();V(0,_8,3,1,"ng-template",25),_("execute",function(){S(e);let o=c();return g(o.downloadFiles())})}}function C8(i,n){if(i&1&&(s(0,"span",22),u(1,"fa-icon",10),p(2,"Informations"),l()),i&2){let e=c();r(),d("icon",e.icons.faCircleInfo)}}function S8(i,n){}function g8(i,n){if(i&1&&(s(0,"span",22),u(1,"fa-icon",10),p(2),l()),i&2){let e=c(2);r(),d("icon",e.isTrashRepo?e.icons.faBan:e.icons.TRASH),r(),k(" ",e.isTrashRepo?"Remove":"Trash")}}function x8(i,n){if(i&1){let e=b();V(0,S8,0,0,"ng-template",88)(1,g8,3,2,"ng-template",25),_("execute",function(){S(e);let o=c();return g(o.openTrashDialog(o.isTrashRepo))})}i&2&&d("divider",!0)}function v8(i,n){if(i&1&&(s(0,"span",22),u(1,"fa-icon",10),p(2,"New share"),l()),i&2){let e=c();r(),d("icon",e.icons.SHARES)}}function y8(i,n){if(i&1&&(s(0,"span",22),u(1,"fa-icon",10),p(2,"New share link"),l()),i&2){let e=c();r(),d("icon",e.icons.faLink)}}function b8(i,n){if(i&1&&(s(0,"span",22),u(1,"fa-icon",10),p(2,"Anchor to a space"),l()),i&2){let e=c(2);r(),d("icon",e.icons.faAnchor)}}function T8(i,n){if(i&1){let e=b();V(0,b8,3,1,"ng-template",25),_("execute",function(){S(e);let o=c();return g(o.openSpaceAnchorFileDialog())})}}function z8(i,n){if(i&1&&(s(0,"span",22),u(1,"fa-icon",10),p(2,"Empty"),l()),i&2){let e=c();r(),d("icon",e.icons.TRASH)}}function M8(i,n){if(i&1&&(s(0,"span",22),u(1,"fa-icon",10),p(2,"Refresh"),l()),i&2){let e=c(2);r(),d("icon",e.icons.faArrowRotateRight)}}function E8(i,n){if(i&1){let e=b();V(0,M8,3,1,"ng-template",25),_("execute",function(){S(e);let o=c();return g(o.loadFiles())})}}function w8(i,n){if(i&1&&(s(0,"span",22),u(1,"fa-icon",10),p(2,"New folder"),l()),i&2){let e=c(2);r(),d("icon",e.icons.PERSONAL)}}function P8(i,n){if(i&1&&(s(0,"span",22),u(1,"fa-icon",10),p(2,"New document"),l()),i&2){let e=c(2);r(),d("icon",e.icons.faFileAlt)}}function A8(i,n){if(i&1&&(s(0,"span",22),u(1,"fa-icon",10),p(2,"Download from URL"),l()),i&2){let e=c(2);r(),d("icon",e.icons.faGlobe)}}function N8(i,n){if(i&1&&(s(0,"span",22),u(1,"fa-icon",10),p(2,"Upload files"),l()),i&2){let e=c(2);r(),d("icon",e.icons.faUpload)}}function L8(i,n){if(i&1&&(s(0,"span",22),u(1,"fa-icon",10),p(2,"Upload folders"),l()),i&2){let e=c(3);r(),d("icon",e.icons.faUpload)}}function k8(i,n){if(i&1){let e=b();V(0,L8,3,1,"ng-template",25),_("execute",function(){S(e);let o=c(2);return g(o.shortcutUploadFolders())})}}function D8(i,n){if(i&1){let e=b();V(0,w8,3,1,"ng-template",25),_("execute",function(){S(e);let o=c();return g(o.openNewDialog("directory"))}),V(1,P8,3,1,"ng-template",25),_("execute",function(){S(e);let o=c();return g(o.openNewDialog("file"))}),V(2,A8,3,1,"ng-template",25),_("execute",function(){S(e);let o=c();return g(o.openNewDialog("download"))}),V(3,N8,3,1,"ng-template",25),_("execute",function(){S(e);let o=c();return g(o.shortcutUploadFiles())}),h(4,k8,1,0,null,23)}if(i&2){let e=c();r(4),C(e.supportUploadFolder?4:-1)}}var xn=(()=>{let n=class n{constructor(){this.locale=x(K),this.layout=x(L),this.icons={SPACES:o1.SPACES,SHARES:o1.SHARES,TRASH:o1.TRASH,PERSONAL:o1.PERSONAL,LINKS:o1.LINKS,SYNC:v1.SYNC,faArrowRotateRight:lt,faPlus:De,faFileAlt:yi,faGlobe:Wt,faUpload:D4,faDownload:Gt,faLink:C4,faAnchor:Ti,faEllipsis:ni,faPen:$t,faEye:t4,faRotate:he,faCommentDots:E4,faFileArchive:oi,faSpellCheck:T4,faArrowsAlt:st,faCircleInfo:wi,faBan:e4,faArrowUp:Ce,faArrowDown:Se,faLock:bi,faLockOpen:M4,faClipboardList:_i},this.loading=!1,this.locationNotFound=!1,this.forbiddenResource=!1,this.serverError=!1,this.hasRoots=!1,this.canShare={inside:!1,outside:!1},this.multipleSelection=!1,this.hasSelection=!1,this.hasDisabledItemsInSelection=!1,this.canCompress=!0,this.renamingInProgress=!1,this.supportUploadFolder=!1,this.originalOrderKeyValue=J1,this.TAB_MENU=y1,this.tableHeaders={name:{label:"Name",width:45,textCenter:!1,class:"",show:!0,sortable:!0},anchored:{label:"Anchored by",width:5,class:"d-none d-md-table-cell",textCenter:!0,show:this.hasRoots,sortable:!0},infos:{label:"Infos",width:15,textCenter:!0,class:"d-none d-md-table-cell",show:!0},permissions:{label:"Permissions",width:10,textCenter:!0,class:"d-none d-lg-table-cell",show:this.hasRoots},size:{label:"Size",width:10,textCenter:!0,class:"d-none d-lg-table-cell",show:!0,sortable:!0},mtime:{label:"Modified",width:10,textCenter:!0,class:"d-none d-sm-table-cell",newly:"newly",show:!0,sortable:!0}},this.btnSortFields={name:"Name",isDir:"Type",size:"Size",mtime:"Modified"},this.files=[],this.selection=[],this.stats={dirs:0,files:0,size:0,elements:0},this.router=x(i1),this.activatedRoute=x(j2),this.zone=x($2),this.renderer=x(Ne),this.store=x(q),this.isElectronApp=this.store.isElectronApp(),this.spacesBrowser=x(ba),this.filesService=x(E1),this.filesUpload=x(ya),this.uploadButtonsShowed=!1,this.subscriptions=[],this.sortSettings={default:[{prop:"name",type:"string"},{prop:"isDir",type:"number"}],name:[{prop:"name",type:"string"}],isDir:[{prop:"isDir",type:"number"}],anchored:[{prop:"root.id",type:"number"},{prop:"root.owner.fullName",type:"string"}],size:[{prop:"size",type:"number"}],mtime:[{prop:"mtime",type:"number"}]},this.sortTable=new Oe(this.constructor.name,this.sortSettings),this.moveFromDrag=!1}ngOnInit(){this.galleryMode=this.btnNavigationView.currentView(),this.supportUploadFolder=this.filesUpload.supportUploadDirectory,this.activatedRoute.queryParams.subscribe(t=>this.focusOn(t.select)),this.activatedRoute.data.subscribe(t=>this.setSpace(t)),this.subscriptions.push(this.store.filesOnEvent.subscribe(t=>this.onFileEvent(t)))}ngAfterViewInit(){setTimeout(()=>this.initEventHandlers(),500)}ngOnDestroy(){this.destroyEventHandlers(),this.resetFilesSelection(),this.subscriptions.forEach(t=>t.unsubscribe())}onKeyPress(t){if((t.target.id==="table-files"||t.target.id==="thumb-files")&&(t.ctrlKey||t.metaKey))switch(t.which||t.keyCode){case 65:t.preventDefault(),t.stopPropagation(),this.updateSelection(this.files);return;case 67:case 88:t.preventDefault(),t.stopPropagation(),this.selection.length&&(this.filesService.clipboardAction=t.keyCode==67?"copyPaste":"cutPaste",this.filesService.addToClipboard(this.selection));return;case 86:t.preventDefault(),t.stopPropagation(),this.filesService.onPasteClipboard();return;default:return}}loadFiles(){this.loading=!0,this.forbiddenResource=!1,this.locationNotFound=!1,this.serverError=!1,this.inputFilter.clear(),this.resetFilesSelection(),this.spacesBrowser.loadFiles().subscribe({next:t=>{this.spacePermissions=t.permissions,this.canShare.outside=this.spacePermissions.indexOf(te.SHARE_OUTSIDE)>-1,this.canShare.inside=this.spacePermissions.indexOf(te.SHARE_INSIDE)>-1,this.hasRoots=t.hasRoots,this.tableHeaders.anchored.show=t.hasRoots,this.tableHeaders.anchored.label=this.isSharesRepo?"Owner":"Anchored by",this.tableHeaders.anchored.width=10,this.tableHeaders.permissions.show=t.hasRoots,this.sortBy(this.sortTable.sortParam.column,!1,t.files.map(o=>new gn(o,this.baseRepoUrl,this.isSharesRepo))),this.updateFilesStats(this.files),this.loading=!1,this.focusOnSelect?this.focusOn(this.focusOnSelect):this.scrollView.scrollInto(-1)},error:t=>{this.files=[],this.updateFilesStats(this.files),t.status!==401&&(this.forbiddenResource=t.status===403,this.locationNotFound=t.status===404,this.serverError=t.status===0,this.layout.sendNotification("error","Files",t.error.message)),this.loading=!1}})}sortBy(t,o=!0,a){this.files=this.sortTable.sortBy(t,o,a||this.files)}switchView(t){let o=this.galleryMode;this.galleryMode=t,this.galleryMode.enabled!==o.enabled&&(this.destroyEventHandlers(),setTimeout(()=>this.initEventHandlers(),500))}onSelect(t,o){this.loading||(t.shiftKey&&this.selection.length>0&&this.selection.indexOf(o)===-1?this.selectRangeFiles(o):!t.ctrlKey&&!t.metaKey?this.updateSelection([o]):this.modifySelection(o))}onContextMenu(t){t.preventDefault(),t.stopPropagation(),this.isTrashRepo||this.layout.openContextMenu(t,this.mainContextMenu)}onTargetContextMenu(t,o){t.preventDefault(),t.type==="contextmenu"&&t.stopPropagation(),this.selection.length<=1&&this.updateSelection([o]),this.layout.openContextMenu(t,this.fileContextMenu)}browse(t){if(t.isDisabled){this.layout.sendNotification("warning",t.name,"Share is disabled");return}t.isRenamed||(t.isDir?this.router.navigate([t.root?.alias||t.name],{relativeTo:this.activatedRoute}).catch(console.error):this.shortcutView(!0))}copyMoveFiles(){this.layout.showRSideBarTab(y1.TREE,!0),setTimeout(()=>this.filesService.treeCopyMoveOn.next(),100)}downloadFiles(){this.multipleSelection?this.openCompressionDialog(!1):this.filesService.download(this.selection[0])}shortcutView(t=!1){this.selection[0].isDir?this.browse(this.selection[0]):t&&this.selection[0].isEditable?this.openViewerDialog("edit"):this.selection[0].isViewable?this.openViewerDialog("view"):this.downloadFiles()}shortcutEdit(){if(this.selection[0]?.lock?.isExclusive){this.layout.sendNotification("info","The file is locked",this.selection[0].lock.owner);return}this.openViewerDialog("edit")}shortcutUploadFiles(){this.uploadButtonsShowed||document.getElementById("newButton").click(),setTimeout(()=>document.getElementById("uploadFilesButton").click(),100)}shortcutUploadFolders(){if(!this.uploadButtonsShowed){let t=document.getElementById("newButton");t.click(),t.click()}setTimeout(()=>document.getElementById("uploadFoldersButton").click(),100)}shortcutRename(){this.selection[0].isRenamed=!this.selection[0].isRenamed}renameFile(t){let o=t.object,a=t.name;if(this.files.find(m=>m.name===a)){this.layout.sendNotification("error","Rename","The destination already exists");return}this.filesService.rename(o,a)}setRenamingInProgress(t){this.renamingInProgress=t}addToSync(){this.router.navigate([B.BASE,B.WIZARD,B.WIZARD_CLIENT],{state:{file:this.selection[0]}}).catch(console.error)}addToClipboard(){this.filesService.addToClipboard(this.selection)}openShareDialog(){let t=this.setFilePermissionsAndSpace();if(t===null)return;this.layout.openDialog(i5,"lg",{initialState:{file:t,isSharesRepo:this.isSharesRepo,inSharesList:this.inSharesList,allowFilesOptions:!1}}).content.shareChange.pipe(w1(1)).subscribe(a=>{this.selection[0].shares.push({id:a[1].id,alias:a[1].alias,name:a[1].name,type:t3.COMMON})})}openShareLinkDialog(){let t=this.setFilePermissionsAndSpace();if(t===null)return;this.layout.openDialog(Io,"md",{initialState:{file:t,isSharesRepo:this.isSharesRepo,inSharesList:this.inSharesList}}).content.shareChange.pipe(w1(1)).subscribe(a=>{let[m,f]=a;m==="add"&&this.selection[0].links.push({id:f.id,alias:f.alias,name:f.name,type:t3.LINK})})}openSpaceAnchorFileDialog(){this.layout.openDialog(Ta,"lg",{initialState:{files:this.selection}}).content.addAnchoredFiles.pipe(w1(1)).subscribe(o=>{for(let a of this.files)o.fileNames.indexOf(a.name)>-1&&a.spaces.map(m=>m.id).indexOf(o.space.id)===-1&&a.spaces.push(o.space)})}initUpload(){!this.isTrashRepo&&!this.uploadButtonsShowed&&(this.uploadButtonsShowed=!0)}onUploadFiles(t,o=!1){if(o){let a=t.files[0].webkitRelativePath.split("/")[0];if(this.files.find(m=>m.name===a)){this.layout.sendNotification("warning","This folder already exists",a);return}}else for(let a of t.files)if(this.files.find(m=>a.name===m.name)){this.layout.sendNotification("warning","This file already exists",a.name);return}this.filesUpload.addFiles(t.files).catch(console.error)}onDropFiles(t){for(let o of t.dataTransfer.files)if(this.files.find(a=>o.name===a.name)){this.layout.sendNotification("warning","This file already exists",o.name);return}this.filesUpload.onDropFiles(t)}decompressFile(){this.filesService.decompress(this.selection[0])}openCompressionDialog(t=!0){let o={name:this.selection[0].name,compressInDirectory:this.inSharesList?!1:t,files:this.selection.map(a=>({name:a.name,rootAlias:a.root?.alias})),extension:"tar"};this.layout.openDialog(Sn,null,{initialState:{archiveProps:o,disableInDirCompression:this.inSharesList}})}openNewDialog(t){this.layout.openDialog(Sa,null,{initialState:{files:this.files,inputType:t}})}openEmptyTrashDialog(){this.isTrashRepo&&this.inRootSpace&&this.layout.openDialog(va,null,{initialState:{files:this.files}})}openTrashDialog(t=!1){if(!this.selection.length)return;this.layout.openDialog(xa,null,{initialState:{files:this.selection,permanently:t}}).content.removeFiles.pipe(w1(1)).subscribe(()=>this.removeFiles())}setSpace(t){this.currentRoute=this.filesService.currentRoute=`${t.repository}${Xt(t.routes)}`,this.baseRepoUrl=`${t.repository}${t.routes.length?`/${t.routes[0].path}`:""}`,this.isFilesRepo=t.repository===O.FILES,this.isSharesRepo=t.repository===O.SHARES,this.isTrashRepo=t.repository===O.TRASH,this.inRootSpace=this.isSharesRepo?t.routes.length===0:t.routes.length===1,this.inSharesList=this.isSharesRepo&&this.inRootSpace,this.spacesBrowser.setEnvironment(t.repository,t.routes),this.isPersonalSpace=this.spacesBrowser.inPersonalSpace,this.loadFiles()}onFileEvent(t){if(t.archiveId){this.filesService.downloadTaskArchive(t.archiveId);return}let o=t?.fileDstPath===this.currentRoute;if(t.filePath===this.currentRoute||o){let a=o&&t.reloadFocusOnDst;if(t.fileName&&((t.focus||a)&&(this.focusOnSelect=t.fileName),t.delete&&!a))if(t.status===v2.SUCCESS)this.files=this.files.filter(m=>m.name!==t.fileName),this.updateFilesStats(this.files),this.resetFilesSelection();else{let m=this.files.find(f=>f.name===t.fileName);m&&(m.isBeingDeleted=!1)}(t.reload||a)&&this.loadFiles()}}removeFiles(){let t=this.selection.filter(o=>!o.root?.alias);this.selection.length!==t.length&&this.layout.sendNotification("warning","Remove","You can not remove an anchored file"),t.length&&this.filesService.delete(t)}setFilePermissionsAndSpace(){if(this.selection[0]?.root&&this.selection[0].root.permissions.indexOf(te.SHARE_OUTSIDE)===-1)return this.layout.sendNotification("warning",this.selection[0].name,"You do not have share permission"),null;let t=K1({},this.selection[0]);if(this.isPersonalSpace)t.permissions=this.spacePermissions;else if(this.selection[0]?.root)if(t.permissions=this.selection[0].root.permissions,this.inSharesList)t.space={alias:this.selection[0].root.alias,name:this.selection[0].root.alias,root:void 0};else{let o=this.currentRoute.split("/")[1];t.space={alias:o,name:o,root:{alias:this.selection[0].root.alias,name:this.selection[0].name}}}else{t.permissions=this.spacePermissions;let[o,a]=this.currentRoute.split("/").slice(1,3);t.space={alias:o,name:o,root:{alias:a,name:a}}}return t}openViewerDialog(t){this.filesService.openViewerDialog(t,this.selection[0]).catch(console.error)}focusOn(t){if(t)if(this.files.length){let o=this.files.find(a=>a.name.toLowerCase()===t.toLowerCase());!o&&this.hasRoots&&(o=this.files.find(a=>a.root?.alias.toLowerCase()===t.toLowerCase())),o?(setTimeout(()=>this.scrollView.scrollInto(o),100),this.updateSelection([o])):this.focusOnSelect=t}else this.focusOnSelect=t;else this.focusOnSelect=null}updateFilesStats(t){this.stats={dirs:0,files:0,size:0,elements:0};for(let o of t)this.updateCounters(o)}updateCounters(t,o=!0){let a=o?to:io;this.stats.elements=a(this.stats.elements,1),this.stats.size=a(this.stats.size,t.size),t.isDir?this.stats.dirs=a(this.stats.dirs,1):this.stats.files=a(this.stats.files,1)}resetFilesSelection(){this.updateSelection([])}modifySelection(t){t&&(t.isSelected?this.updateSelection(this.selection.filter(o=>o.id!==t.id)):this.updateSelection([t,...this.selection]))}updateSelection(t){t.length?this.selection=this.files.filter(o=>t.indexOf(o)>-1?(o.isSelected=!0,!0):(o.isSelected=!1,!1)):this.selection=this.selection.filter(o=>(o.isSelected=!1,!1)),this.hasSelection=!!this.selection.length,this.hasDisabledItemsInSelection=!!this.selection.find(o=>o.isDisabled),this.canCompress=!this.hasDisabledItemsInSelection&&(this.selection.length>1||this.selection.length===1&&this.selection[0].isCompressible),this.multipleSelection=this.selection.length>1||this.selection.length===1&&this.selection[0].isDir,this.store.filesSelection.set(this.selection)}selectRangeFiles(t){let o=this.files.indexOf(t),a=this.selection.map(T=>this.files.indexOf(T)),m=[],f=Math.min(...a),v=Math.max(...a);if(o<f)for(let T=o;T<f;T++)m.push(this.files[T]);else if(o>v)for(let T=o;T>v;T--)m.push(this.files[T]);this.updateSelection([...this.selection,...m])}initEventHandlers(){this.zone.runOutsideAngular(()=>{this.eventDragOverHandler=this.renderer.listen(this.scrollView.element.nativeElement,"dragover",t=>{if(this.isTrashRepo&&!this.moveFromDrag)return t.preventDefault(),!1;["TD","TR","DIV","APP-VIRTUAL-SCROLL","IMG"].indexOf(t.target.nodeName)>-1&&(t.preventDefault(),this.moveFromDrag?t.dataTransfer.dropEffect="move":t.dataTransfer.dropEffect="copy")}),this.eventDragStartHandler=this.renderer.listen(this.scrollView.element.nativeElement,"dragstart",t=>{if(t.target.parentElement.nodeName==="TD"||t.target.parentElement.nodeName==="DIV"){let o=this.scrollView.viewPortItems[this.galleryMode.enabled?t.target.parentElement.getAttribute("rowIndex"):t.target.parentElement.parentElement.rowIndex];o&&(this.selection.indexOf(o)===-1&&this.zone.run(()=>this.updateSelection([o])),this.moveFromDrag=!0)}}),this.eventDragEnterHandler=this.renderer.listen(this.scrollView.element.nativeElement,"dragenter",t=>{if(t.preventDefault(),this.moveFromDrag&&(t.target.parentElement.nodeName==="TD"||t.target.parentElement.nodeName==="DIV")){let o=this.scrollView.viewPortItems[this.galleryMode.enabled?t.target.parentElement.getAttribute("rowIndex"):t.target.parentElement.parentElement.rowIndex];o&&o.isDir&&this.selection.indexOf(o)===-1&&(t.target.parentElement.nodeName==="TD"?this.renderer.addClass(t.target.parentElement,i2):t.target.parentElement.classList.contains("card-body")&&this.renderer.addClass(t.target.parentElement.parentElement,i2))}}),this.eventDragLeaveHandler=this.renderer.listen(this.scrollView.element.nativeElement,"dragleave",t=>{t.preventDefault(),this.moveFromDrag&&(t.target.parentElement.nodeName==="TD"?this.renderer.removeClass(t.target.parentElement,i2):t.target.parentElement.classList.contains("card-body")&&this.renderer.removeClass(t.target.parentElement.parentElement,i2))}),this.eventDragEndHandler=this.renderer.listen(this.scrollView.element.nativeElement,"dragend",t=>{t.preventDefault(),this.moveFromDrag=!1}),this.eventDropHandler=this.renderer.listen(this.scrollView.element.nativeElement,"drop",t=>{if(this.isTrashRepo&&!this.moveFromDrag)return t.preventDefault(),!1;if(this.moveFromDrag&&(t.target.parentElement.nodeName==="TD"||t.target.parentElement.nodeName==="DIV")){t.preventDefault();let o=this.scrollView.viewPortItems[this.galleryMode.enabled?t.target.parentElement.getAttribute("rowIndex"):t.target.parentElement.parentElement.rowIndex];o&&o.isDir&&this.selection.indexOf(o)===-1&&(this.renderer.removeClass(t.target.parentElement,i2),this.selection.length&&this.zone.run(()=>this.filesService.copyMove(this.selection,o.path,V1.MOVE)))}else return t.dataTransfer.files.length?(t.preventDefault(),this.zone.run(()=>this.onDropFiles(t)),!1):(t.preventDefault(),!1)}),this.eventKeysHandler=this.renderer.listen(this.scrollView.element.nativeElement,"keydown",t=>{if(this.renamingInProgress)return;let o=t.keyCode||t.which;if([37,38,39,40].indexOf(o)===-1)return;if((o===37||o===39)&&!this.galleryMode.enabled)return;t.preventDefault(),t.stopPropagation();let a,m=this.selection.map(A=>this.files.indexOf(A)),f=this.galleryMode.enabled;o===37?(f=!1,o=38):o===39&&(f=!1,o=40),o===38?(f?a=Math.min(...m)-Math.ceil(this.scrollView.element.nativeElement.offsetWidth/(this.galleryMode.dimensions+this.galleryMode.margins)):a=Math.min(...m)-1,a<=-1&&(a=this.files.length-1)):(f?a=Math.max(...m)+Math.ceil(this.scrollView.element.nativeElement.offsetWidth/(this.galleryMode.dimensions+this.galleryMode.margins)):a=Math.max(...m)+1,a>=this.files.length&&(a=0));let v=this.files[a];this.zone.run(()=>{!t.shiftKey&&!t.ctrlKey&&!t.metaKey?this.updateSelection([v]):this.modifySelection(v)});let T=this.scrollView.element.nativeElement.querySelectorAll(Vo);if(T.length){let A;o===38?(A=T[0],Xn(A)||A.scrollIntoView(!0)):(A=T[T.length-1],Xn(A)||A.scrollIntoView(!1))}else setTimeout(()=>this.scrollView.scrollInto(v),0)})})}destroyEventHandlers(){for(let t of[this.eventDragStartHandler,this.eventDragOverHandler,this.eventDragEnterHandler,this.eventDragLeaveHandler,this.eventDragEndHandler,this.eventDropHandler,this.eventKeysHandler].filter(o=>o))try{t()}catch(o){console.warn(o)}}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=w({type:n,selectors:[["app-spaces-browser"]],viewQuery:function(o,a){if(o&1&&(r1(Xe,5),r1(F1,7),r1(n3,7),r1(Ns,7),r1(Ls,7),r1(ks,7)),o&2){let m;s1(m=l1())&&(a.scrollView=m.first),s1(m=l1())&&(a.inputFilter=m.first),s1(m=l1())&&(a.btnNavigationView=m.first),s1(m=l1())&&(a.mainContextMenu=m.first),s1(m=l1())&&(a.mainReadOnlyContextMenu=m.first),s1(m=l1())&&(a.fileContextMenu=m.first)}},hostBindings:function(o,a){o&1&&_("keydown",function(f){return a.onKeyPress(f)},H2)},decls:57,vars:41,consts:[["CommonMessages",""],["FileContextMenu",""],["ShareContextMenu",""],["MainReadOnlyContextMenu",""],["MainContextMenu",""],[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"],["dropdown","",1,"btn-group","btn-group-sm","me-1"],["container","body","type","button",1,"btn","btn-sm","btn-secondary","me-1",3,"click","disabled","tooltip"],[3,"icon"],["dropdown","",1,"btn-group","btn-group-sm","me-1",3,"isDisabled"],["dropdownToggle","","type","button",1,"btn","btn-sm","btn-secondary","dropdown-toggle"],["class","dropdown-menu","role","menu",4,"dropdownMenu"],[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,"me-1"],[1,"mx-auto"],["l10nTranslate",""],["contextMenuItem",""],["contextMenuItem","",3,"subMenu"],["contextMenuItem","",3,"execute"],["dropdown","",1,"btn-group","btn-group-sm","me-1",3,"onShown"],["dropdownToggle","","container","body","type","button",1,"btn","btn-sm","btn-secondary","dropdown-toggle",3,"tooltip"],["role","menu",1,"dropdown-menu"],["role","menuitem"],[1,"dropdown-item",3,"click"],["appUploadFiles","","id","uploadFilesButton",1,"dropdown-item",3,"uploadFiles","options"],["appUploadFiles","","id","uploadFoldersButton",1,"dropdown-item",3,"options"],["appUploadFiles","","id","uploadFoldersButton",1,"dropdown-item",3,"uploadFiles","options"],["container","body","type","button",1,"btn","btn-sm","btn-secondary","me-1",3,"disabled","tooltip"],[1,"dropdown-divider"],[1,"dropdown-item"],[3,"contextmenu","childHeight","childWidth","items","galleryMode","resizeOffset"],[4,"ngTemplateOutlet"],["id","thumb-files","tabindex","-1",1,"row","g-0"],[1,"card",3,"disabled","deleted","selected","height","width"],[1,"card",3,"click","contextmenu","pressup","tap"],[1,"card-body"],["alt","","draggable","true",1,"img-fluid",3,"height","src"],["alt","","draggable","true",3,"src","height","width"],[1,"label-bottom-right"],["placement","auto",1,"fs-lg","cursor-pointer","me-1",3,"tooltip"],[1,"badge","rounded-pill","bg-primary","cursor-pointer",3,"font-size"],[1,"badge","rounded-pill","bg-primary","cursor-pointer","ms-1",3,"font-size"],[1,"badge","rounded-pill","bg-primary","cursor-pointer","me-1",3,"font-size"],[1,"badge","rounded-pill","bg-success","cursor-pointer",3,"font-size"],[1,"label-bottom-left"],[1,"label-top-right"],[1,"card-footer","text-center","text-truncate","p-1"],["appInputEdit","","type","text","required","",3,"inputObject","fullWidth","textCenter","font-size"],["draggable","false",1,"no-pointer-events",3,"font-size"],["alt","","draggable","true",1,"img-fluid",3,"error","src"],["alt","","draggable","true",3,"error","src","height","width"],[1,"badge","rounded-pill","bg-primary","cursor-pointer",3,"click"],[1,"badge","rounded-pill","bg-primary","cursor-pointer","ms-1",3,"click"],[1,"badge","rounded-pill","bg-primary","cursor-pointer","me-1",3,"click"],[1,"badge","rounded-pill","bg-success","cursor-pointer",3,"click"],[3,"user","height","width","fontSize"],["l10nTranslate","",1,"badge","rounded-pill","bg-warning"],["appInputEdit","","type","text","required","",3,"renamingInProgress","updateObject","inputObject","fullWidth","textCenter"],["draggable","false",1,"no-pointer-events"],[1,"app-table"],[3,"contextmenu","bufferAmount","items"],["id","table-files","tabindex","-1"],[3,"disabled","deleted","selected"],["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"],["draggable","true",1,"d-flex","align-items-center"],["alt","","draggable","false","height","30","width","30",3,"error","src"],["appInputEdit","","required","","type","text",3,"inputObject"],[1,"d-flex","flex-column","text-truncate"],["appInputEdit","","required","","type","text",3,"renamingInProgress","updateObject","inputObject"],["draggable","false",1,"no-pointer-events","text-muted","fs-xxxs"],[1,"d-flex","flex-column","align-items-center"],[3,"user"],[1,"badge","rounded-pill","bg-primary","cursor-pointer","me-1"],[1,"badge","rounded-pill","bg-success","cursor-pointer"],["tooltipPlacement","auto",3,"permissions"],[1,"fs-sm","text-center","text-danger","fw-bold","no-select"],[1,"fs-sm","text-center","text-muted","fw-bold","no-select"],["contextMenuItem","",3,"divider"]],template:function(o,a){if(o&1){let m=b();s(0,"div",5)(1,"button",6),z(2,"translate"),_("click",function(){return S(m),g(a.loadFiles())}),u(3,"fa-icon",7),l(),h(4,Vs,5,5,"div",8),s(5,"button",9),z(6,"translate"),_("click",function(){return S(m),g(a.downloadFiles())}),u(7,"fa-icon",10),l(),h(8,Hs,5,6,"div",11),h(9,Gs,4,7),s(10,"div",11)(11,"button",12),u(12,"fa-icon",10),l(),V(13,il,15,6,"ul",13),l(),s(14,"div",14)(15,"div",15),u(16,"app-input-filter",16),l(),s(17,"app-navigation-view",17),_("sortBy",function(v){return S(m),g(a.sortBy(v))})("switchView",function(v){return S(m),g(a.switchView(v))}),l()()(),h(18,Cl,7,10,"div",18)(19,Hl,13,10),s(20,"div",19)(21,"span"),h(22,$l,3,5,"span",20),h(23,Gl,3,5,"span"),l(),s(24,"span",21),p(25),z(26,"translate"),l(),s(27,"span")(28,"span",22),p(29,"Total"),l(),p(30),z(31,"toBytes"),l()(),V(32,Kl,4,1,"ng-template",null,0,se),s(34,"context-menu",null,1),h(36,a8,5,4),h(37,s8,1,0,null,23),h(38,c8,1,0,null,23),h(39,p8,1,0,null,23),h(40,f8,1,1,null,24),V(41,u8,3,1,"ng-template",25),_("execute",function(){return S(m),g(a.addToClipboard())}),h(42,h8,1,0,null,23),V(43,C8,3,1,"ng-template",25),_("execute",function(){return S(m),g(a.layout.showRSideBarTab(a.TAB_MENU.SELECTION))}),h(44,x8,2,1),l(),s(45,"context-menu",null,2),V(47,v8,3,1,"ng-template",25),_("execute",function(){return S(m),g(a.openShareDialog())}),V(48,y8,3,1,"ng-template",25),_("execute",function(){return S(m),g(a.openShareLinkDialog())}),h(49,T8,1,0,null,23),l(),s(50,"context-menu",null,3),V(52,z8,3,1,"ng-template",25),_("execute",function(){return S(m),g(a.openEmptyTrashDialog())}),l(),s(53,"context-menu",null,4),h(55,E8,1,0,null,23)(56,D8,5,1),l()}o&2&&(r(),d("tooltip",M(2,27,"Refresh",a.locale.language)),r(2),d("icon",a.icons.faArrowRotateRight)("animation",a.loading?"spin":null),r(),C(!a.isTrashRepo&&!a.inSharesList?4:-1),r(),d("disabled",!a.hasSelection||a.hasDisabledItemsInSelection)("tooltip",M(6,30,"Download",a.locale.language)),r(2),d("icon",a.icons.faDownload),r(),C(!a.isTrashRepo&&a.canShare.outside||a.inSharesList?8:-1),r(),C(a.isTrashRepo?9:-1),r(),d("isDisabled",!a.hasSelection),r(2),d("icon",a.icons.faEllipsis),r(5),d("sortParams",a.sortTable.sortParam)("sortFields",a.btnSortFields),r(),C(a.galleryMode!=null&&a.galleryMode.enabled?18:19),r(4),C(a.stats.dirs?22:-1),r(),C(a.stats.files?23:-1),r(2),y(re(26,33,a.hasSelection?a.selection.length>1?"nb_selections":"one_selection":"no_selection",a.locale.language,H1(39,Ds,a.selection.length))),r(5),k("\xA0",e1(31,37,a.stats.size)),r(6),C(a.selection.length===1?36:-1),r(),C(a.canCompress?37:-1),r(),C(!a.inSharesList&&a.selection.length===1&&!a.selection[0].isCompressible?38:-1),r(),C(a.hasDisabledItemsInSelection?-1:39),r(),C(!a.isTrashRepo&&a.canShare.outside||a.inSharesList&&(a.selection[0]!=null&&a.selection[0].canBeReShared)?40:-1),r(2),C(a.hasDisabledItemsInSelection?-1:42),r(2),C(a.inSharesList?-1:44),r(5),C(a.isFilesRepo?49:-1),r(6),C(a.inSharesList?55:56))},dependencies:[D,N,Ht,z1,Oi,Ue,He,Be,F1,Kt,jt,Yt,Xe,e5,n3,Vt,ge,ha,dt,Z,Ii,Q1,Ie],encapsulation:2});let i=n;return i})();var m2=(i,n)=>n.id;function F8(i,n){if(i&1){let e=b();s(0,"div",2)(1,"div",3)(2,"button",4),_("click",function(){S(e);let o=c(2);return g(o.addToClipboard())}),u(3,"fa-icon",5),p(4," Send to Clipboard "),l()()(),u(5,"hr",6)}if(i&2){let e=c(2);r(3),d("icon",e.icons.faClipboardCheck)}}function R8(i,n){if(i&1){let e=b();s(0,"div",7)(1,"img",8),_("error",function(){let o=S(e).$implicit;return g(o.fallBackMimeUrl())}),l(),s(2,"span",9),p(3),l()()}if(i&2){let e=n.$implicit;r(),d("src",e.mimeUrl,X),r(2),y(e.name)}}function I8(i,n){if(i&1&&(s(0,"div",1),F(1,R8,4,2,"div",7,m2),l()),i&2){let e=c(2);r(),R(e.files())}}function O8(i,n){if(i&1&&(s(0,"div",26),u(1,"img",27),l()),i&2){let e=c().$implicit,t=c(3);n1("height",t.cardImageSize,"px"),r(),n1("max-height",t.cardImageSize,"px"),d("src",I("",e.thumbnailUrl,"?size=256"),X)}}function V8(i,n){if(i&1&&u(0,"app-files-viewer-media",13),i&2){let e=c().$implicit,t=c(3);d("currentHeight",t.cardImageSize)("fileUrl",e.dataUrl)}}function B8(i,n){if(i&1){let e=b();s(0,"img",28),_("error",function(){S(e);let o=c().$implicit;return g(o.fallBackMimeUrl())}),l()}if(i&2){let e=c().$implicit,t=c(3);n1("height",t.cardImageSize,"px"),d("src",e.mimeUrl,X)}}function U8(i,n){if(i&1&&(s(0,"div",17)(1,"div",18),p(2,"Size"),l(),s(3,"div",20),p(4),l()()),i&2){let e=c().$implicit;r(4),y(e.hSize)}}function H8(i,n){if(i&1&&(s(0,"span",23),u(1,"fa-icon",5),p(2),l()),i&2){let e=c().$implicit,t=c(3);r(),d("icon",t.icons.SHARES),r(),k("\xA0",e.shares.length+e.links.length," ")}}function $8(i,n){i&1&&(s(0,"span",24),p(1,"no"),l())}function G8(i,n){if(i&1&&(s(0,"span",23),u(1,"fa-icon",5),p(2),l()),i&2){let e=c().$implicit,t=c(3);r(),d("icon",t.icons.SPACES),r(),k("\xA0",e.spaces.length)}}function W8(i,n){i&1&&(s(0,"span",24),p(1,"no"),l())}function q8(i,n){if(i&1&&(s(0,"div",21)(1,"div",18),p(2,"Owner"),l(),u(3,"app-user-avatar",30),l()),i&2){let e=c(2).$implicit;r(3),d("user",e.root.owner)("height",26)("width",26)}}function Y8(i,n){if(i&1&&u(0,"app-file-permissions",29),i&2){let e=c(2).$implicit;d("permissions",e.root.hPerms)}}function j8(i,n){i&1&&(s(0,"span",24),p(1,"no"),l())}function K8(i,n){if(i&1&&(u(0,"hr",15),s(1,"div",16),h(2,q8,4,3,"div",21),s(3,"div",26)(4,"div",18),p(5,"Permissions"),l(),h(6,Y8,1,1,"app-file-permissions",29)(7,j8,2,0,"span",24),l()()),i&2){let e=c().$implicit;r(2),C(e.root.owner?2:-1),r(4),C(e.root.permissions?6:7)}}function Q8(i,n){if(i&1){let e=b();s(0,"div",34),_("click",function(){let o=S(e).$implicit,a=c(5);return g(a.goToSpace(o))}),u(1,"fa-icon",5),s(2,"span"),p(3),l()()}if(i&2){let e=n.$implicit,t=c(5);r(),d("icon",t.icons.SPACES),r(2),k("\xA0",e.name)}}function X8(i,n){if(i&1){let e=b();s(0,"div",34),_("click",function(){let o=S(e).$implicit,a=c(5);return g(a.goToShare(o))}),u(1,"fa-icon",5),s(2,"span"),p(3),l()()}if(i&2){let e=n.$implicit,t=c(5);r(),d("icon",t.icons.SHARES),r(2),k("\xA0",e.name)}}function Z8(i,n){if(i&1){let e=b();s(0,"div",34),_("click",function(){let o=S(e).$implicit,a=c(5);return g(a.goToShare(o))}),u(1,"fa-icon",5),s(2,"span"),p(3),l()()}if(i&2){let e=n.$implicit,t=c(5);r(),d("icon",t.icons.LINKS),r(2),k("\xA0",e.name)}}function J8(i,n){if(i&1){let e=b();s(0,"div",34),_("click",function(){let o=S(e).$implicit,a=c(5);return g(a.goToSync(o))}),u(1,"fa-icon",5),s(2,"span"),p(3),l()()}if(i&2){let e=n.$implicit,t=c(5);r(),d("icon",t.icons.SYNC),r(2),k("\xA0",e.clientName)}}function e7(i,n){if(i&1&&(u(0,"hr",31),s(1,"div",32),F(2,Q8,4,2,"div",33,m2),F(4,X8,4,2,"div",33,m2),F(6,Z8,4,2,"div",33,m2),F(8,J8,4,2,"div",33,m2),l()),i&2){let e=c().$implicit;r(2),R(e.spaces),r(2),R(e.shares),r(2),R(e.links),r(2),R(e.syncs)}}function t7(i,n){if(i&1){let e=b();s(0,"div",10)(1,"div",11),h(2,O8,2,6,"div",12)(3,V8,1,2,"app-files-viewer-media",13)(4,B8,1,3,"img",14),l()(),u(5,"hr",15),s(6,"div",16)(7,"div",17)(8,"div",18),p(9,"Name"),l(),s(10,"div",19),p(11),l()(),h(12,U8,5,1,"div",17),s(13,"div",17)(14,"div",18),p(15,"Created"),l(),s(16,"div",20),p(17),z(18,"amDateFormat"),l()(),s(19,"div",17)(20,"div",18),p(21,"Modified"),l(),s(22,"div",20),p(23),z(24,"amDateFormat"),l()(),s(25,"div",21)(26,"div",18),p(27,"Shared"),l(),s(28,"div",22),h(29,H8,3,2,"span",23)(30,$8,2,0,"span",24),l()(),s(31,"div",21)(32,"div",18),p(33,"Anchored"),l(),h(34,G8,3,2,"span",23)(35,W8,2,0,"span",24),l(),s(36,"div",21)(37,"div",18),p(38,"Synced"),l(),s(39,"span"),p(40),z(41,"translate"),l()(),s(42,"div",21)(43,"div",18),p(44,"Comments"),l(),s(45,"span",25),_("click",function(){S(e);let o=c(3);return g(o.goToComments())}),p(46),z(47,"translate"),l()()(),h(48,K8,8,2),h(49,e7,10,0)}if(i&2){let e,t=n.$implicit,o=c(3);r(2),C((e=t.shortMime)==="image"?2:e==="media"?3:4),r(9),y(t.name),r(),C(t.size?12:-1),r(5),y(e1(18,17,t.ctime)),r(6),y(e1(24,19,t.mtime)),r(6),C(t.shares.length||t.links.length?29:30),r(5),C(t.spaces.length?34:35),r(5),E(I("badge rounded-pill ",t.syncs.length?"bg-primary":"bg-secondary-alt")),r(),k(" ",M(41,21,t.syncs.length?"yes":"no",o.locale.language)," "),r(5),E(I("badge rounded-pill ",t.hasComments?"bg-success":"bg-secondary-alt"," cursor-pointer")),r(),k(" ",M(47,24,t.hasComments?"yes":"no",o.locale.language)," "),r(2),C(t.root?48:-1),r(),C(t.spaces.length||t.shares.length||t.links.length||t.syncs.length?49:-1)}}function i7(i,n){if(i&1&&F(0,t7,50,27,null,null,m2),i&2){let e=c(2);R(e.files())}}function n7(i,n){if(i&1&&(h(0,F8,6,1),s(1,"div",0),h(2,I8,3,0,"div",1)(3,i7,2,0),l()),i&2){let e=c();C(e.multiple()?0:-1),r(),d("resizeOffset",e.resizeOffset()),r(),C(e.multiple()?2:3)}}var Pa=(()=>{let n=class n{constructor(){this.files=Le.required(),this.locale=x(K),this.multiple=P1(()=>this.files().length>1),this.resizeOffset=P1(()=>this.multiple()?120:80),this.cardImageSize=80,this.icons={SPACES:o1.SPACES,SHARES:o1.SHARES,LINKS:o1.LINKS,SYNC:v1.SYNC,faClipboardCheck:i4,faArrowsAlt:st},this.router=x(i1),this.layout=x(L),this.filesService=x(E1)}goToShare(t){this.layout.toggleRSideBar(!1),this.router.navigate([t.type===0?O.SHARED:O.LINKS],{queryParams:{select:t.name}}).catch(console.error)}goToSpace(t){this.layout.toggleRSideBar(!1),this.router.navigate([O.SPACES],{queryParams:{select:t.name}}).catch(console.error)}goToComments(){this.layout.showRSideBarTab(y1.COMMENTS,!0)}addToClipboard(){this.filesService.addToClipboard(this.files()),this.layout.showRSideBarTab(y1.CLIPBOARD,!0)}goToSync(t){this.layout.toggleRSideBar(!1),this.router.navigate([S1.BASE,S1.CLIENTS],{state:{clientId:t.clientId,pathId:t.id}}).catch(console.error)}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=w({type:n,selectors:[["app-files-selection"]],inputs:{files:[1,"files"]},decls:1,vars:1,consts:[["appAutoResize","",1,"fs-xxs",3,"resizeOffset"],[1,"flex-column","p-2","w-100"],[1,"px-2","pt-2","pb-0","fs-xxs"],[1,"d-flex","justify-content-center","mt-2"],["type","button","l10nTranslate","",1,"btn","btn-xs","btn-primary","me-1",3,"click"],[3,"icon"],[1,"mx-0","mt-2","mb-0"],[1,"d-inline-flex","w-100","align-content-center","align-items-center","mx-1"],["alt","","height","30","width","auto",1,"me-1",3,"error","src"],[1,"text-truncate"],[1,"card","px-1","pt-1"],[1,"card-body","align-self-center","p-0","my-1"],[1,"d-flex","align-items-center",3,"height"],[3,"currentHeight","fileUrl"],["alt","",3,"src","height"],[1,"my-1"],[1,"p-2"],[1,"d-flex","mb-1"],["l10nTranslate","",1,"d-flex","col-sm-5","ps-1","pb-1","fw-bold"],[1,"word-break-all","fs-xxs"],[1,"fs-xxs"],[1,"d-flex","align-items-center","mb-1"],[1,"d-flex","col-sm-7"],[1,"badge","rounded-pill","bg-primary"],["l10nTranslate","",1,"badge","rounded-pill","bg-secondary-alt"],[3,"click"],[1,"d-flex","align-items-center"],["alt","",1,"img-fluid",3,"src"],["alt","",3,"error","src"],[3,"permissions"],["tooltipPlacement","bottom",3,"user","height","width"],[1,"mt-1","mb-2"],[1,"d-flex","flex-wrap","align-items-center","p-2","fs-sm"],[1,"badge","rounded-pill","bg-primary","cursor-pointer","me-1","mb-1"],[1,"badge","rounded-pill","bg-primary","cursor-pointer","me-1","mb-1",3,"click"]],template:function(o,a){o&1&&h(0,n7,4,3),o&2&&C(a.files().length?0:-1)},dependencies:[t1,D,N,Jo,ge,dt,R1,Z],styles:[".card[_ngcontent-%COMP%]{width:100%;background:transparent;border:none}"],changeDetection:0});let i=n;return i})();function o7(i,n){if(i&1&&p(0),i&2){let e=c(2);k(" ",e.link().link.currentIp," ")}}function a7(i,n){if(i&1&&(p(0),z(1,"amDateFormat")),i&2){let e=c(2);k(" ",e1(1,1,e.link().link.currentAccess)," ")}}function r7(i,n){if(i&1&&p(0),i&2){let e=c(2);k(" ",e.link().link.lastIp," ")}}function s7(i,n){if(i&1&&(p(0),z(1,"amDateFormat")),i&2){let e=c(2);k(" ",e1(1,1,e.link().link.lastAccess)," ")}}function l7(i,n){if(i&1&&(s(0,"span")(1,"span"),p(2),z(3,"translate"),z(4,"translate"),l()()),i&2){let e=c(2);E(I("badge rounded-pill bg-",e.link().hTimeExpirationAgo>=1?"warning":"danger")),r(2),y(e.link().hTimeExpirationAgo>=1?e.link().hTimeExpirationAgo+"\xA0"+M(3,4,"days",e.locale.language):M(4,7,"expired",e.locale.language))}}function c7(i,n){i&1&&(s(0,"span",13),p(1," no "),l())}function m7(i,n){if(i&1&&(s(0,"span"),p(1),l()),i&2){let e=c(2);E(I("badge rounded-pill ",e.link().link.nbAccess>=e.link().link.limitAccess?"bg-danger":"bg-success")),r(),Y1(" ",e.link().link.nbAccess,"/",e.link().link.limitAccess," ")}}function p7(i,n){if(i&1&&(s(0,"span",14),p(1),l()),i&2){let e=c(2);r(),y(e.link().link.nbAccess)}}function d7(i,n){if(i&1&&u(0,"app-file-permissions",16),i&2){let e=c(2);d("permissions",e.link().hPerms)}}function f7(i,n){i&1&&(s(0,"span",13),p(1,"no"),l())}function u7(i,n){if(i&1){let e=b();s(0,"div",0)(1,"div",1)(2,"div",2)(3,"img",3),_("error",function(){S(e);let o=c();return g(o.link().fallBackMimeUrl())}),l()()(),u(4,"hr",4),s(5,"div",5)(6,"div",6)(7,"div",7),p(8,"Name"),l(),s(9,"div",8),p(10),l()(),s(11,"div",6)(12,"div",7),p(13,"Created"),l(),s(14,"div",9),p(15),z(16,"amDateFormat"),l()(),s(17,"div",10),_("mouseover",function(){S(e);let o=c();return g(o.accessHover=!0)})("mouseleave",function(){S(e);let o=c();return g(o.accessHover=!1)})("focus",function(){S(e);let o=c();return g(o.accessHover=!0)}),s(18,"div",7),p(19,"Accessed"),l(),s(20,"div",9),h(21,o7,1,1)(22,a7,2,3),l()(),s(23,"div",10),_("mouseover",function(){S(e);let o=c();return g(o.lastAccessHover=!0)})("mouseleave",function(){S(e);let o=c();return g(o.lastAccessHover=!1)})("focus",function(){S(e);let o=c();return g(o.accessHover=!0)}),s(24,"div",7),p(25,"Last access"),l(),s(26,"div",9),h(27,r7,1,1)(28,s7,2,3),l()(),s(29,"div",11)(30,"div",7),p(31,"Authentication"),l(),s(32,"span"),p(33),z(34,"translate"),l()(),s(35,"div",11)(36,"div",7),p(37,"Expired"),l(),h(38,l7,5,10,"span",12)(39,c7,2,0,"span",13),l(),s(40,"div",11)(41,"div",7),p(42,"Active"),l(),s(43,"span"),p(44),z(45,"translate"),l()(),s(46,"div",11)(47,"div",7),p(48,"Access"),l(),h(49,m7,2,5,"span",12)(50,p7,2,1,"span",14),l()(),u(51,"hr",4),s(52,"div",5)(53,"div",11)(54,"div",7),p(55,"Shared from"),l(),u(56,"app-share-repository",15),l(),s(57,"div",11)(58,"div",7),p(59,"Permissions"),l(),h(60,d7,1,1,"app-file-permissions",16)(61,f7,2,0,"span",13),l()()()}if(i&2){let e=c();d("resizeOffset",e.resizeOffset),r(3),n1("height",e.cardImageSize,"px"),d("src",e.link().mimeUrl,X),r(7),y(e.link().name),r(5),y(e1(16,21,e.link().link.createdAt)),r(6),C(e.accessHover?21:22),r(6),C(e.lastAccessHover?27:28),r(5),E(I("badge rounded-pill ",e.link().link.requireAuth?"bg-success":"bg-warning")),r(),k(" ",M(34,23,e.link().link.requireAuth?"yes":"no",e.locale.language)," "),r(5),C(e.link().link.expiresAt?38:39),r(5),E(I("badge rounded-pill ",e.link().link.isActive?"bg-primary":"bg-danger")),r(),k(" ",M(45,26,e.link().link.isActive?"yes":"no",e.locale.language)," "),r(5),C(e.link().link.limitAccess!==0?49:50),r(7),d("share",e.link())("showIcon",!1),r(4),C(e.link().link.permissions?60:61)}}var Aa=(()=>{let n=class n{constructor(){this.link=Le.required(),this.locale=x(K),this.cardImageSize=80,this.resizeOffset=80,this.accessHover=!1,this.lastAccessHover=!1}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=w({type:n,selectors:[["app-link-selection"]],inputs:{link:[1,"link"]},decls:1,vars:1,consts:[["appAutoResize","",1,"fs-xxs",3,"resizeOffset"],[1,"card","px-1","pt-1"],[1,"card-body","align-self-center","p-0","my-1"],["alt","","draggable","false",3,"error","src"],[1,"my-1"],[1,"p-2"],[1,"d-flex","mb-1"],["l10nTranslate","",1,"d-flex","col-sm-5","ps-1","pb-1","fw-bold"],[1,"word-break-all","fs-xxs"],[1,"fs-xxs"],[1,"d-flex","mb-1",3,"mouseover","mouseleave","focus"],[1,"d-flex","align-items-center","mb-1"],[3,"class"],["l10nTranslate","",1,"badge","rounded-pill","bg-secondary-alt"],[1,"badge","rounded-pill","bg-success"],[3,"share","showIcon"],[3,"permissions"]],template:function(o,a){o&1&&h(0,u7,62,29,"div",0),o&2&&C(a.link()?0:-1)},dependencies:[t1,D,Vi,dt,Z,R1],styles:[".card[_ngcontent-%COMP%]{width:100%;background:transparent;border:none}"],changeDetection:0});let i=n;return i})();var _7=()=>["shares"];function h7(i,n){if(i&1&&(s(0,"span"),p(1),z(2,"joinCounts"),l()),i&2){let e=c(2);r(),y(M(2,1,e.share().counts,ve(4,_7)))}}function C7(i,n){i&1&&(s(0,"span",11),p(1,"no"),l())}function S7(i,n){if(i&1){let e=b();s(0,"span",15),_("click",function(){S(e);let o=c(2);return g(o.childShareDialog(o.share()))}),u(1,"fa-icon",16),s(2,"span"),p(3),l()()}if(i&2){let e=c(2);r(),d("icon",e.iconShared),r(2),y(e.share().counts.shares)}}function g7(i,n){i&1&&(s(0,"span",11),p(1,"no"),l())}function x7(i,n){if(i&1){let e=b();s(0,"div",0)(1,"div",1)(2,"div",2)(3,"img",3),_("error",function(){S(e);let o=c();return g(o.share().fallBackMimeUrl())}),l()()(),u(4,"hr",4),s(5,"div",5)(6,"div",6)(7,"div",7),p(8,"Name"),l(),s(9,"div",8),p(10),l()(),s(11,"div",6)(12,"div",7),p(13,"Created"),l(),s(14,"div",9),p(15),z(16,"amDateFormat"),l()(),s(17,"div",6)(18,"div",7),p(19,"Modified"),l(),s(20,"div",9),p(21),z(22,"amDateFormat"),l()(),s(23,"div",10)(24,"div",7),p(25,"Members"),l(),h(26,h7,3,5,"span")(27,C7,2,0,"span",11),l(),s(28,"div",10)(29,"div",7),p(30,"Child shares"),l(),h(31,S7,4,2,"span",12)(32,g7,2,0,"span",11),l(),s(33,"div",10)(34,"div",7),p(35,"Comments"),l(),s(36,"span",13),_("click",function(){S(e);let o=c();return g(o.goToComments())}),p(37),z(38,"translate"),l()()(),u(39,"hr",4),s(40,"div",5)(41,"div",10)(42,"div",7),p(43,"Shared from"),l(),u(44,"app-share-repository",14),l()()()}if(i&2){let e=c();d("resizeOffset",e.resizeOffset),r(3),n1("height",e.cardImageSize,"px"),d("src",e.share().mimeUrl,X),r(7),y(e.share().name),r(5),y(e1(16,15,e.share().createdAt)),r(6),y(e1(22,17,e.share().modifiedAt)),r(5),C(e.share().counts.users||e.share().counts.groups?26:27),r(5),C(e.share().counts.shares?31:32),r(5),E(I("badge rounded-pill ",e.share().hasComments?"bg-success":"bg-secondary-alt"," cursor-pointer")),r(),k(" ",M(38,19,e.share().hasComments?"yes":"no",e.locale.language)," "),r(7),d("share",e.share())("showIcon",!1)}}var Na=(()=>{let n=class n{constructor(){this.share=Le.required(),this.locale=x(K),this.iconShared=o1.SHARED_WITH_OTHERS,this.cardImageSize=80,this.resizeOffset=80,this.layout=x(L),this.sharesService=x(Fo)}childShareDialog(t){t.counts.shares&&this.layout.openDialog(qi,null,{initialState:{share:t}})}goToComments(){this.share().hasComments&&this.sharesService.goTo(this.share()).then(()=>this.layout.showRSideBarTab(y1.COMMENTS,!0))}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=w({type:n,selectors:[["app-share-selection"]],inputs:{share:[1,"share"]},decls:1,vars:1,consts:[["appAutoResize","",1,"fs-xxs",3,"resizeOffset"],[1,"card","px-1","pt-1"],[1,"card-body","align-self-center","p-0","my-1"],["alt","","draggable","false",3,"error","src"],[1,"my-1"],[1,"p-2"],[1,"d-flex","mb-1"],["l10nTranslate","",1,"d-flex","col-sm-5","ps-1","pb-1","fw-bold"],[1,"word-break-all","fs-xxs"],[1,"fs-xxs"],[1,"d-flex","align-items-center","mb-1"],["l10nTranslate","",1,"badge","rounded-pill","bg-secondary-alt"],[1,"badge","rounded-pill","bg-purple","cursor-pointer","me-1"],[3,"click"],[3,"share","showIcon"],[1,"badge","rounded-pill","bg-purple","cursor-pointer","me-1",3,"click"],[1,"me-1",3,"icon"]],template:function(o,a){o&1&&h(0,x7,45,22,"div",0),o&2&&C(a.share()?0:-1)},dependencies:[t1,D,N,Vi,Z,R1,e2],styles:[".card[_ngcontent-%COMP%]{width:100%;background:transparent;border:none}"],changeDetection:0});let i=n;return i})();var v7=()=>["roots"],y7=(i,n)=>n.id;function b7(i,n){if(i&1&&(s(0,"span"),p(1),z(2,"joinCounts"),l()),i&2){let e=c(2);r(),y(M(2,1,e.space().counts,ve(4,v7)))}}function T7(i,n){i&1&&(s(0,"span",11),p(1,"no"),l())}function z7(i,n){if(i&1){let e=b();s(0,"span",15),_("click",function(){S(e);let o=c(2);return g(o.openSpaceRootsDialog())}),u(1,"fa-icon",16),s(2,"span"),p(3),l()()}if(i&2){let e=c(2);r(),d("icon",e.icons.ANCHORED),r(2),y(e.space().counts.roots)}}function M7(i,n){i&1&&(s(0,"span",11),p(1,"no"),l())}function E7(i,n){if(i&1){let e=b();s(0,"span",18),_("click",function(){S(e);let o=c(3);return g(o.openChildShareDialog(o.space()))}),u(1,"fa-icon",16),s(2,"span"),p(3),l()()}if(i&2){let e=c(3);r(),d("icon",e.icons.SHARED),r(2),y(e.space().counts.shares)}}function w7(i,n){i&1&&(s(0,"span",11),p(1,"no"),l())}function P7(i,n){if(i&1&&(s(0,"div",10)(1,"div",7),p(2,"Child shares"),l(),h(3,E7,4,2,"span",17)(4,w7,2,0,"span",11),l()),i&2){let e=c(2);r(3),C(e.space().counts.shares?3:4)}}function A7(i,n){if(i&1&&u(0,"app-user-avatar",13),i&2){let e=n.$implicit;d("user",e)("isMember",!0)("height",26)("width",26)}}function N7(i,n){if(i&1&&u(0,"app-file-permissions",14),i&2){let e=c(2);d("permissions",e.space().hPerms)}}function L7(i,n){i&1&&(s(0,"span",11),p(1,"no"),l())}function k7(i,n){if(i&1&&(s(0,"div",0)(1,"div",1)(2,"div",2),u(3,"fa-icon",3),l()(),u(4,"hr",4),s(5,"div",5)(6,"div",6)(7,"div",7),p(8,"Name"),l(),s(9,"div",8),p(10),l()(),s(11,"div",6)(12,"div",7),p(13,"Created"),l(),s(14,"div",9),p(15),z(16,"amDateFormat"),l()(),s(17,"div",6)(18,"div",7),p(19,"Modified"),l(),s(20,"div",9),p(21),z(22,"amDateFormat"),l()(),s(23,"div",10)(24,"div",7),p(25,"Members"),l(),h(26,b7,3,5,"span")(27,T7,2,0,"span",11),l(),s(28,"div",10)(29,"div",7),p(30,"Anchored"),l(),h(31,z7,4,2,"span",12)(32,M7,2,0,"span",11),l(),h(33,P7,5,1,"div",10),l(),u(34,"hr",4),s(35,"div",5)(36,"div",10)(37,"div",7),p(38,"Managers"),l(),F(39,A7,1,4,"app-user-avatar",13,y7),l(),s(41,"div",10)(42,"div",7),p(43,"Permissions"),l(),h(44,N7,1,1,"app-file-permissions",14)(45,L7,2,0,"span",11),l()()()),i&2){let e=c();d("resizeOffset",e.resizeOffset),r(3),n1("width",e.cardImageSize,"px")("height",e.cardImageSize,"px"),d("icon",e.icons.SPACES)("fixedWidth",!1),r(7),y(e.space().name),r(5),y(e1(16,14,e.space().createdAt)),r(6),y(e1(22,16,e.space().modifiedAt)),r(5),C(e.space().counts.users||e.space().counts.groups?26:27),r(5),C(e.space().counts.roots?31:32),r(2),C(e.space().role===e.SPACE_ROLE.IS_MANAGER?33:-1),r(6),R(e.space().managers),r(5),C(e.space().permissions?44:45)}}var La=(()=>{let n=class n{constructor(){this.space=Le.required(),this.locale=x(K),this.SPACE_ROLE=ao,this.icons={SPACES:o1.SPACES,ANCHORED:o1.ANCHORED,SHARED:o1.SHARED_WITH_OTHERS},this.cardImageSize=80,this.resizeOffset=80,this.userService=x(u1),this.layout=x(L)}openSpaceRootsDialog(){this.layout.openDialog(o5,"md",{initialState:{space:this.space(),user:this.userService.user}})}openChildShareDialog(t){t.counts.shares&&this.layout.openDialog(qi,null,{initialState:{space:t}})}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=w({type:n,selectors:[["app-space-selection"]],inputs:{space:[1,"space"]},decls:1,vars:1,consts:[["appAutoResize","",1,"fs-xxs",3,"resizeOffset"],[1,"card","px-1","pt-1"],[1,"card-body","align-self-center","p-0","my-1"],[1,"circle-primary-icon",2,"font-size","48px",3,"icon","fixedWidth"],[1,"my-1"],[1,"p-2"],[1,"d-flex","mb-1"],["l10nTranslate","",1,"d-flex","col-sm-5","ps-1","pb-1","fw-bold"],[1,"word-break-all","fs-xxs"],[1,"fs-xxs"],[1,"d-flex","align-items-center","mb-1"],["l10nTranslate","",1,"badge","rounded-pill","bg-secondary-alt"],[1,"badge","rounded-pill","bg-primary","cursor-pointer","me-1"],["tooltipPlacement","bottom",3,"user","isMember","height","width"],[3,"permissions"],[1,"badge","rounded-pill","bg-primary","cursor-pointer","me-1",3,"click"],[1,"me-1",3,"icon"],[1,"badge","rounded-pill","bg-purple","cursor-pointer","me-1"],[1,"badge","rounded-pill","bg-purple","cursor-pointer","me-1",3,"click"]],template:function(o,a){o&1&&h(0,k7,46,18,"div",0),o&2&&C(a.space()?0:-1)},dependencies:[t1,N,D,dt,ge,e2,R1],styles:[".card[_ngcontent-%COMP%]{width:100%;background:transparent;border:none}"],changeDetection:0});let i=n;return i})();function D7(i,n){if(i&1&&(s(0,"span",11),p(1),l()),i&2){let e=c(2);r(),y(e.trash().nb)}}function F7(i,n){i&1&&(s(0,"span",12),p(1,"no"),l())}function R7(i,n){if(i&1&&(s(0,"div",0)(1,"div",1)(2,"div",2),u(3,"fa-icon",3),l()(),u(4,"hr",4),s(5,"div",5)(6,"div",6)(7,"div",7),p(8,"Name"),l(),s(9,"div",8),p(10),z(11,"translate"),l()(),s(12,"div",6)(13,"div",7),p(14,"Created"),l(),s(15,"div",9),p(16),z(17,"amDateFormat"),l()(),s(18,"div",6)(19,"div",7),p(20,"Modified"),l(),s(21,"div",9),p(22),z(23,"amDateFormat"),l()(),s(24,"div",10)(25,"div",7),p(26,"Elements"),l(),h(27,D7,2,1,"span",11)(28,F7,2,0,"span",12),l()()()),i&2){let e=c();d("resizeOffset",e.resizeOffset),r(3),n1("width",e.cardImageSize,"px")("height",e.cardImageSize,"px"),d("icon",e.iconTrash)("fixedWidth",!1),r(7),y(e.trash().isPersonal?M(11,11,e.trash().name,e.locale.language):e.trash().name),r(6),y(e1(17,14,e.trash().ctime)),r(6),y(e1(23,16,e.trash().mtime)),r(5),C(e.trash().nb?27:28)}}var ka=(()=>{let n=class n{constructor(){this.trash=Le.required(),this.locale=x(K),this.iconTrash=o1.TRASH,this.cardImageSize=80,this.resizeOffset=80}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=w({type:n,selectors:[["app-trash-selection"]],inputs:{trash:[1,"trash"]},decls:1,vars:1,consts:[["appAutoResize","",1,"fs-xxs",3,"resizeOffset"],[1,"card","px-1","pt-1"],[1,"card-body","align-self-center","p-0","my-1"],[1,"circle-primary-icon",2,"font-size","48px",3,"icon","fixedWidth"],[1,"my-1"],[1,"p-2"],[1,"d-flex","mb-1"],["l10nTranslate","",1,"d-flex","col-sm-5","ps-1","pb-1","fw-bold"],[1,"d-flex","col-sm-7","word-break-all","fs-xxs"],[1,"d-flex","col-sm-7","fs-xxs"],[1,"d-flex","align-items-center","mb-1"],[1,"badge","rounded-pill","bg-danger"],["l10nTranslate","",1,"badge","rounded-pill","bg-secondary-alt"]],template:function(o,a){o&1&&h(0,R7,29,18,"div",0),o&2&&C(a.trash()?0:-1)},dependencies:[t1,N,D,R1,Z],styles:[".card[_ngcontent-%COMP%]{width:100%;background:transparent;border:none}"],changeDetection:0});let i=n;return i})();function I7(i,n){if(i&1&&u(0,"app-files-selection",0),i&2){let e=c();d("files",e.store.filesSelection())}}function O7(i,n){if(i&1&&u(0,"app-space-selection",1),i&2){let e=c();d("space",e.store.spaceSelection())}}function V7(i,n){if(i&1&&u(0,"app-share-selection",2),i&2){let e=c();d("share",e.store.shareSelection())}}function B7(i,n){if(i&1&&u(0,"app-trash-selection",3),i&2){let e=c();d("trash",e.store.trashSelection())}}function U7(i,n){if(i&1&&u(0,"app-link-selection",4),i&2){let e=c();d("link",e.store.linkSelection())}}var Da=(()=>{let n=class n{constructor(){this.store=x(q),this.SPACES_PATH=O,this.selectionType=P1(()=>this.setRepository(this.store.repository()))}setRepository(t){return[O.SPACES,O.SHARED,O.LINKS,O.TRASHES].indexOf(t)>-1?t:O.FILES}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=w({type:n,selectors:[["app-selection"]],decls:5,vars:1,consts:[[3,"files"],[3,"space"],[3,"share"],[3,"trash"],[3,"link"]],template:function(o,a){if(o&1&&h(0,I7,1,1,"app-files-selection",0)(1,O7,1,1,"app-space-selection",1)(2,V7,1,1,"app-share-selection",2)(3,B7,1,1,"app-trash-selection",3)(4,U7,1,1,"app-link-selection",4),o&2){let m;C((m=a.selectionType())===a.SPACES_PATH.FILES?0:m===a.SPACES_PATH.SPACES?1:m===a.SPACES_PATH.SHARED?2:m===a.SPACES_PATH.TRASHES?3:m===a.SPACES_PATH.LINKS?4:-1)}},dependencies:[Pa,Na,La,ka,Aa],encapsulation:2,changeDetection:0});let i=n;return i})();var H7=["CommentCreate"],$7=(i,n)=>n.id;function G7(i,n){if(i&1){let e=b();s(0,"i",14),_("click",function(){S(e);let o=c().$implicit,a=c(2);return g(a.onEditComment(o))}),u(1,"fa-icon",15),l()}if(i&2){let e=c(3);r(),d("icon",e.icons.faEdit)}}function W7(i,n){if(i&1){let e=b();u(0,"textarea",16,1),s(2,"div",17)(3,"button",18),_("click",function(){S(e);let o=C1(1),a=c().$implicit,m=c(2);return g(m.updateComment(a,o.value))}),p(4," Update "),l(),s(5,"button",19),_("click",function(){S(e);let o=c().$implicit,a=c(2);return g(a.onEditComment(o))}),p(6," Cancel "),l(),s(7,"button",20),_("click",function(){S(e);let o=c().$implicit,a=c(2);return g(a.removeComment(o))}),p(8," Remove "),l()()}if(i&2){let e=C1(1),t=c().$implicit;d("ngModel",t.content)("disabled",!t.author.isAuthor&&t.isFileOwner),r(3),d("disabled",!e.value||t.content===e.value)}}function q7(i,n){if(i&1&&(s(0,"span"),p(1),z(2,"amDateFormat"),l()),i&2){let e=c(2).$implicit;r(),y(e1(2,1,e.dateToShow))}}function Y7(i,n){i&1&&(s(0,"span",22),p(1,"modified"),l())}function j7(i,n){if(i&1&&(h(0,Y7,2,0,"span",22),s(1,"span"),p(2),z(3,"amTimeAgo"),l()),i&2){let e=c(2).$implicit;C(e.wasModified?0:-1),r(2),y(e1(3,2,e.dateToShow))}}function K7(i,n){if(i&1){let e=b();s(0,"div"),p(1),l(),s(2,"span",21),_("mouseleave",function(){S(e);let o=c().$implicit;return g(o.isHover=!1)})("mouseover",function(){S(e);let o=c().$implicit;return g(o.isHover=!0)})("focus",function(){S(e);let o=c().$implicit;return g(o.isHover=!0)}),h(3,q7,3,3,"span")(4,j7,4,4),l()}if(i&2){let e=c().$implicit;r(),y(e.content),r(2),C(e.isHover?3:4)}}function Q7(i,n){if(i&1&&(s(0,"div",7)(1,"div",8),u(2,"app-user-avatar",9),s(3,"div",10)(4,"b"),p(5),z(6,"translate"),l()(),s(7,"div",11),h(8,G7,2,1,"i",12),l()(),s(9,"div",13),h(10,W7,9,3)(11,K7,5,2),l()()),i&2){let e=n.$implicit,t=c(2);r(2),d("user",e.author)("width",24)("height",24),r(3),y(e.author.isAuthor?M(6,6,"Me",t.locale.language):e.author.fullName),r(3),C(e.author.isAuthor||e.isFileOwner?8:-1),r(2),C(e.isEdited?10:11)}}function X7(i,n){if(i&1&&(s(0,"div",6),F(1,Q7,12,9,"div",7,$7),l()),i&2){let e=c();r(),R(e.comments)}}var Fa=(()=>{let n=class n{constructor(){this.locale=x(K),this.comments=[],this.icons={faEdit:li},this.store=x(q),this.file=P1(()=>this.store.filesSelection().length?this.store.filesSelection()[0]:null),this.layout=x(L),this.commentsService=x(hn),this.subscriptions=[],this.subscriptions.push(vt(this.file).subscribe(t=>this.loadComments(t)))}ngOnDestroy(){this.subscriptions.forEach(t=>t.unsubscribe())}onEditComment(t){t.isEdited||this.comments.forEach(o=>o.isEdited=!1),t.isEdited=!t.isEdited}loadComments(t){t&&t.hasComments?this.commentsService.getComments(this.file()).subscribe({next:o=>this.comments=o,error:o=>this.layout.sendNotification("error","Comments","Unable to load",o)}):this.comments=[]}postComment(){let t=this.commentInput.nativeElement.value;this.commentsService.createComment(this.file(),{content:t,fileId:this.file().id}).subscribe({next:o=>{this.comments.unshift(o),this.commentInput.nativeElement.value="",this.file().id=o.fileId,this.file().hasComments=!!this.comments.length},error:o=>this.layout.sendNotification("error","Comment","Unable to create",o)})}removeComment(t){this.commentsService.deleteComment(this.file(),{commentId:t.id,fileId:this.file().id}).subscribe({next:()=>{this.comments=this.comments.filter(o=>o.id!==t.id),this.file().hasComments=!!this.comments.length},error:o=>this.layout.sendNotification("error","Comment","Unable to delete",o)})}updateComment(t,o){this.commentsService.updateComment(this.file(),{commentId:t.id,fileId:this.file().id,content:o}).subscribe({next:a=>{t.isEdited=!1,Object.assign(t,a)},error:a=>{this.layout.sendNotification("error","Comment","Unable to update",a)}})}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=w({type:n,selectors:[["app-comments-selection"]],viewQuery:function(o,a){if(o&1&&r1(H7,7),o&2){let m;s1(m=l1())&&(a.commentInput=m.first)}},decls:8,vars:7,consts:[["CommentCreate",""],["CommentUpdate",""],[1,"sidebar-component-title"],[1,"input-group","mb-0"],["type","text","appAutofocus","",1,"form-control","form-control-sm",3,"keyup.enter","disabled","placeholder"],["role","button","type","button","l10nTranslate","",1,"btn","btn-xs","btn-primary",3,"click","disabled"],["appAutoResize","",1,"fs-xxs","p-2"],[1,"mb-1","app-small-card","app-comment","rounded"],[1,"d-flex","px-2","pt-2","pb-1"],[3,"user","width","height"],[1,"align-self-center","ms-1"],[1,"ms-auto","align-self-center",2,"font-size","14px"],[1,"cursor-pointer"],[1,"pb-2","px-2"],[1,"cursor-pointer",3,"click"],[3,"icon"],["required","",1,"form-control","form-control-sm","mt-1","mb-2",3,"ngModel","disabled"],[1,"d-flex"],["role","button","type","button","l10nTranslate","",1,"btn","btn-xxs","btn-primary","me-auto",3,"click","disabled"],["role","button","type","button","l10nTranslate","",1,"btn","btn-xxs","btn-secondary","align-content-around",3,"click"],["role","button","type","button","l10nTranslate","",1,"btn","btn-xxs","btn-danger","ms-auto",3,"click"],[1,"text-muted","no-select","pt-1","fs-xxxs",3,"mouseleave","mouseover","focus"],["l10nTranslate","",1,"me-1"]],template:function(o,a){if(o&1){let m=b();s(0,"div",2)(1,"div",3)(2,"input",4,0),z(4,"translate"),_("keyup.enter",function(){return S(m),g(a.postComment())}),l(),s(5,"button",5),_("click",function(){return S(m),g(a.postComment())}),p(6," Add "),l()()(),h(7,X7,3,0,"div",6)}if(o&2){let m=C1(3);r(2),d("disabled",!a.file())("placeholder",M(4,4,"Write a comment ...",a.locale.language)),r(3),d("disabled",!m.value),r(2),C(a.comments.length?7:-1)}},dependencies:[Ve,D,t1,N,x1,X1,_1,M0,g1,ge,Z,R1,I1],encapsulation:2});let i=n;return i})();var Z7=(i,n)=>n.key,J7=(i,n)=>n.id;function ec(i,n){if(i&1&&(s(0,"option",8),p(1),l()),i&2){let e=n.$implicit;d("ngValue",e.key),r(),y(e.value.text)}}function tc(i,n){if(i&1){let e=b();s(0,"div",12)(1,"div",13)(2,"img",14),_("error",function(){let o=S(e).$implicit;return g(o.fallBackMimeUrl())}),l(),s(3,"div",15),p(4),l(),s(5,"button",16),_("click",function(){let o=S(e).$implicit,a=c(2);return g(a.remove(o))}),u(6,"fa-icon",4),l()()()}if(i&2){let e=n.$implicit,t=c(2);r(),d("tooltip",e.path),r(),d("src",e.mimeUrl,X),r(2),y(e.name),r(2),d("icon",t.icons.faTimes)}}function ic(i,n){if(i&1){let e=b();s(0,"div",5)(1,"div",6)(2,"select",7),p1("ngModelChange",function(o){S(e);let a=c();return m1(a.selectedAction,o)||(a.selectedAction=o),g(o)}),F(3,ec,2,2,"option",8,Z7),z(5,"keyvalue"),l(),s(6,"button",9),_("click",function(){S(e);let o=c();return g(o.doAction())}),p(7,"Confirm"),l()()(),u(8,"hr",10),s(9,"div",11),F(10,tc,7,4,"div",12,J7),l()}if(i&2){let e=c();r(2),c1("ngModel",e.selectedAction),r(),R(M(5,2,e.operations,e.originalOrderKeyValue)),r(6),d("resizeOffset",120),r(),R(e.files)}}var Ra=(()=>{let n=class n{constructor(){this.locale=x(K),this.icons={faTrashCan:$1,faTimes:ke,faDownload:Gt,faArrowsAlt:st,faClone:pi,faQuestion:W0},this.originalOrderKeyValue=J1,this.operations={copyPaste:{text:"Copy-Paste",operation:V1.COPY},cutPaste:{text:"Cut-Paste",operation:V1.MOVE},download:{text:"Download",operation:V1.DOWNLOAD},compress:{text:"Compress",operation:V1.COMPRESS}},this.files=[],this.layout=x(L),this.store=x(q),this.filesService=x(E1),this.selectedAction=this.filesService.clipboardAction,this.subscriptions=[],this.subscriptions.push(this.store.filesClipboard.subscribe(t=>this.files=t))}ngOnDestroy(){this.subscriptions.forEach(t=>t.unsubscribe())}clearAll(){this.layout.toggleRSideBar(!1),this.filesService.clearClipboard()}remove(t){this.files.length===1?this.clearAll():this.filesService.removeFromClipboard(t)}doAction(){if(this.selectedAction==="copyPaste"||this.selectedAction==="cutPaste")this.filesService.onPasteClipboard(this.selectedAction);else{let t={name:this.files[0].name,compressInDirectory:this.operations[this.selectedAction].operation===V1.COMPRESS,files:this.files.map(a=>({name:a.name,rootAlias:a.root?.alias,path:a.path})),extension:"tar"};this.layout.openDialog(Sn,null,{initialState:{archiveProps:t}}).content.submitEvent.pipe(w1(1)).subscribe(()=>this.filesService.clearClipboard())}}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=w({type:n,selectors:[["app-files-clipboard"]],decls:8,vars:7,consts:[[1,"sidebar-component-title"],["container","body","placement","left",1,"cursor-pointer",3,"icon","tooltip"],["l10nTranslate",""],[1,"btn","btn-xs","btn-secondary",3,"click"],[3,"icon"],[1,"px-2","pt-2","pb-2","fs-xs"],[1,"d-flex","justify-content-between","mt-2"],[1,"form-select","form-select-sm","my-auto",3,"ngModelChange","ngModel"],["l10nTranslate","",3,"ngValue"],["type","button","l10nTranslate","",1,"btn","btn-xxs","btn-primary","ms-1",3,"click"],[1,"mx-0","mt-2","mb-0"],["appAutoResize","",1,"sidebar-item",3,"resizeOffset"],[1,"sidebar-item-container"],[1,"sidebar-item-content",3,"tooltip"],["alt","","height","28","width","auto",1,"me-1",3,"error","src"],[1,"text-truncate","fs-xxs"],[1,"btn","btn-xxs","btn-danger","ms-auto",3,"click"]],template:function(o,a){o&1&&(s(0,"div",0),u(1,"fa-icon",1),z(2,"translate"),s(3,"span",2),p(4,"Clipboard"),l(),s(5,"button",3),_("click",function(){return a.clearAll()}),u(6,"fa-icon",4),l()(),h(7,ic,12,5)),o&2&&(r(),d("icon",a.icons.faQuestion)("tooltip",M(2,4,"Actions will be performed in the current folder",a.locale.language)),r(5),d("icon",a.icons.faTrashCan),r(),C(a.files.length?7:-1))},dependencies:[t1,N,Ht,z1,D,x1,ue,_e,fe,_1,g1,Z,Q1],encapsulation:2});let i=n;return i})();var Ia=(()=>{let n=class n{constructor(){this.layout=x(L),this.store=x(q),this.tabs=[{label:y1.SELECTION,components:[Da],loadComponent:!1,icon:b4,count:{value:vt(P1(()=>this.store.filesSelection().length>1?this.store.filesSelection().length>1e3?"999+":this.store.filesSelection().length:0)),level:"primary"},title:"Informations",active:!1},{label:y1.TREE,components:[t5],loadComponent:!0,icon:B4,title:null,active:!1},{label:y1.COMMENTS,components:[Fa],loadComponent:!1,icon:Gi,title:null,active:!1},{label:y1.CLIPBOARD,components:[Ra],loadComponent:!1,icon:_i,count:{value:this.store.filesClipboard.pipe(ae(t=>t.length)),level:"maroon"},showOnCount:!0,title:null,active:!1}],this.layout.setTabsRSideBar(Q4.FILES,this.tabs)}ngOnDestroy(){this.layout.setTabsRSideBar(null)}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=w({type:n,selectors:[["app-spaces-nav"]],decls:1,vars:0,template:function(o,a){o&1&&u(0,"router-outlet")},dependencies:[Bt],encapsulation:2});let i=n;return i})();var ut=i=>(x(q).repository.set(i.data.repository),i.url);var Oa=[{path:"",component:Ia,children:[{path:O.SPACES,pathMatch:"full",loadComponent:()=>import("./chunk-LUZCOHFN.js").then(i=>i.SpacesComponent),resolve:{routes:ut},data:{repository:O.SPACES}},{path:O.TRASH,pathMatch:"full",loadComponent:()=>import("./chunk-4LSJLWYV.js").then(i=>i.TrashComponent),resolve:{routes:ut},data:{repository:O.TRASHES}},{path:O.SHARED,pathMatch:"full",loadComponent:()=>import("./chunk-MHSCCXVL.js").then(i=>i.SharedComponent),resolve:{routes:ut},data:{repository:O.SHARED}},{path:O.LINKS,pathMatch:"full",loadComponent:()=>import("./chunk-EE2TDTY4.js").then(i=>i.LinksComponent),resolve:{routes:ut},data:{repository:O.LINKS}},{path:O.SPACES_FILES,children:[{path:"**",component:xn,resolve:{routes:ut},data:{repository:O.FILES}}]},{path:O.SPACES_SHARES,children:[{path:"**",component:xn,resolve:{routes:ut},data:{repository:O.SHARES}}]},{path:O.SPACES_TRASH,children:[{path:"**",component:xn,resolve:{routes:ut},data:{repository:O.TRASH}}]}]}];var _t=(function(i){return i.LIST="list",i.SYNC="sync",i.ADD="add",i.FLUSH="flush",i.SET="set",i.REMOVE="remove",i})(_t||{}),k3=(function(i){return i.FILE="file",i.FOLDER="folder",i.EXPERT="expert",i.START="start",i.END="end",i.IN="in",i})(k3||{});var vn={prefix:"fab",iconName:"windows",icon:[448,512,[],"f17a","M0 93.7l183.6-25.3 0 177.4-183.6 0 0-152.1zM0 418.3l183.6 25.3 0-175.2-183.6 0 0 149.9zm203.8 28l244.2 33.7 0-211.6-244.2 0 0 177.9zm0-380.6l0 180.1 244.2 0 0-213.8-244.2 33.7z"]};var yn={prefix:"fab",iconName:"apple",icon:[384,512,[],"f179","M319.1 268.7c-.2-36.7 16.4-64.4 50-84.8-18.8-26.9-47.2-41.7-84.7-44.6-35.5-2.8-74.3 20.7-88.5 20.7-15 0-49.4-19.7-76.4-19.7-55.8 .9-115.1 44.5-115.1 133.2 0 26.2 4.8 53.3 14.4 81.2 12.8 36.7 59 126.7 107.2 125.2 25.2-.6 43-17.9 75.8-17.9 31.8 0 48.3 17.9 76.4 17.9 48.6-.7 90.4-82.5 102.6-119.3-65.2-30.7-61.7-90-61.7-91.9zM262.5 104.5c27.3-32.4 24.8-61.9 24-72.5-24.1 1.4-52 16.4-67.9 34.9-17.5 19.8-27.8 44.3-25.6 71.9 26.1 2 49.9-11.4 69.5-34.3z"]};var bn={prefix:"fab",iconName:"linux",icon:[448,512,[],"f17c","M220.9 123.3c1 .5 1.8 1.7 3 1.7 1.1 0 2.8-.4 2.9-1.5 .2-1.4-1.9-2.3-3.2-2.9-1.7-.7-3.9-1-5.5-.1-.4 .2-.8 .7-.6 1.1 .3 1.3 2.3 1.1 3.4 1.7zM199 125c1.2 0 2-1.2 3-1.7 1.1-.6 3.1-.4 3.5-1.6 .2-.4-.2-.9-.6-1.1-1.6-.9-3.8-.6-5.5 .1-1.3 .6-3.4 1.5-3.2 2.9 .1 1 1.8 1.5 2.8 1.4zM420 403.8c-3.6-4-5.3-11.6-7.2-19.7-1.8-8.1-3.9-16.8-10.5-22.4-1.3-1.1-2.6-2.1-4-2.9-1.3-.8-2.7-1.5-4.1-2 9.2-27.3 5.6-54.5-3.7-79.1-11.4-30.1-31.3-56.4-46.5-74.4-17.1-21.5-33.7-41.9-33.4-72 .5-45.9 5.1-131.2-75.8-131.3-102.4-.2-76.8 103.4-77.9 135.2-1.7 23.4-6.4 41.8-22.5 64.7-18.9 22.5-45.5 58.8-58.1 96.7-6 17.9-8.8 36.1-6.2 53.3-6.5 5.8-11.4 14.7-16.6 20.2-4.2 4.3-10.3 5.9-17 8.3s-14 6-18.5 14.5c-2.1 3.9-2.8 8.1-2.8 12.4 0 3.9 .6 7.9 1.2 11.8 1.2 8.1 2.5 15.7 .8 20.8-5.2 14.4-5.9 24.4-2.2 31.7 3.8 7.3 11.4 10.5 20.1 12.3 17.3 3.6 40.8 2.7 59.3 12.5 19.8 10.4 39.9 14.1 55.9 10.4 11.6-2.6 21.1-9.6 25.9-20.2 12.5-.1 26.3-5.4 48.3-6.6 14.9-1.2 33.6 5.3 55.1 4.1 .6 2.3 1.4 4.6 2.5 6.7l0 .1c8.3 16.7 23.8 24.3 40.3 23 16.6-1.3 34.1-11 48.3-27.9 13.6-16.4 36-23.2 50.9-32.2 7.4-4.5 13.4-10.1 13.9-18.3 .4-8.2-4.4-17.3-15.5-29.7zM223.8 87.3c9.8-22.2 34.2-21.8 44-.4 6.5 14.2 3.6 30.9-4.3 40.4-1.6-.8-5.9-2.6-12.6-4.9 1.1-1.2 3.1-2.7 3.9-4.6 4.8-11.8-.2-27-9.1-27.3-7.3-.5-13.9 10.8-11.8 23-4.1-2-9.4-3.5-13-4.4-1-6.9-.3-14.6 2.9-21.8zM183.1 75.8c10.1 0 20.8 14.2 19.1 33.5-3.5 1-7.1 2.5-10.2 4.6 1.2-8.9-3.3-20.1-9.6-19.6-8.4 .7-9.8 21.2-1.8 28.1 1 .8 1.9-.2-5.9 5.5-15.6-14.6-10.5-52.1 8.4-52.1zm-13.6 60.7c6.2-4.6 13.6-10 14.1-10.5 4.7-4.4 13.5-14.2 27.9-14.2 7.1 0 15.6 2.3 25.9 8.9 6.3 4.1 11.3 4.4 22.6 9.3 8.4 3.5 13.7 9.7 10.5 18.2-2.6 7.1-11 14.4-22.7 18.1-11.1 3.6-19.8 16-38.2 14.9-3.9-.2-7-1-9.6-2.1-8-3.5-12.2-10.4-20-15-8.6-4.8-13.2-10.4-14.7-15.3-1.4-4.9 0-9 4.2-12.3zm3.3 334c-2.7 35.1-43.9 34.4-75.3 18-29.9-15.8-68.6-6.5-76.5-21.9-2.4-4.7-2.4-12.7 2.6-26.4l0-.2c2.4-7.6 .6-16-.6-23.9-1.2-7.8-1.8-15 .9-20 3.5-6.7 8.5-9.1 14.8-11.3 10.3-3.7 11.8-3.4 19.6-9.9 5.5-5.7 9.5-12.9 14.3-18 5.1-5.5 10-8.1 17.7-6.9 8.1 1.2 15.1 6.8 21.9 16l19.6 35.6c9.5 19.9 43.1 48.4 41 68.9zm-1.4-25.9c-4.1-6.6-9.6-13.6-14.4-19.6 7.1 0 14.2-2.2 16.7-8.9 2.3-6.2 0-14.9-7.4-24.9-13.5-18.2-38.3-32.5-38.3-32.5-13.5-8.4-21.1-18.7-24.6-29.9s-3-23.3-.3-35.2c5.2-22.9 18.6-45.2 27.2-59.2 2.3-1.7 .8 3.2-8.7 20.8-8.5 16.1-24.4 53.3-2.6 82.4 .6-20.7 5.5-41.8 13.8-61.5 12-27.4 37.3-74.9 39.3-112.7 1.1 .8 4.6 3.2 6.2 4.1 4.6 2.7 8.1 6.7 12.6 10.3 12.4 10 28.5 9.2 42.4 1.2 6.2-3.5 11.2-7.5 15.9-9 9.9-3.1 17.8-8.6 22.3-15 7.7 30.4 25.7 74.3 37.2 95.7 6.1 11.4 18.3 35.5 23.6 64.6 3.3-.1 7 .4 10.9 1.4 13.8-35.7-11.7-74.2-23.3-84.9-4.7-4.6-4.9-6.6-2.6-6.5 12.6 11.2 29.2 33.7 35.2 59 2.8 11.6 3.3 23.7 .4 35.7 16.4 6.8 35.9 17.9 30.7 34.8-2.2-.1-3.2 0-4.2 0 3.2-10.1-3.9-17.6-22.8-26.1-19.6-8.6-36-8.6-38.3 12.5-12.1 4.2-18.3 14.7-21.4 27.3-2.8 11.2-3.6 24.7-4.4 39.9-.5 7.7-3.6 18-6.8 29-32.1 22.9-76.7 32.9-114.3 7.2zm257.4-11.5c-.9 16.8-41.2 19.9-63.2 46.5-13.2 15.7-29.4 24.4-43.6 25.5s-26.5-4.8-33.7-19.3c-4.7-11.1-2.4-23.1 1.1-36.3 3.7-14.2 9.2-28.8 9.9-40.6 .8-15.2 1.7-28.5 4.2-38.7 2.6-10.3 6.6-17.2 13.7-21.1 .3-.2 .7-.3 1-.5 .8 13.2 7.3 26.6 18.8 29.5 12.6 3.3 30.7-7.5 38.4-16.3 9-.3 15.7-.9 22.6 5.1 9.9 8.5 7.1 30.3 17.1 41.6 10.6 11.6 14 19.5 13.7 24.6zM173.4 148.7c2 1.9 4.7 4.5 8 7.1 6.6 5.2 15.8 10.6 27.3 10.6 11.6 0 22.5-5.9 31.8-10.8 4.9-2.6 10.9-7 14.8-10.4s5.9-6.3 3.1-6.6-2.6 2.6-6 5.1c-4.4 3.2-9.7 7.4-13.9 9.8-7.4 4.2-19.5 10.2-29.9 10.2s-18.7-4.8-24.9-9.7c-3.1-2.5-5.7-5-7.7-6.9-1.5-1.4-1.9-4.6-4.3-4.9-1.4-.1-1.8 3.7 1.7 6.5z"]};function Tn(i){return i?i.includes(te.MODIFY)&&i.includes(te.DELETE)&&i.includes(te.ADD):!1}function zn(i,n=!1){let e=i.split("/");return e[0]===O.FILES&&e.length>3||e[0]===O.SHARES&&e.length>(n?2:1)||e.length>2}function Mn(i){let n=i.split("/").filter(Boolean);return n.length?(n[0]===O.FILES&&(n[1]===O.PERSONAL?(n=n.slice(2),n.unshift(O.PERSONAL)):n[0]=O.SPACES),n.join("/")):""}var Ge=class{constructor(n,e=!1){this.mainError=null,this.lastErrors=[],this.newly=0,this.inSync=!1,this.nbSyncTasks=0,e?(this.id=Ke("id",n),this.firstSync=Ke("firstSync",n),this.mainError=Ke("mainError",n),this.lastErrors=Ke("lastErrors",n),this.settings=n):Object.assign(this,n),this.setInfos(),this.setStatus(!1)}setStatus(n){n?(this.mimeUrl=O1(Bi),this.inSync=!0):(this.nbSyncTasks=0,this.inSync=!1,this.newly=Et(this.settings.lastSync||0,!0),this.settings.enabled?this.mainError?this.mimeUrl=O1(Po):this.mimeUrl=O1(this.mime):this.mimeUrl=O1(Ui))}export(n=!1){return it(K1({},n?{id:this.id}:{}),{name:this.settings.name,mode:this.settings.mode,enabled:this.settings.enabled,diffMode:this.settings.diffMode,conflictMode:this.settings.conflictMode,filters:this.settings.filters,scheduler:this.settings.scheduler})}setInfos(){this.isWriteable=Tn(this.settings?.permissions),this.newly=Et(this.settings.lastSync||0,!0);let n=this.settings.remotePath.split("/")[0];switch(this.showedPath=this.settings.remotePath.split("/").slice(1).join("/"),this.iconClass=n===wt.SHARES?"purple":"primary",n){case O.PERSONAL:this.icon=o1.PERSONAL,this.mime=ce;break;case O.SPACES:this.icon=o1.SPACES,this.mime=ce;break;case O.SHARES:this.icon=o1.SHARES,this.mime=t2;break}}};var En=class{constructor(n){this.paths=(Ke("paths",n)||[]).map(e=>new Ge(e)),Object.assign(this,n),this.setExpiration(),this.setIcon()}setExpiration(){let n=Qn()>=this.tokenExpiration;this.expiration={value:this.tokenExpiration*1e3,reached:n,approaching:n?!1:Qn()+90*86400>=this.tokenExpiration}}setIcon(){this.info.os==="darwin"?(this.icon=yn,this.osName="macOS"):this.info.os.startsWith("win")?(this.icon=vn,this.osName="Windows"):this.info.os.startsWith("linux")&&(this.icon=bn,this.osName="Linux")}};var et=class{constructor(n){this.isDir=!0,this.mime="directory",this.isAlreadySynced=!1,this.isWriteable=Tn(n.permissions),Object.assign(this,n),this.icon||(this.mimeUrl=O1(this.enabled?this.inShare?t2:ce:Ui)),this.isSynchronizable=zn(this.path),this.serverPath=Mn(this.path)}setAlreadySynced(){this.isAlreadySynced=!0,this.mimeUrl=O1(Bi)}};var b1=(()=>{let n=class n{constructor(){this.router=x(i1),this.http=x(ot),this.layout=x(L),this.store=x(q),this.electron=x(Di),this.resetWizard()}showOpenDialog(t){return this.electron.invoke(ee.MISC.DIALOG_OPEN,t)}getFilePath(t){return this.electron.ipcRenderer.showFilePath(t)}getClients(){return this.http.get(x2).pipe(ae(t=>t.map(o=>new En(o))))}deleteClient(t){return this.http.delete(`${x2}/${t}`)}updateSyncPath(t,o,a){return this.http.put(`${x2}/${t}/${jn.PATHS}/${o}`,a)}deleteSyncPath(t,o){return this.http.delete(`${x2}/${t}/${jn.PATHS}/${o}`)}addPath(t){return this.electron.invoke(ee.SYNC.PATH_OPERATION,_t.ADD,t)}updatePath(t){return this.electron.invoke(ee.SYNC.PATH_OPERATION,_t.SET,t)}flushPath(t){return this.electron.invoke(ee.SYNC.PATH_OPERATION,_t.FLUSH,t)}removePath(t){return this.electron.invoke(ee.SYNC.PATH_OPERATION,_t.REMOVE,t)}doSync(t,o,a=!1,m=!1){this.electron.invoke(ee.SYNC.PATH_OPERATION,_t.SYNC,{state:t,paths:o,reportOnly:a,async:m}).catch(console.error)}refreshPaths(){return nt(this,null,function*(){try{let t=yield this.electron.invoke(ee.SYNC.PATH_OPERATION,_t.LIST,null);this.store.clientSyncPaths.set(t.map(o=>new Ge(o,!0)))}catch(t){console.error(t)}})}goToPath(t,o=!0,a=""){if(o)this.electron.openPath(`${t.settings.localPath}/${a?`/${a}`:""}`);else{let m=[...t.settings.remotePath.split("/"),...a?a.split("/"):[]],f;m.length>1&&(f=m.pop());let v=m.shift();this.router.navigate([O.SPACES,...ro[v],...m],f?{queryParams:{select:f}}:{}).catch(console.error)}}setClientScheduler(t){this.electron.send(ee.SYNC.SCHEDULER_STATE,"update",t)}getTransfers(t,o){return this.electron.invoke(ee.SYNC.TRANSFER_LOGS,"get",t||null,o)}deleteTransfers(t){return this.electron.invoke(ee.SYNC.TRANSFER_LOGS,"delete",t||null)}translateServerPath(t){let o=Mn(t).split("/");return o.length?(o[0]=o[0]===O.PERSONAL?this.layout.translateString(Re.PERSONAL_FILES):this.layout.translateString(K4(o[0])),o.join("/")):""}addFileToRemotePath(t){this.wizard.remotePath=new et({id:t.id,name:t.name,path:t.path,isDir:t.isDir,mime:t.mime,mimeUrl:t.mimeUrl,enabled:!0,isWriteable:!0,inShare:t.path.split("/")[0]===O.SHARES})}resetWizard(){this.wizard={localPath:null,remotePath:null,settings:{enabled:!0,name:"",mode:be.BOTH,conflictMode:pt.RECENT,diffMode:Li.FAST,scheduler:{unit:"minute",value:15}}}}};n.\u0275fac=function(o){return new(o||n)},n.\u0275prov=D1({token:n,factory:n.\u0275fac,providedIn:"root"});let i=n;return i})();var nc=(i,n)=>({"pull-left":i,"float-left":n}),oc=(i,n)=>({"pull-right":i,"float-right":n}),wn=(i,n)=>({disabled:i,currentPage:n}),ac=(i,n,e)=>({disabled:i,$implicit:n,currentPage:e});function rc(i,n){if(i&1){let e=b();s(0,"li",11)(1,"a",12),_("click",function(o){S(e);let a=c();return g(a.selectPage(1,o))}),N1(2,13),l()()}if(i&2){let e=c(),t=C1(13);U("disabled",e.noPrevious()||e.disabled),r(2),d("ngTemplateOutlet",e.customFirstTemplate||t)("ngTemplateOutletContext",de(4,wn,e.noPrevious()||e.disabled,e.page))}}function sc(i,n){if(i&1){let e=b();s(0,"li",14)(1,"a",12),_("click",function(o){S(e);let a=c();return g(a.selectPage(a.page-1,o))}),N1(2,13),l()()}if(i&2){let e=c(),t=C1(11);U("disabled",e.noPrevious()||e.disabled),r(2),d("ngTemplateOutlet",e.customPreviousTemplate||t)("ngTemplateOutletContext",de(4,wn,e.noPrevious()||e.disabled,e.page))}}function lc(i,n){if(i&1){let e=b();s(0,"li",15)(1,"a",12),_("click",function(o){let a=S(e).$implicit,m=c();return g(m.selectPage(a.number,o))}),N1(2,13),l()()}if(i&2){let e=n.$implicit,t=c(),o=C1(7);U("active",e.active)("disabled",t.disabled&&!e.active),r(2),d("ngTemplateOutlet",t.customPageTemplate||o)("ngTemplateOutletContext",e0(6,ac,t.disabled,e,t.page))}}function cc(i,n){if(i&1){let e=b();s(0,"li",16)(1,"a",12),_("click",function(o){S(e);let a=c();return g(a.selectPage(a.page+1,o))}),N1(2,13),l()()}if(i&2){let e=c(),t=C1(9);U("disabled",e.noNext()||e.disabled),r(2),d("ngTemplateOutlet",e.customNextTemplate||t)("ngTemplateOutletContext",de(4,wn,e.noNext()||e.disabled,e.page))}}function mc(i,n){if(i&1){let e=b();s(0,"li",17)(1,"a",12),_("click",function(o){S(e);let a=c();return g(a.selectPage(a.totalPages,o))}),N1(2,13),l()()}if(i&2){let e=c(),t=C1(15);U("disabled",e.noNext()||e.disabled),r(2),d("ngTemplateOutlet",e.customLastTemplate||t)("ngTemplateOutletContext",de(4,wn,e.noNext()||e.disabled,e.page))}}function pc(i,n){if(i&1&&p(0),i&2){let e=n.$implicit;y(e.text)}}function dc(i,n){if(i&1&&p(0),i&2){let e=c();y(e.getText("next"))}}function fc(i,n){if(i&1&&p(0),i&2){let e=c();y(e.getText("previous"))}}function uc(i,n){if(i&1&&p(0),i&2){let e=c();y(e.getText("first"))}}function _c(i,n){if(i&1&&p(0),i&2){let e=c();y(e.getText("last"))}}var Va=(()=>{let n=class n{constructor(){this.main={itemsPerPage:10,boundaryLinks:!1,directionLinks:!0,firstText:"First",previousText:"Previous",nextText:"Next",lastText:"Last",pageBtnClass:"",rotate:!0},this.pager={itemsPerPage:15,previousText:"\xAB Previous",nextText:"Next \xBB",pageBtnClass:"",align:!0}}};n.\u0275fac=function(o){return new(o||n)},n.\u0275prov=D1({token:n,factory:n.\u0275fac,providedIn:"root"});let i=n;return i})(),hc={provide:$n,useExisting:Rn(()=>Cc),multi:!0},Cc=(()=>{let n=class n{constructor(t,o,a){this.elementRef=t,this.changeDetection=a,this.align=!1,this.boundaryLinks=!1,this.directionLinks=!0,this.firstText="First",this.previousText="\xAB Previous",this.nextText="Next \xBB",this.lastText="Last",this.rotate=!0,this.pageBtnClass="",this.disabled=!1,this.numPages=new h1,this.pageChanged=new h1,this.onChange=Function.prototype,this.onTouched=Function.prototype,this.classMap="",this.inited=!1,this._itemsPerPage=15,this._totalItems=0,this._totalPages=0,this._page=1,this.elementRef=t,this.config||this.configureOptions(Object.assign({},o.main,o.pager))}get itemsPerPage(){return this._itemsPerPage}set itemsPerPage(t){this._itemsPerPage=t,this.totalPages=this.calculateTotalPages()}get totalItems(){return this._totalItems}set totalItems(t){this._totalItems=t,this.totalPages=this.calculateTotalPages()}get totalPages(){return this._totalPages}set totalPages(t){this._totalPages=t,this.numPages.emit(t),this.inited&&this.selectPage(this.page)}get page(){return this._page}set page(t){let o=this._page;this._page=t>this.totalPages?this.totalPages:t||1,this.changeDetection.markForCheck(),!(o===this._page||typeof o>"u")&&this.pageChanged.emit({page:this._page,itemsPerPage:this.itemsPerPage})}configureOptions(t){this.config=Object.assign({},t)}ngOnInit(){typeof window<"u"&&(this.classMap=this.elementRef.nativeElement.getAttribute("class")||""),typeof this.maxSize>"u"&&(this.maxSize=this.config?.maxSize||0),typeof this.rotate>"u"&&(this.rotate=!!this.config?.rotate),typeof this.boundaryLinks>"u"&&(this.boundaryLinks=!!this.config?.boundaryLinks),typeof this.directionLinks>"u"&&(this.directionLinks=!!this.config?.directionLinks),typeof this.pageBtnClass>"u"&&(this.pageBtnClass=this.config?.pageBtnClass||""),typeof this.itemsPerPage>"u"&&(this.itemsPerPage=this.config?.itemsPerPage||0),this.totalPages=this.calculateTotalPages(),this.pages=this.getPages(this.page,this.totalPages),this.inited=!0}writeValue(t){this.page=t,this.pages=this.getPages(this.page,this.totalPages)}getText(t){return this[`${t}Text`]||this.config[`${t}Text`]}noPrevious(){return this.page===1}noNext(){return this.page===this.totalPages}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}selectPage(t,o){o&&o.preventDefault(),this.disabled||(o&&o.target&&o.target.blur(),this.writeValue(t),this.onChange(this.page))}makePage(t,o,a){return{text:o,number:t,active:a}}getPages(t,o){let a=[],m=1,f=o,v=typeof this.maxSize<"u"&&this.maxSize<o;v&&this.maxSize&&(this.rotate?(m=Math.max(t-Math.floor(this.maxSize/2),1),f=m+this.maxSize-1,f>o&&(f=o,m=f-this.maxSize+1)):(m=(Math.ceil(t/this.maxSize)-1)*this.maxSize+1,f=Math.min(m+this.maxSize-1,o)));for(let T=m;T<=f;T++){let A=this.makePage(T,T.toString(),T===t);a.push(A)}if(v&&!this.rotate){if(m>1){let T=this.makePage(m-1,"...",!1);a.unshift(T)}if(f<o){let T=this.makePage(f+1,"...",!1);a.push(T)}}return a}calculateTotalPages(){let t=this.itemsPerPage<1?1:Math.ceil(this.totalItems/this.itemsPerPage);return Math.max(t||0,1)}};n.\u0275fac=function(o){return new(o||n)(xt(h2),xt(Va),xt(Un))},n.\u0275cmp=w({type:n,selectors:[["pager"]],inputs:{align:"align",maxSize:"maxSize",boundaryLinks:"boundaryLinks",directionLinks:"directionLinks",firstText:"firstText",previousText:"previousText",nextText:"nextText",lastText:"lastText",rotate:"rotate",pageBtnClass:"pageBtnClass",disabled:"disabled",itemsPerPage:"itemsPerPage",totalItems:"totalItems"},outputs:{numPages:"numPages",pageChanged:"pageChanged"},features:[Bn([hc])],decls:7,vars:22,consts:[[1,"pager"],[3,"ngClass"],["href","",3,"click"]],template:function(o,a){o&1&&(s(0,"ul",0)(1,"li",1)(2,"a",2),_("click",function(f){return a.selectPage(a.page-1,f)}),p(3),l()(),s(4,"li",1)(5,"a",2),_("click",function(f){return a.selectPage(a.page+1,f)}),p(6),l()()()),o&2&&(r(),E(a.pageBtnClass),U("disabled",a.noPrevious())("previous",a.align),d("ngClass",de(16,nc,a.align,a.align)),r(2),y(a.getText("previous")),r(),E(a.pageBtnClass),U("disabled",a.noNext())("next",a.align),d("ngClass",de(19,oc,a.align,a.align)),r(2),y(a.getText("next")))},dependencies:[Hn],encapsulation:2});let i=n;return i})(),Sc={provide:$n,useExisting:Rn(()=>D3),multi:!0},D3=(()=>{let n=class n{constructor(t,o,a){this.elementRef=t,this.changeDetection=a,this.align=!0,this.boundaryLinks=!1,this.directionLinks=!0,this.rotate=!0,this.pageBtnClass="",this.disabled=!1,this.numPages=new h1,this.pageChanged=new h1,this.onChange=Function.prototype,this.onTouched=Function.prototype,this.classMap="",this.inited=!1,this._itemsPerPage=10,this._totalItems=0,this._totalPages=0,this._page=1,this.elementRef=t,this.config||this.configureOptions(o.main)}get itemsPerPage(){return this._itemsPerPage}set itemsPerPage(t){this._itemsPerPage=t,this.totalPages=this.calculateTotalPages()}get totalItems(){return this._totalItems}set totalItems(t){this._totalItems=t,this.totalPages=this.calculateTotalPages()}get totalPages(){return this._totalPages}set totalPages(t){this._totalPages=t,this.numPages.emit(t),this.inited&&this.selectPage(this.page)}get page(){return this._page}set page(t){let o=this._page;this._page=t>this.totalPages?this.totalPages:t||1,this.changeDetection.markForCheck(),!(o===this._page||typeof o>"u")&&this.pageChanged.emit({page:this._page,itemsPerPage:this.itemsPerPage})}configureOptions(t){this.config=Object.assign({},t)}ngOnInit(){typeof window<"u"&&(this.classMap=this.elementRef.nativeElement.getAttribute("class")||""),typeof this.maxSize>"u"&&(this.maxSize=this.config?.maxSize||0),typeof this.rotate>"u"&&(this.rotate=!!this.config?.rotate),typeof this.boundaryLinks>"u"&&(this.boundaryLinks=!!this.config?.boundaryLinks),typeof this.directionLinks>"u"&&(this.directionLinks=!!this.config?.directionLinks),typeof this.pageBtnClass>"u"&&(this.pageBtnClass=this.config?.pageBtnClass||""),typeof this.itemsPerPage>"u"&&(this.itemsPerPage=this.config?.itemsPerPage||0),this.totalPages=this.calculateTotalPages(),this.pages=this.getPages(this.page,this.totalPages),this.inited=!0}writeValue(t){this.page=t,this.pages=this.getPages(this.page,this.totalPages)}getText(t){return this[`${t}Text`]||this.config[`${t}Text`]}noPrevious(){return this.page===1}noNext(){return this.page===this.totalPages}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}selectPage(t,o){o&&o.preventDefault(),this.disabled||(o&&o.target&&o.target.blur(),this.writeValue(t),this.onChange(this.page))}makePage(t,o,a){return{text:o,number:t,active:a}}getPages(t,o){let a=[],m=1,f=o,v=typeof this.maxSize<"u"&&this.maxSize<o;v&&this.maxSize&&(this.rotate?(m=Math.max(t-Math.floor(this.maxSize/2),1),f=m+this.maxSize-1,f>o&&(f=o,m=f-this.maxSize+1)):(m=(Math.ceil(t/this.maxSize)-1)*this.maxSize+1,f=Math.min(m+this.maxSize-1,o)));for(let T=m;T<=f;T++){let A=this.makePage(T,T.toString(),T===t);a.push(A)}if(v&&!this.rotate){if(m>1){let T=this.makePage(m-1,"...",!1);a.unshift(T)}if(f<o){let T=this.makePage(f+1,"...",!1);a.push(T)}}return a}calculateTotalPages(){let t=this.itemsPerPage<1?1:Math.ceil(this.totalItems/this.itemsPerPage);return Math.max(t||0,1)}};n.\u0275fac=function(o){return new(o||n)(xt(h2),xt(Va),xt(Un))},n.\u0275cmp=w({type:n,selectors:[["pagination"]],inputs:{align:"align",maxSize:"maxSize",boundaryLinks:"boundaryLinks",directionLinks:"directionLinks",firstText:"firstText",previousText:"previousText",nextText:"nextText",lastText:"lastText",rotate:"rotate",pageBtnClass:"pageBtnClass",disabled:"disabled",customPageTemplate:"customPageTemplate",customNextTemplate:"customNextTemplate",customPreviousTemplate:"customPreviousTemplate",customFirstTemplate:"customFirstTemplate",customLastTemplate:"customLastTemplate",itemsPerPage:"itemsPerPage",totalItems:"totalItems"},outputs:{numPages:"numPages",pageChanged:"pageChanged"},features:[Bn([Sc])],decls:16,vars:6,consts:[["defaultPageTemplate",""],["defaultNextTemplate",""],["defaultPreviousTemplate",""],["defaultFirstTemplate",""],["defaultLastTemplate",""],[1,"pagination",3,"ngClass"],["class","pagination-first page-item",3,"disabled",4,"ngIf"],["class","pagination-prev page-item",3,"disabled",4,"ngIf"],["class","pagination-page page-item",3,"active","disabled",4,"ngFor","ngForOf"],["class","pagination-next page-item",3,"disabled",4,"ngIf"],["class","pagination-last page-item",3,"disabled",4,"ngIf"],[1,"pagination-first","page-item"],["href","",1,"page-link",3,"click"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"pagination-prev","page-item"],[1,"pagination-page","page-item"],[1,"pagination-next","page-item"],[1,"pagination-last","page-item"]],template:function(o,a){o&1&&(s(0,"ul",5),V(1,rc,3,7,"li",6)(2,sc,3,7,"li",7)(3,lc,3,10,"li",8)(4,cc,3,7,"li",9)(5,mc,3,7,"li",10),l(),V(6,pc,1,1,"ng-template",null,0,se)(8,dc,1,1,"ng-template",null,1,se)(10,fc,1,1,"ng-template",null,2,se)(12,uc,1,1,"ng-template",null,3,se)(14,_c,1,1,"ng-template",null,4,se)),o&2&&(d("ngClass",a.classMap),r(),d("ngIf",a.boundaryLinks),r(),d("ngIf",a.directionLinks),r(),d("ngForOf",a.pages),r(),d("ngIf",a.directionLinks),r(),d("ngIf",a.boundaryLinks))},dependencies:[Hn,a0,Vt,o0],encapsulation:2});let i=n;return i})();var Ba=(()=>{let n=class n{transform(t,o=1,a){if(!t?.length)return[];let m=(o-1)*a;return t.slice(m,m+a)}};n.\u0275fac=function(o){return new(o||n)},n.\u0275pipe=Z3({name:"paginate",type:n,pure:!0});let i=n;return i})();var Dt=(function(i){return i.LOCAL="local",i.REMOTE="remote",i})(Dt||{}),Pn={[Dt.LOCAL]:"circle-purple-icon-sm",[Dt.REMOTE]:"circle-primary-icon-sm"},An={[Dt.LOCAL]:Se,[Dt.REMOTE]:Ce},L2={NEW:"Added",DIFF:"Modified",RM:"Removed",RMDIR:"Removed",MOVE:"Moved",COPY:"Copied",MKDIR:"Added",MKFILE:"Added",FILTERED:"Filtered",ERROR:"Error"},Ua={Added:De,Modified:l4,Removed:vi,Moved:v4,Copied:zi,Filtered:ii,Error:_4};var p2=class{constructor(n){this.selected=!1,this.hovered=!1,this.isFiltered=!1,this.newly=0,Object.assign(this,n),this.sideIcon=An[this.side],this.sideIconClass=Pn[this.side],this.actionText=L2[this.action],this.actionIcon=Ua[this.actionText],this.isFiltered=this.actionText===L2.FILTERED,this.mimeUrl=O1(this.mime),this.timestamp&&(this.hTimeAgo=(0,bt.default)(this.timestamp).fromNow(!0),this.timestamp=(0,bt.default)(this.timestamp).format("YYYY-MM-DD HH:mm:ss"),this.newly=Et(this.timestamp))}fallBackMimeUrl(){this.mimeUrl=$i}};var gc=i=>({nb:i}),xc=(i,n)=>n.nbTasks,Ha=(i,n)=>n.key;function vc(i,n){if(i&1&&u(0,"fa-icon",12),i&2){let e=c();d("icon",e.icons.faSpinner)}}function yc(i,n){if(i&1&&(s(0,"span",13),p(1),z(2,"translate"),l()),i&2){let e=c();r(),y(re(2,1,"nb_actions",e.locale.language,H1(5,gc,e.count.actions)))}}function bc(i,n){if(i&1){let e=b();s(0,"button",27),z(1,"translate"),p1("ngModelChange",function(o){S(e);let a=c();return m1(a.showFiltered,o)||(a.showFiltered=o),g(o)}),u(2,"fa-icon",2),s(3,"span"),p(4),l()()}if(i&2){let e=c();c1("ngModel",e.showFiltered),d("tooltip",M(1,4,"Show filtered files",e.locale.language)),r(2),d("icon",e.icons.faFilter),r(2),y(e.count.filtered)}}function Tc(i,n){if(i&1){let e=b();s(0,"li",29)(1,"a",30),_("click",function(){S(e);let o=c(2);return g(o.goToPath(!1))}),s(2,"span",31),u(3,"fa-icon",2),s(4,"span",3),p(5,"Server"),l()()()()}if(i&2){let e=c(2);r(3),d("icon",e.icons.SERVER)}}function zc(i,n){if(i&1){let e=b();s(0,"ul",28)(1,"li",29)(2,"a",30),_("click",function(){S(e);let o=c();return g(o.goToPath())}),s(3,"span",31),u(4,"fa-icon",2),s(5,"span",3),p(6,"Client"),l()()()(),h(7,Tc,6,1,"li",29),l()}if(i&2){let e=c();r(4),d("icon",e.icons.CLIENT),r(3),C(e.transferSelected.action!==e.SYNC_TRANSFER_ACTION.FILTERED?7:-1)}}function Mc(i,n){i&1&&(s(0,"div",21),p(1,"No differences"),l())}function Ec(i,n){if(i&1&&u(0,"fa-icon",2),i&2){let e=c(4);d("icon",e.sortTable.sortParam.asc?e.icons.faArrowDown:e.icons.faArrowUp)}}function wc(i,n){if(i&1){let e=b();s(0,"th",33),_("click",function(){S(e);let o=c().$implicit,a=c(2);return g(a.sortBy(o.key))}),p(1),h(2,Ec,1,1,"fa-icon",2),l()}if(i&2){let e=c().$implicit,t=c(2);E(e.value.class),n1("width",e.value.width,"%"),U("text-align-center",e.value.textCenter)("cursor-pointer",e.value.sortable),r(),k(" ",e.value.label," "),r(),C(t.sortTable.sortParam.column===e.key?2:-1)}}function Pc(i,n){if(i&1&&h(0,wc,3,10,"th",32),i&2){let e=n.$implicit;C(e.value.show?0:-1)}}function Ac(i,n){if(i&1&&(s(0,"table",22)(1,"thead")(2,"tr"),F(3,Pc,1,1,null,null,Ha),z(5,"keyvalue"),l()()()),i&2){let e=c();r(3),R(M(5,0,e.tableHeaders,e.originalOrderKeyValue))}}function Nc(i,n){if(i&1&&(s(0,"span",37),u(1,"fa-icon",2)(2,"fa-icon",39),s(3,"span",40),p(4),l()()),i&2){let e=c(4).$implicit;r(),E(e.sideIconClass),d("icon",e.sideIcon),r(),d("icon",e.actionIcon),r(2),y(e.actionText)}}function Lc(i,n){if(i&1&&(s(0,"span"),p(1),l(),s(2,"span")(3,"b",31),p(4,"Source"),l(),p(5),l()),i&2){let e=c(5).$implicit;E(e.selected?"overflow-wrap-and-whitespace":"truncate"),r(),y(e.fileDst),r(),E(I("",e.selected?"overflow-wrap-and-whitespace":"truncate"," fs-xxxs")),r(3),k(":\xA0",e.file)}}function kc(i,n){if(i&1&&(s(0,"span"),p(1),l()),i&2){let e=c(5).$implicit;E(e.selected?"overflow-wrap-and-whitespace":"truncate"),r(),y(e.file)}}function Dc(i,n){if(i&1){let e=b();s(0,"div",38)(1,"img",41),_("error",function(){S(e);let o=c(4).$implicit;return g(o.fallBackMimeUrl())}),l(),s(2,"span",42),h(3,Lc,6,7)(4,kc,2,3,"span",43),l()()}if(i&2){let e=c(4).$implicit;r(),d("src",e.mimeUrl,X),r(2),C(e.fileDst?3:4)}}function Fc(i,n){if(i&1&&(s(0,"td"),h(1,Nc,5,5,"span",37)(2,Dc,5,2,"div",38),l()),i&2){let e,t=c().$implicit;E(t.value.class),n1("width",t.value.width,"%"),U("text-align-center",t.value.textCenter),r(),C((e=t.key)==="action"?1:e==="file"?2:-1)}}function Rc(i,n){if(i&1&&h(0,Fc,3,7,"td",36),i&2){let e=n.$implicit;C(e.value.show?0:-1)}}function Ic(i,n){if(i&1){let e=b();s(0,"tr",35),_("click",function(){S(e);let o=c().$implicit,a=c();return g(a.onSelect(o))}),F(1,Rc,1,1,null,null,Ha),z(3,"keyvalue"),l()}if(i&2){let e=c().$implicit,t=c();U("selected",t.transferSelected&&t.transferSelected.nbTasks===e.nbTasks),r(),R(M(3,2,t.tableHeaders,t.originalOrderKeyValue))}}function Oc(i,n){if(i&1&&h(0,Ic,4,5,"tr",34),i&2){let e=n.$implicit,t=c();C(!e.isFiltered||t.showFiltered&&e.isFiltered?0:-1)}}var $a=(()=>{let n=class n{constructor(){this.locale=x(K),this.originalOrderKeyValue=J1,this.SYNC_TRANSFER_ACTION=L2,this.icons={faArrowDown:Se,faArrowUp:Ce,faStop:ri,faFlask:fi,faSpinner:Z1,faRotate:he,faMapMarkerAlt:qt,faFilter:ii,CLIENT:v1.CLIENT,SERVER:v1.SERVER},this.tableHeaders={action:{label:"Action",width:16,textCenter:!1,class:"",show:!0,sortable:!0},file:{label:"File",width:84,textCenter:!1,class:"",show:!0,sortable:!0}},this.itemsPerPage=500,this.currentPage=1,this.running=!1,this.hasNoChanges=!1,this.transferSelected=null,this.showFiltered=!1,this.count={actions:0,filtered:0},this.transfers=U2([]),this.layout=x(L),this.electron=x(Di),this.store=x(q),this.syncService=x(b1),this.sortSettings={default:[{prop:"nbTasks",type:"number"}],action:[{prop:"actionText",type:"string"}],file:[{prop:"file",type:"string"}]},this.sortTable=new Oe(this.constructor.name,this.sortSettings),this.subscriptions=[]}ngOnInit(){this.electron.ipcRenderer.on(ee.SYNC.REPORT_TRANSFER,(t,o)=>this.addTransfer(o)),this.subscriptions.push(this.store.clientSyncIsReporting.subscribe(t=>this.manageState(t)))}ngOnDestroy(){for(let t of this.subscriptions)t.unsubscribe();this.electron.ipcRenderer.removeAllListeners(ee.SYNC.REPORT_TRANSFER)}manageReport(t=!1){t&&(this.hasNoChanges=!1,this.count={actions:0,filtered:0},this.transfers.set([])),this.syncService.doSync(t,[this.syncPath.id],!0)}sortBy(t,o=!0,a){this.transfers.set(this.sortTable.sortBy(t,o,a||this.transfers()))}onSelect(t){this.transferSelected=t||null}goToPath(t=!0){this.syncService.goToPath(this.syncPath,t,this.transferSelected.file)}pageChanged(){this.onSelect(),this.autoResizeDirective.scrollTop()}onClose(){this.running&&this.syncService.doSync(!1,[this.syncPath.id],!0),this.layout.closeDialog(null,this.syncPath.id)}onMinimize(){this.layout.minimizeDialog(this.syncPath.id,{name:this.syncPath.settings.name,mimeUrl:this.syncPath.mimeUrl})}addTransfer(t){let o=new p2(t);o.isFiltered?this.count.filtered++:this.count.actions++,this.transfers.update(a=>[...a,o])}manageState(t){this.running&&t===!1&&this.transfers().length===0&&(this.hasNoChanges=!0),this.running=t}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=w({type:n,selectors:[["app-sync-folder-report-dialog"]],viewQuery:function(o,a){if(o&1&&(r1(t1,7),r1(F1,7)),o&2){let m;s1(m=l1())&&(a.autoResizeDirective=m.first),s1(m=l1())&&(a.inputFilter=m.first)}},inputs:{syncPath:"syncPath"},decls:37,vars:27,consts:[[1,"modal-header"],[1,"modal-title"],[3,"icon"],[1,"ms-2"],["aria-label","Minimize","type","button",1,"btn-minimize","btn-minimize-white",3,"click"],["aria-label","Close","type","button",1,"btn-close","btn-close-white","ms-3",3,"click"],[1,"modal-body","p-0"],[1,"app-top-menu","bg-theme-alt"],["type","button",1,"btn","btn-sm","btn-secondary","ms-1",3,"click"],[1,"d-flex","align-items-center"],["l10nTranslate","",1,"ms-1"],[1,"ms-auto"],["animation","spin",1,"me-2",3,"icon"],[1,"fs-xxs"],[1,"d-flex","align-items-center","ms-auto"],["placement","top","role","button","type","button","btnCheckbox","",1,"btn","btn-sm","btn-outline-secondary","me-1",3,"ngModel","tooltip"],[3,"tooltip"],["dropdown","",1,"btn-group","btn-group-sm","me-1",3,"isDisabled"],["dropdownToggle","","type","button",1,"btn","btn-sm","btn-secondary","dropdown-toggle"],["class","dropdown-menu","role","menu",4,"dropdownMenu"],[1,"d-none","d-sm-block"],["l10nTranslate","",1,"p-2"],[1,"app-table"],["appAutoResize","",3,"resizeOffset","useMaxHeight"],["tabindex","-1"],[1,"modal-footer","justify-content-center","align-items-center","fs-sm"],["previousText","\u2039","nextText","\u203A","firstText","\xAB","lastText","\xBB",1,"pagination","pagination-sm",2,"margin-bottom","-.6rem",3,"pageChanged","ngModelChange","ngModel","boundaryLinks","itemsPerPage","maxSize","totalItems"],["placement","top","role","button","type","button","btnCheckbox","",1,"btn","btn-sm","btn-outline-secondary","me-1",3,"ngModelChange","ngModel","tooltip"],["role","menu",1,"dropdown-menu"],["role","menuitem"],[1,"dropdown-item",3,"click"],["l10nTranslate",""],["l10nTranslate","",3,"width","text-align-center","cursor-pointer","class"],["l10nTranslate","",3,"click"],[3,"selected"],[3,"click"],[3,"width","text-align-center","class"],[1,"d-flex","align-items-center",2,"font-size","14px"],[1,"d-flex","align-items-center","fs-xxs"],["size","sm",1,"circle-gray-icon-sm",3,"icon"],["l10nTranslate","",1,"fs-xxxs"],["alt","","width","24",1,"me-2",3,"error","src"],[1,"d-flex","flex-column","fs-xxs"],[3,"class"]],template:function(o,a){o&1&&(s(0,"div",0)(1,"h4",1),u(2,"fa-icon",2),s(3,"span",3),p(4),l()(),s(5,"button",4),_("click",function(){return a.onMinimize()}),l(),s(6,"button",5),_("click",function(){return a.onClose()}),l()(),s(7,"div",6)(8,"div",7)(9,"button",8),_("click",function(){return a.manageReport(!a.running)}),s(10,"div",9),u(11,"fa-icon",2),s(12,"span",10),p(13,"Simulate"),l()()(),s(14,"div",11),h(15,vc,1,1,"fa-icon",12),h(16,yc,3,7,"span",13),l(),s(17,"div",14),h(18,bc,5,7,"button",15),s(19,"div",16),z(20,"translate"),s(21,"div",17)(22,"button",18),u(23,"fa-icon",2),l(),V(24,zc,8,2,"ul",19),l()()(),u(25,"app-input-filter",20),l(),h(26,Mc,2,0,"div",21)(27,Ac,6,3,"table",22),s(28,"div",23)(29,"table",22)(30,"tbody",24),F(31,Oc,1,1,null,null,xc),z(33,"searchFilter"),z(34,"paginate"),l()()()(),s(35,"div",25)(36,"pagination",26),_("pageChanged",function(){return a.pageChanged()}),p1("ngModelChange",function(f){return m1(a.currentPage,f)||(a.currentPage=f),f}),l()()),o&2&&(r(2),d("icon",a.icons.faRotate),r(2),y(a.syncPath.settings.name),r(7),d("icon",a.running?a.icons.faStop:a.icons.faFlask),r(4),C(a.running?15:-1),r(),C(a.transfers().length?16:-1),r(2),C(a.count.filtered?18:-1),r(),d("tooltip",M(20,17,"Go to",a.locale.language)),r(2),d("isDisabled",!a.transferSelected),r(2),d("icon",a.icons.faMapMarkerAlt),r(3),C(a.hasNoChanges?26:27),r(2),d("resizeOffset",225)("useMaxHeight",!1),r(3),R(re(34,23,M(33,20,a.transfers(),a.inputFilter.search()),a.currentPage,a.itemsPerPage)),r(5),c1("ngModel",a.currentPage),d("boundaryLinks",!0)("itemsPerPage",a.itemsPerPage)("maxSize",20)("totalItems",a.transfers().length))},dependencies:[N,D,z1,Be,He,Ue,t1,D3,x1,_1,g1,F1,Fi,Z,Q1,Ba,Ie],encapsulation:2});let i=n;return i})();var d2=(function(i){return i.FILE="openFile",i.DIRECTORY="openDirectory",i.CREATE_DIRECTORY="createDirectory",i})(d2||{});function Vc(i,n){if(i&1&&u(0,"fa-icon",1),i&2){let e=c(2);d("icon",e.icons.faLongArrowAltDown)("fixedWidth",e.syncPath.settings.mode!==e.SYNC_PATH_MODE.BOTH)}}function Bc(i,n){if(i&1&&u(0,"fa-icon",3),i&2){let e=c(2);E(e.SYNC_TRANSFER_SIDE_CLASS[e.SYNC_TRANSFER_SIDE.LOCAL]),d("icon",e.SYNC_TRANSFER_SIDE_ICON[e.SYNC_TRANSFER_SIDE.LOCAL])}}function Uc(i,n){if(i&1&&h(0,Vc,1,2,"fa-icon",1)(1,Bc,1,3,"fa-icon",2),i&2){let e=c();C(e.small?0:1)}}function Hc(i,n){if(i&1&&u(0,"fa-icon",1),i&2){let e=c(2);d("icon",e.icons.faLongArrowAltUp)("fixedWidth",e.syncPath.settings.mode!==e.SYNC_PATH_MODE.BOTH)}}function $c(i,n){if(i&1&&u(0,"fa-icon",3),i&2){let e=c(2);E(e.SYNC_TRANSFER_SIDE_CLASS[e.SYNC_TRANSFER_SIDE.REMOTE]),U("ms-1",e.syncPath.settings.mode===e.SYNC_PATH_MODE.BOTH),d("icon",e.SYNC_TRANSFER_SIDE_ICON[e.SYNC_TRANSFER_SIDE.REMOTE])}}function Gc(i,n){if(i&1&&h(0,Hc,1,2,"fa-icon",1)(1,$c,1,5,"fa-icon",4),i&2){let e=c();C(e.small?0:1)}}var f2=(()=>{let n=class n{constructor(){this.small=!1,this.SYNC_PATH_MODE=be,this.SYNC_TRANSFER_SIDE_ICON=An,this.icons={faLongArrowAltDown:Mi,faLongArrowAltUp:ui},this.SYNC_TRANSFER_SIDE=Dt,this.SYNC_TRANSFER_SIDE_CLASS=Pn}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=w({type:n,selectors:[["app-sync-path-direction-icon"]],inputs:{syncPath:"syncPath",small:"small"},decls:3,vars:2,consts:[[1,"d-flex","justify-content-center"],[3,"icon","fixedWidth"],[3,"icon","class"],[3,"icon"],[3,"icon","ms-1","class"]],template:function(o,a){o&1&&(s(0,"span",0),h(1,Uc,2,1),h(2,Gc,2,1),l()),o&2&&(r(),C(a.syncPath.settings.mode===a.SYNC_PATH_MODE.DOWNLOAD||a.syncPath.settings.mode===a.SYNC_PATH_MODE.BOTH?1:-1),r(),C(a.syncPath.settings.mode===a.SYNC_PATH_MODE.UPLOAD||a.syncPath.settings.mode===a.SYNC_PATH_MODE.BOTH?2:-1))},dependencies:[N],encapsulation:2});let i=n;return i})();function Wc(i,n){if(i&1&&(s(0,"div")(1,"div"),u(2,"fa-icon",0),s(3,"span",1),p(4,"Client"),l()(),s(5,"div",10)(6,"span",11),p(7),l()()(),s(8,"div")(9,"div"),u(10,"fa-icon",0),s(11,"span",1),p(12,"Server"),l()(),s(13,"div",10)(14,"span",11)(15,"div",12),u(16,"fa-icon",13),p(17),l()()()()),i&2){let e=c();E(I("d-flex justify-content-",e.direction," align-items-center mb-2")),r(),E(I("col-",e.colSize[e.size][0])),r(),d("icon",e.icons.CLIENT),r(5),y(e.syncPath.settings.localPath),r(),E(I("d-flex justify-content-",e.direction," align-items-center mb-2")),r(),E(I("col-",e.colSize[e.size][0])),r(),d("icon",e.icons.SERVER),r(6),d("icon",e.syncPath.icon),r(),k(" ",e.syncPath.showedPath," ")}}function qc(i,n){if(i&1&&(s(0,"span",4),u(1,"fa-icon",14),z(2,"translate"),l()),i&2){let e=c();r(),d("icon",e.icons.faExclamationCircle)("tooltip",M(2,2,"You must have permission to modify the server folder to choose a different sync mode",e.locale.language))}}var Nn=(()=>{let n=class n{constructor(){this.direction="center",this.showPaths=!1,this.size="small",this.locale=x(K),this.icons={CLIENT:v1.CLIENT,SERVER:v1.SERVER,faExclamationCircle:h4,faLongArrowAltDown:Mi,faLongArrowAltUp:ui,faGauge:Q0,faClock:ci,faRotate:he,faEdit:li,faBug:L4},this.colSize={small:[2,5],large:[3,6]},this.SYNC_PATH_CONFLICT_MODE=pt,this.SYNC_PATH_MODE=be,this.SYNC_PATH_DIFF_MODE=Li,this.SYNC_PATH_SCHEDULER_UNIT=ki}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=w({type:n,selectors:[["app-sync-path-settings"]],inputs:{syncPath:"syncPath",direction:"direction",showPaths:"showPaths",size:"size"},decls:74,vars:102,consts:[[3,"icon"],["l10nTranslate","",1,"ms-2"],["type","text",3,"ngModelChange","ngModel"],[3,"syncPath","small"],[1,"ms-2","fs-lg","cursor-pointer"],[1,"form-select","form-select-sm",3,"ngModelChange","ngModel"],["l10nTranslate","",3,"disabled","ngValue"],["l10nTranslate","",3,"ngValue"],[1,"form-select","form-select-sm",3,"ngModelChange","ngModel","disabled"],["min","1","type","number",1,"form-control","form-select-sm","pe-1","me-2",2,"width","70px",3,"ngModelChange","ngModel","disabled"],[1,"col-8"],[1,"form-control-sm","form-control-plaintext"],[1,"d-flex","align-items-center"],[1,"me-1",3,"icon"],[1,"text-warning",3,"icon","tooltip"]],template:function(o,a){o&1&&(s(0,"div"),h(1,Wc,18,17),s(2,"div")(3,"div"),u(4,"fa-icon",0),s(5,"span",1),p(6,"Name"),l()(),s(7,"div")(8,"input",2),p1("ngModelChange",function(f){return m1(a.syncPath.settings.name,f)||(a.syncPath.settings.name=f),f}),l()()(),s(9,"div")(10,"div"),u(11,"app-sync-path-direction-icon",3),s(12,"span",1),p(13,"Direction"),l(),h(14,qc,3,5,"span",4),l(),s(15,"div")(16,"select",5),p1("ngModelChange",function(f){return m1(a.syncPath.settings.mode,f)||(a.syncPath.settings.mode=f),f}),s(17,"option",6),p(18,"upload only"),l(),s(19,"option",7),p(20,"download only"),l(),s(21,"option",6),p(22,"both"),l()()()(),s(23,"div")(24,"div"),u(25,"fa-icon",0),s(26,"span",1),p(27,"Conflict"),l()(),s(28,"div")(29,"select",8),p1("ngModelChange",function(f){return m1(a.syncPath.settings.conflictMode,f)||(a.syncPath.settings.conflictMode=f),f}),s(30,"option",7),p(31,"the client\u2019s files take precedence"),l(),s(32,"option",7),p(33,"the server\u2019s files take precedence"),l(),s(34,"option",7),p(35,"the most recent files will be kept"),l()()()(),s(36,"div")(37,"div"),u(38,"fa-icon",0),s(39,"span",1),p(40,"Mode"),l()(),s(41,"div")(42,"select",5),p1("ngModelChange",function(f){return m1(a.syncPath.settings.diffMode,f)||(a.syncPath.settings.diffMode=f),f}),s(43,"option",7),p(44),l(),s(45,"option",7),p(46),l()()()(),s(47,"div")(48,"div"),u(49,"fa-icon",0),s(50,"span",1),p(51,"Scheduler"),l()(),s(52,"div")(53,"input",9),p1("ngModelChange",function(f){return m1(a.syncPath.settings.scheduler.value,f)||(a.syncPath.settings.scheduler.value=f),f}),l(),s(54,"select",5),p1("ngModelChange",function(f){return m1(a.syncPath.settings.scheduler.unit,f)||(a.syncPath.settings.scheduler.unit=f),f}),s(55,"option",7),p(56),l(),s(57,"option",7),p(58),l(),s(59,"option",7),p(60),l(),s(61,"option",7),p(62),l()()()(),s(63,"div")(64,"div"),u(65,"fa-icon",0),s(66,"span",1),p(67,"Status"),l()(),s(68,"div")(69,"select",5),p1("ngModelChange",function(f){return m1(a.syncPath.settings.enabled,f)||(a.syncPath.settings.enabled=f),f}),s(70,"option",7),p(71,"enabled"),l(),s(72,"option",7),p(73,"disabled"),l()()()()()),o&2&&(E(I("d-flex flex-column justify-content-",a.direction)),r(),C(a.showPaths?1:-1),r(),E(I("d-flex justify-content-",a.direction," align-items-center mb-2")),r(),E(I("col-",a.colSize[a.size][0])),r(),d("icon",a.icons.faEdit),r(3),E(I("col-",a.colSize[a.size][1])),r(),E(I("form-control form-select-sm ",a.syncPath.settings.name?"":"is-invalid")),c1("ngModel",a.syncPath.settings.name),r(),E(I("d-flex justify-content-",a.direction," align-items-center mb-2")),r(),E(I("d-flex align-items-center col-",a.colSize[a.size][0])),r(),d("syncPath",a.syncPath)("small",!0),r(3),C(a.syncPath.isWriteable?-1:14),r(),E(I("col-",a.colSize[a.size][1])),r(),c1("ngModel",a.syncPath.settings.mode),r(),d("disabled",!a.syncPath.isWriteable)("ngValue",a.SYNC_PATH_MODE.UPLOAD),r(2),d("ngValue",a.SYNC_PATH_MODE.DOWNLOAD),r(2),d("disabled",!a.syncPath.isWriteable)("ngValue",a.SYNC_PATH_MODE.BOTH),r(2),E(I("d-flex justify-content-",a.direction," align-items-center mb-2")),r(),E(I("col-",a.colSize[a.size][0])),r(),d("icon",a.icons.faBug),r(3),E(I("col-",a.colSize[a.size][1])),r(),c1("ngModel",a.syncPath.settings.conflictMode),d("disabled",a.syncPath.settings.mode!=="both"),r(),d("ngValue",a.SYNC_PATH_CONFLICT_MODE.LOCAL),r(2),d("ngValue",a.SYNC_PATH_CONFLICT_MODE.REMOTE),r(2),d("ngValue",a.SYNC_PATH_CONFLICT_MODE.RECENT),r(2),E(I("d-flex justify-content-",a.direction," align-items-center mb-2")),r(),E(I("col-",a.colSize[a.size][0])),r(),d("icon",a.icons.faGauge),r(3),E(I("col-",a.colSize[a.size][1])),r(),c1("ngModel",a.syncPath.settings.diffMode),r(),d("ngValue",a.SYNC_PATH_DIFF_MODE.FAST),r(),y(a.SYNC_PATH_DIFF_MODE.FAST),r(),d("ngValue",a.SYNC_PATH_DIFF_MODE.SECURE),r(),y(a.SYNC_PATH_DIFF_MODE.SECURE),r(),E(I("d-flex justify-content-",a.direction," align-items-center mb-2")),r(),E(I("col-",a.colSize[a.size][0])),r(),d("icon",a.icons.faClock),r(3),E(I("d-flex flex-row col-",a.colSize[a.size][1])),r(),c1("ngModel",a.syncPath.settings.scheduler.value),d("disabled",a.syncPath.settings.scheduler.unit===a.SYNC_PATH_SCHEDULER_UNIT.DISABLED),r(),c1("ngModel",a.syncPath.settings.scheduler.unit),r(),d("ngValue",a.SYNC_PATH_SCHEDULER_UNIT.DISABLED),r(),y(a.SYNC_PATH_SCHEDULER_UNIT.DISABLED),r(),d("ngValue",a.SYNC_PATH_SCHEDULER_UNIT.MINUTE),r(),k("",a.SYNC_PATH_SCHEDULER_UNIT.MINUTE,"s"),r(),d("ngValue",a.SYNC_PATH_SCHEDULER_UNIT.HOUR),r(),k("",a.SYNC_PATH_SCHEDULER_UNIT.HOUR,"s"),r(),d("ngValue",a.SYNC_PATH_SCHEDULER_UNIT.DAY),r(),k("",a.SYNC_PATH_SCHEDULER_UNIT.DAY,"s"),r(),E(I("d-flex justify-content-",a.direction," align-items-center")),r(),E(I("col-",a.colSize[a.size][0])),r(),d("icon",a.icons.faRotate),r(3),E(I("col-",a.colSize[a.size][1])),r(),U("text-danger",!a.syncPath.settings.enabled),c1("ngModel",a.syncPath.settings.enabled),r(),d("ngValue",!0),r(2),d("ngValue",!1))},dependencies:[D,N,x1,ue,_e,X1,y0,fe,_1,z0,g1,z1,f2,Z],encapsulation:2});let i=n;return i})();function Yc(i,n){if(i&1&&(s(0,"option",13),p(1,"Select a file"),l(),s(2,"option",13),p(3,"Select a folder"),l()),i&2){let e=c();d("value",e.SYNC_PATH_FILTER_TYPE.FILE),r(2),d("value",e.SYNC_PATH_FILTER_TYPE.FOLDER)}}function jc(i,n){if(i&1){let e=b();s(0,"button",24),_("click",function(){S(e);let o=c();return g(o.onSelect())}),p(1,"Browse"),l()}}function Kc(i,n){if(i&1){let e=b();s(0,"button",24),_("click",function(){S(e);let o=c();return g(o.onSelect(o.ELECTRON_DIALOG.DIRECTORY))}),p(1,"Browse"),l()}}function Qc(i,n){if(i&1){let e=b();s(0,"div",18)(1,"input",25),p1("ngModelChange",function(o){let a=S(e).$index,m=c();return m1(m.syncPath.settings.filters[a],o)||(m.syncPath.settings.filters[a]=o),g(o)}),l(),s(2,"button",26),_("click",function(){let o=S(e).$index,a=c();return g(a.onRemoveFilter(o))}),u(3,"fa-icon",2),l()()}if(i&2){let e=n.$index,t=c();r(),c1("ngModel",t.syncPath.settings.filters[e]),r(2),d("icon",t.icons.faTimes)}}function Xc(i,n){if(i&1){let e=b();s(0,"button",27),_("click",function(){S(e);let o=c();return g(o.onFlush())}),p(1,"Reset"),l()}}var Ln=(()=>{let n=class n{constructor(){this.mustRefresh=new h1,this.locale=x(K),this.layout=x(L),this.store=x(q),this.ELECTRON_DIALOG=d2,this.SYNC_PATH_FILTER_TYPE=k3,this.currentFilterType=this.store.isElectronApp()?this.SYNC_PATH_FILTER_TYPE.FILE:this.SYNC_PATH_FILTER_TYPE.START,this.filterTypePlaceholder={[this.SYNC_PATH_FILTER_TYPE.FILE]:"click on the browse button",[this.SYNC_PATH_FILTER_TYPE.FOLDER]:"click on the browse button",[this.SYNC_PATH_FILTER_TYPE.START]:"with a name or pattern",[this.SYNC_PATH_FILTER_TYPE.IN]:"with a name or pattern",[this.SYNC_PATH_FILTER_TYPE.END]:"with the extension ('.mp3', '.avi', '.mov' ...)",[this.SYNC_PATH_FILTER_TYPE.EXPERT]:"[-+]?[0-9]*\\.?[0-9]*"},this.icons={faTimes:ke,faRotate:he},this.confirmDeletion=!1,this.syncService=x(b1)}ngOnInit(){this.syncPath=new Ge(JSON.parse(JSON.stringify(this.syncPathSelected)))}onSubmit(){if(this.confirmDeletion){this.onRemove();return}this.store.isElectronApp()?this.syncService.updatePath(this.syncPath.export(!0)).then(()=>{this.syncService.refreshPaths().catch(console.error),this.layout.closeDialog()}):this.syncService.updateSyncPath(this.syncClientSelected.id,this.syncPath.id,this.syncPath.export()).subscribe({next:()=>{this.mustRefresh.emit(),this.layout.closeDialog()},error:t=>this.layout.sendNotification("error","Unable to update",this.syncPath.settings.name,t)})}onRemove(){this.store.isElectronApp()?this.syncService.removePath(this.syncPath.id).then(()=>{this.syncService.refreshPaths().catch(console.error),this.layout.closeDialog(),this.layout.sendNotification("success","Sync deleted",this.syncPath.settings.name)}).catch(t=>this.layout.sendNotification("error","Unable to delete",this.syncPath.settings.name,t)):this.syncService.deleteSyncPath(this.syncClientSelected.id,this.syncPath.id).subscribe({next:()=>{this.mustRefresh.emit(),this.layout.closeDialog(),this.layout.sendNotification("success","Sync deleted",this.syncPath.settings.name)},error:t=>this.layout.sendNotification("error","Unable to delete",this.syncPath.settings.name,t)})}onFlush(){this.syncService.flushPath(this.syncPath.id).then(()=>{this.layout.sendNotification("success","Sync was reset",this.syncPath.settings.name),this.layout.closeDialog()}).catch(t=>this.layout.sendNotification("error","Unable to reset",this.syncPath.settings.name,t))}onRemoveFilter(t){this.syncPath.settings.filters.splice(t,1)}onSelect(t=this.ELECTRON_DIALOG.FILE){this.syncService.showOpenDialog({properties:[t],defaultPath:this.syncPath.settings.localPath}).then(o=>{o.canceled||o.filePaths[0].startsWith(this.syncPath.settings.localPath)&&(this.currentFilter=o.filePaths[0].replace(this.syncPath.settings.localPath,"").substring(1))})}addFilter(){this.currentFilterType===this.SYNC_PATH_FILTER_TYPE.FILE||this.currentFilterType===this.SYNC_PATH_FILTER_TYPE.FOLDER||this.currentFilterType===this.SYNC_PATH_FILTER_TYPE.EXPERT?this.syncPath.settings.filters.unshift(this.currentFilter):this.currentFilterType===this.SYNC_PATH_FILTER_TYPE.START?this.syncPath.settings.filters.unshift(`^${this.currentFilter}.*`):this.currentFilterType===this.SYNC_PATH_FILTER_TYPE.IN?this.syncPath.settings.filters.unshift(`.*${this.currentFilter}.*`):this.currentFilterType===this.SYNC_PATH_FILTER_TYPE.END&&this.syncPath.settings.filters.unshift(`.*${this.currentFilter}$`),this.currentFilter=null}onCancel(){this.confirmDeletion?this.confirmDeletion=!1:this.layout.closeDialog()}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=w({type:n,selectors:[["app-sync-path-settings-dialog"]],inputs:{syncPathSelected:"syncPathSelected",syncClientSelected:"syncClientSelected"},outputs:{mustRefresh:"mustRefresh"},decls:43,vars:35,consts:[[1,"modal-header"],[1,"modal-title"],[3,"icon"],[1,"ms-2"],["aria-label","Close","type","button",1,"btn-close","btn-close-white",3,"click"],[1,"modal-body"],["type","pills",3,"justified"],[2,"margin-top","8px","margin-bottom","6px"],["customClass","tab-dialog",3,"heading"],["direction","start","size","large",3,"showPaths","syncPath"],[1,"d-flex","align-items-center","mb-2"],[1,"d-flex","flex-row","col-12","px-0"],[1,"form-select","form-select-sm","me-1",3,"ngModelChange","ngModel"],["l10nTranslate","",3,"value"],["type","text",1,"form-control","form-select-sm","me-1",3,"ngModelChange","ngModel","disabled","placeholder"],["l10nTranslate","","type","button",1,"btn","btn-xs","btn-secondary","me-1",3,"click","disabled"],["l10nTranslate","","type","button",1,"btn","btn-xs","btn-secondary"],[1,"my-1"],[1,"d-flex","mb-1"],[1,"modal-footer"],["data-dismiss","modal","type","button","l10nTranslate","",1,"btn","btn-sm","btn-danger","me-2",3,"click","disabled"],["data-dismiss","modal","type","button","l10nTranslate","",1,"btn","btn-sm","btn-warning"],["data-dismiss","modal","type","button","l10nTranslate","",1,"btn","btn-sm","btn-secondary","ms-auto",3,"click"],["type","submit","l10nTranslate","",3,"click","disabled"],["l10nTranslate","","type","button",1,"btn","btn-xs","btn-secondary",3,"click"],["type","text",1,"form-control","form-control-sm","me-1",3,"ngModelChange","ngModel"],["data-dismiss","modal","type","button",1,"btn","btn-xs","btn-danger",3,"click"],["data-dismiss","modal","type","button","l10nTranslate","",1,"btn","btn-sm","btn-warning",3,"click"]],template:function(o,a){o&1&&(s(0,"div",0)(1,"h4",1),u(2,"fa-icon",2),s(3,"span",3),p(4),l()(),s(5,"button",4),_("click",function(){return a.layout.closeDialog()}),l()(),s(6,"div",5)(7,"tabset",6),u(8,"hr",7),s(9,"tab",8),z(10,"translate"),u(11,"app-sync-path-settings",9),l(),s(12,"tab",8),z(13,"translate"),s(14,"div",10)(15,"div",11)(16,"select",12),p1("ngModelChange",function(f){return m1(a.currentFilterType,f)||(a.currentFilterType=f),f}),h(17,Yc,4,2),s(18,"option",13),p(19,"The files starting"),l(),s(20,"option",13),p(21,"The files containing"),l(),s(22,"option",13),p(23,"The files ending"),l(),s(24,"option",13),p(25,"Expert (Regexp)"),l()(),s(26,"input",14),z(27,"translate"),p1("ngModelChange",function(f){return m1(a.currentFilter,f)||(a.currentFilter=f),f}),l(),s(28,"button",15),_("click",function(){return a.addFilter()}),p(29,"Add"),l(),h(30,jc,2,0,"button",16),h(31,Kc,2,0,"button",16),l()(),u(32,"hr",17),F(33,Qc,4,2,"div",18,q1),l()()(),s(35,"div",19)(36,"button",20),_("click",function(){return a.confirmDeletion=!0}),p(37," Remove "),l(),h(38,Xc,2,0,"button",21),s(39,"button",22),_("click",function(){return a.onCancel()}),p(40,"Cancel"),l(),s(41,"button",23),_("click",function(){return a.onSubmit()}),p(42),l()()),o&2&&(r(2),d("icon",a.icons.faRotate),r(2),y(a.syncPath.settings.name),r(3),d("justified",!0),r(2),d("heading",M(10,26,"Settings",a.locale.language)),r(2),d("showPaths",!0)("syncPath",a.syncPath),r(),d("heading",M(13,29,"Filters",a.locale.language)),r(4),c1("ngModel",a.currentFilterType),r(),C(a.store.isElectronApp()?17:-1),r(),d("value",a.SYNC_PATH_FILTER_TYPE.START),r(2),d("value",a.SYNC_PATH_FILTER_TYPE.IN),r(2),d("value",a.SYNC_PATH_FILTER_TYPE.END),r(2),d("value",a.SYNC_PATH_FILTER_TYPE.EXPERT),r(2),c1("ngModel",a.currentFilter),d("disabled",a.currentFilterType===a.SYNC_PATH_FILTER_TYPE.FILE||a.currentFilterType===a.SYNC_PATH_FILTER_TYPE.FOLDER)("placeholder",M(27,32,a.filterTypePlaceholder[a.currentFilterType],a.locale.language)),r(2),d("disabled",!a.currentFilter),r(2),C(a.currentFilterType===a.SYNC_PATH_FILTER_TYPE.FILE?30:-1),r(),C(a.currentFilterType===a.SYNC_PATH_FILTER_TYPE.FOLDER?31:-1),r(2),R(a.syncPath.settings.filters),r(3),d("disabled",a.confirmDeletion),r(2),C(a.store.isElectronApp()?38:-1),r(3),E(I("btn btn-sm ",a.confirmDeletion?"btn-danger":"btn-primary")),d("disabled",!a.syncPath.settings.name),r(),k(" ",a.confirmDeletion?"Confirm deletion":"Confirm"," "))},dependencies:[xo,vo,Nn,x1,ue,_e,X1,fe,_1,g1,N,D,Z],encapsulation:2});let i=n;return i})();function Zc(i,n){if(i&1&&(s(0,"span",0),p(1),l()),i&2){let e=c();r(),y(e.s.settings.scheduler.unit)}}function Jc(i,n){if(i&1&&(s(0,"span")(1,"span"),p(2),l(),s(3,"span",0),p(4),l()()),i&2){let e=c();r(2),k("",e.s.settings.scheduler.value,"\xA0"),r(2),y(e.s.settings.scheduler.unit+"s")}}var Ga=(()=>{let n=class n{constructor(){this.store=x(q),this.SYNC_PATH_SCHEDULER_UNIT=ki,this.CLIENT_SCHEDULER_STATE=Ni}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=w({type:n,selectors:[["app-sync-path-scheduler"]],inputs:{s:"s"},decls:3,vars:3,consts:[["l10nTranslate",""]],template:function(o,a){o&1&&(s(0,"span"),h(1,Zc,2,1,"span",0)(2,Jc,5,2,"span"),l()),o&2&&(E(a.s.settings.scheduler.unit!==a.SYNC_PATH_SCHEDULER_UNIT.DISABLED?a.store.clientScheduler()===a.CLIENT_SCHEDULER_STATE.DISABLED?"text-warning text-failed":"text-success":"text-danger"),r(),C(a.s.settings.scheduler.unit===a.SYNC_PATH_SCHEDULER_UNIT.DISABLED?1:2))},dependencies:[D],encapsulation:2});let i=n;return i})();var e9=["SyncPathContextMenu"],t9=["MainContextMenu"],Wa=(i,n)=>n.key,i9=(i,n)=>n.id;function n9(i,n){if(i&1){let e=b();s(0,"button",8),z(1,"translate"),_("click",function(){S(e);let o=c();return g(o.doSync(!1))}),u(2,"fa-icon",7),l()}if(i&2){let e=c();d("tooltip",M(1,2,"Stop synchronization",e.locale.language)),r(2),d("icon",e.icons.faStop)}}function o9(i,n){if(i&1){let e=b();s(0,"button",9),z(1,"translate"),_("click",function(){S(e);let o=c();return g(o.doSync(!0))}),u(2,"fa-icon",7),l()}if(i&2){let e=c();d("disabled",!e.syncPathSelected||!e.syncPathSelected.settings.enabled)("tooltip",M(1,3,"Synchronize",e.locale.language)),r(2),d("icon",e.icons.faPlay)}}function a9(i,n){if(i&1){let e=b();s(0,"button",8),z(1,"translate"),_("click",function(){S(e);let o=c();return g(o.doAllSyncs(!1))}),u(2,"fa-icon",7),l()}if(i&2){let e=c();d("tooltip",M(1,2,"Stop synchronizations",e.locale.language)),r(2),d("icon",e.icons.faStop)}}function r9(i,n){if(i&1){let e=b();s(0,"ul",27)(1,"li",28)(2,"a",29),_("click",function(){S(e);let o=c(2);return g(o.doAllSyncs(!0,!1))}),s(3,"span",30),u(4,"fa-icon",7),p(5," Sequentially "),l()()(),s(6,"li",28)(7,"a",29),_("click",function(){S(e);let o=c(2);return g(o.doAllSyncs(!0))}),s(8,"span",30),u(9,"fa-icon",7),p(10," Asynchronously "),l()()()()}if(i&2){let e=c(2);r(4),d("icon",e.icons.faArrowsSpin),r(5),d("icon",e.icons.faShuffle)}}function s9(i,n){if(i&1&&(s(0,"div",12),z(1,"translate"),s(2,"div",13)(3,"button",17),u(4,"fa-icon",7),l(),V(5,r9,11,2,"ul",15),l()()),i&2){let e=c();d("tooltip",M(1,2,"Synchronize all",e.locale.language)),r(4),d("icon",e.icons.faForward)}}function l9(i,n){if(i&1&&u(0,"fa-icon",7),i&2){let e=c();d("icon",e.icons.faCalendarXmark)}}function c9(i,n){if(i&1&&u(0,"fa-icon",7),i&2){let e=c();d("icon",e.icons.faCalendarCheck)}}function m9(i,n){if(i&1){let e=b();s(0,"li",28)(1,"a",29),_("click",function(){S(e);let o=c(2);return g(o.setScheduler(o.CLIENT_SCHEDULER_STATE.DISABLED))}),s(2,"span",30),u(3,"fa-icon",7),p(4," Disable "),l()()()}if(i&2){let e=c(2);r(3),d("icon",e.icons.faCalendarXmark)}}function p9(i,n){if(i&1){let e=b();s(0,"ul",27),h(1,m9,5,1,"li",28),s(2,"li",28)(3,"a",29),_("click",function(){S(e);let o=c();return g(o.setScheduler(o.CLIENT_SCHEDULER_STATE.SEQ))}),s(4,"span",30),u(5,"fa-icon",7),p(6," Sequentially "),l()()(),s(7,"li",28)(8,"a",29),_("click",function(){S(e);let o=c();return g(o.setScheduler(o.CLIENT_SCHEDULER_STATE.ASYNC))}),s(9,"span",30),u(10,"fa-icon",7),p(11," Asynchronously "),l()()()()}if(i&2){let e=c();r(),C(e.store.clientScheduler()!==e.CLIENT_SCHEDULER_STATE.DISABLED?1:-1),r(4),d("icon",e.icons.faArrowsSpin),r(5),d("icon",e.icons.faShuffle)}}function d9(i,n){if(i&1){let e=b();s(0,"ul",27)(1,"li",28)(2,"a",29),_("click",function(){S(e);let o=c();return g(o.goToPath())}),s(3,"span",30),u(4,"fa-icon",7),p(5," Client "),l()()(),s(6,"li",28)(7,"a",29),_("click",function(){S(e);let o=c();return g(o.goToPath(!1))}),s(8,"span",30),u(9,"fa-icon",7),p(10," Server "),l()()()()}if(i&2){let e=c();r(4),d("icon",e.icons.CLIENT),r(5),d("icon",e.icons.SERVER)}}function f9(i,n){if(i&1&&u(0,"fa-icon",7),i&2){let e=c(3);d("icon",e.sortTable.sortParam.asc?e.icons.faArrowDown:e.icons.faArrowUp)}}function u9(i,n){if(i&1){let e=b();s(0,"th",32),_("click",function(){S(e);let o=c().$implicit,a=c();return g(a.sortBy(o.key))}),p(1),h(2,f9,1,1,"fa-icon",7),l()}if(i&2){let e=c().$implicit,t=c();E(e.value.class),n1("width",e.value.width,"%"),U("text-align-center",e.value.textCenter)("cursor-pointer",e.value.sortable),r(),k(" ",e.value.label," "),r(),C(t.sortTable.sortParam.column===e.key?2:-1)}}function _9(i,n){if(i&1&&h(0,u9,3,10,"th",31),i&2){let e=n.$implicit;C(e.value.show?0:-1)}}function h9(i,n){if(i&1&&(s(0,"span",41),p(1),l()),i&2){let e=c(4).$implicit;r(),y(e._nbTasks)}}function C9(i,n){if(i&1&&(s(0,"span",42),z(1,"translate"),u(2,"fa-icon",44),l()),i&2){let e=c(4).$implicit,t=c();d("tooltip",M(1,2,e.mainError,t.locale.language)),r(2),d("icon",t.icons.faExclamationTriangle)}}function S9(i,n){if(i&1){let e=b();s(0,"span",45),_("click",function(){S(e);let o=c(4).$implicit,a=c();return g(a.showErrors(o))}),u(1,"fa-icon",46),s(2,"span"),p(3),l()()}if(i&2){let e=c(4).$implicit,t=c();r(),d("icon",t.icons.faExclamationTriangle),r(2),y(e.lastErrors.length)}}function g9(i,n){if(i&1&&(s(0,"div",35),u(1,"img",39),s(2,"span"),p(3),l(),s(4,"span",40),h(5,h9,2,1,"span",41),h(6,C9,3,5,"span",42),h(7,S9,4,2,"span",43),l()()),i&2){let e=c(3).$implicit;r(),d("src",e.mimeUrl,X),r(2),y(e.settings.name),r(2),C(e.nbSyncTasks?5:-1),r(),C(e.mainError?6:-1),r(),C(e.lastErrors.length?7:-1)}}function x9(i,n){if(i&1&&u(0,"app-sync-path-direction-icon",36),i&2){let e=c(3).$implicit;d("syncPath",e)}}function v9(i,n){if(i&1&&(s(0,"span",30),p(1),l()),i&2){let e=c(3).$implicit,t=c();r(),y(e.settings.mode===t.SYNC_PATH_MODE.BOTH?e.settings.conflictMode:e.settings.mode?t.SYNC_PATH_CONFLICT_MODE.REMOTE:t.SYNC_PATH_CONFLICT_MODE.LOCAL)}}function y9(i,n){if(i&1&&(s(0,"span",30),p(1),l()),i&2){let e=c(3).$implicit;r(),y(e.settings.diffMode)}}function b9(i,n){if(i&1&&u(0,"app-sync-path-scheduler",37),i&2){let e=c(3).$implicit;d("s",e)}}function T9(i,n){if(i&1&&p(0),i&2){let e=c(3).$implicit;k(" ",e.settings.filters.length," ")}}function z9(i,n){if(i&1&&(p(0),z(1,"amTimeAgo")),i&2){let e=c(4).$implicit;k(" ",M(1,1,e.settings.lastSync,!0)," ")}}function M9(i,n){if(i&1&&(p(0),z(1,"translate")),i&2){let e=c(5);k(" ",M(1,1,"never",e.locale.language)," ")}}function E9(i,n){if(i&1&&(s(0,"div"),h(1,z9,2,4)(2,M9,2,4),l()),i&2){let e=c(3).$implicit;E(I("sync-newly-",e.newly)),r(),C(e.newly?1:2)}}function w9(i,n){if(i&1&&(s(0,"td"),h(1,g9,8,5,"div",35)(2,x9,1,1,"app-sync-path-direction-icon",36)(3,v9,2,1,"span",30)(4,y9,2,1,"span",30)(5,b9,1,1,"app-sync-path-scheduler",37)(6,T9,1,1)(7,E9,3,4,"div",38),l()),i&2){let e,t=c().$implicit,o=c().$implicit;E(qe("",t.value.class," ",t.value.newly?"sync-newly-"+o[t.value.newly]:"")),n1("width",t.value.width,"%"),U("text-align-center",t.value.textCenter),r(),C((e=t.key)==="name"?1:e==="mode"?2:e==="conflictMode"?3:e==="diffMode"?4:e==="scheduler"?5:e==="filters"?6:e==="lastSync"?7:-1)}}function P9(i,n){if(i&1&&h(0,w9,8,9,"td",34),i&2){let e=n.$implicit;C(e.value.show?0:-1)}}function A9(i,n){if(i&1){let e=b();s(0,"tr",33),_("click",function(){let o=S(e).$implicit,a=c();return g(a.onSelect(o))})("contextmenu",function(o){let a=S(e).$implicit,m=c();return g(m.onSyncPathContextMenu(o,a))})("dblclick",function(){S(e);let o=c();return g(o.openSettingsDialog())}),F(1,P9,1,1,null,null,Wa),z(3,"keyvalue"),l()}if(i&2){let e=n.$implicit,t=c();U("selected",t.syncPathSelected&&t.syncPathSelected.id===e.id),r(),R(M(3,2,t.tableHeaders,t.originalOrderKeyValue))}}function N9(i,n){if(i&1&&(s(0,"span",30),u(1,"fa-icon",7),p(2,"Synchronize"),l()),i&2){let e=c(2);r(),d("icon",e.icons.faStop)}}function L9(i,n){if(i&1){let e=b();V(0,N9,3,1,"ng-template",24),_("execute",function(){S(e);let o=c();return g(o.doSync(!1))})}}function k9(i,n){if(i&1&&(s(0,"span",30),u(1,"fa-icon",7),p(2,"Synchronize"),l()),i&2){let e=c(2);r(),d("icon",e.icons.faPlay)}}function D9(i,n){if(i&1){let e=b();V(0,k9,3,1,"ng-template",24),_("execute",function(){S(e);let o=c();return g(o.doSync(!0))})}}function F9(i,n){if(i&1&&(s(0,"span",30),u(1,"fa-icon",7),p(2,"Simulate"),l()),i&2){let e=c();r(),d("icon",e.icons.faFlask)}}function R9(i,n){}function I9(i,n){if(i&1&&(s(0,"span",30),u(1,"fa-icon",7),p(2,"Go to"),l()),i&2){let e=c();r(),d("icon",e.icons.faMapMarkerAlt)}}function O9(i,n){if(i&1&&(s(0,"span",30),u(1,"fa-icon",7),p(2,"Edit"),l()),i&2){let e=c();r(),d("icon",e.icons.faPencilAlt)}}function V9(i,n){if(i&1&&(s(0,"span",30),u(1,"fa-icon",7),p(2,"Sequentially"),l()),i&2){let e=c();r(),d("icon",e.icons.faArrowsSpin)}}function B9(i,n){if(i&1&&(s(0,"span",30),u(1,"fa-icon",7),p(2,"Asynchronously"),l()),i&2){let e=c();r(),d("icon",e.icons.faShuffle)}}function U9(i,n){if(i&1&&(s(0,"span",30),u(1,"fa-icon",7),p(2,"Client"),l()),i&2){let e=c();r(),d("icon",e.icons.CLIENT)}}function H9(i,n){if(i&1&&(s(0,"span",30),u(1,"fa-icon",7),p(2,"Server"),l()),i&2){let e=c();r(),d("icon",e.icons.SERVER)}}function $9(i,n){if(i&1&&(s(0,"span",30),u(1,"fa-icon",7),p(2,"Disabled"),l()),i&2){let e=c(2);r(),d("icon",e.icons.faCalendarXmark)}}function G9(i,n){if(i&1){let e=b();V(0,$9,3,1,"ng-template",24),_("execute",function(){S(e);let o=c();return g(o.setScheduler(o.CLIENT_SCHEDULER_STATE.DISABLED))})}}function W9(i,n){if(i&1&&(s(0,"span",30),u(1,"fa-icon",7),p(2,"Sequentially"),l()),i&2){let e=c();r(),d("icon",e.icons.faArrowsSpin)}}function q9(i,n){if(i&1&&(s(0,"span",30),u(1,"fa-icon",7),p(2,"Asynchronously"),l()),i&2){let e=c();r(),d("icon",e.icons.faShuffle)}}function Y9(i,n){if(i&1&&(s(0,"span",30),u(1,"fa-icon",7),p(2,"Stop synchronizations"),l()),i&2){let e=c(2);r(),d("icon",e.icons.faStop)}}function j9(i,n){if(i&1){let e=b();V(0,Y9,3,1,"ng-template",24),_("execute",function(){S(e);let o=c();return g(o.doAllSyncs(!1))})}}function K9(i,n){if(i&1&&(s(0,"span",30),u(1,"fa-icon",7),p(2,"Synchronize"),l()),i&2){let e=c(2);r(),d("icon",e.icons.faForward)}}function Q9(i,n){if(i&1&&V(0,K9,3,1,"ng-template",26),i&2){c();let e=C1(52);d("subMenu",e)}}function X9(i,n){if(i&1&&u(0,"fa-icon",7),i&2){let e=c(2);d("icon",e.icons.faCalendarXmark)}}function Z9(i,n){if(i&1&&u(0,"fa-icon",7),i&2){let e=c(2);d("icon",e.icons.faCalendarCheck)}}function J9(i,n){if(i&1&&(s(0,"span",30),h(1,X9,1,1,"fa-icon",7)(2,Z9,1,1,"fa-icon",7),p(3," Scheduler "),l()),i&2){let e=c();r(),C(e.store.clientScheduler()===e.CLIENT_SCHEDULER_STATE.DISABLED?1:2)}}function em(i,n){}function tm(i,n){if(i&1&&(s(0,"span",30),u(1,"fa-icon",7),p(2,"Add"),l()),i&2){let e=c();r(),d("icon",e.icons.faPlus)}}var qa=(()=>{let n=class n{constructor(){this.locale=x(K),this.syncsInProgress=[],this.syncPathSelected=null,this.allSyncsRunning=!1,this.store=x(q),this.originalOrderKeyValue=J1,this.icons={faCalendarXmark:z4,faCalendarCheck:G0,faArrowDown:Se,faArrowUp:Ce,faArrowRotateRight:lt,faPlus:De,faPencilAlt:c4,faStop:ri,faPlay:x4,faForward:o4,faArrowsSpin:Z0,faShuffle:F4,faMapMarkerAlt:qt,CLIENT:v1.CLIENT,SERVER:v1.SERVER,faInfoCircle:U4,faExclamationTriangle:P4,faFlask:fi},this.tableHeaders={name:{label:"Name",width:30,textCenter:!1,class:"",show:!0,sortable:!0},mode:{label:"Direction",width:8,textCenter:!0,class:"",show:!0,sortable:!0},conflictMode:{label:"Conflict",width:6,textCenter:!0,class:"d-none d-md-table-cell",show:!0,sortable:!0},diffMode:{label:"Mode",width:6,textCenter:!0,class:"d-none d-md-table-cell",show:!0,sortable:!0},scheduler:{label:"Scheduler",width:8,textCenter:!0,class:"",show:!0},filters:{label:"Filters",width:5,textCenter:!0,class:"d-none d-lg-table-cell",show:!0,sortable:!0},lastSync:{label:"Synced",width:10,textCenter:!0,class:"",newly:"newly",show:!0,sortable:!0}},this.SYNC_PATH_MODE=be,this.CLIENT_SCHEDULER_STATE=Ni,this.SYNC_PATH_CONFLICT_MODE=pt,this.router=x(i1),this.layout=x(L),this.syncService=x(b1),this.sortSettings={default:[{prop:"settings.name",type:"string"}],name:[{prop:"settings.name",type:"string"}],diffMode:[{prop:"settings.diffMode",type:"string"}],conflictMode:[{prop:"settings.conflictMode",type:"string"}],mode:[{prop:"settings.mode",type:"string"}],filters:[{prop:"settings.filters",type:"length"}],lastSync:[{prop:"lastSync",type:"date"}]},this.sortTable=new Oe(this.constructor.name,this.sortSettings),this.subscriptions=[],this.focusOnPathId=null,this.focusOnPathSettings=!1,this.layout.setBreadcrumbIcon(v1.SYNC),this.layout.setBreadcrumbNav({url:`/${B.BASE}/${B.PATHS}/${Fe.SYNCS}`,splicing:2,translating:!0,sameLink:!0}),Ot(()=>{this.onSelect(this.store.clientSyncPaths().find(t=>t.id===this.syncPathSelected?.id))}),this.subscriptions.push(this.store.clientSyncsWithErrors.subscribe(t=>this.onSyncErrors(t))),this.subscriptions.push(this.store.clientSyncs.subscribe(t=>this.onSync(t))),this.subscriptions.push(this.store.clientSyncTask.subscribe(t=>this.onSyncTask(t))),this.checkRouteState()}ngOnInit(){if(this.focusOnPathId){let t=this.store.clientSyncPaths().findIndex(o=>o.id===this.focusOnPathId);t>-1&&(this.onSelect(this.store.clientSyncPaths()[t]),this.autoResize.scrollIntoView(Math.max(t,1)*35-35),this.focusOnPathSettings&&setTimeout(()=>this.openSettingsDialog(),500))}}ngOnDestroy(){for(let t of this.subscriptions)t.unsubscribe()}onSelect(t=null){this.syncPathSelected=t}onSync(t){this.syncsInProgress=t;for(let o of this.store.clientSyncPaths())this.syncsInProgress.find(a=>a.syncPathId===o.id)?o.inSync||o.setStatus(!0):(o.inSync&&(o.settings.lastSync=new Date),o.setStatus(!1));this.allSyncsRunning&&!this.syncsInProgress.length&&(this.allSyncsRunning=!1)}onSyncErrors(t){for(let o of this.store.clientSyncPaths()){let a=t.find(f=>f.syncPathId===o.id),m=a?a.mainError:null;o.mainError!==m&&(o.mainError=m,o.setStatus(!1)),o.lastErrors=a?a.lastErrors:[]}}onSyncTask(t){let o=this.store.clientSyncPaths().find(a=>a.id===t.syncPathId);o&&(o.nbSyncTasks=t.nbTasks)}onRefresh(){this.onSelect(),this.syncService.refreshPaths().catch(console.error)}doSync(t){this.syncService.doSync(t,[this.syncPathSelected.id],!1)}doAllSyncs(t,o=!0){let a=[];t&&(this.allSyncsRunning=t,a=this.store.clientSyncPaths().filter(m=>m.settings.enabled&&!m.inSync).map(m=>m.id)),this.syncService.doSync(t,a,!1,o)}setScheduler(t){t!==this.store.clientScheduler()&&this.syncService.setClientScheduler(t)}openReportDialog(){this.layout.openDialog($a,"xl",{id:this.syncPathSelected.id,initialState:{syncPath:this.syncPathSelected}})}openSettingsDialog(){this.layout.openDialog(Ln,"md",{initialState:{syncPathSelected:this.syncPathSelected}})}goToPath(t=!0){this.syncService.goToPath(this.syncPathSelected,t)}addToSync(){this.router.navigate([B.BASE,B.WIZARD]).catch(console.error)}sortBy(t,o=!0,a){this.store.clientSyncPaths.set(this.sortTable.sortBy(t,o,a||this.store.clientSyncPaths()))}onSyncPathContextMenu(t,o){t.preventDefault(),t.type==="contextmenu"&&t.stopPropagation(),this.onSelect(o),this.layout.openContextMenu(t,this.syncPathContextMenu)}onContextMenu(t){t.preventDefault(),t.stopPropagation(),this.layout.openContextMenu(t,this.mainContextMenu)}showErrors(t){this.router.navigate([B.BASE,B.TRANSFERS],{state:{id:t.id}}).catch(console.error)}checkRouteState(){let t=this.router.getCurrentNavigation()?.extras.state;t?.id&&(this.focusOnPathId=t.id,this.focusOnPathSettings=t.withSettings)}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=w({type:n,selectors:[["app-sync-paths"]],viewQuery:function(o,a){if(o&1&&(r1(t1,7),r1(F1,7),r1(e9,7),r1(t9,7)),o&2){let m;s1(m=l1())&&(a.autoResize=m.first),s1(m=l1())&&(a.inputFilter=m.first),s1(m=l1())&&(a.syncPathContextMenu=m.first),s1(m=l1())&&(a.mainContextMenu=m.first)}},decls:71,vars:52,consts:[["SyncPathContextMenu",""],["SyncAllContextMenu",""],["SyncGoToContextMenu",""],["SyncSchedulerContextMenu",""],["MainContextMenu",""],[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"],["container","body","type","button",1,"btn","btn-sm","btn-secondary","me-1",3,"click","tooltip"],["container","body","type","button",1,"btn","btn-sm","btn-secondary","me-1",3,"click","disabled","tooltip"],["container","body","type","button",1,"btn","btn-sm","btn-secondary","me-1",3,"tooltip"],["container","body","type","button",1,"btn","btn-sm","btn-secondary","me-1",3,"disabled","tooltip"],["container","body",3,"tooltip"],["dropdown","",1,"btn-group","btn-group-sm","me-1"],["dropdownToggle","","type","button"],["class","dropdown-menu","role","menu",4,"dropdownMenu"],["dropdown","",1,"btn-group","btn-group-sm","me-1",3,"isDisabled"],["dropdownToggle","","type","button",1,"btn","btn-sm","btn-secondary","dropdown-toggle"],[1,"d-none","d-sm-block","ms-auto"],[1,"app-table"],["appAutoResize","",3,"contextmenu","resizeOffset"],["tabindex","-1"],[3,"selected"],["contextMenuItem",""],["contextMenuItem","",3,"execute"],["contextMenuItem","",3,"divider"],["contextMenuItem","",3,"subMenu"],["role","menu",1,"dropdown-menu"],["role","menuitem"],[1,"dropdown-item",3,"click"],["l10nTranslate",""],["l10nTranslate","",3,"width","text-align-center","cursor-pointer","class"],["l10nTranslate","",3,"click"],[3,"click","contextmenu","dblclick"],[3,"width","text-align-center","class"],[1,"d-flex","align-items-center"],[3,"syncPath"],[3,"s"],[3,"class"],["alt","","draggable","false","height","35",3,"src"],[1,"d-flex","align-items-center","ms-auto"],[1,"badge","rounded-pill","bg-maroon"],["placement","right",1,"badge","rounded-pill","bg-danger","cursor-pointer","ms-1",3,"tooltip"],[1,"badge","rounded-pill","bg-danger","cursor-pointer","ms-1"],[1,"m-0",3,"icon"],[1,"badge","rounded-pill","bg-danger","cursor-pointer","ms-1",3,"click"],[1,"me-1",3,"icon"]],template:function(o,a){if(o&1){let m=b();s(0,"div",5)(1,"button",6),z(2,"translate"),_("click",function(){return S(m),g(a.onRefresh())}),u(3,"fa-icon",7),l(),s(4,"button",8),z(5,"translate"),_("click",function(){return S(m),g(a.addToSync())}),u(6,"fa-icon",7),l(),s(7,"button",9),z(8,"translate"),_("click",function(){return S(m),g(a.openSettingsDialog())}),u(9,"fa-icon",7),l(),s(10,"button",9),z(11,"translate"),_("click",function(){return S(m),g(a.openReportDialog())}),u(12,"fa-icon",7),l(),h(13,n9,3,5,"button",10)(14,o9,3,6,"button",11),h(15,a9,3,5,"button",10)(16,s9,6,5,"div",12),s(17,"div",12),z(18,"translate"),s(19,"div",13)(20,"button",14),h(21,l9,1,1,"fa-icon",7)(22,c9,1,1,"fa-icon",7),l(),V(23,p9,12,3,"ul",15),l()(),s(24,"div",12),z(25,"translate"),s(26,"div",16)(27,"button",17),u(28,"fa-icon",7),l(),V(29,d9,11,2,"ul",15),l()(),u(30,"app-input-filter",18),l(),s(31,"table",19)(32,"thead")(33,"tr"),F(34,_9,1,1,null,null,Wa),z(36,"keyvalue"),l()()(),s(37,"div",20),_("contextmenu",function(v){return S(m),g(a.onContextMenu(v))}),s(38,"table",19)(39,"tbody",21),F(40,A9,4,5,"tr",22,i9),z(42,"searchFilter"),l()()(),s(43,"context-menu",null,0),h(45,L9,1,0,null,23)(46,D9,1,0,null,23),V(47,F9,3,1,"ng-template",24),_("execute",function(){return S(m),g(a.openReportDialog())}),V(48,R9,0,0,"ng-template",25)(49,I9,3,1,"ng-template",26)(50,O9,3,1,"ng-template",24),_("execute",function(){return S(m),g(a.openSettingsDialog())}),l(),s(51,"context-menu",null,1),V(53,V9,3,1,"ng-template",24),_("execute",function(){return S(m),g(a.doAllSyncs(!0,!1))}),V(54,B9,3,1,"ng-template",24),_("execute",function(){return S(m),g(a.doAllSyncs(!0))}),l(),s(55,"context-menu",null,2),V(57,U9,3,1,"ng-template",24),_("execute",function(){return S(m),g(a.goToPath())}),V(58,H9,3,1,"ng-template",24),_("execute",function(){return S(m),g(a.goToPath(!1))}),l(),s(59,"context-menu",null,3),h(61,G9,1,0,null,23),V(62,W9,3,1,"ng-template",24),_("execute",function(){return S(m),g(a.setScheduler(a.CLIENT_SCHEDULER_STATE.SEQ))}),V(63,q9,3,1,"ng-template",24),_("execute",function(){return S(m),g(a.setScheduler(a.CLIENT_SCHEDULER_STATE.ASYNC))}),l(),s(64,"context-menu",null,4),h(66,j9,1,0,null,23)(67,Q9,1,1,null,26),V(68,J9,4,1,"ng-template",26)(69,em,0,0,"ng-template",25)(70,tm,3,1,"ng-template",24),_("execute",function(){return S(m),g(a.addToSync())}),l()}if(o&2){let m=C1(56),f=C1(60);r(),d("tooltip",M(2,28,"Refresh",a.locale.language)),r(2),d("icon",a.icons.faArrowRotateRight),r(),d("tooltip",M(5,31,"Add",a.locale.language)),r(2),d("icon",a.icons.faPlus),r(),d("disabled",!a.syncPathSelected)("tooltip",M(8,34,"Edit",a.locale.language)),r(2),d("icon",a.icons.faPencilAlt),r(),d("disabled",!a.syncPathSelected||!a.syncPathSelected.settings.enabled)("tooltip",M(11,37,"Simulate",a.locale.language)),r(2),d("icon",a.icons.faFlask),r(),C(a.syncPathSelected&&a.syncPathSelected.inSync?13:14),r(2),C(a.allSyncsRunning?15:16),r(2),d("tooltip",M(18,40,"Scheduler: "+a.store.clientScheduler(),a.locale.language)),r(3),E(I("btn btn-sm ",a.store.clientScheduler()===a.CLIENT_SCHEDULER_STATE.DISABLED?"btn-warning":"btn-success"," dropdown-toggle")),r(),C(a.store.clientScheduler()===a.CLIENT_SCHEDULER_STATE.DISABLED?21:22),r(3),d("tooltip",M(25,43,"Go to",a.locale.language)),r(2),d("isDisabled",!a.syncPathSelected),r(2),d("icon",a.icons.faMapMarkerAlt),r(6),R(M(36,46,a.tableHeaders,a.originalOrderKeyValue)),r(3),d("resizeOffset",105),r(3),R(M(42,49,a.store.clientSyncPaths(),a.inputFilter.search())),r(5),C(a.syncPathSelected&&a.syncPathSelected.inSync?45:46),r(3),d("divider",!0),r(),d("subMenu",m),r(12),C(a.store.clientScheduler()!==a.CLIENT_SCHEDULER_STATE.DISABLED?61:-1),r(5),C(a.allSyncsRunning?66:67),r(2),d("subMenu",f),r(),d("divider",!0)}},dependencies:[z1,Be,He,Ue,F1,t1,Kt,jt,Yt,f2,N,D,Ga,Z,Ie,I1,Q1],encapsulation:2});let i=n;return i})();function im(i,n){if(i&1&&(s(0,"span",6),p(1,"Events from"),l(),p(2,"\xA0"),s(3,"b"),p(4),l()),i&2){let e=c();r(4),y(e.syncPath.settings.name)}}function nm(i,n){i&1&&(s(0,"span",6),p(1,"All events"),l())}var Ya=(()=>{let n=class n{constructor(){this.syncPath=null,this.wasDeleted=new h1,this.layout=x(L),this.icons={faTrashCan:$1},this.syncService=x(b1)}doClear(){this.syncService.deleteTransfers(this.syncPath?.id).then(()=>{this.wasDeleted.emit(),this.layout.closeDialog()})}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=w({type:n,selectors:[["app-sync-transfers-delete-dialog"]],inputs:{syncPath:"syncPath"},outputs:{wasDeleted:"wasDeleted"},decls:18,vars:2,consts:[[1,"modal-header"],["translate","",1,"modal-title"],[3,"icon"],["l10nTranslate","",1,"ms-2"],["aria-label","Close","type","button",1,"btn-close","btn-close-white",3,"click"],[1,"modal-body"],["l10nTranslate",""],[1,"modal-footer"],["data-dismiss","modal","type","button","l10nTranslate","",1,"btn","btn-sm","btn-secondary",3,"click"],["type","submit","l10nTranslate","",1,"btn","btn-sm","btn-danger",3,"click"]],template:function(o,a){o&1&&(s(0,"div",0)(1,"h4",1),u(2,"fa-icon",2),s(3,"span",3),p(4,"Clear events"),l()(),s(5,"button",4),_("click",function(){return a.layout.closeDialog()}),l()(),s(6,"div",5),h(7,im,5,1)(8,nm,2,0,"span",6),s(9,"span"),p(10,"\xA0"),l(),s(11,"span",6),p(12,"will be cleared"),l()(),s(13,"div",7)(14,"button",8),_("click",function(){return a.layout.closeDialog()}),p(15,"Cancel"),l(),s(16,"button",9),_("click",function(){return a.doClear()}),p(17,"Confirm"),l()()),o&2&&(r(2),d("icon",a.icons.faTrashCan),r(5),C(a.syncPath?7:8))},dependencies:[D,N],encapsulation:2});let i=n;return i})();var ja=(i,n)=>n.id,Ka=(i,n)=>n.key;function om(i,n){if(i&1&&(s(0,"option",4),p(1),l()),i&2){let e=n.$implicit;d("ngValue",e),r(),y(e.settings.name)}}function am(i,n){if(i&1&&u(0,"fa-icon",14),i&2){let e=c(3);d("icon",e.sortTable.sortParam.asc?e.icons.faArrowDown:e.icons.faArrowUp)}}function rm(i,n){if(i&1){let e=b();s(0,"th",23),_("click",function(){S(e);let o=c().$implicit,a=c();return g(a.sortBy(o.key))}),p(1),h(2,am,1,1,"fa-icon",14),l()}if(i&2){let e=c().$implicit,t=c();E(e.value.class),n1("width",e.value.width,"%"),U("text-align-center",e.value.textCenter)("cursor-pointer",e.value.sortable),r(),k(" ",e.value.label," "),r(),C(t.sortTable.sortParam.column===e.key?2:-1)}}function sm(i,n){if(i&1&&h(0,rm,3,10,"th",22),i&2){let e=n.$implicit;C(e.value.show?0:-1)}}function lm(i,n){if(i&1&&(s(0,"span",26),u(1,"fa-icon",14)(2,"fa-icon",27),s(3,"span",28),p(4),l()()),i&2){let e=c(3).$implicit;r(),E(e.ok?e.sideIconClass:"circle-error-icon-sm"),d("icon",e.sideIcon),r(),U("text-danger",!e.ok),d("icon",e.actionIcon),r(),U("text-danger",!e.ok),r(),y(e.actionText)}}function cm(i,n){if(i&1&&(s(0,"span",26)(1,"span",29),p(2),l()()),i&2){let e=c(3).$implicit;r(2),y(e.syncPathName)}}function mm(i,n){if(i&1&&(s(0,"span"),p(1),l(),s(2,"span")(3,"b",33),p(4,"Source"),l(),p(5),l()),i&2){let e=c(4).$implicit;E(e.selected?"overflow-wrap-and-whitespace":"truncate"),r(),y(e.fileDst),r(),E(I("",e.selected?"overflow-wrap-and-whitespace":"truncate"," fs-xxxs")),r(3),k(":\xA0",e.file)}}function pm(i,n){if(i&1&&(s(0,"span"),p(1),l()),i&2){let e=c(4).$implicit;E(e.selected?"overflow-wrap-and-whitespace":"truncate"),r(),y(e.file)}}function dm(i,n){if(i&1&&(s(0,"span"),p(1),l()),i&2){let e=c(4).$implicit;E(I("",e.selected?"overflow-wrap-and-whitespace":"truncate"," text-danger fs-xxxs")),r(),y(e.error)}}function fm(i,n){if(i&1){let e=b();s(0,"div",26)(1,"img",30),_("error",function(){S(e);let o=c(3).$implicit;return g(o.fallBackMimeUrl())}),l(),s(2,"span",31),h(3,mm,6,7)(4,pm,2,3,"span",32),h(5,dm,2,4,"span",32),l()()}if(i&2){let e=c(3).$implicit;r(),d("src",e.mimeUrl,X),r(2),C(e.fileDst?3:4),r(2),C(e.ok?-1:5)}}function um(i,n){if(i&1){let e=b();s(0,"div",34),_("mouseenter",function(){S(e);let o=c(3).$implicit;return g(o.hovered=!0)})("mouseleave",function(){S(e);let o=c(3).$implicit;return g(o.hovered=!1)}),s(1,"span"),p(2),l()()}if(i&2){let e=c(3).$implicit;r(2),y(e.hovered?e.timestamp:e.hTimeAgo)}}function _m(i,n){if(i&1&&(s(0,"td"),h(1,lm,5,9,"span",26)(2,cm,3,1,"span",26)(3,fm,6,3,"div",26)(4,um,3,1,"div"),l()),i&2){let e,t=c().$implicit,o=c().$implicit;E(qe("",t.value.class," ",t.value.newly?"prop-newly-"+o[t.value.newly]:"")),n1("width",t.value.width,"%"),U("text-align-center",t.value.textCenter),r(),C((e=t.key)==="action"?1:e==="sync"?2:e==="file"?3:e==="date"?4:-1)}}function hm(i,n){if(i&1&&h(0,_m,5,9,"td",25),i&2){let e=n.$implicit;C(e.value.show?0:-1)}}function Cm(i,n){if(i&1){let e=b();s(0,"tr",24),_("click",function(){let o=S(e).$implicit,a=c();return g(a.onSelect(o))}),F(1,hm,1,1,null,null,Ka),z(3,"keyvalue"),l()}if(i&2){let e=n.$implicit,t=c();U("selected",e.selected),r(),R(M(3,2,t.tableHeaders,t.originalOrderKeyValue))}}var Qa=(()=>{let n=class n{constructor(){if(this.locale=x(K),this.action=null,this.syncPathSelected=null,this.transfers=[],this.store=x(q),this.originalOrderKeyValue=J1,this.tableHeaders={action:{label:"Action",width:15,textCenter:!1,class:"",show:!0,sortable:!0},sync:{label:"Synchronization",width:15,textCenter:!1,class:"",show:!0,sortable:!0},file:{label:"File",width:55,textCenter:!1,class:"",show:!0,sortable:!0},date:{label:"Date",width:15,textCenter:!0,class:"",newly:"newly",show:!0,sortable:!0}},this.icons={faRedo:R4,faTrashCan:$1,faArrowDown:Se,faArrowUp:Ce},this.router=x(i1),this.layout=x(L),this.syncService=x(b1),this.sortSettings={default:[{prop:"timestamp",type:"date"}],action:[{prop:"actionText",type:"string"}],sync:[{prop:"syncPathName",type:"string"}],file:[{prop:"file",type:"string"}],date:[{prop:"timestamp",type:"date"}]},this.sortTable=new Oe(this.constructor.name,this.sortSettings),this.focusOnSyncPathErrorsId=null,this.search=null,this.query=null,this.layout.setBreadcrumbIcon(v1.TRANSFERS),this.layout.setBreadcrumbNav({url:`/${B.BASE}/${B.TRANSFERS}/${Fe.TRANSFERS}`,splicing:2,translating:!0,sameLink:!0}),Ot(()=>{this.doSearch(this.inputFilter.search())}),this.checkRouteState(),this.focusOnSyncPathErrorsId){let t=this.store.clientSyncPaths().find(o=>o.id===this.focusOnSyncPathErrorsId);t?(this.syncPathSelected=t,this.onSelectAction("ERROR")):this.refresh()}else this.refresh()}doSearch(t){this.search=t,this.doQueryRefresh()}refresh(){this.onSelect(),this.syncService.getTransfers(this.syncPathSelected?.id,this.query).then(t=>{this.transfers=t.map(o=>new p2(o)),this.scrollView?.scrollInto(-1)})}onSelectPath(t){this.syncPathSelected=t,this.tableHeaders.sync.show=!this.syncPathSelected,this.refresh()}onSelectAction(t){this.action=t,this.doQueryRefresh()}onSelect(t){for(let o of this.transfers.filter(a=>a.selected))o.selected=!1;t&&(t.selected=!0)}openClearDialog(){this.layout.openDialog(Ya,"md",{initialState:{syncPath:this.syncPathSelected||null}}).content.wasDeleted.pipe(w1(1)).subscribe(()=>this.refresh())}sortBy(t,o=!0,a){this.transfers=this.sortTable.sortBy(t,o,a||this.transfers)}doQueryRefresh(){this.search&&this.action?this.action==="ERROR"?this.query=`(?=.*${this.search})(?=.*"ok":"false")`:this.query=`(?=.*${this.search})(?=.*"action":"${this.action}")`:this.action?this.query=this.action==="ERROR"?'"ok":false':`"action":"${this.action}"`:this.search?this.query=this.search:this.query=null,this.refresh()}checkRouteState(){let t=this.router.getCurrentNavigation()?.extras.state;t?.id&&(this.focusOnSyncPathErrorsId=t.id)}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=w({type:n,selectors:[["app-sync-transfers"]],viewQuery:function(o,a){if(o&1&&(r1(Xe,5),r1(F1,7)),o&2){let m;s1(m=l1())&&(a.scrollView=m.first),s1(m=l1())&&(a.inputFilter=m.first)}},decls:41,vars:20,consts:[[1,"app-top-menu"],[1,"btn-group","btn-group-sm"],[1,"form-select","form-select-sm","font-size-xs",2,"min-width","210px",3,"ngModelChange","ngModel"],["l10nTranslate","",3,"ngValue"],[3,"ngValue"],[1,"form-select","form-select-sm","font-size-xs","ms-1",2,"min-width","170px",3,"ngModelChange","ngModel"],["l10nTranslate","","value","NEW|MKFILE|MKDIR"],["l10nTranslate","","value","DIFF"],["l10nTranslate","","value","MOVE"],["l10nTranslate","","value","COPY"],["l10nTranslate","","value","RM|RMDIR"],["l10nTranslate","","value","ERROR"],[1,"d-flex","ms-auto"],["container","body","type","button",1,"btn","btn-sm","btn-secondary","me-1",3,"click","tooltip"],[3,"icon"],["placement","bottom","type","button",1,"btn","btn-sm","btn-secondary","me-1",3,"click","tooltip"],[1,"d-none","d-sm-block"],[1,"app-table"],[3,"bufferAmount","items","resizeOffset"],[1,"app-table","mb-3"],["tabindex","-1"],[3,"selected"],["l10nTranslate","",3,"width","text-align-center","cursor-pointer","class"],["l10nTranslate","",3,"click"],[3,"click"],[3,"width","text-align-center","class"],[1,"d-flex","align-items-center"],["size","sm",1,"circle-gray-icon-sm",3,"icon"],["l10nTranslate","",1,"fs-xxxs"],[1,"fs-xxs","ms-1"],["alt","","width","24",1,"me-2",3,"error","src"],[1,"d-flex","flex-column","fs-xxs"],[3,"class"],["l10nTranslate",""],[3,"mouseenter","mouseleave"]],template:function(o,a){o&1&&(s(0,"div",0)(1,"div",1)(2,"select",2),_("ngModelChange",function(f){return a.onSelectPath(f)}),s(3,"option",3),p(4,"All syncs"),l(),F(5,om,2,2,"option",4,ja),l(),s(7,"select",5),_("ngModelChange",function(f){return a.onSelectAction(f)}),s(8,"option",3),p(9,"All events"),l(),s(10,"option",6),p(11,"Added"),l(),s(12,"option",7),p(13,"Modified"),l(),s(14,"option",8),p(15,"Moved"),l(),s(16,"option",9),p(17,"Copied"),l(),s(18,"option",10),p(19,"Removed"),l(),s(20,"option",11),p(21,"Error"),l()()(),s(22,"div",12)(23,"button",13),z(24,"translate"),_("click",function(){return a.refresh()}),u(25,"fa-icon",14),l(),s(26,"button",15),z(27,"translate"),_("click",function(){return a.openClearDialog()}),u(28,"fa-icon",14),l(),u(29,"app-input-filter",16),l()(),s(30,"table",17)(31,"thead")(32,"tr"),F(33,sm,1,1,null,null,Ka),z(35,"keyvalue"),l()()(),s(36,"app-virtual-scroll",18)(37,"table",19)(38,"tbody",20),F(39,Cm,4,5,"tr",21,ja),l()()()),o&2&&(r(2),d("ngModel",a.syncPathSelected),r(),d("ngValue",null),r(2),R(a.store.clientSyncPaths()),r(2),d("ngModel",a.action),r(),d("ngValue",null),r(15),d("tooltip",M(24,11,"Refresh",a.locale.language)),r(2),d("icon",a.icons.faRedo),r(),d("tooltip",M(27,14,"Clear events",a.locale.language)),r(2),d("icon",a.icons.faTrashCan),r(5),R(M(35,17,a.tableHeaders,a.originalOrderKeyValue)),r(3),d("bufferAmount",5)("items",a.transfers)("resizeOffset",105),r(3),R(a.scrollView==null?null:a.scrollView.viewPortItems))},dependencies:[x1,ue,_e,fe,_1,g1,D,z1,Xe,N,F1,Z,Q1],encapsulation:2});let i=n;return i})();function Sm(i,n){if(i&1&&(s(0,"div",16)(1,"span",3),p(2),l(),s(3,"span",17),p(4),l()()),i&2){let e=c(2);r(2),y(e.infoMsg),r(2),k(":\xA0",e.syncService.wizard.localPath.origin)}}function gm(i,n){if(i&1){let e=b();s(0,"div",5)(1,"fa-icon",13),_("click",function(){S(e);let o=c();return g(o.onReset())}),l(),u(2,"img",14),s(3,"div",15),p(4),l(),h(5,Sm,5,2,"div",16),l()}if(i&2){let e=c();r(),d("icon",e.icons.faTimesCircle),r(),d("src",e.syncService.wizard.localPath.mimeUrl,X),r(2),y(e.syncService.wizard.localPath.path),r(),C(e.infoMsg?5:-1)}}function xm(i,n){if(i&1){let e=b();s(0,"div",18),_("dragleave",function(o){S(e);let a=c();return g(a.dragLeave(o))})("dragover",function(o){S(e);let a=c();return g(a.dragOver(o))})("drop",function(o){S(e);let a=c();return g(a.drop(o))}),s(1,"div",19)(2,"span",20),p(3,"Drop folder here"),l()()()}}var Xa=(()=>{let n=class n{constructor(){this.pathIsValid=!1,this.infoMsg=null,this.syncService=x(b1),this.icons={faTimesCircle:r4,faArrowCircleRight:hi},this.router=x(i1),this.renderer=x(Ne),this.store=x(q),this.layout=x(L),this.layout.setBreadcrumbIcon(v1.WIZARD),this.layout.setBreadcrumbNav({url:`/${B.BASE}/${B.WIZARD}/${B.WIZARD_CLIENT}/${Fe.WIZARD_CLIENT}`,splicing:3,translating:!0,sameLink:!0}),this.syncService.wizard.localPath&&this.checkSelection();let t=this.router.getCurrentNavigation()?.extras.state;t?.file&&this.syncService.addFileToRemotePath(t.file)}dragOver(t){return t.preventDefault(),t.dataTransfer.items[0].type?!1:(t.dataTransfer.dropEffect="copy",t.stopPropagation(),t.target.classList.contains("dropzone")&&this.renderer.addClass(t.target,"active"),!0)}dragLeave(t){t.preventDefault(),t.target.classList.contains("dropzone")&&this.renderer.removeClass(t.target,"active")}drop(t){t.preventDefault(),t.stopPropagation();let o=t.dataTransfer.items[0].webkitGetAsEntry();return o&&o.isDirectory?(this.syncService.wizard.localPath={name:o.name,path:this.syncService.getFilePath(t.dataTransfer.files[0]),mimeUrl:O1(ce),origin:null},this.checkSelection(),!0):!1}onSelect(){this.syncService.showOpenDialog({properties:[d2.DIRECTORY,d2.CREATE_DIRECTORY],defaultPath:""}).then(t=>{t.canceled||(this.syncService.wizard.localPath={name:t.filePaths[0].split("\\").pop().split("/").pop(),path:t.filePaths[0],mimeUrl:O1(ce),origin:null},this.checkSelection())})}onReset(){this.syncService.wizard.localPath=null,this.pathIsValid=!1,this.infoMsg=null}onNext(){this.router.navigate([B.BASE,B.WIZARD,B.WIZARD_SERVER]).catch(console.error)}onCancel(){this.router.navigate([B.BASE,B.PATHS]).catch(console.error),this.syncService.resetWizard()}checkSelection(){let t=this.store.clientSyncPaths().find(o=>new RegExp(`^${o.settings.localPath}((\\/.*)+|\\/?)$`).test(this.syncService.wizard.localPath.path));t?(this.pathIsValid=!1,this.syncService.wizard.localPath.mimeUrl=O1(`${ce}_sync`),this.syncService.wizard.localPath.origin=t.settings.localPath,this.infoMsg="The parent directory is already synced"):(this.infoMsg=null,this.pathIsValid=!0)}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=w({type:n,selectors:[["app-sync-wizard-client"]],decls:22,vars:4,consts:[[1,"wizard"],[1,"d-flex","flex-column","text-center","fs-sm"],["l10nTranslate","",1,"mb-2"],["l10nTranslate",""],[1,"d-flex","flex-column","h-100"],[1,"d-flex","flex-column","my-auto","fs-sm"],[1,"area"],[1,"d-flex","flex-column","mt-4"],[1,"d-flex","align-items-start"],["type","button","l10nTranslate","",1,"btn","btn-secondary","me-auto",3,"click"],[3,"icon"],["type","button","l10nTranslate","",1,"btn","btn-secondary",3,"click"],["type","button","l10nTranslate","",1,"btn","btn-secondary","ms-auto",3,"click","disabled"],["size","2x",1,"position-absolute","align-self-center","cursor-pointer",2,"margin-left","85px",3,"click","icon"],["alt","","height","96",1,"align-self-center","mb-2",3,"src"],[1,"align-self-center","mt-2","font-size-md","word-break-all","fw-500"],[1,"align-self-center","text-warning","mt-4"],[1,"fw-bold","ms-1"],[1,"area",3,"dragleave","dragover","drop"],["l10nTranslate","",1,"dropzone"],[1,"d-flex","flex-column","justify-content-center","align-self-center"]],template:function(o,a){o&1&&(s(0,"div",0)(1,"div",1)(2,"div",2),p(3,"This wizard will help you synchronize a directory on your computer with a Sync-in directory."),l(),s(4,"div")(5,"div",3),p(6,"To begin, select a folder on your computer."),l(),s(7,"div",3),p(8,'You can drag the folder into the area below or click on the "Select" button.'),l()()(),s(9,"div",4),h(10,gm,6,4,"div",5)(11,xm,4,0,"div",6),l(),s(12,"div",7)(13,"div",8)(14,"button",9),_("click",function(){return a.onCancel()}),u(15,"fa-icon",10),p(16," Cancel "),l(),s(17,"button",11),_("click",function(){return a.onSelect()}),p(18,"Select a folder"),l(),s(19,"button",12),_("click",function(){return a.onNext()}),u(20,"fa-icon",10),p(21," Next "),l()()()()),o&2&&(r(10),C(a.syncService.wizard.localPath?10:11),r(5),d("icon",a.icons.faTimesCircle),r(4),d("disabled",!a.pathIsValid),r(),d("icon",a.icons.faArrowCircleRight))},dependencies:[N,D],encapsulation:2});let i=n;return i})();var vm=()=>({standalone:!0}),ym=(i,n)=>n.id;function bm(i,n){if(i&1&&u(0,"fa-icon",25),i&2){let e=c(2);E(I("circle-",e.selectedPath.iconClass,"-icon")),d("icon",e.selectedPath.icon)}}function Tm(i,n){if(i&1&&u(0,"img",23),i&2){let e=c(2);d("src",e.selectedPath.mimeUrl,X)}}function zm(i,n){if(i&1&&(h(0,bm,1,4,"fa-icon",22)(1,Tm,1,1,"img",23),s(2,"span",24),p(3),l()),i&2){let e=c();C(e.selectedPath.icon?0:1),r(3),y(e.selectedPath.name)}}function Mm(i,n){i&1&&(s(0,"span",3),p(1,"Please select the server directory to sync, if it doesn't exist you can create it."),l())}function Em(i,n){if(i&1&&(s(0,"span",3),p(1),l()),i&2){let e=c();r(),y(e.infoMsg)}}function wm(i,n){if(i&1&&(s(0,"th",13),p(1),l()),i&2){let e=c();r(),y(e.currentShowedPath)}}function Pm(i,n){i&1&&(s(0,"th",3),p(1,"Double click to browse directories"),l())}function Am(i,n){if(i&1&&u(0,"fa-icon",25),i&2){let e=c().$implicit;E(I("circle-",e.iconClass,"-icon")),d("icon",e.icon)}}function Nm(i,n){if(i&1&&u(0,"img",23),i&2){let e=c().$implicit;d("src",e.mimeUrl,X)}}function Lm(i,n){if(i&1){let e=b();s(0,"tr",26),_("click",function(){let o=S(e).$implicit,a=c();return g(a.onSelect(o))})("dblclick",function(){let o=S(e).$implicit,a=c();return g(a.browse(o.path))}),s(1,"td")(2,"div",27),h(3,Am,1,4,"fa-icon",22)(4,Nm,1,1,"img",23),s(5,"span",28),p(6),l()()()()}if(i&2){let e=n.$implicit;U("selected",e.selected),r(3),C(e.icon?3:4),r(3),y(e.name)}}var Za=(()=>{let n=class n{constructor(){this.locale=x(K),this.icons={faArrowCircleLeft:m4,faArrowCircleRight:hi,faFolderPlus:A4},this.infoMsg=null,this.canCreateDir=!1,this.router=x(i1),this.store=x(q),this.userService=x(u1),this.filesService=x(E1),this.syncService=x(b1),this.layout=x(L),this.rootPaths=[this.userService.userHavePermission(Ye.PERSONAL_SPACE)?new et({id:0,name:this.layout.translateString(Re.PERSONAL_FILES),path:`${O.FILES}/${O.PERSONAL}`,icon:o1.PERSONAL,hasChildren:!0,enabled:!0,iconClass:"primary"}):null,this.userService.userHavePermission(Ye.SPACES)?new et({id:-1,name:this.layout.translateString(Re.SPACES),path:O.SPACES,icon:o1.SPACES,hasChildren:!0,enabled:!0,iconClass:"primary"}):null,this.userService.userHavePermission(Ye.SHARES)?new et({id:-2,name:this.layout.translateString(Re.SHARES),path:O.SHARES,icon:o1.SHARES,hasChildren:!0,enabled:!0,iconClass:"purple"}):null].filter(Boolean),this.currentPaths=U2([...this.rootPaths]),this.syncService.wizard.remotePath&&this.browse(this.syncService.wizard.remotePath.path.split("/").slice(0,-1).join("/"),this.syncService.wizard.remotePath.name).catch(t=>{console.error(t),this.currentPath="",this.onBack()}),this.layout.setBreadcrumbIcon(v1.WIZARD),this.layout.setBreadcrumbNav({url:`/${B.BASE}/${B.WIZARD}/${B.WIZARD_SERVER}/${Fe.WIZARD_SERVER}`,splicing:3,translating:!0,sameLink:!0})}browse(t,o=null){return nt(this,null,function*(){if(this.currentPath=t||"",this.setCurrentPaths((yield this.filesService.getTreeNode(t)).map(a=>new et(a))),this.setCurrentShowedPath(),this.canCreateDir=this.currentPath.length?zn(`${this.currentPath}/canCreate`,!0):!1,o){let a=this.currentPaths().findIndex(m=>m.name===o);a>-1&&(this.onSelect(this.currentPaths()[a]),this.autoResize.scrollIntoView(Math.max(a,1)*30-30))}else this.onSelect(),this.autoResize.scrollTop()})}onBack(){let t=this.currentPath.split("/");if(t.length===2&&t[0]===O.FILES&&t[1]===O.PERSONAL||t.length<=1)this.currentPath="",this.onSelect(),this.initRootPaths(),this.setCurrentShowedPath(),this.canCreateDir=!1;else{let o=t.length===2&&t[0]===O.FILES?[O.SPACES]:t.slice(0,-1);this.browse(o.join("/")).catch(console.error)}}addDirectory(){this.filesService.make("directory",this.newDirectoryName,this.currentPath,!0).subscribe({next:()=>{this.browse(this.currentPath,this.newDirectoryName).then(()=>this.newDirectoryName="").catch(console.error)},error:t=>this.setInfoMsg(t.error.message)})}onSelect(t){if(this.setInfoMsg(null),this.currentPaths().forEach(o=>o.selected=!1),!t){this.selectPath();return}t.selected=!0,t.isSynchronizable&&(t.enabled?t.isAlreadySynced?(this.setInfoMsg("This directory is already synced"),this.selectPath()):(t.isWriteable||this.setInfoMsg("This directory is read-only, you will not be able to modify it"),this.selectPath(t)):(this.setInfoMsg("This directory is not accessible"),this.selectPath()))}onNext(){this.router.navigate([B.BASE,B.WIZARD,B.WIZARD_SETTINGS]).catch(console.error)}onPrevious(){this.router.navigate([B.BASE,B.WIZARD,B.WIZARD_CLIENT]).catch(console.error)}setServerPath(t){this.syncService.wizard.remotePath=t}setCurrentPaths(t){for(let o of this.store.clientSyncPaths()){let a=new RegExp(`^${o.settings.remotePath}((\\/.*)+|\\/?)$`);for(let m of t)a.test(m.serverPath)&&m.setAlreadySynced()}this.currentPaths.set(t)}initRootPaths(){this.currentPaths.set([...this.rootPaths])}setCurrentShowedPath(){this.currentShowedPath=this.syncService.translateServerPath(this.currentPath)}selectPath(t=null){this.selectedPath=t,this.setServerPath(t)}setInfoMsg(t,o=!1){this.infoMsg=t,o&&setTimeout(()=>this.infoMsg=null,6e3)}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=w({type:n,selectors:[["app-sync-wizard-server"]],viewQuery:function(o,a){if(o&1&&r1(t1,7),o&2){let m;s1(m=l1())&&(a.autoResize=m.first)}},decls:36,vars:29,consts:[[1,"wizard"],[1,"my-2"],[1,"d-flex","align-items-center","justify-content-center","fs-sm",2,"min-height","40px"],["l10nTranslate",""],[1,"app-top-menu","px-0","bg-transparent"],["type","button",1,"btn","btn-sm","btn-secondary",3,"click","disabled","tooltip"],[3,"icon"],[1,"text-warning","mx-auto","fs-sm"],[1,"row","align-items-center"],[1,"input-group"],["type","button",1,"btn","btn-sm","btn-secondary","input-group-text",3,"click","hidden","disabled","tooltip"],["type","text",1,"form-control","form-control-sm","me-1",3,"keyup.enter","ngModelChange","ngModel","hidden","ngModelOptions","placeholder"],[1,"app-table","wizard-nav-header"],[1,"text-truncate"],["appAutoResize","",1,"wizard-nav-content",3,"resizeOffset","useMaxHeight"],[1,"app-table"],["tabindex","-1"],[3,"selected"],[1,"mt-auto"],[1,"d-flex","align-items-start"],["type","button","l10nTranslate","",1,"btn","btn-secondary","me-auto",3,"click"],["type","button","l10nTranslate","",1,"btn","btn-secondary","ms-auto",3,"click","disabled"],[2,"width","32px","height","32px","font-size","16px",3,"icon","class"],["alt","","height","30",3,"src"],[1,"text-truncate","fw-500","ms-2"],[2,"width","32px","height","32px","font-size","16px",3,"icon"],[3,"click","dblclick"],[1,"d-flex","align-items-center"],[1,"ms-1"]],template:function(o,a){o&1&&(s(0,"div",0)(1,"div",1)(2,"div",2),h(3,zm,4,2)(4,Mm,2,0,"span",3),l(),s(5,"div",4)(6,"button",5),z(7,"translate"),_("click",function(){return a.onBack()}),u(8,"fa-icon",6),l(),s(9,"div",7),h(10,Em,2,1,"span",3),l(),s(11,"form",8)(12,"div",9)(13,"button",10),z(14,"translate"),_("click",function(){return a.addDirectory()}),u(15,"fa-icon",6),l(),s(16,"input",11),z(17,"translate"),_("keyup.enter",function(){return a.addDirectory()}),p1("ngModelChange",function(f){return m1(a.newDirectoryName,f)||(a.newDirectoryName=f),f}),l()()()(),s(18,"table",12)(19,"thead")(20,"tr"),h(21,wm,2,1,"th",13)(22,Pm,2,0,"th",3),l()()(),s(23,"div",14)(24,"table",15)(25,"tbody",16),F(26,Lm,7,4,"tr",17,ym),l()()()(),s(28,"div",18)(29,"div",19)(30,"button",20),_("click",function(){return a.onPrevious()}),u(31,"fa-icon",6),p(32," Previous "),l(),s(33,"button",21),_("click",function(){return a.onNext()}),u(34,"fa-icon",6),p(35," Next "),l()()()()),o&2&&(r(3),C(a.selectedPath?3:4),r(3),d("disabled",!a.currentPath)("tooltip",M(7,19,"Back",a.locale.language)),r(2),d("icon",a.icons.faArrowCircleLeft),r(2),C(a.infoMsg?10:-1),r(3),d("hidden",!a.canCreateDir)("disabled",!a.newDirectoryName)("tooltip",M(14,22,"Add",a.locale.language)),r(2),d("icon",a.icons.faFolderPlus),r(),c1("ngModel",a.newDirectoryName),d("hidden",!a.canCreateDir)("ngModelOptions",ve(28,vm))("placeholder",M(17,25,"New folder",a.locale.language)),r(5),C(a.currentPath?21:22),r(2),d("resizeOffset",230)("useMaxHeight",!1),r(3),R(a.currentPaths()),r(5),d("icon",a.icons.faArrowCircleLeft),r(2),d("disabled",!a.selectedPath),r(),d("icon",a.icons.faArrowCircleRight))},dependencies:[N,D,t1,x1,X2,X1,_1,Q2,g1,v0,Z2,z1,Z],encapsulation:2});let i=n;return i})();function km(i,n){if(i&1&&u(0,"fa-icon",24),i&2){let e=c();E(I("circle-",e.syncService.wizard.remotePath.iconClass,"-icon")),d("icon",e.syncService.wizard.remotePath.icon)}}function Dm(i,n){if(i&1&&u(0,"img",7),i&2){let e=c();d("src",e.syncService.wizard.remotePath.mimeUrl,X)}}function Fm(i,n){if(i&1&&(s(0,"div",18),p(1),l()),i&2){let e=c();r(),y(e.error)}}function Rm(i,n){i&1&&(s(0,"span",26),p(1,"and from"),l())}function Im(i,n){i&1&&(s(0,"span",28),p(1,"to"),l())}function Om(i,n){i&1&&(s(0,"span",26),p(1,"(Two-Way)"),l())}function Vm(i,n){i&1&&(s(0,"span",26),p(1,"(One-Way)"),l())}function Bm(i,n){i&1&&(s(0,"span",28),p(1,"the most recent files will be kept"),l())}function Um(i,n){if(i&1&&(s(0,"span",26),p(1,"the files in"),l(),s(2,"span",29),p(3),l(),s(4,"span",26),p(5,"will be preferred"),l()),i&2){let e=c(3);r(3),y(e.syncPath.settings.conflictMode===e.SYNC_PATH_CONFLICT_MODE.LOCAL?e.syncService.wizard.localPath.name:e.syncService.wizard.remotePath.name)}}function Hm(i,n){if(i&1&&(s(0,"div")(1,"span",26),p(2,"In case of conflict,"),l(),s(3,"span"),p(4,"\xA0"),l(),h(5,Bm,2,0,"span",28)(6,Um,6,1),l()),i&2){let e=c(2);r(5),C(e.syncPath.settings.conflictMode===e.SYNC_PATH_CONFLICT_MODE.RECENT?5:6)}}function $m(i,n){if(i&1&&(s(0,"div")(1,"span",26),p(2,"All files created or modified in"),l(),s(3,"span",30),p(4),l(),s(5,"span",26),p(6,"will be ignored and deleted"),l()()),i&2){let e=c(2);r(4),y(e.syncPath.settings.mode===e.SYNC_PATH_MODE.DOWNLOAD?e.syncService.wizard.localPath.name:e.syncService.wizard.remotePath.name)}}function Gm(i,n){if(i&1&&(s(0,"div",25)(1,"span",26),p(2,"The data will be synchronized from"),l(),s(3,"span",27),p(4),l(),h(5,Rm,2,0,"span",26)(6,Im,2,0,"span",28),s(7,"span",27),p(8),l(),h(9,Om,2,0,"span",26)(10,Vm,2,0,"span",26),l(),u(11,"br"),s(12,"div",25),h(13,Hm,7,1,"div")(14,$m,7,1,"div"),l()),i&2){let e=c();r(4),y(e.syncPath.settings.mode===e.SYNC_PATH_MODE.DOWNLOAD?"the server folder":"the client folder"),r(),C(e.syncPath.settings.mode===e.SYNC_PATH_MODE.BOTH?5:6),r(3),y(e.syncPath.settings.mode===e.SYNC_PATH_MODE.DOWNLOAD?"the client folder":"the server folder"),r(),C(e.syncPath.settings.mode===e.SYNC_PATH_MODE.BOTH?9:10),r(4),C(e.syncPath.settings.mode===e.SYNC_PATH_MODE.BOTH?13:14)}}var Ja=(()=>{let n=class n{constructor(){this.syncService=x(b1),this.SYNC_PATH_CONFLICT_MODE=pt,this.SYNC_PATH_MODE=be,this.icons={CLIENT:v1.CLIENT,SERVER:v1.SERVER},this.translatedRemotePath=this.syncService.translateServerPath(this.syncService.wizard.remotePath.serverPath),this.error=null,this.router=x(i1),this.layout=x(L),this.syncPath=new Ge({settings:{name:this.syncService.wizard.localPath.name,localPath:this.syncService.wizard.localPath.path,remotePath:this.syncService.wizard.remotePath.serverPath,enabled:this.syncService.wizard.settings.enabled,mode:this.syncService.wizard.remotePath.isWriteable?this.syncService.wizard.settings.mode:be.DOWNLOAD,conflictMode:this.syncService.wizard.settings.conflictMode,diffMode:this.syncService.wizard.settings.diffMode,scheduler:this.syncService.wizard.settings.scheduler,permissions:this.syncService.wizard.remotePath.permissions}}),this.layout.setBreadcrumbIcon(v1.WIZARD),this.layout.setBreadcrumbNav({url:`/${B.BASE}/${B.WIZARD}/${B.WIZARD_SETTINGS}/${Fe.WIZARD_SETTINGS}`,splicing:3,translating:!0,sameLink:!0})}onPrevious(){this.router.navigate([B.BASE,B.WIZARD,B.WIZARD_SERVER]).catch(console.error)}onSubmit(){return nt(this,null,function*(){let t=yield this.syncService.addPath(this.syncPath.settings);typeof t=="string"?this.error=t:(yield this.syncService.refreshPaths(),this.router.navigate([B.BASE,B.PATHS],{state:{id:t.id,withSettings:!1}}).catch(console.error),this.syncService.resetWizard())})}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=w({type:n,selectors:[["app-sync-wizard-settings"]],decls:38,vars:12,consts:[[1,"wizard","fs-sm"],[1,"d-flex","flex-row","justify-content-center","mb-3"],[1,"d-flex","flex-column","align-items-end"],[1,"fw-bold","mb-1","me-1"],[3,"icon"],["l10nTranslate","",1,"ms-2"],["placement","left",1,"cursor-pointer",3,"tooltip"],["alt","","height","35",3,"src"],[1,"position-absolute","text-truncate","pe-2",2,"top","110px"],[1,"d-flex","align-items-end","mb-2","mx-5"],[3,"syncPath"],[1,"d-flex","flex-column","align-items-start"],[1,"fw-bold","mb-1","ms-1"],["placement","right",1,"cursor-pointer",3,"tooltip"],[2,"width","32px","height","32px","font-size","16px",3,"icon","class"],[1,"position-absolute","text-truncate","ps-2",2,"top","110px"],[1,"mt-auto"],[1,"mb-auto"],["l10nTranslate","",1,"text-center","text-warning"],[1,"d-flex","align-items-start"],["translate","","type","button",1,"btn","btn-sm","btn-secondary","me-auto",3,"click"],[1,"fas","fa-arrow-circle-left","fa-fw"],["translate","","type","button",1,"btn","btn-sm","btn-secondary","ms-auto",3,"click","disabled"],[1,"fas","fa-check-circle","fa-fw"],[2,"width","32px","height","32px","font-size","16px",3,"icon"],[1,"text-center"],["l10nTranslate",""],["l10nTranslate","",1,"mx-1"],["l10nTranslate","",1,"fw-bold"],[1,"fw-bold","mx-1"],["l10nTranslate","",1,"fw-bold","mx-1"]],template:function(o,a){o&1&&(s(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",2)(4,"div",3),u(5,"fa-icon",4),s(6,"span",5),p(7,"Client"),l()(),s(8,"div",6),u(9,"img",7),l(),s(10,"div",8),p(11),l()()(),s(12,"div",9),u(13,"app-sync-path-direction-icon",10),l(),s(14,"div",11)(15,"div",11)(16,"div",12),u(17,"fa-icon",4),s(18,"span",5),p(19,"Server"),l()(),s(20,"div",13),h(21,km,1,4,"fa-icon",14)(22,Dm,1,1,"img",7),l(),s(23,"div",15),p(24),l()()()(),u(25,"hr",16)(26,"app-sync-path-settings",10)(27,"hr",17),h(28,Fm,2,1,"div",18)(29,Gm,15,5),s(30,"div",16)(31,"div",19)(32,"button",20),_("click",function(){return a.onPrevious()}),u(33,"i",21),p(34," Previous "),l(),s(35,"button",22),_("click",function(){return a.onSubmit()}),u(36,"i",23),p(37," Done "),l()()()()),o&2&&(r(5),d("icon",a.icons.CLIENT),r(3),d("tooltip",a.syncService.wizard.localPath.path),r(),d("src",a.syncService.wizard.localPath.mimeUrl,X),r(2),y(a.syncService.wizard.localPath.name),r(2),d("syncPath",a.syncPath),r(4),d("icon",a.icons.SERVER),r(3),d("tooltip",a.translatedRemotePath),r(),C(a.syncService.wizard.remotePath.icon?21:22),r(3),y(a.syncService.wizard.remotePath.name),r(2),d("syncPath",a.syncPath),r(2),C(a.error?28:29),r(7),d("disabled",!a.syncPath.settings.name))},dependencies:[D,N,z1,f2,Nn],encapsulation:2});let i=n;return i})();var er=()=>x(u1).userHavePermission(Ye.DESKTOP_APP),tr=()=>{let i=x(u1);return i.userHavePermission(Ye.DESKTOP_APP_SYNC)&&!!i.user.clientId},ir=()=>{let i=x(b1),n=!!(i.wizard.localPath&&i.wizard.remotePath);return n||x(i1).navigate([B.BASE,B.WIZARD,i.wizard.localPath?B.WIZARD_SERVER:B.WIZARD_CLIENT]).catch(console.error),n},nr=()=>{let n=!!x(b1).wizard.localPath;return n||x(i1).navigate([B.BASE,B.WIZARD,B.WIZARD_CLIENT]).catch(console.error),n};var or=()=>x(b1).refreshPaths();var ar=[{path:B.BASE,pathMatch:"prefix",canActivate:[tr],resolve:[or],children:[{path:"",pathMatch:"full",redirectTo:B.PATHS},{path:B.PATHS,pathMatch:"full",component:qa},{path:B.TRANSFERS,pathMatch:"full",component:Qa},{path:B.WIZARD,pathMatch:"full",redirectTo:`${B.WIZARD}/${B.WIZARD_CLIENT}`},{path:`${B.WIZARD}/${B.WIZARD_CLIENT}`,pathMatch:"full",component:Xa},{path:`${B.WIZARD}/${B.WIZARD_SERVER}`,canActivate:[nr],pathMatch:"full",component:Za},{path:`${B.WIZARD}/${B.WIZARD_SETTINGS}`,canActivate:[ir],pathMatch:"full",component:Ja}]}];function Wm(i,n){if(i&1&&u(0,"fa-icon",4),i&2){let e=c();d("icon",e.icons.faSpinner)}}var rr=(()=>{let n=class n{constructor(){this.wasDeleted=new h1,this.layout=x(L),this.icons={faSpinner:Z1,faTrashCan:$1},this.submitted=!1,this.syncService=x(b1)}onEnter(){this.onSubmit()}onSubmit(){this.submitted||(this.submitted=!0,this.syncService.deleteClient(this.client.id).subscribe({next:()=>{this.layout.sendNotification("info","Client deleted",this.client.info.node),this.wasDeleted.emit(),this.layout.closeDialog()},error:t=>{this.layout.sendNotification("error","Unable to delete client",t.error.message),this.submitted=!1}}))}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=w({type:n,selectors:[["app-sync-client-delete-dialog"]],hostBindings:function(o,a){o&1&&_("keyup.enter",function(){return a.onEnter()},Ae)},inputs:{client:"client"},outputs:{wasDeleted:"wasDeleted"},decls:21,vars:6,consts:[[1,"modal-header"],["translate","",1,"modal-title"],[3,"icon"],["l10nTranslate","",1,"ms-2"],["animation","spin",1,"ms-2",3,"icon"],["aria-label","Close","type","button",1,"btn-close","btn-close-white",3,"click"],[1,"modal-body"],["size","lg",1,"me-2",3,"icon","fixedWidth"],["l10nTranslate","",1,"ms-1"],["translate",""],[1,"modal-footer"],["data-dismiss","modal","l10nTranslate","","type","button",1,"btn","btn-sm","btn-secondary",3,"click"],["l10nTranslate","","type","button",1,"btn","btn-sm","btn-danger",3,"click","disabled"]],template:function(o,a){o&1&&(s(0,"div",0)(1,"h4",1),u(2,"fa-icon",2),s(3,"span",3),p(4,"Client"),l(),h(5,Wm,1,1,"fa-icon",4),l(),s(6,"button",5),_("click",function(){return a.layout.closeDialog()}),l()(),s(7,"div",6)(8,"div")(9,"b"),u(10,"fa-icon",7),p(11),l(),s(12,"span",8),p(13,"will be removed"),l()(),s(14,"small",9),p(15,"The client will no longer have permission to access your account and will no longer be able to synchronize."),l()(),s(16,"div",10)(17,"button",11),_("click",function(){return a.layout.closeDialog()}),p(18,"Cancel"),l(),s(19,"button",12),_("click",function(){return a.onSubmit()}),p(20,"Confirm"),l()()),o&2&&(r(2),d("icon",a.icons.faTrashCan),r(3),C(a.submitted?5:-1),r(5),d("icon",a.client.icon)("fixedWidth",!1),r(),y(a.client.info.node),r(8),d("disabled",a.submitted))},dependencies:[N,D],encapsulation:2,changeDetection:0});let i=n;return i})();var sr=(i,n)=>n.id;function qm(i,n){if(i&1&&(u(0,"fa-icon",13),z(1,"translate")),i&2){let e=c(2);d("icon",e.icons.faCircle)("tooltip",M(1,2,"This client",e.locale.language))}}function Ym(i,n){if(i&1&&(p(0),z(1,"amTimeAgo")),i&2){let e=c().$implicit;k(" ",M(1,1,e.settings.lastSync,!0)," ")}}function jm(i,n){if(i&1&&(p(0),z(1,"translate")),i&2){let e=c(3);k(" ",M(1,1,"never",e.locale.language)," ")}}function Km(i,n){if(i&1){let e=b();s(0,"div",20),_("click",function(){let o=S(e).$implicit,a=c(2);return g(a.onSelectPath(o))})("dblclick",function(){S(e);let o=c(2);return g(o.onEditPath())}),s(1,"div",21),u(2,"img",22),s(3,"div",23)(4,"span",24),p(5),l(),s(6,"div"),u(7,"fa-icon",25),s(8,"span",26)(9,"span"),p(10),l()()()()(),s(11,"div",27),u(12,"fa-icon",2),p(13),z(14,"amTimeAgo"),l(),s(15,"div"),u(16,"fa-icon",2),h(17,Ym,2,4)(18,jm,2,4),l()()}if(i&2){let e=n.$implicit,t=c(2);U("selected",t.selectedPath&&t.selectedPath.id===e.id),r(2),d("src",e.mimeUrl,X),r(3),y(e.settings.name),r(),E(I("d-flex align-items-center text-",e.iconClass)),r(),d("icon",e.icon),r(3),y(e.showedPath),r(2),d("icon",t.icons.faPlusCircle),r(),k(" ",M(14,16,e.createdAt,!0)," "),r(2),E(I("badge rounded-pill sync-newly-",e.newly)),r(),d("icon",t.icons.faRotate),r(),C(e.newly?17:18)}}function Qm(i,n){if(i&1){let e=b();s(0,"div",8),_("click",function(){let o=S(e).$implicit,a=c();return g(a.onSelectClient(o))}),s(1,"div",9)(2,"div",10)(3,"div",11),u(4,"fa-icon",2),s(5,"div",12),p(6),l(),h(7,qm,2,5,"fa-icon",13),l(),s(8,"div"),u(9,"fa-icon",2),s(10,"div")(11,"span",14),p(12),l(),p(13),z(14,"amTimeAgo"),l()(),s(15,"div",11),u(16,"fa-icon",15),s(17,"div"),p(18),l()(),s(19,"div",11),u(20,"fa-icon",2),s(21,"div"),p(22),l()(),s(23,"div",11),u(24,"fa-icon",2),s(25,"div",16),p(26),l(),s(27,"div",17),p(28),l()(),s(29,"div",11),u(30,"fa-icon",2),s(31,"div"),p(32),l()(),s(33,"div",11),u(34,"fa-icon",2),s(35,"div"),p(36),z(37,"amDateFormat"),z(38,"amDateFormat"),l()()()(),s(39,"div",18),F(40,Km,19,19,"div",19,sr),l()()}if(i&2){let e=n.$implicit,t=c();r(),U("selected",t.selected&&t.selected.id===e.id),r(3),d("icon",t.icons.CLIENT),r(2),y(e.info.node),r(),C(e.isCurrentClient?7:-1),r(),E(I("d-flex align-items-center ",e.expiration.reached?"fw-bold text-danger":e.expiration.approaching?"fw-bold text-warning":"")),r(),d("icon",t.icons.faKey),r(3),y(e.expiration.reached?"The access has expired":"The access expires"),r(),k("\xA0",e1(14,25,e.expiration.value)," "),r(3),d("icon",e.icon),r(2),Y1("",e.osName," ",e.info.osRelease),r(2),d("icon",t.icons.faCircleUser),r(2),y(e.info.user),r(2),d("icon",t.icons.faCodeBranch),r(2),y(e.info.type),r(2),y(e.info.version),r(2),d("icon",t.icons.faAt),r(2),Y1("",e.currentIp,"\xA0-\xA0",e.lastIp),r(2),d("icon",t.icons.faClock),r(2),Y1("",M(37,27,e.currentAccess,"L HH:mm:ss"),"\xA0-\xA0",M(38,30,e.lastAccess,"L HH:mm:ss")),r(4),R(e.paths)}}var lr=(()=>{let n=class n{constructor(){this.locale=x(K),this.icons={faArrowRotateRight:lt,faTrashCan:$1,CLIENT:v1.CLIENT,faCircle:u4,faCircleUser:S4,faCodeBranch:J0,faAt:Y0,faClock:ci,faRotate:he,faPlusCircle:f4,faMapMarkerAlt:qt,faPen:$t,faKey:at},this.loading=!1,this.clients=[],this.router=x(i1),this.layout=x(L),this.syncService=x(b1),this.layout.setBreadcrumbIcon(le.CLIENTS),this.layout.setBreadcrumbNav({url:`/${S1.BASE}/${S1.CLIENTS}/${je.CLIENTS}`,splicing:2,translating:!0,sameLink:!0});let t=this.router.getCurrentNavigation()?.extras.state;t?.clientId&&(this.focusOnSelectId=t.clientId,this.focusOnSelectPathId=t.pathId),this.loadClients()}loadClients(){this.loading=!0,this.onSelectClient(),this.onSelectPath(),this.syncService.getClients().subscribe({next:t=>{go(t,"id",!1),this.clients=t,this.focusOnSelectId&&this.onSelectClient(this.clients.find(o=>o.id===this.focusOnSelectId)),this.focusOnSelectPathId&&this.selected&&(this.onSelectPath(this.selected.paths.find(o=>o.id===this.focusOnSelectPathId)),this.focusOnSelectPathId=null)},error:t=>{console.log(t),this.loading=!1,this.layout.sendNotification("error","Clients",t.error.message)}})}onSelectClient(t){this.selected=t||null}onSelectPath(t){this.selectedPath=t||null}onDeleteClient(){this.layout.openDialog(rr,"md",{initialState:{client:this.selected}}).content.wasDeleted.pipe(w1(1)).subscribe(()=>this.loadClients())}gotoPath(t){this.syncService.goToPath(t,!1)}onEditPath(){this.selected.isCurrentClient?this.router.navigate([B.BASE,B.PATHS],{state:{id:this.selectedPath.id,withSettings:!0}}).catch(console.error):this.layout.openDialog(Ln,"md",{initialState:{syncPathSelected:this.selectedPath,syncClientSelected:this.selected}}).content.mustRefresh.pipe(w1(1)).subscribe(()=>{this.focusOnSelectId=this.selected.id,this.focusOnSelectPathId=this.selectedPath.id,this.loadClients()})}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=w({type:n,selectors:[["app-sync-clients"]],decls:16,vars:23,consts:[[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"],["container","body","type","button",1,"btn","btn-sm","btn-secondary","me-1",3,"click","disabled","tooltip"],["placement","auto","type","button",1,"btn","btn-sm","btn-secondary","ms-auto","me-1",3,"click","disabled","tooltip"],["placement","auto","type","button",1,"btn","btn-sm","btn-secondary",3,"click","disabled","tooltip"],["appAutoResize","",1,"app-sync-clients"],[1,"d-flex"],[1,"d-flex",3,"click"],[1,"left-panel","app-div-hovered","col-md-5","col-lg-4","col-sm-12"],[1,"left-panel-content","p-2"],[1,"d-flex","align-items-center"],[1,"me-auto","fw-semibold"],[1,"text-light-green","cursor-pointer",3,"icon","tooltip"],["l10nTranslate",""],[1,"osIcon",3,"icon"],["l10nTranslate","",1,"me-2"],[1,"badge","rounded-pill","bg-primary"],[1,"right-panel","d-none","d-md-flex","d-lg-flex","col-md-7","col-lg-8","p-0"],[1,"d-flex","align-items-center","cursor-pointer","app-div-hovered","py-1","ps-2","pe-4",3,"selected"],[1,"d-flex","align-items-center","cursor-pointer","app-div-hovered","py-1","ps-2","pe-4",3,"click","dblclick"],[1,"d-flex","align-items-center","text-truncate","px-2","py-1","me-auto"],["alt","","draggable","false","height","30",3,"src"],[1,"d-flex","flex-column","text-truncate","ms-2",2,"height","34px"],[1,"fs-xxs","text-truncate","user-select-none"],[1,"me-1",3,"icon"],[1,"fs-xxxs","text-truncate","user-select-none"],[1,"badge","rounded-pill","bg-dark","me-1"]],template:function(o,a){o&1&&(s(0,"div",0)(1,"button",1),z(2,"translate"),_("click",function(){return a.loadClients()}),u(3,"fa-icon",2),l(),s(4,"button",3),z(5,"translate"),_("click",function(){return a.onDeleteClient()}),u(6,"fa-icon",2),l(),s(7,"button",4),z(8,"translate"),_("click",function(){return a.gotoPath(a.selectedPath)}),u(9,"fa-icon",2),l(),s(10,"button",5),z(11,"translate"),_("click",function(){return a.onEditPath()}),u(12,"fa-icon",2),l()(),s(13,"div",6),F(14,Qm,42,33,"div",7,sr),l()),o&2&&(r(),d("tooltip",M(2,11,"Refresh",a.locale.language)),r(2),d("icon",a.icons.faArrowRotateRight),r(),d("disabled",!a.selected)("tooltip",M(5,14,"Remove",a.locale.language)),r(2),d("icon",a.icons.faTrashCan),r(),d("disabled",!a.selectedPath)("tooltip",M(8,17,"Go to",a.locale.language)),r(2),d("icon",a.icons.faMapMarkerAlt),r(),d("disabled",!a.selectedPath)("tooltip",M(11,20,"Edit",a.locale.language)),r(2),d("icon",a.icons.faPen),r(2),R(a.clients))},dependencies:[z1,N,t1,D,Z,R1,I1],styles:[`.app-sync-clients[_ngcontent-%COMP%]{font-size:.7rem;display:flex;flex-direction:column;flex:1 1 auto!important}.app-sync-clients[_ngcontent-%COMP%] .left-panel[_ngcontent-%COMP%]{display:flex;flex-direction:column;cursor:pointer;border-right:solid 1px;border-bottom:solid 1px}.app-sync-clients[_ngcontent-%COMP%] .left-panel[_ngcontent-%COMP%] .left-panel-content[_ngcontent-%COMP%] .osIcon[_ngcontent-%COMP%]{font-size:1.2rem;margin-right:.4rem;margin-left:-2px}.app-sync-clients[_ngcontent-%COMP%] .left-panel[_ngcontent-%COMP%] .left-panel-content[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]:first-child:not(.osIcon){font-size:1rem;margin-right:.4rem}.app-sync-clients[_ngcontent-%COMP%] .left-panel[_ngcontent-%COMP%] .left-panel-content[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{height:26px}.app-sync-clients[_ngcontent-%COMP%] .right-panel[_ngcontent-%COMP%]{display:flex;flex-direction:column;border-bottom:solid 1px}
2
+
3
+
4
+
5
+
6
+
7
+ `]});let i=n;return i})();var cr="Sync-in";var ht="webdav",We={SERVER:cr,WEBDAV:ht,PERSONAL:mt.PERSONAL,SPACES:mt.SPACES,SHARES:mt.SHARES,TRASH:mt.TRASH},tE={[We.SERVER]:{route:"/",spaceRepository:null},[We.WEBDAV]:{route:`/${ht}`,spaceRepository:null},[We.PERSONAL]:{route:`/${ht}/${We.PERSONAL}`,spaceRepository:[wt.FILES,mt.PERSONAL]},[We.SPACES]:{route:`/${ht}/${We.SPACES}`,spaceRepository:[wt.FILES]},[We.SHARES]:{route:`/${ht}/${We.SHARES}`,spaceRepository:[wt.SHARES]},[We.TRASH]:{route:`/${ht}/${We.TRASH}`,spaceRepository:[wt.TRASH]}};function Xm(i,n){if(i&1&&(s(0,"option",15),p(1),z(2,"capitalize"),l()),i&2){let e=n.$implicit,t=c(2);d("ngValue",t.allOnlineStatus.indexOf(e)),r(),y(e1(2,2,e))}}function Zm(i,n){if(i&1&&(s(0,"span",34),u(1,"fa-icon",38),s(2,"span",39),p(3,"Administrator"),l()()),i&2){let e=c(3);r(),d("icon",e.icons.faKey)}}function Jm(i,n){if(i&1&&(s(0,"span",40),p(1),l()),i&2){let e=n.$implicit;r(),y(e)}}function ep(i,n){if(i&1&&F(0,Jm,2,1,"span",40,q1),i&2){let e=c(3);R(e.user.applications)}}function tp(i,n){if(i&1&&(s(0,"li",29)(1,"span",28),p(2,"Permissions"),l(),h(3,Zm,4,1,"span",34)(4,ep,2,0),l(),s(5,"li",35)(6,"span",28),p(7,"Storage Space"),l(),s(8,"span",36),u(9,"app-storage-usage",37),l()()),i&2){let e=c(2);r(3),C(e.user.isAdmin?3:4),r(6),d("item",e.user)}}function ip(i,n){if(i&1){let e=b();s(0,"div",3)(1,"div",16)(2,"div",9)(3,"div",17)(4,"div",18)(5,"div",19),u(6,"img",20)(7,"span"),l()(),s(8,"div",21)(9,"div",22),p(10),l(),s(11,"div",23),p(12),l(),s(13,"div",24),p(14),z(15,"translate"),z(16,"amTimeAgo"),l(),s(17,"select",25),p1("ngModelChange",function(o){S(e);let a=c();return m1(a.user.onlineStatus,o)||(a.user.onlineStatus=o),g(o)}),_("ngModelChange",function(o){S(e);let a=c();return g(a.setOnlineStatus(o))}),F(18,Xm,3,4,"option",15,q1),l()()(),s(20,"ul",26)(21,"li",27)(22,"span",28),p(23,"Login"),l(),s(24,"span"),p(25),l()(),s(26,"li",29)(27,"span",28),p(28,"IP Addresses"),l(),s(29,"span",30),p(30),l(),s(31,"span",31),p(32),l()(),s(33,"li",29)(34,"span",28),p(35,"Connections"),l(),s(36,"span",30),p(37),z(38,"amDateFormat"),l(),s(39,"span",31),p(40),z(41,"amDateFormat"),l()(),h(42,tp,10,2),s(43,"li",27)(44,"span",28),p(45,"WebDAV"),l(),s(46,"span",32),_("click",function(){S(e);let o=c();return g(o.clipBoardLink())}),u(47,"fa-icon",33),p(48),l()()()()()()}if(i&2){let e=c();r(6),d("src",e.userAvatar,X),r(),E(I("avatar-",e.allOnlineStatus[e.user.onlineStatus])),r(3),y(e.user.fullName),r(2),y(e.user.email),r(2),Y1("",M(15,17,"Member since",e.locale.language)," ",M(16,20,e.user.createdAt,!0)),r(3),c1("ngModel",e.user.onlineStatus),r(),R(e.allOnlineStatus),r(7),y(e.user.login),r(5),y(e.user.currentIp),r(2),y(e.user.lastIp),r(5),y(e1(38,23,e.user.currentAccess)),r(3),y(e1(41,25,e.user.lastAccess)),r(2),C(e.user.isUser?42:-1),r(5),d("icon",e.icons.faCopy),r(),k(" ",e.webdavUrl," ")}}function np(i,n){if(i&1&&u(0,"app-password-strength-bar",8),i&2){let e=c();d("passwordToCheck",e.newPassword)}}function op(i,n){if(i&1){let e=b();s(0,"div",10)(1,"span",11),p(2,"Avatar"),l(),s(3,"div",12)(4,"button",41),_("click",function(){S(e);let o=c();return g(o.genAvatar())}),p(5,"Generate"),l(),s(6,"button",42)(7,"span",39),p(8,"Import"),l(),s(9,"input",43),_("change",function(o){S(e);let a=c();return g(a.uploadAvatar(o))}),l()()()()}}function ap(i,n){if(i&1&&(s(0,"option",14),p(1),l()),i&2){let e=n.$implicit;d("ngValue",e),r(),y(e)}}function rp(i,n){if(i&1&&(s(0,"option",15),p(1),l()),i&2){let e=n.$implicit,t=c();d("ngValue",t.allNotifications.indexOf(e)),r(),y(e)}}function sp(i,n){if(i&1){let e=b();s(0,"div",10)(1,"span",44),p(2,"Password"),l(),s(3,"div",12)(4,"div",22)(5,"app-input-password",45),p1("passwordChange",function(o){S(e);let a=c();return m1(a.oldPassword,o)||(a.oldPassword=o),g(o)}),l()(),s(6,"div",22)(7,"app-input-password",46),p1("passwordChange",function(o){S(e);let a=c();return m1(a.newPassword,o)||(a.newPassword=o),g(o)}),l()(),s(8,"button",47),_("click",function(){S(e);let o=c();return g(o.submitPassword())}),p(9,"Update"),l()()()}if(i&2){let e=c();r(5),c1("password",e.oldPassword),r(2),c1("password",e.newPassword),d("disabled",!(e.oldPassword!=null&&e.oldPassword.length))("isRequired",!!(e.oldPassword!=null&&e.oldPassword.length))("passwordMinLength",e.passwordMinLength)("showGenerator",!0)}}var pr=(()=>{let n=class n{constructor(){this.locale=x(K),this.allNotifications=Object.values(W4),this.allOnlineStatus=ct,this.passwordMinLength=8,this.icons={faCopy:zi,faKey:at},this.userAvatar=null,this.webdavUrl=`${window.location.origin}/${ht}`,this.store=x(q),this.layout=x(L),this.languages=this.layout.getLanguages(!0),this.userService=x(u1),this.clipBoardService=x(Eo),this.subscriptions=[],this.subscriptions.push(this.store.user.subscribe(t=>this.user=t)),this.subscriptions.push(this.store.userAvatarUrl.subscribe(t=>this.userAvatar=t)),this.layout.setBreadcrumbIcon(le.ACCOUNT),this.layout.setBreadcrumbNav({url:`/${S1.BASE}/${S1.ACCOUNT}/${je.ACCOUNT}`,splicing:2,translating:!0,sameLink:!0})}get language(){return this.user?.language||Kn}set language(t){t===Kn&&(t=null),this.userService.changeLanguage({language:t}).subscribe({next:()=>this.updateLanguage(t),error:()=>this.layout.sendNotification("error","Configuration","Unable to update language")})}ngOnDestroy(){this.subscriptions.forEach(t=>t.unsubscribe())}setOnlineStatus(t){this.userService.changeOnlineStatus(t)}genAvatar(){this.userService.genAvatar()}uploadAvatar(t){this.userService.uploadAvatar(t.target.files[0])}submitPassword(){if(!this.oldPassword){this.layout.sendNotification("error","Configuration","Current password missing !");return}if(!this.newPassword){this.layout.sendNotification("error","Configuration","New password missing !");return}if(this.newPassword.length<8){this.layout.sendNotification("warning","Configuration","New password must have 8 characters minimum");return}this.userService.changePassword({oldPassword:this.oldPassword,newPassword:this.newPassword}).subscribe({next:()=>this.goodCurrentPassword(),error:()=>this.badCurrentPassword()})}updateNotification(t){this.userService.changeNotification({notification:t}).subscribe({next:()=>{this.user.notification=t,this.layout.sendNotification("info","Configuration","Notification preference updated")},error:()=>this.layout.sendNotification("error","Configuration","Unable to update notification preference")})}clipBoardLink(){this.clipBoardService.copyFromContent(this.webdavUrl),this.layout.sendNotification("info","Link copied",this.webdavUrl)}updateLanguage(t){this.user.language=t,this.layout.setLanguage(t),this.layout.sendNotification("info","Configuration","Language updated")}badCurrentPassword(){this.oldPassword="",this.layout.sendNotification("warning","Configuration","Current password does not match")}goodCurrentPassword(){this.oldPassword="",this.newPassword="",this.layout.sendNotification("info","Configuration","Password has been updated")}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=w({type:n,selectors:[["app-user-account"]],decls:28,vars:7,consts:[["appAutoResize","",1,"profile-page",3,"resizeOffset"],[1,"container-fluid"],[1,"row"],[1,"col-lg-6","col-sm-12","p-2"],[1,"box","box-primary","box-solid","mb-0"],[1,"d-flex","box-header","align-items-center"],["l10nTranslate","",1,"box-title","me-5"],[1,"fs-xxxs"],[3,"passwordToCheck"],[1,"box-body"],[1,"row","mb-3"],["l10nTranslate","",1,"col-3","align-self-center"],[1,"col-auto"],[1,"form-select","form-select-sm",3,"ngModelChange","ngModel"],[3,"ngValue"],["l10nTranslate","",3,"ngValue"],[1,"box","box-primary","mb-0"],[1,"user-header"],[1,"d-flex","flex-column","justify-content-center","me-2"],[1,"avatar-xl"],["alt","",1,"avatar-img","profile-user-img",3,"src"],[1,"user-details"],[1,"mb-1"],[1,"fs-xxs","text-nowrap"],[1,"text-muted","fs-xxs"],[1,"form-select","form-select-sm","my-auto","mt-2",3,"ngModelChange","ngModel"],[1,"list-group","my-2"],[1,"list-group-item","d-flex","justify-content-between","align-items-center"],["l10nTranslate","",1,"me-auto","pe-4"],[1,"list-group-item","d-flex","align-items-center","justify-content-end","flex-wrap"],[1,"badge","bg-warning","rounded-pill","my-1"],[1,"badge","bg-secondary-alt","rounded-pill","ms-1","my-1"],[1,"text-primary","text-end","cursor-pointer",3,"click"],[3,"icon"],[1,"badge","bg-gray-dark","rounded-pill","ms-1","my-1"],[1,"list-group-item","d-flex","align-items-center"],[1,"col-5"],[3,"item"],[1,"me-1",3,"icon"],["l10nTranslate",""],["l10nTranslate","",1,"badge","bg-gray-dark","rounded-pill","ms-1","my-1"],["type","button","l10nTranslate","",1,"btn","btn-xs","btn-success","me-1",3,"click"],["type","button",1,"btn-file-upload","btn","btn-xs","btn-secondary"],["accept","image/*","name","file","role","button","type","file",3,"change"],["l10nTranslate","",1,"col-3","align-self-start","text-nowrap"],["placeholder","current password",3,"passwordChange","password"],["placeholder","new password",3,"passwordChange","password","disabled","isRequired","passwordMinLength","showGenerator"],["type","button","l10nTranslate","",1,"d-flex","btn","btn-xs","btn-primary","text-nowrap",3,"click"]],template:function(o,a){o&1&&(s(0,"div",0)(1,"div",1)(2,"div",2),h(3,ip,49,27,"div",3),s(4,"div",3)(5,"div",4)(6,"div",5)(7,"h3",6),p(8,"Configuration"),l(),s(9,"span",7),h(10,np,1,1,"app-password-strength-bar",8),l()(),s(11,"div",9),h(12,op,10,0,"div",10),s(13,"div",10)(14,"span",11),p(15,"Language"),l(),s(16,"div",12)(17,"select",13),p1("ngModelChange",function(f){return m1(a.language,f)||(a.language=f),f}),F(18,ap,2,2,"option",14,q1),l()()(),s(20,"div",10)(21,"span",11),p(22,"Notification"),l(),s(23,"div",12)(24,"select",13),_("ngModelChange",function(f){return a.updateNotification(f)}),F(25,rp,2,2,"option",15,q1),l()()(),h(27,sp,10,6,"div",10),l()()()()()()),o&2&&(d("resizeOffset",40),r(3),C(a.user?3:-1),r(7),C(a.newPassword?10:-1),r(2),C(a.user.isUser?12:-1),r(5),c1("ngModel",a.language),r(),R(a.languages),r(6),d("ngModel",a.user==null?null:a.user.notification),r(),R(a.allNotifications),r(2),C(a.user.isUser?27:-1))},dependencies:[t1,x1,ue,_e,fe,_1,g1,Ri,bo,D,N,Co,yo,Jt,Z,R1,I1],encapsulation:2});let i=n;return i})();var k2=(function(i){return i.WIN="win",i.MAC="mac",i.LINUX="linux",i.NODE="node",i})(k2||{});function lp(i,n){if(i&1&&(s(0,"div",1)(1,"span")(2,"span",3),p(3,"Repository"),l(),p(4,":\xA0"),s(5,"span",4),p(6),l()(),s(7,"span",5),p(8,"Version:\xA0"),s(9,"b"),p(10),l()(),s(11,"span"),p(12),z(13,"amDateFormat"),l()()),i&2){let e=c();r(6),y(e.store.appStoreManifest().repository),r(4),y(e.store.appStoreManifest().version),r(2),y(M(13,3,e.store.appStoreManifest().date,"L"))}}function cp(i,n){if(i&1&&(u(0,"fa-icon",15),s(1,"h5",16),p(2,"Windows"),l()),i&2){let e=c(3);d("icon",e.icons.faWindows)}}function mp(i,n){if(i&1&&(u(0,"fa-icon",15),s(1,"h5",16),p(2,"Mac"),l()),i&2){let e=c(3);d("icon",e.icons.faApple)}}function pp(i,n){if(i&1&&(u(0,"fa-icon",15),s(1,"h5",16),p(2,"Linux"),l()),i&2){let e=c(3);d("icon",e.icons.faLinux)}}function dp(i,n){if(i&1&&(u(0,"fa-icon",15),s(1,"h5",16),p(2,"Command Line"),l()),i&2){let e=c(3);d("icon",e.icons.faTerminal)}}function fp(i,n){if(i&1){let e=b();s(0,"div",17)(1,"span",3),p(2,"System requirements"),l(),s(3,"span"),p(4,":\xA0Node.js 22+"),l()(),s(5,"a",18),_("click",function(){S(e);let o=c().$implicit,a=c(2);return g(a.download(o,!0))}),s(6,"span",3),p(7,"Download tar.gz version"),l(),p(8,"\xA0 "),l()}}function up(i,n){if(i&1){let e=b();s(0,"div",17)(1,"span",3),p(2,"System requirements"),l(),s(3,"span"),p(4),l()(),s(5,"a",18),_("click",function(){S(e);let o=c().$implicit,a=c(2);return g(a.download(o,!0))}),p(6),l()}if(i&2){let e=c().$implicit,t=c(2);r(4),k(":\xA0",e===t.APP_STORE_OS.MAC?"Intel 64bit":"64bit"),r(2),y(e===t.APP_STORE_OS.MAC?"Download Apple Silicon ARM64 version":"Download ARM64 version")}}function _p(i,n){if(i&1){let e=b();s(0,"div",10)(1,"div",11)(2,"div",12),h(3,cp,3,1)(4,mp,3,1)(5,pp,3,1)(6,dp,3,1),s(7,"a",13),_("click",function(){let o=S(e).$implicit,a=c(2);return g(a.download(o))}),u(8,"fa-icon",14),s(9,"span",3),p(10,"Download"),l()(),s(11,"div"),h(12,fp,9,0)(13,up,7,2),l()()()()}if(i&2){let e,t=n.$implicit,o=c(2);r(3),C((e=t)===o.APP_STORE_OS.WIN?3:e===o.APP_STORE_OS.MAC?4:e===o.APP_STORE_OS.LINUX?5:e===o.APP_STORE_OS.NODE?6:-1),r(5),d("icon",o.icons.faDownload),r(4),C(t===o.APP_STORE_OS.NODE?12:13)}}function hp(i,n){if(i&1&&(s(0,"div",2)(1,"div",6)(2,"div",7)(3,"div",8)(4,"div",9),F(5,_p,14,3,"div",10,q1),l()()()()()),i&2){let e=c();d("resizeOffset",80),r(5),R(e.APP_STORE_PLATFORM_LIST)}}var dr=(()=>{let n=class n{constructor(){this.store=x(q),this.icons={faWindows:vn,faApple:yn,faLinux:bn,faDownload:Gt,faTerminal:d4},this.APP_STORE_OS=k2,this.APP_STORE_PLATFORM_LIST=Object.values(k2),this.layout=x(L),this.userService=x(u1),this.userService.checkAppStoreAvailability(),this.layout.setBreadcrumbIcon(le.APPS),this.layout.setBreadcrumbNav({url:`/${S1.BASE}/${S1.APPS}/${je.APPS}`,splicing:2,translating:!0,sameLink:!0})}download(t,o=!1){let a=this.store.appStoreManifest().platform[t].find(m=>t===k2.NODE?m.ext==="tar.gz"===o:m.arch==="arm64"===o);eo(a.url)}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=w({type:n,selectors:[["app-user-applications"]],decls:3,vars:2,consts:[[1,"app-top-menu","px-4"],[1,"d-flex","flex-fill","align-items-center","fs-xs"],["appAutoResize","",1,"d-flex","flex-column","fs-sm","bg-theme",2,"height","100%",3,"resizeOffset"],["l10nTranslate",""],["l10nTranslate","",1,"fw-bold"],[1,"mx-auto"],[1,"d-flex"],[1,"col-12","p-4"],[1,"container","p-0"],[1,"row"],[1,"col-md-4"],[1,"card","text-bg-light","text-center","mb-3"],[1,"card-body"],[1,"btn","btn-sm","btn-primary","mt-3","mb-2",3,"click"],[1,"me-2",3,"icon"],["size","3x",2,"height","36px",3,"icon"],[1,"card-title","mt-3","mb-2"],[1,"small","text-muted","mb-1"],["role","button","l10nTranslate","",1,"small",3,"click"]],template:function(o,a){o&1&&(s(0,"div",0),h(1,lp,14,6,"div",1),l(),h(2,hp,7,1,"div",2)),o&2&&(r(),C(a.store.appStoreManifest()?1:-1),r(),C(a.store.appStoreManifest()?2:-1))},dependencies:[N,D,t1,R1],encapsulation:2});let i=n;return i})();var fr=(()=>{let n=class n{constructor(){this.currentMemberIds=[],this.hasChanges=new h1,this.layout=x(L),this.newMembers=[],this.submitted=!1,this.icons={faUserPlus:p4},this.userService=x(u1)}searchMembers(t){let o={search:t,onlyUsers:!0,usersRole:this.parentGroup.type===Tt.USER?g2.USER:void 0,ignoreUserIds:[...this.currentMemberIds,...this.newMembers.map(a=>a.id)]};return this.userService.searchMembers(o)}onSubmit(){this.submitted=!0,this.userService.addUsersToGroup(this.parentGroup.id,this.newMembers.map(t=>t.id)).subscribe({next:()=>{this.hasChanges.emit(!0),this.layout.sendNotification("success","Add members",this.parentGroup.name),this.layout.closeDialog()},error:t=>{this.submitted=!1,this.layout.sendNotification("error","Add members",this.parentGroup.name,t)}})}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=w({type:n,selectors:[["app-user-group-add-users-dialog"]],inputs:{parentGroup:"parentGroup",currentMemberIds:"currentMemberIds"},outputs:{hasChanges:"hasChanges"},decls:16,vars:7,consts:[[1,"modal-header","align-items-center"],[1,"modal-title"],[1,"me-2",3,"icon"],[1,"modal-title","ms-auto"],["l10nTranslate",""],["aria-label","Close","type","button",1,"btn-close","btn-close-white","ms-2",3,"click"],[1,"modal-body"],[3,"membersChange","members","withPermissions","customPlaceholder","searchFunction"],[1,"modal-footer"],["data-dismiss","modal","type","button","l10nTranslate","",1,"btn","btn-sm","btn-secondary","ms-auto",3,"click"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-primary",3,"click","disabled"]],template:function(o,a){o&1&&(s(0,"div",0)(1,"h4",1),u(2,"fa-icon",2),s(3,"span"),p(4),l()(),s(5,"h4",3)(6,"span",4),p(7,"Add members"),l()(),s(8,"button",5),_("click",function(){return a.layout.closeDialog()}),l()(),s(9,"div",6)(10,"app-user-search",7),p1("membersChange",function(f){return m1(a.newMembers,f)||(a.newMembers=f),f}),l()(),s(11,"div",8)(12,"button",9),_("click",function(){return a.layout.closeDialog()}),p(13,"Cancel"),l(),s(14,"button",10),_("click",function(){return a.onSubmit()}),p(15," Confirm "),l()()),o&2&&(r(2),d("icon",a.icons.faUserPlus),r(2),y(a.parentGroup.name),r(6),c1("members",a.newMembers),d("withPermissions",!1)("customPlaceholder","Type to search for users to add")("searchFunction",a.searchMembers.bind(a)),r(4),d("disabled",a.submitted||!a.newMembers.length))},dependencies:[N,D,To],encapsulation:2});let i=n;return i})();function Cp(i,n){if(i&1&&u(0,"img",9),i&2){let e=c();d("src",e.member.avatarUrl,X)}}function Sp(i,n){if(i&1&&u(0,"fa-icon",16),i&2){let e=c();E(e.member.isPersonalGroup?"circle-purple-icon":"circle-primary-icon"),d("icon",e.icons.GROUPS)}}function gp(i,n){if(i&1&&(s(0,"div",7)(1,"span",17),p(2,"from the group"),l(),s(3,"span",11),p(4),z(5,"capitalize"),l()()),i&2){let e=c();r(4),y(e1(5,1,e.parentGroup.name))}}function xp(i,n){i&1&&(s(0,"small",12),p(1,"Only the group will be deleted, the members will no longer be part of it."),l())}var ur=(()=>{let n=class n{constructor(){this.wasDeleted=new h1,this.submitted=!1,this.icons={GROUPS:le.GROUPS,faMinus:ti,faUserMinus:N4},this.layout=x(L),this.userService=x(u1)}onSubmit(){this.submitted=!0;let t=this.member.isUser?"Remove from group":"Delete group";(this.member.isUser?this.userService.removeUserFromGroup(this.parentGroup.id,this.member.id):this.userService.deletePersonalGroup(this.member.id)).subscribe({next:()=>{this.wasDeleted.emit(!0),this.layout.sendNotification("success",t,this.member.name),this.onClose()},error:a=>{this.submitted=!1,this.layout.sendNotification("error",t,this.member.name,a)}})}onClose(){this.wasDeleted.emit(!1),this.layout.closeDialog()}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=w({type:n,selectors:[["app-user-group-delete-dialog"]],inputs:{parentGroup:"parentGroup",member:"member"},outputs:{wasDeleted:"wasDeleted"},decls:26,vars:10,consts:[[1,"modal-header","align-items-center"],[1,"modal-title"],[1,"me-2",3,"icon"],[1,"modal-title","ms-auto"],["l10nTranslate",""],["aria-label","Close","type","button",1,"btn-close","btn-close-white","ms-2",3,"click"],[1,"modal-body"],[1,"d-flex","align-items-center"],[1,"d-flex","align-items-center","avatar","me-2"],["alt","",1,"avatar-img",3,"src"],[3,"icon","class"],[1,"fw-bold","me-1"],["translate",""],[1,"modal-footer"],["data-dismiss","modal","type","button","l10nTranslate","",1,"btn","btn-sm","btn-secondary","ms-auto",3,"click"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-danger",3,"click","disabled"],[3,"icon"],["translate","",1,"mx-1"]],template:function(o,a){o&1&&(s(0,"div",0)(1,"h4",1),u(2,"fa-icon",2),s(3,"span"),p(4),l()(),s(5,"h4",3)(6,"span",4),p(7),l()(),s(8,"button",5),_("click",function(){return a.onClose()}),l()(),s(9,"div",6)(10,"div",7)(11,"div",8),h(12,Cp,1,1,"img",9)(13,Sp,1,3,"fa-icon",10),l(),s(14,"span",11),p(15),z(16,"capitalize"),l(),s(17,"span",12),p(18,"will be removed"),l(),h(19,gp,6,3,"div",7),l(),h(20,xp,2,0,"small",12),l(),s(21,"div",13)(22,"button",14),_("click",function(){return a.onClose()}),p(23,"Cancel"),l(),s(24,"button",15),_("click",function(){return a.onSubmit()}),p(25," Remove "),l()()),o&2&&(r(2),d("icon",a.member.isUser?a.icons.faUserMinus:a.icons.faMinus),r(2),y(a.member.name),r(3),y(a.member.isUser?"Remove from group":"Delete group"),r(5),C(a.member.isUser?12:13),r(3),y(e1(16,8,a.member.name)),r(4),C(a.member.isUser?19:-1),r(),C(a.member.isGroup?20:-1),r(4),d("disabled",a.submitted))},dependencies:[N,D,Jt],encapsulation:2});let i=n;return i})();var _r=(()=>{let n=class n{constructor(){this.layout=x(L),this.submitted=!1,this.isManager=!1,this.USER_GROUP_ROLE=zt,this.icons={faUserPen:s4,faKey:at},this.userService=x(u1)}ngOnInit(){this.isManager=this.user.isGroupManager}onSubmit(){if(this.submitted=!0,this.user.isGroupManager===this.isManager){this.layout.closeDialog();return}let t=this.isManager?zt.MANAGER:zt.MEMBER;this.userService.updateUserFromPersonalGroup(this.parentGroup.id,this.user.id,{role:t}).subscribe({next:()=>{this.user.setGroupRole(t),this.layout.sendNotification("success","Edit user",this.user.name),this.layout.closeDialog()},error:o=>{this.submitted=!1,this.layout.sendNotification("error","Edit user",this.user.name,o)}})}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=w({type:n,selectors:[["app-user-personal-group-edit-user-dialog"]],inputs:{parentGroup:"parentGroup",user:"user"},decls:25,vars:5,consts:[[1,"modal-header","align-items-center"],[1,"modal-title"],[1,"me-2",3,"icon"],[1,"modal-title","ms-auto"],["l10nTranslate",""],["aria-label","Close","type","button",1,"btn-close","btn-close-white","ms-2",3,"click"],[1,"modal-body"],[1,"d-flex","align-items-center"],[1,"form-check","form-switch","form-check-inline"],[1,"d-flex"],[1,"form-check-label"],["type","checkbox",1,"form-check-input",3,"ngModelChange","ngModel"],[1,"ms-1",3,"icon"],[1,"modal-footer"],["data-dismiss","modal","type","button","l10nTranslate","",1,"btn","btn-sm","btn-secondary","ms-auto",3,"click"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-primary",3,"click","disabled"]],template:function(o,a){o&1&&(s(0,"div",0)(1,"h4",1),u(2,"fa-icon",2),s(3,"span"),p(4),l()(),s(5,"h4",3)(6,"span",4),p(7,"Edit user"),l()(),s(8,"button",5),_("click",function(){return a.layout.closeDialog()}),l()(),s(9,"div",6)(10,"div",7)(11,"div",8)(12,"div",9)(13,"label",10)(14,"input",11),p1("ngModelChange",function(f){return m1(a.isManager,f)||(a.isManager=f),f}),l(),s(15,"span",4),p(16,"Set as group manager"),l(),u(17,"fa-icon",12),l()()()(),s(18,"small",4),p(19,"As a manager, the user will be able to manage the group and its members."),l()(),s(20,"div",13)(21,"button",14),_("click",function(){return a.layout.closeDialog()}),p(22,"Cancel"),l(),s(23,"button",15),_("click",function(){return a.onSubmit()}),p(24," Confirm "),l()()),o&2&&(r(2),d("icon",a.icons.faUserPen),r(2),y(a.user.name),r(10),c1("ngModel",a.isManager),r(3),d("icon",a.icons.faKey),r(6),d("disabled",a.submitted))},dependencies:[N,D,x1,K2,_1,g1],encapsulation:2});let i=n;return i})();var hr=(()=>{let n=class n{constructor(){this.wasLeft=new h1,this.submitted=!1,this.icons={GROUPS:le.GROUPS,faRightFromBracket:Si},this.layout=x(L),this.userService=x(u1)}onClose(){this.wasLeft.emit(!1),this.layout.closeDialog()}onSubmit(){this.submitted=!0,this.userService.leavePersonalGroup(this.member.id).subscribe({next:()=>{this.wasLeft.emit(!0),this.layout.sendNotification("success","The group was left",this.member.name),this.onClose()},error:t=>{this.submitted=!1,this.layout.sendNotification("error","The group was not left",this.member.name,t)}})}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=w({type:n,selectors:[["app-admin-group-delete-dialog"]],inputs:{member:"member"},outputs:{wasLeft:"wasLeft"},decls:19,vars:6,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","ms-auto",3,"click"],[1,"modal-body"],[1,"d-flex","align-items-center"],[1,"d-flex","align-items-center","avatar","me-2"],[3,"icon"],[1,"fw-bold","me-1"],[1,"modal-footer"],["data-dismiss","modal","type","button","l10nTranslate","",1,"btn","btn-sm","btn-secondary","ms-auto",3,"click"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-primary",3,"click","disabled"]],template:function(o,a){o&1&&(s(0,"div",0)(1,"h4",1),u(2,"fa-icon",2),s(3,"span",3),p(4,"Leave group"),l()(),s(5,"button",4),_("click",function(){return a.onClose()}),l()(),s(6,"div",5)(7,"div",6)(8,"div",7),u(9,"fa-icon",8),l(),s(10,"span",9),p(11),l(),s(12,"span",3),p(13,"will be left, you will no longer be a member of this group"),l()()(),s(14,"div",10)(15,"button",11),_("click",function(){return a.onClose()}),p(16,"Cancel"),l(),s(17,"button",12),_("click",function(){return a.onSubmit()}),p(18," Confirm "),l()()),o&2&&(r(2),d("icon",a.icons.faRightFromBracket),r(7),E(a.member.isPersonalGroup?"circle-purple-icon":"circle-primary-icon"),d("icon",a.icons.GROUPS),r(2),y(a.member.name),r(6),d("disabled",a.submitted))},dependencies:[N,D],encapsulation:2});let i=n;return i})();var vp=["MainContextMenu"],yp=["TargetContextMenu"],Cr=(i,n)=>n.key,bp=(i,n)=>n.mid;function Tp(i,n){if(i&1){let e=b();s(0,"ul",19)(1,"li",20)(2,"a",21),_("click",function(){S(e);let o=c(2);return g(o.browse(o.selected))}),s(3,"span",22),u(4,"fa-icon",6),p(5,"See members"),l()()(),s(6,"li",20)(7,"a",21),_("click",function(){S(e);let o=c(2);return g(o.openLeaveGroupDialog())}),s(8,"span",22),u(9,"fa-icon",6),p(10,"Leave group"),l()()()()}if(i&2){let e=c(2);r(2),U("disabled",!e.selected),r(2),d("icon",e.icons.faUsersRectangle),r(3),U("disabled",!e.selected||!e.selected.isPersonalGroup),r(2),d("icon",e.icons.faRightFromBracket)}}function zp(i,n){if(i&1&&(s(0,"div",7)(1,"button",17),u(2,"fa-icon",6),l(),V(3,Tp,11,6,"ul",18),l()),i&2){let e=c();r(),U("disabled",!e.selected),r(),d("icon",e.icons.faEllipsis)}}function Mp(i,n){if(i&1&&u(0,"fa-icon",25),i&2){let e=c(3);d("icon",e.sortTable.sortParam.asc?e.icons.faArrowDown:e.icons.faArrowUp)("fixedWidth",!1)}}function Ep(i,n){if(i&1){let e=b();s(0,"th",24),_("click",function(){S(e);let o=c().$implicit,a=c();return g(a.sortBy(o.key))}),p(1),h(2,Mp,1,2,"fa-icon",25),l()}if(i&2){let e=c().$implicit,t=c();E(e.value.class),n1("width",e.value.width,"%"),U("text-align-center",e.value.textCenter)("cursor-pointer",e.value.sortable),r(),k(" ",e.value.label," "),r(),C(t.sortTable.sortParam.column===e.key?2:-1)}}function wp(i,n){if(i&1&&h(0,Ep,3,10,"th",23),i&2){let e=n.$implicit;C(e.value.show?0:-1)}}function Pp(i,n){if(i&1&&u(0,"img",29),i&2){let e=c(4).$implicit;d("src",e.avatarUrl,X)}}function Ap(i,n){if(i&1&&u(0,"fa-icon",6),i&2){let e=c(4).$implicit,t=c();E(e.isPersonalGroup?"circle-purple-icon":"circle-primary-icon"),d("icon",t.icons.GROUPS)}}function Np(i,n){if(i&1&&u(0,"fa-icon",33),i&2){let e=c(5);d("icon",e.icons.faKey)}}function Lp(i,n){if(i&1&&(s(0,"div",28),h(1,Pp,1,1,"img",29)(2,Ap,1,3,"fa-icon",30),s(3,"div",31)(4,"span",32),p(5),h(6,Np,1,1,"fa-icon",33),l(),s(7,"span",34),p(8),l()()()),i&2){let e=c(3).$implicit;r(),C(e.isUser?1:2),r(4),k(" ",e.name," "),r(),C(e.isUser&&e.isGroupManager?6:-1),r(2),y(e.description)}}function kp(i,n){if(i&1&&(s(0,"span",22),p(1),l()),i&2){let e=c(4).$implicit;r(),y(e.type)}}function Dp(i,n){if(i&1&&(s(0,"span",22),p(1),l()),i&2){let e=c(4).$implicit;r(),y(e.isGroupManager?"Manager":"Member")}}function Fp(i,n){if(i&1&&h(0,kp,2,1,"span",22)(1,Dp,2,1,"span",22),i&2){let e=c(3).$implicit;C(e.isGroup?0:1)}}function Rp(i,n){if(i&1&&(s(0,"span",22),p(1),l()),i&2){let e=c(3).$implicit;r(),y(e.isGroupManager?"Manager":"Member")}}function Ip(i,n){if(i&1&&(s(0,"span"),p(1),z(2,"joinCounts"),l()),i&2){let e=c(4).$implicit;r(),y(e1(2,1,e.counts))}}function Op(i,n){if(i&1&&h(0,Ip,3,3,"span"),i&2){let e=c(3).$implicit;C(e.isGroup?0:-1)}}function Vp(i,n){if(i&1&&(p(0),z(1,"amTimeAgo")),i&2){let e=c(3).$implicit;k(" ",M(1,1,e.createdAt,!0)," ")}}function Bp(i,n){if(i&1&&(p(0),z(1,"amTimeAgo")),i&2){let e=c(3).$implicit;k(" ",e1(1,1,e.createdAt)," ")}}function Up(i,n){if(i&1&&(p(0),z(1,"amTimeAgo")),i&2){let e=c(3).$implicit;k(" ",e1(1,1,e.modifiedAt)," ")}}function Hp(i,n){if(i&1&&(s(0,"td"),h(1,Lp,9,4,"div",28)(2,Fp,2,1)(3,Rp,2,1,"span",22)(4,Op,1,1)(5,Vp,2,4)(6,Bp,2,3)(7,Up,2,3),l()),i&2){let e,t=c().$implicit,o=c().$implicit;E(qe("",t.value.class," ",t.value.newly?"prop-newly-"+o[t.value.newly]:"")),n1("width",t.value.width,"%"),U("text-align-center",t.value.textCenter),r(),C((e=t.key)==="name"?1:e==="type"?2:e==="role"?3:e==="members"?4:e==="memberSince"?5:e==="createdAt"?6:e==="modifiedAt"?7:-1)}}function $p(i,n){if(i&1&&h(0,Hp,8,9,"td",27),i&2){let e=n.$implicit;C(e.value.show?0:-1)}}function Gp(i,n){if(i&1){let e=b();s(0,"tr",26),_("click",function(){let o=S(e).$implicit,a=c();return g(a.onSelect(o))})("contextmenu",function(o){let a=S(e).$implicit,m=c();return g(m.onTargetContextMenu(o,a))})("pressup",function(o){let a=S(e).$implicit,m=c();return g(m.onTargetContextMenu(o,a))})("tap",function(){let o=S(e).$implicit,a=c();return g(a.browse(o))}),F(1,$p,1,1,null,null,Cr),z(3,"keyvalue"),l()}if(i&2){let e=n.$implicit,t=c();U("selected",e.mid===(t.selected==null?null:t.selected.mid)),r(),R(M(3,2,t.tableHeaders,t.originalOrderKeyValue))}}function Wp(i,n){if(i&1&&(s(0,"span",22),u(1,"fa-icon",6),p(2),l()),i&2){let e=c(2);r(),d("icon",e.icons.faPlus),r(),k(" ",e.allowedAction.addGroup?"Personal group":"Add members")}}function qp(i,n){if(i&1){let e=b();V(0,Wp,3,2,"ng-template",16),_("execute",function(){S(e);let o=c();return g(o.openDialog(!0))})}}function Yp(i,n){if(i&1&&(s(0,"span",22),u(1,"fa-icon",6),p(2,"Refresh"),l()),i&2){let e=c();r(),d("icon",e.icons.faArrowRotateRight)}}function jp(i,n){if(i&1&&(s(0,"span",22),u(1,"fa-icon",6),p(2,"See members"),l()),i&2){let e=c(2);r(),d("icon",e.icons.faUsersRectangle)}}function Kp(i,n){if(i&1){let e=b();V(0,jp,3,1,"ng-template",16),_("execute",function(){S(e);let o=c();return g(o.browse(o.selected))})}}function Qp(i,n){if(i&1&&(s(0,"span",22),u(1,"fa-icon",6),p(2),l()),i&2){let e=c(2);r(),d("icon",e.icons.faPen),r(),k(" ",e.allowedAction.editGroup?"Edit group":"Edit user")}}function Xp(i,n){if(i&1){let e=b();V(0,Qp,3,2,"ng-template",16),_("execute",function(){S(e);let o=c();return g(o.openDialog())})}}function Zp(i,n){if(i&1&&(s(0,"span",22),u(1,"fa-icon",6),p(2),l()),i&2){let e=c(2);r(),d("icon",e.icons.faMinus),r(),k(" ",e.allowedAction.removeGroup?"Delete group":"Remove from group")}}function Jp(i,n){if(i&1){let e=b();V(0,Zp,3,2,"ng-template",16),_("execute",function(){S(e);let o=c();return g(o.openDialog(!1,!0))})}}function ed(i,n){if(i&1&&(s(0,"span",22),u(1,"fa-icon",6),p(2,"Leave group"),l()),i&2){let e=c(2);r(),d("icon",e.icons.faRightFromBracket)}}function td(i,n){if(i&1){let e=b();V(0,ed,3,1,"ng-template",16),_("execute",function(){S(e);let o=c();return g(o.openLeaveGroupDialog())})}}var Sr=(()=>{let n=class n{constructor(){this.locale=x(K),this.originalOrderKeyValue=J1,this.icons={GROUPS:le.GROUPS,faRotate:he,faPlus:De,faMinus:ti,faPen:$t,faArrowDown:Se,faArrowUp:Ce,faKey:at,faArrowRotateRight:lt,faRightFromBracket:Si,faUsersRectangle:j0,faEllipsis:ni},this.tableHeaders={name:{label:"Name",width:30,textCenter:!1,class:"",show:!0,sortable:!0},type:{label:"Type",width:10,textCenter:!0,class:"",show:!0,sortable:!0},role:{label:"Role",width:10,textCenter:!0,class:"d-none d-lg-table-cell",show:!1,sortable:!0},members:{label:"Members",width:10,class:"",textCenter:!0,show:!0},memberSince:{label:"Member since",width:12,textCenter:!0,class:"d-none d-lg-table-cell",show:!1,sortable:!0},createdAt:{label:"Created",width:12,textCenter:!0,class:"d-none d-lg-table-cell",show:!0,sortable:!0},modifiedAt:{label:"Modified",width:12,textCenter:!0,class:"d-none d-lg-table-cell",newly:"newly",show:!0,sortable:!0}},this.isCurrentGroupManager=!1,this.allowedAction={addGroup:!1,addUsers:!1,removeUser:!1,removeGroup:!1,editUser:!1,editGroup:!1,leaveGroup:!1},this.loading=!1,this.selected=null,this.members=[],this.router=x(i1),this.activatedRoute=x(j2),this.layout=x(L),this.userService=x(u1),this.canCreatePersonalGroup=this.userService.userHavePermission(Ye.PERSONAL_GROUPS_ADMIN),this.sortSettings={default:[{prop:"name",type:"string"}],name:[{prop:"name",type:"string"}],type:[{prop:"type",type:"string"}],role:[{prop:"isGroupManager",type:"number"}],createdAt:[{prop:"createdAt",type:"date"}],modifiedAt:[{prop:"modifiedAt",type:"date"}]},this.sortTable=new Oe(this.constructor.name,this.sortSettings),this.activatedRoute.data.subscribe(t=>this.setEnv(t.routes)),this.activatedRoute.queryParams.subscribe(t=>this.focusOnSelect=t.select),this.layout.setBreadcrumbIcon(le.GROUPS)}setEnv(t){let o;t.length?(o=t[t.length-1].path,this.layout.setBreadcrumbNav({url:`/${S1.BASE}/${S1.GROUPS}/${je.GROUPS}${Xt(t)}`,splicing:2,translating:!0,sameLink:!0,mutateLevel:{1:{setUrl:!0}}})):this.layout.setBreadcrumbNav({url:`/${S1.BASE}/${S1.GROUPS}/${je.GROUPS}`,splicing:2,translating:!0,sameLink:!0}),this.loadGroups(o)}refresh(){this.loadGroups(this.currentGroup?.name)}loadGroups(t){this.loading=!0,this.onSelect(),this.userService.browseGroup(t).subscribe({next:o=>{this.tableHeaders.members.show=!t,this.tableHeaders.role.show=!t,this.tableHeaders.modifiedAt.show=!t,this.tableHeaders.createdAt.show=!t,this.tableHeaders.memberSince.show=!!t,this.currentGroup=o.parentGroup,this.isCurrentGroupManager=this.currentGroup?.role===zt.MANAGER,this.sortBy(this.sortTable.sortParam.column,!1,o.members),this.focusOnSelect?this.focusOn(this.focusOnSelect):this.scrollView.scrollInto(-1),this.loading=!1},error:o=>{this.members=[],this.layout.sendNotification("error","Groups",o.error.message),this.onSelect(),this.loading=!1}})}browse(t){t.isGroup&&this.router.navigate([t.name],{relativeTo:this.activatedRoute}).catch(console.error)}onSelect(t=null){this.selected=t,this.selected?this.allowedAction={addGroup:!this.currentGroup&&this.canCreatePersonalGroup,addUsers:!!this.currentGroup&&this.isCurrentGroupManager,removeUser:!!this.currentGroup&&this.selected.isUser&&this.isCurrentGroupManager,removeGroup:!this.currentGroup&&this.selected.isGroup&&this.selected.isGroupManager&&this.selected.isPersonalGroup,editUser:!!this.currentGroup&&this.selected.isUser&&this.isCurrentGroupManager&&this.currentGroup.type===Tt.PERSONAL,editGroup:!this.currentGroup&&this.selected.isGroup&&this.selected.isGroupManager&&this.selected.isPersonalGroup,leaveGroup:!this.currentGroup&&this.selected.isGroup&&this.selected.isPersonalGroup}:this.allowedAction={addGroup:!this.currentGroup&&this.canCreatePersonalGroup,addUsers:!!this.currentGroup&&this.isCurrentGroupManager,removeUser:!1,removeGroup:!1,editUser:!1,editGroup:!1,leaveGroup:!1}}onContextMenu(t){t.preventDefault(),t.stopPropagation(),this.layout.openContextMenu(t,this.mainContextMenu)}onTargetContextMenu(t,o){t.preventDefault(),t.type==="contextmenu"&&t.stopPropagation(),this.onSelect(o),this.layout.openContextMenu(t,this.targetContextMenu)}sortBy(t,o=!0,a){this.members=this.sortTable.sortBy(t,o,a||this.members)}openDialog(t=!1,o=!1){t?this.currentGroup?this.layout.openDialog(fr,"md",{initialState:{parentGroup:this.currentGroup,currentMemberIds:this.members.filter(m=>m.isUser).map(m=>m.id)}}).content.hasChanges.pipe(Pe(m=>m),w1(1)).subscribe(()=>this.refresh()):this.layout.openDialog(e3,"md").content.groupChange.pipe(w1(1)).subscribe(m=>{let[f,v]=m;f==="add"&&(v.setGroupRole(zt.MANAGER),v.counts={users:1},this.sortBy(this.sortTable.sortParam.column,!1,this.members.concat(v)),this.onSelect(v))}):o?this.layout.openDialog(ur,"md",{initialState:{parentGroup:this.currentGroup,member:this.selected}}).content.wasDeleted.pipe(Pe(m=>m),w1(1)).subscribe(()=>{this.sortBy(this.sortTable.sortParam.column,!1,this.members.filter(m=>this.selected.mid!==m.mid)),this.onSelect()}):this.selected.isGroup?this.layout.openDialog(e3,"md",{initialState:{originalGroup:this.selected}}).content.groupChange.pipe(w1(1)).subscribe(m=>{let[f,v]=m;f==="update"&&(this.selected=Object.assign(this.selected,{name:v.name,description:v.description,modifiedAt:v.modifiedAt}))}):this.layout.openDialog(_r,"md",{initialState:{parentGroup:this.currentGroup,user:this.selected}})}openLeaveGroupDialog(){this.layout.openDialog(hr,"md",{initialState:{member:this.selected}}).content.wasLeft.pipe(w1(1)).subscribe(o=>{o&&(this.sortBy(this.sortTable.sortParam.column,!1,this.members.filter(a=>a.id!==this.selected.id)),this.onSelect())})}focusOn(t){let o=this.members.find(a=>a.name===t);o&&(setTimeout(()=>this.scrollView.scrollInto(o),100),this.onSelect(o))}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=w({type:n,selectors:[["app-user-groups"]],viewQuery:function(o,a){if(o&1&&(r1(Xe,5),r1(F1,7),r1(vp,7),r1(yp,7)),o&2){let m;s1(m=l1())&&(a.scrollView=m.first),s1(m=l1())&&(a.inputFilter=m.first),s1(m=l1())&&(a.mainContextMenu=m.first),s1(m=l1())&&(a.targetContextMenu=m.first)}},decls:41,vars:43,consts:[["MainContextMenu",""],["TargetContextMenu",""],[1,"app-top-menu"],["container","body","type","button",1,"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"],["dropdown","",1,"btn-group","btn-group-sm","me-1"],[1,"d-none","d-sm-block","ms-auto"],[1,"app-table"],[3,"contextmenu","bufferAmount","items"],["tabindex","-1"],[3,"selected"],[1,"app-foot-menu"],[1,"mx-auto"],["contextMenuItem",""],["contextMenuItem","",3,"execute"],["dropdownToggle","","type","button",1,"btn","btn-sm","btn-secondary","dropdown-toggle"],["class","dropdown-menu","role","menu",4,"dropdownMenu"],["role","menu",1,"dropdown-menu"],["role","menuitem"],[1,"dropdown-item",3,"click"],["l10nTranslate",""],["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","avatar"],["alt","",1,"avatar-img",3,"src"],[3,"icon","class"],[1,"d-flex","flex-column"],["draggable","false",1,"no-pointer-events"],[1,"m-0",3,"icon"],["draggable","false",1,"no-pointer-events","text-muted","fs-xxxs"]],template:function(o,a){if(o&1){let m=b();s(0,"div",2)(1,"button",3),z(2,"translate"),_("click",function(){return S(m),g(a.refresh())}),u(3,"fa-icon",4),l(),s(4,"button",5),z(5,"translate"),_("click",function(){return S(m),g(a.openDialog(!0))}),u(6,"fa-icon",6),l(),s(7,"button",5),z(8,"translate"),_("click",function(){return S(m),g(a.openDialog(!1,!0))}),u(9,"fa-icon",6),l(),s(10,"button",5),z(11,"translate"),_("click",function(){return S(m),g(a.openDialog())}),u(12,"fa-icon",6),l(),h(13,zp,4,3,"div",7),u(14,"app-input-filter",8),l(),s(15,"table",9)(16,"thead")(17,"tr"),F(18,wp,1,1,null,null,Cr),z(20,"keyvalue"),l()()(),s(21,"app-virtual-scroll",10),z(22,"searchFilter"),_("contextmenu",function(v){return S(m),g(a.onContextMenu(v))}),s(23,"table",9)(24,"tbody",11),F(25,Gp,4,5,"tr",12,bp),l()()(),s(27,"div",13)(28,"span",14),p(29),z(30,"translate"),l()(),s(31,"context-menu",null,0),h(33,qp,1,0,null,15),V(34,Yp,3,1,"ng-template",16),_("execute",function(){return S(m),g(a.refresh())}),l(),s(35,"context-menu",null,1),h(37,Kp,1,0,null,15),h(38,Xp,1,0,null,15),h(39,Jp,1,0,null,15),h(40,td,1,0,null,15),l()}o&2&&(r(),d("tooltip",M(2,22,"Refresh",a.locale.language)),r(2),d("icon",a.icons.faRotate)("animation",a.loading?"spin":null),r(),d("disabled",!a.allowedAction.addGroup&&!a.allowedAction.addUsers)("tooltip",M(5,25,a.allowedAction.addGroup?"New personal group":"Add members",a.locale.language)),r(2),d("icon",a.icons.faPlus),r(),d("disabled",!a.allowedAction.removeGroup&&!a.allowedAction.removeUser)("tooltip",M(8,28,a.allowedAction.removeGroup?"Delete group":"Remove from group",a.locale.language)),r(2),d("icon",a.icons.faMinus),r(),d("disabled",!a.allowedAction.editGroup&&!a.allowedAction.editUser)("tooltip",M(11,31,a.allowedAction.editGroup?"Edit group":"Edit user",a.locale.language)),r(2),d("icon",a.icons.faPen),r(),C(a.currentGroup?-1:13),r(5),R(M(20,34,a.tableHeaders,a.originalOrderKeyValue)),r(3),d("bufferAmount",5)("items",M(22,37,a.members,a.inputFilter.search())),r(4),R(a.scrollView==null?null:a.scrollView.viewPortItems),r(4),Y1("",a.members.length," ",M(30,40,"groups",a.locale.language)),r(4),C(a.allowedAction.addGroup||a.allowedAction.addUsers?33:-1),r(4),C(a.selected!=null&&a.selected.isGroup?37:-1),r(),C(a.allowedAction.editGroup||a.allowedAction.editUser?38:-1),r(),C(a.allowedAction.removeGroup||a.allowedAction.removeUser?39:-1),r(),C(a.allowedAction.leaveGroup?40:-1))},dependencies:[Kt,jt,Yt,N,D,F1,Xe,z1,Be,He,Ue,Q1,Z,Ie,e2,I1],encapsulation:2});let i=n;return i})();var gr=()=>!x(u1).user.isLink,xr=()=>x(u1).user.isUser;var vr=[{path:S1.BASE,pathMatch:"prefix",canActivate:[gr],children:[{path:S1.ACCOUNT,component:pr},{path:S1.CLIENTS,canActivate:[er],component:lr},{path:S1.GROUPS,children:[{path:"**",resolve:{routes:P2},component:Sr}]},{path:S1.GUESTS,canActivate:[xr],loadComponent:()=>import("./chunk-2456KVFZ.js").then(i=>i.UserGuestsComponent)},{path:S1.APPS,component:dr},{path:"**",redirectTo:S1.ACCOUNT}]}];var F3=(i,n)=>x(Te).checkUserAuthAndLoad(n.url),yr=()=>x(Te).isLogged()?(x(i1).navigate([]).catch(console.error),!1):!0;var br=(()=>{let n=class n{constructor(){this.locale=x(K),this.icons={faLock:bi,faUserAlt:xi},this.logoUrl=Hi,this.hasError=null,this.submitted=!1,this.fb=x(E0),this.router=x(i1),this.auth=x(Te);let t=this.fb;this.loginForm=t.group({username:this.fb.control("",[Gn.required]),password:this.fb.control("",[Gn.required])})}onSubmit(){this.submitted=!0,this.auth.login(this.loginForm.value.username,this.loginForm.value.password).pipe(I2(()=>setTimeout(()=>this.submitted=!1,1500))).subscribe({next:t=>this.isLogged(t.success,t.message),error:t=>this.isLogged(!1,t.error?t.error.message:t)})}isLogged(t,o=null){t?this.auth.returnUrl?this.router.navigateByUrl(this.auth.returnUrl).then(()=>{this.auth.returnUrl=null,this.loginForm.reset()}):this.router.navigate([Qe.BASE]).then(()=>this.loginForm.reset()):(this.hasError=o||"Server connection error",this.submitted=!1),this.loginForm.patchValue({password:""})}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=w({type:n,selectors:[["app-auth"]],decls:22,vars:18,consts:[[1,"app-auth"],[1,"background"],[1,"content"],[1,"header"],["alt","","height","65","width","240",3,"ngSrc","priority"],[1,"body"],[3,"ngSubmit","formGroup"],["l10nTranslate",""],[1,"input-group","my-2"],[1,"input-group-text"],[3,"icon"],["appAutofocus","","formControlName","username","type","text",1,"form-control",3,"placeholder"],[1,"input-group","mb-4"],["formControlName","password","type","password",1,"form-control",3,"placeholder"],[1,"d-flex"],["type","submit","l10nTranslate","",1,"btn","btn-primary","px-4","w-100",3,"disabled"]],template:function(o,a){o&1&&(s(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),u(4,"img",4),l(),s(5,"div",5)(6,"form",6),_("ngSubmit",function(){return a.onSubmit()}),s(7,"p",7),p(8),l(),s(9,"div",8)(10,"span",9),u(11,"fa-icon",10),l(),u(12,"input",11),z(13,"translate"),l(),s(14,"div",12)(15,"span",9),u(16,"fa-icon",10),l(),u(17,"input",13),z(18,"translate"),l(),s(19,"div",14)(20,"button",15),p(21,"Sign in"),l()()()()()()()),o&2&&(r(4),d("ngSrc",a.logoUrl)("priority",!0),r(2),d("formGroup",a.loginForm),r(),E(I("fs-sm mb-0 ",a.hasError?"text-danger":"text-white-50")),r(),y(a.hasError||"Sign-in to your account"),r(3),d("icon",a.icons.faUserAlt),r(),d("placeholder",M(13,12,"Login or Email",a.locale.language)),r(4),d("icon",a.icons.faLock),r(),d("placeholder",M(18,15,"Password",a.locale.language)),r(3),d("disabled",a.loginForm.invalid||a.submitted))},dependencies:[Ve,Z2,X2,X1,_1,Q2,b0,T0,N,D,Y2,Z],encapsulation:2});let i=n;return i})();var Tr=[{path:Jn.BASE,canActivate:[yr],children:[{path:Jn.LOGIN,component:br}]}];var id=()=>({matrixParams:"ignored",queryParams:"ignored",paths:"exact",fragment:"ignored"});function nd(i,n){if(i&1&&u(0,"fa-icon",2),i&2){let e=c(2);d("icon",e.icons.faChevronRight)("fixedWidth",!1)}}function od(i,n){if(i&1&&u(0,"fa-icon",5),i&2){let e=c(2);d("icon",e.breadcrumbIcon)}}function ad(i,n){if(i&1&&(h(0,nd,1,2,"fa-icon",2),s(1,"li",3)(2,"a",4),h(3,od,1,1,"fa-icon",5),s(4,"span"),p(5),l()()()),i&2){let e=n.$implicit,t=n.$index,o=c();C(t!==0?0:-1),r(),d("routerLinkActiveOptions",ve(5,id)),r(),d("routerLink",e.link),r(),C(t===0&&o.breadcrumbIcon?3:-1),r(2),y(e.title)}}var zr=(()=>{let n=class n{constructor(){this.icons={faChevronRight:a4},this.breadcrumbIcon=y4,this.levels=[],this.layout=x(L),this.subscriptions=[],this.subscriptions.push(this.layout.breadcrumbNav.subscribe(t=>this.updateNav(t))),this.subscriptions.push(this.layout.breadcrumbIcon.subscribe(t=>this.breadcrumbIcon=t))}ngOnDestroy(){this.subscriptions.forEach(t=>t.unsubscribe())}updateNav(t){let o=t.splicing||1,a=t.translating||!1,m=t.sameLink||!1,f=t.firstLink||null,v=t.mutateLevel||null,T=t.url.split("/").slice(1);if(this.levels=[],T.length>=1&&T[0]){let A=`/${T.splice(0,o).join("/")}`;this.levels.push({link:f||A,title:""});for(let{index:P,item:Y}of T.filter(G=>G!=="").map((G,W)=>({index:W,item:G}))){let G=Y.split("?")[0];if((!m||v&&v[P]&&v[P].setUrl)&&(A+="/"+G),v&&v[P]){if(v[P].hide)continue;v[P].setTitle&&(G=v[P].translateTitle?this.layout.translateString(v[P].setTitle):v[P].setTitle)}else a&&(G=this.layout.translateString(G));this.levels.push({link:A,title:G})}}else this.levels.push({link:["/"],title:""})}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=w({type:n,selectors:[["app-breadcrumb"]],decls:4,vars:0,consts:[[1,"breadcrumb"],[1,"breadcrumb-content"],[3,"icon","fixedWidth"],["routerLinkActive","active",3,"routerLinkActiveOptions"],[3,"routerLink"],[3,"icon"]],template:function(o,a){o&1&&(s(0,"div",0)(1,"div",1),F(2,ad,6,6,null,null,q1),l()()),o&2&&(r(2),R(a.levels))},dependencies:[Ut,S0,N],encapsulation:2});let i=n;return i})();function rd(i,n){if(i&1&&u(0,"img",8),i&2){let e=c();d("src",e.userAvatar,X)("width",28)("height",28)}}var Mr=(()=>{let n=class n{constructor(){this.allOnlineStatus=ct,this.icons={faAngleLeft:si,faAngleRight:Ci},this.userAvatar=null,this.location=x(G2),this.layout=x(L),this.store=x(q),this.subscriptions=[],this.subscriptions.push(this.store.user.subscribe(t=>this.user=t)),this.subscriptions.push(this.store.userAvatarUrl.subscribe(t=>this.userAvatar=t))}ngOnDestroy(){this.subscriptions.forEach(t=>t.unsubscribe())}openSidebarUser(){this.layout.showRSideBarTab(y1.PROFILE)}navigateTo(t){t==="back"?this.location.back():this.location.forward()}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=w({type:n,selectors:[["app-navbar"]],decls:13,vars:6,consts:[[1,"main-header"],[1,"navbar","navbar-content"],["role","button",1,"d-sm-none","navbar-button",3,"click"],[3,"icon"],[1,"navbar-breadcrumb"],[1,"navbar-right-side"],[1,"menu",3,"click"],[1,"avatar"],["alt","",1,"avatar-img","bg-gray-light-important",3,"src","width","height"]],template:function(o,a){o&1&&(s(0,"header",0)(1,"nav",1)(2,"a",2),_("click",function(){return a.navigateTo("back")}),u(3,"fa-icon",3),l(),s(4,"a",2),_("click",function(){return a.navigateTo("next")}),u(5,"fa-icon",3),l(),s(6,"div",4),u(7,"app-breadcrumb"),l(),s(8,"div",5)(9,"div",6),_("click",function(){return a.openSidebarUser()}),s(10,"div",7),h(11,rd,1,3,"img",8),u(12,"span"),l()()()()()),o&2&&(r(3),d("icon",a.icons.faAngleLeft),r(2),d("icon",a.icons.faAngleRight),r(6),C(a.userAvatar?11:-1),r(),E(I("avatar-",a.allOnlineStatus[a.user==null?null:a.user.onlineStatus])))},dependencies:[zr,N],encapsulation:2});let i=n;return i})();var sd=["sidebar"],ld=(i,n)=>({menu:i,previousLevel:n}),cd=i=>({menu:i}),md=i=>({menu:i,isMenuIcon:!0}),pd=(i,n)=>({mainMenu:i,menu:n}),kn=i=>({menu:i,isMenuIcon:!1}),D2=(i,n)=>n.title;function dd(i,n){if(i&1&&N1(0,18),i&2){let e=c(),t=e.$implicit,o=e.$index,a=c(),m=C1(27);d("ngTemplateOutlet",m)("ngTemplateOutletContext",de(2,ld,t,o===0?0:a.appsMenu.submenus[o-1].level))}}function fd(i,n){if(i&1&&h(0,dd,1,5,"ng-container",18),i&2){let e=n.$implicit;C(e.hide?-1:0)}}function ud(i,n){if(i&1){let e=b();s(0,"a",8),_("click",function(){S(e);let o=c();return g(o.logOut())})("mouseenter",function(){S(e);let o=c();return g(o.onHoverIconsMenu(!0,{title:"logout"}))})("mouseleave",function(){S(e);let o=c();return g(o.onHoverIconsMenu(!1,{title:"logout"}))}),u(1,"fa-icon",19),l()}if(i&2){let e=c();r(),d("icon",e.icons.faUserSecret)}}function _d(i,n){if(i&1&&N1(0,18),i&2){let e=c().$implicit;c();let t=C1(29);d("ngTemplateOutlet",t)("ngTemplateOutletContext",H1(2,cd,e))}}function hd(i,n){if(i&1&&h(0,_d,1,4,"ng-container",18),i&2){let e=n.$implicit;C(e.hide?-1:0)}}function Cd(i,n){i&1&&N1(0)}function Sd(i,n){if(i&1){let e=b();s(0,"div",20),_("click",function(){S(e);let o=c();return g(o.checkComponentRoute())}),V(1,Cd,1,0,"ng-container",21),l()}if(i&2){let e=c();d("resizeOffset",40),r(),d("ngComponentOutlet",e.currentMenu.component)}}function gd(i,n){if(i&1&&(s(0,"span",23),p(1),l()),i&2){let e=c().menu;r(),y(e.title)}}function xd(i,n){if(i&1&&(s(0,"span"),p(1),l()),i&2){let e=c(2).menu;E(I("badge bg-",e.count.level," rounded-pill")),r(),y(n)}}function vd(i,n){if(i&1&&(s(0,"span"),h(1,xd,2,4,"span",24),z(2,"async"),l()),i&2){let e,t=c(),o=t.menu,a=t.isMenuIcon;E(a?"menu-badge-icon":"menu-badge"),r(),C((e=e1(2,3,o.count.value))?1:-1,e)}}function yd(i,n){if(i&1&&(u(0,"fa-icon",22),h(1,gd,2,1,"span",23),h(2,vd,3,5,"span",24)),i&2){let e=n.menu,t=n.isMenuIcon;d("icon",e.icon)("animation",e.iconAnimated?"spin":null),r(),C(t?-1:1),r(),C(e.count?2:-1)}}function bd(i,n){if(i&1&&N1(0,18),i&2){let e=c().$implicit,t=c(2).menu;c();let o=C1(31);d("ngTemplateOutlet",o)("ngTemplateOutletContext",de(2,pd,t,e))}}function Td(i,n){if(i&1&&h(0,bd,1,5,"ng-container",18),i&2){let e=n.$implicit;C(e.hide?-1:0)}}function zd(i,n){i&1&&N1(0)}function Md(i,n){if(i&1){let e=b();s(0,"div",20),_("click",function(){S(e);let o=c(2).menu,a=c();return g(a.checkComponentRoute(o))}),V(1,zd,1,0,"ng-container",21),l()}if(i&2){let e=c(3);d("resizeOffset",40),r(),d("ngComponentOutlet",e.currentMenu.component)}}function Ed(i,n){if(i&1&&(s(0,"div"),F(1,Td,1,1,null,null,D2),h(3,Md,2,2,"div",16),l()),i&2){let e=c().menu,t=c();E(I("menu-mini ",e.level<9?"align-self-start":"align-self-end")),r(),R(e.submenus),r(2),C(t.currentMenu.component?3:-1)}}function wd(i,n){if(i&1){let e=b();s(0,"a",25),_("mouseenter",function(){let o=S(e).menu,a=c();return g(a.onHoverIconsMenu(!0,o))})("mouseleave",function(){let o=S(e).menu,a=c();return g(a.onHoverIconsMenu(!1,o))})("click",function(){let o=S(e).menu,a=c();return g(a.checkMenuContext(o))}),N1(1,18),h(2,Ed,4,4,"div",24),l()}if(i&2){let e=n.menu,t=n.previousLevel;c();let o=C1(25);U("mt-auto",t<9&&e.level>9)("active",e.isActive),r(),d("ngTemplateOutlet",o)("ngTemplateOutletContext",H1(7,md,e)),r(),C(e.miniOpened?2:-1)}}function Pd(i,n){if(i&1&&(s(0,"div",28)(1,"a",26),N1(2,18),l()()),i&2){let e=c().$implicit,t=c(2).menu;c();let o=C1(25);E(t.isActive?"collapse-show":"collapse-hide"),U("active",e.isActive),r(),d("routerLink",e.link),r(),d("ngTemplateOutlet",o)("ngTemplateOutletContext",H1(7,kn,e))}}function Ad(i,n){if(i&1&&h(0,Pd,3,9,"div",27),i&2){let e=n.$implicit;C(e.hide?-1:0)}}function Nd(i,n){if(i&1&&F(0,Ad,1,1,null,null,D2),i&2){let e=c().menu;R(e.submenus)}}function Ld(i,n){if(i&1&&(s(0,"div",7)(1,"a",26),N1(2,18),l()(),h(3,Nd,2,0)),i&2){let e=n.menu;c();let t=C1(25);U("active",e.isActive),r(),d("routerLink",e.link),r(),d("ngTemplateOutlet",t)("ngTemplateOutletContext",H1(6,kn,e)),r(),C(e.submenus!=null&&e.submenus.length?3:-1)}}function kd(i,n){if(i&1){let e=b();s(0,"a",29),_("click",function(o){S(e);let a=c().$implicit,m=c(2).mainMenu,f=c();return g(f.onMiniMenuNavigate(o,[a.link],m))}),N1(1,18),l()}if(i&2){let e=c().$implicit;c(3);let t=C1(25);U("active",e.isActive),r(),d("ngTemplateOutlet",t)("ngTemplateOutletContext",H1(4,kn,e))}}function Dd(i,n){if(i&1&&h(0,kd,2,6,"a",30),i&2){let e=n.$implicit;C(e.hide?-1:0)}}function Fd(i,n){if(i&1&&F(0,Dd,1,1,null,null,D2),i&2){let e=c().menu;R(e.submenus)}}function Rd(i,n){if(i&1){let e=b();s(0,"a",29),_("click",function(o){let a=S(e),m=a.mainMenu,f=a.menu,v=c();return g(v.onMiniMenuNavigate(o,[f.link],m))}),N1(1,18),l(),h(2,Fd,2,0)}if(i&2){let e=n.menu;c();let t=C1(25);U("active",e.isActive),r(),d("ngTemplateOutlet",t)("ngTemplateOutletContext",H1(5,kn,e)),r(),C(e.submenus!=null&&e.submenus.length?2:-1)}}var Er=(()=>{let n=class n{constructor(){this.store=x(q),this.icons={faAngleLeft:si,faAngleRight:Ci,faUserSecret:Ei},this.logoIconUrl=Ao,this.leftSideBarIsOpen=!1,this.appsMenu=G4,this.router=x(i1),this.renderer=x(Ne),this.location=x(G2),this.authService=x(Te),this.layout=x(L),this.userService=x(u1),this.subscriptions=[],this.menuAppsHovered=!1,this.menuIconsHovered=!1,this.menuAppsHoveredTimeout=null,this.menuIconsStopPropagation=!1,this.appName=H4,this.appVersion=$4,this.appsMenu.submenus=[po,fa,oo,j4,q4],So("number",this.appsMenu.submenus,"level",!0),this.subscriptions.push(this.store.user.pipe(Pe(t=>!!t)).subscribe(()=>this.loadMenus())),this.subscriptions.push(this.layout.leftSideBarIsOpen.subscribe(t=>this.leftSideBarIsOpen=t)),this.subscriptions.push(this.router.events.pipe(Pe(t=>t instanceof C0)).subscribe(t=>this.updateUrl(t.urlAfterRedirects)))}ngOnDestroy(){this.subscriptions.forEach(t=>t.unsubscribe())}loadMenus(){this.userService.setMenusVisibility(this.appsMenu.submenus),this.updateUrl(this.router.url)}logOut(){this.authService.logout(!0)}navigateTo(t){t==="back"?this.location.back():this.location.forward()}toggleSideBar(){for(let t of this.appsMenu.submenus)t.miniOpened=!1;this.leftSideBarIsOpen&&this.renderer.removeStyle(this.sidebar.nativeElement,"z-index"),this.layout.toggleLSideBar()}checkMenuContext(t){!this.leftSideBarIsOpen&&this.layout.isSmallerScreen()&&t.submenus?.length?this.onHoverIconsMenu(!t.miniOpened,t):this.navigateToUrl([t.link])}onMiniMenuNavigate(t,o,a=null){t.stopPropagation(),this.navigateToUrl(o,a)}checkComponentRoute(t){this.currentMenu.link!==this.currentUrl&&this.router.navigate([this.currentMenu.link]).catch(console.error),t&&(t.miniOpened=!1)}onHoverAppsMenu(t){this.leftSideBarIsOpen&&(this.menuAppsHovered=t,t?this.menuAppsHoveredTimeout=setTimeout(()=>this.setActiveMenu(),5e3):(clearTimeout(this.menuAppsHoveredTimeout),this.checkHoveredMenu()))}onHoverIconsMenu(t,o,a=!1){if(!(this.leftSideBarIsOpen&&this.menuIconsStopPropagation))if((t&&o.submenus?.length||o.component)&&(this.currentMenu=o),this.leftSideBarIsOpen||a)this.menuIconsHovered=t,t?this.updateDynamicTitle(o.title):this.checkHoveredMenu();else{t?this.renderer.setStyle(this.sidebar.nativeElement,"z-index","1030"):this.renderer.removeStyle(this.sidebar.nativeElement,"z-index");for(let m of this.appsMenu.submenus.filter(f=>f.title!==o.title))m.miniOpened=!1;o.miniOpened=!!t}}checkHoveredMenu(){setTimeout(()=>{!this.menuIconsHovered&&!this.menuAppsHovered&&this.setActiveMenu()},50)}navigateToUrl(t,o=null){this.router.navigate(t).then(()=>{o&&o.miniOpened&&(o.miniOpened=!1)})}updateUrl(t){this.currentUrl=t.substring(1);for(let o of this.appsMenu.submenus)if(o.isActive=!!(!o.hide&&(o.link===this.currentUrl||o.matchLink&&o.matchLink.test(this.currentUrl))),o.isActive&&(this.currentMenu=o),o.submenus?.length){for(let a of o.submenus)if(a.isActive=o.isActive&&(a.link===this.currentUrl||!!a.matchLink&&a.matchLink.test(this.currentUrl)),a.submenus?.length)for(let m of a.submenus)m.isActive=this.currentUrl.startsWith(m.link)}this.currentMenu??=this.appsMenu.submenus[0],this.updateDynamicTitle(),this.menuIconsStopPropagation=!0,setTimeout(()=>this.menuIconsStopPropagation=!1,500)}setActiveMenu(){let t=this.appsMenu.submenus.find(o=>o.isActive);t&&(this.currentMenu=t,this.updateDynamicTitle(this.currentMenu.title))}updateDynamicTitle(t){this.dynamicTitle=this.layout.translateString(t!==void 0?t:this.currentMenu?this.currentMenu.title:this.appsMenu.title)}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=w({type:n,selectors:[["app-sidebar-left"]],viewQuery:function(o,a){if(o&1&&r1(sd,7),o&2){let m;s1(m=l1())&&(a.sidebar=m.first)}},decls:32,vars:7,consts:[["sidebar",""],["MenuTemplate",""],["sidebarMenuIcons",""],["MenuApps",""],["MiniMenuApps",""],[1,"left-sidebar"],[1,"sidebar-apps-icons"],[1,"menu"],[3,"click","mouseenter","mouseleave"],[1,"logo-container"],["alt","",3,"src"],[1,"sidebar-apps-menus",3,"mouseenter","mouseleave"],[1,"menu-title",3,"mouseenter"],[1,"sidebar-title"],["role","button",1,"sidebar-btn",3,"click","icon"],[1,"menus-group"],["appAutoResize","",3,"resizeOffset"],[1,"sidebar-apps-footer"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"icon"],["appAutoResize","",3,"click","resizeOffset"],[4,"ngComponentOutlet"],[3,"icon","animation"],["l10nTranslate",""],[3,"class"],[3,"mouseenter","mouseleave","click"],[3,"routerLink"],[1,"menu","submenu",3,"active","class"],[1,"menu","submenu"],[3,"click"],[3,"active"]],template:function(o,a){if(o&1){let m=b();s(0,"aside",5,0)(2,"div",6)(3,"div",7)(4,"a",8),_("click",function(){return S(m),g(a.toggleSideBar())})("mouseenter",function(){return S(m),g(a.onHoverIconsMenu(!0,{title:a.appName},!0))})("mouseleave",function(){return S(m),g(a.onHoverIconsMenu(!1,{title:a.appName},!0))}),s(5,"div",9),u(6,"img",10),l()(),F(7,fd,1,1,null,null,D2),h(9,ud,2,1,"a"),l()(),s(10,"div",11),_("mouseenter",function(){return S(m),g(a.onHoverAppsMenu(!0))})("mouseleave",function(){return S(m),g(a.onHoverAppsMenu(!1))}),s(11,"div",12),_("mouseenter",function(){return S(m),g(a.onHoverAppsMenu(!1))}),s(12,"a")(13,"span",13),p(14),l(),s(15,"fa-icon",14),_("click",function(){return S(m),g(a.navigateTo("back"))}),l(),s(16,"fa-icon",14),_("click",function(){return S(m),g(a.navigateTo("next"))}),l()()(),s(17,"div",15),F(18,hd,1,1,null,null,D2),h(20,Sd,2,2,"div",16),l(),s(21,"div",17)(22,"span"),p(23),l()()()(),V(24,yd,3,4,"ng-template",null,1,se)(26,wd,3,9,"ng-template",null,2,se)(28,Ld,4,8,"ng-template",null,3,se)(30,Rd,3,7,"ng-template",null,4,se)}o&2&&(r(6),d("src",a.logoIconUrl,X),r(),R(a.appsMenu.submenus),r(2),C(a.store.userImpersonate()?9:-1),r(5),y(a.dynamicTitle),r(),d("icon",a.icons.faAngleLeft),r(),d("icon",a.icons.faAngleRight),r(2),R(a.currentMenu.submenus),r(2),C(a.leftSideBarIsOpen&&a.currentMenu.component?20:-1),r(3),y(a.appVersion))},dependencies:[Ut,N,t1,D,W2,Vt,q2],encapsulation:2});let i=n;return i})();var Id=i=>({nb:i}),Od=(i,n)=>({nba:i,nb:n}),Vd=(i,n)=>n.id;function Bd(i,n){if(i&1&&(s(0,"span"),p(1),z(2,"translate"),l()),i&2){let e=c();r(),y(re(2,1,e.nbTotalTasks===0?"no_task":e.nbTotalTasks>1?"nb_tasks":"one_task",e.locale.language,H1(5,Id,e.nbTotalTasks)))}}function Ud(i,n){if(i&1&&(s(0,"span"),p(1),z(2,"translate"),l()),i&2){let e=c();r(),k("",re(2,1,e.nbActiveTasks>1?"nb_active_tasks":"one_active_task",e.locale.language,de(5,Od,e.nbActiveTasks,e.nbTotalTasks))," ")}}function Hd(i,n){if(i&1){let e=b();s(0,"button",5),_("click",function(){S(e);let o=c();return g(o.removeTasks())}),u(1,"fa-icon",6),l()}if(i&2){let e=c();r(),d("icon",e.icons.faTrashAlt)}}function $d(i,n){i&1&&u(0,"div",1)}function Gd(i,n){if(i&1&&(s(0,"span"),p(1),z(2,"translate"),l()),i&2){let e=c().$implicit,t=c();r(),k("\xA0:\xA0",M(2,1,e.result,t.locale.language))}}function Wd(i,n){if(i&1&&(s(0,"span"),p(1),z(2,"toBytes"),l()),i&2){let e=c().$implicit;r(),k("",M(2,1,e.props.size,2),"\xA0\u2022\xA0")}}function qd(i,n){if(i&1&&(s(0,"span"),u(1,"fa-icon",13),p(2),l()),i&2){let e=c().$implicit,t=c();r(),d("icon",t.icons.faFolderClosed)("fixedWidth",!1),r(),k("\xA0",e.props.directories,"\xA0\u2022\xA0")}}function Yd(i,n){if(i&1&&(s(0,"span"),u(1,"fa-icon",13),p(2),l()),i&2){let e=c().$implicit,t=c();r(),d("icon",t.icons.faFile)("fixedWidth",!1),r(),k("\xA0",e.props.files,"\xA0\u2022\xA0")}}function jd(i,n){if(i&1){let e=b();s(0,"div",4)(1,"div",7),z(2,"translate"),_("click",function(){let o=S(e).$implicit,a=c();return g(a.goToFile(o))}),s(3,"span"),u(4,"fa-icon",8),s(5,"b"),u(6,"fa-icon",9),l(),s(7,"span"),p(8),l(),h(9,Gd,3,4,"span"),l(),s(10,"div",10)(11,"div")(12,"progressbar",11)(13,"span",12),h(14,Wd,3,4,"span"),h(15,qd,3,3,"span"),h(16,Yd,3,3,"span"),s(17,"span"),u(18,"fa-icon",13),p(19),z(20,"amTimeAgo"),l()()()()()()()}if(i&2){let e=n.$implicit,t=c();r(),d("tooltip",M(2,19,e.result,t.locale.language)),r(2),U("text-gray-dark",e.status<2)("text-danger",e.status>=2),r(),d("icon",t.iconsStatus[e.status])("animation",e.status===0?"spin-pulse":null),r(2),d("icon",t.iconsOperation[e.type]),r(2),y(e.name),r(),C(e.status===2?9:-1),r(3),d("max",100)("value",e.status>0?100:e.props.progress||100)("type",e.status<1?"warning":e.status===2?"danger":null),r(2),C(e.props.size?14:-1),r(),C(e.props.directories?15:-1),r(),C(e.props.files?16:-1),r(2),d("icon",t.icons.faClock)("fixedWidth",!1),r(),k("\xA0",M(20,22,e.startedAt,!0))}}var wr=(()=>{let n=class n{constructor(){this.locale=x(K),this.icons={faTrashAlt:rt,faFlag:w4,faClock:Uo,faFile:Ho,faFolderClosed:jo},this.iconsStatus=[Z1,gi,K0],this.iconsOperation={[V1.DELETE]:$o,[V1.MOVE]:st,[V1.COPY]:pi,[V1.DOWNLOAD]:Wt,[V1.UPLOAD]:q0,[V1.COMPRESS]:i3,[V1.DECOMPRESS]:i3},this.nbActiveTasks=0,this.nbEndedTasks=0,this.nbTotalTasks=0,this.tasks=[],this.router=x(i1),this.store=x(q),this.filesService=x(E1),this.filesTasksService=x(Wi),this.subscriptions=[],this.subscriptions.push(this.store.filesActiveTasks.subscribe(t=>this.updateTasks(t,!0))),this.subscriptions.push(this.store.filesEndedTasks.subscribe(t=>this.updateTasks(t,!1)))}ngOnDestroy(){this.subscriptions.forEach(t=>t.unsubscribe())}updateTasks(t,o=!1){o?(this.tasks=[...t,...this.store.filesEndedTasks.getValue()],this.nbActiveTasks=t.length,this.nbEndedTasks=this.store.filesEndedTasks.getValue().length):(this.tasks=[...this.store.filesActiveTasks.getValue(),...t],this.nbEndedTasks=t.length,this.nbActiveTasks=this.store.filesActiveTasks.getValue().length),this.nbTotalTasks=this.nbActiveTasks+this.nbEndedTasks}removeTasks(){this.filesTasksService.removeAll()}goToFile(t){if(t.status===1){if(t.type===V1.COMPRESS&&t.props.compressInDirectory===!1){this.filesService.downloadTaskArchive(t.id);return}else if(t.type===V1.DELETE){if(t.path.startsWith(O.FILES))t.path=t.path.replace(O.FILES,O.TRASH);else if(t.path.startsWith(O.SHARES))return}this.router.navigate([`${O.SPACES}/${t.path}`],{queryParams:{select:t.name}}).catch(console.error)}}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=w({type:n,selectors:[["app-files-tasks"]],decls:10,vars:2,consts:[[1,"sidebar-component-title","justify-content-between"],[2,"width","35px"],[1,"btn","btn-xs","btn-secondary"],["appAutoResize",""],[1,"task-list"],[1,"btn","btn-xs","btn-secondary",3,"click"],[3,"icon"],["placement","bottom",1,"px-2","py-1","text-truncate",3,"click","tooltip"],[3,"icon","animation"],[1,"me-1",3,"icon"],[1,"fs-xxxs"],[1,"custom-progress-bar","position-relative",3,"max","value","type"],[1,"d-flex","align-items-center","justify-content-center","position-absolute","mx-1","w-100"],[3,"icon","fixedWidth"]],template:function(o,a){if(o&1&&(s(0,"div",0),u(1,"div",1),s(2,"div"),h(3,Bd,3,7,"span")(4,Ud,3,8,"span"),l(),h(5,Hd,2,1,"button",2)(6,$d,1,0,"div",1),l(),s(7,"div",3),F(8,jd,21,25,"div",4,Vd),l()),o&2){let m;r(3),C((m=a.nbActiveTasks)===0?3:4),r(2),C(a.nbTotalTasks?5:6),r(3),R(a.tasks)}},dependencies:[N,t1,Ht,z1,Ri,ho,Z,I1,Ii],encapsulation:2});let i=n;return i})();var Kd=["notificationsHtml"],Qd=(i,n)=>n.id;function Xd(i,n){if(i&1&&(s(0,"span",4),p(1),l()),i&2){let e=c();r(),k("(",e.store.notifications().length,")")}}function Zd(i,n){if(i&1){let e=b();s(0,"button",8),_("click",function(){S(e);let o=c();return g(o.removeAll())}),u(1,"fa-icon",9),l()}if(i&2){let e=c();r(),d("icon",e.icons.faTrashAlt)}}function Jd(i,n){i&1&&u(0,"div",2)}function ef(i,n){if(i&1&&(s(0,"b",3),p(1),l()),i&2){let e=c().$implicit;r(),y(e.fromUser.fullName)}}function tf(i,n){if(i&1&&(s(0,"b"),p(1),l()),i&2){let e=c().$implicit;r(),y(e.fromUser.fullName)}}function nf(i,n){if(i&1&&(s(0,"span"),p(1),l()),i&2){let e=c().$implicit;r(),k("\xA0",e.mainElement)}}function of(i,n){if(i&1){let e=b();s(0,"div",10,0)(2,"div",11),u(3,"app-user-avatar",12),s(4,"div",13),h(5,ef,2,1,"b",3)(6,tf,2,1,"b"),l(),s(7,"div",14)(8,"i",15),_("click",function(){let o=S(e).$implicit,a=c();return g(a.remove(o))}),u(9,"fa-icon",9),l()()(),s(10,"div",16)(11,"div")(12,"span",3),p(13),l(),p(14,":\xA0"),s(15,"b",17),_("click",function(){let o=S(e).$implicit,a=c();return g(a.goto(o))}),p(16),l()(),s(17,"div",18)(18,"div"),p(19),z(20,"amTimeAgo"),l(),s(21,"div",19),u(22,"fa-icon",9),h(23,nf,2,1,"span"),l()()()()}if(i&2){let e=n.$implicit,t=c();U("newly-1",e.soonRead),r(3),d("user",e.fromUser)("width",24)("height",24)("unknownUserAsInfo",e.fromUser.id===-1),r(2),C(e.fromUser.id===-1?5:6),r(4),d("icon",t.icons.faTimes),r(4),y(e.content.event),r(3),y(e.content.element),r(),U("text-muted",!e.soonRead),r(2),y(e1(20,15,e.createdAt)),r(3),d("icon",e.appIcon),r(),C(e.mainElement?23:-1)}}var Pr=(()=>{let n=class n{constructor(){this.store=x(q),this.icons={faCheck:gi,faTimes:ke,faMagnifyingGlass:ai,faTrashAlt:rt,faCircleInfo:wi},this.router=x(i1),this.layout=x(L),this.notificationsService=x(fo),Ot(()=>{this.store.unreadNotifications(),setTimeout(()=>this.observeUnreadNotifications(),0)})}ngAfterViewInit(){this.observer=new IntersectionObserver(t=>{t.forEach(o=>{if(o.isIntersecting){let a=o.target,m=this.notificationsHtml.toArray().findIndex(f=>f.nativeElement===a);if(m!==-1){let f=this.store.notifications()[m];f&&!f.wasRead&&(f.wasRead=!0,f.soonRead=!0,this.observer.unobserve(a),setTimeout(()=>this.wasRead(f),2e3))}}})},{threshold:.5})}removeAll(){this.notificationsService.deleteNotification().subscribe({next:()=>this.store.notifications.set([]),error:t=>this.layout.sendNotification("error","Notifications","Unable to delete",t)})}remove(t){this.notificationsService.deleteNotification(t.id).subscribe({next:()=>this.store.notifications.update(o=>o.filter(a=>t.id!==a.id)),error:o=>this.layout.sendNotification("error","Notifications","Unable to delete",o)})}goto(t){let o=t.content.app===so.SYNC?t.content.element.split("/").at(-1):t.content.element;this.router.navigate([O.SPACES,...t.content.url.split("/")],{queryParams:{select:o}}).catch(console.error)}observeUnreadNotifications(){this.notificationsHtml&&this.notificationsHtml.forEach((t,o)=>{let a=this.store.notifications()[o];a&&!a.wasRead&&this.observer.observe(t.nativeElement)})}wasRead(t){this.notificationsService.wasReadNotification(t.id).subscribe({next:()=>{this.store.notifications.update(o=>{let a=[...o],m=a.find(f=>f.id===t.id);return m&&(m.soonRead=!1,m.wasRead=!0),a})},error:o=>this.layout.sendNotification("error","Notifications","Unable to mark as read",o)})}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=w({type:n,selectors:[["app-notifications"]],viewQuery:function(o,a){if(o&1&&r1(Kd,5),o&2){let m;s1(m=l1())&&(a.notificationsHtml=m)}},decls:11,vars:2,consts:[["notificationsHtml",""],[1,"sidebar-component-title","justify-content-between"],[2,"width","35px"],["l10nTranslate",""],[1,"ps-1"],[1,"btn","btn-xs","btn-secondary"],["appAutoResize","",1,"fs-xxs","p-2"],[1,"mb-1","app-small-card","rounded","no-select",3,"newly-1"],[1,"btn","btn-xs","btn-secondary",3,"click"],[3,"icon"],[1,"mb-1","app-small-card","rounded","no-select"],[1,"d-flex","px-2","pt-2","pb-1"],[3,"user","width","height","unknownUserAsInfo"],[1,"align-self-center","ms-1"],[1,"ms-auto","align-self-center",2,"font-size","14px"],["role","button",3,"click"],[1,"pb-2","px-2"],[1,"cursor-pointer","btn-link",3,"click"],[1,"d-flex","fs-xxxs","pt-1"],[1,"ms-auto"]],template:function(o,a){o&1&&(s(0,"div",1),u(1,"div",2),s(2,"span")(3,"span",3),p(4,"Notifications"),l(),h(5,Xd,2,1,"span",4),l(),h(6,Zd,2,1,"button",5)(7,Jd,1,0,"div",2),l(),s(8,"div",6),F(9,of,24,17,"div",7,Qd),l()),o&2&&(r(5),C(a.store.notifications().length?5:-1),r(),C(a.store.notifications().length?6:7),r(3),R(a.store.notifications()))},dependencies:[D,t1,N,ge,I1],encapsulation:2});let i=n;return i})();var af=(i,n)=>n.id;function rf(i,n){if(i&1&&(s(0,"div",3)(1,"div",4),u(2,"img",5)(3,"span"),s(4,"div",6)(5,"span",7),p(6),l(),s(7,"span",8),p(8),l()()()()),i&2){let e=n.$implicit,t=c();r(2),d("src",e.avatarUrl,X),r(),E(I("avatar-",t.allOnlineStatus[e==null?null:e.onlineStatus])),r(3),y(e.fullName),r(2),y(e.email)}}var Ar=(()=>{let n=class n{constructor(){this.allOnlineStatus=ct,this.store=x(q),this.onlineUsers=P1(()=>this.store.onlineUsers().filter(t=>t.onlineStatus!==Ai.OFFLINE))}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=w({type:n,selectors:[["app-onlines"]],decls:6,vars:0,consts:[[1,"sidebar-component-title"],["l10nTranslate",""],["appAutoResize",""],[1,"app-onlines-content"],[1,"d-flex","align-items-center","align-self-center","avatar"],["alt","",1,"avatar-img",3,"src"],[1,"d-flex","flex-column","ms-2"],["draggable","false",1,"no-pointer-events","fs-xs"],["draggable","false",1,"no-pointer-events","text-muted","fs-xxxs"]],template:function(o,a){o&1&&(s(0,"div",0)(1,"span",1),p(2,"Online users"),l()(),s(3,"div",2),F(4,rf,9,6,"div",3,af),l()),o&2&&(r(4),R(a.onlineUsers()))},dependencies:[t1,D],encapsulation:2});let i=n;return i})();function sf(i,n){if(i&1){let e=b();s(0,"button",24),_("click",function(){S(e);let o=c();return g(o.collapseRSideBar())}),u(1,"fa-icon",5),l()}if(i&2){let e=c();d("routerLink",e.USER_PATH.BASE),r(),d("icon",e.icons.faUserAlt)}}function lf(i,n){if(i&1){let e=b();s(0,"button",25),_("click",function(){S(e);let o=c();return g(o.collapseRSideBar())}),u(1,"fa-icon",5),l()}if(i&2){let e=c();r(),d("icon",e.icons.faCog)}}function cf(i,n){if(i&1){let e=b();s(0,"button",4),_("click",function(){S(e);let o=c();return g(o.logOut())}),u(1,"fa-icon",5),l()}if(i&2){let e=c();r(),d("icon",e.store.userImpersonate()?e.icons.faUserSecret:e.icons.faPowerOff)}}function mf(i,n){i&1&&(s(0,"div",13),p(1,"Guest Link"),l())}function pf(i,n){if(i&1&&(s(0,"div"),p(1),l(),s(2,"div",26),p(3),l()),i&2){let e=c();r(),y(e.user==null?null:e.user.fullName),r(2),y(e.user==null?null:e.user.email)}}function df(i,n){if(i&1&&(s(0,"option",15),p(1),z(2,"capitalize"),l()),i&2){let e=n.$implicit,t=c();d("ngValue",t.allOnlineStatus.indexOf(e)),r(),y(e1(2,2,e))}}var Nr=(()=>{let n=class n{constructor(){this.logoDarkUrl=Hi,this.logoUrl=No,this.store=x(q),this.USER_PATH=S1,this.allOnlineStatus=ct,this.icons={faUserAlt:xi,faCircleHalfStroke:n4,faCog:g4,faPowerOff:X0,faUserSecret:Ei},this.userAvatar=null,this.layout=x(L),this.themeLight=Qt,this.authService=x(Te),this.userService=x(u1),this.subscriptions=[],this.subscriptions.push(this.store.user.subscribe(t=>this.user=t)),this.subscriptions.push(this.store.userAvatarUrl.subscribe(t=>this.userAvatar=t))}ngOnDestroy(){this.subscriptions.forEach(t=>t.unsubscribe())}collapseRSideBar(){this.layout.toggleRSideBar(!1)}setOnlineStatus(t){this.userService.changeOnlineStatus(t)}toggleTheme(){this.layout.toggleTheme()}logOut(){this.authService.logout(),this.layout.toggleRSideBar(!1)}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=w({type:n,selectors:[["app-user-profile"]],decls:39,vars:11,consts:[[1,"d-flex","flex-column",2,"height","92vh"],[1,"sidebar-component-title"],[1,"d-flex","flex-fill","justify-content-between"],["type","button",1,"btn","btn-xs","btn-secondary",3,"routerLink"],["type","button",1,"btn","btn-xs","btn-secondary",3,"click"],[3,"icon"],["type","button","routerLink","/admin",1,"btn","btn-xs","btn-secondary"],["type","button",1,"btn","btn-xs","btn-secondary"],[1,"user-header"],[1,"d-flex","flex-column","justify-content-center","me-2"],[1,"avatar-lg"],["alt","",1,"avatar-img",3,"src"],[1,"user-details"],["l10nTranslate",""],[1,"form-select","form-select-sm","mt-1",3,"ngModelChange","ngModel"],["l10nTranslate","",3,"ngValue"],[1,"d-flex","flex-column","mt-auto","fs-xs"],[1,"d-flex","flex-column","mx-3"],[1,"mb-3"],["alt","","height","26",3,"src"],["href","https://sync-in.com","target","_blank"],["href","https://sync-in.com/docs","target","_blank"],["href","https://github.com/Sync-in/server/releases","target","_blank"],["href","https://sync-in.com/support","target","_blank"],["type","button",1,"btn","btn-xs","btn-secondary",3,"click","routerLink"],["type","button","routerLink","/admin",1,"btn","btn-xs","btn-secondary",3,"click"],[1,"small"]],template:function(o,a){o&1&&(s(0,"div",0)(1,"div",1)(2,"div",2),h(3,sf,2,2,"button",3),s(4,"button",4),_("click",function(){return a.toggleTheme()}),u(5,"fa-icon",5),l(),h(6,lf,2,1,"button",6),h(7,cf,2,1,"button",7),l()(),s(8,"div",8)(9,"div",9)(10,"div",10),u(11,"img",11)(12,"span"),l()(),s(13,"div",12),h(14,mf,2,0,"div",13)(15,pf,4,2),s(16,"select",14),_("ngModelChange",function(f){return a.setOnlineStatus(f)}),F(17,df,3,4,"option",15,q1),l()()(),s(19,"div",16),u(20,"hr"),s(21,"div",17)(22,"div",18),u(23,"img",19),l(),s(24,"div")(25,"a",20),p(26,"Website"),l(),s(27,"span"),p(28,"\xA0|\xA0"),l(),s(29,"a",21),p(30,"Documentation"),l(),s(31,"span"),p(32,"\xA0|\xA0"),l(),s(33,"a",22),p(34,"Versions"),l(),s(35,"span"),p(36,"\xA0|\xA0"),l(),s(37,"a",23),p(38," \u{1F49B}"),l()()()()()),o&2&&(r(3),C(a.user!=null&&a.user.isLink?-1:3),r(2),d("icon",a.icons.faCircleHalfStroke),r(),C(a.user!=null&&a.user.isAdmin?6:-1),r(),C(!a.store.isElectronApp()||a.store.isElectronApp()&&a.store.userImpersonate()?7:-1),r(4),d("src",a.userAvatar,X),r(),E(I("avatar-",a.allOnlineStatus[a.user==null?null:a.user.onlineStatus])),r(2),C(a.user!=null&&a.user.isLink?14:15),r(2),d("ngModel",a.user==null?null:a.user.onlineStatus),r(),R(a.allOnlineStatus),r(6),d("src",a.layout.switchTheme.getValue()===a.themeLight?a.logoUrl:a.logoDarkUrl,X))},dependencies:[x1,ue,_e,fe,_1,g1,Ut,N,D,Jt],encapsulation:2});let i=n;return i})();var ff=(i,n)=>n.id;function uf(i,n){if(i&1){let e=b();s(0,"button",5),_("click",function(){S(e);let o=c();return g(o.onCloseAll())}),u(1,"fa-icon",6),l()}if(i&2){let e=c();r(),d("icon",e.icons.faXmark)}}function _f(i,n){if(i&1){let e=b();s(0,"div",7),_("click",function(){let o=S(e).$implicit,a=c();return g(a.onMaximize(o))}),s(1,"div",8),u(2,"img",9),s(3,"div",10),p(4),l(),s(5,"button",11),_("click",function(o){let a=S(e).$implicit,m=c();return g(m.onClose(o,a))}),u(6,"fa-icon",6),l()()()}if(i&2){let e=n.$implicit,t=c();r(2),d("ngSrc",e.element.mimeUrl),r(2),y(e.element.name),r(2),d("icon",t.icons.faTimes)}}var Lr=(()=>{let n=class n{constructor(){this.icons={faXmark:vi,faTimes:ke},this.windows=[],this.layout=x(L),this.subscription=null,this.subscription=this.layout.minimizedWindows.subscribe(t=>this.setWindows(t))}ngOnDestroy(){this.subscription.unsubscribe()}onMaximize(t){this.layout.restoreDialog(t.id)}onClose(t,o){t.preventDefault(),t.stopPropagation(),this.layout.closeDialog(null,o.id),this.layout.minimizedWindows.getValue().length||this.layout.toggleRSideBar(!1)}onCloseAll(){this.layout.closeDialog(null,null,!0),this.layout.minimizedWindows.next([]),this.layout.toggleRSideBar(!1)}setWindows(t){t.length||this.layout.hideRSideBarTab(y1.WINDOWS),this.windows=t}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=w({type:n,selectors:[["app-windows"]],decls:7,vars:1,consts:[[1,"sidebar-component-title"],[1,"btn","btn-sm","btn-secondary"],["l10nTranslate",""],["appAutoResize","",1,"sidebar-item"],[1,"sidebar-item-container"],[1,"btn","btn-sm","btn-secondary",3,"click"],[3,"icon"],[1,"sidebar-item-container",3,"click"],[1,"sidebar-item-content"],["alt","","width","28","height","28",3,"ngSrc"],[1,"text-truncate","fs-xxs","ms-2"],[1,"btn","btn-xs","btn-danger","ms-auto",3,"click"]],template:function(o,a){o&1&&(s(0,"div",0),h(1,uf,2,1,"button",1),s(2,"span",2),p(3,"Windows Manager"),l()(),s(4,"div",3),F(5,_f,7,3,"div",4,ff),l()),o&2&&(r(),C(a.windows.length?1:-1),r(4),R(a.windows))},dependencies:[t1,N,D,Y2],encapsulation:2});let i=n;return i})();var kr=(i,n)=>n.label,hf=(i,n)=>n.name;function Cf(i,n){if(i&1&&(s(0,"div",5)(1,"div",6),p(2),l()()),i&2){let e=c().$implicit;r(2),y(e.title)}}function Sf(i,n){i&1&&N1(0)}function gf(i,n){if(i&1&&(s(0,"div",7),V(1,Sf,1,0,"ng-container",8),l()),i&2){let e=c().$implicit;r(),d("ngComponentOutlet",e)}}function xf(i,n){if(i&1&&h(0,gf,2,1,"div",7),i&2){let e=c(2).$implicit;C(e.active||e.loadComponent?0:-1)}}function vf(i,n){if(i&1&&F(0,xf,1,1,null,null,hf),i&2){let e=c().$implicit;R(e.components)}}function yf(i,n){if(i&1&&(s(0,"div"),h(1,Cf,3,1,"div",5),h(2,vf,2,0),l()),i&2){let e=n.$implicit,t=c();E(e.active?"d-block":"d-none"),r(),C(e.title?1:-1),r(),C(t.showComponents||e.loadComponent?2:-1)}}function bf(i,n){if(i&1&&(s(0,"a",4),u(1,"fa-icon",9),l()),i&2){let e=c();r(),d("icon",e.icons.faWifi)}}function Tf(i,n){if(i&1&&(s(0,"span",13)(1,"span"),p(2),l()()),i&2){let e=c(2).$implicit;r(),E(I("badge bg-",e.count.level," rounded-pill")),r(),y(n)}}function zf(i,n){if(i&1){let e=b();s(0,"a",11),_("click",function(){S(e);let o=c().$implicit,a=c();return g(a.setTabVisible(o.label))}),u(1,"fa-icon",12),h(2,Tf,3,4,"span",13),z(3,"async"),l()}if(i&2){let e,t=c().$implicit,o=c();U("mt-auto",t.firstOfLasts)("active",o.visible&&t.active),r(),d("icon",t.icon),r(),C((e=e1(3,6,t.count&&t.count.value))?2:-1,e)}}function Mf(i,n){if(i&1&&(h(0,zf,4,8,"a",10),z(1,"async")),i&2){let e=n.$implicit;C(e.icon&&(!e.showOnCount||e.showOnCount&&e.count&&e1(1,1,e.count.value))?0:-1)}}var Dr=(()=>{let n=class n{constructor(){this.visible=!1,this.showComponents=!1,this.tabs=[],this.theme=Qt,this.networkIsOnline=!0,this.icons={faWifi:O4},this.layout=x(L),this.store=x(q),this.subscriptions=[],this.showDelay=null,this.currentMenu=null,this.firstsTabs=[{label:y1.PROFILE,components:[Nr],icon:null,title:null,active:!1},{label:y1.ONLINES,components:[Ar],icon:Go,title:null,count:{value:vt(P1(()=>this.store.onlineUsers().filter(t=>t.onlineStatus!==Ai.OFFLINE).length)),level:"success"},showOnCount:!0,active:!1},{label:y1.NOTIFICATIONS,components:[Pr],icon:Bo,title:null,count:{value:vt(P1(()=>this.store.unreadNotifications().length)),level:"warning"},active:!1},{label:y1.TASKS,components:[wr],icon:qo,title:null,count:{value:$3([this.store.filesActiveTasks.pipe(ae(t=>t.length)),this.store.clientSyncTasksCount]).pipe(ae(([t,o])=>t+o)),level:"maroon"},active:!1}],this.lastsTabs=[{label:y1.WINDOWS,components:[Lr],icon:Yo,title:null,count:{value:this.layout.minimizedWindows.pipe(ae(t=>t.length)),level:"maroon"},showOnCount:!0,firstOfLasts:!0,active:!1}],this.tabs=[...this.firstsTabs,...this.lastsTabs],this.subscriptions.push(this.layout.rightSideBarIsOpen.subscribe(t=>this.setVisible(t))),this.subscriptions.push(this.layout.rightSideBarSetTabs.subscribe(t=>this.setTabs(t))),this.subscriptions.push(this.layout.rightSideBarOpenAndShowTab.subscribe(t=>this.setTabVisible(t))),this.subscriptions.push(this.layout.rightSideBarSelectTab.subscribe(t=>this.selectTab(t))),this.subscriptions.push(this.layout.switchTheme.subscribe(t=>this.theme=t)),this.subscriptions.push(this.layout.networkIsOnline.subscribe(t=>this.networkIsOnline=t))}ngOnDestroy(){this.subscriptions.forEach(t=>t.unsubscribe())}setTabVisible(t){this.visible?t&&t!==this.layout.currentRightSideBarTab?this.selectTab(t):this.layout.toggleRSideBar(!1):(this.selectTab(t),this.layout.toggleRSideBar(!0))}setVisible(t){t?(clearTimeout(this.showDelay),this.showComponents=t):this.showDelay=setTimeout(()=>this.showComponents=t,500),this.visible=t}setTabs(t){t.name!==this.currentMenu&&(this.tabs=[...this.firstsTabs,...t.tabs?t.tabs:[],...this.lastsTabs],this.currentMenu=t.name,t.name===null&&!this.tabs.find(o=>o.active)&&this.layout.toggleRSideBar(!1))}selectTab(t){if(t){let o=!1;for(let a of this.tabs)a.active=a.label==t,a.active&&(o=!0,this.layout.currentRightSideBarTab=t);o||(this.tabs[0].active=!0)}}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=w({type:n,selectors:[["app-sidebar-right"]],decls:9,vars:6,consts:[[3,"class"],[1,"control-sidebar-menu"],[1,"sidebar-apps-icons"],[1,"menu"],[1,"bg-warning"],[1,"sidebar-title"],["l10nTranslate",""],[1,"sidebar-component-content"],[4,"ngComponentOutlet"],[1,"text-white",3,"icon"],[3,"mt-auto","active"],[3,"click"],[3,"icon"],[1,"menu-badge"]],template:function(o,a){o&1&&(s(0,"aside"),F(1,yf,3,4,"div",0,kr),l(),s(3,"div",1)(4,"div",2)(5,"div",3),h(6,bf,2,1,"a",4),F(7,Mf,2,3,null,null,kr),l()()()),o&2&&(E(I("control-sidebar control-sidebar-",a.theme)),U("control-sidebar-open",a.visible),r(),R(a.tabs),r(5),C(a.networkIsOnline?-1:6),r(),R(a.tabs))},dependencies:[N,D,W2,q2],encapsulation:2});let i=n;return i})();var Fr=(()=>{let n=class n{constructor(){this.themeMode=Qt,this.document=x(B2),this.layout=x(L),this.renderer=x(Ne),this.rightSideBarClass="control-sidebar-open",this.leftSideBarCollapsedClass="sidebar-collapse",this.leftSideBarOpenedClass="sidebar-open",this.isSmallerThanMediumScreen=!1,this.subscriptions=[],this.subscriptions.push(this.layout.switchTheme.subscribe(t=>this.setTheme(t))),this.subscriptions.push(this.layout.toggleRightSideBar.subscribe(t=>this.toggleRightSideBar(t))),this.subscriptions.push(this.layout.toggleLeftSideBar.subscribe(t=>this.toggleLeftSideBar(t)))}ngOnDestroy(){this.subscriptions.forEach(t=>t.unsubscribe())}onResize(){this.layout.resizeEvent.next(),this.isSmallerThanMediumScreen!==this.layout.isSmallerMediumScreen()&&(this.isSmallerThanMediumScreen=!this.isSmallerThanMediumScreen,this.checkLeftSideBarCollapse())}toggleLeftSideBar(t){t===1?(this.openLeftSideBar(),this.layout.leftSideBarIsOpen.next(!0)):t===2?(this.collapseLeftSideBar(),this.layout.leftSideBarIsOpen.next(!1)):this.document.body.classList.contains(this.leftSideBarOpenedClass)?(this.collapseLeftSideBar(),this.layout.saveLeftSideBarIsOpen.next(!1),this.layout.leftSideBarIsOpen.next(!1)):(this.openLeftSideBar(),this.layout.saveLeftSideBarIsOpen.next(!0),this.layout.leftSideBarIsOpen.next(!0))}toggleRightSideBar(t){t?this.renderer.addClass(this.document.body,this.rightSideBarClass):this.renderer.removeClass(this.document.body,this.rightSideBarClass)}openLeftSideBar(){this.renderer.removeClass(this.document.body,this.leftSideBarCollapsedClass),this.renderer.addClass(this.document.body,this.leftSideBarOpenedClass)}collapseLeftSideBar(){this.renderer.removeClass(this.document.body,this.leftSideBarOpenedClass),this.renderer.addClass(this.document.body,this.leftSideBarCollapsedClass)}checkLeftSideBarCollapse(){this.isSmallerThanMediumScreen?this.toggleLeftSideBar(2):this.toggleLeftSideBar(this.layout.saveLeftSideBarIsOpen.getValue()?1:2)}setTheme(t){this.renderer.removeClass(this.document.body,this.themeMode),this.themeMode=t,this.renderer.addClass(this.document.body,this.themeMode)}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=w({type:n,selectors:[["app-layout"]],hostBindings:function(o,a){o&1&&_("resize",function(){return a.onResize()},H2)},decls:8,vars:0,consts:[[1,"app-main"],[1,"wrapper"],[1,"content-wrapper"],[1,"content-container"]],template:function(o,a){o&1&&(s(0,"body",0)(1,"div",1),u(2,"app-navbar")(3,"app-sidebar-left"),s(4,"div",2)(5,"div",3),u(6,"router-outlet"),l()(),u(7,"app-sidebar-right"),l()())},dependencies:[Bt,Mr,Er,Dr],encapsulation:2});let i=n;return i})();var Rr=[{path:Pi.BASE,component:Fr,canActivate:[F3],canActivateChild:[F3],children:[...da,..._a,...Oa,...vr,...ar,...aa]},...Tr,...sa,{path:"**",redirectTo:Qe.BASE}];var Ir=(()=>{let n=class n{constructor(){this.injector=x(Y3),this.auth=null,this.isRefreshingToken=!1,this.waitForRefreshToken=new U3(!1),this.retryCount=3,this.retryWaitMilliSeconds=2e3}intercept(t,o){let a=X4(t.url);return a&&(t=t.clone({url:a})),o.handle(t).pipe(R2(m=>m.status===401?this.handleAuthorizationError(t,o,m):m.status===0?this.handleRetries(t,o,m):It(()=>m)))}handleAuthorizationError(t,o,a){return this.auth||(this.auth=this.injector.get(Te)),console.debug("AuthInterceptor:",t.url,a.status),[O0,R0,I0].indexOf(t.url)===-1?this.isRefreshingToken?(console.debug("AuthInterceptor: wait for refresh token"),this.waitForRefreshToken.pipe(Pe(m=>!m),w1(1),_2(()=>o.handle(this.auth.checkCSRF(t))))):(console.debug("AuthInterceptor: refreshing token"),this.isRefreshingToken=!0,this.waitForRefreshToken.next(!0),this.auth.refreshToken().pipe(_2(()=>(this.waitForRefreshToken.next(!1),o.handle(this.auth.checkCSRF(t)))),I2(()=>this.isRefreshingToken=!1))):It(()=>a)}handleRetries(t,o,a){return o.handle(t).pipe(q3(m=>m.pipe(G3((f,v)=>v<this.retryCount&&f.status==0?u2(f):It(()=>f)),W3(this.retryWaitMilliSeconds))))}};n.\u0275fac=function(o){return new(o||n)},n.\u0275prov=D1({token:n,factory:n.\u0275fac,providedIn:"root"});let i=n;return i})();function Or(){return Object.assign(new ei,{adaptivePosition:!1,triggers:"hover",delay:500})}var Vr={url:"",options:{autoConnect:!1,reconnection:!0,forceNew:!1,transports:["websocket"]}};var Br={providers:[t0({eventCoalescing:!0}),{provide:i0,useClass:n0},{provide:m0,useClass:Ir,multi:!0},g0(Rr),p0(d0(),f0({cookieName:Yn,headerName:Yn})),P0(H0,{storage:$0}),A0(),In(h0),{provide:u0,useClass:na},ia(),U0({positionClass:"toast-bottom-right",preventDuplicates:!1,timeOut:7e3}),{provide:ei,useFactory:Or},V0,In(B0.forRoot(Vr))]};s0(a5,Br).catch(console.error);