@sync-in/server 1.3.9 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (99) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/README.md +3 -2
  3. package/environment/environment.dist.yaml +2 -0
  4. package/package.json +2 -2
  5. package/server/app.bootstrap.js +9 -0
  6. package/server/app.bootstrap.js.map +1 -1
  7. package/server/app.service.spec.js +44 -19
  8. package/server/app.service.spec.js.map +1 -1
  9. package/server/applications/files/constants/files.js +0 -23
  10. package/server/applications/files/constants/files.js.map +1 -1
  11. package/server/applications/files/constants/only-office.js +8 -0
  12. package/server/applications/files/constants/only-office.js.map +1 -1
  13. package/server/applications/files/files.config.js +5 -0
  14. package/server/applications/files/files.config.js.map +1 -1
  15. package/server/applications/files/guards/files-only-office.strategy.js +0 -1
  16. package/server/applications/files/guards/files-only-office.strategy.js.map +1 -1
  17. package/server/applications/spaces/guards/space.guard.spec.js +153 -18
  18. package/server/applications/spaces/guards/space.guard.spec.js.map +1 -1
  19. package/server/applications/spaces/services/spaces-browser.service.js +7 -7
  20. package/server/applications/spaces/services/spaces-browser.service.js.map +1 -1
  21. package/server/applications/spaces/services/spaces-manager.service.js +17 -17
  22. package/server/applications/spaces/services/spaces-manager.service.js.map +1 -1
  23. package/server/applications/sync/utils/routes.js +1 -1
  24. package/server/applications/sync/utils/routes.js.map +1 -1
  25. package/server/applications/users/guards/permissions.guard.js +4 -4
  26. package/server/applications/users/guards/permissions.guard.js.map +1 -1
  27. package/server/applications/users/guards/permissions.guard.spec.js +6 -6
  28. package/server/applications/users/guards/permissions.guard.spec.js.map +1 -1
  29. package/server/applications/users/guards/roles.guard.js +1 -1
  30. package/server/applications/users/guards/roles.guard.js.map +1 -1
  31. package/server/applications/users/models/user.model.js +1 -1
  32. package/server/applications/users/models/user.model.js.map +1 -1
  33. package/server/authentication/guards/auth-basic.guard.spec.js +38 -2
  34. package/server/authentication/guards/auth-basic.guard.spec.js.map +1 -1
  35. package/server/authentication/guards/auth-basic.strategy.js +0 -1
  36. package/server/authentication/guards/auth-basic.strategy.js.map +1 -1
  37. package/server/authentication/guards/auth-local.guard.spec.js +7 -5
  38. package/server/authentication/guards/auth-local.guard.spec.js.map +1 -1
  39. package/server/authentication/guards/auth-local.strategy.js +0 -1
  40. package/server/authentication/guards/auth-local.strategy.js.map +1 -1
  41. package/server/authentication/guards/auth-token-access.guard.spec.js +30 -0
  42. package/server/authentication/guards/auth-token-access.guard.spec.js.map +1 -1
  43. package/server/authentication/guards/auth-token-access.strategy.js +0 -1
  44. package/server/authentication/guards/auth-token-access.strategy.js.map +1 -1
  45. package/server/authentication/guards/auth-token-refresh.strategy.js +0 -1
  46. package/server/authentication/guards/auth-token-refresh.strategy.js.map +1 -1
  47. package/server/authentication/services/auth-methods/auth-method-database.service.js +1 -1
  48. package/server/authentication/services/auth-methods/auth-method-database.service.js.map +1 -1
  49. package/server/authentication/services/auth-methods/auth-method-database.service.spec.js +8 -6
  50. package/server/authentication/services/auth-methods/auth-method-database.service.spec.js.map +1 -1
  51. package/server/authentication/services/auth-methods/auth-method-ldap.service.js +2 -2
  52. package/server/authentication/services/auth-methods/auth-method-ldap.service.js.map +1 -1
  53. package/server/authentication/services/auth-methods/auth-method-ldap.service.spec.js +500 -5
  54. package/server/authentication/services/auth-methods/auth-method-ldap.service.spec.js.map +1 -1
  55. package/server/configuration/config.loader.js +0 -3
  56. package/server/configuration/config.loader.js.map +1 -1
  57. package/server/infrastructure/context/services/context-manager.service.spec.js +98 -0
  58. package/server/infrastructure/context/services/context-manager.service.spec.js.map +1 -0
  59. package/server/infrastructure/database/constants.js +0 -1
  60. package/server/infrastructure/database/constants.js.map +1 -1
  61. package/server/infrastructure/database/scripts/seed/usersgroups.js +3 -3
  62. package/server/infrastructure/database/scripts/seed/usersgroups.js.map +1 -1
  63. package/server/infrastructure/mailer/mailer.service.js +20 -19
  64. package/server/infrastructure/mailer/mailer.service.js.map +1 -1
  65. package/server/infrastructure/mailer/mailer.service.spec.js +176 -0
  66. package/server/infrastructure/mailer/mailer.service.spec.js.map +1 -0
  67. package/static/{chunk-KFM544CA.js → chunk-3GC2BQZD.js} +1 -1
  68. package/static/{chunk-MWFRZBJD.js → chunk-5YKWZT33.js} +1 -1
  69. package/static/{chunk-XUZSYWRF.js → chunk-6F55D74O.js} +1 -1
  70. package/static/{chunk-ZFKCGL6X.js → chunk-B2Y2RNFP.js} +1 -1
  71. package/static/{chunk-PYSFXLMV.js → chunk-C23BPTJZ.js} +1 -1
  72. package/static/{chunk-FJFNDK67.js → chunk-DGVNNICG.js} +1 -1
  73. package/static/{chunk-SRLMFJ7C.js → chunk-FQ4AFNGE.js} +1 -1
  74. package/static/{chunk-Z5X7LVMZ.js → chunk-GBCYYDCI.js} +1 -1
  75. package/static/{chunk-MK7WZG3F.js → chunk-HZA7R43P.js} +1 -1
  76. package/static/{chunk-HUWQHCUX.js → chunk-KZQCFEPT.js} +1 -1
  77. package/static/{chunk-S5WXHO6D.js → chunk-LJIGRUEF.js} +1 -1
  78. package/static/{chunk-4KESSWTF.js → chunk-MOVWEZ7J.js} +1 -1
  79. package/static/{chunk-LYTD6AJE.js → chunk-N2LYWNTC.js} +1 -1
  80. package/static/{chunk-NV2MEIWP.js → chunk-PF4K7MVG.js} +1 -1
  81. package/static/{chunk-SKDQM65G.js → chunk-PY3BGNJN.js} +1 -1
  82. package/static/{chunk-QTW62OKJ.js → chunk-T55FAU2O.js} +1 -1
  83. package/static/{chunk-N3T57OCA.js → chunk-TCFKH6K6.js} +1 -1
  84. package/static/{chunk-3FX6ISDY.js → chunk-TDQAEVZN.js} +1 -1
  85. package/static/{chunk-O4AQBQBF.js → chunk-TNW2CGK6.js} +1 -1
  86. package/static/{chunk-3S4WNZ2T.js → chunk-TXPODW5Q.js} +1 -1
  87. package/static/{chunk-BW5PQAKK.js → chunk-VHYIXL7R.js} +1 -1
  88. package/static/{chunk-CLSVDV7J.js → chunk-VMQMD36Z.js} +1 -1
  89. package/static/{chunk-O67RFAWU.js → chunk-VMUOUCEI.js} +1 -1
  90. package/static/{chunk-WLPYIJFI.js → chunk-W3QXNDI5.js} +1 -1
  91. package/static/{chunk-AY2GOSJ2.js → chunk-WHMS3PJ3.js} +1 -1
  92. package/static/{chunk-4TEHM3AS.js → chunk-WWIC7UW3.js} +1 -1
  93. package/static/{chunk-LB7B5RIV.js → chunk-X43VWRFP.js} +1 -1
  94. package/static/{chunk-WL65GYD5.js → chunk-Y2CDUS4J.js} +2 -2
  95. package/static/{chunk-ZTXJC5IC.js → chunk-YCINY2YI.js} +1 -1
  96. package/static/index.html +2 -2
  97. package/static/{main-RREKR34B.js → main-7LDKYVXO.js} +3 -3
  98. package/static/styles-FYUSO6OJ.css +1 -0
  99. package/static/styles-3DONJ2Z4.css +0 -1
