@sync-in/server 1.9.6 → 1.10.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 (367) hide show
  1. package/CHANGELOG.md +38 -4
  2. package/README.md +2 -2
  3. package/environment/environment.dist.yaml +15 -5
  4. package/package.json +14 -16
  5. package/server/app.bootstrap.js +4 -23
  6. package/server/app.bootstrap.js.map +1 -1
  7. package/server/app.constants.js +3 -2
  8. package/server/app.constants.js.map +1 -1
  9. package/server/applications/comments/services/comments-queries.service.js +5 -9
  10. package/server/applications/comments/services/comments-queries.service.js.map +1 -1
  11. package/server/applications/files/constants/cache.js +2 -5
  12. package/server/applications/files/constants/cache.js.map +1 -1
  13. package/server/applications/files/constants/files.js +4 -0
  14. package/server/applications/files/constants/files.js.map +1 -1
  15. package/server/applications/files/constants/operations.js +4 -0
  16. package/server/applications/files/constants/operations.js.map +1 -1
  17. package/server/applications/files/constants/routes.js +1 -26
  18. package/server/applications/files/constants/routes.js.map +1 -1
  19. package/server/applications/files/files.config.js +15 -39
  20. package/server/applications/files/files.config.js.map +1 -1
  21. package/server/applications/files/files.controller.js +4 -4
  22. package/server/applications/files/files.controller.js.map +1 -1
  23. package/server/applications/files/files.module.js +12 -9
  24. package/server/applications/files/files.module.js.map +1 -1
  25. package/server/applications/files/interfaces/file-lock.interface.js.map +1 -1
  26. package/server/applications/files/interfaces/file-props.interface.js.map +1 -1
  27. package/server/applications/files/modules/collabora-online/collabora-online-environment.decorator.js +32 -0
  28. package/server/applications/files/modules/collabora-online/collabora-online-environment.decorator.js.map +1 -0
  29. package/server/applications/files/modules/collabora-online/collabora-online-manager.service.js +280 -0
  30. package/server/applications/files/modules/collabora-online/collabora-online-manager.service.js.map +1 -0
  31. package/server/applications/files/modules/collabora-online/collabora-online-manager.service.spec.js +552 -0
  32. package/server/applications/files/modules/collabora-online/collabora-online-manager.service.spec.js.map +1 -0
  33. package/server/applications/files/modules/collabora-online/collabora-online.config.js +40 -0
  34. package/server/applications/files/modules/collabora-online/collabora-online.config.js.map +1 -0
  35. package/server/applications/files/modules/collabora-online/collabora-online.constants.js +110 -0
  36. package/server/applications/files/modules/collabora-online/collabora-online.constants.js.map +1 -0
  37. package/server/applications/files/modules/collabora-online/collabora-online.controller.js +128 -0
  38. package/server/applications/files/modules/collabora-online/collabora-online.controller.js.map +1 -0
  39. package/server/applications/files/modules/collabora-online/collabora-online.controller.spec.js +47 -0
  40. package/server/applications/files/modules/collabora-online/collabora-online.controller.spec.js.map +1 -0
  41. package/server/applications/files/{interfaces/only-office-config.interface.js → modules/collabora-online/collabora-online.dtos.js} +1 -1
  42. package/server/applications/files/modules/collabora-online/collabora-online.dtos.js.map +1 -0
  43. package/server/applications/files/{guards/files-only-office.guard.js → modules/collabora-online/collabora-online.guard.js} +7 -21
  44. package/server/applications/files/modules/collabora-online/collabora-online.guard.js.map +1 -0
  45. package/server/applications/files/modules/collabora-online/collabora-online.guard.spec.js +86 -0
  46. package/server/applications/files/modules/collabora-online/collabora-online.guard.spec.js.map +1 -0
  47. package/server/applications/files/modules/collabora-online/collabora-online.interface.js +10 -0
  48. package/server/applications/files/modules/collabora-online/collabora-online.interface.js.map +1 -0
  49. package/server/applications/files/modules/collabora-online/collabora-online.module.js +41 -0
  50. package/server/applications/files/modules/collabora-online/collabora-online.module.js.map +1 -0
  51. package/server/applications/files/modules/collabora-online/collabora-online.routes.js +35 -0
  52. package/server/applications/files/modules/collabora-online/collabora-online.routes.js.map +1 -0
  53. package/server/applications/files/modules/collabora-online/collabora-online.strategy.js +59 -0
  54. package/server/applications/files/modules/collabora-online/collabora-online.strategy.js.map +1 -0
  55. package/server/applications/files/modules/collabora-online/collabora-online.utils.js +28 -0
  56. package/server/applications/files/modules/collabora-online/collabora-online.utils.js.map +1 -0
  57. package/server/applications/files/{decorators → modules/only-office}/only-office-environment.decorator.js +5 -5
  58. package/server/applications/files/modules/only-office/only-office-environment.decorator.js.map +1 -0
  59. package/server/applications/files/{services/files-only-office-manager.service.js → modules/only-office/only-office-manager.service.js} +101 -97
  60. package/server/applications/files/modules/only-office/only-office-manager.service.js.map +1 -0
  61. package/server/applications/files/modules/only-office/only-office-manager.service.spec.js +477 -0
  62. package/server/applications/files/modules/only-office/only-office-manager.service.spec.js.map +1 -0
  63. package/server/applications/files/modules/only-office/only-office.config.js +51 -0
  64. package/server/applications/files/modules/only-office/only-office.config.js.map +1 -0
  65. package/server/applications/files/modules/only-office/only-office.constants.js +417 -0
  66. package/server/applications/files/modules/only-office/only-office.constants.js.map +1 -0
  67. package/server/applications/files/{files-only-office.controller.js → modules/only-office/only-office.controller.js} +35 -52
  68. package/server/applications/files/modules/only-office/only-office.controller.js.map +1 -0
  69. package/server/applications/files/{files-only-office.controller.spec.js → modules/only-office/only-office.controller.spec.js} +24 -21
  70. package/server/applications/files/modules/only-office/only-office.controller.spec.js.map +1 -0
  71. package/server/applications/files/modules/only-office/only-office.dtos.js +10 -0
  72. package/server/applications/files/modules/only-office/only-office.dtos.js.map +1 -0
  73. package/server/applications/files/modules/only-office/only-office.guard.js +40 -0
  74. package/server/applications/files/modules/only-office/only-office.guard.js.map +1 -0
  75. package/server/applications/files/{guards/files-only-office.guard.spec.js → modules/only-office/only-office.guard.spec.js} +15 -21
  76. package/server/applications/files/modules/only-office/only-office.guard.spec.js.map +1 -0
  77. package/server/applications/files/modules/only-office/only-office.interface.js +10 -0
  78. package/server/applications/files/modules/only-office/only-office.interface.js.map +1 -0
  79. package/server/applications/files/modules/only-office/only-office.module.js +41 -0
  80. package/server/applications/files/modules/only-office/only-office.module.js.map +1 -0
  81. package/server/applications/files/modules/only-office/only-office.routes.js +45 -0
  82. package/server/applications/files/modules/only-office/only-office.routes.js.map +1 -0
  83. package/server/applications/files/{guards/files-only-office.strategy.js → modules/only-office/only-office.strategy.js} +11 -11
  84. package/server/applications/files/modules/only-office/only-office.strategy.js.map +1 -0
  85. package/server/applications/files/services/files-lock-manager.service.js +25 -33
  86. package/server/applications/files/services/files-lock-manager.service.js.map +1 -1
  87. package/server/applications/files/services/files-manager.service.js +17 -16
  88. package/server/applications/files/services/files-manager.service.js.map +1 -1
  89. package/server/applications/files/services/files-methods.service.js +2 -2
  90. package/server/applications/files/services/files-methods.service.js.map +1 -1
  91. package/server/applications/files/services/files-methods.service.spec.js +3 -1
  92. package/server/applications/files/services/files-methods.service.spec.js.map +1 -1
  93. package/server/applications/files/services/files-scheduler.service.js +2 -2
  94. package/server/applications/files/services/files-scheduler.service.js.map +1 -1
  95. package/server/applications/files/utils/files.js +10 -2
  96. package/server/applications/files/utils/files.js.map +1 -1
  97. package/server/applications/links/constants/routes.js +5 -0
  98. package/server/applications/links/constants/routes.js.map +1 -1
  99. package/server/applications/links/interfaces/link-space.interface.js.map +1 -1
  100. package/server/applications/links/links.controller.js +25 -5
  101. package/server/applications/links/links.controller.js.map +1 -1
  102. package/server/applications/links/services/links-manager.service.js +43 -21
  103. package/server/applications/links/services/links-manager.service.js.map +1 -1
  104. package/server/applications/links/services/links-manager.service.spec.js +4 -3
  105. package/server/applications/links/services/links-manager.service.spec.js.map +1 -1
  106. package/server/applications/links/services/links-queries.service.js +9 -2
  107. package/server/applications/links/services/links-queries.service.js.map +1 -1
  108. package/server/applications/shares/interfaces/share-link.interface.js.map +1 -1
  109. package/server/applications/shares/services/shares-manager.service.js +3 -0
  110. package/server/applications/shares/services/shares-manager.service.js.map +1 -1
  111. package/server/applications/shares/services/shares-manager.service.spec.js +2 -1
  112. package/server/applications/shares/services/shares-manager.service.spec.js.map +1 -1
  113. package/server/applications/shares/services/shares-queries.service.js +1 -0
  114. package/server/applications/shares/services/shares-queries.service.js.map +1 -1
  115. package/server/applications/spaces/constants/spaces.js +2 -2
  116. package/server/applications/spaces/constants/spaces.js.map +1 -1
  117. package/server/applications/spaces/decorators/space-override-permission.decorator.js +18 -0
  118. package/server/applications/spaces/decorators/space-override-permission.decorator.js.map +1 -0
  119. package/server/applications/spaces/guards/space.guard.js +40 -33
  120. package/server/applications/spaces/guards/space.guard.js.map +1 -1
  121. package/server/applications/spaces/guards/space.guard.spec.js +10 -15
  122. package/server/applications/spaces/guards/space.guard.spec.js.map +1 -1
  123. package/server/applications/users/users.e2e-spec.js +0 -1
  124. package/server/applications/users/users.e2e-spec.js.map +1 -1
  125. package/server/applications/webdav/constants/webdav.js +11 -0
  126. package/server/applications/webdav/constants/webdav.js.map +1 -1
  127. package/server/applications/webdav/guards/webdav-protocol.guard.js +9 -8
  128. package/server/applications/webdav/guards/webdav-protocol.guard.js.map +1 -1
  129. package/server/applications/webdav/guards/webdav-protocol.guard.spec.js +1 -1
  130. package/server/applications/webdav/guards/webdav-protocol.guard.spec.js.map +1 -1
  131. package/server/applications/webdav/interfaces/webdav.interface.js.map +1 -1
  132. package/server/applications/webdav/services/webdav-methods.service.js +40 -17
  133. package/server/applications/webdav/services/webdav-methods.service.js.map +1 -1
  134. package/server/applications/webdav/services/webdav-methods.service.spec.js +2157 -1289
  135. package/server/applications/webdav/services/webdav-methods.service.spec.js.map +1 -1
  136. package/server/applications/webdav/utils/bootstrap.js +45 -0
  137. package/server/applications/webdav/utils/bootstrap.js.map +1 -0
  138. package/server/applications/webdav/utils/webdav.js +8 -4
  139. package/server/applications/webdav/utils/webdav.js.map +1 -1
  140. package/server/applications/webdav/webdav.controller.js +5 -5
  141. package/server/applications/webdav/webdav.controller.js.map +1 -1
  142. package/server/applications/webdav/webdav.e2e-spec.js +131 -2
  143. package/server/applications/webdav/webdav.e2e-spec.js.map +1 -1
  144. package/server/authentication/auth.e2e-spec.js +12 -6
  145. package/server/authentication/auth.e2e-spec.js.map +1 -1
  146. package/server/authentication/guards/auth-basic.guard.spec.js +23 -0
  147. package/server/authentication/guards/auth-basic.guard.spec.js.map +1 -1
  148. package/server/authentication/guards/auth-basic.strategy.js +3 -3
  149. package/server/authentication/guards/auth-basic.strategy.js.map +1 -1
  150. package/server/authentication/guards/auth-digest.strategy.js +32 -11
  151. package/server/authentication/guards/auth-digest.strategy.js.map +1 -1
  152. package/server/authentication/guards/auth-token-access.guard.js +8 -3
  153. package/server/authentication/guards/auth-token-access.guard.js.map +1 -1
  154. package/server/authentication/guards/implementations/http-basic.strategy.js +76 -0
  155. package/server/authentication/guards/implementations/http-basic.strategy.js.map +1 -0
  156. package/server/authentication/guards/implementations/http-digest.strategy.js +155 -0
  157. package/server/authentication/guards/implementations/http-digest.strategy.js.map +1 -0
  158. package/server/authentication/services/auth-manager.service.js +1 -2
  159. package/server/authentication/services/auth-manager.service.js.map +1 -1
  160. package/server/authentication/services/auth-methods/auth-method-two-fa.service.js +1 -1
  161. package/server/authentication/services/auth-methods/auth-method-two-fa.service.js.map +1 -1
  162. package/server/authentication/services/auth-methods/auth-method-two-fa.service.spec.js +350 -4
  163. package/server/authentication/services/auth-methods/auth-method-two-fa.service.spec.js.map +1 -1
  164. package/server/configuration/config.environment.js +5 -1
  165. package/server/configuration/config.environment.js.map +1 -1
  166. package/server/configuration/config.interfaces.js.map +1 -1
  167. package/static/3rdpartylicenses.txt +507 -507
  168. package/static/assets/pdfjs/build/pdf.mjs +93 -33
  169. package/static/assets/pdfjs/build/pdf.mjs.map +1 -1
  170. package/static/assets/pdfjs/build/pdf.sandbox.mjs +3 -3
  171. package/static/assets/pdfjs/build/pdf.sandbox.mjs.map +1 -1
  172. package/static/assets/pdfjs/build/pdf.worker.mjs +166 -54
  173. package/static/assets/pdfjs/build/pdf.worker.mjs.map +1 -1
  174. package/static/assets/pdfjs/version +1 -1
  175. package/static/assets/pdfjs/web/images/checkmark.svg +5 -0
  176. package/static/assets/pdfjs/web/images/pages_closeButton.svg +3 -0
  177. package/static/assets/pdfjs/web/images/pages_selected.svg +7 -0
  178. package/static/assets/pdfjs/web/images/pages_viewArrow.svg +3 -0
  179. package/static/assets/pdfjs/web/images/pages_viewButton.svg +3 -0
  180. package/static/assets/pdfjs/web/locale/be/viewer.ftl +0 -2
  181. package/static/assets/pdfjs/web/locale/bs/viewer.ftl +0 -5
  182. package/static/assets/pdfjs/web/locale/cs/viewer.ftl +4 -6
  183. package/static/assets/pdfjs/web/locale/cy/viewer.ftl +0 -2
  184. package/static/assets/pdfjs/web/locale/da/viewer.ftl +0 -2
  185. package/static/assets/pdfjs/web/locale/de/viewer.ftl +0 -2
  186. package/static/assets/pdfjs/web/locale/dsb/viewer.ftl +0 -2
  187. package/static/assets/pdfjs/web/locale/el/viewer.ftl +0 -2
  188. package/static/assets/pdfjs/web/locale/en-CA/viewer.ftl +6 -2
  189. package/static/assets/pdfjs/web/locale/en-GB/viewer.ftl +0 -2
  190. package/static/assets/pdfjs/web/locale/en-US/viewer.ftl +82 -17
  191. package/static/assets/pdfjs/web/locale/eo/viewer.ftl +0 -2
  192. package/static/assets/pdfjs/web/locale/es-AR/viewer.ftl +0 -2
  193. package/static/assets/pdfjs/web/locale/es-CL/viewer.ftl +0 -2
  194. package/static/assets/pdfjs/web/locale/es-ES/viewer.ftl +0 -2
  195. package/static/assets/pdfjs/web/locale/es-MX/viewer.ftl +0 -2
  196. package/static/assets/pdfjs/web/locale/eu/viewer.ftl +0 -2
  197. package/static/assets/pdfjs/web/locale/fi/viewer.ftl +0 -2
  198. package/static/assets/pdfjs/web/locale/fr/viewer.ftl +0 -2
  199. package/static/assets/pdfjs/web/locale/fur/viewer.ftl +0 -5
  200. package/static/assets/pdfjs/web/locale/fy-NL/viewer.ftl +3 -5
  201. package/static/assets/pdfjs/web/locale/gn/viewer.ftl +0 -2
  202. package/static/assets/pdfjs/web/locale/he/viewer.ftl +0 -2
  203. package/static/assets/pdfjs/web/locale/hr/viewer.ftl +66 -0
  204. package/static/assets/pdfjs/web/locale/hsb/viewer.ftl +0 -2
  205. package/static/assets/pdfjs/web/locale/hu/viewer.ftl +0 -2
  206. package/static/assets/pdfjs/web/locale/hy-AM/viewer.ftl +3 -8
  207. package/static/assets/pdfjs/web/locale/ia/viewer.ftl +0 -2
  208. package/static/assets/pdfjs/web/locale/id/viewer.ftl +0 -5
  209. package/static/assets/pdfjs/web/locale/is/viewer.ftl +0 -5
  210. package/static/assets/pdfjs/web/locale/it/viewer.ftl +0 -2
  211. package/static/assets/pdfjs/web/locale/ja/viewer.ftl +0 -14
  212. package/static/assets/pdfjs/web/locale/ka/viewer.ftl +4 -6
  213. package/static/assets/pdfjs/web/locale/kab/viewer.ftl +0 -5
  214. package/static/assets/pdfjs/web/locale/kk/viewer.ftl +0 -2
  215. package/static/assets/pdfjs/web/locale/ko/viewer.ftl +0 -2
  216. package/static/assets/pdfjs/web/locale/nb-NO/viewer.ftl +1 -3
  217. package/static/assets/pdfjs/web/locale/nl/viewer.ftl +0 -2
  218. package/static/assets/pdfjs/web/locale/nn-NO/viewer.ftl +4 -2
  219. package/static/assets/pdfjs/web/locale/pa-IN/viewer.ftl +0 -2
  220. package/static/assets/pdfjs/web/locale/pl/viewer.ftl +0 -2
  221. package/static/assets/pdfjs/web/locale/pt-BR/viewer.ftl +0 -2
  222. package/static/assets/pdfjs/web/locale/pt-PT/viewer.ftl +35 -0
  223. package/static/assets/pdfjs/web/locale/rm/viewer.ftl +0 -5
  224. package/static/assets/pdfjs/web/locale/ro/viewer.ftl +4 -6
  225. package/static/assets/pdfjs/web/locale/ru/viewer.ftl +3 -5
  226. package/static/assets/pdfjs/web/locale/sk/viewer.ftl +0 -2
  227. package/static/assets/pdfjs/web/locale/sl/viewer.ftl +0 -2
  228. package/static/assets/pdfjs/web/locale/sq/viewer.ftl +0 -2
  229. package/static/assets/pdfjs/web/locale/sv-SE/viewer.ftl +0 -2
  230. package/static/assets/pdfjs/web/locale/tg/viewer.ftl +0 -2
  231. package/static/assets/pdfjs/web/locale/th/viewer.ftl +2 -2
  232. package/static/assets/pdfjs/web/locale/tr/viewer.ftl +0 -2
  233. package/static/assets/pdfjs/web/locale/vi/viewer.ftl +0 -2
  234. package/static/assets/pdfjs/web/locale/zh-CN/viewer.ftl +0 -2
  235. package/static/assets/pdfjs/web/locale/zh-TW/viewer.ftl +0 -2
  236. package/static/assets/pdfjs/web/viewer.css +1778 -835
  237. package/static/assets/pdfjs/web/viewer.html +167 -86
  238. package/static/assets/pdfjs/web/viewer.mjs +1106 -801
  239. package/static/assets/pdfjs/web/viewer.mjs.map +1 -1
  240. package/static/chunk-27V66YJV.js +2 -0
  241. package/static/{chunk-2F42MZQ5.js → chunk-2GXOVGTD.js} +1 -1
  242. package/static/{chunk-HLKZCMKV.js → chunk-2RWLNKZH.js} +1 -1
  243. package/static/chunk-2YQ4SX3A.js +13 -0
  244. package/static/{chunk-LFAQLJZK.js → chunk-3MVPXC3U.js} +1 -1
  245. package/static/chunk-3QTROEHV.js +1 -0
  246. package/static/{chunk-JYHTSSKW.js → chunk-3VRUIWQG.js} +1 -1
  247. package/static/{chunk-2CAAJBRO.js → chunk-3ZBAQTHJ.js} +1 -1
  248. package/static/chunk-3ZLBVUCX.js +2 -0
  249. package/static/chunk-46TJLPJY.js +1 -0
  250. package/static/chunk-4NIYCYRS.js +2 -0
  251. package/static/chunk-6OEOADR6.js +1 -0
  252. package/static/{chunk-BJARRIS6.js → chunk-76M3BMK6.js} +11 -11
  253. package/static/{chunk-ANH4VNOS.js → chunk-76REYAEA.js} +1 -1
  254. package/static/{chunk-7HL5Z6PF.js → chunk-7HJFIMNF.js} +1 -1
  255. package/static/{chunk-XIQXRSZ2.js → chunk-7KAYOR3A.js} +1 -1
  256. package/static/chunk-AALPWGPB.js +3 -0
  257. package/static/{chunk-Z2KBIZ5D.js → chunk-ARS47O5X.js} +1 -1
  258. package/static/chunk-BCN4T5DO.js +2 -0
  259. package/static/{chunk-DU4Q4RWJ.js → chunk-CMNMPG6Z.js} +1 -1
  260. package/static/{chunk-UO7ATVQG.js → chunk-CN5YVRFT.js} +1 -1
  261. package/static/{chunk-BX3QZ7IL.js → chunk-CSVPAZHK.js} +1 -1
  262. package/static/chunk-CVXLHSO5.js +1 -0
  263. package/static/{chunk-O233BXWK.js → chunk-D2MLAO5N.js} +1 -1
  264. package/static/{chunk-NHMYAVJK.js → chunk-D5FQ72R4.js} +1 -1
  265. package/static/{chunk-IBC7CFBQ.js → chunk-DVCN3P7Q.js} +1 -1
  266. package/static/{chunk-25PWAXTJ.js → chunk-EKWB5W72.js} +1 -1
  267. package/static/{chunk-ZCOEP4O2.js → chunk-FTFEQDWH.js} +1 -1
  268. package/static/{chunk-EPDWJEPD.js → chunk-FWQJ4ZCD.js} +1 -1
  269. package/static/chunk-G7RZN7HN.js +1 -0
  270. package/static/{chunk-X5UDV4ZB.js → chunk-HZAB6F4Q.js} +1 -1
  271. package/static/{chunk-FEQUP26G.js → chunk-IHS5LSJJ.js} +1 -1
  272. package/static/{chunk-DQAQUSVW.js → chunk-IMFO2MI7.js} +1 -1
  273. package/static/{chunk-ODAQRAPO.js → chunk-J7474P3L.js} +1 -1
  274. package/static/{chunk-DK2LAJEL.js → chunk-JAJ7VXMB.js} +1 -1
  275. package/static/{chunk-AYYJZMBE.js → chunk-JNTNMIUH.js} +1 -1
  276. package/static/chunk-JRXG43AA.js +2 -0
  277. package/static/{chunk-3AR5VNJE.js → chunk-KAUCN24H.js} +1 -1
  278. package/static/{chunk-3WS72A6C.js → chunk-KDUAB76O.js} +1 -1
  279. package/static/chunk-KEZNIIFH.js +1 -0
  280. package/static/chunk-LTJNLOX2.js +1 -0
  281. package/static/chunk-LWSCODLD.js +1 -0
  282. package/static/{chunk-GRV44RYI.js → chunk-LZUHREOF.js} +1 -1
  283. package/static/chunk-NIKNG2FX.js +1 -0
  284. package/static/chunk-NNZWSNAW.js +1 -0
  285. package/static/chunk-NWKBB7J4.js +1 -0
  286. package/static/{chunk-B4TDS6AQ.js → chunk-PDG7DOEF.js} +1 -1
  287. package/static/{chunk-NQCKX2AD.js → chunk-PPJCVBJH.js} +1 -1
  288. package/static/chunk-PVYVY3GD.js +1 -0
  289. package/static/chunk-Q5X5TPAG.js +1 -0
  290. package/static/chunk-QGHNJVJ6.js +1 -0
  291. package/static/{chunk-5HYSNQR4.js → chunk-QJ22N76V.js} +1 -1
  292. package/static/{chunk-TOCCCZP2.js → chunk-QTPIEEZW.js} +1 -1
  293. package/static/{chunk-D6QWQHWE.js → chunk-R4VMWCM5.js} +1 -1
  294. package/static/{chunk-7H5O4BLV.js → chunk-R4VYKZVJ.js} +1 -1
  295. package/static/{chunk-QKMN3S4M.js → chunk-RBTLSPYJ.js} +1 -1
  296. package/static/chunk-RJULB733.js +1 -0
  297. package/static/{chunk-E5C4QRNQ.js → chunk-RNVPQQKT.js} +5 -5
  298. package/static/chunk-RTNEBRKJ.js +1 -0
  299. package/static/{chunk-IIKL33TV.js → chunk-S44QIK3G.js} +1 -1
  300. package/static/{chunk-SF6Q6VRC.js → chunk-S6H2ELRY.js} +1 -1
  301. package/static/{chunk-4GBA6EJ4.js → chunk-SDJNZULP.js} +1 -1
  302. package/static/chunk-SNOOCDJD.js +1 -0
  303. package/static/chunk-SPQH3ATC.js +5 -0
  304. package/static/{chunk-5KVI243T.js → chunk-TNCKNU6I.js} +1 -1
  305. package/static/{chunk-7QYALK5T.js → chunk-TTWMFWEC.js} +1 -1
  306. package/static/{chunk-OVUMPMVM.js → chunk-U5E5H2DD.js} +1 -1
  307. package/static/{chunk-5NFH4E2B.js → chunk-UOK3LKSX.js} +1 -1
  308. package/static/{chunk-5ATJIR5S.js → chunk-VBTZDHZ3.js} +1 -1
  309. package/static/{chunk-CHMDM2ZW.js → chunk-VD5JHSDS.js} +1 -1
  310. package/static/chunk-VZFZUI6D.js +1 -0
  311. package/static/{chunk-GYYJ4FWN.js → chunk-WFMEUST4.js} +1 -1
  312. package/static/{chunk-BVKDW5XO.js → chunk-WRK2FTKU.js} +1 -1
  313. package/static/{chunk-GLPKRULI.js → chunk-WZPF4LS2.js} +1 -1
  314. package/static/chunk-X7NHX5C7.js +1 -0
  315. package/static/{chunk-FSGT46LM.js → chunk-XSURUW7C.js} +1 -1
  316. package/static/{chunk-KAAFVHYE.js → chunk-XX3JPJUM.js} +1 -1
  317. package/static/{chunk-C5T7RZSD.js → chunk-XZHWESIY.js} +1 -1
  318. package/static/chunk-ZCSHU3D7.js +1 -0
  319. package/static/{chunk-QUUQOBTF.js → chunk-ZEJLIGAY.js} +1 -1
  320. package/static/{chunk-GENTF6JM.js → chunk-ZHUBWKA2.js} +1 -1
  321. package/static/chunk-ZOMRIN3G.js +2 -0
  322. package/static/{chunk-2U5VKTML.js → chunk-ZU5MQTFN.js} +1 -1
  323. package/static/index.html +2 -2
  324. package/static/main-5O3KLGIR.js +11 -0
  325. package/static/{styles-S5HVK4H5.css → styles-XLLEY5Y3.css} +1 -1
  326. package/server/applications/files/constants/only-office.js +0 -531
  327. package/server/applications/files/constants/only-office.js.map +0 -1
  328. package/server/applications/files/decorators/only-office-environment.decorator.js.map +0 -1
  329. package/server/applications/files/files-only-office.controller.js.map +0 -1
  330. package/server/applications/files/files-only-office.controller.spec.js.map +0 -1
  331. package/server/applications/files/guards/files-only-office.guard.js.map +0 -1
  332. package/server/applications/files/guards/files-only-office.guard.spec.js.map +0 -1
  333. package/server/applications/files/guards/files-only-office.strategy.js.map +0 -1
  334. package/server/applications/files/interfaces/only-office-config.interface.js.map +0 -1
  335. package/server/applications/files/services/files-only-office-manager.service.js.map +0 -1
  336. package/server/applications/files/services/files-only-office-manager.service.spec.js +0 -58
  337. package/server/applications/files/services/files-only-office-manager.service.spec.js.map +0 -1
  338. package/static/chunk-42L6C5MT.js +0 -1
  339. package/static/chunk-4ZKAVMB4.js +0 -1
  340. package/static/chunk-5GIWZKNS.js +0 -1
  341. package/static/chunk-5WCQBTXW.js +0 -1
  342. package/static/chunk-B2A4HNDC.js +0 -1
  343. package/static/chunk-BSB4VROD.js +0 -2
  344. package/static/chunk-CUC7R6C2.js +0 -1
  345. package/static/chunk-DHFQIFOF.js +0 -1
  346. package/static/chunk-DRHPEERW.js +0 -2
  347. package/static/chunk-FCGTI42I.js +0 -1
  348. package/static/chunk-FCR5AEHR.js +0 -3
  349. package/static/chunk-HB5DC7RJ.js +0 -1
  350. package/static/chunk-ITVA26X2.js +0 -2
  351. package/static/chunk-KWKZN53T.js +0 -1
  352. package/static/chunk-LBXOAKBD.js +0 -1
  353. package/static/chunk-LZKI5P5T.js +0 -1
  354. package/static/chunk-MGMDT4VN.js +0 -1
  355. package/static/chunk-MWUUM2NK.js +0 -13
  356. package/static/chunk-MYM43ENO.js +0 -1
  357. package/static/chunk-NAH4V2R6.js +0 -2
  358. package/static/chunk-PCFH5HCI.js +0 -2
  359. package/static/chunk-Q6B4OVER.js +0 -5
  360. package/static/chunk-QV5LQKTS.js +0 -1
  361. package/static/chunk-S4UTSOPV.js +0 -1
  362. package/static/chunk-SRBOO7AO.js +0 -1
  363. package/static/chunk-VZPCXSRG.js +0 -2
  364. package/static/chunk-XKEBQNQJ.js +0 -1
  365. package/static/chunk-YYTDPI5S.js +0 -1
  366. package/static/main-ODUA232E.js +0 -11
  367. /package/static/assets/pdfjs/web/images/{toolbarButton-sidebarToggle.svg → toolbarButton-viewsManagerToggle.svg} +0 -0
