@qaecy/cue-ui 0.0.57 → 0.0.58
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/1051.js +1 -1
- package/1138.js +1 -1
- package/1153.js +1 -1
- package/1338.js +1 -1
- package/1520.js +1 -0
- package/1837.js +1 -1
- package/1985.js +1 -1
- package/2003.js +1 -0
- package/2014.js +1 -0
- package/2021.js +1 -1
- package/2081.js +1 -1
- package/2245.js +1 -1
- package/2283.js +1 -0
- package/2317.js +1 -1
- package/2775.js +1 -1
- package/2839.js +1 -1
- package/29.js +1 -1
- package/3036.js +1 -1
- package/3039.js +1 -1
- package/3288.js +1 -1
- package/3319.js +1 -0
- package/3577.js +1 -1
- package/3614.js +1 -1
- package/4098.js +1 -0
- package/4283.js +1 -1
- package/4311.js +1 -1
- package/4791.js +1 -0
- package/5277.js +1 -0
- package/5381.js +1 -0
- package/5448.js +1 -0
- package/5559.js +1 -1
- package/5649.js +1 -1
- package/5738.js +1 -1
- package/5872.js +1 -1
- package/5971.js +1 -0
- package/6027.js +1 -0
- package/617.js +1 -1
- package/6233.js +1 -1
- package/63.js +1 -1
- package/6419.js +1 -1
- package/6423.js +1 -1
- package/650.js +1 -1
- package/6947.js +1 -1
- package/7089.js +1 -0
- package/7154.js +1 -0
- package/7313.js +1 -0
- package/7441.js +1 -1
- package/7719.js +1 -1
- package/7802.js +1 -0
- package/7851.js +1 -0
- package/804.js +1 -1
- package/8194.js +1 -0
- package/8560.js +1 -1
- package/8659.js +1 -0
- package/880.js +1 -0
- package/8855.js +1 -1
- package/8957.js +1 -1
- package/928.js +1 -1
- package/9396.js +1 -1
- package/992.js +1 -0
- package/common.js +1 -1
- package/index.js +1 -1
- package/main.js +1 -1
- package/package.json +1 -1
- package/2399.js +0 -1
- package/2516.js +0 -1
- package/4687.js +0 -1
- package/4879.js +0 -1
- package/5041.js +0 -1
- package/5071.js +0 -1
- package/5137.js +0 -1
- package/7056.js +0 -1
- package/8336.js +0 -1
- package/8791.js +0 -1
- package/9376.js +0 -1
package/2081.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[2081],{6103(P,k,r){r.d(k,{N:()=>l});var I=r(2306),s=r(140),h=r(58);function l({entityData:C,availableEntityRelationships:F}){const _=y=>F.find(f=>f.iri===y)?.label??y.split("#").pop()??y,R=[],E={};for(const[y,f]of Object.entries(C)){for(const p of f.directMapGeometries??[])R.push({iri:y,wkt:p.wkt});for(const p of f.indirectMapGeometries??[]){E[p.rel]||(E[p.rel]=[]);for(const m of p.geometries)E[p.rel].push({iri:p.entityUUID,wkt:m.wkt})}}const M=(y,f,p)=>{if(!f.length)return null;const m=new I.ux(y,y);return m.category=p,m.collection=new s.o(f.flatMap(({iri:e,wkt:G})=>{const T=(0,h.S)(G);return T?[{type:"Feature",geometry:(0,h.n)(T),properties:{iri:e}}]:[]})),m},x=[],N=M("direct",R,"Direct");N&&x.push(N);for(const[y,f]of Object.entries(E)){const p=_(y),m=M(p,f,p);m&&x.push(m)}return x}},2081(P,k,r){r.d(k,{CueEntityViewer:()=>fe});var I=r(467),s=r(7705),h=r(2271),l=r(5802),C=r(9376),F=r(9769),_=r(9352),R=r(5381),E=r(1024),M=r(9421),x=r(5794),N=r(6117),y=r(8547),f=r(3319),p=r(5971),m=r(7573),e=r(5547);function G(n,u){if(1&n&&(e.nrm(0,"cue-key-val",4),e.nI1(1,"transloco")),2&n){const t=e.XpG(2);e.Y8G("key",e.bMT(1,2,"components.entityInfo.labelValue"))("val",t.entity().value)}}function T(n,u){if(1&n&&(e.nrm(0,"cue-key-val-editable",5),e.nI1(1,"transloco"),e.nI1(2,"transloco")),2&n){const t=e.XpG(3);e.Y8G("key",1===t.entityCategories().length?e.bMT(1,4,"components.entityInfo.labelEntityCategory"):e.bMT(2,6,"components.entityInfo.labelEntityCategories"))("val",t.entityCategoriesString())("rdfConfig",t.rdfEditConfig())("editDisabled",!t.entityCategoriesEditable())}}function V(n,u){if(1&n&&(e.nrm(0,"hr"),e.nVh(1,T,3,8,"cue-key-val-editable",5)),2&n){const t=e.XpG(2);e.R7$(),e.vxM(t.entityCategories()&&t.entityCategories().length>0?1:-1)}}function B(n,u){if(1&n&&(e.j41(0,"cue-key-val-list"),e.nVh(1,G,2,4,"cue-key-val",4),e.nVh(2,V,2,1),e.k0s()),2&n){const t=e.XpG();e.R7$(),e.vxM(t.entity().value?1:-1),e.R7$(),e.vxM(t.collapsed()?-1:2)}}function O(n,u){if(1&n&&(e.j41(0,"cue-flexcontainer",3)(1,"cue-menu",6)(2,"cue-button",7,0),e.nrm(4,"cue-button-icon",8),e.k0s(),e.nrm(5,"cue-menu-nested",9),e.k0s()()),2&n){e.XpG();const t=e.r8f(3);e.R7$(5),e.Y8G("items",t)}}let $=(()=>{class n{entity=s.hFB.required();handlers=s.hFB.required();entityCategoriesEditable=(0,s.hFB)(!1);menuItems=(0,s.hFB)([]);availableEntityCategories=(0,s.hFB)([]);collapsed=(0,s.hFB)(!1);dataChanged=(0,s.CGW)();_entityCategories=(0,h.uu)(()=>this.entity()?.categories||[]);entityCategories=(0,h.EW)(()=>this._entityCategories());entityCategoriesString=(0,h.EW)(()=>this._entityCategories().map(t=>this._iriToString(t)).sort().join(", "));infoChangeEntityCategory=(0,_.Xx)("components.entityInfo.infoChangeEntityCategory");rdfEditConfig=(0,h.EW)(()=>{var t=this;const i=this.handlers()?.requestRDFChange;var o;if(void 0!==i)return{message:this.infoChangeEntityCategory(),existingValue:this._entityCategories(),dataType:"multiselect",options:this.availableEntityCategories()?.map(o=>o.iri),optionLabelMap:this.availableEntityCategories()?.reduce((o,a)=>(o[a.iri]=a.label,o),{}),requestSave:(o=(0,I.A)(function*(a){console.log(a);const c={subject:t.entity()?.iri,predicate:`${m.E.qcy}entityCategory`,objects:t._entityCategories(),newObjects:a.newValue,type:"entityCategory",comment:a.comment};yield i(c),t._entityCategories.set(a.newValue),t.dataChanged.emit({entityCategories:a.newValue})}),function(c){return o.apply(this,arguments)})};console.warn("No RDF change request handler defined")});_iriToString(t){const i=this.availableEntityCategories()?.find(o=>o.iri===t);return i?i.label:t}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=e.VBU({type:n,selectors:[["cue-entity-info"]],inputs:{entity:[1,"entity"],handlers:[1,"handlers"],entityCategoriesEditable:[1,"entityCategoriesEditable"],menuItems:[1,"menuItems"],availableEntityCategories:[1,"availableEntityCategories"],collapsed:[1,"collapsed"]},outputs:{dataChanged:"dataChanged"},decls:5,vars:3,consts:[["trigger",""],["direction","row",2,"min-height","50px"],["direction","column",2,"flex","1 1"],["direction","column",2,"width","50px"],["size","l",3,"key","val"],["size","s",3,"key","val","rdfConfig","editDisabled"],["positioning","bottomleft"],["trigger","","variant","tertiary"],["icon","more-vert"],["menu","",3,"items"]],template:function(i,o){if(1&i&&(e.j41(0,"cue-flexcontainer",1)(1,"cue-flexcontainer",2),e.nVh(2,B,3,2,"cue-key-val-list"),e.k0s(),e.SS7(3),e.nVh(4,O,6,1,"cue-flexcontainer",3),e.k0s()),2&i){e.R7$(2),e.vxM(o.entity()?2:-1),e.R7$();const a=e.bH3(o.menuItems());e.R7$(),e.vxM(void 0!==a&&a.length>0?4:-1)}},dependencies:[R.n,E.p,M.F,x.L,N.W,y.T,f.a,p.$,_.Kj],encapsulation:2,changeDetection:0})}return n})();var S=r(4879),W=r(9937),X=r(4284);function A(n,u){if(1&n){const t=e.RV6();e.j41(0,"cue-rdf-graph",1),e.bIt("nodeHover",function(o){l.eBV(t);const a=e.XpG(2);return l.Njj(a.hoveredNode.set(o))}),e.k0s()}if(2&n){const t=e.XpG(),i=e.XpG();e.Y8G("doc",t)("collapseClasses",!0)("collapseAttributes",!0)("collapseRelationships",!0)("colorByCategory",!1)("categoryLabelsOnHover",!0)("showRelationshipLegend",!0)("legendPosition",i.legendPosition())("nodeMenuItems",i.nodeMenuItems())("focusNodes",i.focusNodes())("focusNodeColor",i.focusNodeColor())("zoomToFocusNodes",!1)}}function H(n,u){if(1&n&&e.nVh(0,A,1,12,"cue-rdf-graph",0),2&n){const t=e.XpG();e.vxM(t._containerReady()?0:-1)}}let Y=(()=>{class n{entity=s.hFB.required();availableEntityCategories=s.hFB.required();availableEntityRelationships=(0,s.hFB)([]);relationships=(0,s.hFB)(void 0);legendPosition=(0,s.hFB)("top-left");showOpenEntityMenuItem=(0,s.hFB)(!0);clickedOpenEntity=(0,s.CGW)();doc=(0,l.vPA)(void 0);_containerReady=(0,l.vPA)(!1);_hostElement=(0,l.WQX)(e.aKT);_resolvedEntityIRI=(0,h.EW)(()=>{const t=this.entity()?.iri;if(t){if(!t.includes("://"))throw new Error(`Expected a full IRI but got: ${t}`);return t}});focusNodes=(0,h.EW)(()=>{const t=this._resolvedEntityIRI();return t?[t]:[]});focusNodeColor=(0,l.vPA)("green");_document=(0,l.WQX)(l.qQL);hoveredNode=(0,l.vPA)(void 0);labelOpenEntity=(0,_.Xx)("components.graph.entityGraph.labelOpenEntity");nodeMenuItems=(0,h.EW)(()=>{const t=[];return this.showOpenEntityMenuItem()&&this.hoveredNode()?.id!==this._resolvedEntityIRI()&&t.push({id:"open",label:this.labelOpenEntity(),action:i=>this.clickedOpenEntity.emit(i.id)}),t});constructor(){(0,e.mal)(()=>{const t=getComputedStyle(this._document.documentElement).getPropertyValue("--cue-color-green").trim();t&&this.focusNodeColor.set(t)}),(0,l.QZP)(()=>{const t=this.entity()?.iri,i=this.relationships();void 0===t||void 0===i||this._buildDoc(i)}),(0,e.mal)(()=>{if(this._containerReady())return;const t=this._hostElement.nativeElement,i=new ResizeObserver(o=>{if(this._containerReady())return void i.disconnect();const a=o[0]?.contentRect;a&&a.width>=100&&a.height>=100&&(this._containerReady.set(!0),i.disconnect())});return i.observe(t),()=>i.disconnect()})}ngAfterViewInit(){const t=this._hostElement.nativeElement;t.clientWidth>=100&&t.clientHeight>=100&&this._containerReady.set(!0)}_buildDoc(t){const{incoming:i,outgoing:o}=t,a={"@context":{qcy:`${m.E.qcy}`,"qcy-e":`${m.E["qcy-e"]}`,skos:`${X.B.skos}`},"@graph":[]},c=this._resolvedEntityIRI(),v={"@id":c,"qcy:value":this.entity()?.value,"@type":this.entity()?.categories};a["@graph"].push(v),o.forEach(d=>{a["@graph"].push({"@id":d.nodeIRI,"qcy:value":d.nodeValue,"@type":d.nodeCategories}),a["@graph"].push({"@id":c,[d.relIRI]:{"@id":d.nodeIRI}})}),i.forEach(d=>{a["@graph"].push({"@id":d.nodeIRI,"qcy:value":d.nodeValue,"@type":d.nodeCategories}),a["@graph"].push({"@id":d.nodeIRI,[d.relIRI]:{"@id":c}})});const b=new Set;i.forEach(d=>d.nodeCategories.forEach(g=>b.add(g))),o.forEach(d=>d.nodeCategories.forEach(g=>b.add(g))),this.entity()?.categories.forEach(d=>b.add(d)),b.forEach(d=>{const g=this.availableEntityCategories().find(L=>L.iri===d)?.label;void 0!==g&&a["@graph"].push({"@id":d,"skos:prefLabel":g})}),new Set(i.map(d=>d.relIRI).concat(o.map(d=>d.relIRI))).forEach(d=>{const g=this.availableEntityRelationships().find(L=>L.iri===d)?.label;void 0!==g&&a["@graph"].push({"@id":d,"skos:prefLabel":g})}),this.doc.update(()=>a)}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=e.VBU({type:n,selectors:[["cue-entity-graph"]],inputs:{entity:[1,"entity"],availableEntityCategories:[1,"availableEntityCategories"],availableEntityRelationships:[1,"availableEntityRelationships"],relationships:[1,"relationships"],legendPosition:[1,"legendPosition"],showOpenEntityMenuItem:[1,"showOpenEntityMenuItem"]},outputs:{clickedOpenEntity:"clickedOpenEntity"},decls:1,vars:1,consts:[[3,"doc","collapseClasses","collapseAttributes","collapseRelationships","colorByCategory","categoryLabelsOnHover","showRelationshipLegend","legendPosition","nodeMenuItems","focusNodes","focusNodeColor","zoomToFocusNodes"],[3,"nodeHover","doc","collapseClasses","collapseAttributes","collapseRelationships","colorByCategory","categoryLabelsOnHover","showRelationshipLegend","legendPosition","nodeMenuItems","focusNodes","focusNodeColor","zoomToFocusNodes"]],template:function(i,o){if(1&i&&e.nVh(0,H,1,1),2&i){let a;e.vxM((a=o.doc())?0:-1,a)}},dependencies:[W.t],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;min-height:400px;min-width:100px}"]})}return n})();var z=r(8017),U=r(2306),Q=r(6103),K=r(6455),Z=r(8334),j=r(2245),q=r(7851);function J(n,u){1&n&&(e.j41(0,"cue-typography",2),e.EFF(1),e.nI1(2,"transloco"),e.k0s()),2&n&&(e.R7$(),e.SpI(" ",e.bMT(2,1,"components.entityData.infoNoData")," "))}function ee(n,u){if(1&n&&(e.j41(0,"div",0),e.nVh(1,J,3,3,"cue-typography",2),e.k0s()),2&n){e.XpG();const t=e.r8f(6);e.Y8G("cueLogoLoader",t),e.R7$(),e.vxM(t?-1:1)}}function te(n,u){if(1&n){const t=e.RV6();e.j41(0,"cue-tab",3),e.nI1(1,"transloco"),e.j41(2,"cue-entity-graph",5),e.bIt("clickedOpenEntity",function(o){let a;l.eBV(t);const c=e.XpG(2);return c.clickedOpenEntity.emit(o),l.Njj(null==(a=c.handlers())||null==a.openEntity?null:a.openEntity(o))}),e.k0s()()}if(2&n){e.XpG();const t=e.r8f(1),i=e.XpG(),o=e.r8f(0);e.Y8G("label",e.bMT(1,5,"components.entityData.titleEntityGraph")),e.R7$(2),e.Y8G("entity",t)("availableEntityCategories",i.availableEntityCategories())("availableEntityRelationships",i.availableEntityRelationships())("relationships",o)}}function ne(n,u){if(1&n){const t=e.RV6();e.j41(0,"cue-tab",4),e.nI1(1,"transloco"),e.j41(2,"cue-doc-list",6),e.bIt("clickedDocument",function(o){l.eBV(t);const a=e.XpG(2);return l.Njj(a.clickedDocument.emit(o))}),e.k0s()()}if(2&n){const t=e.XpG(2);e.Y8G("label",e.bMT(1,4,"components.entityData.titleRelatedDocuments")),e.R7$(2),e.Y8G("documentRefs",t.documentRefs())("handlers",t.internalDocumentListHandlers())("documentData",t.documentData())}}function ie(n,u){if(1&n){const t=e.RV6();e.j41(0,"cue-tab",4),e.nI1(1,"transloco"),e.j41(2,"div",7)(3,"cue-map",8),e.bIt("clickedFeature",function(o){l.eBV(t);const a=e.XpG(2);return l.Njj(a.mapFeatureClicked.emit(o))}),e.k0s()()()}if(2&n){e.XpG(2);const t=e.r8f(3),i=e.r8f(4);e.Y8G("label",e.bMT(1,3,"components.entityData.titleMap")),e.R7$(3),e.Y8G("layers",t)("settings",i)}}function ae(n,u){if(1&n&&(e.j41(0,"cue-tabs",1),e.SS7(1),e.nVh(2,te,3,7,"cue-tab",3),e.nVh(3,ne,3,6,"cue-tab",4),e.nVh(4,ie,4,5,"cue-tab",4),e.k0s()),2&n){const t=e.XpG(),i=e.r8f(1),o=e.r8f(2),a=e.r8f(5);e.Y8G("variant",t.variant()),e.R7$();const c=e.bH3(t.entity());e.R7$(),e.vxM(i&&c?2:-1),e.R7$(),e.vxM(o?3:-1),e.R7$(),e.vxM(a?4:-1)}}let oe=(()=>{class n{iri=s.hFB.required();availableEntityCategories=s.hFB.required();availableEntityRelationships=(0,s.hFB)([]);mapboxToken=s.hFB.required();handlers=(0,s.hFB)(void 0);variant=(0,s.hFB)("none");clickedOpenEntity=(0,s.CGW)();clickedDocument=(0,s.CGW)();mapFeatureClicked=(0,s.CGW)();relationshipData=(0,s.hFB)(void 0);documentRefs=(0,s.hFB)([]);documentData=(0,s.hFB)({});entityDetailedData=(0,s.hFB)(void 0);_fetchedIRIs=new Set;_mapLayers=(0,l.vPA)([]);_isLoading=(0,l.vPA)(!1);mapSettings=(0,h.EW)(()=>{const t=this.mapboxToken();if(t)return{...new U.yY,mapboxToken:t}});mapLayers=this._mapLayers.asReadonly();isEntityLoading=this._isLoading.asReadonly();entity=(0,h.EW)(()=>{const t=this.entityDetailedData();return t?{iri:this.iri(),value:t.value,categories:t.categories}:void 0});internalDocumentListHandlers=(0,h.EW)(()=>{const t=this.handlers();return{requestData:i=>{t?.requestDocumentData?.(i)},requestDownload:t?.downloadDocument,requestOpen:t?.openDocument,requestOpenInDir:t?.openDocumentInFileManager}});constructor(){(0,l.QZP)(()=>{const t=this.iri(),i=this.handlers();if(!t||!i||this._fetchedIRIs.has(t))return;this._fetchedIRIs.add(t),this._isLoading.set(!0),this._mapLayers.set([]),i.requestEntityLocations?.([t]);const o=i.requestRelationships?.(t);o?o.then(()=>this._isLoading.set(!1)).catch(()=>this._isLoading.set(!1)):this._isLoading.set(!1)}),(0,l.QZP)(()=>{const t=this.entityDetailedData();if(!t)return;const i=this.iri(),o=(0,Q.N)({entityData:{[i]:t},availableEntityRelationships:this.availableEntityRelationships()});this._mapLayers.set(o)})}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=e.VBU({type:n,selectors:[["cue-entity-data"]],inputs:{iri:[1,"iri"],availableEntityCategories:[1,"availableEntityCategories"],availableEntityRelationships:[1,"availableEntityRelationships"],mapboxToken:[1,"mapboxToken"],handlers:[1,"handlers"],variant:[1,"variant"],relationshipData:[1,"relationshipData"],documentRefs:[1,"documentRefs"],documentData:[1,"documentData"],entityDetailedData:[1,"entityDetailedData"]},outputs:{clickedOpenEntity:"clickedOpenEntity",clickedDocument:"clickedDocument",mapFeatureClicked:"mapFeatureClicked"},decls:9,vars:8,consts:[[2,"height","400px","width","100%","display","flex","align-items","center","justify-content","center","background","var(--cue-color-background-subtle, #f8f9fa)","border-radius","4px",3,"cueLogoLoader"],[2,"width","100%","flex","1","min-height","400px","height","100%",3,"variant"],[2,"text-align","center","color","var(--cue-color-text-muted, #6c757d)"],[2,"height","100%",3,"label"],[3,"label"],["legendPosition","top-right",2,"flex","1","min-height","400px","width","100%",3,"clickedOpenEntity","entity","availableEntityCategories","availableEntityRelationships","relationships"],[3,"clickedDocument","documentRefs","handlers","documentData"],[2,"display","flex","flex-direction","column","flex","1","min-height","400px","width","100%","position","relative"],[2,"width","100%",3,"clickedFeature","layers","settings"]],template:function(i,o){if(1&i&&(e.SS7(0)(1)(2)(3)(4)(5)(6),e.nVh(7,ee,2,2,"div",0)(8,ae,5,5,"cue-tabs",1)),2&i){const a=e.bH3(o.relationshipData());e.R7$();const c=e.bH3(a&&a.incoming.length+a.outgoing.length>0);e.R7$();const v=e.bH3(o.documentRefs().length>0);e.R7$();const b=e.bH3(o.mapLayers());e.R7$();const D=e.bH3(o.mapSettings());e.R7$();const d=e.bH3(void 0!==D&&b.length>0);e.R7$(),e.bH3(o.isEntityLoading()),e.R7$(),e.vxM(c||v||d?8:7)}},dependencies:[Y,S.g,K.t,Z.o,z.T,j.Typography,q.k,_.Kj],styles:["[_nghost-%COMP%]{display:contents}"],changeDetection:0})}return n})();var se=r(2403),re=r(7293);function le(n,u){if(1&n&&(e.j41(0,"cue-flexcontainer",3)(1,"cue-typography",5),e.EFF(2),e.k0s()()),2&n){const t=e.XpG(2);e.R7$(2),e.SpI(" ",t.errorMessage()," ")}}function ce(n,u){1&n&&(e.j41(0,"cue-flexcontainer",3)(1,"cue-typography",6),e.EFF(2," No project connected. "),e.k0s()())}function de(n,u){1&n&&(e.j41(0,"cue-flexcontainer",3)(1,"cue-typography",6),e.EFF(2," No entity selected. "),e.k0s()())}function ue(n,u){if(1&n&&e.nrm(0,"cue-entity-info",7),2&n){e.XpG();const t=e.r8f(0),i=e.XpG(2);e.Y8G("entity",t)("entityCategoriesEditable",!1)("availableEntityCategories",i.availableEntityCategories())("collapsed",!1)("handlers",i._entityInfoHandlers)}}function he(n,u){1&n&&(e.j41(0,"cue-typography",8),e.EFF(1),e.nI1(2,"transloco"),e.k0s()),2&n&&(e.Y8G("cuePulse",!0),e.R7$(),e.JRh(e.bMT(2,2,"common.infoLoading")))}function pe(n,u){if(1&n&&(e.SS7(0),e.nVh(1,ue,1,5,"cue-entity-info",7)(2,he,3,4,"cue-typography",8),e.nrm(3,"div",9),e.j41(4,"div",10),e.nrm(5,"cue-entity-data",11),e.k0s()),2&n){const t=e.XpG(2),i=e.bH3(t._entity());e.R7$(),e.vxM(i?1:2),e.R7$(4),e.Y8G("iri",t._currentIri())("availableEntityCategories",t.availableEntityCategories())("availableEntityRelationships",t.availableEntityRelationships())("mapboxToken",t.mapboxToken()??"")("handlers",t._entityDataHandlers())("relationshipData",t.relationshipData())("documentRefs",t.documentRefs())("documentData",t.documentData())("entityDetailedData",t.entityData())}}function ge(n,u){if(1&n&&e.nrm(0,"cue-logo-link",4),2&n){const t=e.XpG(2);e.Y8G("projectId",t.projectId())("resourceId",t._resourceId())}}function ye(n,u){if(1&n&&(e.j41(0,"div",2),e.nVh(1,le,3,1,"cue-flexcontainer",3)(2,ce,3,0,"cue-flexcontainer",3)(3,de,3,0,"cue-flexcontainer",3)(4,pe,6,11),e.nVh(5,ge,1,2,"cue-logo-link",4),e.k0s()),2&n){const t=e.XpG();e.R7$(),e.vxM("error"===t.state()?1:"idle"===t.state()?2:"no-entity"===t.state()?3:t._currentIri()?4:-1),e.R7$(4),e.vxM(t.showLogo()?5:-1)}}function w(n){return n.split("/").pop()}function me(n){return{id:n.id,contentIRI:n.contentIRI??n.id,path:n.path??"",suffix:n.suffix??"",size:n.size??0,tags:n.tags??[],summary:n.summary??"",categories:n.categories??[],subject:n.subject,providerId:n.providerId,relevance:0}}let fe=(()=>{class n{cue=(0,s.hFB)(void 0);projectId=(0,s.hFB)(void 0);showLogo=(0,s.hFB)(!1,{transform:s.L39});_resourceId=(0,h.EW)(()=>{const t=this._currentIri();return t?t.split("/").pop():void 0});iri=(0,s.hFB)(void 0);mapboxToken=(0,s.hFB)(void 0);showTranslatedRelationshipLabels=(0,s.hFB)(!1,{transform:s.L39});variant=(0,s.hFB)("none");openEntity=(0,s.CGW)();state=(0,l.vPA)("idle");errorMessage=(0,l.vPA)(null);availableEntityCategories=(0,l.vPA)([]);availableEntityRelationships=(0,l.vPA)([]);relationshipData=(0,l.vPA)(void 0);documentRefs=(0,l.vPA)([]);documentData=(0,l.vPA)({});entityData=(0,l.vPA)(void 0);_entities=(0,l.vPA)(void 0);_documents=(0,l.vPA)(void 0);_unsubscribeEntities;_unsubscribeDocuments;_unsubscribeSchema;_lastIri;_inputWarningTimer;_currentIri=(0,h.EW)(()=>this.iri());_entity=(0,h.EW)(()=>{const t=this.entityData();return t?{iri:this.iri(),value:t.value,categories:t.categories}:void 0});_entityInfoHandlers={};_entityDataHandlers=(0,h.EW)(()=>{var t=this;const i=this._entities(),o=this._documents();return{requestRelationships:(a=(0,I.A)(function*(c){yield Promise.all([i?.fetchEntityRelationships(c).then(v=>t.relationshipData.set(v)),i?.fetchEntityDocuments(c).then(v=>{t.documentRefs.set(v.map(b=>({id:b}))),o&&v.length>0&&o.requestDocumentData(v)})])}),function(v){return a.apply(this,arguments)}),requestDocumentData:a=>o?.requestDocumentData(a),requestEntityLocations:a=>{if(!this.mapboxToken())return void console.warn("[cue-entity-viewer] No mapboxToken provided \u2014 skipping map location fetch.");const c=a.map(w).filter(Boolean);i?.requestEntityLocations(c)},openEntity:a=>this.openEntity.emit(a)};var a});constructor(){this._inputWarningTimer=setTimeout(()=>{this.cue()||console.warn('[cue-entity-viewer] Required input "cue" is not set. Pass an authenticated Cue SDK instance.'),this.projectId()||console.warn('[cue-entity-viewer] Required input "projectId" is not set. Pass the Cue project ID to display entity data.')},3e3),(0,l.QZP)(()=>{this._setup(this.cue(),this.projectId())}),(0,l.QZP)(()=>{const t=this._entities(),i=this.iri();t&&i&&void 0===this._entity()&&t.requestEntityData([w(i)],!1)}),(0,l.QZP)(()=>{const t=this._entities(),i=this.iri();!t||!i||(i!==this._lastIri&&(this._lastIri=i,this.relationshipData.set(void 0),this.documentRefs.set([]),this.entityData.set(void 0),this.state.set("ready")),this._syncEntityData(t,i))})}ngOnDestroy(){clearTimeout(this._inputWarningTimer),this._teardown()}_setup(t,i){if(this._teardown(),!t||!i)return this._entities.set(void 0),this._documents.set(void 0),void this.state.set("idle");const o=new C.g8(t.api,i),a=new C.f$(t.api,i);if(this._entities.set(o),this._documents.set(a),this._lastIri=void 0,this.state.set(this.iri()?"ready":"no-entity"),this._unsubscribeEntities=o.entityInfoMap.subscribe(()=>{const c=this.iri();c&&this._syncEntityData(o,c)}),this._unsubscribeDocuments=a.documentInfoMap.subscribe(()=>{this._syncDocumentData(a)}),o.contentCategoriesInProject(!0).then(c=>this.availableEntityCategories.set(c)).catch(c=>console.error("[cue-entity-viewer] Failed to fetch categories",c)),this.showTranslatedRelationshipLabels()){const c=new C.Ug(t.api,i,t.api.language);this._unsubscribeSchema=c.availableEntityRelationships.subscribe(()=>{this.availableEntityRelationships.set(c.availableEntityRelationships.get())})}}_syncEntityData(t,i){const o=w(i),a=t.entityInfoMap.get()[o];if(!a)return;const c=Array.isArray(a.documentRefs)?a.documentRefs.map(D=>"string"==typeof D?{id:D}:D):[],{documentRefs:v,...b}=a;this.entityData.set({...b,documentRefs:c}),c.length>0&&this.documentRefs.set(c)}_syncDocumentData(t){const i=t.documentInfoMap.get(),o={};for(const[a,c]of Object.entries(i))o[a]=me(c);this.documentData.set(o)}_teardown(){this._unsubscribeEntities?.(),this._unsubscribeDocuments?.(),this._unsubscribeSchema?.(),this._unsubscribeEntities=void 0,this._unsubscribeDocuments=void 0,this._unsubscribeSchema=void 0}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=e.VBU({type:n,selectors:[["cue-entity-viewer-wc"]],inputs:{cue:[1,"cue"],projectId:[1,"projectId"],showLogo:[1,"showLogo"],iri:[1,"iri"],mapboxToken:[1,"mapboxToken"],showTranslatedRelationshipLabels:[1,"showTranslatedRelationshipLabels"],variant:[1,"variant"]},outputs:{openEntity:"openEntity"},decls:3,vars:1,consts:[["body",""],[3,"ngTemplateOutlet"],[2,"display","flex","flex-direction","column","height","100%","overflow","hidden","width","100%","position","relative"],["direction","column","align","center","justify","center",2,"height","100%","width","100%","padding","8px"],[2,"position","absolute","top","12px","right","12px","z-index","5",3,"projectId","resourceId"],[2,"color","#c44","font-size","13px"],[2,"color","#9ca3af","font-size","13px"],[3,"entity","entityCategoriesEditable","availableEntityCategories","collapsed","handlers"],["cuePulseMode","text",3,"cuePulse"],[2,"height","16px"],[2,"flex","1","min-height","0"],[2,"width","100%","height","100%",3,"iri","availableEntityCategories","availableEntityRelationships","mapboxToken","handlers","relationshipData","documentRefs","documentData","entityDetailedData"]],template:function(i,o){if(1&i&&(e.DNE(0,ye,6,2,"ng-template",null,0,e.C5r),e.eu8(2,1)),2&i){const a=e.sdS(1);e.R7$(2),e.Y8G("ngTemplateOutlet",a)}},dependencies:[$,oe,R.n,j.Typography,se.V,F.T3,re.x,_.Kj],styles:["[_nghost-%COMP%]{display:block;width:100%;height:100%;overflow:hidden}"],changeDetection:0})}return n})()}}]);
|
|
1
|
+
"use strict";(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[2081],{6103(P,k,r){r.d(k,{N:()=>l});var I=r(2306),s=r(140),h=r(58);function l({entityData:C,availableEntityRelationships:F}){const _=y=>F.find(f=>f.iri===y)?.label??y.split("#").pop()??y,R=[],E={};for(const[y,f]of Object.entries(C)){for(const p of f.directMapGeometries??[])R.push({iri:y,wkt:p.wkt});for(const p of f.indirectMapGeometries??[]){E[p.rel]||(E[p.rel]=[]);for(const m of p.geometries)E[p.rel].push({iri:p.entityUUID,wkt:m.wkt})}}const M=(y,f,p)=>{if(!f.length)return null;const m=new I.ux(y,y);return m.category=p,m.collection=new s.o(f.flatMap(({iri:e,wkt:G})=>{const T=(0,h.S)(G);return T?[{type:"Feature",geometry:(0,h.n)(T),properties:{iri:e}}]:[]})),m},x=[],N=M("direct",R,"Direct");N&&x.push(N);for(const[y,f]of Object.entries(E)){const p=_(y),m=M(p,f,p);m&&x.push(m)}return x}},2081(P,k,r){r.d(k,{CueEntityViewer:()=>fe});var I=r(467),s=r(7705),h=r(2271),l=r(5802),C=r(1492),F=r(9769),_=r(9352),R=r(5381),E=r(1024),M=r(9421),x=r(5794),N=r(6117),y=r(8547),f=r(3319),p=r(5971),m=r(7573),e=r(5547);function G(n,u){if(1&n&&(e.nrm(0,"cue-key-val",4),e.nI1(1,"transloco")),2&n){const t=e.XpG(2);e.Y8G("key",e.bMT(1,2,"components.entityInfo.labelValue"))("val",t.entity().value)}}function T(n,u){if(1&n&&(e.nrm(0,"cue-key-val-editable",5),e.nI1(1,"transloco"),e.nI1(2,"transloco")),2&n){const t=e.XpG(3);e.Y8G("key",1===t.entityCategories().length?e.bMT(1,4,"components.entityInfo.labelEntityCategory"):e.bMT(2,6,"components.entityInfo.labelEntityCategories"))("val",t.entityCategoriesString())("rdfConfig",t.rdfEditConfig())("editDisabled",!t.entityCategoriesEditable())}}function V(n,u){if(1&n&&(e.nrm(0,"hr"),e.nVh(1,T,3,8,"cue-key-val-editable",5)),2&n){const t=e.XpG(2);e.R7$(),e.vxM(t.entityCategories()&&t.entityCategories().length>0?1:-1)}}function B(n,u){if(1&n&&(e.j41(0,"cue-key-val-list"),e.nVh(1,G,2,4,"cue-key-val",4),e.nVh(2,V,2,1),e.k0s()),2&n){const t=e.XpG();e.R7$(),e.vxM(t.entity().value?1:-1),e.R7$(),e.vxM(t.collapsed()?-1:2)}}function O(n,u){if(1&n&&(e.j41(0,"cue-flexcontainer",3)(1,"cue-menu",6)(2,"cue-button",7,0),e.nrm(4,"cue-button-icon",8),e.k0s(),e.nrm(5,"cue-menu-nested",9),e.k0s()()),2&n){e.XpG();const t=e.r8f(3);e.R7$(5),e.Y8G("items",t)}}let $=(()=>{class n{entity=s.hFB.required();handlers=s.hFB.required();entityCategoriesEditable=(0,s.hFB)(!1);menuItems=(0,s.hFB)([]);availableEntityCategories=(0,s.hFB)([]);collapsed=(0,s.hFB)(!1);dataChanged=(0,s.CGW)();_entityCategories=(0,h.uu)(()=>this.entity()?.categories||[]);entityCategories=(0,h.EW)(()=>this._entityCategories());entityCategoriesString=(0,h.EW)(()=>this._entityCategories().map(t=>this._iriToString(t)).sort().join(", "));infoChangeEntityCategory=(0,_.Xx)("components.entityInfo.infoChangeEntityCategory");rdfEditConfig=(0,h.EW)(()=>{var t=this;const i=this.handlers()?.requestRDFChange;var o;if(void 0!==i)return{message:this.infoChangeEntityCategory(),existingValue:this._entityCategories(),dataType:"multiselect",options:this.availableEntityCategories()?.map(o=>o.iri),optionLabelMap:this.availableEntityCategories()?.reduce((o,a)=>(o[a.iri]=a.label,o),{}),requestSave:(o=(0,I.A)(function*(a){console.log(a);const c={subject:t.entity()?.iri,predicate:`${m.E.qcy}entityCategory`,objects:t._entityCategories(),newObjects:a.newValue,type:"entityCategory",comment:a.comment};yield i(c),t._entityCategories.set(a.newValue),t.dataChanged.emit({entityCategories:a.newValue})}),function(c){return o.apply(this,arguments)})};console.warn("No RDF change request handler defined")});_iriToString(t){const i=this.availableEntityCategories()?.find(o=>o.iri===t);return i?i.label:t}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=e.VBU({type:n,selectors:[["cue-entity-info"]],inputs:{entity:[1,"entity"],handlers:[1,"handlers"],entityCategoriesEditable:[1,"entityCategoriesEditable"],menuItems:[1,"menuItems"],availableEntityCategories:[1,"availableEntityCategories"],collapsed:[1,"collapsed"]},outputs:{dataChanged:"dataChanged"},decls:5,vars:3,consts:[["trigger",""],["direction","row",2,"min-height","50px"],["direction","column",2,"flex","1 1"],["direction","column",2,"width","50px"],["size","l",3,"key","val"],["size","s",3,"key","val","rdfConfig","editDisabled"],["positioning","bottomleft"],["trigger","","variant","tertiary"],["icon","more-vert"],["menu","",3,"items"]],template:function(i,o){if(1&i&&(e.j41(0,"cue-flexcontainer",1)(1,"cue-flexcontainer",2),e.nVh(2,B,3,2,"cue-key-val-list"),e.k0s(),e.SS7(3),e.nVh(4,O,6,1,"cue-flexcontainer",3),e.k0s()),2&i){e.R7$(2),e.vxM(o.entity()?2:-1),e.R7$();const a=e.bH3(o.menuItems());e.R7$(),e.vxM(void 0!==a&&a.length>0?4:-1)}},dependencies:[R.FlexContainer,E.p,M.F,x.L,N.W,y.T,f.ButtonIcon,p.Button,_.Kj],encapsulation:2,changeDetection:0})}return n})();var S=r(2283),W=r(9937),X=r(4284);function A(n,u){if(1&n){const t=e.RV6();e.j41(0,"cue-rdf-graph",1),e.bIt("nodeHover",function(o){l.eBV(t);const a=e.XpG(2);return l.Njj(a.hoveredNode.set(o))}),e.k0s()}if(2&n){const t=e.XpG(),i=e.XpG();e.Y8G("doc",t)("collapseClasses",!0)("collapseAttributes",!0)("collapseRelationships",!0)("colorByCategory",!1)("categoryLabelsOnHover",!0)("showRelationshipLegend",!0)("legendPosition",i.legendPosition())("nodeMenuItems",i.nodeMenuItems())("focusNodes",i.focusNodes())("focusNodeColor",i.focusNodeColor())("zoomToFocusNodes",!1)}}function H(n,u){if(1&n&&e.nVh(0,A,1,12,"cue-rdf-graph",0),2&n){const t=e.XpG();e.vxM(t._containerReady()?0:-1)}}let Y=(()=>{class n{entity=s.hFB.required();availableEntityCategories=s.hFB.required();availableEntityRelationships=(0,s.hFB)([]);relationships=(0,s.hFB)(void 0);legendPosition=(0,s.hFB)("top-left");showOpenEntityMenuItem=(0,s.hFB)(!0);clickedOpenEntity=(0,s.CGW)();doc=(0,l.vPA)(void 0);_containerReady=(0,l.vPA)(!1);_hostElement=(0,l.WQX)(e.aKT);_resolvedEntityIRI=(0,h.EW)(()=>{const t=this.entity()?.iri;if(t){if(!t.includes("://"))throw new Error(`Expected a full IRI but got: ${t}`);return t}});focusNodes=(0,h.EW)(()=>{const t=this._resolvedEntityIRI();return t?[t]:[]});focusNodeColor=(0,l.vPA)("green");_document=(0,l.WQX)(l.qQL);hoveredNode=(0,l.vPA)(void 0);labelOpenEntity=(0,_.Xx)("components.graph.entityGraph.labelOpenEntity");nodeMenuItems=(0,h.EW)(()=>{const t=[];return this.showOpenEntityMenuItem()&&this.hoveredNode()?.id!==this._resolvedEntityIRI()&&t.push({id:"open",label:this.labelOpenEntity(),action:i=>this.clickedOpenEntity.emit(i.id)}),t});constructor(){(0,e.mal)(()=>{const t=getComputedStyle(this._document.documentElement).getPropertyValue("--cue-color-green").trim();t&&this.focusNodeColor.set(t)}),(0,l.QZP)(()=>{const t=this.entity()?.iri,i=this.relationships();void 0===t||void 0===i||this._buildDoc(i)}),(0,e.mal)(()=>{if(this._containerReady())return;const t=this._hostElement.nativeElement,i=new ResizeObserver(o=>{if(this._containerReady())return void i.disconnect();const a=o[0]?.contentRect;a&&a.width>=100&&a.height>=100&&(this._containerReady.set(!0),i.disconnect())});return i.observe(t),()=>i.disconnect()})}ngAfterViewInit(){const t=this._hostElement.nativeElement;t.clientWidth>=100&&t.clientHeight>=100&&this._containerReady.set(!0)}_buildDoc(t){const{incoming:i,outgoing:o}=t,a={"@context":{qcy:`${m.E.qcy}`,"qcy-e":`${m.E["qcy-e"]}`,skos:`${X.B.skos}`},"@graph":[]},c=this._resolvedEntityIRI(),v={"@id":c,"qcy:value":this.entity()?.value,"@type":this.entity()?.categories};a["@graph"].push(v),o.forEach(d=>{a["@graph"].push({"@id":d.nodeIRI,"qcy:value":d.nodeValue,"@type":d.nodeCategories}),a["@graph"].push({"@id":c,[d.relIRI]:{"@id":d.nodeIRI}})}),i.forEach(d=>{a["@graph"].push({"@id":d.nodeIRI,"qcy:value":d.nodeValue,"@type":d.nodeCategories}),a["@graph"].push({"@id":d.nodeIRI,[d.relIRI]:{"@id":c}})});const b=new Set;i.forEach(d=>d.nodeCategories.forEach(g=>b.add(g))),o.forEach(d=>d.nodeCategories.forEach(g=>b.add(g))),this.entity()?.categories.forEach(d=>b.add(d)),b.forEach(d=>{const g=this.availableEntityCategories().find(L=>L.iri===d)?.label;void 0!==g&&a["@graph"].push({"@id":d,"skos:prefLabel":g})}),new Set(i.map(d=>d.relIRI).concat(o.map(d=>d.relIRI))).forEach(d=>{const g=this.availableEntityRelationships().find(L=>L.iri===d)?.label;void 0!==g&&a["@graph"].push({"@id":d,"skos:prefLabel":g})}),this.doc.update(()=>a)}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=e.VBU({type:n,selectors:[["cue-entity-graph"]],inputs:{entity:[1,"entity"],availableEntityCategories:[1,"availableEntityCategories"],availableEntityRelationships:[1,"availableEntityRelationships"],relationships:[1,"relationships"],legendPosition:[1,"legendPosition"],showOpenEntityMenuItem:[1,"showOpenEntityMenuItem"]},outputs:{clickedOpenEntity:"clickedOpenEntity"},decls:1,vars:1,consts:[[3,"doc","collapseClasses","collapseAttributes","collapseRelationships","colorByCategory","categoryLabelsOnHover","showRelationshipLegend","legendPosition","nodeMenuItems","focusNodes","focusNodeColor","zoomToFocusNodes"],[3,"nodeHover","doc","collapseClasses","collapseAttributes","collapseRelationships","colorByCategory","categoryLabelsOnHover","showRelationshipLegend","legendPosition","nodeMenuItems","focusNodes","focusNodeColor","zoomToFocusNodes"]],template:function(i,o){if(1&i&&e.nVh(0,H,1,1),2&i){let a;e.vxM((a=o.doc())?0:-1,a)}},dependencies:[W.t],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;min-height:400px;min-width:100px}"]})}return n})();var z=r(8017),U=r(2306),Q=r(6103),K=r(6455),Z=r(8334),j=r(2245),q=r(7851);function J(n,u){1&n&&(e.j41(0,"cue-typography",2),e.EFF(1),e.nI1(2,"transloco"),e.k0s()),2&n&&(e.R7$(),e.SpI(" ",e.bMT(2,1,"components.entityData.infoNoData")," "))}function ee(n,u){if(1&n&&(e.j41(0,"div",0),e.nVh(1,J,3,3,"cue-typography",2),e.k0s()),2&n){e.XpG();const t=e.r8f(6);e.Y8G("cueLogoLoader",t),e.R7$(),e.vxM(t?-1:1)}}function te(n,u){if(1&n){const t=e.RV6();e.j41(0,"cue-tab",3),e.nI1(1,"transloco"),e.j41(2,"cue-entity-graph",5),e.bIt("clickedOpenEntity",function(o){let a;l.eBV(t);const c=e.XpG(2);return c.clickedOpenEntity.emit(o),l.Njj(null==(a=c.handlers())||null==a.openEntity?null:a.openEntity(o))}),e.k0s()()}if(2&n){e.XpG();const t=e.r8f(1),i=e.XpG(),o=e.r8f(0);e.Y8G("label",e.bMT(1,5,"components.entityData.titleEntityGraph")),e.R7$(2),e.Y8G("entity",t)("availableEntityCategories",i.availableEntityCategories())("availableEntityRelationships",i.availableEntityRelationships())("relationships",o)}}function ne(n,u){if(1&n){const t=e.RV6();e.j41(0,"cue-tab",4),e.nI1(1,"transloco"),e.j41(2,"cue-doc-list",6),e.bIt("clickedDocument",function(o){l.eBV(t);const a=e.XpG(2);return l.Njj(a.clickedDocument.emit(o))}),e.k0s()()}if(2&n){const t=e.XpG(2);e.Y8G("label",e.bMT(1,4,"components.entityData.titleRelatedDocuments")),e.R7$(2),e.Y8G("documentRefs",t.documentRefs())("handlers",t.internalDocumentListHandlers())("documentData",t.documentData())}}function ie(n,u){if(1&n){const t=e.RV6();e.j41(0,"cue-tab",4),e.nI1(1,"transloco"),e.j41(2,"div",7)(3,"cue-map",8),e.bIt("clickedFeature",function(o){l.eBV(t);const a=e.XpG(2);return l.Njj(a.mapFeatureClicked.emit(o))}),e.k0s()()()}if(2&n){e.XpG(2);const t=e.r8f(3),i=e.r8f(4);e.Y8G("label",e.bMT(1,3,"components.entityData.titleMap")),e.R7$(3),e.Y8G("layers",t)("settings",i)}}function ae(n,u){if(1&n&&(e.j41(0,"cue-tabs",1),e.SS7(1),e.nVh(2,te,3,7,"cue-tab",3),e.nVh(3,ne,3,6,"cue-tab",4),e.nVh(4,ie,4,5,"cue-tab",4),e.k0s()),2&n){const t=e.XpG(),i=e.r8f(1),o=e.r8f(2),a=e.r8f(5);e.Y8G("variant",t.variant()),e.R7$();const c=e.bH3(t.entity());e.R7$(),e.vxM(i&&c?2:-1),e.R7$(),e.vxM(o?3:-1),e.R7$(),e.vxM(a?4:-1)}}let oe=(()=>{class n{iri=s.hFB.required();availableEntityCategories=s.hFB.required();availableEntityRelationships=(0,s.hFB)([]);mapboxToken=s.hFB.required();handlers=(0,s.hFB)(void 0);variant=(0,s.hFB)("none");clickedOpenEntity=(0,s.CGW)();clickedDocument=(0,s.CGW)();mapFeatureClicked=(0,s.CGW)();relationshipData=(0,s.hFB)(void 0);documentRefs=(0,s.hFB)([]);documentData=(0,s.hFB)({});entityDetailedData=(0,s.hFB)(void 0);_fetchedIRIs=new Set;_mapLayers=(0,l.vPA)([]);_isLoading=(0,l.vPA)(!1);mapSettings=(0,h.EW)(()=>{const t=this.mapboxToken();if(t)return{...new U.yY,mapboxToken:t}});mapLayers=this._mapLayers.asReadonly();isEntityLoading=this._isLoading.asReadonly();entity=(0,h.EW)(()=>{const t=this.entityDetailedData();return t?{iri:this.iri(),value:t.value,categories:t.categories}:void 0});internalDocumentListHandlers=(0,h.EW)(()=>{const t=this.handlers();return{requestData:i=>{t?.requestDocumentData?.(i)},requestDownload:t?.downloadDocument,requestOpen:t?.openDocument,requestOpenInDir:t?.openDocumentInFileManager}});constructor(){(0,l.QZP)(()=>{const t=this.iri(),i=this.handlers();if(!t||!i||this._fetchedIRIs.has(t))return;this._fetchedIRIs.add(t),this._isLoading.set(!0),this._mapLayers.set([]),i.requestEntityLocations?.([t]);const o=i.requestRelationships?.(t);o?o.then(()=>this._isLoading.set(!1)).catch(()=>this._isLoading.set(!1)):this._isLoading.set(!1)}),(0,l.QZP)(()=>{const t=this.entityDetailedData();if(!t)return;const i=this.iri(),o=(0,Q.N)({entityData:{[i]:t},availableEntityRelationships:this.availableEntityRelationships()});this._mapLayers.set(o)})}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=e.VBU({type:n,selectors:[["cue-entity-data"]],inputs:{iri:[1,"iri"],availableEntityCategories:[1,"availableEntityCategories"],availableEntityRelationships:[1,"availableEntityRelationships"],mapboxToken:[1,"mapboxToken"],handlers:[1,"handlers"],variant:[1,"variant"],relationshipData:[1,"relationshipData"],documentRefs:[1,"documentRefs"],documentData:[1,"documentData"],entityDetailedData:[1,"entityDetailedData"]},outputs:{clickedOpenEntity:"clickedOpenEntity",clickedDocument:"clickedDocument",mapFeatureClicked:"mapFeatureClicked"},decls:9,vars:8,consts:[[2,"height","400px","width","100%","display","flex","align-items","center","justify-content","center","background","var(--cue-color-background-subtle, #f8f9fa)","border-radius","4px",3,"cueLogoLoader"],[2,"width","100%","flex","1","min-height","400px","height","100%",3,"variant"],[2,"text-align","center","color","var(--cue-color-text-muted, #6c757d)"],[2,"height","100%",3,"label"],[3,"label"],["legendPosition","top-right",2,"flex","1","min-height","400px","width","100%",3,"clickedOpenEntity","entity","availableEntityCategories","availableEntityRelationships","relationships"],[3,"clickedDocument","documentRefs","handlers","documentData"],[2,"display","flex","flex-direction","column","flex","1","min-height","400px","width","100%","position","relative"],[2,"width","100%",3,"clickedFeature","layers","settings"]],template:function(i,o){if(1&i&&(e.SS7(0)(1)(2)(3)(4)(5)(6),e.nVh(7,ee,2,2,"div",0)(8,ae,5,5,"cue-tabs",1)),2&i){const a=e.bH3(o.relationshipData());e.R7$();const c=e.bH3(a&&a.incoming.length+a.outgoing.length>0);e.R7$();const v=e.bH3(o.documentRefs().length>0);e.R7$();const b=e.bH3(o.mapLayers());e.R7$();const D=e.bH3(o.mapSettings());e.R7$();const d=e.bH3(void 0!==D&&b.length>0);e.R7$(),e.bH3(o.isEntityLoading()),e.R7$(),e.vxM(c||v||d?8:7)}},dependencies:[Y,S.g,K.t,Z.o,z.T,j.Typography,q.k,_.Kj],styles:["[_nghost-%COMP%]{display:contents}"],changeDetection:0})}return n})();var se=r(2403),re=r(7293);function le(n,u){if(1&n&&(e.j41(0,"cue-flexcontainer",3)(1,"cue-typography",5),e.EFF(2),e.k0s()()),2&n){const t=e.XpG(2);e.R7$(2),e.SpI(" ",t.errorMessage()," ")}}function ce(n,u){1&n&&(e.j41(0,"cue-flexcontainer",3)(1,"cue-typography",6),e.EFF(2," No project connected. "),e.k0s()())}function de(n,u){1&n&&(e.j41(0,"cue-flexcontainer",3)(1,"cue-typography",6),e.EFF(2," No entity selected. "),e.k0s()())}function ue(n,u){if(1&n&&e.nrm(0,"cue-entity-info",7),2&n){e.XpG();const t=e.r8f(0),i=e.XpG(2);e.Y8G("entity",t)("entityCategoriesEditable",!1)("availableEntityCategories",i.availableEntityCategories())("collapsed",!1)("handlers",i._entityInfoHandlers)}}function he(n,u){1&n&&(e.j41(0,"cue-typography",8),e.EFF(1),e.nI1(2,"transloco"),e.k0s()),2&n&&(e.Y8G("cuePulse",!0),e.R7$(),e.JRh(e.bMT(2,2,"common.infoLoading")))}function pe(n,u){if(1&n&&(e.SS7(0),e.nVh(1,ue,1,5,"cue-entity-info",7)(2,he,3,4,"cue-typography",8),e.nrm(3,"div",9),e.j41(4,"div",10),e.nrm(5,"cue-entity-data",11),e.k0s()),2&n){const t=e.XpG(2),i=e.bH3(t._entity());e.R7$(),e.vxM(i?1:2),e.R7$(4),e.Y8G("iri",t._currentIri())("availableEntityCategories",t.availableEntityCategories())("availableEntityRelationships",t.availableEntityRelationships())("mapboxToken",t.mapboxToken()??"")("handlers",t._entityDataHandlers())("relationshipData",t.relationshipData())("documentRefs",t.documentRefs())("documentData",t.documentData())("entityDetailedData",t.entityData())}}function ge(n,u){if(1&n&&e.nrm(0,"cue-logo-link",4),2&n){const t=e.XpG(2);e.Y8G("projectId",t.projectId())("resourceId",t._resourceId())}}function ye(n,u){if(1&n&&(e.j41(0,"div",2),e.nVh(1,le,3,1,"cue-flexcontainer",3)(2,ce,3,0,"cue-flexcontainer",3)(3,de,3,0,"cue-flexcontainer",3)(4,pe,6,11),e.nVh(5,ge,1,2,"cue-logo-link",4),e.k0s()),2&n){const t=e.XpG();e.R7$(),e.vxM("error"===t.state()?1:"idle"===t.state()?2:"no-entity"===t.state()?3:t._currentIri()?4:-1),e.R7$(4),e.vxM(t.showLogo()?5:-1)}}function w(n){return n.split("/").pop()}function me(n){return{id:n.id,contentIRI:n.contentIRI??n.id,path:n.path??"",suffix:n.suffix??"",size:n.size??0,tags:n.tags??[],summary:n.summary??"",categories:n.categories??[],subject:n.subject,providerId:n.providerId,relevance:0}}let fe=(()=>{class n{cue=(0,s.hFB)(void 0);projectId=(0,s.hFB)(void 0);showLogo=(0,s.hFB)(!1,{transform:s.L39});_resourceId=(0,h.EW)(()=>{const t=this._currentIri();return t?t.split("/").pop():void 0});iri=(0,s.hFB)(void 0);mapboxToken=(0,s.hFB)(void 0);showTranslatedRelationshipLabels=(0,s.hFB)(!1,{transform:s.L39});variant=(0,s.hFB)("none");openEntity=(0,s.CGW)();state=(0,l.vPA)("idle");errorMessage=(0,l.vPA)(null);availableEntityCategories=(0,l.vPA)([]);availableEntityRelationships=(0,l.vPA)([]);relationshipData=(0,l.vPA)(void 0);documentRefs=(0,l.vPA)([]);documentData=(0,l.vPA)({});entityData=(0,l.vPA)(void 0);_entities=(0,l.vPA)(void 0);_documents=(0,l.vPA)(void 0);_unsubscribeEntities;_unsubscribeDocuments;_unsubscribeSchema;_lastIri;_inputWarningTimer;_currentIri=(0,h.EW)(()=>this.iri());_entity=(0,h.EW)(()=>{const t=this.entityData();return t?{iri:this.iri(),value:t.value,categories:t.categories}:void 0});_entityInfoHandlers={};_entityDataHandlers=(0,h.EW)(()=>{var t=this;const i=this._entities(),o=this._documents();return{requestRelationships:(a=(0,I.A)(function*(c){yield Promise.all([i?.fetchEntityRelationships(c).then(v=>t.relationshipData.set(v)),i?.fetchEntityDocuments(c).then(v=>{t.documentRefs.set(v.map(b=>({id:b}))),o&&v.length>0&&o.requestDocumentData(v)})])}),function(v){return a.apply(this,arguments)}),requestDocumentData:a=>o?.requestDocumentData(a),requestEntityLocations:a=>{if(!this.mapboxToken())return void console.warn("[cue-entity-viewer] No mapboxToken provided \u2014 skipping map location fetch.");const c=a.map(w).filter(Boolean);i?.requestEntityLocations(c)},openEntity:a=>this.openEntity.emit(a)};var a});constructor(){this._inputWarningTimer=setTimeout(()=>{this.cue()||console.warn('[cue-entity-viewer] Required input "cue" is not set. Pass an authenticated Cue SDK instance.'),this.projectId()||console.warn('[cue-entity-viewer] Required input "projectId" is not set. Pass the Cue project ID to display entity data.')},3e3),(0,l.QZP)(()=>{this._setup(this.cue(),this.projectId())}),(0,l.QZP)(()=>{const t=this._entities(),i=this.iri();t&&i&&void 0===this._entity()&&t.requestEntityData([w(i)],!1)}),(0,l.QZP)(()=>{const t=this._entities(),i=this.iri();!t||!i||(i!==this._lastIri&&(this._lastIri=i,this.relationshipData.set(void 0),this.documentRefs.set([]),this.entityData.set(void 0),this.state.set("ready")),this._syncEntityData(t,i))})}ngOnDestroy(){clearTimeout(this._inputWarningTimer),this._teardown()}_setup(t,i){if(this._teardown(),!t||!i)return this._entities.set(void 0),this._documents.set(void 0),void this.state.set("idle");const o=new C.g8(t.api,i),a=new C.f$(t.api,i);if(this._entities.set(o),this._documents.set(a),this._lastIri=void 0,this.state.set(this.iri()?"ready":"no-entity"),this._unsubscribeEntities=o.entityInfoMap.subscribe(()=>{const c=this.iri();c&&this._syncEntityData(o,c)}),this._unsubscribeDocuments=a.documentInfoMap.subscribe(()=>{this._syncDocumentData(a)}),o.contentCategoriesInProject(!0).then(c=>this.availableEntityCategories.set(c)).catch(c=>console.error("[cue-entity-viewer] Failed to fetch categories",c)),this.showTranslatedRelationshipLabels()){const c=new C.Ug(t.api,i,t.api.language);this._unsubscribeSchema=c.availableEntityRelationships.subscribe(()=>{this.availableEntityRelationships.set(c.availableEntityRelationships.get())})}}_syncEntityData(t,i){const o=w(i),a=t.entityInfoMap.get()[o];if(!a)return;const c=Array.isArray(a.documentRefs)?a.documentRefs.map(D=>"string"==typeof D?{id:D}:D):[],{documentRefs:v,...b}=a;this.entityData.set({...b,documentRefs:c}),c.length>0&&this.documentRefs.set(c)}_syncDocumentData(t){const i=t.documentInfoMap.get(),o={};for(const[a,c]of Object.entries(i))o[a]=me(c);this.documentData.set(o)}_teardown(){this._unsubscribeEntities?.(),this._unsubscribeDocuments?.(),this._unsubscribeSchema?.(),this._unsubscribeEntities=void 0,this._unsubscribeDocuments=void 0,this._unsubscribeSchema=void 0}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=e.VBU({type:n,selectors:[["cue-entity-viewer-wc"]],inputs:{cue:[1,"cue"],projectId:[1,"projectId"],showLogo:[1,"showLogo"],iri:[1,"iri"],mapboxToken:[1,"mapboxToken"],showTranslatedRelationshipLabels:[1,"showTranslatedRelationshipLabels"],variant:[1,"variant"]},outputs:{openEntity:"openEntity"},decls:3,vars:1,consts:[["body",""],[3,"ngTemplateOutlet"],[2,"display","flex","flex-direction","column","height","100%","overflow","hidden","width","100%","position","relative"],["direction","column","align","center","justify","center",2,"height","100%","width","100%","padding","8px"],[2,"position","absolute","top","12px","right","12px","z-index","5",3,"projectId","resourceId"],[2,"color","#c44","font-size","13px"],[2,"color","#9ca3af","font-size","13px"],[3,"entity","entityCategoriesEditable","availableEntityCategories","collapsed","handlers"],["cuePulseMode","text",3,"cuePulse"],[2,"height","16px"],[2,"flex","1","min-height","0"],[2,"width","100%","height","100%",3,"iri","availableEntityCategories","availableEntityRelationships","mapboxToken","handlers","relationshipData","documentRefs","documentData","entityDetailedData"]],template:function(i,o){if(1&i&&(e.DNE(0,ye,6,2,"ng-template",null,0,e.C5r),e.eu8(2,1)),2&i){const a=e.sdS(1);e.R7$(2),e.Y8G("ngTemplateOutlet",a)}},dependencies:[$,oe,R.FlexContainer,j.Typography,se.V,F.T3,re.x,_.Kj],styles:["[_nghost-%COMP%]{display:block;width:100%;height:100%;overflow:hidden}"],changeDetection:0})}return n})()}}]);
|
package/2245.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[2245,9495],{9495(Nt,Re,V){V.d(Re,{InlineInput:()=>ue});var W=V(7705),Oe=V(5802),G=V(5547);const z=["inputEl"];let ue=(()=>{class F{value=(0,W.geq)("");placeholder=(0,W.hFB)("");autofocus=(0,W.hFB)(!1);valueChange=(0,W.CGW)();save=(0,W.CGW)();cancel=(0,W.CGW)();inputEl;constructor(){(0,Oe.QZP)(()=>{const A=this.value(),H=this.inputEl?.nativeElement;H&&H.innerText.replace(/\n$/,"")!==A&&(H.innerText=A)})}ngAfterViewInit(){const A=this.inputEl?.nativeElement;A&&(A.innerText=this.value()),this.autofocus()&&A&&A.focus()}onInput(A){const $=A.target.innerText.replace(/\n$/,"");this.value.set($),this.valueChange.emit($)}onEnter(A){A.preventDefault(),this.save.emit()}onEscape(A){A.preventDefault(),this.cancel.emit()}onBlur(){this.save.emit()}static \u0275fac=function(H){return new(H||F)};static \u0275cmp=G.VBU({type:F,selectors:[["cue-inline-input"]],viewQuery:function(H,$){if(1&H&&G.GBs(z,5),2&H){let ie;G.mGM(ie=G.lsd())&&($.inputEl=ie.first)}},inputs:{value:[1,"value"],placeholder:[1,"placeholder"],autofocus:[1,"autofocus"]},outputs:{value:"valueChange",valueChange:"valueChange",save:"save",cancel:"cancel"},decls:2,vars:1,consts:[["inputEl",""],["contenteditable","true","role","textbox","aria-multiline","true",3,"input","keydown.enter","keydown.escape","blur"]],template:function(H,$){1&H&&(G.rj2(0,"span",1,0),G.VwU("input",function(le){return $.onInput(le)})("keydown.enter",function(le){return $.onEnter(le)})("keydown.escape",function(le){return $.onEscape(le)})("blur",function(){return $.onBlur()}),G.eux()),2&H&&G.BMQ("data-placeholder",$.placeholder())},styles:["[_nghost-%COMP%]{display:inline}span[contenteditable][_ngcontent-%COMP%]{outline:none;-webkit-text-decoration:underline dashed;text-decoration:underline dashed;text-underline-offset:3px;white-space:pre-wrap;word-break:break-word;cursor:text}span[contenteditable][_ngcontent-%COMP%]:empty:before{content:attr(data-placeholder);color:var(--cue-input-placeholder-color, currentColor);opacity:.5;pointer-events:none}"],changeDetection:0})}return F})()},2245(Nt,Re,V){V.r(Re),V.d(Re,{Typography:()=>xe});var W=V(7705),Oe=V(2271),G=V(7089),z=V(5381),ue=V(29),F=V(9495),C=V(5547),A=V(5802);const H=["*"];function $(X,nt){if(1&X){const B=C.RV6();C.j41(0,"div",2),C.bIt("input",function(U){A.eBV(B);const ne=C.XpG();return A.Njj(ne.onInput(U))})("blur",function(U){A.eBV(B);const ne=C.XpG();return A.Njj(ne.onInput(U))}),C.k0s()}if(2&X){const B=C.XpG();C.Aen(B.getStyles()),C.xc7("font-style",B.italic()?"italic":"normal"),C.Y8G("innerHTML",B.innerHTML(),C.npT)("contentEditable",B.editable())}}function ie(X,nt){if(1&X&&C.nrm(0,"cue-svg-icon",5),2&X){const B=C.XpG(2);C.xc7("--cue-icon-width",B.infoSize()+"px"),C.Y8G("cueTooltip",B.info())}}function le(X,nt){if(1&X){const B=C.RV6();C.j41(0,"div",3),C.bIt("input",function(U){A.eBV(B);const ne=C.XpG();return A.Njj(ne.onInput(U))})("blur",function(U){A.eBV(B);const ne=C.XpG();return A.Njj(ne.onInput(U))}),C.SdG(1),C.k0s(),C.nVh(2,ie,1,3,"cue-svg-icon",4)}if(2&X){const B=C.XpG();C.Aen(B.getStyles()),C.xc7("font-style",B.italic()?"italic":"normal"),C.Y8G("contentEditable",B.editable()),C.R7$(2),C.vxM(B.info()?2:-1)}}let xe=(()=>{class X{_inlineInput=(0,W.sbv)(F.InlineInput);hasInlineInput=(0,Oe.EW)(()=>!!this._inlineInput());as=(0,W.hFB)("div");size=(0,W.hFB)("m");weight=(0,W.hFB)("regular");align=(0,W.hFB)("start");noWrap=(0,W.hFB)(!1);italic=(0,W.hFB)(!1);innerHTML=(0,W.hFB)(null);info=(0,W.hFB)("");editable=(0,W.hFB)(!1);change=(0,W.CGW)();onInput(B){this.editable()&&this.change.emit(B.target.innerText)}getStyles=(0,Oe.EW)(()=>`\n font-family: var(--cue-font-family);\n font-size: var(--cue-font-${this.size()}-size);\n line-height: var(--cue-font-${this.size()}-line-height);\n letter-spacing: var(--cue-font-${this.size()}-letter-spacing);\n font-weight: var(--cue-font-weight-${this.weight()});\n text-align: ${this.align()};\n ${this.noWrap()?"white-space: nowrap; overflow: hidden; text-overflow: ellipsis;":""}\n `);infoSize=(0,Oe.EW)(()=>{switch(this.size()){case"xs":return 10;case"s":return 12;case"m":default:return 14;case"l":return 16;case"xl":return 18}});static \u0275fac=function(N){return new(N||X)};static \u0275cmp=C.VBU({type:X,selectors:[["cue-typography"]],contentQueries:function(N,U,ne){1&N&&C.C6U(ne,U._inlineInput,F.InlineInput,5),2&N&&C.NyB()},inputs:{as:[1,"as"],size:[1,"size"],weight:[1,"weight"],align:[1,"align"],noWrap:[1,"noWrap"],italic:[1,"italic"],innerHTML:[1,"innerHTML"],info:[1,"info"],editable:[1,"editable"]},outputs:{change:"change"},ngContentSelectors:H,decls:3,vars:2,consts:[["justify","start","align","center",3,"noGap"],[3,"style","font-style","innerHTML","contentEditable"],[3,"input","blur","innerHTML","contentEditable"],[3,"input","blur","contentEditable"],["name","info",2,"margin-left","4px","vertical-align","super","cursor","pointer",3,"cueTooltip","--cue-icon-width"],["name","info",2,"margin-left","4px","vertical-align","super","cursor","pointer",3,"cueTooltip"]],template:function(N,U){1&N&&(C.NAR(),C.j41(0,"cue-flexcontainer",0),C.nVh(1,$,1,6,"div",1)(2,le,3,6),C.k0s()),2&N&&(C.Y8G("noGap",!0),C.R7$(),C.vxM(U.innerHTML()?1:2))},dependencies:[ue.A,G.d,z.n],encapsulation:2})}return X})()},7089(Nt,Re,V){V.d(Re,{d:()=>si});var W=V(5802),Oe=V(5547),G=V(7705);function z(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function ue(e){return e instanceof z(e).Element||e instanceof Element}function F(e){return e instanceof z(e).HTMLElement||e instanceof HTMLElement}function C(e){return!(typeof ShadowRoot>"u")&&(e instanceof z(e).ShadowRoot||e instanceof ShadowRoot)}var A=Math.max,H=Math.min,$=Math.round;function ie(){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 le(){return!/^((?!chrome|android).)*safari/i.test(ie())}function xe(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var i=e.getBoundingClientRect(),o=1,a=1;t&&F(e)&&(o=e.offsetWidth>0&&$(i.width)/e.offsetWidth||1,a=e.offsetHeight>0&&$(i.height)/e.offsetHeight||1);var u=(ue(e)?z(e):window).visualViewport,f=!le()&&n,p=(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:p+E,bottom:c+O,left:p,x:p,y:c}}function X(e){var t=z(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function N(e){return e?(e.nodeName||"").toLowerCase():null}function U(e){return((ue(e)?e.ownerDocument:e.document)||window.document).documentElement}function ne(e){return xe(U(e)).left+X(e).scrollLeft}function he(e){return z(e).getComputedStyle(e)}function xt(e){var t=he(e);return/auto|scroll|overlay|hidden/.test(t.overflow+t.overflowY+t.overflowX)}function In(e,t,n){void 0===n&&(n=!1);var i=F(t),o=F(t)&&function Pn(e){var t=e.getBoundingClientRect(),n=$(t.width)/e.offsetWidth||1,i=$(t.height)/e.offsetHeight||1;return 1!==n||1!==i}(t),a=U(t),s=xe(e,o,n),u={scrollLeft:0,scrollTop:0},f={x:0,y:0};return(i||!i&&!n)&&(("body"!==N(t)||xt(a))&&(u=function B(e){return e!==z(e)&&F(e)?function nt(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}(e):X(e)}(t)),F(t)?((f=xe(t,!0)).x+=t.clientLeft,f.y+=t.clientTop):a&&(f.x=ne(a))),{x:s.left+u.scrollLeft-f.x,y:s.top+u.scrollTop-f.y,width:s.width,height:s.height}}function Et(e){var t=xe(e),n=e.offsetWidth,i=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-i)<=1&&(i=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:i}}function rt(e){return"html"===N(e)?e:e.assignedSlot||e.parentNode||(C(e)?e.host:null)||U(e)}function kt(e){return["html","body","#document"].indexOf(N(e))>=0?e.ownerDocument.body:F(e)&&xt(e)?e:kt(rt(e))}function Ue(e,t){var n;void 0===t&&(t=[]);var i=kt(e),o=i===(null==(n=e.ownerDocument)?void 0:n.body),a=z(i),s=o?[a].concat(a.visualViewport||[],xt(i)?i:[]):i,u=t.concat(s);return o?u:u.concat(Ue(rt(s)))}function Ln(e){return["table","td","th"].indexOf(N(e))>=0}function Wt(e){return F(e)&&"fixed"!==he(e).position?e.offsetParent:null}function He(e){for(var t=z(e),n=Wt(e);n&&Ln(n)&&"static"===he(n).position;)n=Wt(n);return n&&("html"===N(n)||"body"===N(n)&&"static"===he(n).position)?t:n||function Rn(e){var t=/firefox/i.test(ie());if(/Trident/i.test(ie())&&F(e)&&"fixed"===he(e).position)return null;var o=rt(e);for(C(o)&&(o=o.host);F(o)&&["html","body"].indexOf(N(o))<0;){var a=he(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 J="top",oe="bottom",ae="right",ee="left",Tt="auto",$e=[J,oe,ae,ee],Se="start",ze="end",Vt="viewport",Xe="popper",Ft=$e.reduce(function(e,t){return e.concat([t+"-"+Se,t+"-"+ze])},[]),Ut=[].concat($e,[Tt]).reduce(function(e,t){return e.concat([t,t+"-"+Se,t+"-"+ze])},[]),zn=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function Xn(e){var t=new Map,n=new Set,i=[];function o(a){n.add(a.name),[].concat(a.requires||[],a.requiresIfExists||[]).forEach(function(u){if(!n.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){n.has(a.name)||o(a)}),i}function Gn(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}var Ht={placement:"bottom",modifiers:[],strategy:"absolute"};function $t(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(i){return!(i&&"function"==typeof i.getBoundingClientRect)})}function Qn(e){void 0===e&&(e={});var n=e.defaultModifiers,i=void 0===n?[]:n,o=e.defaultOptions,a=void 0===o?Ht:o;return function(u,f,p){void 0===p&&(p=a);var c={placement:"bottom",orderedModifiers:[],options:Object.assign({},Ht,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:ue(u)?Ue(u):u.contextElement?Ue(u.contextElement):[],popper:Ue(f)};var _=function Yn(e){var t=Xn(e);return zn.reduce(function(n,i){return n.concat(t.filter(function(o){return o.phase===i}))},[])}(function Kn(e){var t=e.reduce(function(n,i){var o=n[i.name];return n[i.name]=o?Object.assign({},o,i,{options:Object.assign({},o.options,i.options),data:Object.assign({},o.data,i.data)}):i,n},{});return Object.keys(t).map(function(n){return t[n]})}([].concat(i,c.options.modifiers)));return c.orderedModifiers=_.filter(function(r){return r.enabled}),function w(){c.orderedModifiers.forEach(function(m){var x=m.options,r=m.effect;if("function"==typeof r){var g=r({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,_=d.popper;if($t(x,_)){c.rects={reference:In(x,He(_),"fixed"===c.options.strategy),popper:Et(_)},c.reset=!1,c.placement=c.options.placement,c.orderedModifiers.forEach(function(R){return c.modifiersData[R.name]=Object.assign({},R.data)});for(var r=0;r<c.orderedModifiers.length;r++)if(!0!==c.reset){var g=c.orderedModifiers[r],v=g.fn,D=g.options;"function"==typeof v&&(c=v({state:c,options:void 0===D?{}:D,name:g.name,instance:y})||c)}else c.reset=!1,r=-1}}},update:Gn(function(){return new Promise(function(m){y.forceUpdate(),m(c)})}),destroy:function(){h(),O=!0}};if(!$t(u,f))return y;function h(){E.forEach(function(m){return m()}),E=[]}return y.setOptions(p).then(function(m){!O&&p.onFirstUpdate&&p.onFirstUpdate(m)}),y}}var it={passive:!0};function ce(e){return e.split("-")[0]}function Be(e){return e.split("-")[1]}function Ct(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function zt(e){var f,t=e.reference,n=e.element,i=e.placement,o=i?ce(i):null,a=i?Be(i):null,s=t.x+t.width/2-n.width/2,u=t.y+t.height/2-n.height/2;switch(o){case J:f={x:s,y:t.y-n.height};break;case oe:f={x:s,y:t.y+t.height};break;case ae:f={x:t.x+t.width,y:u};break;case ee:f={x:t.x-n.width,y:u};break;default:f={x:t.x,y:t.y}}var p=o?Ct(o):null;if(null!=p){var c="y"===p?"height":"width";switch(a){case Se:f[p]=f[p]-(t[c]/2-n[c]/2);break;case ze:f[p]=f[p]+(t[c]/2-n[c]/2)}}return f}var tr={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Xt(e){var t,n=e.popper,i=e.popperRect,o=e.placement,a=e.variation,s=e.offsets,u=e.position,f=e.gpuAcceleration,p=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"),_=ee,r=J,g=window;if(p){var v=He(n),D="clientHeight",P="clientWidth";v===z(n)&&"static"!==he(v=U(n)).position&&"absolute"===u&&(D="scrollHeight",P="scrollWidth"),(o===J||(o===ee||o===ae)&&a===ze)&&(r=oe,h-=(E&&v===g&&g.visualViewport?g.visualViewport.height:v[D])-i.height,h*=f?1:-1),o!==ee&&(o!==J&&o!==oe||a!==ze)||(_=ae,y-=(E&&v===g&&g.visualViewport?g.visualViewport.width:v[P])-i.width,y*=f?1:-1)}var S,k=Object.assign({position:u},p&&tr),j=!0===c?function nr(e,t){var i=e.y,o=t.devicePixelRatio||1;return{x:$(e.x*o)/o||0,y:$(i*o)/o||0}}({x:y,y:h},z(n)):{x:y,y:h};return y=j.x,h=j.y,Object.assign({},k,f?((S={})[r]=x?"0":"",S[_]=d?"0":"",S.transform=(g.devicePixelRatio||1)<=1?"translate("+y+"px, "+h+"px)":"translate3d("+y+"px, "+h+"px, 0)",S):((t={})[r]=x?h+"px":"",t[_]=d?y+"px":"",t.transform="",t))}const Yt={name:"applyStyles",enabled:!0,phase:"write",fn:function or(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var i=t.styles[n]||{},o=t.attributes[n]||{},a=t.elements[n];!F(a)||!N(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 ar(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.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]:n[i]).reduce(function(f,p){return f[p]="",f},{});!F(o)||!N(o)||(Object.assign(o.style,u),Object.keys(a).forEach(function(f){o.removeAttribute(f)}))})}},requires:["computeStyles"]};var lr={left:"right",right:"left",bottom:"top",top:"bottom"};function ot(e){return e.replace(/left|right|bottom|top/g,function(t){return lr[t]})}var cr={start:"end",end:"start"};function Gt(e){return e.replace(/start|end/g,function(t){return cr[t]})}function Kt(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&C(n)){var i=t;do{if(i&&e.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function _t(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Qt(e,t,n){return t===Vt?_t(function pr(e,t){var n=z(e),i=U(e),o=n.visualViewport,a=i.clientWidth,s=i.clientHeight,u=0,f=0;if(o){a=o.width,s=o.height;var p=le();(p||!p&&"fixed"===t)&&(u=o.offsetLeft,f=o.offsetTop)}return{width:a,height:s,x:u+ne(e),y:f}}(e,n)):ue(t)?function vr(e,t){var n=xe(e,!1,"fixed"===t);return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}(t,n):_t(function dr(e){var t,n=U(e),i=X(e),o=null==(t=e.ownerDocument)?void 0:t.body,a=A(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),s=A(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),u=-i.scrollLeft+ne(e),f=-i.scrollTop;return"rtl"===he(o||n).direction&&(u+=A(n.clientWidth,o?o.clientWidth:0)-a),{width:a,height:s,x:u,y:f}}(U(e)))}function Zt(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function Jt(e,t){return t.reduce(function(n,i){return n[i]=e,n},{})}function Ye(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,p=t.rootBoundary,c=void 0===p?Vt:p,E=t.elementContext,O=void 0===E?Xe:E,y=t.altBoundary,w=void 0!==y&&y,h=t.padding,m=void 0===h?0:h,d=Zt("number"!=typeof m?m:Jt(m,$e)),_=e.rects.popper,r=e.elements[w?O===Xe?"reference":Xe:O],g=function hr(e,t,n,i){var o="clippingParents"===t?function mr(e){var t=Ue(rt(e)),i=["absolute","fixed"].indexOf(he(e).position)>=0&&F(e)?He(e):e;return ue(i)?t.filter(function(o){return ue(o)&&Kt(o,i)&&"body"!==N(o)}):[]}(e):[].concat(t),a=[].concat(o,[n]),u=a.reduce(function(f,p){var c=Qt(e,p,i);return f.top=A(c.top,f.top),f.right=H(c.right,f.right),f.bottom=H(c.bottom,f.bottom),f.left=A(c.left,f.left),f},Qt(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}(ue(r)?r:r.contextElement||U(e.elements.popper),f,c,s),v=xe(e.elements.reference),D=zt({reference:v,element:_,strategy:"absolute",placement:o}),P=_t(Object.assign({},_,D)),L=O===Xe?P:v,R={top:g.top-L.top+d.top,bottom:L.bottom-g.bottom+d.bottom,left:g.left-L.left+d.left,right:L.right-g.right+d.right},k=e.modifiersData.offset;if(O===Xe&&k){var j=k[o];Object.keys(R).forEach(function(S){var K=[ae,oe].indexOf(S)>=0?1:-1,re=[J,oe].indexOf(S)>=0?"y":"x";R[S]+=j[re]*K})}return R}function Ge(e,t,n){return A(e,H(t,n))}function en(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function tn(e){return[J,ae,oe,ee].some(function(t){return e[t]>=0})}var Ir=Qn({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function qn(e){var t=e.state,n=e.instance,i=e.options,o=i.scroll,a=void 0===o||o,s=i.resize,u=void 0===s||s,f=z(t.elements.popper),p=[].concat(t.scrollParents.reference,t.scrollParents.popper);return a&&p.forEach(function(c){c.addEventListener("scroll",n.update,it)}),u&&f.addEventListener("resize",n.update,it),function(){a&&p.forEach(function(c){c.removeEventListener("scroll",n.update,it)}),u&&f.removeEventListener("resize",n.update,it)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function Jn(e){var t=e.state;t.modifiersData[e.name]=zt({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function rr(e){var t=e.state,n=e.options,i=n.gpuAcceleration,o=void 0===i||i,a=n.adaptive,s=void 0===a||a,u=n.roundOffsets,f=void 0===u||u,p={placement:ce(t.placement),variation:Be(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,Xt(Object.assign({},p,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:s,roundOffsets:f})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,Xt(Object.assign({},p,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:f})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},Yt,{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function ur(e){var t=e.state,i=e.name,o=e.options.offset,a=void 0===o?[0,0]:o,s=Ut.reduce(function(c,E){return c[E]=function sr(e,t,n){var i=ce(e),o=[ee,J].indexOf(i)>=0?-1:1,a="function"==typeof n?n(Object.assign({},t,{placement:e})):n,s=a[0],u=a[1];return s=s||0,u=(u||0)*o,[ee,ae].indexOf(i)>=0?{x:u,y:s}:{x:s,y:u}}(E,t.rects,a),c},{}),u=s[t.placement],p=u.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=u.x,t.modifiersData.popperOffsets.y+=p),t.modifiersData[i]=s}},{name:"flip",enabled:!0,phase:"main",fn:function br(e){var t=e.state,n=e.options,i=e.name;if(!t.modifiersData[i]._skip){for(var o=n.mainAxis,a=void 0===o||o,s=n.altAxis,u=void 0===s||s,f=n.fallbackPlacements,p=n.padding,c=n.boundary,E=n.rootBoundary,O=n.altBoundary,y=n.flipVariations,w=void 0===y||y,h=n.allowedAutoPlacements,m=t.options.placement,d=ce(m),_=f||(d!==m&&w?function yr(e){if(ce(e)===Tt)return[];var t=ot(e);return[Gt(e),t,Gt(t)]}(m):[ot(m)]),r=[m].concat(_).reduce(function(ge,fe){return ge.concat(ce(fe)===Tt?function gr(e,t){void 0===t&&(t={});var o=t.boundary,a=t.rootBoundary,s=t.padding,u=t.flipVariations,f=t.allowedAutoPlacements,p=void 0===f?Ut:f,c=Be(t.placement),E=c?u?Ft:Ft.filter(function(w){return Be(w)===c}):$e,O=E.filter(function(w){return p.indexOf(w)>=0});0===O.length&&(O=E);var y=O.reduce(function(w,h){return w[h]=Ye(e,{placement:h,boundary:o,rootBoundary:a,padding:s})[ce(h)],w},{});return Object.keys(y).sort(function(w,h){return y[w]-y[h]})}(t,{placement:fe,boundary:c,rootBoundary:E,padding:p,flipVariations:w,allowedAutoPlacements:h}):fe)},[]),g=t.rects.reference,v=t.rects.popper,D=new Map,P=!0,L=r[0],R=0;R<r.length;R++){var k=r[R],j=ce(k),S=Be(k)===Se,K=[J,oe].indexOf(j)>=0,re=K?"width":"height",Q=Ye(t,{placement:k,boundary:c,rootBoundary:E,altBoundary:O,padding:p}),q=K?S?ae:ee:S?oe:J;g[re]>v[re]&&(q=ot(q));var Y=ot(q),de=[];if(a&&de.push(Q[j]<=0),u&&de.push(Q[q]<=0,Q[Y]<=0),de.every(function(ge){return ge})){L=k,P=!1;break}D.set(k,de)}if(P)for(var Me=function(fe){var ye=r.find(function(Ne){var be=D.get(Ne);if(be)return be.slice(0,fe).every(function(ke){return ke})});if(ye)return L=ye,"break"},me=w?3:1;me>0&&"break"!==Me(me);me--);t.placement!==L&&(t.modifiersData[i]._skip=!0,t.placement=L,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:function Er(e){var t=e.state,n=e.options,i=e.name,o=n.mainAxis,a=void 0===o||o,s=n.altAxis,u=void 0!==s&&s,O=n.tether,y=void 0===O||O,w=n.tetherOffset,h=void 0===w?0:w,m=Ye(t,{boundary:n.boundary,rootBoundary:n.rootBoundary,padding:n.padding,altBoundary:n.altBoundary}),d=ce(t.placement),x=Be(t.placement),_=!x,r=Ct(d),g=function Or(e){return"x"===e?"y":"x"}(r),v=t.modifiersData.popperOffsets,D=t.rects.reference,P=t.rects.popper,L="function"==typeof h?h(Object.assign({},t.rects,{placement:t.placement})):h,R="number"==typeof L?{mainAxis:L,altAxis:L}:Object.assign({mainAxis:0,altAxis:0},L),k=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,j={x:0,y:0};if(v){if(a){var S,K="y"===r?J:ee,re="y"===r?oe:ae,Q="y"===r?"height":"width",q=v[r],Y=q+m[K],de=q-m[re],ve=y?-P[Q]/2:0,Me=x===Se?D[Q]:P[Q],me=x===Se?-P[Q]:-D[Q],Pe=t.elements.arrow,ge=y&&Pe?Et(Pe):{width:0,height:0},fe=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},ye=fe[K],Ne=fe[re],be=Ge(0,D[Q],ge[Q]),ke=_?D[Q]/2-ve-be-ye-R.mainAxis:Me-be-ye-R.mainAxis,_e=_?-D[Q]/2+ve+be+Ne+R.mainAxis:me+be+Ne+R.mainAxis,We=t.elements.arrow&&He(t.elements.arrow),ct=We?"y"===r?We.clientTop||0:We.clientLeft||0:0,qe=null!=(S=k?.[r])?S:0,dt=q+_e-qe,Ze=Ge(y?H(Y,q+ke-qe-ct):Y,q,y?A(de,dt):de);v[r]=Ze,j[r]=Ze-q}if(u){var Je,we=v[g],De="y"===g?"height":"width",et=we+m["x"===r?J:ee],Ie=we-m["x"===r?oe:ae],tt=-1!==[J,ee].indexOf(d),ht=null!=(Je=k?.[g])?Je:0,gt=tt?et:we-D[De]-P[De]-ht+R.altAxis,yt=tt?we+D[De]+P[De]-ht-R.altAxis:Ie,bt=y&&tt?function xr(e,t,n){var i=Ge(e,t,n);return i>n?n:i}(gt,we,yt):Ge(y?gt:et,we,y?yt:Ie);v[g]=bt,j[g]=bt-we}t.modifiersData[i]=j}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function _r(e){var t,n=e.state,i=e.name,o=e.options,a=n.elements.arrow,s=n.modifiersData.popperOffsets,u=ce(n.placement),f=Ct(u),c=[ee,ae].indexOf(u)>=0?"height":"width";if(a&&s){var E=function(t,n){return Zt("number"!=typeof(t="function"==typeof t?t(Object.assign({},n.rects,{placement:n.placement})):t)?t:Jt(t,$e))}(o.padding,n),O=Et(a),y="y"===f?J:ee,w="y"===f?oe:ae,h=n.rects.reference[c]+n.rects.reference[f]-s[f]-n.rects.popper[c],m=s[f]-n.rects.reference[f],d=He(a),x=d?"y"===f?d.clientHeight||0:d.clientWidth||0:0,v=x/2-O[c]/2+(h/2-m/2),D=Ge(E[y],v,x-O[c]-E[w]);n.modifiersData[i]=((t={})[f]=D,t.centerOffset=D-v,t)}},effect:function Dr(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))||Kt(t.elements.popper,o)&&(t.elements.arrow=o))},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function Mr(e){var t=e.state,n=e.name,i=t.rects.reference,o=t.rects.popper,a=t.modifiersData.preventOverflow,s=Ye(t,{elementContext:"reference"}),u=Ye(t,{altBoundary:!0}),f=en(s,i),p=en(u,o,a),c=tn(f),E=tn(p);t.modifiersData[n]={referenceClippingOffsets:f,popperEscapeOffsets:p,isReferenceHidden:c,hasPopperEscaped:E},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":E})}}]}),nn="tippy-content",on="tippy-arrow",an="tippy-svg-arrow",Ee={passive:!0,capture:!0},sn=function(){return document.body};function Dt(e,t,n){return Array.isArray(e)?e[t]??(Array.isArray(n)?n[t]:n):e}function At(e,t){var n={}.toString.call(e);return 0===n.indexOf("[object")&&n.indexOf(t+"]")>-1}function un(e,t){return"function"==typeof e?e.apply(void 0,t):e}function fn(e,t){return 0===t?e:function(i){clearTimeout(n),n=setTimeout(function(){e(i)},t)};var n}function Te(e){return[].concat(e)}function ln(e,t){-1===e.indexOf(t)&&e.push(t)}function je(e){return[].slice.call(e)}function pn(e){return Object.keys(e).reduce(function(t,n){return void 0!==e[n]&&(t[n]=e[n]),t},{})}function Ae(){return document.createElement("div")}function at(e){return["Element","Fragment"].some(function(t){return At(e,t)})}function It(e,t){e.forEach(function(n){n&&(n.style.transitionDuration=t+"ms")})}function Ke(e,t){e.forEach(function(n){n&&n.setAttribute("data-state",t)})}function Lt(e,t,n){var i=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(o){e[i](o,n)})}function mn(e,t){for(var n=t;n;){var i;if(e.contains(n))return!0;n=null==n.getRootNode||null==(i=n.getRootNode())?void 0:i.host}return!1}var pe={isTouch:!1},hn=0;function Wr(){pe.isTouch||(pe.isTouch=!0,window.performance&&document.addEventListener("mousemove",gn))}function gn(){var e=performance.now();e-hn<20&&(pe.isTouch=!1,document.removeEventListener("mousemove",gn)),hn=e}function Vr(){var e=document.activeElement;(function dn(e){return!(!e||!e._tippy||e._tippy.reference!==e)})(e)&&e.blur&&!e._tippy.state.isVisible&&e.blur()}var Hr=!!(typeof window<"u"&&typeof document<"u")&&!!window.msCrypto,te=Object.assign({appendTo:sn,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}),Yr=Object.keys(te);function xn(e){var n=(e.plugins||[]).reduce(function(i,o){var u,a=o.name;return a&&(i[a]=void 0!==e[a]?e[a]:null!=(u=te[a])?u:o.defaultValue),i},{});return Object.assign({},e,n)}function En(e,t){var n=Object.assign({},t,{content:un(t.content,[e])},t.ignoreAttributes?{}:function Kr(e,t){return(t?Object.keys(xn(Object.assign({},te,{plugins:t}))):Yr).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 n.aria=Object.assign({},te.aria,n.aria),n.aria={expanded:"auto"===n.aria.expanded?t.interactive:n.aria.expanded,content:"auto"===n.aria.content?t.interactive?null:"describedby":n.aria.content},n}function Rt(e,t){e.innerHTML=t}function Tn(e){var t=Ae();return!0===e?t.className=on:(t.className=an,at(e)?t.appendChild(e):Rt(t,e)),t}function Cn(e,t){at(t.content)?(Rt(e,""),e.appendChild(t.content)):"function"!=typeof t.content&&(t.allowHTML?Rt(e,t.content):e.textContent=t.content)}function st(e){var t=e.firstElementChild,n=je(t.children);return{box:t,content:n.find(function(i){return i.classList.contains(nn)}),arrow:n.find(function(i){return i.classList.contains(on)||i.classList.contains(an)}),backdrop:n.find(function(i){return i.classList.contains("tippy-backdrop")})}}function _n(e){var t=Ae(),n=Ae();n.className="tippy-box",n.setAttribute("data-state","hidden"),n.setAttribute("tabindex","-1");var i=Ae();function o(a,s){var u=st(t),f=u.box,p=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)&&Cn(p,e.props),s.arrow?c?a.arrow!==s.arrow&&(f.removeChild(c),f.appendChild(Tn(s.arrow))):f.appendChild(Tn(s.arrow)):c&&f.removeChild(c)}return i.className=nn,i.setAttribute("data-state","hidden"),Cn(i,e.props),t.appendChild(n),n.appendChild(i),o(e.props,e.props),{popper:t,onUpdate:o}}_n.$$tippy=!0;var qr=1,ut=[],ft=[];function Zr(e,t){var i,o,a,c,E,O,h,n=En(e,Object.assign({},te,xn(pn(t)))),s=!1,u=!1,f=!1,p=!1,y=[],w=fn(pt,n.interactiveDebounce),m=qr++,x=function Br(e){return e.filter(function(t,n){return e.indexOf(t)===n})}(n.plugins),r={id:m,reference:e,popper:Ae(),popperInstance:null,props:n,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:x,clearDelayTimeouts:function gt(){clearTimeout(i),clearTimeout(o),cancelAnimationFrame(a)},setProps:function yt(l){if(!r.state.isDestroyed){Y("onBeforeUpdate",[r,l]),ct();var b=r.props,T=En(e,Object.assign({},b,pn(l),{ignoreAttributes:!0}));r.props=T,We(),b.interactiveDebounce!==T.interactiveDebounce&&(Me(),w=fn(pt,T.interactiveDebounce)),b.triggerTarget&&!T.triggerTarget?Te(b.triggerTarget).forEach(function(I){I.removeAttribute("aria-expanded")}):T.triggerTarget&&e.removeAttribute("aria-expanded"),ve(),q(),D&&D(b,T),r.popperInstance&&(vt(),De().forEach(function(I){requestAnimationFrame(I._tippy.popperInstance.forceUpdate)})),Y("onAfterUpdate",[r,l])}},setContent:function bt(l){r.setProps({content:l})},show:function ui(){var l=r.state.isVisible,b=r.state.isDestroyed,T=!r.state.isEnabled,I=pe.isTouch&&!r.props.touch,M=Dt(r.props.duration,0,te.duration);if(!(l||b||T||I||S().hasAttribute("disabled")||(Y("onShow",[r],!1),!1===r.props.onShow(r)))){if(r.state.isVisible=!0,j()&&(v.style.visibility="visible"),q(),fe(),r.state.isMounted||(v.style.transition="none"),j()){var Z=re();It([Z.box,Z.content],0)}O=function(){var Le;if(r.state.isVisible&&!p){if(p=!0,v.style.transition=r.props.moveTransition,j()&&r.props.animation){var Bt=re(),wt=Bt.box,Fe=Bt.content;It([wt,Fe],M),Ke([wt,Fe],"visible")}de(),ve(),ln(ft,r),null==(Le=r.popperInstance)||Le.forceUpdate(),Y("onMount",[r]),r.props.animation&&j()&&function be(l,b){ke(l,b)}(M,function(){r.state.isShown=!0,Y("onShown",[r])})}},function we(){var b,l=r.props.appendTo,T=S();(b=r.props.interactive&&l===sn||"parent"===l?T.parentNode:un(l,[T])).contains(v)||b.appendChild(v),r.state.isMounted=!0,vt()}()}},hide:function fi(){var l=!r.state.isVisible,b=r.state.isDestroyed,T=!r.state.isEnabled,I=Dt(r.props.duration,1,te.duration);if(!(l||b||T)&&(Y("onHide",[r],!1),!1!==r.props.onHide(r))){if(r.state.isVisible=!1,r.state.isShown=!1,p=!1,s=!1,j()&&(v.style.visibility="hidden"),Me(),ye(),q(!0),j()){var M=re(),Z=M.box,se=M.content;r.props.animation&&(It([Z,se],I),Ke([Z,se],"hidden"))}de(),ve(),r.props.animation?j()&&function Ne(l,b){ke(l,function(){!r.state.isVisible&&v.parentNode&&v.parentNode.contains(v)&&b()})}(I,r.unmount):r.unmount()}},hideWithInteractivity:function li(l){K().addEventListener("mousemove",w),ln(ut,w),w(l)},enable:function tt(){r.state.isEnabled=!0},disable:function ht(){r.hide(),r.state.isEnabled=!1},unmount:function ci(){r.state.isVisible&&r.hide(),r.state.isMounted&&(mt(),De().forEach(function(l){l._tippy.unmount()}),v.parentNode&&v.parentNode.removeChild(v),ft=ft.filter(function(l){return l!==r}),r.state.isMounted=!1,Y("onHidden",[r]))},destroy:function pi(){r.state.isDestroyed||(r.clearDelayTimeouts(),r.unmount(),ct(),delete e._tippy,r.state.isDestroyed=!0,Y("onDestroy",[r]))}};if(!n.render)return r;var g=n.render(r),v=g.popper,D=g.onUpdate;v.setAttribute("data-tippy-root",""),v.id="tippy-"+r.id,r.popper=v,e._tippy=r,v._tippy=r;var P=x.map(function(l){return l.fn(r)}),L=e.hasAttribute("aria-expanded");return We(),ve(),q(),Y("onCreate",[r]),n.showOnCreate&&et(),v.addEventListener("mouseenter",function(){r.props.interactive&&r.state.isVisible&&r.clearDelayTimeouts()}),v.addEventListener("mouseleave",function(){r.props.interactive&&r.props.trigger.indexOf("mouseenter")>=0&&K().addEventListener("mousemove",w)}),r;function R(){var l=r.props.touch;return Array.isArray(l)?l:[l,0]}function k(){return"hold"===R()[0]}function j(){var l;return!(null==(l=r.props.render)||!l.$$tippy)}function S(){return h||e}function K(){var l=S().parentNode;return l?function vn(e){var t,i=Te(e)[0];return null!=i&&null!=(t=i.ownerDocument)&&t.body?i.ownerDocument:document}(l):document}function re(){return st(v)}function Q(l){return r.state.isMounted&&!r.state.isVisible||pe.isTouch||c&&"focus"===c.type?0:Dt(r.props.delay,l?0:1,te.delay)}function q(l){void 0===l&&(l=!1),v.style.pointerEvents=r.props.interactive&&!l?"":"none",v.style.zIndex=""+r.props.zIndex}function Y(l,b,T){var I;void 0===T&&(T=!0),P.forEach(function(M){M[l]&&M[l].apply(M,b)}),T&&(I=r.props)[l].apply(I,b)}function de(){var l=r.props.aria;if(l.content){var b="aria-"+l.content,T=v.id;Te(r.props.triggerTarget||e).forEach(function(M){var Z=M.getAttribute(b);if(r.state.isVisible)M.setAttribute(b,Z?Z+" "+T:T);else{var se=Z&&Z.replace(T,"").trim();se?M.setAttribute(b,se):M.removeAttribute(b)}})}}function ve(){!L&&r.props.aria.expanded&&Te(r.props.triggerTarget||e).forEach(function(b){r.props.interactive?b.setAttribute("aria-expanded",r.state.isVisible&&b===S()?"true":"false"):b.removeAttribute("aria-expanded")})}function Me(){K().removeEventListener("mousemove",w),ut=ut.filter(function(l){return l!==w})}function me(l){if(!pe.isTouch||!f&&"mousedown"!==l.type){var b=l.composedPath&&l.composedPath()[0]||l.target;if(!r.props.interactive||!mn(v,b)){if(Te(r.props.triggerTarget||e).some(function(T){return mn(T,b)})){if(pe.isTouch||r.state.isVisible&&r.props.trigger.indexOf("click")>=0)return}else Y("onClickOutside",[r,l]);!0===r.props.hideOnClick&&(r.clearDelayTimeouts(),r.hide(),u=!0,setTimeout(function(){u=!1}),r.state.isMounted||ye())}}}function Pe(){f=!0}function ge(){f=!1}function fe(){var l=K();l.addEventListener("mousedown",me,!0),l.addEventListener("touchend",me,Ee),l.addEventListener("touchstart",ge,Ee),l.addEventListener("touchmove",Pe,Ee)}function ye(){var l=K();l.removeEventListener("mousedown",me,!0),l.removeEventListener("touchend",me,Ee),l.removeEventListener("touchstart",ge,Ee),l.removeEventListener("touchmove",Pe,Ee)}function ke(l,b){var T=re().box;function I(M){M.target===T&&(Lt(T,"remove",I),b())}if(0===l)return b();Lt(T,"remove",E),Lt(T,"add",I),E=I}function _e(l,b,T){void 0===T&&(T=!1),Te(r.props.triggerTarget||e).forEach(function(M){M.addEventListener(l,b,T),y.push({node:M,eventType:l,handler:b,options:T})})}function We(){k()&&(_e("touchstart",qe,{passive:!0}),_e("touchend",dt,{passive:!0})),function Sr(e){return e.split(/\s+/).filter(Boolean)}(r.props.trigger).forEach(function(l){if("manual"!==l)switch(_e(l,qe),l){case"mouseenter":_e("mouseleave",dt);break;case"focus":_e(Hr?"focusout":"blur",Ze);break;case"focusin":_e("focusout",Ze)}})}function ct(){y.forEach(function(l){l.node.removeEventListener(l.eventType,l.handler,l.options)}),y=[]}function qe(l){var b,T=!1;if(r.state.isEnabled&&!Je(l)&&!u){var I="focus"===(null==(b=c)?void 0:b.type);c=l,h=l.currentTarget,ve(),!r.state.isVisible&&function Pt(e){return At(e,"MouseEvent")}(l)&&ut.forEach(function(M){return M(l)}),"click"===l.type&&(r.props.trigger.indexOf("mouseenter")<0||s)&&!1!==r.props.hideOnClick&&r.state.isVisible?T=!0:et(l),"click"===l.type&&(s=!T),T&&!I&&Ie(l)}}function pt(l){var b=l.target,T=S().contains(b)||v.contains(b);"mousemove"===l.type&&T||function kr(e,t){var n=t.clientX,i=t.clientY;return e.every(function(o){var a=o.popperRect,s=o.popperState,f=o.props.interactiveBorder,p=function cn(e){return e.split("-")[0]}(s.placement),c=s.modifiersData.offset;return!c||a.top-i+("bottom"===p?c.top.y:0)>f||i-a.bottom-("top"===p?c.bottom.y:0)>f||a.left-n+("right"===p?c.left.x:0)>f||n-a.right-("left"===p?c.right.x:0)>f})}(De().concat(v).map(function(M){var Z,Ve=null==(Z=M._tippy.popperInstance)?void 0:Z.state;return Ve?{popperRect:M.getBoundingClientRect(),popperState:Ve,props:n}:null}).filter(Boolean),l)&&(Me(),Ie(l))}function dt(l){if(!(Je(l)||r.props.trigger.indexOf("click")>=0&&s)){if(r.props.interactive)return void r.hideWithInteractivity(l);Ie(l)}}function Ze(l){r.props.trigger.indexOf("focusin")<0&&l.target!==S()||r.props.interactive&&l.relatedTarget&&v.contains(l.relatedTarget)||Ie(l)}function Je(l){return!!pe.isTouch&&k()!==l.type.indexOf("touch")>=0}function vt(){mt();var l=r.props,b=l.popperOptions,T=l.placement,I=l.offset,M=l.getReferenceClientRect,Z=l.moveTransition,se=j()?st(v).arrow:null,Ve=M?{getBoundingClientRect:M,contextElement:M.contextElement||S()}:e,Le=[{name:"offset",options:{offset:I}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!Z}},{name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(wt){var Fe=wt.state;if(j()){var jt=re().box;["placement","reference-hidden","escaped"].forEach(function(Ot){"placement"===Ot?jt.setAttribute("data-placement",Fe.placement):Fe.attributes.popper["data-popper-"+Ot]?jt.setAttribute("data-"+Ot,""):jt.removeAttribute("data-"+Ot)}),Fe.attributes.popper={}}}}];j()&&se&&Le.push({name:"arrow",options:{element:se,padding:3}}),Le.push.apply(Le,b?.modifiers||[]),r.popperInstance=Ir(Ve,v,Object.assign({},b,{placement:T,onFirstUpdate:O,modifiers:Le}))}function mt(){r.popperInstance&&(r.popperInstance.destroy(),r.popperInstance=null)}function De(){return je(v.querySelectorAll("[data-tippy-root]"))}function et(l){r.clearDelayTimeouts(),l&&Y("onTrigger",[r,l]),fe();var b=Q(!0),T=R(),M=T[1];pe.isTouch&&"hold"===T[0]&&M&&(b=M),b?i=setTimeout(function(){r.show()},b):r.show()}function Ie(l){if(r.clearDelayTimeouts(),Y("onUntrigger",[r,l]),r.state.isVisible){if(!(r.props.trigger.indexOf("mouseenter")>=0&&r.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(l.type)>=0&&s)){var b=Q(!1);b?o=setTimeout(function(){r.state.isVisible&&r.hide()},b):a=requestAnimationFrame(function(){r.hide()})}}else ye()}}function Ce(e,t){void 0===t&&(t={});var n=te.plugins.concat(t.plugins||[]);!function Fr(){document.addEventListener("touchstart",Wr,Ee),window.addEventListener("blur",Vr)}();var i=Object.assign({},t,{plugins:n}),u=function Nr(e){return at(e)?[e]:function jr(e){return At(e,"NodeList")}(e)?je(e):Array.isArray(e)?e:je(document.querySelectorAll(e))}(e).reduce(function(f,p){var c=p&&Zr(p,i);return c&&f.push(c),f},[]);return at(e)?u[0]:u}Ce.defaultProps=te,Ce.setDefaultProps=function(t){Object.keys(t).forEach(function(i){te[i]=t[i]})},Ce.currentInput=pe,Object.assign({},Yt,{effect:function(t){var n=t.state,i={popper:{position:n.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(n.elements.popper.style,i.popper),n.styles=i,n.elements.arrow&&Object.assign(n.elements.arrow.style,i.arrow)}}),Ce.setDefaultProps({render:_n});const ai=Ce;let si=(()=>{class e{_el=(0,W.WQX)(Oe.aKT);cueTooltip=G.hFB.required();tooltipPlacement=(0,G.hFB)(void 0);tooltipFlip=(0,G.hFB)(!0);tooltipColor=(0,G.hFB)("primary");tooltipSize=(0,G.hFB)("medium");static _styleAppended=!1;_tippyInstance;constructor(){(0,W.QZP)(()=>{const n=this.cueTooltip(),i=this.tooltipPlacement(),o=this.tooltipFlip();this._tippyInstance&&(this._tippyInstance.destroy(),this._tippyInstance=void 0),n&&(this._tippyInstance=ai(this._el.nativeElement,{content:n,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=Oe.FsC({type:e,selectors:[["","cueTooltip",""]],inputs:{cueTooltip:[1,"cueTooltip"],tooltipPlacement:[1,"tooltipPlacement"],tooltipFlip:[1,"tooltipFlip"],tooltipColor:[1,"tooltipColor"],tooltipSize:[1,"tooltipSize"]}})}return e})()}}]);
|
|
1
|
+
"use strict";(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[2245,9495],{9495(E,f,a){a.d(f,{InlineInput:()=>m});var i=a(7705),h=a(5802),s=a(5547);const v=["inputEl"];let m=(()=>{class d{value=(0,i.geq)("");placeholder=(0,i.hFB)("");autofocus=(0,i.hFB)(!1);valueChange=(0,i.CGW)();save=(0,i.CGW)();cancel=(0,i.CGW)();inputEl;constructor(){(0,h.QZP)(()=>{const n=this.value(),o=this.inputEl?.nativeElement;o&&o.innerText.replace(/\n$/,"")!==n&&(o.innerText=n)})}ngAfterViewInit(){const n=this.inputEl?.nativeElement;n&&(n.innerText=this.value()),this.autofocus()&&n&&n.focus()}onInput(n){const r=n.target.innerText.replace(/\n$/,"");this.value.set(r),this.valueChange.emit(r)}onEnter(n){n.preventDefault(),this.save.emit()}onEscape(n){n.preventDefault(),this.cancel.emit()}onBlur(){this.save.emit()}static \u0275fac=function(o){return new(o||d)};static \u0275cmp=s.VBU({type:d,selectors:[["cue-inline-input"]],viewQuery:function(o,r){if(1&o&&s.GBs(v,5),2&o){let _;s.mGM(_=s.lsd())&&(r.inputEl=_.first)}},inputs:{value:[1,"value"],placeholder:[1,"placeholder"],autofocus:[1,"autofocus"]},outputs:{value:"valueChange",valueChange:"valueChange",save:"save",cancel:"cancel"},decls:2,vars:1,consts:[["inputEl",""],["contenteditable","true","role","textbox","aria-multiline","true",3,"input","keydown.enter","keydown.escape","blur"]],template:function(o,r){1&o&&(s.rj2(0,"span",1,0),s.VwU("input",function(g){return r.onInput(g)})("keydown.enter",function(g){return r.onEnter(g)})("keydown.escape",function(g){return r.onEscape(g)})("blur",function(){return r.onBlur()}),s.eux()),2&o&&s.BMQ("data-placeholder",r.placeholder())},styles:["[_nghost-%COMP%]{display:inline}span[contenteditable][_ngcontent-%COMP%]{outline:none;-webkit-text-decoration:underline dashed;text-decoration:underline dashed;text-underline-offset:3px;white-space:pre-wrap;word-break:break-word;cursor:text}span[contenteditable][_ngcontent-%COMP%]:empty:before{content:attr(data-placeholder);color:var(--cue-input-placeholder-color, currentColor);opacity:.5;pointer-events:none}"],changeDetection:0})}return d})()},2245(E,f,a){a.r(f),a.d(f,{Typography:()=>T});var i=a(7705),h=a(2271),s=a(7089),v=a(5381),m=a(29),d=a(9495),e=a(5547),n=a(5802);const o=["*"];function r(l,M){if(1&l){const t=e.RV6();e.j41(0,"div",2),e.bIt("input",function(c){n.eBV(t);const p=e.XpG();return n.Njj(p.onInput(c))})("blur",function(c){n.eBV(t);const p=e.XpG();return n.Njj(p.onInput(c))}),e.k0s()}if(2&l){const t=e.XpG();e.Aen(t.getStyles()),e.xc7("font-style",t.italic()?"italic":"normal"),e.Y8G("innerHTML",t.innerHTML(),e.npT)("contentEditable",t.editable())}}function _(l,M){if(1&l&&e.nrm(0,"cue-svg-icon",5),2&l){const t=e.XpG(2);e.xc7("--cue-icon-width",t.infoSize()+"px"),e.Y8G("cueTooltip",t.info())}}function g(l,M){if(1&l){const t=e.RV6();e.j41(0,"div",3),e.bIt("input",function(c){n.eBV(t);const p=e.XpG();return n.Njj(p.onInput(c))})("blur",function(c){n.eBV(t);const p=e.XpG();return n.Njj(p.onInput(c))}),e.SdG(1),e.k0s(),e.nVh(2,_,1,3,"cue-svg-icon",4)}if(2&l){const t=e.XpG();e.Aen(t.getStyles()),e.xc7("font-style",t.italic()?"italic":"normal"),e.Y8G("contentEditable",t.editable()),e.R7$(2),e.vxM(t.info()?2:-1)}}let T=(()=>{class l{_inlineInput=(0,i.sbv)(d.InlineInput);hasInlineInput=(0,h.EW)(()=>!!this._inlineInput());as=(0,i.hFB)("div");size=(0,i.hFB)("m");weight=(0,i.hFB)("regular");align=(0,i.hFB)("start");noWrap=(0,i.hFB)(!1);italic=(0,i.hFB)(!1);innerHTML=(0,i.hFB)(null);info=(0,i.hFB)("");editable=(0,i.hFB)(!1);change=(0,i.CGW)();onInput(t){this.editable()&&this.change.emit(t.target.innerText)}getStyles=(0,h.EW)(()=>`\n font-family: var(--cue-font-family);\n font-size: var(--cue-font-${this.size()}-size);\n line-height: var(--cue-font-${this.size()}-line-height);\n letter-spacing: var(--cue-font-${this.size()}-letter-spacing);\n font-weight: var(--cue-font-weight-${this.weight()});\n text-align: ${this.align()};\n ${this.noWrap()?"white-space: nowrap; overflow: hidden; text-overflow: ellipsis;":""}\n `);infoSize=(0,h.EW)(()=>{switch(this.size()){case"xs":return 10;case"s":return 12;case"m":default:return 14;case"l":return 16;case"xl":return 18}});static \u0275fac=function(u){return new(u||l)};static \u0275cmp=e.VBU({type:l,selectors:[["cue-typography"]],contentQueries:function(u,c,p){1&u&&e.C6U(p,c._inlineInput,d.InlineInput,5),2&u&&e.NyB()},inputs:{as:[1,"as"],size:[1,"size"],weight:[1,"weight"],align:[1,"align"],noWrap:[1,"noWrap"],italic:[1,"italic"],innerHTML:[1,"innerHTML"],info:[1,"info"],editable:[1,"editable"]},outputs:{change:"change"},ngContentSelectors:o,decls:3,vars:2,consts:[["justify","start","align","center",3,"noGap"],[3,"style","font-style","innerHTML","contentEditable"],[3,"input","blur","innerHTML","contentEditable"],[3,"input","blur","contentEditable"],["name","info",2,"margin-left","4px","vertical-align","super","cursor","pointer",3,"cueTooltip","--cue-icon-width"],["name","info",2,"margin-left","4px","vertical-align","super","cursor","pointer",3,"cueTooltip"]],template:function(u,c){1&u&&(e.NAR(),e.j41(0,"cue-flexcontainer",0),e.nVh(1,r,1,6,"div",1)(2,g,3,6),e.k0s()),2&u&&(e.Y8G("noGap",!0),e.R7$(),e.vxM(c.innerHTML()?1:2))},dependencies:[m.A,s.d,v.FlexContainer],encapsulation:2})}return l})()}}]);
|
package/2283.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[2283],{2283(N,S,c){c.d(S,{g:()=>Me});var y=c(467),l=c(7705),h=c(2271),s=c(5802),O=c(2065),D=c(7284),v=c.n(D);var t=c(5547);let z=(()=>{class a{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,l.hFB)([]),this.width=(0,l.hFB)(),this.height=(0,l.hFB)(),this.step=(0,l.hFB)(),this.overflow=(0,l.hFB)(),this.strict=(0,l.hFB)(),this.zoomOnHover=(0,l.hFB)(),this.realignOnResize=(0,l.hFB)(),this.randomizeAngle=(0,l.hFB)(),this.background=(0,l.hFB)(),this.font=(0,l.hFB)(),this.delay=(0,l.hFB)(),this.config=(0,l.hFB)({}),this.log=(0,l.hFB)(),this.clicked=(0,l.CGW)(),this.afterInit=(0,l.CGW)(),this.afterChecked=(0,l.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,s.WQX)(t.aKT),this.r2=(0,s.WQX)(t.sFG);const e=this.el.nativeElement;(0,s.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,o)=>this.descriptiveEntry(i).localeCompare(this.descriptiveEntry(o))),this.dataArr.sort((i,o)=>o.weight-i.weight);const e=this.dataArr.filter(i=>i.position),n=this.dataArr.filter(i=>!i.position);e.forEach((i,o)=>{this.drawWord(o,i)}),n.forEach((i,o)=>{this.drawWord(o,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:o,offsetWidth:r,offsetHeight:g}=n;return!(e.right<i||e.left>i+r||e.bottom<o||e.top>o+g)}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 o=this.r2.createText(n);i.appendChild(o),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,o){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}) ${o}`),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 ${o}`),this.options.zoomOnHover?.color&&this.r2.removeStyle(i?e:n,"color")})}setPosition(e,n,i){let o=this.options.randomizeAngle?6.28*Math.random():0,r=0;const g=e.style;g.position="absolute";const p=!!(n.position&&n.position.left&&n.position.top),u=e.offsetWidth,f=e.offsetHeight;let b=p&&n.position?.left?n.position.left:this.options.center.x-u/2,C=p&&n.position?.top?n.position.top:this.options.center.y-f/2;if(g.left=b+"px",g.top=C+"px",this.options.delay&&(e.classList.add("tag-animation-delay"),g.setProperty("--tag-animation-delay",this.options.delay*i+"ms")),!p)if(0===i)g.left=b+2*(Math.random()-.5)*(this.calculatedWidth/5)+"px",g.top=C+2*(Math.random()-.5)*(this.calculatedHeight/5)+"30px";else{for(;this.options.width&&this.options.height&&e.offsetHeight&&e.offsetWidth&&this.hitTest(new DOMRect(b,C,e.offsetWidth,e.offsetHeight));)r+=this.options.step||1,o+=(i%2==0?1:-1)*(this.options.step||1),b=this.options.center.x-u/2+r*Math.cos(o)*this.options.aspectRatio,C=this.options.center.y+r*Math.sin(o)-f/2;g.left=b+"px",g.top=C+"px"}if(!this.options.overflow&&(b<0||C<0||b+u>this.calculatedWidth||C+f>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 o=this.getWeightForWord(n);i=this.r2.createElement("span"),i.className=`w${o}`,i.onclick=()=>{this.clicked?.emit(n)},i.onmouseenter=()=>{i.style.zIndex="2"},i.onmouseleave=()=>{i.style.zIndex="1"};let r=this.r2.createText(n.text);n.color&&this.setWordColor(i,n.color);const g=this.setWordRotation(i,n.rotate);n.link&&(r=this.wrapNodeIntoAnchorElement(r,n)),this.options.zoomOnHover&&1!==this.options.zoomOnHover.scale&&this.applyZoomStyle(r,i,n.link,g),i.appendChild(r),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||a)}}static{this.\u0275cmp=t.VBU({type:a,selectors:[["angular-tag-cloud"],["ng-tag-cloud"],["ngtc"]],hostBindings:function(n,i){1&n&&t.bIt("resize",function(r){return i.onResize(r)},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 a})();var F=c(5970);const T=["wordCloudContainer"];function k(a,m){if(1&a){const e=t.RV6();t.j41(0,"angular-tag-cloud",3),t.bIt("clicked",function(i){s.eBV(e);const o=t.XpG();return s.Njj(o.handleClicked(i))}),t.k0s()}if(2&a){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 B=(()=>{class a{words=(0,l.hFB)();entries=(0,l.hFB)();caseSensitive=(0,l.hFB)(!1);clickable=(0,l.hFB)(!1);multiSelect=(0,l.hFB)(!1);highlightSelection=(0,l.hFB)(!1);minWeight=(0,l.hFB)(1);maxWeight=(0,l.hFB)(5);maxWords=(0,l.hFB)(50);colorScheme=(0,l.hFB)(["var(--cue-chart-text-color)","var(--cue-chart-text-color-select)"]);overflow=(0,l.hFB)(!1);clickedWord=(0,l.CGW)();selectionChanged=(0,l.CGW)();wordCloudContainer;containerSize=(0,s.vPA)({width:0,height:0});selection=(0,s.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,s.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 u of e){const f=this.caseSensitive()?u:u.toLowerCase();n.set(f,(n.get(f)||0)+1)}const i=Array.from(n.entries());if(0===i.length)return[];const o=i.map(([,u])=>u),r=Math.min(...o),g=Math.max(...o);return g===r?i.map(([u])=>({text:u,weight:this.maxWeight()})):i.sort(([,u],[,f])=>f-u).slice(0,this.maxWords()).map(([u,f])=>({text:u,weight:this.minWeight()+(f-r)*(this.maxWeight()-this.minWeight())/(g-r),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||a)};static \u0275cmp=t.VBU({type:a,selectors:[["cue-word-cloud"]],viewQuery:function(n,i){if(1&n&&t.GBs(T,5),2&n){let o;t.mGM(o=t.lsd())&&(i.wordCloudContainer=o.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(r){return i.handleResize(r)}),t.nVh(2,k,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:[z,F.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 a})();var E=c(5971),A=c(5448),G=c(3319),j=c(4372),$=c(2611),X=c(5661),U=c(1096),H=c(5764),Y=c(2217);let Q=(()=>{class a{suffix=(0,s.vPA)("");iconSize=(0,s.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||a)};static \u0275cmp=t.VBU({type:a,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:[Y.o],styles:["[_nghost-%COMP%]{display:flex;align-items:center;justify-content:center;width:100%;height:100%}"],changeDetection:0})}return a})();var K=c(6117),Z=c(29),J=c(1951),q=c(1493),w=c(9352),ee=c(5381),te=c(9769),ne=c(5187),ie=c(356),oe=c(6279),se=c(7717),ae=c(7089),le=c(2245);const ce=(a,m)=>m.id;function re(a,m){if(1&a){const e=t.RV6();t.j41(0,"li",9),t.bIt("click",function(){const i=s.eBV(e).$implicit,o=t.XpG(3);return s.Njj(o.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&a){const e=m.$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 de(a,m){if(1&a&&(t.j41(0,"ul",5),t.Z7z(1,re,5,6,"li",8,ce),t.k0s()),2&a){const e=t.XpG(2);t.R7$(),t.Dyx(e.simpleDocumentsInt())}}function ue(a,m){if(1&a&&(t.j41(0,"cue-flexcontainer",6)(1,"cue-typography",12),t.EFF(2),t.k0s()()),2&a){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 he(a,m){if(1&a){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(){s.eBV(e);const i=t.XpG(2);return s.Njj(i.previousSimplePage())}),t.nrm(5,"cue-button-icon",16),t.k0s(),t.j41(6,"cue-button",15),t.bIt("click",function(){s.eBV(e);const i=t.XpG(2);return s.Njj(i.nextSimplePage())}),t.nrm(7,"cue-button-icon",17),t.k0s()()()}if(2&a){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 ge(a,m){if(1&a&&(t.j41(0,"div",3),t.nVh(1,de,3,0,"ul",5)(2,ue,3,1,"cue-flexcontainer",6),t.nVh(3,he,8,5,"cue-flexcontainer",7),t.k0s()),2&a){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 me(a,m){if(1&a&&t.nrm(0,"cue-svg-icon",34),2&a){const e=t.XpG().$implicit;t.Y8G("name",e.icon)}}function pe(a,m){if(1&a){const e=t.RV6();t.j41(0,"cue-menu-item",33),t.bIt("click",function(){const i=s.eBV(e).$implicit;return s.Njj(null==i?null:i.action())}),t.nVh(1,me,1,1,"cue-svg-icon",34),t.EFF(2),t.k0s()}if(2&a){const e=m.$implicit;t.R7$(),t.vxM(e.icon?1:-1),t.R7$(),t.SpI(" ",e.label)}}function fe(a,m){if(1&a){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,pe,3,2,"cue-menu-item",null,t.Vm6),t.k0s()(),t.j41(8,"cue-button",29),t.nI1(9,"transloco"),t.bIt("click",function(){s.eBV(e);const i=t.XpG(2);return s.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){s.eBV(e);const o=t.XpG(2);return s.Njj(o.onGridReady(i))})("selectedRows",function(i){s.eBV(e);const o=t.XpG(2);return s.Njj(o.clickedDocument.emit(i[0]))}),t.k0s()()}if(2&a){const e=t.XpG(2);t.R7$(6),t.Dyx(e.tableMenu()),t.R7$(2),t.Y8G("cueTooltip",t.bMT(9,10,"components.documentList.tooltipColumnSettings")),t.R7$(4),t.AVh("hidden",e.tableHidden()),t.Y8G("paginationPageSize",e.pageSize())("size",e.size())("rowSelection",e.rowSelection)("rowData",e.documentsInt())("columnDefs",e.columnDefs())("overlaySettings",e.overlaySettings())("overlayActions",e.overlayActions())}}function ve(a,m){if(1&a){const e=t.RV6();t.j41(0,"cue-flexcontainer",41),t.bIt("click",function(){s.eBV(e);const i=t.XpG(3);return s.Njj(i.applyTagFilter())}),t.j41(1,"cue-button",42)(2,"cue-button-label"),t.EFF(3,"Apply"),t.k0s()()()}}function _e(a,m){if(1&a){const e=t.RV6();t.j41(0,"cue-flexcontainer",24)(1,"cue-button",35),t.bIt("click",function(){s.eBV(e);const i=t.XpG(2);return s.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){s.eBV(e);const o=t.XpG(2);return s.Njj(o.tagSelection.set(i))}),t.k0s(),t.nVh(5,ve,4,0,"cue-flexcontainer",39),t.k0s(),t.j41(6,"cue-ag-grid-column-select",40),t.mxI("columnDefsChange",function(i){s.eBV(e);const o=t.XpG(2);return t.DH7(o.columnDefs,i)||(o.columnDefs=i),s.Njj(i)}),t.k0s()}if(2&a){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 Ce(a,m){if(1&a&&(t.j41(0,"cue-card",20),t.eu8(1,43),t.k0s()),2&a){t.XpG();const e=t.sdS(3),n=t.XpG();t.Y8G("variant",n._cardVariant()),t.R7$(),t.Y8G("ngTemplateOutlet",e)}}function De(a,m){if(1&a&&(t.j41(0,"div",21),t.eu8(1,43),t.k0s()),2&a){t.XpG();const e=t.sdS(3);t.R7$(),t.Y8G("ngTemplateOutlet",e)}}function be(a,m){if(1&a&&(t.j41(0,"cue-card",22),t.eu8(1,43),t.k0s()),2&a){t.XpG();const e=t.sdS(5),n=t.XpG();t.Y8G("variant",n._cardVariant()),t.R7$(),t.Y8G("ngTemplateOutlet",e)}}function we(a,m){if(1&a&&(t.j41(0,"div",23),t.eu8(1,43),t.k0s()),2&a){t.XpG();const e=t.sdS(5);t.R7$(),t.Y8G("ngTemplateOutlet",e)}}function xe(a,m){if(1&a){const e=t.RV6();t.j41(0,"div",18),t.mxI("cueFlipChange",function(i){s.eBV(e);const o=t.XpG();return t.DH7(o.flipped,i)||(o.flipped=i),s.Njj(i)}),t.j41(1,"div",19),t.DNE(2,fe,13,12,"ng-template",null,0,t.C5r)(4,_e,7,13,"ng-template",null,1,t.C5r),t.nVh(6,Ce,2,2,"cue-card",20)(7,De,2,1,"div",21),t.nVh(8,be,2,2,"cue-card",22)(9,we,2,1,"div",23),t.k0s()()}if(2&a){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 Me=(()=>{class a{documents=(0,l.hFB)([]);availableContentCategories=(0,l.hFB)(void 0);detailedView=(0,l.hFB)(!1);simple=(0,l.hFB)(!1);pageSize=(0,l.hFB)(10);size=(0,l.hFB)("m");prefetchPages=(0,l.hFB)(3);privileges=(0,l.hFB)();showOpenInDocumentViewerAction=(0,l.hFB)(!0);showOpenInFileManagerAction=(0,l.hFB)(!0);customOverlayActions=(0,l.hFB)([]);variant=(0,l.hFB)("default");_cardVariant=(0,h.EW)(()=>this.variant());documentRefs=(0,l.hFB)([]);handlers=(0,l.hFB)(void 0);documentData=(0,l.hFB)({});clickedDocument=(0,l.CGW)();clickedDownloadDocument=(0,l.CGW)();clickedOpenInDir=(0,l.CGW)();clickedOpen=(0,l.CGW)();flipped=(0,s.vPA)(!1);simplePageIndex=(0,s.vPA)(0);selectedSimpleDocumentId=(0,s.vPA)(null);_simpleBufferedUntilIndex=(0,s.vPA)(0);_tableBufferedUntilIndex=(0,s.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,w.Xx)("components.documentList.labelDownload");labelName=(0,w.Xx)("components.documentList.labelName");labelOpenInFileManager=(0,w.Xx)("components.documentList.labelOpenInFileManager");labelOpenInDocumentViewer=(0,w.Xx)("components.documentList.labelOpenInDocumentViewer");labelSubject=(0,w.Xx)("components.documentList.labelSubject");labelSummary=(0,w.Xx)("components.documentList.labelSummary");labelPages=(0,w.Xx)("components.documentList.labelPages");labelSize=(0,w.Xx)("components.documentList.labelSize");labelCategories=(0,w.Xx)("components.documentList.labelCategories");labelType=(0,w.Xx)("components.documentList.labelType");buttonShowCloudFilter=(0,w.Xx)("components.documentList.buttonShowCloudFilter");buttonHideCloudFilter=(0,w.Xx)("components.documentList.buttonHideCloudFilter");buttonDownloadCSV=(0,w.Xx)("components.documentList.buttonDownloadCSV");infoLoading=(0,w.Xx)("components.documentList.infoLoading");overlaySettings=(0,h.EW)(()=>({...new J.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(o=>{const r=i[o.id];return r?{...r,pages:o.pages??r.pages,...void 0!==o.sources?{sources:o.sources}:{},...void 0!==o.relevance?{relevance:o.relevance}:{},name:(0,j.M)(r.path),loading:!1}:{id:o.id,path:o.id,suffix:"",size:0,contentIRI:o.id,tags:[],summary:"",categories:[],relevance:o.relevance??0,pages:o.pages,sources:o.sources,name:this.infoLoading(),loading:!0}})}else e=(this.documents()||[]).map(n=>({...n,name:(0,j.M)(n.path),loading:!1}));return this.tagFilter().length?e.filter(n=>n.tags?.some(i=>this.tagFilter().some(o=>o.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(o=>n.push(o))}),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 U.e;columnDefs=(0,s.vPA)([]);columnDefsGross=(0,s.vPA)([]);tagSelection=(0,s.vPA)([]);tagFilter=(0,s.vPA)([]);showTagFilterCloud=(0,s.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 P(a,m,e="table.csv"){const n=function I(a,m){const e=function d(a,m){return a.map(e=>{const n={};return"id"in e&&(n.id=e.id),"key"in e&&(n.key=e.key),m.forEach(i=>{let o;"function"==typeof i.valueGetter?o=i.valueGetter({data:e,colDef:i,getValue:g=>e[g],node:void 0,column:void 0,api:void 0,context:void 0}):i.field&&(o=e[i.field]),"function"==typeof i.valueFormatter&&(o=i.valueFormatter({value:o,data:e,colDef:i,node:void 0,column:void 0,api:void 0,context:void 0}));const r=i.headerName||i.colId||i.field;void 0!==r&&(n[r]=o)}),n})}(a,m);if(0===e.length)return"";const n=e.some(r=>"id"in r),i=[];n&&i.push("id"),m.forEach(r=>{const g=r.headerName||r.colId||r.field;g&&"id"!==g&&!i.includes(g)&&i.push(g)});const o=e.map(r=>{const g={};return i.forEach(p=>{g[p]=r[p]}),g});return v().unparse(o,{columns:i})}(a,m);(0,O.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,s.QZP)(()=>{this.simple()||this._buildInitialColumnDefs(this.detailedView())});whenSimpleDataChanges=(0,s.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,s.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,s.QZP)(()=>{if(!this.simple()||!this._lazyMode()||!this.handlers())return;const e=this.documentRefs();if(!e.length)return;const n=Math.max(1,this.pageSize()),o=n*Math.max(1,this.prefetchPages()),r=e.length,g=this.simpleStartIndex(),p=Math.min(r,g+n),u=this._simpleBufferedUntilIndex();let f=null;if(0===u?f=0:(g>=Math.max(0,u-n)||p>u)&&(f=u),null===f||f>=r)return;const b=Math.min(r,f+o),C=e.slice(f,b).map(_=>_.id).filter(_=>!this._requestedIds.has(_));this._simpleBufferedUntilIndex.set(Math.max(u,b)),C.length&&(C.forEach(_=>this._requestedIds.add(_)),setTimeout(()=>this.handlers()?.requestData(C)))});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,y.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),r=Math.max(0,this._gridApi.paginationGetCurrentPage?.()??0)*i,g=Math.min(n,r+i),p=this._tableBufferedUntilIndex();let u=null;if(0===p?u=0:(r>=Math.max(0,p-i)||g>p)&&(u=p),null===u||u>=n)return;const f=i*Math.max(1,this.prefetchPages()),b=Math.min(n,u+f),C=e.slice(u,b).map(_=>_.id).filter(_=>!this._requestedIds.has(_));this._tableBufferedUntilIndex.set(Math.max(p,b)),C.length&&(C.forEach(_=>this._requestedIds.add(_)),setTimeout(()=>this.handlers()?.requestData(C)))}_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:p=>!p.data?.name&&p.data?.loading?"Loading...":p.data?.name||p.data?.contentIRI}),this.hasSubjects()&&n.push({field:"subject",headerName:this.labelSubject(),flex:1,filter:!0,cellRenderer:H.l,cellRendererParams:{lineHeight:"1.8"},autoHeight:!0});const o={field:"summary",headerName:this.labelSummary(),flex:1,filter:!0,cellRenderer:H.l,cellRendererParams:{lineHeight:"1.8"},autoHeight:!0};this.detailedView()||(o.tooltipField="summary"),e?n.push(o):i.push(o),this.showPageColumn()&&n.push({field:"pages",headerName:this.labelPages(),width:100,filter:!0,valueGetter:p=>Array.isArray(p.data?.pages)?p.data.pages.map(u=>u.page).join(", "):""});const r={field:"size",headerName:this.labelSize(),width:100,filter:!0,valueGetter:p=>(0,q.b)(p.data?.size||0)};e?n.push(r):i.push(r);const g={field:"categories",headerName:this.labelCategories(),width:120,filter:!0,valueGetter:p=>{const u=p.data?.categories||[],f=this._leafContentCategoryIris(),b=f?u.filter(_=>f.has(_)):u,C=b.slice(0,3).map(_=>this._getContentCategoryLabel(_)).join(", ");return b.length>3?`${C}...`:C}};e?n.push(g):i.push(g),n.push({field:"suffix",headerName:this.labelType(),width:80,filter:!0,headerClass:"header-align-right",cellStyle:{display:"flex",justifyContent:"flex-end"},cellRenderer:Q}),this.columnDefs.update(()=>[...n]),this.columnDefsGross.update(()=>[...n,...i])}_getContentCategoryLabel(e){const n=this.availableContentCategories();if(void 0!==n){const i=n.find(o=>o.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(a=>{const m=a.split("#").pop()??a,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[m]&&console.log(`No pretty label for category: ${m}`),e[m]??m})(e)}static \u0275fac=function(n){return new(n||a)};static \u0275cmp=t.VBU({type:a,selectors:[["cue-doc-list"]],inputs:{documents:[1,"documents"],availableContentCategories:[1,"availableContentCategories"],detailedView:[1,"detailedView"],simple:[1,"simple"],pageSize:[1,"pageSize"],size:[1,"size"],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","size","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,ge,4,2,"div",3)(1,xe,10,3,"div",4),2&n&&t.vxM(i.simple()?0:1)},dependencies:[ee.FlexContainer,B,E.Button,A.ButtonLabel,se.R,ne.Card,te.T3,G.ButtonIcon,$.R,X.pL,ie.M,oe.D,K.W,Z.A,ae.d,le.Typography,w.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 a})()},4372(N,S,c){c.d(S,{M:()=>y});const y=l=>{const h=l.split("/");return h[h.length-1]}},2217(N,S,c){c.d(S,{o:()=>P});var y=c(7705),l=c(2271),h=c(2245),s=c(5547),O=c(5802);function D(t,R){if(1&t&&(O.qSk(),s.j41(0,"svg",0),s.nrm(1,"path",3)(2,"path",4),s.k0s()),2&t){const M=s.XpG();s.R7$(),s.BMQ("fill",M.colorDark()),s.R7$(),s.BMQ("fill",M.color())}}function v(t,R){if(1&t&&(O.qSk(),s.j41(0,"svg",1),s.nrm(1,"path",5)(2,"path",6)(3,"path",7),s.k0s()),2&t){const M=s.XpG();s.R7$(2),s.BMQ("fill",M.color())}}const d_blue="#175EBB",I={".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 P=(()=>{class t{suffix=y.hFB.required();size=(0,y.hFB)("m");color=(0,l.EW)(()=>I[this.suffix()]??"#9D9998");label=(0,l.EW)(()=>this.suffix().startsWith(".")?this.suffix().toUpperCase().replace(/^\./,""):"");className=(0,l.EW)(()=>`size-${this.size()}`);colorDark=(0,l.EW)(()=>{const M=this.color(),x=parseInt(M.slice(1),16),F=x>>8&255,T=255&x;return`#${(Math.floor(.8*(x>>16&255))<<16|Math.floor(.8*F)<<8|Math.floor(.8*T)).toString(16).padStart(6,"0")}`});static \u0275fac=function(x){return new(x||t)};static \u0275cmp=s.VBU({type:t,selectors:[["cue-file-icon"]],hostVars:2,hostBindings:function(x,z){2&x&&s.HbH(z.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(x,z){1&x&&(s.nVh(0,D,3,2,":svg:svg",0)(1,v,4,1,":svg:svg",1),s.j41(2,"cue-typography",2),s.EFF(3),s.k0s()),2&x&&(s.vxM("folder"===z.suffix()?0:1),s.R7$(3),s.JRh(z.label()))},dependencies:[h.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 t})()},2065(N,S,c){function h(D,v,d="text/plain"){return function y(D,v="data.zip"){const d=document.createElement("a"),I=URL.createObjectURL(D);d.href=I,d.download=v,document.body.appendChild(d),d.click(),document.body.removeChild(d),URL.revokeObjectURL(I)}(new Blob([D],{type:d}),v)}function s(D,v){const d=document.createElement("a");d.style.display="hidden",d.setAttribute("href",window.URL.createObjectURL(D)),d.setAttribute("download",v),document.body.appendChild(d),d.click(),d.remove()}c.d(S,{KE:()=>s,YN:()=>h})},1493(N,S,c){function y(l,h=!1,s=1){const O=h?1e3:1024;if(Math.abs(l)<O)return l+" B";const D=h?["kB","MB","GB","TB","PB","EB","ZB","YB"]:["KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"];let v=-1;const d=10**s;do{l/=O,++v}while(Math.round(Math.abs(l)*d)/d>=O&&v<D.length-1);return l.toFixed(s)+" "+D[v]}c.d(S,{b:()=>y})}}]);
|