1"use strict";(self.webpackChunkprivacypillar_sfo3=self.webpackChunkprivacypillar_sfo3||[]).push([["src_app_documentation_documentation_module_ts"],{62430:(U,T,p)=>{p.d(T,{a:()=>C});var f=p(591);class C{constructor(M){this.defaultState=M,this.state$=new f.X(this.defaultState)}getStateObs(){return this.state$.asObservable()}getState(){return this.state$.getValue()}updateState(M){this.state$.next({...this.getState(),...M})}setState(M){this.state$.next({...M})}resetState(){this.setState(this.defaultState)}}},93810:(U,T,p)=>{p.r(T),p.d(T,{DocumentationModule:()=>we});var f=p(36895),C=p(24006),s=p(18178),M=p(79723),S=p(96923),O=p(46162),Z=p(38611),P=p(82778),D=p(42111),x=p(51692),m=p(8929),v=p(80013),e=p(94650),y=p(62430);let F=(()=>{const r=class extends y.a{constructor(){super({oid:"",pid:"",moduleId:"",docContext:"global",breadcrumbs:[],documents:[],visibleModuleOptions:[],selectedModule:null,isModuleLocked:!1,loadingContext:!1,loadingDocuments:!1,search:"",pagination:{limit:10,page:1,total:0,total_pages:1},actionMenuDocumentId:null,modalOpen:!1,addModalMode:"upload",editModalOpen:!1,editModalMode:"upload",deleteConfirmOpen:!1,uploading:!1,editing:!1,deletingDocumentId:null,uploadFileError:"",urlFormError:"",uploadForm:{name:"",file:null,fileType:"",type:"",module:null},urlForm:{name:"",document_url:"",type:""},editForm:{id:"",name:"",file:null,fileType:"",fileSize:0,type:"",document_url:"",module:null},deleteTargetDocument:null})}};let i=r;return r.\u0275fac=function(o){return new(o||r)},r.\u0275prov=e.Yz7({token:r,factory:r.\u0275fac,providedIn:"root"}),i})();var w=p(65056);let k=(()=>{const r=class{constructor(t,o,a,d,c){this.stateService=t,this.route=o,this.router=a,this.messageService=d,this.documentationApiService=c,this.maxFileSizeBytes=5242880,this.supportedFileExtensions=["pdf","doc","docx","xls","xlsx","ppt","pptx","png","jpg","jpeg"],this.supportedDocContexts=["global","cookie-consent","privacy-rights","consent-preference","social-fortuna","ropa","data-discovery","dpia"],this.moduleCodeMap={"ropa management":"ropa","vendor management":"vendor_management","data discovery":"data_discovery","incident response":"incident_response","cookie consent":"cookie_consent",dpia:"dpia","consent preference":"consent_preference","user management":"user_management","dsar management":"dsar","social fortuna":"social_fortuna"},this.rawOid="",this.rawPid="",this.rawDocContext="global",this.rawModuleId="",this.searchSubject=new m.xQ,this.staticModules=[{id:"",name:"Task",module_code:"task",display_name:"Task"},{id:"77725bf2-c130-4863-987f-b4c80326f137",name:"Cookie Consent",module_code:"cookie_consent",display_name:"Cookie Consent"},{id:"",name:"Privacy Rights",module_code:"dsar",display_name:"Privacy Rights"},{id:"bcb0768e-fab4-49a0-a251-a574873c2364",name:"Consent Preference",module_code:"consent_preference",display_name:"Consent Preference"},{id:"",name:"Social Fortuna",module_code:"social_fortuna",display_name:"Social Fortuna"},{id:"0de6590a-f138-4d9a-bade-8d518fb26389",name:"ROPA",module_code:"ropa",display_name:"ROPA"},{id:"",name:"Data Discovery",module_code:"data_discovery",display_name:"Data Discovery"},{id:"",name:"DPIA",module_code:"dpia",display_name:"DPIA"}],this.searchSubject.pipe((0,v.b)(400)).subscribe(()=>{this.loadDocuments()})}init(){this.route.queryParamMap.subscribe(t=>{this.rawOid=t.get("oid")||"",this.rawPid=t.get("pid")||"",this.rawDocContext=t.get("docContext")||"global",this.rawModuleId=t.get("moduleId")||t.get("module_id")||"";const o=this.normalizeQueryId(this.rawOid),a=this.normalizeQueryId(this.rawPid),d=this.resolveDocContext(this.rawDocContext,this.rawPid),c=this.rawModuleId;if(this.normalizeDocumentationRoute(o,a,d,c))return;const l=this.mapModules(this.staticModules),u=l.find(h=>"task"===h.module_code)||l[0]||null,g=l;this.stateService.updateState({oid:o,pid:a,moduleId:c,docContext:d,breadcrumbs:this.buildBreadcrumbs(o,a,d,c),loadingContext:!1,visibleModuleOptions:g,selectedModule:u,isModuleLocked:!1,search:"",pagination:{limit:10,page:1,total:0,total_pages:1},uploadForm:this.getEmptyUploadForm()}),this.loadDocuments()})}getStateObs(){return this.stateService.getStateObs()}setSearch(t){const o=this.stateService.getState();this.stateService.updateState({search:t,pagination:{...o.pagination,page:1}}),this.searchSubject.next(t)}goToPage(t,o){const a=this.stateService.getState();t<1||t>(a.pagination?.total_pages||1)||(this.stateService.updateState({pagination:{...a.pagination,page:t,...o?{limit:o}:{}}}),this.loadDocuments())}openUploadModal(){const t=this.stateService.getState();this.stateService.updateState({actionMenuDocumentId:null,modalOpen:!0,addModalMode:"upload",uploadFileError:"",urlFormError:"",uploadForm:this.getEmptyUploadForm(t.selectedModule),urlForm:this.getEmptyUrlForm()})}closeUploadModal(){const t=this.stateService.getState();this.stateService.updateState({modalOpen:!1,uploading:!1,addModalMode:"upload",uploadFileError:"",urlFormError:"",uploadForm:this.getEmptyUploadForm(t.selectedModule),urlForm:this.getEmptyUrlForm()})}setAddModalMode(t){this.stateService.updateState({addModalMode:t,uploadFileError:"",urlFormError:""})}setEditModalMode(t){this.stateService.updateState({editModalMode:t})}updateUrlForm(t){const o={...this.stateService.getState().urlForm,...t};this.stateService.updateState({urlForm:o})}updateUploadForm(t){const o={...this.stateService.getState().uploadForm,...t};this.stateService.updateState({uploadForm:o})}toggleActionMenu(t){const o=this.stateService.getState().actionMenuDocumentId;this.stateService.updateState({actionMenuDocumentId:o===t?null:t})}closeActionMenu(){this.stateService.getState().actionMenuDocumentId&&this.stateService.updateState({actionMenuDocumentId:null})}openEditModal(t){const o=this.stateService.getState().visibleModuleOptions||[],a=this.findModuleForDocument(t,o);this.stateService.updateState({actionMenuDocumentId:null,editModalOpen:!0,editModalMode:t?.document_url?"url":"upload",editForm:{id:t?.id||"",name:t?.name||"",file:null,fileType:t?.file_type||"",fileSize:t?.file_size||0,type:t?.type||"",document_url:t?.document_url||"",module:a}})}closeEditModal(){this.stateService.updateState({editModalOpen:!1,editing:!1,editModalMode:"upload",editForm:this.getEmptyEditForm()})}openDeleteConfirm(t){this.stateService.updateState({actionMenuDocumentId:null,deleteConfirmOpen:!0,deleteTargetDocument:t})}closeDeleteConfirm(){this.stateService.updateState({deleteConfirmOpen:!1,deleteTargetDocument:null})}updateEditForm(t){const o={...this.stateService.getState().editForm,...t};this.stateService.updateState({editForm:o})}
1setEditFile(t){this.updateEditForm({name:t?.name||this.stateService.getState().editForm?.name||"",file:t,fileType:t?.type||this.stateService.getState().editForm?.fileType||"",fileSize:t?.size||this.stateService.getState().editForm?.fileSize||0})}setUploadFile(t){if(!t)return this.updateUploadForm({name:"",file:null,fileType:""}),void this.stateService.updateState({uploadFileError:""});const o=this.getFileValidationMessage(t);this.stateService.updateState({uploadFileError:o}),this.updateUploadForm({name:t.name,file:t,fileType:t.type||"application/octet-stream"})}uploadDocument(){const t=this.stateService.getState();if("url"===t.addModalMode)return void this.addDocumentByUrl();const o=t.uploadForm?.module||t.selectedModule||t.visibleModuleOptions?.find(u=>"task"===u?.module_code)||null,a=t.uploadForm?.file,d=t.uploadForm?.type||"",c=this.resolveModuleId(o);if(!a)return void this.showMessage("error","Upload file is required");const l=this.getFileValidationMessage(a);if(l)return this.stateService.updateState({uploadFileError:l}),void this.showMessage("error",l);this.stateService.updateState({uploadFileError:""}),o?.module_code?(this.stateService.updateState({uploading:!0}),this.documentationApiService.uploadDocument(t.oid,{file:a,type:d,moduleCode:o.module_code,moduleId:c}).subscribe({next:u=>{const _=this.mapDocuments([{...u?.data||{},module:o.module_code,module_id:c}])[0],g=this.stateService.getState().documents||[],h=_?[_,...g.filter(b=>b?.id!==_?.id)]:g;this.persistDocumentMetadataFromDocuments(t.oid,h),this.stateService.updateState({modalOpen:!1,uploading:!1,uploadForm:this.getEmptyUploadForm(t.selectedModule),documents:h}),this.showMessage("success",u?.message||"Document added successfully")},error:u=>{this.stateService.updateState({uploading:!1}),this.showMessage("error",this.getErrorMessage(u,"Unable to add document"))}})):this.showMessage("error","Document module is required")}addDocumentByUrl(){const t=this.stateService.getState(),o=(t.urlForm?.name||"").trim(),a=(t.urlForm?.document_url||"").trim(),d=(t.urlForm?.type||"").trim();if(!o)return this.stateService.updateState({urlFormError:"Document name is required"}),void this.showMessage("error","Document name is required");if(!a)return this.stateService.updateState({urlFormError:"Document URL is required"}),void this.showMessage("error","Document URL is required");if(!this.isValidUrl(a))return this.stateService.updateState({urlFormError:"Please enter a valid URL (must start with http:// or https://)"}),void this.showMessage("error","Please enter a valid URL (must start with http:// or https://)");const c=t.selectedModule||t.visibleModuleOptions?.find(u=>"task"===u?.module_code)||null,l=this.resolveModuleId(c);c?.module_code?(this.stateService.updateState({urlFormError:"",uploading:!0}),this.documentationApiService.uploadDocument(t.oid,{document_url:a,name:o,type:d,moduleCode:c.module_code,moduleId:l}).subscribe({next:u=>{const _=this.mapDocuments([{...u?.data||{},name:u?.data?.name||o,module:c.module_code,module_id:l}])[0],g=this.stateService.getState().documents||[],h=_?[_,...g.filter(b=>b?.id!==_?.id)]:g;this.persistDocumentMetadataFromDocuments(t.oid,h),this.stateService.updateState({modalOpen:!1,uploading:!1,urlForm:this.getEmptyUrlForm(),urlFormError:"",documents:h}),this.showMessage("success",u?.message||"Document added successfully")},error:u=>{this.stateService.updateState({uploading:!1}),this.showMessage("error",this.getErrorMessage(u,"Unable to add document"))}})):this.showMessage("error","Document module is required")}updateDocumentName(){const t=this.stateService.getState(),o=t.editForm?.id,a=(t.editForm?.name||"").trim(),d=t.editModalMode||"upload";if(!o||!a)return void this.showMessage("error","Document name is required");if("url"===d){const g=(t.editForm?.document_url||"").trim(),h=(t.editForm?.type||"").trim();return g?this.isValidUrl(g)?(this.stateService.updateState({editing:!0}),void this.documentationApiService.updateDocument(t.oid,o,{name:a,document_url:g,type:h}).subscribe({next:b=>{const E=(this.stateService.getState().documents||[]).map(A=>A?.id===o?this.mapDocuments([{...A,...b?.data||{}}])[0]:A);this.persistDocumentMetadataFromDocuments(t.oid,E),this.stateService.updateState({editModalOpen:!1,editing:!1,editModalMode:"upload",editForm:this.getEmptyEditForm(),documents:E}),this.showMessage("success",b?.message||"Document updated successfully")},error:b=>{this.stateService.updateState({editing:!1}),this.showMessage("error",this.getErrorMessage(b,"Unable to update document"))}})):void this.showMessage("error","Please enter a valid URL (must start with http:// or https://)"):void this.showMessage("error","Document URL is required")}const c=t.editForm?.file||null,l=t.editForm?.fileSize||0,u=(t.editForm?.type||"").trim();if(!c)return void this.showMessage("error","File is required");const _=this.getFileValidationMessage(c);_?this.showMessage("error",_):(this.stateService.updateState({editing:!0}),this.documentationApiService.updateDocument(t.oid,o,{name:a,file:c,fileSize:l,type:u}).subscribe({next:g=>{const h=(this.stateService.getState().documents||[]).map(b=>b?.id===o?this.mapDocuments([{...b,...g?.data||{}}])[0]:b);this.persistDocumentMetadataFromDocuments(t.oid,h),this.stateService.updateState({editModalOpen:!1,editing:!1,editModalMode:"upload",editForm:this.getEmptyEditForm(),documents:h}),this.showMessage("success",g?.message||"Document updated successfully")},error:g=>{this.stateService.updateState({editing:!1}),this.showMessage("error",this.getErrorMessage(g,"Unable to update document"))}}))}confirmDeleteDocument(){const t=this.stateService.getState(),o=t.deleteTargetDocument?.id;o&&(this.stateService.updateState({actionMenuDocumentId:null,deleteConfirmOpen:!1,deleteTargetDocument:null,deletingDocumentId:o}),this.documentationApiService.deleteDocument(t.oid,o).subscribe({next:a=>{this.removeCachedDocumentMetadata(t.oid,o),this.stateService.updateState({deletingDocumentId:null}),this.showMessage("success",a?.message||"Document deleted successfully"),this.loadDocuments()},error:a=>{this.stateService.updateState({deletingDocumentId:null}
1),this.showMessage("error",this.getErrorMessage(a,"Unable to delete document"))}}))}downloadDocument(t){const o=this.stateService.getState();this.stateService.updateState({actionMenuDocumentId:null}),this.documentationApiService.downloadDocument(o.oid,t.id).subscribe({next:a=>{const d=window.URL.createObjectURL(a),c=window.document.createElement("a");c.href=d,c.download=t.name||"document",c.click(),window.URL.revokeObjectURL(d)},error:a=>{this.showMessage("error",this.getErrorMessage(a,"Unable to download document"))}})}loadDocuments(){const t=this.stateService.getState();t.oid?(this.stateService.updateState({loadingDocuments:!0}),this.documentationApiService.getDocuments(t.oid,t.search||void 0,t.pagination?.page||1,t.pagination?.limit||10).subscribe({next:({data:o,pagination:a})=>{const d=this.mapDocuments(o);this.persistDocumentMetadataFromDocuments(t.oid,d),this.stateService.updateState({documents:d,loadingDocuments:!1,pagination:a})},error:o=>{this.stateService.updateState({documents:[],loadingDocuments:!1}),this.showMessage("error",this.getErrorMessage(o,"Unable to load documents"))}})):this.stateService.updateState({documents:[],loadingDocuments:!1})}getEmptyUploadForm(t=null){return{name:"",file:null,fileType:"",type:"",module:t}}getEmptyUrlForm(){return{name:"",document_url:"",type:""}}getEmptyEditForm(){return{id:"",name:"",file:null,fileType:"",fileSize:0,type:"",document_url:"",module:null}}isValidUrl(t){try{const o=new URL(t);return"http:"===o.protocol||"https:"===o.protocol}catch{return!1}}mapModules(t){return(t||[]).map(o=>{const a=this.normalizeValue(o?.name);return{...o,module_code:o?.module_code||this.resolveModuleCode(a),display_name:o?.display_name||o?.name||""}})}findModuleForDocument(t,o){const a=t?.module||"",d=o.find(c=>c.module_code===a)||this.staticModules.find(c=>c.module_code===a)||null;return this.applyModuleId(d,t?.module_id||"")}applyModuleId(t,o){return t?o?{...t,id:o}:t:null}mapDocuments(t){const o=this.stateService.getState().oid,a=this.stateService.getState().documents||[],d=this.readCachedDocumentMetadata(o);return(t||[]).map(c=>{const l=a.find(h=>h?.id===c?.id)||{},u=d[c?.id]||{},_=this.resolveModuleCodeFromId(c?.module_id||l?.module_id||u?.module_id)||"";return{...{...l,...u,...c,module:c?.module||l?.module||u?.module||_||"",module_id:c?.module_id||l?.module_id||u?.module_id||""}}})}getDocumentMetadataCacheKey(t){return`documentation-module-meta:${t||"global"}`}readCachedDocumentMetadata(t){try{const o=localStorage.getItem(this.getDocumentMetadataCacheKey(t));return o?JSON.parse(o):{}}catch{return{}}}persistDocumentMetadataFromDocuments(t,o){if(!t)return;const a=this.readCachedDocumentMetadata(t);(o||[]).forEach(d=>{d?.id&&(d?.module||d?.module_id)&&(a[d.id]={...a[d.id]||{},...d?.module?{module:d.module}:{},...d?.module_id?{module_id:d.module_id}:{}})});try{localStorage.setItem(this.getDocumentMetadataCacheKey(t),JSON.stringify(a))}catch{}}removeCachedDocumentMetadata(t,o){if(!t||!o)return;const a=this.readCachedDocumentMetadata(t);delete a[o];try{localStorage.setItem(this.getDocumentMetadataCacheKey(t),JSON.stringify(a))}catch{}}resolveModuleCodeFromId(t){return t&&this.staticModules.find(o=>o.id===t)?.module_code||""}resolveModuleId(t){return t?.id||t?.module_id||this.stateService.getState().moduleId||""}buildBreadcrumbs(t,o,a,d){const c={oid:t,pid:o},l={...c,docContext:a,...d?{moduleId:d}:{}},u=[{label:"Home",route:"/home/welcome",queryParams:c},{label:"Documentation",route:"/documentation/dashboard",queryParams:l}];return u.push({label:"Manage Documents",route:"/documentation/manage",queryParams:l}),u}resolveModuleCode(t){return this.moduleCodeMap[t]||t.replace(/\s+/g,"_")}resolveDocContext(t,o){if(this.supportedDocContexts.includes(t))return t;const a=this.decodeRepeatedly(o).toLowerCase();return this.supportedDocContexts.find(c=>"global"!==c&&-1!==a.indexOf(c))||"global"}normalizeValue(t){return(t||"").toLowerCase().replace(/[^a-z0-9]+/g," ").trim()}normalizeQueryId(t){if(!t)return"";const o=this.decodeRepeatedly(t).match(/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/i);return o?o[0]:t}decodeRepeatedly(t){let o=t||"";for(let a=0;a<3;a+=1)try{const d=decodeURIComponent(o);if(d===o)break;o=d}catch{break}return o}normalizeDocumentationRoute(t,o,a,d){return(t!==this.rawOid||o!==this.rawPid||a!==this.rawDocContext||d!==this.rawModuleId)&&(this.router.navigate([],{relativeTo:this.route,queryParams:{oid:t,pid:o,docContext:a,...d?{moduleId:d}:{}}
1,replaceUrl:!0}),!0)}getErrorMessage(t,o){const a=t?.error?.error||t?.error?.message||o;return-1!==(a||"").toLowerCase().indexOf("maximum allowed file size is 5 mb")?"Maximum allowed file size is 5 MB.":-1!==(a||"").toLowerCase().indexOf("unsupported file type")?"Unsupported file type. Allowed file types are PDF, DOC, DOCX, XLS, XLSX, PPT, PPTX, PNG, JPG, and JPEG.":a}showMessage(t,o){this.messageService.add({severity:t,summary:"success"===t?"Success":"Error",detail:o})}getFileValidationMessage(t){if(!t)return"";if((t.size||0)>this.maxFileSizeBytes)return"Maximum allowed file size is 5 MB.";const o=(t.name||"").split(".").pop()?.toLowerCase()||"";return this.supportedFileExtensions.includes(o)?"":"Unsupported file type. Allowed file types are PDF, DOC, DOCX, XLS, XLSX, PPT, PPTX, PNG, JPG, and JPEG."}};let i=r;return r.\u0275fac=function(o){return new(o||r)(e.LFG(F),e.LFG(x.gz),e.LFG(x.F0),e.LFG(D.ez),e.LFG(w.o))},r.\u0275prov=e.Yz7({token:r,factory:r.\u0275fac}),i})();var q=p(12553);function I(i,r){if(1&i){const n=e.EpF();e.TgZ(0,"p-button",16),e.NdJ("click",function(){e.CHM(n);const o=e.oxw(2);return e.KtG(o.openUploadModal())}),e.qZA()}}function z(i,r){if(1&i){const n=e.EpF();e.TgZ(0,"div",17)(1,"h5",18),e._uU(2,"Manage Documentation"),e.qZA(),e.TgZ(3,"span",19),e._UZ(4,"i",20),e.TgZ(5,"input",21),e.NdJ("input",function(o){e.CHM(n);const a=e.oxw(2);return e.KtG(a.onSearchChange(o))}),e.qZA()()()}if(2&i){const n=e.oxw().ngIf;e.xp6(5),e.Q6J("value",n.search)}}function N(i,r){1&i&&(e.TgZ(0,"tr")(1,"th"),e._uU(2,"Name"),e.qZA(),e.TgZ(3,"th"),e._uU(4,"Type"),e.qZA(),e.TgZ(5,"th"),e._uU(6,"File Type"),e.qZA(),e.TgZ(7,"th"),e._uU(8,"File Size"),e.qZA(),e.TgZ(9,"th"),e._uU(10,"Created At"),e.qZA(),e.TgZ(11,"th"),e._uU(12,"Updated At"),e.qZA(),e.TgZ(13,"th",22),e._uU(14,"Action"),e.qZA()())}function J(i,r){if(1&i){const n=e.EpF();e.TgZ(0,"a",31),e.NdJ("click",function(){e.CHM(n);const o=e.oxw(4);return e.KtG(o.closeActionMenu())}),e._uU(1," View "),e.qZA()}if(2&i){const n=e.oxw(2).$implicit;e.Q6J("href",n.document_url,e.LSH)}}function Q(i,r){if(1&i){const n=e.EpF();e.TgZ(0,"button",27),e.NdJ("click",function(){e.CHM(n);const o=e.oxw(2).$implicit,a=e.oxw(2);return e.KtG(a.downloadDocument(o))}),e._uU(1," Download "),e.qZA()}}function B(i,r){if(1&i){const n=e.EpF();e.TgZ(0,"div",26)(1,"button",27),e.NdJ("click",function(){e.CHM(n);const o=e.oxw().$implicit,a=e.oxw(2);return e.KtG(a.openEditModal(o))}),e._uU(2," Edit "),e.qZA(),e.YNc(3,J,2,1,"a",28),e.YNc(4,Q,2,0,"button",29),e.TgZ(5,"button",30),e.NdJ("click",function(){e.CHM(n);const o=e.oxw().$implicit,a=e.oxw(2);return e.KtG(a.openDeleteConfirm(o))}),e._uU(6," Delete "),e.qZA()()}if(2&i){const n=e.oxw().$implicit,t=e.oxw().ngIf;e.xp6(3),e.Q6J("ngIf",n.document_url),e.xp6(1),e.Q6J("ngIf",!n.document_url),e.xp6(1),e.Q6J("disabled",t.deletingDocumentId===n.id)}}function R(i,r){if(1&i){const n=e.EpF();e.TgZ(0,"tr")(1,"td"),e._uU(2),e.qZA(),e.TgZ(3,"td"),e._uU(4),e.qZA(),e.TgZ(5,"td"),e._uU(6),e.qZA(),e.TgZ(7,"td"),e._uU(8),e.qZA(),e.TgZ(9,"td"),e._uU(10),e.ALo(11,"date"),e.qZA(),e.TgZ(12,"td"),e._uU(13),e.ALo(14,"date"),e.qZA(),e.TgZ(15,"td")(16,"div",23),e.NdJ("click",function(o){return o.stopPropagation()}),e.TgZ(17,"button",24),e.NdJ("click",function(o){const d=e.CHM(n).$implicit,c=e.oxw(2);return e.KtG(c.toggleActionMenu(d.id,o))}),e._uU(18," \u22ee "),e.qZA(),e.YNc(19,B,7,3,"div",25),e.qZA()()()}if(2&i){const n=r.$implicit,t=e.oxw().ngIf,o=e.oxw();e.xp6(2),e.Oqu(o.formatDocumentName(n.name)),e.xp6(2),e.Oqu(n.type||"-"),e.xp6(2),e.hij(" ",n.document_url?"URL":o.formatFileType(n.file_type,n.name)," "),e.xp6(2),e.hij(" ",n.document_url?"-":o.formatFileSize(n.file_size)," "),e.xp6(2),e.Oqu(e.xi3(11,8,n.created_at,"
1short")),e.xp6(3),e.hij(" ",e.xi3(14,11,n.updated_at||n.uploaded_on||n.created_at,"short")," "),e.xp6(4),e.Q6J("disabled",t.deletingDocumentId===n.id),e.xp6(2),e.Q6J("ngIf",t.actionMenuDocumentId===n.id)}}function L(i,r){if(1&i&&(e.TgZ(0,"tr")(1,"td",32),e._uU(2),e.qZA()()),2&i){const n=e.oxw().ngIf;e.xp6(2),e.hij(" ",n.search?'No documents match "'+n.search+'".':"No documents added yet."," ")}}function j(i,r){if(1&i){const n=e.EpF();e.TgZ(0,"div",33),e.NdJ("click",function(){e.CHM(n);const o=e.oxw(2);return e.KtG(o.closeActionMenu())}),e.qZA()}}function G(i,r){if(1&i){const n=e.EpF();e.TgZ(0,"div",34),e.NdJ("click",function(){e.CHM(n);const o=e.oxw(2);return o.closeUploadModal(),o.closeEditModal(),e.KtG(o.closeDeleteConfirm())}),e.qZA()}}function K(i,r){if(1&i&&(e.TgZ(0,"small"),e._uU(1),e.qZA()),2&i){const n=e.oxw(3).ngIf;e.xp6(1),e.hij(" ",n.uploadForm.fileType," ")}}function Y(i,r){if(1&i&&(e.TgZ(0,"div",51),e._UZ(1,"i",52),e.TgZ(2,"span"),e._uU(3),e.qZA()()),2&i){const n=e.oxw(3).ngIf;e.xp6(3),e.Oqu(n.uploadFileError)}}function H(i,r){if(1&i){const n=e.EpF();e.ynx(0),e.TgZ(1,"div",45)(2,"label"),e._uU(3,"Name"),e.qZA(),e._UZ(4,"input",46),e.qZA(),e.TgZ(5,"div",45)(6,"label"),e._uU(7,"Upload File "),e.TgZ(8,"span",47),e._uU(9,"*"),e.qZA()(),e.TgZ(10,"input",48),e.NdJ("change",function(o){e.CHM(n);const a=e.oxw(3);return e.KtG(a.onFileSelected(o))}),e.qZA(),e.YNc(11,K,2,1,"small",41),e.YNc(12,Y,4,1,"div",49),e.qZA(),e.TgZ(13,"div",45)(14,"label"),e._uU(15,"Type"),e.qZA(),e.TgZ(16,"input",50),e.NdJ("input",function(o){e.CHM(n);const a=e.oxw(3);return e.KtG(a.onUploadTypeChange(o))}),e.qZA()(),e.BQk()}if(2&i){const n=e.oxw(2).ngIf;e.xp6(4),e.Q6J("ngModel",n.uploadForm.name),e.xp6(7),e.Q6J("ngIf",n.uploadForm.fileType),e.xp6(1),e.Q6J("ngIf",n.uploadFileError),e.xp6(4),e.Q6J("ngModel",n.uploadForm.type)}}function $(i,r){if(1&i&&(e.TgZ(0,"div",51),e._UZ(1,"i",52),e.TgZ(2,"span"),e._uU(3),e.qZA()()),2&i){const n=e.oxw(3).ngIf;e.xp6(3),e.Oqu(n.urlFormError)}}function V(i,r){if(1&i){const n=e.EpF();e.ynx(0),e.TgZ(1,"div",45)(2,"label"),e._uU(3,"Name "),e.TgZ(4,"span",47),e._uU(5,"*"),e.qZA()(),e.TgZ(6,"input",53),e.NdJ("input",function(o){e.CHM(n);const a=e.oxw(3);return e.KtG(a.onUrlNameChange(o))}),e.qZA()(),e.TgZ(7,"div",45)(8,"label"),e._uU(9,"URL "),e.TgZ(10,"span",47),e._uU(11,"*"),e.qZA()(),e.TgZ(12,"input",54),e.NdJ("input",function(o){e.CHM(n);const a=e.oxw(3);return e.KtG(a.onUrlChange(o))}),e.qZA()(),e.TgZ(13,"div",45)(14,"label"),e._uU(15,"Type"),e.qZA(),e.TgZ(16,"input",50),e.NdJ("input",function(o){e.CHM(n);const a=e.oxw(3);return e.KtG(a.onUrlTypeChange(o))}),e.qZA()(),e.YNc(17,$,4,1,"div",49),e.BQk()}if(2&i){const n=e.oxw(2).ngIf;e.xp6(6),e.Q6J("ngModel",n.urlForm.name),e.xp6(6),e.Q6J("ngModel",n.urlForm.document_url),e.xp6(4),e.Q6J("ngModel",n.urlForm.type),e.xp6(1),e.Q6J("ngIf",n.urlFormError)}}function X(i,r){if(1&i){const n=e.EpF();e.TgZ(0,"div",35)(1,"div",36)(2,"h3"),e._uU(3,"Add Documentation"),e.qZA(),e.TgZ(4,"button",37),e.NdJ("click",function(){e.CHM(n);const o=e.oxw(2);return e.KtG(o.closeUploadModal())}),e._uU(5," \xd7 "),e.qZA()(),e.TgZ(6,"div",38)(7,"button",39),e.NdJ("click",function(){e.CHM(n);const o=e.oxw(2);return e.KtG(o.setAddModalMode("upload"))}),e._uU(8," By Upload "),e.qZA(),e.TgZ(9,"button",39),e.NdJ("click",function(){e.CHM(n);const o=e.oxw(2);return e.KtG(o.setAddModalMode("url"))}),e._uU(10," By URL "),e.qZA()(),e.TgZ(11,"div",40),e.YNc(12,H,17,4,"ng-container",41),e.YNc(13,V,18,4,"ng-container",41),e.qZA(),e.TgZ(14,"div",42)(15,"button",43),e.NdJ("click",function(){e.CHM(n);const o=e.oxw(2);return e.KtG(o.closeUploadModal())}),e._uU(16," Cancel "),e.qZA(),e.TgZ(17,"button",44),e.NdJ("click",function(){e.CHM(n);const o=e.oxw(2);return e.KtG(o.uploadDocument())}),e._uU(18),e.qZA()()()}if(2&i){const n=e.oxw().ngIf,t=e.oxw();e.xp6(7),e.ekj("doc-modal-tab--active","upload"===n.addModalMode),e.xp6(2),e.ekj("doc-modal-tab--active","url"===n.addModalMode),e.xp6(3),e.Q6J("ngIf","upload"===n.addModalMode),e.xp6(1),e.Q6J("ngIf","url"===n.addModalMode),e.xp6(4),e.Q6J("disabled",n.uploading||!t.isAddFormValid(n)),e.xp6(1),e.hij(" ",n.uploading?"Adding...":"Add"," ")}}function W(i,r){if(1&i&&(e.TgZ(0,"small"),e._uU(1),e.qZA()),2&i){const n=e.oxw(3).ngIf;e.xp6(1),e.hij(" ",n.editForm.fileType," ")}}function ee(i,r){if(1&i){const n=e.EpF();
1e.ynx(0),e.TgZ(1,"div",45)(2,"label"),e._uU(3,"Name "),e.TgZ(4,"span",47),e._uU(5,"*"),e.qZA()(),e._UZ(6,"input",55),e.qZA(),e.TgZ(7,"div",45)(8,"label"),e._uU(9,"Upload File "),e.TgZ(10,"span",47),e._uU(11,"*"),e.qZA()(),e.TgZ(12,"input",48),e.NdJ("change",function(o){e.CHM(n);const a=e.oxw(3);return e.KtG(a.onEditFileSelected(o))}),e.qZA(),e.YNc(13,W,2,1,"small",41),e.qZA(),e.TgZ(14,"div",45)(15,"label"),e._uU(16,"Type"),e.qZA(),e.TgZ(17,"input",50),e.NdJ("input",function(o){e.CHM(n);const a=e.oxw(3);return e.KtG(a.onEditTypeChange(o))}),e.qZA()(),e.BQk()}if(2&i){const n=e.oxw(2).ngIf;e.xp6(6),e.Q6J("ngModel",n.editForm.name),e.xp6(7),e.Q6J("ngIf",n.editForm.fileType),e.xp6(4),e.Q6J("ngModel",n.editForm.type)}}function te(i,r){if(1&i){const n=e.EpF();e.ynx(0),e.TgZ(1,"div",45)(2,"label"),e._uU(3,"Name "),e.TgZ(4,"span",47),e._uU(5,"*"),e.qZA()(),e.TgZ(6,"input",53),e.NdJ("input",function(o){e.CHM(n);const a=e.oxw(3);return e.KtG(a.onEditNameChange(o))}),e.qZA()(),e.TgZ(7,"div",45)(8,"label"),e._uU(9,"URL "),e.TgZ(10,"span",47),e._uU(11,"*"),e.qZA()(),e.TgZ(12,"input",54),e.NdJ("input",function(o){e.CHM(n);const a=e.oxw(3);return e.KtG(a.onEditUrlChange(o))}),e.qZA()(),e.TgZ(13,"div",45)(14,"label"),e._uU(15,"Type"),e.qZA(),e.TgZ(16,"input",50),e.NdJ("input",function(o){e.CHM(n);const a=e.oxw(3);return e.KtG(a.onEditTypeChange(o))}),e.qZA()(),e.BQk()}if(2&i){const n=e.oxw(2).ngIf;e.xp6(6),e.Q6J("ngModel",n.editForm.name),e.xp6(6),e.Q6J("ngModel",n.editForm.document_url),e.xp6(4),e.Q6J("ngModel",n.editForm.type)}}function oe(i,r){if(1&i){const n=e.EpF();e.TgZ(0,"div",35)(1,"div",36)(2,"h3"),e._uU(3,"Edit Documentation"),e.qZA(),e.TgZ(4,"button",37),e.NdJ("click",function(){e.CHM(n);const o=e.oxw(2);return e.KtG(o.closeEditModal())}),e._uU(5," \xd7 "),e.qZA()(),e.TgZ(6,"div",38)(7,"button",39),e.NdJ("click",function(){e.CHM(n);const o=e.oxw(2);return e.KtG(o.setEditModalMode("upload"))}),e._uU(8," By Upload "),e.qZA(),e.TgZ(9,"button",39),e.NdJ("click",function(){e.CHM(n);const o=e.oxw(2);return e.KtG(o.setEditModalMode("url"))}),e._uU(10," By URL "),e.qZA()(),e.TgZ(11,"div",40),e.YNc(12,ee,18,3,"ng-container",41),e.YNc(13,te,17,3,"ng-container",41),e.qZA(),e.TgZ(14,"div",42)(15,"button",43),e.NdJ("click",function(){e.CHM(n);const o=e.oxw(2);return e.KtG(o.closeEditModal())}),e._uU(16," Cancel "),e.qZA(),e.TgZ(17,"button",44),e.NdJ("click",function(){e.CHM(n);const o=e.oxw(2);return e.KtG(o.updateDocumentName())}),e._uU(18),e.qZA()()()}if(2&i){const n=e.oxw().ngIf;e.xp6(7),e.ekj("doc-modal-tab--active","upload"===n.editModalMode),e.xp6(2),e.ekj("doc-modal-tab--active","url"===n.editModalMode),e.xp6(3),e.Q6J("ngIf","upload"===n.editModalMode),e.xp6(1),e.Q6J("ngIf","url"===n.editModalMode),e.xp6(4),e.Q6J("disabled",n.editing),e.xp6(1),e.hij(" ",n.editing?"Updating...":"Update"," ")}}function ne(i,r){if(1&i){const n=e.EpF();e.TgZ(0,"div",56)(1,"div",36)(2,"h3"),e._uU(3,"Confirmation"),e.qZA(),e.TgZ(4,"button",37),e.NdJ("click",function(){e.CHM(n);const o=e.oxw(2);return e.KtG(o.closeDeleteConfirm())}),e._uU(5," \xd7 "),e.qZA()(),e.TgZ(6,"div",57)(7,"div",58),e._uU(8,"\u26a0"),e.qZA(),e.TgZ(9,"p"),e._uU(10," Are you sure you want to delete this document "),e.TgZ(11,"strong"),e._uU(12),e.qZA(),e._uU(13,"? "),e.qZA()(),e.TgZ(14,"div",42)(15,"button",43),e.NdJ("click",function(){e.CHM(n);const o=e.oxw(2);return e.KtG(o.closeDeleteConfirm())}),e._uU(16," No "),e.qZA(),e.TgZ(17,"button",44),e.NdJ("click",function(){e.CHM(n);const o=e.oxw(2);return e.KtG(o.confirmDeleteDocument())}),e._uU(18),e.qZA()()()}if(2&i){const n=e.oxw().ngIf;e.xp6(12),e.hij('"',null==n.deleteTargetDocument?null:n.deleteTargetDocument.name,'"'),e.xp6(5),e.Q6J("disabled",n.deletingDocumentId===(null==n.deleteTargetDocument?null:n.deleteTargetDocument.id)),e.xp6(1),e.hij(" ",n.deletingDocumentId===(null==n.deleteTargetDocument?null:n.deleteTargetDocument.id)?"Deleting...":"Yes"," ")}}const ae=function(){return[10,20,50]};function ie(i,r){if(1&i){const n=e.EpF();e.TgZ(0,"div",1),e.NdJ("click",function(){e.CHM(n);const o=e.oxw();return e.KtG(o.closeActionMenu())}),e._UZ(1,"p-toast",2),e.TgZ(2,"div",3)(3,"h1",4),e._uU(4,"Documentation"),e.qZA(),e.TgZ(5,"p-toolbar",5),e.YNc(6,I,1,0,"ng-template",6),e.qZA(),e.TgZ(7,"p-table",7),e.NdJ("onPage",function(o){e.CHM(n);const a=e.oxw();return e.KtG(a.onPageChange(o))}),e.YNc(8,z,6,1,"ng-template",8),e.YNc(9,N,15,0,"ng-template",9),e.YNc(10,R,20,14,"
1ng-template",10),e.YNc(11,L,3,1,"ng-template",11),e.qZA()(),e.YNc(12,j,1,0,"div",12),e.YNc(13,G,1,0,"div",13),e.YNc(14,X,19,8,"div",14),e.YNc(15,oe,19,8,"div",14),e.YNc(16,ne,19,3,"div",15),e.qZA()}if(2&i){const n=r.ngIf;e.xp6(7),e.Q6J("value",n.documents)("lazy",!0)("paginator",!0)("rows",(null==n.pagination?null:n.pagination.limit)||10)("totalRecords",(null==n.pagination?null:n.pagination.total)||0)("rowsPerPageOptions",e.DdM(14,ae))("showCurrentPageReport",!0)("loading",n.loadingDocuments)("rowHover",!0),e.xp6(5),e.Q6J("ngIf",n.actionMenuDocumentId),e.xp6(1),e.Q6J("ngIf",n.modalOpen||n.editModalOpen||n.deleteConfirmOpen),e.xp6(1),e.Q6J("ngIf",n.modalOpen),e.xp6(1),e.Q6J("ngIf",n.editModalOpen),e.xp6(1),e.Q6J("ngIf",n.deleteConfirmOpen)}}let re=(()=>{const r=class{constructor(t){this.documentationActionService=t,this.stateObs=this.documentationActionService.getStateObs()}ngOnInit(){this.documentationActionService.init()}onFileSelected(t){this.documentationActionService.setUploadFile(t.target?.files?.[0]||null)}onEditFileSelected(t){this.documentationActionService.setEditFile(t.target?.files?.[0]||null)}toggleActionMenu(t,o){o?.stopPropagation(),this.documentationActionService.toggleActionMenu(t)}closeActionMenu(){this.documentationActionService.closeActionMenu()}openUploadModal(){this.documentationActionService.openUploadModal()}closeUploadModal(){this.documentationActionService.closeUploadModal()}uploadDocument(){this.documentationActionService.uploadDocument()}setAddModalMode(t){this.documentationActionService.setAddModalMode(t)}setEditModalMode(t){this.documentationActionService.setEditModalMode(t)}onUrlNameChange(t){this.documentationActionService.updateUrlForm({name:t.target.value})}onUrlChange(t){this.documentationActionService.updateUrlForm({document_url:t.target.value})}onUrlTypeChange(t){this.documentationActionService.updateUrlForm({type:t.target.value})}onUploadTypeChange(t){this.documentationActionService.updateUploadForm({type:t.target.value})}onEditTypeChange(t){this.documentationActionService.updateEditForm({type:t.target.value})}onEditUrlChange(t){this.documentationActionService.updateEditForm({document_url:t.target.value})}onEditNameChange(t){this.documentationActionService.updateEditForm({name:t.target.value})}openEditModal(t){this.documentationActionService.openEditModal(t)}closeEditModal(){this.documentationActionService.closeEditModal()}openDeleteConfirm(t){this.documentationActionService.openDeleteConfirm(t)}downloadDocument(t){this.documentationActionService.downloadDocument(t)}closeDeleteConfirm(){this.documentationActionService.closeDeleteConfirm()}updateDocumentName(){this.documentationActionService.updateDocumentName()}confirmDeleteDocument(){this.documentationActionService.confirmDeleteDocument()}onSearchChange(t){this.documentationActionService.setSearch(t.target.value)}clearSearch(){this.documentationActionService.setSearch("")}onPageChange(t){const o=Math.floor(t.first/t.rows)+1;this.documentationActionService.goToPage(o,t.rows)}isAddFormValid(t){return"url"===t?.addModalMode?!!t?.urlForm?.name?.trim()&&!!t?.urlForm?.document_url?.trim():!!t?.uploadForm?.file}formatFileSize(t){if(!t)return"0 B";const o=["B","KB","MB","GB"],a=Math.min(Math.floor(Math.log(t)/Math.log(1024)),o.length-1);return`${(t/Math.pow(1024,a)).toFixed(0===a?0:1)} ${o[a]}`}formatDocumentName(t){if(!t)return"-";const o=t.lastIndexOf(".");return o>0?t.slice(0,o):t}formatFileType(t,o){const a=(t||"").toLowerCase(),d=(o||"").toLowerCase(),c=d.includes(".")&&d.split(".").pop()||"";if(a.includes("spreadsheetml")||["xlsx","xls"].includes(c))return`Excel (.${c||"xlsx"})`;if(a.includes("wordprocessingml")||a.includes("msword")||["doc","docx"].includes(c))return`Word Document (.${c||"docx"})`;if(a.includes("pdf")||"pdf"===c)return"PDF";if(a.includes("csv")||"csv"===c)return"CSV";if(a.includes("zip")||"zip"===c)return"ZIP Archive (.zip)";if(a.includes("tar")||"tar"===c)return"TAR Archive (.tar)";if(a.startsWith("image/")||["png","jpg","jpeg","gif","webp","svg"].includes(c)){const l=c||a.split("/").pop()||"";return l?`${l.toUpperCase()} Image (.${l.toLowerCase()})`:"Image"}return c?c.toUpperCase():t||"-"}trackByDocumentId(t,o){return o?.id||t}};let i=r;return r.\u0275fac=function(o){return new(o||r)(e.Y36(k))},r.\u0275cmp=e.Xpm({type:r,selectors:[["app-documentation"]],features:[e._Bn([k])],decls:2,vars:3,consts:[["class","doc-shell",3,"click",4,"ngIf"],[1,"doc-shell",3,"click"],["position","bottom-right"],[1,"doc-card"],[1,"doc-title"],["styleClass","doc-p-toolbar"],["pTemplate","left"],["currentPageReportTemplate","Showing {first} to {last} of {totalRecords} documents","dataKey","id","styleClass","doc-p-table",3,"value","lazy","paginator","rows","totalRecords","rowsPerPageOptions","showCurrentPageReport","loading","rowHover","onPage"],["pTemplate","caption"],["pTemplate","header"],["pTemplate","body"],["pTemplate","emptymessage"],["class","doc-actions-overlay",3,"click",4,"ngIf"],["class","doc-modal-backdrop",3,"click",4,"ngIf"],["class","doc-modal",4,"ngIf"],["class","doc-modal doc-confirm-modal",4,"ngIf"],["label","Add Documentation","icon","pi pi-plus",1,"doc-add-btn",3,"click"],[1,"doc-table-caption"],[1,"doc-table-caption-title"],[1,"p-input-icon-left"],[1,"pi","pi-search"],["pInputText","","type","text","placeholder","Search documents\u2026",3,"value","input"],[2,"width","90px"],[1,"doc-actions",3,"click"],["type","button",1,"doc-actions-trigger",3,"disabled","click"],["class","doc-actions-menu",4,"ngIf"],[1,"doc-actions-menu"],["type","button",1,"doc-actions-item",3,"click"],["class","doc-actions-item","target","_blank","rel","noopener noreferrer",3,"href","click",4,"ngIf"],["type","button","class","doc-actions-item",3,"click",4,"ngIf"],["type","button",1,"doc-actions-item","doc-actions-item--danger",3,"disabled","click"],["target","_blank","rel","noopener noreferrer",1,"doc-actions-item",3,"href","click"],["colspan","7",1,"doc-empty"],[1,"doc-actions-overlay",3,"click"],[1,"doc-modal-backdrop",3,"click"],[1,"doc-modal"],[1,"doc-modal-header"],["type","button",1,"doc-close-btn",3,"click"],[1,"doc-modal-tabs"],["type","button",1,"doc-modal-tab",3,"click"],[1,"doc-modal-body"],[4,"ngIf"],[1,"doc-modal-footer"],["type","button",1,"doc-btn-secondary",3,"click"],["type","button",1,"doc-btn-primary",3,"disabled","click"],[1,"doc-field"],["placeholder","Document name will match the selected file","disabled","",3,"ngModel"],[1,"required-mark"],["type","file",3,"change"],["class","doc-file-error",4,"ngIf"],["type","text","placeholder","Enter document type",3,"ngModel","input"],[1,"doc-file-error"],[1,"pi","pi-exclamation-circle"],["type","text","placeholder","Enter document name",3,"ngModel","input"],["type","text","placeholder","Enter document URL",3,"ngModel","input"],["placeholder","Enter document name","disabled","",3,"ngModel"],[1,"doc-modal","doc-confirm-modal"],[1,"doc-modal-body","doc-confirm-body"],[1,"doc-confirm-icon"]],template:function(o,a){1&o&&(e.YNc(0,ie,17,15,"div",0),e.ALo(1,"async")),2&o&&e.Q6J("ngIf",e.lcZ(1,1,a.stateObs))},dependencies:[f.O5,C.Fj,C.JJ,C.On,D.jx,M.FN,S.iA,O.o,Z.zx,P.o,q.mh,f.Ov,f.uU],styles:[".doc-shell[_ngcontent-%COMP%]{min-height:100%;background:transparent;padding:0}.doc-card[_ngcontent-%COMP%]{background:#fff;border-radius:0;padding:14px 14px 18px;border:1px solid #d7dfeb;box-shadow:none;overflow:visible}.doc-title[_ngcontent-%COMP%]{margin:0 0 18px;font-size:32px;font-weight:600;color:#111827} .doc-p-toolbar.p-toolbar{background:#f8fafc;border:1px solid #e5e7eb;border-radius:0;padding:10px 14px;margin-bottom:0} .doc-add-btn .p-button{background:#16bf5e;border:1px solid #16bf5e;border-radius:3px;font-size:13px;font-weight:600;padding:8px 16px} .doc-add-btn .p-button:hover, .doc-add-btn .p-button:focus{background:#13a852;border-color:#13a852} .doc-p-table .p-datatable-wrapper{overflow:visible!important} .doc-p-table .p-datatable-header{background:#f8fafc;border:none;border-bottom:1px solid #e5e7eb;padding:12px 16px} .doc-p-table .p-datatable-thead>tr>th{background:#f8fafc;color:#1f2937;font-weight:600;font-size:14px;border-color:#e5e7eb;padding:12px 16px} .doc-p-table .p-datatable-tbody>tr>td{color:#334155;font-size:14px;border-color:#e5e7eb;padding:12px 16px;vertical-align:middle} .doc-p-table .p-datatable-tbody>tr:hover>td{background:#f8fafc} .doc-p-table .p-paginator{background:#f8fafc;border-top:1px solid #e5e7eb;padding:10px 16px} .doc-p-table .p-paginator .p-paginator-page.p-highlight{background:#16bf5e;border-color:#16bf5e;color:#fff} .doc-p-table .p-paginator .p-paginator-page:not(.p-highlight):hover, .doc-p-table .p-paginator .p-paginator-prev:hover, .doc-p-table .p-paginator .p-paginator-next:hover{border-color:#16bf5e;color:#16bf5e} .doc-p-table .p-datatable-loading-overlay{background:rgba(255,255,255,.7)}.doc-table-caption[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:12px}.doc-table-caption-title[_ngcontent-%COMP%]{margin:0;font-size:16px;font-weight:600;color:#111827} .doc-p-table .p-input-icon-left>input.p-inputtext{padding-left:2.2rem;font-size:13px;border-color:#d7dfeb;border-radius:6px} .doc-p-table .p-input-icon-left>input.p-inputtext:focus{border-color:#16bf5e;box-shadow:0 0 0 2px #16bf5e26}.required-mark[_ngcontent-%COMP%]{color:#dc3545}.doc-actions[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center;justify-content:flex-start}.doc-actions-trigger[_ngcontent-%COMP%]{width:28px;height:28px;border:none;border-radius:0;background:transparent;color:#111827;font-size:24px;line-height:1;cursor:pointer}.doc-actions-trigger[_ngcontent-%COMP%]:hover{background:#f5f5f5}.doc-actions-trigger[_ngcontent-%COMP%]:disabled{opacity:.6;cursor:not-allowed}.doc-actions-menu[_ngcontent-%COMP%]{position:absolute;top:calc(100% + 6px);left:0;z-index:20;min-width:140px;padding:8px 0;background:#fff;border-radius:4px;box-shadow:0 14px 30px #0f172a26}.doc-actions-item[_ngcontent-%COMP%]{display:block;width:100%;border:none;background:transparent;padding:12px 18px;text-align:left;font-size:14px;color:#111827;cursor:pointer;text-decoration:none;box-sizing:border-box}.doc-actions-item[_ngcontent-%COMP%]:hover{background:#f8fafc;color:#111827}.doc-actions-item[_ngcontent-%COMP%]:disabled{opacity:.6;cursor:not-allowed}.doc-actions-item--danger[_ngcontent-%COMP%]{color:#ef4444}.doc-actions-item--danger[_ngcontent-%COMP%]:hover{background:#fff5f5}.doc-actions-overlay[_ngcontent-%COMP%]{position:fixed;inset:0;z-index:19}.doc-empty[_ngcontent-%COMP%]{text-align:center!important;color:#94a3b8!important;padding:24px!important}.doc-btn-primary[_ngcontent-%COMP%], .doc-btn-secondary[_ngcontent-%COMP%]{padding:9px 16px;font-size:13px;font-weight:600;cursor:pointer}.doc-btn-primary[_ngcontent-%COMP%]{background:#16bf5e;border:1px solid #16bf5e;color:#fff}.doc-btn-primary[_ngcontent-%COMP%]:disabled{opacity:.7;cursor:not-allowed}.doc-btn-secondary[_ngcontent-%COMP%]{background:#fff;border:1px solid #d7dfeb;color:#475569}.doc-modal-backdrop[_ngcontent-%COMP%]{position:fixed;inset:0;background:rgba(15,23,42,.38);z-index:1000}.doc-modal[_ngcontent-%COMP%]{position:fixed;top:50%;left:50%;z-index:1001;width:min(520px,100vw - 32px);background:#fff;border-radius:16px;transform:translate(-50%,-50%);box-shadow:0 24px 60px #0f172a2e}.doc-modal-header[_ngcontent-%COMP%], .doc-modal-footer[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:18px 20px}.doc-modal-header[_ngcontent-%COMP%]{border-bottom:1px solid #e5e7eb}.doc-modal-header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:0;font-size:18px;font-weight:700;color:#111827}.doc-modal-tabs[_ngcontent-%COMP%]{display:flex;border-bottom:1px solid #e5e7eb;padding:0 20px}.doc-modal-tab[_ngcontent-%COMP%]{padding:11px 16px;font-size:14px;font-weight:600;color:#64748b;border:none;border-bottom:2px solid transparent;background:transparent;cursor:pointer;margin-bottom:-1px}.doc-modal-tab[_ngcontent-%COMP%]:hover{color:#334155}.doc-modal-tab--active[_ngcontent-%COMP%]{color:#16bf5e;border-bottom-color:#16bf5e}.doc-modal-body[_ngcontent-%COMP%]{padding:20px}.doc-close-btn[_ngcontent-%COMP%]{border:none;background:transparent;color:#64748b;font-size:26px;line-height:1;cursor:pointer}.doc-field[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin-bottom:18px}.doc-field[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{margin-bottom:8px;font-size:13px;font-weight:600;color:#1f2937}.doc-field[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{border:1px solid #d7dfeb;border-radius:10px;padding:10px 12px;font-size:14px;color:#334155}.doc-field[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:disabled{background:#f8fafc;color:#64748b;cursor:not-allowed;opacity:1}.doc-field[_ngcontent-%COMP%] small[_ngcontent-%COMP%]{margin-top:6px;color:#64748b;font-size:12px}.doc-modal-footer[_ngcontent-%COMP%]{border-top:1px solid #e5e7eb;justify-content:flex-end;
1gap:10px}.doc-confirm-modal[_ngcontent-%COMP%]{width:min(460px,100vw - 32px)}.doc-confirm-body[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:14px}.doc-confirm-body[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;color:#334155;line-height:1.5}.doc-confirm-icon[_ngcontent-%COMP%]{color:#64748b;font-size:28px;line-height:1}.doc-file-error[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:7px;margin-top:8px;padding:8px 12px;background:#fff5f5;border:1px solid #fecaca;border-radius:8px;font-size:12px;color:#dc2626;line-height:1.5}.doc-file-error[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:13px;flex-shrink:0;margin-top:1px}@media (max-width: 767px){.doc-card[_ngcontent-%COMP%]{padding:18px}.doc-title[_ngcontent-%COMP%]{font-size:30px}}"]}),i})();var de=p(65664);function ce(i,r){1&i&&(e.TgZ(0,"div",7),e._uU(1,"Loading dashboard..."),e.qZA())}function se(i,r){if(1&i&&(e.TgZ(0,"div",8),e._uU(1),e.qZA()),2&i){const n=e.oxw();e.xp6(1),e.hij(" ",n.errorMessage," ")}}function le(i,r){if(1&i&&(e.TgZ(0,"div",25)(1,"div",26),e._UZ(2,"i"),e.qZA(),e.TgZ(3,"div",27)(4,"span",28),e._uU(5),e.qZA(),e.TgZ(6,"strong",29),e._uU(7),e.qZA(),e.TgZ(8,"span",30),e._uU(9),e.qZA()()()),2&i){const n=r.$implicit;e.xp6(2),e.Tol(n.icon),e.xp6(3),e.Oqu(n.title),e.xp6(2),e.Oqu(n.value),e.xp6(2),e.Oqu(n.label)}}function ue(i,r){if(1&i&&(e.TgZ(0,"div",31)(1,"div",32)(2,"div",33),e._UZ(3,"span",34),e.TgZ(4,"span"),e._uU(5),e.qZA()(),e.TgZ(6,"strong"),e._uU(7),e.qZA()(),e.TgZ(8,"div",35)(9,"div",36),e._UZ(10,"span",37),e.qZA(),e.TgZ(11,"div",38)(12,"div",39),e._uU(13),e.qZA(),e.TgZ(14,"div",40),e._UZ(15,"span",41),e.TgZ(16,"span"),e._uU(17,"Count"),e.qZA(),e.TgZ(18,"strong"),e._uU(19),e.qZA()()()()()),2&i){const n=r.$implicit;e.xp6(3),e.Udp("background",n.color),e.xp6(2),e.Oqu(n.label),e.xp6(2),e.Oqu(n.count),e.xp6(3),e.Udp("background",n.color)("width",n.width),e.xp6(3),e.hij(" ",n.label," "),e.xp6(6),e.Oqu(n.count)}}function pe(i,r){if(1&i&&(e.TgZ(0,"div",42)(1,"div",43),e._UZ(2,"span",44),e.TgZ(3,"span"),e._uU(4),e.qZA()(),e.TgZ(5,"strong"),e._uU(6),e.qZA()()),2&i){const n=r.$implicit;e.xp6(2),e.Udp("background",n.color),e.xp6(2),e.Oqu(n.label),e.xp6(2),e.Oqu(n.count)}}function me(i,r){if(1&i&&(e.ynx(0),e.TgZ(1,"div",9),e.YNc(2,le,10,5,"div",10),e.qZA(),e.TgZ(3,"div",11)(4,"div",12)(5,"section",13)(6,"div",14)(7,"h4"),e._uU(8,"Documents by File Type"),e.qZA(),e.TgZ(9,"span"),e._uU(10,"Uploaded Documents Count"),e.qZA()(),e.TgZ(11,"div",15),e.YNc(12,ue,20,10,"div",16),e.qZA()(),e.TgZ(13,"section",13)(14,"div",14)(15,"h4"),e._uU(16,"File Type Distribution"),e.qZA(),e.TgZ(17,"span"),e._uU(18),e.qZA()(),e.TgZ(19,"div",17)(20,"div",18)(21,"div",19),e._UZ(22,"div",20),e.TgZ(23,"div",21)(24,"span"),e._uU(25,"Files"),e.qZA(),e.TgZ(26,"strong"),e._uU(27),e.qZA()()()(),e.TgZ(28,"div",22)(29,"div",23),e.YNc(30,pe,7,4,"div",24),e.qZA()()()()()(),e.BQk()),2&i){const n=e.oxw();e.xp6(2),e.Q6J("ngForOf",n.summaryCards),e.xp6(10),e.Q6J("ngForOf",n.fileTypeBarRows)("ngForTrackBy",n.trackByFileType),e.xp6(6),e.hij("",n.totalFileTypeUploads," Total"),e.xp6(9),e.Oqu(n.totalFileTypeUploads),e.xp6(3),e.Q6J("ngForOf",n.fileTypeChartRows)("ngForTrackBy",n.trackByFileType)}}let ge=(()=>{const r=class{constructor(t,o){this.route=t,this.documentationApiService=o,this.loading=!1,this.errorMessage="",this.dashboard={file_types:[],recent_uploads:0,total_documents:0,total_size:0},this.fileTypeDefinitions=[{key:"pdf",label:"PDF",color:"#4f46e5"},{key:"images",label:"Images",color:"#10b981"},{key:"docx",label:"DOCX",color:"#ef4444"},{key:"xlsx",label:"XLSX",color:"#3b82f6"}],this.oid="",this.viewReady=!1,this.fileTypeDonutChart=null}ngOnInit(){this.route.queryParamMap.subscribe(t=>{this.oid=t.get("oid")||"",this.loadDashboard()})}ngAfterViewInit(){this.viewReady=!0,this.renderFileTypeCharts()}ngOnDestroy(){this.fileTypeDonutChart?.dispose()}onWindowResize(){this.fileTypeDonutChart?.resize()}get summaryCards(){return[{title:"Total Documents",value:this.dashboard.total_documents,label:"uploaded documents",icon:"fas fa-folder-open"},{title:"Recent Uploads",value:this.dashboard.recent_uploads,label:"recently uploaded",icon:"fas fa-upload"},{title:"Total Size",value:this.formatFileSize(this.dashboard.total_size),label:"storage used",icon:"fas fa-database"},{title:"File Types",value:this.dashboard.file_types.length,label:"document formats",icon:"fas fa-file-code"}]}get fileTypeChartRows(){const t=new Map;return this.fileTypeDefinitions.forEach(o=>
1t.set(o.key,0)),this.dashboard.file_types.forEach(o=>{const a=this.resolveFileTypeKey(o.file_type);a&&t.set(a,(t.get(a)||0)+(o.count||0))}),this.fileTypeDefinitions.map(o=>({...o,count:t.get(o.key)||0}))}get totalFileTypeUploads(){return this.fileTypeChartRows.reduce((t,o)=>t+o.count,0)}get fileTypeBarRows(){const t=this.fileTypeChartRows,o=Math.max(...t.map(a=>a.count),1);return t.map(a=>({...a,width:`${Math.max(a.count/o*100,a.count>0?2:0)}%`}))}formatFileSize(t){if(!t)return"0 B";const o=["B","KB","MB","GB","TB"],a=Math.min(Math.floor(Math.log(t)/Math.log(1024)),o.length-1);return`${(t/Math.pow(1024,a)).toFixed(0===a?0:1)} ${o[a]}`}trackByFileType(t,o){return o?.key||o?.file_type||t}resolveFileTypeKey(t){const o=(t||"").toLowerCase();return o.includes("pdf")?"pdf":o.startsWith("image/")?"images":o.includes("wordprocessingml")||o.includes("msword")?"docx":o.includes("spreadsheetml")||o.includes("excel")?"xlsx":""}renderFileTypeCharts(){if(!this.viewReady)return;const t=this.fileTypeChartRows,o=document.getElementById("documentationFileTypeDonutChart");if(o){const a=t.filter(d=>d.count>0).map(d=>({value:d.count,name:d.label,itemStyle:{color:d.color}}));this.fileTypeDonutChart=this.fileTypeDonutChart||de.S1(o),this.fileTypeDonutChart.setOption({animationDuration:450,tooltip:{trigger:"item",formatter:({name:d,value:c})=>`${d||""}<br/>Count: ${c||0}`},series:[{type:"pie",radius:["52%","82%"],center:["50%","50%"],avoidLabelOverlap:!0,label:{show:!1},emphasis:{scale:!0,itemStyle:{shadowBlur:18,shadowColor:"rgba(15, 23, 42, 0.18)"}},data:a.length>0?a:[{value:1,name:"No Data",itemStyle:{color:"#e5e7eb"},tooltip:{show:!1}}]}]})}}loadDashboard(){this.oid?(this.loading=!0,this.errorMessage="",this.documentationApiService.getDashboard(this.oid).subscribe({next:t=>{this.dashboard={file_types:t?.file_types||[],recent_uploads:t?.recent_uploads||0,total_documents:t?.total_documents||0,total_size:t?.total_size||0},this.loading=!1,setTimeout(()=>this.renderFileTypeCharts())},error:t=>{this.errorMessage=t?.error?.error||t?.error?.message||"Unable to load documentation dashboard",this.loading=!1,setTimeout(()=>this.renderFileTypeCharts())}})):this.dashboard={file_types:[],recent_uploads:0,total_documents:0,total_size:0}}};let i=r;return r.\u0275fac=function(o){return new(o||r)(e.Y36(x.gz),e.Y36(w.o))},r.\u0275cmp=e.Xpm({type:r,selectors:[["app-documentation-dashboard"]],hostBindings:function(o,a){1&o&&e.NdJ("resize",function(){return a.onWindowResize()},!1,e.Jf7)},decls:12,vars:3,consts:[[1,"doc-dashboard-shell"],[1,"doc-dashboard-card"],[1,"doc-dashboard-title"],[1,"doc-dashboard-summary"],["class","doc-dashboard-state",4,"ngIf"],["class","doc-dashboard-state doc-dashboard-state-error",4,"ngIf"],[4,"ngIf"],[1,"doc-dashboard-state"],[1,"doc-dashboard-state","doc-dashboard-state-error"],[1,"doc-dashboard-grid"],["class","doc-dashboard-metric",4,"ngFor","ngForOf"],[1,"doc-dashboard-breakdown"],[1,"doc-dashboard-breakdown-panels"],[1,"doc-dashboard-chart-card"],[1,"doc-dashboard-chart-card-header"],[1,"doc-dashboard-chart-card-body"],["class","doc-dashboard-progress-row",4,"ngFor","ngForOf","ngForTrackBy"],[1,"doc-dashboard-chart-card-body","doc-dashboard-donut-layout"],[1,"doc-dashboard-donut-wrap"],[1,"doc-dashboard-donut-chart-wrap"],["id","documentationFileTypeDonutChart",1,"doc-dashboard-chart-host","doc-dashboard-donut-host"],[1,"doc-dashboard-donut-center"],[1,"doc-dashboard-legend-wrap"],[1,"doc-dashboard-legend"],["class","doc-dashboard-legend-row",4,"ngFor","ngForOf","ngForTrackBy"],[1,"doc-dashboard-metric"],[1,"doc-dashboard-icon"],[1,"doc-dashboard-metric-body"],[1,"doc-dashboard-metric-title"],[1,"doc-dashboard-metric-value"],[1,"doc-dashboard-metric-label"],[1,"doc-dashboard-progress-row"],[1,"doc-dashboard-progress-top"],[1,"doc-dashboard-progress-label"],[1,"doc-dashboard-progress-dot"],[1,"doc-dashboard-progress-bar-wrap"],[1,"doc-dashboard-progress-bar"],[1,"doc-dashboard-progress-fill"],[1,"doc-dashboard-bar-tooltip"],[1,"doc-dashboard-bar-tooltip-title"],[1,"doc-dashboard-bar-tooltip-line"],[1,"doc-dashboard-bar-tooltip-dot"],[1,"doc-dashboard-legend-row"],[1,"doc-dashboard-legend-label"],[1,"doc-dashboard-legend-swatch"]],template:function(o,a){1&o&&(e.TgZ(0,"div",0)(1,"div",1)(2,"h1",2),e._uU(3,"Documentation Dashboard"),e.qZA(),e.TgZ(4,"div",3)(5,"h2"),e._uU(6,"Document Summary"),e.qZA(),e.TgZ(7,"p"),e._uU(8," Overview of uploaded documents, file types, recent uploads, and storage usage. "),e.qZA()(),e.YNc(9,ce,2,0,"div",4),e.YNc(10,se,2,1,"div",5),e.YNc(11,me,31,7,"ng-container",6),e.qZA()()),2&o&&(e.xp6(9),e.Q6J("ngIf",a.loading),e.xp6(1),e.Q6J("ngIf",!a.loading&&a.errorMessage),e.xp6(1),e.Q6J("ngIf",!a.loading&&!a.errorMessage))},dependencies:[f.sg,f.O5],styles:['.doc-dashboard-shell[_ngcontent-%COMP%]{min-height:100%}.doc-dashboard-card[_ngcontent-%COMP%]{background:#fff;border:1px solid #d7dfeb;padding:16px}.doc-dashboard-title[_ngcontent-%COMP%]{margin:0 0 18px;color:#111827;font-size:32px;font-weight:600}.doc-dashboard-summary[_ngcontent-%COMP%]{margin-bottom:20px;padding:16px;border:1px solid #e5e7eb;background:#f8fafc}.doc-dashboard-summary[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{margin:0 0 6px;color:#111827;font-size:18px;font-weight:600}.doc-dashboard-summary[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;color:#64748b;font-size:14px;line-height:1.6}.doc-dashboard-state[_ngcontent-%COMP%]{padding:18px 16px;border:1px solid #e5e7eb;background:#fff;color:#475569;font-size:14px}.doc-dashboard-state-error[_ngcontent-%COMP%]{color:#b91c1c}.doc-dashboard-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin-bottom:20px}.doc-dashboard-metric[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:14px;padding:18px 16px;border:1px solid #e5e7eb;background:#fff}.doc-dashboard-icon[_ngcontent-%COMP%]{width:42px;height:42px;border-radius:12px;background:#eef7ff;color:#1d4ed8;display:flex;align-items:center;justify-content:center;font-size:18px}.doc-dashboard-metric-body[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:4px}.doc-dashboard-metric-title[_ngcontent-%COMP%]{color:#64748b;font-size:13px;font-weight:600}.doc-dashboard-metric-value[_ngcontent-%COMP%]{color:#111827;font-size:28px;font-weight:700;line-height:1.1}.doc-dashboard-metric-label[_ngcontent-%COMP%]{color:#94a3b8;font-size:12px}.doc-dashboard-breakdown[_ngcontent-%COMP%]{margin-top:4px}.doc-dashboard-breakdown-panels[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px}.doc-dashboard-chart-card[_ngcontent-%COMP%]{border:1px solid #d7dfeb;background:#fff;min-height:420px;display:flex;flex-direction:column}.doc-dashboard-chart-card-header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px 18px;border-bottom:1px solid #d7dfeb}
1.doc-dashboard-chart-card-header[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{margin:0;color:#111827;font-size:16px;font-weight:700}.doc-dashboard-chart-card-header[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:#111827;font-size:15px;font-weight:700}.doc-dashboard-chart-card-body[_ngcontent-%COMP%]{padding:18px;flex:1;overflow:hidden}.doc-dashboard-progress-row[_ngcontent-%COMP%]{position:relative;margin-bottom:24px}.doc-dashboard-progress-row[_ngcontent-%COMP%]:last-child{margin-bottom:0}.doc-dashboard-progress-top[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px;padding-right:2px;color:#334155;font-size:15px;font-weight:600}.doc-dashboard-progress-label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px}.doc-dashboard-progress-dot[_ngcontent-%COMP%]{width:12px;height:12px;border-radius:50%;flex-shrink:0}.doc-dashboard-progress-bar-wrap[_ngcontent-%COMP%]{position:relative;overflow:visible}.doc-dashboard-progress-bar[_ngcontent-%COMP%]{height:14px;background:#ececec;overflow:hidden}.doc-dashboard-progress-fill[_ngcontent-%COMP%]{display:block;height:100%}.doc-dashboard-bar-tooltip[_ngcontent-%COMP%]{position:absolute;left:50%;bottom:calc(100% + 10px);transform:translate(-50%,8px);min-width:122px;padding:10px 12px;border:1px solid #e5e7eb;background:#fff;box-shadow:0 10px 24px #0f172a24;opacity:0;visibility:hidden;pointer-events:none;transition:opacity .18s ease,transform .18s ease;z-index:5}.doc-dashboard-bar-tooltip[_ngcontent-%COMP%]:after{content:"";position:absolute;left:50%;bottom:-6px;width:12px;height:12px;background:#fff;border-right:1px solid #e5e7eb;border-bottom:1px solid #e5e7eb;transform:translate(-50%) rotate(45deg)}.doc-dashboard-progress-row[_ngcontent-%COMP%]:hover .doc-dashboard-bar-tooltip[_ngcontent-%COMP%]{opacity:1;visibility:visible;transform:translate(-50%)}.doc-dashboard-bar-tooltip-title[_ngcontent-%COMP%]{color:#475569;font-size:14px;font-weight:600}.doc-dashboard-bar-tooltip-line[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;margin-top:6px;color:#475569;font-size:13px}.doc-dashboard-bar-tooltip-line[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{margin-left:auto;color:#111827;font-size:14px;font-weight:700}.doc-dashboard-bar-tooltip-dot[_ngcontent-%COMP%]{width:10px;height:10px;border-radius:50%;flex-shrink:0;background:#9bb9d8}.doc-dashboard-chart-host[_ngcontent-%COMP%]{width:100%;height:320px}.doc-dashboard-donut-layout[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:flex-start;gap:28px;min-height:100%;flex-wrap:nowrap;transform:none}.doc-dashboard-donut-wrap[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:flex-start;flex:0 0 240px;width:240px;min-width:240px;padding-left:0;transform:none}.doc-dashboard-donut-chart-wrap[_ngcontent-%COMP%]{width:240px;height:240px;aspect-ratio:1/1;flex-shrink:0;position:relative}.doc-dashboard-donut-host[_ngcontent-%COMP%]{width:100%;height:100%}.doc-dashboard-donut-center[_ngcontent-%COMP%]{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:132px;height:132px;border-radius:50%;background:#fff;display:flex;align-items:center;justify-content:center;flex-direction:column;color:#111827;text-align:center;pointer-events:none}.doc-dashboard-donut-center[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:#334155;font-size:14px;font-weight:600}.doc-dashboard-donut-center[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{margin-top:4px;font-size:28px;font-weight:700}.doc-dashboard-legend[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:16px;width:100%;max-width:220px}.doc-dashboard-legend-wrap[_ngcontent-%COMP%]{display:flex;align-items:center;flex:1 1 0;min-width:0;padding-left:8px}.doc-dashboard-legend-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:minmax(0,1fr) 30px;align-items:center;column-gap:18px;width:100%;color:#334155;font-size:14px}.doc-dashboard-legend-row[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{color:#111827;font-size:16px;font-weight:700;text-align:right}.doc-dashboard-legend-label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;min-width:0}.doc-dashboard-legend-label[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:last-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.doc-dashboard-legend-swatch[_ngcontent-%COMP%]{width:14px;
1height:14px;flex-shrink:0}@media (max-width: 1199px){.doc-dashboard-grid[_ngcontent-%COMP%]{grid-template-columns:repeat(2,minmax(0,1fr))}.doc-dashboard-breakdown-panels[_ngcontent-%COMP%]{grid-template-columns:1fr}.doc-dashboard-donut-layout[_ngcontent-%COMP%]{justify-content:center;flex-wrap:wrap}}@media (max-width: 767px){.doc-dashboard-title[_ngcontent-%COMP%]{font-size:28px}.doc-dashboard-grid[_ngcontent-%COMP%]{grid-template-columns:1fr}.doc-dashboard-donut-layout[_ngcontent-%COMP%]{flex-direction:column;gap:26px;transform:none}.doc-dashboard-donut-wrap[_ngcontent-%COMP%]{justify-content:center;width:100%;min-width:0;flex-basis:auto;padding-left:0;transform:none}.doc-dashboard-donut-chart-wrap[_ngcontent-%COMP%]{width:220px;height:220px}.doc-dashboard-legend-wrap[_ngcontent-%COMP%], .doc-dashboard-legend[_ngcontent-%COMP%]{flex-basis:auto;width:100%;min-width:0}}']}),i})();var _e=p(31496),he=p(55089),fe=p(4598);function be(i,r){if(1&i&&(e.TgZ(0,"a",9),e._uU(1),e.qZA()),2&i){const n=e.oxw().$implicit;e.Q6J("routerLink",n.route)("queryParams",n.queryParams),e.xp6(1),e.hij(" ",n.label," ")}}function xe(i,r){if(1&i&&(e.TgZ(0,"span",10),e._uU(1),e.qZA()),2&i){const n=e.oxw().$implicit;e.xp6(1),e.hij(" ",n.label," ")}}function ve(i,r){1&i&&(e.TgZ(0,"span",11),e._uU(1,"/"),e.qZA())}function Me(i,r){if(1&i&&(e.ynx(0),e.YNc(1,be,2,3,"a",6),e.YNc(2,xe,2,1,"span",7),e.YNc(3,ve,2,0,"span",8),e.BQk()),2&i){const n=r.$implicit,t=r.last;e.xp6(1),e.Q6J("ngIf",!t&&n.route),e.xp6(1),e.Q6J("ngIf",t||!n.route),e.xp6(1),e.Q6J("ngIf",!t)}}function Ce(i,r){if(1&i&&(e.TgZ(0,"nav",4),e.YNc(1,Me,4,3,"ng-container",5),e.qZA()),2&i){const n=e.oxw();e.xp6(1),e.Q6J("ngForOf",n.breadcrumbs)}}const ye=[{path:"",component:(()=>{const r=class{constructor(t,o,a,d){this.organizationService=t,this.route=o,this.router=a,this.userService=d,this.organizationName="Select Organization",this.propertyName="Select Property",this.queryOID="",this.queryPID="",this.isSidebarExpanded=!1,this.breadcrumbs=[],this.currentMenu={showlink:"Documentation",subcategory:[]}}ngOnInit(){this.userService.isSideMenuVisible=!0,this.isSidebarExpanded=!!this.userService.getSidemenuOpenStatus(),this.routeSub=this.route.queryParamMap.subscribe(t=>{const o=t.get("oid")||"",a=t.get("pid")||"",d=t.get("docContext")||"global",c=t.get("moduleId")||t.get("module_id")||"",l=this.normalizeQueryId(o)||"",u=this.normalizeQueryId(a)||"",_=this.router.url.split("?")[0],g="/documentation"===_||"/documentation/"===_?"/documentation/dashboard":_;if(g!==_||l!==o||u!==a)return void this.router.navigate(["/",...g.split("/").filter(Boolean)],{queryParams:{...l?{oid:l}:{},...u?{pid:u}:{},...d?{docContext:d}:{},...c?{moduleId:c}:{}},replaceUrl:!0});this.queryOID=l,this.queryPID=u;const h=this.organizationService.getCurrentOrgWithProperty();this.organizationName=h?.organization_name||"Select Organization",this.propertyName=h?.property_name||"Select Property",this.breadcrumbs=this.buildBreadcrumbs(l,u,d,c,g),this.currentMenu=this.buildDocumentationMenu(d,c)})}ngOnDestroy(){this.routeSub?.unsubscribe(),this.userService.isSideMenuVisible=!1,this.userService.isSideMenuClicked=!1}checkSideMenuarrowClick(t){this.isSidebarExpanded=t,this.userService.isSideMenuClicked=t}normalizeQueryId(t){if(!t)return t;const o=t.match(/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/i);return o?o[0]:t}buildDocumentationMenu(t,o){const a={docContext:t,...o?{moduleId:o}:{}};return{showlink:"Documentation",subcategory:[{showlink:"Dashboard",routerLink:"/documentation/dashboard",icon:"fas fa-chart-bar feather-16",indexid:911,navmenuid:911,queryParams:a},{showlink:"Manage Documents",routerLink:"/documentation/manage",icon:"fas fa-file-alt feather-16",indexid:912,navmenuid:912,queryParams:a}]}}buildBreadcrumbs(t,o,a,d,c){const l={oid:t,pid:o},u={...l,...a?{docContext:a}:{},...d?{moduleId:d}:{}},_=[{label:"Home",route:"/home/welcome",queryParams:l}],g=this.getModuleBreadcrumb(a,l);return g&&_.push(g),_.push({label:"/documentation/manage"===c?"Manage Documents":"Documentation",route:c,queryParams:u}),_}getModuleBreadcrumb(t,o){const d={"cookie-consent":{label:"Cookie Consent",route:"/home/dashboard/cookie-consent"},"privacy-rights":{label:"Privacy Rights",route:"/home/dashboard/ccpa-dsar"},"consent-preference":{label:"Consent Preference",route:"/home/dashboard/consent-preference"},"social-fortuna":{label:"Social Fortuna",route:"/social-fortuna/dashboard"},ropa:{label:"ROPA",route:"/ropa/dashboard"},"data-discovery":{label:"Data Discovery",route:"/data-discovery/reports"},dpia:{label:"DPIA",route:"/assessment/dashboard"}}[t];return d?{...d,queryParams:o}:null}};let i=r;return r.\u0275fac=function(o){return new(o||r)(e.Y36(_e.M),e.Y36(x.gz),e.Y36(x.F0),e.Y36(he.KD))},r.\u0275cmp=e.Xpm({type:r,selectors:[["app-documentation-shell"]],decls:5,vars:8,consts:[[1,"docs-shell"],[3,"currentoid","currentpid","organization","property","currentmenu","onClickSideMenuArrow"],[1,"docs-shell__content"],["class","docs-shell__breadcrumb","aria-label","breadcrumb",4,"ngIf"],["aria-label","breadcrumb",1,"docs-shell__breadcrumb"],[4,"ngFor","ngForOf"],["class","docs-shell__breadcrumb-link",3,"routerLink","queryParams",4,"ngIf"],["class","docs-shell__breadcrumb-current",4,"ngIf"],["class","docs-shell__breadcrumb-sep",4,"ngIf"],[1,"docs-shell__breadcrumb-link",3,"routerLink","queryParams"],[1,"docs-shell__breadcrumb-current"],[1,"docs-shell__breadcrumb-sep"]],template:function(o,a){1&o&&(e.TgZ(0,"div",0)(1,"app-sidemenu",1),e.NdJ("onClickSideMenuArrow",function(c){return a.checkSideMenuarrowClick(c)}),e.qZA(),e.TgZ(2,"section",2),e.YNc(3,Ce,2,1,"nav",3),e._UZ(4,"router-outlet"),e.qZA()()),2&o&&(e.ekj("docs-shell--expanded",a.isSidebarExpanded),e.xp6(1),e.Q6J("currentoid",a.queryOID)("currentpid",a.queryPID)("organization",a.organizationName)("property",a.propertyName)("currentmenu",a.currentMenu),e.xp6(2),e.Q6J("ngIf",a.breadcrumbs.length))},dependencies:[f.sg,f.O5,fe.x,x.lC,x.rH],styles:["[_nghost-%COMP%]{display:block}.docs-shell[_ngcontent-%COMP%]{min-height:100vh;padding:20px 20px 20px 46px;background:#eef3fb;box-sizing:border-box;transition:padding-left .2s ease}.docs-shell--expanded[_ngcontent-%COMP%]{padding-left:250px}.docs-shell__content[_ngcontent-%COMP%]{width:100%;min-width:0;min-height:calc(100vh - 40px)}.docs-shell__breadcrumb[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;margin:0 0 14px;font-size:12px;font-weight:600;text-transform:uppercase}.docs-shell__breadcrumb-link[_ngcontent-%COMP%]{color:#111827;text-decoration:none}.docs-shell__breadcrumb-link[_ngcontent-%COMP%]:hover{color:#2563eb;text-decoration:none}.docs-shell__breadcrumb-sep[_ngcontent-%COMP%]{color:#94a3b8}.docs-shell__breadcrumb-current[_ngcontent-%COMP%]{color:#16bf5e}@media (max-width: 991px){.docs-shell[_ngcontent-%COMP%]{padding:16px}.docs-shell--expanded[_ngcontent-%COMP%]{padding-left:16px}.docs-shell__content[_ngcontent-%COMP%]{min-height:auto}}"]}),i})(),children:[{path:"",pathMatch:"full",redirectTo:"dashboard"},{path:"dashboard",component:ge},{path:"manage",component:re}]}];let Te=(()=>{const r=class{};let i=r;return r.\u0275fac=function(o){return new(o||r)},r.\u0275mod=e.oAB({type:r}),r.\u0275inj=e.cJS({imports:[x.Bz.forChild(ye),x.Bz]}),i})();var De=p(86325);let we=(()=>{const r=class{};let i=r;return r.\u0275fac=function(o){return new(o||r)},r.\u0275mod=e.oAB({type:r}),r.\u0275inj=e.cJS({providers:[D.ez],imports:[f.ez,C.u5,s.kW,M.EV,S.U$,O.V,Z.hJ,P.j,De.y,Te]}),i})()},46162:(U,T,p)=>{p.d(T,{V:()=>x,o:()=>D});var f=p(36895),C=p(42111),s=p(94650);function M(m,v){1&m&&s.GkF(0)}function S(m,v){if(1&m&&(s.TgZ(0,"div",3),s.YNc(1,M,1,0,"ng-container",4),s.qZA()),2&m){const e=s.oxw();s.xp6(1),s.Q6J("ngTemplateOutlet",e.leftTemplate)}}function O(m,v){1&m&&s.GkF(0)}function Z(m,v){if(1&m&&(s.TgZ(0,"div",5),s.YNc(1,O,1,0,"ng-container",4),s.qZA()),2&m){const e=s.oxw();s.xp6(1),s.Q6J("ngTemplateOutlet",e.rightTemplate)}}const P=["*"];let D=(()=>{class m{constructor(e){this.el=e}getBlockableElement(){return this.el.nativeElement.children[0]}
1ngAfterContentInit(){this.templates.forEach(e=>{switch(e.getType()){case"left":this.leftTemplate=e.template;break;case"right":this.rightTemplate=e.template}})}}return m.\u0275fac=function(e){return new(e||m)(s.Y36(s.SBq))},m.\u0275cmp=s.Xpm({type:m,selectors:[["p-toolbar"]],contentQueries:function(e,y,F){if(1&e&&s.Suo(F,C.jx,4),2&e){let w;s.iGM(w=s.CRH())&&(y.templates=w)}},inputs:{style:"style",styleClass:"styleClass"},ngContentSelectors:P,decls:4,vars:6,consts:[["role","toolbar",3,"ngClass","ngStyle"],["class","p-toolbar-group-left",4,"ngIf"],["class","p-toolbar-group-right",4,"ngIf"],[1,"p-toolbar-group-left"],[4,"ngTemplateOutlet"],[1,"p-toolbar-group-right"]],template:function(e,y){1&e&&(s.F$t(),s.TgZ(0,"div",0),s.Hsn(1),s.YNc(2,S,2,1,"div",1),s.YNc(3,Z,2,1,"div",2),s.qZA()),2&e&&(s.Tol(y.styleClass),s.Q6J("ngClass","p-toolbar p-component")("ngStyle",y.style),s.xp6(2),s.Q6J("ngIf",y.leftTemplate),s.xp6(1),s.Q6J("ngIf",y.rightTemplate))},dependencies:[f.mk,f.O5,f.tP,f.PC],styles:[".p-toolbar{flex-wrap:wrap;justify-content:space-between}.p-toolbar,.p-toolbar-group-left,.p-toolbar-group-right{align-items:center;display:flex}"],encapsulation:2,changeDetection:0}),m})(),x=(()=>{class m{}return m.\u0275fac=function(e){return new(e||m)},m.\u0275mod=s.oAB({type:m}),m.\u0275inj=s.cJS({imports:[f.ez]}),m})()}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.