@@ -0,0 +1 @@
1
+ import{$a as at,B as Qt,Ba as mi,Cb as z,I as oi,Ma as _i,Mb as Ai,Na as gi,Nb as ct,Pb as bi,Qb as Ti,Ua as yi,W as ci,X as jt,_ as ot,aa as hi,ab as Ei,ba as ui,ca as xt,da as li,ea as pi,fa as Jt,ga as q,ha as fi,ia as di,ja as X,qb as Si,tb as M,ub as wi,vb as Pt}from"./chunk-AALPWGPB.js";import{Aa as Re,Af as ii,Bb as st,Bd as Je,Cd as Xe,Dd as Rt,Eb as B,Ed as Ot,G as Ae,Gb as D,Gf as ri,Jd as ze,Kb as Pe,Kd as kt,L as be,Lb as Fe,Mb as Ie,Oa as m,Pb as Kt,Qa as Oe,Qb as Le,Rb as bt,Tb as b,Vb as Ue,Vc as $e,W as Te,Xb as Be,Yb as De,Yc as Tt,Yf as si,Zb as Me,ab as At,bb as ke,c as we,cb as xe,ea as wt,fa as ve,fd as vt,ha as Ce,hd as nt,he as Ze,ie as ti,ja as p,jb as Ne,jd as Ct,kc as Ve,kd as qe,lb as k,mb as x,mc as We,oa as W,od as Ge,og as ni,pa as $,pd as He,qg as Nt,rb as C,sb as f,sd as Ye,tb as _,td as Ke,ub as J,v as S,yd as Qe,yf as ei,zd as je}from"./chunk-76M3BMK6.js";import{n as ai}from"./chunk-DM4NXKEP.js";import{a as O,b as ge,d as ye,e as Ee,i as Se}from"./chunk-KAVP6UXH.js";var V=(function(r){return r.USER="user",r.GUEST="guest",r.LINK="link",r.GROUP="group",r.PGROUP="personal group",r})(V||{});function vi(r,t=[]){let e=O({},Object.fromEntries(Object.entries(Ti).filter(([i,s])=>t.indexOf(i)===-1)));if(!r)return e;for(let i of r.split(":"))i in e&&(e[i]=!0);return e}function ts(r,t,e=[]){let i={};if(!r)return i;for(let s of r.split(":"))e.indexOf(s)===-1&&(i[s]=t.indexOf(s)>-1);return i}function es(r,t=[]){let e={};if(!r)return e;for(let i of r.split(":"))t.indexOf(i)===-1&&(e[i]=bi[i]);return e}function is(r){return Object.entries(r).filter(([t,e])=>e).map(([t,e])=>t).join(":")}var T=class{constructor(t,e=[]){this.newly=0,this.linkSettings=null,Object.assign(this,t),this.mid=`${t.type[0]}${t.id}`,this.hPerms=vi(t.permissions,e),t.login&&(this.avatarUrl=M(t.login)),this.isLink=!!this.linkId,this.isGuest=this.type===V.GUEST,this.isUser=this.isGuest||this.type===V.USER&&!this.isLink,this.isGroup=this.type===V.GROUP||this.type===V.PGROUP,this.isPersonalGroup=this.type===V.PGROUP,this.setGroupRole(),this.modifiedAt?this.newly=at(this.modifiedAt):this.createdAt&&(this.newly=at(this.createdAt))}setGroupRole(t){typeof t<"u"&&(this.groupRole=t),this.isGroupManager=this.groupRole===Qt.MANAGER}};function ls(r,t,e){return new T({id:r.id,login:r.login,name:r.fullName,description:r.email,type:V.USER,spaceRole:t||mi.IS_MEMBER,groupRole:e||Qt.MEMBER,permissions:""})}var Ci={NAME_SPACE:"/",EVENTS:{NOTIFICATION:"notification"}};var ht={NAME_SPACE:"/",EVENTS:{ONLINE_STATUS:"onlineStatus",ONLINE_USERS:"onlineUsers",ONLINE_USER:"onlineUser"}};var l=(function(r){return r.BASE="/api/auth",r.LOGIN="login",r.LOGOUT="logout",r.REFRESH="refresh",r.TOKEN="token",r.TOKEN_REFRESH="token/refresh",r.WS="socket.io",r.TWO_FA_BASE="2fa",r.TWO_FA_ENABLE="enable",r.TWO_FA_DISABLE="disable",r.TWO_FA_LOGIN_VERIFY="login/verify",r.TWO_FA_ADMIN_RESET_USER="reset/user",r})(l||{}),ms=`${l.BASE}/${l.LOGIN}`,_s=`${l.BASE}/${l.LOGOUT}`,Ri=`${l.BASE}/${l.REFRESH}`,gs=`${l.BASE}/${l.TOKEN}`,ys=`${l.BASE}/${l.TOKEN_REFRESH}`,Oi=`/${l.WS}`,Xt=`${l.BASE}/${l.TWO_FA_BASE}/${l.TWO_FA_ENABLE}`,ki=`${l.BASE}/${l.TWO_FA_BASE}/${l.TWO_FA_DISABLE}`,xi=`${l.BASE}/${l.TWO_FA_BASE}/${l.TWO_FA_LOGIN_VERIFY}`,Ni=`${l.BASE}/${l.TWO_FA_BASE}/${l.TWO_FA_ADMIN_RESET_USER}`;var fe={};Ee(fe,{Fetch:()=>mt,Manager:()=>K,NodeWebSocket:()=>L,NodeXHR:()=>I,Socket:()=>H,WebSocket:()=>L,WebTransport:()=>G,XHR:()=>I,connect:()=>Q,default:()=>Q,io:()=>Q,protocol:()=>le});var v=Object.create(null);v.open="0";v.close="1";v.ping="2";v.pong="3";v.message="4";v.upgrade="5";v.noop="6";var ut=Object.create(null);Object.keys(v).forEach(r=>{ut[v[r]]=r});var lt={type:"error",data:"parser error"};var Ii=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Li=typeof ArrayBuffer=="function",Ui=r=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(r):r&&r.buffer instanceof ArrayBuffer,pt=({type:r,data:t},e,i)=>Ii&&t instanceof Blob?e?i(t):Pi(t,i):Li&&(t instanceof ArrayBuffer||Ui(t))?e?i(t):Pi(new Blob([t]),i):i(v[r]+(t||"")),Pi=(r,t)=>{let e=new FileReader;return e.onload=function(){let i=e.result.split(",")[1];t("b"+(i||""))},e.readAsDataURL(r)};function Fi(r){return r instanceof Uint8Array?r:r instanceof ArrayBuffer?new Uint8Array(r):new Uint8Array(r.buffer,r.byteOffset,r.byteLength)}var zt;function Bi(r,t){if(Ii&&r.data instanceof Blob)return r.data.arrayBuffer().then(Fi).then(t);if(Li&&(r.data instanceof ArrayBuffer||Ui(r.data)))return t(Fi(r.data));pt(r,!1,e=>{zt||(zt=new TextEncoder),t(zt.encode(e))})}var Di="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ft=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let r=0;r<Di.length;r++)ft[Di.charCodeAt(r)]=r;var Mi=r=>{let t=r.length*.75,e=r.length,i,s=0,n,o,a,h;r[r.length-1]==="="&&(t--,r[r.length-2]==="="&&t--);let R=new ArrayBuffer(t),A=new Uint8Array(R);for(i=0;i<e;i+=4)n=ft[r.charCodeAt(i)],o=ft[r.charCodeAt(i+1)],a=ft[r.charCodeAt(i+2)],h=ft[r.charCodeAt(i+3)],A[s++]=n<<2|o>>4,A[s++]=(o&15)<<4|a>>2,A[s++]=(a&3)<<6|h&63;return R};var mr=typeof ArrayBuffer=="function",dt=(r,t)=>{if(typeof r!="string")return{type:"message",data:Vi(r,t)};let e=r.charAt(0);return e==="b"?{type:"message",data:_r(r.substring(1),t)}:ut[e]?r.length>1?{type:ut[e],data:r.substring(1)}:{type:ut[e]}:lt},_r=(r,t)=>{if(mr){let e=Mi(r);return Vi(e,t)}else return{base64:!0,data:r}},Vi=(r,t)=>{switch(t){case"blob":return r instanceof Blob?r:new Blob([r]);case"arraybuffer":default:return r instanceof ArrayBuffer?r:r.buffer}};var Wi="",$i=(r,t)=>{let e=r.length,i=new Array(e),s=0;r.forEach((n,o)=>{pt(n,!1,a=>{i[o]=a,++s===e&&t(i.join(Wi))})})},qi=(r,t)=>{let e=r.split(Wi),i=[];for(let s=0;s<e.length;s++){let n=dt(e[s],t);if(i.push(n),n.type==="error")break}return i};function Gi(){return new TransformStream({transform(r,t){Bi(r,e=>{let i=e.length,s;if(i<126)s=new Uint8Array(1),new DataView(s.buffer).setUint8(0,i);else if(i<65536){s=new Uint8Array(3);let n=new DataView(s.buffer);n.setUint8(0,126),n.setUint16(1,i)}else{s=new Uint8Array(9);let n=new DataView(s.buffer);n.setUint8(0,127),n.setBigUint64(1,BigInt(i))}r.data&&typeof r.data!="string"&&(s[0]|=128),t.enqueue(s),t.enqueue(e)})}})}var Zt;function It(r){return r.reduce((t,e)=>t+e.length,0)}function Lt(r,t){if(r[0].length===t)return r.shift();let e=new Uint8Array(t),i=0;for(let s=0;s<t;s++)e[s]=r[0][i++],i===r[0].length&&(r.shift(),i=0);return r.length&&i<r[0].length&&(r[0]=r[0].slice(i)),e}function Hi(r,t){Zt||(Zt=new TextDecoder);let e=[],i=0,s=-1,n=!1;return new TransformStream({transform(o,a){for(e.push(o);;){if(i===0){if(It(e)<1)break;let h=Lt(e,1);n=(h[0]&128)===128,s=h[0]&127,s<126?i=3:s===126?i=1:i=2}else if(i===1){if(It(e)<2)break;let h=Lt(e,2);s=new DataView(h.buffer,h.byteOffset,h.length).getUint16(0),i=3}else if(i===2){if(It(e)<8)break;let h=Lt(e,8),R=new DataView(h.buffer,h.byteOffset,h.length),A=R.getUint32(0);if(A>Math.pow(2,21)-1){a.enqueue(lt);break}s=A*Math.pow(2,32)+R.getUint32(4),i=3}else{if(It(e)<s)break;let h=Lt(e,s);a.enqueue(dt(n?h:Zt.decode(h),t)),i=0}if(s===0||s>r){a.enqueue(lt);break}}}})}var te=4;function u(r){if(r)return gr(r)}function gr(r){for(var t in u.prototype)r[t]=u.prototype[t];return r}u.prototype.on=u.prototype.addEventListener=function(r,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+r]=this._callbacks["$"+r]||[]).push(t),this};u.prototype.once=function(r,t){function e(){this.off(r,e),t.apply(this,arguments)}return e.fn=t,this.on(r,e),this};u.prototype.off=u.prototype.removeListener=u.prototype.removeAllListeners=u.prototype.removeEventListener=function(r,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var e=this._callbacks["$"+r];if(!e)return this;if(arguments.length==1)return delete this._callbacks["$"+r],this;for(var i,s=0;s<e.length;s++)if(i=e[s],i===t||i.fn===t){e.splice(s,1);break}return e.length===0&&delete this._callbacks["$"+r],this};u.prototype.emit=function(r){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),e=this._callbacks["$"+r],i=1;i<arguments.length;i++)t[i-1]=arguments[i];if(e){e=e.slice(0);for(var i=0,s=e.length;i<s;++i)e[i].apply(this,t)}return this};u.prototype.emitReserved=u.prototype.emit;u.prototype.listeners=function(r){return this._callbacks=this._callbacks||{},this._callbacks["$"+r]||[]};u.prototype.hasListeners=function(r){return!!this.listeners(r).length};var N=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,e)=>e(t,0),g=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),Yi="arraybuffer";function Ut(r,...t){return t.reduce((e,i)=>(r.hasOwnProperty(i)&&(e[i]=r[i]),e),{})}var yr=g.setTimeout,Er=g.clearTimeout;function P(r,t){t.useNativeTimers?(r.setTimeoutFn=yr.bind(g),r.clearTimeoutFn=Er.bind(g)):(r.setTimeoutFn=g.setTimeout.bind(g),r.clearTimeoutFn=g.clearTimeout.bind(g))}var Sr=1.33;function Ki(r){return typeof r=="string"?wr(r):Math.ceil((r.byteLength||r.size)*Sr)}function wr(r){let t=0,e=0;for(let i=0,s=r.length;i<s;i++)t=r.charCodeAt(i),t<128?e+=1:t<2048?e+=2:t<55296||t>=57344?e+=3:(i++,e+=4);return e}function Bt(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function Qi(r){let t="";for(let e in r)r.hasOwnProperty(e)&&(t.length&&(t+="&"),t+=encodeURIComponent(e)+"="+encodeURIComponent(r[e]));return t}function ji(r){let t={},e=r.split("&");for(let i=0,s=e.length;i<s;i++){let n=e[i].split("=");t[decodeURIComponent(n[0])]=decodeURIComponent(n[1])}return t}var Dt=class extends Error{constructor(t,e,i){super(t),this.description=e,this.context=i,this.type="TransportError"}},F=class extends u{constructor(t){super(),this.writable=!1,P(this,t),this.opts=t,this.query=t.query,this.socket=t.socket,this.supportsBinary=!t.forceBase64}onError(t,e,i){return super.emitReserved("error",new Dt(t,e,i)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){let e=dt(t,this.socket.binaryType);this.onPacket(e)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,e={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(e)}_hostname(){let t=this.opts.hostname;return t.indexOf(":")===-1?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(this.opts.port)!==443||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(t){let e=Qi(t);return e.length?"?"+e:""}};var Z=class extends F{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(t){this.readyState="pausing";let e=()=>{this.readyState="paused",t()};if(this._polling||!this.writable){let i=0;this._polling&&(i++,this.once("pollComplete",function(){--i||e()})),this.writable||(i++,this.once("drain",function(){--i||e()}))}else e()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){let e=i=>{if(this.readyState==="opening"&&i.type==="open"&&this.onOpen(),i.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(i)};qi(t,this.socket.binaryType).forEach(e),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){let t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,$i(t,e=>{this.doWrite(e,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){let t=this.opts.secure?"https":"http",e=this.query||{};return this.opts.timestampRequests!==!1&&(e[this.opts.timestampParam]=Bt()),!this.supportsBinary&&!e.sid&&(e.b64=1),this.createUri(t,e)}};var Ji=!1;try{Ji=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}var Xi=Ji;function Ar(){}var ee=class extends Z{constructor(t){if(super(t),typeof location<"u"){let e=location.protocol==="https:",i=location.port;i||(i=e?"443":"80"),this.xd=typeof location<"u"&&t.hostname!==location.hostname||i!==t.port}}doWrite(t,e){let i=this.request({method:"POST",data:t});i.on("success",e),i.on("error",(s,n)=>{this.onError("xhr post error",s,n)})}doPoll(){let t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(e,i)=>{this.onError("xhr poll error",e,i)}),this.pollXhr=t}},Mt=(()=>{class r extends u{constructor(e,i,s){super(),this.createRequest=e,P(this,s),this._opts=s,this._method=s.method||"GET",this._uri=i,this._data=s.data!==void 0?s.data:null,this._create()}_create(){var e;let i=Ut(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");i.xdomain=!!this._opts.xd;let s=this._xhr=this.createRequest(i);try{s.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){s.setDisableHeaderCheck&&s.setDisableHeaderCheck(!0);for(let n in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(n)&&s.setRequestHeader(n,this._opts.extraHeaders[n])}}catch{}if(this._method==="POST")try{s.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{s.setRequestHeader("Accept","*/*")}catch{}(e=this._opts.cookieJar)===null||e===void 0||e.addCookies(s),"withCredentials"in s&&(s.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(s.timeout=this._opts.requestTimeout),s.onreadystatechange=()=>{var n;s.readyState===3&&((n=this._opts.cookieJar)===null||n===void 0||n.parseCookies(s.getResponseHeader("set-cookie"))),s.readyState===4&&(s.status===200||s.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof s.status=="number"?s.status:0)},0))},s.send(this._data)}catch(n){this.setTimeoutFn(()=>{this._onError(n)},0);return}typeof document<"u"&&(this._index=r.requestsCount++,r.requests[this._index]=this)}_onError(e){this.emitReserved("error",e,this._xhr),this._cleanup(!0)}_cleanup(e){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=Ar,e)try{this._xhr.abort()}catch{}typeof document<"u"&&delete r.requests[this._index],this._xhr=null}}_onLoad(){let e=this._xhr.responseText;e!==null&&(this.emitReserved("data",e),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}return r.requestsCount=0,r.requests={},r})();if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",zi);else if(typeof addEventListener=="function"){let r="onpagehide"in g?"pagehide":"unload";addEventListener(r,zi,!1)}}function zi(){for(let r in Mt.requests)Mt.requests.hasOwnProperty(r)&&Mt.requests[r].abort()}var br=(function(){let r=Zi({xdomain:!1});return r&&r.responseType!==null})(),I=class extends ee{constructor(t){super(t);let e=t&&t.forceBase64;this.supportsBinary=br&&!e}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new Mt(Zi,this.uri(),t)}};function Zi(r){let t=r.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||Xi))return new XMLHttpRequest}catch{}if(!t)try{return new g[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}var tr=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative",re=class extends F{get name(){return"websocket"}doOpen(){let t=this.uri(),e=this.opts.protocols,i=tr?{}:Ut(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(i.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,e,i)}catch(s){return this.emitReserved("error",s)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let e=0;e<t.length;e++){let i=t[e],s=e===t.length-1;pt(i,this.supportsBinary,n=>{try{this.doWrite(i,n)}catch{}s&&N(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){let t=this.opts.secure?"wss":"ws",e=this.query||{};return this.opts.timestampRequests&&(e[this.opts.timestampParam]=Bt()),this.supportsBinary||(e.b64=1),this.createUri(t,e)}},ie=g.WebSocket||g.MozWebSocket,L=class extends re{createSocket(t,e,i){return tr?new ie(t,e,i):e?new ie(t,e):new ie(t)}doWrite(t,e){this.ws.send(e)}};var G=class extends F{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this._transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(t=>{let e=Hi(Number.MAX_SAFE_INTEGER,this.socket.binaryType),i=t.readable.pipeThrough(e).getReader(),s=Gi();s.readable.pipeTo(t.writable),this._writer=s.writable.getWriter();let n=()=>{i.read().then(({done:a,value:h})=>{a||(this.onPacket(h),n())}).catch(a=>{})};n();let o={type:"open"};this.query.sid&&(o.data=`{"sid":"${this.query.sid}"}`),this._writer.write(o).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let e=0;e<t.length;e++){let i=t[e],s=e===t.length-1;this._writer.write(i).then(()=>{s&&N(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}};var se={websocket:L,webtransport:G,polling:I};var Tr=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,vr=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function tt(r){if(r.length>8e3)throw"URI too long";let t=r,e=r.indexOf("["),i=r.indexOf("]");e!=-1&&i!=-1&&(r=r.substring(0,e)+r.substring(e,i).replace(/:/g,";")+r.substring(i,r.length));let s=Tr.exec(r||""),n={},o=14;for(;o--;)n[vr[o]]=s[o]||"";return e!=-1&&i!=-1&&(n.source=t,n.host=n.host.substring(1,n.host.length-1).replace(/;/g,":"),n.authority=n.authority.replace("[","").replace("]","").replace(/;/g,":"),n.ipv6uri=!0),n.pathNames=Cr(n,n.path),n.queryKey=Rr(n,n.query),n}function Cr(r,t){let e=/\/{2,9}/g,i=t.replace(e,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&i.splice(0,1),t.slice(-1)=="/"&&i.splice(i.length-1,1),i}function Rr(r,t){let e={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(i,s,n){s&&(e[s]=n)}),e}var ne=typeof addEventListener=="function"&&typeof removeEventListener=="function",Vt=[];ne&&addEventListener("offline",()=>{Vt.forEach(r=>r())},!1);var Wt=(()=>{class r extends u{constructor(e,i){if(super(),this.binaryType=Yi,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,e&&typeof e=="object"&&(i=e,e=null),e){let s=tt(e);i.hostname=s.host,i.secure=s.protocol==="https"||s.protocol==="wss",i.port=s.port,s.query&&(i.query=s.query)}else i.host&&(i.hostname=tt(i.host).host);P(this,i),this.secure=i.secure!=null?i.secure:typeof location<"u"&&location.protocol==="https:",i.hostname&&!i.port&&(i.port=this.secure?"443":"80"),this.hostname=i.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=i.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},i.transports.forEach(s=>{let n=s.prototype.name;this.transports.push(n),this._transportsByName[n]=s}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},i),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=ji(this.opts.query)),ne&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},Vt.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(e){let i=Object.assign({},this.opts.query);i.EIO=te,i.transport=e,this.id&&(i.sid=this.id);let s=Object.assign({},this.opts,{query:i,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[e]);return new this._transportsByName[e](s)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}let e=this.opts.rememberUpgrade&&r.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";let i=this.createTransport(e);i.open(),this.setTransport(i)}setTransport(e){this.transport&&this.transport.removeAllListeners(),this.transport=e,e.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",i=>this._onClose("transport close",i))}onOpen(){this.readyState="open",r.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(e){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",e),this.emitReserved("heartbeat"),e.type){case"open":this.onHandshake(JSON.parse(e.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":let i=new Error("server error");i.code=e.data,this._onError(i);break;case"message":this.emitReserved("data",e.data),this.emitReserved("message",e.data);break}}onHandshake(e){this.emitReserved("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this._pingInterval=e.pingInterval,this._pingTimeout=e.pingTimeout,this._maxPayload=e.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);let e=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+e,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},e),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){let e=this._getWritablePackets();this.transport.send(e),this._prevBufferLen=e.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let i=1;for(let s=0;s<this.writeBuffer.length;s++){let n=this.writeBuffer[s].data;if(n&&(i+=Ki(n)),s>0&&i>this._maxPayload)return this.writeBuffer.slice(0,s);i+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;let e=Date.now()>this._pingTimeoutTime;return e&&(this._pingTimeoutTime=0,N(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),e}write(e,i,s){return this._sendPacket("message",e,i,s),this}send(e,i,s){return this._sendPacket("message",e,i,s),this}_sendPacket(e,i,s,n){if(typeof i=="function"&&(n=i,i=void 0),typeof s=="function"&&(n=s,s=null),this.readyState==="closing"||this.readyState==="closed")return;s=s||{},s.compress=s.compress!==!1;let o={type:e,data:i,options:s};this.emitReserved("packetCreate",o),this.writeBuffer.push(o),n&&this.once("flush",n),this.flush()}close(){let e=()=>{this._onClose("forced close"),this.transport.close()},i=()=>{this.off("upgrade",i),this.off("upgradeError",i),e()},s=()=>{this.once("upgrade",i),this.once("upgradeError",i)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?s():e()}):this.upgrading?s():e()),this}_onError(e){if(r.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",e),this._onClose("transport error",e)}_onClose(e,i){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),ne&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){let s=Vt.indexOf(this._offlineEventListener);s!==-1&&Vt.splice(s,1)}this.readyState="closed",this.id=null,this.emitReserved("close",e,i),this.writeBuffer=[],this._prevBufferLen=0}}}return r.protocol=te,r})(),$t=class extends Wt{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let t=0;t<this._upgrades.length;t++)this._probe(this._upgrades[t])}_probe(t){let e=this.createTransport(t),i=!1;Wt.priorWebsocketSuccess=!1;let s=()=>{i||(e.send([{type:"ping",data:"probe"}]),e.once("packet",U=>{if(!i)if(U.type==="pong"&&U.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",e),!e)return;Wt.priorWebsocketSuccess=e.name==="websocket",this.transport.pause(()=>{i||this.readyState!=="closed"&&(A(),this.setTransport(e),e.send([{type:"upgrade"}]),this.emitReserved("upgrade",e),e=null,this.upgrading=!1,this.flush())})}else{let rt=new Error("probe error");rt.transport=e.name,this.emitReserved("upgradeError",rt)}}))};function n(){i||(i=!0,A(),e.close(),e=null)}let o=U=>{let rt=new Error("probe error: "+U);rt.transport=e.name,n(),this.emitReserved("upgradeError",rt)};function a(){o("transport closed")}function h(){o("socket closed")}function R(U){e&&U.name!==e.name&&n()}let A=()=>{e.removeListener("open",s),e.removeListener("error",o),e.removeListener("close",a),this.off("close",h),this.off("upgrading",R)};e.once("open",s),e.once("error",o),e.once("close",a),this.once("close",h),this.once("upgrading",R),this._upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{i||e.open()},200):e.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){let e=[];for(let i=0;i<t.length;i++)~this.transports.indexOf(t[i])&&e.push(t[i]);return e}},et=class extends $t{constructor(t,e={}){let i=typeof t=="object"?t:e;(!i.transports||i.transports&&typeof i.transports[0]=="string")&&(i.transports=(i.transports||["polling","websocket","webtransport"]).map(s=>se[s]).filter(s=>!!s)),super(t,i)}};var mt=class extends Z{doPoll(){this._fetch().then(t=>{if(!t.ok)return this.onError("fetch read error",t.status,t);t.text().then(e=>this.onData(e))}).catch(t=>{this.onError("fetch read error",t)})}doWrite(t,e){this._fetch(t).then(i=>{if(!i.ok)return this.onError("fetch write error",i.status,i);e()}).catch(i=>{this.onError("fetch write error",i)})}_fetch(t){var e;let i=t!==void 0,s=new Headers(this.opts.extraHeaders);return i&&s.set("content-type","text/plain;charset=UTF-8"),(e=this.socket._cookieJar)===null||e===void 0||e.appendCookies(s),fetch(this.uri(),{method:i?"POST":"GET",body:i?t:null,headers:s,credentials:this.opts.withCredentials?"include":"omit"}).then(n=>{var o;return(o=this.socket._cookieJar)===null||o===void 0||o.parseCookies(n.headers.getSetCookie()),n})}};var vn=et.protocol;function er(r,t="",e){let i=r;e=e||typeof location<"u"&&location,r==null&&(r=e.protocol+"//"+e.host),typeof r=="string"&&(r.charAt(0)==="/"&&(r.charAt(1)==="/"?r=e.protocol+r:r=e.host+r),/^(https?|wss?):\/\//.test(r)||(typeof e<"u"?r=e.protocol+"//"+r:r="https://"+r),i=tt(r)),i.port||(/^(http|ws)$/.test(i.protocol)?i.port="80":/^(http|ws)s$/.test(i.protocol)&&(i.port="443")),i.path=i.path||"/";let n=i.host.indexOf(":")!==-1?"["+i.host+"]":i.host;return i.id=i.protocol+"://"+n+":"+i.port+t,i.href=i.protocol+"://"+n+(e&&e.port===i.port?"":":"+i.port),i}var pe={};Ee(pe,{Decoder:()=>he,Encoder:()=>ce,PacketType:()=>c,isPacketValid:()=>Ur,protocol:()=>le});var Or=typeof ArrayBuffer=="function",kr=r=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(r):r.buffer instanceof ArrayBuffer,ir=Object.prototype.toString,xr=typeof Blob=="function"||typeof Blob<"u"&&ir.call(Blob)==="[object BlobConstructor]",Nr=typeof File=="function"||typeof File<"u"&&ir.call(File)==="[object FileConstructor]";function gt(r){return Or&&(r instanceof ArrayBuffer||kr(r))||xr&&r instanceof Blob||Nr&&r instanceof File}function _t(r,t){if(!r||typeof r!="object")return!1;if(Array.isArray(r)){for(let e=0,i=r.length;e<i;e++)if(_t(r[e]))return!0;return!1}if(gt(r))return!0;if(r.toJSON&&typeof r.toJSON=="function"&&arguments.length===1)return _t(r.toJSON(),!0);for(let e in r)if(Object.prototype.hasOwnProperty.call(r,e)&&_t(r[e]))return!0;return!1}function rr(r){let t=[],e=r.data,i=r;return i.data=oe(e,t),i.attachments=t.length,{packet:i,buffers:t}}function oe(r,t){if(!r)return r;if(gt(r)){let e={_placeholder:!0,num:t.length};return t.push(r),e}else if(Array.isArray(r)){let e=new Array(r.length);for(let i=0;i<r.length;i++)e[i]=oe(r[i],t);return e}else if(typeof r=="object"&&!(r instanceof Date)){let e={};for(let i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=oe(r[i],t));return e}return r}function sr(r,t){return r.data=ae(r.data,t),delete r.attachments,r}function ae(r,t){if(!r)return r;if(r&&r._placeholder===!0){if(typeof r.num=="number"&&r.num>=0&&r.num<t.length)return t[r.num];throw new Error("illegal attachments")}else if(Array.isArray(r))for(let e=0;e<r.length;e++)r[e]=ae(r[e],t);else if(typeof r=="object")for(let e in r)Object.prototype.hasOwnProperty.call(r,e)&&(r[e]=ae(r[e],t));return r}var nr=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],le=5,c=(function(r){return r[r.CONNECT=0]="CONNECT",r[r.DISCONNECT=1]="DISCONNECT",r[r.EVENT=2]="EVENT",r[r.ACK=3]="ACK",r[r.CONNECT_ERROR=4]="CONNECT_ERROR",r[r.BINARY_EVENT=5]="BINARY_EVENT",r[r.BINARY_ACK=6]="BINARY_ACK",r})(c||{}),ce=class{constructor(t){this.replacer=t}encode(t){return(t.type===c.EVENT||t.type===c.ACK)&&_t(t)?this.encodeAsBinary({type:t.type===c.EVENT?c.BINARY_EVENT:c.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let e=""+t.type;return(t.type===c.BINARY_EVENT||t.type===c.BINARY_ACK)&&(e+=t.attachments+"-"),t.nsp&&t.nsp!=="/"&&(e+=t.nsp+","),t.id!=null&&(e+=t.id),t.data!=null&&(e+=JSON.stringify(t.data,this.replacer)),e}encodeAsBinary(t){let e=rr(t),i=this.encodeAsString(e.packet),s=e.buffers;return s.unshift(i),s}},he=class r extends u{constructor(t){super(),this.reviver=t}add(t){let e;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");e=this.decodeString(t);let i=e.type===c.BINARY_EVENT;i||e.type===c.BINARY_ACK?(e.type=i?c.EVENT:c.ACK,this.reconstructor=new ue(e),e.attachments===0&&super.emitReserved("decoded",e)):super.emitReserved("decoded",e)}else if(gt(t)||t.base64)if(this.reconstructor)e=this.reconstructor.takeBinaryData(t),e&&(this.reconstructor=null,super.emitReserved("decoded",e));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+t)}decodeString(t){let e=0,i={type:Number(t.charAt(0))};if(c[i.type]===void 0)throw new Error("unknown packet type "+i.type);if(i.type===c.BINARY_EVENT||i.type===c.BINARY_ACK){let n=e+1;for(;t.charAt(++e)!=="-"&&e!=t.length;);let o=t.substring(n,e);if(o!=Number(o)||t.charAt(e)!=="-")throw new Error("Illegal attachments");i.attachments=Number(o)}if(t.charAt(e+1)==="/"){let n=e+1;for(;++e&&!(t.charAt(e)===","||e===t.length););i.nsp=t.substring(n,e)}else i.nsp="/";let s=t.charAt(e+1);if(s!==""&&Number(s)==s){let n=e+1;for(;++e;){let o=t.charAt(e);if(o==null||Number(o)!=o){--e;break}if(e===t.length)break}i.id=Number(t.substring(n,e+1))}if(t.charAt(++e)){let n=this.tryParse(t.substr(e));if(r.isPayloadValid(i.type,n))i.data=n;else throw new Error("invalid payload")}return i}tryParse(t){try{return JSON.parse(t,this.reviver)}catch{return!1}}static isPayloadValid(t,e){switch(t){case c.CONNECT:return qt(e);case c.DISCONNECT:return e===void 0;case c.CONNECT_ERROR:return typeof e=="string"||qt(e);case c.EVENT:case c.BINARY_EVENT:return Array.isArray(e)&&(typeof e[0]=="number"||typeof e[0]=="string"&&nr.indexOf(e[0])===-1);case c.ACK:case c.BINARY_ACK:return Array.isArray(e)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}},ue=class{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){let e=sr(this.reconPack,this.buffers);return this.finishedReconstruction(),e}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}};function Pr(r){return typeof r=="string"}var Fr=Number.isInteger||function(r){return typeof r=="number"&&isFinite(r)&&Math.floor(r)===r};function Ir(r){return r===void 0||Fr(r)}function qt(r){return Object.prototype.toString.call(r)==="[object Object]"}function Lr(r,t){switch(r){case c.CONNECT:return t===void 0||qt(t);case c.DISCONNECT:return t===void 0;case c.EVENT:return Array.isArray(t)&&(typeof t[0]=="number"||typeof t[0]=="string"&&nr.indexOf(t[0])===-1);case c.ACK:return Array.isArray(t);case c.CONNECT_ERROR:return typeof t=="string"||qt(t);default:return!1}}function Ur(r){return Pr(r.nsp)&&Ir(r.id)&&Lr(r.type,r.data)}function w(r,t,e){return r.on(t,e),function(){r.off(t,e)}}var Br=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1}),H=class extends u{constructor(t,e,i){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=e,i&&i.auth&&(this.auth=i.auth),this._opts=Object.assign({},i),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;let t=this.io;this.subs=[w(t,"open",this.onopen.bind(this)),w(t,"packet",this.onpacket.bind(this)),w(t,"error",this.onerror.bind(this)),w(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...e){var i,s,n;if(Br.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(e.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(e),this;let o={type:c.EVENT,data:e};if(o.options={},o.options.compress=this.flags.compress!==!1,typeof e[e.length-1]=="function"){let A=this.ids++,U=e.pop();this._registerAckCallback(A,U),o.id=A}let a=(s=(i=this.io.engine)===null||i===void 0?void 0:i.transport)===null||s===void 0?void 0:s.writable,h=this.connected&&!(!((n=this.io.engine)===null||n===void 0)&&n._hasPingExpired());return this.flags.volatile&&!a||(h?(this.notifyOutgoingListeners(o),this.packet(o)):this.sendBuffer.push(o)),this.flags={},this}_registerAckCallback(t,e){var i;let s=(i=this.flags.timeout)!==null&&i!==void 0?i:this._opts.ackTimeout;if(s===void 0){this.acks[t]=e;return}let n=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let a=0;a<this.sendBuffer.length;a++)this.sendBuffer[a].id===t&&this.sendBuffer.splice(a,1);e.call(this,new Error("operation has timed out"))},s),o=(...a)=>{this.io.clearTimeoutFn(n),e.apply(this,a)};o.withError=!0,this.acks[t]=o}emitWithAck(t,...e){return new Promise((i,s)=>{let n=(o,a)=>o?s(o):i(a);n.withError=!0,e.push(n),this.emit(t,...e)})}_addToQueue(t){let e;typeof t[t.length-1]=="function"&&(e=t.pop());let i={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((s,...n)=>(this._queue[0],s!==null?i.tryCount>this._opts.retries&&(this._queue.shift(),e&&e(s)):(this._queue.shift(),e&&e(null,...n)),i.pending=!1,this._drainQueue())),this._queue.push(i),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;let e=this._queue[0];e.pending&&!t||(e.pending=!0,e.tryCount++,this.flags=e.flags,this.emit.apply(this,e.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:c.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,e){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,e),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(t=>{if(!this.sendBuffer.some(i=>String(i.id)===t)){let i=this.acks[t];delete this.acks[t],i.withError&&i.call(this,new Error("socket has been disconnected"))}})}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case c.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case c.EVENT:case c.BINARY_EVENT:this.onevent(t);break;case c.ACK:case c.BINARY_ACK:this.onack(t);break;case c.DISCONNECT:this.ondisconnect();break;case c.CONNECT_ERROR:this.destroy();let i=new Error(t.data.message);i.data=t.data.data,this.emitReserved("connect_error",i);break}}onevent(t){let e=t.data||[];t.id!=null&&e.push(this.ack(t.id)),this.connected?this.emitEvent(e):this.receiveBuffer.push(Object.freeze(e))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){let e=this._anyListeners.slice();for(let i of e)i.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){let e=this,i=!1;return function(...s){i||(i=!0,e.packet({type:c.ACK,id:t,data:s}))}}onack(t){let e=this.acks[t.id];typeof e=="function"&&(delete this.acks[t.id],e.withError&&t.data.unshift(null),e.apply(this,t.data))}onconnect(t,e){this.id=t,this.recovered=e&&this._pid===e,this._pid=e,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:c.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){let e=this._anyListeners;for(let i=0;i<e.length;i++)if(t===e[i])return e.splice(i,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){let e=this._anyOutgoingListeners;for(let i=0;i<e.length;i++)if(t===e[i])return e.splice(i,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){let e=this._anyOutgoingListeners.slice();for(let i of e)i.apply(this,t.data)}}};function Y(r){r=r||{},this.ms=r.min||100,this.max=r.max||1e4,this.factor=r.factor||2,this.jitter=r.jitter>0&&r.jitter<=1?r.jitter:0,this.attempts=0}Y.prototype.duration=function(){var r=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),e=Math.floor(t*this.jitter*r);r=(Math.floor(t*10)&1)==0?r-e:r+e}return Math.min(r,this.max)|0};Y.prototype.reset=function(){this.attempts=0};Y.prototype.setMin=function(r){this.ms=r};Y.prototype.setMax=function(r){this.max=r};Y.prototype.setJitter=function(r){this.jitter=r};var K=class extends u{constructor(t,e){var i;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(e=t,t=void 0),e=e||{},e.path=e.path||"/socket.io",this.opts=e,P(this,e),this.reconnection(e.reconnection!==!1),this.reconnectionAttempts(e.reconnectionAttempts||1/0),this.reconnectionDelay(e.reconnectionDelay||1e3),this.reconnectionDelayMax(e.reconnectionDelayMax||5e3),this.randomizationFactor((i=e.randomizationFactor)!==null&&i!==void 0?i:.5),this.backoff=new Y({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(e.timeout==null?2e4:e.timeout),this._readyState="closed",this.uri=t;let s=e.parser||pe;this.encoder=new s.Encoder,this.decoder=new s.Decoder,this._autoConnect=e.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,t||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var e;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(e=this.backoff)===null||e===void 0||e.setMin(t),this)}randomizationFactor(t){var e;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(e=this.backoff)===null||e===void 0||e.setJitter(t),this)}reconnectionDelayMax(t){var e;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(e=this.backoff)===null||e===void 0||e.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new et(this.uri,this.opts);let e=this.engine,i=this;this._readyState="opening",this.skipReconnect=!1;let s=w(e,"open",function(){i.onopen(),t&&t()}),n=a=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",a),t?t(a):this.maybeReconnectOnOpen()},o=w(e,"error",n);if(this._timeout!==!1){let a=this._timeout,h=this.setTimeoutFn(()=>{s(),n(new Error("timeout")),e.close()},a);this.opts.autoUnref&&h.unref(),this.subs.push(()=>{this.clearTimeoutFn(h)})}return this.subs.push(s),this.subs.push(o),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");let t=this.engine;this.subs.push(w(t,"ping",this.onping.bind(this)),w(t,"data",this.ondata.bind(this)),w(t,"error",this.onerror.bind(this)),w(t,"close",this.onclose.bind(this)),w(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(e){this.onclose("parse error",e)}}ondecoded(t){N(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,e){let i=this.nsps[t];return i?this._autoConnect&&!i.active&&i.connect():(i=new H(this,t,e),this.nsps[t]=i),i}_destroy(t){let e=Object.keys(this.nsps);for(let i of e)if(this.nsps[i].active)return;this._close()}_packet(t){let e=this.encoder.encode(t);for(let i=0;i<e.length;i++)this.engine.write(e[i],t.options)}cleanup(){this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(t,e){var i;this.cleanup(),(i=this.engine)===null||i===void 0||i.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,e),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;let t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{let e=this.backoff.duration();this._reconnecting=!0;let i=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(s=>{s?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",s)):t.onreconnect()}))},e);this.opts.autoUnref&&i.unref(),this.subs.push(()=>{this.clearTimeoutFn(i)})}}onreconnect(){let t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}};var yt={};function Q(r,t){typeof r=="object"&&(t=r,r=void 0),t=t||{};let e=er(r,t.path||"/socket.io"),i=e.source,s=e.id,n=e.path,o=yt[s]&&n in yt[s].nsps,a=t.forceNew||t["force new connection"]||t.multiplex===!1||o,h;return a?h=new K(i,t):(yt[s]||(yt[s]=new K(i,t)),h=yt[s]),e.query&&!t.query&&(t.query=e.queryKey),h.socket(e.path,t)}Object.assign(Q,{Manager:K,Socket:H,io:Q,connect:Q});var it=class r{config;appRef;subscribersCounter={};eventObservables$={};namespaces={};ioSocket;emptyConfig={url:"",options:{}};constructor(t,e){this.config=t,this.appRef=e,t===void 0&&(t=this.emptyConfig);let i=t.url,s=t.options,n=Q?Q:fe;this.ioSocket=n(i,s)}get auth(){return this.ioSocket.auth}set auth(t){this.ioSocket.auth=t}get io(){return this.ioSocket.io}get open(){return this.connect}get close(){return this.disconnect}of(t){if(!t||t==="/")return this;let e=this.namespaces[t];if(e)return e;let a=this.config,{url:i}=a,s=ye(a,["url"]),n=O({url:!i.endsWith("/")&&!t.startsWith("/")?`${i}/${t}`:`${i}${t}`},s),o=new r(n,this.appRef);return this.namespaces[t]=o,o}on(t,e){return this.ioSocket.on(t,e),this}once(t,e){return this.ioSocket.once(t,e),this}connect(){return this.ioSocket.connect(),this}disconnect(){return this.ioSocket.disconnect(),this}emit(t,...e){return this.ioSocket.emit(t,...e),this}send(...t){return this.ioSocket.send.apply(this.ioSocket,arguments),this}emitWithAck(t,...e){return this.ioSocket.emitWithAck(t,...e)}removeListener(t,e){return this.ioSocket.removeListener(t,e),this}removeAllListeners(t){return this.ioSocket.removeAllListeners(t),this}fromEvent(t){return this.subscribersCounter[t]||(this.subscribersCounter[t]=0),this.subscribersCounter[t]++,this.eventObservables$[t]||(this.eventObservables$[t]=new we(e=>{let i=s=>{e.next(s),this.appRef.tick()};return this.ioSocket.on(t,i),()=>{this.subscribersCounter[t]--,this.subscribersCounter[t]===0&&(this.ioSocket.removeListener(t,i),delete this.eventObservables$[t])}}).pipe(Te())),this.eventObservables$[t]}fromOneTimeEvent(t){return new Promise(e=>this.once(t,e))}listeners(t){return this.ioSocket.listeners(t)}hasListeners(t){return this.ioSocket.hasListeners(t)}listenersAny(){return this.ioSocket.listenersAny()}listenersAnyOutgoing(){return this.ioSocket.listenersAnyOutgoing()}off(t,e){return this.ioSocket.off(t,e),this}offAny(t){return this.ioSocket.offAny(t),this}offAnyOutgoing(t){return this.ioSocket.offAnyOutgoing(t),this}onAny(t){return this.ioSocket.onAny(t),this}onAnyOutgoing(t){return this.ioSocket.onAnyOutgoing(t),this}prependAny(t){return this.ioSocket.prependAny(t),this}prependAnyOutgoing(t){return this.ioSocket.prependAnyOutgoing(t),this}timeout(t){return this.ioSocket.timeout(t),this}get volatile(){let t=this.ioSocket.volatile;return this}get active(){return this.ioSocket.active}get connected(){return this.ioSocket.connected}get disconnected(){return this.ioSocket.disconnected}get recovered(){return this.ioSocket.recovered}get id(){return this.ioSocket.id}compress(t){return this.ioSocket.compress(t),this}};function Dr(r,t){return new it(r,t)}var or=new Ce("__SOCKET_IO_CONFIG__"),_o=(()=>{class r{static forRoot(e){return{ngModule:r,providers:[{provide:or,useValue:e},{provide:it,useFactory:Dr,deps:[or,Ne]}]}}static \u0275fac=function(i){return new(i||r)};static \u0275mod=ke({type:r});static \u0275inj=ve({})}return r})();var de={BASE:`${ci}/notifications`,UNREAD:"unread"},Gt=de.BASE;var d=(function(r){return r.ADD="add",r.UPDATE="update",r.DELETE="delete",r.DELETE_PERMANENTLY="deletePermanently",r})(d||{});var y=(function(r){return r.COMMENTS="comments",r.SPACES="spaces",r.SPACE_ROOTS="spaces_roots",r.SHARES="shares",r.LINKS="links",r.SYNC="sync",r.AUTH_LOCKED="auth_locked",r.AUTH_2FA="auth_2fa",r.UNLOCK_REQUEST="unlock_request",r.UPDATE_AVAILABLE="server_update_available",r})(y||{}),bo={COMMENTS:"commented",SPACES:{[d.ADD]:"You now have access to the space",[d.DELETE]:"You no longer have access to the space",[d.DELETE_PERMANENTLY]:"This space has been permanently deleted"},SPACE_ROOTS:{[d.ADD]:"anchored",[d.DELETE]:"unanchored"},SHARES:{[d.ADD]:"shared with you",[d.DELETE]:"no longer share with you"},SHARES_WITHOUT_OWNER:{[d.ADD]:"You now have access to the share",[d.DELETE]:"You no longer have access to the share",[d.DELETE_PERMANENTLY]:"You are no longer a member of the parent share, your child share has been deleted"},LINKS:{[d.ADD]:"shared with you",[d.UPDATE]:"You now have access to the space"},SYNC:{[d.DELETE]:"You are no longer synchronizing"},AUTH_2FA:{[d.ADD]:"Two-factor authentication (2FA) on your account has been enabled",[d.DELETE]:"Two-factor authentication (2FA) on your account has been disabled"},AUTH_LOCKED:{[d.DELETE]:"Your account has been locked after several unsuccessful authentication attempts"},UNLOCK_REQUEST:"sends you a request to unlock the file",UPDATE_AVAILABLE:"A new update is available"};var ar=ii;var cr={[y.COMMENTS]:ar,[y.SPACES]:ct.SPACES,[y.SPACE_ROOTS]:ct.SPACES,[y.SHARES]:ct.SHARES,[y.LINKS]:ct.LINKS,[y.SYNC]:Si.SYNC,[y.UNLOCK_REQUEST]:ei};var Ht=class{constructor(t){this.soonRead=!1,Object.assign(this,t),this.fromUser?this.fromUser.avatarUrl=M(this.fromUser.login):this.fromUser={id:-1,login:null,email:null,fullName:"Info",avatarUrl:null},this.appIcon=cr[this.content.app],this.setMainElement()}setMainElement(){if(!(this.content.app===y.COMMENTS||this.content.app===y.SHARES||this.content.app===y.UPDATE_AVAILABLE||this.content.app===y.SYNC)&&this.content?.url){let t=this.content.url.split("/");t.length>1&&(this.mainElement=t[t.length-1])}}};var hr=(()=>{let t=class t{constructor(){this.http=p(Tt),this.store=p(Pt),this.layout=p(z)}getNotifications(i=!1){return this.http.get(`${Gt}${i?`/${de.UNREAD}`:""}`).pipe(S(s=>s.map(n=>new Ht(n))))}wasReadNotification(i){return this.http.patch(`${Gt}/${i}`,null)}deleteNotification(i){return this.http.delete(`${Gt}${i?`/${i}`:""}`)}checkUnreadNotifications(i=!1){this.getNotifications().subscribe(s=>{let n;if(i&&s.length){let o=s[0];n=this.layout.sendNotification("info",o.fromUser.fullName,this.layout.translateString(`${this.layout.translateString(o.content.event)}: <b>${o.content.element}</b>`),null,{enableHtml:!0})}else{let o=s.filter(a=>!a.wasRead).length;o&&(n=this.layout.sendNotification("info","Notifications",this.layout.translateString(o===1?"one_notification":"nb_notifications",{nb:o})))}n&&n.onTap.pipe(be(1)).subscribe(()=>this.layout.showRSideBarTab(yi.NOTIFICATIONS,!0)),this.store.notifications.set(s)})}};t.\u0275fac=function(s){return new(s||t)},t.\u0275prov=wt({token:t,factory:t.\u0275fac,providedIn:"root"});let r=t;return r})();var E=(function(r){return r.ACCESS="access",r.ACCESS_2FA="access_2fa",r.REFRESH="refresh",r.WS="ws",r.CSRF="csrf",r.CSRF_2FA="csrf_2fa",r})(E||{});var Xo="sync-in-csrf";var me=6;var ur="sync-in-two-fa-code",lr="sync-in-two-fa-password",zo={[E.ACCESS]:"/",[E.REFRESH]:Ri,[E.WS]:Oi,[E.CSRF]:"/",[E.ACCESS_2FA]:xi,[E.CSRF_2FA]:"/"},Zo=[E.REFRESH,E.ACCESS,E.WS,E.CSRF],ta=[E.ACCESS_2FA,E.CSRF_2FA];var Vr=["Password"];function Wr(r,t){r&1&&(f(0,"label",1),b(1,"Password"),_())}function $r(r,t){if(r&1){let e=st();f(0,"div",5),B("click",function(){W(e);let s=D();return $(s.randomPassword())}),f(1,"span"),J(2,"fa-icon",6),_()()}if(r&2){let e=D();m(2),C("icon",e.icons.faDice)}}var pr=(()=>{let t=class t{constructor(){this.passwordChange=new Oe,this.passwordMinLength=8,this.showGenerator=!1,this.showLabel=!1,this.disabled=!1,this.isRequired=!1,this.focus=!1,this.centered=!1,this.locale=p(Ot),this.toggleVisiblePassword=Ei,this.icons={faEye:ti,faEyeSlash:si,faDice:ni}}ngOnInit(){this.focus&&setTimeout(()=>{this.passwordElement.nativeElement.focus(),this.passwordElement.nativeElement.select()},0)}randomPassword(){this.disabled||this.passwordChange.emit(_i(this.passwordMinLength+2))}};t.\u0275fac=function(s){return new(s||t)},t.\u0275cmp=At({type:t,selectors:[["app-input-password"]],viewQuery:function(s,n){if(s&1&&Pe(Vr,7),s&2){let o;Fe(o=Ie())&&(n.passwordElement=o.first)}},inputs:{password:"password",passwordMinLength:"passwordMinLength",placeholder:"placeholder",showGenerator:"showGenerator",showLabel:"showLabel",disabled:"disabled",isRequired:"isRequired",focus:"focus",centered:"centered"},outputs:{passwordChange:"passwordChange"},decls:9,vars:16,consts:[["Password",""],["for","password","l10nTranslate",""],["id","password",1,"input-group","input-group-sm",2,"min-width","150px"],["autocomplete","off","type","password",1,"form-control","form-control-sm","pe-0",3,"ngModelChange","keyup","ngModel","disabled","placeholder","required"],[1,"input-group-text","cursor-pointer"],[1,"input-group-text","cursor-pointer",3,"click"],[3,"icon"]],template:function(s,n){if(s&1){let o=st();k(0,Wr,2,0,"label",1),f(1,"div",2)(2,"input",3,0),Ve(4,"translate"),Me("ngModelChange",function(h){return W(o),De(n.password,h)||(n.password=h),$(h)}),B("keyup",function(){return W(o),$(n.passwordChange.emit(n.password))}),_(),k(5,$r,3,1,"div",4),f(6,"div",5),B("click",function(){W(o);let h=Kt(3);return $(n.toggleVisiblePassword(h))}),f(7,"span"),J(8,"fa-icon",6),_()()()}if(s&2){let o=Kt(3);x(n.showLabel?0:-1),m(2),Le("padding-left",n.centered?"2rem":""),bt("is-invalid",n.isRequired&&(n.password==null?null:n.password.length)<n.passwordMinLength)("text-center",n.centered),Be("ngModel",n.password),C("disabled",n.disabled)("placeholder",We(4,13,n.placeholder,n.locale.language))("required",n.isRequired),m(3),x(n.showGenerator?5:-1),m(3),C("icon",o.type==="text"?n.icons.faEye:n.icons.faEyeSlash)}},dependencies:[Xe,vt,Ct,Qe,Ge,Rt,Nt,kt,ze],encapsulation:2});let r=t;return r})();var fr=(()=>{let t=class t{constructor(){this.autoFocus=!0,this.autoSelect=!0,this.elementRef=p(Re)}ngOnInit(){setTimeout(()=>{this.autoFocus&&this.elementRef.nativeElement.focus(),this.autoSelect&&this.elementRef.nativeElement.select()},0)}};t.\u0275fac=function(s){return new(s||t)},t.\u0275dir=xe({type:t,selectors:[["","appAutofocus",""]],inputs:{autoFocus:"autoFocus",autoSelect:"autoSelect"}});let r=t;return r})();function qr(r,t){r&1&&(f(0,"span",3),b(1,"Two-Factor Authentication"),_())}function Gr(r,t){r&1&&(f(0,"span",3),b(1,"Password Authentication"),_())}function Hr(r,t){if(r&1&&b(0),r&2){let e=D();Ue(" ",e.hasError," ")}}function Yr(r,t){r&1&&b(0," Enter your password ")}function Kr(r,t){r&1&&b(0," Valid with your TOTP code ")}function Qr(r,t){if(r&1){let e=st();f(0,"div",9)(1,"app-input-password",13),B("passwordChange",function(s){W(e);let n=D();return $(n.updatePassword(s))}),_()()}if(r&2){let e=D();m(),C("password",e.twoFaForm.value.password)("focus",!0)("centered",!0)}}function jr(r,t){r&1&&(f(0,"div",14),b(1,"Valid with your TOTP code"),_())}function Jr(r,t){if(r&1&&(k(0,jr,2,0,"div",14),f(1,"div",15),J(2,"input",16),_()),r&2){let e=D();x(e.withPassword?0:-1),m(2),C("autoFocus",!e.withPassword)("autoSelect",!e.withPassword)("maxlength",e.twoFaCodelength)}}var dr=(()=>{let t=class t{constructor(){this.withPassword=!1,this.withTwoFaEnabled=!0,this.submitted=!1,this.hasError=null,this.icons={faKey:Ze,faLock:ri},this.twoFaCodelength=me,this.locale=p(Ot),this.fb=p(Je),this.layout=p(z)}ngOnInit(){this.twoFaForm=this.fb.group({totpCode:this.fb.control("",this.withTwoFaEnabled?[nt.required,nt.pattern(new RegExp(`^\\d{${me}}$`))]:null),password:this.fb.control("",this.withPassword?[nt.required,nt.minLength(8)]:null)})}onClose(i=!1){this.isValid(i),this.layout.closeDialog()}onSubmit(){this.submitted=!0;let i=new $e(O(O({},this.withTwoFaEnabled?{[ur]:this.twoFaForm.value.totpCode}:{}),this.withPassword?{[lr]:this.twoFaForm.value.password}:{}));this.onClose(i)}updatePassword(i){this.twoFaForm.patchValue({password:i})}};t.\u0275fac=function(s){return new(s||t)},t.\u0275cmp=At({type:t,selectors:[["app-user-auth-2fa-verify-dialog"]],inputs:{withPassword:"withPassword",withTwoFaEnabled:"withTwoFaEnabled"},decls:20,vars:9,consts:[[1,"modal-header","align-items-center","justify-content-center"],[1,"modal-title"],[1,"me-2",3,"icon"],["l10nTranslate",""],[1,"modal-body","modal-auth-verify-2fa"],[1,"card","shadow-sm"],[1,"card-body"],["l10nTranslate","",1,"d-flex","justify-content-center","align-items-center","mb-3"],[3,"ngSubmit","formGroup"],[1,"mb-4"],[1,"d-grid","gap-2"],["type","submit","l10nTranslate","",1,"btn","btn-primary",3,"disabled"],["type","button","l10nTranslate","",1,"btn","btn-secondary",3,"click"],["id","password","placeholder","\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022",3,"passwordChange","password","focus","centered"],["l10nTranslate","",1,"text-align-center","mb-3"],[1,"mb-3"],["appAutofocus","","type","text","formControlName","totpCode","placeholder","\u2022\u2022\u2022\u2022\u2022\u2022","inputmode","numeric","autocomplete","one-time-code","name","totp",1,"form-control","text-center","fs-4",3,"autoFocus","autoSelect","maxlength"]],template:function(s,n){s&1&&(f(0,"div",0)(1,"h4",1),J(2,"fa-icon",2),k(3,qr,2,0,"span",3)(4,Gr,2,0,"span",3),_()(),f(5,"div",4)(6,"div",5)(7,"div",6)(8,"p",7),k(9,Hr,1,1)(10,Yr,1,0)(11,Kr,1,0),_(),f(12,"form",8),B("ngSubmit",function(){return n.onSubmit()}),k(13,Qr,2,3,"div",9),k(14,Jr,3,4),f(15,"div",10)(16,"button",11),b(17,"Confirm"),_(),f(18,"button",12),B("click",function(){return n.onClose()}),b(19,"Cancel"),_()()()()()()),s&2&&(m(2),C("icon",n.icons.faLock),m(),x(n.withTwoFaEnabled?3:4),m(5),bt("text-danger",n.hasError),m(),x(n.hasError?9:n.withPassword?10:11),m(3),C("formGroup",n.twoFaForm),m(),x(n.withPassword?13:-1),m(),x(n.withTwoFaEnabled?14:-1),m(2),C("disabled",n.twoFaForm.invalid||n.submitted))},dependencies:[Nt,kt,fr,Rt,He,vt,Ct,qe,je,Ye,Ke,pr],encapsulation:2});let r=t;return r})();var Yt=class{constructor(t){this.parentGroup=t.parentGroup,this.members=t.members.map(e=>new T(e))}};var j=class{constructor(t){this.newly=0,this.currentAccessHover=!1,this.setManagers(t),Object.assign(this,t),this.avatarUrl=M(t.login),this.userIsActiveText=this.isActive?"active":"suspended",this.hTimeAgo=ai(this.currentAccess).fromNow(!0),this.newly=at(this.currentAccess)}setManagers(t){t?.managers&&(t.managers=t.managers.map(e=>new T(e)))}};var St=class{constructor(t){this.setOnlineStatus(gi("status",t)),this.avatarUrl=M(t.login),Object.assign(this,t)}setOnlineStatus(t){this.onlineStatus=t,this.onlineTextStatus=oi[t]}};var lc=(()=>{let t=class t{constructor(){this.http=p(Tt),this.layout=p(z),this.store=p(Pt),this.webSocket=p(it),this.notifications=p(hr),this.webSocket.fromEvent("connect").subscribe(()=>this.notifications.checkUnreadNotifications()),this.webSocket.fromEvent("disconnect").subscribe(()=>this.store.onlineUsers.set([])),this.webSocket.fromEvent(Ci.EVENTS.NOTIFICATION).subscribe(()=>this.notifications.checkUnreadNotifications(!0)),this.webSocket.fromEvent(ht.EVENTS.ONLINE_USER).pipe(S(i=>new St(i))).subscribe(i=>this.newOnlineUser(i)),this.webSocket.fromEvent(ht.EVENTS.ONLINE_USERS).pipe(S(i=>i.map(s=>new St(s)))).subscribe(i=>this.setOnlineUsers(i)),this.webSocket.fromEvent(ht.EVENTS.ONLINE_STATUS).subscribe(i=>this.receiveOnlineStatus(i))}get user(){return this.store.user.getValue()}initUser(i,s=!1){this.refreshAvatar(),this.layout.setLanguage(i.language).catch(console.error),this.store.userImpersonate.set(s||i.impersonated),this.store.user.next(i),this.checkQuota(this.store.user.getValue()),s&&this.disconnectWebSocket(),this.connectWebSocket()}connectWebSocket(){this.webSocket.ioSocket.io.opts.query={onlineStatus:this.user.onlineStatus},this.webSocket.connect()}disconnectWebSocket(){this.webSocket.disconnect()}setOnlineUsers(i){this.store.onlineUsers.set(i)}newOnlineUser(i){this.store.onlineUsers().find(s=>s.id===i.id)?this.receiveOnlineStatus({userId:i.id,status:i.onlineStatus}):this.store.onlineUsers.update(s=>[i,...s])}userHavePermission(i){return this.user.isAdmin?!0:this.user?this.user.applications.indexOf(i)!==-1:!1}browseGroup(i){return this.http.get(`${fi}${i?`/${i}`:""}`).pipe(S(s=>new Yt(s)))}createPersonalGroup(i){return this.http.post(q,i).pipe(S(s=>new T(s)))}updatePersonalGroup(i,s){return this.http.put(`${q}/${i}`,s).pipe(S(n=>new T(n)))}leavePersonalGroup(i){return this.http.delete(`${di}/${i}`)}addUsersToGroup(i,s){return this.http.patch(`${q}/${i}/${ot.USERS}`,s)}deletePersonalGroup(i){return this.http.delete(`${q}/${i}`)}updateUserFromPersonalGroup(i,s,n){return this.http.patch(`${q}/${i}/${ot.USERS}/${s}`,n)}removeUserFromGroup(i,s){return this.http.delete(`${q}/${i}/${ot.USERS}/${s}`)}listGuests(){return this.http.get(X).pipe(S(i=>i.map(s=>new j(s))))}getGuest(i){return this.http.get(`${X}/${i}`).pipe(S(s=>new j(s)))}createGuest(i){return this.http.post(X,i).pipe(S(s=>new j(s)))}updateGuest(i,s){return this.http.put(`${X}/${i}`,s).pipe(S(n=>n?new j(n):null))}deleteGuest(i){return this.http.delete(`${X}/${i}`)}genAvatar(){this.http.patch(Jt,null).subscribe({next:()=>this.refreshAvatar(),error:i=>this.layout.sendNotification("error","Configuration","Avatar",i)})}uploadAvatar(i){let s=new FormData;s.append("file",i),this.http.put(Jt,s).subscribe({next:()=>this.refreshAvatar(),error:n=>this.layout.sendNotification("error","Configuration","Avatar",n)})}changePassword(i,s){return this.http.put(ui,i,{headers:s})}changeLanguage(i){return this.http.put(hi,i)}changeNotification(i){return this.http.put(li,i)}changeStorageIndexing(i){return this.http.put(pi,i)}changeOnlineStatus(i,s=!0){this.webSocket.emit(ht.EVENTS.ONLINE_STATUS,{status:i,store:s})}receiveOnlineStatus(i){this.user.id===i.userId?this.user.onlineStatus=i.status:this.store.onlineUsers().length&&this.store.onlineUsers.update(s=>s.map(n=>n.id===i.userId?ge(O({},n),{onlineStatus:i.status}):n))}searchMembers(i,s=[]){return this.http.request("search",ot.BASE,{body:i}).pipe(S(n=>n.map(o=>new T(o,s))),Ae(()=>[]))}setMenusVisibility(i){for(let s of i)if(!(s.id&&(s.hide=!this.userHavePermission(s.id),s.hide))&&(s.checks?.length&&(s.hide=!s.checks.map(n=>n.negate?!this[n.prop][n.value]:this[n.prop][n.value]).every(n=>!!n)),s.submenus?.length&&this.setMenusVisibility(s.submenus),s.title===Ai.FILES)){for(let n of s.submenus)if(!n.hide){s.link=n.link;break}}}refreshAvatar(){this.store.userAvatarUrl.next(wi())}checkAppStoreAvailability(){this.http.get(`${jt.BASE}/${jt.APP_STORE}`).subscribe({next:i=>this.store.appStoreManifest.set(i),error:i=>console.error(i)})}getEditorProviderPreference(){return localStorage.getItem("editorPreference")}setEditorProviderPreference(i){i===null?localStorage.removeItem("editorPreference"):localStorage.setItem("editorPreference",i)}listAppPasswords(i){return this.http.get(xt,{headers:i})}generateAppPassword(i,s){return this.http.post(xt,i,{headers:s})}deleteAppPassword(i){return this.http.delete(`${xt}/${i}`)}init2Fa(){return this.http.get(Xt)}enable2Fa(i){return this.http.post(Xt,i)}disable2Fa(i){return this.http.post(ki,i)}adminResetUser2Fa(i,s){return this.http.post(`${Ni}/${i}`,null,{headers:s})}auth2FaVerifyDialog(i=!1){return Se(this,null,function*(){let s=this.store.server().twoFaEnabled&&this.user.twoFaEnabled;if(i||s)return new Promise(n=>{let o=this.layout.openDialog(dr,"xs",{initialState:{withPassword:i,withTwoFaEnabled:s}},{keyboard:!1});o.content.isValid=a=>{n(a)}})})}checkQuota(i){if(!(i.isGuest||i.isLink)&&i.storageQuota){let s=Math.round(100/i.storageQuota*(i.storageQuota-i.storageUsage));s<=1?this.layout.sendNotification("error","Storage Quota","No more space available",null,{disableTimeOut:!0,closeButton:!0}):s<=5?this.layout.sendNotification("warning","Storage Quota",this.layout.translateString("available_space_is_low",{nb:s}),null,{disableTimeOut:!0,closeButton:!0}):s<=10&&this.layout.sendNotification("info","Storage Quota",this.layout.translateString("available_space_is_low",{nb:s}),null,{disableTimeOut:!0,closeButton:!0})}}};t.\u0275fac=function(s){return new(s||t)},t.\u0275prov=wt({token:t,factory:t.\u0275fac,providedIn:"root"});let r=t;return r})();export{ms as a,_s as b,Ri as c,xi as d,Xo as e,me as f,ur as g,lr as h,_o as i,y as j,hr as k,pr as l,fr as m,V as n,vi as o,ts as p,es as q,is as r,T as s,ls as t,Yt as u,j as v,lc as w};
@@ -1,4 +1,4 @@
1
- import{b as ye}from"./chunk-2U5VKTML.js";import{m as ve,n as xe,s as N,w as Oe}from"./chunk-4ZKAVMB4.js";import{Cb as Ce,J as _e}from"./chunk-FCR5AEHR.js";import{Aa as q,Ab as D,Bb as y,Cd as ce,Dd as le,Eb as h,Gb as p,Gd as pe,Ha as T,J as I,Kd as de,Mc as ie,N as W,Oa as s,Od as ue,Pb as F,Qa as O,Rb as b,Sb as Z,Tb as m,Ub as k,Xb as V,Yb as G,Zb as A,ab as M,af as he,cb as B,cc as J,cd as ne,da as U,db as Q,dd as oe,ec as Y,fb as w,fd as re,gc as ee,hc as te,ja as C,jd as se,kc as H,lb as f,mb as g,mc as j,mf as fe,nb as $,oa as v,oc as z,od as ae,og as P,pa as x,pb as K,qb as X,rb as u,sb as c,tb as a,ub as _,ze as me,zf as ge}from"./chunk-BJARRIS6.js";var ke=(function(i){return i[i.USER=0]="USER",i[i.PERSONAL=1]="PERSONAL",i})(ke||{}),Se=(function(i){return i[i.VISIBLE=0]="VISIBLE",i[i.PRIVATE=1]="PRIVATE",i[i.ISOLATED=2]="ISOLATED",i})(Se||{});var Xe=(()=>{let n=class n{constructor(){this.translate=C(pe)}transform(e,t=[]){let o="";if(!e)return o;for(let[l,d]of Object.entries(e).filter(([E,qe])=>t.indexOf(E)===-1))d&&(o+=`${d} ${this.translate.translate(d===1?l.slice(0,-1):l)}, `);return o.slice(0,-2)}};n.\u0275fac=function(t){return new(t||n)},n.\u0275pipe=Q({name:"joinCounts",type:n,pure:!0});let i=n;return i})();function Me(i,n){if(i&1&&(c(0,"span"),m(1),a()),i&2){let r=p();s(),k(r.group.name)}}function we(i,n){i&1&&(c(0,"span",3),m(1,"New personal group"),a())}function Pe(i,n){if(i&1&&_(0,"fa-icon",4),i&2){let r=p();u("icon",r.icons.faSpinner)}}function Ee(i,n){i&1&&(c(0,"span",3),m(1,"Edit personal group"),a())}function Te(i,n){i&1&&(c(0,"span",3),m(1,"Edit group"),a())}function De(i,n){if(i&1&&(c(0,"h4",5),f(1,Ee,2,0,"span",3)(2,Te,2,0,"span",3),a()),i&2){let r=p();s(),g(r.isPersonalGroup?1:2)}}var mt=(()=>{let n=class n{constructor(){this.groupChange=new O,this.layout=C(Ce),this.icons={GROUPS:_e.GROUPS,faSpinner:fe,faCog:he,faUsers:me,faPen:ge},this.isPersonalGroup=!0,this.submitted=!1,this.loading=!1,this.userService=C(Oe),this.user=this.userService.user}ngOnInit(){this.originalGroup?.id?(this.isPersonalGroup=this.originalGroup.isPersonalGroup,this.group=new N({id:this.originalGroup.id,name:this.originalGroup.name,description:this.originalGroup.description,createdAt:this.originalGroup.createdAt,modifiedAt:this.originalGroup.modifiedAt,type:this.originalGroup.type})):this.group=new N({id:0,name:"",description:"",createdAt:null,modifiedAt:null,type:xe.PGROUP})}onCancel(){this.layout.closeDialog()}onSubmit(){if(this.loading=!0,this.submitted=!0,this.group.id===0)this.userService.createPersonalGroup(this.makeDto(!0)).subscribe({next:e=>{this.loading=!1,this.groupChange.emit(["add",e]),this.layout.sendNotification("success","Group created",e.name),this.layout.closeDialog()},error:e=>this.onError(e)});else{let e=this.makeDto();if(!Object.keys(e).length){this.loading=!1,this.submitted=!1;return}this.userService.updatePersonalGroup(this.originalGroup.id,this.makeDto()).subscribe({next:t=>{this.loading=!1,this.groupChange.emit(["update",t]),this.layout.sendNotification("success","Group updated",t.name),this.layout.closeDialog()},error:t=>this.onError(t)})}}makeDto(e=!1){return{name:e?this.group.name:this.group.name!==this.originalGroup.name?this.group.name:void 0,description:e?this.group.description:this.group.description!==this.originalGroup.description?this.group.description:void 0}}onError(e){this.layout.sendNotification("error","Group error",this.group.name,e),this.submitted=!1,this.loading=!1}};n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=M({type:n,selectors:[["app-user-group-dialog"]],inputs:{originalGroup:"originalGroup"},outputs:{groupChange:"groupChange"},decls:23,vars:15,consts:[[1,"modal-header","align-items-center"],[1,"modal-title"],[1,"me-2",3,"icon"],["l10nTranslate",""],["animation","spin","size","sm",1,"ms-2",3,"icon"],[1,"modal-title","ms-auto"],["aria-label","Close","type","button",3,"click"],[1,"modal-body"],[1,"d-flex","col-12","pb-3"],[1,"flex-fill","col-6","pe-4"],["for","name","l10nTranslate",""],["id","name","appAutofocus","","autocomplete","off","type","text",1,"form-control","form-control-sm",3,"ngModelChange","disabled","autoSelect","ngModel"],[1,"flex-fill","col-6","ps-4"],["for","description","l10nTranslate",""],["id","description","autocomplete","off","type","text",1,"form-control","form-control-sm",3,"ngModelChange","ngModel","disabled"],[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(t,o){t&1&&(c(0,"div",0)(1,"h4",1),_(2,"fa-icon",2),f(3,Me,2,1,"span")(4,we,2,0,"span",3),f(5,Pe,1,1,"fa-icon",4),a(),f(6,De,3,1,"h4",5),c(7,"button",6),h("click",function(){return o.layout.closeDialog()}),a()(),c(8,"div",7)(9,"div",8)(10,"div",9)(11,"label",10),m(12,"Name"),a(),c(13,"input",11),A("ngModelChange",function(d){return G(o.group.name,d)||(o.group.name=d),d}),a()(),c(14,"div",12)(15,"label",13),m(16,"Description"),a(),c(17,"input",14),A("ngModelChange",function(d){return G(o.group.description,d)||(o.group.description=d),d}),a()()()(),c(18,"div",15)(19,"button",16),h("click",function(){return o.onCancel()}),m(20,"Cancel"),a(),c(21,"button",17),h("click",function(){return o.onSubmit()}),m(22," Confirm "),a()()),t&2&&(s(2),u("icon",o.icons.GROUPS),s(),g(o.group.id?3:4),s(2),g(o.loading?5:-1),s(),g(o.group.id?6:-1),s(),Z(J("btn-close btn-close-white ",o.group.id?"ms-2":"ms-auto"," ms-2")),s(6),b("is-invalid",!o.group.name),u("disabled",!o.isPersonalGroup)("autoSelect",!1),V("ngModel",o.group.name),s(4),V("ngModel",o.group.description),u("disabled",!o.isPersonalGroup),s(4),u("disabled",!o.group.name||o.submitted))},dependencies:[le,re,se,ce,ae,P,de,ve],encapsulation:2});let i=n;return i})();var be=(()=>{let n=class n{onClick(e){e.stopPropagation()}ngOnInit(){setTimeout(()=>{typeof document<"u"&&document.addEventListener("click",this.offClickHandler)},0)}ngOnDestroy(){typeof document<"u"&&document.removeEventListener("click",this.offClickHandler)}};n.\u0275fac=function(t){return new(t||n)},n.\u0275dir=B({type:n,selectors:[["","offClick",""]],hostBindings:function(t,o){t&1&&h("click",function(d){return o.onClick(d)})},inputs:{offClickHandler:[0,"offClick","offClickHandler"]}});let i=n;return i})();var S=class{constructor(n){typeof n=="string"&&(this.id=this.name=n,this.description=""),typeof n=="object"&&(this.id=n.id||n.name,this.name=n.name,this.description=n.description||"")}};var Fe=i=>({active:i}),Ve=(i,n)=>({o:i,i:n});function Ge(i,n){if(i&1){let r=y();c(0,"input",6),h("keydown",function(t){v(r);let o=p();return x(o.inputEvent(t))})("keyup",function(t){v(r);let o=p();return x(o.inputEvent(t,!0))}),a()}if(i&2){let r=p();u("disabled",r.disabled)}}function Ae(i,n){i&1&&D(0)}function He(i,n){if(i&1&&(c(0,"span",12),w(1,Ae,1,0,"ng-container",13),a()),i&2){let r=p(2),e=F(6);b("ui-select-allow-clear",r.allowClear&&r.active),s(),u("ngTemplateOutlet",r.customTemplateSelect||e)("ngTemplateOutletContext",ee(4,Fe,r.active))}}function je(i,n){if(i&1&&(c(0,"span",9),m(1),a()),i&2){let r=p(2);s(),k(r.placeholder)}}function ze(i,n){if(i&1){let r=y();c(0,"button",14),h("click",function(t){v(r);let o=p(2);return x(o.removeClick(o.active,t))}),a()}}function Ne(i,n){if(i&1){let r=y();c(0,"div",4)(1,"span",7),h("click",function(t){v(r);let o=p();return x(o.matchClick(t))}),f(2,He,2,6,"span",8)(3,je,2,1,"span",9),f(4,ze,1,0,"button",10),_(5,"i",11),a()()}if(i&2){let r=p();s(2),g(r.active?2:3),s(2),g(r.allowClear&&r.active?4:-1)}}function Le(i,n){i&1&&D(0)}function Re(i,n){if(i&1){let r=y();c(0,"li",15)(1,"div",16),h("click",function(t){let o=v(r).$implicit,l=p(2);return x(l.selectMatch(o,t))})("mouseenter",function(){let t=v(r).$implicit,o=p(2);return x(o.selectActive(t))}),w(2,Le,1,0,"ng-container",13),a()()}if(i&2){let r=n.$implicit,e=p(2),t=F(8);s(),b("active",e.isActive(r)),s(),u("ngTemplateOutlet",e.customTemplateOptions||t)("ngTemplateOutletContext",te(4,Ve,r,e.inputValue))}}function Ie(i,n){if(i&1&&(c(0,"ul",5),K(1,Re,3,7,"li",15,$),a()),i&2){let r=p();s(),X(r.options)}}function We(i,n){if(i&1&&(c(0,"div",17)(1,"span",18),_(2,"fa-icon",19),a(),c(3,"span"),m(4),a(),c(5,"div",20),m(6),a()()),i&2){let r=n.active,e=p();s(2),u("icon",e.itemIcon)("fixedWidth",!1),s(2),k(r.name),s(2),k(r.description)}}function Ue(i,n){if(i&1&&(c(0,"a",21)(1,"div",17)(2,"span",18),_(3,"fa-icon",19),a(),_(4,"span",22),H(5,"highlight"),_(6,"span",23),H(7,"highlight"),a()()),i&2){let r=n.i,e=n.o,t=p();s(3),u("icon",t.itemIcon)("fixedWidth",!1),s(),u("innerHtml",t.sanitize(j(5,4,e.name,r)),T),s(2),u("innerHtml",t.sanitize(j(7,7,e.description,r)),T)}}var Tt=(()=>{let n=class n{constructor(){this.element=C(q),this.itemIcon=ue,this.allowClear=!0,this.placeholder="",this.idField="id",this.nameField="name",this.descriptionField="description",this.data=new O,this.selected=new O,this.removed=new O,this.typed=new O,this.opened=new O,this.options=[],this.itemObjects=[],this.inputMode=!1,this.inputValue="",this.onChange=Function.prototype,this.onTouched=Function.prototype,this.sanitizer=C(ne),this._items=[],this._optionsOpened=!1,this._disabled=!1,this._active=null,this.clickedOutside=this.clickedOutside.bind(this)}set items(e){if(!e.length){this._items=this.itemObjects=[],this.itemObjects=[];return}this._items=e.filter(t=>{if(typeof t=="string"||typeof t=="object"&&t&&t[this.nameField]&&t[this.idField])return t}),this.itemObjects=this._items.map(t=>typeof t=="string"?new S(t):new S({id:t[this.idField],name:t[this.nameField],description:t[this.descriptionField]}))}get optionsOpened(){return this._optionsOpened}set optionsOpened(e){this._optionsOpened=e,this.opened.emit(e)}get disabled(){return this._disabled}set disabled(e){this._disabled=e,this._disabled===!0&&this.hideOptions()}get active(){return this._active}set active(e){e?this._active=typeof e=="string"?e:new S({id:e[this.idField],name:e[this.nameField],description:e[this.descriptionField]}):this._active=null}sanitize(e){return this.sanitizer.bypassSecurityTrustHtml(e)}inputEvent(e,t=!1){if(e.keyCode===9)return;if(t&&(e.keyCode===37||e.keyCode===39||e.keyCode===38||e.keyCode===40||e.keyCode===13)){e.preventDefault();return}if(!t&&e.keyCode===8){let l=this.element.nativeElement.querySelector("div.ui-select-container > input");(!l.value||l.value.length<=0)&&(this.active&&this.remove(this.active),e.preventDefault())}if(!t&&e.keyCode===27){this.hideOptions(),e.preventDefault();return}if(!t&&e.keyCode===46&&(this.active&&this.remove(this.active),e.preventDefault()),!t&&e.keyCode===37&&this._items.length>0){this.behavior.first(),e.preventDefault();return}if(!t&&e.keyCode===39&&this._items.length>0){this.behavior.last(),e.preventDefault();return}if(!t&&e.keyCode===38){this.behavior.prev(),e.preventDefault();return}if(!t&&e.keyCode===40){this.behavior.next(),e.preventDefault();return}if(!t&&e.keyCode===13){(!this.active||this.active.id!==this.activeOption.id)&&(this.selectActiveMatch(),this.behavior.next()),e.preventDefault();return}let o=e.target||e.srcElement;o?(this.inputValue=o.value,this.doEvent("typed",this.inputValue||" ")):this.open()}ngOnInit(){this.subscription=this.typed.asObservable().pipe(I(200),W()).subscribe(e=>this.doSearch(e)),this.behavior=new R(this),this.doEvent("typed"," ")}ngOnDestroy(){this.subscription.unsubscribe()}remove(e){this._disabled!==!0&&(this.active=null,this.data.next(this.active),this.doEvent("removed",e),this.inputValue="",this.doEvent("typed"," "))}doEvent(e,t){this[e]&&t&&this[e].next(t),this.onTouched(),(e==="selected"||e==="removed")&&this.onChange(this.active)}clickedOutside(){this.inputMode=!1,this.optionsOpened=!1}writeValue(e){this.active=e,this.data.emit(this.active)}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}matchClick(e){this._disabled!==!0&&(this.inputMode=!this.inputMode,this.inputMode===!0&&(this.focusToInput(),this.open()))}mainClick(e){if(this.inputMode===!0||this._disabled===!0)return;if(e.keyCode===46){e.preventDefault(),this.inputEvent(e);return}if(e.keyCode===8){e.preventDefault(),this.inputEvent(e,!0);return}if(e.keyCode===9||e.keyCode===13||e.keyCode===27||e.keyCode>=37&&e.keyCode<=40){e.preventDefault();return}this.inputMode=!0;let t=String.fromCharCode(96<=e.keyCode&&e.keyCode<=105?e.keyCode-48:e.keyCode).toLowerCase();this.focusToInput(t),this.open();let o=e.target||e.srcElement;o.value=t,this.inputEvent(e)}selectActive(e){this.activeOption=e}isActive(e){return this.activeOption.id===e.id}removeClick(e,t){t.stopPropagation(),this.remove(e)}focusToInput(e=""){setTimeout(()=>{let t=this.element.nativeElement.querySelector("div.ui-select-container > input");t&&(t.focus(),t.value=e)},0)}selectMatch(e,t=void 0){t&&(t.stopPropagation(),t.preventDefault()),!(this.options.length<=0)&&(this.active=e,this.data.next(this.active),this.doEvent("selected",e),this.hideOptions(),this.focusToInput(e.name),this.element.nativeElement.querySelector(".ui-select-container").focus())}doSearch(e){this.searchFunction(e).subscribe({next:t=>{this.items=t},error:t=>{console.error(t),this.items=[]},complete:()=>this.behavior.filter()})}open(){this.options=this.itemObjects,this.options.length>0&&this.behavior.first(),this.optionsOpened=!0}hideOptions(){this.inputMode=!1,this.optionsOpened=!1}selectActiveMatch(){this.selectMatch(this.activeOption)}};n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=M({type:n,selectors:[["app-select"]],inputs:{searchFunction:"searchFunction",customTemplateOptions:"customTemplateOptions",customTemplateSelect:"customTemplateSelect",itemIcon:"itemIcon",allowClear:"allowClear",placeholder:"placeholder",idField:"idField",nameField:"nameField",descriptionField:"descriptionField",disabled:"disabled",active:"active"},outputs:{data:"data",selected:"selected",removed:"removed",typed:"typed",opened:"opened"},features:[Y([{provide:oe,useExisting:U(()=>n),multi:!0}])],decls:9,vars:5,consts:[["DefaultSelect",""],["DefaultOptions",""],[1,"ui-select-container","dropdown","open",3,"keyup","offClick"],["autocomplete","false","tabindex","-1","type","text",1,"form-control","form-control-sm","ui-select-search",3,"disabled"],[1,"ui-select-match","form-control","form-control-sm"],["role","menu",1,"ui-select-choices","dropdown-menu"],["autocomplete","false","tabindex","-1","type","text",1,"form-control","form-control-sm","ui-select-search",3,"keydown","keyup","disabled"],["tabindex","-1",1,"ui-select-toggle","no-select",2,"outline","0",3,"click"],[1,"ui-select-match-text","w-100",3,"ui-select-allow-clear"],[1,"ui-select-placeholder"],["aria-label","close","type","button",1,"btn-close"],[1,"dropdown-toggle"],[1,"ui-select-match-text","w-100"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["aria-label","close","type","button",1,"btn-close",3,"click"],["role","menuitem"],[1,"ui-select-choices-row",3,"click","mouseenter"],[1,"d-flex","align-items-center"],[1,"ui-icon","circle-primary-icon","me-2"],[3,"icon","fixedWidth"],[1,"d-flex","ms-auto","me-4","fs-xxxs","text-muted"],["href","javascript:void(0)",1,"dropdown-item","cursor-pointer",2,"padding","3px 5px"],[3,"innerHtml"],[1,"d-flex","ms-auto","fs-xxxs","text-muted",3,"innerHtml"]],template:function(t,o){if(t&1){let l=y();c(0,"div",2),h("keyup",function(E){return v(l),x(o.mainClick(E))}),_(1,"div"),f(2,Ge,1,1,"input",3)(3,Ne,6,2,"div",4),f(4,Ie,3,0,"ul",5),a(),w(5,We,7,4,"ng-template",null,0,z)(7,Ue,8,10,"ng-template",null,1,z)}t&2&&(u("offClick",o.clickedOutside),s(),b("ui-disabled",o.disabled),s(),g(o.inputMode?2:3),s(2),g(o.optionsOpened&&o.options&&o.options.length>0?4:-1))},dependencies:[be,P,ie,ye],styles:[`.ui-select-container[_ngcontent-%COMP%]{background-color:transparent;border-radius:4px}.ui-select-container.open[_ngcontent-%COMP%] > .dropdown-menu[_ngcontent-%COMP%]{display:block}.ui-select-container.open[_ngcontent-%COMP%] > a[_ngcontent-%COMP%]{outline:none}.ui-select-container[_ngcontent-%COMP%] .ui-icon[_ngcontent-%COMP%]{min-width:26px;min-height:26px;font-size:.85rem}.ui-select-container[_ngcontent-%COMP%] .ui-disabled[_ngcontent-%COMP%]{background-color:#d4dbe8;border-radius:4px;position:absolute;width:100%;height:100%;z-index:5;opacity:.6;top:0;left:0;cursor:not-allowed}.ui-select-container[_ngcontent-%COMP%] .ui-select-search[_ngcontent-%COMP%]{line-height:26px}.ui-select-container[_ngcontent-%COMP%] .ui-select-match[_ngcontent-%COMP%]{padding-left:.3rem}.ui-select-container[_ngcontent-%COMP%] .ui-select-match[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%]{text-align:start!important}.ui-select-container[_ngcontent-%COMP%] .ui-select-match[_ngcontent-%COMP%] .caret[_ngcontent-%COMP%]{position:absolute;top:45%;right:15px}.ui-select-container[_ngcontent-%COMP%] .ui-select-match[_ngcontent-%COMP%] .close[_ngcontent-%COMP%]{font-size:1.6em;line-height:.75}.ui-select-container[_ngcontent-%COMP%] .ui-select-match[_ngcontent-%COMP%] .ui-select-toggle[_ngcontent-%COMP%]{display:flex;align-items:center}.ui-select-container[_ngcontent-%COMP%] .ui-select-match[_ngcontent-%COMP%] .ui-select-toggle[_ngcontent-%COMP%] > .caret[_ngcontent-%COMP%]{position:absolute;height:10px;top:50%;right:10px;margin-top:-2px}.ui-select-container[_ngcontent-%COMP%] .ui-select-match[_ngcontent-%COMP%] .ui-select-placeholder[_ngcontent-%COMP%]{float:left;line-height:26px;color:#8c8c8c;width:100%}.ui-select-container[_ngcontent-%COMP%] .ui-select-match[_ngcontent-%COMP%] .dropdown-toggle[_ngcontent-%COMP%]{cursor:pointer}.ui-select-container[_ngcontent-%COMP%] .ui-select-match[_ngcontent-%COMP%] .dropdown-toggle[_ngcontent-%COMP%]:after{display:inline-block!important}.ui-select-container[_ngcontent-%COMP%] .ui-select-choices[_ngcontent-%COMP%]{width:100%;height:auto;max-height:200px;overflow-x:hidden;margin-top:0}.ui-select-container[_ngcontent-%COMP%] .ui-select-choices[_ngcontent-%COMP%] .ui-select-choices-row[_ngcontent-%COMP%] > a[_ngcontent-%COMP%]{display:block;padding:3px 5px;clear:both;font-weight:400;line-height:1.42857143;color:#333;white-space:nowrap}.ui-select-container[_ngcontent-%COMP%] .ui-select-choices[_ngcontent-%COMP%] .ui-select-choices-row[_ngcontent-%COMP%] .active[_ngcontent-%COMP%] > a[_ngcontent-%COMP%]{text-decoration:none;outline:0}.ui-select-container[_ngcontent-%COMP%] .ui-select-choices[_ngcontent-%COMP%] .ui-select-choices-row[_ngcontent-%COMP%] .dropdown-item[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{pointer-events:none}
1
+ import{b as ye}from"./chunk-ZU5MQTFN.js";import{m as ve,n as xe,s as N,w as Oe}from"./chunk-CVXLHSO5.js";import{Cb as Ce,J as _e}from"./chunk-AALPWGPB.js";import{Aa as q,Ab as D,Ae as me,Bb as y,Bf as ge,Cd as ce,Dd as le,Eb as h,Gb as p,Gd as pe,Ha as T,J as I,Kd as de,Mc as ie,N as W,Oa as s,Od as ue,Pb as F,Qa as O,Rb as b,Sb as Z,Tb as m,Ub as k,Xb as V,Yb as G,Zb as A,ab as M,bf as he,cb as B,cc as J,cd as ne,da as U,db as Q,dd as oe,ec as Y,fb as w,fd as re,gc as ee,hc as te,ja as C,jd as se,kc as H,lb as f,mb as g,mc as j,nb as $,nf as fe,oa as v,oc as z,od as ae,pa as x,pb as K,qb as X,qg as P,rb as u,sb as c,tb as a,ub as _}from"./chunk-76M3BMK6.js";var ke=(function(i){return i[i.USER=0]="USER",i[i.PERSONAL=1]="PERSONAL",i})(ke||{}),Se=(function(i){return i[i.VISIBLE=0]="VISIBLE",i[i.PRIVATE=1]="PRIVATE",i[i.ISOLATED=2]="ISOLATED",i})(Se||{});var Xe=(()=>{let n=class n{constructor(){this.translate=C(pe)}transform(e,t=[]){let o="";if(!e)return o;for(let[l,d]of Object.entries(e).filter(([E,qe])=>t.indexOf(E)===-1))d&&(o+=`${d} ${this.translate.translate(d===1?l.slice(0,-1):l)}, `);return o.slice(0,-2)}};n.\u0275fac=function(t){return new(t||n)},n.\u0275pipe=Q({name:"joinCounts",type:n,pure:!0});let i=n;return i})();function Me(i,n){if(i&1&&(c(0,"span"),m(1),a()),i&2){let r=p();s(),k(r.group.name)}}function we(i,n){i&1&&(c(0,"span",3),m(1,"New personal group"),a())}function Pe(i,n){if(i&1&&_(0,"fa-icon",4),i&2){let r=p();u("icon",r.icons.faSpinner)}}function Ee(i,n){i&1&&(c(0,"span",3),m(1,"Edit personal group"),a())}function Te(i,n){i&1&&(c(0,"span",3),m(1,"Edit group"),a())}function De(i,n){if(i&1&&(c(0,"h4",5),f(1,Ee,2,0,"span",3)(2,Te,2,0,"span",3),a()),i&2){let r=p();s(),g(r.isPersonalGroup?1:2)}}var mt=(()=>{let n=class n{constructor(){this.groupChange=new O,this.layout=C(Ce),this.icons={GROUPS:_e.GROUPS,faSpinner:fe,faCog:he,faUsers:me,faPen:ge},this.isPersonalGroup=!0,this.submitted=!1,this.loading=!1,this.userService=C(Oe),this.user=this.userService.user}ngOnInit(){this.originalGroup?.id?(this.isPersonalGroup=this.originalGroup.isPersonalGroup,this.group=new N({id:this.originalGroup.id,name:this.originalGroup.name,description:this.originalGroup.description,createdAt:this.originalGroup.createdAt,modifiedAt:this.originalGroup.modifiedAt,type:this.originalGroup.type})):this.group=new N({id:0,name:"",description:"",createdAt:null,modifiedAt:null,type:xe.PGROUP})}onCancel(){this.layout.closeDialog()}onSubmit(){if(this.loading=!0,this.submitted=!0,this.group.id===0)this.userService.createPersonalGroup(this.makeDto(!0)).subscribe({next:e=>{this.loading=!1,this.groupChange.emit(["add",e]),this.layout.sendNotification("success","Group created",e.name),this.layout.closeDialog()},error:e=>this.onError(e)});else{let e=this.makeDto();if(!Object.keys(e).length){this.loading=!1,this.submitted=!1;return}this.userService.updatePersonalGroup(this.originalGroup.id,this.makeDto()).subscribe({next:t=>{this.loading=!1,this.groupChange.emit(["update",t]),this.layout.sendNotification("success","Group updated",t.name),this.layout.closeDialog()},error:t=>this.onError(t)})}}makeDto(e=!1){return{name:e?this.group.name:this.group.name!==this.originalGroup.name?this.group.name:void 0,description:e?this.group.description:this.group.description!==this.originalGroup.description?this.group.description:void 0}}onError(e){this.layout.sendNotification("error","Group error",this.group.name,e),this.submitted=!1,this.loading=!1}};n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=M({type:n,selectors:[["app-user-group-dialog"]],inputs:{originalGroup:"originalGroup"},outputs:{groupChange:"groupChange"},decls:23,vars:15,consts:[[1,"modal-header","align-items-center"],[1,"modal-title"],[1,"me-2",3,"icon"],["l10nTranslate",""],["animation","spin","size","sm",1,"ms-2",3,"icon"],[1,"modal-title","ms-auto"],["aria-label","Close","type","button",3,"click"],[1,"modal-body"],[1,"d-flex","col-12","pb-3"],[1,"flex-fill","col-6","pe-4"],["for","name","l10nTranslate",""],["id","name","appAutofocus","","autocomplete","off","type","text",1,"form-control","form-control-sm",3,"ngModelChange","disabled","autoSelect","ngModel"],[1,"flex-fill","col-6","ps-4"],["for","description","l10nTranslate",""],["id","description","autocomplete","off","type","text",1,"form-control","form-control-sm",3,"ngModelChange","ngModel","disabled"],[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(t,o){t&1&&(c(0,"div",0)(1,"h4",1),_(2,"fa-icon",2),f(3,Me,2,1,"span")(4,we,2,0,"span",3),f(5,Pe,1,1,"fa-icon",4),a(),f(6,De,3,1,"h4",5),c(7,"button",6),h("click",function(){return o.layout.closeDialog()}),a()(),c(8,"div",7)(9,"div",8)(10,"div",9)(11,"label",10),m(12,"Name"),a(),c(13,"input",11),A("ngModelChange",function(d){return G(o.group.name,d)||(o.group.name=d),d}),a()(),c(14,"div",12)(15,"label",13),m(16,"Description"),a(),c(17,"input",14),A("ngModelChange",function(d){return G(o.group.description,d)||(o.group.description=d),d}),a()()()(),c(18,"div",15)(19,"button",16),h("click",function(){return o.onCancel()}),m(20,"Cancel"),a(),c(21,"button",17),h("click",function(){return o.onSubmit()}),m(22," Confirm "),a()()),t&2&&(s(2),u("icon",o.icons.GROUPS),s(),g(o.group.id?3:4),s(2),g(o.loading?5:-1),s(),g(o.group.id?6:-1),s(),Z(J("btn-close btn-close-white ",o.group.id?"ms-2":"ms-auto"," ms-2")),s(6),b("is-invalid",!o.group.name),u("disabled",!o.isPersonalGroup)("autoSelect",!1),V("ngModel",o.group.name),s(4),V("ngModel",o.group.description),u("disabled",!o.isPersonalGroup),s(4),u("disabled",!o.group.name||o.submitted))},dependencies:[le,re,se,ce,ae,P,de,ve],encapsulation:2});let i=n;return i})();var be=(()=>{let n=class n{onClick(e){e.stopPropagation()}ngOnInit(){setTimeout(()=>{typeof document<"u"&&document.addEventListener("click",this.offClickHandler)},0)}ngOnDestroy(){typeof document<"u"&&document.removeEventListener("click",this.offClickHandler)}};n.\u0275fac=function(t){return new(t||n)},n.\u0275dir=B({type:n,selectors:[["","offClick",""]],hostBindings:function(t,o){t&1&&h("click",function(d){return o.onClick(d)})},inputs:{offClickHandler:[0,"offClick","offClickHandler"]}});let i=n;return i})();var S=class{constructor(n){typeof n=="string"&&(this.id=this.name=n,this.description=""),typeof n=="object"&&(this.id=n.id||n.name,this.name=n.name,this.description=n.description||"")}};var Fe=i=>({active:i}),Ve=(i,n)=>({o:i,i:n});function Ge(i,n){if(i&1){let r=y();c(0,"input",6),h("keydown",function(t){v(r);let o=p();return x(o.inputEvent(t))})("keyup",function(t){v(r);let o=p();return x(o.inputEvent(t,!0))}),a()}if(i&2){let r=p();u("disabled",r.disabled)}}function Ae(i,n){i&1&&D(0)}function He(i,n){if(i&1&&(c(0,"span",12),w(1,Ae,1,0,"ng-container",13),a()),i&2){let r=p(2),e=F(6);b("ui-select-allow-clear",r.allowClear&&r.active),s(),u("ngTemplateOutlet",r.customTemplateSelect||e)("ngTemplateOutletContext",ee(4,Fe,r.active))}}function je(i,n){if(i&1&&(c(0,"span",9),m(1),a()),i&2){let r=p(2);s(),k(r.placeholder)}}function ze(i,n){if(i&1){let r=y();c(0,"button",14),h("click",function(t){v(r);let o=p(2);return x(o.removeClick(o.active,t))}),a()}}function Ne(i,n){if(i&1){let r=y();c(0,"div",4)(1,"span",7),h("click",function(t){v(r);let o=p();return x(o.matchClick(t))}),f(2,He,2,6,"span",8)(3,je,2,1,"span",9),f(4,ze,1,0,"button",10),_(5,"i",11),a()()}if(i&2){let r=p();s(2),g(r.active?2:3),s(2),g(r.allowClear&&r.active?4:-1)}}function Le(i,n){i&1&&D(0)}function Re(i,n){if(i&1){let r=y();c(0,"li",15)(1,"div",16),h("click",function(t){let o=v(r).$implicit,l=p(2);return x(l.selectMatch(o,t))})("mouseenter",function(){let t=v(r).$implicit,o=p(2);return x(o.selectActive(t))}),w(2,Le,1,0,"ng-container",13),a()()}if(i&2){let r=n.$implicit,e=p(2),t=F(8);s(),b("active",e.isActive(r)),s(),u("ngTemplateOutlet",e.customTemplateOptions||t)("ngTemplateOutletContext",te(4,Ve,r,e.inputValue))}}function Ie(i,n){if(i&1&&(c(0,"ul",5),K(1,Re,3,7,"li",15,$),a()),i&2){let r=p();s(),X(r.options)}}function We(i,n){if(i&1&&(c(0,"div",17)(1,"span",18),_(2,"fa-icon",19),a(),c(3,"span"),m(4),a(),c(5,"div",20),m(6),a()()),i&2){let r=n.active,e=p();s(2),u("icon",e.itemIcon)("fixedWidth",!1),s(2),k(r.name),s(2),k(r.description)}}function Ue(i,n){if(i&1&&(c(0,"a",21)(1,"div",17)(2,"span",18),_(3,"fa-icon",19),a(),_(4,"span",22),H(5,"highlight"),_(6,"span",23),H(7,"highlight"),a()()),i&2){let r=n.i,e=n.o,t=p();s(3),u("icon",t.itemIcon)("fixedWidth",!1),s(),u("innerHtml",t.sanitize(j(5,4,e.name,r)),T),s(2),u("innerHtml",t.sanitize(j(7,7,e.description,r)),T)}}var Tt=(()=>{let n=class n{constructor(){this.element=C(q),this.itemIcon=ue,this.allowClear=!0,this.placeholder="",this.idField="id",this.nameField="name",this.descriptionField="description",this.data=new O,this.selected=new O,this.removed=new O,this.typed=new O,this.opened=new O,this.options=[],this.itemObjects=[],this.inputMode=!1,this.inputValue="",this.onChange=Function.prototype,this.onTouched=Function.prototype,this.sanitizer=C(ne),this._items=[],this._optionsOpened=!1,this._disabled=!1,this._active=null,this.clickedOutside=this.clickedOutside.bind(this)}set items(e){if(!e.length){this._items=this.itemObjects=[],this.itemObjects=[];return}this._items=e.filter(t=>{if(typeof t=="string"||typeof t=="object"&&t&&t[this.nameField]&&t[this.idField])return t}),this.itemObjects=this._items.map(t=>typeof t=="string"?new S(t):new S({id:t[this.idField],name:t[this.nameField],description:t[this.descriptionField]}))}get optionsOpened(){return this._optionsOpened}set optionsOpened(e){this._optionsOpened=e,this.opened.emit(e)}get disabled(){return this._disabled}set disabled(e){this._disabled=e,this._disabled===!0&&this.hideOptions()}get active(){return this._active}set active(e){e?this._active=typeof e=="string"?e:new S({id:e[this.idField],name:e[this.nameField],description:e[this.descriptionField]}):this._active=null}sanitize(e){return this.sanitizer.bypassSecurityTrustHtml(e)}inputEvent(e,t=!1){if(e.keyCode===9)return;if(t&&(e.keyCode===37||e.keyCode===39||e.keyCode===38||e.keyCode===40||e.keyCode===13)){e.preventDefault();return}if(!t&&e.keyCode===8){let l=this.element.nativeElement.querySelector("div.ui-select-container > input");(!l.value||l.value.length<=0)&&(this.active&&this.remove(this.active),e.preventDefault())}if(!t&&e.keyCode===27){this.hideOptions(),e.preventDefault();return}if(!t&&e.keyCode===46&&(this.active&&this.remove(this.active),e.preventDefault()),!t&&e.keyCode===37&&this._items.length>0){this.behavior.first(),e.preventDefault();return}if(!t&&e.keyCode===39&&this._items.length>0){this.behavior.last(),e.preventDefault();return}if(!t&&e.keyCode===38){this.behavior.prev(),e.preventDefault();return}if(!t&&e.keyCode===40){this.behavior.next(),e.preventDefault();return}if(!t&&e.keyCode===13){(!this.active||this.active.id!==this.activeOption.id)&&(this.selectActiveMatch(),this.behavior.next()),e.preventDefault();return}let o=e.target||e.srcElement;o?(this.inputValue=o.value,this.doEvent("typed",this.inputValue||" ")):this.open()}ngOnInit(){this.subscription=this.typed.asObservable().pipe(I(200),W()).subscribe(e=>this.doSearch(e)),this.behavior=new R(this),this.doEvent("typed"," ")}ngOnDestroy(){this.subscription.unsubscribe()}remove(e){this._disabled!==!0&&(this.active=null,this.data.next(this.active),this.doEvent("removed",e),this.inputValue="",this.doEvent("typed"," "))}doEvent(e,t){this[e]&&t&&this[e].next(t),this.onTouched(),(e==="selected"||e==="removed")&&this.onChange(this.active)}clickedOutside(){this.inputMode=!1,this.optionsOpened=!1}writeValue(e){this.active=e,this.data.emit(this.active)}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}matchClick(e){this._disabled!==!0&&(this.inputMode=!this.inputMode,this.inputMode===!0&&(this.focusToInput(),this.open()))}mainClick(e){if(this.inputMode===!0||this._disabled===!0)return;if(e.keyCode===46){e.preventDefault(),this.inputEvent(e);return}if(e.keyCode===8){e.preventDefault(),this.inputEvent(e,!0);return}if(e.keyCode===9||e.keyCode===13||e.keyCode===27||e.keyCode>=37&&e.keyCode<=40){e.preventDefault();return}this.inputMode=!0;let t=String.fromCharCode(96<=e.keyCode&&e.keyCode<=105?e.keyCode-48:e.keyCode).toLowerCase();this.focusToInput(t),this.open();let o=e.target||e.srcElement;o.value=t,this.inputEvent(e)}selectActive(e){this.activeOption=e}isActive(e){return this.activeOption.id===e.id}removeClick(e,t){t.stopPropagation(),this.remove(e)}focusToInput(e=""){setTimeout(()=>{let t=this.element.nativeElement.querySelector("div.ui-select-container > input");t&&(t.focus(),t.value=e)},0)}selectMatch(e,t=void 0){t&&(t.stopPropagation(),t.preventDefault()),!(this.options.length<=0)&&(this.active=e,this.data.next(this.active),this.doEvent("selected",e),this.hideOptions(),this.focusToInput(e.name),this.element.nativeElement.querySelector(".ui-select-container").focus())}doSearch(e){this.searchFunction(e).subscribe({next:t=>{this.items=t},error:t=>{console.error(t),this.items=[]},complete:()=>this.behavior.filter()})}open(){this.options=this.itemObjects,this.options.length>0&&this.behavior.first(),this.optionsOpened=!0}hideOptions(){this.inputMode=!1,this.optionsOpened=!1}selectActiveMatch(){this.selectMatch(this.activeOption)}};n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=M({type:n,selectors:[["app-select"]],inputs:{searchFunction:"searchFunction",customTemplateOptions:"customTemplateOptions",customTemplateSelect:"customTemplateSelect",itemIcon:"itemIcon",allowClear:"allowClear",placeholder:"placeholder",idField:"idField",nameField:"nameField",descriptionField:"descriptionField",disabled:"disabled",active:"active"},outputs:{data:"data",selected:"selected",removed:"removed",typed:"typed",opened:"opened"},features:[Y([{provide:oe,useExisting:U(()=>n),multi:!0}])],decls:9,vars:5,consts:[["DefaultSelect",""],["DefaultOptions",""],[1,"ui-select-container","dropdown","open",3,"keyup","offClick"],["autocomplete","false","tabindex","-1","type","text",1,"form-control","form-control-sm","ui-select-search",3,"disabled"],[1,"ui-select-match","form-control","form-control-sm"],["role","menu",1,"ui-select-choices","dropdown-menu"],["autocomplete","false","tabindex","-1","type","text",1,"form-control","form-control-sm","ui-select-search",3,"keydown","keyup","disabled"],["tabindex","-1",1,"ui-select-toggle","no-select",2,"outline","0",3,"click"],[1,"ui-select-match-text","w-100",3,"ui-select-allow-clear"],[1,"ui-select-placeholder"],["aria-label","close","type","button",1,"btn-close"],[1,"dropdown-toggle"],[1,"ui-select-match-text","w-100"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["aria-label","close","type","button",1,"btn-close",3,"click"],["role","menuitem"],[1,"ui-select-choices-row",3,"click","mouseenter"],[1,"d-flex","align-items-center"],[1,"ui-icon","circle-primary-icon","me-2"],[3,"icon","fixedWidth"],[1,"d-flex","ms-auto","me-4","fs-xxxs","text-muted"],["href","javascript:void(0)",1,"dropdown-item","cursor-pointer",2,"padding","3px 5px"],[3,"innerHtml"],[1,"d-flex","ms-auto","fs-xxxs","text-muted",3,"innerHtml"]],template:function(t,o){if(t&1){let l=y();c(0,"div",2),h("keyup",function(E){return v(l),x(o.mainClick(E))}),_(1,"div"),f(2,Ge,1,1,"input",3)(3,Ne,6,2,"div",4),f(4,Ie,3,0,"ul",5),a(),w(5,We,7,4,"ng-template",null,0,z)(7,Ue,8,10,"ng-template",null,1,z)}t&2&&(u("offClick",o.clickedOutside),s(),b("ui-disabled",o.disabled),s(),g(o.inputMode?2:3),s(2),g(o.optionsOpened&&o.options&&o.options.length>0?4:-1))},dependencies:[be,P,ie,ye],styles:[`.ui-select-container[_ngcontent-%COMP%]{background-color:transparent;border-radius:4px}.ui-select-container.open[_ngcontent-%COMP%] > .dropdown-menu[_ngcontent-%COMP%]{display:block}.ui-select-container.open[_ngcontent-%COMP%] > a[_ngcontent-%COMP%]{outline:none}.ui-select-container[_ngcontent-%COMP%] .ui-icon[_ngcontent-%COMP%]{min-width:26px;min-height:26px;font-size:.85rem}.ui-select-container[_ngcontent-%COMP%] .ui-disabled[_ngcontent-%COMP%]{background-color:#d4dbe8;border-radius:4px;position:absolute;width:100%;height:100%;z-index:5;opacity:.6;top:0;left:0;cursor:not-allowed}.ui-select-container[_ngcontent-%COMP%] .ui-select-search[_ngcontent-%COMP%]{line-height:26px}.ui-select-container[_ngcontent-%COMP%] .ui-select-match[_ngcontent-%COMP%]{padding-left:.3rem}.ui-select-container[_ngcontent-%COMP%] .ui-select-match[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%]{text-align:start!important}.ui-select-container[_ngcontent-%COMP%] .ui-select-match[_ngcontent-%COMP%] .caret[_ngcontent-%COMP%]{position:absolute;top:45%;right:15px}.ui-select-container[_ngcontent-%COMP%] .ui-select-match[_ngcontent-%COMP%] .close[_ngcontent-%COMP%]{font-size:1.6em;line-height:.75}.ui-select-container[_ngcontent-%COMP%] .ui-select-match[_ngcontent-%COMP%] .ui-select-toggle[_ngcontent-%COMP%]{display:flex;align-items:center}.ui-select-container[_ngcontent-%COMP%] .ui-select-match[_ngcontent-%COMP%] .ui-select-toggle[_ngcontent-%COMP%] > .caret[_ngcontent-%COMP%]{position:absolute;height:10px;top:50%;right:10px;margin-top:-2px}.ui-select-container[_ngcontent-%COMP%] .ui-select-match[_ngcontent-%COMP%] .ui-select-placeholder[_ngcontent-%COMP%]{float:left;line-height:26px;color:#8c8c8c;width:100%}.ui-select-container[_ngcontent-%COMP%] .ui-select-match[_ngcontent-%COMP%] .dropdown-toggle[_ngcontent-%COMP%]{cursor:pointer}.ui-select-container[_ngcontent-%COMP%] .ui-select-match[_ngcontent-%COMP%] .dropdown-toggle[_ngcontent-%COMP%]:after{display:inline-block!important}.ui-select-container[_ngcontent-%COMP%] .ui-select-choices[_ngcontent-%COMP%]{width:100%;height:auto;max-height:200px;overflow-x:hidden;margin-top:0}.ui-select-container[_ngcontent-%COMP%] .ui-select-choices[_ngcontent-%COMP%] .ui-select-choices-row[_ngcontent-%COMP%] > a[_ngcontent-%COMP%]{display:block;padding:3px 5px;clear:both;font-weight:400;line-height:1.42857143;color:#333;white-space:nowrap}.ui-select-container[_ngcontent-%COMP%] .ui-select-choices[_ngcontent-%COMP%] .ui-select-choices-row[_ngcontent-%COMP%] .active[_ngcontent-%COMP%] > a[_ngcontent-%COMP%]{text-decoration:none;outline:0}.ui-select-container[_ngcontent-%COMP%] .ui-select-choices[_ngcontent-%COMP%] .ui-select-choices-row[_ngcontent-%COMP%] .dropdown-item[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{pointer-events:none}
2
2
 
3
3
 
4
4
 
@@ -1 +1 @@
1
- import{a,b,c,d,e,f,g,h,i,j,k,l}from"./chunk-5KVI243T.js";import"./chunk-B2A4HNDC.js";import"./chunk-4GBA6EJ4.js";import"./chunk-MWUUM2NK.js";import"./chunk-KAVP6UXH.js";export{k as autoCloseTags,d as completionPath,l as esLint,j as javascript,f as javascriptLanguage,h as jsxLanguage,c as localCompletionSource,e as scopeCompletionSource,a as snippets,i as tsxLanguage,g as typescriptLanguage,b as typescriptSnippets};
1
+ import{a,b,c,d,e,f,g,h,i,j,k,l}from"./chunk-TNCKNU6I.js";import"./chunk-G7RZN7HN.js";import"./chunk-SDJNZULP.js";import"./chunk-2YQ4SX3A.js";import"./chunk-KAVP6UXH.js";export{k as autoCloseTags,d as completionPath,l as esLint,j as javascript,f as javascriptLanguage,h as jsxLanguage,c as localCompletionSource,e as scopeCompletionSource,a as snippets,i as tsxLanguage,g as typescriptLanguage,b as typescriptSnippets};
@@ -1 +1 @@
1
- import{d as P}from"./chunk-HB5DC7RJ.js";import"./chunk-DU4Q4RWJ.js";import{f as i}from"./chunk-5KVI243T.js";import{b as l,d as g}from"./chunk-B2A4HNDC.js";import"./chunk-4GBA6EJ4.js";import{aa as n,ca as Q,da as r,ia as S,la as u}from"./chunk-MWUUM2NK.js";import"./chunk-KAVP6UXH.js";var m=1,b=33,$=34,v=35,x=36,f=new l(O=>{let t=O.pos;for(;;){if(O.next==10){O.advance();break}else if(O.next==123&&O.peek(1)==123||O.next<0)break;O.advance()}O.pos>t&&O.acceptToken(m)});function o(O,t,a){return new l(e=>{let R=e.pos;for(;e.next!=O&&e.next>=0&&(a||e.next!=38&&(e.next!=123||e.peek(1)!=123));)e.advance();e.pos>R&&e.acceptToken(t)})}var W=o(39,b,!1),d=o(34,$,!1),C=o(39,v,!0),T=o(34,x,!0),A=g.deserialize({version:14,states:"(jOVOqOOOeQpOOOvO!bO'#CaOOOP'#Cx'#CxQVOqOOO!OQpO'#CfO!WQpO'#ClO!]QpO'#CrO!bQpO'#CsOOQO'#Cv'#CvQ!gQpOOQ!lQpOOQ!qQpOOOOOV,58{,58{O!vOpO,58{OOOP-E6v-E6vO!{QpO,59QO#TQpO,59QOOQO,59W,59WO#YQpO,59^OOQO,59_,59_O#_QpOOO#_QpOOO#gQpOOOOOV1G.g1G.gO#oQpO'#CyO#tQpO1G.lOOQO1G.l1G.lO#|QpO1G.lOOQO1G.x1G.xO$UO`O'#DUO$ZOWO'#DUOOQO'#Co'#CoQOQpOOOOQO'#Cu'#CuO$`OtO'#CwO$qOrO'#CwOOQO,59e,59eOOQO-E6w-E6wOOQO7+$W7+$WO%SQpO7+$WO%[QpO7+$WOOOO'#Cp'#CpO%aOpO,59pOOOO'#Cq'#CqO%fOpO,59pOOOS'#Cz'#CzO%kOtO,59cOOQO,59c,59cOOOQ'#C{'#C{O%|OrO,59cO&_QpO<<GrOOQO<<Gr<<GrOOQO1G/[1G/[OOOS-E6x-E6xOOQO1G.}1G.}OOOQ-E6y-E6yOOQOAN=^AN=^",stateData:"&d~OvOS~OPROSQOVROWRO~OZTO[XO^VOaUOhWO~OR]OU^O~O[`O^aO~O[bO~O[cO~O[dO~ObeO~ObfO~ObgO~ORhO~O]kOwiO~O[lO~O_mO~OynOzoO~OysOztO~O[uO~O]wOwiO~O_yOwiO~OtzO~Os|O~OSQOV!OOW!OOr!OOy!QO~OSQOV!ROW!ROq!ROz!QO~O_!TOwiO~O]!UO~Oy!VO~Oz!VO~OSQOV!OOW!OOr!OOy!XO~OSQOV!ROW!ROq!ROz!XO~O]!ZO~O",goto:"#dyPPPPPzPPPP!WPPPPP!WPP!Z!^!a!d!dP!g!j!m!p!v#Q#WPPPPPPPP#^SROSS!Os!PT!Rt!SRYPRqeR{nR}oRZPRqfR[PRqgQSOR_SQj`SvjxRxlQ!PsR!W!PQ!StR!Y!SQpeRrf",nodeNames:"\u26A0 Text Content }} {{ Interpolation InterpolationContent Entity InvalidEntity Attribute BoundAttributeName [ Identifier ] ( ) ReferenceName # Is ExpressionAttributeValue AttributeInterpolation AttributeInterpolation EventName DirectiveName * StatementAttributeValue AttributeName AttributeValue",maxTerm:42,nodeProps:[["openedBy",3,"{{",15,"("],["closedBy",4,"}}",14,")"],["isolate",-4,5,19,25,27,""]],skippedNodes:[0],repeatNodeCount:4,tokenData:"0r~RyOX#rXY$mYZ$mZ]#r]^$m^p#rpq$mqr#rrs%jst&Qtv#rvw&hwx)zxy*byz*xz{+`{}#r}!O+v!O!P-]!P!Q#r!Q![+v![!]+v!]!_#r!_!`-s!`!c#r!c!}+v!}#O.Z#O#P#r#P#Q.q#Q#R#r#R#S+v#S#T#r#T#o+v#o#p/X#p#q#r#q#r0Z#r%W#r%W;'S+v;'S;:j-V;:j;=`$g<%lO+vQ#wTUQO#q#r#q#r$W#r;'S#r;'S;=`$g<%lO#rQ$ZSO#q#r#r;'S#r;'S;=`$g<%lO#rQ$jP;=`<%l#rR$t[UQvPOX#rXY$mYZ$mZ]#r]^$m^p#rpq$mq#q#r#q#r$W#r;'S#r;'S;=`$g<%lO#rR%qTyPUQO#q#r#q#r$W#r;'S#r;'S;=`$g<%lO#rR&XTaPUQO#q#r#q#r$W#r;'S#r;'S;=`$g<%lO#rR&oXUQWPOp'[pq#rq!]'[!]!^#r!^#q'[#q#r(d#r;'S'[;'S;=`)t<%lO'[R'aXUQOp'[pq#rq!]'[!]!^'|!^#q'[#q#r(d#r;'S'[;'S;=`)t<%lO'[R(TTVPUQO#q#r#q#r$W#r;'S#r;'S;=`$g<%lO#rR(gXOp'[pq#rq!]'[!]!^'|!^#q'[#q#r)S#r;'S'[;'S;=`)t<%lO'[P)VUOp)Sq!])S!]!^)i!^;'S)S;'S;=`)n<%lO)SP)nOVPP)qP;=`<%l)SR)wP;=`<%l'[R*RTzPUQO#q#r#q#r$W#r;'S#r;'S;=`$g<%lO#rR*iT^PUQO#q#r#q#r$W#r;'S#r;'S;=`$g<%lO#rR+PT_PUQO#q#r#q#r$W#r;'S#r;'S;=`$g<%lO#rR+gThPUQO#q#r#q#r$W#r;'S#r;'S;=`$g<%lO#rR+}b[PUQO}#r}!O+v!O!Q#r!Q![+v![!]+v!]!c#r!c!}+v!}#R#r#R#S+v#S#T#r#T#o+v#o#q#r#q#r$W#r%W#r%W;'S+v;'S;:j-V;:j;=`$g<%lO+vR-YP;=`<%l+vR-dTwPUQO#q#r#q#r$W#r;'S#r;'S;=`$g<%lO#rR-zTUQbPO#q#r#q#r$W#r;'S#r;'S;=`$g<%lO#rR.bTZPUQO#q#r#q#r$W#r;'S#r;'S;=`$g<%lO#rR.xT]PUQO#q#r#q#r$W#r;'S#r;'S;=`$g<%lO#rR/^VUQO#o#r#o#p/s#p#q#r#q#r$W#r;'S#r;'S;=`$g<%lO#rR/zTSPUQO#q#r#q#r$W#r;'S#r;'S;=`$g<%lO#r~0^TO#q#r#q#r0m#r;'S#r;'S;=`$g<%lO#r~0rOR~",tokenizers:[f,W,d,C,T,0,1],topRules:{Content:[0,2],Attribute:[1,9]},tokenPrec:0}),V=i.parser.configure({top:"SingleExpression"}),q=A.configure({props:[Q({Text:r.content,Is:r.definitionOperator,AttributeName:r.attributeName,"AttributeValue ExpressionAttributeValue StatementAttributeValue":r.attributeValue,Entity:r.character,InvalidEntity:r.invalid,"BoundAttributeName/Identifier":r.attributeName,"EventName/Identifier":r.special(r.attributeName),"ReferenceName/Identifier":r.variableName,"DirectiveName/Identifier":r.keyword,"{{ }}":r.brace,"( )":r.paren,"[ ]":r.bracket,"# '*'":r.punctuation})]}),s={parser:V},w={parser:i.parser},U=q.configure({wrap:n((O,t)=>O.name=="InterpolationContent"?s:null)}),y=q.configure({wrap:n((O,t)=>{var a;return O.name=="InterpolationContent"?s:O.name!="AttributeInterpolation"?null:((a=O.node.parent)===null||a===void 0?void 0:a.name)=="StatementAttributeValue"?w:s}),top:"Attribute"}),E={parser:U},N={parser:y},p=P({selfClosingTags:!0});function c(O){return O.configure({wrap:n(z)},"angular")}var k=c(p.language);function z(O,t){switch(O.name){case"Attribute":return/^[*#(\[]|\{\{/.test(t.read(O.from,O.to))?N:null;case"Text":return E}return null}function j(O={}){let t=p;if(O.base){if(O.base.language.name!="html"||!(O.base.language instanceof S))throw new RangeError("The base option must be the result of calling html(...)");t=O.base}return new u(t.language==p.language?k:c(t.language),[t.support,t.language.data.of({closeBrackets:{brackets:["[","{",'"']},indentOnInput:/^\s*[\}\]]$/})])}export{j as angular,k as angularLanguage};
1
+ import{d as P}from"./chunk-RJULB733.js";import"./chunk-CMNMPG6Z.js";import{f as i}from"./chunk-TNCKNU6I.js";import{b as l,d as g}from"./chunk-G7RZN7HN.js";import"./chunk-SDJNZULP.js";import{aa as n,ca as Q,da as r,ia as S,la as u}from"./chunk-2YQ4SX3A.js";import"./chunk-KAVP6UXH.js";var m=1,b=33,$=34,v=35,x=36,f=new l(O=>{let t=O.pos;for(;;){if(O.next==10){O.advance();break}else if(O.next==123&&O.peek(1)==123||O.next<0)break;O.advance()}O.pos>t&&O.acceptToken(m)});function o(O,t,a){return new l(e=>{let R=e.pos;for(;e.next!=O&&e.next>=0&&(a||e.next!=38&&(e.next!=123||e.peek(1)!=123));)e.advance();e.pos>R&&e.acceptToken(t)})}var W=o(39,b,!1),d=o(34,$,!1),C=o(39,v,!0),T=o(34,x,!0),A=g.deserialize({version:14,states:"(jOVOqOOOeQpOOOvO!bO'#CaOOOP'#Cx'#CxQVOqOOO!OQpO'#CfO!WQpO'#ClO!]QpO'#CrO!bQpO'#CsOOQO'#Cv'#CvQ!gQpOOQ!lQpOOQ!qQpOOOOOV,58{,58{O!vOpO,58{OOOP-E6v-E6vO!{QpO,59QO#TQpO,59QOOQO,59W,59WO#YQpO,59^OOQO,59_,59_O#_QpOOO#_QpOOO#gQpOOOOOV1G.g1G.gO#oQpO'#CyO#tQpO1G.lOOQO1G.l1G.lO#|QpO1G.lOOQO1G.x1G.xO$UO`O'#DUO$ZOWO'#DUOOQO'#Co'#CoQOQpOOOOQO'#Cu'#CuO$`OtO'#CwO$qOrO'#CwOOQO,59e,59eOOQO-E6w-E6wOOQO7+$W7+$WO%SQpO7+$WO%[QpO7+$WOOOO'#Cp'#CpO%aOpO,59pOOOO'#Cq'#CqO%fOpO,59pOOOS'#Cz'#CzO%kOtO,59cOOQO,59c,59cOOOQ'#C{'#C{O%|OrO,59cO&_QpO<<GrOOQO<<Gr<<GrOOQO1G/[1G/[OOOS-E6x-E6xOOQO1G.}1G.}OOOQ-E6y-E6yOOQOAN=^AN=^",stateData:"&d~OvOS~OPROSQOVROWRO~OZTO[XO^VOaUOhWO~OR]OU^O~O[`O^aO~O[bO~O[cO~O[dO~ObeO~ObfO~ObgO~ORhO~O]kOwiO~O[lO~O_mO~OynOzoO~OysOztO~O[uO~O]wOwiO~O_yOwiO~OtzO~Os|O~OSQOV!OOW!OOr!OOy!QO~OSQOV!ROW!ROq!ROz!QO~O_!TOwiO~O]!UO~Oy!VO~Oz!VO~OSQOV!OOW!OOr!OOy!XO~OSQOV!ROW!ROq!ROz!XO~O]!ZO~O",goto:"#dyPPPPPzPPPP!WPPPPP!WPP!Z!^!a!d!dP!g!j!m!p!v#Q#WPPPPPPPP#^SROSS!Os!PT!Rt!SRYPRqeR{nR}oRZPRqfR[PRqgQSOR_SQj`SvjxRxlQ!PsR!W!PQ!StR!Y!SQpeRrf",nodeNames:"\u26A0 Text Content }} {{ Interpolation InterpolationContent Entity InvalidEntity Attribute BoundAttributeName [ Identifier ] ( ) ReferenceName # Is ExpressionAttributeValue AttributeInterpolation AttributeInterpolation EventName DirectiveName * StatementAttributeValue AttributeName AttributeValue",maxTerm:42,nodeProps:[["openedBy",3,"{{",15,"("],["closedBy",4,"}}",14,")"],["isolate",-4,5,19,25,27,""]],skippedNodes:[0],repeatNodeCount:4,tokenData:"0r~RyOX#rXY$mYZ$mZ]#r]^$m^p#rpq$mqr#rrs%jst&Qtv#rvw&hwx)zxy*byz*xz{+`{}#r}!O+v!O!P-]!P!Q#r!Q![+v![!]+v!]!_#r!_!`-s!`!c#r!c!}+v!}#O.Z#O#P#r#P#Q.q#Q#R#r#R#S+v#S#T#r#T#o+v#o#p/X#p#q#r#q#r0Z#r%W#r%W;'S+v;'S;:j-V;:j;=`$g<%lO+vQ#wTUQO#q#r#q#r$W#r;'S#r;'S;=`$g<%lO#rQ$ZSO#q#r#r;'S#r;'S;=`$g<%lO#rQ$jP;=`<%l#rR$t[UQvPOX#rXY$mYZ$mZ]#r]^$m^p#rpq$mq#q#r#q#r$W#r;'S#r;'S;=`$g<%lO#rR%qTyPUQO#q#r#q#r$W#r;'S#r;'S;=`$g<%lO#rR&XTaPUQO#q#r#q#r$W#r;'S#r;'S;=`$g<%lO#rR&oXUQWPOp'[pq#rq!]'[!]!^#r!^#q'[#q#r(d#r;'S'[;'S;=`)t<%lO'[R'aXUQOp'[pq#rq!]'[!]!^'|!^#q'[#q#r(d#r;'S'[;'S;=`)t<%lO'[R(TTVPUQO#q#r#q#r$W#r;'S#r;'S;=`$g<%lO#rR(gXOp'[pq#rq!]'[!]!^'|!^#q'[#q#r)S#r;'S'[;'S;=`)t<%lO'[P)VUOp)Sq!])S!]!^)i!^;'S)S;'S;=`)n<%lO)SP)nOVPP)qP;=`<%l)SR)wP;=`<%l'[R*RTzPUQO#q#r#q#r$W#r;'S#r;'S;=`$g<%lO#rR*iT^PUQO#q#r#q#r$W#r;'S#r;'S;=`$g<%lO#rR+PT_PUQO#q#r#q#r$W#r;'S#r;'S;=`$g<%lO#rR+gThPUQO#q#r#q#r$W#r;'S#r;'S;=`$g<%lO#rR+}b[PUQO}#r}!O+v!O!Q#r!Q![+v![!]+v!]!c#r!c!}+v!}#R#r#R#S+v#S#T#r#T#o+v#o#q#r#q#r$W#r%W#r%W;'S+v;'S;:j-V;:j;=`$g<%lO+vR-YP;=`<%l+vR-dTwPUQO#q#r#q#r$W#r;'S#r;'S;=`$g<%lO#rR-zTUQbPO#q#r#q#r$W#r;'S#r;'S;=`$g<%lO#rR.bTZPUQO#q#r#q#r$W#r;'S#r;'S;=`$g<%lO#rR.xT]PUQO#q#r#q#r$W#r;'S#r;'S;=`$g<%lO#rR/^VUQO#o#r#o#p/s#p#q#r#q#r$W#r;'S#r;'S;=`$g<%lO#rR/zTSPUQO#q#r#q#r$W#r;'S#r;'S;=`$g<%lO#r~0^TO#q#r#q#r0m#r;'S#r;'S;=`$g<%lO#r~0rOR~",tokenizers:[f,W,d,C,T,0,1],topRules:{Content:[0,2],Attribute:[1,9]},tokenPrec:0}),V=i.parser.configure({top:"SingleExpression"}),q=A.configure({props:[Q({Text:r.content,Is:r.definitionOperator,AttributeName:r.attributeName,"AttributeValue ExpressionAttributeValue StatementAttributeValue":r.attributeValue,Entity:r.character,InvalidEntity:r.invalid,"BoundAttributeName/Identifier":r.attributeName,"EventName/Identifier":r.special(r.attributeName),"ReferenceName/Identifier":r.variableName,"DirectiveName/Identifier":r.keyword,"{{ }}":r.brace,"( )":r.paren,"[ ]":r.bracket,"# '*'":r.punctuation})]}),s={parser:V},w={parser:i.parser},U=q.configure({wrap:n((O,t)=>O.name=="InterpolationContent"?s:null)}),y=q.configure({wrap:n((O,t)=>{var a;return O.name=="InterpolationContent"?s:O.name!="AttributeInterpolation"?null:((a=O.node.parent)===null||a===void 0?void 0:a.name)=="StatementAttributeValue"?w:s}),top:"Attribute"}),E={parser:U},N={parser:y},p=P({selfClosingTags:!0});function c(O){return O.configure({wrap:n(z)},"angular")}var k=c(p.language);function z(O,t){switch(O.name){case"Attribute":return/^[*#(\[]|\{\{/.test(t.read(O.from,O.to))?N:null;case"Text":return E}return null}function j(O={}){let t=p;if(O.base){if(O.base.language.name!="html"||!(O.base.language instanceof S))throw new RangeError("The base option must be the result of calling html(...)");t=O.base}return new u(t.language==p.language?k:c(t.language),[t.support,t.language.data.of({closeBrackets:{brackets:["[","{",'"']},indentOnInput:/^\s*[\}\]]$/})])}export{j as angular,k as angularLanguage};
@@ -1 +1 @@
1
- import{Oa as n,Qb as s,ab as l,vb as d,wb as h,xa as c,xb as g}from"./chunk-BJARRIS6.js";var M=(()=>{let r=class r{constructor(){this.passwordToCheck="",this.bar0="",this.bar1="",this.bar2="",this.bar3="",this.bar4="",this.colors=["#F00","#F90","#FF0","#7ACC00","#06854B"]}static measureStrength(e){let t=0,o=/[$-/:-?{-~!"^_`[\]]/g,p=/[a-z]+/.test(e),m=/[A-Z]+/.test(e),u=/[0-9]+/.test(e),b=o.test(e),f=[p,m,u,b],a=0;for(let C of f)a+=C===!0?1:0;return t+=2*e.length+(e.length>=10?1:0),t+=a*10,t=e.length<=6?Math.min(t,10):t,t=a===1?Math.min(t,10):t,t=a===2?Math.min(t,20):t,t=a===3?Math.min(t,40):t,t}ngOnChanges(e){let t=e.passwordToCheck.currentValue;if(this.setBarColors(5,"#DDD"),t){let o=this.getColor(r.measureStrength(t));this.setBarColors(o.idx,o.col)}}getColor(e){let t=Math.min(Math.floor((e-1)/10),4);return{idx:t+1,col:this.colors[t]}}setBarColors(e,t){for(let o=0;o<e;o++)this[`bar${o}`]=t}};r.\u0275fac=function(t){return new(t||r)},r.\u0275cmp=l({type:r,selectors:[["app-password-strength-bar"]],inputs:{passwordToCheck:"passwordToCheck"},features:[c],decls:8,vars:10,consts:[["strength",""],["id","strength"],["id","strengthBar"],[1,"point"]],template:function(t,o){t&1&&(d(0,"div",1,0)(2,"ul",2),g(3,"li",3)(4,"li",3)(5,"li",3)(6,"li",3)(7,"li",3),h()()),t&2&&(n(3),s("background-color",o.bar0),n(),s("background-color",o.bar1),n(),s("background-color",o.bar2),n(),s("background-color",o.bar3),n(),s("background-color",o.bar4))},styles:["ul#strengthBar[_ngcontent-%COMP%]{display:flex;list-style:none;padding:0;align-self:center;margin-bottom:-2px}.point[_ngcontent-%COMP%]:last-child{margin:0!important}.point[_ngcontent-%COMP%]{background:#ddd;border-radius:2px;height:6px;margin-right:1px;width:20px}"],changeDetection:0});let i=r;return i})();export{M as a};
1
+ import{Oa as n,Qb as s,ab as l,vb as d,wb as h,xa as c,xb as g}from"./chunk-76M3BMK6.js";var M=(()=>{let r=class r{constructor(){this.passwordToCheck="",this.bar0="",this.bar1="",this.bar2="",this.bar3="",this.bar4="",this.colors=["#F00","#F90","#FF0","#7ACC00","#06854B"]}static measureStrength(e){let t=0,o=/[$-/:-?{-~!"^_`[\]]/g,p=/[a-z]+/.test(e),m=/[A-Z]+/.test(e),u=/[0-9]+/.test(e),b=o.test(e),f=[p,m,u,b],a=0;for(let C of f)a+=C===!0?1:0;return t+=2*e.length+(e.length>=10?1:0),t+=a*10,t=e.length<=6?Math.min(t,10):t,t=a===1?Math.min(t,10):t,t=a===2?Math.min(t,20):t,t=a===3?Math.min(t,40):t,t}ngOnChanges(e){let t=e.passwordToCheck.currentValue;if(this.setBarColors(5,"#DDD"),t){let o=this.getColor(r.measureStrength(t));this.setBarColors(o.idx,o.col)}}getColor(e){let t=Math.min(Math.floor((e-1)/10),4);return{idx:t+1,col:this.colors[t]}}setBarColors(e,t){for(let o=0;o<e;o++)this[`bar${o}`]=t}};r.\u0275fac=function(t){return new(t||r)},r.\u0275cmp=l({type:r,selectors:[["app-password-strength-bar"]],inputs:{passwordToCheck:"passwordToCheck"},features:[c],decls:8,vars:10,consts:[["strength",""],["id","strength"],["id","strengthBar"],[1,"point"]],template:function(t,o){t&1&&(d(0,"div",1,0)(2,"ul",2),g(3,"li",3)(4,"li",3)(5,"li",3)(6,"li",3)(7,"li",3),h()()),t&2&&(n(3),s("background-color",o.bar0),n(),s("background-color",o.bar1),n(),s("background-color",o.bar2),n(),s("background-color",o.bar3),n(),s("background-color",o.bar4))},styles:["ul#strengthBar[_ngcontent-%COMP%]{display:flex;list-style:none;padding:0;align-self:center;margin-bottom:-2px}.point[_ngcontent-%COMP%]:last-child{margin:0!important}.point[_ngcontent-%COMP%]{background:#ddd;border-radius:2px;height:6px;margin-right:1px;width:20px}"],changeDetection:0});let i=r;return i})();export{M as a};
@@ -1 +1 @@
1
- import{a as M,b as R}from"./chunk-2F42MZQ5.js";import"./chunk-2CAAJBRO.js";import{f as I,h as W}from"./chunk-FSGT46LM.js";import"./chunk-MYM43ENO.js";import{Cb as O,pb as N,qb as y,rb as d,s as b,xb as u,zb as A}from"./chunk-FCR5AEHR.js";import{d as w}from"./chunk-LFAQLJZK.js";import{Eb as x,Gb as m,Ia as C,Kd as z,Oa as o,Sb as T,Tb as a,Ub as p,ab as E,cc as g,ja as v,lb as S,mb as h,og as D,rb as s,sb as i,tb as n,ub as l}from"./chunk-BJARRIS6.js";import"./chunk-DM4NXKEP.js";import"./chunk-ZIJQRARU.js";import{i as P}from"./chunk-KAVP6UXH.js";function L(e,r){if(e&1&&l(0,"fa-icon",24),e&2){let t=m();T(g("circle-",t.syncService.wizard.remotePath.iconClass,"-icon")),s("icon",t.syncService.wizard.remotePath.icon)}}function Y(e,r){if(e&1&&l(0,"img",7),e&2){let t=m();s("src",t.syncService.wizard.remotePath.mimeUrl,C)}}function k(e,r){if(e&1&&(i(0,"div",18),a(1),n()),e&2){let t=m();o(),p(t.error)}}function B(e,r){e&1&&(i(0,"span",26),a(1,"and from"),n())}function F(e,r){e&1&&(i(0,"span",28),a(1,"to"),n())}function Z(e,r){e&1&&(i(0,"span",26),a(1,"(Two-Way)"),n())}function U(e,r){e&1&&(i(0,"span",26),a(1,"(One-Way)"),n())}function V(e,r){e&1&&(i(0,"span",28),a(1,"the most recent files will be kept"),n())}function $(e,r){if(e&1&&(i(0,"span",26),a(1,"the files in"),n(),i(2,"span",29),a(3),n(),i(4,"span",26),a(5,"will be preferred"),n()),e&2){let t=m(3);o(3),p(t.syncPath.settings.conflictMode===t.SYNC_PATH_CONFLICT_MODE.LOCAL?t.syncService.wizard.localPath.name:t.syncService.wizard.remotePath.name)}}function j(e,r){if(e&1&&(i(0,"div")(1,"span",26),a(2,"In case of conflict,"),n(),i(3,"span"),a(4,"\xA0"),n(),S(5,V,2,0,"span",28)(6,$,6,1),n()),e&2){let t=m(2);o(5),h(t.syncPath.settings.conflictMode===t.SYNC_PATH_CONFLICT_MODE.RECENT?5:6)}}function G(e,r){if(e&1&&(i(0,"div")(1,"span",26),a(2,"All files created or modified in"),n(),i(3,"span",30),a(4),n(),i(5,"span",26),a(6,"will be ignored and deleted"),n()()),e&2){let t=m(2);o(4),p(t.syncPath.settings.mode===t.SYNC_PATH_MODE.DOWNLOAD?t.syncService.wizard.localPath.name:t.syncService.wizard.remotePath.name)}}function q(e,r){if(e&1&&(i(0,"div",25)(1,"span",26),a(2,"The data will be synchronized from"),n(),i(3,"span",27),a(4),n(),S(5,B,2,0,"span",26)(6,F,2,0,"span",28),i(7,"span",27),a(8),n(),S(9,Z,2,0,"span",26)(10,U,2,0,"span",26),n(),l(11,"br"),i(12,"div",25),S(13,j,7,1,"div")(14,G,7,1,"div"),n()),e&2){let t=m();o(4),p(t.syncPath.settings.mode===t.SYNC_PATH_MODE.DOWNLOAD?"the server folder":"the client folder"),o(),h(t.syncPath.settings.mode===t.SYNC_PATH_MODE.BOTH?5:6),o(3),p(t.syncPath.settings.mode===t.SYNC_PATH_MODE.DOWNLOAD?"the client folder":"the server folder"),o(),h(t.syncPath.settings.mode===t.SYNC_PATH_MODE.BOTH?9:10),o(4),h(t.syncPath.settings.mode===t.SYNC_PATH_MODE.BOTH?13:14)}}var de=(()=>{let r=class r{constructor(){this.syncService=v(W),this.SYNC_PATH_CONFLICT_MODE=A,this.SYNC_PATH_MODE=u,this.icons={CLIENT:y.CLIENT,SERVER:y.SERVER},this.translatedRemotePath=this.syncService.translateServerPath(this.syncService.wizard.remotePath.serverPath),this.error=null,this.router=v(w),this.layout=v(O),this.syncPath=new I({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:u.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(y.WIZARD),this.layout.setBreadcrumbNav({url:`/${d.BASE}/${d.WIZARD}/${d.WIZARD_SETTINGS}/${N.WIZARD_SETTINGS}`,splicing:3,translating:!0,sameLink:!0})}onPrevious(){this.router.navigate([d.BASE,d.WIZARD,d.WIZARD_SERVER]).catch(console.error)}onSubmit(){return P(this,null,function*(){let _=yield this.syncService.addPath(this.syncPath.settings);typeof _=="string"?this.error=_:(yield this.syncService.refreshPaths(),this.router.navigate([d.BASE,d.PATHS],{state:{id:_.id,withSettings:!1}}).catch(console.error),this.syncService.resetWizard())})}};r.\u0275fac=function(f){return new(f||r)},r.\u0275cmp=E({type:r,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(f,c){f&1&&(i(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",2)(4,"div",3),l(5,"fa-icon",4),i(6,"span",5),a(7,"Client"),n()(),i(8,"div",6),l(9,"img",7),n(),i(10,"div",8),a(11),n()()(),i(12,"div",9),l(13,"app-sync-path-direction-icon",10),n(),i(14,"div",11)(15,"div",11)(16,"div",12),l(17,"fa-icon",4),i(18,"span",5),a(19,"Server"),n()(),i(20,"div",13),S(21,L,1,4,"fa-icon",14)(22,Y,1,1,"img",7),n(),i(23,"div",15),a(24),n()()()(),l(25,"hr",16)(26,"app-sync-path-settings",10)(27,"hr",17),S(28,k,2,1,"div",18)(29,q,15,5),i(30,"div",16)(31,"div",19)(32,"button",20),x("click",function(){return c.onPrevious()}),l(33,"i",21),a(34," Previous "),n(),i(35,"button",22),x("click",function(){return c.onSubmit()}),l(36,"i",23),a(37," Done "),n()()()()),f&2&&(o(5),s("icon",c.icons.CLIENT),o(3),s("tooltip",c.syncService.wizard.localPath.path),o(),s("src",c.syncService.wizard.localPath.mimeUrl,C),o(2),p(c.syncService.wizard.localPath.name),o(2),s("syncPath",c.syncPath),o(4),s("icon",c.icons.SERVER),o(3),s("tooltip",c.translatedRemotePath),o(),h(c.syncService.wizard.remotePath.icon?21:22),o(3),p(c.syncService.wizard.remotePath.name),o(2),s("syncPath",c.syncPath),o(2),h(c.error?28:29),o(7),s("disabled",!c.syncPath.settings.name))},dependencies:[z,D,b,M,R],encapsulation:2});let e=r;return e})();export{de as SyncWizardSettingsComponent};
1
+ import{a as M,b as R}from"./chunk-2GXOVGTD.js";import"./chunk-3ZBAQTHJ.js";import{f as I,h as W}from"./chunk-XSURUW7C.js";import"./chunk-RTNEBRKJ.js";import{Cb as O,pb as N,qb as y,rb as d,s as b,xb as u,zb as A}from"./chunk-AALPWGPB.js";import{d as w}from"./chunk-3MVPXC3U.js";import{Eb as x,Gb as m,Ia as C,Kd as z,Oa as o,Sb as T,Tb as a,Ub as p,ab as E,cc as g,ja as v,lb as S,mb as h,qg as D,rb as s,sb as i,tb as n,ub as l}from"./chunk-76M3BMK6.js";import"./chunk-DM4NXKEP.js";import"./chunk-ZIJQRARU.js";import{i as P}from"./chunk-KAVP6UXH.js";function L(e,r){if(e&1&&l(0,"fa-icon",24),e&2){let t=m();T(g("circle-",t.syncService.wizard.remotePath.iconClass,"-icon")),s("icon",t.syncService.wizard.remotePath.icon)}}function Y(e,r){if(e&1&&l(0,"img",7),e&2){let t=m();s("src",t.syncService.wizard.remotePath.mimeUrl,C)}}function k(e,r){if(e&1&&(i(0,"div",18),a(1),n()),e&2){let t=m();o(),p(t.error)}}function B(e,r){e&1&&(i(0,"span",26),a(1,"and from"),n())}function F(e,r){e&1&&(i(0,"span",28),a(1,"to"),n())}function Z(e,r){e&1&&(i(0,"span",26),a(1,"(Two-Way)"),n())}function U(e,r){e&1&&(i(0,"span",26),a(1,"(One-Way)"),n())}function V(e,r){e&1&&(i(0,"span",28),a(1,"the most recent files will be kept"),n())}function $(e,r){if(e&1&&(i(0,"span",26),a(1,"the files in"),n(),i(2,"span",29),a(3),n(),i(4,"span",26),a(5,"will be preferred"),n()),e&2){let t=m(3);o(3),p(t.syncPath.settings.conflictMode===t.SYNC_PATH_CONFLICT_MODE.LOCAL?t.syncService.wizard.localPath.name:t.syncService.wizard.remotePath.name)}}function j(e,r){if(e&1&&(i(0,"div")(1,"span",26),a(2,"In case of conflict,"),n(),i(3,"span"),a(4,"\xA0"),n(),S(5,V,2,0,"span",28)(6,$,6,1),n()),e&2){let t=m(2);o(5),h(t.syncPath.settings.conflictMode===t.SYNC_PATH_CONFLICT_MODE.RECENT?5:6)}}function G(e,r){if(e&1&&(i(0,"div")(1,"span",26),a(2,"All files created or modified in"),n(),i(3,"span",30),a(4),n(),i(5,"span",26),a(6,"will be ignored and deleted"),n()()),e&2){let t=m(2);o(4),p(t.syncPath.settings.mode===t.SYNC_PATH_MODE.DOWNLOAD?t.syncService.wizard.localPath.name:t.syncService.wizard.remotePath.name)}}function q(e,r){if(e&1&&(i(0,"div",25)(1,"span",26),a(2,"The data will be synchronized from"),n(),i(3,"span",27),a(4),n(),S(5,B,2,0,"span",26)(6,F,2,0,"span",28),i(7,"span",27),a(8),n(),S(9,Z,2,0,"span",26)(10,U,2,0,"span",26),n(),l(11,"br"),i(12,"div",25),S(13,j,7,1,"div")(14,G,7,1,"div"),n()),e&2){let t=m();o(4),p(t.syncPath.settings.mode===t.SYNC_PATH_MODE.DOWNLOAD?"the server folder":"the client folder"),o(),h(t.syncPath.settings.mode===t.SYNC_PATH_MODE.BOTH?5:6),o(3),p(t.syncPath.settings.mode===t.SYNC_PATH_MODE.DOWNLOAD?"the client folder":"the server folder"),o(),h(t.syncPath.settings.mode===t.SYNC_PATH_MODE.BOTH?9:10),o(4),h(t.syncPath.settings.mode===t.SYNC_PATH_MODE.BOTH?13:14)}}var de=(()=>{let r=class r{constructor(){this.syncService=v(W),this.SYNC_PATH_CONFLICT_MODE=A,this.SYNC_PATH_MODE=u,this.icons={CLIENT:y.CLIENT,SERVER:y.SERVER},this.translatedRemotePath=this.syncService.translateServerPath(this.syncService.wizard.remotePath.serverPath),this.error=null,this.router=v(w),this.layout=v(O),this.syncPath=new I({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:u.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(y.WIZARD),this.layout.setBreadcrumbNav({url:`/${d.BASE}/${d.WIZARD}/${d.WIZARD_SETTINGS}/${N.WIZARD_SETTINGS}`,splicing:3,translating:!0,sameLink:!0})}onPrevious(){this.router.navigate([d.BASE,d.WIZARD,d.WIZARD_SERVER]).catch(console.error)}onSubmit(){return P(this,null,function*(){let _=yield this.syncService.addPath(this.syncPath.settings);typeof _=="string"?this.error=_:(yield this.syncService.refreshPaths(),this.router.navigate([d.BASE,d.PATHS],{state:{id:_.id,withSettings:!1}}).catch(console.error),this.syncService.resetWizard())})}};r.\u0275fac=function(f){return new(f||r)},r.\u0275cmp=E({type:r,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(f,c){f&1&&(i(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",2)(4,"div",3),l(5,"fa-icon",4),i(6,"span",5),a(7,"Client"),n()(),i(8,"div",6),l(9,"img",7),n(),i(10,"div",8),a(11),n()()(),i(12,"div",9),l(13,"app-sync-path-direction-icon",10),n(),i(14,"div",11)(15,"div",11)(16,"div",12),l(17,"fa-icon",4),i(18,"span",5),a(19,"Server"),n()(),i(20,"div",13),S(21,L,1,4,"fa-icon",14)(22,Y,1,1,"img",7),n(),i(23,"div",15),a(24),n()()()(),l(25,"hr",16)(26,"app-sync-path-settings",10)(27,"hr",17),S(28,k,2,1,"div",18)(29,q,15,5),i(30,"div",16)(31,"div",19)(32,"button",20),x("click",function(){return c.onPrevious()}),l(33,"i",21),a(34," Previous "),n(),i(35,"button",22),x("click",function(){return c.onSubmit()}),l(36,"i",23),a(37," Done "),n()()()()),f&2&&(o(5),s("icon",c.icons.CLIENT),o(3),s("tooltip",c.syncService.wizard.localPath.path),o(),s("src",c.syncService.wizard.localPath.mimeUrl,C),o(2),p(c.syncService.wizard.localPath.name),o(2),s("syncPath",c.syncPath),o(4),s("icon",c.icons.SERVER),o(3),s("tooltip",c.translatedRemotePath),o(),h(c.syncService.wizard.remotePath.icon?21:22),o(3),p(c.syncService.wizard.remotePath.name),o(2),s("syncPath",c.syncPath),o(2),h(c.error?28:29),o(7),s("disabled",!c.syncPath.settings.name))},dependencies:[z,D,b,M,R],encapsulation:2});let e=r;return e})();export{de as SyncWizardSettingsComponent};
@@ -1 +1 @@
1
- import{Cb as h}from"./chunk-FCR5AEHR.js";import{Aa as o,Wa as n,Y as r,cb as l,ja as t}from"./chunk-BJARRIS6.js";var m=".selected",c="drag-over";var x=(()=>{let e=class e{constructor(){this.overFlowX="hidden",this.resizeOffset=80,this.useMaxHeight=!0,this.elementRef=t(o),this.renderer=t(n),this.layout=t(h),this.renderer.setStyle(this.elementRef.nativeElement,"overflow-y","auto"),this.renderer.setStyle(this.elementRef.nativeElement,"scrollbar-width","thin"),this.resizeSubscription=this.layout.resizeEvent.pipe(r(1)).subscribe(()=>this.onResize())}ngAfterViewInit(){this.renderer.setStyle(this.elementRef.nativeElement,"overflow-x",this.overFlowX),this.onResize()}ngOnDestroy(){this.resizeSubscription.unsubscribe()}scrollTop(){this.renderer.setProperty(this.elementRef.nativeElement,"scrollTop","0")}scrollIntoView(s=0){setTimeout(()=>this.elementRef.nativeElement.scrollTo({left:0,top:s,behavior:"smooth"}),50)}onResize(){this.renderer.setStyle(this.elementRef.nativeElement,this.useMaxHeight?"max-height":"height",`${window.innerHeight-this.resizeOffset-1}px`)}};e.\u0275fac=function(f){return new(f||e)},e.\u0275dir=l({type:e,selectors:[["","appAutoResize",""]],inputs:{overFlowX:"overFlowX",resizeOffset:"resizeOffset",useMaxHeight:"useMaxHeight"}});let i=e;return i})();export{m as a,c as b,x as c};
1
+ import{Cb as h}from"./chunk-AALPWGPB.js";import{Aa as o,Wa as n,Y as r,cb as l,ja as t}from"./chunk-76M3BMK6.js";var m=".selected",c="drag-over";var x=(()=>{let e=class e{constructor(){this.overFlowX="hidden",this.resizeOffset=80,this.useMaxHeight=!0,this.elementRef=t(o),this.renderer=t(n),this.layout=t(h),this.renderer.setStyle(this.elementRef.nativeElement,"overflow-y","auto"),this.renderer.setStyle(this.elementRef.nativeElement,"scrollbar-width","thin"),this.resizeSubscription=this.layout.resizeEvent.pipe(r(1)).subscribe(()=>this.onResize())}ngAfterViewInit(){this.renderer.setStyle(this.elementRef.nativeElement,"overflow-x",this.overFlowX),this.onResize()}ngOnDestroy(){this.resizeSubscription.unsubscribe()}scrollTop(){this.renderer.setProperty(this.elementRef.nativeElement,"scrollTop","0")}scrollIntoView(s=0){setTimeout(()=>this.elementRef.nativeElement.scrollTo({left:0,top:s,behavior:"smooth"}),50)}onResize(){this.renderer.setStyle(this.elementRef.nativeElement,this.useMaxHeight?"max-height":"height",`${window.innerHeight-this.resizeOffset-1}px`)}};e.\u0275fac=function(f){return new(f||e)},e.\u0275dir=l({type:e,selectors:[["","appAutoResize",""]],inputs:{overFlowX:"overFlowX",resizeOffset:"resizeOffset",useMaxHeight:"useMaxHeight"}});let i=e;return i})();export{m as a,c as b,x as c};
@@ -0,0 +1 @@
1
+ import{$ as L,V as v,W as F,X as M,Y as $,Z as b}from"./chunk-2YQ4SX3A.js";var C=class l{constructor(t,e,s,i,h,r,n,o,a,u=0,f){this.p=t,this.stack=e,this.state=s,this.reducePos=i,this.pos=h,this.score=r,this.buffer=n,this.bufferBase=o,this.curContext=a,this.lookAhead=u,this.parent=f}toString(){return`[${this.stack.filter((t,e)=>e%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(t,e,s=0){let i=t.parser.context;return new l(t,[],e,s,s,0,[],0,i?new A(i,i.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(t,e){this.stack.push(this.state,e,this.bufferBase+this.buffer.length),this.state=t}reduce(t){var e;let s=t>>19,i=t&65535,{parser:h}=this.p,r=this.reducePos<this.pos-25&&this.setLookAhead(this.pos),n=h.dynamicPrecedence(i);if(n&&(this.score+=n),s==0){this.pushState(h.getGoto(this.state,i,!0),this.reducePos),i<h.minRepeatTerm&&this.storeNode(i,this.reducePos,this.reducePos,r?8:4,!0),this.reduceContext(i,this.reducePos);return}let o=this.stack.length-(s-1)*3-(t&262144?6:0),a=o?this.stack[o-2]:this.p.ranges[0].from,u=this.reducePos-a;u>=2e3&&!(!((e=this.p.parser.nodeSet.types[i])===null||e===void 0)&&e.isAnonymous)&&(a==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=u):this.p.lastBigReductionSize<u&&(this.p.bigReductionCount=1,this.p.lastBigReductionStart=a,this.p.lastBigReductionSize=u));let f=o?this.stack[o-1]:0,d=this.bufferBase+this.buffer.length-f;if(i<h.minRepeatTerm||t&131072){let c=h.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(i,a,c,d+4,!0)}if(t&262144)this.state=this.stack[o];else{let c=this.stack[o-3];this.state=h.getGoto(c,i,!0)}for(;this.stack.length>o;)this.stack.pop();this.reduceContext(i,a)}storeNode(t,e,s,i=4,h=!1){if(t==0&&(!this.stack.length||this.stack[this.stack.length-1]<this.buffer.length+this.bufferBase)){let r=this,n=this.buffer.length;if(n==0&&r.parent&&(n=r.bufferBase-r.parent.bufferBase,r=r.parent),n>0&&r.buffer[n-4]==0&&r.buffer[n-1]>-1){if(e==s)return;if(r.buffer[n-2]>=e){r.buffer[n-2]=s;return}}}if(!h||this.pos==s)this.buffer.push(t,e,s,i);else{let r=this.buffer.length;if(r>0&&(this.buffer[r-4]!=0||this.buffer[r-1]<0)){let n=!1;for(let o=r;o>0&&this.buffer[o-2]>s;o-=4)if(this.buffer[o-1]>=0){n=!0;break}if(n)for(;r>0&&this.buffer[r-2]>s;)this.buffer[r]=this.buffer[r-4],this.buffer[r+1]=this.buffer[r-3],this.buffer[r+2]=this.buffer[r-2],this.buffer[r+3]=this.buffer[r-1],r-=4,i>4&&(i-=4)}this.buffer[r]=t,this.buffer[r+1]=e,this.buffer[r+2]=s,this.buffer[r+3]=i}}shift(t,e,s,i){if(t&131072)this.pushState(t&65535,this.pos);else if((t&262144)==0){let h=t,{parser:r}=this.p;this.pos=i,!r.stateFlag(h,1)&&(i>s||e<=r.maxNode)&&(this.reducePos=i),this.pushState(h,Math.min(s,this.reducePos)),this.shiftContext(e,s),e<=r.maxNode&&this.buffer.push(e,s,i,4)}else this.pos=i,this.shiftContext(e,s),e<=this.p.parser.maxNode&&this.buffer.push(e,s,i,4)}apply(t,e,s,i){t&65536?this.reduce(t):this.shift(t,e,s,i)}useNode(t,e){let s=this.p.reused.length-1;(s<0||this.p.reused[s]!=t)&&(this.p.reused.push(t),s++);let i=this.pos;this.reducePos=this.pos=i+t.length,this.pushState(e,i),this.buffer.push(s,i,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,t,this,this.p.stream.reset(this.pos-t.length)))}split(){let t=this,e=t.buffer.length;for(;e>0&&t.buffer[e-2]>t.reducePos;)e-=4;let s=t.buffer.slice(e),i=t.bufferBase+e;for(;t&&i==t.bufferBase;)t=t.parent;return new l(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,s,i,this.curContext,this.lookAhead,t)}recoverByDelete(t,e){let s=t<=this.p.parser.maxNode;s&&this.storeNode(t,this.pos,e,4),this.storeNode(0,this.pos,e,s?8:4),this.pos=this.reducePos=e,this.score-=190}canShift(t){for(let e=new T(this);;){let s=this.p.parser.stateSlot(e.state,4)||this.p.parser.hasAction(e.state,t);if(s==0)return!1;if((s&65536)==0)return!0;e.reduce(s)}}recoverByInsert(t){if(this.stack.length>=300)return[];let e=this.p.parser.nextStates(this.state);if(e.length>8||this.stack.length>=120){let i=[];for(let h=0,r;h<e.length;h+=2)(r=e[h+1])!=this.state&&this.p.parser.hasAction(r,t)&&i.push(e[h],r);if(this.stack.length<120)for(let h=0;i.length<8&&h<e.length;h+=2){let r=e[h+1];i.some((n,o)=>o&1&&n==r)||i.push(e[h],r)}e=i}let s=[];for(let i=0;i<e.length&&s.length<4;i+=2){let h=e[i+1];if(h==this.state)continue;let r=this.split();r.pushState(h,this.pos),r.storeNode(0,r.pos,r.pos,4,!0),r.shiftContext(e[i],this.pos),r.reducePos=this.pos,r.score-=200,s.push(r)}return s}forceReduce(){let{parser:t}=this.p,e=t.stateSlot(this.state,5);if((e&65536)==0)return!1;if(!t.validAction(this.state,e)){let s=e>>19,i=e&65535,h=this.stack.length-s*3;if(h<0||t.getGoto(this.stack[h],i,!1)<0){let r=this.findForcedReduction();if(r==null)return!1;e=r}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(e),!0}findForcedReduction(){let{parser:t}=this.p,e=[],s=(i,h)=>{if(!e.includes(i))return e.push(i),t.allActions(i,r=>{if(!(r&393216))if(r&65536){let n=(r>>19)-h;if(n>1){let o=r&65535,a=this.stack.length-n*3;if(a>=0&&t.getGoto(this.stack[a],o,!1)>=0)return n<<19|65536|o}}else{let n=s(r,h+1);if(n!=null)return n}})};return s(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:t}=this.p;return t.data[t.stateSlot(this.state,1)]==65535&&!t.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(t){if(this.state!=t.state||this.stack.length!=t.stack.length)return!1;for(let e=0;e<this.stack.length;e+=3)if(this.stack[e]!=t.stack[e])return!1;return!0}get parser(){return this.p.parser}dialectEnabled(t){return this.p.parser.dialect.flags[t]}shiftContext(t,e){this.curContext&&this.updateContext(this.curContext.tracker.shift(this.curContext.context,t,this,this.p.stream.reset(e)))}reduceContext(t,e){this.curContext&&this.updateContext(this.curContext.tracker.reduce(this.curContext.context,t,this,this.p.stream.reset(e)))}emitContext(){let t=this.buffer.length-1;(t<0||this.buffer[t]!=-3)&&this.buffer.push(this.curContext.hash,this.pos,this.pos,-3)}emitLookAhead(){let t=this.buffer.length-1;(t<0||this.buffer[t]!=-4)&&this.buffer.push(this.lookAhead,this.pos,this.pos,-4)}updateContext(t){if(t!=this.curContext.context){let e=new A(this.curContext.tracker,t);e.hash!=this.curContext.hash&&this.emitContext(),this.curContext=e}}setLookAhead(t){return t<=this.lookAhead?!1:(this.emitLookAhead(),this.lookAhead=t,!0)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}},A=class{constructor(t,e){this.tracker=t,this.context=e,this.hash=t.strict?t.hash(e):0}},T=class{constructor(t){this.start=t,this.state=t.state,this.stack=t.stack,this.base=this.stack.length}reduce(t){let e=t&65535,s=t>>19;s==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(s-1)*3;let i=this.start.p.parser.getGoto(this.stack[this.base-3],e,!0);this.state=i}},N=class l{constructor(t,e,s){this.stack=t,this.pos=e,this.index=s,this.buffer=t.buffer,this.index==0&&this.maybeNext()}static create(t,e=t.bufferBase+t.buffer.length){return new l(t,e,e-t.bufferBase)}maybeNext(){let t=this.stack.parent;t!=null&&(this.index=this.stack.bufferBase-t.bufferBase,this.stack=t,this.buffer=t.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new l(this.stack,this.pos,this.index)}};function S(l,t=Uint16Array){if(typeof l!="string")return l;let e=null;for(let s=0,i=0;s<l.length;){let h=0;for(;;){let r=l.charCodeAt(s++),n=!1;if(r==126){h=65535;break}r>=92&&r--,r>=34&&r--;let o=r-32;if(o>=46&&(o-=46,n=!0),h+=o,n)break;h*=46}e?e[i++]=h:e=new t(h)}return e}var x=class{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}},j=new x,R=class{constructor(t,e){this.input=t,this.ranges=e,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=j,this.rangeIndex=0,this.pos=this.chunkPos=e[0].from,this.range=e[0],this.end=e[e.length-1].to,this.readNext()}resolveOffset(t,e){let s=this.range,i=this.rangeIndex,h=this.pos+t;for(;h<s.from;){if(!i)return null;let r=this.ranges[--i];h-=s.from-r.to,s=r}for(;e<0?h>s.to:h>=s.to;){if(i==this.ranges.length-1)return null;let r=this.ranges[++i];h+=r.from-s.to,s=r}return h}clipPos(t){if(t>=this.range.from&&t<this.range.to)return t;for(let e of this.ranges)if(e.to>t)return Math.max(t,e.from);return this.end}peek(t){let e=this.chunkOff+t,s,i;if(e>=0&&e<this.chunk.length)s=this.pos+t,i=this.chunk.charCodeAt(e);else{let h=this.resolveOffset(t,1);if(h==null)return-1;if(s=h,s>=this.chunk2Pos&&s<this.chunk2Pos+this.chunk2.length)i=this.chunk2.charCodeAt(s-this.chunk2Pos);else{let r=this.rangeIndex,n=this.range;for(;n.to<=s;)n=this.ranges[++r];this.chunk2=this.input.chunk(this.chunk2Pos=s),s+this.chunk2.length>n.to&&(this.chunk2=this.chunk2.slice(0,n.to-s)),i=this.chunk2.charCodeAt(0)}}return s>=this.token.lookAhead&&(this.token.lookAhead=s+1),i}acceptToken(t,e=0){let s=e?this.resolveOffset(e,-1):this.pos;if(s==null||s<this.token.start)throw new RangeError("Token end out of bounds");this.token.value=t,this.token.end=s}acceptTokenTo(t,e){this.token.value=t,this.token.end=e}getChunk(){if(this.pos>=this.chunk2Pos&&this.pos<this.chunk2Pos+this.chunk2.length){let{chunk:t,chunkPos:e}=this;this.chunk=this.chunk2,this.chunkPos=this.chunk2Pos,this.chunk2=t,this.chunk2Pos=e,this.chunkOff=this.pos-this.chunkPos}else{this.chunk2=this.chunk,this.chunk2Pos=this.chunkPos;let t=this.input.chunk(this.pos),e=this.pos+t.length;this.chunk=e>this.range.to?t.slice(0,this.range.to-this.pos):t,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(t=1){for(this.chunkOff+=t;this.pos+t>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();t-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=t,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(t,e){if(e?(this.token=e,e.start=t,e.lookAhead=t+1,e.value=e.extended=-1):this.token=j,this.pos!=t){if(this.pos=t,t==this.end)return this.setDone(),this;for(;t<this.range.from;)this.range=this.ranges[--this.rangeIndex];for(;t>=this.range.to;)this.range=this.ranges[++this.rangeIndex];t>=this.chunkPos&&t<this.chunkPos+this.chunk.length?this.chunkOff=t-this.chunkPos:(this.chunk="",this.chunkOff=0),this.readNext()}return this}read(t,e){if(t>=this.chunkPos&&e<=this.chunkPos+this.chunk.length)return this.chunk.slice(t-this.chunkPos,e-this.chunkPos);if(t>=this.chunk2Pos&&e<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(t-this.chunk2Pos,e-this.chunk2Pos);if(t>=this.range.from&&e<=this.range.to)return this.input.read(t,e);let s="";for(let i of this.ranges){if(i.from>=e)break;i.to>t&&(s+=this.input.read(Math.max(i.from,t),Math.min(i.to,e)))}return s}},m=class{constructor(t,e){this.data=t,this.id=e}token(t,e){let{parser:s}=e.p;K(this.data,t,e,this.id,s.data,s.tokenPrecTable)}};m.prototype.contextual=m.prototype.fallback=m.prototype.extend=!1;var z=class{constructor(t,e,s){this.precTable=e,this.elseToken=s,this.data=typeof t=="string"?S(t):t}token(t,e){let s=t.pos,i=0;for(;;){let h=t.next<0,r=t.resolveOffset(1,1);if(K(this.data,t,e,0,this.data,this.precTable),t.token.value>-1)break;if(this.elseToken==null)return;if(h||i++,r==null)break;t.reset(r,t.token)}i&&(t.reset(s,t.token),t.acceptToken(this.elseToken,i))}};z.prototype.contextual=m.prototype.fallback=m.prototype.extend=!1;var E=class{constructor(t,e={}){this.token=t,this.contextual=!!e.contextual,this.fallback=!!e.fallback,this.extend=!!e.extend}};function K(l,t,e,s,i,h){let r=0,n=1<<s,{dialect:o}=e.p.parser;t:for(;(n&l[r])!=0;){let a=l[r+1];for(let c=r+3;c<a;c+=2)if((l[c+1]&n)>0){let p=l[c];if(o.allows(p)&&(t.token.value==-1||t.token.value==p||X(p,t.token.value,i,h))){t.acceptToken(p);break}}let u=t.next,f=0,d=l[r+2];if(t.next<0&&d>f&&l[a+d*3-3]==65535){r=l[a+d*3-1];continue t}for(;f<d;){let c=f+d>>1,p=a+c+(c<<1),P=l[p],Q=l[p+1]||65536;if(u<P)d=c;else if(u>=Q)f=c+1;else{r=l[p+2],t.advance();continue t}}break}}function G(l,t,e){for(let s=t,i;(i=l[s])!=65535;s++)if(i==e)return s-t;return-1}function X(l,t,e,s){let i=G(e,s,t);return i<0||G(e,s,l)<i}var g=typeof process<"u"&&process.env&&/\bparse\b/.test(process.env.LOG),w=null;function U(l,t,e){let s=l.cursor($.IncludeAnonymous);for(s.moveTo(t);;)if(!(e<0?s.childBefore(t):s.childAfter(t)))for(;;){if((e<0?s.to<t:s.from>t)&&!s.type.isError)return e<0?Math.max(0,Math.min(s.to-1,t-25)):Math.min(l.length,Math.max(s.from+1,t+25));if(e<0?s.prevSibling():s.nextSibling())break;if(!s.parent())return e<0?0:l.length}}var I=class{constructor(t,e){this.fragments=t,this.nodeSet=e,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let t=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(t){for(this.safeFrom=t.openStart?U(t.tree,t.from+t.offset,1)-t.offset:t.from,this.safeTo=t.openEnd?U(t.tree,t.to+t.offset,-1)-t.offset:t.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(t.tree),this.start.push(-t.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(t){if(t<this.nextStart)return null;for(;this.fragment&&this.safeTo<=t;)this.nextFragment();if(!this.fragment)return null;for(;;){let e=this.trees.length-1;if(e<0)return this.nextFragment(),null;let s=this.trees[e],i=this.index[e];if(i==s.children.length){this.trees.pop(),this.start.pop(),this.index.pop();continue}let h=s.children[i],r=this.start[e]+s.positions[i];if(r>t)return this.nextStart=r,null;if(h instanceof b){if(r==t){if(r<this.safeFrom)return null;let n=r+h.length;if(n<=this.safeTo){let o=h.prop(v.lookAhead);if(!o||n+o<this.fragment.to)return h}}this.index[e]++,r+h.length>=Math.max(this.safeFrom,t)&&(this.trees.push(h),this.start.push(r),this.index.push(0))}else this.index[e]++,this.nextStart=r+h.length}}},B=class{constructor(t,e){this.stream=e,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=t.tokenizers.map(s=>new x)}getActions(t){let e=0,s=null,{parser:i}=t.p,{tokenizers:h}=i,r=i.stateSlot(t.state,3),n=t.curContext?t.curContext.hash:0,o=0;for(let a=0;a<h.length;a++){if((1<<a&r)==0)continue;let u=h[a],f=this.tokens[a];if(!(s&&!u.fallback)&&((u.contextual||f.start!=t.pos||f.mask!=r||f.context!=n)&&(this.updateCachedToken(f,u,t),f.mask=r,f.context=n),f.lookAhead>f.end+25&&(o=Math.max(f.lookAhead,o)),f.value!=0)){let d=e;if(f.extended>-1&&(e=this.addActions(t,f.extended,f.end,e)),e=this.addActions(t,f.value,f.end,e),!u.extend&&(s=f,e>d))break}}for(;this.actions.length>e;)this.actions.pop();return o&&t.setLookAhead(o),!s&&t.pos==this.stream.end&&(s=new x,s.value=t.p.parser.eofTerm,s.start=s.end=t.pos,e=this.addActions(t,s.value,s.end,e)),this.mainToken=s,this.actions}getMainToken(t){if(this.mainToken)return this.mainToken;let e=new x,{pos:s,p:i}=t;return e.start=s,e.end=Math.min(s+1,i.stream.end),e.value=s==i.stream.end?i.parser.eofTerm:0,e}updateCachedToken(t,e,s){let i=this.stream.clipPos(s.pos);if(e.token(this.stream.reset(i,t),s),t.value>-1){let{parser:h}=s.p;for(let r=0;r<h.specialized.length;r++)if(h.specialized[r]==t.value){let n=h.specializers[r](this.stream.read(t.start,t.end),s);if(n>=0&&s.p.parser.dialect.allows(n>>1)){(n&1)==0?t.value=n>>1:t.extended=n>>1;break}}}else t.value=0,t.end=this.stream.clipPos(i+1)}putAction(t,e,s,i){for(let h=0;h<i;h+=3)if(this.actions[h]==t)return i;return this.actions[i++]=t,this.actions[i++]=e,this.actions[i++]=s,i}addActions(t,e,s,i){let{state:h}=t,{parser:r}=t.p,{data:n}=r;for(let o=0;o<2;o++)for(let a=r.stateSlot(h,o?2:1);;a+=3){if(n[a]==65535)if(n[a+1]==1)a=k(n,a+2);else{i==0&&n[a+1]==2&&(i=this.putAction(k(n,a+2),e,s,i));break}n[a]==e&&(i=this.putAction(k(n,a+1),e,s,i))}return i}},D=class{constructor(t,e,s,i){this.parser=t,this.input=e,this.ranges=i,this.recovering=0,this.nextStackID=9812,this.minStackPos=0,this.reused=[],this.stoppedAt=null,this.lastBigReductionStart=-1,this.lastBigReductionSize=0,this.bigReductionCount=0,this.stream=new R(e,i),this.tokens=new B(t,this.stream),this.topTerm=t.top[1];let{from:h}=i[0];this.stacks=[C.start(this,t.top[0],h)],this.fragments=s.length&&this.stream.end-h>t.bufferLength*4?new I(s,t.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let t=this.stacks,e=this.minStackPos,s=this.stacks=[],i,h;if(this.bigReductionCount>300&&t.length==1){let[r]=t;for(;r.forceReduce()&&r.stack.length&&r.stack[r.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let r=0;r<t.length;r++){let n=t[r];for(;;){if(this.tokens.mainToken=null,n.pos>e)s.push(n);else{if(this.advanceStack(n,s,t))continue;{i||(i=[],h=[]),i.push(n);let o=this.tokens.getMainToken(n);h.push(o.value,o.end)}}break}}if(!s.length){let r=i&&Y(i);if(r)return g&&console.log("Finish with "+this.stackID(r)),this.stackToTree(r);if(this.parser.strict)throw g&&i&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+e);this.recovering||(this.recovering=5)}if(this.recovering&&i){let r=this.stoppedAt!=null&&i[0].pos>this.stoppedAt?i[0]:this.runRecovery(i,h,s);if(r)return g&&console.log("Force-finish "+this.stackID(r)),this.stackToTree(r.forceAll())}if(this.recovering){let r=this.recovering==1?1:this.recovering*3;if(s.length>r)for(s.sort((n,o)=>o.score-n.score);s.length>r;)s.pop();s.some(n=>n.reducePos>e)&&this.recovering--}else if(s.length>1){t:for(let r=0;r<s.length-1;r++){let n=s[r];for(let o=r+1;o<s.length;o++){let a=s[o];if(n.sameState(a)||n.buffer.length>500&&a.buffer.length>500)if((n.score-a.score||n.buffer.length-a.buffer.length)>0)s.splice(o--,1);else{s.splice(r--,1);continue t}}}s.length>12&&(s.sort((r,n)=>n.score-r.score),s.splice(12,s.length-12))}this.minStackPos=s[0].pos;for(let r=1;r<s.length;r++)s[r].pos<this.minStackPos&&(this.minStackPos=s[r].pos);return null}stopAt(t){if(this.stoppedAt!=null&&this.stoppedAt<t)throw new RangeError("Can't move stoppedAt forward");this.stoppedAt=t}advanceStack(t,e,s){let i=t.pos,{parser:h}=this,r=g?this.stackID(t)+" -> ":"";if(this.stoppedAt!=null&&i>this.stoppedAt)return t.forceReduce()?t:null;if(this.fragments){let a=t.curContext&&t.curContext.tracker.strict,u=a?t.curContext.hash:0;for(let f=this.fragments.nodeAt(i);f;){let d=this.parser.nodeSet.types[f.type.id]==f.type?h.getGoto(t.state,f.type.id):-1;if(d>-1&&f.length&&(!a||(f.prop(v.contextHash)||0)==u))return t.useNode(f,d),g&&console.log(r+this.stackID(t)+` (via reuse of ${h.getName(f.type.id)})`),!0;if(!(f instanceof b)||f.children.length==0||f.positions[0]>0)break;let c=f.children[0];if(c instanceof b&&f.positions[0]==0)f=c;else break}}let n=h.stateSlot(t.state,4);if(n>0)return t.reduce(n),g&&console.log(r+this.stackID(t)+` (via always-reduce ${h.getName(n&65535)})`),!0;if(t.stack.length>=8400)for(;t.stack.length>6e3&&t.forceReduce(););let o=this.tokens.getActions(t);for(let a=0;a<o.length;){let u=o[a++],f=o[a++],d=o[a++],c=a==o.length||!s,p=c?t:t.split(),P=this.tokens.mainToken;if(p.apply(u,f,P?P.start:p.pos,d),g&&console.log(r+this.stackID(p)+` (via ${(u&65536)==0?"shift":`reduce of ${h.getName(u&65535)}`} for ${h.getName(f)} @ ${i}${p==t?"":", split"})`),c)return!0;p.pos>i?e.push(p):s.push(p)}return!1}advanceFully(t,e){let s=t.pos;for(;;){if(!this.advanceStack(t,null,null))return!1;if(t.pos>s)return H(t,e),!0}}runRecovery(t,e,s){let i=null,h=!1;for(let r=0;r<t.length;r++){let n=t[r],o=e[r<<1],a=e[(r<<1)+1],u=g?this.stackID(n)+" -> ":"";if(n.deadEnd&&(h||(h=!0,n.restart(),g&&console.log(u+this.stackID(n)+" (restarted)"),this.advanceFully(n,s))))continue;let f=n.split(),d=u;for(let c=0;c<10&&f.forceReduce()&&(g&&console.log(d+this.stackID(f)+" (via force-reduce)"),!this.advanceFully(f,s));c++)g&&(d=this.stackID(f)+" -> ");for(let c of n.recoverByInsert(o))g&&console.log(u+this.stackID(c)+" (via recover-insert)"),this.advanceFully(c,s);this.stream.end>n.pos?(a==n.pos&&(a++,o=0),n.recoverByDelete(o,a),g&&console.log(u+this.stackID(n)+` (via recover-delete ${this.parser.getName(o)})`),H(n,s)):(!i||i.score<f.score)&&(i=f)}return i}stackToTree(t){return t.close(),b.build({buffer:N.create(t),nodeSet:this.parser.nodeSet,topID:this.topTerm,maxBufferLength:this.parser.bufferLength,reused:this.reused,start:this.ranges[0].from,length:t.pos-this.ranges[0].from,minRepeatType:this.parser.minRepeatTerm})}stackID(t){let e=(w||(w=new WeakMap)).get(t);return e||w.set(t,e=String.fromCodePoint(this.nextStackID++)),e+t}};function H(l,t){for(let e=0;e<t.length;e++){let s=t[e];if(s.pos==l.pos&&s.sameState(l)){t[e].score<l.score&&(t[e]=l);return}}t.push(l)}var O=class{constructor(t,e,s){this.source=t,this.flags=e,this.disabled=s}allows(t){return!this.disabled||this.disabled[t]==0}},y=l=>l,W=class{constructor(t){this.start=t.start,this.shift=t.shift||y,this.reduce=t.reduce||y,this.reuse=t.reuse||y,this.hash=t.hash||(()=>0),this.strict=t.strict!==!1}},q=class l extends L{constructor(t){if(super(),this.wrappers=[],t.version!=14)throw new RangeError(`Parser version (${t.version}) doesn't match runtime version (14)`);let e=t.nodeNames.split(" ");this.minRepeatTerm=e.length;for(let n=0;n<t.repeatNodeCount;n++)e.push("");let s=Object.keys(t.topRules).map(n=>t.topRules[n][1]),i=[];for(let n=0;n<e.length;n++)i.push([]);function h(n,o,a){i[n].push([o,o.deserialize(String(a))])}if(t.nodeProps)for(let n of t.nodeProps){let o=n[0];typeof o=="string"&&(o=v[o]);for(let a=1;a<n.length;){let u=n[a++];if(u>=0)h(u,o,n[a++]);else{let f=n[a+-u];for(let d=-u;d>0;d--)h(n[a++],o,f);a++}}}this.nodeSet=new M(e.map((n,o)=>F.define({name:o>=this.minRepeatTerm?void 0:n,id:o,props:i[o],top:s.indexOf(o)>-1,error:o==0,skipped:t.skippedNodes&&t.skippedNodes.indexOf(o)>-1}))),t.propSources&&(this.nodeSet=this.nodeSet.extend(...t.propSources)),this.strict=!1,this.bufferLength=1024;let r=S(t.tokenData);this.context=t.context,this.specializerSpecs=t.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let n=0;n<this.specializerSpecs.length;n++)this.specialized[n]=this.specializerSpecs[n].term;this.specializers=this.specializerSpecs.map(J),this.states=S(t.states,Uint32Array),this.data=S(t.stateData),this.goto=S(t.goto),this.maxTerm=t.maxTerm,this.tokenizers=t.tokenizers.map(n=>typeof n=="number"?new m(r,n):n),this.topRules=t.topRules,this.dialects=t.dialects||{},this.dynamicPrecedences=t.dynamicPrecedences||null,this.tokenPrecTable=t.tokenPrec,this.termNames=t.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(t,e,s){let i=new D(this,t,e,s);for(let h of this.wrappers)i=h(i,t,e,s);return i}getGoto(t,e,s=!1){let i=this.goto;if(e>=i[0])return-1;for(let h=i[e+1];;){let r=i[h++],n=r&1,o=i[h++];if(n&&s)return o;for(let a=h+(r>>1);h<a;h++)if(i[h]==t)return o;if(n)return-1}}hasAction(t,e){let s=this.data;for(let i=0;i<2;i++)for(let h=this.stateSlot(t,i?2:1),r;;h+=3){if((r=s[h])==65535)if(s[h+1]==1)r=s[h=k(s,h+2)];else{if(s[h+1]==2)return k(s,h+2);break}if(r==e||r==0)return k(s,h+1)}return 0}stateSlot(t,e){return this.states[t*6+e]}stateFlag(t,e){return(this.stateSlot(t,0)&e)>0}validAction(t,e){return!!this.allActions(t,s=>s==e?!0:null)}allActions(t,e){let s=this.stateSlot(t,4),i=s?e(s):void 0;for(let h=this.stateSlot(t,1);i==null;h+=3){if(this.data[h]==65535)if(this.data[h+1]==1)h=k(this.data,h+2);else break;i=e(k(this.data,h+1))}return i}nextStates(t){let e=[];for(let s=this.stateSlot(t,1);;s+=3){if(this.data[s]==65535)if(this.data[s+1]==1)s=k(this.data,s+2);else break;if((this.data[s+2]&1)==0){let i=this.data[s+1];e.some((h,r)=>r&1&&h==i)||e.push(this.data[s],i)}}return e}configure(t){let e=Object.assign(Object.create(l.prototype),this);if(t.props&&(e.nodeSet=this.nodeSet.extend(...t.props)),t.top){let s=this.topRules[t.top];if(!s)throw new RangeError(`Invalid top rule name ${t.top}`);e.top=s}return t.tokenizers&&(e.tokenizers=this.tokenizers.map(s=>{let i=t.tokenizers.find(h=>h.from==s);return i?i.to:s})),t.specializers&&(e.specializers=this.specializers.slice(),e.specializerSpecs=this.specializerSpecs.map((s,i)=>{let h=t.specializers.find(n=>n.from==s.external);if(!h)return s;let r=Object.assign(Object.assign({},s),{external:h.to});return e.specializers[i]=J(r),r})),t.contextTracker&&(e.context=t.contextTracker),t.dialect&&(e.dialect=this.parseDialect(t.dialect)),t.strict!=null&&(e.strict=t.strict),t.wrap&&(e.wrappers=e.wrappers.concat(t.wrap)),t.bufferLength!=null&&(e.bufferLength=t.bufferLength),e}hasWrappers(){return this.wrappers.length>0}getName(t){return this.termNames?this.termNames[t]:String(t<=this.maxNode&&this.nodeSet.types[t].name||t)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(t){let e=this.dynamicPrecedences;return e==null?0:e[t]||0}parseDialect(t){let e=Object.keys(this.dialects),s=e.map(()=>!1);if(t)for(let h of t.split(" ")){let r=e.indexOf(h);r>=0&&(s[r]=!0)}let i=null;for(let h=0;h<e.length;h++)if(!s[h])for(let r=this.dialects[e[h]],n;(n=this.data[r++])!=65535;)(i||(i=new Uint8Array(this.maxTerm+1)))[n]=1;return new O(t,s,i)}static deserialize(t){return new l(t)}};function k(l,t){return l[t]|l[t+1]<<16}function Y(l){let t=null;for(let e of l){let s=e.p.stoppedAt;(e.pos==e.p.stream.end||s!=null&&e.pos>s)&&e.p.parser.stateFlag(e.state,2)&&(!t||t.score<e.score)&&(t=e)}return t}function J(l){if(l.external){let t=l.extend?1:0;return(e,s)=>l.external(e,s)<<1|t}return l.get}export{z as a,E as b,W as c,q as d};