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