@qaecy/cue-ui 0.0.42 → 0.0.44

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/879.js CHANGED
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[879],{4879(z,b,u){u.d(b,{g:()=>Oe});var x=u(467),a=u(7705),h=u(2271),l=u(5802),w=u(2065),y=u(7284),M=u.n(y);var t=u(5547);let E=(()=>{class o{get calculatedWidth(){let e=this.localConfig().width||this.width()||1;return this.el.nativeElement.parentNode.offsetWidth>0&&e<=1&&e>0&&(e*=this.el.nativeElement.parentNode.offsetWidth),e}get calculatedHeight(){let e=this.localConfig().height||this.height()||400;return this.el.nativeElement.parentNode.offsetHeight>0&&e<=1&&e>0&&(e*=this.el.nativeElement.parentNode.offsetHeight),e}onResize(e){this.logMessage("debug","rezisze triggered"),window.clearTimeout(this.timeoutId),this.timeoutId=window.setTimeout(()=>{this.options.realignOnResize&&this.reDraw()},200)}constructor(){this.data=(0,a.hFB)([]),this.width=(0,a.hFB)(),this.height=(0,a.hFB)(),this.step=(0,a.hFB)(),this.overflow=(0,a.hFB)(),this.strict=(0,a.hFB)(),this.zoomOnHover=(0,a.hFB)(),this.realignOnResize=(0,a.hFB)(),this.randomizeAngle=(0,a.hFB)(),this.background=(0,a.hFB)(),this.font=(0,a.hFB)(),this.delay=(0,a.hFB)(),this.config=(0,a.hFB)({}),this.log=(0,a.hFB)(),this.clicked=(0,a.CGW)(),this.afterInit=(0,a.CGW)(),this.afterChecked=(0,a.CGW)(),this.localConfig=(0,h.EW)(()=>{const n=this.config();return{...n,width:this.width()||n.width||500,height:this.height()||n.height||300,overflow:this.overflow()??(n.overflow||!0),strict:this.strict()??(n.strict||!1),zoomOnHover:this.zoomOnHover()||n.zoomOnHover||{transitionTime:0,scale:1,delay:0},realignOnResize:this.realignOnResize()??(n.realignOnResize||!1),randomizeAngle:this.randomizeAngle()??(n.randomizeAngle||!1),step:this.step()||n.step||2,log:this.log()||n.log||!1,delay:this.delay()||n.delay,background:this.background()||n.background,font:this.font()||n.font}}),this.cloudDataHtmlElements=[],this.dataArr=[],this.el=(0,l.WQX)(t.aKT),this.r2=(0,l.WQX)(t.sFG);const e=this.el.nativeElement;(0,l.QZP)(()=>{const n=this.localConfig();this.logMessage("warn","cloud configuration",n),n.font&&this.r2.setStyle(e,"font",n.font),n.background&&this.r2.setStyle(e,"background",n.background),this.reDraw()})}reDraw(){this.afterChecked?.emit(),this.logMessage("debug","dataChanges emitted"),this.cloudDataHtmlElements=[],this.data()?(this.el.nativeElement.innerHTML="",this.data()&&(this.dataArr=this.data()),this.options={...this.localConfig(),aspectRatio:this.calculatedWidth/this.calculatedHeight,width:this.calculatedWidth,height:this.calculatedHeight,center:{x:this.calculatedWidth/2,y:this.calculatedHeight/2}},this.r2.setStyle(this.el.nativeElement,"width",this.options.width+"px"),this.r2.setStyle(this.el.nativeElement,"height",this.options.height+"px"),this.drawWordCloud(),this.logMessage("debug","reDraw finished")):console.error("angular-tag-cloud: No data passed. Please pass an Array of CloudData")}descriptiveEntry(e){let n=e.text;return n+=e.color?`-${e.color}`:"",n+=e.external?`-${e.external}`:"",n+=e.link?`-${e.link}`:"",n+=e.rotate?`-${e.rotate}`:"",n}drawWordCloud(){this.dataArr.sort((i,s)=>this.descriptiveEntry(i).localeCompare(this.descriptiveEntry(s))),this.dataArr.sort((i,s)=>s.weight-i.weight);const e=this.dataArr.filter(i=>i.position),n=this.dataArr.filter(i=>!i.position);e.forEach((i,s)=>{this.drawWord(s,i)}),n.forEach((i,s)=>{this.drawWord(s,i)})}hitTest(e){for(const n of this.cloudDataHtmlElements)if(this.overlapping(e,n))return!0;return!1}overlapping(e,n){const{offsetLeft:i,offsetTop:s,offsetWidth:c,offsetHeight:d}=n;return!(e.right<i||e.left>i+c||e.bottom<s||e.top>s+d)}getWeightForWord(e){let n=5;return this.dataArr[0].weight>this.dataArr[this.dataArr.length-1].weight&&(this.options.strict?e.weight>10?(n=10,this.logMessage("warn",`[TagCloud strict] Weight property ${e.weight} > 10. Fallback to 10 as you are using strict mode`,e)):e.weight<1?(n=1,this.logMessage("warn",`[TagCloud strict] Given weight property ${e.weight} < 1. Fallback to 1 as you are using strict mode`,e)):e.weight%1!=0?(n=Math.round(e.weight),this.logMessage("warn",`[TagCloud strict] Given weight property ${e.weight} is not an integer. Rounded value to ${n}`,e)):n=e.weight:n=Math.round((e.weight-this.dataArr[this.dataArr.length-1].weight)/(this.dataArr[0].weight-this.dataArr[this.dataArr.length-1].weight)*9)+1),n}setWordColor(e,n){this.r2.setStyle(e,"color",n)}setTooltip(e,n){this.r2.addClass(e,"tooltip");const i=this.r2.createElement("span");i.className="tooltiptext";const s=this.r2.createText(n);i.appendChild(s),e.appendChild(i)}setWordRotation(e,n){const i=n?`rotate(${n}deg)`:"";return this.r2.setStyle(e,"transform",i),i}wrapNodeIntoAnchorElement(e,n){const i=this.r2.createElement("a");return i.href=n.link||"",void 0!==n.external&&n.external&&(i.target="_blank"),i.appendChild(e),i}applyZoomStyle(e,n,i,s){this.options.zoomOnHover&&1!==this.options.zoomOnHover.scale&&(this.options.zoomOnHover.transitionTime||(this.options.zoomOnHover.transitionTime=0),this.options.zoomOnHover.scale||(this.options.zoomOnHover.scale=1),n.onmouseover=()=>{this.options.zoomOnHover?.transitionTime&&this.r2.setStyle(n,"transition",`transform ${this.options.zoomOnHover.transitionTime}s`),this.options.zoomOnHover?.scale&&this.r2.setStyle(n,"transform",`scale(${this.options.zoomOnHover.scale}) ${s}`),this.options.zoomOnHover?.delay&&this.r2.setStyle(n,"transition-delay",`${this.options.zoomOnHover.delay}s`),this.options.zoomOnHover?.color&&this.r2.setStyle(i?e:n,"color",this.options.zoomOnHover.color)},n.onmouseout=()=>{this.r2.setStyle(n,"transform",`none ${s}`),this.options.zoomOnHover?.color&&this.r2.removeStyle(i?e:n,"color")})}setPosition(e,n,i){let s=this.options.randomizeAngle?6.28*Math.random():0,c=0;const d=e.style;d.position="absolute";const m=!!(n.position&&n.position.left&&n.position.top),r=e.offsetWidth,p=e.offsetHeight;let _=m&&n.position?.left?n.position.left:this.options.center.x-r/2,v=m&&n.position?.top?n.position.top:this.options.center.y-p/2;if(d.left=_+"px",d.top=v+"px",this.options.delay&&(e.classList.add("tag-animation-delay"),d.setProperty("--tag-animation-delay",this.options.delay*i+"ms")),!m)if(0===i)d.left=_+2*(Math.random()-.5)*(this.calculatedWidth/5)+"px",d.top=v+2*(Math.random()-.5)*(this.calculatedHeight/5)+"30px";else{for(;this.options.width&&this.options.height&&e.offsetHeight&&e.offsetWidth&&this.hitTest(new DOMRect(_,v,e.offsetWidth,e.offsetHeight));)c+=this.options.step||1,s+=(i%2==0?1:-1)*(this.options.step||1),_=this.options.center.x-r/2+c*Math.cos(s)*this.options.aspectRatio,v=this.options.center.y+c*Math.sin(s)-p/2;d.left=_+"px",d.top=v+"px"}if(!this.options.overflow&&(_<0||v<0||_+r>this.calculatedWidth||v+p>this.calculatedHeight))return this.logMessage("warn","Word did not fit into the cloud and overflow is set to 'false'. The element will be removed",e),void e.remove()}drawWord(e,n){let i;const s=this.getWeightForWord(n);i=this.r2.createElement("span"),i.className=`w${s}`,i.onclick=()=>{this.clicked?.emit(n)},i.onmouseenter=()=>{i.style.zIndex="2"},i.onmouseleave=()=>{i.style.zIndex="1"};let c=this.r2.createText(n.text);n.color&&this.setWordColor(i,n.color);const d=this.setWordRotation(i,n.rotate);n.link&&(c=this.wrapNodeIntoAnchorElement(c,n)),this.options.zoomOnHover&&1!==this.options.zoomOnHover.scale&&this.applyZoomStyle(c,i,n.link,d),i.appendChild(c),this.r2.appendChild(this.el.nativeElement,i),n.tooltip&&this.setTooltip(i,n.tooltip),i.id=`angular-tag-cloud-item-${e}`,this.setPosition(i,n,e),this.logMessage("debug","Adds new word <span>",i),this.cloudDataHtmlElements.push(i),this.logMessage("debug","Placed words",this.cloudDataHtmlElements)}logMessage(e,...n){this.localConfig()&&("debug"===this.localConfig().log?console.log(`[AngularTagCloudModule ${e}]`,...n):"warn"===this.localConfig().log&&"warn"===e&&console.warn(`[AngularTagCloudModule ${e}]`,...n))}static{this.\u0275fac=function(n){return new(n||o)}}static{this.\u0275cmp=t.VBU({type:o,selectors:[["angular-tag-cloud"],["ng-tag-cloud"],["ngtc"]],hostBindings:function(n,i){1&n&&t.bIt("resize",function(c){return i.onResize(c)},t.tSv)},inputs:{data:[1,"data"],width:[1,"width"],height:[1,"height"],step:[1,"step"],overflow:[1,"overflow"],strict:[1,"strict"],zoomOnHover:[1,"zoomOnHover"],realignOnResize:[1,"realignOnResize"],randomizeAngle:[1,"randomizeAngle"],background:[1,"background"],font:[1,"font"],delay:[1,"delay"],config:[1,"config"],log:[1,"log"]},outputs:{clicked:"clicked",afterInit:"afterInit",afterChecked:"afterChecked"},decls:0,vars:0,template:function(n,i){},styles:['[_nghost-%COMP%]{font-family:Helvetica,Arial,sans-serif;font-size:10px;line-height:normal;color:#09f;overflow:hidden;position:relative;display:block}.tag-animation-delay[_ngcontent-%COMP%]{--tag-animation-delay: .5s;animation:_ngcontent-%COMP%_fadeIn .5s;opacity:0;animation-fill-mode:forwards;animation-delay:var(--tag-animation-delay)}span[_ngcontent-%COMP%]{padding:0}span.w10[_ngcontent-%COMP%]{font-size:550%}span.w9[_ngcontent-%COMP%]{font-size:500%}span.w8[_ngcontent-%COMP%]{font-size:450%}span.w7[_ngcontent-%COMP%]{font-size:400%}span.w6[_ngcontent-%COMP%]{font-size:350%}span.w5[_ngcontent-%COMP%]{font-size:300%}span.w4[_ngcontent-%COMP%]{font-size:250%}span.w3[_ngcontent-%COMP%]{font-size:200%}span.w2[_ngcontent-%COMP%]{font-size:150%}span.w1[_ngcontent-%COMP%]{font-size:100%}a[_ngcontent-%COMP%]:hover{color:#0df}a[_ngcontent-%COMP%]:hover, span.w10[_ngcontent-%COMP%], span.w9[_ngcontent-%COMP%], span.w8[_ngcontent-%COMP%]{color:#0cf}span.w7[_ngcontent-%COMP%]{color:#39d}span.w6[_ngcontent-%COMP%]{color:#90c5f0}span.w5[_ngcontent-%COMP%]{color:#90a0dd}span.w4[_ngcontent-%COMP%]{color:#90c5f0}span.w3[_ngcontent-%COMP%]{color:#a0ddff}span.w2[_ngcontent-%COMP%]{color:#9ce}span.w1[_ngcontent-%COMP%]{color:#aab5f0}.tooltip[_ngcontent-%COMP%] .tooltiptext[_ngcontent-%COMP%]{visibility:hidden;width:inherit;background-color:#555;color:#fff;text-align:center;border-radius:6px;padding:5px 10px;position:absolute;bottom:100%;left:0;opacity:0;transition:opacity .3s}.tooltip[_ngcontent-%COMP%] .tooltiptext[_ngcontent-%COMP%]:after{content:"";position:absolute;top:100%;left:50%;margin-left:-5px;border-width:5px;border-style:solid;border-color:#555 transparent transparent transparent}.tooltip[_ngcontent-%COMP%]:hover .tooltiptext[_ngcontent-%COMP%]{visibility:visible;opacity:1}@keyframes _ngcontent-%COMP%_fadeIn{0%{opacity:0}to{opacity:1}}'],changeDetection:0})}}return o})();var W=u(5970);const H=["wordCloudContainer"];function G(o,g){if(1&o){const e=t.RV6();t.j41(0,"angular-tag-cloud",3),t.bIt("clicked",function(i){l.eBV(e);const s=t.XpG();return l.Njj(s.handleClicked(i))}),t.k0s()}if(2&o){const e=t.XpG();t.Y8G("data",e.data())("zoomOnHover",e.zoomOnHoverOptions())("width",e.containerSize().width)("height",e.containerSize().height)("overflow",e.overflow())("realignOnResize",!0)}}let j=(()=>{class o{words=(0,a.hFB)();entries=(0,a.hFB)();caseSensitive=(0,a.hFB)(!1);clickable=(0,a.hFB)(!1);multiSelect=(0,a.hFB)(!1);highlightSelection=(0,a.hFB)(!1);minWeight=(0,a.hFB)(1);maxWeight=(0,a.hFB)(5);maxWords=(0,a.hFB)(50);colorScheme=(0,a.hFB)(["var(--cue-chart-text-color)","var(--cue-chart-text-color-select)"]);overflow=(0,a.hFB)(!1);clickedWord=(0,a.CGW)();selectionChanged=(0,a.CGW)();wordCloudContainer;containerSize=(0,l.vPA)({width:0,height:0});selection=(0,l.vPA)([]);data=(0,h.EW)(()=>{const e=this.words(),n=this.entries();return n?.length||e?.length?n?.length?n:e?.length?this._buildEntriesFromWords(e):[]:[]});ngAfterViewInit(){const e=new MutationObserver(()=>{this._applySelectionStyles()});this.wordCloudContainer?.nativeElement&&e.observe(this.wordCloudContainer.nativeElement,{childList:!0,subtree:!0})}handleResize(e){0!==e.newRect.height&&this.containerSize.set({width:e.newRect.width,height:e.newRect.height})}styleSelection=(0,l.QZP)(()=>{this.selection(),this._applySelectionStyles()});zoomOnHoverOptions=(0,h.EW)(()=>({scale:1.1,transitionTime:this.clickable()?1.2:0,delay:.05}));_buildEntriesFromWords(e){const n=new Map;for(const r of e){const p=this.caseSensitive()?r:r.toLowerCase();n.set(p,(n.get(p)||0)+1)}const i=Array.from(n.entries());if(0===i.length)return[];const s=i.map(([,r])=>r),c=Math.min(...s),d=Math.max(...s);return d===c?i.map(([r])=>({text:r,weight:this.maxWeight()})):i.sort(([,r],[,p])=>p-r).slice(0,this.maxWords()).map(([r,p])=>({text:r,weight:this.minWeight()+(p-c)*(this.maxWeight()-this.minWeight())/(d-c),color:this.colorScheme()[Math.floor(Math.random()*this.colorScheme().length)]}))}_applySelectionStyles(){if(!this.highlightSelection())return;const e=this.wordCloudContainer?.nativeElement;void 0!==e&&e.querySelectorAll("span").forEach(i=>{i.textContent&&(this.selection().includes(i.textContent.trim())?i.classList.add("selected"):i.classList.remove("selected"))})}handleClicked(e){this.clickable()&&(this.clickedWord.emit(e.text),this.highlightSelection()&&(this.selection().includes(e.text)?this.selection.update(n=>n.filter(i=>i!==e.text)):this.multiSelect()?this.selection.update(n=>[...n,e.text]):this.selection.update(()=>[e.text])),this.selectionChanged.emit(this.selection()))}static \u0275fac=function(n){return new(n||o)};static \u0275cmp=t.VBU({type:o,selectors:[["cue-word-cloud"]],viewQuery:function(n,i){if(1&n&&t.GBs(H,5),2&n){let s;t.mGM(s=t.lsd())&&(i.wordCloudContainer=s.first)}},inputs:{words:[1,"words"],entries:[1,"entries"],caseSensitive:[1,"caseSensitive"],clickable:[1,"clickable"],multiSelect:[1,"multiSelect"],highlightSelection:[1,"highlightSelection"],minWeight:[1,"minWeight"],maxWeight:[1,"maxWeight"],maxWords:[1,"maxWords"],colorScheme:[1,"colorScheme"],overflow:[1,"overflow"]},outputs:{clickedWord:"clickedWord",selectionChanged:"selectionChanged"},decls:3,vars:5,consts:[["wordCloudContainer",""],["cueResized","",1,"wordcloud-container",3,"resized"],[3,"data","zoomOnHover","width","height","overflow","realignOnResize"],[3,"clicked","data","zoomOnHover","width","height","overflow","realignOnResize"]],template:function(n,i){1&n&&(t.j41(0,"div",1,0),t.bIt("resized",function(c){return i.handleResize(c)}),t.nVh(2,G,1,6,"angular-tag-cloud",2),t.k0s()),2&n&&(t.xc7("display",i.data().length?"block":"none"),t.AVh("clickable",i.clickable()),t.R7$(2),t.vxM(i.data().length?2:-1))},dependencies:[E,W.C],styles:["[_nghost-%COMP%]{display:block;width:100%;height:100%;min-height:200px}.wordcloud-container[_ngcontent-%COMP%]{width:100%;height:100%} .wordcloud-container.clickable angular-tag-cloud span{cursor:pointer} .selected{text-decoration:underline}"],changeDetection:0})}return o})();var L=u(5971),V=u(5448),$=u(3319),k=u(4372),U=u(2611),Y=u(5661),Q=u(1096),N=u(5764),F=u(2245);function Z(o,g){if(1&o&&(l.qSk(),t.j41(0,"svg",0),t.nrm(1,"path",3)(2,"path",4),t.k0s()),2&o){const e=t.XpG();t.R7$(),t.BMQ("fill",e.colorDark()),t.R7$(),t.BMQ("fill",e.color())}}function K(o,g){if(1&o&&(l.qSk(),t.j41(0,"svg",1),t.nrm(1,"path",5)(2,"path",6)(3,"path",7),t.k0s()),2&o){const e=t.XpG();t.R7$(2),t.BMQ("fill",e.color())}}const D_blue="#175EBB",J={".dwg":D_blue,".dxf":D_blue,".doc":D_blue,".docx":D_blue,".ifc":"#9F388D",".pdf":"#E03833",".ppt":D_blue,".pptx":D_blue,".csv":"#0b7741",".xls":"#0b7741",".xlsx":"#0b7741",folder:"#9D9998"};let q=(()=>{class o{suffix=a.hFB.required();size=(0,a.hFB)("m");color=(0,h.EW)(()=>J[this.suffix()]??"#9D9998");label=(0,h.EW)(()=>this.suffix().startsWith(".")?this.suffix().toUpperCase().replace(/^\./,""):"");className=(0,h.EW)(()=>`size-${this.size()}`);colorDark=(0,h.EW)(()=>{const e=this.color(),n=parseInt(e.slice(1),16),s=n>>8&255,c=255&n;return`#${(Math.floor(.8*(n>>16&255))<<16|Math.floor(.8*s)<<8|Math.floor(.8*c)).toString(16).padStart(6,"0")}`});static \u0275fac=function(n){return new(n||o)};static \u0275cmp=t.VBU({type:o,selectors:[["cue-file-icon"]],hostVars:2,hostBindings:function(n,i){2&n&&t.HbH(i.className())},inputs:{suffix:[1,"suffix"],size:[1,"size"]},decls:4,vars:2,consts:[["xmlns","http://www.w3.org/2000/svg","width","100%","height","100%","viewBox","0 0 48 48"],["xmlns","http://www.w3.org/2000/svg","viewBox","0 0 24 30"],["size","xs","align","center","weight","semibold"],["d","M40 12H22l-4-4H8c-2.2 0-4 1.8-4 4v8h40v-4c0-2.2-1.8-4-4-4"],["d","M40 12H8c-2.2 0-4 1.8-4 4v20c0 2.2 1.8 4 4 4h32c2.2 0 4-1.8 4-4V16c0-2.2-1.8-4-4-4"],["fill","var(--cue-border-color)","d","M16.2.5H4.1C2.1.5.5 2.1.5 4.1v22.3c0 1.7 1.4 3.1 3.1 3.1h16.8c1.7 0 3.1-1.4 3.1-3.1V7.8h-.1c0-.1-7-7.1-7-7.1h-.1l-.1-.2Z"],["d","M4.1 1C2.4 1 1 2.4 1 4.1v22.3C1 27.8 2.2 29 3.6 29h16.8c1.4 0 2.6-1.2 2.6-2.6V8l-7-7H4.1Z"],["fill","#fff","d","M16 6c0 1.1.9 2 2 2h5l-7-7v5Z","opacity",".3"]],template:function(n,i){1&n&&(t.nVh(0,Z,3,2,":svg:svg",0)(1,K,4,1,":svg:svg",1),t.j41(2,"cue-typography",2),t.EFF(3),t.k0s()),2&n&&(t.vxM("folder"===i.suffix()?0:1),t.R7$(3),t.JRh(i.label()))},dependencies:[F.Typography],styles:["[_nghost-%COMP%]{display:block;position:relative;aspect-ratio:30 / 24;width:var(--cue-dim-elem-m)}.size-xs[_nghost-%COMP%]{width:var(--cue-dim-elem-xs)}.size-s[_nghost-%COMP%]{width:var(--cue-dim-elem-s)}[_nghost-%COMP%] svg[_ngcontent-%COMP%]{display:block;width:100%;height:auto}[_nghost-%COMP%] cue-typography[_ngcontent-%COMP%]{color:#fff;text-transform:uppercase;position:absolute;left:50%;bottom:24%;transform:translate(-50%)}"]})}return o})(),ee=(()=>{class o{suffix=(0,l.vPA)("");iconSize=(0,l.vPA)("xs");agInit(e){this._apply(e)}refresh(e){return this._apply(e),!0}_apply(e){this.suffix.set(e.value||"folder"),this.iconSize.set({xs:"xs",s:"xs",m:"xs",l:"s",xl:"m"}[e.colDef?.cellRendererParams?.iconSize??e.iconSize??"xs"]??"xs")}static \u0275fac=function(n){return new(n||o)};static \u0275cmp=t.VBU({type:o,selectors:[["cue-file-icon-cell-renderer"]],decls:1,vars:2,consts:[[3,"suffix","size"]],template:function(n,i){1&n&&t.nrm(0,"cue-file-icon",0),2&n&&t.Y8G("suffix",i.suffix())("size",i.iconSize())},dependencies:[q],styles:["[_nghost-%COMP%]{display:flex;align-items:center;justify-content:center;width:100%;height:100%}"],changeDetection:0})}return o})();var te=u(6117),ne=u(29),ie=u(1951),oe=u(1493),C=u(9352),se=u(5381),ae=u(9769),le=u(5187),ce=u(356),re=u(6279),de=u(7717),ue=u(7089);const he=(o,g)=>g.id;function ge(o,g){if(1&o){const e=t.RV6();t.j41(0,"li",9),t.bIt("click",function(){const i=l.eBV(e).$implicit,s=t.XpG(3);return l.Njj(s.handleSimpleRowClick(i))}),t.j41(1,"cue-typography",10),t.EFF(2),t.k0s(),t.j41(3,"cue-typography",11),t.EFF(4),t.k0s()()}if(2&o){const e=g.$implicit,n=t.XpG(3);t.AVh("active",n.selectedSimpleDocumentId()===e.id),t.R7$(),t.Y8G("noWrap",!0)("title",e.name),t.R7$(),t.SpI(" ",e.name," "),t.R7$(2),t.SpI(" ",(e.suffix||"").replace(".","").toUpperCase()," ")}}function me(o,g){if(1&o&&(t.j41(0,"ul",5),t.Z7z(1,ge,5,6,"li",8,he),t.k0s()),2&o){const e=t.XpG(2);t.R7$(),t.Dyx(e.simpleDocumentsInt())}}function pe(o,g){if(1&o&&(t.j41(0,"cue-flexcontainer",6)(1,"cue-typography",12),t.EFF(2),t.k0s()()),2&o){const e=t.XpG(2);t.R7$(2),t.SpI(" ",0===e.documentRefs().length&&0===e.documents().length&&e.handlers()?"No documents":e.infoLoading()," ")}}function fe(o,g){if(1&o){const e=t.RV6();t.j41(0,"cue-flexcontainer",7)(1,"cue-typography",13),t.EFF(2),t.k0s(),t.j41(3,"cue-flexcontainer",14)(4,"cue-button",15),t.bIt("click",function(){l.eBV(e);const i=t.XpG(2);return l.Njj(i.previousSimplePage())}),t.nrm(5,"cue-button-icon",16),t.k0s(),t.j41(6,"cue-button",15),t.bIt("click",function(){l.eBV(e);const i=t.XpG(2);return l.Njj(i.nextSimplePage())}),t.nrm(7,"cue-button-icon",17),t.k0s()()()}if(2&o){const e=t.XpG(2);t.R7$(2),t.E5c(" ",e.simpleDisplayStart(),"-",e.simpleDisplayEnd()," / ",e.documentsInt().length," "),t.R7$(2),t.Y8G("disabled",!e.simpleHasPreviousPage()),t.R7$(2),t.Y8G("disabled",!e.simpleHasNextPage())}}function ve(o,g){if(1&o&&(t.j41(0,"div",3),t.nVh(1,me,3,0,"ul",5)(2,pe,3,1,"cue-flexcontainer",6),t.nVh(3,fe,8,5,"cue-flexcontainer",7),t.k0s()),2&o){const e=t.XpG();t.R7$(),t.vxM(e.simpleDocumentsInt().length>0?1:2),t.R7$(2),t.vxM(e.documentsInt().length>0?3:-1)}}function _e(o,g){if(1&o&&t.nrm(0,"cue-svg-icon",34),2&o){const e=t.XpG().$implicit;t.Y8G("name",e.icon)}}function Ce(o,g){if(1&o){const e=t.RV6();t.j41(0,"cue-menu-item",33),t.bIt("click",function(){const i=l.eBV(e).$implicit;return l.Njj(null==i?null:i.action())}),t.nVh(1,_e,1,1,"cue-svg-icon",34),t.EFF(2),t.k0s()}if(2&o){const e=g.$implicit;t.R7$(),t.vxM(e.icon?1:-1),t.R7$(),t.SpI(" ",e.label)}}function De(o,g){if(1&o){const e=t.RV6();t.j41(0,"cue-flexcontainer",24)(1,"cue-menu",25)(2,"cue-button",26,2),t.nrm(4,"cue-button-icon",27),t.k0s(),t.j41(5,"cue-menu-wrap",28),t.Z7z(6,Ce,3,2,"cue-menu-item",null,t.Vm6),t.k0s()(),t.j41(8,"cue-button",29),t.nI1(9,"transloco"),t.bIt("click",function(){l.eBV(e);const i=t.XpG(2);return l.Njj(i.flipped.set(!0))}),t.nrm(10,"cue-button-icon",30),t.k0s()(),t.j41(11,"div",31)(12,"cue-ag-grid",32),t.bIt("gridApiReady",function(i){l.eBV(e);const s=t.XpG(2);return l.Njj(s.onGridReady(i))})("selectedRows",function(i){l.eBV(e);const s=t.XpG(2);return l.Njj(s.clickedDocument.emit(i[0]))}),t.k0s()()}if(2&o){const e=t.XpG(2);t.R7$(6),t.Dyx(e.tableMenu()),t.R7$(2),t.Y8G("cueTooltip",t.bMT(9,9,"components.documentList.tooltipColumnSettings")),t.R7$(4),t.AVh("hidden",e.tableHidden()),t.Y8G("paginationPageSize",e.pageSize())("rowSelection",e.rowSelection)("rowData",e.documentsInt())("columnDefs",e.columnDefs())("overlaySettings",e.overlaySettings())("overlayActions",e.overlayActions())}}function be(o,g){if(1&o){const e=t.RV6();t.j41(0,"cue-flexcontainer",41),t.bIt("click",function(){l.eBV(e);const i=t.XpG(3);return l.Njj(i.applyTagFilter())}),t.j41(1,"cue-button",42)(2,"cue-button-label"),t.EFF(3,"Apply"),t.k0s()()()}}function xe(o,g){if(1&o){const e=t.RV6();t.j41(0,"cue-flexcontainer",24)(1,"cue-button",35),t.bIt("click",function(){l.eBV(e);const i=t.XpG(2);return l.Njj(i.showFront())}),t.nrm(2,"cue-button-icon",36),t.k0s()(),t.j41(3,"cue-flexcontainer",37)(4,"cue-word-cloud",38),t.bIt("selectionChanged",function(i){l.eBV(e);const s=t.XpG(2);return l.Njj(s.tagSelection.set(i))}),t.k0s(),t.nVh(5,be,4,0,"cue-flexcontainer",39),t.k0s(),t.j41(6,"cue-ag-grid-column-select",40),t.mxI("columnDefsChange",function(i){l.eBV(e);const s=t.XpG(2);return t.DH7(s.columnDefs,i)||(s.columnDefs=i),l.Njj(i)}),t.k0s()}if(2&o){const e=t.XpG(2);t.R7$(3),t.AVh("hidden",!e.showTagFilterCloud()),t.R7$(),t.Y8G("words",e.tags())("clickable",!0)("overflow",!0)("multiSelect",!0)("highlightSelection",!0),t.R7$(),t.vxM(e.filterToBeApplied()?5:-1),t.R7$(),t.AVh("hidden",e.showTagFilterCloud()),t.Y8G("settings",e.columnSelectSettings),t.R50("columnDefs",e.columnDefs),t.Y8G("columnDefsGross",e.columnDefsGross())}}function we(o,g){if(1&o&&(t.j41(0,"cue-card",20),t.eu8(1,43),t.k0s()),2&o){t.XpG();const e=t.sdS(3),n=t.XpG();t.Y8G("variant",n._cardVariant()),t.R7$(),t.Y8G("ngTemplateOutlet",e)}}function Me(o,g){if(1&o&&(t.j41(0,"div",21),t.eu8(1,43),t.k0s()),2&o){t.XpG();const e=t.sdS(3);t.R7$(),t.Y8G("ngTemplateOutlet",e)}}function ye(o,g){if(1&o&&(t.j41(0,"cue-card",22),t.eu8(1,43),t.k0s()),2&o){t.XpG();const e=t.sdS(5),n=t.XpG();t.Y8G("variant",n._cardVariant()),t.R7$(),t.Y8G("ngTemplateOutlet",e)}}function Se(o,g){if(1&o&&(t.j41(0,"div",23),t.eu8(1,43),t.k0s()),2&o){t.XpG();const e=t.sdS(5);t.R7$(),t.Y8G("ngTemplateOutlet",e)}}function Ie(o,g){if(1&o){const e=t.RV6();t.j41(0,"div",18),t.mxI("cueFlipChange",function(i){l.eBV(e);const s=t.XpG();return t.DH7(s.flipped,i)||(s.flipped=i),l.Njj(i)}),t.j41(1,"div",19),t.DNE(2,De,13,11,"ng-template",null,0,t.C5r)(4,xe,7,13,"ng-template",null,1,t.C5r),t.nVh(6,we,2,2,"cue-card",20)(7,Me,2,1,"div",21),t.nVh(8,ye,2,2,"cue-card",22)(9,Se,2,1,"div",23),t.k0s()()}if(2&o){const e=t.XpG();t.R50("cueFlip",e.flipped),t.R7$(6),t.vxM("none"!==e.variant()?6:7),t.R7$(2),t.vxM("none"!==e.variant()?8:9)}}let Oe=(()=>{class o{documents=(0,a.hFB)([]);availableContentCategories=(0,a.hFB)(void 0);detailedView=(0,a.hFB)(!1);simple=(0,a.hFB)(!1);pageSize=(0,a.hFB)(10);prefetchPages=(0,a.hFB)(3);privileges=(0,a.hFB)();showOpenInDocumentViewerAction=(0,a.hFB)(!0);showOpenInFileManagerAction=(0,a.hFB)(!0);customOverlayActions=(0,a.hFB)([]);variant=(0,a.hFB)("default");_cardVariant=(0,h.EW)(()=>this.variant());documentRefs=(0,a.hFB)([]);handlers=(0,a.hFB)(void 0);documentData=(0,a.hFB)({});clickedDocument=(0,a.CGW)();clickedDownloadDocument=(0,a.CGW)();clickedOpenInDir=(0,a.CGW)();clickedOpen=(0,a.CGW)();flipped=(0,l.vPA)(!1);simplePageIndex=(0,l.vPA)(0);selectedSimpleDocumentId=(0,l.vPA)(null);_simpleBufferedUntilIndex=(0,l.vPA)(0);_tableBufferedUntilIndex=(0,l.vPA)(0);_lastDocumentRefsKey="";_gridApi=null;_requestedIds=new Set;_isSorted=!1;_viewportCheckTimerId=null;_lazyMode=(0,h.EW)(()=>this.documentRefs().length>0);_leafContentCategoryIris=(0,h.EW)(()=>{const e=this.availableContentCategories();if(!e)return null;const n=new Set(e.map(i=>i.parent).filter(i=>!!i));return new Set(e.filter(i=>!n.has(i.iri)).map(i=>i.iri))});labelDownload=(0,C.Xx)("components.documentList.labelDownload");labelName=(0,C.Xx)("components.documentList.labelName");labelOpenInFileManager=(0,C.Xx)("components.documentList.labelOpenInFileManager");labelOpenInDocumentViewer=(0,C.Xx)("components.documentList.labelOpenInDocumentViewer");labelSubject=(0,C.Xx)("components.documentList.labelSubject");labelSummary=(0,C.Xx)("components.documentList.labelSummary");labelPages=(0,C.Xx)("components.documentList.labelPages");labelSize=(0,C.Xx)("components.documentList.labelSize");labelCategories=(0,C.Xx)("components.documentList.labelCategories");labelType=(0,C.Xx)("components.documentList.labelType");buttonShowCloudFilter=(0,C.Xx)("components.documentList.buttonShowCloudFilter");buttonHideCloudFilter=(0,C.Xx)("components.documentList.buttonHideCloudFilter");buttonDownloadCSV=(0,C.Xx)("components.documentList.buttonDownloadCSV");infoLoading=(0,C.Xx)("components.documentList.infoLoading");overlaySettings=(0,h.EW)(()=>({...new ie.K,mode:"row",buttonVariant:"accent"===this.variant()?"primary":"accent"}));overlayActions=(0,h.EW)(()=>{const e=[{label:this.labelDownload(),icon:"download",action:n=>{this.handlers()?.requestDownload?.(n.rowData),this.clickedDownloadDocument.emit(n.rowData)}}];return this.showOpenInDocumentViewerAction()&&e.push({label:this.labelOpenInDocumentViewer(),icon:"document",action:n=>{const i=n.rowData.contentIRI.split("/").pop()??n.rowData.contentIRI;this.handlers()?.requestOpen?.(i,n.rowData),this.clickedOpen.emit(n.rowData)}}),this.showOpenInFileManagerAction()&&e.push({label:this.labelOpenInFileManager(),icon:"folder",action:n=>{const i=n.rowData.contentIRI.split("/").pop()??n.rowData.contentIRI;this.handlers()?.requestOpenInDir?.(i,n.rowData),this.clickedOpenInDir.emit(n.rowData)}}),[...e,...this.customOverlayActions()||[]]});documentsInt=(0,h.EW)(()=>{let e;if(this._lazyMode()){const n=this.documentRefs(),i=this.documentData()||{};e=n.map(s=>{const c=i[s.id];return c?{...c,pages:s.pages??c.pages,...void 0!==s.sources?{sources:s.sources}:{},...void 0!==s.relevance?{relevance:s.relevance}:{},name:(0,k.M)(c.path),loading:!1}:{id:s.id,path:s.id,suffix:"",size:0,contentIRI:s.id,tags:[],summary:"",categories:[],relevance:s.relevance??0,pages:s.pages,sources:s.sources,name:this.infoLoading(),loading:!0}})}else e=(this.documents()||[]).map(n=>({...n,name:(0,k.M)(n.path),loading:!1}));return this.tagFilter().length?e.filter(n=>n.tags?.some(i=>this.tagFilter().some(s=>s.toLowerCase()===i.toLowerCase()))):e});simplePageCount=(0,h.EW)(()=>Math.max(1,Math.ceil(this.documentsInt().length/Math.max(1,this.pageSize()))));simpleStartIndex=(0,h.EW)(()=>this.simplePageIndex()*Math.max(1,this.pageSize()));simpleEndIndex=(0,h.EW)(()=>this.simpleStartIndex()+Math.max(1,this.pageSize()));simpleDocumentsInt=(0,h.EW)(()=>this.documentsInt().slice(this.simpleStartIndex(),this.simpleEndIndex()));simpleHasPreviousPage=(0,h.EW)(()=>this.simplePageIndex()>0);simpleHasNextPage=(0,h.EW)(()=>this.simplePageIndex()<this.simplePageCount()-1);simpleDisplayStart=(0,h.EW)(()=>this.documentsInt().length?this.simpleStartIndex()+1:0);simpleDisplayEnd=(0,h.EW)(()=>Math.min(this.simpleEndIndex(),this.documentsInt().length));tags=(0,h.EW)(()=>{const e=this.documentsInt(),n=[];return e.forEach(i=>{i.tags?.forEach(s=>n.push(s))}),n});showPageColumn=(0,h.EW)(()=>this.documentsInt().some(e=>void 0!==e.pages));hasSubjects=(0,h.EW)(()=>this.documentsInt().some(e=>void 0!==e.subject&&""!==e.subject));columnSelectSettings=new Q.e;columnDefs=(0,l.vPA)([]);columnDefsGross=(0,l.vPA)([]);tagSelection=(0,l.vPA)([]);tagFilter=(0,l.vPA)([]);showTagFilterCloud=(0,l.vPA)(!1);filterToBeApplied=(0,h.EW)(()=>{const e=this.tagSelection(),n=this.tagFilter();return JSON.stringify(e.sort())!==JSON.stringify(n.sort())});tableMenu=(0,h.EW)(()=>{const e=[];return this.showTagFilterCloud()?e.push({icon:"cloud-funnel",label:this.buttonHideCloudFilter(),variant:"accent",action:()=>{this.flipped.set(!1),this.showTagFilterCloud.set(!1)}}):e.push({icon:"cloud-funnel",label:this.buttonShowCloudFilter(),variant:"accent",action:()=>{this.flipped.set(!0),this.showTagFilterCloud.set(!0)}}),e.push({icon:"download",label:this.buttonDownloadCSV(),action:()=>function R(o,g,e="table.csv"){const n=function T(o,g){const e=function S(o,g){return o.map(e=>{const n={};return"id"in e&&(n.id=e.id),"key"in e&&(n.key=e.key),g.forEach(i=>{let s;"function"==typeof i.valueGetter?s=i.valueGetter({data:e,colDef:i,getValue:d=>e[d],node:void 0,column:void 0,api:void 0,context:void 0}):i.field&&(s=e[i.field]),"function"==typeof i.valueFormatter&&(s=i.valueFormatter({value:s,data:e,colDef:i,node:void 0,column:void 0,api:void 0,context:void 0}));const c=i.headerName||i.colId||i.field;void 0!==c&&(n[c]=s)}),n})}(o,g);if(0===e.length)return"";const n=e.some(c=>"id"in c),i=[];n&&i.push("id"),g.forEach(c=>{const d=c.headerName||c.colId||c.field;d&&"id"!==d&&!i.includes(d)&&i.push(d)});const s=e.map(c=>{const d={};return i.forEach(m=>{d[m]=c[m]}),d});return M().unparse(s,{columns:i})}(o,g);(0,w.YN)(n,e,"text/csv")}(this.documentsInt(),this.columnDefs())}),e});hideCloud(){this.flipped.set(!0),this.showTagFilterCloud.set(!0)}tableHidden=(0,h.EW)(()=>this.showTagFilterCloud()||this.flipped());rowSelection={mode:"singleRow",checkboxes:!1,enableClickSelection:!0};whenTableDataKnown=(0,l.QZP)(()=>{this.simple()||this._buildInitialColumnDefs(this.detailedView())});whenSimpleDataChanges=(0,l.QZP)(()=>{const e=this.documentsInt().length,n=Math.max(1,this.pageSize()),i=Math.max(0,Math.ceil(e/n)-1);this.simplePageIndex()>i&&this.simplePageIndex.set(i)});whenRefsChange=(0,l.QZP)(()=>{const n=this.documentRefs().map(i=>i.id).join("|");n!==this._lastDocumentRefsKey&&(this._lastDocumentRefsKey=n,this._requestedIds.clear(),this._simpleBufferedUntilIndex.set(0),this._tableBufferedUntilIndex.set(0),this.simplePageIndex.set(0))});whenSimpleLazyDataNeeded=(0,l.QZP)(()=>{if(!this.simple()||!this._lazyMode()||!this.handlers())return;const e=this.documentRefs();if(!e.length)return;const n=Math.max(1,this.pageSize()),s=n*Math.max(1,this.prefetchPages()),c=e.length,d=this.simpleStartIndex(),m=Math.min(c,d+n),r=this._simpleBufferedUntilIndex();let p=null;if(0===r?p=0:(d>=Math.max(0,r-n)||m>r)&&(p=r),null===p||p>=c)return;const _=Math.min(c,p+s),v=e.slice(p,_).map(f=>f.id).filter(f=>!this._requestedIds.has(f));this._simpleBufferedUntilIndex.set(Math.max(r,_)),v.length&&(v.forEach(f=>this._requestedIds.add(f)),setTimeout(()=>this.handlers()?.requestData(v)))});previousSimplePage(){this.simpleHasPreviousPage()&&this.simplePageIndex.update(e=>Math.max(0,e-1))}nextSimplePage(){this.simpleHasNextPage()&&this.simplePageIndex.update(e=>Math.min(this.simplePageCount()-1,e+1))}handleSimpleRowClick(e){this.selectedSimpleDocumentId.set(e.id),this.handleRowClick(e)}handleRowClick(e){var n=this;return(0,x.A)(function*(){n.clickedDocument.emit(e),window.cueDetachCellOverlay&&window.cueDetachCellOverlay(),n.overlayVisible&&"function"==typeof n.overlayVisible.set&&n.overlayVisible.set(!1)})()}showFront(){this.flipped.set(!1),this.showTagFilterCloud.set(!1)}applyTagFilter(){this.tagFilter.set(this.tagSelection()),this.flipped.set(!1),this.showTagFilterCloud.set(!1)}ngOnDestroy(){null!==this._viewportCheckTimerId&&(clearTimeout(this._viewportCheckTimerId),this._viewportCheckTimerId=null),this._gridApi=null}onGridReady(e){this._gridApi=e,e.addEventListener("viewportChanged",()=>this._checkViewport()),e.addEventListener("modelUpdated",()=>this._checkViewport()),e.addEventListener("paginationChanged",()=>this._checkViewport()),e.addEventListener("sortChanged",()=>{const n=e.getColumnState();this._isSorted=n.some(i=>null!=i.sort),this._isSorted&&this._requestAllUnloaded()}),this._viewportCheckTimerId=setTimeout(()=>{this._viewportCheckTimerId=null,this._checkViewport()},100)}_checkViewport(){if(!this._gridApi||this._gridApi.isDestroyed()||!this._lazyMode())return;if(this._isSorted)return void this._requestAllUnloaded();const e=this.documentRefs(),n=e.length;if(!n)return;const i=Math.max(1,this._gridApi.paginationGetPageSize?.()??10),c=Math.max(0,this._gridApi.paginationGetCurrentPage?.()??0)*i,d=Math.min(n,c+i),m=this._tableBufferedUntilIndex();let r=null;if(0===m?r=0:(c>=Math.max(0,m-i)||d>m)&&(r=m),null===r||r>=n)return;const p=i*Math.max(1,this.prefetchPages()),_=Math.min(n,r+p),v=e.slice(r,_).map(f=>f.id).filter(f=>!this._requestedIds.has(f));this._tableBufferedUntilIndex.set(Math.max(m,_)),v.length&&(v.forEach(f=>this._requestedIds.add(f)),setTimeout(()=>this.handlers()?.requestData(v)))}_requestAllUnloaded(){if(!this._gridApi||this._gridApi.isDestroyed()||!this._lazyMode())return;const e=[];if(this._gridApi.forEachNode(n=>{const i=n.data;i?.loading&&!this._requestedIds.has(i.contentIRI)&&e.push(i.contentIRI)}),e.length>0){const n=Array.from(new Set(e));n.forEach(i=>this._requestedIds.add(i)),setTimeout(()=>this.handlers()?.requestData(n))}}_buildInitialColumnDefs(e){const n=[],i=[];n.push({field:"name",headerName:this.labelName(),width:e?250:120,filter:!0,valueGetter:m=>!m.data?.name&&m.data?.loading?"Loading...":m.data?.name||m.data?.contentIRI}),this.hasSubjects()&&n.push({field:"subject",headerName:this.labelSubject(),flex:1,filter:!0,cellRenderer:N.l,cellRendererParams:{lineHeight:"1.8"},autoHeight:!0});const s={field:"summary",headerName:this.labelSummary(),flex:1,filter:!0,cellRenderer:N.l,cellRendererParams:{lineHeight:"1.8"},autoHeight:!0};this.detailedView()||(s.tooltipField="summary"),e?n.push(s):i.push(s),this.showPageColumn()&&n.push({field:"pages",headerName:this.labelPages(),width:100,filter:!0,valueGetter:m=>Array.isArray(m.data?.pages)?m.data.pages.map(r=>r.page).join(", "):""});const c={field:"size",headerName:this.labelSize(),width:100,filter:!0,valueGetter:m=>(0,oe.b)(m.data?.size||0)};e?n.push(c):i.push(c);const d={field:"categories",headerName:this.labelCategories(),width:120,filter:!0,valueGetter:m=>{const r=m.data?.categories||[],p=this._leafContentCategoryIris(),_=p?r.filter(f=>p.has(f)):r,v=_.slice(0,3).map(f=>this._getContentCategoryLabel(f)).join(", ");return _.length>3?`${v}...`:v}};e?n.push(d):i.push(d),n.push({field:"suffix",headerName:this.labelType(),width:80,filter:!0,headerClass:"header-align-right",cellStyle:{display:"flex",justifyContent:"flex-end"},cellRenderer:ee}),this.columnDefs.update(()=>[...n]),this.columnDefsGross.update(()=>[...n,...i])}_getContentCategoryLabel(e){const n=this.availableContentCategories();if(void 0!==n){const i=n.find(s=>s.iri===e);if(i)return i.label;console.warn(`No label found for content category IRI: ${e}`)}else console.warn("No availableContentCategories provided to DocumentList component");return(o=>{const g=o.split("#").pop()??o,e={AgreementDocument:"Agreement",ArchitecturalDesignDocument:"Architectural Design",AsBuiltDocument:"As-Built",BudgetEstimateDocument:"Budget Estimate",CertificationDocument:"Certification",ComplianceDocument:"Compliance",CorrespondenceDocument:"Correspondence",ConstructionContract:"Construction Contract",ConstructionProcessDocument:"Construction Process",ContractCondition:"Contract Condition",ContractRole:"Contract Role",ContractualDocument:"Contract",CostControlDocument:"Cost Control",DesignDocument:"Design Document",EmailAddress:"Email Address",EngineeringDesignDocument:"Engineering Design",FinancialAdministrativeDocument:"Financial/Administrative",FunctionalRequirementsDocument:"Functional Requirements",InspectionDocument:"Inspection",InsuranceBondDocument:"Insurance/Bond",InteriorDesignDocument:"Interior Design",MarketingCloseoutDocument:"Marketing Closeout",MiscDocument:"Miscellaneous",OperationManual:"Operation Manual",OperationsMaintenanceDocument:"Operations & Maintenance",OperationsManualDocument:"Operations Manual",OtherDocument:"Other",OtherContent:"Other Content",ProgressStatusReport:"Progress Status Report",QualityAssuranceDocument:"Quality Assurance",QualityControlDocument:"Quality Control",RegulatoryComplianceDocument:"Regulatory Compliance",SafetyDocument:"Safety",ScheduleDocument:"Schedule",SiteAssessmentDocument:"Site Assessment",TechnicalRequirementsDocument:"Technical Requirements",TechnicalSpecificationDocument:"Technical Specification",TenderingDocument:"Tendering Document",TermsAndConditionsDocument:"Terms & Conditions"};return void 0===e[g]&&console.log(`No pretty label for category: ${g}`),e[g]??g})(e)}static \u0275fac=function(n){return new(n||o)};static \u0275cmp=t.VBU({type:o,selectors:[["cue-doc-list"]],inputs:{documents:[1,"documents"],availableContentCategories:[1,"availableContentCategories"],detailedView:[1,"detailedView"],simple:[1,"simple"],pageSize:[1,"pageSize"],prefetchPages:[1,"prefetchPages"],privileges:[1,"privileges"],showOpenInDocumentViewerAction:[1,"showOpenInDocumentViewerAction"],showOpenInFileManagerAction:[1,"showOpenInFileManagerAction"],customOverlayActions:[1,"customOverlayActions"],variant:[1,"variant"],documentRefs:[1,"documentRefs"],handlers:[1,"handlers"],documentData:[1,"documentData"]},outputs:{clickedDocument:"clickedDocument",clickedDownloadDocument:"clickedDownloadDocument",clickedOpenInDir:"clickedOpenInDir",clickedOpen:"clickedOpen"},decls:2,vars:1,consts:[["frontContent",""],["backContent",""],["trigger",""],[1,"simple-container",2,"width","100%","height","auto"],[1,"flip-card",2,"width","100%","height","auto","overflow","hidden",3,"cueFlip"],[1,"simple-list"],["justify","center",1,"simple-empty"],["direction","row","justify","space-between","align","center",2,"padding","4px 8px"],[1,"simple-item",3,"active"],[1,"simple-item",3,"click"],["size","s",1,"simple-item-name",3,"noWrap","title"],["size","xs",1,"simple-item-meta"],["size","s"],["size","xs"],["direction","row","gap","s"],["size","xs","variant","tertiary",3,"click","disabled"],["icon","paginator-back"],["icon","paginator-next"],[1,"flip-card",2,"width","100%","height","auto","overflow","hidden",3,"cueFlipChange","cueFlip"],[1,"flip-content"],[1,"card-face","front",2,"width","100%","height","auto",3,"variant"],[1,"card-face","front",2,"width","100%","height","auto"],[1,"card-face","back",2,"width","100%","height","auto",3,"variant"],[1,"card-face","back",2,"width","100%","height","auto"],["direction","row","justify","end",2,"padding","2px"],["positioning","bottomleft"],["trigger","","variant","tertiary","size","s"],["icon","more-vert"],["menu",""],["variant","accent","size","s",3,"click","cueTooltip"],["icon","settings"],[2,"position","relative"],[3,"gridApiReady","selectedRows","paginationPageSize","rowSelection","rowData","columnDefs","overlaySettings","overlayActions"],[3,"click"],["before","",3,"name"],["variant","accent","size","s","cueTooltip","Back to table",3,"click"],["icon","arrow-back"],["justify","center",2,"height","350px"],[2,"height","100%","width","100%",3,"selectionChanged","words","clickable","overflow","multiSelect","highlightSelection"],["justify","center",1,"word-cloud-actions"],[3,"columnDefsChange","settings","columnDefs","columnDefsGross"],["justify","center",1,"word-cloud-actions",3,"click"],["variant","primary"],[3,"ngTemplateOutlet"]],template:function(n,i){1&n&&t.nVh(0,ve,4,2,"div",3)(1,Ie,10,3,"div",4),2&n&&t.vxM(i.simple()?0:1)},dependencies:[se.n,j,L.$,V.L,de.R,le.Z,ae.T3,$.a,U.R,Y.pL,ce.M,re.D,te.W,ne.A,ue.d,F.Typography,C.Kj],styles:[".hidden[_ngcontent-%COMP%]{display:none}.word-cloud-actions[_ngcontent-%COMP%]{position:absolute;z-index:10;right:0;left:0;bottom:10px;pointer-events:none}.word-cloud-actions[_ngcontent-%COMP%] cue-button[_ngcontent-%COMP%]{pointer-events:auto}.simple-container[_ngcontent-%COMP%]{width:100%}.simple-list[_ngcontent-%COMP%]{list-style:none;margin:0;padding:4px;max-height:420px;overflow-y:auto}.simple-item[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2px;padding:9px 10px;border-radius:6px;cursor:pointer;transition:background .1s}.simple-item[_ngcontent-%COMP%]:hover{background:var(--cue-color-ultralightgray)}.simple-item.active[_ngcontent-%COMP%]{background:var(--cue-color-lightgray)}.simple-item-name[_ngcontent-%COMP%]{font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.simple-item-meta[_ngcontent-%COMP%]{font-size:11px;color:var(--cue-color-midgray)}.simple-empty[_ngcontent-%COMP%]{padding:12px}"],changeDetection:0})}return o})()},4372(z,b,u){u.d(b,{M:()=>x});const x=a=>{const h=a.split("/");return h[h.length-1]}},1493(z,b,u){function x(a,h=!1,l=1){const w=h?1e3:1024;if(Math.abs(a)<w)return a+" B";const y=h?["kB","MB","GB","TB","PB","EB","ZB","YB"]:["KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"];let M=-1;const S=10**l;do{a/=w,++M}while(Math.round(Math.abs(a)*S)/S>=w&&M<y.length-1);return a.toFixed(l)+" "+y[M]}u.d(b,{b:()=>x})}}]);
1
+ "use strict";(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[879],{4879(z,b,u){u.d(b,{g:()=>Oe});var x=u(467),a=u(7705),h=u(2271),l=u(5802),w=u(2065),y=u(7284),M=u.n(y);var t=u(5547);let E=(()=>{class o{get calculatedWidth(){let e=this.localConfig().width||this.width()||1;return this.el.nativeElement.parentNode.offsetWidth>0&&e<=1&&e>0&&(e*=this.el.nativeElement.parentNode.offsetWidth),e}get calculatedHeight(){let e=this.localConfig().height||this.height()||400;return this.el.nativeElement.parentNode.offsetHeight>0&&e<=1&&e>0&&(e*=this.el.nativeElement.parentNode.offsetHeight),e}onResize(e){this.logMessage("debug","rezisze triggered"),window.clearTimeout(this.timeoutId),this.timeoutId=window.setTimeout(()=>{this.options.realignOnResize&&this.reDraw()},200)}constructor(){this.data=(0,a.hFB)([]),this.width=(0,a.hFB)(),this.height=(0,a.hFB)(),this.step=(0,a.hFB)(),this.overflow=(0,a.hFB)(),this.strict=(0,a.hFB)(),this.zoomOnHover=(0,a.hFB)(),this.realignOnResize=(0,a.hFB)(),this.randomizeAngle=(0,a.hFB)(),this.background=(0,a.hFB)(),this.font=(0,a.hFB)(),this.delay=(0,a.hFB)(),this.config=(0,a.hFB)({}),this.log=(0,a.hFB)(),this.clicked=(0,a.CGW)(),this.afterInit=(0,a.CGW)(),this.afterChecked=(0,a.CGW)(),this.localConfig=(0,h.EW)(()=>{const n=this.config();return{...n,width:this.width()||n.width||500,height:this.height()||n.height||300,overflow:this.overflow()??(n.overflow||!0),strict:this.strict()??(n.strict||!1),zoomOnHover:this.zoomOnHover()||n.zoomOnHover||{transitionTime:0,scale:1,delay:0},realignOnResize:this.realignOnResize()??(n.realignOnResize||!1),randomizeAngle:this.randomizeAngle()??(n.randomizeAngle||!1),step:this.step()||n.step||2,log:this.log()||n.log||!1,delay:this.delay()||n.delay,background:this.background()||n.background,font:this.font()||n.font}}),this.cloudDataHtmlElements=[],this.dataArr=[],this.el=(0,l.WQX)(t.aKT),this.r2=(0,l.WQX)(t.sFG);const e=this.el.nativeElement;(0,l.QZP)(()=>{const n=this.localConfig();this.logMessage("warn","cloud configuration",n),n.font&&this.r2.setStyle(e,"font",n.font),n.background&&this.r2.setStyle(e,"background",n.background),this.reDraw()})}reDraw(){this.afterChecked?.emit(),this.logMessage("debug","dataChanges emitted"),this.cloudDataHtmlElements=[],this.data()?(this.el.nativeElement.innerHTML="",this.data()&&(this.dataArr=this.data()),this.options={...this.localConfig(),aspectRatio:this.calculatedWidth/this.calculatedHeight,width:this.calculatedWidth,height:this.calculatedHeight,center:{x:this.calculatedWidth/2,y:this.calculatedHeight/2}},this.r2.setStyle(this.el.nativeElement,"width",this.options.width+"px"),this.r2.setStyle(this.el.nativeElement,"height",this.options.height+"px"),this.drawWordCloud(),this.logMessage("debug","reDraw finished")):console.error("angular-tag-cloud: No data passed. Please pass an Array of CloudData")}descriptiveEntry(e){let n=e.text;return n+=e.color?`-${e.color}`:"",n+=e.external?`-${e.external}`:"",n+=e.link?`-${e.link}`:"",n+=e.rotate?`-${e.rotate}`:"",n}drawWordCloud(){this.dataArr.sort((i,s)=>this.descriptiveEntry(i).localeCompare(this.descriptiveEntry(s))),this.dataArr.sort((i,s)=>s.weight-i.weight);const e=this.dataArr.filter(i=>i.position),n=this.dataArr.filter(i=>!i.position);e.forEach((i,s)=>{this.drawWord(s,i)}),n.forEach((i,s)=>{this.drawWord(s,i)})}hitTest(e){for(const n of this.cloudDataHtmlElements)if(this.overlapping(e,n))return!0;return!1}overlapping(e,n){const{offsetLeft:i,offsetTop:s,offsetWidth:c,offsetHeight:d}=n;return!(e.right<i||e.left>i+c||e.bottom<s||e.top>s+d)}getWeightForWord(e){let n=5;return this.dataArr[0].weight>this.dataArr[this.dataArr.length-1].weight&&(this.options.strict?e.weight>10?(n=10,this.logMessage("warn",`[TagCloud strict] Weight property ${e.weight} > 10. Fallback to 10 as you are using strict mode`,e)):e.weight<1?(n=1,this.logMessage("warn",`[TagCloud strict] Given weight property ${e.weight} < 1. Fallback to 1 as you are using strict mode`,e)):e.weight%1!=0?(n=Math.round(e.weight),this.logMessage("warn",`[TagCloud strict] Given weight property ${e.weight} is not an integer. Rounded value to ${n}`,e)):n=e.weight:n=Math.round((e.weight-this.dataArr[this.dataArr.length-1].weight)/(this.dataArr[0].weight-this.dataArr[this.dataArr.length-1].weight)*9)+1),n}setWordColor(e,n){this.r2.setStyle(e,"color",n)}setTooltip(e,n){this.r2.addClass(e,"tooltip");const i=this.r2.createElement("span");i.className="tooltiptext";const s=this.r2.createText(n);i.appendChild(s),e.appendChild(i)}setWordRotation(e,n){const i=n?`rotate(${n}deg)`:"";return this.r2.setStyle(e,"transform",i),i}wrapNodeIntoAnchorElement(e,n){const i=this.r2.createElement("a");return i.href=n.link||"",void 0!==n.external&&n.external&&(i.target="_blank"),i.appendChild(e),i}applyZoomStyle(e,n,i,s){this.options.zoomOnHover&&1!==this.options.zoomOnHover.scale&&(this.options.zoomOnHover.transitionTime||(this.options.zoomOnHover.transitionTime=0),this.options.zoomOnHover.scale||(this.options.zoomOnHover.scale=1),n.onmouseover=()=>{this.options.zoomOnHover?.transitionTime&&this.r2.setStyle(n,"transition",`transform ${this.options.zoomOnHover.transitionTime}s`),this.options.zoomOnHover?.scale&&this.r2.setStyle(n,"transform",`scale(${this.options.zoomOnHover.scale}) ${s}`),this.options.zoomOnHover?.delay&&this.r2.setStyle(n,"transition-delay",`${this.options.zoomOnHover.delay}s`),this.options.zoomOnHover?.color&&this.r2.setStyle(i?e:n,"color",this.options.zoomOnHover.color)},n.onmouseout=()=>{this.r2.setStyle(n,"transform",`none ${s}`),this.options.zoomOnHover?.color&&this.r2.removeStyle(i?e:n,"color")})}setPosition(e,n,i){let s=this.options.randomizeAngle?6.28*Math.random():0,c=0;const d=e.style;d.position="absolute";const m=!!(n.position&&n.position.left&&n.position.top),r=e.offsetWidth,p=e.offsetHeight;let _=m&&n.position?.left?n.position.left:this.options.center.x-r/2,v=m&&n.position?.top?n.position.top:this.options.center.y-p/2;if(d.left=_+"px",d.top=v+"px",this.options.delay&&(e.classList.add("tag-animation-delay"),d.setProperty("--tag-animation-delay",this.options.delay*i+"ms")),!m)if(0===i)d.left=_+2*(Math.random()-.5)*(this.calculatedWidth/5)+"px",d.top=v+2*(Math.random()-.5)*(this.calculatedHeight/5)+"30px";else{for(;this.options.width&&this.options.height&&e.offsetHeight&&e.offsetWidth&&this.hitTest(new DOMRect(_,v,e.offsetWidth,e.offsetHeight));)c+=this.options.step||1,s+=(i%2==0?1:-1)*(this.options.step||1),_=this.options.center.x-r/2+c*Math.cos(s)*this.options.aspectRatio,v=this.options.center.y+c*Math.sin(s)-p/2;d.left=_+"px",d.top=v+"px"}if(!this.options.overflow&&(_<0||v<0||_+r>this.calculatedWidth||v+p>this.calculatedHeight))return this.logMessage("warn","Word did not fit into the cloud and overflow is set to 'false'. The element will be removed",e),void e.remove()}drawWord(e,n){let i;const s=this.getWeightForWord(n);i=this.r2.createElement("span"),i.className=`w${s}`,i.onclick=()=>{this.clicked?.emit(n)},i.onmouseenter=()=>{i.style.zIndex="2"},i.onmouseleave=()=>{i.style.zIndex="1"};let c=this.r2.createText(n.text);n.color&&this.setWordColor(i,n.color);const d=this.setWordRotation(i,n.rotate);n.link&&(c=this.wrapNodeIntoAnchorElement(c,n)),this.options.zoomOnHover&&1!==this.options.zoomOnHover.scale&&this.applyZoomStyle(c,i,n.link,d),i.appendChild(c),this.r2.appendChild(this.el.nativeElement,i),n.tooltip&&this.setTooltip(i,n.tooltip),i.id=`angular-tag-cloud-item-${e}`,this.setPosition(i,n,e),this.logMessage("debug","Adds new word <span>",i),this.cloudDataHtmlElements.push(i),this.logMessage("debug","Placed words",this.cloudDataHtmlElements)}logMessage(e,...n){this.localConfig()&&("debug"===this.localConfig().log?console.log(`[AngularTagCloudModule ${e}]`,...n):"warn"===this.localConfig().log&&"warn"===e&&console.warn(`[AngularTagCloudModule ${e}]`,...n))}static{this.\u0275fac=function(n){return new(n||o)}}static{this.\u0275cmp=t.VBU({type:o,selectors:[["angular-tag-cloud"],["ng-tag-cloud"],["ngtc"]],hostBindings:function(n,i){1&n&&t.bIt("resize",function(c){return i.onResize(c)},t.tSv)},inputs:{data:[1,"data"],width:[1,"width"],height:[1,"height"],step:[1,"step"],overflow:[1,"overflow"],strict:[1,"strict"],zoomOnHover:[1,"zoomOnHover"],realignOnResize:[1,"realignOnResize"],randomizeAngle:[1,"randomizeAngle"],background:[1,"background"],font:[1,"font"],delay:[1,"delay"],config:[1,"config"],log:[1,"log"]},outputs:{clicked:"clicked",afterInit:"afterInit",afterChecked:"afterChecked"},decls:0,vars:0,template:function(n,i){},styles:['[_nghost-%COMP%]{font-family:Helvetica,Arial,sans-serif;font-size:10px;line-height:normal;color:#09f;overflow:hidden;position:relative;display:block}.tag-animation-delay[_ngcontent-%COMP%]{--tag-animation-delay: .5s;animation:_ngcontent-%COMP%_fadeIn .5s;opacity:0;animation-fill-mode:forwards;animation-delay:var(--tag-animation-delay)}span[_ngcontent-%COMP%]{padding:0}span.w10[_ngcontent-%COMP%]{font-size:550%}span.w9[_ngcontent-%COMP%]{font-size:500%}span.w8[_ngcontent-%COMP%]{font-size:450%}span.w7[_ngcontent-%COMP%]{font-size:400%}span.w6[_ngcontent-%COMP%]{font-size:350%}span.w5[_ngcontent-%COMP%]{font-size:300%}span.w4[_ngcontent-%COMP%]{font-size:250%}span.w3[_ngcontent-%COMP%]{font-size:200%}span.w2[_ngcontent-%COMP%]{font-size:150%}span.w1[_ngcontent-%COMP%]{font-size:100%}a[_ngcontent-%COMP%]:hover{color:#0df}a[_ngcontent-%COMP%]:hover, span.w10[_ngcontent-%COMP%], span.w9[_ngcontent-%COMP%], span.w8[_ngcontent-%COMP%]{color:#0cf}span.w7[_ngcontent-%COMP%]{color:#39d}span.w6[_ngcontent-%COMP%]{color:#90c5f0}span.w5[_ngcontent-%COMP%]{color:#90a0dd}span.w4[_ngcontent-%COMP%]{color:#90c5f0}span.w3[_ngcontent-%COMP%]{color:#a0ddff}span.w2[_ngcontent-%COMP%]{color:#9ce}span.w1[_ngcontent-%COMP%]{color:#aab5f0}.tooltip[_ngcontent-%COMP%] .tooltiptext[_ngcontent-%COMP%]{visibility:hidden;width:inherit;background-color:#555;color:#fff;text-align:center;border-radius:6px;padding:5px 10px;position:absolute;bottom:100%;left:0;opacity:0;transition:opacity .3s}.tooltip[_ngcontent-%COMP%] .tooltiptext[_ngcontent-%COMP%]:after{content:"";position:absolute;top:100%;left:50%;margin-left:-5px;border-width:5px;border-style:solid;border-color:#555 transparent transparent transparent}.tooltip[_ngcontent-%COMP%]:hover .tooltiptext[_ngcontent-%COMP%]{visibility:visible;opacity:1}@keyframes _ngcontent-%COMP%_fadeIn{0%{opacity:0}to{opacity:1}}'],changeDetection:0})}}return o})();var W=u(5970);const H=["wordCloudContainer"];function G(o,g){if(1&o){const e=t.RV6();t.j41(0,"angular-tag-cloud",3),t.bIt("clicked",function(i){l.eBV(e);const s=t.XpG();return l.Njj(s.handleClicked(i))}),t.k0s()}if(2&o){const e=t.XpG();t.Y8G("data",e.data())("zoomOnHover",e.zoomOnHoverOptions())("width",e.containerSize().width)("height",e.containerSize().height)("overflow",e.overflow())("realignOnResize",!0)}}let j=(()=>{class o{words=(0,a.hFB)();entries=(0,a.hFB)();caseSensitive=(0,a.hFB)(!1);clickable=(0,a.hFB)(!1);multiSelect=(0,a.hFB)(!1);highlightSelection=(0,a.hFB)(!1);minWeight=(0,a.hFB)(1);maxWeight=(0,a.hFB)(5);maxWords=(0,a.hFB)(50);colorScheme=(0,a.hFB)(["var(--cue-chart-text-color)","var(--cue-chart-text-color-select)"]);overflow=(0,a.hFB)(!1);clickedWord=(0,a.CGW)();selectionChanged=(0,a.CGW)();wordCloudContainer;containerSize=(0,l.vPA)({width:0,height:0});selection=(0,l.vPA)([]);data=(0,h.EW)(()=>{const e=this.words(),n=this.entries();return n?.length||e?.length?n?.length?n:e?.length?this._buildEntriesFromWords(e):[]:[]});ngAfterViewInit(){const e=new MutationObserver(()=>{this._applySelectionStyles()});this.wordCloudContainer?.nativeElement&&e.observe(this.wordCloudContainer.nativeElement,{childList:!0,subtree:!0})}handleResize(e){0!==e.newRect.height&&this.containerSize.set({width:e.newRect.width,height:e.newRect.height})}styleSelection=(0,l.QZP)(()=>{this.selection(),this._applySelectionStyles()});zoomOnHoverOptions=(0,h.EW)(()=>({scale:1.1,transitionTime:this.clickable()?1.2:0,delay:.05}));_buildEntriesFromWords(e){const n=new Map;for(const r of e){const p=this.caseSensitive()?r:r.toLowerCase();n.set(p,(n.get(p)||0)+1)}const i=Array.from(n.entries());if(0===i.length)return[];const s=i.map(([,r])=>r),c=Math.min(...s),d=Math.max(...s);return d===c?i.map(([r])=>({text:r,weight:this.maxWeight()})):i.sort(([,r],[,p])=>p-r).slice(0,this.maxWords()).map(([r,p])=>({text:r,weight:this.minWeight()+(p-c)*(this.maxWeight()-this.minWeight())/(d-c),color:this.colorScheme()[Math.floor(Math.random()*this.colorScheme().length)]}))}_applySelectionStyles(){if(!this.highlightSelection())return;const e=this.wordCloudContainer?.nativeElement;void 0!==e&&e.querySelectorAll("span").forEach(i=>{i.textContent&&(this.selection().includes(i.textContent.trim())?i.classList.add("selected"):i.classList.remove("selected"))})}handleClicked(e){this.clickable()&&(this.clickedWord.emit(e.text),this.highlightSelection()&&(this.selection().includes(e.text)?this.selection.update(n=>n.filter(i=>i!==e.text)):this.multiSelect()?this.selection.update(n=>[...n,e.text]):this.selection.update(()=>[e.text])),this.selectionChanged.emit(this.selection()))}static \u0275fac=function(n){return new(n||o)};static \u0275cmp=t.VBU({type:o,selectors:[["cue-word-cloud"]],viewQuery:function(n,i){if(1&n&&t.GBs(H,5),2&n){let s;t.mGM(s=t.lsd())&&(i.wordCloudContainer=s.first)}},inputs:{words:[1,"words"],entries:[1,"entries"],caseSensitive:[1,"caseSensitive"],clickable:[1,"clickable"],multiSelect:[1,"multiSelect"],highlightSelection:[1,"highlightSelection"],minWeight:[1,"minWeight"],maxWeight:[1,"maxWeight"],maxWords:[1,"maxWords"],colorScheme:[1,"colorScheme"],overflow:[1,"overflow"]},outputs:{clickedWord:"clickedWord",selectionChanged:"selectionChanged"},decls:3,vars:5,consts:[["wordCloudContainer",""],["cueResized","",1,"wordcloud-container",3,"resized"],[3,"data","zoomOnHover","width","height","overflow","realignOnResize"],[3,"clicked","data","zoomOnHover","width","height","overflow","realignOnResize"]],template:function(n,i){1&n&&(t.j41(0,"div",1,0),t.bIt("resized",function(c){return i.handleResize(c)}),t.nVh(2,G,1,6,"angular-tag-cloud",2),t.k0s()),2&n&&(t.xc7("display",i.data().length?"block":"none"),t.AVh("clickable",i.clickable()),t.R7$(2),t.vxM(i.data().length?2:-1))},dependencies:[E,W.C],styles:["[_nghost-%COMP%]{display:block;width:100%;height:100%;min-height:200px}.wordcloud-container[_ngcontent-%COMP%]{width:100%;height:100%} .wordcloud-container.clickable angular-tag-cloud span{cursor:pointer} .selected{text-decoration:underline}"],changeDetection:0})}return o})();var L=u(5971),V=u(5448),$=u(3319),k=u(4372),U=u(2611),Y=u(5661),Q=u(1096),N=u(5764),F=u(2245);function Z(o,g){if(1&o&&(l.qSk(),t.j41(0,"svg",0),t.nrm(1,"path",3)(2,"path",4),t.k0s()),2&o){const e=t.XpG();t.R7$(),t.BMQ("fill",e.colorDark()),t.R7$(),t.BMQ("fill",e.color())}}function K(o,g){if(1&o&&(l.qSk(),t.j41(0,"svg",1),t.nrm(1,"path",5)(2,"path",6)(3,"path",7),t.k0s()),2&o){const e=t.XpG();t.R7$(2),t.BMQ("fill",e.color())}}const D_blue="#175EBB",J={".dwg":D_blue,".dxf":D_blue,".doc":D_blue,".docx":D_blue,".ifc":"#9F388D",".pdf":"#E03833",".ppt":D_blue,".pptx":D_blue,".csv":"#0b7741",".xls":"#0b7741",".xlsx":"#0b7741",folder:"#9D9998"};let q=(()=>{class o{suffix=a.hFB.required();size=(0,a.hFB)("m");color=(0,h.EW)(()=>J[this.suffix()]??"#9D9998");label=(0,h.EW)(()=>this.suffix().startsWith(".")?this.suffix().toUpperCase().replace(/^\./,""):"");className=(0,h.EW)(()=>`size-${this.size()}`);colorDark=(0,h.EW)(()=>{const e=this.color(),n=parseInt(e.slice(1),16),s=n>>8&255,c=255&n;return`#${(Math.floor(.8*(n>>16&255))<<16|Math.floor(.8*s)<<8|Math.floor(.8*c)).toString(16).padStart(6,"0")}`});static \u0275fac=function(n){return new(n||o)};static \u0275cmp=t.VBU({type:o,selectors:[["cue-file-icon"]],hostVars:2,hostBindings:function(n,i){2&n&&t.HbH(i.className())},inputs:{suffix:[1,"suffix"],size:[1,"size"]},decls:4,vars:2,consts:[["xmlns","http://www.w3.org/2000/svg","width","100%","height","100%","viewBox","0 0 48 48"],["xmlns","http://www.w3.org/2000/svg","viewBox","0 0 24 30"],["size","xs","align","center","weight","semibold"],["d","M40 12H22l-4-4H8c-2.2 0-4 1.8-4 4v8h40v-4c0-2.2-1.8-4-4-4"],["d","M40 12H8c-2.2 0-4 1.8-4 4v20c0 2.2 1.8 4 4 4h32c2.2 0 4-1.8 4-4V16c0-2.2-1.8-4-4-4"],["fill","var(--cue-border-color)","d","M16.2.5H4.1C2.1.5.5 2.1.5 4.1v22.3c0 1.7 1.4 3.1 3.1 3.1h16.8c1.7 0 3.1-1.4 3.1-3.1V7.8h-.1c0-.1-7-7.1-7-7.1h-.1l-.1-.2Z"],["d","M4.1 1C2.4 1 1 2.4 1 4.1v22.3C1 27.8 2.2 29 3.6 29h16.8c1.4 0 2.6-1.2 2.6-2.6V8l-7-7H4.1Z"],["fill","#fff","d","M16 6c0 1.1.9 2 2 2h5l-7-7v5Z","opacity",".3"]],template:function(n,i){1&n&&(t.nVh(0,Z,3,2,":svg:svg",0)(1,K,4,1,":svg:svg",1),t.j41(2,"cue-typography",2),t.EFF(3),t.k0s()),2&n&&(t.vxM("folder"===i.suffix()?0:1),t.R7$(3),t.JRh(i.label()))},dependencies:[F.Typography],styles:["[_nghost-%COMP%]{display:block;position:relative;aspect-ratio:30 / 24;width:var(--cue-dim-elem-m)}.size-xs[_nghost-%COMP%]{width:var(--cue-dim-elem-xs)}.size-s[_nghost-%COMP%]{width:var(--cue-dim-elem-s)}[_nghost-%COMP%] svg[_ngcontent-%COMP%]{display:block;width:100%;height:auto}[_nghost-%COMP%] cue-typography[_ngcontent-%COMP%]{color:#fff;text-transform:uppercase;position:absolute;left:50%;bottom:24%;transform:translate(-50%)}"]})}return o})(),ee=(()=>{class o{suffix=(0,l.vPA)("");iconSize=(0,l.vPA)("xs");agInit(e){this._apply(e)}refresh(e){return this._apply(e),!0}_apply(e){this.suffix.set(e.value||"folder"),this.iconSize.set({xs:"xs",s:"xs",m:"xs",l:"s",xl:"m"}[e.colDef?.cellRendererParams?.iconSize??e.iconSize??"xs"]??"xs")}static \u0275fac=function(n){return new(n||o)};static \u0275cmp=t.VBU({type:o,selectors:[["cue-file-icon-cell-renderer"]],decls:1,vars:2,consts:[[3,"suffix","size"]],template:function(n,i){1&n&&t.nrm(0,"cue-file-icon",0),2&n&&t.Y8G("suffix",i.suffix())("size",i.iconSize())},dependencies:[q],styles:["[_nghost-%COMP%]{display:flex;align-items:center;justify-content:center;width:100%;height:100%}"],changeDetection:0})}return o})();var te=u(6117),ne=u(29),ie=u(1951),oe=u(1493),C=u(9352),se=u(5381),ae=u(9769),le=u(5187),ce=u(356),re=u(6279),de=u(7717),ue=u(7089);const he=(o,g)=>g.id;function ge(o,g){if(1&o){const e=t.RV6();t.j41(0,"li",9),t.bIt("click",function(){const i=l.eBV(e).$implicit,s=t.XpG(3);return l.Njj(s.handleSimpleRowClick(i))}),t.j41(1,"cue-typography",10),t.EFF(2),t.k0s(),t.j41(3,"cue-typography",11),t.EFF(4),t.k0s()()}if(2&o){const e=g.$implicit,n=t.XpG(3);t.AVh("active",n.selectedSimpleDocumentId()===e.id),t.R7$(),t.Y8G("noWrap",!0)("title",e.name),t.R7$(),t.SpI(" ",e.name," "),t.R7$(2),t.SpI(" ",(e.suffix||"").replace(".","").toUpperCase()," ")}}function me(o,g){if(1&o&&(t.j41(0,"ul",5),t.Z7z(1,ge,5,6,"li",8,he),t.k0s()),2&o){const e=t.XpG(2);t.R7$(),t.Dyx(e.simpleDocumentsInt())}}function pe(o,g){if(1&o&&(t.j41(0,"cue-flexcontainer",6)(1,"cue-typography",12),t.EFF(2),t.k0s()()),2&o){const e=t.XpG(2);t.R7$(2),t.SpI(" ",0===e.documentRefs().length&&0===e.documents().length&&e.handlers()?"No documents":e.infoLoading()," ")}}function fe(o,g){if(1&o){const e=t.RV6();t.j41(0,"cue-flexcontainer",7)(1,"cue-typography",13),t.EFF(2),t.k0s(),t.j41(3,"cue-flexcontainer",14)(4,"cue-button",15),t.bIt("click",function(){l.eBV(e);const i=t.XpG(2);return l.Njj(i.previousSimplePage())}),t.nrm(5,"cue-button-icon",16),t.k0s(),t.j41(6,"cue-button",15),t.bIt("click",function(){l.eBV(e);const i=t.XpG(2);return l.Njj(i.nextSimplePage())}),t.nrm(7,"cue-button-icon",17),t.k0s()()()}if(2&o){const e=t.XpG(2);t.R7$(2),t.E5c(" ",e.simpleDisplayStart(),"-",e.simpleDisplayEnd()," / ",e.documentsInt().length," "),t.R7$(2),t.Y8G("disabled",!e.simpleHasPreviousPage()),t.R7$(2),t.Y8G("disabled",!e.simpleHasNextPage())}}function ve(o,g){if(1&o&&(t.j41(0,"div",3),t.nVh(1,me,3,0,"ul",5)(2,pe,3,1,"cue-flexcontainer",6),t.nVh(3,fe,8,5,"cue-flexcontainer",7),t.k0s()),2&o){const e=t.XpG();t.R7$(),t.vxM(e.simpleDocumentsInt().length>0?1:2),t.R7$(2),t.vxM(e.documentsInt().length>0?3:-1)}}function _e(o,g){if(1&o&&t.nrm(0,"cue-svg-icon",34),2&o){const e=t.XpG().$implicit;t.Y8G("name",e.icon)}}function Ce(o,g){if(1&o){const e=t.RV6();t.j41(0,"cue-menu-item",33),t.bIt("click",function(){const i=l.eBV(e).$implicit;return l.Njj(null==i?null:i.action())}),t.nVh(1,_e,1,1,"cue-svg-icon",34),t.EFF(2),t.k0s()}if(2&o){const e=g.$implicit;t.R7$(),t.vxM(e.icon?1:-1),t.R7$(),t.SpI(" ",e.label)}}function De(o,g){if(1&o){const e=t.RV6();t.j41(0,"cue-flexcontainer",24)(1,"cue-menu",25)(2,"cue-button",26,2),t.nrm(4,"cue-button-icon",27),t.k0s(),t.j41(5,"cue-menu-wrap",28),t.Z7z(6,Ce,3,2,"cue-menu-item",null,t.Vm6),t.k0s()(),t.j41(8,"cue-button",29),t.nI1(9,"transloco"),t.bIt("click",function(){l.eBV(e);const i=t.XpG(2);return l.Njj(i.flipped.set(!0))}),t.nrm(10,"cue-button-icon",30),t.k0s()(),t.j41(11,"div",31)(12,"cue-ag-grid",32),t.bIt("gridApiReady",function(i){l.eBV(e);const s=t.XpG(2);return l.Njj(s.onGridReady(i))})("selectedRows",function(i){l.eBV(e);const s=t.XpG(2);return l.Njj(s.clickedDocument.emit(i[0]))}),t.k0s()()}if(2&o){const e=t.XpG(2);t.R7$(6),t.Dyx(e.tableMenu()),t.R7$(2),t.Y8G("cueTooltip",t.bMT(9,9,"components.documentList.tooltipColumnSettings")),t.R7$(4),t.AVh("hidden",e.tableHidden()),t.Y8G("paginationPageSize",e.pageSize())("rowSelection",e.rowSelection)("rowData",e.documentsInt())("columnDefs",e.columnDefs())("overlaySettings",e.overlaySettings())("overlayActions",e.overlayActions())}}function be(o,g){if(1&o){const e=t.RV6();t.j41(0,"cue-flexcontainer",41),t.bIt("click",function(){l.eBV(e);const i=t.XpG(3);return l.Njj(i.applyTagFilter())}),t.j41(1,"cue-button",42)(2,"cue-button-label"),t.EFF(3,"Apply"),t.k0s()()()}}function xe(o,g){if(1&o){const e=t.RV6();t.j41(0,"cue-flexcontainer",24)(1,"cue-button",35),t.bIt("click",function(){l.eBV(e);const i=t.XpG(2);return l.Njj(i.showFront())}),t.nrm(2,"cue-button-icon",36),t.k0s()(),t.j41(3,"cue-flexcontainer",37)(4,"cue-word-cloud",38),t.bIt("selectionChanged",function(i){l.eBV(e);const s=t.XpG(2);return l.Njj(s.tagSelection.set(i))}),t.k0s(),t.nVh(5,be,4,0,"cue-flexcontainer",39),t.k0s(),t.j41(6,"cue-ag-grid-column-select",40),t.mxI("columnDefsChange",function(i){l.eBV(e);const s=t.XpG(2);return t.DH7(s.columnDefs,i)||(s.columnDefs=i),l.Njj(i)}),t.k0s()}if(2&o){const e=t.XpG(2);t.R7$(3),t.AVh("hidden",!e.showTagFilterCloud()),t.R7$(),t.Y8G("words",e.tags())("clickable",!0)("overflow",!0)("multiSelect",!0)("highlightSelection",!0),t.R7$(),t.vxM(e.filterToBeApplied()?5:-1),t.R7$(),t.AVh("hidden",e.showTagFilterCloud()),t.Y8G("settings",e.columnSelectSettings),t.R50("columnDefs",e.columnDefs),t.Y8G("columnDefsGross",e.columnDefsGross())}}function we(o,g){if(1&o&&(t.j41(0,"cue-card",20),t.eu8(1,43),t.k0s()),2&o){t.XpG();const e=t.sdS(3),n=t.XpG();t.Y8G("variant",n._cardVariant()),t.R7$(),t.Y8G("ngTemplateOutlet",e)}}function Me(o,g){if(1&o&&(t.j41(0,"div",21),t.eu8(1,43),t.k0s()),2&o){t.XpG();const e=t.sdS(3);t.R7$(),t.Y8G("ngTemplateOutlet",e)}}function ye(o,g){if(1&o&&(t.j41(0,"cue-card",22),t.eu8(1,43),t.k0s()),2&o){t.XpG();const e=t.sdS(5),n=t.XpG();t.Y8G("variant",n._cardVariant()),t.R7$(),t.Y8G("ngTemplateOutlet",e)}}function Se(o,g){if(1&o&&(t.j41(0,"div",23),t.eu8(1,43),t.k0s()),2&o){t.XpG();const e=t.sdS(5);t.R7$(),t.Y8G("ngTemplateOutlet",e)}}function Ie(o,g){if(1&o){const e=t.RV6();t.j41(0,"div",18),t.mxI("cueFlipChange",function(i){l.eBV(e);const s=t.XpG();return t.DH7(s.flipped,i)||(s.flipped=i),l.Njj(i)}),t.j41(1,"div",19),t.DNE(2,De,13,11,"ng-template",null,0,t.C5r)(4,xe,7,13,"ng-template",null,1,t.C5r),t.nVh(6,we,2,2,"cue-card",20)(7,Me,2,1,"div",21),t.nVh(8,ye,2,2,"cue-card",22)(9,Se,2,1,"div",23),t.k0s()()}if(2&o){const e=t.XpG();t.R50("cueFlip",e.flipped),t.R7$(6),t.vxM("none"!==e.variant()?6:7),t.R7$(2),t.vxM("none"!==e.variant()?8:9)}}let Oe=(()=>{class o{documents=(0,a.hFB)([]);availableContentCategories=(0,a.hFB)(void 0);detailedView=(0,a.hFB)(!1);simple=(0,a.hFB)(!1);pageSize=(0,a.hFB)(10);prefetchPages=(0,a.hFB)(3);privileges=(0,a.hFB)();showOpenInDocumentViewerAction=(0,a.hFB)(!0);showOpenInFileManagerAction=(0,a.hFB)(!0);customOverlayActions=(0,a.hFB)([]);variant=(0,a.hFB)("default");_cardVariant=(0,h.EW)(()=>this.variant());documentRefs=(0,a.hFB)([]);handlers=(0,a.hFB)(void 0);documentData=(0,a.hFB)({});clickedDocument=(0,a.CGW)();clickedDownloadDocument=(0,a.CGW)();clickedOpenInDir=(0,a.CGW)();clickedOpen=(0,a.CGW)();flipped=(0,l.vPA)(!1);simplePageIndex=(0,l.vPA)(0);selectedSimpleDocumentId=(0,l.vPA)(null);_simpleBufferedUntilIndex=(0,l.vPA)(0);_tableBufferedUntilIndex=(0,l.vPA)(0);_lastDocumentRefsKey="";_gridApi=null;_requestedIds=new Set;_isSorted=!1;_viewportCheckTimerId=null;_lazyMode=(0,h.EW)(()=>this.documentRefs().length>0);_leafContentCategoryIris=(0,h.EW)(()=>{const e=this.availableContentCategories();if(!e)return null;const n=new Set(e.map(i=>i.parent).filter(i=>!!i));return new Set(e.filter(i=>!n.has(i.iri)).map(i=>i.iri))});labelDownload=(0,C.Xx)("components.documentList.labelDownload");labelName=(0,C.Xx)("components.documentList.labelName");labelOpenInFileManager=(0,C.Xx)("components.documentList.labelOpenInFileManager");labelOpenInDocumentViewer=(0,C.Xx)("components.documentList.labelOpenInDocumentViewer");labelSubject=(0,C.Xx)("components.documentList.labelSubject");labelSummary=(0,C.Xx)("components.documentList.labelSummary");labelPages=(0,C.Xx)("components.documentList.labelPages");labelSize=(0,C.Xx)("components.documentList.labelSize");labelCategories=(0,C.Xx)("components.documentList.labelCategories");labelType=(0,C.Xx)("components.documentList.labelType");buttonShowCloudFilter=(0,C.Xx)("components.documentList.buttonShowCloudFilter");buttonHideCloudFilter=(0,C.Xx)("components.documentList.buttonHideCloudFilter");buttonDownloadCSV=(0,C.Xx)("components.documentList.buttonDownloadCSV");infoLoading=(0,C.Xx)("components.documentList.infoLoading");overlaySettings=(0,h.EW)(()=>({...new ie.K,mode:"row",buttonVariant:"accent"===this.variant()?"primary":"accent"}));overlayActions=(0,h.EW)(()=>{const e=[{label:this.labelDownload(),icon:"download",action:n=>{this.handlers()?.requestDownload?.(n.rowData),this.clickedDownloadDocument.emit(n.rowData)}}];return this.showOpenInDocumentViewerAction()&&e.push({label:this.labelOpenInDocumentViewer(),icon:"document",action:n=>{const i=n.rowData.contentIRI.split("/").pop()??n.rowData.contentIRI;this.handlers()?.requestOpen?.(i,n.rowData),this.clickedOpen.emit(n.rowData)}}),this.showOpenInFileManagerAction()&&e.push({label:this.labelOpenInFileManager(),icon:"folder",action:n=>{const i=n.rowData.contentIRI.split("/").pop()??n.rowData.contentIRI;this.handlers()?.requestOpenInDir?.(i,n.rowData),this.clickedOpenInDir.emit(n.rowData)}}),[...e,...this.customOverlayActions()||[]]});documentsInt=(0,h.EW)(()=>{let e;if(this._lazyMode()){const n=this.documentRefs(),i=this.documentData()||{};e=n.map(s=>{const c=i[s.id];return c?{...c,pages:s.pages??c.pages,...void 0!==s.sources?{sources:s.sources}:{},...void 0!==s.relevance?{relevance:s.relevance}:{},name:(0,k.M)(c.path),loading:!1}:{id:s.id,path:s.id,suffix:"",size:0,contentIRI:s.id,tags:[],summary:"",categories:[],relevance:s.relevance??0,pages:s.pages,sources:s.sources,name:this.infoLoading(),loading:!0}})}else e=(this.documents()||[]).map(n=>({...n,name:(0,k.M)(n.path),loading:!1}));return this.tagFilter().length?e.filter(n=>n.tags?.some(i=>this.tagFilter().some(s=>s.toLowerCase()===i.toLowerCase()))):e});simplePageCount=(0,h.EW)(()=>Math.max(1,Math.ceil(this.documentsInt().length/Math.max(1,this.pageSize()))));simpleStartIndex=(0,h.EW)(()=>this.simplePageIndex()*Math.max(1,this.pageSize()));simpleEndIndex=(0,h.EW)(()=>this.simpleStartIndex()+Math.max(1,this.pageSize()));simpleDocumentsInt=(0,h.EW)(()=>this.documentsInt().slice(this.simpleStartIndex(),this.simpleEndIndex()));simpleHasPreviousPage=(0,h.EW)(()=>this.simplePageIndex()>0);simpleHasNextPage=(0,h.EW)(()=>this.simplePageIndex()<this.simplePageCount()-1);simpleDisplayStart=(0,h.EW)(()=>this.documentsInt().length?this.simpleStartIndex()+1:0);simpleDisplayEnd=(0,h.EW)(()=>Math.min(this.simpleEndIndex(),this.documentsInt().length));tags=(0,h.EW)(()=>{const e=this.documentsInt(),n=[];return e.forEach(i=>{i.tags?.forEach(s=>n.push(s))}),n});showPageColumn=(0,h.EW)(()=>this.documentsInt().some(e=>void 0!==e.pages));hasSubjects=(0,h.EW)(()=>this.documentsInt().some(e=>void 0!==e.subject&&""!==e.subject));columnSelectSettings=new Q.e;columnDefs=(0,l.vPA)([]);columnDefsGross=(0,l.vPA)([]);tagSelection=(0,l.vPA)([]);tagFilter=(0,l.vPA)([]);showTagFilterCloud=(0,l.vPA)(!1);filterToBeApplied=(0,h.EW)(()=>{const e=this.tagSelection(),n=this.tagFilter();return JSON.stringify(e.sort())!==JSON.stringify(n.sort())});tableMenu=(0,h.EW)(()=>{const e=[];return this.showTagFilterCloud()?e.push({icon:"cloud-funnel",label:this.buttonHideCloudFilter(),variant:"accent",action:()=>{this.flipped.set(!1),this.showTagFilterCloud.set(!1)}}):e.push({icon:"cloud-funnel",label:this.buttonShowCloudFilter(),variant:"accent",action:()=>{this.flipped.set(!0),this.showTagFilterCloud.set(!0)}}),e.push({icon:"download",label:this.buttonDownloadCSV(),action:()=>function R(o,g,e="table.csv"){const n=function T(o,g){const e=function S(o,g){return o.map(e=>{const n={};return"id"in e&&(n.id=e.id),"key"in e&&(n.key=e.key),g.forEach(i=>{let s;"function"==typeof i.valueGetter?s=i.valueGetter({data:e,colDef:i,getValue:d=>e[d],node:void 0,column:void 0,api:void 0,context:void 0}):i.field&&(s=e[i.field]),"function"==typeof i.valueFormatter&&(s=i.valueFormatter({value:s,data:e,colDef:i,node:void 0,column:void 0,api:void 0,context:void 0}));const c=i.headerName||i.colId||i.field;void 0!==c&&(n[c]=s)}),n})}(o,g);if(0===e.length)return"";const n=e.some(c=>"id"in c),i=[];n&&i.push("id"),g.forEach(c=>{const d=c.headerName||c.colId||c.field;d&&"id"!==d&&!i.includes(d)&&i.push(d)});const s=e.map(c=>{const d={};return i.forEach(m=>{d[m]=c[m]}),d});return M().unparse(s,{columns:i})}(o,g);(0,w.YN)(n,e,"text/csv")}(this.documentsInt(),this.columnDefs())}),e});hideCloud(){this.flipped.set(!0),this.showTagFilterCloud.set(!0)}tableHidden=(0,h.EW)(()=>this.showTagFilterCloud()||this.flipped());rowSelection={mode:"singleRow",checkboxes:!1,enableClickSelection:!0};whenTableDataKnown=(0,l.QZP)(()=>{this.simple()||this._buildInitialColumnDefs(this.detailedView())});whenSimpleDataChanges=(0,l.QZP)(()=>{const e=this.documentsInt().length,n=Math.max(1,this.pageSize()),i=Math.max(0,Math.ceil(e/n)-1);this.simplePageIndex()>i&&this.simplePageIndex.set(i)});whenRefsChange=(0,l.QZP)(()=>{const n=this.documentRefs().map(i=>i.id).join("|");n!==this._lastDocumentRefsKey&&(this._lastDocumentRefsKey=n,this._requestedIds.clear(),this._simpleBufferedUntilIndex.set(0),this._tableBufferedUntilIndex.set(0),this.simplePageIndex.set(0))});whenSimpleLazyDataNeeded=(0,l.QZP)(()=>{if(!this.simple()||!this._lazyMode()||!this.handlers())return;const e=this.documentRefs();if(!e.length)return;const n=Math.max(1,this.pageSize()),s=n*Math.max(1,this.prefetchPages()),c=e.length,d=this.simpleStartIndex(),m=Math.min(c,d+n),r=this._simpleBufferedUntilIndex();let p=null;if(0===r?p=0:(d>=Math.max(0,r-n)||m>r)&&(p=r),null===p||p>=c)return;const _=Math.min(c,p+s),v=e.slice(p,_).map(f=>f.id).filter(f=>!this._requestedIds.has(f));this._simpleBufferedUntilIndex.set(Math.max(r,_)),v.length&&(v.forEach(f=>this._requestedIds.add(f)),setTimeout(()=>this.handlers()?.requestData(v)))});previousSimplePage(){this.simpleHasPreviousPage()&&this.simplePageIndex.update(e=>Math.max(0,e-1))}nextSimplePage(){this.simpleHasNextPage()&&this.simplePageIndex.update(e=>Math.min(this.simplePageCount()-1,e+1))}handleSimpleRowClick(e){this.selectedSimpleDocumentId.set(e.id),this.handleRowClick(e)}handleRowClick(e){var n=this;return(0,x.A)(function*(){n.clickedDocument.emit(e),window.cueDetachCellOverlay&&window.cueDetachCellOverlay(),n.overlayVisible&&"function"==typeof n.overlayVisible.set&&n.overlayVisible.set(!1)})()}showFront(){this.flipped.set(!1),this.showTagFilterCloud.set(!1)}applyTagFilter(){this.tagFilter.set(this.tagSelection()),this.flipped.set(!1),this.showTagFilterCloud.set(!1)}ngOnDestroy(){null!==this._viewportCheckTimerId&&(clearTimeout(this._viewportCheckTimerId),this._viewportCheckTimerId=null),this._gridApi=null}onGridReady(e){this._gridApi=e,e.addEventListener("viewportChanged",()=>this._checkViewport()),e.addEventListener("modelUpdated",()=>this._checkViewport()),e.addEventListener("paginationChanged",()=>this._checkViewport()),e.addEventListener("sortChanged",()=>{const n=e.getColumnState();this._isSorted=n.some(i=>null!=i.sort),this._isSorted&&this._requestAllUnloaded()}),this._viewportCheckTimerId=setTimeout(()=>{this._viewportCheckTimerId=null,this._checkViewport()},100)}_checkViewport(){if(!this._gridApi||this._gridApi.isDestroyed()||!this._lazyMode())return;if(this._isSorted)return void this._requestAllUnloaded();const e=this.documentRefs(),n=e.length;if(!n)return;const i=Math.max(1,this._gridApi.paginationGetPageSize?.()??10),c=Math.max(0,this._gridApi.paginationGetCurrentPage?.()??0)*i,d=Math.min(n,c+i),m=this._tableBufferedUntilIndex();let r=null;if(0===m?r=0:(c>=Math.max(0,m-i)||d>m)&&(r=m),null===r||r>=n)return;const p=i*Math.max(1,this.prefetchPages()),_=Math.min(n,r+p),v=e.slice(r,_).map(f=>f.id).filter(f=>!this._requestedIds.has(f));this._tableBufferedUntilIndex.set(Math.max(m,_)),v.length&&(v.forEach(f=>this._requestedIds.add(f)),setTimeout(()=>this.handlers()?.requestData(v)))}_requestAllUnloaded(){if(!this._gridApi||this._gridApi.isDestroyed()||!this._lazyMode())return;const e=[];if(this._gridApi.forEachNode(n=>{const i=n.data;i?.loading&&!this._requestedIds.has(i.contentIRI)&&e.push(i.contentIRI)}),e.length>0){const n=Array.from(new Set(e));n.forEach(i=>this._requestedIds.add(i)),setTimeout(()=>this.handlers()?.requestData(n))}}_buildInitialColumnDefs(e){const n=[],i=[];n.push({field:"name",headerName:this.labelName(),width:e?250:120,filter:!0,valueGetter:m=>!m.data?.name&&m.data?.loading?"Loading...":m.data?.name||m.data?.contentIRI}),this.hasSubjects()&&n.push({field:"subject",headerName:this.labelSubject(),flex:1,filter:!0,cellRenderer:N.l,cellRendererParams:{lineHeight:"1.8"},autoHeight:!0});const s={field:"summary",headerName:this.labelSummary(),flex:1,filter:!0,cellRenderer:N.l,cellRendererParams:{lineHeight:"1.8"},autoHeight:!0};this.detailedView()||(s.tooltipField="summary"),e?n.push(s):i.push(s),this.showPageColumn()&&n.push({field:"pages",headerName:this.labelPages(),width:100,filter:!0,valueGetter:m=>Array.isArray(m.data?.pages)?m.data.pages.map(r=>r.page).join(", "):""});const c={field:"size",headerName:this.labelSize(),width:100,filter:!0,valueGetter:m=>(0,oe.b)(m.data?.size||0)};e?n.push(c):i.push(c);const d={field:"categories",headerName:this.labelCategories(),width:120,filter:!0,valueGetter:m=>{const r=m.data?.categories||[],p=this._leafContentCategoryIris(),_=p?r.filter(f=>p.has(f)):r,v=_.slice(0,3).map(f=>this._getContentCategoryLabel(f)).join(", ");return _.length>3?`${v}...`:v}};e?n.push(d):i.push(d),n.push({field:"suffix",headerName:this.labelType(),width:80,filter:!0,headerClass:"header-align-right",cellStyle:{display:"flex",justifyContent:"flex-end"},cellRenderer:ee}),this.columnDefs.update(()=>[...n]),this.columnDefsGross.update(()=>[...n,...i])}_getContentCategoryLabel(e){const n=this.availableContentCategories();if(void 0!==n){const i=n.find(s=>s.iri===e);if(i)return i.label;console.warn(`No label found for content category IRI: ${e}`)}else console.warn("No availableContentCategories provided to DocumentList component");return(o=>{const g=o.split("#").pop()??o,e={AgreementDocument:"Agreement",ArchitecturalDesignDocument:"Architectural Design",AsBuiltDocument:"As-Built",BudgetEstimateDocument:"Budget Estimate",CertificationDocument:"Certification",ComplianceDocument:"Compliance",CorrespondenceDocument:"Correspondence",ConstructionContract:"Construction Contract",ConstructionProcessDocument:"Construction Process",ContractCondition:"Contract Condition",ContractRole:"Contract Role",ContractualDocument:"Contract",CostControlDocument:"Cost Control",DesignDocument:"Design Document",EmailAddress:"Email Address",EngineeringDesignDocument:"Engineering Design",FinancialAdministrativeDocument:"Financial/Administrative",FunctionalRequirementsDocument:"Functional Requirements",InspectionDocument:"Inspection",InsuranceBondDocument:"Insurance/Bond",InteriorDesignDocument:"Interior Design",MarketingCloseoutDocument:"Marketing Closeout",MiscDocument:"Miscellaneous",OperationManual:"Operation Manual",OperationsMaintenanceDocument:"Operations & Maintenance",OperationsManualDocument:"Operations Manual",OtherDocument:"Other",OtherContent:"Other Content",ProgressStatusReport:"Progress Status Report",QualityAssuranceDocument:"Quality Assurance",QualityControlDocument:"Quality Control",RegulatoryComplianceDocument:"Regulatory Compliance",SafetyDocument:"Safety",ScheduleDocument:"Schedule",SiteAssessmentDocument:"Site Assessment",TechnicalRequirementsDocument:"Technical Requirements",TechnicalSpecificationDocument:"Technical Specification",TenderingDocument:"Tendering Document",TermsAndConditionsDocument:"Terms & Conditions"};return void 0===e[g]&&console.log(`No pretty label for category: ${g}`),e[g]??g})(e)}static \u0275fac=function(n){return new(n||o)};static \u0275cmp=t.VBU({type:o,selectors:[["cue-doc-list"]],inputs:{documents:[1,"documents"],availableContentCategories:[1,"availableContentCategories"],detailedView:[1,"detailedView"],simple:[1,"simple"],pageSize:[1,"pageSize"],prefetchPages:[1,"prefetchPages"],privileges:[1,"privileges"],showOpenInDocumentViewerAction:[1,"showOpenInDocumentViewerAction"],showOpenInFileManagerAction:[1,"showOpenInFileManagerAction"],customOverlayActions:[1,"customOverlayActions"],variant:[1,"variant"],documentRefs:[1,"documentRefs"],handlers:[1,"handlers"],documentData:[1,"documentData"]},outputs:{clickedDocument:"clickedDocument",clickedDownloadDocument:"clickedDownloadDocument",clickedOpenInDir:"clickedOpenInDir",clickedOpen:"clickedOpen"},decls:2,vars:1,consts:[["frontContent",""],["backContent",""],["trigger",""],[1,"simple-container",2,"width","100%","height","auto"],[1,"flip-card",2,"width","100%","height","auto","overflow","hidden",3,"cueFlip"],[1,"simple-list"],["justify","center",1,"simple-empty"],["direction","row","justify","space-between","align","center",2,"padding","4px 8px"],[1,"simple-item",3,"active"],[1,"simple-item",3,"click"],["size","s",1,"simple-item-name",3,"noWrap","title"],["size","xs",1,"simple-item-meta"],["size","s"],["size","xs"],["direction","row","gap","s"],["size","xs","variant","tertiary",3,"click","disabled"],["icon","paginator-back"],["icon","paginator-next"],[1,"flip-card",2,"width","100%","height","auto","overflow","hidden",3,"cueFlipChange","cueFlip"],[1,"flip-content"],[1,"card-face","front",2,"width","100%","height","auto",3,"variant"],[1,"card-face","front",2,"width","100%","height","auto"],[1,"card-face","back",2,"width","100%","height","auto",3,"variant"],[1,"card-face","back",2,"width","100%","height","auto"],["direction","row","justify","end",2,"padding","2px"],["positioning","bottomleft"],["trigger","","variant","tertiary","size","s"],["icon","more-vert"],["menu",""],["variant","accent","size","s",3,"click","cueTooltip"],["icon","settings"],[2,"position","relative"],[3,"gridApiReady","selectedRows","paginationPageSize","rowSelection","rowData","columnDefs","overlaySettings","overlayActions"],[3,"click"],["before","",3,"name"],["variant","accent","size","s","cueTooltip","Back to table",3,"click"],["icon","arrow-back"],["justify","center",2,"height","350px"],[2,"height","100%","width","100%",3,"selectionChanged","words","clickable","overflow","multiSelect","highlightSelection"],["justify","center",1,"word-cloud-actions"],[3,"columnDefsChange","settings","columnDefs","columnDefsGross"],["justify","center",1,"word-cloud-actions",3,"click"],["variant","primary"],[3,"ngTemplateOutlet"]],template:function(n,i){1&n&&t.nVh(0,ve,4,2,"div",3)(1,Ie,10,3,"div",4),2&n&&t.vxM(i.simple()?0:1)},dependencies:[se.n,j,L.Button,V.ButtonLabel,de.R,le.Card,ae.T3,$.ButtonIcon,U.R,Y.pL,ce.M,re.D,te.W,ne.A,ue.d,F.Typography,C.Kj],styles:[".hidden[_ngcontent-%COMP%]{display:none}.word-cloud-actions[_ngcontent-%COMP%]{position:absolute;z-index:10;right:0;left:0;bottom:10px;pointer-events:none}.word-cloud-actions[_ngcontent-%COMP%] cue-button[_ngcontent-%COMP%]{pointer-events:auto}.simple-container[_ngcontent-%COMP%]{width:100%}.simple-list[_ngcontent-%COMP%]{list-style:none;margin:0;padding:4px;max-height:420px;overflow-y:auto}.simple-item[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2px;padding:9px 10px;border-radius:6px;cursor:pointer;transition:background .1s}.simple-item[_ngcontent-%COMP%]:hover{background:var(--cue-color-ultralightgray)}.simple-item.active[_ngcontent-%COMP%]{background:var(--cue-color-lightgray)}.simple-item-name[_ngcontent-%COMP%]{font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.simple-item-meta[_ngcontent-%COMP%]{font-size:11px;color:var(--cue-color-midgray)}.simple-empty[_ngcontent-%COMP%]{padding:12px}"],changeDetection:0})}return o})()},4372(z,b,u){u.d(b,{M:()=>x});const x=a=>{const h=a.split("/");return h[h.length-1]}},1493(z,b,u){function x(a,h=!1,l=1){const w=h?1e3:1024;if(Math.abs(a)<w)return a+" B";const y=h?["kB","MB","GB","TB","PB","EB","ZB","YB"]:["KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"];let M=-1;const S=10**l;do{a/=w,++M}while(Math.round(Math.abs(a)*S)/S>=w&&M<y.length-1);return a.toFixed(l)+" "+y[M]}u.d(b,{b:()=>x})}}]);
package/882.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[882],{3183(N,S,o){o.d(S,{A:()=>E});var M=o(7705),p=o(5802),s=o(9417),y=o(1359),B=o(8957),C=o(2245),L=o(5381),d=o(5547);const g=(v,f)=>f.value;function k(v,f){if(1&v){const r=d.RV6();d.j41(0,"cue-input",6),d.bIt("valueChange",function(u){p.eBV(r);const _=d.XpG();return _.searchText=u,p.Njj(_.onSearchChange())}),d.k0s()}if(2&v){const r=d.XpG();d.Y8G("value",r.searchText)}}function P(v,f){if(1&v){const r=d.RV6();d.j41(0,"cue-checkbox",7),d.bIt("checkedChange",function(u){const _=p.eBV(r).$implicit,T=d.XpG();return _.selected=u,p.Njj(T.onSelectionChange())}),d.k0s()}if(2&v){const r=f.$implicit;d.Y8G("label",r.value||"(blank)")("checked",r.selected)}}function R(v,f){1&v&&(d.j41(0,"cue-typography",5),d.EFF(1,"No results"),d.k0s())}let E=(()=>{class v{_cdr=(0,p.WQX)(M.gRc);_params;options=[];filteredOptions=[];searchText="";agInit(r){this._params=r}afterGuiAttached(r){this._refreshOptions(),this._cdr.markForCheck()}onNewRowsLoaded(){this._refreshOptions(),this._cdr.markForCheck()}isFilterActive(){return this.options.some(r=>!r.selected)}doesFilterPass(r){const h=new Set(this.options.filter(x=>x.selected).map(x=>x.value)),u=this._params.getValue(r.node),_=null==u?"":String(u);return"..."===_||"Loading..."===_||(""===_?h.has(""):_.split(", ").map(x=>x.trim()).some(x=>h.has(x)))}getModel(){return this.isFilterActive()?{selectedValues:this.options.filter(r=>r.selected).map(r=>r.value)}:null}setModel(r){if(r){const h=new Set(r.selectedValues);this.options.forEach(u=>u.selected=h.has(u.value))}else this.options.forEach(h=>h.selected=!0);this._applySearch(),this._cdr.markForCheck()}onSelectionChange(){this._params.filterChangedCallback(),this._cdr.markForCheck()}onSearchChange(){this._applySearch(),this._cdr.markForCheck()}get allSelected(){return this.options.length>0&&this.options.every(r=>r.selected)}toggleAll(r){this.options.forEach(h=>h.selected=r),this._applySearch(),this._params.filterChangedCallback(),this._cdr.markForCheck()}_refreshOptions(){const r=new Set;this._params.api.forEachNode(u=>{const _=this._params.getValue(u);if(null==_||""===_)r.add("");else{const T=String(_);if("..."===T||"Loading..."===T)return;const x=T.split(", ").map(F=>F.trim());for(const F of x)r.add(F)}});const h=new Map(this.options.map(u=>[u.value,u.selected]));this.options=Array.from(r).sort((u,_)=>u.localeCompare(_)).map(u=>({value:u,selected:h.get(u)??!0})),this._applySearch()}_applySearch(){const r=this.searchText.toLowerCase().trim();this.filteredOptions=r?this.options.filter(h=>h.value.toLowerCase().includes(r)):this.options}static \u0275fac=function(h){return new(h||v)};static \u0275cmp=d.VBU({type:v,selectors:[["cue-multi-select-filter"]],decls:7,vars:3,consts:[["direction","column","gap","s"],["placeholder","Search...","size","s",3,"value"],["size","s","label","Select all",3,"checkedChange","checked"],[1,"msf-list"],["size","s",3,"label","checked"],["size","s"],["placeholder","Search...","size","s",3,"valueChange","value"],["size","s",3,"checkedChange","label","checked"]],template:function(h,u){1&h&&(d.j41(0,"cue-flexcontainer",0),d.nVh(1,k,1,1,"cue-input",1),d.j41(2,"cue-checkbox",2),d.bIt("checkedChange",function(T){return u.toggleAll(T)}),d.k0s(),d.j41(3,"div",3),d.Z7z(4,P,1,2,"cue-checkbox",4,g),d.nVh(6,R,2,0,"cue-typography",5),d.k0s()()),2&h&&(d.R7$(),d.vxM(u.options.length>10?1:-1),d.R7$(),d.Y8G("checked",u.allSelected),d.R7$(2),d.Dyx(u.filteredOptions),d.R7$(2),d.vxM(0===u.filteredOptions.length?6:-1))},dependencies:[s.YN,y.S,B.p,C.Typography,L.n],styles:["[_nghost-%COMP%]{display:block;padding:var(--cue-card-padding-y) var(--cue-card-padding-x);min-width:200px;max-width:300px;box-sizing:border-box}.msf-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2px;max-height:200px;overflow-y:auto}"],changeDetection:0})}return v})()},5902(N,S,o){o.d(S,{U:()=>R});var M=o(7705),p=o(5802),s=o(2271),y=o(9352),B=o(8957),C=o(2444),L=o(2245),d=o(5381),g=o(5547);function k(E,v){if(1&E){const f=g.RV6();g.j41(0,"cue-input",4),g.bIt("valueChange",function(h){p.eBV(f);const u=g.XpG();return p.Njj(u.onValueChange(h))}),g.k0s()}if(2&E){const f=g.XpG();g.Y8G("value",f.filterText)}}function P(E,v){if(1&E){const f=g.RV6();g.j41(0,"cue-typography",5),g.bIt("click",function(){p.eBV(f);const h=g.XpG();return p.Njj(h.clear())}),g.EFF(1,"Clear"),g.k0s()}}let R=(()=>{class E{_cdr=(0,p.WQX)(M.gRc);_params;filterText="";filterType="contains";filterTypeOptions=["contains","notContains","equals","notEqual","startsWith","endsWith","blank","notBlank"];_labelContains=(0,y.Xx)("components.agGridColumnSelect.textFilterContains");_labelNotContains=(0,y.Xx)("components.agGridColumnSelect.textFilterNotContains");_labelEquals=(0,y.Xx)("components.agGridColumnSelect.textFilterEquals");_labelNotEqual=(0,y.Xx)("components.agGridColumnSelect.textFilterNotEqual");_labelStartsWith=(0,y.Xx)("components.agGridColumnSelect.textFilterStartsWith");_labelEndsWith=(0,y.Xx)("components.agGridColumnSelect.textFilterEndsWith");_labelBlank=(0,y.Xx)("components.agGridColumnSelect.textFilterBlank");_labelNotBlank=(0,y.Xx)("components.agGridColumnSelect.textFilterNotBlank");filterTypeLabelMap=(0,s.EW)(()=>({contains:this._labelContains(),notContains:this._labelNotContains(),equals:this._labelEquals(),notEqual:this._labelNotEqual(),startsWith:this._labelStartsWith(),endsWith:this._labelEndsWith(),blank:this._labelBlank(),notBlank:this._labelNotBlank()}));showTextInput=(0,s.EW)(()=>!["blank","notBlank"].includes(this.filterType));agInit(f){this._params=f}afterGuiAttached(f){this._cdr.markForCheck()}isFilterActive(){return!!["blank","notBlank"].includes(this.filterType)||this.filterText.trim().length>0}doesFilterPass(f){const r=this._params.getValue(f.node),h=null==r?"":String(r),u=this.filterText.toLowerCase().trim(),_=h.toLowerCase();switch(this.filterType){case"contains":default:return _.includes(u);case"notContains":return!_.includes(u);case"equals":return _===u;case"notEqual":return _!==u;case"startsWith":return _.startsWith(u);case"endsWith":return _.endsWith(u);case"blank":return""===h;case"notBlank":return""!==h}}getModel(){return this.isFilterActive()?{filterType:"text",type:this.filterType,filter:this.filterText}:null}setModel(f){this.filterText=f?.filter??"",this.filterType=f?.type??"contains",this._cdr.markForCheck()}onValueChange(f){this.filterText=f,this._params.filterChangedCallback(),this._cdr.markForCheck()}onFilterTypeChange(f){this.filterType=String(f||"contains"),["blank","notBlank"].includes(this.filterType)&&(this.filterText=""),this._params.filterChangedCallback(),this._cdr.markForCheck()}clear(){this.filterText="",this.filterType="contains",this._params.filterChangedCallback(),this._cdr.markForCheck()}static \u0275fac=function(r){return new(r||E)};static \u0275cmp=g.VBU({type:E,selectors:[["cue-text-filter"]],decls:4,vars:5,consts:[["direction","column","gap","s"],["size","s",3,"valueChange","value","options","labelMap"],["placeholder","Filter...","size","s",3,"value"],["size","s",2,"cursor","pointer","text-align","right"],["placeholder","Filter...","size","s",3,"valueChange","value"],["size","s",2,"cursor","pointer","text-align","right",3,"click"]],template:function(r,h){1&r&&(g.j41(0,"cue-flexcontainer",0)(1,"cue-select",1),g.bIt("valueChange",function(_){return h.onFilterTypeChange(_)}),g.k0s(),g.nVh(2,k,1,1,"cue-input",2),g.nVh(3,P,2,0,"cue-typography",3),g.k0s()),2&r&&(g.R7$(),g.Y8G("value",h.filterType)("options",h.filterTypeOptions)("labelMap",h.filterTypeLabelMap()),g.R7$(),g.vxM(h.showTextInput()?2:-1),g.R7$(),g.vxM(h.filterText||"contains"!==h.filterType?3:-1))},dependencies:[B.p,C.l,L.Typography,d.n],styles:["[_nghost-%COMP%]{display:block;padding:var(--cue-card-padding-y) var(--cue-card-padding-x);min-width:180px;max-width:280px;box-sizing:border-box}"],changeDetection:0})}return E})()},5448(N,S,o){o.d(S,{ButtonLabel:()=>B});var M=o(7705),p=o(2245),s=o(5547);const y=["*"];let B=(()=>{class C{fontSize=(0,M.hFB)("m");italic=(0,M.hFB)(!1);noWrap=(0,M.hFB)(!0);static \u0275fac=function(g){return new(g||C)};static \u0275cmp=s.VBU({type:C,selectors:[["cue-button-label"]],inputs:{fontSize:[1,"fontSize"],italic:[1,"italic"],noWrap:[1,"noWrap"]},ngContentSelectors:y,decls:3,vars:3,consts:[[3,"size","italic","noWrap"]],template:function(g,k){1&g&&(s.NAR(),s.j41(0,"div")(1,"cue-typography",0),s.SdG(2),s.k0s()()),2&g&&(s.R7$(),s.Y8G("size",k.fontSize())("italic",k.italic())("noWrap",k.noWrap()))},dependencies:[p.Typography],styles:["div[_ngcontent-%COMP%]{transform:translateY(.05em)}"]})}return C})()},9882(N,S,o){o.d(S,{CueEntityList:()=>ee});var M=o(467),p=o(7705),s=o(5802),y=o(2271),B=o(2611),C=o(9352),L=o(1951),d=o(6455),g=o(8334),k=o(5949),P=o(2843),R=o(3646),E=o(8017),v=o(2306),f=o(6103);let r=(()=>{class l{mapboxToken=(0,s.vPA)(void 0);entityData=(0,s.vPA)({});availableEntityRelationships=(0,s.vPA)([]);settings=(0,y.EW)(()=>{const e=this.mapboxToken();if(!e)return;const n=new v.yY;return n.mapboxToken=e,n.contextMenu.showFlyTo=!1,n.contextMenu.showProperties=!1,n});layers=(0,y.EW)(()=>{const e=this.entityData(),n=this.availableEntityRelationships();return(0,f.N)({entityData:e,availableEntityRelationships:n})});static \u0275fac=function(n){return new(n||l)};static \u0275prov=s.jDH({token:l,factory:l.\u0275fac,providedIn:"root"})}return l})();var h=o(3183),u=o(5902);let _=(()=>{class l{entities=(0,s.vPA)([]);entityData=(0,s.vPA)({});orderByMentionCount=(0,s.vPA)(!1);availableEntityCategories=(0,s.vPA)(void 0);labelValue=(0,C.Xx)("components.entityList.labelValue");labelCategories=(0,C.Xx)("components.entityList.labelCategories");labelMentions=(0,C.Xx)("components.entityList.labelMentionCount");_filterChangeCounter=(0,s.vPA)(0);filterChangeCounter=this._filterChangeCounter.asReadonly();onFilterChanged(){this._filterChangeCounter.update(e=>e+1)}columnDefs=(0,y.EW)(()=>{const e=[{field:"value",headerName:this.labelValue(),flex:2,filter:u.U,valueGetter:n=>!n.data?.value&&n.data?.loading?"Loading...":n.data?.value||n.data?.entity},{field:"categories",headerName:this.labelCategories(),flex:1.5,filter:h.A,valueGetter:n=>{const i=n.data?.categories;if(!i)return n.data?.loading?"...":"";const a=Array.isArray(i)?i:[i],c=this._leafEntityCategoryIris();return(c?a.filter(b=>c.has(b)):a).map(b=>this._getEntityCategoryLabel(b)).join(", ")}}];return this.orderByMentionCount()&&e.push({field:"mentionCount",headerName:this.labelMentions(),flex:1,filter:"agNumberColumnFilter",valueGetter:n=>{const i=n.data;if(i?.loading)return"...";const a=i?.mentionCount??0;return a>0?a:""},cellStyle:{textAlign:"center"}}),e});rows=(0,y.EW)(()=>{const e=this.entities()||[],n=this.entityData()||{},i=e.map(a=>{const c=n[a];return{entity:a,value:c?.value,categories:c?.categories,mentionCount:c?.mentionCount,loading:!c}});return this.orderByMentionCount()?i.sort((a,c)=>(c.mentionCount||0)-(a.mentionCount||0)):i});_leafEntityCategoryIris=(0,y.EW)(()=>{const e=this.availableEntityCategories();if(!e)return null;const n=new Set(e.map(i=>i.parent).filter(i=>!!i));return new Set(e.filter(i=>!n.has(i.iri)).map(i=>i.iri))});_getEntityCategoryLabel(e){const n=this.availableEntityCategories();if(void 0!==n){const i=n.find(a=>a.iri===e);if(i)return i.label}return this._prettifyCategory(e)}_prettifyCategory(e){if(!e)return"";const n=e.split("#");return(n[n.length-1]||e).replace(/([A-Z])/g," $1").trim()}static \u0275fac=function(n){return new(n||l)};static \u0275prov=s.jDH({token:l,factory:l.\u0275fac,providedIn:"root"})}return l})();var T=o(5971),x=o(5448),F=o(2014),G=o(5381),t=o(5547);function j(l,I){if(1&l){const e=t.RV6();t.j41(0,"cue-flexcontainer",2)(1,"cue-button",5),t.bIt("click",function(){s.eBV(e);const i=t.XpG();return s.Njj(i.onOrderByMentionCountClick())}),t.nrm(2,"cue-button-padder"),t.j41(3,"cue-button-label"),t.EFF(4),t.nI1(5,"transloco"),t.k0s(),t.nrm(6,"cue-button-padder"),t.k0s()()}if(2&l){const e=t.XpG();t.R7$(),t.Y8G("tooltip",e.infoOrderByMentionCount()),t.R7$(3),t.JRh(t.bMT(5,2,"components.entityList.labelOrderByMentionCount"))}}function V(l,I){if(1&l){const e=t.RV6();t.j41(0,"cue-tab",1),t.nI1(1,"transloco"),t.j41(2,"cue-map",6),t.bIt("clickedFeature",function(i){s.eBV(e);const a=t.XpG();return s.Njj(a.onMapFeatureClick(i))}),t.k0s()()}if(2&l){t.XpG();const e=t.r8f(6),n=t.r8f(7);t.Y8G("label",t.bMT(1,3,"components.entityList.tabMap")),t.R7$(2),t.Y8G("layers",n)("settings",e)}}let z=(()=>{class l{map=(0,s.WQX)(r);table=(0,s.WQX)(_);entities=p.hFB.required();mapboxToken=(0,p.hFB)(void 0);handlers=p.hFB.required();availableEntityCategories=(0,p.hFB)(void 0);availableEntityRelationships=(0,p.hFB)();entityData=(0,p.hFB)({});paginationPageSize=(0,p.hFB)(10);prefetchPages=(0,p.hFB)(3);variant=(0,p.hFB)("none");rowClicked=(0,p.CGW)();clickedOpen=(0,p.CGW)();_gridApi=null;_requestedIris=new Set;_requestedLocationIris=new Set;_isSorted=!1;_pendingMapClickIri=(0,s.vPA)(null);_bufferedUntilIndex=(0,s.vPA)(0);_locationBufferedUntilIndex=0;_lastEntitiesKey="";_destroyed=!1;labelOpenInEntityViewer=(0,C.Xx)("components.entityList.labelOpenInEntityViewer");infoOrderByMentionCount=(0,C.Xx)("components.entityList.infoOrderByMentionCount");overlaySettings={...new L.K,mode:"row"};overlayActions=(0,y.EW)(()=>[{label:this.labelOpenInEntityViewer(),icon:"info",action:e=>{this.handlers().requestOpen?.(e.rowData),this.clickedOpen.emit(e.rowData)}}]);constructor(){(0,s.QZP)(()=>this.map.mapboxToken.set(this.mapboxToken())),(0,s.QZP)(()=>{const e=this.entityData();this.map.entityData.update(n=>{let i=!1;const a={...n};for(const[c,m]of Object.entries(e))(m.directMapGeometries?.length||m.indirectMapGeometries?.length)&&(a[c]={value:"",categories:[],directMapGeometries:m.directMapGeometries,indirectMapGeometries:m.indirectMapGeometries},i=!0);return i?a:n})}),(0,s.QZP)(()=>this.map.availableEntityRelationships.set(this.availableEntityRelationships()??[])),(0,s.QZP)(()=>this.table.availableEntityCategories.set(this.availableEntityCategories())),(0,s.QZP)(()=>this.table.entities.set(this.entities())),(0,s.QZP)(()=>this.table.entityData.set(this.entityData())),(0,s.QZP)(()=>{const e=this._pendingMapClickIri();if(!e)return;const n=this.entityData()[e];n&&(this._pendingMapClickIri.set(null),this.rowClicked.emit({entity:e,value:n.value,categories:n.categories,mentionCount:n.mentionCount,loading:!1}))}),(0,s.QZP)(()=>{const n=this.entities().join("|");if(n!==this._lastEntitiesKey)if(this._lastEntitiesKey=n,this._requestedIris.clear(),this._requestedLocationIris.clear(),this._bufferedUntilIndex.set(0),this._locationBufferedUntilIndex=0,this.handlers().checkHasLocations&&this.handlers().requestLocations){const i=(this.availableEntityCategories()??[]).map(a=>a.iri);this.handlers().checkHasLocations(i).then(a=>{a&&!this._destroyed&&this._requestLocationBatch()})}else this.handlers().requestLocations&&setTimeout(()=>this._requestLocationBatch())}),(0,s.QZP)(()=>{const e=this.table.orderByMentionCount(),n=this.table.filterChangeCounter();if(e||n>0){const c=this.entities().filter(m=>!this._requestedIris.has(m));c.length>0&&(c.forEach(m=>this._requestedIris.add(m)),this.handlers().requestData(c,e))}})}rowSelection={mode:"singleRow",checkboxes:!1,enableClickSelection:!0};onGridReady(e){this._gridApi=e,e.addEventListener("viewportChanged",()=>this._checkViewport()),e.addEventListener("modelUpdated",()=>this._checkViewport()),e.addEventListener("paginationChanged",()=>this._checkViewport()),e.addEventListener("sortChanged",()=>{const n=e.getColumnState();this._isSorted=n.some(i=>null!=i.sort),this._isSorted&&this._requestAllUnloaded()}),e.addEventListener("filterChanged",()=>{this.table.onFilterChanged()}),setTimeout(()=>this._checkViewport(),100)}onMapFeatureClick(e){var n=this;return(0,M.A)(function*(){const a=e.feature.properties?.iri;a&&(n._pendingMapClickIri.set(a),yield n.handlers().requestData?.([a],n.table.orderByMentionCount()))})()}_checkViewport(){if(!this._gridApi||this._gridApi.isDestroyed?.())return;if(this._isSorted)return void this._requestAllUnloaded();const e=this.entities(),n=e.length;if(!n)return;const i=Math.max(1,this._gridApi.paginationGetPageSize?.()??this.paginationPageSize()),c=Math.max(0,this._gridApi.paginationGetCurrentPage?.()??0)*i,m=Math.min(n,c+i),b=this._bufferedUntilIndex();let D=null;if(0===b?D=0:(c>=Math.max(0,b-i)||m>b)&&(D=b),null===D||D>=n)return;const A=i*Math.max(1,this.prefetchPages()),w=Math.min(n,D+A),W=e.slice(D,w).filter(O=>!this._requestedIris.has(O));this._bufferedUntilIndex.set(Math.max(b,w)),W.length&&(W.forEach(O=>this._requestedIris.add(O)),setTimeout(()=>this.handlers().requestData(W,this.table.orderByMentionCount())))}_requestLocationBatch(){if(!this.handlers().requestLocations)return;const e=this.entities(),n=e.length;if(this._locationBufferedUntilIndex>=n)return;const a=Math.min(n,this._locationBufferedUntilIndex+500),c=e.slice(this._locationBufferedUntilIndex,a).filter(m=>!this._requestedLocationIris.has(m));this._locationBufferedUntilIndex=a,c.length>0&&(c.forEach(m=>this._requestedLocationIris.add(m)),setTimeout(()=>this.handlers().requestLocations(c))),a<n&&!this._destroyed&&setTimeout(()=>this._requestLocationBatch(),200)}ngOnDestroy(){this._destroyed=!0,this._gridApi=null}_requestAllUnloaded(){if(!this._gridApi)return;const e=[];if(this._gridApi.forEachNode(n=>{const i=n.data;i?.loading&&!this._requestedIris.has(i.entity)&&e.push(i.entity)}),e.length>0){const n=Array.from(new Set(e));n.forEach(i=>this._requestedIris.add(i)),this.handlers().requestData(n,this.table.orderByMentionCount())}}onOrderByMentionCountClick(){this.table.orderByMentionCount.set(!this.table.orderByMentionCount())}static \u0275fac=function(n){return new(n||l)};static \u0275cmp=t.VBU({type:l,selectors:[["cue-ent-list-inner"]],inputs:{entities:[1,"entities"],mapboxToken:[1,"mapboxToken"],handlers:[1,"handlers"],availableEntityCategories:[1,"availableEntityCategories"],availableEntityRelationships:[1,"availableEntityRelationships"],entityData:[1,"entityData"],paginationPageSize:[1,"paginationPageSize"],prefetchPages:[1,"prefetchPages"],variant:[1,"variant"]},outputs:{rowClicked:"rowClicked",clickedOpen:"clickedOpen"},features:[t.Jv_([k.u,P.M,R.B,r,_])],decls:9,vars:14,consts:[[2,"position","relative","width","100%","height","100%","display","flex","flex-direction","column","gap","12px",3,"variant"],[3,"label"],["direction","row","justify","end",2,"width","100%","padding-bottom","6px"],[2,"flex","1","min-height","0","position","relative","display","flex","flex-direction","column"],["height","100%",2,"flex","1","min-height","0",3,"gridApiReady","selectedRows","columnDefs","rowData","rowSelection","paginationPageSize","overlaySettings","overlayActions"],["size","xs","variant","secondary",3,"click","tooltip"],[3,"clickedFeature","layers","settings"]],template:function(n,i){if(1&n&&(t.j41(0,"cue-tabs",0)(1,"cue-tab",1),t.nI1(2,"transloco"),t.nVh(3,j,7,4,"cue-flexcontainer",2),t.j41(4,"div",3)(5,"cue-ag-grid",4),t.bIt("gridApiReady",function(c){return i.onGridReady(c)})("selectedRows",function(c){return c[0]&&i.rowClicked.emit(c[0])}),t.k0s()()(),t.SS7(6)(7),t.nVh(8,V,3,5,"cue-tab",1),t.k0s()),2&n){t.Y8G("variant",i.variant()),t.R7$(),t.Y8G("label",t.bMT(2,10,"components.entityList.tabList")),t.R7$(2),t.vxM(i.table.orderByMentionCount()?-1:3),t.R7$(2),t.Y8G("columnDefs",i.table.columnDefs())("rowData",i.table.rows())("rowSelection",i.rowSelection)("paginationPageSize",i.paginationPageSize())("overlaySettings",i.overlaySettings)("overlayActions",i.overlayActions()),t.R7$();const a=t.bH3(i.map.settings());t.R7$();const c=t.bH3(i.map.layers());t.R7$(),t.vxM(c.length>0&&a?8:-1)}},dependencies:[B.R,d.t,g.o,E.T,T.Button,x.ButtonLabel,F.ButtonPadder,G.n,C.Kj],styles:["[_nghost-%COMP%]{display:block;width:100%;height:100%}"],changeDetection:0})}return l})();var U=o(2245),X=o(9769),K=o(7851),$=o(7293);function Y(l,I){if(1&l&&(t.j41(0,"cue-flexcontainer",2)(1,"cue-typography",4),t.EFF(2),t.k0s()()),2&l){const e=t.XpG(2);t.R7$(2),t.SpI(" ",e.errorMessage()," ")}}function q(l,I){if(1&l){const e=t.RV6();t.j41(0,"cue-ent-list-inner",7),t.bIt("rowClicked",function(i){s.eBV(e);const a=t.XpG(3);return s.Njj(a.rowClicked.emit(i))})("clickedOpen",function(i){s.eBV(e);const a=t.XpG(3);return s.Njj(a.clickedOpen.emit(i))}),t.k0s()}if(2&l){const e=t.XpG(3);t.Y8G("entities",e._displayIris())("entityData",e.entityData())("handlers",e.handlers())("mapboxToken",e.mapboxToken())("paginationPageSize",e.paginationPageSize())("variant",e.variant())}}function Q(l,I){1&l&&(t.j41(0,"cue-flexcontainer",2)(1,"cue-typography",8),t.EFF(2," No project connected. "),t.k0s()())}function Z(l,I){if(1&l&&t.nrm(0,"cue-logo-link",6),2&l){let e;const n=t.XpG(3);t.Y8G("projectId",null==(e=n.sdkState())?null:e.projectId)}}function H(l,I){if(1&l&&(t.j41(0,"div",3),t.nVh(1,q,1,6,"cue-ent-list-inner",5)(2,Q,3,0,"cue-flexcontainer",2),t.nVh(3,Z,1,1,"cue-logo-link",6),t.k0s()),2&l){const e=t.XpG(2);t.Y8G("cueLogoLoader","loading"===e.state()),t.R7$(),t.vxM(e.handlers()?1:"loading"!==e.state()?2:-1),t.R7$(2),t.vxM(e.showLogo()?3:-1)}}function J(l,I){if(1&l&&t.nVh(0,Y,3,1,"cue-flexcontainer",2)(1,H,4,3,"div",3),2&l){const e=t.XpG();t.vxM("error"===e.state()?0:1)}}let ee=(()=>{class l{iris=(0,p.hFB)([]);categoryIris=(0,p.hFB)(void 0);sdkState=(0,p.hFB)(void 0);mapboxToken=(0,p.hFB)(void 0);paginationPageSize=(0,p.hFB)(10,{transform:p.Udg});variant=(0,p.hFB)("none");showLogo=(0,p.hFB)(!1,{transform:p.L39});rowClicked=(0,p.CGW)();clickedOpen=(0,p.CGW)();state=(0,s.vPA)("idle");errorMessage=(0,s.vPA)(null);entityData=(0,s.vPA)({});_entities=(0,s.vPA)(void 0);_categoryResolvedIris=(0,s.vPA)([]);_displayIris=(0,y.EW)(()=>void 0!==this.categoryIris()?this._categoryResolvedIris():this.iris());_unsubscribe;_inputWarningTimer;handlers=(0,y.EW)(()=>{var e=this;const n=this._entities();if(n)return{requestData:(i,a)=>{const c=i.map(m=>m.split("/").pop()).filter(Boolean);n.requestEntityData(c,a)},requestLocations:i=>{if(!this.mapboxToken())return void console.warn("[cue-entity-list] No mapboxToken provided \u2014 skipping map location fetch.");const a=i.map(c=>c.split("/").pop()).filter(Boolean);n.requestEntityLocations(a)},checkHasLocations:(i=(0,M.A)(function*(a){const c=e.sdkState()?.cue,m=e.sdkState()?.projectId;if(!(e.mapboxToken()&&c&&m&&a.length))return!1;const D=`PREFIX qcy: <https://dev.qaecy.com/ont#>\nASK WHERE {\n ?entity qcy:hasEntityCategory ?cat .\n FILTER(?cat IN (${a.map(A=>`<${A}>`).join(" ")}))\n { ?entity qcy:similarTo ?osm . FILTER(STRSTARTS(STR(?osm), "https://www.openstreetmap.org/")) }\n UNION\n { ?entity qcy:relatedEntity ?loc . ?loc qcy:similarTo ?osm . FILTER(STRSTARTS(STR(?osm), "https://www.openstreetmap.org/")) }\n}`;try{return!0===(yield c.api.sparql(D,m))?.boolean}catch{return!1}}),function(c){return i.apply(this,arguments)})};var i});constructor(){this._inputWarningTimer=setTimeout(()=>{this.sdkState()||console.warn('[cue-entity-list] Required input "sdkState" is not set. Pass a { entities: CueProjectEntities } (or include a `cue` instance) object to load entity data.')},3e3),(0,s.QZP)(()=>{this._setupEntities(this.sdkState()?.entities)}),(0,s.QZP)(()=>{const e=this.categoryIris(),n=this._entities();void 0!==e&&this._fetchByCategories(e,n)})}ngOnDestroy(){clearTimeout(this._inputWarningTimer),this._teardown()}_setupEntities(e){if(this._teardown(),!e)return this._entities.set(void 0),this.entityData.set({}),void this.state.set("idle");this._entities.set(e),this.state.set("ready"),this._syncEntityData(e),this._unsubscribe=e.entityInfoMap.subscribe(()=>{this._syncEntityData(e)})}_syncEntityData(e){const n=e.entityInfoMap.get(),i={};for(const a of Object.keys(n)){const c=n[a],m=Array.isArray(c.documentRefs)?c.documentRefs.map(b=>"string"==typeof b?{id:b}:b):c.documentRefs;i[e.entityIri(a)]={...c,documentRefs:m}}this.entityData.set(i)}_fetchByCategories(e,n){var i=this;return(0,M.A)(function*(){if(n&&e.length){i.state.set("loading");try{const a=yield n.entitiesByCategory(e);i._categoryResolvedIris.set(a.map(c=>c.iri)),i.state.set("ready")}catch(a){console.error("[cue-entity-list] Failed to fetch entities by category",a),i.errorMessage.set("Failed to load entities for the given categories."),i.state.set("error")}}else i._categoryResolvedIris.set([])})()}_teardown(){this._unsubscribe?.(),this._unsubscribe=void 0}static \u0275fac=function(n){return new(n||l)};static \u0275cmp=t.VBU({type:l,selectors:[["cue-entity-list"]],inputs:{iris:[1,"iris"],categoryIris:[1,"categoryIris"],sdkState:[1,"sdkState"],mapboxToken:[1,"mapboxToken"],paginationPageSize:[1,"paginationPageSize"],variant:[1,"variant"],showLogo:[1,"showLogo"]},outputs:{rowClicked:"rowClicked",clickedOpen:"clickedOpen"},decls:3,vars:1,consts:[["body",""],[3,"ngTemplateOutlet"],["direction","column","align","center","justify","center",2,"height","100%","width","100%","padding","8px"],[2,"position","relative","height","100%","width","100%",3,"cueLogoLoader"],[2,"color","#c44","font-size","13px"],[2,"height","100%",3,"entities","entityData","handlers","mapboxToken","paginationPageSize","variant"],[2,"position","absolute","top","12px","right","12px","z-index","5",3,"projectId"],[2,"height","100%",3,"rowClicked","clickedOpen","entities","entityData","handlers","mapboxToken","paginationPageSize","variant"],[2,"color","#9ca3af","font-size","13px"]],template:function(n,i){if(1&n&&(t.DNE(0,J,2,1,"ng-template",null,0,t.C5r),t.eu8(2,1)),2&n){const a=t.sdS(1);t.R7$(2),t.Y8G("ngTemplateOutlet",a)}},dependencies:[z,G.n,U.Typography,X.T3,K.k,$.x],styles:["[_nghost-%COMP%]{display:block;width:100%;height:100%}"],changeDetection:0})}return l})()}}]);
package/89.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[89],{7089(di,Cr,Xe){Xe.d(Cr,{d:()=>ai});var Lt=Xe(5802),Rt=Xe(5547),Me=Xe(7705);function U(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function de(e){return e instanceof U(e).Element||e instanceof Element}function X(e){return e instanceof U(e).HTMLElement||e instanceof HTMLElement}function lt(e){return!(typeof ShadowRoot>"u")&&(e instanceof U(e).ShadowRoot||e instanceof ShadowRoot)}var ve=Math.max,Ye=Math.min,we=Math.round;function dt(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function jt(){return!/^((?!chrome|android).)*safari/i.test(dt())}function Oe(e,t,r){void 0===t&&(t=!1),void 0===r&&(r=!1);var i=e.getBoundingClientRect(),o=1,a=1;t&&X(e)&&(o=e.offsetWidth>0&&we(i.width)/e.offsetWidth||1,a=e.offsetHeight>0&&we(i.height)/e.offsetHeight||1);var u=(de(e)?U(e):window).visualViewport,f=!jt()&&r,l=(i.left+(f&&u?u.offsetLeft:0))/o,c=(i.top+(f&&u?u.offsetTop:0))/a,E=i.width/o,O=i.height/a;return{width:E,height:O,top:c,right:l+E,bottom:c+O,left:l,x:l,y:c}}function vt(e){var t=U(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function K(e){return e?(e.nodeName||"").toLowerCase():null}function se(e){return((de(e)?e.ownerDocument:e.document)||window.document).documentElement}function mt(e){return Oe(se(e)).left+vt(e).scrollLeft}function re(e){return U(e).getComputedStyle(e)}function ht(e){var t=re(e);return/auto|scroll|overlay|hidden/.test(t.overflow+t.overflowY+t.overflowX)}function Sr(e,t,r){void 0===r&&(r=!1);var i=X(t),o=X(t)&&function Pr(e){var t=e.getBoundingClientRect(),r=we(t.width)/e.offsetWidth||1,i=we(t.height)/e.offsetHeight||1;return 1!==r||1!==i}(t),a=se(t),s=Oe(e,o,r),u={scrollLeft:0,scrollTop:0},f={x:0,y:0};return(i||!i&&!r)&&(("body"!==K(t)||ht(a))&&(u=function Dr(e){return e!==U(e)&&X(e)?function Ar(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}(e):vt(e)}(t)),X(t)?((f=Oe(t,!0)).x+=t.clientLeft,f.y+=t.clientTop):a&&(f.x=mt(a))),{x:s.left+u.scrollLeft-f.x,y:s.top+u.scrollTop-f.y,width:s.width,height:s.height}}function gt(e){var t=Oe(e),r=e.offsetWidth,i=e.offsetHeight;return Math.abs(t.width-r)<=1&&(r=t.width),Math.abs(t.height-i)<=1&&(i=t.height),{x:e.offsetLeft,y:e.offsetTop,width:r,height:i}}function ze(e){return"html"===K(e)?e:e.assignedSlot||e.parentNode||(lt(e)?e.host:null)||se(e)}function Bt(e){return["html","body","#document"].indexOf(K(e))>=0?e.ownerDocument.body:X(e)&&ht(e)?e:Bt(ze(e))}function Le(e,t){var r;void 0===t&&(t=[]);var i=Bt(e),o=i===(null==(r=e.ownerDocument)?void 0:r.body),a=U(i),s=o?[a].concat(a.visualViewport||[],ht(i)?i:[]):i,u=t.concat(s);return o?u:u.concat(Le(ze(s)))}function Mr(e){return["table","td","th"].indexOf(K(e))>=0}function kt(e){return X(e)&&"fixed"!==re(e).position?e.offsetParent:null}function Re(e){for(var t=U(e),r=kt(e);r&&Mr(r)&&"static"===re(r).position;)r=kt(r);return r&&("html"===K(r)||"body"===K(r)&&"static"===re(r).position)?t:r||function Lr(e){var t=/firefox/i.test(dt());if(/Trident/i.test(dt())&&X(e)&&"fixed"===re(e).position)return null;var o=ze(e);for(lt(o)&&(o=o.host);X(o)&&["html","body"].indexOf(K(o))<0;){var a=re(o);if("none"!==a.transform||"none"!==a.perspective||"paint"===a.contain||-1!==["transform","perspective"].indexOf(a.willChange)||t&&"filter"===a.willChange||t&&a.filter&&"none"!==a.filter)return o;o=o.parentNode}return null}(e)||t}var H="top",Y="bottom",z="right",W="left",yt="auto",je=[H,Y,z,W],xe="start",Be="end",It="viewport",ke="popper",Vt=je.reduce(function(e,t){return e.concat([t+"-"+xe,t+"-"+Be])},[]),Nt=[].concat(je,[yt]).reduce(function(e,t){return e.concat([t,t+"-"+xe,t+"-"+Be])},[]),Ur=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function _r(e){var t=new Map,r=new Set,i=[];function o(a){r.add(a.name),[].concat(a.requires||[],a.requiresIfExists||[]).forEach(function(u){if(!r.has(u)){var f=t.get(u);f&&o(f)}}),i.push(a)}return e.forEach(function(a){t.set(a.name,a)}),e.forEach(function(a){r.has(a.name)||o(a)}),i}function Yr(e){var t;return function(){return t||(t=new Promise(function(r){Promise.resolve().then(function(){t=void 0,r(e())})})),t}}var Ft={placement:"bottom",modifiers:[],strategy:"absolute"};function Ht(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return!t.some(function(i){return!(i&&"function"==typeof i.getBoundingClientRect)})}function qr(e){void 0===e&&(e={});var r=e.defaultModifiers,i=void 0===r?[]:r,o=e.defaultOptions,a=void 0===o?Ft:o;return function(u,f,l){void 0===l&&(l=a);var c={placement:"bottom",orderedModifiers:[],options:Object.assign({},Ft,a),modifiersData:{},elements:{reference:u,popper:f},attributes:{},styles:{}},E=[],O=!1,y={state:c,setOptions:function(d){var x="function"==typeof d?d(c.options):d;h(),c.options=Object.assign({},a,c.options,x),c.scrollParents={reference:de(u)?Le(u):u.contextElement?Le(u.contextElement):[],popper:Le(f)};var C=function Xr(e){var t=_r(e);return Ur.reduce(function(r,i){return r.concat(t.filter(function(o){return o.phase===i}))},[])}(function zr(e){var t=e.reduce(function(r,i){var o=r[i.name];return r[i.name]=o?Object.assign({},o,i,{options:Object.assign({},o.options,i.options),data:Object.assign({},o.data,i.data)}):i,r},{});return Object.keys(t).map(function(r){return t[r]})}([].concat(i,c.options.modifiers)));return c.orderedModifiers=C.filter(function(n){return n.enabled}),function w(){c.orderedModifiers.forEach(function(m){var x=m.options,n=m.effect;if("function"==typeof n){var g=n({state:c,name:m.name,instance:y,options:void 0===x?{}:x});E.push(g||function(){})}})}(),y.update()},forceUpdate:function(){if(!O){var d=c.elements,x=d.reference,C=d.popper;if(Ht(x,C)){c.rects={reference:Sr(x,Re(C),"fixed"===c.options.strategy),popper:gt(C)},c.reset=!1,c.placement=c.options.placement,c.orderedModifiers.forEach(function(L){return c.modifiersData[L.name]=Object.assign({},L.data)});for(var n=0;n<c.orderedModifiers.length;n++)if(!0!==c.reset){var g=c.orderedModifiers[n],v=g.fn,A=g.options;"function"==typeof v&&(c=v({state:c,options:void 0===A?{}:A,name:g.name,instance:y})||c)}else c.reset=!1,n=-1}}},update:Yr(function(){return new Promise(function(m){y.forceUpdate(),m(c)})}),destroy:function(){h(),O=!0}};if(!Ht(u,f))return y;function h(){E.forEach(function(m){return m()}),E=[]}return y.setOptions(l).then(function(m){!O&&l.onFirstUpdate&&l.onFirstUpdate(m)}),y}}var qe={passive:!0};function Q(e){return e.split("-")[0]}function Ee(e){return e.split("-")[1]}function bt(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Wt(e){var f,t=e.reference,r=e.element,i=e.placement,o=i?Q(i):null,a=i?Ee(i):null,s=t.x+t.width/2-r.width/2,u=t.y+t.height/2-r.height/2;switch(o){case H:f={x:s,y:t.y-r.height};break;case Y:f={x:s,y:t.y+t.height};break;case z:f={x:t.x+t.width,y:u};break;case W:f={x:t.x-r.width,y:u};break;default:f={x:t.x,y:t.y}}var l=o?bt(o):null;if(null!=l){var c="y"===l?"height":"width";switch(a){case xe:f[l]=f[l]-(t[c]/2-r[c]/2);break;case Be:f[l]=f[l]+(t[c]/2-r[c]/2)}}return f}var Zr={top:"auto",right:"auto",bottom:"auto",left:"auto"};function $t(e){var t,r=e.popper,i=e.popperRect,o=e.placement,a=e.variation,s=e.offsets,u=e.position,f=e.gpuAcceleration,l=e.adaptive,c=e.roundOffsets,E=e.isFixed,O=s.x,y=void 0===O?0:O,w=s.y,h=void 0===w?0:w,m="function"==typeof c?c({x:y,y:h}):{x:y,y:h};y=m.x,h=m.y;var d=s.hasOwnProperty("x"),x=s.hasOwnProperty("y"),C=W,n=H,g=window;if(l){var v=Re(r),A="clientHeight",P="clientWidth";v===U(r)&&"static"!==re(v=se(r)).position&&"absolute"===u&&(A="scrollHeight",P="scrollWidth"),(o===H||(o===W||o===z)&&a===Be)&&(n=Y,h-=(E&&v===g&&g.visualViewport?g.visualViewport.height:v[A])-i.height,h*=f?1:-1),o!==W&&(o!==H&&o!==Y||a!==Be)||(C=z,y-=(E&&v===g&&g.visualViewport?g.visualViewport.width:v[P])-i.width,y*=f?1:-1)}var R,B=Object.assign({position:u},l&&Zr),j=!0===c?function en(e,t){var i=e.y,o=t.devicePixelRatio||1;return{x:we(e.x*o)/o||0,y:we(i*o)/o||0}}({x:y,y:h},U(r)):{x:y,y:h};return y=j.x,h=j.y,Object.assign({},B,f?((R={})[n]=x?"0":"",R[C]=d?"0":"",R.transform=(g.devicePixelRatio||1)<=1?"translate("+y+"px, "+h+"px)":"translate3d("+y+"px, "+h+"px, 0)",R):((t={})[n]=x?h+"px":"",t[C]=d?y+"px":"",t.transform="",t))}const Ut={name:"applyStyles",enabled:!0,phase:"write",fn:function nn(e){var t=e.state;Object.keys(t.elements).forEach(function(r){var i=t.styles[r]||{},o=t.attributes[r]||{},a=t.elements[r];!X(a)||!K(a)||(Object.assign(a.style,i),Object.keys(o).forEach(function(s){var u=o[s];!1===u?a.removeAttribute(s):a.setAttribute(s,!0===u?"":u)}))})},effect:function on(e){var t=e.state,r={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,r.popper),t.styles=r,t.elements.arrow&&Object.assign(t.elements.arrow.style,r.arrow),function(){Object.keys(t.elements).forEach(function(i){var o=t.elements[i],a=t.attributes[i]||{},u=Object.keys(t.styles.hasOwnProperty(i)?t.styles[i]:r[i]).reduce(function(f,l){return f[l]="",f},{});!X(o)||!K(o)||(Object.assign(o.style,u),Object.keys(a).forEach(function(f){o.removeAttribute(f)}))})}},requires:["computeStyles"]};var fn={left:"right",right:"left",bottom:"top",top:"bottom"};function Ge(e){return e.replace(/left|right|bottom|top/g,function(t){return fn[t]})}var pn={start:"end",end:"start"};function _t(e){return e.replace(/start|end/g,function(t){return pn[t]})}function Xt(e,t){var r=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(r&&lt(r)){var i=t;do{if(i&&e.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function wt(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Yt(e,t,r){return t===It?wt(function cn(e,t){var r=U(e),i=se(e),o=r.visualViewport,a=i.clientWidth,s=i.clientHeight,u=0,f=0;if(o){a=o.width,s=o.height;var l=jt();(l||!l&&"fixed"===t)&&(u=o.offsetLeft,f=o.offsetTop)}return{width:a,height:s,x:u+mt(e),y:f}}(e,r)):de(t)?function dn(e,t){var r=Oe(e,!1,"fixed"===t);return r.top=r.top+e.clientTop,r.left=r.left+e.clientLeft,r.bottom=r.top+e.clientHeight,r.right=r.left+e.clientWidth,r.width=e.clientWidth,r.height=e.clientHeight,r.x=r.left,r.y=r.top,r}(t,r):wt(function ln(e){var t,r=se(e),i=vt(e),o=null==(t=e.ownerDocument)?void 0:t.body,a=ve(r.scrollWidth,r.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),s=ve(r.scrollHeight,r.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),u=-i.scrollLeft+mt(e),f=-i.scrollTop;return"rtl"===re(o||r).direction&&(u+=ve(r.clientWidth,o?o.clientWidth:0)-a),{width:a,height:s,x:u,y:f}}(se(e)))}function qt(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function Gt(e,t){return t.reduce(function(r,i){return r[i]=e,r},{})}function Ie(e,t){void 0===t&&(t={});var i=t.placement,o=void 0===i?e.placement:i,a=t.strategy,s=void 0===a?e.strategy:a,u=t.boundary,f=void 0===u?"clippingParents":u,l=t.rootBoundary,c=void 0===l?It:l,E=t.elementContext,O=void 0===E?ke:E,y=t.altBoundary,w=void 0!==y&&y,h=t.padding,m=void 0===h?0:h,d=qt("number"!=typeof m?m:Gt(m,je)),C=e.rects.popper,n=e.elements[w?O===ke?"reference":ke:O],g=function mn(e,t,r,i){var o="clippingParents"===t?function vn(e){var t=Le(ze(e)),i=["absolute","fixed"].indexOf(re(e).position)>=0&&X(e)?Re(e):e;return de(i)?t.filter(function(o){return de(o)&&Xt(o,i)&&"body"!==K(o)}):[]}(e):[].concat(t),a=[].concat(o,[r]),u=a.reduce(function(f,l){var c=Yt(e,l,i);return f.top=ve(c.top,f.top),f.right=Ye(c.right,f.right),f.bottom=Ye(c.bottom,f.bottom),f.left=ve(c.left,f.left),f},Yt(e,a[0],i));return u.width=u.right-u.left,u.height=u.bottom-u.top,u.x=u.left,u.y=u.top,u}(de(n)?n:n.contextElement||se(e.elements.popper),f,c,s),v=Oe(e.elements.reference),A=Wt({reference:v,element:C,strategy:"absolute",placement:o}),P=wt(Object.assign({},C,A)),M=O===ke?P:v,L={top:g.top-M.top+d.top,bottom:M.bottom-g.bottom+d.bottom,left:g.left-M.left+d.left,right:M.right-g.right+d.right},B=e.modifiersData.offset;if(O===ke&&B){var j=B[o];Object.keys(L).forEach(function(R){var I=[z,Y].indexOf(R)>=0?1:-1,_=[H,Y].indexOf(R)>=0?"y":"x";L[R]+=j[_]*I})}return L}function Ve(e,t,r){return ve(e,Ye(t,r))}function Kt(e,t,r){return void 0===r&&(r={x:0,y:0}),{top:e.top-t.height-r.y,right:e.right-t.width+r.x,bottom:e.bottom-t.height+r.y,left:e.left-t.width-r.x}}function Qt(e){return[H,z,Y,W].some(function(t){return e[t]>=0})}var Mn=qr({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function Gr(e){var t=e.state,r=e.instance,i=e.options,o=i.scroll,a=void 0===o||o,s=i.resize,u=void 0===s||s,f=U(t.elements.popper),l=[].concat(t.scrollParents.reference,t.scrollParents.popper);return a&&l.forEach(function(c){c.addEventListener("scroll",r.update,qe)}),u&&f.addEventListener("resize",r.update,qe),function(){a&&l.forEach(function(c){c.removeEventListener("scroll",r.update,qe)}),u&&f.removeEventListener("resize",r.update,qe)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function Qr(e){var t=e.state;t.modifiersData[e.name]=Wt({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function tn(e){var t=e.state,r=e.options,i=r.gpuAcceleration,o=void 0===i||i,a=r.adaptive,s=void 0===a||a,u=r.roundOffsets,f=void 0===u||u,l={placement:Q(t.placement),variation:Ee(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,$t(Object.assign({},l,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:s,roundOffsets:f})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,$t(Object.assign({},l,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:f})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},Ut,{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function sn(e){var t=e.state,i=e.name,o=e.options.offset,a=void 0===o?[0,0]:o,s=Nt.reduce(function(c,E){return c[E]=function an(e,t,r){var i=Q(e),o=[W,H].indexOf(i)>=0?-1:1,a="function"==typeof r?r(Object.assign({},t,{placement:e})):r,s=a[0],u=a[1];return s=s||0,u=(u||0)*o,[W,z].indexOf(i)>=0?{x:u,y:s}:{x:s,y:u}}(E,t.rects,a),c},{}),u=s[t.placement],l=u.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=u.x,t.modifiersData.popperOffsets.y+=l),t.modifiersData[i]=s}},{name:"flip",enabled:!0,phase:"main",fn:function yn(e){var t=e.state,r=e.options,i=e.name;if(!t.modifiersData[i]._skip){for(var o=r.mainAxis,a=void 0===o||o,s=r.altAxis,u=void 0===s||s,f=r.fallbackPlacements,l=r.padding,c=r.boundary,E=r.rootBoundary,O=r.altBoundary,y=r.flipVariations,w=void 0===y||y,h=r.allowedAutoPlacements,m=t.options.placement,d=Q(m),C=f||(d!==m&&w?function gn(e){if(Q(e)===yt)return[];var t=Ge(e);return[_t(e),t,_t(t)]}(m):[Ge(m)]),n=[m].concat(C).reduce(function(ne,G){return ne.concat(Q(G)===yt?function hn(e,t){void 0===t&&(t={});var o=t.boundary,a=t.rootBoundary,s=t.padding,u=t.flipVariations,f=t.allowedAutoPlacements,l=void 0===f?Nt:f,c=Ee(t.placement),E=c?u?Vt:Vt.filter(function(w){return Ee(w)===c}):je,O=E.filter(function(w){return l.indexOf(w)>=0});0===O.length&&(O=E);var y=O.reduce(function(w,h){return w[h]=Ie(e,{placement:h,boundary:o,rootBoundary:a,padding:s})[Q(h)],w},{});return Object.keys(y).sort(function(w,h){return y[w]-y[h]})}(t,{placement:G,boundary:c,rootBoundary:E,padding:l,flipVariations:w,allowedAutoPlacements:h}):G)},[]),g=t.rects.reference,v=t.rects.popper,A=new Map,P=!0,M=n[0],L=0;L<n.length;L++){var B=n[L],j=Q(B),R=Ee(B)===xe,I=[H,Y].indexOf(j)>=0,_=I?"width":"height",V=Ie(t,{placement:B,boundary:c,rootBoundary:E,altBoundary:O,padding:l}),N=I?R?z:W:R?Y:H;g[_]>v[_]&&(N=Ge(N));var k=Ge(N),Z=[];if(a&&Z.push(V[j]<=0),u&&Z.push(V[N]<=0,V[k]<=0),Z.every(function(ne){return ne})){M=B,P=!1;break}A.set(B,Z)}if(P)for(var he=function(G){var ie=n.find(function(Ce){var oe=A.get(Ce);if(oe)return oe.slice(0,G).every(function(Ae){return Ae})});if(ie)return M=ie,"break"},te=w?3:1;te>0&&"break"!==he(te);te--);t.placement!==M&&(t.modifiersData[i]._skip=!0,t.placement=M,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:function xn(e){var t=e.state,r=e.options,i=e.name,o=r.mainAxis,a=void 0===o||o,s=r.altAxis,u=void 0!==s&&s,O=r.tether,y=void 0===O||O,w=r.tetherOffset,h=void 0===w?0:w,m=Ie(t,{boundary:r.boundary,rootBoundary:r.rootBoundary,padding:r.padding,altBoundary:r.altBoundary}),d=Q(t.placement),x=Ee(t.placement),C=!x,n=bt(d),g=function wn(e){return"x"===e?"y":"x"}(n),v=t.modifiersData.popperOffsets,A=t.rects.reference,P=t.rects.popper,M="function"==typeof h?h(Object.assign({},t.rects,{placement:t.placement})):h,L="number"==typeof M?{mainAxis:M,altAxis:M}:Object.assign({mainAxis:0,altAxis:0},M),B=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,j={x:0,y:0};if(v){if(a){var R,I="y"===n?H:W,_="y"===n?Y:z,V="y"===n?"height":"width",N=v[n],k=N+m[I],Z=N-m[_],ee=y?-P[V]/2:0,he=x===xe?A[V]:P[V],te=x===xe?-P[V]:-A[V],ge=t.elements.arrow,ne=y&&ge?gt(ge):{width:0,height:0},G=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},ie=G[I],Ce=G[_],oe=Ve(0,A[V],ne[V]),Ae=C?A[V]/2-ee-oe-ie-L.mainAxis:he-oe-ie-L.mainAxis,ce=C?-A[V]/2+ee+oe+Ce+L.mainAxis:te+oe+Ce+L.mainAxis,De=t.elements.arrow&&Re(t.elements.arrow),tt=De?"y"===n?De.clientTop||0:De.clientLeft||0:0,He=null!=(R=B?.[n])?R:0,nt=N+ce-He,We=Ve(y?Ye(k,N+Ae-He-tt):k,N,y?ve(Z,nt):Z);v[n]=We,j[n]=We-N}if(u){var $e,ae=v[g],le="y"===g?"height":"width",Ue=ae+m["x"===n?H:W],ye=ae-m["x"===n?Y:z],_e=-1!==[H,W].indexOf(d),at=null!=($e=B?.[g])?$e:0,st=_e?Ue:ae-A[le]-P[le]-at+L.altAxis,ut=_e?ae+A[le]+P[le]-at-L.altAxis:ye,ft=y&&_e?function On(e,t,r){var i=Ve(e,t,r);return i>r?r:i}(st,ae,ut):Ve(y?st:Ue,ae,y?ut:ye);v[g]=ft,j[g]=ft-ae}t.modifiersData[i]=j}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function Cn(e){var t,r=e.state,i=e.name,o=e.options,a=r.elements.arrow,s=r.modifiersData.popperOffsets,u=Q(r.placement),f=bt(u),c=[W,z].indexOf(u)>=0?"height":"width";if(a&&s){var E=function(t,r){return qt("number"!=typeof(t="function"==typeof t?t(Object.assign({},r.rects,{placement:r.placement})):t)?t:Gt(t,je))}(o.padding,r),O=gt(a),y="y"===f?H:W,w="y"===f?Y:z,h=r.rects.reference[c]+r.rects.reference[f]-s[f]-r.rects.popper[c],m=s[f]-r.rects.reference[f],d=Re(a),x=d?"y"===f?d.clientHeight||0:d.clientWidth||0:0,v=x/2-O[c]/2+(h/2-m/2),A=Ve(E[y],v,x-O[c]-E[w]);r.modifiersData[i]=((t={})[f]=A,t.centerOffset=A-v,t)}},effect:function An(e){var t=e.state,i=e.options.element,o=void 0===i?"[data-popper-arrow]":i;null!=o&&("string"==typeof o&&!(o=t.elements.popper.querySelector(o))||Xt(t.elements.popper,o)&&(t.elements.arrow=o))},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function Pn(e){var t=e.state,r=e.name,i=t.rects.reference,o=t.rects.popper,a=t.modifiersData.preventOverflow,s=Ie(t,{elementContext:"reference"}),u=Ie(t,{altBoundary:!0}),f=Kt(s,i),l=Kt(u,o,a),c=Qt(f),E=Qt(l);t.modifiersData[r]={referenceClippingOffsets:f,popperEscapeOffsets:l,isReferenceHidden:c,hasPopperEscaped:E},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":E})}}]}),Jt="tippy-content",er="tippy-arrow",tr="tippy-svg-arrow",ue={passive:!0,capture:!0},rr=function(){return document.body};function Ot(e,t,r){return Array.isArray(e)?e[t]??(Array.isArray(r)?r[t]:r):e}function xt(e,t){var r={}.toString.call(e);return 0===r.indexOf("[object")&&r.indexOf(t+"]")>-1}function nr(e,t){return"function"==typeof e?e.apply(void 0,t):e}function ir(e,t){return 0===t?e:function(i){clearTimeout(r),r=setTimeout(function(){e(i)},t)};var r}function fe(e){return[].concat(e)}function or(e,t){-1===e.indexOf(t)&&e.push(t)}function Te(e){return[].slice.call(e)}function sr(e){return Object.keys(e).reduce(function(t,r){return void 0!==e[r]&&(t[r]=e[r]),t},{})}function me(){return document.createElement("div")}function Ke(e){return["Element","Fragment"].some(function(t){return xt(e,t)})}function Ct(e,t){e.forEach(function(r){r&&(r.style.transitionDuration=t+"ms")})}function Ne(e,t){e.forEach(function(r){r&&r.setAttribute("data-state",t)})}function At(e,t,r){var i=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(o){e[i](o,r)})}function pr(e,t){for(var r=t;r;){var i;if(e.contains(r))return!0;r=null==r.getRootNode||null==(i=r.getRootNode())?void 0:i.host}return!1}var J={isTouch:!1},cr=0;function Nn(){J.isTouch||(J.isTouch=!0,window.performance&&document.addEventListener("mousemove",lr))}function lr(){var e=performance.now();e-cr<20&&(J.isTouch=!1,document.removeEventListener("mousemove",lr)),cr=e}function Fn(){var e=document.activeElement;(function ur(e){return!(!e||!e._tippy||e._tippy.reference!==e)})(e)&&e.blur&&!e._tippy.state.isVisible&&e.blur()}var $n=!!(typeof window<"u"&&typeof document<"u")&&!!window.msCrypto,$=Object.assign({appendTo:rr,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},{animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},{allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999}),Yn=Object.keys($);function gr(e){var r=(e.plugins||[]).reduce(function(i,o){var u,a=o.name;return a&&(i[a]=void 0!==e[a]?e[a]:null!=(u=$[a])?u:o.defaultValue),i},{});return Object.assign({},e,r)}function yr(e,t){var r=Object.assign({},t,{content:nr(t.content,[e])},t.ignoreAttributes?{}:function qn(e,t){return(t?Object.keys(gr(Object.assign({},$,{plugins:t}))):Yn).reduce(function(o,a){var s=(e.getAttribute("data-tippy-"+a)||"").trim();if(!s)return o;if("content"===a)o[a]=s;else try{o[a]=JSON.parse(s)}catch{o[a]=s}return o},{})}(e,t.plugins));return r.aria=Object.assign({},$.aria,r.aria),r.aria={expanded:"auto"===r.aria.expanded?t.interactive:r.aria.expanded,content:"auto"===r.aria.content?t.interactive?null:"describedby":r.aria.content},r}function Dt(e,t){e.innerHTML=t}function br(e){var t=me();return!0===e?t.className=er:(t.className=tr,Ke(e)?t.appendChild(e):Dt(t,e)),t}function wr(e,t){Ke(t.content)?(Dt(e,""),e.appendChild(t.content)):"function"!=typeof t.content&&(t.allowHTML?Dt(e,t.content):e.textContent=t.content)}function Qe(e){var t=e.firstElementChild,r=Te(t.children);return{box:t,content:r.find(function(i){return i.classList.contains(Jt)}),arrow:r.find(function(i){return i.classList.contains(er)||i.classList.contains(tr)}),backdrop:r.find(function(i){return i.classList.contains("tippy-backdrop")})}}function Or(e){var t=me(),r=me();r.className="tippy-box",r.setAttribute("data-state","hidden"),r.setAttribute("tabindex","-1");var i=me();function o(a,s){var u=Qe(t),f=u.box,l=u.content,c=u.arrow;s.theme?f.setAttribute("data-theme",s.theme):f.removeAttribute("data-theme"),"string"==typeof s.animation?f.setAttribute("data-animation",s.animation):f.removeAttribute("data-animation"),s.inertia?f.setAttribute("data-inertia",""):f.removeAttribute("data-inertia"),f.style.maxWidth="number"==typeof s.maxWidth?s.maxWidth+"px":s.maxWidth,s.role?f.setAttribute("role",s.role):f.removeAttribute("role"),(a.content!==s.content||a.allowHTML!==s.allowHTML)&&wr(l,e.props),s.arrow?c?a.arrow!==s.arrow&&(f.removeChild(c),f.appendChild(br(s.arrow))):f.appendChild(br(s.arrow)):c&&f.removeChild(c)}return i.className=Jt,i.setAttribute("data-state","hidden"),wr(i,e.props),t.appendChild(r),r.appendChild(i),o(e.props,e.props),{popper:t,onUpdate:o}}Or.$$tippy=!0;var Kn=1,Je=[],Ze=[];function Qn(e,t){var i,o,a,c,E,O,h,r=yr(e,Object.assign({},$,gr(sr(t)))),s=!1,u=!1,f=!1,l=!1,y=[],w=ir(rt,r.interactiveDebounce),m=Kn++,x=function Bn(e){return e.filter(function(t,r){return e.indexOf(t)===r})}(r.plugins),n={id:m,reference:e,popper:me(),popperInstance:null,props:r,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:x,clearDelayTimeouts:function st(){clearTimeout(i),clearTimeout(o),cancelAnimationFrame(a)},setProps:function ut(p){if(!n.state.isDestroyed){k("onBeforeUpdate",[n,p]),tt();var b=n.props,T=yr(e,Object.assign({},b,sr(p),{ignoreAttributes:!0}));n.props=T,De(),b.interactiveDebounce!==T.interactiveDebounce&&(he(),w=ir(rt,T.interactiveDebounce)),b.triggerTarget&&!T.triggerTarget?fe(b.triggerTarget).forEach(function(S){S.removeAttribute("aria-expanded")}):T.triggerTarget&&e.removeAttribute("aria-expanded"),ee(),N(),A&&A(b,T),n.popperInstance&&(it(),le().forEach(function(S){requestAnimationFrame(S._tippy.popperInstance.forceUpdate)})),k("onAfterUpdate",[n,p])}},setContent:function ft(p){n.setProps({content:p})},show:function si(){var p=n.state.isVisible,b=n.state.isDestroyed,T=!n.state.isEnabled,S=J.isTouch&&!n.props.touch,D=Ot(n.props.duration,0,$.duration);if(!(p||b||T||S||R().hasAttribute("disabled")||(k("onShow",[n],!1),!1===n.props.onShow(n)))){if(n.state.isVisible=!0,j()&&(v.style.visibility="visible"),N(),G(),n.state.isMounted||(v.style.transition="none"),j()){var F=_();Ct([F.box,F.content],0)}O=function(){var be;if(n.state.isVisible&&!l){if(l=!0,v.style.transition=n.props.moveTransition,j()&&n.props.animation){var St=_(),pt=St.box,Se=St.content;Ct([pt,Se],D),Ne([pt,Se],"visible")}Z(),ee(),or(Ze,n),null==(be=n.popperInstance)||be.forceUpdate(),k("onMount",[n]),n.props.animation&&j()&&function oe(p,b){Ae(p,b)}(D,function(){n.state.isShown=!0,k("onShown",[n])})}},function ae(){var b,p=n.props.appendTo,T=R();(b=n.props.interactive&&p===rr||"parent"===p?T.parentNode:nr(p,[T])).contains(v)||b.appendChild(v),n.state.isMounted=!0,it()}()}},hide:function ui(){var p=!n.state.isVisible,b=n.state.isDestroyed,T=!n.state.isEnabled,S=Ot(n.props.duration,1,$.duration);if(!(p||b||T)&&(k("onHide",[n],!1),!1!==n.props.onHide(n))){if(n.state.isVisible=!1,n.state.isShown=!1,l=!1,s=!1,j()&&(v.style.visibility="hidden"),he(),ie(),N(!0),j()){var D=_(),F=D.box,q=D.content;n.props.animation&&(Ct([F,q],S),Ne([F,q],"hidden"))}Z(),ee(),n.props.animation?j()&&function Ce(p,b){Ae(p,function(){!n.state.isVisible&&v.parentNode&&v.parentNode.contains(v)&&b()})}(S,n.unmount):n.unmount()}},hideWithInteractivity:function fi(p){I().addEventListener("mousemove",w),or(Je,w),w(p)},enable:function _e(){n.state.isEnabled=!0},disable:function at(){n.hide(),n.state.isEnabled=!1},unmount:function pi(){n.state.isVisible&&n.hide(),n.state.isMounted&&(ot(),le().forEach(function(p){p._tippy.unmount()}),v.parentNode&&v.parentNode.removeChild(v),Ze=Ze.filter(function(p){return p!==n}),n.state.isMounted=!1,k("onHidden",[n]))},destroy:function ci(){n.state.isDestroyed||(n.clearDelayTimeouts(),n.unmount(),tt(),delete e._tippy,n.state.isDestroyed=!0,k("onDestroy",[n]))}};if(!r.render)return n;var g=r.render(n),v=g.popper,A=g.onUpdate;v.setAttribute("data-tippy-root",""),v.id="tippy-"+n.id,n.popper=v,e._tippy=n,v._tippy=n;var P=x.map(function(p){return p.fn(n)}),M=e.hasAttribute("aria-expanded");return De(),ee(),N(),k("onCreate",[n]),r.showOnCreate&&Ue(),v.addEventListener("mouseenter",function(){n.props.interactive&&n.state.isVisible&&n.clearDelayTimeouts()}),v.addEventListener("mouseleave",function(){n.props.interactive&&n.props.trigger.indexOf("mouseenter")>=0&&I().addEventListener("mousemove",w)}),n;function L(){var p=n.props.touch;return Array.isArray(p)?p:[p,0]}function B(){return"hold"===L()[0]}function j(){var p;return!(null==(p=n.props.render)||!p.$$tippy)}function R(){return h||e}function I(){var p=R().parentNode;return p?function fr(e){var t,i=fe(e)[0];return null!=i&&null!=(t=i.ownerDocument)&&t.body?i.ownerDocument:document}(p):document}function _(){return Qe(v)}function V(p){return n.state.isMounted&&!n.state.isVisible||J.isTouch||c&&"focus"===c.type?0:Ot(n.props.delay,p?0:1,$.delay)}function N(p){void 0===p&&(p=!1),v.style.pointerEvents=n.props.interactive&&!p?"":"none",v.style.zIndex=""+n.props.zIndex}function k(p,b,T){var S;void 0===T&&(T=!0),P.forEach(function(D){D[p]&&D[p].apply(D,b)}),T&&(S=n.props)[p].apply(S,b)}function Z(){var p=n.props.aria;if(p.content){var b="aria-"+p.content,T=v.id;fe(n.props.triggerTarget||e).forEach(function(D){var F=D.getAttribute(b);if(n.state.isVisible)D.setAttribute(b,F?F+" "+T:T);else{var q=F&&F.replace(T,"").trim();q?D.setAttribute(b,q):D.removeAttribute(b)}})}}function ee(){!M&&n.props.aria.expanded&&fe(n.props.triggerTarget||e).forEach(function(b){n.props.interactive?b.setAttribute("aria-expanded",n.state.isVisible&&b===R()?"true":"false"):b.removeAttribute("aria-expanded")})}function he(){I().removeEventListener("mousemove",w),Je=Je.filter(function(p){return p!==w})}function te(p){if(!J.isTouch||!f&&"mousedown"!==p.type){var b=p.composedPath&&p.composedPath()[0]||p.target;if(!n.props.interactive||!pr(v,b)){if(fe(n.props.triggerTarget||e).some(function(T){return pr(T,b)})){if(J.isTouch||n.state.isVisible&&n.props.trigger.indexOf("click")>=0)return}else k("onClickOutside",[n,p]);!0===n.props.hideOnClick&&(n.clearDelayTimeouts(),n.hide(),u=!0,setTimeout(function(){u=!1}),n.state.isMounted||ie())}}}function ge(){f=!0}function ne(){f=!1}function G(){var p=I();p.addEventListener("mousedown",te,!0),p.addEventListener("touchend",te,ue),p.addEventListener("touchstart",ne,ue),p.addEventListener("touchmove",ge,ue)}function ie(){var p=I();p.removeEventListener("mousedown",te,!0),p.removeEventListener("touchend",te,ue),p.removeEventListener("touchstart",ne,ue),p.removeEventListener("touchmove",ge,ue)}function Ae(p,b){var T=_().box;function S(D){D.target===T&&(At(T,"remove",S),b())}if(0===p)return b();At(T,"remove",E),At(T,"add",S),E=S}function ce(p,b,T){void 0===T&&(T=!1),fe(n.props.triggerTarget||e).forEach(function(D){D.addEventListener(p,b,T),y.push({node:D,eventType:p,handler:b,options:T})})}function De(){B()&&(ce("touchstart",He,{passive:!0}),ce("touchend",nt,{passive:!0})),function jn(e){return e.split(/\s+/).filter(Boolean)}(n.props.trigger).forEach(function(p){if("manual"!==p)switch(ce(p,He),p){case"mouseenter":ce("mouseleave",nt);break;case"focus":ce($n?"focusout":"blur",We);break;case"focusin":ce("focusout",We)}})}function tt(){y.forEach(function(p){p.node.removeEventListener(p.eventType,p.handler,p.options)}),y=[]}function He(p){var b,T=!1;if(n.state.isEnabled&&!$e(p)&&!u){var S="focus"===(null==(b=c)?void 0:b.type);c=p,h=p.currentTarget,ee(),!n.state.isVisible&&function Tt(e){return xt(e,"MouseEvent")}(p)&&Je.forEach(function(D){return D(p)}),"click"===p.type&&(n.props.trigger.indexOf("mouseenter")<0||s)&&!1!==n.props.hideOnClick&&n.state.isVisible?T=!0:Ue(p),"click"===p.type&&(s=!T),T&&!S&&ye(p)}}function rt(p){var b=p.target,T=R().contains(b)||v.contains(b);"mousemove"===p.type&&T||function Vn(e,t){var r=t.clientX,i=t.clientY;return e.every(function(o){var a=o.popperRect,s=o.popperState,f=o.props.interactiveBorder,l=function ar(e){return e.split("-")[0]}(s.placement),c=s.modifiersData.offset;return!c||a.top-i+("bottom"===l?c.top.y:0)>f||i-a.bottom-("top"===l?c.bottom.y:0)>f||a.left-r+("right"===l?c.left.x:0)>f||r-a.right-("left"===l?c.right.x:0)>f})}(le().concat(v).map(function(D){var F,Pe=null==(F=D._tippy.popperInstance)?void 0:F.state;return Pe?{popperRect:D.getBoundingClientRect(),popperState:Pe,props:r}:null}).filter(Boolean),p)&&(he(),ye(p))}function nt(p){if(!($e(p)||n.props.trigger.indexOf("click")>=0&&s)){if(n.props.interactive)return void n.hideWithInteractivity(p);ye(p)}}function We(p){n.props.trigger.indexOf("focusin")<0&&p.target!==R()||n.props.interactive&&p.relatedTarget&&v.contains(p.relatedTarget)||ye(p)}function $e(p){return!!J.isTouch&&B()!==p.type.indexOf("touch")>=0}function it(){ot();var p=n.props,b=p.popperOptions,T=p.placement,S=p.offset,D=p.getReferenceClientRect,F=p.moveTransition,q=j()?Qe(v).arrow:null,Pe=D?{getBoundingClientRect:D,contextElement:D.contextElement||R()}:e,be=[{name:"offset",options:{offset:S}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!F}},{name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(pt){var Se=pt.state;if(j()){var Mt=_().box;["placement","reference-hidden","escaped"].forEach(function(ct){"placement"===ct?Mt.setAttribute("data-placement",Se.placement):Se.attributes.popper["data-popper-"+ct]?Mt.setAttribute("data-"+ct,""):Mt.removeAttribute("data-"+ct)}),Se.attributes.popper={}}}}];j()&&q&&be.push({name:"arrow",options:{element:q,padding:3}}),be.push.apply(be,b?.modifiers||[]),n.popperInstance=Mn(Pe,v,Object.assign({},b,{placement:T,onFirstUpdate:O,modifiers:be}))}function ot(){n.popperInstance&&(n.popperInstance.destroy(),n.popperInstance=null)}function le(){return Te(v.querySelectorAll("[data-tippy-root]"))}function Ue(p){n.clearDelayTimeouts(),p&&k("onTrigger",[n,p]),G();var b=V(!0),T=L(),D=T[1];J.isTouch&&"hold"===T[0]&&D&&(b=D),b?i=setTimeout(function(){n.show()},b):n.show()}function ye(p){if(n.clearDelayTimeouts(),k("onUntrigger",[n,p]),n.state.isVisible){if(!(n.props.trigger.indexOf("mouseenter")>=0&&n.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(p.type)>=0&&s)){var b=V(!1);b?o=setTimeout(function(){n.state.isVisible&&n.hide()},b):a=requestAnimationFrame(function(){n.hide()})}}else ie()}}function pe(e,t){void 0===t&&(t={});var r=$.plugins.concat(t.plugins||[]);!function Hn(){document.addEventListener("touchstart",Nn,ue),window.addEventListener("blur",Fn)}();var i=Object.assign({},t,{plugins:r}),u=function In(e){return Ke(e)?[e]:function kn(e){return xt(e,"NodeList")}(e)?Te(e):Array.isArray(e)?e:Te(document.querySelectorAll(e))}(e).reduce(function(f,l){var c=l&&Qn(l,i);return c&&f.push(c),f},[]);return Ke(e)?u[0]:u}pe.defaultProps=$,pe.setDefaultProps=function(t){Object.keys(t).forEach(function(i){$[i]=t[i]})},pe.currentInput=J,Object.assign({},Ut,{effect:function(t){var r=t.state,i={popper:{position:r.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(r.elements.popper.style,i.popper),r.styles=i,r.elements.arrow&&Object.assign(r.elements.arrow.style,i.arrow)}}),pe.setDefaultProps({render:Or});const oi=pe;let ai=(()=>{class e{_el=(0,Lt.WQX)(Rt.aKT);cueTooltip=Me.hFB.required();tooltipPlacement=(0,Me.hFB)(void 0);tooltipFlip=(0,Me.hFB)(!0);tooltipColor=(0,Me.hFB)("primary");tooltipSize=(0,Me.hFB)("medium");static _styleAppended=!1;_tippyInstance;constructor(){(0,Lt.QZP)(()=>{const r=this.cueTooltip(),i=this.tooltipPlacement(),o=this.tooltipFlip();this._tippyInstance&&(this._tippyInstance.destroy(),this._tippyInstance=void 0),r&&(this._tippyInstance=oi(this._el.nativeElement,{content:r,placement:i,animation:"shift-away",theme:"cue",appendTo:()=>this._el.nativeElement.closest("dialog")||document.body,popperOptions:o?{}:{modifiers:[{name:"flip",enabled:!1}]}}))})}ngOnDestroy(){this._tippyInstance&&this._tippyInstance.destroy()}static \u0275fac=function(i){return new(i||e)};static \u0275dir=Rt.FsC({type:e,selectors:[["","cueTooltip",""]],inputs:{cueTooltip:[1,"cueTooltip"],tooltipPlacement:[1,"tooltipPlacement"],tooltipFlip:[1,"tooltipFlip"],tooltipColor:[1,"tooltipColor"],tooltipSize:[1,"tooltipSize"]}})}return e})()}}]);
package/928.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[928],{928(G,m,s){s.d(m,{CueProjectList:()=>N});var v=s(467),c=s(7705),i=s(5802),l=s(2271),h=s(2611),j=s(8017),f=s(6455),S=s(8334),u=s(2306),_=s(140),p=s(58),y=s(5187),g=s(1951),t=s(5547);function w(n,d){if(1&n){const e=t.RV6();t.j41(0,"cue-tabs",0)(1,"cue-tab",1)(2,"cue-ag-grid",2),t.bIt("selectedRows",function(a){i.eBV(e);const r=t.XpG();return i.Njj(r.onSelectedRows(a))}),t.k0s()(),t.j41(3,"cue-tab",3)(4,"cue-map",4),t.bIt("clickedFeature",function(a){i.eBV(e);const r=t.XpG();return i.Njj(r.onMapFeatureClick(a))}),t.k0s()()()}if(2&n){const e=t.XpG();t.Y8G("variant",e.variant()),t.R7$(2),t.Y8G("rowData",e.projects())("columnDefs",e.columnDefs)("rowSelection",e.rowSelection)("showPaginator",!1)("overlaySettings",e.overlaySettings())("overlayActions",e.overlayActions()),t.R7$(2),t.Y8G("layers",e.mapLayers())("settings",e._mapSettings())("zoomToFit",!0)("hoverTooltipFn",e.mapHoverTooltipFn)}}function x(n,d){if(1&n){const e=t.RV6();t.j41(0,"cue-card",5)(1,"cue-ag-grid",7),t.bIt("selectedRows",function(a){i.eBV(e);const r=t.XpG(2);return i.Njj(r.onSelectedRows(a))}),t.k0s()()}if(2&n){const e=t.XpG(2);t.Y8G("variant",e._cardVariant())("padded",!1),t.R7$(),t.Y8G("rowData",e.projects())("columnDefs",e.columnDefs)("rowSelection",e.rowSelection)("showPaginator",!1)}}function P(n,d){if(1&n){const e=t.RV6();t.j41(0,"cue-ag-grid",7),t.bIt("selectedRows",function(a){i.eBV(e);const r=t.XpG(2);return i.Njj(r.onSelectedRows(a))}),t.k0s()}if(2&n){const e=t.XpG(2);t.Y8G("rowData",e.projects())("columnDefs",e.columnDefs)("rowSelection",e.rowSelection)("showPaginator",!1)}}function C(n,d){if(1&n&&t.nVh(0,x,2,6,"cue-card",5)(1,P,1,4,"cue-ag-grid",6),2&n){const e=t.XpG();t.vxM("none"!==e.variant()?0:1)}}let D=(()=>{class n{projects=(0,c.hFB)([]);mapSettings=(0,c.hFB)(new u.yY);variant=(0,c.hFB)("none");overlaySettings=(0,c.hFB)(new g.K);overlayActions=(0,c.hFB)([]);projectSelected=(0,c.CGW)();_cardVariant=(0,l.EW)(()=>this.variant());columnDefs=[{field:"name",headerName:"Project",flex:1}];rowSelection={mode:"singleRow",checkboxes:!1,enableClickSelection:!0};_mapSettings=(0,l.EW)(()=>({...this.mapSettings(),contextMenu:{showProperties:!1,showFlyTo:!1}}));mapHoverTooltipFn=e=>e.name??null;onSelectedRows(e){const o=e[0]?.id;o&&this.projectSelected.emit(o)}onMapFeatureClick(e){const o=e.feature.properties?.id;o&&this.projectSelected.emit(o)}hasLocations=(0,l.EW)(()=>this.projects().some(e=>!!e.location));mapLayers=(0,l.EW)(()=>{const e=this.projects().filter(a=>!!a.location);if(!e.length)return[];const o=new u.ux("Projects","projects");return o.collection=new _.o(e.flatMap(a=>{const r=(0,p.S)(a.location);return r?[{type:"Feature",geometry:(0,p.n)(r),properties:{name:a.name,id:a.id}}]:[]})),[o]});static \u0275fac=function(o){return new(o||n)};static \u0275cmp=t.VBU({type:n,selectors:[["cue-proj-list"]],inputs:{projects:[1,"projects"],mapSettings:[1,"mapSettings"],variant:[1,"variant"],overlaySettings:[1,"overlaySettings"],overlayActions:[1,"overlayActions"]},outputs:{projectSelected:"projectSelected"},decls:2,vars:1,consts:[[2,"flex","1",3,"variant"],["label","List"],[3,"selectedRows","rowData","columnDefs","rowSelection","showPaginator","overlaySettings","overlayActions"],["label","Map"],[3,"clickedFeature","layers","settings","zoomToFit","hoverTooltipFn"],[2,"height","100%","width","100%",3,"variant","padded"],[3,"rowData","columnDefs","rowSelection","showPaginator"],[3,"selectedRows","rowData","columnDefs","rowSelection","showPaginator"]],template:function(o,a){1&o&&t.nVh(0,w,5,11,"cue-tabs",0)(1,C,2,1),2&o&&t.vxM(a.hasLocations()?0:1)},dependencies:[h.R,j.T,f.t,S.o,y.Card],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;height:100%}cue-tabs[_ngcontent-%COMP%]{flex:1}cue-ag-grid[_ngcontent-%COMP%]{flex:1}cue-map[_ngcontent-%COMP%]{flex:1;min-height:300px}"],changeDetection:0})}return n})();var M=s(5381),L=s(2245),T=s(7851),b=s(7293);function F(n,d){if(1&n&&(t.j41(0,"cue-flexcontainer",0)(1,"cue-typography",2),t.EFF(2),t.k0s()()),2&n){const e=t.XpG();t.R7$(2),t.SpI(" ",e.errorMessage()," ")}}function R(n,d){1&n&&t.nrm(0,"cue-logo-link",4)}function k(n,d){if(1&n){const e=t.RV6();t.j41(0,"div",1)(1,"cue-proj-list",3),t.bIt("projectSelected",function(a){i.eBV(e);const r=t.XpG();return i.Njj(r.projectSelected.emit(a))}),t.k0s(),t.nVh(2,R,1,0,"cue-logo-link",4),t.k0s()}if(2&n){const e=t.XpG();t.Y8G("cueLogoLoader","loading"===e.state()),t.R7$(),t.Y8G("projects",e.projects())("mapSettings",e.mapSettings())("variant",e.variant())("overlaySettings",e._overlaySettings)("overlayActions",e._overlayActions),t.R7$(),t.vxM(e.showLogo()?2:-1)}}let N=(()=>{class n{sdkState=(0,c.hFB)(void 0);mapboxToken=(0,c.hFB)(void 0);variant=(0,c.hFB)("none");showLogo=(0,c.hFB)(!1,{transform:c.L39});projectSelected=(0,c.CGW)();state=(0,i.vPA)("idle");errorMessage=(0,i.vPA)(null);_rawProjects=(0,i.vPA)([]);mapSettings=(0,l.EW)(()=>({...new u.yY,mapboxToken:this.mapboxToken()}));projects=(0,l.EW)(()=>this._rawProjects().map(e=>({id:e.id,name:e.name,location:e.location??void 0})));_overlaySettings=Object.assign(new g.K,{mode:"row"});_overlayActions=[{label:"Open in Cue portal",icon:"external-link",action:e=>{const o=e.rowData.id,a=o?`https://cue.qaecy.com/home/project?p=${encodeURIComponent(o)}`:"https://cue.qaecy.com/home/projects";window.open(a,"_blank","noopener,noreferrer")}}];_lastCue;_inputWarningTimer;constructor(){this._inputWarningTimer=setTimeout(()=>{this.sdkState()?.cue||console.warn('[cue-project-list] Required input "sdkState" is not set or missing a `cue` property. Pass a { cue: Cue } object to enable project loading.')},3e3),(0,i.QZP)(()=>{const e=this.sdkState()?.cue;e!==this._lastCue&&(this._lastCue=e,e?this._loadProjects(e.projects):(this._rawProjects.set([]),this.state.set("idle"),this.errorMessage.set(null)))})}ngOnDestroy(){clearTimeout(this._inputWarningTimer)}_loadProjects(e){var o=this;return(0,v.A)(function*(){o.state.set("loading"),o.errorMessage.set(null);try{const a=yield e.listProjects();o._rawProjects.set(a),o.state.set("ready")}catch(a){console.error("[CueProjectList] Failed to load projects:",a),o.errorMessage.set(a instanceof Error?a.message:String(a)),o.state.set("error")}})()}static \u0275fac=function(o){return new(o||n)};static \u0275cmp=t.VBU({type:n,selectors:[["cue-project-list"]],inputs:{sdkState:[1,"sdkState"],mapboxToken:[1,"mapboxToken"],variant:[1,"variant"],showLogo:[1,"showLogo"]},outputs:{projectSelected:"projectSelected"},decls:2,vars:1,consts:[["direction","column","align","center","justify","center",2,"height","100%","width","100%","padding","8px"],[2,"position","relative","height","100%","width","100%",3,"cueLogoLoader"],[2,"color","#c44","font-size","13px"],[2,"height","100%",3,"projectSelected","projects","mapSettings","variant","overlaySettings","overlayActions"],[2,"position","absolute","top","12px","right","12px","z-index","5"]],template:function(o,a){1&o&&t.nVh(0,F,3,1,"cue-flexcontainer",0)(1,k,3,7,"div",1),2&o&&t.vxM("error"===a.state()?0:1)},dependencies:[D,M.n,L.Typography,T.k,b.x],styles:["[_nghost-%COMP%]{display:block;width:100%;height:100%}"],changeDetection:0})}return n})()}}]);
package/971.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[971],{5971(_e,z,m){m.d(z,{Button:()=>H});var U=m(9769),F=m(7705),T=m(2271),K=m(7089),I=m(2403),w=m(5547);const P=["buttonElement"],R=["*"];let H=(()=>{class A{variant=(0,F.hFB)("primary");size=(0,F.hFB)("m");tooltip=(0,F.hFB)("");disabled=(0,F.hFB)(!1);selected=(0,F.geq)(!1);toggleButton=(0,F.hFB)(!1);loading=(0,F.hFB)(!1);fitParentWidth=(0,F.hFB)(!1);noWrap=(0,F.hFB)(!0);buttonElement=F.ebz.required("buttonElement");getStyles=(0,T.EW)(()=>[`\n padding: 0 var(--cue-button-${this.size()}-padding-x);\n\n --focus-color: var(--cue-button-${this.variant()}-focus-color);\n --cue-button-border-color: var(--cue-button-${this.variant()}-border-color);\n color: var(--cue-button-${this.variant()}-foreground);\n --background-color: var(--cue-button-${this.variant()}-background);\n\n --cue-icon-width: var(--cue-button-${this.size()}-icon-width);\n --button-height: var(--cue-button-${this.size()}-height);\n --cue-button-border-radius: var(--cue-button-border-radius, 9999px);\n --button-label-padding-x: var(--cue-button-${this.size()}-label-padding-x);\n `,this.disabled()?`\n color: var(--cue-button-${this.variant()}-disabled-foreground);\n --cue-button-border-color: var(--cue-button-${this.variant()}-disabled-border-color);\n --background-color: var(--cue-button-${this.variant()}-disabled-background);\n `:""].join(""));handleClick(i){i.detail>0&&this.buttonElement().nativeElement.blur(),this.toggleButton()&&(i.stopPropagation(),this.selected.set(!this.selected()))}static \u0275fac=function(B){return new(B||A)};static \u0275cmp=w.VBU({type:A,selectors:[["cue-button"]],viewQuery:function(B,M){1&B&&w.wEZ(M.buttonElement,P,5),2&B&&w.NyB()},inputs:{variant:[1,"variant"],size:[1,"size"],tooltip:[1,"tooltip"],disabled:[1,"disabled"],selected:[1,"selected"],toggleButton:[1,"toggleButton"],loading:[1,"loading"],fitParentWidth:[1,"fitParentWidth"],noWrap:[1,"noWrap"]},outputs:{selected:"selectedChange"},ngContentSelectors:R,decls:3,vars:18,consts:[["buttonElement",""],["tooltipSize","small",3,"click","disabled","cueTooltip","tooltipPlacement","cuePulse"]],template:function(B,M){1&B&&(w.NAR(),w.j41(0,"button",1,0),w.bIt("click",function($){return M.handleClick($)}),w.SdG(2),w.k0s()),2&B&&(w.Aen(M.getStyles()),w.xc7("white-space",M.noWrap()?"nowrap":"normal")("flex-basis",M.noWrap()?null:"auto")("min-width",M.noWrap()?null:"fit-content"),w.AVh("selected",M.selected())("ghost","ghost"===M.variant())("fit-parent-width",M.fitParentWidth()),w.Y8G("disabled",M.disabled())("cueTooltip",M.tooltip())("tooltipPlacement","top")("cuePulse",M.loading()))},dependencies:[U.MD,K.d,I.V],styles:['[_nghost-%COMP%]:has(.fit-parent-width){display:contents}@keyframes _ngcontent-%COMP%_pulse-border{0%{box-shadow:0 0 0 0 var(--focus-color)}50%{box-shadow:0 0 0 8px transparent}to{box-shadow:0 0 0 0 transparent}}button[_ngcontent-%COMP%]{min-width:0;pulse-border-radius:var(--cue-button-border-radius);appearance:none;padding:0;font:inherit;border:var(--cue-button-border-width) var(--cue-button-border-style) var(--cue-button-border-color);display:flex;justify-content:space-between;align-items:center;gap:var(--cue-button-gap);min-height:var(--button-height);height:auto;background-color:var(--background-color);border-radius:var(--cue-button-border-radius, 9999px);margin:3px;position:relative}button[style*="white-space: normal"][_ngcontent-%COMP%]{border-radius:30px!important;padding:10px!important}button.fit-parent-width[_ngcontent-%COMP%]{width:100%;min-width:0;margin-inline:0}button[_ngcontent-%COMP%]:not(.fit-parent-width){min-width:fit-content;width:auto}button[_ngcontent-%COMP%]:focus{outline:none}button[_ngcontent-%COMP%]:hover:not(:disabled), button[_ngcontent-%COMP%]:focus-within:not(:disabled){outline:1px solid var(--focus-color);outline-offset:2px;cursor:pointer}button.selected[_ngcontent-%COMP%]{outline:1px solid currentColor!important;outline-offset:2px;margin:3px}button.ghost[_ngcontent-%COMP%]:not(.selected){border:none}']})}return A})()},2403(_e,z,m){m.d(z,{V:()=>K});var U=m(7705),F=m(5802),T=m(5547);let K=(()=>{class I{el=(0,F.WQX)(T.aKT);renderer=(0,F.WQX)(T.sFG);cuePulse=(0,U.hFB)(!1);cuePulseColor=(0,U.hFB)("");cuePulseMode=(0,U.hFB)("border");activeClass="";constructor(){this.ensureGlobalStyles()}onPulseChanged=(0,F.QZP)(()=>{const P=this.cuePulse(),R=this.cuePulseColor(),H=this.cuePulseMode(),A=this.el.nativeElement;if(this.activeClass&&(this.renderer.removeClass(A,this.activeClass),this.activeClass=""),this.renderer.removeStyle(A,"--cue-pulse-color"),this.renderer.removeStyle(A,"border-radius"),P){const d="text"===H?"cue-pulse-text":"cue-pulse-border";this.renderer.addClass(A,d),this.activeClass=d,R&&this.renderer.setStyle(A,"--cue-pulse-color",R),"border"===H&&setTimeout(()=>{const i=A.firstElementChild;if(i){const B=getComputedStyle(i).borderRadius;B&&"0px"!==B&&this.renderer.setStyle(A,"border-radius",B)}})}});ngOnDestroy(){const P=this.el.nativeElement;this.activeClass&&this.renderer.removeClass(P,this.activeClass),this.renderer.removeStyle(P,"border-radius")}ensureGlobalStyles(){const P="cue-pulse-global-styles";if(document.getElementById(P))return;const R=document.createElement("style");R.id=P,R.textContent="\n @keyframes cue-pulse-border-anim {\n 0% {\n box-shadow: 0 0 0 0 var(--cue-pulse-color, currentColor);\n }\n 70% {\n box-shadow: 0 0 0 8px transparent;\n }\n 100% {\n box-shadow: 0 0 0 0 transparent;\n }\n }\n\n @keyframes cue-pulse-text-anim {\n 0%, 100% {\n opacity: 1;\n }\n 50% {\n opacity: 0.4;\n }\n }\n\n .cue-pulse-border {\n animation: cue-pulse-border-anim 1.5s infinite ease-in-out;\n }\n\n .cue-pulse-text {\n animation: cue-pulse-text-anim 1.5s infinite ease-in-out;\n }\n ",document.head.appendChild(R)}static \u0275fac=function(R){return new(R||I)};static \u0275dir=T.FsC({type:I,selectors:[["","cuePulse",""]],inputs:{cuePulse:[1,"cuePulse"],cuePulseColor:[1,"cuePulseColor"],cuePulseMode:[1,"cuePulseMode"]}})}return I})()},9769(_e,z,m){m.d(z,{B3:()=>Ne,MD:()=>en,T3:()=>ke});var A=m(7705),d=m(5802),i=m(5547);m(2271);let Ne=(()=>{class e{_ngEl;_differs;_renderer;_ngStyle=null;_differ=null;constructor(t,n,r){this._ngEl=t,this._differs=n,this._renderer=r}set ngStyle(t){this._ngStyle=t,!this._differ&&t&&(this._differ=this._differs.find(t).create())}ngDoCheck(){if(this._differ){const t=this._differ.diff(this._ngStyle);t&&this._applyChanges(t)}}_setStyle(t,n){const[r,s]=t.split("."),o=-1===r.indexOf("-")?void 0:i.czy.DashCase;null!=n?this._renderer.setStyle(this._ngEl.nativeElement,r,s?`${n}${s}`:n,o):this._renderer.removeStyle(this._ngEl.nativeElement,r,o)}_applyChanges(t){t.forEachRemovedItem(n=>this._setStyle(n.key,null)),t.forEachAddedItem(n=>this._setStyle(n.key,n.currentValue)),t.forEachChangedItem(n=>this._setStyle(n.key,n.currentValue))}static \u0275fac=function(n){return new(n||e)(i.rXU(i.aKT),i.rXU(A.MKu),i.rXU(i.sFG))};static \u0275dir=i.FsC({type:e,selectors:[["","ngStyle",""]],inputs:{ngStyle:"ngStyle"}})}return e})(),ke=(()=>{class e{_viewContainerRef;_viewRef=null;ngTemplateOutletContext=null;ngTemplateOutlet=null;ngTemplateOutletInjector=null;injector=(0,d.WQX)(d.zZn);constructor(t){this._viewContainerRef=t}ngOnChanges(t){if(this._shouldRecreateView(t)){const n=this._viewContainerRef;if(this._viewRef&&n.remove(n.indexOf(this._viewRef)),!this.ngTemplateOutlet)return void(this._viewRef=null);const r=this._createContextForwardProxy();this._viewRef=n.createEmbeddedView(this.ngTemplateOutlet,r,{injector:this._getInjector()})}}_getInjector(){return"outlet"===this.ngTemplateOutletInjector?this.injector:this.ngTemplateOutletInjector??void 0}_shouldRecreateView(t){return!!t.ngTemplateOutlet||!!t.ngTemplateOutletInjector}_createContextForwardProxy(){return new Proxy({},{set:(t,n,r)=>!!this.ngTemplateOutletContext&&Reflect.set(this.ngTemplateOutletContext,n,r),get:(t,n,r)=>{if(this.ngTemplateOutletContext)return Reflect.get(this.ngTemplateOutletContext,n,r)}})}static \u0275fac=function(n){return new(n||e)(i.rXU(i.c1b))};static \u0275dir=i.FsC({type:e,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},features:[i.OA$]})}return e})(),en=(()=>{class e{static \u0275fac=function(n){return new(n||e)};static \u0275mod=i.$C({type:e});static \u0275inj=d.G2t({})}return e})()}}]);
package/common.js CHANGED
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[76],{2014(C,_,t){t.d(_,{z:()=>v});var n=t(7705),f=t(2271),d=t(5547);const a=["*"];let v=(()=>{class e{justify=(0,n.hFB)("start");size=(0,n.hFB)("l");widthStyle=(0,f.EW)(()=>`var(--cue-button-label-padding-${this.size()}-x)`);static \u0275fac=function(l){return new(l||e)};static \u0275cmp=d.VBU({type:e,selectors:[["cue-button-padder"]],inputs:{justify:[1,"justify"],size:[1,"size"]},ngContentSelectors:a,decls:2,vars:4,template:function(l,s){1&l&&(d.NAR(),d.rj2(0,"div"),d.SdG(1),d.eux()),2&l&&d.xc7("justify-content",s.justify())("min-width",s.widthStyle())},styles:["div[_ngcontent-%COMP%]{display:flex;align-items:center;min-height:1px}"]})}return e})()},6034(C,_,t){t.d(_,{y:()=>r});var n=t(7705),f=t(7598),d=t(9769),a=t(5187),v=t(2271),e=t(5547);const b=["*"];let h=(()=>{class i{style=(0,n.hFB)("");gap=(0,n.hFB)("m");columns=(0,n.hFB)(1);getStyles=(0,v.EW)(()=>`\n grid-template-columns: repeat(${this.columns()}, minmax(0, 1fr));\n gap: var(--cue-grid-gap-${this.gap()});\n ${this.style()}\n `);static \u0275fac=function(c){return new(c||i)};static \u0275cmp=e.VBU({type:i,selectors:[["cue-grid"]],hostVars:2,hostBindings:function(c,o){2&c&&e.Aen(o.getStyles())},inputs:{style:[1,"style"],gap:[1,"gap"],columns:[1,"columns"]},ngContentSelectors:b,decls:1,vars:0,template:function(c,o){1&c&&(e.NAR(),e.SdG(0))},styles:["[_nghost-%COMP%]{display:grid}"]})}return i})();var l=t(2245),s=t(5381),y=t(29);const p=["*"];function g(i,M){if(1&i&&(e.j41(0,"cue-typography",2),e.EFF(1),e.k0s()),2&i){const u=e.XpG();e.R7$(),e.SpI(" ",u.label()," ")}}let r=(()=>{class i{label=(0,n.hFB)("");variant=(0,n.hFB)("default");shadow=(0,n.hFB)(!1);padded=(0,n.hFB)(!0);showCloseBtn=(0,n.hFB)(!0);position=(0,n.hFB)("top-left");clickedClose=(0,n.CGW)();margin=(0,n.hFB)("0.5rem");close(u){u.stopPropagation(),u.stopImmediatePropagation(),this.clickedClose.emit()}static \u0275fac=function(c){return new(c||i)};static \u0275cmp=e.VBU({type:i,selectors:[["cue-draggable-card"]],inputs:{label:[1,"label"],variant:[1,"variant"],shadow:[1,"shadow"],padded:[1,"padded"],showCloseBtn:[1,"showCloseBtn"],position:[1,"position"],margin:[1,"margin"]},outputs:{clickedClose:"clickedClose"},ngContentSelectors:p,decls:8,vars:14,consts:[["cdkDrag","",1,"panel",3,"variant","shadow","padded"],["justify","end"],["size","l"],[2,"width","100%"],["name","close",2,"cursor","pointer",3,"click"]],template:function(c,o){1&c&&(e.NAR(),e.j41(0,"cue-card",0)(1,"cue-typography")(2,"cue-grid")(3,"cue-flexcontainer",1),e.nVh(4,g,2,1,"cue-typography",2),e.nrm(5,"span",3),e.j41(6,"cue-svg-icon",4),e.bIt("click",function(D){return o.close(D)}),e.k0s()(),e.SdG(7),e.k0s()()()),2&c&&(e.xc7("top","top-left"===o.position()||"top-right"===o.position()?o.margin():"null")("bottom","bottom-left"===o.position()||"bottom-right"===o.position()?o.margin():"null")("left","top-left"===o.position()||"bottom-left"===o.position()?o.margin():"null")("right","top-right"===o.position()||"bottom-right"===o.position()?o.margin():"null"),e.Y8G("variant",o.variant())("shadow",o.shadow())("padded",o.padded()),e.R7$(3),e.xc7("padding",o.padded()?"0":"10px"),e.R7$(),e.vxM(o.label()&&"undefined"!==o.label()?4:-1))},dependencies:[d.MD,a.Z,h,l.Typography,s.n,y.A,f.T1],styles:[".panel[_ngcontent-%COMP%]{position:absolute;width:fit-content}"]})}return i})()},9134(C,_,t){t.d(_,{v:()=>v});var n=t(7705),f=t(6034),d=t(7517),a=t(5547);let v=(()=>{class e{title=(0,n.hFB)("Legend");layers=(0,n.hFB)([]);position=(0,n.hFB)("top-left");close=(0,n.CGW)();visibilityChange=(0,n.CGW)();layerChange=(0,n.CGW)();visibilityAll=(0,n.CGW)();static \u0275fac=function(l){return new(l||e)};static \u0275cmp=a.VBU({type:e,selectors:[["cue-color-legend-panel"]],inputs:{title:[1,"title"],layers:[1,"layers"],position:[1,"position"]},outputs:{close:"close",visibilityChange:"visibilityChange",layerChange:"layerChange",visibilityAll:"visibilityAll"},decls:3,vars:4,consts:[[3,"clickedClose","label","padded","position"],[1,"content"],[3,"visibilityAll","layerChange","visibilityChange","layers"]],template:function(l,s){1&l&&(a.j41(0,"cue-draggable-card",0),a.bIt("clickedClose",function(){return s.close.emit()}),a.j41(1,"div",1)(2,"cue-layer-legend",2),a.bIt("visibilityAll",function(p){return s.visibilityAll.emit(p)})("layerChange",function(p){return s.layerChange.emit(p)})("visibilityChange",function(p){return s.visibilityChange.emit(p)}),a.k0s()()()),2&l&&(a.Y8G("label",s.title())("padded",!1)("position",s.position()),a.R7$(2),a.Y8G("layers",s.layers()))},dependencies:[f.y,d.P],styles:[".content[_ngcontent-%COMP%]{padding-left:10px;padding-right:10px;margin-bottom:30px;font-size:.8em;max-height:200px;max-width:180px;overflow:auto}"]})}return e})()},6103(C,_,t){t.d(_,{N:()=>a});var n=t(2306),f=t(140),d=t(58);function a({entityData:v,availableEntityRelationships:e}){const b=g=>e.find(m=>m.iri===g)?.label??g.split("#").pop()??g,h=[],l={};for(const[g,m]of Object.entries(v)){for(const r of m.directMapGeometries??[])h.push({iri:g,wkt:r.wkt});for(const r of m.indirectMapGeometries??[]){l[r.rel]||(l[r.rel]=[]);for(const i of r.geometries)l[r.rel].push({iri:r.entityUUID,wkt:i.wkt})}}const s=(g,m,r)=>{if(!m.length)return null;const i=new n.ux(g,g);return i.category=r,i.collection=new f.o(m.flatMap(({iri:M,wkt:u})=>{const c=(0,d.S)(u);return c?[{type:"Feature",geometry:(0,d.n)(c),properties:{iri:M}}]:[]})),i},y=[],p=s("direct",h,"Direct");p&&y.push(p);for(const[g,m]of Object.entries(l)){const r=b(g),i=s(r,m,r);i&&y.push(i)}return y}}}]);
1
+ "use strict";(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[76],{2014(C,_,t){t.d(_,{ButtonPadder:()=>v});var n=t(7705),f=t(2271),d=t(5547);const a=["*"];let v=(()=>{class e{justify=(0,n.hFB)("start");size=(0,n.hFB)("l");widthStyle=(0,f.EW)(()=>`var(--cue-button-label-padding-${this.size()}-x)`);static \u0275fac=function(l){return new(l||e)};static \u0275cmp=d.VBU({type:e,selectors:[["cue-button-padder"]],inputs:{justify:[1,"justify"],size:[1,"size"]},ngContentSelectors:a,decls:2,vars:4,template:function(l,s){1&l&&(d.NAR(),d.rj2(0,"div"),d.SdG(1),d.eux()),2&l&&d.xc7("justify-content",s.justify())("min-width",s.widthStyle())},styles:["div[_ngcontent-%COMP%]{display:flex;align-items:center;min-height:1px}"]})}return e})()},6034(C,_,t){t.d(_,{y:()=>r});var n=t(7705),f=t(7598),d=t(9769),a=t(5187),v=t(2271),e=t(5547);const b=["*"];let h=(()=>{class i{style=(0,n.hFB)("");gap=(0,n.hFB)("m");columns=(0,n.hFB)(1);getStyles=(0,v.EW)(()=>`\n grid-template-columns: repeat(${this.columns()}, minmax(0, 1fr));\n gap: var(--cue-grid-gap-${this.gap()});\n ${this.style()}\n `);static \u0275fac=function(c){return new(c||i)};static \u0275cmp=e.VBU({type:i,selectors:[["cue-grid"]],hostVars:2,hostBindings:function(c,o){2&c&&e.Aen(o.getStyles())},inputs:{style:[1,"style"],gap:[1,"gap"],columns:[1,"columns"]},ngContentSelectors:b,decls:1,vars:0,template:function(c,o){1&c&&(e.NAR(),e.SdG(0))},styles:["[_nghost-%COMP%]{display:grid}"]})}return i})();var l=t(2245),s=t(5381),y=t(29);const p=["*"];function g(i,M){if(1&i&&(e.j41(0,"cue-typography",2),e.EFF(1),e.k0s()),2&i){const u=e.XpG();e.R7$(),e.SpI(" ",u.label()," ")}}let r=(()=>{class i{label=(0,n.hFB)("");variant=(0,n.hFB)("default");shadow=(0,n.hFB)(!1);padded=(0,n.hFB)(!0);showCloseBtn=(0,n.hFB)(!0);position=(0,n.hFB)("top-left");clickedClose=(0,n.CGW)();margin=(0,n.hFB)("0.5rem");close(u){u.stopPropagation(),u.stopImmediatePropagation(),this.clickedClose.emit()}static \u0275fac=function(c){return new(c||i)};static \u0275cmp=e.VBU({type:i,selectors:[["cue-draggable-card"]],inputs:{label:[1,"label"],variant:[1,"variant"],shadow:[1,"shadow"],padded:[1,"padded"],showCloseBtn:[1,"showCloseBtn"],position:[1,"position"],margin:[1,"margin"]},outputs:{clickedClose:"clickedClose"},ngContentSelectors:p,decls:8,vars:14,consts:[["cdkDrag","",1,"panel",3,"variant","shadow","padded"],["justify","end"],["size","l"],[2,"width","100%"],["name","close",2,"cursor","pointer",3,"click"]],template:function(c,o){1&c&&(e.NAR(),e.j41(0,"cue-card",0)(1,"cue-typography")(2,"cue-grid")(3,"cue-flexcontainer",1),e.nVh(4,g,2,1,"cue-typography",2),e.nrm(5,"span",3),e.j41(6,"cue-svg-icon",4),e.bIt("click",function(D){return o.close(D)}),e.k0s()(),e.SdG(7),e.k0s()()()),2&c&&(e.xc7("top","top-left"===o.position()||"top-right"===o.position()?o.margin():"null")("bottom","bottom-left"===o.position()||"bottom-right"===o.position()?o.margin():"null")("left","top-left"===o.position()||"bottom-left"===o.position()?o.margin():"null")("right","top-right"===o.position()||"bottom-right"===o.position()?o.margin():"null"),e.Y8G("variant",o.variant())("shadow",o.shadow())("padded",o.padded()),e.R7$(3),e.xc7("padding",o.padded()?"0":"10px"),e.R7$(),e.vxM(o.label()&&"undefined"!==o.label()?4:-1))},dependencies:[d.MD,a.Card,h,l.Typography,s.n,y.A,f.T1],styles:[".panel[_ngcontent-%COMP%]{position:absolute;width:fit-content}"]})}return i})()},9134(C,_,t){t.d(_,{v:()=>v});var n=t(7705),f=t(6034),d=t(7517),a=t(5547);let v=(()=>{class e{title=(0,n.hFB)("Legend");layers=(0,n.hFB)([]);position=(0,n.hFB)("top-left");close=(0,n.CGW)();visibilityChange=(0,n.CGW)();layerChange=(0,n.CGW)();visibilityAll=(0,n.CGW)();static \u0275fac=function(l){return new(l||e)};static \u0275cmp=a.VBU({type:e,selectors:[["cue-color-legend-panel"]],inputs:{title:[1,"title"],layers:[1,"layers"],position:[1,"position"]},outputs:{close:"close",visibilityChange:"visibilityChange",layerChange:"layerChange",visibilityAll:"visibilityAll"},decls:3,vars:4,consts:[[3,"clickedClose","label","padded","position"],[1,"content"],[3,"visibilityAll","layerChange","visibilityChange","layers"]],template:function(l,s){1&l&&(a.j41(0,"cue-draggable-card",0),a.bIt("clickedClose",function(){return s.close.emit()}),a.j41(1,"div",1)(2,"cue-layer-legend",2),a.bIt("visibilityAll",function(p){return s.visibilityAll.emit(p)})("layerChange",function(p){return s.layerChange.emit(p)})("visibilityChange",function(p){return s.visibilityChange.emit(p)}),a.k0s()()()),2&l&&(a.Y8G("label",s.title())("padded",!1)("position",s.position()),a.R7$(2),a.Y8G("layers",s.layers()))},dependencies:[f.y,d.P],styles:[".content[_ngcontent-%COMP%]{padding-left:10px;padding-right:10px;margin-bottom:30px;font-size:.8em;max-height:200px;max-width:180px;overflow:auto}"]})}return e})()},6103(C,_,t){t.d(_,{N:()=>a});var n=t(2306),f=t(140),d=t(58);function a({entityData:v,availableEntityRelationships:e}){const b=g=>e.find(m=>m.iri===g)?.label??g.split("#").pop()??g,h=[],l={};for(const[g,m]of Object.entries(v)){for(const r of m.directMapGeometries??[])h.push({iri:g,wkt:r.wkt});for(const r of m.indirectMapGeometries??[]){l[r.rel]||(l[r.rel]=[]);for(const i of r.geometries)l[r.rel].push({iri:r.entityUUID,wkt:i.wkt})}}const s=(g,m,r)=>{if(!m.length)return null;const i=new n.ux(g,g);return i.category=r,i.collection=new f.o(m.flatMap(({iri:M,wkt:u})=>{const c=(0,d.S)(u);return c?[{type:"Feature",geometry:(0,d.n)(c),properties:{iri:M}}]:[]})),i},y=[],p=s("direct",h,"Direct");p&&y.push(p);for(const[g,m]of Object.entries(l)){const r=b(g),i=s(r,m,r);i&&y.push(i)}return y}}}]);