@@ -1,4 +1,4 @@
1
- import{a as m1}from"./chunk-ZFKCGL6X.js";import{c as d1}from"./chunk-JXZCNFW7.js";import{a as r1}from"./chunk-LB7B5RIV.js";import{a as n1,b as o1,c as a1,d as s1,e as l1,f as Qt,i as c1}from"./chunk-BW5PQAKK.js";import{b as u1,c as Jt,d as h1,e as Zt}from"./chunk-4TEHM3AS.js";import{a as f1,d as Et,g as ct}from"./chunk-ZTXJC5IC.js";import{f as Xt}from"./chunk-4KESSWTF.js";import{Aa as Yn,Ba as Xn,Gb as Yt,Hb as W,Ib as st,Ja as nt,La as rt,Ma as Qn,O as Ve,Za as Ii,f as Rn,ib as Jn,kb as ot,lb as at,mb as Z,nb as Me,pb as Zn,wb as U,xb as e1,za as Kn,zb as t1}from"./chunk-WL65GYD5.js";import{c as Ne,d as p1,h as He,m as lt}from"./chunk-ZZ3LHYOY.js";import{d as An}from"./chunk-XE5YHU5J.js";import{$ as gn,$b as St,$c as Dn,Ab as xn,Ac as Ee,C as mn,Cb as b,Db as En,Dc as ke,Eb as u,Ed as In,Fb as Mn,Fd as ae,Ga as kt,Gb as Nn,Gf as Gn,Hb as yt,Hc as Ln,Ib as Vt,If as $n,Jb as _e,Jd as Pn,Je as Hn,Kb as xe,L as Ke,La as Mi,Lb as Ai,Ma as l,Mb as Pe,Mc as Ti,Na as Ni,Nb as q,Ob as Qe,Oc as jt,Pb as p,Qa as Xe,Qb as k,Rb as J,Re as Bn,Rf as qn,Sa as wi,Tb as Je,Ub as Ze,Vb as et,Wf as Wn,X as vn,Xa as D,Xb as tt,Xc as On,Ya as Cn,Za as Te,Zb as Di,Zc as oe,_a as yn,_b as Fe,_e as jn,ab as z,ad as Ut,bb as j,bc as wn,bf as Kt,ca as ye,cb as zi,cc as Ht,cg as i1,da as bn,dc as fe,ec as Bt,ed as Gt,f as pn,fc as _t,ha as h,hc as xt,jb as L,jd as $t,kb as O,ke as Fn,kf as Un,ma as _,na as x,nb as Sn,ob as _n,pb as f,pe as kn,qb as c,rb as d,sb as g,se as Vn,tb as Li,td as qt,u as hn,ub as Oi,v as Ei,va as Ft,wb as Ie,wd as Wt,xb as Re,xd as Tn,ya as Ye,yb as Se,yd as it,zb as F,zc as zn}from"./chunk-RSNLYAN6.js";import{a as Q,b as De}from"./chunk-RTRJ3KFH.js";var C0={prefix:"far",iconName:"bell",icon:[448,512,[128276,61602],"f0f3","M224 0c-13.3 0-24 10.7-24 24l0 9.7C118.6 45.3 56 115.4 56 200l0 14.5c0 37.7-10 74.7-29 107.3L5.1 359.2C1.8 365 0 371.5 0 378.2 0 399.1 16.9 416 37.8 416l372.4 0c20.9 0 37.8-16.9 37.8-37.8 0-6.7-1.8-13.3-5.1-19L421 321.7c-19-32.6-29-69.6-29-107.3l0-14.5c0-84.6-62.6-154.7-144-166.3l0-9.7c0-13.3-10.7-24-24-24zM392.4 368l-336.9 0 12.9-22.1C91.7 306 104 260.6 104 214.5l0-14.5c0-66.3 53.7-120 120-120s120 53.7 120 120l0 14.5c0 46.2 12.3 91.5 35.5 131.4L392.4 368zM156.1 464c9.9 28 36.6 48 67.9 48s58-20 67.9-48l-135.8 0z"]};var Ar={prefix:"far",iconName:"file-zipper",icon:[384,512,["file-archive"],"f1c6","M64 48l112 0 0 88c0 39.8 32.2 72 72 72l88 0 0 240c0 8.8-7.2 16-16 16L64 464c-8.8 0-16-7.2-16-16L48 64c0-8.8 7.2-16 16-16zM224 67.9l92.1 92.1-68.1 0c-13.3 0-24-10.7-24-24l0-68.1zM64 0C28.7 0 0 28.7 0 64L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-261.5c0-17-6.7-33.3-18.7-45.3L242.7 18.7C230.7 6.7 214.5 0 197.5 0L64 0zM80 104c0 13.3 10.7 24 24 24l16 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-16 0c-13.3 0-24 10.7-24 24zm0 80c0 13.3 10.7 24 24 24l32 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-32 0c-13.3 0-24 10.7-24 24zm64 56l-32 0c-17.7 0-32 14.3-32 32l0 48c0 26.5 21.5 48 48 48s48-21.5 48-48l0-48c0-17.7-14.3-32-32-32zm-16 64a16 16 0 1 1 0 32 16 16 0 1 1 0-32z"]},y0=Ar;var S0={prefix:"far",iconName:"clock",icon:[512,512,[128339,"clock-four"],"f017","M464 256a208 208 0 1 1 -416 0 208 208 0 1 1 416 0zM0 256a256 256 0 1 0 512 0 256 256 0 1 0 -512 0zM232 120l0 136c0 8 4 15.5 10.7 20l96 64c11 7.4 25.9 4.4 33.3-6.7s4.4-25.9-6.7-33.3L280 243.2 280 120c0-13.3-10.7-24-24-24s-24 10.7-24 24z"]};var ei={prefix:"far",iconName:"file",icon:[384,512,[128196,128459,61462],"f15b","M176 48L64 48c-8.8 0-16 7.2-16 16l0 384c0 8.8 7.2 16 16 16l256 0c8.8 0 16-7.2 16-16l0-240-88 0c-39.8 0-72-32.2-72-72l0-88zM316.1 160L224 67.9 224 136c0 13.3 10.7 24 24 24l68.1 0zM0 64C0 28.7 28.7 0 64 0L197.5 0c17 0 33.3 6.7 45.3 18.7L365.3 141.3c12 12 18.7 28.3 18.7 45.3L384 448c0 35.3-28.7 64-64 64L64 512c-35.3 0-64-28.7-64-64L0 64z"]};var _0={prefix:"far",iconName:"trash-can",icon:[448,512,[61460,"trash-alt"],"f2ed","M166.2-16c-13.3 0-25.3 8.3-30 20.8L120 48 24 48C10.7 48 0 58.7 0 72S10.7 96 24 96l400 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-96 0-16.2-43.2C307.1-7.7 295.2-16 281.8-16L166.2-16zM32 144l0 304c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-304-48 0 0 304c0 8.8-7.2 16-16 16L96 464c-8.8 0-16-7.2-16-16l0-304-48 0zm160 72c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 176c0 13.3 10.7 24 24 24s24-10.7 24-24l0-176zm112 0c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 176c0 13.3 10.7 24 24 24s24-10.7 24-24l0-176z"]};var x0={prefix:"far",iconName:"user",icon:[448,512,[128100,62144,62470,"user-alt","user-large"],"f007","M144 128a80 80 0 1 1 160 0 80 80 0 1 1 -160 0zm208 0a128 128 0 1 0 -256 0 128 128 0 1 0 256 0zM48 480c0-70.7 57.3-128 128-128l96 0c70.7 0 128 57.3 128 128l0 8c0 13.3 10.7 24 24 24s24-10.7 24-24l0-8c0-97.2-78.8-176-176-176l-96 0C78.8 304 0 382.8 0 480l0 8c0 13.3 10.7 24 24 24s24-10.7 24-24l0-8z"]};var E0={prefix:"far",iconName:"file-lines",icon:[384,512,[128441,128462,61686,"file-alt","file-text"],"f15c","M64 48l112 0 0 88c0 39.8 32.2 72 72 72l88 0 0 240c0 8.8-7.2 16-16 16L64 464c-8.8 0-16-7.2-16-16L48 64c0-8.8 7.2-16 16-16zM224 67.9l92.1 92.1-68.1 0c-13.3 0-24-10.7-24-24l0-68.1zM64 0C28.7 0 0 28.7 0 64L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-261.5c0-17-6.7-33.3-18.7-45.3L242.7 18.7C230.7 6.7 214.5 0 197.5 0L64 0zm56 256c-13.3 0-24 10.7-24 24s10.7 24 24 24l144 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-144 0zm0 96c-13.3 0-24 10.7-24 24s10.7 24 24 24l144 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-144 0z"]};var M0={prefix:"far",iconName:"comment-dots",icon:[512,512,[128172,62075,"commenting"],"f4ad","M0 240c0 54.4 19.3 104.6 51.9 144.9L3.1 474.3c-2 3.7-3.1 7.9-3.1 12.2 0 14.1 11.4 25.5 25.5 25.5 4 0 7.8-.6 11.5-2.1L153.4 460c31.4 12.9 66.1 20 102.6 20 141.4 0 256-107.5 256-240S397.4 0 256 0 0 107.5 0 240zM94 407.9c9.3-17.1 7.4-38.1-4.8-53.2-26.1-32.3-41.2-71.9-41.2-114.7 0-103.2 90.2-192 208-192s208 88.8 208 192-90.2 192-208 192c-30.2 0-58.7-5.9-84.3-16.4-11.9-4.9-25.3-4.8-37.1 .3L76 440.9 94 407.9zM144 272a32 32 0 1 0 0-64 32 32 0 1 0 0 64zm144-32a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zm80 32a32 32 0 1 0 0-64 32 32 0 1 0 0 64z"]};var N0={prefix:"far",iconName:"flag",icon:[448,512,[127988,61725],"f024","M48 24C48 10.7 37.3 0 24 0S0 10.7 0 24L0 488c0 13.3 10.7 24 24 24s24-10.7 24-24l0-100 80.3-20.1c41.1-10.3 84.6-5.5 122.5 13.4 44.2 22.1 95.5 24.8 141.7 7.4l34.7-13c12.5-4.7 20.8-16.6 20.8-30l0-279.7c0-23-24.2-38-44.8-27.7l-9.6 4.8c-46.3 23.2-100.8 23.2-147.1 0-35.1-17.6-75.4-22-113.5-12.5L48 52 48 24zm0 77.5l96.6-24.2c27-6.7 55.5-3.6 80.4 8.8 54.9 27.4 118.7 29.7 175 6.8l0 241.8-24.4 9.1c-33.7 12.6-71.2 10.7-103.4-5.4-48.2-24.1-103.3-30.1-155.6-17.1l-68.6 17.2 0-237z"]};var w0={prefix:"far",iconName:"window-restore",icon:[576,512,[],"f2d2","M512 80L224 80c-8.8 0-16 7.2-16 16l0 16-48 0 0-16c0-35.3 28.7-64 64-64l288 0c35.3 0 64 28.7 64 64l0 192c0 35.3-28.7 64-64 64l-48 0 0-48 48 0c8.8 0 16-7.2 16-16l0-192c0-8.8-7.2-16-16-16zM368 288l-320 0 0 128c0 8.8 7.2 16 16 16l288 0c8.8 0 16-7.2 16-16l0-128zM64 160l288 0c35.3 0 64 28.7 64 64l0 192c0 35.3-28.7 64-64 64L64 480c-35.3 0-64-28.7-64-64L0 224c0-35.3 28.7-64 64-64z"]};var v1={prefix:"far",iconName:"folder-closed",icon:[512,512,[],"e185","M448 400L64 400c-8.8 0-16-7.2-16-16l0-144 416 0 0 144c0 8.8-7.2 16-16 16zm16-208l-416 0 0-96c0-8.8 7.2-16 16-16l138.7 0c3.5 0 6.8 1.1 9.6 3.2L250.7 112c13.8 10.4 30.7 16 48 16L448 128c8.8 0 16 7.2 16 16l0 48zM64 448l384 0c35.3 0 64-28.7 64-64l0-240c0-35.3-28.7-64-64-64L298.7 80c-6.9 0-13.7-2.2-19.2-6.4L241.1 44.8C230 36.5 216.5 32 202.7 32L64 32C28.7 32 0 60.7 0 96L0 384c0 35.3 28.7 64 64 64z"]};var g1=(()=>{let e=class e{transform(i,r=0,o=void 0){return rt(i,r,o)}};e.\u0275fac=function(r){return new(r||e)},e.\u0275pipe=yn({name:"pathSlice",type:e,pure:!0});let t=e;return t})();var ki=function(t,e){return ki=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var r in i)i.hasOwnProperty(r)&&(n[r]=i[r])},ki(t,e)};function z1(t,e){ki(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}var K=function(){return K=Object.assign||function(e){for(var n,i=1,r=arguments.length;i<r;i++){n=arguments[i];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},K.apply(this,arguments)};function L1(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var i=n.call(t),r,o=[],a;try{for(;(e===void 0||e-- >0)&&!(r=i.next()).done;)o.push(r.value)}catch(s){a={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(a)throw a.error}}return o}function Vi(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(L1(arguments[e]));return t}var Dr="An invariant failed, however the error is obfuscated because this is an production build.",ni=[];Object.freeze(ni);var $i={};Object.freeze($i);var Tr={};function Hi(){return typeof window<"u"?window:typeof global<"u"?global:Tr}function Y(){return++v.mobxGuid}function T(t){throw Nt(!1,t),"X"}function Nt(t,e){if(!t)throw new Error("[mobx] "+(e||Dr))}var b1=[];function he(t,e){return!1}function qi(t){var e=!1;return function(){if(!e)return e=!0,t.apply(this,arguments)}}var C1=function(){};function Ir(t){var e=[];return t.forEach(function(n){e.indexOf(n)===-1&&e.push(n)}),e}function Wi(t){return t!==null&&typeof t=="object"}function pt(t){if(t===null||typeof t!="object")return!1;var e=Object.getPrototypeOf(t);return e===Object.prototype||e===null}function Rr(t){return ht(t)||qe(t)?t:Array.isArray(t)?new Map(t):pt(t)?new Map(Object.entries(t)):T("Cannot convert to map from '"+t+"'")}function Pr(t,e){for(var n=0;n<e.length;n++)Ge(t,e[n],t[e[n]])}function Ge(t,e,n){Object.defineProperty(t,e,{enumerable:!1,writable:!0,configurable:!0,value:n})}function Ot(t,e,n){Object.defineProperty(t,e,{enumerable:!1,writable:!1,configurable:!0,value:n})}function Oe(t,e){var n="isMobX"+t;return e.prototype[n]=!0,function(i){return Wi(i)&&i[n]===!0}}function Fr(t,e){return typeof t=="number"&&typeof e=="number"&&isNaN(t)&&isNaN(e)}function ht(t){return Hi().Map!==void 0&&t instanceof Hi().Map}function At(t){return t instanceof Set}function ft(t){for(var e=[];;){var n=t.next();if(n.done)break;e.push(n.value)}return e}function O1(){return typeof Symbol=="function"&&Symbol.toPrimitive||"@@toPrimitive"}function A1(t){return t===null?null:typeof t=="object"?""+t:t}function Ki(){return typeof Symbol=="function"&&Symbol.iterator||"@@iterator"}function Yi(t,e){Ot(t,Ki(),e)}function wt(t){return t[Ki()]=kr,t}function Xi(){return typeof Symbol=="function"&&Symbol.toStringTag||"@@toStringTag"}function kr(){return this}var ci=(function(){function t(e){e===void 0&&(e="Atom@"+Y()),this.name=e,this.isPendingUnobservation=!1,this.isBeingObserved=!1,this.observers=[],this.observersIndexes={},this.diffValue=0,this.lastAccessedBy=0,this.lowestObserverState=w.NOT_TRACKING}return t.prototype.onBecomeUnobserved=function(){},t.prototype.onBecomeObserved=function(){},t.prototype.reportObserved=function(){return $1(this)},t.prototype.reportChanged=function(){me(),s2(this),ve()},t.prototype.toString=function(){return this.name},t})(),Qi=Oe("Atom",ci);function Vr(t,e,n){e===void 0&&(e=C1),n===void 0&&(n=C1);var i=new ci(t);return C2(i,e),X1(i,n),i}function D1(t,e){return t===e}function Hr(t,e){return tn(t,e)}function Br(t,e){return tn(t,e,1)}function jr(t,e){return Fr(t,e)||D1(t,e)}var ut={identity:D1,structural:Hr,default:jr,shallow:Br},Ur={},Gr={};function $r(t,e){var n=e?Ur:Gr;return n[t]||(n[t]={configurable:!0,enumerable:e,get:function(){return je(this),this[t]},set:function(i){je(this),this[t]=i}})}function je(t){if(t.__mobxDidRunLazyInitializers!==!0){var e=t.__mobxDecorators;if(e){Ge(t,"__mobxDidRunLazyInitializers",!0);for(var n in e){var i=e[n];i.propertyCreator(t,i.prop,i.descriptor,i.decoratorTarget,i.decoratorArguments)}}}}function T1(t,e){return function(){var i,r=function(a,s,m,C){if(C===!0)return e(a,s,m,a,i),null;if(!Object.prototype.hasOwnProperty.call(a,"__mobxDecorators")){var A=a.__mobxDecorators;Ge(a,"__mobxDecorators",K({},A))}return a.__mobxDecorators[s]={prop:s,propertyCreator:e,descriptor:m,decoratorTarget:a,decoratorArguments:i},$r(s,t)};return qr(arguments)?(i=ni,r.apply(null,arguments)):(i=Array.prototype.slice.call(arguments),r)}}function qr(t){return(t.length===2||t.length===3)&&typeof t[1]=="string"||t.length===4&&t[3]===!0}function Dt(t,e,n){return Z1(t)?t:Array.isArray(t)?E.array(t,{name:n}):pt(t)?E.object(t,void 0,{name:n}):ht(t)?E.map(t,{name:n}):At(t)?E.set(t,{name:n}):t}function Wr(t,e,n){return t==null||Lt(t)||pi(t)||qe(t)||vt(t)?t:Array.isArray(t)?E.array(t,{name:n,deep:!1}):pt(t)?E.object(t,void 0,{name:n,deep:!1}):ht(t)?E.map(t,{name:n,deep:!1}):At(t)?E.set(t,{name:n,deep:!1}):T(!1)}function zt(t){return t}function Kr(t,e,n){return tn(t,e)?e:t}function di(t){var e=T1(!0,function(i,r,o,a,s){var m=o?o.initializer?o.initializer.call(i):o.value:void 0;T2(i,r,m,t)}),n=(typeof process<"u"&&process.env,e);return n.enhancer=t,n}var I1={deep:!0,name:void 0,defaultDecorator:void 0},Yr={deep:!1,name:void 0,defaultDecorator:void 0};Object.freeze(I1);Object.freeze(Yr);function dt(t){return t==null?I1:typeof t=="string"?{name:t,deep:!0}:t}function ti(t){return t.defaultDecorator?t.defaultDecorator.enhancer:t.deep===!1?zt:Dt}var Ji=di(Dt),Xr=di(Wr),R1=di(zt),Qr=di(Kr);function Jr(t,e,n){if(typeof arguments[1]=="string")return Ji.apply(null,arguments);if(Z1(t))return t;var i=pt(t)?E.object(t,e,n):Array.isArray(t)?E.array(t,e):ht(t)?E.map(t,e):At(t)?E.set(t,e):t;if(i!==t)return i;T(!1)}var y1={box:function(t,e){arguments.length>2&&ue("box");var n=dt(e);return new ze(t,ti(n),n.name,!0,n.equals)},shallowBox:function(t,e){return arguments.length>2&&ue("shallowBox"),he("observable.shallowBox","observable.box(value, { deep: false })"),E.box(t,{name:e,deep:!1})},array:function(t,e){arguments.length>2&&ue("array");var n=dt(e);return new be(t,ti(n),n.name)},shallowArray:function(t,e){return arguments.length>2&&ue("shallowArray"),he("observable.shallowArray","observable.array(values, { deep: false })"),E.array(t,{name:e,deep:!1})},map:function(t,e){arguments.length>2&&ue("map");var n=dt(e);return new hi(t,ti(n),n.name)},shallowMap:function(t,e){return arguments.length>2&&ue("shallowMap"),he("observable.shallowMap","observable.map(values, { deep: false })"),E.map(t,{name:e,deep:!1})},set:function(t,e){arguments.length>2&&ue("set");var n=dt(e);return new mi(t,ti(n),n.name)},object:function(t,e,n){typeof arguments[1]=="string"&&ue("object");var i=dt(n);return y2({},t,e,i)},shallowObject:function(t,e){return typeof arguments[1]=="string"&&ue("shallowObject"),he("observable.shallowObject","observable.object(values, {}, { deep: false })"),E.object(t,{},{name:e,deep:!1})},ref:R1,shallow:Xr,deep:Ji,struct:Qr},E=Jr;Object.keys(y1).forEach(function(t){return E[t]=y1[t]});function ue(t){T("Expected one or two arguments to observable."+t+". Did you accidentally try to use observable."+t+" as decorator?")}var ri=T1(!1,function(t,e,n,i,r){var o=n.get,a=n.set,s=r[0]||{};I2(t,e,K({get:o,set:a},s))}),Zr=ri({equals:ut.structural}),R=function(e,n,i){if(typeof n=="string"||e!==null&&typeof e=="object"&&arguments.length===1)return ri.apply(null,arguments);var r=typeof n=="object"?n:{};return r.get=e,r.set=typeof n=="function"?n:r.set,r.name=r.name||e.name||"",new Le(r)};R.struct=Zr;var w=(function(t){return t[t.NOT_TRACKING=-1]="NOT_TRACKING",t[t.UP_TO_DATE=0]="UP_TO_DATE",t[t.POSSIBLY_STALE=1]="POSSIBLY_STALE",t[t.STALE=2]="STALE",t})(w||{}),le=(function(t){return t[t.NONE=0]="NONE",t[t.LOG=1]="LOG",t[t.BREAK=2]="BREAK",t})(le||{}),oi=(function(){function t(e){this.cause=e}return t})();function Mt(t){return t instanceof oi}function Bi(t){switch(t.dependenciesState){case w.UP_TO_DATE:return!1;case w.NOT_TRACKING:case w.STALE:return!0;case w.POSSIBLY_STALE:{for(var e=mt(),n=t.observing,i=n.length,r=0;r<i;r++){var o=n[r];if(ui(o)){if(v.disableErrorBoundaries)o.get();else try{o.get()}catch{return we(e),!0}if(t.dependenciesState===w.STALE)return we(e),!0}}return H1(t),we(e),!1}}}function fi(t){var e=t.observers.length>0;v.computationDepth>0&&e&&T(!1),!v.allowStateChanges&&(e||v.enforceActions==="strict")&&T(!1)}function P1(t,e,n){var i=k1(!0);H1(t),t.newObserving=new Array(t.observing.length+100),t.unboundDepsCount=0,t.runId=++v.runId;var r=v.trackingDerivation;v.trackingDerivation=t;var o;if(v.disableErrorBoundaries===!0)o=e.call(n);else try{o=e.call(n)}catch(a){o=new oi(a)}return v.trackingDerivation=r,e2(t),t.observing.length===0&&void 0,V1(i),o}function e2(t){for(var e=t.observing,n=t.observing=t.newObserving,i=w.UP_TO_DATE,r=0,o=t.unboundDepsCount,a=0;a<o;a++){var s=n[a];s.diffValue===0&&(s.diffValue=1,r!==a&&(n[r]=s),r++),s.dependenciesState>i&&(i=s.dependenciesState)}for(n.length=r,t.newObserving=null,o=e.length;o--;){var s=e[o];s.diffValue===0&&U1(s,t),s.diffValue=0}for(;r--;){var s=n[r];s.diffValue===1&&(s.diffValue=0,a2(s,t))}i!==w.UP_TO_DATE&&(t.dependenciesState=i,t.onBecomeStale())}function ji(t){var e=t.observing;t.observing=[];for(var n=e.length;n--;)U1(e[n],t);t.dependenciesState=w.NOT_TRACKING}function F1(t){var e=mt(),n=t();return we(e),n}function mt(){var t=v.trackingDerivation;return v.trackingDerivation=null,t}function we(t){v.trackingDerivation=t}function k1(t){var e=v.allowStateReads;return v.allowStateReads=t,e}function V1(t){v.allowStateReads=t}function H1(t){if(t.dependenciesState!==w.UP_TO_DATE){t.dependenciesState=w.UP_TO_DATE;for(var e=t.observing,n=e.length;n--;)e[n].lowestObserverState=w.UP_TO_DATE}}var ai=0,t2=1;function Be(t,e){var n=function(){return i2(t,e,this,arguments)};return n.isMobxAction=!0,n}function i2(t,e,n,i){var r=n2(t,n,i);try{return e.apply(n,i)}catch(o){throw r.error=o,o}finally{r2(r)}}function n2(t,e,n){var i=B()&&!!t,r=0;if(i){r=Date.now();var o=n&&n.length||0,a=new Array(o);if(o>0)for(var s=0;s<o;s++)a[s]=n[s];ee({type:"action",name:t,object:e,arguments:a})}var m=mt();me();var C=B1(!0),A=k1(!0),X={prevDerivation:m,prevAllowStateChanges:C,prevAllowStateReads:A,notifySpy:i,startTime:r,actionId:t2++,parentActionId:ai};return ai=X.actionId,X}function r2(t){ai!==t.actionId&&T("invalid action stack. did you forget to finish an action?"),ai=t.parentActionId,t.error!==void 0&&(v.suppressReactionErrors=!0),j1(t.prevAllowStateChanges),V1(t.prevAllowStateReads),ve(),we(t.prevDerivation),t.notifySpy&&te({time:Date.now()-t.startTime}),v.suppressReactionErrors=!1}function B1(t){var e=v.allowStateChanges;return v.allowStateChanges=t,e}function j1(t){v.allowStateChanges=t}var ze=(function(t){z1(e,t);function e(n,i,r,o,a){r===void 0&&(r="ObservableValue@"+Y()),o===void 0&&(o=!0),a===void 0&&(a=ut.default);var s=t.call(this,r)||this;return s.enhancer=i,s.name=r,s.equals=a,s.hasUnreportedChange=!1,s.value=i(n,void 0,r),o&&B()&&Ue({type:"create",name:s.name,newValue:""+s.value}),s}return e.prototype.dehanceValue=function(n){return this.dehancer!==void 0?this.dehancer(n):n},e.prototype.set=function(n){var i=this.value;if(n=this.prepareNewValue(n),n!==v.UNCHANGED){var r=B();r&&ee({type:"update",name:this.name,newValue:n,oldValue:i}),this.setNewValue(n),r&&te()}},e.prototype.prepareNewValue=function(n){if(fi(this),ce(this)){var i=de(this,{object:this,type:"update",newValue:n});if(!i)return v.UNCHANGED;n=i.newValue}return n=this.enhancer(n,this.value,this.name),this.equals(this.value,n)?v.UNCHANGED:n},e.prototype.setNewValue=function(n){var i=this.value;this.value=n,this.reportChanged(),ie(this)&&ne(this,{type:"update",object:this,newValue:n,oldValue:i})},e.prototype.get=function(){return this.reportObserved(),this.dehanceValue(this.value)},e.prototype.intercept=function(n){return It(this,n)},e.prototype.observe=function(n,i){return i&&n({object:this,type:"update",newValue:this.value,oldValue:void 0}),Rt(this,n)},e.prototype.toJSON=function(){return this.get()},e.prototype.toString=function(){return this.name+"["+this.value+"]"},e.prototype.valueOf=function(){return A1(this.get())},e})(ci);ze.prototype[O1()]=ze.prototype.valueOf;var A0=Oe("ObservableValue",ze),Le=(function(){function t(e){this.dependenciesState=w.NOT_TRACKING,this.observing=[],this.newObserving=null,this.isBeingObserved=!1,this.isPendingUnobservation=!1,this.observers=[],this.observersIndexes={},this.diffValue=0,this.runId=0,this.lastAccessedBy=0,this.lowestObserverState=w.UP_TO_DATE,this.unboundDepsCount=0,this.__mapid="#"+Y(),this.value=new oi(null),this.isComputing=!1,this.isRunningSetter=!1,this.isTracing=le.NONE,this.derivation=e.get,this.name=e.name||"ComputedValue@"+Y(),e.set&&(this.setter=Be(this.name+"-setter",e.set)),this.equals=e.equals||(e.compareStructural||e.struct?ut.structural:ut.default),this.scope=e.context,this.requiresReaction=!!e.requiresReaction,this.keepAlive=!!e.keepAlive}return t.prototype.onBecomeStale=function(){c2(this)},t.prototype.onBecomeUnobserved=function(){},t.prototype.onBecomeObserved=function(){},t.prototype.get=function(){this.isComputing&&T("Cycle detected in computation "+this.name+": "+this.derivation),v.inBatch===0&&this.observers.length===0&&!this.keepAlive?Bi(this)&&(this.warnAboutUntrackedRead(),me(),this.value=this.computeValue(!1),ve()):($1(this),Bi(this)&&this.trackAndCompute()&&l2(this));var e=this.value;if(Mt(e))throw e.cause;return e},t.prototype.peek=function(){var e=this.computeValue(!1);if(Mt(e))throw e.cause;return e},t.prototype.set=function(e){if(this.setter){Nt(!this.isRunningSetter,"The setter of computed value '"+this.name+"' is trying to update itself. Did you intend to update an _observable_ value, instead of the computed property?"),this.isRunningSetter=!0;try{this.setter.call(this.scope,e)}finally{this.isRunningSetter=!1}}else Nt(!1,!1)},t.prototype.trackAndCompute=function(){B()&&Ue({object:this.scope,type:"compute",name:this.name});var e=this.value,n=this.dependenciesState===w.NOT_TRACKING,i=this.computeValue(!0),r=n||Mt(e)||Mt(i)||!this.equals(e,i);return r&&(this.value=i),r},t.prototype.computeValue=function(e){this.isComputing=!0,v.computationDepth++;var n;if(e)n=P1(this,this.derivation,this.scope);else if(v.disableErrorBoundaries===!0)n=this.derivation.call(this.scope);else try{n=this.derivation.call(this.scope)}catch(i){n=new oi(i)}return v.computationDepth--,this.isComputing=!1,n},t.prototype.suspend=function(){this.keepAlive||(ji(this),this.value=void 0)},t.prototype.observe=function(e,n){var i=this,r=!0,o=void 0;return Tt(function(){var a=i.get();if(!r||n){var s=mt();e({type:"update",object:i,newValue:a,oldValue:o}),we(s)}r=!1,o=a})},t.prototype.warnAboutUntrackedRead=function(){},t.prototype.toJSON=function(){return this.get()},t.prototype.toString=function(){return this.name+"["+this.derivation.toString()+"]"},t.prototype.valueOf=function(){return A1(this.get())},t})();Le.prototype[O1()]=Le.prototype.valueOf;var ui=Oe("ComputedValue",Le);var Ri=(function(){function t(){this.version=5,this.UNCHANGED={},this.trackingDerivation=null,this.computationDepth=0,this.runId=0,this.mobxGuid=0,this.inBatch=0,this.pendingUnobservations=[],this.pendingReactions=[],this.isRunningReactions=!1,this.allowStateChanges=!0,this.allowStateReads=!0,this.enforceActions=!1,this.spyListeners=[],this.globalReactionErrorHandlers=[],this.computedRequiresReaction=!1,this.reactionRequiresObservable=!1,this.observableRequiresReaction=!1,this.computedConfigurable=!1,this.disableErrorBoundaries=!1,this.suppressReactionErrors=!1}return t})(),Pi=!0,o2=!1,v=(function(){var t=Hi();return t.__mobxInstanceCount>0&&!t.__mobxGlobals&&(Pi=!1),t.__mobxGlobals&&t.__mobxGlobals.version!==new Ri().version&&(Pi=!1),Pi?t.__mobxGlobals?(t.__mobxInstanceCount+=1,t.__mobxGlobals.UNCHANGED||(t.__mobxGlobals.UNCHANGED={}),t.__mobxGlobals):(t.__mobxInstanceCount=1,t.__mobxGlobals=new Ri):(setTimeout(function(){o2||T("There are multiple, different versions of MobX active. Make sure MobX is loaded only once or use `configure({ isolateGlobalState: true })`")},1),new Ri)})();function a2(t,e){var n=t.observers.length;n&&(t.observersIndexes[e.__mapid]=n),t.observers[n]=e,t.lowestObserverState>e.dependenciesState&&(t.lowestObserverState=e.dependenciesState)}function U1(t,e){if(t.observers.length===1)t.observers.length=0,G1(t);else{var n=t.observers,i=t.observersIndexes,r=n.pop();if(r!==e){var o=i[e.__mapid]||0;o?i[r.__mapid]=o:delete i[r.__mapid],n[o]=r}delete i[e.__mapid]}}function G1(t){t.isPendingUnobservation===!1&&(t.isPendingUnobservation=!0,v.pendingUnobservations.push(t))}function me(){v.inBatch++}function ve(){if(--v.inBatch===0){K1();for(var t=v.pendingUnobservations,e=0;e<t.length;e++){var n=t[e];n.isPendingUnobservation=!1,n.observers.length===0&&(n.isBeingObserved&&(n.isBeingObserved=!1,n.onBecomeUnobserved()),n instanceof Le&&n.suspend())}v.pendingUnobservations=[]}}function $1(t){var e=v.trackingDerivation;return e!==null?(e.runId!==t.lastAccessedBy&&(t.lastAccessedBy=e.runId,e.newObserving[e.unboundDepsCount++]=t,t.isBeingObserved||(t.isBeingObserved=!0,t.onBecomeObserved())),!0):(t.observers.length===0&&v.inBatch>0&&G1(t),!1)}function s2(t){if(t.lowestObserverState!==w.STALE){t.lowestObserverState=w.STALE;for(var e=t.observers,n=e.length;n--;){var i=e[n];i.dependenciesState===w.UP_TO_DATE&&(i.isTracing!==le.NONE&&q1(i,t),i.onBecomeStale()),i.dependenciesState=w.STALE}}}function l2(t){if(t.lowestObserverState!==w.STALE){t.lowestObserverState=w.STALE;for(var e=t.observers,n=e.length;n--;){var i=e[n];i.dependenciesState===w.POSSIBLY_STALE?i.dependenciesState=w.STALE:i.dependenciesState===w.UP_TO_DATE&&(t.lowestObserverState=w.UP_TO_DATE)}}}function c2(t){if(t.lowestObserverState===w.UP_TO_DATE){t.lowestObserverState=w.POSSIBLY_STALE;for(var e=t.observers,n=e.length;n--;){var i=e[n];i.dependenciesState===w.UP_TO_DATE&&(i.dependenciesState=w.POSSIBLY_STALE,i.isTracing!==le.NONE&&q1(i,t),i.onBecomeStale())}}}function q1(t,e){if(console.log("[mobx.trace] '"+t.name+"' is invalidated due to a change in: '"+e.name+"'"),t.isTracing===le.BREAK){var n=[];W1(S2(t),n,1),new Function(`debugger;
1
+ import{a as m1}from"./chunk-B2Y2RNFP.js";import{c as d1}from"./chunk-JXZCNFW7.js";import{a as r1}from"./chunk-X43VWRFP.js";import{a as n1,b as o1,c as a1,d as s1,e as l1,f as Qt,i as c1}from"./chunk-VHYIXL7R.js";import{b as u1,c as Jt,d as h1,e as Zt}from"./chunk-WWIC7UW3.js";import{a as f1,d as Et,g as ct}from"./chunk-YCINY2YI.js";import{f as Xt}from"./chunk-MOVWEZ7J.js";import{Aa as Yn,Ba as Xn,Gb as Yt,Hb as W,Ib as st,Ja as nt,La as rt,Ma as Qn,O as Ve,Za as Ii,f as Rn,ib as Jn,kb as ot,lb as at,mb as Z,nb as Me,pb as Zn,wb as U,xb as e1,za as Kn,zb as t1}from"./chunk-Y2CDUS4J.js";import{c as Ne,d as p1,h as He,m as lt}from"./chunk-ZZ3LHYOY.js";import{d as An}from"./chunk-XE5YHU5J.js";import{$ as gn,$b as St,$c as Dn,Ab as xn,Ac as Ee,C as mn,Cb as b,Db as En,Dc as ke,Eb as u,Ed as In,Fb as Mn,Fd as ae,Ga as kt,Gb as Nn,Gf as Gn,Hb as yt,Hc as Ln,Ib as Vt,If as $n,Jb as _e,Jd as Pn,Je as Hn,Kb as xe,L as Ke,La as Mi,Lb as Ai,Ma as l,Mb as Pe,Mc as Ti,Na as Ni,Nb as q,Ob as Qe,Oc as jt,Pb as p,Qa as Xe,Qb as k,Rb as J,Re as Bn,Rf as qn,Sa as wi,Tb as Je,Ub as Ze,Vb as et,Wf as Wn,X as vn,Xa as D,Xb as tt,Xc as On,Ya as Cn,Za as Te,Zb as Di,Zc as oe,_a as yn,_b as Fe,_e as jn,ab as z,ad as Ut,bb as j,bc as wn,bf as Kt,ca as ye,cb as zi,cc as Ht,cg as i1,da as bn,dc as fe,ec as Bt,ed as Gt,f as pn,fc as _t,ha as h,hc as xt,jb as L,jd as $t,kb as O,ke as Fn,kf as Un,ma as _,na as x,nb as Sn,ob as _n,pb as f,pe as kn,qb as c,rb as d,sb as g,se as Vn,tb as Li,td as qt,u as hn,ub as Oi,v as Ei,va as Ft,wb as Ie,wd as Wt,xb as Re,xd as Tn,ya as Ye,yb as Se,yd as it,zb as F,zc as zn}from"./chunk-RSNLYAN6.js";import{a as Q,b as De}from"./chunk-RTRJ3KFH.js";var C0={prefix:"far",iconName:"bell",icon:[448,512,[128276,61602],"f0f3","M224 0c-13.3 0-24 10.7-24 24l0 9.7C118.6 45.3 56 115.4 56 200l0 14.5c0 37.7-10 74.7-29 107.3L5.1 359.2C1.8 365 0 371.5 0 378.2 0 399.1 16.9 416 37.8 416l372.4 0c20.9 0 37.8-16.9 37.8-37.8 0-6.7-1.8-13.3-5.1-19L421 321.7c-19-32.6-29-69.6-29-107.3l0-14.5c0-84.6-62.6-154.7-144-166.3l0-9.7c0-13.3-10.7-24-24-24zM392.4 368l-336.9 0 12.9-22.1C91.7 306 104 260.6 104 214.5l0-14.5c0-66.3 53.7-120 120-120s120 53.7 120 120l0 14.5c0 46.2 12.3 91.5 35.5 131.4L392.4 368zM156.1 464c9.9 28 36.6 48 67.9 48s58-20 67.9-48l-135.8 0z"]};var Ar={prefix:"far",iconName:"file-zipper",icon:[384,512,["file-archive"],"f1c6","M64 48l112 0 0 88c0 39.8 32.2 72 72 72l88 0 0 240c0 8.8-7.2 16-16 16L64 464c-8.8 0-16-7.2-16-16L48 64c0-8.8 7.2-16 16-16zM224 67.9l92.1 92.1-68.1 0c-13.3 0-24-10.7-24-24l0-68.1zM64 0C28.7 0 0 28.7 0 64L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-261.5c0-17-6.7-33.3-18.7-45.3L242.7 18.7C230.7 6.7 214.5 0 197.5 0L64 0zM80 104c0 13.3 10.7 24 24 24l16 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-16 0c-13.3 0-24 10.7-24 24zm0 80c0 13.3 10.7 24 24 24l32 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-32 0c-13.3 0-24 10.7-24 24zm64 56l-32 0c-17.7 0-32 14.3-32 32l0 48c0 26.5 21.5 48 48 48s48-21.5 48-48l0-48c0-17.7-14.3-32-32-32zm-16 64a16 16 0 1 1 0 32 16 16 0 1 1 0-32z"]},y0=Ar;var S0={prefix:"far",iconName:"clock",icon:[512,512,[128339,"clock-four"],"f017","M464 256a208 208 0 1 1 -416 0 208 208 0 1 1 416 0zM0 256a256 256 0 1 0 512 0 256 256 0 1 0 -512 0zM232 120l0 136c0 8 4 15.5 10.7 20l96 64c11 7.4 25.9 4.4 33.3-6.7s4.4-25.9-6.7-33.3L280 243.2 280 120c0-13.3-10.7-24-24-24s-24 10.7-24 24z"]};var ei={prefix:"far",iconName:"file",icon:[384,512,[128196,128459,61462],"f15b","M176 48L64 48c-8.8 0-16 7.2-16 16l0 384c0 8.8 7.2 16 16 16l256 0c8.8 0 16-7.2 16-16l0-240-88 0c-39.8 0-72-32.2-72-72l0-88zM316.1 160L224 67.9 224 136c0 13.3 10.7 24 24 24l68.1 0zM0 64C0 28.7 28.7 0 64 0L197.5 0c17 0 33.3 6.7 45.3 18.7L365.3 141.3c12 12 18.7 28.3 18.7 45.3L384 448c0 35.3-28.7 64-64 64L64 512c-35.3 0-64-28.7-64-64L0 64z"]};var _0={prefix:"far",iconName:"trash-can",icon:[448,512,[61460,"trash-alt"],"f2ed","M166.2-16c-13.3 0-25.3 8.3-30 20.8L120 48 24 48C10.7 48 0 58.7 0 72S10.7 96 24 96l400 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-96 0-16.2-43.2C307.1-7.7 295.2-16 281.8-16L166.2-16zM32 144l0 304c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-304-48 0 0 304c0 8.8-7.2 16-16 16L96 464c-8.8 0-16-7.2-16-16l0-304-48 0zm160 72c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 176c0 13.3 10.7 24 24 24s24-10.7 24-24l0-176zm112 0c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 176c0 13.3 10.7 24 24 24s24-10.7 24-24l0-176z"]};var x0={prefix:"far",iconName:"user",icon:[448,512,[128100,62144,62470,"user-alt","user-large"],"f007","M144 128a80 80 0 1 1 160 0 80 80 0 1 1 -160 0zm208 0a128 128 0 1 0 -256 0 128 128 0 1 0 256 0zM48 480c0-70.7 57.3-128 128-128l96 0c70.7 0 128 57.3 128 128l0 8c0 13.3 10.7 24 24 24s24-10.7 24-24l0-8c0-97.2-78.8-176-176-176l-96 0C78.8 304 0 382.8 0 480l0 8c0 13.3 10.7 24 24 24s24-10.7 24-24l0-8z"]};var E0={prefix:"far",iconName:"file-lines",icon:[384,512,[128441,128462,61686,"file-alt","file-text"],"f15c","M64 48l112 0 0 88c0 39.8 32.2 72 72 72l88 0 0 240c0 8.8-7.2 16-16 16L64 464c-8.8 0-16-7.2-16-16L48 64c0-8.8 7.2-16 16-16zM224 67.9l92.1 92.1-68.1 0c-13.3 0-24-10.7-24-24l0-68.1zM64 0C28.7 0 0 28.7 0 64L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-261.5c0-17-6.7-33.3-18.7-45.3L242.7 18.7C230.7 6.7 214.5 0 197.5 0L64 0zm56 256c-13.3 0-24 10.7-24 24s10.7 24 24 24l144 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-144 0zm0 96c-13.3 0-24 10.7-24 24s10.7 24 24 24l144 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-144 0z"]};var M0={prefix:"far",iconName:"comment-dots",icon:[512,512,[128172,62075,"commenting"],"f4ad","M0 240c0 54.4 19.3 104.6 51.9 144.9L3.1 474.3c-2 3.7-3.1 7.9-3.1 12.2 0 14.1 11.4 25.5 25.5 25.5 4 0 7.8-.6 11.5-2.1L153.4 460c31.4 12.9 66.1 20 102.6 20 141.4 0 256-107.5 256-240S397.4 0 256 0 0 107.5 0 240zM94 407.9c9.3-17.1 7.4-38.1-4.8-53.2-26.1-32.3-41.2-71.9-41.2-114.7 0-103.2 90.2-192 208-192s208 88.8 208 192-90.2 192-208 192c-30.2 0-58.7-5.9-84.3-16.4-11.9-4.9-25.3-4.8-37.1 .3L76 440.9 94 407.9zM144 272a32 32 0 1 0 0-64 32 32 0 1 0 0 64zm144-32a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zm80 32a32 32 0 1 0 0-64 32 32 0 1 0 0 64z"]};var N0={prefix:"far",iconName:"flag",icon:[448,512,[127988,61725],"f024","M48 24C48 10.7 37.3 0 24 0S0 10.7 0 24L0 488c0 13.3 10.7 24 24 24s24-10.7 24-24l0-100 80.3-20.1c41.1-10.3 84.6-5.5 122.5 13.4 44.2 22.1 95.5 24.8 141.7 7.4l34.7-13c12.5-4.7 20.8-16.6 20.8-30l0-279.7c0-23-24.2-38-44.8-27.7l-9.6 4.8c-46.3 23.2-100.8 23.2-147.1 0-35.1-17.6-75.4-22-113.5-12.5L48 52 48 24zm0 77.5l96.6-24.2c27-6.7 55.5-3.6 80.4 8.8 54.9 27.4 118.7 29.7 175 6.8l0 241.8-24.4 9.1c-33.7 12.6-71.2 10.7-103.4-5.4-48.2-24.1-103.3-30.1-155.6-17.1l-68.6 17.2 0-237z"]};var w0={prefix:"far",iconName:"window-restore",icon:[576,512,[],"f2d2","M512 80L224 80c-8.8 0-16 7.2-16 16l0 16-48 0 0-16c0-35.3 28.7-64 64-64l288 0c35.3 0 64 28.7 64 64l0 192c0 35.3-28.7 64-64 64l-48 0 0-48 48 0c8.8 0 16-7.2 16-16l0-192c0-8.8-7.2-16-16-16zM368 288l-320 0 0 128c0 8.8 7.2 16 16 16l288 0c8.8 0 16-7.2 16-16l0-128zM64 160l288 0c35.3 0 64 28.7 64 64l0 192c0 35.3-28.7 64-64 64L64 480c-35.3 0-64-28.7-64-64L0 224c0-35.3 28.7-64 64-64z"]};var v1={prefix:"far",iconName:"folder-closed",icon:[512,512,[],"e185","M448 400L64 400c-8.8 0-16-7.2-16-16l0-144 416 0 0 144c0 8.8-7.2 16-16 16zm16-208l-416 0 0-96c0-8.8 7.2-16 16-16l138.7 0c3.5 0 6.8 1.1 9.6 3.2L250.7 112c13.8 10.4 30.7 16 48 16L448 128c8.8 0 16 7.2 16 16l0 48zM64 448l384 0c35.3 0 64-28.7 64-64l0-240c0-35.3-28.7-64-64-64L298.7 80c-6.9 0-13.7-2.2-19.2-6.4L241.1 44.8C230 36.5 216.5 32 202.7 32L64 32C28.7 32 0 60.7 0 96L0 384c0 35.3 28.7 64 64 64z"]};var g1=(()=>{let e=class e{transform(i,r=0,o=void 0){return rt(i,r,o)}};e.\u0275fac=function(r){return new(r||e)},e.\u0275pipe=yn({name:"pathSlice",type:e,pure:!0});let t=e;return t})();var ki=function(t,e){return ki=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var r in i)i.hasOwnProperty(r)&&(n[r]=i[r])},ki(t,e)};function z1(t,e){ki(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}var K=function(){return K=Object.assign||function(e){for(var n,i=1,r=arguments.length;i<r;i++){n=arguments[i];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},K.apply(this,arguments)};function L1(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var i=n.call(t),r,o=[],a;try{for(;(e===void 0||e-- >0)&&!(r=i.next()).done;)o.push(r.value)}catch(s){a={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(a)throw a.error}}return o}function Vi(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(L1(arguments[e]));return t}var Dr="An invariant failed, however the error is obfuscated because this is an production build.",ni=[];Object.freeze(ni);var $i={};Object.freeze($i);var Tr={};function Hi(){return typeof window<"u"?window:typeof global<"u"?global:Tr}function Y(){return++v.mobxGuid}function T(t){throw Nt(!1,t),"X"}function Nt(t,e){if(!t)throw new Error("[mobx] "+(e||Dr))}var b1=[];function he(t,e){return!1}function qi(t){var e=!1;return function(){if(!e)return e=!0,t.apply(this,arguments)}}var C1=function(){};function Ir(t){var e=[];return t.forEach(function(n){e.indexOf(n)===-1&&e.push(n)}),e}function Wi(t){return t!==null&&typeof t=="object"}function pt(t){if(t===null||typeof t!="object")return!1;var e=Object.getPrototypeOf(t);return e===Object.prototype||e===null}function Rr(t){return ht(t)||qe(t)?t:Array.isArray(t)?new Map(t):pt(t)?new Map(Object.entries(t)):T("Cannot convert to map from '"+t+"'")}function Pr(t,e){for(var n=0;n<e.length;n++)Ge(t,e[n],t[e[n]])}function Ge(t,e,n){Object.defineProperty(t,e,{enumerable:!1,writable:!0,configurable:!0,value:n})}function Ot(t,e,n){Object.defineProperty(t,e,{enumerable:!1,writable:!1,configurable:!0,value:n})}function Oe(t,e){var n="isMobX"+t;return e.prototype[n]=!0,function(i){return Wi(i)&&i[n]===!0}}function Fr(t,e){return typeof t=="number"&&typeof e=="number"&&isNaN(t)&&isNaN(e)}function ht(t){return Hi().Map!==void 0&&t instanceof Hi().Map}function At(t){return t instanceof Set}function ft(t){for(var e=[];;){var n=t.next();if(n.done)break;e.push(n.value)}return e}function O1(){return typeof Symbol=="function"&&Symbol.toPrimitive||"@@toPrimitive"}function A1(t){return t===null?null:typeof t=="object"?""+t:t}function Ki(){return typeof Symbol=="function"&&Symbol.iterator||"@@iterator"}function Yi(t,e){Ot(t,Ki(),e)}function wt(t){return t[Ki()]=kr,t}function Xi(){return typeof Symbol=="function"&&Symbol.toStringTag||"@@toStringTag"}function kr(){return this}var ci=(function(){function t(e){e===void 0&&(e="Atom@"+Y()),this.name=e,this.isPendingUnobservation=!1,this.isBeingObserved=!1,this.observers=[],this.observersIndexes={},this.diffValue=0,this.lastAccessedBy=0,this.lowestObserverState=w.NOT_TRACKING}return t.prototype.onBecomeUnobserved=function(){},t.prototype.onBecomeObserved=function(){},t.prototype.reportObserved=function(){return $1(this)},t.prototype.reportChanged=function(){me(),s2(this),ve()},t.prototype.toString=function(){return this.name},t})(),Qi=Oe("Atom",ci);function Vr(t,e,n){e===void 0&&(e=C1),n===void 0&&(n=C1);var i=new ci(t);return C2(i,e),X1(i,n),i}function D1(t,e){return t===e}function Hr(t,e){return tn(t,e)}function Br(t,e){return tn(t,e,1)}function jr(t,e){return Fr(t,e)||D1(t,e)}var ut={identity:D1,structural:Hr,default:jr,shallow:Br},Ur={},Gr={};function $r(t,e){var n=e?Ur:Gr;return n[t]||(n[t]={configurable:!0,enumerable:e,get:function(){return je(this),this[t]},set:function(i){je(this),this[t]=i}})}function je(t){if(t.__mobxDidRunLazyInitializers!==!0){var e=t.__mobxDecorators;if(e){Ge(t,"__mobxDidRunLazyInitializers",!0);for(var n in e){var i=e[n];i.propertyCreator(t,i.prop,i.descriptor,i.decoratorTarget,i.decoratorArguments)}}}}function T1(t,e){return function(){var i,r=function(a,s,m,C){if(C===!0)return e(a,s,m,a,i),null;if(!Object.prototype.hasOwnProperty.call(a,"__mobxDecorators")){var A=a.__mobxDecorators;Ge(a,"__mobxDecorators",K({},A))}return a.__mobxDecorators[s]={prop:s,propertyCreator:e,descriptor:m,decoratorTarget:a,decoratorArguments:i},$r(s,t)};return qr(arguments)?(i=ni,r.apply(null,arguments)):(i=Array.prototype.slice.call(arguments),r)}}function qr(t){return(t.length===2||t.length===3)&&typeof t[1]=="string"||t.length===4&&t[3]===!0}function Dt(t,e,n){return Z1(t)?t:Array.isArray(t)?E.array(t,{name:n}):pt(t)?E.object(t,void 0,{name:n}):ht(t)?E.map(t,{name:n}):At(t)?E.set(t,{name:n}):t}function Wr(t,e,n){return t==null||Lt(t)||pi(t)||qe(t)||vt(t)?t:Array.isArray(t)?E.array(t,{name:n,deep:!1}):pt(t)?E.object(t,void 0,{name:n,deep:!1}):ht(t)?E.map(t,{name:n,deep:!1}):At(t)?E.set(t,{name:n,deep:!1}):T(!1)}function zt(t){return t}function Kr(t,e,n){return tn(t,e)?e:t}function di(t){var e=T1(!0,function(i,r,o,a,s){var m=o?o.initializer?o.initializer.call(i):o.value:void 0;T2(i,r,m,t)}),n=(typeof process<"u"&&process.env,e);return n.enhancer=t,n}var I1={deep:!0,name:void 0,defaultDecorator:void 0},Yr={deep:!1,name:void 0,defaultDecorator:void 0};Object.freeze(I1);Object.freeze(Yr);function dt(t){return t==null?I1:typeof t=="string"?{name:t,deep:!0}:t}function ti(t){return t.defaultDecorator?t.defaultDecorator.enhancer:t.deep===!1?zt:Dt}var Ji=di(Dt),Xr=di(Wr),R1=di(zt),Qr=di(Kr);function Jr(t,e,n){if(typeof arguments[1]=="string")return Ji.apply(null,arguments);if(Z1(t))return t;var i=pt(t)?E.object(t,e,n):Array.isArray(t)?E.array(t,e):ht(t)?E.map(t,e):At(t)?E.set(t,e):t;if(i!==t)return i;T(!1)}var y1={box:function(t,e){arguments.length>2&&ue("box");var n=dt(e);return new ze(t,ti(n),n.name,!0,n.equals)},shallowBox:function(t,e){return arguments.length>2&&ue("shallowBox"),he("observable.shallowBox","observable.box(value, { deep: false })"),E.box(t,{name:e,deep:!1})},array:function(t,e){arguments.length>2&&ue("array");var n=dt(e);return new be(t,ti(n),n.name)},shallowArray:function(t,e){return arguments.length>2&&ue("shallowArray"),he("observable.shallowArray","observable.array(values, { deep: false })"),E.array(t,{name:e,deep:!1})},map:function(t,e){arguments.length>2&&ue("map");var n=dt(e);return new hi(t,ti(n),n.name)},shallowMap:function(t,e){return arguments.length>2&&ue("shallowMap"),he("observable.shallowMap","observable.map(values, { deep: false })"),E.map(t,{name:e,deep:!1})},set:function(t,e){arguments.length>2&&ue("set");var n=dt(e);return new mi(t,ti(n),n.name)},object:function(t,e,n){typeof arguments[1]=="string"&&ue("object");var i=dt(n);return y2({},t,e,i)},shallowObject:function(t,e){return typeof arguments[1]=="string"&&ue("shallowObject"),he("observable.shallowObject","observable.object(values, {}, { deep: false })"),E.object(t,{},{name:e,deep:!1})},ref:R1,shallow:Xr,deep:Ji,struct:Qr},E=Jr;Object.keys(y1).forEach(function(t){return E[t]=y1[t]});function ue(t){T("Expected one or two arguments to observable."+t+". Did you accidentally try to use observable."+t+" as decorator?")}var ri=T1(!1,function(t,e,n,i,r){var o=n.get,a=n.set,s=r[0]||{};I2(t,e,K({get:o,set:a},s))}),Zr=ri({equals:ut.structural}),R=function(e,n,i){if(typeof n=="string"||e!==null&&typeof e=="object"&&arguments.length===1)return ri.apply(null,arguments);var r=typeof n=="object"?n:{};return r.get=e,r.set=typeof n=="function"?n:r.set,r.name=r.name||e.name||"",new Le(r)};R.struct=Zr;var w=(function(t){return t[t.NOT_TRACKING=-1]="NOT_TRACKING",t[t.UP_TO_DATE=0]="UP_TO_DATE",t[t.POSSIBLY_STALE=1]="POSSIBLY_STALE",t[t.STALE=2]="STALE",t})(w||{}),le=(function(t){return t[t.NONE=0]="NONE",t[t.LOG=1]="LOG",t[t.BREAK=2]="BREAK",t})(le||{}),oi=(function(){function t(e){this.cause=e}return t})();function Mt(t){return t instanceof oi}function Bi(t){switch(t.dependenciesState){case w.UP_TO_DATE:return!1;case w.NOT_TRACKING:case w.STALE:return!0;case w.POSSIBLY_STALE:{for(var e=mt(),n=t.observing,i=n.length,r=0;r<i;r++){var o=n[r];if(ui(o)){if(v.disableErrorBoundaries)o.get();else try{o.get()}catch{return we(e),!0}if(t.dependenciesState===w.STALE)return we(e),!0}}return H1(t),we(e),!1}}}function fi(t){var e=t.observers.length>0;v.computationDepth>0&&e&&T(!1),!v.allowStateChanges&&(e||v.enforceActions==="strict")&&T(!1)}function P1(t,e,n){var i=k1(!0);H1(t),t.newObserving=new Array(t.observing.length+100),t.unboundDepsCount=0,t.runId=++v.runId;var r=v.trackingDerivation;v.trackingDerivation=t;var o;if(v.disableErrorBoundaries===!0)o=e.call(n);else try{o=e.call(n)}catch(a){o=new oi(a)}return v.trackingDerivation=r,e2(t),t.observing.length===0&&void 0,V1(i),o}function e2(t){for(var e=t.observing,n=t.observing=t.newObserving,i=w.UP_TO_DATE,r=0,o=t.unboundDepsCount,a=0;a<o;a++){var s=n[a];s.diffValue===0&&(s.diffValue=1,r!==a&&(n[r]=s),r++),s.dependenciesState>i&&(i=s.dependenciesState)}for(n.length=r,t.newObserving=null,o=e.length;o--;){var s=e[o];s.diffValue===0&&U1(s,t),s.diffValue=0}for(;r--;){var s=n[r];s.diffValue===1&&(s.diffValue=0,a2(s,t))}i!==w.UP_TO_DATE&&(t.dependenciesState=i,t.onBecomeStale())}function ji(t){var e=t.observing;t.observing=[];for(var n=e.length;n--;)U1(e[n],t);t.dependenciesState=w.NOT_TRACKING}function F1(t){var e=mt(),n=t();return we(e),n}function mt(){var t=v.trackingDerivation;return v.trackingDerivation=null,t}function we(t){v.trackingDerivation=t}function k1(t){var e=v.allowStateReads;return v.allowStateReads=t,e}function V1(t){v.allowStateReads=t}function H1(t){if(t.dependenciesState!==w.UP_TO_DATE){t.dependenciesState=w.UP_TO_DATE;for(var e=t.observing,n=e.length;n--;)e[n].lowestObserverState=w.UP_TO_DATE}}var ai=0,t2=1;function Be(t,e){var n=function(){return i2(t,e,this,arguments)};return n.isMobxAction=!0,n}function i2(t,e,n,i){var r=n2(t,n,i);try{return e.apply(n,i)}catch(o){throw r.error=o,o}finally{r2(r)}}function n2(t,e,n){var i=B()&&!!t,r=0;if(i){r=Date.now();var o=n&&n.length||0,a=new Array(o);if(o>0)for(var s=0;s<o;s++)a[s]=n[s];ee({type:"action",name:t,object:e,arguments:a})}var m=mt();me();var C=B1(!0),A=k1(!0),X={prevDerivation:m,prevAllowStateChanges:C,prevAllowStateReads:A,notifySpy:i,startTime:r,actionId:t2++,parentActionId:ai};return ai=X.actionId,X}function r2(t){ai!==t.actionId&&T("invalid action stack. did you forget to finish an action?"),ai=t.parentActionId,t.error!==void 0&&(v.suppressReactionErrors=!0),j1(t.prevAllowStateChanges),V1(t.prevAllowStateReads),ve(),we(t.prevDerivation),t.notifySpy&&te({time:Date.now()-t.startTime}),v.suppressReactionErrors=!1}function B1(t){var e=v.allowStateChanges;return v.allowStateChanges=t,e}function j1(t){v.allowStateChanges=t}var ze=(function(t){z1(e,t);function e(n,i,r,o,a){r===void 0&&(r="ObservableValue@"+Y()),o===void 0&&(o=!0),a===void 0&&(a=ut.default);var s=t.call(this,r)||this;return s.enhancer=i,s.name=r,s.equals=a,s.hasUnreportedChange=!1,s.value=i(n,void 0,r),o&&B()&&Ue({type:"create",name:s.name,newValue:""+s.value}),s}return e.prototype.dehanceValue=function(n){return this.dehancer!==void 0?this.dehancer(n):n},e.prototype.set=function(n){var i=this.value;if(n=this.prepareNewValue(n),n!==v.UNCHANGED){var r=B();r&&ee({type:"update",name:this.name,newValue:n,oldValue:i}),this.setNewValue(n),r&&te()}},e.prototype.prepareNewValue=function(n){if(fi(this),ce(this)){var i=de(this,{object:this,type:"update",newValue:n});if(!i)return v.UNCHANGED;n=i.newValue}return n=this.enhancer(n,this.value,this.name),this.equals(this.value,n)?v.UNCHANGED:n},e.prototype.setNewValue=function(n){var i=this.value;this.value=n,this.reportChanged(),ie(this)&&ne(this,{type:"update",object:this,newValue:n,oldValue:i})},e.prototype.get=function(){return this.reportObserved(),this.dehanceValue(this.value)},e.prototype.intercept=function(n){return It(this,n)},e.prototype.observe=function(n,i){return i&&n({object:this,type:"update",newValue:this.value,oldValue:void 0}),Rt(this,n)},e.prototype.toJSON=function(){return this.get()},e.prototype.toString=function(){return this.name+"["+this.value+"]"},e.prototype.valueOf=function(){return A1(this.get())},e})(ci);ze.prototype[O1()]=ze.prototype.valueOf;var A0=Oe("ObservableValue",ze),Le=(function(){function t(e){this.dependenciesState=w.NOT_TRACKING,this.observing=[],this.newObserving=null,this.isBeingObserved=!1,this.isPendingUnobservation=!1,this.observers=[],this.observersIndexes={},this.diffValue=0,this.runId=0,this.lastAccessedBy=0,this.lowestObserverState=w.UP_TO_DATE,this.unboundDepsCount=0,this.__mapid="#"+Y(),this.value=new oi(null),this.isComputing=!1,this.isRunningSetter=!1,this.isTracing=le.NONE,this.derivation=e.get,this.name=e.name||"ComputedValue@"+Y(),e.set&&(this.setter=Be(this.name+"-setter",e.set)),this.equals=e.equals||(e.compareStructural||e.struct?ut.structural:ut.default),this.scope=e.context,this.requiresReaction=!!e.requiresReaction,this.keepAlive=!!e.keepAlive}return t.prototype.onBecomeStale=function(){c2(this)},t.prototype.onBecomeUnobserved=function(){},t.prototype.onBecomeObserved=function(){},t.prototype.get=function(){this.isComputing&&T("Cycle detected in computation "+this.name+": "+this.derivation),v.inBatch===0&&this.observers.length===0&&!this.keepAlive?Bi(this)&&(this.warnAboutUntrackedRead(),me(),this.value=this.computeValue(!1),ve()):($1(this),Bi(this)&&this.trackAndCompute()&&l2(this));var e=this.value;if(Mt(e))throw e.cause;return e},t.prototype.peek=function(){var e=this.computeValue(!1);if(Mt(e))throw e.cause;return e},t.prototype.set=function(e){if(this.setter){Nt(!this.isRunningSetter,"The setter of computed value '"+this.name+"' is trying to update itself. Did you intend to update an _observable_ value, instead of the computed property?"),this.isRunningSetter=!0;try{this.setter.call(this.scope,e)}finally{this.isRunningSetter=!1}}else Nt(!1,!1)},t.prototype.trackAndCompute=function(){B()&&Ue({object:this.scope,type:"compute",name:this.name});var e=this.value,n=this.dependenciesState===w.NOT_TRACKING,i=this.computeValue(!0),r=n||Mt(e)||Mt(i)||!this.equals(e,i);return r&&(this.value=i),r},t.prototype.computeValue=function(e){this.isComputing=!0,v.computationDepth++;var n;if(e)n=P1(this,this.derivation,this.scope);else if(v.disableErrorBoundaries===!0)n=this.derivation.call(this.scope);else try{n=this.derivation.call(this.scope)}catch(i){n=new oi(i)}return v.computationDepth--,this.isComputing=!1,n},t.prototype.suspend=function(){this.keepAlive||(ji(this),this.value=void 0)},t.prototype.observe=function(e,n){var i=this,r=!0,o=void 0;return Tt(function(){var a=i.get();if(!r||n){var s=mt();e({type:"update",object:i,newValue:a,oldValue:o}),we(s)}r=!1,o=a})},t.prototype.warnAboutUntrackedRead=function(){},t.prototype.toJSON=function(){return this.get()},t.prototype.toString=function(){return this.name+"["+this.derivation.toString()+"]"},t.prototype.valueOf=function(){return A1(this.get())},t})();Le.prototype[O1()]=Le.prototype.valueOf;var ui=Oe("ComputedValue",Le);var Ri=(function(){function t(){this.version=5,this.UNCHANGED={},this.trackingDerivation=null,this.computationDepth=0,this.runId=0,this.mobxGuid=0,this.inBatch=0,this.pendingUnobservations=[],this.pendingReactions=[],this.isRunningReactions=!1,this.allowStateChanges=!0,this.allowStateReads=!0,this.enforceActions=!1,this.spyListeners=[],this.globalReactionErrorHandlers=[],this.computedRequiresReaction=!1,this.reactionRequiresObservable=!1,this.observableRequiresReaction=!1,this.computedConfigurable=!1,this.disableErrorBoundaries=!1,this.suppressReactionErrors=!1}return t})(),Pi=!0,o2=!1,v=(function(){var t=Hi();return t.__mobxInstanceCount>0&&!t.__mobxGlobals&&(Pi=!1),t.__mobxGlobals&&t.__mobxGlobals.version!==new Ri().version&&(Pi=!1),Pi?t.__mobxGlobals?(t.__mobxInstanceCount+=1,t.__mobxGlobals.UNCHANGED||(t.__mobxGlobals.UNCHANGED={}),t.__mobxGlobals):(t.__mobxInstanceCount=1,t.__mobxGlobals=new Ri):(setTimeout(function(){o2||T("There are multiple, different versions of MobX active. Make sure MobX is loaded only once or use `configure({ isolateGlobalState: true })`")},1),new Ri)})();function a2(t,e){var n=t.observers.length;n&&(t.observersIndexes[e.__mapid]=n),t.observers[n]=e,t.lowestObserverState>e.dependenciesState&&(t.lowestObserverState=e.dependenciesState)}function U1(t,e){if(t.observers.length===1)t.observers.length=0,G1(t);else{var n=t.observers,i=t.observersIndexes,r=n.pop();if(r!==e){var o=i[e.__mapid]||0;o?i[r.__mapid]=o:delete i[r.__mapid],n[o]=r}delete i[e.__mapid]}}function G1(t){t.isPendingUnobservation===!1&&(t.isPendingUnobservation=!0,v.pendingUnobservations.push(t))}function me(){v.inBatch++}function ve(){if(--v.inBatch===0){K1();for(var t=v.pendingUnobservations,e=0;e<t.length;e++){var n=t[e];n.isPendingUnobservation=!1,n.observers.length===0&&(n.isBeingObserved&&(n.isBeingObserved=!1,n.onBecomeUnobserved()),n instanceof Le&&n.suspend())}v.pendingUnobservations=[]}}function $1(t){var e=v.trackingDerivation;return e!==null?(e.runId!==t.lastAccessedBy&&(t.lastAccessedBy=e.runId,e.newObserving[e.unboundDepsCount++]=t,t.isBeingObserved||(t.isBeingObserved=!0,t.onBecomeObserved())),!0):(t.observers.length===0&&v.inBatch>0&&G1(t),!1)}function s2(t){if(t.lowestObserverState!==w.STALE){t.lowestObserverState=w.STALE;for(var e=t.observers,n=e.length;n--;){var i=e[n];i.dependenciesState===w.UP_TO_DATE&&(i.isTracing!==le.NONE&&q1(i,t),i.onBecomeStale()),i.dependenciesState=w.STALE}}}function l2(t){if(t.lowestObserverState!==w.STALE){t.lowestObserverState=w.STALE;for(var e=t.observers,n=e.length;n--;){var i=e[n];i.dependenciesState===w.POSSIBLY_STALE?i.dependenciesState=w.STALE:i.dependenciesState===w.UP_TO_DATE&&(t.lowestObserverState=w.UP_TO_DATE)}}}function c2(t){if(t.lowestObserverState===w.UP_TO_DATE){t.lowestObserverState=w.POSSIBLY_STALE;for(var e=t.observers,n=e.length;n--;){var i=e[n];i.dependenciesState===w.UP_TO_DATE&&(i.dependenciesState=w.POSSIBLY_STALE,i.isTracing!==le.NONE&&q1(i,t),i.onBecomeStale())}}}function q1(t,e){if(console.log("[mobx.trace] '"+t.name+"' is invalidated due to a change in: '"+e.name+"'"),t.isTracing===le.BREAK){var n=[];W1(S2(t),n,1),new Function(`debugger;
2
2
  /*
3
3
  Tracing '`+t.name+`'
4
4
 
@@ -1 +1 @@
1
- import{a as yt,c as bt,d as T,e as te,g as Et}from"./chunk-ZTXJC5IC.js";import{a as Ct,b as vt}from"./chunk-SRLMFJ7C.js";import{f as kt}from"./chunk-FJFNDK67.js";import{f as St,g as gt,h as _t}from"./chunk-4KESSWTF.js";import{A as ze,Ca as he,Ea as de,Gb as fe,Hb as R,Ib as H,Jb as mt,La as st,Lb as ht,Nb as dt,Pb as ut,Qb as ft,S as ee,Xa as at,Za as lt,lb as L,ob as ct,v as Ge,va as rt,w as Ze,wb as B,y as Ye,z as Xe}from"./chunk-WL65GYD5.js";import{d as Y}from"./chunk-XE5YHU5J.js";import{$b as Le,$c as De,Cb as w,Eb as u,Ed as J,Fd as We,G as oe,Gc as Te,Jd as Qe,L as ve,Lf as ot,Ma as l,Mb as we,Nb as K,Ob as x,Oc as Z,Pb as p,Qb as $,Rb as D,Sb as xe,Tb as le,Ub as ce,Vb as pe,Xa as W,Xb as O,Zc as X,ad as Ne,bb as re,be as Je,bg as ue,ca as P,cb as Ae,cd as z,ce as et,cg as pt,dc as C,dg as N,ed as Re,f as ke,fa as ye,fc as v,fd as Pe,ga as j,gd as me,ha as S,id as f,jb as _,jd as Fe,kb as k,kd as Me,lb as Ie,ld as $e,lf as it,ma as F,na as M,nb as se,nd as Oe,ob as ae,od as Be,p as V,pa as be,pb as m,pd as He,qb as s,qd as Ue,rb as a,rd as Ve,sb as d,sd as Ke,t as Ce,te as tt,tf as nt,v as b,va as Ee,wd as qe,xd as je,yd as Q,zb as G}from"./chunk-RSNLYAN6.js";import{a as y,b as I,c as _e}from"./chunk-RTRJ3KFH.js";function Ft(o,r){if(o&1&&d(0,"fa-icon",2),o&2){let i=u();x(i.repository.class),we("min-width",i.galleryMode.dimensions/3,"px")("min-height",i.galleryMode.dimensions/3,"px")("font-size",i.galleryMode.faSize/1.8,"px"),m("icon",i.repository.icon)}}function Mt(o,r){if(o&1&&d(0,"fa-icon",5),o&2){let i=u(2);x(i.repository.class),m("icon",i.repository.icon)}}function $t(o,r){if(o&1&&(p(0),C(1,"translate")),o&2){let i=u(2);D(" ",v(1,1,i.repository.label,i.locale.language)," ")}}function Ot(o,r){if(o&1&&p(0),o&2){let i=u(2);D(" ",i.repository.label," ")}}function Bt(o,r){if(o&1&&(s(0,"div",1),_(1,Mt,1,3,"fa-icon",3),s(2,"span",4),_(3,$t,2,4)(4,Ot,1,1),a()()),o&2){let i=u();l(),k(i.showIcon?1:-1),l(2),k(i.repository.translate?3:4)}}var At=(()=>{let r=class r{constructor(){this.showIcon=!0,this.showFullPath=!1,this.locale=S(Q),this.layout=S(B),this.unknownRepository={icon:Qe,label:"",class:"circle-primary-icon",translate:!1}}ngOnInit(){this.setRepository()}ngOnChanges(){this.setRepository()}setRepository(){this.share.parent?.id||this.share.parent?.id===0?this.repository={icon:R.SHARES,label:this.share.parent.name,class:"circle-purple-icon",translate:!1}:this.share.file?.ownerId?this.repository={icon:R.PERSONAL,label:fe.PERSONAL_FILES,class:"circle-primary-icon",translate:!0}:this.share.file?.space?.alias?this.repository={icon:R.SPACES,label:`${this.share.file.space.name}`,class:"circle-primary-icon",translate:!1}:this.share.externalPath?this.repository={icon:R.EXTERNAL,label:"External",class:"circle-primary-icon",translate:!0}:this.repository=y({},this.unknownRepository),this.showFullPath&&this.setFullPath()}setFullPath(){if(!this.repository.label)return;let e=this.share.file?.path?this.share.file.path.split("/").filter(n=>n&&n!=="."):[];this.share.parent?.id&&!this.share.file?.id&&this.share.file?.path.indexOf("/")===-1?e.shift():this.share.file?.space?.alias&&this.share.file.space?.root?.alias&&(e.length?e.unshift(this.share.file.space.root.name):e.push(this.share.file.space.root.name)),this.repository.label===fe.PERSONAL_FILES&&(this.repository.label=this.layout.translateString(this.repository.label)),e.length&&(this.repository.label=`${this.repository.label}/${e.join("/")}`)}};r.\u0275fac=function(n){return new(n||r)},r.\u0275cmp=W({type:r,selectors:[["app-share-repository"]],inputs:{share:"share",galleryMode:"galleryMode",showIcon:"showIcon",showFullPath:"showFullPath"},features:[Ee],decls:2,vars:1,consts:[[3,"icon","class","min-width","min-height","font-size"],[1,"d-flex","align-items-center"],[3,"icon"],[1,"me-2",3,"icon","class"],["draggable","false",1,"no-pointer-events"],[1,"me-2",3,"icon"]],template:function(n,t){n&1&&_(0,Ft,1,9,"fa-icon",0)(1,Bt,5,2,"div",1),n&2&&k(t.galleryMode?0:1)},dependencies:[X,J],encapsulation:2});let o=r;return o})();var h={BASE:`${ee}/shares`,LIST:"list",CHILDREN:"children",LINKS:"links",LINKS_LIST:"links/list",LINKS_UUID:"links/uuid"},It=`${h.BASE}/${h.LIST}`,q=`${h.BASE}/${h.LINKS}`,wt=`${h.BASE}/${h.LINKS_LIST}`,xt=`${h.BASE}/${h.LINKS_UUID}`;var Lt=(()=>{let r=class r{constructor(){this.http=S(Z),this.router=S(Y)}getShare(e){return this.http.get(`${h.BASE}/${e}`).pipe(b(n=>new T(n)))}createShare(e){return this.http.post(h.BASE,e).pipe(b(n=>new T(n)))}updateShare(e){return this.http.put(`${h.BASE}/${e.id}`,e).pipe(b(n=>new T(n)))}deleteShare(e){return this.http.delete(`${h.BASE}/${e}`)}listShares(){return this.http.get(It)}getShareChild(e,n){return this.http.get(`${h.BASE}/${e}/${h.CHILDREN}/${n}`).pipe(b(t=>new T(t)))}updateShareChild(e,n,t){return this.http.put(`${h.BASE}/${e}/${h.CHILDREN}/${n}`,t).pipe(b(c=>new T(c)))}deleteShareChild(e,n){return this.http.delete(`${h.BASE}/${e}/${h.CHILDREN}/${n}`)}listChildShares(e){return this.http.get(`${h.BASE}/${e}/${h.CHILDREN}`)}initShareFromFile(e,n,t=!1,c=!1){let g,E=null,A=y({id:0,name:"",createdAt:new Date,modifiedAt:new Date,enabled:!0},t?{parent:{id:0,ownerId:0,alias:n.space.alias,name:n.space.name}}:{});if(n){c&&(E=n.root.id);let ge=null;(n?.root?.owner.login===e.login||!n?.space?.alias)&&(n.space=null,ge=e.id),g=new T(I(y({},A),{name:n.name,file:I(y({},n),{path:c?".":st(n.path,2),ownerId:ge})}))}else g=new T(A);return[g,E]}goTo(e){if(!e.id)return Ce(V(!1));if(e.externalPath&&!e.parent?.id)return this.router.navigate([H.SPACES_SHARES],{queryParams:{select:e.name}});if(e.parent?.id&&!e.file?.id&&e.file?.path.indexOf("/")===-1)return this.router.navigate([H.SPACES_SHARES],{queryParams:{select:e.parent.name}});{let[n,t]=bt(e);return this.router.navigate([n],{queryParams:{select:t}})}}};r.\u0275fac=function(n){return new(n||r)},r.\u0275prov=P({token:r,factory:r.\u0275fac,providedIn:"root"});let o=r;return o})();var U={BASE:`${ee}/link`,LINK:"link",VALIDATION:"validation",ACCESS:"access",AUTH:"auth"},Tt=`${U.BASE}/${U.VALIDATION}`,Se=`${U.BASE}/${U.ACCESS}`,Dt=`${U.BASE}/${U.AUTH}`;var Nt=new ye("WindowToken",typeof window<"u"&&window.document?{providedIn:"root",factory:()=>window}:{providedIn:"root",factory:()=>{}});var Rt=(()=>{class o{constructor(i,e,n){this.ngZone=i,this.document=e,this.window=n,this.copySubject=new ke,this.copyResponse$=this.copySubject.asObservable(),this.config={}}configure(i){this.config=i}copy(i){if(!this.isSupported||!i)return this.pushCopyResponse({isSuccess:!1,content:i});let e=this.copyFromContent(i);return e?this.pushCopyResponse({content:i,isSuccess:e}):this.pushCopyResponse({isSuccess:!1,content:i})}get isSupported(){return!!this.document.queryCommandSupported&&!!this.document.queryCommandSupported("copy")&&!!this.window}isTargetValid(i){if(i instanceof HTMLInputElement||i instanceof HTMLTextAreaElement){if(i.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');return!0}throw new Error("Target should be input or textarea")}copyFromInputElement(i,e=!0){try{this.selectTarget(i);let n=this.copyText();return this.clearSelection(e?i:void 0,this.window),n&&this.isCopySuccessInIE11()}catch{return!1}}isCopySuccessInIE11(){let i=this.window.clipboardData;return!(i&&i.getData&&!i.getData("Text"))}copyFromContent(i,e=this.document.body){if(this.tempTextArea&&!e.contains(this.tempTextArea)&&this.destroy(this.tempTextArea.parentElement||void 0),!this.tempTextArea){this.tempTextArea=this.createTempTextArea(this.document,this.window);try{e.appendChild(this.tempTextArea)}catch{throw new Error("Container should be a Dom element")}}this.tempTextArea.value=i;let n=this.copyFromInputElement(this.tempTextArea,!1);return this.config.cleanUpAfterCopy&&this.destroy(this.tempTextArea.parentElement||void 0),n}destroy(i=this.document.body){this.tempTextArea&&(i.removeChild(this.tempTextArea),this.tempTextArea=void 0)}selectTarget(i){return i.select(),i.setSelectionRange(0,i.value.length),i.value.length}copyText(){return this.document.execCommand("copy")}clearSelection(i,e){i&&i.focus(),e.getSelection()?.removeAllRanges()}createTempTextArea(i,e){let n=i.documentElement.getAttribute("dir")==="rtl",t;t=i.createElement("textarea"),t.style.fontSize="12pt",t.style.border="0",t.style.padding="0",t.style.margin="0",t.style.position="absolute",t.style[n?"right":"left"]="-9999px";let c=e.pageYOffset||i.documentElement.scrollTop;return t.style.top=c+"px",t.setAttribute("readonly",""),t}pushCopyResponse(i){this.copySubject.observers.length>0&&this.ngZone.run(()=>{this.copySubject.next(i)})}pushCopyReponse(i){this.pushCopyResponse(i)}}return o.\u0275fac=function(i){return new(i||o)(j(Ae),j(be),j(Nt,8))},o.\u0275prov=P({token:o,factory:o.\u0275fac,providedIn:"root"}),o})();var Pt=(()=>{let r=class r{constructor(){this.router=S(Y),this.http=S(Z),this.layout=S(B),this.authService=S(kt),this.clipboard=S(Rt)}shareLinksList(){return this.http.get(wt).pipe(b(e=>e.map(n=>new te(n))))}shareLink(e){return this.http.get(`${q}/${e}`).pipe(b(n=>new te(n)))}shareLinkChild(e,n){return this.http.get(`${q}/${e}/${h.CHILDREN}/${n}`).pipe(b(t=>new te(t)))}linkFromSpaceOrShare(e,n,t){return this.http.get(`${q}/${e}/${t}/${n}`)}linkValidation(e){return this.http.get(`${Tt}/${e}`).pipe(b(n=>n.ok?n.link:(n.error&&(n.error===ue.UNAUTHORIZED?this.router.navigate([`${N.LINK}/${e}/${N.AUTH}`]).catch(console.error):this.router.navigate([`${N.LINK}/${e}/${n.error}`]).catch(console.error)),!1)),oe(()=>(this.authService.logout(),V(!1))))}linkAccess(e,n){n.share?.isDir||n.space?.alias?this.http.get(`${Se}/${e}`).subscribe(t=>{this.authService.initUserFromResponse(t),n.space?this.router.navigate([H.SPACES],{queryParams:{select:n.space.name}}).catch(console.error):this.router.navigate([H.SPACES_SHARES],{queryParams:{select:n.share.name}}).catch(console.error)}):lt(`${Se}/${e}`)}linkAuthentication(e,n){return this.http.post(`${Dt}/${e}`,{password:n}).pipe(b(t=>(this.authService.initUserFromResponse(t),this.router.navigate([`${N.LINK}/${e}`]).catch(console.error),!0)),oe(t=>(t.error.message===ue.UNAUTHORIZED?this.layout.sendNotification("warning","Link","Bad password"):this.router.navigate([`${N.LINK}/${e}/${t.error.message}`]).catch(console.error),V(!1))))}copyLinkToClipboard(e){this.clipboard.copyFromContent(this.genLink(e))}genUUID(){return this.http.get(xt).pipe(b(e=>e.uuid))}createLinkDialog(e){this.genUUID().subscribe(n=>{let t=this.layout.openDialog(ne,"md",{initialState:{link:{name:e.name,uuid:n,isActive:!0,nbAccess:0}}});this.subscribeToSubmitLinkModal(t,e)})}updateLinkFromSpaceOrShare(e,n,t,c){return this.http.put(`${q}/${e}/${t}/${n}`,c)}editLinkDialog(e,n,t){if(n.id===0||e?.linkSettings?.uuid){let c=this.layout.openDialog(ne,"md",{initialState:{link:e.linkSettings}});this.subscribeToSubmitLinkModal(c,n,e)}else this.linkFromSpaceOrShare(e.linkId,n.id,t).subscribe({next:c=>{let g=this.layout.openDialog(ne,"md",{initialState:{link:I(y({},c),{permissions:e.permissions})}});this.subscribeToSubmitLinkModal(g,n,e)},error:c=>this.layout.sendNotification("error","Link error",e.name||n.name,c)})}shareLinkGuestToMember(e,n,t){return new ft({id:e,linkId:n,name:t.name,description:t.email,createdAt:t.createdAt,permissions:t.permissions,type:ht.LINK,spaceRole:ct.IS_MEMBER,linkSettings:t},[L.SHARE_INSIDE,L.SHARE_OUTSIDE])}subscribeToSubmitLinkModal(e,n,t){e.content.submitEvent.pipe(ve(1)).subscribe(c=>{if(Object.keys(c).length){let g=Object.assign(e.content.link,c),E=this.shareLinkGuestToMember(g.userId||-(n.links.length+1),t?.linkId||-(n.links.length+1),g);E.linkId?n.links=[E,...n.links.filter(A=>A.linkId!==E.linkId)]:n.links=[E,...n.links]}e.content.layout.closeDialog()})}genLink(e){return`${document.location.origin}/#/${N.LINK}/${e}`}};r.\u0275fac=function(n){return new(n||r)},r.\u0275prov=P({token:r,factory:r.\u0275fac,providedIn:"root"});let o=r;return o})();var Ut=o=>({dateInputFormat:"YYYY-MM-DD",containerClass:"theme-dark-blue",returnFocusToInput:!0,minDate:o,showWeekNumbers:!1}),Vt=(o,r)=>r.key;function Kt(o,r){o&1&&(s(0,"span",4),p(1,"Edit link"),a())}function qt(o,r){o&1&&(s(0,"span",4),p(1,"New link"),a())}function jt(o,r){o&1&&d(0,"div",54)}function Wt(o,r){if(o&1){let i=G();s(0,"button",53),C(1,"translate"),pe("ngModelChange",function(n){let t=F(i).$implicit,c=u(3);return ce(c.permissions[t.key],n)||(c.permissions[t.key]=n),M(n)}),w("ngModelChange",function(){F(i);let n=u(3);return M(n.onPermissionChange())}),d(2,"fa-icon",50),a(),_(3,jt,1,0,"div",54)}if(o&2){let i=r.$implicit,e=r.$index,n=r.$count,t=u(3);le("ngModel",t.permissions[i.key]),m("tooltip",v(1,4,t.SPACES_PERMISSIONS_TEXT[i.key].text,t.locale.language)),l(2),m("icon",t.SPACES_PERMISSIONS_TEXT[i.key].icon),l(),k(e===n-1?3:-1)}}function Gt(o,r){if(o&1&&(se(0,Wt,4,7,null,null,Vt),C(2,"keyvalue")),o&2){let i=u(2);ae(v(2,0,i.permissions,i.originalOrderKeyValue))}}function Zt(o,r){if(o&1&&(s(0,"div",51),d(1,"app-share-repository",55),a()),o&2){let i=u(2);l(),m("share",i.share)("showIcon",!0)("showFullPath",!0)}}function Yt(o,r){if(o&1){let i=G();s(0,"div",44),d(1,"fa-icon",45),s(2,"div",46)(3,"span"),p(4),a(),s(5,"span",47),p(6),a()(),s(7,"div",48),_(8,Gt,3,3),s(9,"button",49),C(10,"translate"),w("click",function(){F(i);let n=u();return M(n.toggleRequireAuth())}),d(11,"fa-icon",50),a(),s(12,"button",49),C(13,"translate"),w("click",function(){F(i);let n=u();return M(n.copyToClipboard())}),d(14,"fa-icon",50),a()()(),_(15,Zt,2,3,"div",51),d(16,"hr",52)}if(o&2){let i=u();l(),m("icon",i.icons.links),l(3),$(i.linkForm.value.name||i.linkForm.value.shareName),l(2),$(i.linkForm.value.email),l(2),k(i.share&&i.permissions?8:-1),l(),x(O("btn btn-sm ",i.linkForm.value.requireAuth?"btn-success":"btn-warning")),m("tooltip",v(10,15,"Password",i.locale.language)),l(2),m("icon",i.linkForm.value.requireAuth?i.icons.faLock:i.icons.faLockOpen),l(),x(O("btn btn-sm ms-2 ",i.linkWasCopied?"btn-info":"btn-secondary")),m("tooltip",v(13,18,"Copy link",i.locale.language)),l(2),m("icon",i.linkWasCopied?i.icons.faClipboardCheck:i.icons.faClipboard),l(),k(i.share?15:-1)}}function Xt(o,r){if(o&1&&(s(0,"span"),p(1),a()),o&2){let i=u();x(O("badge rounded-pill ",(i.share?i.share.link.nbAccess:i.link.nbAccess)>=i.linkForm.value.limitAccess?"bg-danger":"bg-success")),l(),xe(" ",i.share?i.share.link.nbAccess:i.link.nbAccess,"/",i.linkForm.value.limitAccess," ")}}function zt(o,r){if(o&1&&(s(0,"span",20),p(1),a()),o&2){let i=u();l(),$(i.share?i.share.link.nbAccess:i.link.nbAccess)}}function Qt(o,r){if(o&1&&(s(0,"div",27)(1,"label",56),p(2,"Share name"),a(),d(3,"input",57),C(4,"translate"),a(),s(5,"div",27)(6,"label",58),p(7,"Share description"),a(),d(8,"input",59),C(9,"translate"),a()),o&2){let i=u();l(3),K("is-invalid",i.linkForm.controls.shareName.invalid),m("placeholder",v(4,4,"Share name",i.locale.language)),l(5),m("placeholder",v(9,7,"Share description",i.locale.language))}}function Jt(o,r){if(o&1&&(s(0,"option",30),p(1),a()),o&2){let i=r.$implicit;m("ngValue",i),l(),$(i)}}function ei(o,r){if(o&1&&(s(0,"div",37),d(1,"app-password-strength-bar",60),a()),o&2){let i=u();l(),m("passwordToCheck",i.password)}}function ti(o,r){if(o&1){let i=G();s(0,"button",61),w("click",function(){F(i);let n=u();return M(n.confirmDeletion=!0)}),p(1," Remove "),a()}if(o&2){let i=u();m("disabled",i.confirmDeletion)}}var ne=(()=>{let r=class r{constructor(){this.layout=S(B),this.parentSpaceId=null,this.isSharesRepo=!1,this.inSharesList=!1,this.submitEvent=new re,this.shareChange=new re,this.locale=S(Q),this.confirmDeletion=!1,this.submitted=!1,this.SPACES_PERMISSIONS_TEXT=mt,this.originalOrderKeyValue=at,this.icons={faEye:Je,faEyeSlash:ot,links:R.LINKS,faClipboard:tt,faClipboardCheck:et,faLock:nt,faLockOpen:it},this.languages=this.layout.getLanguages(),this.minDate=he(),this.defaultPassword=this.layout.translateString(rt),this.passwordMinLength=8,this.password="",this.linkIsExpired=!1,this.linkIsHovered=!1,this.linkWasCopied=!1,this.userService=S(St),this.sharesService=S(Lt),this.linksService=S(Pt),this.spacesService=S(Et),this.minDate.setDate(this.minDate.getDate()+1)}ngOnInit(){this.link?this.initLink():this.file?this.initFile():this.initShareLink(),this.linkForm.value.requireAuth&&(this.password=this.defaultPassword),this.linkForm.value.expiresAt&&this.isLinkIsExpired(this.share?this.share.link.expiresAt:this.link.expiresAt),this.linkForm.controls.expiresAt.valueChanges.subscribe(e=>this.isLinkIsExpired(e))}onPermissionChange(){let e=ut(this.permissions);this.linkForm.controls.permissions.setValue(e),e!==this.share.link.permissions?this.linkForm.controls.permissions.markAsDirty():this.linkForm.controls.permissions.markAsPristine()}toggleRequireAuth(){this.linkForm.controls.requireAuth.setValue(!this.linkForm.value.requireAuth),this.linkForm.controls.requireAuth.markAsDirty()}copyToClipboard(){this.linksService.copyLinkToClipboard(this.share?this.share.link.uuid:this.link.uuid),this.linkWasCopied=!0,this.layout.sendNotification("info","Link copied",this.linkForm.value.name||this.linkForm.value.shareName),setTimeout(()=>this.linkWasCopied=!1,3e3)}onCancel(){this.confirmDeletion?this.confirmDeletion=!1:this.layout.closeDialog()}onSubmit(){if(this.submitted=!0,this.confirmDeletion){(this.parentSpaceId?this.spacesService.deleteSpaceShare(this.parentSpaceId,this.share.id):this.sharesService.deleteShare(this.share.id)).subscribe({next:()=>{this.layout.sendNotification("success","Link deleted",this.share.link.name||this.share.name),this.shareChange.emit(["delete",this.share]),this.layout.closeDialog()},error:c=>{this.layout.sendNotification("error","Delete share",this.share.name,c),this.layout.closeDialog()}});return}if(this.file?.id){let n=this.share,{link:t}=n,c=_e(n,["link"]),g=I(y(y({},t),this.linkForm.value),{password:this.mustIncludePassword()?this.password:void 0});c.name=de("shareName",g),c.description=de("shareDescription",g);let E=this.linksService.shareLinkGuestToMember(-1,-1,g);this.sharesService.createShare(I(y({},c),{type:yt.LINK,links:[E]})).subscribe({next:A=>{this.shareChange.emit(["add",A]),this.layout.sendNotification("success","Link created",t.name||A.name),this.layout.closeDialog()},error:A=>{this.layout.sendNotification("error","Link error",this.share.name,A),this.layout.closeDialog()}});return}let e={};for(let t in this.linkForm.controls)this.linkForm.controls[t].dirty&&(e[t]=this.linkForm.controls[t].value);if(this.mustIncludePassword()&&(e.password=this.password),this.share?.id){Object.keys(e).length&&this.linksService.updateLinkFromSpaceOrShare(this.share.link.id,this.share.id,pt.SHARE,e).subscribe({next:t=>{this.share.name=this.linkForm.value.shareName,this.share.description=this.linkForm.value.shareDescription,this.share.link=Object.assign(this.share.link,t),this.share.updateTimes(),this.share.updatePermission(),this.shareChange.emit(["update",this.share]),this.layout.closeDialog()},error:t=>{this.layout.sendNotification("error","Link error",this.share.link.name||this.share.name,t),this.layout.closeDialog()}}),this.layout.closeDialog();return}this.submitEvent.emit(e)}initFile(){let e=this.sharesService.initShareFromFile(this.userService.user,this.file,this.isSharesRepo,this.inSharesList)[0];this.share=I(y({},e),{link:{id:-1,userId:-1,uuid:"",isActive:!0,requireAuth:!1,permissions:"",nbAccess:0,limitAccess:0}}),this.linksService.genUUID().subscribe(n=>this.share.link.uuid=n),this.initShareLink(),this.onPermissionChange()}initShareLink(){this.linkForm=new me({shareName:new f(this.share.name,z.required),shareDescription:new f(this.share.description||""),name:new f(this.share.link?.name||""),email:new f(this.share.link?.email||"",z.email),language:new f(this.share.link.language||null),limitAccess:new f(this.share.link.limitAccess||null),expiresAt:new f(this.share.link.expiresAt||null),requireAuth:new f(this.share.link.requireAuth||!1),permissions:new f(this.share.link.permissions),isActive:new f(this.share.link.isActive)}),this.permissions=dt(this.share.file.permissions,this.share.link.permissions,[L.SHARE_INSIDE,L.SHARE_OUTSIDE,...this.share.file.isDir?[]:[L.DELETE,L.ADD]])}initLink(){this.linkForm=new me({shareName:new f(""),shareDescription:new f(""),name:new f(this.link.name||""),email:new f(this.link.email||"",z.email),language:new f(this.link.language||null),limitAccess:new f(this.link.limitAccess||null),expiresAt:new f(this.link.expiresAt||null),requireAuth:new f(this.link.requireAuth||!1),permissions:new f(this.link.permissions),isActive:new f(this.link.isActive)}),this.link.id||(this.linkForm.controls.name.markAsDirty(),this.linkForm.controls.isActive.markAsDirty())}isLinkIsExpired(e){if(e==null){if(this.linkIsExpired=!1,e===null)return;this.linkForm.controls.expiresAt.setValue(null)}this.linkIsExpired=he()>=e}mustIncludePassword(){return!!this.password.length&&this.password!==this.defaultPassword}};r.\u0275fac=function(n){return new(n||r)},r.\u0275cmp=W({type:r,selectors:[["app-link-dialog"]],inputs:{share:"share",parentSpaceId:"parentSpaceId",link:"link",file:"file",isSharesRepo:"isSharesRepo",inSharesList:"inSharesList"},outputs:{submitEvent:"submitEvent",shareChange:"shareChange"},decls:73,vars:52,consts:[[1,"modal-header","align-items-center"],[1,"modal-title"],[1,"me-2",3,"icon"],[1,"modal-title","ms-auto"],["l10nTranslate",""],["aria-label","Close","type","button",1,"btn-close","btn-close-white","ms-2",3,"click"],[1,"modal-body"],["autocomplete","off",3,"formGroup"],[1,"d-flex"],[1,"d-flex","flex-column","flex-grow-1"],[1,"d-flex","align-items-center","cursor-pointer","py-2",3,"mouseover","mouseleave","focus","click"],["for","link","l10nTranslate",""],["id","link",1,"ms-auto"],[1,"d-flex","align-items-center","py-2"],["for","state","l10nTranslate","",1,"cursor-pointer","me-auto"],[1,"d-flex","align-items-center","form-check","form-switch","cursor-pointer"],["id","state","formControlName","isActive","type","checkbox","role","button",1,"form-check-input"],["for","access","l10nTranslate",""],["id","access",1,"ms-auto"],[3,"class"],[1,"badge","rounded-pill","bg-success"],[1,"d-flex","align-items-center"],["for","guestName","l10nTranslate",""],["id","guestName","formControlName","name","type","text",1,"form-control","form-control-sm","ms-auto","w-50",3,"placeholder"],[1,"d-flex","align-items-center","justify-content-between","px-0"],["for","guestEmail","l10nTranslate",""],["id","guestEmail","autocomplete","off","formControlName","email","type","email",1,"form-control","form-control-sm","ms-auto","w-50",3,"placeholder"],[1,"d-flex","align-items-center","justify-content-between"],["for","guestLanguage","l10nTranslate",""],["id","guestLanguage","formControlName","language",1,"form-control","form-select","form-select-sm","ms-auto","w-50"],[3,"ngValue"],["for","limitAccess","l10nTranslate",""],["id","limitAccess","formControlName","limitAccess","min","1","type","number",1,"form-control","form-control-sm","ms-auto","w-50",3,"placeholder"],["for","expiration","l10nTranslate",""],["id","expiration","formControlName","expiresAt","placement","left","type","text","bsDatepicker","",1,"form-control","form-control-sm","ms-auto","w-50",3,"placeholder","bsConfig"],[1,"d-flex","align-items-center","px-0"],["for","requireAuth","translate","",1,"cursor-pointer","me-auto"],[1,"d-flex","align-items-center","d-none","d-sm-flex","mx-auto"],["id","requireAuth","formControlName","requireAuth","type","checkbox","role","button",1,"form-check-input"],["placeholder","Set a password",2,"width","45%",3,"passwordChange","isRequired","disabled","passwordMinLength","password","showGenerator"],[1,"modal-footer"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-danger",3,"disabled"],["data-dismiss","modal","type","button","l10nTranslate","",1,"btn","btn-sm","btn-secondary","ms-auto",3,"click"],["type","button","l10nTranslate","",3,"click","disabled"],[1,"d-flex","flex-fill","align-items-center"],[1,"circle-primary-icon","me-2",3,"icon"],[1,"d-flex","flex-column"],[1,"fs-xxxs"],[1,"d-flex","ms-auto"],["container","body","type","button",3,"click","tooltip"],["size","lg",3,"icon"],[1,"d-flex","align-items-center","d-none","d-sm-flex","py-2"],[1,"my-2"],["btnCheckbox","","type","button",1,"btn","btn-sm","btn-custom","me-0","ms-2",3,"ngModelChange","ngModel","tooltip"],[1,"vr","mx-2"],["id","file",3,"share","showIcon","showFullPath"],["for","shareName","l10nTranslate",""],["id","shareName","formControlName","shareName","type","email",1,"form-control","form-control-sm","ms-auto","w-50",3,"placeholder"],["for","shareDescription","l10nTranslate",""],["id","shareDescription","formControlName","shareDescription","type","email",1,"form-control","form-control-sm","ms-auto","w-50",3,"placeholder"],[3,"passwordToCheck"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-danger",3,"click","disabled"]],template:function(n,t){n&1&&(s(0,"div",0)(1,"h4",1),d(2,"fa-icon",2),s(3,"span"),p(4),a()(),s(5,"h4",3),_(6,Kt,2,0,"span",4)(7,qt,2,0,"span",4),a(),s(8,"button",5),w("click",function(){return t.layout.closeDialog()}),a()(),s(9,"div",6),_(10,Yt,17,21),s(11,"form",7)(12,"div",8)(13,"div",9)(14,"div",10),w("mouseover",function(){return t.linkIsHovered=!0})("mouseleave",function(){return t.linkIsHovered=!1})("focus",function(){return t.linkIsHovered=!0})("click",function(){return t.copyToClipboard()}),s(15,"label",11),p(16,"Link"),a(),s(17,"span",12),p(18),a()(),s(19,"div",13)(20,"label",14),p(21,"Active"),a(),s(22,"div",15),d(23,"input",16),s(24,"span"),p(25),C(26,"translate"),a()()(),s(27,"div",13)(28,"label",17),p(29,"Current access count"),a(),s(30,"span",18),_(31,Xt,2,5,"span",19)(32,zt,2,1,"span",20),a()(),_(33,Qt,10,10),s(34,"div",21)(35,"label",22),p(36,"Guest name"),a(),d(37,"input",23),C(38,"translate"),a(),s(39,"div",24)(40,"label",25),p(41,"Guest email"),a(),d(42,"input",26),C(43,"translate"),a(),s(44,"div",27)(45,"label",28),p(46,"Guest language"),a(),s(47,"select",29),se(48,Jt,2,2,"option",30,Ie),a()(),s(50,"div",27)(51,"label",31),p(52,"Limit access"),a(),d(53,"input",32),C(54,"translate"),a(),s(55,"div",27)(56,"label",33),p(57,"Expiration"),a(),d(58,"input",34),C(59,"translate"),a(),s(60,"div",35)(61,"label",36),p(62,"Password"),a(),_(63,ei,2,1,"div",37),s(64,"div",15),d(65,"input",38),a(),s(66,"app-input-password",39),pe("passwordChange",function(g){return ce(t.password,g)||(t.password=g),g}),a()()()()()(),s(67,"div",40),_(68,ti,2,1,"button",41),s(69,"button",42),w("click",function(){return t.onCancel()}),p(70,"Cancel"),a(),s(71,"button",43),w("click",function(){return t.onSubmit()}),p(72),a()()),n&2&&(l(2),m("icon",t.icons.links),l(2),$(t.linkForm.value.name||t.linkForm.value.shareName),l(2),k(t.share!=null&&t.share.id||t.link!=null&&t.link.id?6:7),l(4),k(t.share||t.link?10:-1),l(),m("formGroup",t.linkForm),l(6),K("text-primary",t.linkIsHovered),l(),D(" ",t.share?t.share.link.uuid:t.link.uuid," "),l(6),x(O("badge rounded-pill ms-3 ",t.linkForm.value.isActive?"bg-primary":"bg-danger")),l(),D(" ",v(26,35,t.linkForm.value.isActive?"yes":"no",t.locale.language)," "),l(6),k(t.linkForm.value.limitAccess?31:32),l(2),k(t.share?33:-1),l(4),m("placeholder",v(38,38,"Guest name",t.locale.language)),l(5),K("is-invalid",t.linkForm.controls.email.invalid),m("placeholder",v(43,41,"Guest email",t.locale.language)),l(6),ae(t.languages),l(5),m("placeholder",v(54,44,"Unlimited",t.locale.language)),l(5),K("text-danger",t.linkIsExpired),m("placeholder",v(59,47,"Unlimited",t.locale.language))("bsConfig",Le(50,Ut,t.minDate)),l(5),k(t.linkForm.value.requireAuth&&t.password!==t.defaultPassword?63:-1),l(3),m("isRequired",t.linkForm.value.requireAuth)("disabled",!t.linkForm.value.requireAuth)("passwordMinLength",t.passwordMinLength),le("password",t.password),m("showGenerator",!0),l(2),k(t.share!=null&&t.share.id?68:-1),l(3),x(O("btn btn-sm ",t.confirmDeletion?"btn-danger":"btn-primary")),m("disabled",t.linkForm.invalid||t.linkForm.controls.requireAuth.value&&t.password.length<t.passwordMinLength||t.submitted),l(),D(" ",t.confirmDeletion?"Confirm deletion":"Confirm"," "))},dependencies:[X,We,ze,Ye,Xe,_t,gt,qe,Me,Ue,Ve,Ne,$e,De,He,Re,Pe,Ke,Fe,Ct,Ze,Ge,je,Oe,Be,At,vt,Te,J],encapsulation:2});let o=r;return o})();export{Rt as a,At as b,Lt as c,ne as d,Pt as e};
1
+ import{a as yt,c as bt,d as T,e as te,g as Et}from"./chunk-YCINY2YI.js";import{a as Ct,b as vt}from"./chunk-FQ4AFNGE.js";import{f as kt}from"./chunk-DGVNNICG.js";import{f as St,g as gt,h as _t}from"./chunk-MOVWEZ7J.js";import{A as ze,Ca as he,Ea as de,Gb as fe,Hb as R,Ib as H,Jb as mt,La as st,Lb as ht,Nb as dt,Pb as ut,Qb as ft,S as ee,Xa as at,Za as lt,lb as L,ob as ct,v as Ge,va as rt,w as Ze,wb as B,y as Ye,z as Xe}from"./chunk-Y2CDUS4J.js";import{d as Y}from"./chunk-XE5YHU5J.js";import{$b as Le,$c as De,Cb as w,Eb as u,Ed as J,Fd as We,G as oe,Gc as Te,Jd as Qe,L as ve,Lf as ot,Ma as l,Mb as we,Nb as K,Ob as x,Oc as Z,Pb as p,Qb as $,Rb as D,Sb as xe,Tb as le,Ub as ce,Vb as pe,Xa as W,Xb as O,Zc as X,ad as Ne,bb as re,be as Je,bg as ue,ca as P,cb as Ae,cd as z,ce as et,cg as pt,dc as C,dg as N,ed as Re,f as ke,fa as ye,fc as v,fd as Pe,ga as j,gd as me,ha as S,id as f,jb as _,jd as Fe,kb as k,kd as Me,lb as Ie,ld as $e,lf as it,ma as F,na as M,nb as se,nd as Oe,ob as ae,od as Be,p as V,pa as be,pb as m,pd as He,qb as s,qd as Ue,rb as a,rd as Ve,sb as d,sd as Ke,t as Ce,te as tt,tf as nt,v as b,va as Ee,wd as qe,xd as je,yd as Q,zb as G}from"./chunk-RSNLYAN6.js";import{a as y,b as I,c as _e}from"./chunk-RTRJ3KFH.js";function Ft(o,r){if(o&1&&d(0,"fa-icon",2),o&2){let i=u();x(i.repository.class),we("min-width",i.galleryMode.dimensions/3,"px")("min-height",i.galleryMode.dimensions/3,"px")("font-size",i.galleryMode.faSize/1.8,"px"),m("icon",i.repository.icon)}}function Mt(o,r){if(o&1&&d(0,"fa-icon",5),o&2){let i=u(2);x(i.repository.class),m("icon",i.repository.icon)}}function $t(o,r){if(o&1&&(p(0),C(1,"translate")),o&2){let i=u(2);D(" ",v(1,1,i.repository.label,i.locale.language)," ")}}function Ot(o,r){if(o&1&&p(0),o&2){let i=u(2);D(" ",i.repository.label," ")}}function Bt(o,r){if(o&1&&(s(0,"div",1),_(1,Mt,1,3,"fa-icon",3),s(2,"span",4),_(3,$t,2,4)(4,Ot,1,1),a()()),o&2){let i=u();l(),k(i.showIcon?1:-1),l(2),k(i.repository.translate?3:4)}}var At=(()=>{let r=class r{constructor(){this.showIcon=!0,this.showFullPath=!1,this.locale=S(Q),this.layout=S(B),this.unknownRepository={icon:Qe,label:"",class:"circle-primary-icon",translate:!1}}ngOnInit(){this.setRepository()}ngOnChanges(){this.setRepository()}setRepository(){this.share.parent?.id||this.share.parent?.id===0?this.repository={icon:R.SHARES,label:this.share.parent.name,class:"circle-purple-icon",translate:!1}:this.share.file?.ownerId?this.repository={icon:R.PERSONAL,label:fe.PERSONAL_FILES,class:"circle-primary-icon",translate:!0}:this.share.file?.space?.alias?this.repository={icon:R.SPACES,label:`${this.share.file.space.name}`,class:"circle-primary-icon",translate:!1}:this.share.externalPath?this.repository={icon:R.EXTERNAL,label:"External",class:"circle-primary-icon",translate:!0}:this.repository=y({},this.unknownRepository),this.showFullPath&&this.setFullPath()}setFullPath(){if(!this.repository.label)return;let e=this.share.file?.path?this.share.file.path.split("/").filter(n=>n&&n!=="."):[];this.share.parent?.id&&!this.share.file?.id&&this.share.file?.path.indexOf("/")===-1?e.shift():this.share.file?.space?.alias&&this.share.file.space?.root?.alias&&(e.length?e.unshift(this.share.file.space.root.name):e.push(this.share.file.space.root.name)),this.repository.label===fe.PERSONAL_FILES&&(this.repository.label=this.layout.translateString(this.repository.label)),e.length&&(this.repository.label=`${this.repository.label}/${e.join("/")}`)}};r.\u0275fac=function(n){return new(n||r)},r.\u0275cmp=W({type:r,selectors:[["app-share-repository"]],inputs:{share:"share",galleryMode:"galleryMode",showIcon:"showIcon",showFullPath:"showFullPath"},features:[Ee],decls:2,vars:1,consts:[[3,"icon","class","min-width","min-height","font-size"],[1,"d-flex","align-items-center"],[3,"icon"],[1,"me-2",3,"icon","class"],["draggable","false",1,"no-pointer-events"],[1,"me-2",3,"icon"]],template:function(n,t){n&1&&_(0,Ft,1,9,"fa-icon",0)(1,Bt,5,2,"div",1),n&2&&k(t.galleryMode?0:1)},dependencies:[X,J],encapsulation:2});let o=r;return o})();var h={BASE:`${ee}/shares`,LIST:"list",CHILDREN:"children",LINKS:"links",LINKS_LIST:"links/list",LINKS_UUID:"links/uuid"},It=`${h.BASE}/${h.LIST}`,q=`${h.BASE}/${h.LINKS}`,wt=`${h.BASE}/${h.LINKS_LIST}`,xt=`${h.BASE}/${h.LINKS_UUID}`;var Lt=(()=>{let r=class r{constructor(){this.http=S(Z),this.router=S(Y)}getShare(e){return this.http.get(`${h.BASE}/${e}`).pipe(b(n=>new T(n)))}createShare(e){return this.http.post(h.BASE,e).pipe(b(n=>new T(n)))}updateShare(e){return this.http.put(`${h.BASE}/${e.id}`,e).pipe(b(n=>new T(n)))}deleteShare(e){return this.http.delete(`${h.BASE}/${e}`)}listShares(){return this.http.get(It)}getShareChild(e,n){return this.http.get(`${h.BASE}/${e}/${h.CHILDREN}/${n}`).pipe(b(t=>new T(t)))}updateShareChild(e,n,t){return this.http.put(`${h.BASE}/${e}/${h.CHILDREN}/${n}`,t).pipe(b(c=>new T(c)))}deleteShareChild(e,n){return this.http.delete(`${h.BASE}/${e}/${h.CHILDREN}/${n}`)}listChildShares(e){return this.http.get(`${h.BASE}/${e}/${h.CHILDREN}`)}initShareFromFile(e,n,t=!1,c=!1){let g,E=null,A=y({id:0,name:"",createdAt:new Date,modifiedAt:new Date,enabled:!0},t?{parent:{id:0,ownerId:0,alias:n.space.alias,name:n.space.name}}:{});if(n){c&&(E=n.root.id);let ge=null;(n?.root?.owner.login===e.login||!n?.space?.alias)&&(n.space=null,ge=e.id),g=new T(I(y({},A),{name:n.name,file:I(y({},n),{path:c?".":st(n.path,2),ownerId:ge})}))}else g=new T(A);return[g,E]}goTo(e){if(!e.id)return Ce(V(!1));if(e.externalPath&&!e.parent?.id)return this.router.navigate([H.SPACES_SHARES],{queryParams:{select:e.name}});if(e.parent?.id&&!e.file?.id&&e.file?.path.indexOf("/")===-1)return this.router.navigate([H.SPACES_SHARES],{queryParams:{select:e.parent.name}});{let[n,t]=bt(e);return this.router.navigate([n],{queryParams:{select:t}})}}};r.\u0275fac=function(n){return new(n||r)},r.\u0275prov=P({token:r,factory:r.\u0275fac,providedIn:"root"});let o=r;return o})();var U={BASE:`${ee}/link`,LINK:"link",VALIDATION:"validation",ACCESS:"access",AUTH:"auth"},Tt=`${U.BASE}/${U.VALIDATION}`,Se=`${U.BASE}/${U.ACCESS}`,Dt=`${U.BASE}/${U.AUTH}`;var Nt=new ye("WindowToken",typeof window<"u"&&window.document?{providedIn:"root",factory:()=>window}:{providedIn:"root",factory:()=>{}});var Rt=(()=>{class o{constructor(i,e,n){this.ngZone=i,this.document=e,this.window=n,this.copySubject=new ke,this.copyResponse$=this.copySubject.asObservable(),this.config={}}configure(i){this.config=i}copy(i){if(!this.isSupported||!i)return this.pushCopyResponse({isSuccess:!1,content:i});let e=this.copyFromContent(i);return e?this.pushCopyResponse({content:i,isSuccess:e}):this.pushCopyResponse({isSuccess:!1,content:i})}get isSupported(){return!!this.document.queryCommandSupported&&!!this.document.queryCommandSupported("copy")&&!!this.window}isTargetValid(i){if(i instanceof HTMLInputElement||i instanceof HTMLTextAreaElement){if(i.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');return!0}throw new Error("Target should be input or textarea")}copyFromInputElement(i,e=!0){try{this.selectTarget(i);let n=this.copyText();return this.clearSelection(e?i:void 0,this.window),n&&this.isCopySuccessInIE11()}catch{return!1}}isCopySuccessInIE11(){let i=this.window.clipboardData;return!(i&&i.getData&&!i.getData("Text"))}copyFromContent(i,e=this.document.body){if(this.tempTextArea&&!e.contains(this.tempTextArea)&&this.destroy(this.tempTextArea.parentElement||void 0),!this.tempTextArea){this.tempTextArea=this.createTempTextArea(this.document,this.window);try{e.appendChild(this.tempTextArea)}catch{throw new Error("Container should be a Dom element")}}this.tempTextArea.value=i;let n=this.copyFromInputElement(this.tempTextArea,!1);return this.config.cleanUpAfterCopy&&this.destroy(this.tempTextArea.parentElement||void 0),n}destroy(i=this.document.body){this.tempTextArea&&(i.removeChild(this.tempTextArea),this.tempTextArea=void 0)}selectTarget(i){return i.select(),i.setSelectionRange(0,i.value.length),i.value.length}copyText(){return this.document.execCommand("copy")}clearSelection(i,e){i&&i.focus(),e.getSelection()?.removeAllRanges()}createTempTextArea(i,e){let n=i.documentElement.getAttribute("dir")==="rtl",t;t=i.createElement("textarea"),t.style.fontSize="12pt",t.style.border="0",t.style.padding="0",t.style.margin="0",t.style.position="absolute",t.style[n?"right":"left"]="-9999px";let c=e.pageYOffset||i.documentElement.scrollTop;return t.style.top=c+"px",t.setAttribute("readonly",""),t}pushCopyResponse(i){this.copySubject.observers.length>0&&this.ngZone.run(()=>{this.copySubject.next(i)})}pushCopyReponse(i){this.pushCopyResponse(i)}}return o.\u0275fac=function(i){return new(i||o)(j(Ae),j(be),j(Nt,8))},o.\u0275prov=P({token:o,factory:o.\u0275fac,providedIn:"root"}),o})();var Pt=(()=>{let r=class r{constructor(){this.router=S(Y),this.http=S(Z),this.layout=S(B),this.authService=S(kt),this.clipboard=S(Rt)}shareLinksList(){return this.http.get(wt).pipe(b(e=>e.map(n=>new te(n))))}shareLink(e){return this.http.get(`${q}/${e}`).pipe(b(n=>new te(n)))}shareLinkChild(e,n){return this.http.get(`${q}/${e}/${h.CHILDREN}/${n}`).pipe(b(t=>new te(t)))}linkFromSpaceOrShare(e,n,t){return this.http.get(`${q}/${e}/${t}/${n}`)}linkValidation(e){return this.http.get(`${Tt}/${e}`).pipe(b(n=>n.ok?n.link:(n.error&&(n.error===ue.UNAUTHORIZED?this.router.navigate([`${N.LINK}/${e}/${N.AUTH}`]).catch(console.error):this.router.navigate([`${N.LINK}/${e}/${n.error}`]).catch(console.error)),!1)),oe(()=>(this.authService.logout(),V(!1))))}linkAccess(e,n){n.share?.isDir||n.space?.alias?this.http.get(`${Se}/${e}`).subscribe(t=>{this.authService.initUserFromResponse(t),n.space?this.router.navigate([H.SPACES],{queryParams:{select:n.space.name}}).catch(console.error):this.router.navigate([H.SPACES_SHARES],{queryParams:{select:n.share.name}}).catch(console.error)}):lt(`${Se}/${e}`)}linkAuthentication(e,n){return this.http.post(`${Dt}/${e}`,{password:n}).pipe(b(t=>(this.authService.initUserFromResponse(t),this.router.navigate([`${N.LINK}/${e}`]).catch(console.error),!0)),oe(t=>(t.error.message===ue.UNAUTHORIZED?this.layout.sendNotification("warning","Link","Bad password"):this.router.navigate([`${N.LINK}/${e}/${t.error.message}`]).catch(console.error),V(!1))))}copyLinkToClipboard(e){this.clipboard.copyFromContent(this.genLink(e))}genUUID(){return this.http.get(xt).pipe(b(e=>e.uuid))}createLinkDialog(e){this.genUUID().subscribe(n=>{let t=this.layout.openDialog(ne,"md",{initialState:{link:{name:e.name,uuid:n,isActive:!0,nbAccess:0}}});this.subscribeToSubmitLinkModal(t,e)})}updateLinkFromSpaceOrShare(e,n,t,c){return this.http.put(`${q}/${e}/${t}/${n}`,c)}editLinkDialog(e,n,t){if(n.id===0||e?.linkSettings?.uuid){let c=this.layout.openDialog(ne,"md",{initialState:{link:e.linkSettings}});this.subscribeToSubmitLinkModal(c,n,e)}else this.linkFromSpaceOrShare(e.linkId,n.id,t).subscribe({next:c=>{let g=this.layout.openDialog(ne,"md",{initialState:{link:I(y({},c),{permissions:e.permissions})}});this.subscribeToSubmitLinkModal(g,n,e)},error:c=>this.layout.sendNotification("error","Link error",e.name||n.name,c)})}shareLinkGuestToMember(e,n,t){return new ft({id:e,linkId:n,name:t.name,description:t.email,createdAt:t.createdAt,permissions:t.permissions,type:ht.LINK,spaceRole:ct.IS_MEMBER,linkSettings:t},[L.SHARE_INSIDE,L.SHARE_OUTSIDE])}subscribeToSubmitLinkModal(e,n,t){e.content.submitEvent.pipe(ve(1)).subscribe(c=>{if(Object.keys(c).length){let g=Object.assign(e.content.link,c),E=this.shareLinkGuestToMember(g.userId||-(n.links.length+1),t?.linkId||-(n.links.length+1),g);E.linkId?n.links=[E,...n.links.filter(A=>A.linkId!==E.linkId)]:n.links=[E,...n.links]}e.content.layout.closeDialog()})}genLink(e){return`${document.location.origin}/#/${N.LINK}/${e}`}};r.\u0275fac=function(n){return new(n||r)},r.\u0275prov=P({token:r,factory:r.\u0275fac,providedIn:"root"});let o=r;return o})();var Ut=o=>({dateInputFormat:"YYYY-MM-DD",containerClass:"theme-dark-blue",returnFocusToInput:!0,minDate:o,showWeekNumbers:!1}),Vt=(o,r)=>r.key;function Kt(o,r){o&1&&(s(0,"span",4),p(1,"Edit link"),a())}function qt(o,r){o&1&&(s(0,"span",4),p(1,"New link"),a())}function jt(o,r){o&1&&d(0,"div",54)}function Wt(o,r){if(o&1){let i=G();s(0,"button",53),C(1,"translate"),pe("ngModelChange",function(n){let t=F(i).$implicit,c=u(3);return ce(c.permissions[t.key],n)||(c.permissions[t.key]=n),M(n)}),w("ngModelChange",function(){F(i);let n=u(3);return M(n.onPermissionChange())}),d(2,"fa-icon",50),a(),_(3,jt,1,0,"div",54)}if(o&2){let i=r.$implicit,e=r.$index,n=r.$count,t=u(3);le("ngModel",t.permissions[i.key]),m("tooltip",v(1,4,t.SPACES_PERMISSIONS_TEXT[i.key].text,t.locale.language)),l(2),m("icon",t.SPACES_PERMISSIONS_TEXT[i.key].icon),l(),k(e===n-1?3:-1)}}function Gt(o,r){if(o&1&&(se(0,Wt,4,7,null,null,Vt),C(2,"keyvalue")),o&2){let i=u(2);ae(v(2,0,i.permissions,i.originalOrderKeyValue))}}function Zt(o,r){if(o&1&&(s(0,"div",51),d(1,"app-share-repository",55),a()),o&2){let i=u(2);l(),m("share",i.share)("showIcon",!0)("showFullPath",!0)}}function Yt(o,r){if(o&1){let i=G();s(0,"div",44),d(1,"fa-icon",45),s(2,"div",46)(3,"span"),p(4),a(),s(5,"span",47),p(6),a()(),s(7,"div",48),_(8,Gt,3,3),s(9,"button",49),C(10,"translate"),w("click",function(){F(i);let n=u();return M(n.toggleRequireAuth())}),d(11,"fa-icon",50),a(),s(12,"button",49),C(13,"translate"),w("click",function(){F(i);let n=u();return M(n.copyToClipboard())}),d(14,"fa-icon",50),a()()(),_(15,Zt,2,3,"div",51),d(16,"hr",52)}if(o&2){let i=u();l(),m("icon",i.icons.links),l(3),$(i.linkForm.value.name||i.linkForm.value.shareName),l(2),$(i.linkForm.value.email),l(2),k(i.share&&i.permissions?8:-1),l(),x(O("btn btn-sm ",i.linkForm.value.requireAuth?"btn-success":"btn-warning")),m("tooltip",v(10,15,"Password",i.locale.language)),l(2),m("icon",i.linkForm.value.requireAuth?i.icons.faLock:i.icons.faLockOpen),l(),x(O("btn btn-sm ms-2 ",i.linkWasCopied?"btn-info":"btn-secondary")),m("tooltip",v(13,18,"Copy link",i.locale.language)),l(2),m("icon",i.linkWasCopied?i.icons.faClipboardCheck:i.icons.faClipboard),l(),k(i.share?15:-1)}}function Xt(o,r){if(o&1&&(s(0,"span"),p(1),a()),o&2){let i=u();x(O("badge rounded-pill ",(i.share?i.share.link.nbAccess:i.link.nbAccess)>=i.linkForm.value.limitAccess?"bg-danger":"bg-success")),l(),xe(" ",i.share?i.share.link.nbAccess:i.link.nbAccess,"/",i.linkForm.value.limitAccess," ")}}function zt(o,r){if(o&1&&(s(0,"span",20),p(1),a()),o&2){let i=u();l(),$(i.share?i.share.link.nbAccess:i.link.nbAccess)}}function Qt(o,r){if(o&1&&(s(0,"div",27)(1,"label",56),p(2,"Share name"),a(),d(3,"input",57),C(4,"translate"),a(),s(5,"div",27)(6,"label",58),p(7,"Share description"),a(),d(8,"input",59),C(9,"translate"),a()),o&2){let i=u();l(3),K("is-invalid",i.linkForm.controls.shareName.invalid),m("placeholder",v(4,4,"Share name",i.locale.language)),l(5),m("placeholder",v(9,7,"Share description",i.locale.language))}}function Jt(o,r){if(o&1&&(s(0,"option",30),p(1),a()),o&2){let i=r.$implicit;m("ngValue",i),l(),$(i)}}function ei(o,r){if(o&1&&(s(0,"div",37),d(1,"app-password-strength-bar",60),a()),o&2){let i=u();l(),m("passwordToCheck",i.password)}}function ti(o,r){if(o&1){let i=G();s(0,"button",61),w("click",function(){F(i);let n=u();return M(n.confirmDeletion=!0)}),p(1," Remove "),a()}if(o&2){let i=u();m("disabled",i.confirmDeletion)}}var ne=(()=>{let r=class r{constructor(){this.layout=S(B),this.parentSpaceId=null,this.isSharesRepo=!1,this.inSharesList=!1,this.submitEvent=new re,this.shareChange=new re,this.locale=S(Q),this.confirmDeletion=!1,this.submitted=!1,this.SPACES_PERMISSIONS_TEXT=mt,this.originalOrderKeyValue=at,this.icons={faEye:Je,faEyeSlash:ot,links:R.LINKS,faClipboard:tt,faClipboardCheck:et,faLock:nt,faLockOpen:it},this.languages=this.layout.getLanguages(),this.minDate=he(),this.defaultPassword=this.layout.translateString(rt),this.passwordMinLength=8,this.password="",this.linkIsExpired=!1,this.linkIsHovered=!1,this.linkWasCopied=!1,this.userService=S(St),this.sharesService=S(Lt),this.linksService=S(Pt),this.spacesService=S(Et),this.minDate.setDate(this.minDate.getDate()+1)}ngOnInit(){this.link?this.initLink():this.file?this.initFile():this.initShareLink(),this.linkForm.value.requireAuth&&(this.password=this.defaultPassword),this.linkForm.value.expiresAt&&this.isLinkIsExpired(this.share?this.share.link.expiresAt:this.link.expiresAt),this.linkForm.controls.expiresAt.valueChanges.subscribe(e=>this.isLinkIsExpired(e))}onPermissionChange(){let e=ut(this.permissions);this.linkForm.controls.permissions.setValue(e),e!==this.share.link.permissions?this.linkForm.controls.permissions.markAsDirty():this.linkForm.controls.permissions.markAsPristine()}toggleRequireAuth(){this.linkForm.controls.requireAuth.setValue(!this.linkForm.value.requireAuth),this.linkForm.controls.requireAuth.markAsDirty()}copyToClipboard(){this.linksService.copyLinkToClipboard(this.share?this.share.link.uuid:this.link.uuid),this.linkWasCopied=!0,this.layout.sendNotification("info","Link copied",this.linkForm.value.name||this.linkForm.value.shareName),setTimeout(()=>this.linkWasCopied=!1,3e3)}onCancel(){this.confirmDeletion?this.confirmDeletion=!1:this.layout.closeDialog()}onSubmit(){if(this.submitted=!0,this.confirmDeletion){(this.parentSpaceId?this.spacesService.deleteSpaceShare(this.parentSpaceId,this.share.id):this.sharesService.deleteShare(this.share.id)).subscribe({next:()=>{this.layout.sendNotification("success","Link deleted",this.share.link.name||this.share.name),this.shareChange.emit(["delete",this.share]),this.layout.closeDialog()},error:c=>{this.layout.sendNotification("error","Delete share",this.share.name,c),this.layout.closeDialog()}});return}if(this.file?.id){let n=this.share,{link:t}=n,c=_e(n,["link"]),g=I(y(y({},t),this.linkForm.value),{password:this.mustIncludePassword()?this.password:void 0});c.name=de("shareName",g),c.description=de("shareDescription",g);let E=this.linksService.shareLinkGuestToMember(-1,-1,g);this.sharesService.createShare(I(y({},c),{type:yt.LINK,links:[E]})).subscribe({next:A=>{this.shareChange.emit(["add",A]),this.layout.sendNotification("success","Link created",t.name||A.name),this.layout.closeDialog()},error:A=>{this.layout.sendNotification("error","Link error",this.share.name,A),this.layout.closeDialog()}});return}let e={};for(let t in this.linkForm.controls)this.linkForm.controls[t].dirty&&(e[t]=this.linkForm.controls[t].value);if(this.mustIncludePassword()&&(e.password=this.password),this.share?.id){Object.keys(e).length&&this.linksService.updateLinkFromSpaceOrShare(this.share.link.id,this.share.id,pt.SHARE,e).subscribe({next:t=>{this.share.name=this.linkForm.value.shareName,this.share.description=this.linkForm.value.shareDescription,this.share.link=Object.assign(this.share.link,t),this.share.updateTimes(),this.share.updatePermission(),this.shareChange.emit(["update",this.share]),this.layout.closeDialog()},error:t=>{this.layout.sendNotification("error","Link error",this.share.link.name||this.share.name,t),this.layout.closeDialog()}}),this.layout.closeDialog();return}this.submitEvent.emit(e)}initFile(){let e=this.sharesService.initShareFromFile(this.userService.user,this.file,this.isSharesRepo,this.inSharesList)[0];this.share=I(y({},e),{link:{id:-1,userId:-1,uuid:"",isActive:!0,requireAuth:!1,permissions:"",nbAccess:0,limitAccess:0}}),this.linksService.genUUID().subscribe(n=>this.share.link.uuid=n),this.initShareLink(),this.onPermissionChange()}initShareLink(){this.linkForm=new me({shareName:new f(this.share.name,z.required),shareDescription:new f(this.share.description||""),name:new f(this.share.link?.name||""),email:new f(this.share.link?.email||"",z.email),language:new f(this.share.link.language||null),limitAccess:new f(this.share.link.limitAccess||null),expiresAt:new f(this.share.link.expiresAt||null),requireAuth:new f(this.share.link.requireAuth||!1),permissions:new f(this.share.link.permissions),isActive:new f(this.share.link.isActive)}),this.permissions=dt(this.share.file.permissions,this.share.link.permissions,[L.SHARE_INSIDE,L.SHARE_OUTSIDE,...this.share.file.isDir?[]:[L.DELETE,L.ADD]])}initLink(){this.linkForm=new me({shareName:new f(""),shareDescription:new f(""),name:new f(this.link.name||""),email:new f(this.link.email||"",z.email),language:new f(this.link.language||null),limitAccess:new f(this.link.limitAccess||null),expiresAt:new f(this.link.expiresAt||null),requireAuth:new f(this.link.requireAuth||!1),permissions:new f(this.link.permissions),isActive:new f(this.link.isActive)}),this.link.id||(this.linkForm.controls.name.markAsDirty(),this.linkForm.controls.isActive.markAsDirty())}isLinkIsExpired(e){if(e==null){if(this.linkIsExpired=!1,e===null)return;this.linkForm.controls.expiresAt.setValue(null)}this.linkIsExpired=he()>=e}mustIncludePassword(){return!!this.password.length&&this.password!==this.defaultPassword}};r.\u0275fac=function(n){return new(n||r)},r.\u0275cmp=W({type:r,selectors:[["app-link-dialog"]],inputs:{share:"share",parentSpaceId:"parentSpaceId",link:"link",file:"file",isSharesRepo:"isSharesRepo",inSharesList:"inSharesList"},outputs:{submitEvent:"submitEvent",shareChange:"shareChange"},decls:73,vars:52,consts:[[1,"modal-header","align-items-center"],[1,"modal-title"],[1,"me-2",3,"icon"],[1,"modal-title","ms-auto"],["l10nTranslate",""],["aria-label","Close","type","button",1,"btn-close","btn-close-white","ms-2",3,"click"],[1,"modal-body"],["autocomplete","off",3,"formGroup"],[1,"d-flex"],[1,"d-flex","flex-column","flex-grow-1"],[1,"d-flex","align-items-center","cursor-pointer","py-2",3,"mouseover","mouseleave","focus","click"],["for","link","l10nTranslate",""],["id","link",1,"ms-auto"],[1,"d-flex","align-items-center","py-2"],["for","state","l10nTranslate","",1,"cursor-pointer","me-auto"],[1,"d-flex","align-items-center","form-check","form-switch","cursor-pointer"],["id","state","formControlName","isActive","type","checkbox","role","button",1,"form-check-input"],["for","access","l10nTranslate",""],["id","access",1,"ms-auto"],[3,"class"],[1,"badge","rounded-pill","bg-success"],[1,"d-flex","align-items-center"],["for","guestName","l10nTranslate",""],["id","guestName","formControlName","name","type","text",1,"form-control","form-control-sm","ms-auto","w-50",3,"placeholder"],[1,"d-flex","align-items-center","justify-content-between","px-0"],["for","guestEmail","l10nTranslate",""],["id","guestEmail","autocomplete","off","formControlName","email","type","email",1,"form-control","form-control-sm","ms-auto","w-50",3,"placeholder"],[1,"d-flex","align-items-center","justify-content-between"],["for","guestLanguage","l10nTranslate",""],["id","guestLanguage","formControlName","language",1,"form-control","form-select","form-select-sm","ms-auto","w-50"],[3,"ngValue"],["for","limitAccess","l10nTranslate",""],["id","limitAccess","formControlName","limitAccess","min","1","type","number",1,"form-control","form-control-sm","ms-auto","w-50",3,"placeholder"],["for","expiration","l10nTranslate",""],["id","expiration","formControlName","expiresAt","placement","left","type","text","bsDatepicker","",1,"form-control","form-control-sm","ms-auto","w-50",3,"placeholder","bsConfig"],[1,"d-flex","align-items-center","px-0"],["for","requireAuth","translate","",1,"cursor-pointer","me-auto"],[1,"d-flex","align-items-center","d-none","d-sm-flex","mx-auto"],["id","requireAuth","formControlName","requireAuth","type","checkbox","role","button",1,"form-check-input"],["placeholder","Set a password",2,"width","45%",3,"passwordChange","isRequired","disabled","passwordMinLength","password","showGenerator"],[1,"modal-footer"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-danger",3,"disabled"],["data-dismiss","modal","type","button","l10nTranslate","",1,"btn","btn-sm","btn-secondary","ms-auto",3,"click"],["type","button","l10nTranslate","",3,"click","disabled"],[1,"d-flex","flex-fill","align-items-center"],[1,"circle-primary-icon","me-2",3,"icon"],[1,"d-flex","flex-column"],[1,"fs-xxxs"],[1,"d-flex","ms-auto"],["container","body","type","button",3,"click","tooltip"],["size","lg",3,"icon"],[1,"d-flex","align-items-center","d-none","d-sm-flex","py-2"],[1,"my-2"],["btnCheckbox","","type","button",1,"btn","btn-sm","btn-custom","me-0","ms-2",3,"ngModelChange","ngModel","tooltip"],[1,"vr","mx-2"],["id","file",3,"share","showIcon","showFullPath"],["for","shareName","l10nTranslate",""],["id","shareName","formControlName","shareName","type","email",1,"form-control","form-control-sm","ms-auto","w-50",3,"placeholder"],["for","shareDescription","l10nTranslate",""],["id","shareDescription","formControlName","shareDescription","type","email",1,"form-control","form-control-sm","ms-auto","w-50",3,"placeholder"],[3,"passwordToCheck"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-danger",3,"click","disabled"]],template:function(n,t){n&1&&(s(0,"div",0)(1,"h4",1),d(2,"fa-icon",2),s(3,"span"),p(4),a()(),s(5,"h4",3),_(6,Kt,2,0,"span",4)(7,qt,2,0,"span",4),a(),s(8,"button",5),w("click",function(){return t.layout.closeDialog()}),a()(),s(9,"div",6),_(10,Yt,17,21),s(11,"form",7)(12,"div",8)(13,"div",9)(14,"div",10),w("mouseover",function(){return t.linkIsHovered=!0})("mouseleave",function(){return t.linkIsHovered=!1})("focus",function(){return t.linkIsHovered=!0})("click",function(){return t.copyToClipboard()}),s(15,"label",11),p(16,"Link"),a(),s(17,"span",12),p(18),a()(),s(19,"div",13)(20,"label",14),p(21,"Active"),a(),s(22,"div",15),d(23,"input",16),s(24,"span"),p(25),C(26,"translate"),a()()(),s(27,"div",13)(28,"label",17),p(29,"Current access count"),a(),s(30,"span",18),_(31,Xt,2,5,"span",19)(32,zt,2,1,"span",20),a()(),_(33,Qt,10,10),s(34,"div",21)(35,"label",22),p(36,"Guest name"),a(),d(37,"input",23),C(38,"translate"),a(),s(39,"div",24)(40,"label",25),p(41,"Guest email"),a(),d(42,"input",26),C(43,"translate"),a(),s(44,"div",27)(45,"label",28),p(46,"Guest language"),a(),s(47,"select",29),se(48,Jt,2,2,"option",30,Ie),a()(),s(50,"div",27)(51,"label",31),p(52,"Limit access"),a(),d(53,"input",32),C(54,"translate"),a(),s(55,"div",27)(56,"label",33),p(57,"Expiration"),a(),d(58,"input",34),C(59,"translate"),a(),s(60,"div",35)(61,"label",36),p(62,"Password"),a(),_(63,ei,2,1,"div",37),s(64,"div",15),d(65,"input",38),a(),s(66,"app-input-password",39),pe("passwordChange",function(g){return ce(t.password,g)||(t.password=g),g}),a()()()()()(),s(67,"div",40),_(68,ti,2,1,"button",41),s(69,"button",42),w("click",function(){return t.onCancel()}),p(70,"Cancel"),a(),s(71,"button",43),w("click",function(){return t.onSubmit()}),p(72),a()()),n&2&&(l(2),m("icon",t.icons.links),l(2),$(t.linkForm.value.name||t.linkForm.value.shareName),l(2),k(t.share!=null&&t.share.id||t.link!=null&&t.link.id?6:7),l(4),k(t.share||t.link?10:-1),l(),m("formGroup",t.linkForm),l(6),K("text-primary",t.linkIsHovered),l(),D(" ",t.share?t.share.link.uuid:t.link.uuid," "),l(6),x(O("badge rounded-pill ms-3 ",t.linkForm.value.isActive?"bg-primary":"bg-danger")),l(),D(" ",v(26,35,t.linkForm.value.isActive?"yes":"no",t.locale.language)," "),l(6),k(t.linkForm.value.limitAccess?31:32),l(2),k(t.share?33:-1),l(4),m("placeholder",v(38,38,"Guest name",t.locale.language)),l(5),K("is-invalid",t.linkForm.controls.email.invalid),m("placeholder",v(43,41,"Guest email",t.locale.language)),l(6),ae(t.languages),l(5),m("placeholder",v(54,44,"Unlimited",t.locale.language)),l(5),K("text-danger",t.linkIsExpired),m("placeholder",v(59,47,"Unlimited",t.locale.language))("bsConfig",Le(50,Ut,t.minDate)),l(5),k(t.linkForm.value.requireAuth&&t.password!==t.defaultPassword?63:-1),l(3),m("isRequired",t.linkForm.value.requireAuth)("disabled",!t.linkForm.value.requireAuth)("passwordMinLength",t.passwordMinLength),le("password",t.password),m("showGenerator",!0),l(2),k(t.share!=null&&t.share.id?68:-1),l(3),x(O("btn btn-sm ",t.confirmDeletion?"btn-danger":"btn-primary")),m("disabled",t.linkForm.invalid||t.linkForm.controls.requireAuth.value&&t.password.length<t.passwordMinLength||t.submitted),l(),D(" ",t.confirmDeletion?"Confirm deletion":"Confirm"," "))},dependencies:[X,We,ze,Ye,Xe,_t,gt,qe,Me,Ue,Ve,Ne,$e,De,He,Re,Pe,Ke,Fe,Ct,Ze,Ge,je,Oe,Be,At,vt,Te,J],encapsulation:2});let o=r;return o})();export{Rt as a,At as b,Lt as c,ne as d,Pt as e};
@@ -1 +1 @@
1
- import{v as C,w}from"./chunk-WL65GYD5.js";import{Ce as y,Eb as n,Ed as _,Ga as p,Mb as m,Xa as u,Yb as s,Zc as g,dc as h,fc as f,ha as d,jb as c,kb as l,pb as o,pe as U,sb as a,se as v,yd as x}from"./chunk-RSNLYAN6.js";function P(i,e){if(i&1&&a(0,"img",0),i&2){let t=n(2);o("tooltip",s("",t.user.name," (",t.user.description,")"))("height",t.height)("width",t.width)("src",t.user.avatarUrl,p)("placement",t.tooltipPlacement)("container",t.container)}}function T(i,e){if(i&1&&(a(0,"fa-icon",2),h(1,"translate")),i&2){let t=n(2);m("min-width",t.width,"px")("min-height",t.height,"px")("font-size",t.fontSize,"px"),o("tooltip",s("",t.user.name," (",f(1,12,t.user.type,t.locale.language),")"))("icon",t.icons.faUsers)("placement",t.tooltipPlacement)("container",t.container)}}function b(i,e){if(i&1&&c(0,P,1,8,"img",0)(1,T,2,15,"fa-icon",1),i&2){let t=n();l(t.user.isUser?0:1)}}function I(i,e){if(i&1&&a(0,"img",0),i&2){let t=n(2);o("tooltip",s("",t.user.fullName," (",t.user.email,")"))("height",t.height)("width",t.width)("src",t.user.avatarUrl,p)("placement",t.tooltipPlacement)("container",t.container)}}function S(i,e){if(i&1&&(a(0,"fa-icon",4),h(1,"translate")),i&2){let t=n(2);m("min-width",t.width,"px")("min-height",t.height,"px")("font-size",t.fontSize,"px"),o("icon",t.unknownUserAsInfo?t.icons.faLightbulb:t.icons.faUserShield)("tooltip",f(1,10,t.unknownUserAsInfo?"Information":"Administrator",t.locale.language))("placement",t.tooltipPlacement)("container",t.container)}}function M(i,e){if(i&1&&c(0,I,1,8,"img",0)(1,S,2,13,"fa-icon",3),i&2){let t=n();l(t.user.login?0:1)}}var G=(()=>{let e=class e{constructor(){this.isMember=!1,this.unknownUserAsInfo=!1,this.height=30,this.width=30,this.fontSize=16,this.tooltipPlacement="auto",this.container=null,this.locale=d(x),this.icons={faUsers:U,faUserShield:v,faLightbulb:y}}ngOnInit(){this.height<28&&(this.fontSize=13)}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=u({type:e,selectors:[["app-user-avatar"]],inputs:{user:"user",isMember:"isMember",unknownUserAsInfo:"unknownUserAsInfo",height:"height",width:"width",fontSize:"fontSize",tooltipPlacement:"tooltipPlacement",container:"container"},decls:2,vars:1,consts:[["alt","",1,"avatar-base-img","cursor-pointer","me-1",3,"height","width","src","tooltip","placement","container"],[1,"circle-primary-icon","cursor-pointer","me-1",3,"icon","tooltip","placement","container","min-width","min-height","font-size"],[1,"circle-primary-icon","cursor-pointer","me-1",3,"icon","tooltip","placement","container"],[1,"circle-gray-icon","cursor-pointer","me-1",3,"icon","tooltip","placement","container","min-width","min-height","font-size"],[1,"circle-gray-icon","cursor-pointer","me-1",3,"icon","tooltip","placement","container"]],template:function(r,z){r&1&&c(0,b,2,1)(1,M,2,1),r&2&&l(z.isMember?0:1)},dependencies:[w,C,g,_],encapsulation:2,changeDetection:0});let i=e;return i})();export{G as a};
1
+ import{v as C,w}from"./chunk-Y2CDUS4J.js";import{Ce as y,Eb as n,Ed as _,Ga as p,Mb as m,Xa as u,Yb as s,Zc as g,dc as h,fc as f,ha as d,jb as c,kb as l,pb as o,pe as U,sb as a,se as v,yd as x}from"./chunk-RSNLYAN6.js";function P(i,e){if(i&1&&a(0,"img",0),i&2){let t=n(2);o("tooltip",s("",t.user.name," (",t.user.description,")"))("height",t.height)("width",t.width)("src",t.user.avatarUrl,p)("placement",t.tooltipPlacement)("container",t.container)}}function T(i,e){if(i&1&&(a(0,"fa-icon",2),h(1,"translate")),i&2){let t=n(2);m("min-width",t.width,"px")("min-height",t.height,"px")("font-size",t.fontSize,"px"),o("tooltip",s("",t.user.name," (",f(1,12,t.user.type,t.locale.language),")"))("icon",t.icons.faUsers)("placement",t.tooltipPlacement)("container",t.container)}}function b(i,e){if(i&1&&c(0,P,1,8,"img",0)(1,T,2,15,"fa-icon",1),i&2){let t=n();l(t.user.isUser?0:1)}}function I(i,e){if(i&1&&a(0,"img",0),i&2){let t=n(2);o("tooltip",s("",t.user.fullName," (",t.user.email,")"))("height",t.height)("width",t.width)("src",t.user.avatarUrl,p)("placement",t.tooltipPlacement)("container",t.container)}}function S(i,e){if(i&1&&(a(0,"fa-icon",4),h(1,"translate")),i&2){let t=n(2);m("min-width",t.width,"px")("min-height",t.height,"px")("font-size",t.fontSize,"px"),o("icon",t.unknownUserAsInfo?t.icons.faLightbulb:t.icons.faUserShield)("tooltip",f(1,10,t.unknownUserAsInfo?"Information":"Administrator",t.locale.language))("placement",t.tooltipPlacement)("container",t.container)}}function M(i,e){if(i&1&&c(0,I,1,8,"img",0)(1,S,2,13,"fa-icon",3),i&2){let t=n();l(t.user.login?0:1)}}var G=(()=>{let e=class e{constructor(){this.isMember=!1,this.unknownUserAsInfo=!1,this.height=30,this.width=30,this.fontSize=16,this.tooltipPlacement="auto",this.container=null,this.locale=d(x),this.icons={faUsers:U,faUserShield:v,faLightbulb:y}}ngOnInit(){this.height<28&&(this.fontSize=13)}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=u({type:e,selectors:[["app-user-avatar"]],inputs:{user:"user",isMember:"isMember",unknownUserAsInfo:"unknownUserAsInfo",height:"height",width:"width",fontSize:"fontSize",tooltipPlacement:"tooltipPlacement",container:"container"},decls:2,vars:1,consts:[["alt","",1,"avatar-base-img","cursor-pointer","me-1",3,"height","width","src","tooltip","placement","container"],[1,"circle-primary-icon","cursor-pointer","me-1",3,"icon","tooltip","placement","container","min-width","min-height","font-size"],[1,"circle-primary-icon","cursor-pointer","me-1",3,"icon","tooltip","placement","container"],[1,"circle-gray-icon","cursor-pointer","me-1",3,"icon","tooltip","placement","container","min-width","min-height","font-size"],[1,"circle-gray-icon","cursor-pointer","me-1",3,"icon","tooltip","placement","container"]],template:function(r,z){r&1&&c(0,b,2,1)(1,M,2,1),r&2&&l(z.isMember?0:1)},dependencies:[w,C,g,_],encapsulation:2,changeDetection:0});let i=e;return i})();export{G as a};