nucliadb-admin-assets 1.0.0.post2487__py3-none-any.whl → 1.0.0.post2490__py3-none-any.whl
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.
Potentially problematic release.
This version of nucliadb-admin-assets might be problematic. Click here for more details.
- nucliadb_admin_assets/538.648205260144fc96.js +1 -0
- nucliadb_admin_assets/assets/connector-logos/sitefinity.svg +7 -0
- nucliadb_admin_assets/assets/deployment/app-config.json +1 -1
- nucliadb_admin_assets/assets/i18n/sync/ca.json +4 -0
- nucliadb_admin_assets/assets/i18n/sync/en.json +4 -0
- nucliadb_admin_assets/assets/i18n/sync/es.json +4 -0
- nucliadb_admin_assets/assets/i18n/sync/fr.json +4 -0
- nucliadb_admin_assets/index.html +1 -1
- nucliadb_admin_assets/main.9b68d391e92cf7e5.js +1 -0
- nucliadb_admin_assets/{runtime.8494048bda8413d4.js → runtime.1198703687a09897.js} +1 -1
- {nucliadb_admin_assets-1.0.0.post2487.dist-info → nucliadb_admin_assets-1.0.0.post2490.dist-info}/METADATA +1 -1
- {nucliadb_admin_assets-1.0.0.post2487.dist-info → nucliadb_admin_assets-1.0.0.post2490.dist-info}/RECORD +15 -14
- nucliadb_admin_assets/789.500454cb4d6bffc8.js +0 -1
- nucliadb_admin_assets/main.66aaf4a594b3ace5.js +0 -1
- {nucliadb_admin_assets-1.0.0.post2487.dist-info → nucliadb_admin_assets-1.0.0.post2490.dist-info}/WHEEL +0 -0
- {nucliadb_admin_assets-1.0.0.post2487.dist-info → nucliadb_admin_assets-1.0.0.post2490.dist-info}/top_level.txt +0 -0
- {nucliadb_admin_assets-1.0.0.post2487.dist-info → nucliadb_admin_assets-1.0.0.post2490.dist-info}/zip-safe +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunknucliadb_admin=self.webpackChunknucliadb_admin||[]).push([[538],{8538:(Dn,L,c)=>{c.r(L),c.d(L,{SYNC_ROUTES:()=>Xn});var s=c(2306),I=c(419),k=c(1413),ht=c(1584),_=c(5964),p=c(5558),P=c(6977);const T="assets/connector-logos";var $=function(o){return o.PENDING="PENDING",o.PROCESSING="PROCESSING",o.UPLOADED="UPLOADED",o.ERROR="ERROR",o}($||{}),R=c(4412),h=c(6354),m=c(7673),v=c(8141),b=c(6697),V=c(9437),C=c(2542);const mt={id:"sitemap",title:"Sitemap",logo:`${T}/sitemap.svg`,description:"Upload web pages from a sitemap.xml",permanentSyncOnly:!0,factory:()=>new gt};class gt{constructor(){this.hasServerSideAuth=!1,this.isExternal=!0,this.allowToSelectFolders=!1,this.canSyncSecurityGroups=!1}getStaticFolders(){return[{uuid:"",title:"Sitemap",originalId:"SITEMAP",metadata:{},status:$.PENDING}]}getParametersSections(){return(0,m.of)([{id:"url",title:"sync.connectors.sitemap.url.section-title",fields:[{id:"sitemap",label:"sync.connectors.sitemap.url.label",type:"text",required:!0,pattern:/.+\.(ashx|xml)/,placeholder:"https://my-website.com/sitemap.xml"}]},{id:"restrict-indexation",title:"sync.connectors.common.restrict-indexation.title",description:"sync.connectors.common.restrict-indexation.description",badge:"generic.badge.optional",fields:[{id:"cssSelector",label:"sync.connectors.common.css.label",help:"sync.connectors.common.css.help",type:"text",required:!1,placeholder:".main-content"},{id:"xpathSelector",label:"sync.connectors.common.xpath.label",help:"sync.connectors.common.xpath.help",type:"text",required:!1,placeholder:'//div[@id="main"]'}]},{id:"web-scraping-helpers",title:"sync.connectors.common.web-scraping-helpers.title",description:"sync.connectors.common.web-scraping-helpers.description",badge:"generic.badge.advanced",fields:[{id:"localExtract",label:"sync.connectors.common.local-extract.label",help:"sync.connectors.common.local-extract.help",type:"boolean",required:!1},{id:"keepQueryString",label:"sync.connectors.common.keep-querystring.label",help:"sync.connectors.common.keep-querystring.help",type:"boolean",required:!1},{id:"headers",label:"sync.connectors.common.headers.label",help:"sync.connectors.common.headers.help",type:"table",required:!1},{id:"cookies",label:"sync.connectors.common.cookies.label",help:"sync.connectors.common.cookies.help",type:"table",required:!1},{id:"localstorage",label:"sync.connectors.common.localstorage.label",help:"sync.connectors.common.localstorage.help",type:"table",required:!1}]}])}handleParameters(r){}cleanAuthData(){throw new Error("Method not implemented.")}getParametersValues(){return{}}goToOAuth(){}authenticate(){return(0,m.of)(!0)}}const yt={id:"folder",title:"Folder",logo:`${T}/folder.svg`,description:"Upload a folder from your device",factory:()=>new ft};class ft{constructor(){this.hasServerSideAuth=!1,this.isExternal=!1,this.allowToSelectFolders=!1,this.files=[],this.path="",this.canSyncSecurityGroups=!1}getStaticFolders(){return this.path?[{uuid:"",title:this.path,originalId:this.path,metadata:{},status:$.PENDING}]:[]}getParametersSections(){return(0,m.of)([{id:"local-path",title:"sync.connectors.folder.local-path.title",description:"sync.connectors.folder.local-path.description",fields:[{id:"path",label:"sync.connectors.folder.local-path.field-label",placeholder:"/Users/alice/Documents or C:\\Users\\Alice\\Documents",type:"text",required:!0}]}])}goToOAuth(){}cleanAuthData(){throw new Error("Method not implemented.")}handleParameters(r){r.path&&(this.path=r.path)}getParametersValues(){return{path:this.path}}authenticate(){return(0,m.of)(!0)}}const X="token",A="refresh";class D{constructor(r,e,n){this.hasServerSideAuth=!0,this.isExternal=!0,this.allowToSelectFolders=!0,this.resumable=!1,this.isAuthenticated=new R.t(!1),this.canSyncSecurityGroups="gdrive"===r,this.name=r,this.id=e,this.path=n}getParametersSections(){return(0,m.of)([])}handleParameters(r){}getParametersValues(){return{token:localStorage.getItem(this.prefixStorageKey(X)),refresh:localStorage.getItem(this.prefixStorageKey(A)),refresh_endpoint:`${this.path}/api/external_auth/${this.name}/refresh`}}cleanAuthData(){localStorage.removeItem(this.prefixStorageKey(X)),localStorage.removeItem(this.prefixStorageKey(A))}goToOAuth(r,e){if(e&&this.cleanAuthData(),localStorage.getItem(this.prefixStorageKey(X)))this.isAuthenticated.next(!0);else{const i=`${this.path}/api/external_auth/${this.name}/authorize`;window.electron?window.electron.openExternal(`${i}?redirect=nuclia-desktop://index.html`):location.href=`${i}?redirect=${r}`}}authenticate(){if(!this.isAuthenticated.getValue()){const r=setInterval(()=>{const e=function _t(){let o=location.search;if(!o&&location.href.includes("#")){const r=location.href.split("#")[1];o=r.includes("?")?"?"+r.split("?")[1]:"?"+r}return o&&o.includes("#")&&!o.includes("?")&&(o=o.replace("#","?")),o}();if(e&&e.includes("?")){const n=new URLSearchParams(e.split("?")[1]),i=n.get("token")||"",a=n.get("refresh")||"";clearInterval(r),i?(localStorage.setItem(this.prefixStorageKey(X),i),localStorage.setItem(this.prefixStorageKey(A),a||""),this.isAuthenticated.next(!0)):this.isAuthenticated.next(!1)}},500)}return this.isAuthenticated.asObservable()}prefixStorageKey(r){return`${this.name}-${this.id}-${r}`}getStaticFolders(){return[]}}const J="SHAREPOINT_SITE_NAME";class bt extends D{constructor(r,e,n){super(r,e,n)}getParametersSections(){return(0,m.of)([{id:"account",title:"sync.connectors.sharepoint.account.title",fields:[{id:"site_name",label:"sync.connectors.sharepoint.site.label",type:"text",required:!0}]}])}handleParameters(r){localStorage.setItem(J,r.site_name)}getParametersValues(){return{...super.getParametersValues(),site_name:localStorage.getItem(J)}}}const Ct={id:"confluence",title:"Confluence",logo:`${T}/confluence.svg`,description:"Collaboration platform developed by Atlassian",helpUrl:"https://docs.nuclia.dev/docs/docs/using/sync-agent#confluence-connector-usage",deprecated:!0,factory:()=>new vt},Q="CONFLUENCE_TOKEN";class vt{constructor(){this.hasServerSideAuth=!1,this.isExternal=!1,this.allowToSelectFolders=!0,this.canSyncSecurityGroups=!1}getParametersSections(){return(0,m.of)([{id:"account",title:"sync.connectors.confluence.account.title",description:"sync.connectors.confluence.account.description",fields:[{id:"url",label:"sync.connectors.confluence.url.label",type:"text",placeholder:"https://my-site.atlassian.net/wiki",required:!0},{id:"user",label:"sync.connectors.confluence.user.label",type:"text",placeholder:"me@mycompany.com",required:!0},{id:"token",label:"sync.connectors.confluence.token.label",type:"text",required:!0}]}])}handleParameters(r){localStorage.setItem(Q,r.token)}getParametersValues(){return{token:localStorage.getItem(Q)}}goToOAuth(r,e){return(0,m.of)(!0)}cleanAuthData(){throw new Error("Method not implemented.")}authenticate(){return(0,m.of)(!!this.getParametersValues().token)}getStaticFolders(){return[]}}const St={id:"rss",title:"RSS",logo:`${T}/rss.svg`,description:"Upload web pages from a RSS feed",permanentSyncOnly:!0,factory:()=>new xt};class xt{constructor(){this.hasServerSideAuth=!1,this.isExternal=!0,this.allowToSelectFolders=!1,this.canSyncSecurityGroups=!1}getStaticFolders(){return[{uuid:"",title:"RSS",originalId:"rss",metadata:{},status:$.PENDING}]}getParametersSections(){return(0,m.of)([{id:"url",title:"sync.connectors.rss.url.label",fields:[{id:"url",label:"sync.connectors.rss.url.label",type:"text",required:!0,placeholder:"https://rss-feed-url"}]},{id:"restrict-indexation",title:"sync.connectors.common.restrict-indexation.title",description:"sync.connectors.common.restrict-indexation.description",badge:"generic.badge.optional",fields:[{id:"cssSelector",label:"sync.connectors.common.css.label",help:"sync.connectors.common.css.help",type:"text",required:!1,placeholder:".main-content"},{id:"xpathSelector",label:"sync.connectors.common.xpath.label",help:"sync.connectors.common.xpath.help",type:"text",required:!1,placeholder:'//div[@id="main"]'}]},{id:"web-scraping-helpers",title:"sync.connectors.common.web-scraping-helpers.title",description:"sync.connectors.common.web-scraping-helpers.description",badge:"generic.badge.advanced",fields:[{id:"localExtract",label:"sync.connectors.common.local-extract.label",help:"sync.connectors.common.local-extract.help",type:"boolean",required:!1},{id:"headers",label:"sync.connectors.common.headers.label",help:"sync.connectors.common.headers.help",type:"table",required:!1},{id:"cookies",label:"sync.connectors.common.cookies.label",help:"sync.connectors.common.cookies.help",type:"table",required:!1},{id:"localstorage",label:"sync.connectors.common.localstorage.label",help:"sync.connectors.common.localstorage.help",type:"table",required:!1}]}])}handleParameters(r){}cleanAuthData(){throw new Error("Method not implemented.")}getParametersValues(){return{}}goToOAuth(){}authenticate(){return(0,m.of)(!0)}}var Tt=c(5512);const Ft={id:"sitefinity",title:"Sitefinity",logo:`${T}/sitefinity.svg`,description:"Progress Sitefinity CMS",permanentSyncOnly:!0,factory:()=>new It};class It{constructor(){this.hasServerSideAuth=!1,this.isExternal=!0,this.allowToSelectFolders=!1,this.canSyncSecurityGroups=!1}getStaticFolders(){return[{uuid:"",title:"Sitefinity",originalId:"SITEFINITY",metadata:{},status:$.PENDING}]}getParametersSections(){return(0,m.of)([{id:"url",title:"sync.connectors.sitefinity.url.section-title",fields:[{id:"url",label:"sync.connectors.sitefinity.url.label",type:"text",required:!0,placeholder:"https://my-website.com"},{id:"apikey",label:"sync.connectors.sitefinity.apikey.label",type:"text",required:!0,help:"sync.connectors.sitefinity.apikey.help"}]}])}handleParameters(r){}cleanAuthData(){throw new Error("Method not implemented.")}getParametersValues(){return{}}goToOAuth(){}authenticate(){return(0,m.of)(!0)}}var Rt=c(9330);const W="http://localhost:8090",H="NUCLIA_SYNC_SERVER",z="NUCLIA_SYNC_SERVER_TYPE";let w=(()=>{class o{constructor(e,n,i,a,g){this.sdk=e,this.http=n,this.config=i,this.notificationService=a,this.features=g,this.connectors={gdrive:{definition:{id:"gdrive",title:"Google Drive",logo:`${T}/gdrive.svg`,description:"File storage and synchronization service developed by Google",permanentSyncOnly:!0,deprecated:!0,factory:y=>new D("gdrive",y?.id||"",this.config.getOAuthServer())}},onedrive:{definition:{id:"onedrive",title:"One Drive",logo:`${T}/onedrive.svg`,description:"Microsoft OneDrive file hosting service",permanentSyncOnly:!0,deprecated:!0,factory:y=>new D("onedrive",y?.id||"",this.config.getOAuthServer())}},sharepoint:{definition:{id:"sharepoint",title:"SharePoint",logo:`${T}/sharepoint.svg`,description:"Microsoft Sharepoint service",permanentSyncOnly:!0,deprecated:!0,factory:y=>new bt("sharepoint",y?.id||"",this.config.getOAuthServer())}},dropbox:{definition:{id:"dropbox",title:"Dropbox",logo:`${T}/dropbox.svg`,description:"File storage and synchronization service developed by Dropbox",permanentSyncOnly:!0,deprecated:!0,factory:y=>new D("dropbox",y?.id||"",this.config.getOAuthServer())}},folder:{definition:yt},sitemap:{definition:mt},confluence:{definition:Ct},rss:{definition:St},sitefinity:{definition:Ft}},this.connectorsObs=new R.t(Object.values(this.connectors).map(y=>y.definition).filter(y=>!y.deprecated)).pipe((0,p.n)(y=>this.features.unstable.sitefinityConnector.pipe((0,h.T)(x=>y.filter(F=>x||"sitefinity"!==F.id))))),this._syncServer=new R.t({serverUrl:localStorage.getItem(H)||W,type:localStorage.getItem(z)||"desktop"}),this.syncServer=this._syncServer.asObservable(),this._isServerDown=new R.t(!0),this._currentSyncId=new R.t(null),this._syncCache=new R.t({}),this._cacheUpdated=new R.t((new Date).toISOString()),this._isSyncing=new R.t({}),this.isServerDown=this._isServerDown.asObservable(),this.currentSyncId=this._currentSyncId.asObservable(),this.serverHeaders={token:this.sdk.nuclia.auth.getToken(!0)},this.cacheUpdated=this._cacheUpdated.asObservable(),this.isSyncing=this._isSyncing.asObservable()}getConnectorDefinition(e){return this.connectors[e]?.definition}getConnector(e,n){const i=this.connectors[e];i.instances||(i.instances={});const a=i.instances;return a[n]||(a[n]=i.definition.factory({id:n})),a[n]}getCurrentSync(){return this.currentSyncId.pipe((0,_.p)(e=>!!e),(0,p.n)(e=>this.getSync(e)))}getSync(e){const n=this._syncCache.getValue();return n[e]?(0,m.of)(n[e]):this.http.get(`${this._syncServer.getValue().serverUrl}/sync/${e}`,{headers:this.serverHeaders}).pipe((0,v.M)(i=>{n[e]=i,this._syncCache.next(n)}))}addSync(e){return this.sdk.currentKb.pipe((0,b.s)(1),(0,p.n)(n=>this.sdk.nuclia.options.standalone?(0,m.of)({...e,kb:{...this.sdk.nuclia.options,knowledgeBox:n.id}}):this.getNucliaKey(n).pipe((0,h.T)(i=>({...e,kb:{zone:this.sdk.nuclia.options.zone,backend:this.sdk.nuclia.options.backend,knowledgeBox:i.kbid,apiKey:i.token}})))),(0,p.n)(n=>this.http.post(`${this._syncServer.getValue().serverUrl}/sync`,n,{headers:this.serverHeaders})),(0,v.M)(()=>{const n=this._syncCache.getValue();n[e.id]=e,this._syncCache.next(n),this._cacheUpdated.next((new Date).toISOString())}),(0,h.T)(()=>{}))}updateSync(e,n,i){return this.http.patch(`${this._syncServer.getValue().serverUrl}/sync/${e}`,{...n,lastSyncGMT:i?"1970-01-01":void 0},{headers:this.serverHeaders}).pipe((0,v.M)(()=>{const a=this._syncCache.getValue();a[e]={...a[e],...n},this._syncCache.next(a),this._cacheUpdated.next((new Date).toISOString())}))}deleteSync(e){return this.http.delete(`${this._syncServer.getValue().serverUrl}/sync/${e}`,{headers:this.serverHeaders}).pipe((0,v.M)(()=>{const n=this._syncCache.getValue();delete n[e],this._syncCache.next(n),this._cacheUpdated.next((new Date).toISOString())}))}hasCurrentSourceAuth(){return this.getCurrentSyncId()?this.http.get(`${this._syncServer.getValue().serverUrl}/sync/${this.getCurrentSyncId()}/auth`).pipe((0,h.T)(n=>n.hasAuth)):(0,m.of)(!1)}getSyncsForKB(e){return this.isServerDown.pipe((0,p.n)(n=>n?(0,m.of)([]):this.http.get(`${this._syncServer.getValue().serverUrl}/sync/kb/${e}`).pipe((0,h.T)(i=>i.map(a=>({...a,kbId:e,connectorId:a.connector,connector:this.getConnector(a.connector,"")})).filter(a=>a.kbId===e)))))}getFiles(e){return this.http.get(`${this._syncServer.getValue().serverUrl}/sync/${this.getCurrentSyncId()}/files/search${e?`?query=${e}`:""}`)}getFolders(e){return this.http.get(`${this._syncServer.getValue().serverUrl}/sync/${this.getCurrentSyncId()}/folders`,{headers:this.serverHeaders})}canSelectFiles(e){const n=this._syncCache.getValue()[e];return n&&!("sitemap"===n.connector.name||"folder"===n.connector.name||"rss"===n.connector.name)}getNucliaKey(e){return e.createKeyForService({title:"Sync",role:"SCONTRIBUTOR"},this.getExpirationDate()).pipe((0,h.T)(n=>({...n,kbid:e.id})))}getExpirationDate(){const e=new Date;return e.setFullYear(e.getFullYear()+1),Math.floor(e.getTime()/1e3).toString()}serverStatus(e){return this.http.get(`${e}/status`).pipe((0,V.W)(()=>(0,m.of)({running:!1,logs:["Server down"]})),(0,h.T)(n=>((n.logs||[]).forEach(i=>console.log("[SERVER]",i)),{running:n.running})))}setSyncServer(e,n){localStorage.setItem(H,e||""),localStorage.setItem(z,n),this._syncServer.next({serverUrl:e||"",type:n}),e&&this.serverStatus(e).subscribe(i=>{this.setServerStatus(!i.running)})}authenticateToConnector(e,n){return n.authenticate().pipe((0,_.p)(i=>i),(0,b.s)(1),(0,p.n)(()=>this.updateSync(this.getCurrentSyncId()||"",{connector:{name:e,parameters:n.getParametersValues()}})),(0,h.T)(()=>(n.cleanAuthData(),!0)))}getCurrentSyncId(){return this._currentSyncId.getValue()}setCurrentSyncId(e){this._currentSyncId.next(e)}clearCurrentSourceId(){this._currentSyncId.next(null)}getLogs(e,n){return this.http.get(`${this._syncServer.getValue().serverUrl}/logs${e?"/"+e:""}${n?"/"+n:""}`).pipe((0,h.T)(i=>i.sort((a,g)=>{const y=(0,Tt.T)(a.createdAt,g.createdAt);return 0===y?a.action.startsWith("start")?1:-1:y})))}clearLogs(){return this.http.delete(`${this._syncServer.getValue().serverUrl}/logs`)}getSyncServer(){return this._syncServer.getValue().serverUrl}setServerStatus(e){e&&!this._isServerDown.value&&this.notificationService.pushNotifications([{type:"sync-server",data:[],timestamp:(new Date).toISOString(),unread:!0,failure:!0}]),this._isServerDown.next(e)}triggerSync(e,n=!1){return this._isSyncing.next({...this._isSyncing.value,[e]:!0}),(n?this.updateSync(e,{},!0).pipe((0,h.T)(()=>!0)):(0,m.of)(!0)).pipe((0,p.n)(()=>this.http.get(`${this._syncServer.getValue().serverUrl}/sync/execute/${e}`)),(0,v.M)(()=>this._isSyncing.next({...this._isSyncing.value,[e]:!1})),(0,V.W)(a=>(console.warn("Trigger sync failed:",a),this._isSyncing.next({...this._isSyncing.value,[e]:!1}),(0,m.of)())))}static#t=this.\u0275fac=function(n){return new(n||o)(s.KVO(C.ok),s.KVO(Rt.Qq),s.KVO(C.M),s.KVO(C.JE),s.KVO(C.Dr))};static#e=this.\u0275prov=s.jDH({token:o,factory:o.\u0275fac,providedIn:"root"})}return o})();var t=c(2898);let Mt=(()=>{class o{constructor(){this.unsubscribeAll=new k.B,this.syncService=(0,s.WQX)(w)}ngOnInit(){let e=!1,n=0;(0,ht.O)(0,5e3).pipe((0,_.p)(()=>{const a=n>=(e?12:0);return n++,a}),(0,p.n)(()=>this.syncService.serverStatus(this.syncService.getSyncServer())),(0,P.Q)(this.unsubscribeAll)).subscribe(i=>{e=i.running,n=0,this.syncService.setServerStatus(!e)})}ngOnDestroy(){this.unsubscribeAll.next(),this.unsubscribeAll.complete()}static#t=this.\u0275fac=function(n){return new(n||o)};static#e=this.\u0275cmp=t.VBU({type:o,selectors:[["ng-component"]],decls:1,vars:0,template:function(n,i){1&n&&t.nrm(0,"router-outlet")},dependencies:[I.n3],encapsulation:2,changeDetection:0})}return o})();var M=c(7705),l=c(8743),kt=c(9874),E=c(4929);let $t=(()=>{class o{constructor(){this.title="",this.logo="",this.disabled=!1,this.selectConnector=new t.bkB}static#t=this.\u0275fac=function(n){return new(n||o)};static#e=this.\u0275cmp=t.VBU({type:o,selectors:[["nsy-connector"]],inputs:{title:"title",logo:"logo",disabled:[2,"disabled","disabled",M.L39]},outputs:{selectConnector:"selectConnector"},decls:5,vars:3,consts:[[3,"cardClick","disabled"],[1,"connector"],["size","large",3,"path"]],template:function(n,i){1&n&&(t.j41(0,"pa-card",0),t.bIt("cardClick",function(g){return i.selectConnector.emit(g)}),t.j41(1,"div",1),t.nrm(2,"pa-icon",2),t.j41(3,"div"),t.EFF(4),t.k0s()()()),2&n&&(t.Y8G("disabled",i.disabled),t.R7$(2),t.Y8G("path",i.logo),t.R7$(2),t.JRh(i.title))},dependencies:[l.ALJ,kt.i,l.V3x,E.R],styles:['@import"https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100..900;1,100..900&display=swap";@charset "UTF-8";@font-face{font-family:Source Code Pro;font-style:normal;font-weight:400;src:url(source-code-pro-v14-latin-regular.e7bb30b550ed09e8.woff2) format("woff2"),url(source-code-pro-v14-latin-regular.c54f7f16da733fd8.woff) format("woff")}[_ngcontent-%COMP%]:root{--color-dark-stronger: #000;--color-light-stronger: #fff;--color-neutral-regular: var(--custom-color-neutral-regular, hsl(0, 0%, 44%));--color-neutral-light: var(--custom-color-neutral-light, hsl(0, 0%, 77%));--color-neutral-lighter: var(--custom-color-neutral-lighter, hsl(0, 0%, 90%));--color-neutral-lightest: var(--custom-color-neutral-lightest, hsl(240, 7%, 97%));--color-primary-stronger: var(--custom-color-primary-stronger, hsl(252, 100%, 24%));--color-primary-strong: var(--custom-color-primary-strong, hsl(223.74, 100%, 39.8%));--color-primary-regular: var(--custom-color-primary-regular, hsl(223.2, 100%, 50.98%));--color-primary-light: var(--custom-color-primary-light, hsl(252, 100%, 73%));--color-primary-lighter: var(--custom-color-primary-lighter, hsl(212.57, 100%, 93.14%));--color-primary-lightest: var(--custom-color-primary-lightest, hsl(215.29, 100%, 96.67%));--color-secondary-stronger: hsl(49, 100%, 30%);--color-secondary-strong: hsl(49, 100%, 40%);--color-secondary-regular: hsl(49, 100%, 60%);--color-secondary-light: hsl(49, 100%, 80%);--color-secondary-lighter: hsl(49, 100%, 90%);--color-secondary-lightest: hsl(49, 100%, 95%);--color-tertiary-stronger: hsl(2251, 100%, 24%);--color-tertiary-strong: hsl(2251, 100%, 40%);--color-tertiary-regular: hsl(2251, 100%, 50%);--color-tertiary-light: hsl(2251, 100%, 65%);--color-tertiary-lighter: hsl(2251, 100%, 92%);--color-tertiary-lightest: hsl(2251, 100%, 96%)}.connector[_ngcontent-%COMP%]{align-items:center;display:flex;flex-direction:column;gap:.5rem;width:6rem}'],changeDetection:0})}return o})();var S=c(2200),d=c(9417),K=c(4825),f=c(8018),u=c(4795),j=c(3606),Pt=c(820),Z=c(6812),N=c(3085),U=c(4899),wt=c(7481),Et=c(3257),jt=c(6010),q=c(5472),tt=c(9435),et=c(3107),Gt=c(7839),Ot=c(4099),nt=c(4684),Vt=c(9122);const Xt=()=>({section:"activity"}),ot=(o,r)=>r.id;function Dt(o,r){1&o&&(t.j41(0,"nsi-dropdown-button",17),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&o&&(t.R7$(),t.SpI(" ",t.bMT(2,1,"sync.home-page.setup-server.on-desktop.download-dropdown")," "))}function At(o,r){if(1&o&&(t.j41(0,"nsi-badge"),t.EFF(1),t.nI1(2,"translate"),t.k0s(),t.nVh(3,Dt,3,3,"nsi-dropdown-button",17)),2&o){const e=t.XpG(2);t.R7$(),t.JRh(t.bMT(2,2,"sync.badge.inactive")),t.R7$(2),t.vxM(e.downloadSyncAgentFeature?3:-1)}}function Nt(o,r){1&o&&(t.j41(0,"nsi-badge",16),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&o&&(t.R7$(),t.JRh(t.bMT(2,1,"sync.badge.active")))}function Ut(o,r){if(1&o&&(t.nVh(0,At,4,4),t.nI1(1,"async"),t.vZN(2,Nt,3,3,"nsi-badge",16)),2&o){const e=t.XpG();t.vxM(t.bMT(1,1,e.inactiveServer)?0:2)}}function Bt(o,r){1&o&&(t.j41(0,"nsi-badge"),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&o&&(t.R7$(),t.JRh(t.bMT(2,1,"sync.badge.inactive")))}function Yt(o,r){1&o&&(t.j41(0,"nsi-badge",16),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&o&&(t.R7$(),t.JRh(t.bMT(2,1,"sync.badge.active")))}function Lt(o,r){if(1&o&&(t.j41(0,"div",13),t.nVh(1,Bt,3,3,"nsi-badge"),t.nI1(2,"async"),t.vZN(3,Yt,3,3,"nsi-badge",16),t.j41(4,"pa-input",18),t.EFF(5," Server URL "),t.k0s(),t.j41(6,"pa-button",19),t.EFF(7),t.nI1(8,"translate"),t.k0s()()),2&o){const e=t.XpG();t.R7$(),t.vxM(t.bMT(2,3,e.inactiveServer)?1:3),t.R7$(5),t.Y8G("disabled",!e.serverUrlChanged),t.R7$(),t.SpI(" ",t.bMT(8,5,"generic.save")," ")}}function Jt(o,r){if(1&o){const e=t.RV6();t.j41(0,"nsy-connector",20),t.nI1(1,"async"),t.nI1(2,"translate"),t.nI1(3,"async"),t.bIt("selectConnector",function(){const i=s.eBV(e).$implicit,a=t.XpG();return s.Njj(a.onSelectConnector(i))}),t.k0s()}if(2&o){const e=r.$implicit,n=t.XpG();t.Y8G("paTooltip",t.bMT(2,6,t.bMT(1,4,n.inactiveServer)?"sync.home-page.add-sources.disabled-source-tooltip":""))("disabled",t.bMT(3,8,n.inactiveServer))("title",e.title)("logo",e.logo)}}function Qt(o,r){1&o&&(t.j41(0,"nsi-info-card",21),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&o&&(t.R7$(),t.JRh(t.bMT(2,1,"sync.home-page.sync-list.empty-info")))}function Wt(o,r){if(1&o&&(t.j41(0,"div",25),t.nrm(1,"pa-icon",33),t.EFF(2),t.k0s()),2&o){const e=r;t.R7$(),t.Y8G("path",e.logo),t.R7$(),t.SpI(" ",e.title," ")}}function Ht(o,r){if(1&o&&t.nrm(0,"pa-datetime",28),2&o){const e=t.XpG().$implicit;t.Y8G("datetime",e.lastSyncGMT)}}function zt(o,r){1&o&&t.EFF(0," \u2013 ")}function Kt(o,r){if(1&o&&(t.j41(0,"pa-option",30),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&o){const e=t.XpG().$implicit;t.Y8G("routerLink","./"+e.id+"/edit"),t.R7$(),t.SpI(" ",t.bMT(2,2,"sync.home-page.sync-list.menu.edit-folders")," ")}}function Zt(o,r){if(1&o){const e=t.RV6();t.j41(0,"pa-table-row")(1,"pa-table-cell")(2,"a",24),t.EFF(3),t.k0s()(),t.j41(4,"pa-table-cell"),t.nVh(5,Wt,3,2,"div",25),t.k0s(),t.j41(6,"pa-table-cell")(7,"div",26),t.EFF(8),t.k0s()(),t.j41(9,"pa-table-cell")(10,"pa-toggle",27),t.bIt("valueChange",function(i){const a=s.eBV(e).$implicit,g=t.XpG(3);return s.Njj(g.toggleSync(a.id,i))}),t.EFF(11),t.k0s()(),t.j41(12,"pa-table-cell")(13,"div",26),t.nVh(14,Ht,1,1,"pa-datetime",28)(15,zt,1,0),t.k0s()(),t.j41(16,"pa-table-cell-menu")(17,"pa-button",29),t.EFF(18," Menu "),t.k0s(),t.j41(19,"pa-dropdown",null,0)(21,"pa-option",30),t.EFF(22),t.nI1(23,"translate"),t.k0s(),t.nVh(24,Kt,3,4,"pa-option",30),t.j41(25,"pa-option",31),t.EFF(26),t.nI1(27,"translate"),t.k0s(),t.j41(28,"pa-option",32),t.bIt("selectOption",function(){const i=s.eBV(e).$implicit,a=t.XpG(3);return s.Njj(a.deleteSync(i))}),t.EFF(29),t.nI1(30,"translate"),t.k0s()()()()}if(2&o){let e;const n=r.$implicit,i=t.sdS(20),a=t.XpG(3);t.R7$(2),t.Y8G("routerLink","./"+n.id),t.R7$(),t.SpI(" ",n.title," "),t.R7$(2),t.vxM((e=null==a.connectors[n.connectorId]?null:a.connectors[n.connectorId].definition)?5:-1,e),t.R7$(3),t.JRh(n.totalSyncedResources),t.R7$(2),t.Y8G("value",!n.disabled),t.R7$(),t.SpI(" ",n.disabled?"Off":"On"," "),t.R7$(3),t.vxM("1970-01-01"!==n.lastSyncGMT?14:15),t.R7$(3),t.Y8G("paPopup",i),t.R7$(4),t.Y8G("routerLink","./"+n.id+"/edit"),t.R7$(),t.SpI(" ",t.bMT(23,15,"sync.home-page.sync-list.menu.edit-settings")," "),t.R7$(2),t.vxM(n.connector.allowToSelectFolders?24:-1),t.R7$(),t.Y8G("routerLink","./"+n.id)("queryParams",t.lJ4(21,Xt)),t.R7$(),t.SpI(" ",t.bMT(27,17,"sync.home-page.sync-list.menu.activity-logs")," "),t.R7$(3),t.SpI(" ",t.bMT(30,19,"sync.home-page.sync-list.menu.delete")," ")}}function qt(o,r){if(1&o&&(t.j41(0,"pa-table",22),t.nrm(1,"pa-table-sortable-header",23),t.Z7z(2,Zt,31,22,"pa-table-row",null,ot),t.k0s()),2&o){const e=t.XpG(),n=t.XpG();t.R7$(),t.Y8G("cells",n.syncTableHeader),t.R7$(),t.Dyx(e)}}function te(o,r){1&o&&t.nVh(0,Qt,3,3,"nsi-info-card",21)(1,qt,4,1,"pa-table",22),2&o&&t.vxM(0===r.length?0:1)}let ee=(()=>{class o{constructor(){this.router=(0,s.WQX)(I.Ix),this.currentRoute=(0,s.WQX)(I.nX),this.syncService=(0,s.WQX)(w),this.sdk=(0,s.WQX)(C.ok),this.toaster=(0,s.WQX)(u._g),this.modalService=(0,s.WQX)(u.w8),this.translate=(0,s.WQX)(f.c$),this.unsubscribeAll=new k.B,this.downloadSyncAgentFeature=!1,this.inactiveServer=this.syncService.isServerDown,this.syncAgentForm=new d.gE({type:new d.MJ("desktop",{nonNullable:!0}),serverUrl:new d.MJ("",{nonNullable:!0,validators:[d.k0.required]})}),this.connectors=this.syncService.connectors,this.connectorList=this.syncService.connectorsObs.pipe((0,h.T)(e=>e.sort((n,i)=>n.title.localeCompare(i.title)))),this.serverUrlBackup="",this.syncs=this.syncService.cacheUpdated.pipe((0,p.n)(()=>this.sdk.currentKb),(0,p.n)(e=>this.syncService.getSyncsForKB(e.id))),this.syncTableHeader=[new l.A3f({id:"name",label:"sync.home-page.sync-list.table-columns.name"}),new l.A3f({id:"connector",label:"sync.home-page.sync-list.table-columns.connector"}),new l.A3f({id:"resources",label:"sync.home-page.sync-list.table-columns.resources"}),new l.A3f({id:"sync",label:"sync.home-page.sync-list.table-columns.sync"}),new l.A3f({id:"latest-sync",label:"sync.home-page.sync-list.table-columns.latest-sync",sortable:!0}),new l.A3f({id:"actions",label:"sync.home-page.sync-list.table-columns.actions"})]}get syncAgentOnServer(){return"server"===this.syncAgentForm.controls.type.value}get syncAgentTypeControl(){return this.syncAgentForm.controls.type}get syncServerUrl(){return this.syncAgentForm.controls.serverUrl.value}get serverUrlChanged(){return this.serverUrlBackup!==this.syncServerUrl}ngOnInit(){this.syncService.syncServer.pipe((0,b.s)(1)).subscribe(e=>{this.syncAgentForm.patchValue(e),this.serverUrlBackup=e.serverUrl}),this.syncAgentTypeControl.valueChanges.pipe((0,P.Q)(this.unsubscribeAll)).subscribe(()=>this.saveSyncServer())}ngOnDestroy(){this.unsubscribeAll.next(),this.unsubscribeAll.complete()}saveSyncServer(){if(this.syncAgentForm.valid){const e=this.syncAgentForm.getRawValue();this.syncService.setSyncServer("server"===e.type?e.serverUrl:W,e.type)}}onSelectConnector(e){this.router.navigate(["./add",e.id],{relativeTo:this.currentRoute})}deleteSync(e){this.modalService.openConfirm({title:this.translate.instant("sync.confirm.deletion.title",{title:e.title}),description:"sync.confirm.deletion.description",isDestructive:!0,confirmLabel:"generic.delete"}).onClose.pipe((0,_.p)(n=>!!n),(0,p.n)(()=>this.syncService.deleteSync(e.id))).subscribe({error:()=>this.toaster.error("sync.details.toast.deletion-failed")})}toggleSync(e,n){this.syncService.updateSync(e,{disabled:!n}).subscribe({error:()=>this.toaster.error(n?"sync.details.toast.activating-failed":"sync.details.toast.disabling-failed")})}static#t=this.\u0275fac=function(n){return new(n||o)};static#e=this.\u0275cmp=t.VBU({type:o,selectors:[["ng-component"]],decls:56,vars:44,consts:[["syncMenu",""],[1,"page-spacing"],[1,"page-title"],[1,"page-description"],[1,"section-description"],[1,"title-l"],[1,"setup-sync-agent",3,"ngSubmit","formGroup"],["formControlName","type"],[1,"radio-config-row"],["value","desktop",3,"help"],[1,"title-m"],[1,"separator-line"],["value","server",3,"help"],[1,"inline-form"],[1,"connector-list"],[3,"paTooltip","disabled","title","logo"],["kind","success"],["aspect","basic"],["formControlName","serverUrl",1,"server-url"],["type","submit",3,"disabled"],[3,"selectConnector","paTooltip","disabled","title","logo"],["icon","info"],["border","","columns","repeat(5, 1fr) 96px"],[3,"cells"],[1,"body-m","black-link",3,"routerLink"],[1,"logo-title"],[1,"body-s"],["labelOnRight","",3,"valueChange","value"],[3,"datetime"],["icon","more-vertical","aspect","basic","size","small",3,"paPopup"],[3,"routerLink"],[3,"routerLink","queryParams"],["destructive","",3,"selectOption"],["size","small",3,"path"]],template:function(n,i){if(1&n&&(t.j41(0,"div",1)(1,"div")(2,"h1",2),t.EFF(3),t.nI1(4,"translate"),t.k0s(),t.j41(5,"p",3),t.EFF(6),t.nI1(7,"translate"),t.k0s()(),t.j41(8,"section")(9,"div",4)(10,"div",5),t.EFF(11),t.nI1(12,"translate"),t.k0s(),t.j41(13,"div",3),t.EFF(14),t.nI1(15,"translate"),t.k0s()(),t.j41(16,"form",6),t.bIt("ngSubmit",function(){return i.saveSyncServer()}),t.j41(17,"pa-radio-group",7)(18,"div",8)(19,"pa-radio",9),t.nI1(20,"translate"),t.j41(21,"span",10),t.EFF(22),t.nI1(23,"translate"),t.k0s()(),t.nVh(24,Ut,3,3),t.k0s(),t.nrm(25,"div",11),t.j41(26,"div",8)(27,"pa-radio",12),t.nI1(28,"translate"),t.j41(29,"span",10),t.EFF(30),t.nI1(31,"translate"),t.k0s()(),t.nVh(32,Lt,9,7,"div",13),t.k0s()()()(),t.nrm(33,"div",11),t.j41(34,"section")(35,"div",4)(36,"div",5),t.EFF(37),t.nI1(38,"translate"),t.k0s(),t.j41(39,"div",3),t.EFF(40),t.nI1(41,"translate"),t.k0s()(),t.j41(42,"div",14),t.Z7z(43,Jt,4,10,"nsy-connector",15,ot),t.nI1(45,"async"),t.k0s()(),t.j41(46,"section")(47,"div",4)(48,"div",5),t.EFF(49),t.nI1(50,"translate"),t.k0s(),t.j41(51,"div",3),t.EFF(52),t.nI1(53,"translate"),t.k0s()(),t.nVh(54,te,2,1),t.nI1(55,"async"),t.k0s()()),2&n){let a;t.R7$(3),t.JRh(t.bMT(4,16,"navbar.sync")),t.R7$(3),t.JRh(t.bMT(7,18,"sync.home-page.description")),t.R7$(5),t.JRh(t.bMT(12,20,"sync.home-page.setup-server.title")),t.R7$(3),t.JRh(t.bMT(15,22,"sync.home-page.setup-server.description")),t.R7$(2),t.Y8G("formGroup",i.syncAgentForm),t.R7$(3),t.Y8G("help",t.bMT(20,24,"sync.home-page.setup-server.on-desktop.radio-help")),t.R7$(3),t.JRh(t.bMT(23,26,"sync.home-page.setup-server.on-desktop.radio-label")),t.R7$(2),t.vxM(i.syncAgentOnServer?-1:24),t.R7$(3),t.Y8G("help",t.bMT(28,28,"sync.home-page.setup-server.on-server.radio-help")),t.R7$(3),t.JRh(t.bMT(31,30,"sync.home-page.setup-server.on-server.radio-label")),t.R7$(2),t.vxM(i.syncAgentOnServer?32:-1),t.R7$(5),t.JRh(t.bMT(38,32,"sync.home-page.add-sources.title")),t.R7$(3),t.JRh(t.bMT(41,34,"sync.home-page.add-sources.description")),t.R7$(3),t.Dyx(t.bMT(45,36,i.connectorList)),t.R7$(6),t.JRh(t.bMT(50,38,"sync.home-page.sync-list.title")),t.R7$(3),t.JRh(t.bMT(53,40,"sync.home-page.sync-list.description")),t.R7$(2),t.vxM((a=t.bMT(55,42,i.syncs))?54:-1,a)}},dependencies:[S.MD,S.Jj,u.nS,$t,u.vY,l.Ymm,j.Q,l.Rx2,Pt.P,Z.P,l.XgI,N.S,l.rkm,U.a,wt.v,Et.u,l.tml,jt.d,d.X1,d.qT,d.BC,d.cb,d.j4,d.JD,f.h,f.D9,l.EGN,q.O,tt.e,et.U,Gt.N,Ot.V,K.Wk,l.V3x,E.R,l.Pa6,nt.Z,u.IA,l.OgD,Vt.w],styles:['@import"https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100..900;1,100..900&display=swap";@charset "UTF-8";@font-face{font-family:Source Code Pro;font-style:normal;font-weight:400;src:url(source-code-pro-v14-latin-regular.e7bb30b550ed09e8.woff2) format("woff2"),url(source-code-pro-v14-latin-regular.c54f7f16da733fd8.woff) format("woff")}[_ngcontent-%COMP%]:root{--color-dark-stronger: #000;--color-light-stronger: #fff;--color-neutral-regular: var(--custom-color-neutral-regular, hsl(0, 0%, 44%));--color-neutral-light: var(--custom-color-neutral-light, hsl(0, 0%, 77%));--color-neutral-lighter: var(--custom-color-neutral-lighter, hsl(0, 0%, 90%));--color-neutral-lightest: var(--custom-color-neutral-lightest, hsl(240, 7%, 97%));--color-primary-stronger: var(--custom-color-primary-stronger, hsl(252, 100%, 24%));--color-primary-strong: var(--custom-color-primary-strong, hsl(223.74, 100%, 39.8%));--color-primary-regular: var(--custom-color-primary-regular, hsl(223.2, 100%, 50.98%));--color-primary-light: var(--custom-color-primary-light, hsl(252, 100%, 73%));--color-primary-lighter: var(--custom-color-primary-lighter, hsl(212.57, 100%, 93.14%));--color-primary-lightest: var(--custom-color-primary-lightest, hsl(215.29, 100%, 96.67%));--color-secondary-stronger: hsl(49, 100%, 30%);--color-secondary-strong: hsl(49, 100%, 40%);--color-secondary-regular: hsl(49, 100%, 60%);--color-secondary-light: hsl(49, 100%, 80%);--color-secondary-lighter: hsl(49, 100%, 90%);--color-secondary-lightest: hsl(49, 100%, 95%);--color-tertiary-stronger: hsl(2251, 100%, 24%);--color-tertiary-strong: hsl(2251, 100%, 40%);--color-tertiary-regular: hsl(2251, 100%, 50%);--color-tertiary-light: hsl(2251, 100%, 65%);--color-tertiary-lighter: hsl(2251, 100%, 92%);--color-tertiary-lightest: hsl(2251, 100%, 96%)}.page-spacing[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem}.page-title[_ngcontent-%COMP%]{align-items:center;display:flex;gap:.5rem}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}section[_ngcontent-%COMP%] .section-description[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}section[_ngcontent-%COMP%] .setup-sync-agent[_ngcontent-%COMP%]{border:1px solid var(--color-neutral-lighter, hsl(207, 17%, 91%));border-radius:.5rem;padding:1.5rem}section[_ngcontent-%COMP%] .setup-sync-agent[_ngcontent-%COMP%] .radio-config-row[_ngcontent-%COMP%]{align-items:center;display:flex;gap:.5rem;justify-content:space-between}section[_ngcontent-%COMP%] .setup-sync-agent[_ngcontent-%COMP%] .radio-config-row[_ngcontent-%COMP%] pa-radio[_ngcontent-%COMP%]{flex:1 0 auto}section[_ngcontent-%COMP%] .setup-sync-agent[_ngcontent-%COMP%] .inline-form[_ngcontent-%COMP%]{align-items:center;display:flex;flex-wrap:wrap;gap:.5rem;justify-content:flex-end}section[_ngcontent-%COMP%] .setup-sync-agent[_ngcontent-%COMP%] pa-input.server-url[_ngcontent-%COMP%] .pa-field-control{width:20rem}@media (min-width: 1440px){section[_ngcontent-%COMP%] .setup-sync-agent[_ngcontent-%COMP%] pa-input.server-url[_ngcontent-%COMP%] .pa-field-control{width:26.5rem}}section[_ngcontent-%COMP%] .separator-line[_ngcontent-%COMP%]{margin:1.5rem 0}section[_ngcontent-%COMP%] .connector-list[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:1rem}section[_ngcontent-%COMP%] .logo-title[_ngcontent-%COMP%]{font-size:.75rem;line-height:1.25rem;letter-spacing:0;font-weight:400;align-items:center;display:flex;gap:.5rem}section[_ngcontent-%COMP%] pa-table-cell[_ngcontent-%COMP%] pa-toggle[_ngcontent-%COMP%] .pa-toggle-context{gap:.5rem}section[_ngcontent-%COMP%] pa-table-sortable-header[_ngcontent-%COMP%] .pa-table-grid--header{z-index:1}'],changeDetection:0})}return o})();var ne=c(3129),oe=c(2193),ie=c(9804),re=c(6851),se=c(2071),ae=c(5814),ce=c(9285),it=c(6420);const le=()=>[],rt=(o,r)=>r.id,de=(o,r)=>r.value;function pe(o,r){if(1&o&&(t.j41(0,"pa-input",30),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&o){const e=t.XpG().$implicit;t.Y8G("formControlName",e.id)("placeholder",e.placeholder)("help",e.help),t.R7$(),t.SpI(" ",t.bMT(2,4,e.label)," ")}}function he(o,r){if(1&o&&(t.j41(0,"pa-toggle",31),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&o){const e=t.XpG().$implicit;t.Y8G("formControlName",e.id)("help",e.help),t.R7$(),t.SpI(" ",t.bMT(2,3,e.label)," ")}}function ue(o,r){if(1&o&&(t.j41(0,"pa-option",34),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&o){const e=r.$implicit;t.Y8G("disabled",e.disabled)("value",e.value),t.R7$(),t.SpI(" ",t.bMT(2,3,e.label)," ")}}function me(o,r){if(1&o&&(t.j41(0,"pa-select",32),t.Z7z(1,ue,3,5,"pa-option",34,de),t.k0s()),2&o){const e=t.XpG().$implicit;t.Y8G("formControlName",e.id)("label",e.label)("help",e.help),t.R7$(),t.Dyx(e.options)}}function ge(o,r){if(1&o&&(t.j41(0,"pa-textarea",31),t.EFF(1),t.k0s()),2&o){const e=t.XpG().$implicit;t.Y8G("formControlName",e.id)("help",e.help),t.R7$(),t.SpI(" ",e.label," ")}}function ye(o,r){if(1&o&&(t.j41(0,"p"),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&o){const e=t.XpG(2).$implicit;t.R7$(),t.JRh(t.bMT(2,1,e.help))}}function fe(o,r){1&o&&(t.j41(0,"nsi-info-card",36),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&o&&(t.R7$(),t.SpI(" ",t.bMT(2,1,"sync.form-validation.extra-parameters-incomplete")," "))}function _e(o,r){if(1&o){const e=t.RV6();t.j41(0,"div",33)(1,"label"),t.EFF(2),t.nI1(3,"translate"),t.k0s(),t.nVh(4,ye,3,3,"p"),t.j41(5,"app-parameters-table",35),t.bIt("valuesChange",function(i){s.eBV(e);const a=t.XpG().$implicit,g=t.XpG(3);return s.Njj(g.updateTable(a.id,i))}),t.k0s(),t.nVh(6,fe,3,3,"nsi-info-card",36),t.k0s()}if(2&o){const e=t.XpG().$implicit,n=t.XpG(3);t.R7$(2),t.JRh(t.bMT(3,4,e.label)),t.R7$(2),t.vxM(e.help?4:-1),t.R7$(),t.Y8G("values",n.tables[e.id]||t.lJ4(6,le)),t.R7$(),t.vxM(n.invalidTables.includes(e.id)?6:-1)}}function be(o,r){if(1&o&&t.nVh(0,pe,3,6,"pa-input",30)(1,he,3,5,"pa-toggle",31)(2,me,3,3,"pa-select",32)(3,ge,2,3,"pa-textarea",31)(4,_e,7,7,"div",33),2&o){let e;t.vxM("text"===(e=r.$implicit.type)?0:"boolean"===e?1:"select"===e?2:"textarea"===e?3:"table"===e?4:-1)}}function Ce(o,r){if(1&o&&(t.j41(0,"nsi-two-columns-configuration-item",5)(1,"div",2),t.Z7z(2,be,5,1,null,null,rt),t.k0s()()),2&o){const e=r.$implicit;t.Y8G("badge",e.badge)("itemTitle",e.title)("description",e.description||""),t.R7$(2),t.Dyx(e.fields)}}function ve(o,r){1&o&&(t.j41(0,"nsi-two-columns-configuration-item",9)(1,"div",7)(2,"pa-toggle",37),t.EFF(3),t.nI1(4,"translate"),t.k0s()()()),2&o&&(t.R7$(3),t.SpI(" ",t.bMT(4,1,"sync.add-page.security-group.toggle-label")," "))}function Se(o,r){if(1&o){const e=t.RV6();t.j41(0,"nsi-label",38),t.bIt("removeLabel",function(){const i=s.eBV(e).$implicit,a=t.XpG(2);return s.Njj(a.removeLabel(i))}),t.EFF(1),t.k0s()}if(2&o){const e=r.$implicit;t.Y8G("color",e.color),t.R7$(),t.SpI(" ",e.label," ")}}function xe(o,r){if(1&o){const e=t.RV6();t.j41(0,"nsi-label",39),t.bIt("removeLabel",function(){const i=s.eBV(e).$implicit,a=t.XpG(2);return s.Njj(a.removeExtension(i))}),t.EFF(1),t.k0s()}if(2&o){const e=r.$implicit;t.R7$(),t.SpI(" ",e," ")}}function Te(o,r){if(1&o){const e=t.RV6();t.j41(0,"form",0)(1,"nsi-two-columns-configuration-item",1)(2,"div",2)(3,"pa-input",3),t.EFF(4),t.nI1(5,"translate"),t.k0s()()(),t.qex(6,4),t.Z7z(7,Ce,4,3,"nsi-two-columns-configuration-item",5,rt),t.nI1(9,"async"),t.bVm(),t.j41(10,"nsi-two-columns-configuration-item",6)(11,"div",7)(12,"app-extraction-select",8),t.bIt("extractConfigChange",function(i){s.eBV(e);const a=t.XpG();return s.Njj(a.updateExtractStrategy(i))}),t.k0s()()(),t.nVh(13,ve,5,3,"nsi-two-columns-configuration-item",9),t.j41(14,"nsi-two-columns-configuration-item",10)(15,"div",2)(16,"div",11)(17,"app-label-dropdown",12),t.nI1(18,"async"),t.nI1(19,"async"),t.bIt("selectionChange",function(i){s.eBV(e);const a=t.XpG();return s.Njj(a.updateLabelSelection(i))}),t.EFF(20),t.nI1(21,"translate"),t.k0s(),t.j41(22,"span",13),t.EFF(23),t.nI1(24,"translate"),t.k0s(),t.j41(25,"pa-button",14),t.bIt("click",function(){s.eBV(e);const i=t.XpG();return s.Njj(i.createLabelSet())}),t.EFF(26),t.nI1(27,"translate"),t.k0s()(),t.j41(28,"div",15),t.Z7z(29,Se,2,2,"nsi-label",16,t.fX1),t.k0s()(),t.j41(31,"div",17)(32,"pa-toggle",18),t.EFF(33),t.nI1(34,"translate"),t.k0s()()(),t.j41(35,"nsi-two-columns-configuration-item",19)(36,"div",2)(37,"nsi-info-card"),t.EFF(38),t.nI1(39,"translate"),t.k0s(),t.j41(40,"div",20)(41,"div",21)(42,"pa-select",22)(43,"pa-option",23),t.EFF(44),t.nI1(45,"translate"),t.k0s(),t.j41(46,"pa-option",24),t.EFF(47),t.nI1(48,"translate"),t.k0s()(),t.j41(49,"pa-input",25),t.EFF(50),t.nI1(51,"translate"),t.k0s()(),t.j41(52,"div",15),t.Z7z(53,xe,2,1,"nsi-label",26,t.fX1),t.k0s(),t.j41(55,"div",27)(56,"label"),t.EFF(57),t.nI1(58,"translate"),t.k0s(),t.j41(59,"div",21),t.nrm(60,"pa-date-picker",28),t.nI1(61,"translate"),t.nrm(62,"pa-date-picker",29),t.nI1(63,"translate"),t.k0s()()()()()()}if(2&o){const e=t.XpG();t.Y8G("formGroup",e.form),t.R7$(),t.Y8G("noTopBorder",e.noTopBorder),t.R7$(3),t.JRh(t.bMT(5,20,"sync.add-page.connector-name.field-label")),t.R7$(3),t.Dyx(t.bMT(9,22,e.connector.getParametersSections())),t.R7$(5),t.Y8G("onlyExtract",!0)("extractConfig",e.extractStrategy),t.R7$(),t.vxM(e.connector.canSyncSecurityGroups?13:-1),t.R7$(4),t.Y8G("labelSets",t.bMT(18,24,e.labelSets))("selection",e.labelSelection)("disabled",!1===t.bMT(19,26,e.hasLabelSet)),t.R7$(3),t.SpI(" ",t.bMT(21,28,"sync.add-page.add-labels.select-labels")," "),t.R7$(3),t.JRh(t.bMT(24,30,"generic.or")),t.R7$(3),t.SpI(" ",t.bMT(27,32,"sync.add-page.add-labels.create-labelset")," "),t.R7$(3),t.Dyx(e.labelSelection),t.R7$(4),t.SpI(" ",t.bMT(34,34,"sync.add-page.preserve-labels.toggle-label")," "),t.R7$(5),t.JRh(t.bMT(39,36,"sync.add-page.filter-resources.file-extension.info")),t.R7$(6),t.SpI(" ",t.bMT(45,38,"sync.add-page.filter-resources.file-extension.include")," "),t.R7$(3),t.SpI(" ",t.bMT(48,40,"sync.add-page.filter-resources.file-extension.exclude")," "),t.R7$(3),t.SpI(" ",t.bMT(51,42,"sync.add-page.filter-resources.file-extension.label")," "),t.R7$(3),t.Dyx(e.extensionList),t.R7$(4),t.JRh(t.bMT(58,44,"sync.add-page.filter-resources.modification-date.label")),t.R7$(3),t.Y8G("label",t.bMT(61,46,"sync.add-page.filter-resources.modification-date.from")),t.R7$(2),t.Y8G("label",t.bMT(63,48,"sync.add-page.filter-resources.modification-date.to"))}}const Fe=new RegExp(/[^a-z0-9_-]/g);let st=(()=>{class o{constructor(){this.labelService=(0,s.WQX)(C.xQ),this.modalService=(0,s.WQX)(u.w8),this.cdr=(0,s.WQX)(M.gRc),this.unsubscribeAll=new k.B,this.noTopBorder=!1,this.validForm=new t.bkB,this.configurationChange=new t.bkB,this.form=new d.gE({name:new d.MJ("",{nonNullable:!0,validators:[d.k0.required]}),syncSecurityGroups:new d.MJ(null),preserveLabels:new d.MJ(null),filterResources:new d.gE({extensions:new d.MJ("",{updateOn:"blur"}),extensionUsage:new d.MJ("include",{nonNullable:!0}),from:new d.MJ(""),to:new d.MJ("")}),extra:new d.gE({})}),this.labelSets=this.labelService.resourceLabelSets,this.hasLabelSet=this.labelService.hasResourceLabelSets,this.labelSelection=[],this.extensionList=[],this.tables={},this.invalidTables=[],this.extractStrategy="",this._extra={}}set sync(e){if(e){this.connectorParametersBackup=e.connector.parameters;const n={extensions:e.filters?.fileExtensions?.extensions||"",extensionUsage:e.filters?.fileExtensions?.exclude?"exclude":"include",from:e.filters?.modified?.from||"",to:e.filters?.modified?.to||""};this.form.patchValue({name:e.title,syncSecurityGroups:e.syncSecurityGroups,filterResources:n,preserveLabels:e.preserveLabels}),this.labelSelection=e.labels||[],this.extensionList=this.formatExtensionList(n.extensions),e.extract_strategy&&(this.extractStrategy=e.extract_strategy),e.connector.parameters&&Object.entries(e.connector.parameters).forEach(([i,a])=>{"object"!=typeof a?this._extra[i]=a:this.tables[i]=a})}}get extensionsControl(){return this.form.controls.filterResources.controls.extensions}ngOnInit(){this.connector&&this.connector.getParametersSections().subscribe(e=>{e.forEach(n=>n.fields.forEach(i=>{"table"!==i.type&&this.form.controls.extra.addControl(i.id,new d.MJ("",{nonNullable:!0,validators:i.required?[d.k0.required]:[]}))})),Object.keys(this._extra).length>0&&this.form.patchValue({extra:this._extra})}),this.extensionsControl.valueChanges.pipe((0,P.Q)(this.unsubscribeAll)).subscribe(e=>this.extensionList=this.formatExtensionList(e)),this.form.valueChanges.pipe((0,P.Q)(this.unsubscribeAll)).subscribe(()=>{this.validForm.emit(this.form.valid),this.emitSyncEntity()})}ngOnDestroy(){this.unsubscribeAll.next(),this.unsubscribeAll.complete()}updateTable(e,n){this.tables[e]=n,n.some(i=>!(i.value.trim()&&i.key.trim()||!i.value.trim()&&!i.key.trim()))?this.invalidTables.includes(e)||this.invalidTables.push(e):this.invalidTables.includes(e)&&(this.invalidTables=this.invalidTables.filter(i=>i!==e)),this.cdr.markForCheck(),this.emitSyncEntity()}createLabelSet(){this.modalService.openModal(C.Tv,new l.S6u({data:{kind:oe.po.RESOURCES}}))}updateLabelSelection(e){this.labelSets.pipe((0,b.s)(1),(0,_.p)(n=>!!n),(0,h.T)(n=>n)).subscribe(n=>{this.labelSelection=e.map(i=>({...i,color:n[i.labelset]?.color})),this.emitSyncEntity()})}removeExtension(e){const n=this.extensionList.filter(i=>i!==e);this.extensionsControl.patchValue(n.join(", "))}removeLabel(e){this.labelSelection=this.labelSelection.filter(n=>!(n.labelset===e.labelset&&n.label===e.label)),this.emitSyncEntity()}formatExtensionList(e){return e&&e.length>0?e.split(",").map(n=>n.trim()).filter(n=>!!n):[]}emitSyncEntity(){if(!this.connectorId)return;const e=this.form.getRawValue(),n=e.name,i=(Math.random()+1).toString(36).substring(7),a=`${this.kbId}-${n?.toLowerCase().replace(Fe,"-")}-${i}`,g={fileExtensions:e.filterResources.extensions?{extensions:e.filterResources.extensions,exclude:"exclude"===e.filterResources.extensionUsage}:void 0,modified:e.filterResources.from||e.filterResources.to?{from:e.filterResources.from||void 0,to:e.filterResources.to||void 0}:void 0},y=Object.entries(e.extra||{}).reduce((G,[O,Y])=>({...G,[O]:Y}),{}),x=Object.entries(this.tables).reduce((G,[O,Y])=>(G[O]=Y.filter(pt=>!(!pt.key.trim()||!pt.value.trim())),G),{}),F={id:a,title:n,labels:this.labelSelection,preserveLabels:e.preserveLabels||!1,filters:g,connector:{name:this.connectorId,parameters:{...this.connectorParametersBackup,...x,...y}}};null!==e.syncSecurityGroups&&(F.syncSecurityGroups=e.syncSecurityGroups),F.extract_strategy=this.extractStrategy,this.configurationChange.emit(F)}updateExtractStrategy(e){this.extractStrategy=e,this.validForm.emit(this.form.valid),this.emitSyncEntity()}static#t=this.\u0275fac=function(n){return new(n||o)};static#e=this.\u0275cmp=t.VBU({type:o,selectors:[["nsy-configuration-form"]],inputs:{connector:"connector",connectorId:"connectorId",kbId:"kbId",sync:"sync",noTopBorder:[2,"noTopBorder","noTopBorder",M.L39]},outputs:{validForm:"validForm",configurationChange:"configurationChange"},decls:1,vars:1,consts:[[3,"formGroup"],["itemTitle","sync.add-page.connector-name.title","description","sync.add-page.connector-name.description",3,"noTopBorder"],[1,"form-container"],["formControlName","name"],["formGroupName","extra"],[3,"badge","itemTitle","description"],["itemTitle","sync.add-page.extract-config.title","description","sync.add-page.extract-config.description","badge","generic.badge.advanced"],[1,"form-container","toggle-container"],[3,"extractConfigChange","onlyExtract","extractConfig"],["itemTitle","sync.add-page.security-group.title","description","sync.add-page.security-group.description","badge","generic.badge.advanced"],["badge","generic.badge.optional","itemTitle","sync.add-page.add-labels.title","description","sync.add-page.add-labels.description"],[1,"inline-form","full-width"],["displayRadioForNonMultiple","","aspect","basic","fullWidth","",3,"selectionChange","labelSets","selection","disabled"],[1,"separator-word","body-s"],["icon","circle-plus","aspect","basic","iconAndText","",1,"full-width",3,"click"],[1,"inline-form","small-gap"],[3,"color"],[1,"toggle-container"],["formControlName","preserveLabels"],["badge","generic.badge.optional","itemTitle","sync.add-page.filter-resources.title","description","sync.add-page.filter-resources.description"],["formGroupName","filterResources",1,"form-container"],[1,"inline-form","full-width","small-gap"],["formControlName","extensionUsage"],["value","include"],["value","exclude"],["id","extension","placeholder",".pdf,.docx","formControlName","extensions"],["neutral",""],[1,"label-field-container"],["formControlName","from",3,"label"],["formControlName","to",3,"label"],[3,"formControlName","placeholder","help"],[3,"formControlName","help"],[3,"formControlName","label","help"],[1,"table-container"],[3,"disabled","value"],[3,"valuesChange","values"],["type","warning","icon","warning"],["withBackground","","formControlName","syncSecurityGroups"],[3,"removeLabel","color"],["neutral","",3,"removeLabel"]],template:function(n,i){1&n&&t.nVh(0,Te,64,50,"form",0),2&n&&t.vxM(i.connector?0:-1)},dependencies:[S.MD,S.Jj,u.IA,u._8,d.X1,d.qT,d.BC,d.cb,d.j4,d.JD,d.$R,l.XgI,N.S,re.w,se.Q,Z.P,C.Qy,C.Bo,ae.L,l.Ymm,j.Q,f.h,f.D9,l.OYn,ce.I,u.OE,it.U,l.rkm,U.a,ie.RxD],styles:['@import"https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100..900;1,100..900&display=swap";@charset "UTF-8";@font-face{font-family:Source Code Pro;font-style:normal;font-weight:400;src:url(source-code-pro-v14-latin-regular.e7bb30b550ed09e8.woff2) format("woff2"),url(source-code-pro-v14-latin-regular.c54f7f16da733fd8.woff) format("woff")}[_ngcontent-%COMP%]:root{--color-dark-stronger: #000;--color-light-stronger: #fff;--color-neutral-regular: var(--custom-color-neutral-regular, hsl(0, 0%, 44%));--color-neutral-light: var(--custom-color-neutral-light, hsl(0, 0%, 77%));--color-neutral-lighter: var(--custom-color-neutral-lighter, hsl(0, 0%, 90%));--color-neutral-lightest: var(--custom-color-neutral-lightest, hsl(240, 7%, 97%));--color-primary-stronger: var(--custom-color-primary-stronger, hsl(252, 100%, 24%));--color-primary-strong: var(--custom-color-primary-strong, hsl(223.74, 100%, 39.8%));--color-primary-regular: var(--custom-color-primary-regular, hsl(223.2, 100%, 50.98%));--color-primary-light: var(--custom-color-primary-light, hsl(252, 100%, 73%));--color-primary-lighter: var(--custom-color-primary-lighter, hsl(212.57, 100%, 93.14%));--color-primary-lightest: var(--custom-color-primary-lightest, hsl(215.29, 100%, 96.67%));--color-secondary-stronger: hsl(49, 100%, 30%);--color-secondary-strong: hsl(49, 100%, 40%);--color-secondary-regular: hsl(49, 100%, 60%);--color-secondary-light: hsl(49, 100%, 80%);--color-secondary-lighter: hsl(49, 100%, 90%);--color-secondary-lightest: hsl(49, 100%, 95%);--color-tertiary-stronger: hsl(2251, 100%, 24%);--color-tertiary-strong: hsl(2251, 100%, 40%);--color-tertiary-regular: hsl(2251, 100%, 50%);--color-tertiary-light: hsl(2251, 100%, 65%);--color-tertiary-lighter: hsl(2251, 100%, 92%);--color-tertiary-lightest: hsl(2251, 100%, 96%)}.toggle-container[_ngcontent-%COMP%] pa-toggle[_ngcontent-%COMP%] .pa-toggle-context{justify-content:space-between}.table-container[_ngcontent-%COMP%] nsi-info-card[_ngcontent-%COMP%]{margin-top:.75rem}'],changeDetection:0})}return o})();var Ie=c(1943),at=c(7670);const Re=o=>({total:o}),Me=o=>({count:o});function ke(o,r){1&o&&t.nrm(0,"nsi-spinner")}function $e(o,r){if(1&o){const e=t.RV6();t.j41(0,"nsi-folder-tree",3),t.bIt("selectionChange",function(i){s.eBV(e);const a=t.XpG(2);return s.Njj(a.updateSelection(i))}),t.k0s()}if(2&o){const e=t.XpG(2);t.Y8G("selection",e.selection)("folderTree",e.folders)}}function Pe(o,r){if(1&o&&t.nrm(0,"nsi-folder-list",2),2&o){const e=t.XpG(2);t.Y8G("folders",e.selectedPaths)}}function we(o,r){if(1&o&&t.nVh(0,$e,1,2,"nsi-folder-tree",1)(1,Pe,1,1,"nsi-folder-list",2),2&o){const e=t.XpG();t.vxM(e.seeAll?0:1)}}let B=(()=>{class o{constructor(){this.syncService=(0,s.WQX)(w),this.toaster=(0,s.WQX)(u._g),this.cdr=(0,s.WQX)(M.gRc),this.selectedSyncItems=new t.bkB,this.searchQuery=new d.MJ("",{nonNullable:!0}),this.totalFolders=0,this.selectionCount=0,this.loading=!1,this.seeAll=!0,this.selection=[],this.selectedPaths=[],this.syncItems=[],this.selectedIds=[]}ngOnInit(){this.updateSelection((this.sync.foldersToSync||[]).map(e=>({id:e.uuid,path:e.metadata.path}))),this.loadFolders()}updateView(e){this.seeAll="left"===e}updateSelection(e){this.selection=e,this.selectedPaths=e.map(n=>n.path),this.selectedIds=e.map(n=>n.id),this.selectionCount=e.length,this.selectedSyncItems.emit(this.syncItems.filter(n=>this.selectedIds.includes(n.uuid))),this.cdr.markForCheck()}loadFolders(e){this.loading=!0,this.syncService.getFolders(e?.value||"").pipe((0,V.W)(n=>(n&&this.toaster.error("string"==typeof n?n:n.error?.message||n.error||n.message||"An error occurred"),(0,m.of)({items:[],nextPage:void 0}))),(0,Ie.S)((n,i)=>n.concat(i.items),[]),(0,h.T)(n=>[{uuid:"root",originalId:"/",title:"/",status:$.PENDING,metadata:{path:"/"}},...n]),(0,h.T)(n=>n.sort((i,a)=>i.metadata.path.localeCompare(a.metadata.path))),(0,v.M)(n=>{this.totalFolders=n.length,this.syncItems=n}),(0,h.T)(n=>this.getFolderTreeFromSyncItems(n))).subscribe({next:n=>{this.loading=!1,this.folders=n,this.cdr.markForCheck()}})}getFolderTreeFromSyncItems(e){const n={id:"root",path:"/",title:"/",expanded:!0,children:{}};return e.filter(i=>"root"!==i.uuid).forEach(i=>{const a=i.metadata.path,g=i.originalId,y={id:g,title:i.title,path:a,displayPath:i.metadata.displayPath||a,children:{}};if("/"===a)n.children[g]=y;else{let F,x=n;a.split("/").slice(1,-1).forEach(O=>{x&&(F=x.children?.[O],F&&(x=F))}),x.children?x.children[g]=y:x.children={[g]:y}}}),n}static#t=this.\u0275fac=function(n){return new(n||o)};static#e=this.\u0275cmp=t.VBU({type:o,selectors:[["nsy-folder-selection"]],inputs:{sync:"sync"},outputs:{selectedSyncItems:"selectedSyncItems"},decls:7,vars:14,consts:[[3,"activeChange","leftButton","rightButton"],[3,"selection","folderTree"],[3,"folders"],[3,"selectionChange","selection","folderTree"]],template:function(n,i){1&n&&(t.j41(0,"header"),t.nrm(1,"div"),t.j41(2,"nsi-segmented-buttons",0),t.nI1(3,"translate"),t.nI1(4,"translate"),t.bIt("activeChange",function(g){return i.updateView(g)}),t.k0s()(),t.nVh(5,ke,1,0,"nsi-spinner"),t.nVh(6,we,2,1)),2&n&&(t.R7$(2),t.Y8G("leftButton",t.i5U(3,4,"sync.folder-selection.see-all",t.eq3(10,Re,i.totalFolders)))("rightButton",t.i5U(4,7,"sync.folder-selection.see-selection",t.eq3(12,Me,i.selectionCount))),t.R7$(3),t.vxM(i.loading?5:-1),t.R7$(),t.vxM(i.folders?6:-1))},dependencies:[u.Sq,u.sH,l.Ymm,l.XgI,d.X1,u.vI,u.J4,at.t,f.h,f.D9],styles:['@import"https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100..900;1,100..900&display=swap";@charset "UTF-8";@font-face{font-family:Source Code Pro;font-style:normal;font-weight:400;src:url(source-code-pro-v14-latin-regular.e7bb30b550ed09e8.woff2) format("woff2"),url(source-code-pro-v14-latin-regular.c54f7f16da733fd8.woff) format("woff")}[_ngcontent-%COMP%]:root{--color-dark-stronger: #000;--color-light-stronger: #fff;--color-neutral-regular: var(--custom-color-neutral-regular, hsl(0, 0%, 44%));--color-neutral-light: var(--custom-color-neutral-light, hsl(0, 0%, 77%));--color-neutral-lighter: var(--custom-color-neutral-lighter, hsl(0, 0%, 90%));--color-neutral-lightest: var(--custom-color-neutral-lightest, hsl(240, 7%, 97%));--color-primary-stronger: var(--custom-color-primary-stronger, hsl(252, 100%, 24%));--color-primary-strong: var(--custom-color-primary-strong, hsl(223.74, 100%, 39.8%));--color-primary-regular: var(--custom-color-primary-regular, hsl(223.2, 100%, 50.98%));--color-primary-light: var(--custom-color-primary-light, hsl(252, 100%, 73%));--color-primary-lighter: var(--custom-color-primary-lighter, hsl(212.57, 100%, 93.14%));--color-primary-lightest: var(--custom-color-primary-lightest, hsl(215.29, 100%, 96.67%));--color-secondary-stronger: hsl(49, 100%, 30%);--color-secondary-strong: hsl(49, 100%, 40%);--color-secondary-regular: hsl(49, 100%, 60%);--color-secondary-light: hsl(49, 100%, 80%);--color-secondary-lighter: hsl(49, 100%, 90%);--color-secondary-lightest: hsl(49, 100%, 95%);--color-tertiary-stronger: hsl(2251, 100%, 24%);--color-tertiary-strong: hsl(2251, 100%, 40%);--color-tertiary-regular: hsl(2251, 100%, 50%);--color-tertiary-light: hsl(2251, 100%, 65%);--color-tertiary-lighter: hsl(2251, 100%, 92%);--color-tertiary-lightest: hsl(2251, 100%, 96%)}header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;margin-bottom:1rem}header[_ngcontent-%COMP%] pa-input[_ngcontent-%COMP%]{width:30rem}'],changeDetection:0})}return o})();const Ee=o=>({connector:o}),je=(o,r)=>({index:o,total:r});function Ge(o,r){if(1&o&&(t.j41(0,"div")(1,"h1",2),t.nrm(2,"pa-icon",3),t.EFF(3),t.nI1(4,"translate"),t.k0s(),t.j41(5,"p",4),t.EFF(6),t.nI1(7,"translate"),t.k0s()()),2&o){const e=r,n=t.XpG();t.R7$(2),t.Y8G("path",e.logo),t.R7$(),t.SpI(" ",t.i5U(4,3,"sync.add-page.title",t.eq3(8,Ee,e.title))," "),t.R7$(3),t.JRh(t.bMT(7,6,"sync.add-page.description."+n))}}function Oe(o,r){if(1&o&&(t.nVh(0,Ge,8,10,"div"),t.nI1(1,"async")),2&o){let e;const n=t.XpG();t.vxM((e=t.bMT(1,1,n.connectorDefinition))?0:-1,e)}}function Ve(o,r){1&o&&t.nrm(0,"nsi-spinner")}function Xe(o,r){if(1&o){const e=t.RV6();t.j41(0,"nsy-configuration-form",6),t.nI1(1,"async"),t.nI1(2,"async"),t.bIt("configurationChange",function(i){s.eBV(e);const a=t.XpG(3);return s.Njj(a.updateConfiguration(i))})("validForm",function(i){s.eBV(e);const a=t.XpG(3);return s.Njj(a.validForm=i)}),t.k0s()}if(2&o){const e=t.XpG(2),n=t.XpG();t.Y8G("sync",n.sync)("kbId",t.bMT(1,4,n.kbId))("connector",e)("connectorId",t.bMT(2,6,n.connectorId))}}function De(o,r){if(1&o){const e=t.RV6();t.j41(0,"nsy-folder-selection",8),t.bIt("selectedSyncItems",function(i){s.eBV(e);const a=t.XpG(4);return s.Njj(a.updateSelection(i))}),t.k0s()}if(2&o){const e=t.XpG(4);t.Y8G("sync",e.sync)}}function Ae(o,r){if(1&o&&t.nVh(0,De,1,1,"nsy-folder-selection",7),2&o){const e=t.XpG(3);t.vxM(e.sync?0:-1)}}function Ne(o,r){if(1&o&&(t.EFF(0),t.nI1(1,"translate")),2&o){const e=t.XpG(),n=t.XpG(3);t.SpI(" ",t.i5U(1,1,"sync.add-page.footer.steps",t.l_i(4,je,n.step(),e.length))," ")}}function Ue(o,r){if(1&o){const e=t.RV6();t.j41(0,"pa-button",12),t.bIt("click",function(){s.eBV(e);const i=t.XpG(4);return s.Njj(i.cancel())}),t.EFF(1),t.nI1(2,"translate"),t.k0s()}2&o&&(t.R7$(),t.SpI(" ",t.bMT(2,1,"generic.cancel")," "))}function Be(o,r){if(1&o){const e=t.RV6();t.j41(0,"pa-button",12),t.bIt("click",function(){s.eBV(e);const i=t.XpG(4);return s.Njj(i.goBack())}),t.EFF(1),t.nI1(2,"translate"),t.k0s()}2&o&&(t.R7$(),t.SpI(" ",t.bMT(2,1,"generic.back")," "))}function Ye(o,r){if(1&o){const e=t.RV6();t.j41(0,"pa-button",13),t.bIt("click",function(){s.eBV(e);const i=t.XpG(4);return s.Njj(i.goNext())}),t.EFF(1),t.nI1(2,"translate"),t.k0s()}if(2&o){const e=t.XpG(4);t.Y8G("disabled",!e.validForm||e.saving),t.R7$(),t.SpI(" ",t.bMT(2,2,"sync.add-page.footer.folder-selection-button")," ")}}function Le(o,r){if(1&o){const e=t.RV6();t.j41(0,"pa-button",13),t.bIt("click",function(){s.eBV(e);const i=t.XpG(4);return s.Njj(i.save())}),t.EFF(1),t.nI1(2,"translate"),t.k0s()}if(2&o){const e=t.XpG(3),n=t.XpG();t.Y8G("disabled",!n.validForm||e.allowToSelectFolders&&0===n.folderSelection.length||n.saving),t.R7$(),t.SpI(" ",t.bMT(2,2,"sync.add-page.footer.save-button")," ")}}function Je(o,r){if(1&o&&(t.j41(0,"nsi-sticky-footer")(1,"div",9),t.nVh(2,Ne,2,7),t.k0s(),t.nVh(3,Ue,3,3,"pa-button",10)(4,Be,3,3,"pa-button",10),t.nVh(5,Ye,3,4,"pa-button",11)(6,Le,3,4,"pa-button",11),t.k0s()),2&o){const e=r,n=t.XpG(3);t.R7$(2),t.vxM(e.length>1?2:-1),t.R7$(),t.vxM(1===n.step()?3:4),t.R7$(2),t.vxM(e.length>1&&n.step()<e.length?5:6)}}function Qe(o,r){if(1&o&&(t.nVh(0,Xe,3,8,"nsy-configuration-form",5)(1,Ae,1,1),t.nVh(2,Je,7,3,"nsi-sticky-footer"),t.nI1(3,"async")),2&o){let e,n;const i=t.XpG(2);t.vxM(1===(e=i.step())?0:2===e?1:-1),t.R7$(2),t.vxM((n=t.bMT(3,2,i.steps))?2:-1,n)}}function We(o,r){if(1&o&&(t.j41(0,"div"),t.nVh(1,Ve,1,0,"nsi-spinner")(2,Qe,4,4),t.k0s()),2&o){const e=t.XpG();t.R7$(),t.vxM(e.loading?1:2)}}let ct=(()=>{class o{constructor(){this.router=(0,s.WQX)(I.Ix),this.currentRoute=(0,s.WQX)(I.nX),this.sdk=(0,s.WQX)(C.ok),this.syncService=(0,s.WQX)(w),this.modalService=(0,s.WQX)(u.w8),this.translate=(0,s.WQX)(f.c$),this.toaster=(0,s.WQX)(u._g),this.cdr=(0,s.WQX)(M.gRc),this.connectorId=this.currentRoute.params.pipe((0,_.p)(e=>e.connector),(0,h.T)(e=>e.connector)),this.connectorDefinition=this.connectorId.pipe((0,h.T)(e=>this.syncService.getConnectorDefinition(e))),this.connector=this.connectorId.pipe((0,h.T)(e=>this.syncService.getConnector(e,""))),this.kbId=this.sdk.currentKb.pipe((0,h.T)(e=>e.id)),this.steps=this.connector.pipe((0,h.T)(e=>e.allowToSelectFolders?["configuration","folder-selection"]:["configuration"])),this.stepIndex=(0,s.vPA)(0),this.step=(0,ne.EW)(()=>this.stepIndex()+1),this.validForm=!1,this.folderSelection=[],this.loading=!1,this.saving=!1}get backPath(){return this.syncId?"../../..":"../.."}ngOnInit(){this.currentRoute.params.pipe((0,_.p)(e=>!!e.syncId),(0,b.s)(1),(0,v.M)(e=>{this.loading=!0,this.cdr.markForCheck(),this.syncId=e.syncId,this.syncService.setCurrentSyncId(this.syncId),this.validForm=!0}),(0,p.n)(()=>this.syncService.getSync(this.syncId)),(0,v.M)(e=>{this.sync=e,this.configuration=e,this.cdr.markForCheck()}),(0,p.n)(e=>this.syncService.hasCurrentSourceAuth().pipe((0,v.M)(n=>{n&&(this.loading=!1,this.cdr.markForCheck())}),(0,_.p)(n=>!n),(0,h.T)(()=>this.syncService.getConnector(e.connector.name,e.id)),(0,p.n)(n=>this.syncService.authenticateToConnector(e.connector.name,n))))).subscribe({next:()=>{this._goNext(),this.loading=!1,this.cdr.markForCheck(),this.router.navigate([],{queryParams:{}})},error:()=>this.toaster.error("sync.details.authentication.fail")})}goBack(){this.stepIndex()>0&&this.stepIndex.update(e=>e-1)}goNext(){if(!this.configuration)return;const e=this.configuration;this.syncId?this._goNext():this.connectorDefinition.pipe((0,b.s)(1),(0,p.n)(n=>this.modalService.openConfirm({title:this.translate.instant("sync.add-page.confirm-authenticate.title",{connector:n.title}),description:this.translate.instant("sync.add-page.confirm-authenticate.description"),confirmLabel:this.translate.instant("sync.add-page.confirm-authenticate.confirm-button")}).onClose),(0,_.p)(n=>!!n),(0,p.n)(()=>this._createSync(e)),(0,p.n)(n=>this._onSuccessfulCreation(n,e))).subscribe({error:n=>{console.warn(n),this.toaster.error("sync.add-page.toast.generic-error")}})}cancel(){this.syncId?this.modalService.openConfirm({title:"sync.confirm.cancel-oauth.title",description:"sync.confirm.cancel-oauth.description",isDestructive:!0,confirmLabel:"sync.confirm.cancel-oauth.confirm-label",cancelLabel:"sync.confirm.cancel-oauth.cancel-label"}).onClose.pipe((0,_.p)(e=>!!e),(0,p.n)(()=>this.syncService.deleteSync(this.syncId))).subscribe({next:()=>this.router.navigate([this.backPath],{relativeTo:this.currentRoute})}):this.router.navigate([this.backPath],{relativeTo:this.currentRoute})}save(){if(!this.configuration)return;this.saving=!0;const e=this.configuration;if(this.syncId){if(this.folderSelection.length>0){const n=this.syncId;this.syncService.updateSync(n,{foldersToSync:this.folderSelection},!0).pipe((0,p.n)(()=>this._syncCreationDone(n))).subscribe({error:i=>this._errorHandler(i)})}}else this._createSync(e).pipe((0,p.n)(n=>this._onSuccessfulCreation(n,e))).subscribe({error:n=>this._errorHandler(n)})}updateConfiguration(e){this.configuration=e}updateSelection(e){this.folderSelection=e}_goNext(){this.steps.pipe((0,b.s)(1)).subscribe(e=>{this.stepIndex()<e.length&&this.stepIndex.update(n=>n+1)})}_createSync(e){return this.syncService.addSync(e).pipe((0,v.M)(()=>this.syncService.setCurrentSyncId(e.id)),(0,h.T)(()=>this.syncService.getConnector(e.connector.name,e.id)),(0,p.n)(n=>n.allowToSelectFolders?(0,m.of)(n):("function"==typeof n.handleParameters&&n.handleParameters(e.connector.parameters),this.syncService.updateSync(e.id,{foldersToSync:n.getStaticFolders()}).pipe((0,h.T)(()=>this.syncService.getConnector(e.connector.name,e.id))))))}_onSuccessfulCreation(e,n){if(e.hasServerSideAuth){let i=location.href.split("/sync/add/")[0];return this.sdk.nuclia.options.standalone&&(i=i.replace("#/","")),e.goToOAuth(`${i}/sync/add/${n.connector.name}/${n.id}`,!0),(0,m.of)()}return this._syncCreationDone(n.id)}_syncCreationDone(e){return(0,m.of)(!0).pipe((0,v.M)(()=>{this.router.navigate([this.syncId?`../../../${e}`:`../../${e}`],{relativeTo:this.currentRoute})}),(0,p.n)(()=>(this.toaster.success("sync.details.toast.triggering-sync-success"),this.syncService.triggerSync(e).pipe((0,V.W)(()=>(this.toaster.error("sync.details.toast.triggering-sync-failed"),(0,m.of)()))))))}_errorHandler(e){this.saving=!1,console.warn(e),this.toaster.error("sync.add-page.toast.generic-error")}static#t=this.\u0275fac=function(n){return new(n||o)};static#e=this.\u0275cmp=t.VBU({type:o,selectors:[["nsy-add-sync-page"]],decls:8,vars:10,consts:[[1,"page-spacing"],[3,"link"],[1,"page-title"],["size","large",3,"path"],[1,"page-description"],[3,"sync","kbId","connector","connectorId"],[3,"configurationChange","validForm","sync","kbId","connector","connectorId"],[3,"sync"],[3,"selectedSyncItems","sync"],["footerNote",""],["aspect","basic"],["kind","primary",3,"disabled"],["aspect","basic",3,"click"],["kind","primary",3,"click","disabled"]],template:function(n,i){if(1&n&&(t.j41(0,"div",0)(1,"nsi-back-button",1),t.EFF(2),t.nI1(3,"translate"),t.k0s(),t.nVh(4,Oe,2,3),t.nI1(5,"async"),t.nVh(6,We,3,1,"div"),t.nI1(7,"async"),t.k0s()),2&n){let a,g;t.R7$(),t.Y8G("link",i.backPath),t.R7$(),t.SpI(" ",t.bMT(3,4,"sync.add-page.back-button")," "),t.R7$(2),t.vxM((a=t.bMT(5,6,i.connectorId))?4:-1,a),t.R7$(2),t.vxM((g=t.bMT(7,8,i.connector))?6:-1,g)}},dependencies:[S.MD,S.Jj,u.Xp,l.Ymm,j.Q,l.V3x,E.R,u.o3,f.h,f.D9,st,B,u.J4,at.t],styles:['@import"https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100..900;1,100..900&display=swap";@charset "UTF-8";@font-face{font-family:Source Code Pro;font-style:normal;font-weight:400;src:url(source-code-pro-v14-latin-regular.e7bb30b550ed09e8.woff2) format("woff2"),url(source-code-pro-v14-latin-regular.c54f7f16da733fd8.woff) format("woff")}[_ngcontent-%COMP%]:root{--color-dark-stronger: #000;--color-light-stronger: #fff;--color-neutral-regular: var(--custom-color-neutral-regular, hsl(0, 0%, 44%));--color-neutral-light: var(--custom-color-neutral-light, hsl(0, 0%, 77%));--color-neutral-lighter: var(--custom-color-neutral-lighter, hsl(0, 0%, 90%));--color-neutral-lightest: var(--custom-color-neutral-lightest, hsl(240, 7%, 97%));--color-primary-stronger: var(--custom-color-primary-stronger, hsl(252, 100%, 24%));--color-primary-strong: var(--custom-color-primary-strong, hsl(223.74, 100%, 39.8%));--color-primary-regular: var(--custom-color-primary-regular, hsl(223.2, 100%, 50.98%));--color-primary-light: var(--custom-color-primary-light, hsl(252, 100%, 73%));--color-primary-lighter: var(--custom-color-primary-lighter, hsl(212.57, 100%, 93.14%));--color-primary-lightest: var(--custom-color-primary-lightest, hsl(215.29, 100%, 96.67%));--color-secondary-stronger: hsl(49, 100%, 30%);--color-secondary-strong: hsl(49, 100%, 40%);--color-secondary-regular: hsl(49, 100%, 60%);--color-secondary-light: hsl(49, 100%, 80%);--color-secondary-lighter: hsl(49, 100%, 90%);--color-secondary-lightest: hsl(49, 100%, 95%);--color-tertiary-stronger: hsl(2251, 100%, 24%);--color-tertiary-strong: hsl(2251, 100%, 40%);--color-tertiary-regular: hsl(2251, 100%, 50%);--color-tertiary-light: hsl(2251, 100%, 65%);--color-tertiary-lighter: hsl(2251, 100%, 92%);--color-tertiary-lightest: hsl(2251, 100%, 96%)}.page-spacing[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem}.page-title[_ngcontent-%COMP%]{align-items:center;display:flex;gap:.5rem}.inline-form[_ngcontent-%COMP%] pa-select[_ngcontent-%COMP%]{flex:0 0 auto;min-width:8rem;width:fit-content}.inline-form[_ngcontent-%COMP%] pa-input[_ngcontent-%COMP%]{max-width:unset}'],changeDetection:0})}return o})();var He=c(4572),ze=c(2885);const Ke=["activitySection"],lt=(o,r)=>r.id;function Ze(o,r){if(1&o&&(t.j41(0,"div",3)(1,"label"),t.EFF(2),t.nI1(3,"translate"),t.k0s(),t.j41(4,"div",14),t.EFF(5),t.nI1(6,"translate"),t.k0s()(),t.nrm(7,"div",4)),2&o){const e=t.XpG();t.R7$(2),t.JRh(t.bMT(3,2,"sync.details.settings.synchronize-security-groups")),t.R7$(3),t.SpI(" ",t.bMT(6,4,e.sync.syncSecurityGroups?"sync.details.settings.boolean.true":"sync.details.settings.boolean.false")," ")}}function qe(o,r){if(1&o&&(t.j41(0,"nsi-label",6),t.EFF(1),t.k0s()),2&o){const e=r.$implicit;t.Y8G("color",e.color),t.R7$(),t.SpI(" ",e.label," ")}}function tn(o,r){1&o&&t.EFF(0," \u2013 ")}function en(o,r){if(1&o&&(t.j41(0,"nsi-label",15),t.EFF(1),t.k0s()),2&o){const e=r.$implicit;t.R7$(),t.SpI(" ",e," ")}}function nn(o,r){1&o&&t.EFF(0," \u2013 ")}function on(o,r){1&o&&(t.j41(0,"div",5),t.Z7z(1,en,2,1,"nsi-label",15,t.fX1,!1,nn,1,0),t.k0s()),2&o&&(t.R7$(),t.Dyx(r.extensions.split(", ")))}function rn(o,r){1&o&&t.EFF(0," \u2013 ")}function sn(o,r){if(1&o&&(t.EFF(0),t.nI1(1,"translate"),t.nrm(2,"pa-datetime",16),t.EFF(3),t.nI1(4,"translate"),t.nrm(5,"pa-datetime",16)),2&o){const e=r;t.SpI(" ",t.bMT(1,4,"sync.details.settings.modification-date.from")," "),t.R7$(2),t.Y8G("datetime",e.from),t.R7$(),t.SpI(" ",t.bMT(4,6,"sync.details.settings.modification-date.to")," "),t.R7$(2),t.Y8G("datetime",e.to)}}function an(o,r){1&o&&t.EFF(0," \u2013 ")}function cn(o,r){if(1&o&&(t.j41(0,"div"),t.EFF(1),t.k0s()),2&o){const e=t.XpG().$implicit,n=t.XpG(3);t.R7$(),t.JRh(n.sync.connector.parameters[e.id]||"_")}}function ln(o,r){if(1&o&&t.nrm(0,"app-parameters-table",18),2&o){const e=t.XpG().$implicit,n=t.XpG(3);t.Y8G("values",n.sync.connector.parameters[e.id])}}function dn(o,r){1&o&&t.EFF(0," \u2013 ")}function pn(o,r){1&o&&t.nrm(0,"div",4)}function hn(o,r){if(1&o&&(t.j41(0,"div",3)(1,"label"),t.EFF(2),t.nI1(3,"translate"),t.k0s(),t.nVh(4,cn,2,1,"div")(5,ln,1,1,"app-parameters-table",18)(6,dn,1,0),t.k0s(),t.nVh(7,pn,1,0,"div",4)),2&o){const e=r.$implicit,n=r.$index,i=r.$count,a=t.XpG(3);t.R7$(2),t.JRh(t.bMT(3,3,e.label)),t.R7$(2),t.vxM("table"!==e.type?4:(null==a.sync.connector.parameters[e.id]?null:a.sync.connector.parameters[e.id].length)>0?5:6),t.R7$(3),t.vxM(n!==i-1?7:-1)}}function un(o,r){if(1&o&&(t.j41(0,"nsi-two-columns-configuration-item",17)(1,"div",2),t.Z7z(2,hn,8,5,null,null,lt),t.k0s()()),2&o){const e=r.$implicit;t.Y8G("itemTitle",e.title)("description",e.description||""),t.R7$(2),t.Dyx(e.fields)}}function mn(o,r){if(1&o&&(t.Z7z(0,un,4,2,"nsi-two-columns-configuration-item",17,lt),t.nI1(2,"async")),2&o){const e=t.XpG();t.Dyx(t.bMT(2,0,e.connector.getParametersSections()))}}function gn(o,r){if(1&o&&(t.j41(0,"nsi-two-columns-configuration-item",8)(1,"div"),t.EFF(2),t.k0s()()),2&o){const e=t.XpG();t.R7$(2),t.JRh(e.extractStrategy)}}function yn(o,r){1&o&&t.nrm(0,"pa-icon",20)}function fn(o,r){1&o&&t.nrm(0,"pa-icon",21)}function _n(o,r){1&o&&t.nrm(0,"pa-icon",22)}function bn(o,r){if(1&o&&(t.j41(0,"pa-table-row")(1,"pa-table-cell")(2,"div",19),t.nVh(3,yn,1,0,"pa-icon",20)(4,fn,1,0,"pa-icon",21)(5,_n,1,0,"pa-icon",22),t.EFF(6),t.k0s()(),t.j41(7,"pa-table-cell")(8,"div",23),t.nrm(9,"pa-datetime",24),t.k0s()()()),2&o){let e;const n=r.$implicit;t.R7$(3),t.vxM("high"===(e=n.level)?3:"medium"===e?4:"low"===e?5:-1),t.R7$(3),t.SpI(" ",n.message," "),t.R7$(3),t.Y8G("datetime",n.createdAt)}}function Cn(o,r){1&o&&(t.j41(0,"pa-table-row",13)(1,"pa-table-cell")(2,"div",23),t.EFF(3),t.nI1(4,"translate"),t.k0s()()()),2&o&&(t.R7$(3),t.JRh(t.bMT(4,1,"sync.details.activity-log.no-activity")))}let vn=(()=>{class o{constructor(){this.labelService=(0,s.WQX)(C.xQ),this.cdr=(0,s.WQX)(M.gRc),this.currentRoute=(0,s.WQX)(I.nX),this.sdk=(0,s.WQX)(C.ok),this.connector=null,this._logs=[],this.labelSets={},this.coloredLabels=[],this.extractStrategy=""}set logs(e){e&&(this._logs=e)}get logs(){return this._logs}ngAfterViewInit(){this.currentRoute.queryParams.pipe((0,_.p)(e=>e.section),(0,h.T)(e=>e.section),(0,b.s)(1)).subscribe({next:e=>{setTimeout(()=>{"activity"===e&&this.activitySection&&this.activitySection.nativeElement.scrollIntoView({behavior:"smooth"})},300)}})}ngOnInit(){this.labelService.resourceLabelSets.pipe((0,b.s)(1),(0,_.p)(n=>!!n),(0,h.T)(n=>n)).subscribe(n=>{this.labelSets=n,this.coloredLabels=this.sync.labels?.map(i=>({...i,color:this.labelSets[i.labelset]?.color}))||[],this.cdr.detectChanges()});const e=this.sync.extract_strategy;e&&this.sdk.currentKb.pipe((0,b.s)(1),(0,p.n)(n=>n.getExtractStrategies())).subscribe(n=>{this.extractStrategy=n[e]?.name||"",this.cdr.markForCheck()})}static#t=this.\u0275fac=function(n){return new(n||o)};static#e=this.\u0275cmp=t.VBU({type:o,selectors:[["nsy-sync-settings"]],viewQuery:function(n,i){if(1&n&&t.GBs(Ke,5),2&n){let a;t.mGM(a=t.lsd())&&(i.activitySection=a.first)}},inputs:{sync:"sync",connector:"connector",logs:"logs"},decls:48,vars:26,consts:[["activitySection",""],["noTopBorder","","itemTitle","sync.details.settings.title","description","sync.details.settings.description"],[1,"sync-settings-container"],[1,"body-s","settings-item"],[1,"separator-line"],[1,"row-container"],["readonly","",3,"color"],[1,"body-s","row-container"],["itemTitle","sync.add-page.extract-config.title","description","sync.add-page.extract-config.description"],["itemTitle","sync.details.activity-log.title","description","sync.details.activity-log.description"],[1,"activity-logs-container"],["border","","columns","2fr 1fr"],["header",""],["last",""],[2,"text-transform","capitalize"],["readonly","","neutral",""],["dateOnly","",3,"datetime"],[3,"itemTitle","description"],["readonly","",3,"values"],[1,"body-s","icon-and-text"],["size","small","name","circle-cross",1,"error"],["size","small","name","warning",1,"warning"],["size","small","name","circle-check",1,"success"],[1,"body-s"],[3,"datetime"]],template:function(n,i){if(1&n&&(t.j41(0,"nsi-two-columns-configuration-item",1)(1,"div",2)(2,"div",3)(3,"label"),t.EFF(4),t.nI1(5,"translate"),t.k0s(),t.j41(6,"div"),t.EFF(7),t.k0s()(),t.nrm(8,"div",4),t.nVh(9,Ze,8,6),t.j41(10,"div",3)(11,"label"),t.EFF(12),t.nI1(13,"translate"),t.k0s(),t.j41(14,"div",5),t.Z7z(15,qe,2,2,"nsi-label",6,t.fX1,!1,tn,1,0),t.k0s()(),t.nrm(18,"div",4),t.j41(19,"label"),t.EFF(20),t.nI1(21,"translate"),t.k0s(),t.j41(22,"div",3),t.nVh(23,on,4,1,"div",5)(24,rn,1,0),t.k0s(),t.nrm(25,"div",4),t.j41(26,"label"),t.EFF(27),t.nI1(28,"translate"),t.k0s(),t.j41(29,"div",7),t.nVh(30,sn,6,8)(31,an,1,0),t.k0s()()(),t.nVh(32,mn,3,2),t.nVh(33,gn,3,1,"nsi-two-columns-configuration-item",8),t.j41(34,"nsi-two-columns-configuration-item",9)(35,"div",10,0)(37,"pa-table",11)(38,"pa-table-header")(39,"pa-table-cell",12),t.EFF(40),t.nI1(41,"translate"),t.k0s(),t.j41(42,"pa-table-cell",12),t.EFF(43),t.nI1(44,"translate"),t.k0s()(),t.Z7z(45,bn,10,3,"pa-table-row",null,t.fX1,!1,Cn,5,3,"pa-table-row",13),t.k0s()()()),2&n){let a,g;t.R7$(4),t.JRh(t.bMT(5,14,"sync.details.settings.name")),t.R7$(3),t.JRh(i.sync.title),t.R7$(2),t.vxM(null!=i.connector&&i.connector.canSyncSecurityGroups?9:-1),t.R7$(3),t.JRh(t.bMT(13,16,"sync.details.settings.labels")),t.R7$(3),t.Dyx(i.coloredLabels),t.R7$(5),t.SpI(" ",t.bMT(21,18,null!=i.sync.filters&&null!=i.sync.filters.fileExtensions&&i.sync.filters.fileExtensions.exclude?"sync.details.settings.file-extensions.excluded":"sync.details.settings.file-extensions.included")," "),t.R7$(3),t.vxM((a=null==i.sync.filters?null:i.sync.filters.fileExtensions)?23:24,a),t.R7$(4),t.JRh(t.bMT(28,20,"sync.details.settings.modification-date.label")),t.R7$(3),t.vxM((g=null==i.sync.filters?null:i.sync.filters.modified)?30:31,g),t.R7$(2),t.vxM(i.connector?32:-1),t.R7$(),t.vxM(i.extractStrategy?33:-1),t.R7$(7),t.JRh(t.bMT(41,22,"sync.details.activity-log.table-header.message")),t.R7$(3),t.JRh(t.bMT(44,24,"sync.details.activity-log.table-header.date")),t.R7$(2),t.Dyx(i.logs)}},dependencies:[S.MD,S.Jj,u._8,f.h,f.D9,u.OE,it.U,l.Pa6,nt.Z,l.EGN,q.O,tt.e,et.U,ze.Bz,l.V3x,E.R,C.Qy],styles:['@import"https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100..900;1,100..900&display=swap";@charset "UTF-8";@font-face{font-family:Source Code Pro;font-style:normal;font-weight:400;src:url(source-code-pro-v14-latin-regular.e7bb30b550ed09e8.woff2) format("woff2"),url(source-code-pro-v14-latin-regular.c54f7f16da733fd8.woff) format("woff")}[_ngcontent-%COMP%]:root{--color-dark-stronger: #000;--color-light-stronger: #fff;--color-neutral-regular: var(--custom-color-neutral-regular, hsl(0, 0%, 44%));--color-neutral-light: var(--custom-color-neutral-light, hsl(0, 0%, 77%));--color-neutral-lighter: var(--custom-color-neutral-lighter, hsl(0, 0%, 90%));--color-neutral-lightest: var(--custom-color-neutral-lightest, hsl(240, 7%, 97%));--color-primary-stronger: var(--custom-color-primary-stronger, hsl(252, 100%, 24%));--color-primary-strong: var(--custom-color-primary-strong, hsl(223.74, 100%, 39.8%));--color-primary-regular: var(--custom-color-primary-regular, hsl(223.2, 100%, 50.98%));--color-primary-light: var(--custom-color-primary-light, hsl(252, 100%, 73%));--color-primary-lighter: var(--custom-color-primary-lighter, hsl(212.57, 100%, 93.14%));--color-primary-lightest: var(--custom-color-primary-lightest, hsl(215.29, 100%, 96.67%));--color-secondary-stronger: hsl(49, 100%, 30%);--color-secondary-strong: hsl(49, 100%, 40%);--color-secondary-regular: hsl(49, 100%, 60%);--color-secondary-light: hsl(49, 100%, 80%);--color-secondary-lighter: hsl(49, 100%, 90%);--color-secondary-lightest: hsl(49, 100%, 95%);--color-tertiary-stronger: hsl(2251, 100%, 24%);--color-tertiary-strong: hsl(2251, 100%, 40%);--color-tertiary-regular: hsl(2251, 100%, 50%);--color-tertiary-light: hsl(2251, 100%, 65%);--color-tertiary-lighter: hsl(2251, 100%, 92%);--color-tertiary-lightest: hsl(2251, 100%, 96%)}.sync-settings-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.75rem}.sync-settings-container[_ngcontent-%COMP%] .settings-item[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.sync-settings-container[_ngcontent-%COMP%] .body-s[_ngcontent-%COMP%] + label[_ngcontent-%COMP%]{color:var(--color-neutral-regular, hsl(207, 17%, 58%));font-weight:600}.sync-settings-container[_ngcontent-%COMP%] .row-container[_ngcontent-%COMP%]{align-items:center;display:flex;flex-wrap:wrap;gap:.5rem}.activity-logs-container[_ngcontent-%COMP%] .icon-and-text[_ngcontent-%COMP%]{align-items:center;display:flex;gap:.25rem}.activity-logs-container[_ngcontent-%COMP%] .icon-and-text[_ngcontent-%COMP%] pa-icon[_ngcontent-%COMP%]{display:flex}.activity-logs-container[_ngcontent-%COMP%] .icon-and-text[_ngcontent-%COMP%] .error[_ngcontent-%COMP%], .activity-logs-container[_ngcontent-%COMP%] .icon-and-text[_ngcontent-%COMP%] .warning[_ngcontent-%COMP%]{color:var(--color-secondary-stronger, hsl(7, 90%, 35%))}.activity-logs-container[_ngcontent-%COMP%] .icon-and-text[_ngcontent-%COMP%] .success[_ngcontent-%COMP%]{color:var(--color-primary-strong)}'],changeDetection:0})}return o})();const Sn=o=>({count:o});function xn(o,r){if(1&o){const e=t.RV6();t.j41(0,"header")(1,"pa-input",1),t.EFF(2),t.nI1(3,"translate"),t.k0s(),t.j41(4,"pa-button",2),t.bIt("click",function(){s.eBV(e);const i=t.XpG();return s.Njj(i.editing=!0)}),t.EFF(5),t.nI1(6,"translate"),t.k0s()(),t.j41(7,"div",3),t.EFF(8),t.nI1(9,"translate"),t.k0s(),t.nrm(10,"nsi-folder-list",4)}if(2&o){const e=t.XpG();t.R7$(),t.Y8G("formControl",e.queryControl),t.R7$(),t.SpI(" ",t.bMT(3,6,"sync.folder-selection.search-input-label")," "),t.R7$(3),t.JRh(t.bMT(6,8,"sync.folder-selection.edit-folders-button")),t.R7$(3),t.JRh(t.bMT(9,10,"sync.folder-selection.current-selection")),t.R7$(2),t.Y8G("filtered",!!e.query)("folders",e.selectedFolders)}}function Tn(o,r){if(1&o){const e=t.RV6();t.j41(0,"nsy-folder-selection",5),t.bIt("selectedSyncItems",function(i){s.eBV(e);const a=t.XpG();return s.Njj(a.updateSelection(i))}),t.k0s(),t.j41(1,"nsi-sticky-footer")(2,"div",6),t.EFF(3),t.nI1(4,"translate"),t.k0s(),t.j41(5,"pa-button",7),t.bIt("click",function(){s.eBV(e);const i=t.XpG();return s.Njj(i.editing=!1)}),t.EFF(6),t.nI1(7,"translate"),t.k0s(),t.j41(8,"pa-button",8),t.bIt("click",function(){s.eBV(e);const i=t.XpG();return s.Njj(i.saveSelection())}),t.EFF(9),t.nI1(10,"translate"),t.k0s()()}if(2&o){const e=t.XpG();t.Y8G("sync",e.sync),t.R7$(3),t.SpI(" ",t.i5U(4,4,"sync.folder-selection.footer.selection-count",t.eq3(11,Sn,e.selectionCount))," "),t.R7$(3),t.SpI(" ",t.bMT(7,7,"generic.cancel")," "),t.R7$(3),t.SpI(" ",t.bMT(10,9,"sync.folder-selection.footer.save-changes")," ")}}let Fn=(()=>{class o{constructor(){this.cdr=(0,s.WQX)(M.gRc),this._unsubscribeAll=new k.B,this.selectionChange=new t.bkB,this.editing=!1,this.selection=[],this.selectionCount=0,this.queryControl=new d.MJ("")}set sync(e){this._sync=e,this.updateSelection(e.foldersToSync||[])}get sync(){return this._sync}get selectedFolders(){const e=this.selection.map(i=>i.metadata.displayPath||i.metadata.path)||[],n=this.query?this.query.toLocaleLowerCase():"";return n?e.filter(i=>i.toLocaleLowerCase().includes(n)):e}get query(){return this.queryControl.value}updateSelection(e){this.selection=e,this.selectionCount=this.selection.length,this.cdr.detectChanges()}saveSelection(){this.selectionChange.emit(this.selection),this.editing=!1,this.cdr.markForCheck()}static#t=this.\u0275fac=function(n){return new(n||o)};static#e=this.\u0275cmp=t.VBU({type:o,selectors:[["nsy-folders-tab"]],inputs:{sync:"sync"},outputs:{selectionChange:"selectionChange"},decls:3,vars:1,consts:[[1,"folders-tab"],["icon","search",3,"formControl"],[3,"click"],[1,"title-xxs"],[3,"filtered","folders"],[3,"selectedSyncItems","sync"],["footerNote","",1,"title-xs"],["aspect","basic",3,"click"],["kind","primary",3,"click"]],template:function(n,i){1&n&&(t.j41(0,"div",0),t.nVh(1,xn,11,12)(2,Tn,11,13),t.k0s()),2&n&&(t.R7$(),t.vxM(i.editing?i.sync?2:-1:1))},dependencies:[B,l.XgI,N.S,l.Ymm,j.Q,f.h,f.D9,l.V3x,u.Sq,u.o3,d.X1,d.BC,d.l_],styles:['@import"https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100..900;1,100..900&display=swap";@charset "UTF-8";@font-face{font-family:Source Code Pro;font-style:normal;font-weight:400;src:url(source-code-pro-v14-latin-regular.e7bb30b550ed09e8.woff2) format("woff2"),url(source-code-pro-v14-latin-regular.c54f7f16da733fd8.woff) format("woff")}[_ngcontent-%COMP%]:root{--color-dark-stronger: #000;--color-light-stronger: #fff;--color-neutral-regular: var(--custom-color-neutral-regular, hsl(0, 0%, 44%));--color-neutral-light: var(--custom-color-neutral-light, hsl(0, 0%, 77%));--color-neutral-lighter: var(--custom-color-neutral-lighter, hsl(0, 0%, 90%));--color-neutral-lightest: var(--custom-color-neutral-lightest, hsl(240, 7%, 97%));--color-primary-stronger: var(--custom-color-primary-stronger, hsl(252, 100%, 24%));--color-primary-strong: var(--custom-color-primary-strong, hsl(223.74, 100%, 39.8%));--color-primary-regular: var(--custom-color-primary-regular, hsl(223.2, 100%, 50.98%));--color-primary-light: var(--custom-color-primary-light, hsl(252, 100%, 73%));--color-primary-lighter: var(--custom-color-primary-lighter, hsl(212.57, 100%, 93.14%));--color-primary-lightest: var(--custom-color-primary-lightest, hsl(215.29, 100%, 96.67%));--color-secondary-stronger: hsl(49, 100%, 30%);--color-secondary-strong: hsl(49, 100%, 40%);--color-secondary-regular: hsl(49, 100%, 60%);--color-secondary-light: hsl(49, 100%, 80%);--color-secondary-lighter: hsl(49, 100%, 90%);--color-secondary-lightest: hsl(49, 100%, 95%);--color-tertiary-stronger: hsl(2251, 100%, 24%);--color-tertiary-strong: hsl(2251, 100%, 40%);--color-tertiary-regular: hsl(2251, 100%, 50%);--color-tertiary-light: hsl(2251, 100%, 65%);--color-tertiary-lighter: hsl(2251, 100%, 92%);--color-tertiary-lightest: hsl(2251, 100%, 96%)}.folders-tab[_ngcontent-%COMP%]{position:relative}.folders-tab[_ngcontent-%COMP%] header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;margin-bottom:1rem}.folders-tab[_ngcontent-%COMP%] header[_ngcontent-%COMP%] pa-input[_ngcontent-%COMP%]{width:30rem}'],changeDetection:0})}return o})();var In=c(7725),Rn=c(3515);function Mn(o,r){if(1&o){const e=t.RV6();t.j41(0,"div",8)(1,"div",9)(2,"pa-toggle",10),t.bIt("valueChange",function(i){s.eBV(e);const a=t.XpG(3);return s.Njj(a.toggleSync(i))}),t.EFF(3),t.nI1(4,"translate"),t.k0s()(),t.j41(5,"pa-button",11),t.nI1(6,"async"),t.bIt("click",function(){s.eBV(e);const i=t.XpG(3);return s.Njj(i.triggerSync())}),t.EFF(7),t.nI1(8,"translate"),t.k0s(),t.j41(9,"pa-button",12),t.EFF(10),t.nI1(11,"translate"),t.k0s(),t.j41(12,"pa-button",13),t.bIt("click",function(){s.eBV(e);const i=t.XpG(3);return s.Njj(i.deleteSync())}),t.EFF(13),t.nI1(14,"translate"),t.k0s()()}if(2&o){const e=t.XpG(2),n=t.XpG();t.R7$(2),t.Y8G("value",!e.disabled),t.R7$(),t.SpI(" ",t.bMT(4,6,e.disabled?"sync.badge.inactive":"sync.badge.active")," "),t.R7$(2),t.Y8G("disabled",t.bMT(6,8,n.isSyncing)),t.R7$(2),t.SpI(" ",t.bMT(8,10,"sync.details.buttons.sync-now")," "),t.R7$(3),t.SpI(" ",t.bMT(11,12,"sync.details.buttons.edit-settings")," "),t.R7$(3),t.SpI(" ",t.bMT(14,14,"sync.details.buttons.delete")," ")}}function kn(o,r){if(1&o&&(t.j41(0,"div",2)(1,"h1",6),t.nrm(2,"pa-icon",7),t.EFF(3),t.k0s(),t.nVh(4,Mn,15,16,"div",8),t.nI1(5,"async"),t.k0s()),2&o){const e=t.XpG(),n=t.XpG();t.R7$(2),t.Y8G("path",r.logo),t.R7$(),t.SpI(" ",e.title," "),t.R7$(),t.vxM(!1===t.bMT(5,3,n.editMode)?4:-1)}}function $n(o,r){if(1&o){const e=t.RV6();t.j41(0,"pa-tab",14),t.bIt("click",function(){s.eBV(e);const i=t.XpG(2);return s.Njj(i.activeTab="folders")}),t.EFF(1),t.nI1(2,"translate"),t.k0s()}if(2&o){const e=t.XpG(2);t.Y8G("active","folders"===e.activeTab),t.R7$(),t.SpI(" ",t.bMT(2,2,"sync.details.tabs.folders")," ")}}function Pn(o,r){if(1&o){const e=t.RV6();t.j41(0,"nsy-configuration-form",19),t.nI1(1,"async"),t.nI1(2,"async"),t.nI1(3,"async"),t.bIt("configurationChange",function(i){s.eBV(e);const a=t.XpG(3);return s.Njj(a.updateConfiguration(i))})("validForm",function(i){s.eBV(e);const a=t.XpG(3);return s.Njj(a.validForm=i)}),t.k0s()}if(2&o){let e;const n=t.XpG(2),i=t.XpG();t.Y8G("sync",n)("kbId",t.bMT(1,4,i.kbId))("connector",t.bMT(2,6,i.connector))("connectorId",null==(e=t.bMT(3,8,i.connectorDef))?null:e.id)}}function wn(o,r){if(1&o){const e=t.RV6();t.j41(0,"nsy-folder-selection",20),t.bIt("selectedSyncItems",function(i){s.eBV(e);const a=t.XpG(3);return s.Njj(a.updateSelection(i))}),t.k0s()}if(2&o){const e=t.XpG(2);t.Y8G("sync",e)}}function En(o,r){if(1&o){const e=t.RV6();t.j41(0,"div"),t.nVh(1,Pn,4,10,"nsy-configuration-form",15)(2,wn,1,1,"nsy-folder-selection",16),t.j41(3,"nsi-sticky-footer")(4,"pa-button",17),t.EFF(5),t.nI1(6,"translate"),t.k0s(),t.j41(7,"pa-button",18),t.bIt("click",function(){s.eBV(e);const i=t.XpG(2);return s.Njj(i.saveChanges())}),t.EFF(8),t.nI1(9,"translate"),t.k0s()()()}if(2&o){let e;const n=t.XpG(2);t.R7$(),t.vxM("settings"===(e=n.activeTab)?1:"folders"===e?2:-1),t.R7$(4),t.SpI(" ",t.bMT(6,3,"generic.cancel")," "),t.R7$(3),t.SpI(" ",t.bMT(9,5,"sync.details.buttons.save-changes")," ")}}function jn(o,r){if(1&o&&(t.nrm(0,"nsy-sync-settings",21),t.nI1(1,"async"),t.nI1(2,"async")),2&o){const e=t.XpG(2),n=t.XpG();t.Y8G("sync",e)("connector",t.bMT(1,3,n.connector))("logs",t.bMT(2,5,n.activityLogs))}}function Gn(o,r){if(1&o){const e=t.RV6();t.j41(0,"nsy-folders-tab",22),t.bIt("selectionChange",function(i){s.eBV(e);const a=t.XpG(3);return s.Njj(a.updateFolders(i))}),t.k0s()}if(2&o){const e=t.XpG(2);t.Y8G("sync",e)}}function On(o,r){if(1&o&&t.nVh(0,jn,3,7,"nsy-sync-settings",21)(1,Gn,1,1,"nsy-folders-tab",16),2&o){let e;const n=t.XpG(2);t.vxM("settings"===(e=n.activeTab)?0:"folders"===e?1:-1)}}function Vn(o,r){if(1&o){const e=t.RV6();t.nVh(0,kn,6,5,"div",2),t.nI1(1,"async"),t.j41(2,"pa-tabs",3)(3,"pa-tab",4),t.bIt("click",function(){s.eBV(e);const i=t.XpG();return s.Njj(i.activeTab="settings")}),t.EFF(4),t.nI1(5,"translate"),t.k0s(),t.nVh(6,$n,3,4,"pa-tab",5),t.nI1(7,"async"),t.k0s(),t.nVh(8,En,10,7,"div"),t.nI1(9,"async"),t.vZN(10,On,2,1)}if(2&o){let e,n;const i=t.XpG();t.vxM((e=t.bMT(1,5,i.connectorDef))?0:-1,e),t.R7$(3),t.Y8G("active","settings"===i.activeTab),t.R7$(),t.SpI(" ",t.bMT(5,7,"sync.details.tabs.settings")," "),t.R7$(2),t.vxM(null!=(n=t.bMT(7,9,i.connector))&&n.allowToSelectFolders?6:-1),t.R7$(2),t.vxM(t.bMT(9,11,i.editMode)?8:10)}}let dt=(()=>{class o{constructor(){this.router=(0,s.WQX)(I.Ix),this.currentRoute=(0,s.WQX)(I.nX),this.syncService=(0,s.WQX)(w),this.toaster=(0,s.WQX)(u._g),this.sdk=(0,s.WQX)(C.ok),this.modalService=(0,s.WQX)(u.w8),this.translate=(0,s.WQX)(f.c$),this.unsubscribeAll=new k.B,this.isDeleted=new k.B,this.kbId=this.sdk.currentKb.pipe((0,h.T)(e=>e.id)),this.syncId=this.currentRoute.params.pipe((0,_.p)(e=>!!e.syncId),(0,h.T)(e=>e.syncId),(0,v.M)(e=>this.syncService.setCurrentSyncId(e))),this.sync=this.syncService.cacheUpdated.pipe((0,p.n)(()=>this.syncId),(0,p.n)(e=>this.syncService.getSync(e)),(0,P.Q)(this.isDeleted)),this.connectorDef=this.sync.pipe((0,h.T)(e=>this.syncService.connectors[e.connector.name].definition)),this.connector=this.connectorDef.pipe((0,h.T)(e=>this.syncService.getConnector(e.id,""))),this.activityLogs=this.syncId.pipe((0,p.n)(e=>this.syncService.getLogs(e))),this.activeTab="settings",this.editMode=this.currentRoute.url.pipe((0,h.T)(e=>e.length>1&&"edit"===e[1].path)),this.validForm=!1,this.isSyncing=(0,He.z)([this.syncId,this.syncService.isSyncing]).pipe((0,h.T)(([e,n])=>n[e]||!1))}ngOnDestroy(){this.unsubscribeAll.next(),this.unsubscribeAll.complete(),this.isDeleted.next(),this.isDeleted.complete()}toggleSync(e){this.syncId.pipe((0,b.s)(1),(0,p.n)(n=>this.syncService.updateSync(n,{disabled:!e}))).subscribe({error:()=>this.toaster.error(e?"sync.details.toast.activating-failed":"sync.details.toast.disabling-failed")})}triggerSync(){this.modalService.openConfirm({title:this.translate.instant("sync.details.modal.title"),description:"sync.details.modal.description",confirmLabel:"sync.details.modal.sync-new",cancelLabel:"sync.details.modal.re-sync-all"}).onClose.pipe((0,p.n)(e=>this.syncId.pipe((0,b.s)(1),(0,p.n)(n=>this.syncService.triggerSync(n,!e))))).subscribe({next:()=>this.toaster.success("sync.details.toast.triggering-sync-success"),error:()=>this.toaster.error("sync.details.toast.triggering-sync-failed")})}deleteSync(){this.sync.pipe((0,p.n)(e=>this.modalService.openConfirm({title:this.translate.instant("sync.confirm.deletion.title",{title:e.title}),description:"sync.confirm.deletion.description",isDestructive:!0,confirmLabel:"generic.delete"}).onClose.pipe((0,_.p)(n=>!!n),(0,v.M)(()=>this.isDeleted.next()),(0,p.n)(()=>this.syncService.deleteSync(e.id))))).subscribe({next:()=>this.router.navigate([".."],{relativeTo:this.currentRoute}),error:()=>this.toaster.error("sync.details.toast.deletion-failed")})}updateConfiguration(e){this.updatedConfig=e}updateSelection(e){this.updatedSelection=e}saveChanges(){!this.updatedConfig&&!this.updatedSelection||this.syncId.pipe((0,b.s)(1),(0,p.n)(e=>{const n={...this.updatedConfig};return this.updatedSelection&&(n.foldersToSync=this.updatedSelection),this.syncService.updateSync(e,n)})).subscribe({next:()=>{this.toaster.success("sync.details.toast.modification-success"),this.router.navigate([".."],{relativeTo:this.currentRoute})},error:()=>this.toaster.error("sync.details.toast.modification-failed")})}updateFolders(e){this.syncId.pipe((0,b.s)(1),(0,p.n)(n=>this.syncService.updateSync(n,{foldersToSync:e}))).subscribe({error:()=>this.toaster.error("sync.details.toast.modification-failed")})}static#t=this.\u0275fac=function(n){return new(n||o)};static#e=this.\u0275cmp=t.VBU({type:o,selectors:[["nsy-sync-details-page"]],decls:7,vars:9,consts:[[1,"page-spacing"],[3,"link"],[1,"details-header"],["notFullWidth",""],["data-cy","settings-tab",3,"click","active"],["data-cy","folders-tab",3,"active"],[1,"page-title"],["size","large",3,"path"],[1,"cta-container"],[1,"toggle-container"],["withBackground","","data-cy","active-toggle",3,"valueChange","value"],["aspect","basic","data-cy","sync-now",3,"click","disabled"],["aspect","basic","routerLink","./edit"],["kind","destructive","data-cy","delete",3,"click"],["data-cy","folders-tab",3,"click","active"],["noTopBorder","",3,"sync","kbId","connector","connectorId"],[3,"sync"],["aspect","basic","routerLink",".."],["kind","primary",3,"click"],["noTopBorder","",3,"configurationChange","validForm","sync","kbId","connector","connectorId"],[3,"selectedSyncItems","sync"],[3,"sync","connector","logs"],[3,"selectionChange","sync"]],template:function(n,i){if(1&n&&(t.j41(0,"div",0)(1,"nsi-back-button",1),t.nI1(2,"async"),t.EFF(3),t.nI1(4,"translate"),t.k0s(),t.nVh(5,Vn,11,13),t.nI1(6,"async"),t.k0s()),2&n){let a;t.R7$(),t.Y8G("link",t.bMT(2,3,i.editMode)?"../..":".."),t.R7$(2),t.SpI(" ",t.bMT(4,5,"sync.add-page.back-button")," "),t.R7$(2),t.vxM((a=t.bMT(6,7,i.sync))?5:-1,a)}},dependencies:[S.MD,S.Jj,u.Xp,f.h,f.D9,l.V3x,E.R,l.Ymm,j.Q,l.rkm,U.a,l.aT,In.Q,Rn.w,vn,Fn,K.Wk,u.o3,st,B],styles:['@import"https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100..900;1,100..900&display=swap";@charset "UTF-8";@font-face{font-family:Source Code Pro;font-style:normal;font-weight:400;src:url(source-code-pro-v14-latin-regular.e7bb30b550ed09e8.woff2) format("woff2"),url(source-code-pro-v14-latin-regular.c54f7f16da733fd8.woff) format("woff")}[_ngcontent-%COMP%]:root{--color-dark-stronger: #000;--color-light-stronger: #fff;--color-neutral-regular: var(--custom-color-neutral-regular, hsl(0, 0%, 44%));--color-neutral-light: var(--custom-color-neutral-light, hsl(0, 0%, 77%));--color-neutral-lighter: var(--custom-color-neutral-lighter, hsl(0, 0%, 90%));--color-neutral-lightest: var(--custom-color-neutral-lightest, hsl(240, 7%, 97%));--color-primary-stronger: var(--custom-color-primary-stronger, hsl(252, 100%, 24%));--color-primary-strong: var(--custom-color-primary-strong, hsl(223.74, 100%, 39.8%));--color-primary-regular: var(--custom-color-primary-regular, hsl(223.2, 100%, 50.98%));--color-primary-light: var(--custom-color-primary-light, hsl(252, 100%, 73%));--color-primary-lighter: var(--custom-color-primary-lighter, hsl(212.57, 100%, 93.14%));--color-primary-lightest: var(--custom-color-primary-lightest, hsl(215.29, 100%, 96.67%));--color-secondary-stronger: hsl(49, 100%, 30%);--color-secondary-strong: hsl(49, 100%, 40%);--color-secondary-regular: hsl(49, 100%, 60%);--color-secondary-light: hsl(49, 100%, 80%);--color-secondary-lighter: hsl(49, 100%, 90%);--color-secondary-lightest: hsl(49, 100%, 95%);--color-tertiary-stronger: hsl(2251, 100%, 24%);--color-tertiary-strong: hsl(2251, 100%, 40%);--color-tertiary-regular: hsl(2251, 100%, 50%);--color-tertiary-light: hsl(2251, 100%, 65%);--color-tertiary-lighter: hsl(2251, 100%, 92%);--color-tertiary-lightest: hsl(2251, 100%, 96%)}.page-spacing[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem}.page-title[_ngcontent-%COMP%]{align-items:center;display:flex;gap:.5rem}.details-header[_ngcontent-%COMP%]{align-items:center;display:flex;justify-content:space-between}.cta-container[_ngcontent-%COMP%]{align-items:center;display:flex;gap:.5rem}'],changeDetection:0})}return o})();const Xn=[{path:"",component:Mt,children:[{path:"",component:ee},{path:"add/:connector",component:ct},{path:"add/:connector/:syncId",component:ct},{path:":syncId/edit",component:dt},{path:":syncId",component:dt}]}]}}]);
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<svg version="1.2" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1446 1546" width="1446" height="1546">
|
|
2
|
+
<title>progress-svg</title>
|
|
3
|
+
<style>
|
|
4
|
+
.s0 { fill: #5ce500 }
|
|
5
|
+
</style>
|
|
6
|
+
<path id="Layer" fill-rule="evenodd" class="s0" d="m1445.3 440v771.9c-0.3 4.7-1.1 9.3-2.4 13.7-1.3 4.5-3.2 8.8-5.5 12.8-2.3 4.1-5.1 7.8-8.3 11.2-3.2 3.4-6.8 6.4-10.7 8.9l-25.3 15.2-192.5 111.2-129.9 75.7-27 15.1v-834.9l-722.5-417.7 343.2-197.8 31.6-18.1c4.2-2.1 8.6-3.7 13.1-4.8 4.5-1 9.2-1.6 13.9-1.6 4.6 0 9.3 0.6 13.8 1.6 4.5 1.1 8.9 2.7 13.1 4.8l475.7 274.9 219.5 126.8c0 0 0 31.1 0.2 31.1zm-562.3 865.8c-0.2 4.6-1 9.2-2.4 13.7-1.3 4.4-3.1 8.7-5.5 12.8-2.3 4-5.1 7.8-8.3 11.1-3.2 3.4-6.8 6.4-10.7 9l-27.1 15.1-307.1 177.6v-602.9l-521.9-301.4 26.8-15.6 307.6-177.7c4.2-2 8.6-3.6 13.1-4.7 4.5-1 9.2-1.6 13.8-1.6 4.7 0 9.3 0.6 13.9 1.6 4.5 1.1 8.9 2.7 13.1 4.7l346.6 200.3 148.1 85.7zm-522-271v417.5l-361-208.6z"/>
|
|
7
|
+
</svg>
|
|
@@ -75,6 +75,10 @@
|
|
|
75
75
|
"sync.connectors.rss.url.label": "URL del canal RSS",
|
|
76
76
|
"sync.connectors.sharepoint.account.title": "Compte Sharepoint",
|
|
77
77
|
"sync.connectors.sharepoint.site.label": "Nom del lloc",
|
|
78
|
+
"sync.connectors.sitefinity.apikey.help": "Aneu a la interfície d'administració de Sitefinity, seleccioneu un usuari i genereu una clau d'accés.",
|
|
79
|
+
"sync.connectors.sitefinity.apikey.label": "Clau de l'API",
|
|
80
|
+
"sync.connectors.sitefinity.url.label": "URL del lloc web de Sitefinity",
|
|
81
|
+
"sync.connectors.sitefinity.url.section-title": "URL base",
|
|
78
82
|
"sync.connectors.sitemap.url.label": "URL del sitemap",
|
|
79
83
|
"sync.connectors.sitemap.url.section-title": "URL del sitemap",
|
|
80
84
|
"sync.details.activity-log.description": "Totes les sincronitzacions s'activen automàticament cada 60 minuts.",
|
|
@@ -75,6 +75,10 @@
|
|
|
75
75
|
"sync.connectors.rss.url.label": "RSS feed URL",
|
|
76
76
|
"sync.connectors.sharepoint.account.title": "Sharepoint account",
|
|
77
77
|
"sync.connectors.sharepoint.site.label": "Site name",
|
|
78
|
+
"sync.connectors.sitefinity.apikey.help": "Go to the Sitefinity administration interface, select a user and generate an access key.",
|
|
79
|
+
"sync.connectors.sitefinity.apikey.label": "API key",
|
|
80
|
+
"sync.connectors.sitefinity.url.label": "URL of the Sitefinity website",
|
|
81
|
+
"sync.connectors.sitefinity.url.section-title": "Base URL",
|
|
78
82
|
"sync.connectors.sitemap.url.label": "Sitemap URL",
|
|
79
83
|
"sync.connectors.sitemap.url.section-title": "Sitemap URL",
|
|
80
84
|
"sync.details.activity-log.description": "All syncs are triggered automatically every 60 minutes.",
|
|
@@ -75,6 +75,10 @@
|
|
|
75
75
|
"sync.connectors.rss.url.label": "URL de la fuente RSS",
|
|
76
76
|
"sync.connectors.sharepoint.account.title": "Cuenta Sharepoint",
|
|
77
77
|
"sync.connectors.sharepoint.site.label": "Nombre del sitio",
|
|
78
|
+
"sync.connectors.sitefinity.apikey.help": "Vaya a la interfaz de administración de Sitefinity, seleccione un usuario y genere una clave de acceso.",
|
|
79
|
+
"sync.connectors.sitefinity.apikey.label": "Clave API",
|
|
80
|
+
"sync.connectors.sitefinity.url.label": "URL del sitio web de Sitefinity",
|
|
81
|
+
"sync.connectors.sitefinity.url.section-title": "URL base",
|
|
78
82
|
"sync.connectors.sitemap.url.label": "URL del sitemap",
|
|
79
83
|
"sync.connectors.sitemap.url.section-title": "URL del sitemap",
|
|
80
84
|
"sync.details.activity-log.description": "Todas las sincronizaciones se activan automáticamente cada 60 minutos.",
|
|
@@ -75,6 +75,10 @@
|
|
|
75
75
|
"sync.connectors.rss.url.label": "URL du flux RSS",
|
|
76
76
|
"sync.connectors.sharepoint.account.title": "Compte Sharepoint",
|
|
77
77
|
"sync.connectors.sharepoint.site.label": "Nom du site",
|
|
78
|
+
"sync.connectors.sitefinity.apikey.help": "Accédez à l'interface d'administration de Sitefinity, sélectionnez un utilisateur et générez une clé d'accès.",
|
|
79
|
+
"sync.connectors.sitefinity.apikey.label": "Clé API",
|
|
80
|
+
"sync.connectors.sitefinity.url.label": "URL du site web Sitefinity",
|
|
81
|
+
"sync.connectors.sitefinity.url.section-title": "URL de base",
|
|
78
82
|
"sync.connectors.sitemap.url.label": "URL du sitemap",
|
|
79
83
|
"sync.connectors.sitemap.url.section-title": "URL du sitemap",
|
|
80
84
|
"sync.details.activity-log.description": "Toutes les synchronisations sont déclenchées automatiquement toutes les 60 minutes.",
|
nucliadb_admin_assets/index.html
CHANGED
|
@@ -13,5 +13,5 @@
|
|
|
13
13
|
<body class="body-s">
|
|
14
14
|
<nad-root></nad-root>
|
|
15
15
|
<noscript>Please enable JavaScript to continue using this application.</noscript>
|
|
16
|
-
<script src="runtime.
|
|
16
|
+
<script src="runtime.1198703687a09897.js" type="module"></script><script src="polyfills.07329d7acd49761e.js" type="module"></script><script src="main.9b68d391e92cf7e5.js" type="module"></script></body>
|
|
17
17
|
</html>
|