@qaecy/cue-ui 0.0.65 → 0.0.67

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/7727.js CHANGED
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[7727],{74631(se,B,u){u.d(B,{G:()=>ue});var M=u(10467),f=u(17705),y=u(32271),h=u(85802),l=u(35381),V=u(86117),G=u(8547),I=u(13319),T=u(85971),j=u(42245),$=u(31024),S=u(89421),U=u(55794),w=u(59352),O=u(77573),X=u(49769),e=u(35547);const W=(o,C)=>t=>t.isHighlight;function H(o,C){if(1&o&&(e.j41(0,"span",3),e.EFF(1),e.k0s()),2&o){const t=e.XpG(2).$implicit;e.R7$(),e.JRh(t.highlight.label)}}function z(o,C){if(1&o){const t=e.RV6();e.j41(0,"cue-button",5),e.bIt("click",function(i){h.eBV(t);const r=e.XpG(2).$implicit,v=e.XpG();return h.Njj(v.onDeleteHighlight(i,r.highlight))}),e.nrm(1,"cue-button-icon",6),e.k0s()}}function Y(o,C){if(1&o){const t=e.RV6();e.j41(0,"span",2),e.bIt("click",function(){h.eBV(t);const i=e.XpG().$implicit,r=e.XpG();return h.Njj(r.onHighlightClick(i.highlight))}),e.nVh(1,H,2,1,"span",3),e.EFF(2),e.nVh(3,z,2,0,"cue-button",4),e.k0s()}if(2&o){const t=e.XpG().$implicit,n=e.XpG();e.BMQ("data-segment-start",t.segmentStart),e.R7$(),e.vxM(t.highlight.label?1:-1),e.R7$(),e.SpI(" ",t.text," "),e.R7$(),e.vxM(n.allowDelete()?3:-1)}}function J(o,C){if(1&o&&(e.j41(0,"span"),e.EFF(1),e.k0s()),2&o){const t=e.XpG().$implicit;e.BMQ("data-segment-start",t.segmentStart),e.R7$(),e.JRh(t.text)}}function Q(o,C){if(1&o&&e.nVh(0,Y,4,4,"span",1)(1,J,2,2,"span"),2&o){const t=C.$implicit;e.vxM(t.isHighlight&&t.highlight?0:1)}}let K=(()=>{class o{path=f.hFB.required();highlights=(0,f.hFB)([]);allowDelete=(0,f.hFB)(!1);allowAdd=(0,f.hFB)(!1);size=(0,f.hFB)("m");highlightClick=(0,f.CGW)();deleteHighlight=(0,f.CGW)();textSelected=(0,f.CGW)();segments=(0,y.EW)(()=>this.parseSegments(this.path(),this.highlights()));parseSegments(t,n){const i=n.filter(_=>_.path===t);if(0===i.length)return[{text:t,isHighlight:!1,segmentStart:0}];const r=[...i].sort((_,ie)=>_.start-ie.start),v=[];let b=0;for(const _ of r)_.start>b&&v.push({text:t.substring(b,_.start),isHighlight:!1,segmentStart:b}),v.push({text:t.substring(_.start,_.end),isHighlight:!0,highlight:_,segmentStart:_.start}),b=_.end;return b<t.length&&v.push({text:t.substring(b),isHighlight:!1,segmentStart:b}),v}onHighlightClick(t){const n=this.path().substring(t.start,t.end);this.highlightClick.emit({path:this.path(),highlight:t,text:n})}onDeleteHighlight(t,n){t.stopPropagation(),this.deleteHighlight.emit({path:this.path(),highlight:n})}onMouseUp(t){if(!this.allowAdd())return;const n=window.getSelection();if(!n||n.isCollapsed||!n.rangeCount||!n.toString().trim())return;const r=n.getRangeAt(0),v=t.currentTarget,b=this.getAbsoluteOffset(v,r.startContainer,r.startOffset),_=this.getAbsoluteOffset(v,r.endContainer,r.endOffset);n.removeAllRanges(),_>b&&this.textSelected.emit({path:this.path(),start:b,end:_,text:this.path().substring(b,_)})}getAbsoluteOffset(t,n,i){let r=n.nodeType===Node.TEXT_NODE?n.parentElement:n;for(;r&&r!==t;){if(r instanceof HTMLElement&&r.hasAttribute("data-segment-start")){const ie=parseInt(r.getAttribute("data-segment-start"),10);let ae=0;const le=document.createTreeWalker(r,NodeFilter.SHOW_TEXT);let k=le.nextNode();for(;k&&k!==n;)ae+=k.textContent?.length??0,k=le.nextNode();return ie+ae+i}r=r.parentElement}const v=document.createTreeWalker(t,NodeFilter.SHOW_TEXT);let b=0,_=v.nextNode();for(;_&&_!==n;)b+=_.textContent?.length??0,_=v.nextNode();return b+i}static \u0275fac=function(n){return new(n||o)};static \u0275cmp=e.VBU({type:o,selectors:[["cue-file-path-viewer"]],inputs:{path:[1,"path"],highlights:[1,"highlights"],allowDelete:[1,"allowDelete"],allowAdd:[1,"allowAdd"],size:[1,"size"]},outputs:{highlightClick:"highlightClick",deleteHighlight:"deleteHighlight",textSelected:"textSelected"},decls:3,vars:7,consts:[[1,"path-content",3,"mouseup"],[1,"highlight-segment"],[1,"highlight-segment",3,"click"],[1,"highlight-label"],["size","xs","aria-label","Remove highlight",1,"delete-button"],["size","xs","aria-label","Remove highlight",1,"delete-button",3,"click"],["icon","close"]],template:function(n,i){1&n&&(e.j41(0,"div",0),e.bIt("mouseup",function(v){return i.onMouseUp(v)}),e.Z7z(1,Q,2,1,null,null,e.Vm6),e.k0s()),2&n&&(e.AVh("size-s","s"===i.size())("allow-add",i.allowAdd())("has-highlights",i.segments().some(e._m7(6,W,i))),e.R7$(),e.Dyx(i.segments()))},dependencies:[X.MD,T.Button,I.ButtonIcon],styles:["[_nghost-%COMP%]{display:contents}.path-content[_ngcontent-%COMP%]{display:block;flex:1;min-width:0;word-break:break-all;text-align:start;font-family:var(--cue-font-family);font-size:var(--cue-font-m-size);line-height:var(--cue-font-m-line-height);letter-spacing:var(--cue-font-m-letter-spacing);font-weight:var(--cue-font-weight-regular)}.path-content.size-s[_ngcontent-%COMP%]{font-size:var(--cue-font-s-size);line-height:var(--cue-font-s-line-height);letter-spacing:var(--cue-font-s-letter-spacing)}.path-content.allow-add[_ngcontent-%COMP%]{cursor:text;-webkit-user-select:text;user-select:text}.path-content.has-highlights[_ngcontent-%COMP%]{padding-top:.8rem;line-height:2.3rem}.highlight-segment[_ngcontent-%COMP%]{display:inline-block;vertical-align:text-bottom;position:relative;line-height:normal;font-weight:var(--cue-font-weight-medium);cursor:pointer;padding:0 .2rem;border-radius:3px;border:1px solid currentColor;transition:all .2s ease}.highlight-segment[_ngcontent-%COMP%] .highlight-label[_ngcontent-%COMP%]{font-family:var(--cue-font-family);position:absolute;bottom:100%;left:0;font-size:.5rem;line-height:1;opacity:.7;margin-bottom:.15rem;white-space:nowrap;pointer-events:none}.highlight-segment[_ngcontent-%COMP%] .delete-button[_ngcontent-%COMP%]{position:absolute;top:-12px;right:-12px;z-index:10;opacity:0;transition:opacity .2s ease;pointer-events:none}.highlight-segment[_ngcontent-%COMP%]:hover{background:color-mix(in srgb,currentColor 12%,transparent)}.highlight-segment[_ngcontent-%COMP%]:hover .delete-button[_ngcontent-%COMP%]{opacity:1;pointer-events:all}"],changeDetection:0})}return o})();var Z=u(75448),q=u(70063),ee=u(59695),m=u(55745),x=u(19682);const a=o=>({count:o}),d=(o,C)=>t=>t.iri;function g(o,C){1&o&&(e.j41(0,"cue-typography",11),e.EFF(1),e.nI1(2,"transloco"),e.k0s()),2&o&&(e.R7$(),e.JRh(e.bMT(2,1,"components.documentInfo.infoLoadingFilePaths")))}function s(o,C){if(1&o){const t=e.RV6();e.j41(0,"cue-ag-grid",16),e.bIt("selectedRows",function(i){h.eBV(t);const r=e.XpG(4);return h.Njj(r.onMatchedPathsSelectionChange(i))}),e.k0s()}if(2&o){const t=e.XpG(4);e.Y8G("rowData",t._matchTableRowData())("columnDefs",t._matchTableColDefs())("rowSelection",t._matchTableRowSelection)}}function c(o,C){if(1&o){const t=e.RV6();e.j41(0,"cue-flexcontainer",12)(1,"cue-button",13),e.bIt("click",function(){h.eBV(t);const i=e.XpG(3);return h.Njj(i._matchTableExpanded.set(!i._matchTableExpanded()))}),e.nrm(2,"cue-button-icon",14),e.j41(3,"cue-button-label"),e.EFF(4),e.nI1(5,"transloco"),e.k0s()(),e.nVh(6,s,1,3,"cue-ag-grid",15),e.k0s(),e.j41(7,"cue-typography",11),e.EFF(8),e.nI1(9,"transloco"),e.k0s()}if(2&o){const t=e.XpG(3);e.R7$(2),e.Y8G("icon",t._matchTableExpanded()?"arrow-up":"arrow-dropdown"),e.R7$(2),e.JRh(e.i5U(5,4,1===t._matchCount()?"components.documentInfo.filePathMatched":"components.documentInfo.filePathsMatched",e.eq3(10,a,t._matchCount()))),e.R7$(2),e.vxM(t._matchTableExpanded()?6:-1),e.R7$(2),e.JRh(e.i5U(9,7,"components.documentInfo.applyToNPaths",e.eq3(12,a,t._selectedPaths().length)))}}function p(o,C){if(1&o&&e.nVh(0,g,3,3,"cue-typography",11)(1,c,10,14),2&o){const t=e.XpG(2);e.vxM(t._fileLocationsLoading()?0:null!==t._fileLocations()?1:-1)}}function P(o,C){if(1&o){const t=e.RV6();e.j41(0,"cue-flexcontainer",9)(1,"cue-input-switch",10),e.bIt("toggleChange",function(i){h.eBV(t);const r=e.XpG();return h.Njj(r.onApplyToAllChange(i))}),e.k0s(),e.j41(2,"cue-typography",11),e.EFF(3),e.nI1(4,"transloco"),e.k0s()(),e.nVh(5,p,2,1)}if(2&o){const t=e.XpG();e.R7$(),e.Y8G("checked",t._applyToAllFiles()),e.R7$(2),e.JRh(e.bMT(4,3,"components.documentInfo.applyToAllFiles")),e.R7$(2),e.vxM(t._applyToAllFiles()?5:-1)}}function R(o,C){if(1&o&&(e.j41(0,"cue-typography",8),e.EFF(1),e.nI1(2,"transloco"),e.k0s()),2&o){const t=e.XpG();e.R7$(),e.Lme("",e.bMT(2,2,"components.documentInfo.errorSavingEntityMention"),": ",t._saveError())}}let D=(()=>{class o{selection=f.hFB.required();availableEntityCategories=(0,f.hFB)([]);fileLocations=(0,f.hFB)([]);requestFileLocations=(0,f.hFB)(void 0);requestFilePathEntityAdd=(0,f.hFB)(void 0);confirm=(0,f.CGW)();cancel=(0,f.CGW)();_selectedEntityCategory=(0,h.vPA)("");_applyToAllFiles=(0,h.vPA)(!1);_fileLocations=(0,h.vPA)(null);_fileLocationsLoading=(0,h.vPA)(!1);_matchTableExpanded=(0,h.vPA)(!1);_selectedPaths=(0,h.vPA)([]);_saving=(0,h.vPA)(!1);_saveError=(0,h.vPA)(null);_dirPrefix=(0,y.EW)(()=>{const t=this.selection();return t.path.substring(0,t.end)});_matchedLocations=(0,y.EW)(()=>{const t=this._fileLocations();if(!t)return[];const n=this._dirPrefix();return t.filter(i=>i.path.startsWith(n))});_matchCount=(0,y.EW)(()=>this._matchedLocations().length);_matchTableRowData=(0,y.EW)(()=>this._matchedLocations().map(t=>({iri:t.iri,path:t.path,providerId:t.providerId})));_entityCategoryLabelMap=(0,y.EW)(()=>this.availableEntityCategories().reduce((t,n)=>(t[n.iri]=n.label,t),{}));_matchTableRowSelection={mode:"multiRow",selectAll:"filtered"};_filePathLabel=(0,w.Xx)("components.contentBlocks.documentViewer.labelFilePath");_matchTableColDefs=(0,y.EW)(()=>[{headerName:this._filePathLabel(),field:"path",flex:1,filter:!0,sortable:!0}]);onEntityCategoryChange(t){this._selectedEntityCategory.set("string"==typeof t?t:String(t??""))}onApplyToAllChange(t){var n=this;return(0,M.A)(function*(){if(n._applyToAllFiles.set(t),n._matchTableExpanded.set(!1),!t)return n._fileLocations.set(null),void n._selectedPaths.set([]);const i=n.requestFileLocations();if(i){n._fileLocationsLoading.set(!0);try{const r=yield i();n._fileLocations.set(r);const v=n._dirPrefix();n._selectedPaths.set(r.filter(b=>b.path.startsWith(v)))}finally{n._fileLocationsLoading.set(!1)}}})()}onMatchedPathsSelectionChange(t){const n=this._fileLocations()??[];this._selectedPaths.set(t.map(i=>n.find(r=>r.path===i.path)??{iri:"",path:i.path}))}onConfirm(){var t=this;return(0,M.A)(function*(){const n=t._selectedEntityCategory();if(!n)return;const i=t.selection().path,r=t._fileLocations()?.find(_=>_.path===i)??t.fileLocations().find(_=>_.path===i)??{iri:"",path:i},v=t._applyToAllFiles()&&t._selectedPaths().length>0?t._selectedPaths():[r],b=t.requestFilePathEntityAdd();if(b){t._saving.set(!0),t._saveError.set(null);try{yield b(n,v)}catch(_){return console.error("[EntityMentionModal] Failed to save entity mention:",_),t._saveError.set(_ instanceof Error?_.message:String(_)),void t._saving.set(!1)}t._saving.set(!1)}t.confirm.emit({entityCategory:n,paths:v})})()}onCancel(){this.cancel.emit()}static \u0275fac=function(n){return new(n||o)};static \u0275cmp=e.VBU({type:o,selectors:[["cue-entity-mention-modal"]],inputs:{selection:[1,"selection"],availableEntityCategories:[1,"availableEntityCategories"],fileLocations:[1,"fileLocations"],requestFileLocations:[1,"requestFileLocations"],requestFilePathEntityAdd:[1,"requestFilePathEntityAdd"]},outputs:{confirm:"confirm",cancel:"cancel"},decls:18,vars:24,consts:[[3,"close","displayCloseBtn","closeOnBackgroundClick"],[1,"modal-content"],["direction","column","gap","m"],[3,"key","val"],[3,"valueChange","value","options","labelMap","label","showFilter"],["direction","row","justify","center"],[3,"click","disabled"],["variant","secondary",3,"click","disabled"],["size","s",2,"color","var(--cue-error)"],["direction","row","gap","s","align","center"],[3,"toggleChange","checked"],["size","s"],["direction","column","gap","xs"],["variant","ghost","size","xs",3,"click"],[3,"icon"],["size","s","height","220px",3,"rowData","columnDefs","rowSelection"],["size","s","height","220px",3,"selectedRows","rowData","columnDefs","rowSelection"]],template:function(n,i){1&n&&(e.j41(0,"cue-modal",0),e.bIt("close",function(){return i.onCancel()}),e.j41(1,"div",1)(2,"cue-flexcontainer",2),e.nrm(3,"cue-key-val",3),e.nI1(4,"transloco"),e.j41(5,"cue-select",4),e.nI1(6,"transloco"),e.bIt("valueChange",function(v){return i.onEntityCategoryChange(v)}),e.k0s(),e.nVh(7,P,6,5),e.j41(8,"cue-flexcontainer",5)(9,"cue-button",6),e.bIt("click",function(){return i.onCancel()}),e.j41(10,"cue-button-label"),e.EFF(11),e.nI1(12,"transloco"),e.k0s()(),e.j41(13,"cue-button",7),e.bIt("click",function(){return i.onConfirm()}),e.j41(14,"cue-button-label"),e.EFF(15),e.nI1(16,"transloco"),e.k0s()()(),e.nVh(17,R,3,4,"cue-typography",8),e.k0s()()()),2&n&&(e.Y8G("displayCloseBtn",!1)("closeOnBackgroundClick",!1),e.R7$(3),e.Y8G("key",e.bMT(4,15,"components.documentInfo.labelSelectedText"))("val",i.selection().text),e.R7$(2),e.Y8G("value",i._selectedEntityCategory())("options",i.availableEntityCategories().map(e._m7(17,d,i)))("labelMap",i._entityCategoryLabelMap())("label",e.bMT(6,18,"components.entityInfo.labelEntityCategory"))("showFilter",i.availableEntityCategories().length>5),e.R7$(2),e.vxM(i.requestFileLocations()?7:-1),e.R7$(2),e.Y8G("disabled",i._saving()),e.R7$(2),e.JRh(e.bMT(12,20,"components.modals.rdfEdit.buttonCancel")),e.R7$(2),e.Y8G("disabled",!i._selectedEntityCategory()||i._saving()),e.R7$(2),e.JRh(e.bMT(16,22,"components.modals.rdfEdit.buttonSave")),e.R7$(2),e.vxM(i._saveError()?17:-1))},dependencies:[l.FlexContainer,S.F,I.ButtonIcon,T.Button,Z.ButtonLabel,j.Typography,m.a,q.Select,ee.Switch,x.R,w.Kj],styles:[".modal-content[_ngcontent-%COMP%]{width:640px;max-width:calc(100vw - 32px)}"],changeDetection:0})}return o})();const L=()=>[];function te(o,C){if(1&o&&(e.nrm(0,"cue-key-val",6),e.nI1(1,"transloco")),2&o){const t=e.XpG(2);e.Y8G("key",e.bMT(1,2,"components.contentBlocks.documentViewer.labelSubject"))("val",t.subject())}}function F(o,C){if(1&o&&(e.j41(0,"cue-key-val-list"),e.nVh(1,te,2,4,"cue-key-val",6),e.k0s()),2&o){const t=e.XpG();e.R7$(),e.vxM(t.subject()?1:-1)}}function N(o,C){if(1&o&&(e.j41(0,"cue-flexcontainer",4)(1,"cue-menu",7)(2,"cue-button",8,0),e.nrm(4,"cue-button-icon",9),e.k0s(),e.nrm(5,"cue-menu-nested",10),e.k0s()()),2&o){const t=e.XpG();e.R7$(5),e.Y8G("items",t.menuItems())}}function A(o,C){if(1&o&&(e.nrm(0,"cue-key-val-editable",11),e.nI1(1,"transloco"),e.nI1(2,"transloco")),2&o){const t=e.XpG(2);e.Y8G("key",1===t.contentCategories().length?e.bMT(1,4,"components.contentBlocks.documentViewer.labelContentCategory"):e.bMT(2,6,"components.contentBlocks.documentViewer.labelContentCategories"))("val",t.contentCategoriesString())("rdfConfig",t.rdfEditConfig())("editDisabled",!t.contentCategoriesEditable())}}function oe(o,C){if(1&o&&(e.j41(0,"span",15),e.EFF(1),e.k0s()),2&o){const t=e.XpG(3);e.R7$(),e.Lme("(",t.currentFilePathIndex()+1,"/",t.fileLocations().length,")")}}function ne(o,C){if(1&o){const t=e.RV6();e.j41(0,"cue-button",19),e.bIt("click",function(){h.eBV(t);const i=e.XpG(3);return h.Njj(i.prevFilePath())}),e.nrm(1,"cue-button-icon",20),e.k0s()}if(2&o){const t=e.XpG(3);e.Y8G("disabled",0===t.currentFilePathIndex())}}function E(o,C){if(1&o){const t=e.RV6();e.j41(0,"cue-button",19),e.bIt("click",function(){h.eBV(t);const i=e.XpG(3);return h.Njj(i.nextFilePath())}),e.nrm(1,"cue-button-icon",21),e.k0s()}if(2&o){const t=e.XpG(3);e.Y8G("disabled",t.currentFilePathIndex()===t.fileLocations().length-1)}}function re(o,C){if(1&o){const t=e.RV6();e.j41(0,"dl",12)(1,"dt",13)(2,"cue-typography",14),e.EFF(3),e.nI1(4,"transloco"),e.nVh(5,oe,2,2,"span",15),e.k0s()(),e.j41(6,"dd",16),e.nVh(7,ne,2,1,"cue-button",17),e.j41(8,"cue-file-path-viewer",18),e.bIt("textSelected",function(i){h.eBV(t);const r=e.XpG(2);return h.Njj(r.onTextSelected(i))}),e.k0s(),e.nVh(9,E,2,1,"cue-button",17),e.k0s()()}if(2&o){const t=e.XpG(2);e.R7$(3),e.SpI(" ",e.bMT(4,8,"components.contentBlocks.documentViewer.labelFilePath")," "),e.R7$(2),e.vxM(t.fileLocations().length>1?5:-1),e.R7$(2),e.vxM(t.fileLocations().length>1?7:-1),e.R7$(),e.Y8G("path",t.fileLocations()[t.currentFilePathIndex()].path)("highlights",t.filePathEntitiesVisible()?t.filePathHighlights():e.lJ4(10,L))("allowDelete",t.filePathEntitiesEditable())("allowAdd",t.filePathEntitiesEditable()),e.R7$(),e.vxM(t.fileLocations().length>1?9:-1)}}function ce(o,C){if(1&o&&(e.j41(0,"cue-key-val-list"),e.nrm(1,"hr"),e.nVh(2,A,3,8,"cue-key-val-editable",11),e.nVh(3,re,10,11,"dl",12),e.k0s()),2&o){const t=e.XpG();e.R7$(2),e.vxM(t.contentCategories()&&t.contentCategories().length>0?2:-1),e.R7$(),e.vxM(t.fileLocations().length>0?3:-1)}}function de(o,C){if(1&o){const t=e.RV6();e.j41(0,"cue-entity-mention-modal",22),e.bIt("confirm",function(i){h.eBV(t);const r=e.XpG();return h.Njj(r.onEntityMentionConfirm(i))})("cancel",function(){h.eBV(t);const i=e.XpG();return h.Njj(i.onEntityMentionCancel())}),e.k0s()}if(2&o){const t=e.XpG();e.Y8G("selection",t._pendingSelection())("availableEntityCategories",t.availableEntityCategories())("fileLocations",t.fileLocations())("requestFileLocations",t._fileLocationsProvider())("requestFilePathEntityAdd",t._requestFilePathEntityAdd())}}let ue=(()=>{class o{subject=f.hFB.required();handlers=f.hFB.required();dataChanged=(0,f.CGW)();filePathEntityAdded=(0,f.CGW)();fileLocations=(0,f.hFB)([]);_fileLocationsProvider=(0,y.EW)(()=>{const t=this.handlers().requestFileLocations;if(t)return t;const n=this.fileLocations();return n.length?()=>Promise.resolve(n):void 0});filePathEntities=(0,f.geq)([]);contentCategories=(0,f.hFB)([]);contentCategoriesEditable=(0,f.hFB)(!1);filePathEntitiesVisible=(0,f.hFB)(!1);filePathEntitiesEditable=(0,f.hFB)(!1);menuItems=(0,f.hFB)([]);availableContentCategories=(0,f.hFB)([]);availableEntityCategories=(0,f.hFB)([]);collapsed=(0,f.hFB)(!1);hasDocInfo=(0,y.EW)(()=>{const t=""!==this.subject(),n=this.fileLocations().length>0;return t||n});currentFilePathIndex=(0,h.vPA)(0);_entityCategoryModalVisible=(0,h.vPA)(!1);_pendingSelection=(0,h.vPA)(null);_requestFilePathEntityAdd=(0,y.EW)(()=>{var t=this;const n=this.handlers().requestFilePathEntityAdd;if(n)return function(){var i=(0,M.A)(function*(r,v){const b=t._pendingSelection();b&&(yield n({paths:v,start:b.start,end:b.end,text:b.text,entityCategory:r,folderPath:b.path.substring(0,b.end)}))});return function(r,v){return i.apply(this,arguments)}}()});prevFilePath(){this.currentFilePathIndex()>0&&this.currentFilePathIndex.update(t=>t-1)}nextFilePath(){this.currentFilePathIndex()<this.fileLocations().length-1&&this.currentFilePathIndex.update(t=>t+1)}filePathHighlights=(0,y.EW)(()=>this.filePathEntities().map(t=>({path:t.path,start:t.startIndex,end:t.endIndex,label:this.availableEntityCategories().find(n=>n.iri===t.entityCategory)?.label??t.entityCategory.split("/").pop()??t.entityCategory})));entityCategoryLabelMap=(0,y.EW)(()=>this.availableEntityCategories().reduce((t,n)=>(t[n.iri]=n.label,t),{}));onTextSelected(t){this._pendingSelection.set(t),this._entityCategoryModalVisible.set(!0)}onEntityMentionConfirm(t){const n=this._pendingSelection();n&&(this.filePathEntities.update(i=>[...i,...t.paths.map(r=>({path:r.path,entityCategory:t.entityCategory,startIndex:n.start,endIndex:n.end}))]),this.filePathEntityAdded.emit({paths:t.paths,start:n.start,end:n.end,text:n.text,entityCategory:t.entityCategory,folderPath:n.path.substring(0,n.end)}),this._entityCategoryModalVisible.set(!1),this._pendingSelection.set(null))}onEntityMentionCancel(){this._entityCategoryModalVisible.set(!1),this._pendingSelection.set(null)}_contentCategories=(0,y.uu)(()=>this.contentCategories());contentCategoriesString=(0,y.EW)(()=>this._contentCategories().map(t=>this._iriToString(t)).sort().join(", "));_iriToString(t){const n=this.availableContentCategories()?.find(i=>i.iri===t);return n?n.label:t}infoChangeContentCategory=(0,w.Xx)("components.documentInfo.infoChangeContentCategory");rdfEditConfig=(0,y.EW)(()=>{var t=this;const n=this.handlers()?.requestRDFChange;var i;if(void 0!==n)return{message:this.infoChangeContentCategory(),existingValue:this._contentCategories(),dataType:"multiselect",options:this.availableContentCategories()?.map(i=>i.iri),optionLabelMap:this.availableContentCategories()?.reduce((i,r)=>(i[r.iri]=r.label,i),{}),requestSave:(i=(0,M.A)(function*(r){console.log(r);const v={subject:t.subject(),predicate:`${O.E.qcy}contentCategory`,objects:t._contentCategories(),newObjects:r.newValue,type:"contentCategory",comment:r.comment};yield n(v),t._contentCategories.set(r.newValue),t.dataChanged.emit({contentCategories:r.newValue})}),function(v){return i.apply(this,arguments)})};console.warn("No RDF change request handler defined")});static \u0275fac=function(n){return new(n||o)};static \u0275cmp=e.VBU({type:o,selectors:[["cue-document-info"]],inputs:{subject:[1,"subject"],handlers:[1,"handlers"],fileLocations:[1,"fileLocations"],filePathEntities:[1,"filePathEntities"],contentCategories:[1,"contentCategories"],contentCategoriesEditable:[1,"contentCategoriesEditable"],filePathEntitiesVisible:[1,"filePathEntitiesVisible"],filePathEntitiesEditable:[1,"filePathEntitiesEditable"],menuItems:[1,"menuItems"],availableContentCategories:[1,"availableContentCategories"],availableEntityCategories:[1,"availableEntityCategories"],collapsed:[1,"collapsed"]},outputs:{dataChanged:"dataChanged",filePathEntityAdded:"filePathEntityAdded",filePathEntities:"filePathEntitiesChange"},decls:7,vars:4,consts:[["trigger",""],["direction","column",2,"min-height","50px"],["direction","row"],["direction","column",2,"flex","1 1"],["direction","column",2,"width","50px"],[3,"selection","availableEntityCategories","fileLocations","requestFileLocations","requestFilePathEntityAdd"],["size","l",3,"key","val"],["positioning","bottomleft"],["trigger","","variant","tertiary"],["icon","more-vert"],["menu","",3,"items"],["size","s",3,"key","val","rdfConfig","editDisabled"],[1,"file-path-nav-container"],[1,"file-path-label"],["size","xs"],[1,"path-counter"],[1,"file-path-row"],["variant","tertiary","size","xs",3,"disabled"],["size","s",3,"textSelected","path","highlights","allowDelete","allowAdd"],["variant","tertiary","size","xs",3,"click","disabled"],["icon","paginator-back"],["icon","paginator-next"],[3,"confirm","cancel","selection","availableEntityCategories","fileLocations","requestFileLocations","requestFilePathEntityAdd"]],template:function(n,i){1&n&&(e.j41(0,"cue-flexcontainer",1)(1,"cue-flexcontainer",2)(2,"cue-flexcontainer",3),e.nVh(3,F,2,1,"cue-key-val-list"),e.k0s(),e.nVh(4,N,6,1,"cue-flexcontainer",4),e.k0s(),e.nVh(5,ce,4,2,"cue-key-val-list"),e.k0s(),e.nVh(6,de,1,5,"cue-entity-mention-modal",5)),2&n&&(e.R7$(3),e.vxM(i.fileLocations().length>0||i.subject()?3:-1),e.R7$(),e.vxM(i.menuItems().length>0?4:-1),e.R7$(),e.vxM(!i.collapsed()&&i.hasDocInfo()?5:-1),e.R7$(),e.vxM(i._entityCategoryModalVisible()&&i._pendingSelection()?6:-1))},dependencies:[l.FlexContainer,$.p,S.F,U.L,V.W,G.T,I.ButtonIcon,T.Button,K,j.Typography,D,w.Kj],styles:[".file-path-nav-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2px}.file-path-label[_ngcontent-%COMP%]{display:block;margin:0}.file-path-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:4px;margin:0;overflow:visible;padding:1px}.file-path-row[_ngcontent-%COMP%] cue-file-path-viewer[_ngcontent-%COMP%]{flex:1;overflow:visible;min-width:0}.path-counter[_ngcontent-%COMP%]{opacity:.6}"],changeDetection:0})}return o})()},77727(se,B,u){u.d(B,{CueDocumentViewer:()=>ee});var M=u(10467),f=u(17705),y=u(32271),h=u(85802),l=u(35547),V=u(49769),G=u(35381),I=u(42245),T=u(65187),j=u(74631);class ${requestRDFChange;requestFileLocations;requestFilePathEntityAdd}var S=u(2065),U=u(57293);const w=["viewerHost"];function O(m,x){if(1&m&&l.nrm(0,"cue-document-info",4),2&m){const a=l.XpG(2);l.Y8G("subject",a._docSubject())("handlers",a._docInfoHandlers)("menuItems",a._menuItems())}}function X(m,x){1&m&&(l.j41(0,"cue-flexcontainer",5)(1,"cue-typography"),l.EFF(2,"Loading\u2026"),l.k0s()())}function e(m,x){if(1&m&&(l.j41(0,"cue-flexcontainer",5)(1,"cue-typography",8),l.EFF(2),l.k0s()()),2&m){const a=l.XpG(2);l.R7$(2),l.JRh(a.errorMessage())}}function W(m,x){if(1&m&&l.nrm(0,"cue-logo-link",7),2&m){const a=l.XpG(2);l.Y8G("projectId",a.projectId())("resourceId",a._uuidOnly())}}function H(m,x){if(1&m&&(l.j41(0,"div",3),l.nVh(1,O,1,3,"cue-document-info",4),l.nVh(2,X,3,0,"cue-flexcontainer",5)(3,e,3,1,"cue-flexcontainer",5),l.j41(4,"div",6),l.eu8(5,null,1),l.k0s(),l.nVh(7,W,1,2,"cue-logo-link",7),l.k0s()),2&m){const a=l.XpG();l.R7$(),l.vxM(a.showDocumentInfo()&&"ready"===a.state()?1:-1),l.R7$(),l.vxM("loading"===a.state()?2:"error"===a.state()?3:-1),l.R7$(5),l.vxM(a.showLogo()?7:-1)}}function z(m,x){1&m&&l.eu8(0)}function Y(m,x){if(1&m&&(l.j41(0,"cue-card",2),l.DNE(1,z,1,0,"ng-container",9),l.k0s()),2&m){const a=l.XpG(),d=l.sdS(1);l.Y8G("variant",a._cardVariant())("padded",!0),l.R7$(),l.Y8G("ngTemplateOutlet",d)}}function J(m,x){1&m&&l.eu8(0)}function Q(m,x){if(1&m&&l.DNE(0,J,1,0,"ng-container",9),2&m){l.XpG();const a=l.sdS(1);l.Y8G("ngTemplateOutlet",a)}}const K=[".ifc",".dxf",".pdf",".png",".jpg",".jpeg",".svg",".gif",".webp",".bmp",".avif",".apng",".xlsx",".xls",".csv",".json",".jsonld",".xml",".css",".js",".html",".htm",".sh",".txt",".rst",".md"];let ee=(()=>{class m{set _viewerHostRef(a){if(this._viewerHost=a,a&&this._lastRenderArgs){const{url:d,suffix:g,page:s,viewerTypeOverride:c}=this._lastRenderArgs;this._renderViewer(d,g,s,c)}}_viewerHost;_lastRenderArgs;currentViewerRef;cue=(0,f.hFB)(void 0);uuid=(0,f.hFB)(void 0);projectId=(0,f.hFB)(void 0);showDocumentInfo=(0,f.hFB)(!0,{transform:f.L39});showLogo=(0,f.hFB)(!1,{transform:f.L39});_uuidOnly=(0,y.EW)(()=>{const a=this.uuid();return a?a.split("?")[0].trim():void 0});extraMenuItems=(0,f.hFB)([]);portalBaseURL=(0,f.hFB)("https://cue.qaecy.com");variant=(0,f.hFB)("none");_cardVariant=(0,y.EW)(()=>this.variant());state=(0,h.vPA)("idle");errorMessage=(0,h.vPA)(null);resolvedUrl=(0,h.vPA)(null);resolvedSuffix=(0,h.vPA)(null);_docSubject=(0,h.vPA)("");_alternatives=(0,h.vPA)([]);_originalUuid=(0,h.vPA)(null);_originalDocSuffix=(0,h.vPA)(null);_cueSnapshot=null;_projectIdSnapshot=null;_inputWarningTimer;_blobUrls=new Set;_docInfoHandlers=new $;_menuItems=(0,y.EW)(()=>{const a=[],d=this._originalUuid(),g=this._originalDocSuffix();d&&g&&a.push({icon:"download",label:"Download file",action:()=>this._downloadOriginal()});const s=this._alternatives();if(s.length>1){const c=this.resolvedSuffix();a.push({icon:"document",label:"Alternative representation",children:s.map(p=>({label:p.original?`Original (${p.suffix.replace(".","").toUpperCase()})`:p.suffix.replace(".","").toUpperCase(),tooltip:c===p.suffix?"Currently shown":void 0,action:()=>this._switchToAlternative(p)}))})}return a.push(...this.extraMenuItems()),a});constructor(){this._inputWarningTimer=setTimeout(()=>{this.cue()||console.warn('[cue-document-viewer] Required input "cue" is not set. Pass an authenticated Cue SDK instance.'),this.uuid()||console.warn('[cue-document-viewer] Required input "uuid" is not set. Pass the document UUID to display.'),this.projectId()||console.warn('[cue-document-viewer] Required input "projectId" is not set. Pass the Cue project ID the document belongs to.')},3e3),(0,h.QZP)(()=>{const a=this.cue(),d=this.uuid(),g=this.projectId();a&&d&&g?this._load(a,d,g):this.state.set("idle")})}ngOnDestroy(){clearTimeout(this._inputWarningTimer),this._blobUrls.forEach(a=>URL.revokeObjectURL(a))}_load(a,d,g){var s=this;return(0,M.A)(function*(){if(a&&d&&g){s.state.set("loading"),s.resolvedUrl.set(null),s.resolvedSuffix.set(null),s.errorMessage.set(null),s._docSubject.set(""),s._originalUuid.set(null),s._originalDocSuffix.set(null),s._alternatives.set([]),s._viewerHost?.clear(),s.currentViewerRef?.destroy(),s.currentViewerRef=void 0,s._lastRenderArgs=void 0;try{s._cueSnapshot=a,s._projectIdSnapshot=g;const{uuid:c,page:p}=function Z(m){const[x,a]=m.split("?"),d=x.trim();let g=null;if(a){const c=new URLSearchParams(a).get("page");if(null!==c){const p=parseInt(c,10);!isNaN(p)&&p>0&&(g=p)}}return{uuid:d,page:g}}(d),P=a.createProjectDocuments(g),D=(yield P.fetchDocumentData([c]))[c];if(!D)throw new Error(`Document '${c}' not found in project '${g}'.`);s._docSubject.set(D.subject??""),s._originalUuid.set(c),s._originalDocSuffix.set(D.suffix);const L=yield P.fetchAlternativeRepresentations(c);s._alternatives.set([{uuid:c,suffix:D.suffix,original:!0},...L.filter(E=>E.id!==c).map(E=>({uuid:E.id,suffix:E.suffix,original:!1,remoteRelativePath:E.remoteRelativePath}))]);const{uuid:te,suffix:F,remoteRelativePath:N}=function q(m,x){const a=[m,...x];let d,g=1/0;for(const s of a){const c=K.indexOf(s.suffix);-1!==c&&c<g&&(g=c,d=s)}return d?{uuid:d.id,suffix:d.suffix,remoteRelativePath:d.remoteRelativePath}:{uuid:m.id,suffix:m.suffix}}(D,L),A=N?yield s._toBlobUrl(a,a.storage.getAltRepDownloadUrl(N),g):yield s._toBlobUrl(a,a.storage.getDownloadUrl(g,te,F),g);s.resolvedUrl.set(A),s.resolvedSuffix.set(F);const ne=[".eml",".msg",".emlx",".mbx"].includes(D.suffix)&&".json"===F?"email":void 0;yield s._renderViewer(A,F,p,ne),s.state.set("ready")}catch(c){const p=c instanceof Error?c.message:String(c);console.error("[CueDocumentViewerWC] Failed to load document:",p),s.errorMessage.set(p),s.state.set("error")}}else s.state.set("idle")})()}_toBlobUrl(a,d,g){var s=this;return(0,M.A)(function*(){const c=yield a.auth.authenticatedFetch(d,{headers:{"cue-project-id":g}});if(!c.ok)throw new Error(`Failed to fetch document: ${c.status} ${c.statusText}`);const p=URL.createObjectURL(yield c.blob());return s._blobUrls.add(p),p})()}_renderViewer(a,d,g,s){var c=this;return(0,M.A)(function*(){try{const{DocumentViewer:p}=yield Promise.all([u.e(2076),u.e(3036)]).then(u.bind(u,43036)),{DocumentViewerSettings:P}=yield u.e(2076).then(u.bind(u,43418));c._viewerHost?.clear(),c.currentViewerRef?.destroy();const R=new P;if(null!==g&&(R.pdf.page=String(g)),!c._viewerHost)throw new Error("viewerHost is not yet available \u2014 view has not been initialized.");c._lastRenderArgs={url:a,suffix:d,page:g,viewerTypeOverride:s},c.currentViewerRef=c._viewerHost.createComponent(p),c.currentViewerRef.setInput("url",a),c.currentViewerRef.setInput("suffix",d),c.currentViewerRef.setInput("settings",R),s&&c.currentViewerRef.setInput("viewerTypeOverride",s)}catch(p){throw new Error(`Failed to load viewer component: ${p instanceof Error?p.message:String(p)}`)}})()}_switchToAlternative(a){var d=this;return(0,M.A)(function*(){const g=d._cueSnapshot,s=d._projectIdSnapshot;if(g&&s)try{const c=a.remoteRelativePath?yield d._toBlobUrl(g,g.storage.getAltRepDownloadUrl(a.remoteRelativePath),s):yield d._toBlobUrl(g,g.storage.getDownloadUrl(s,a.uuid,a.suffix),s);d.resolvedUrl.set(c),d.resolvedSuffix.set(a.suffix),yield d._renderViewer(c,a.suffix,null)}catch(c){console.error("[CueDocumentViewerWC] Failed to switch to alternative:",c)}})()}_downloadOriginal(){var a=this;return(0,M.A)(function*(){const d=a._cueSnapshot,g=a._projectIdSnapshot,s=a._originalUuid(),c=a._originalDocSuffix();if(d&&g&&s&&c)try{const p=yield d.storage.downloadBlob(g,s,c);(0,S.KE)(p,`${s}${c}`)}catch(p){console.error("[CueDocumentViewerWC] Failed to download original:",p)}})()}static \u0275fac=function(d){return new(d||m)};static \u0275cmp=l.VBU({type:m,selectors:[["cue-document-viewer-wc"]],viewQuery:function(d,g){if(1&d&&l.GBs(w,5,l.c1b),2&d){let s;l.mGM(s=l.lsd())&&(g._viewerHostRef=s.first)}},inputs:{cue:[1,"cue"],uuid:[1,"uuid"],projectId:[1,"projectId"],showDocumentInfo:[1,"showDocumentInfo"],showLogo:[1,"showLogo"],extraMenuItems:[1,"extraMenuItems"],portalBaseURL:[1,"portalBaseURL"],variant:[1,"variant"]},decls:4,vars:1,consts:[["body",""],["viewerHost",""],[2,"height","100%","width","100%",3,"variant","padded"],[2,"display","flex","flex-direction","column","height","100%","width","100%","position","relative"],[3,"subject","handlers","menuItems"],["direction","column","align","center","justify","center",2,"flex","1","width","100%"],[2,"flex","1","min-height","0","overflow","hidden"],[2,"position","absolute","bottom","12px","right","12px","z-index","5",3,"projectId","resourceId"],[2,"color","#c44","font-size","13px"],[4,"ngTemplateOutlet"]],template:function(d,g){1&d&&(l.DNE(0,H,8,3,"ng-template",null,0,l.C5r),l.nVh(2,Y,2,3,"cue-card",2)(3,Q,1,1,"ng-container")),2&d&&(l.R7$(2),l.vxM("none"!==g.variant()?2:3))},dependencies:[V.MD,V.T3,G.FlexContainer,I.Typography,j.G,T.Card,U.x],styles:["[_nghost-%COMP%]{display:contents}"],changeDetection:0})}return m})()}}]);
1
+ "use strict";(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[7727],{74631(se,B,u){u.d(B,{G:()=>ue});var M=u(10467),f=u(17705),y=u(32271),h=u(85802),l=u(35381),V=u(86117),G=u(8547),I=u(13319),T=u(85971),j=u(42245),$=u(31024),S=u(89421),U=u(55794),w=u(59352),O=u(77573),X=u(49769),e=u(35547);const W=(o,C)=>t=>t.isHighlight;function H(o,C){if(1&o&&(e.j41(0,"span",3),e.EFF(1),e.k0s()),2&o){const t=e.XpG(2).$implicit;e.R7$(),e.JRh(t.highlight.label)}}function z(o,C){if(1&o){const t=e.RV6();e.j41(0,"cue-button",5),e.bIt("click",function(i){h.eBV(t);const r=e.XpG(2).$implicit,v=e.XpG();return h.Njj(v.onDeleteHighlight(i,r.highlight))}),e.nrm(1,"cue-button-icon",6),e.k0s()}}function Y(o,C){if(1&o){const t=e.RV6();e.j41(0,"span",2),e.bIt("click",function(){h.eBV(t);const i=e.XpG().$implicit,r=e.XpG();return h.Njj(r.onHighlightClick(i.highlight))}),e.nVh(1,H,2,1,"span",3),e.EFF(2),e.nVh(3,z,2,0,"cue-button",4),e.k0s()}if(2&o){const t=e.XpG().$implicit,n=e.XpG();e.BMQ("data-segment-start",t.segmentStart),e.R7$(),e.vxM(t.highlight.label?1:-1),e.R7$(),e.SpI(" ",t.text," "),e.R7$(),e.vxM(n.allowDelete()?3:-1)}}function J(o,C){if(1&o&&(e.j41(0,"span"),e.EFF(1),e.k0s()),2&o){const t=e.XpG().$implicit;e.BMQ("data-segment-start",t.segmentStart),e.R7$(),e.JRh(t.text)}}function Q(o,C){if(1&o&&e.nVh(0,Y,4,4,"span",1)(1,J,2,2,"span"),2&o){const t=C.$implicit;e.vxM(t.isHighlight&&t.highlight?0:1)}}let K=(()=>{class o{path=f.hFB.required();highlights=(0,f.hFB)([]);allowDelete=(0,f.hFB)(!1);allowAdd=(0,f.hFB)(!1);size=(0,f.hFB)("m");highlightClick=(0,f.CGW)();deleteHighlight=(0,f.CGW)();textSelected=(0,f.CGW)();segments=(0,y.EW)(()=>this.parseSegments(this.path(),this.highlights()));parseSegments(t,n){const i=n.filter(_=>_.path===t);if(0===i.length)return[{text:t,isHighlight:!1,segmentStart:0}];const r=[...i].sort((_,ie)=>_.start-ie.start),v=[];let b=0;for(const _ of r)_.start>b&&v.push({text:t.substring(b,_.start),isHighlight:!1,segmentStart:b}),v.push({text:t.substring(_.start,_.end),isHighlight:!0,highlight:_,segmentStart:_.start}),b=_.end;return b<t.length&&v.push({text:t.substring(b),isHighlight:!1,segmentStart:b}),v}onHighlightClick(t){const n=this.path().substring(t.start,t.end);this.highlightClick.emit({path:this.path(),highlight:t,text:n})}onDeleteHighlight(t,n){t.stopPropagation(),this.deleteHighlight.emit({path:this.path(),highlight:n})}onMouseUp(t){if(!this.allowAdd())return;const n=window.getSelection();if(!n||n.isCollapsed||!n.rangeCount||!n.toString().trim())return;const r=n.getRangeAt(0),v=t.currentTarget,b=this.getAbsoluteOffset(v,r.startContainer,r.startOffset),_=this.getAbsoluteOffset(v,r.endContainer,r.endOffset);n.removeAllRanges(),_>b&&this.textSelected.emit({path:this.path(),start:b,end:_,text:this.path().substring(b,_)})}getAbsoluteOffset(t,n,i){let r=n.nodeType===Node.TEXT_NODE?n.parentElement:n;for(;r&&r!==t;){if(r instanceof HTMLElement&&r.hasAttribute("data-segment-start")){const ie=parseInt(r.getAttribute("data-segment-start"),10);let ae=0;const le=document.createTreeWalker(r,NodeFilter.SHOW_TEXT);let k=le.nextNode();for(;k&&k!==n;)ae+=k.textContent?.length??0,k=le.nextNode();return ie+ae+i}r=r.parentElement}const v=document.createTreeWalker(t,NodeFilter.SHOW_TEXT);let b=0,_=v.nextNode();for(;_&&_!==n;)b+=_.textContent?.length??0,_=v.nextNode();return b+i}static \u0275fac=function(n){return new(n||o)};static \u0275cmp=e.VBU({type:o,selectors:[["cue-file-path-viewer"]],inputs:{path:[1,"path"],highlights:[1,"highlights"],allowDelete:[1,"allowDelete"],allowAdd:[1,"allowAdd"],size:[1,"size"]},outputs:{highlightClick:"highlightClick",deleteHighlight:"deleteHighlight",textSelected:"textSelected"},decls:3,vars:7,consts:[[1,"path-content",3,"mouseup"],[1,"highlight-segment"],[1,"highlight-segment",3,"click"],[1,"highlight-label"],["size","xs","aria-label","Remove highlight",1,"delete-button"],["size","xs","aria-label","Remove highlight",1,"delete-button",3,"click"],["icon","close"]],template:function(n,i){1&n&&(e.j41(0,"div",0),e.bIt("mouseup",function(v){return i.onMouseUp(v)}),e.Z7z(1,Q,2,1,null,null,e.Vm6),e.k0s()),2&n&&(e.AVh("size-s","s"===i.size())("allow-add",i.allowAdd())("has-highlights",i.segments().some(e._m7(6,W,i))),e.R7$(),e.Dyx(i.segments()))},dependencies:[X.MD,T.Button,I.ButtonIcon],styles:["[_nghost-%COMP%]{display:contents}.path-content[_ngcontent-%COMP%]{display:block;flex:1;min-width:0;word-break:break-all;text-align:start;font-family:var(--cue-font-family);font-size:var(--cue-font-m-size);line-height:var(--cue-font-m-line-height);letter-spacing:var(--cue-font-m-letter-spacing);font-weight:var(--cue-font-weight-regular)}.path-content.size-s[_ngcontent-%COMP%]{font-size:var(--cue-font-s-size);line-height:var(--cue-font-s-line-height);letter-spacing:var(--cue-font-s-letter-spacing)}.path-content.allow-add[_ngcontent-%COMP%]{cursor:text;-webkit-user-select:text;user-select:text}.path-content.has-highlights[_ngcontent-%COMP%]{padding-top:.8rem;line-height:2.3rem}.highlight-segment[_ngcontent-%COMP%]{display:inline-block;vertical-align:text-bottom;position:relative;line-height:normal;font-weight:var(--cue-font-weight-medium);cursor:pointer;padding:0 .2rem;border-radius:3px;border:1px solid currentColor;transition:all .2s ease}.highlight-segment[_ngcontent-%COMP%] .highlight-label[_ngcontent-%COMP%]{font-family:var(--cue-font-family);position:absolute;bottom:100%;left:0;font-size:.5rem;line-height:1;opacity:.7;margin-bottom:.15rem;white-space:nowrap;pointer-events:none}.highlight-segment[_ngcontent-%COMP%] .delete-button[_ngcontent-%COMP%]{position:absolute;top:-12px;right:-12px;z-index:10;opacity:0;transition:opacity .2s ease;pointer-events:none}.highlight-segment[_ngcontent-%COMP%]:hover{background:color-mix(in srgb,currentColor 12%,transparent)}.highlight-segment[_ngcontent-%COMP%]:hover .delete-button[_ngcontent-%COMP%]{opacity:1;pointer-events:all}"],changeDetection:0})}return o})();var Z=u(75448),q=u(70063),ee=u(59695),m=u(21331),x=u(19682);const a=o=>({count:o}),d=(o,C)=>t=>t.iri;function g(o,C){1&o&&(e.j41(0,"cue-typography",11),e.EFF(1),e.nI1(2,"transloco"),e.k0s()),2&o&&(e.R7$(),e.JRh(e.bMT(2,1,"components.documentInfo.infoLoadingFilePaths")))}function s(o,C){if(1&o){const t=e.RV6();e.j41(0,"cue-ag-grid",16),e.bIt("selectedRows",function(i){h.eBV(t);const r=e.XpG(4);return h.Njj(r.onMatchedPathsSelectionChange(i))}),e.k0s()}if(2&o){const t=e.XpG(4);e.Y8G("rowData",t._matchTableRowData())("columnDefs",t._matchTableColDefs())("rowSelection",t._matchTableRowSelection)}}function c(o,C){if(1&o){const t=e.RV6();e.j41(0,"cue-flexcontainer",12)(1,"cue-button",13),e.bIt("click",function(){h.eBV(t);const i=e.XpG(3);return h.Njj(i._matchTableExpanded.set(!i._matchTableExpanded()))}),e.nrm(2,"cue-button-icon",14),e.j41(3,"cue-button-label"),e.EFF(4),e.nI1(5,"transloco"),e.k0s()(),e.nVh(6,s,1,3,"cue-ag-grid",15),e.k0s(),e.j41(7,"cue-typography",11),e.EFF(8),e.nI1(9,"transloco"),e.k0s()}if(2&o){const t=e.XpG(3);e.R7$(2),e.Y8G("icon",t._matchTableExpanded()?"arrow-up":"arrow-dropdown"),e.R7$(2),e.JRh(e.i5U(5,4,1===t._matchCount()?"components.documentInfo.filePathMatched":"components.documentInfo.filePathsMatched",e.eq3(10,a,t._matchCount()))),e.R7$(2),e.vxM(t._matchTableExpanded()?6:-1),e.R7$(2),e.JRh(e.i5U(9,7,"components.documentInfo.applyToNPaths",e.eq3(12,a,t._selectedPaths().length)))}}function p(o,C){if(1&o&&e.nVh(0,g,3,3,"cue-typography",11)(1,c,10,14),2&o){const t=e.XpG(2);e.vxM(t._fileLocationsLoading()?0:null!==t._fileLocations()?1:-1)}}function P(o,C){if(1&o){const t=e.RV6();e.j41(0,"cue-flexcontainer",9)(1,"cue-input-switch",10),e.bIt("toggleChange",function(i){h.eBV(t);const r=e.XpG();return h.Njj(r.onApplyToAllChange(i))}),e.k0s(),e.j41(2,"cue-typography",11),e.EFF(3),e.nI1(4,"transloco"),e.k0s()(),e.nVh(5,p,2,1)}if(2&o){const t=e.XpG();e.R7$(),e.Y8G("checked",t._applyToAllFiles()),e.R7$(2),e.JRh(e.bMT(4,3,"components.documentInfo.applyToAllFiles")),e.R7$(2),e.vxM(t._applyToAllFiles()?5:-1)}}function R(o,C){if(1&o&&(e.j41(0,"cue-typography",8),e.EFF(1),e.nI1(2,"transloco"),e.k0s()),2&o){const t=e.XpG();e.R7$(),e.Lme("",e.bMT(2,2,"components.documentInfo.errorSavingEntityMention"),": ",t._saveError())}}let D=(()=>{class o{selection=f.hFB.required();availableEntityCategories=(0,f.hFB)([]);fileLocations=(0,f.hFB)([]);requestFileLocations=(0,f.hFB)(void 0);requestFilePathEntityAdd=(0,f.hFB)(void 0);confirm=(0,f.CGW)();cancel=(0,f.CGW)();_selectedEntityCategory=(0,h.vPA)("");_applyToAllFiles=(0,h.vPA)(!1);_fileLocations=(0,h.vPA)(null);_fileLocationsLoading=(0,h.vPA)(!1);_matchTableExpanded=(0,h.vPA)(!1);_selectedPaths=(0,h.vPA)([]);_saving=(0,h.vPA)(!1);_saveError=(0,h.vPA)(null);_dirPrefix=(0,y.EW)(()=>{const t=this.selection();return t.path.substring(0,t.end)});_matchedLocations=(0,y.EW)(()=>{const t=this._fileLocations();if(!t)return[];const n=this._dirPrefix();return t.filter(i=>i.path.startsWith(n))});_matchCount=(0,y.EW)(()=>this._matchedLocations().length);_matchTableRowData=(0,y.EW)(()=>this._matchedLocations().map(t=>({iri:t.iri,path:t.path,providerId:t.providerId})));_entityCategoryLabelMap=(0,y.EW)(()=>this.availableEntityCategories().reduce((t,n)=>(t[n.iri]=n.label,t),{}));_matchTableRowSelection={mode:"multiRow",selectAll:"filtered"};_filePathLabel=(0,w.Xx)("components.contentBlocks.documentViewer.labelFilePath");_matchTableColDefs=(0,y.EW)(()=>[{headerName:this._filePathLabel(),field:"path",flex:1,filter:!0,sortable:!0}]);onEntityCategoryChange(t){this._selectedEntityCategory.set("string"==typeof t?t:String(t??""))}onApplyToAllChange(t){var n=this;return(0,M.A)(function*(){if(n._applyToAllFiles.set(t),n._matchTableExpanded.set(!1),!t)return n._fileLocations.set(null),void n._selectedPaths.set([]);const i=n.requestFileLocations();if(i){n._fileLocationsLoading.set(!0);try{const r=yield i();n._fileLocations.set(r);const v=n._dirPrefix();n._selectedPaths.set(r.filter(b=>b.path.startsWith(v)))}finally{n._fileLocationsLoading.set(!1)}}})()}onMatchedPathsSelectionChange(t){const n=this._fileLocations()??[];this._selectedPaths.set(t.map(i=>n.find(r=>r.path===i.path)??{iri:"",path:i.path}))}onConfirm(){var t=this;return(0,M.A)(function*(){const n=t._selectedEntityCategory();if(!n)return;const i=t.selection().path,r=t._fileLocations()?.find(_=>_.path===i)??t.fileLocations().find(_=>_.path===i)??{iri:"",path:i},v=t._applyToAllFiles()&&t._selectedPaths().length>0?t._selectedPaths():[r],b=t.requestFilePathEntityAdd();if(b){t._saving.set(!0),t._saveError.set(null);try{yield b(n,v)}catch(_){return console.error("[EntityMentionModal] Failed to save entity mention:",_),t._saveError.set(_ instanceof Error?_.message:String(_)),void t._saving.set(!1)}t._saving.set(!1)}t.confirm.emit({entityCategory:n,paths:v})})()}onCancel(){this.cancel.emit()}static \u0275fac=function(n){return new(n||o)};static \u0275cmp=e.VBU({type:o,selectors:[["cue-entity-mention-modal"]],inputs:{selection:[1,"selection"],availableEntityCategories:[1,"availableEntityCategories"],fileLocations:[1,"fileLocations"],requestFileLocations:[1,"requestFileLocations"],requestFilePathEntityAdd:[1,"requestFilePathEntityAdd"]},outputs:{confirm:"confirm",cancel:"cancel"},decls:18,vars:24,consts:[[3,"close","displayCloseBtn","closeOnBackgroundClick"],[1,"modal-content"],["direction","column","gap","m"],[3,"key","val"],[3,"valueChange","value","options","labelMap","label","showFilter"],["direction","row","justify","center"],[3,"click","disabled"],["variant","secondary",3,"click","disabled"],["size","s",2,"color","var(--cue-error)"],["direction","row","gap","s","align","center"],[3,"toggleChange","checked"],["size","s"],["direction","column","gap","xs"],["variant","ghost","size","xs",3,"click"],[3,"icon"],["size","s","height","220px",3,"rowData","columnDefs","rowSelection"],["size","s","height","220px",3,"selectedRows","rowData","columnDefs","rowSelection"]],template:function(n,i){1&n&&(e.j41(0,"cue-modal",0),e.bIt("close",function(){return i.onCancel()}),e.j41(1,"div",1)(2,"cue-flexcontainer",2),e.nrm(3,"cue-key-val",3),e.nI1(4,"transloco"),e.j41(5,"cue-select",4),e.nI1(6,"transloco"),e.bIt("valueChange",function(v){return i.onEntityCategoryChange(v)}),e.k0s(),e.nVh(7,P,6,5),e.j41(8,"cue-flexcontainer",5)(9,"cue-button",6),e.bIt("click",function(){return i.onCancel()}),e.j41(10,"cue-button-label"),e.EFF(11),e.nI1(12,"transloco"),e.k0s()(),e.j41(13,"cue-button",7),e.bIt("click",function(){return i.onConfirm()}),e.j41(14,"cue-button-label"),e.EFF(15),e.nI1(16,"transloco"),e.k0s()()(),e.nVh(17,R,3,4,"cue-typography",8),e.k0s()()()),2&n&&(e.Y8G("displayCloseBtn",!1)("closeOnBackgroundClick",!1),e.R7$(3),e.Y8G("key",e.bMT(4,15,"components.documentInfo.labelSelectedText"))("val",i.selection().text),e.R7$(2),e.Y8G("value",i._selectedEntityCategory())("options",i.availableEntityCategories().map(e._m7(17,d,i)))("labelMap",i._entityCategoryLabelMap())("label",e.bMT(6,18,"components.entityInfo.labelEntityCategory"))("showFilter",i.availableEntityCategories().length>5),e.R7$(2),e.vxM(i.requestFileLocations()?7:-1),e.R7$(2),e.Y8G("disabled",i._saving()),e.R7$(2),e.JRh(e.bMT(12,20,"components.modals.rdfEdit.buttonCancel")),e.R7$(2),e.Y8G("disabled",!i._selectedEntityCategory()||i._saving()),e.R7$(2),e.JRh(e.bMT(16,22,"components.modals.rdfEdit.buttonSave")),e.R7$(2),e.vxM(i._saveError()?17:-1))},dependencies:[l.FlexContainer,S.F,I.ButtonIcon,T.Button,Z.ButtonLabel,j.Typography,m.a,q.Select,ee.Switch,x.R,w.Kj],styles:[".modal-content[_ngcontent-%COMP%]{width:640px;max-width:calc(100vw - 32px)}"],changeDetection:0})}return o})();const L=()=>[];function te(o,C){if(1&o&&(e.nrm(0,"cue-key-val",6),e.nI1(1,"transloco")),2&o){const t=e.XpG(2);e.Y8G("key",e.bMT(1,2,"components.contentBlocks.documentViewer.labelSubject"))("val",t.subject())}}function F(o,C){if(1&o&&(e.j41(0,"cue-key-val-list"),e.nVh(1,te,2,4,"cue-key-val",6),e.k0s()),2&o){const t=e.XpG();e.R7$(),e.vxM(t.subject()?1:-1)}}function N(o,C){if(1&o&&(e.j41(0,"cue-flexcontainer",4)(1,"cue-menu",7)(2,"cue-button",8,0),e.nrm(4,"cue-button-icon",9),e.k0s(),e.nrm(5,"cue-menu-nested",10),e.k0s()()),2&o){const t=e.XpG();e.R7$(5),e.Y8G("items",t.menuItems())}}function A(o,C){if(1&o&&(e.nrm(0,"cue-key-val-editable",11),e.nI1(1,"transloco"),e.nI1(2,"transloco")),2&o){const t=e.XpG(2);e.Y8G("key",1===t.contentCategories().length?e.bMT(1,4,"components.contentBlocks.documentViewer.labelContentCategory"):e.bMT(2,6,"components.contentBlocks.documentViewer.labelContentCategories"))("val",t.contentCategoriesString())("rdfConfig",t.rdfEditConfig())("editDisabled",!t.contentCategoriesEditable())}}function oe(o,C){if(1&o&&(e.j41(0,"span",15),e.EFF(1),e.k0s()),2&o){const t=e.XpG(3);e.R7$(),e.Lme("(",t.currentFilePathIndex()+1,"/",t.fileLocations().length,")")}}function ne(o,C){if(1&o){const t=e.RV6();e.j41(0,"cue-button",19),e.bIt("click",function(){h.eBV(t);const i=e.XpG(3);return h.Njj(i.prevFilePath())}),e.nrm(1,"cue-button-icon",20),e.k0s()}if(2&o){const t=e.XpG(3);e.Y8G("disabled",0===t.currentFilePathIndex())}}function E(o,C){if(1&o){const t=e.RV6();e.j41(0,"cue-button",19),e.bIt("click",function(){h.eBV(t);const i=e.XpG(3);return h.Njj(i.nextFilePath())}),e.nrm(1,"cue-button-icon",21),e.k0s()}if(2&o){const t=e.XpG(3);e.Y8G("disabled",t.currentFilePathIndex()===t.fileLocations().length-1)}}function re(o,C){if(1&o){const t=e.RV6();e.j41(0,"dl",12)(1,"dt",13)(2,"cue-typography",14),e.EFF(3),e.nI1(4,"transloco"),e.nVh(5,oe,2,2,"span",15),e.k0s()(),e.j41(6,"dd",16),e.nVh(7,ne,2,1,"cue-button",17),e.j41(8,"cue-file-path-viewer",18),e.bIt("textSelected",function(i){h.eBV(t);const r=e.XpG(2);return h.Njj(r.onTextSelected(i))}),e.k0s(),e.nVh(9,E,2,1,"cue-button",17),e.k0s()()}if(2&o){const t=e.XpG(2);e.R7$(3),e.SpI(" ",e.bMT(4,8,"components.contentBlocks.documentViewer.labelFilePath")," "),e.R7$(2),e.vxM(t.fileLocations().length>1?5:-1),e.R7$(2),e.vxM(t.fileLocations().length>1?7:-1),e.R7$(),e.Y8G("path",t.fileLocations()[t.currentFilePathIndex()].path)("highlights",t.filePathEntitiesVisible()?t.filePathHighlights():e.lJ4(10,L))("allowDelete",t.filePathEntitiesEditable())("allowAdd",t.filePathEntitiesEditable()),e.R7$(),e.vxM(t.fileLocations().length>1?9:-1)}}function ce(o,C){if(1&o&&(e.j41(0,"cue-key-val-list"),e.nrm(1,"hr"),e.nVh(2,A,3,8,"cue-key-val-editable",11),e.nVh(3,re,10,11,"dl",12),e.k0s()),2&o){const t=e.XpG();e.R7$(2),e.vxM(t.contentCategories()&&t.contentCategories().length>0?2:-1),e.R7$(),e.vxM(t.fileLocations().length>0?3:-1)}}function de(o,C){if(1&o){const t=e.RV6();e.j41(0,"cue-entity-mention-modal",22),e.bIt("confirm",function(i){h.eBV(t);const r=e.XpG();return h.Njj(r.onEntityMentionConfirm(i))})("cancel",function(){h.eBV(t);const i=e.XpG();return h.Njj(i.onEntityMentionCancel())}),e.k0s()}if(2&o){const t=e.XpG();e.Y8G("selection",t._pendingSelection())("availableEntityCategories",t.availableEntityCategories())("fileLocations",t.fileLocations())("requestFileLocations",t._fileLocationsProvider())("requestFilePathEntityAdd",t._requestFilePathEntityAdd())}}let ue=(()=>{class o{subject=f.hFB.required();handlers=f.hFB.required();dataChanged=(0,f.CGW)();filePathEntityAdded=(0,f.CGW)();fileLocations=(0,f.hFB)([]);_fileLocationsProvider=(0,y.EW)(()=>{const t=this.handlers().requestFileLocations;if(t)return t;const n=this.fileLocations();return n.length?()=>Promise.resolve(n):void 0});filePathEntities=(0,f.geq)([]);contentCategories=(0,f.hFB)([]);contentCategoriesEditable=(0,f.hFB)(!1);filePathEntitiesVisible=(0,f.hFB)(!1);filePathEntitiesEditable=(0,f.hFB)(!1);menuItems=(0,f.hFB)([]);availableContentCategories=(0,f.hFB)([]);availableEntityCategories=(0,f.hFB)([]);collapsed=(0,f.hFB)(!1);hasDocInfo=(0,y.EW)(()=>{const t=""!==this.subject(),n=this.fileLocations().length>0;return t||n});currentFilePathIndex=(0,h.vPA)(0);_entityCategoryModalVisible=(0,h.vPA)(!1);_pendingSelection=(0,h.vPA)(null);_requestFilePathEntityAdd=(0,y.EW)(()=>{var t=this;const n=this.handlers().requestFilePathEntityAdd;if(n)return function(){var i=(0,M.A)(function*(r,v){const b=t._pendingSelection();b&&(yield n({paths:v,start:b.start,end:b.end,text:b.text,entityCategory:r,folderPath:b.path.substring(0,b.end)}))});return function(r,v){return i.apply(this,arguments)}}()});prevFilePath(){this.currentFilePathIndex()>0&&this.currentFilePathIndex.update(t=>t-1)}nextFilePath(){this.currentFilePathIndex()<this.fileLocations().length-1&&this.currentFilePathIndex.update(t=>t+1)}filePathHighlights=(0,y.EW)(()=>this.filePathEntities().map(t=>({path:t.path,start:t.startIndex,end:t.endIndex,label:this.availableEntityCategories().find(n=>n.iri===t.entityCategory)?.label??t.entityCategory.split("/").pop()??t.entityCategory})));entityCategoryLabelMap=(0,y.EW)(()=>this.availableEntityCategories().reduce((t,n)=>(t[n.iri]=n.label,t),{}));onTextSelected(t){this._pendingSelection.set(t),this._entityCategoryModalVisible.set(!0)}onEntityMentionConfirm(t){const n=this._pendingSelection();n&&(this.filePathEntities.update(i=>[...i,...t.paths.map(r=>({path:r.path,entityCategory:t.entityCategory,startIndex:n.start,endIndex:n.end}))]),this.filePathEntityAdded.emit({paths:t.paths,start:n.start,end:n.end,text:n.text,entityCategory:t.entityCategory,folderPath:n.path.substring(0,n.end)}),this._entityCategoryModalVisible.set(!1),this._pendingSelection.set(null))}onEntityMentionCancel(){this._entityCategoryModalVisible.set(!1),this._pendingSelection.set(null)}_contentCategories=(0,y.uu)(()=>this.contentCategories());contentCategoriesString=(0,y.EW)(()=>this._contentCategories().map(t=>this._iriToString(t)).sort().join(", "));_iriToString(t){const n=this.availableContentCategories()?.find(i=>i.iri===t);return n?n.label:t}infoChangeContentCategory=(0,w.Xx)("components.documentInfo.infoChangeContentCategory");rdfEditConfig=(0,y.EW)(()=>{var t=this;const n=this.handlers()?.requestRDFChange;var i;if(void 0!==n)return{message:this.infoChangeContentCategory(),existingValue:this._contentCategories(),dataType:"multiselect",options:this.availableContentCategories()?.map(i=>i.iri),optionLabelMap:this.availableContentCategories()?.reduce((i,r)=>(i[r.iri]=r.label,i),{}),requestSave:(i=(0,M.A)(function*(r){console.log(r);const v={subject:t.subject(),predicate:`${O.E.qcy}contentCategory`,objects:t._contentCategories(),newObjects:r.newValue,type:"contentCategory",comment:r.comment};yield n(v),t._contentCategories.set(r.newValue),t.dataChanged.emit({contentCategories:r.newValue})}),function(v){return i.apply(this,arguments)})};console.warn("No RDF change request handler defined")});static \u0275fac=function(n){return new(n||o)};static \u0275cmp=e.VBU({type:o,selectors:[["cue-document-info"]],inputs:{subject:[1,"subject"],handlers:[1,"handlers"],fileLocations:[1,"fileLocations"],filePathEntities:[1,"filePathEntities"],contentCategories:[1,"contentCategories"],contentCategoriesEditable:[1,"contentCategoriesEditable"],filePathEntitiesVisible:[1,"filePathEntitiesVisible"],filePathEntitiesEditable:[1,"filePathEntitiesEditable"],menuItems:[1,"menuItems"],availableContentCategories:[1,"availableContentCategories"],availableEntityCategories:[1,"availableEntityCategories"],collapsed:[1,"collapsed"]},outputs:{dataChanged:"dataChanged",filePathEntityAdded:"filePathEntityAdded",filePathEntities:"filePathEntitiesChange"},decls:7,vars:4,consts:[["trigger",""],["direction","column",2,"min-height","50px"],["direction","row"],["direction","column",2,"flex","1 1"],["direction","column",2,"width","50px"],[3,"selection","availableEntityCategories","fileLocations","requestFileLocations","requestFilePathEntityAdd"],["size","l",3,"key","val"],["positioning","bottomleft"],["trigger","","variant","tertiary"],["icon","more-vert"],["menu","",3,"items"],["size","s",3,"key","val","rdfConfig","editDisabled"],[1,"file-path-nav-container"],[1,"file-path-label"],["size","xs"],[1,"path-counter"],[1,"file-path-row"],["variant","tertiary","size","xs",3,"disabled"],["size","s",3,"textSelected","path","highlights","allowDelete","allowAdd"],["variant","tertiary","size","xs",3,"click","disabled"],["icon","paginator-back"],["icon","paginator-next"],[3,"confirm","cancel","selection","availableEntityCategories","fileLocations","requestFileLocations","requestFilePathEntityAdd"]],template:function(n,i){1&n&&(e.j41(0,"cue-flexcontainer",1)(1,"cue-flexcontainer",2)(2,"cue-flexcontainer",3),e.nVh(3,F,2,1,"cue-key-val-list"),e.k0s(),e.nVh(4,N,6,1,"cue-flexcontainer",4),e.k0s(),e.nVh(5,ce,4,2,"cue-key-val-list"),e.k0s(),e.nVh(6,de,1,5,"cue-entity-mention-modal",5)),2&n&&(e.R7$(3),e.vxM(i.fileLocations().length>0||i.subject()?3:-1),e.R7$(),e.vxM(i.menuItems().length>0?4:-1),e.R7$(),e.vxM(!i.collapsed()&&i.hasDocInfo()?5:-1),e.R7$(),e.vxM(i._entityCategoryModalVisible()&&i._pendingSelection()?6:-1))},dependencies:[l.FlexContainer,$.p,S.F,U.L,V.W,G.T,I.ButtonIcon,T.Button,K,j.Typography,D,w.Kj],styles:[".file-path-nav-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2px}.file-path-label[_ngcontent-%COMP%]{display:block;margin:0}.file-path-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:4px;margin:0;overflow:visible;padding:1px}.file-path-row[_ngcontent-%COMP%] cue-file-path-viewer[_ngcontent-%COMP%]{flex:1;overflow:visible;min-width:0}.path-counter[_ngcontent-%COMP%]{opacity:.6}"],changeDetection:0})}return o})()},77727(se,B,u){u.d(B,{CueDocumentViewer:()=>ee});var M=u(10467),f=u(17705),y=u(32271),h=u(85802),l=u(35547),V=u(49769),G=u(35381),I=u(42245),T=u(65187),j=u(74631);class ${requestRDFChange;requestFileLocations;requestFilePathEntityAdd}var S=u(2065),U=u(57293);const w=["viewerHost"];function O(m,x){if(1&m&&l.nrm(0,"cue-document-info",4),2&m){const a=l.XpG(2);l.Y8G("subject",a._docSubject())("handlers",a._docInfoHandlers)("menuItems",a._menuItems())}}function X(m,x){1&m&&(l.j41(0,"cue-flexcontainer",5)(1,"cue-typography"),l.EFF(2,"Loading\u2026"),l.k0s()())}function e(m,x){if(1&m&&(l.j41(0,"cue-flexcontainer",5)(1,"cue-typography",8),l.EFF(2),l.k0s()()),2&m){const a=l.XpG(2);l.R7$(2),l.JRh(a.errorMessage())}}function W(m,x){if(1&m&&l.nrm(0,"cue-logo-link",7),2&m){const a=l.XpG(2);l.Y8G("projectId",a.projectId())("resourceId",a._uuidOnly())}}function H(m,x){if(1&m&&(l.j41(0,"div",3),l.nVh(1,O,1,3,"cue-document-info",4),l.nVh(2,X,3,0,"cue-flexcontainer",5)(3,e,3,1,"cue-flexcontainer",5),l.j41(4,"div",6),l.eu8(5,null,1),l.k0s(),l.nVh(7,W,1,2,"cue-logo-link",7),l.k0s()),2&m){const a=l.XpG();l.R7$(),l.vxM(a.showDocumentInfo()&&"ready"===a.state()?1:-1),l.R7$(),l.vxM("loading"===a.state()?2:"error"===a.state()?3:-1),l.R7$(5),l.vxM(a.showLogo()?7:-1)}}function z(m,x){1&m&&l.eu8(0)}function Y(m,x){if(1&m&&(l.j41(0,"cue-card",2),l.DNE(1,z,1,0,"ng-container",9),l.k0s()),2&m){const a=l.XpG(),d=l.sdS(1);l.Y8G("variant",a._cardVariant())("padded",!0),l.R7$(),l.Y8G("ngTemplateOutlet",d)}}function J(m,x){1&m&&l.eu8(0)}function Q(m,x){if(1&m&&l.DNE(0,J,1,0,"ng-container",9),2&m){l.XpG();const a=l.sdS(1);l.Y8G("ngTemplateOutlet",a)}}const K=[".ifc",".dxf",".pdf",".png",".jpg",".jpeg",".svg",".gif",".webp",".bmp",".avif",".apng",".xlsx",".xls",".csv",".json",".jsonld",".xml",".css",".js",".html",".htm",".sh",".txt",".rst",".md"];let ee=(()=>{class m{set _viewerHostRef(a){if(this._viewerHost=a,a&&this._lastRenderArgs){const{url:d,suffix:g,page:s,viewerTypeOverride:c}=this._lastRenderArgs;this._renderViewer(d,g,s,c)}}_viewerHost;_lastRenderArgs;currentViewerRef;cue=(0,f.hFB)(void 0);uuid=(0,f.hFB)(void 0);projectId=(0,f.hFB)(void 0);showDocumentInfo=(0,f.hFB)(!0,{transform:f.L39});showLogo=(0,f.hFB)(!1,{transform:f.L39});_uuidOnly=(0,y.EW)(()=>{const a=this.uuid();return a?a.split("?")[0].trim():void 0});extraMenuItems=(0,f.hFB)([]);portalBaseURL=(0,f.hFB)("https://cue.qaecy.com");variant=(0,f.hFB)("none");_cardVariant=(0,y.EW)(()=>this.variant());state=(0,h.vPA)("idle");errorMessage=(0,h.vPA)(null);resolvedUrl=(0,h.vPA)(null);resolvedSuffix=(0,h.vPA)(null);_docSubject=(0,h.vPA)("");_alternatives=(0,h.vPA)([]);_originalUuid=(0,h.vPA)(null);_originalDocSuffix=(0,h.vPA)(null);_cueSnapshot=null;_projectIdSnapshot=null;_inputWarningTimer;_blobUrls=new Set;_docInfoHandlers=new $;_menuItems=(0,y.EW)(()=>{const a=[],d=this._originalUuid(),g=this._originalDocSuffix();d&&g&&a.push({icon:"download",label:"Download file",action:()=>this._downloadOriginal()});const s=this._alternatives();if(s.length>1){const c=this.resolvedSuffix();a.push({icon:"document",label:"Alternative representation",children:s.map(p=>({label:p.original?`Original (${p.suffix.replace(".","").toUpperCase()})`:p.suffix.replace(".","").toUpperCase(),tooltip:c===p.suffix?"Currently shown":void 0,action:()=>this._switchToAlternative(p)}))})}return a.push(...this.extraMenuItems()),a});constructor(){this._inputWarningTimer=setTimeout(()=>{this.cue()||console.warn('[cue-document-viewer] Required input "cue" is not set. Pass an authenticated Cue SDK instance.'),this.uuid()||console.warn('[cue-document-viewer] Required input "uuid" is not set. Pass the document UUID to display.'),this.projectId()||console.warn('[cue-document-viewer] Required input "projectId" is not set. Pass the Cue project ID the document belongs to.')},3e3),(0,h.QZP)(()=>{const a=this.cue(),d=this.uuid(),g=this.projectId();a&&d&&g?this._load(a,d,g):this.state.set("idle")})}ngOnDestroy(){clearTimeout(this._inputWarningTimer),this._blobUrls.forEach(a=>URL.revokeObjectURL(a))}_load(a,d,g){var s=this;return(0,M.A)(function*(){if(a&&d&&g){s.state.set("loading"),s.resolvedUrl.set(null),s.resolvedSuffix.set(null),s.errorMessage.set(null),s._docSubject.set(""),s._originalUuid.set(null),s._originalDocSuffix.set(null),s._alternatives.set([]),s._viewerHost?.clear(),s.currentViewerRef?.destroy(),s.currentViewerRef=void 0,s._lastRenderArgs=void 0;try{s._cueSnapshot=a,s._projectIdSnapshot=g;const{uuid:c,page:p}=function Z(m){const[x,a]=m.split("?"),d=x.trim();let g=null;if(a){const c=new URLSearchParams(a).get("page");if(null!==c){const p=parseInt(c,10);!isNaN(p)&&p>0&&(g=p)}}return{uuid:d,page:g}}(d),P=a.createProjectDocuments(g),D=(yield P.fetchDocumentData([c]))[c];if(!D)throw new Error(`Document '${c}' not found in project '${g}'.`);s._docSubject.set(D.subject??""),s._originalUuid.set(c),s._originalDocSuffix.set(D.suffix);const L=yield P.fetchAlternativeRepresentations(c);s._alternatives.set([{uuid:c,suffix:D.suffix,original:!0},...L.filter(E=>E.id!==c).map(E=>({uuid:E.id,suffix:E.suffix,original:!1,remoteRelativePath:E.remoteRelativePath}))]);const{uuid:te,suffix:F,remoteRelativePath:N}=function q(m,x){const a=[m,...x];let d,g=1/0;for(const s of a){const c=K.indexOf(s.suffix);-1!==c&&c<g&&(g=c,d=s)}return d?{uuid:d.id,suffix:d.suffix,remoteRelativePath:d.remoteRelativePath}:{uuid:m.id,suffix:m.suffix}}(D,L),A=N?yield s._toBlobUrl(a,a.storage.getAltRepDownloadUrl(N),g):yield s._toBlobUrl(a,a.storage.getDownloadUrl(g,te,F),g);s.resolvedUrl.set(A),s.resolvedSuffix.set(F);const ne=[".eml",".msg",".emlx",".mbx"].includes(D.suffix)&&".json"===F?"email":void 0;yield s._renderViewer(A,F,p,ne),s.state.set("ready")}catch(c){const p=c instanceof Error?c.message:String(c);console.error("[CueDocumentViewerWC] Failed to load document:",p),s.errorMessage.set(p),s.state.set("error")}}else s.state.set("idle")})()}_toBlobUrl(a,d,g){var s=this;return(0,M.A)(function*(){const c=yield a.auth.authenticatedFetch(d,{headers:{"cue-project-id":g}});if(!c.ok)throw new Error(`Failed to fetch document: ${c.status} ${c.statusText}`);const p=URL.createObjectURL(yield c.blob());return s._blobUrls.add(p),p})()}_renderViewer(a,d,g,s){var c=this;return(0,M.A)(function*(){try{const{DocumentViewer:p}=yield Promise.all([u.e(2076),u.e(3036)]).then(u.bind(u,43036)),{DocumentViewerSettings:P}=yield u.e(2076).then(u.bind(u,43418));c._viewerHost?.clear(),c.currentViewerRef?.destroy();const R=new P;if(null!==g&&(R.pdf.page=String(g)),!c._viewerHost)throw new Error("viewerHost is not yet available \u2014 view has not been initialized.");c._lastRenderArgs={url:a,suffix:d,page:g,viewerTypeOverride:s},c.currentViewerRef=c._viewerHost.createComponent(p),c.currentViewerRef.setInput("url",a),c.currentViewerRef.setInput("suffix",d),c.currentViewerRef.setInput("settings",R),s&&c.currentViewerRef.setInput("viewerTypeOverride",s)}catch(p){throw new Error(`Failed to load viewer component: ${p instanceof Error?p.message:String(p)}`)}})()}_switchToAlternative(a){var d=this;return(0,M.A)(function*(){const g=d._cueSnapshot,s=d._projectIdSnapshot;if(g&&s)try{const c=a.remoteRelativePath?yield d._toBlobUrl(g,g.storage.getAltRepDownloadUrl(a.remoteRelativePath),s):yield d._toBlobUrl(g,g.storage.getDownloadUrl(s,a.uuid,a.suffix),s);d.resolvedUrl.set(c),d.resolvedSuffix.set(a.suffix),yield d._renderViewer(c,a.suffix,null)}catch(c){console.error("[CueDocumentViewerWC] Failed to switch to alternative:",c)}})()}_downloadOriginal(){var a=this;return(0,M.A)(function*(){const d=a._cueSnapshot,g=a._projectIdSnapshot,s=a._originalUuid(),c=a._originalDocSuffix();if(d&&g&&s&&c)try{const p=yield d.storage.downloadBlob(g,s,c);(0,S.KE)(p,`${s}${c}`)}catch(p){console.error("[CueDocumentViewerWC] Failed to download original:",p)}})()}static \u0275fac=function(d){return new(d||m)};static \u0275cmp=l.VBU({type:m,selectors:[["cue-document-viewer-wc"]],viewQuery:function(d,g){if(1&d&&l.GBs(w,5,l.c1b),2&d){let s;l.mGM(s=l.lsd())&&(g._viewerHostRef=s.first)}},inputs:{cue:[1,"cue"],uuid:[1,"uuid"],projectId:[1,"projectId"],showDocumentInfo:[1,"showDocumentInfo"],showLogo:[1,"showLogo"],extraMenuItems:[1,"extraMenuItems"],portalBaseURL:[1,"portalBaseURL"],variant:[1,"variant"]},decls:4,vars:1,consts:[["body",""],["viewerHost",""],[2,"height","100%","width","100%",3,"variant","padded"],[2,"display","flex","flex-direction","column","height","100%","width","100%","position","relative"],[3,"subject","handlers","menuItems"],["direction","column","align","center","justify","center",2,"flex","1","width","100%"],[2,"flex","1","min-height","0","overflow","hidden"],[2,"position","absolute","bottom","12px","right","12px","z-index","5",3,"projectId","resourceId"],[2,"color","#c44","font-size","13px"],[4,"ngTemplateOutlet"]],template:function(d,g){1&d&&(l.DNE(0,H,8,3,"ng-template",null,0,l.C5r),l.nVh(2,Y,2,3,"cue-card",2)(3,Q,1,1,"ng-container")),2&d&&(l.R7$(2),l.vxM("none"!==g.variant()?2:3))},dependencies:[V.MD,V.T3,G.FlexContainer,I.Typography,j.G,T.Card,U.x],styles:["[_nghost-%COMP%]{display:contents}"],changeDetection:0})}return m})()}}]);
package/8629.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[8629,9695],{59695(k,m,n){n.d(m,{Switch:()=>h});var o=n(17705),s=n(20029),c=n(35547);function e(d,f){if(1&d&&c.nrm(0,"cue-svg-icon",2),2&d){const l=c.XpG();c.Y8G("name",l.iconChecked())}}function v(d,f){if(1&d&&c.nrm(0,"cue-svg-icon",2),2&d){const l=c.XpG();c.Y8G("name",l.icon())}}let h=(()=>{class d{id=(0,o.hFB)("");size=(0,o.hFB)("m");icon=(0,o.hFB)(void 0);iconChecked=(0,o.hFB)(void 0);disabled=(0,o.hFB)(!1);checked=(0,o.geq)(!1);toggleChange=(0,o.CGW)();toggle(){this.checked.set(!this.checked()),this.toggleChange.emit(this.checked())}static \u0275fac=function(g){return new(g||d)};static \u0275cmp=c.VBU({type:d,selectors:[["cue-input-switch"]],hostVars:5,hostBindings:function(g,r){2&g&&(c.BMQ("size",r.size()),c.AVh("checked",r.checked())("disabled",r.disabled()))},inputs:{id:[1,"id"],size:[1,"size"],icon:[1,"icon"],iconChecked:[1,"iconChecked"],disabled:[1,"disabled"],checked:[1,"checked"]},outputs:{checked:"checkedChange",toggleChange:"toggleChange"},decls:4,vars:4,consts:[["type","checkbox",3,"click","checked","disabled"],[1,"indicator"],[3,"name"]],template:function(g,r){1&g&&(c.j41(0,"input",0),c.bIt("click",function(){return r.toggle()}),c.k0s(),c.j41(1,"div",1),c.nVh(2,e,1,1,"cue-svg-icon",2)(3,v,1,1,"cue-svg-icon",2),c.k0s()),2&g&&(c.Y8G("checked",r.checked())("disabled",r.disabled()),c.BMQ("id",r.id()||null),c.R7$(2),c.vxM(r.checked()&&r.iconChecked()?2:r.icon()?3:-1))},dependencies:[s.A],styles:["[_nghost-%COMP%]{--cue-input-switch-height: 18px;--cue-input-switch-width: calc(var(--cue-input-switch-height) * 1.7);--cue-input-switch-inset: 2px;--cue-input-switch-indicator-width: calc( var(--cue-input-switch-height) - (2 * var(--cue-input-switch-inset)) );--cue-input-switch-icon-width: calc( var(--cue-input-switch-indicator-width) - (2 * var(--cue-input-switch-inset)) );display:block;flex-shrink:0;position:relative;height:var(--cue-input-switch-height);width:var(--cue-input-switch-width);border-radius:var(--cue-input-switch-height);--cue-icon-width: var(--cue-input-switch-icon-width);background:var(--cue-input-switch-background);transition:background-color .4s ease}[size=xs][_nghost-%COMP%]{--cue-input-switch-height: 12px;--cue-input-switch-inset: 1px}[size=s][_nghost-%COMP%]{--cue-input-switch-height: 14px;--cue-input-switch-inset: 1px}[size=m][_nghost-%COMP%]{--cue-input-switch-height: 18px;--cue-input-switch-inset: 2px}[size=l][_nghost-%COMP%]{--cue-input-switch-height: 22px;--cue-input-switch-inset: 3px}[size=xl][_nghost-%COMP%]{--cue-input-switch-height: 28px;--cue-input-switch-inset: 3px}@container cue-container (width < 20em){[_nghost-%COMP%]{--cue-input-switch-height: 16px}[size=xs][_nghost-%COMP%]{--cue-input-switch-height: 10px}[size=s][_nghost-%COMP%]{--cue-input-switch-height: 12px}[size=m][_nghost-%COMP%]{--cue-input-switch-height: 16px}[size=l][_nghost-%COMP%]{--cue-input-switch-height: 18px}[size=xl][_nghost-%COMP%]{--cue-input-switch-height: 20px}}.checked[_nghost-%COMP%]{background:var(--cue-input-switch-checked-background)}.disabled[_nghost-%COMP%]{background:var(--cue-input-switch-disabled-background);cursor:default}[_nghost-%COMP%] .indicator[_ngcontent-%COMP%]{pointer-events:none;position:absolute;left:var(--cue-input-switch-inset);top:var(--cue-input-switch-inset);width:var(--cue-input-switch-indicator-width);aspect-ratio:1;border-radius:50%;display:flex;align-items:center;justify-content:center;background-color:var(--cue-input-switch-indicator-background);color:var(--cue-input-switch-indicator-foreground);transition:left .4s ease,background-color .4s ease,color .4s ease}.checked[_nghost-%COMP%] .indicator[_ngcontent-%COMP%]{left:calc(var(--cue-input-switch-width) - var(--cue-input-switch-inset) - var( --cue-input-switch-indicator-width ));background:var(--cue-input-switch-checked-indicator-background);color:var(--cue-input-switch-checked-indicator-foreground)}.disabled[_nghost-%COMP%] .indicator[_ngcontent-%COMP%]{background:var(--cue-input-switch-disabled-indicator-background);color:var(--cue-input-switch-disabled-indicator-foreground)}input[_ngcontent-%COMP%]{all:unset;position:absolute;inset:0;cursor:pointer;border-radius:var(--cue-input-switch-height)}input[_ngcontent-%COMP%]:focus-visible:not(:disabled) + .indicator[_ngcontent-%COMP%]{outline:1px solid var(--cue-input-switch-focus-color);outline-offset:2px}"]})}return d})()},21331(k,m,n){n.d(m,{a:()=>X});var o=n(85802),s=n(17705),c=n(32271),e=n(35547),v=n(21413),h=n(84572),d=n(28793),f=n(24226),l=n(96697),g=n(5964),w=n(70152),O=n(96354),_=n(99172),P=n(56977),T=n(27421),B=n(67523);const D=new Set;let C,z=(()=>{class i{_platform=(0,o.WQX)(T.O);_nonce=(0,o.WQX)(e.BIS,{optional:!0});_matchMedia;constructor(){this._matchMedia=this._platform.isBrowser&&window.matchMedia?window.matchMedia.bind(window):R}matchMedia(t){return(this._platform.WEBKIT||this._platform.BLINK)&&function W(i,u){if(!D.has(i))try{C||(C=document.createElement("style"),u&&C.setAttribute("nonce",u),C.setAttribute("type","text/css"),document.head.appendChild(C)),C.sheet&&(C.sheet.insertRule(`@media ${i} {body{ }}`,0),D.add(i))}catch(t){console.error(t)}}(t,this._nonce),this._matchMedia(t)}static \u0275fac=function(a){return new(a||i)};static \u0275prov=o.jDH({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();function R(i){return{matches:"all"===i||""===i,media:i,addListener:()=>{},removeListener:()=>{}}}let F=(()=>{class i{_mediaMatcher=(0,o.WQX)(z);_zone=(0,o.WQX)(o.SKi);_queries=new Map;_destroySubject=new v.B;constructor(){}ngOnDestroy(){this._destroySubject.next(),this._destroySubject.complete()}isMatched(t){return E((0,B.F)(t)).some(p=>this._registerQuery(p).mql.matches)}observe(t){const p=E((0,B.F)(t)).map(M=>this._registerQuery(M).observable);let b=(0,h.z)(p);return b=(0,d.x)(b.pipe((0,l.s)(1)),b.pipe(function r(i){return(0,g.p)((u,t)=>i<=t)}(1),(0,w.B)(0))),b.pipe((0,O.T)(M=>{const x={matches:!1,breakpoints:{}};return M.forEach(({matches:y,query:K})=>{x.matches=x.matches||y,x.breakpoints[K]=y}),x}))}_registerQuery(t){if(this._queries.has(t))return this._queries.get(t);const a=this._mediaMatcher.matchMedia(t),b={observable:new f.c(M=>{const x=y=>this._zone.run(()=>M.next(y));return a.addListener(x),()=>{a.removeListener(x)}}).pipe((0,_.Z)(a),(0,O.T)(({matches:M})=>({query:t,matches:M})),(0,P.Q)(this._destroySubject)),mql:a};return this._queries.set(t,b),b}static \u0275fac=function(a){return new(a||i)};static \u0275prov=o.jDH({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();function E(i){return i.map(u=>u.split(",")).reduce((u,t)=>u.concat(t)).map(u=>u.trim())}var N=n(89079);let j=(()=>{class i{_breakpointObserver=(0,o.WQX)(F);mobileBreakpointQuery=this._breakpointObserver.observe(["(max-width: 800px)"]);isMatchingMobileBreakpoint=(0,N.ot)(this.mobileBreakpointQuery,{initialValue:{matches:!1,breakpoints:{}}});isMobile=(0,c.EW)(()=>this.isMatchingMobileBreakpoint()?.matches??!1);static \u0275fac=function(a){return new(a||i)};static \u0275prov=o.jDH({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();const S=["dialog"],L=["*",[["","modal-footer",""]]],Q=["*","[modal-footer]"];function V(i,u){if(1&i&&(e.rj2(0,"h2",7),e.EFF(1),e.eux()),2&i){const t=e.XpG(3);e.R7$(),e.JRh(t.effectiveTitle())}}function A(i,u){if(1&i&&(e.rj2(0,"p",8),e.EFF(1),e.eux()),2&i){const t=e.XpG(3);e.R7$(),e.JRh(t.subtitle())}}function I(i,u){if(1&i){const t=e.RV6();e.rj2(0,"button",10),e.VwU("click",function(){o.eBV(t);const p=e.XpG(3);return o.Njj(p.onClose())}),o.qSk(),e.rj2(1,"svg",11),e.Hgh(2,"path",12),e.eux()()}}function U(i,u){if(1&i&&(e.rj2(0,"div",4)(1,"div",6),e.nVh(2,V,2,1,"h2",7),e.nVh(3,A,2,1,"p",8),e.eux(),e.nVh(4,I,3,0,"button",9),e.eux()),2&i){const t=e.XpG(2);e.R7$(2),e.vxM(t.effectiveTitle()?2:-1),e.R7$(),e.vxM(t.subtitle()?3:-1),e.R7$(),e.vxM(t.displayCloseBtn()?4:-1)}}function G(i,u){if(1&i&&(e.rj2(0,"div",3),e.VwU("click",function(a){return a.stopPropagation()}),e.nVh(1,U,5,3,"div",4),e.rj2(2,"div",5),e.SdG(3),e.eux(),e.SdG(4,1),e.eux()),2&i){const t=e.XpG();e.xc7("min-width",t.client.isMobile()?null:t.minWidth()),e.AVh("has-header",t.effectiveTitle()||t.displayCloseBtn())("fullscreen","fullscreen"===t.size()),e.R7$(),e.vxM(t.effectiveTitle()||t.displayCloseBtn()?1:-1),e.R7$(),e.AVh("fullscreen","fullscreen"===t.size())}}let X=(()=>{class i{client=(0,o.WQX)(j);visible=(0,s.geq)(!0);closeOnBackgroundClick=(0,s.hFB)(!0);closable=(0,s.hFB)(!0);displayCloseBtn=(0,s.hFB)(!0);label=(0,s.hFB)("");title=(0,s.hFB)("");subtitle=(0,s.hFB)("");minWidth=(0,s.hFB)();size=(0,s.hFB)("default");close=(0,s.CGW)();dialogRef=s.ebz.required("dialog");effectiveTitle=(0,c.EW)(()=>this.title()||this.label());constructor(){(0,o.QZP)(()=>{const t=this.dialogRef().nativeElement;this.visible()?t.open||t.showModal():t.open&&t.close()})}onBackdropClick(){this.closeOnBackgroundClick()&&this.closable()&&this.onClose()}onCancel(t){t.preventDefault(),this.closable()&&this.onClose()}onClose(){this.visible.set(!1),this.close.emit()}static \u0275fac=function(a){return new(a||i)};static \u0275cmp=e.VBU({type:i,selectors:[["cue-modal"]],viewQuery:function(a,p){1&a&&e.wEZ(p.dialogRef,S,5),2&a&&e.NyB()},inputs:{visible:[1,"visible"],closeOnBackgroundClick:[1,"closeOnBackgroundClick"],closable:[1,"closable"],displayCloseBtn:[1,"displayCloseBtn"],label:[1,"label"],title:[1,"title"],subtitle:[1,"subtitle"],minWidth:[1,"minWidth"],size:[1,"size"]},outputs:{visible:"visibleChange",close:"close"},ngContentSelectors:Q,decls:3,vars:3,consts:[["dialog",""],[1,"modal-dialog",3,"cancel","click"],[1,"panel",3,"has-header","fullscreen","minWidth"],[1,"panel",3,"click"],[1,"header"],[1,"body"],[1,"header-text"],[1,"modal-title"],[1,"modal-subtitle"],["type","button","aria-label","Close",1,"close-btn"],["type","button","aria-label","Close",1,"close-btn",3,"click"],["viewBox","0 0 256 256","xmlns","http://www.w3.org/2000/svg"],["fill","currentColor","d","M205.66 194.34a8 8 0 0 1-11.32 11.32L128 139.31l-66.34 66.35a8 8 0 0 1-11.32-11.32L116.69 128L61.34 72.66a8 8 0 0 1 11.32-11.32L128 116.69l66.34-66.35a8 8 0 0 1 11.32 11.32L139.31 128Z"]],template:function(a,p){1&a&&(e.NAR(L),e.rj2(0,"dialog",1,0),e.VwU("cancel",function(M){return p.onCancel(M)})("click",function(){return p.onBackdropClick()}),e.nVh(2,G,5,9,"div",2),e.eux()),2&a&&(e.AVh("fullscreen","fullscreen"===p.size()),e.R7$(2),e.vxM(p.visible()?2:-1))},styles:[".modal-dialog[_ngcontent-%COMP%]{padding:0;border:none;background:transparent;overflow:visible;margin:auto;outline:none;max-width:min(calc(100vw - 32px),80vw)}.modal-dialog[_ngcontent-%COMP%]::backdrop{background-color:var(--cue-modal-overlay-color, rgba(14, 24, 39, .55));-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px)}.panel[_ngcontent-%COMP%]{background:var(--cue-default);color:var(--cue-defaultContrast);border-radius:24px;border:1px solid var(--cue-border-color);box-shadow:0 12px 48px #00000047;max-height:88vh;overflow-y:auto;overflow-x:hidden;box-sizing:border-box;scrollbar-width:thin}.header[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:12px;padding:26px 26px 0;margin-bottom:20px}.header-text[_ngcontent-%COMP%]{flex:1}.modal-title[_ngcontent-%COMP%]{margin:0;font-size:20px;font-weight:700;letter-spacing:-.01em;font-family:var(--cue-font-family);color:var(--cue-defaultContrast)}.modal-subtitle[_ngcontent-%COMP%]{margin:5px 0 0;font-size:13px;color:var(--cue-color-midgray);letter-spacing:.02em;line-height:1.5}.close-btn[_ngcontent-%COMP%]{flex:none;width:34px;height:34px;border-radius:50%;border:none;background:transparent;cursor:pointer;display:flex;align-items:center;justify-content:center;color:var(--cue-color-midgray);padding:0;margin-top:-4px;transition:background .15s,color .15s}.close-btn[_ngcontent-%COMP%]:hover{background:var(--cue-main-background);color:var(--cue-main-foreground)}.close-btn[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{width:18px;height:18px;display:block}.body[_ngcontent-%COMP%]{padding:26px}.has-header[_ngcontent-%COMP%] .body[_ngcontent-%COMP%]{padding-top:0}.modal-dialog.fullscreen[_ngcontent-%COMP%]{max-width:100vw}.panel.fullscreen[_ngcontent-%COMP%]{width:100vw;height:100vh;max-width:100vw;max-height:100vh;border-radius:0;display:flex;flex-direction:column}.body.fullscreen[_ngcontent-%COMP%]{flex:1;min-height:0;display:flex;flex-direction:column}@media(max-width:800px){.modal-dialog[_ngcontent-%COMP%]:not(.fullscreen){width:calc(100vw - 16px);max-width:calc(100vw - 16px)}.panel[_ngcontent-%COMP%]:not(.fullscreen){width:100%;max-height:92dvh;border-radius:20px}.header[_ngcontent-%COMP%]{padding:20px 18px 0;margin-bottom:16px}.body[_ngcontent-%COMP%]{padding:18px}}"]})}return i})()},28793(k,m,n){n.d(m,{x:()=>v});var o=n(26365),c=n(9326),e=n(86648);function v(...h){return function s(){return(0,o.U)(1)}()((0,e.H)(h,(0,c.lI)(h)))}},70152(k,m,n){n.d(m,{B:()=>e});var o=n(43236),s=n(39974),c=n(54360);function e(v,h=o.E){return(0,s.N)((d,f)=>{let l=null,g=null,r=null;const w=()=>{if(l){l.unsubscribe(),l=null;const _=g;g=null,f.next(_)}};function O(){const _=r+v,P=h.now();if(P<_)return l=this.schedule(void 0,_-P),void f.add(l);w()}d.subscribe((0,c._)(f,_=>{g=_,r=h.now(),l||(l=h.schedule(O,v),f.add(l))},()=>{w(),f.complete()},void 0,()=>{g=l=null}))})}},99172(k,m,n){n.d(m,{Z:()=>e});var o=n(28793),s=n(9326),c=n(39974);function e(...v){const h=(0,s.lI)(v);return(0,c.N)((d,f)=>{(h?(0,o.x)(v,d,h):(0,o.x)(v,d)).subscribe(f)})}}}]);
package/8647.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[8647],{68647(T,z,c){c.r(z),c.d(z,{LazStreamingSource:()=>C,probeLazPerfWasmLoad:()=>U,setLazPerfLoaderForTesting:()=>B});var h=c(10467),p=c(80070),b=c(14582);function y(){return w.apply(this,arguments)}function w(){return w=(0,h.A)(function*(){const i=yield function O(){return _.apply(this,arguments)}(),r=yield Promise.resolve().then(function(){var s=new Error("Cannot find module 'laz-perf'");throw s.code="MODULE_NOT_FOUND",s}),e=r.default,o=[r.createLazPerf,"object"==typeof e&&null!==e?e.createLazPerf:void 0,e,r].find(n=>"function"==typeof n);if(!o){const n=Object.keys(r).join(", ");throw new Error(`laz-perf: could not find createLazPerf factory (saw keys: ${n||"<empty>"})`)}return o({wasmBinary:i})}),w.apply(this,arguments)}function _(){return(_=(0,h.A)(function*(){let i;try{i=(yield Promise.resolve().then(function(){var n=new Error("Cannot find module 'laz-perf/lib/web/laz-perf.wasm?url'");throw n.code="MODULE_NOT_FOUND",n})).default}catch(t){throw new Error(`laz-perf: could not resolve wasm asset URL (${t instanceof Error?t.message:String(t)}). Ensure the bundler treats \`laz-perf/lib/web/laz-perf.wasm?url\` as a static asset.`)}const r=yield fetch(i);if(!r.ok)throw new Error(`laz-perf: wasm fetch failed (${r.status} ${r.statusText}) for ${i}`);const e=yield r.arrayBuffer();return new Uint8Array(e)})).apply(this,arguments)}let P=(0,b.T)(y);function U(){return g.apply(this,arguments)}function g(){return(g=(0,h.A)(function*(){try{return{ok:!0,hasLASZip:"function"==typeof(yield y()).LASZip}}catch(i){return{ok:!1,error:i instanceof Error?i.message:String(i)}}})).apply(this,arguments)}function B(i){return P=(0,b.T)(i),()=>{P=(0,b.T)(y)}}class C{blob;downsample;label;mod=null;laszip=null;header=null;fileBytes=null;filePtr=0;pointPtr=0;pointBuffer=null;cursor=0;rgbScale=1;originOffset;constructor(r,e={}){this.blob=r,this.downsample=e.downsample??{stride:1},this.label=e.label,this.originOffset=e.originOffset}open(r){var e=this;return(0,h.A)(function*(){if(e.header)return e.toInfo(e.header);m(r);let t,s,o=0,n=0;try{const l=yield e.blob.arrayBuffer();m(r);const a=new Uint8Array(l),f=(0,p.jb)(a);t=yield P(),m(r),o=t._malloc(a.byteLength),t.HEAPU8.set(a,o),s=new t.LASZip,s.open(o,a.byteLength);const u=s.getPointLength();n=t._malloc(u);const d=new Uint8Array(u);let E=1;if(f.hasRgb){const A=Math.min(4096,f.pointCount),S=new Uint8Array(A*u);for(let L=0;L<A;L++)s.getPoint(n),S.set(t.HEAPU8.subarray(n,n+u),L*u);const M=(0,p.V_)(S,f);E=M>0&&M<=255?257:1,s.delete(),s=new t.LASZip,s.open(o,a.byteLength)}return e.fileBytes=a,e.mod=t,e.filePtr=o,e.laszip=s,e.pointPtr=n,e.pointBuffer=d,e.rgbScale=E,e.header=f,e.cursor=0,e.toInfo(f)}catch(l){try{s?.delete()}catch{}if(t&&n)try{t._free(n)}catch{}if(t&&o)try{t._free(o)}catch{}throw l}})()}next(r,e){var t=this;return(0,h.A)(function*(){if(m(e),!Number.isFinite(r)||r<=0)throw new Error(`LazStreamingSource: maxPoints must be > 0 (got ${r})`);if(!(t.header&&t.mod&&t.laszip&&t.pointBuffer))throw new Error("LazStreamingSource: open() must be awaited before next()");const o=Math.max(1,0|t.downsample.stride);if(t.cursor>=t.header.pointCount)return null;const n=t.pointBuffer.byteLength,l=Math.min(1===o?r:r*o,t.header.pointCount-t.cursor),a=1===o?l:Math.ceil(l/o),f=new Uint8Array(a*n);let u=0;for(let d=0;d<l;d++)t.laszip.getPoint(t.pointPtr),(1===o||d%o===0)&&(f.set(t.mod.HEAPU8.subarray(t.pointPtr,t.pointPtr+n),u*n),u++);return t.cursor+=l,(0,p.wu)(f,t.header,a,n,t.rgbScale,t.originOffset)})()}close(){try{this.laszip?.delete()}catch{}if(this.mod&&this.pointPtr)try{this.mod._free(this.pointPtr)}catch{}if(this.mod&&this.filePtr)try{this.mod._free(this.filePtr)}catch{}this.laszip=null,this.mod=null,this.header=null,this.fileBytes=null,this.pointBuffer=null,this.filePtr=0,this.pointPtr=0,this.cursor=0}toInfo(r){const e=Math.max(1,0|this.downsample.stride);return{totalPointCount:1===e?r.pointCount:Math.ceil(r.pointCount/e),bbox:(0,p.iX)(r.bbox,this.originOffset),hasColor:r.hasRgb,hasClassification:!0,hasIntensity:!0,label:this.label}}}function m(i){if(i?.aborted)throw new DOMException("Aborted","AbortError")}}}]);
package/9231.js ADDED
@@ -0,0 +1 @@
1
+ (self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[9231],{75448(B,_,m){"use strict";m.d(_,{ButtonLabel:()=>S});var b=m(17705),C=m(42245),$=m(35547);const D=["*"];let S=(()=>{class d{fontSize=(0,b.hFB)("m");italic=(0,b.hFB)(!1);noWrap=(0,b.hFB)(!0);static \u0275fac=function(w){return new(w||d)};static \u0275cmp=$.VBU({type:d,selectors:[["cue-button-label"]],inputs:{fontSize:[1,"fontSize"],italic:[1,"italic"],noWrap:[1,"noWrap"]},ngContentSelectors:D,decls:3,vars:3,consts:[[3,"size","italic","noWrap"]],template:function(w,y){1&w&&($.NAR(),$.j41(0,"div")(1,"cue-typography",0),$.SdG(2),$.k0s()()),2&w&&($.R7$(),$.Y8G("size",y.fontSize())("italic",y.italic())("noWrap",y.noWrap()))},dependencies:[C.Typography],styles:["div[_ngcontent-%COMP%]{transform:translateY(.05em)}"]})}return d})()},2065(B,_,m){"use strict";function $(d,g,a="text/plain"){return function b(d,g="data.zip"){const a=document.createElement("a"),w=URL.createObjectURL(d);a.href=w,a.download=g,document.body.appendChild(a),a.click(),document.body.removeChild(a),URL.revokeObjectURL(w)}(new Blob([d],{type:a}),g)}function D(d,g){const a=document.createElement("a");a.style.display="hidden",a.setAttribute("href",window.URL.createObjectURL(d)),a.setAttribute("download",g),document.body.appendChild(a),a.click(),a.remove()}m.d(_,{KE:()=>D,YN:()=>$})},77573(B,_,m){"use strict";m.d(_,{E:()=>b});const b={qcy:"https://dev.qaecy.com/ont#","qcy-e":"https://dev.qaecy.com/enum#","qcy-f":"https://dev.qaecy.com/functions#",obc:"https://w3id.org/obc#",dicc:"https://w3id.org/digitalconstruction/0.5/Contexts#",dicv:"https://w3id.org/digitalconstruction/0.5/Variables#",dice:"https://w3id.org/digitalconstruction/0.5/Entities#",dicp:"https://w3id.org/digitalconstruction/0.5/Processes#",dica:"https://w3id.org/digitalconstruction/0.5/Agents#",dici:"https://w3id.org/digitalconstruction/0.5/Information#",dicbm:"https://w3id.org/digitalconstruction/0.5/Materials#",dicob:"https://w3id.org/digitalconstruction/0.5/Occupancy#",dicl:"https://w3id.org/digitalconstruction/0.5/Lifecycle#",dices:"https://w3id.org/digitalconstruction/0.5/Energy#",dicu:"https://w3id.org/digitalconstruction/0.5/Units#",diclvl:"https://w3id.org/digitalconstruction/0.5/Levels#",dicstg:"https://w3id.org/digitalconstruction/0.5/Stages#"}},67374(B){B.exports=function(){"use strict";var m=6e4,b=36e5,C="millisecond",$="second",D="minute",S="hour",d="day",g="week",a="month",w="quarter",y="year",A="date",I="Invalid Date",F=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,J=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,q={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(i){var n=["th","st","nd","rd"],t=i%100;return"["+i+(n[(t-20)%10]||n[t]||n[0])+"]"}},z=function(i,n,t){var r=String(i);return!r||r.length>=n?i:""+Array(n+1-r.length).join(t)+i},V={s:z,z:function(i){var n=-i.utcOffset(),t=Math.abs(n),r=Math.floor(t/60),e=t%60;return(n<=0?"+":"-")+z(r,2,"0")+":"+z(e,2,"0")},m:function i(n,t){if(n.date()<t.date())return-i(t,n);var r=12*(t.year()-n.year())+(t.month()-n.month()),e=n.clone().add(r,a),s=t-e<0,o=n.clone().add(r+(s?-1:1),a);return+(-(r+(t-e)/(s?e-o:o-e))||0)},a:function(i){return i<0?Math.ceil(i)||0:Math.floor(i)},p:function(i){return{M:a,y,w:g,d,D:A,h:S,m:D,s:$,ms:C,Q:w}[i]||String(i||"").toLowerCase().replace(/s$/,"")},u:function(i){return void 0===i}},U="en",L={};L[U]=q;var N="$isDayjsObject",x=function(i){return i instanceof H||!(!i||!i[N])},j=function i(n,t,r){var e;if(!n)return U;if("string"==typeof n){var s=n.toLowerCase();L[s]&&(e=s),t&&(L[s]=t,e=s);var o=n.split("-");if(!e&&o.length>1)return i(o[0])}else{var u=n.name;L[u]=n,e=u}return!r&&e&&(U=e),e||!r&&U},h=function(i,n){if(x(i))return i.clone();var t="object"==typeof n?n:{};return t.date=i,t.args=arguments,new H(t)},c=V;c.l=j,c.i=x,c.w=function(i,n){return h(i,{locale:n.$L,utc:n.$u,x:n.$x,$offset:n.$offset})};var H=function(){function i(t){this.$L=j(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[N]=!0}var n=i.prototype;return n.parse=function(t){this.$d=function(r){var e=r.date,s=r.utc;if(null===e)return new Date(NaN);if(c.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var o=e.match(F);if(o){var u=o[2]-1||0,l=(o[7]||"0").substring(0,3);return s?new Date(Date.UTC(o[1],u,o[3]||1,o[4]||0,o[5]||0,o[6]||0,l)):new Date(o[1],u,o[3]||1,o[4]||0,o[5]||0,o[6]||0,l)}}return new Date(e)}(t),this.init()},n.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},n.$utils=function(){return c},n.isValid=function(){return this.$d.toString()!==I},n.isSame=function(t,r){var e=h(t);return this.startOf(r)<=e&&e<=this.endOf(r)},n.isAfter=function(t,r){return h(t)<this.startOf(r)},n.isBefore=function(t,r){return this.endOf(r)<h(t)},n.$g=function(t,r,e){return c.u(t)?this[r]:this.set(e,t)},n.unix=function(){return Math.floor(this.valueOf()/1e3)},n.valueOf=function(){return this.$d.getTime()},n.startOf=function(t,r){var e=this,s=!!c.u(r)||r,o=c.p(t),u=function(Y,v){var O=c.w(e.$u?Date.UTC(e.$y,v,Y):new Date(e.$y,v,Y),e);return s?O:O.endOf(d)},l=function(Y,v){return c.w(e.toDate()[Y].apply(e.toDate("s"),(s?[0,0,0,0]:[23,59,59,999]).slice(v)),e)},f=this.$W,p=this.$M,M=this.$D,W="set"+(this.$u?"UTC":"");switch(o){case y:return s?u(1,0):u(31,11);case a:return s?u(1,p):u(0,p+1);case g:var k=this.$locale().weekStart||0,E=(f<k?f+7:f)-k;return u(s?M-E:M+(6-E),p);case d:case A:return l(W+"Hours",0);case S:return l(W+"Minutes",1);case D:return l(W+"Seconds",2);case $:return l(W+"Milliseconds",3);default:return this.clone()}},n.endOf=function(t){return this.startOf(t,!1)},n.$set=function(t,r){var e,s=c.p(t),o="set"+(this.$u?"UTC":""),u=(e={},e[d]=o+"Date",e[A]=o+"Date",e[a]=o+"Month",e[y]=o+"FullYear",e[S]=o+"Hours",e[D]=o+"Minutes",e[$]=o+"Seconds",e[C]=o+"Milliseconds",e)[s],l=s===d?this.$D+(r-this.$W):r;if(s===a||s===y){var f=this.clone().set(A,1);f.$d[u](l),f.init(),this.$d=f.set(A,Math.min(this.$D,f.daysInMonth())).$d}else u&&this.$d[u](l);return this.init(),this},n.set=function(t,r){return this.clone().$set(t,r)},n.get=function(t){return this[c.p(t)]()},n.add=function(t,r){var e,s=this;t=Number(t);var o=c.p(r),u=function(p){var M=h(s);return c.w(M.date(M.date()+Math.round(p*t)),s)};if(o===a)return this.set(a,this.$M+t);if(o===y)return this.set(y,this.$y+t);if(o===d)return u(1);if(o===g)return u(7);var l=(e={},e[D]=m,e[S]=b,e[$]=1e3,e)[o]||1,f=this.$d.getTime()+t*l;return c.w(f,this)},n.subtract=function(t,r){return this.add(-1*t,r)},n.format=function(t){var r=this,e=this.$locale();if(!this.isValid())return e.invalidDate||I;var s=t||"YYYY-MM-DDTHH:mm:ssZ",o=c.z(this),u=this.$H,l=this.$m,f=this.$M,p=e.weekdays,M=e.months,k=function(v,O,T,R){return v&&(v[O]||v(r,s))||T[O].slice(0,R)},E=function(v){return c.s(u%12||12,v,"0")},Y=e.meridiem||function(v,O,T){var R=v<12?"AM":"PM";return T?R.toLowerCase():R};return s.replace(J,function(v,O){return O||function(T){switch(T){case"YY":return String(r.$y).slice(-2);case"YYYY":return c.s(r.$y,4,"0");case"M":return f+1;case"MM":return c.s(f+1,2,"0");case"MMM":return k(e.monthsShort,f,M,3);case"MMMM":return k(M,f);case"D":return r.$D;case"DD":return c.s(r.$D,2,"0");case"d":return String(r.$W);case"dd":return k(e.weekdaysMin,r.$W,p,2);case"ddd":return k(e.weekdaysShort,r.$W,p,3);case"dddd":return p[r.$W];case"H":return String(u);case"HH":return c.s(u,2,"0");case"h":return E(1);case"hh":return E(2);case"a":return Y(u,l,!0);case"A":return Y(u,l,!1);case"m":return String(l);case"mm":return c.s(l,2,"0");case"s":return String(r.$s);case"ss":return c.s(r.$s,2,"0");case"SSS":return c.s(r.$ms,3,"0");case"Z":return o}return null}(v)||o.replace(":","")})},n.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},n.diff=function(t,r,e){var s,o=this,u=c.p(r),l=h(t),f=(l.utcOffset()-this.utcOffset())*m,p=this-l,M=function(){return c.m(o,l)};switch(u){case y:s=M()/12;break;case a:s=M();break;case w:s=M()/3;break;case g:s=(p-f)/6048e5;break;case d:s=(p-f)/864e5;break;case S:s=p/b;break;case D:s=p/m;break;case $:s=p/1e3;break;default:s=p}return e?s:c.a(s)},n.daysInMonth=function(){return this.endOf(a).$D},n.$locale=function(){return L[this.$L]},n.locale=function(t,r){if(!t)return this.$L;var e=this.clone(),s=j(t,r,!0);return s&&(e.$L=s),e},n.clone=function(){return c.w(this.$d,this)},n.toDate=function(){return new Date(this.valueOf())},n.toJSON=function(){return this.isValid()?this.toISOString():null},n.toISOString=function(){return this.$d.toISOString()},n.toString=function(){return this.$d.toUTCString()},i}(),P=H.prototype;return h.prototype=P,[["$ms",C],["$s",$],["$m",D],["$H",S],["$W",d],["$M",a],["$y",y],["$D",A]].forEach(function(i){P[i[1]]=function(n){return this.$g(n,i[0],i[1])}}),h.extend=function(i,n){return i.$i||(i(n,H,h),i.$i=!0),h},h.locale=j,h.isDayjs=x,h.unix=function(i){return h(1e3*i)},h.en=L[U],h.Ls=L,h.p={},h}()}}]);
package/9396.js CHANGED
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[9396],{19396(Z,D,s){s.d(D,{CueContextViewer:()=>Q});var g=s(10467),d=s(17705),a=s(85802),r=s(32271),h=s(17579),p=s(73656),w=s(32839),x=s(74631),C=s(91625),f=s(16455),y=s(68334),v=s(97851),I=s(85971),M=s(75448),b=s(2014),k=s(59352),t=s(35547);function V(c,l){1&c&&(t.j41(0,"div",1),t.EFF(1),t.nI1(2,"transloco"),t.k0s()),2&c&&(t.R7$(),t.JRh(t.bMT(2,1,"components.contextViewer.infoNoContext")))}function j(c,l){if(1&c){const e=t.RV6();t.j41(0,"cue-tabs",2)(1,"cue-tab",6),t.nI1(2,"transloco"),t.j41(3,"cue-doc-list",7),t.bIt("clickedDocument",function(o){a.eBV(e);const i=t.XpG();return a.Njj(i.onDocumentClicked(o))})("selectionChanged",function(o){a.eBV(e);const i=t.XpG();return a.Njj(i.onDocSelectionChanged(o))})("viewMarkdown",function(o){a.eBV(e);const i=t.XpG();return a.Njj(i.onDocumentViewMarkdown(o))}),t.k0s()(),t.j41(4,"cue-tab",6),t.nI1(5,"transloco"),t.j41(6,"cue-ent-list-inner",8),t.bIt("rowClicked",function(o){a.eBV(e);const i=t.XpG();return a.Njj(i.onEntityRowClicked(o))})("selectionChanged",function(o){a.eBV(e);const i=t.XpG();return a.Njj(i.onEntitySelectionChanged(o))})("viewMarkdown",function(o){a.eBV(e);const i=t.XpG();return a.Njj(i.onEntityViewMarkdown(o))}),t.k0s()()()}if(2&c){const e=t.XpG();t.R7$(),t.Y8G("label",t.bMT(2,11,"components.contextViewer.tabDocuments")),t.R7$(2),t.Y8G("documentRefs",e.documentRefs())("documentData",e.documentData())("handlers",e._docHandlers())("variant",e.variant())("selectable",e.selectable()),t.R7$(),t.Y8G("label",t.bMT(5,13,"components.contextViewer.tabEntities")),t.R7$(2),t.Y8G("entities",e.entityIris())("entityData",e.entityData())("handlers",e._entityHandlers())("selectable",e.selectable())}}function E(c,l){if(1&c){const e=t.RV6();t.nrm(0,"cue-document-info",9),t.j41(1,"cue-doc-list",10),t.bIt("viewMarkdown",function(o){a.eBV(e);const i=t.XpG();return a.Njj(i.onDocumentViewMarkdown(o))}),t.k0s()}if(2&c){const e=t.XpG();t.Y8G("subject",e.singleDocumentSubject())("handlers",e._docInfoHandlers)("contentCategories",e.singleDocument().categories)("fileLocations",e.singleDocumentFileLocations()),t.R7$(),t.Y8G("documentRefs",e.documentRefs())("documentData",e.documentData())("handlers",e._docHandlers())("variant",e.variant())}}function N(c,l){if(1&c){const e=t.RV6();t.j41(0,"cue-doc-list",7),t.bIt("clickedDocument",function(o){a.eBV(e);const i=t.XpG();return a.Njj(i.onDocumentClicked(o))})("selectionChanged",function(o){a.eBV(e);const i=t.XpG();return a.Njj(i.onDocSelectionChanged(o))})("viewMarkdown",function(o){a.eBV(e);const i=t.XpG();return a.Njj(i.onDocumentViewMarkdown(o))}),t.k0s()}if(2&c){const e=t.XpG();t.Y8G("documentRefs",e.documentRefs())("documentData",e.documentData())("handlers",e._docHandlers())("variant",e.variant())("selectable",e.selectable())}}function R(c,l){if(1&c){const e=t.RV6();t.nrm(0,"cue-entity-info",11),t.j41(1,"cue-ent-list-inner",12),t.bIt("viewMarkdown",function(o){a.eBV(e);const i=t.XpG();return a.Njj(i.onEntityViewMarkdown(o))}),t.k0s()}if(2&c){const e=t.XpG();t.Y8G("entity",e.singleEntity())("handlers",e._entityInfoHandlers),t.R7$(),t.Y8G("entities",e.entityIris())("entityData",e.entityData())("handlers",e._entityHandlers())}}function G(c,l){if(1&c){const e=t.RV6();t.j41(0,"cue-ent-list-inner",13),t.bIt("rowClicked",function(o){a.eBV(e);const i=t.XpG();return a.Njj(i.onEntityRowClicked(o))})("selectionChanged",function(o){a.eBV(e);const i=t.XpG();return a.Njj(i.onEntitySelectionChanged(o))})("viewMarkdown",function(o){a.eBV(e);const i=t.XpG();return a.Njj(i.onEntityViewMarkdown(o))}),t.k0s()}if(2&c){const e=t.XpG();t.Y8G("entities",e.entityIris())("entityData",e.entityData())("handlers",e._entityHandlers())("selectable",e.selectable())}}function T(c,l){1&c&&(t.j41(0,"div",1),t.EFF(1),t.nI1(2,"transloco"),t.k0s()),2&c&&(t.R7$(),t.JRh(t.bMT(2,1,"components.contextViewer.infoNoItems")))}function B(c,l){if(1&c){const e=t.RV6();t.j41(0,"div",5)(1,"cue-button",14),t.bIt("click",function(){a.eBV(e);const o=t.XpG();return a.Njj(o.onAddSelectionClicked())}),t.nrm(2,"cue-button-padder"),t.j41(3,"cue-button-label"),t.EFF(4),t.nI1(5,"transloco"),t.k0s(),t.nrm(6,"cue-button-padder"),t.k0s()()}if(2&c){const e=t.XpG();t.R7$(),t.Y8G("loading",e.adding())("disabled",e.adding()),t.R7$(3),t.Lme(" ",t.bMT(5,4,"components.contextViewer.buttonAddSelection")," (",e.selectedIndices().length,") ")}}let L=(()=>{class c{contextId=(0,d.hFB)(void 0);handlers=(0,d.hFB)(void 0);variant=(0,d.hFB)("none");contextDoc=(0,d.hFB)(void 0);documentData=(0,d.hFB)({});entityData=(0,d.hFB)({});selectable=(0,d.hFB)(!0);adding=(0,d.hFB)(!1);itemRowClicked=(0,d.CGW)();viewMarkdown=(0,d.CGW)();addSelection=(0,d.CGW)();loading=(0,r.EW)(()=>!!this.contextId()&&!this.contextDoc());_docItems=(0,r.EW)(()=>(this.contextDoc()?.items??[]).filter(e=>"document"===e.type));_entityItems=(0,r.EW)(()=>(this.contextDoc()?.items??[]).filter(e=>"entity"===e.type));hasDocuments=(0,r.EW)(()=>this._docItems().length>0);hasEntities=(0,r.EW)(()=>this._entityItems().length>0);hasBoth=(0,r.EW)(()=>this.hasDocuments()&&this.hasEntities());documentRefs=(0,r.EW)(()=>this._docItems().map(e=>({id:e.id,relevance:e.relevance})));entityIris=(0,r.EW)(()=>this._entityItems().map(e=>e.id));singleDocument=(0,r.EW)(()=>{if(1===this._docItems().length)return this.documentData()[this._docItems()[0].id]});isSingleDocument=(0,r.EW)(()=>this.hasDocuments()&&!this.hasEntities()&&!!this.singleDocument());singleDocumentSubject=(0,r.EW)(()=>this.singleDocument()?.subject||this.singleDocument()?.path||"");singleDocumentFileLocations=(0,r.EW)(()=>{const e=this.singleDocument();return e?[{iri:e.id,path:e.path,providerId:e.providerId}]:[]});_docInfoHandlers={};singleEntity=(0,r.EW)(()=>{if(1!==this._entityItems().length)return;const e=this._entityItems()[0].id,n=this.entityData()[e];return n?{iri:e,value:n.value,categories:n.categories}:void 0});isSingleEntity=(0,r.EW)(()=>this.hasEntities()&&!this.hasDocuments()&&!!this.singleEntity());_entityInfoHandlers={};_docHandlers=(0,r.EW)(()=>({requestData:e=>this.handlers()?.requestDocumentData?.(e),requestDownload:e=>this.handlers()?.requestDownloadDocument?.(e),requestOpen:(e,n)=>this.handlers()?.requestOpenDocument?.(e,n),requestOpenInDir:(e,n)=>this.handlers()?.requestOpenDocumentInDir?.(e,n)}));_entityHandlers=(0,r.EW)(()=>({requestData:(e,n)=>this.handlers()?.requestEntityData?.(e,n),requestOpen:e=>this.handlers()?.requestOpenEntity?.(e)}));onEntityRowClicked({row:e}){this.itemRowClicked.emit({type:"entity",row:e,index:this._originalIndex(e.entity)})}onDocumentClicked(e){this.itemRowClicked.emit({type:"document",row:e,index:this._originalIndex(e.id)})}_selectedDocIndices=(0,a.vPA)([]);_selectedEntityIndices=(0,a.vPA)([]);selectedIndices=(0,r.EW)(()=>Array.from(new Set([...this._selectedDocIndices(),...this._selectedEntityIndices()])).sort((e,n)=>e-n));onDocSelectionChanged(e){this._selectedDocIndices.set(e.map(n=>this._originalIndex(n.id)).filter(n=>n>=0))}onEntitySelectionChanged(e){this._selectedEntityIndices.set(e.map(n=>this._originalIndex(n.entity)).filter(n=>n>=0))}onAddSelectionClicked(){const e=this.selectedIndices();e.length>0&&this.addSelection.emit(e)}onDocumentViewMarkdown(e){this.viewMarkdown.emit({type:"document",markdown:e})}onEntityViewMarkdown(e){this.viewMarkdown.emit({type:"entity",markdown:e})}_originalIndex(e){return(this.contextDoc()?.items??[]).findIndex(n=>n.id===e)}constructor(){let e;(0,a.QZP)(()=>{const n=this.contextId();n&&this.handlers()?.requestContext?.(n)}),(0,a.QZP)(()=>{const n=this.contextDoc()?.id;n!==e&&(e=n,this._selectedDocIndices.set([]),this._selectedEntityIndices.set([]))})}static \u0275fac=function(n){return new(n||c)};static \u0275cmp=t.VBU({type:c,selectors:[["cue-context-viewer-inner"]],inputs:{contextId:[1,"contextId"],handlers:[1,"handlers"],variant:[1,"variant"],contextDoc:[1,"contextDoc"],documentData:[1,"documentData"],entityData:[1,"entityData"],selectable:[1,"selectable"],adding:[1,"adding"]},outputs:{itemRowClicked:"itemRowClicked",viewMarkdown:"viewMarkdown",addSelection:"addSelection"},decls:10,vars:6,consts:[[2,"position","relative","height","100%","width","100%",3,"cueLogoLoader","cueLogoLoaderMessage"],[1,"cv-status"],[2,"height","100%"],[3,"documentRefs","documentData","handlers","variant","selectable"],[2,"height","400px",3,"entities","entityData","handlers","selectable"],[1,"cv-add-selection"],[3,"label"],[3,"clickedDocument","selectionChanged","viewMarkdown","documentRefs","documentData","handlers","variant","selectable"],[2,"height","100%",3,"rowClicked","selectionChanged","viewMarkdown","entities","entityData","handlers","selectable"],[3,"subject","handlers","contentCategories","fileLocations"],[2,"display","none",3,"viewMarkdown","documentRefs","documentData","handlers","variant"],[3,"entity","handlers"],[2,"display","none",3,"viewMarkdown","entities","entityData","handlers"],[2,"height","400px",3,"rowClicked","selectionChanged","viewMarkdown","entities","entityData","handlers","selectable"],["variant","primary",3,"click","loading","disabled"]],template:function(n,o){1&n&&(t.j41(0,"div",0),t.nI1(1,"transloco"),t.nVh(2,V,3,3,"div",1)(3,j,7,15,"cue-tabs",2)(4,E,2,8)(5,N,1,5,"cue-doc-list",3)(6,R,2,5)(7,G,1,4,"cue-ent-list-inner",4)(8,T,3,3,"div",1),t.nVh(9,B,7,6,"div",5),t.k0s()),2&n&&(t.Y8G("cueLogoLoader",o.loading())("cueLogoLoaderMessage",t.bMT(1,4,"components.contextViewer.infoLoading")),t.R7$(2),t.vxM(o.contextDoc()?o.hasBoth()?3:o.isSingleDocument()?4:o.hasDocuments()?5:o.isSingleEntity()?6:o.hasEntities()?7:8:2),t.R7$(7),t.vxM(o.selectable()&&o.selectedIndices().length>0?9:-1))},dependencies:[p.g,w.u,x.G,C.U,f.t,y.o,v.k,I.Button,M.ButtonLabel,b.ButtonPadder,k.Kj],styles:["[_nghost-%COMP%]{display:block;width:100%;height:100%}.cv-status[_ngcontent-%COMP%]{padding:16px;color:var(--cue-color-midgray, #888);font-size:13px}.cv-add-selection[_ngcontent-%COMP%]{position:fixed;right:24px;bottom:24px;z-index:20}"],changeDetection:0})}return c})();var X=s(35381),F=s(42245),S=s(57293),W=s(77727),P=s(13202);function Y(c,l){if(1&c&&(t.j41(0,"cue-flexcontainer",0)(1,"cue-typography",2),t.EFF(2),t.k0s()()),2&c){const e=t.XpG();t.R7$(2),t.SpI(" ",e.errorMessage()," ")}}function A(c,l){1&c&&(t.j41(0,"cue-flexcontainer",0)(1,"cue-typography",3),t.EFF(2," No project connected. "),t.k0s()())}function $(c,l){if(1&c){const e=t.RV6();t.nrm(0,"cue-document-viewer-wc",4),t.j41(1,"cue-context-viewer-inner",5),t.bIt("viewMarkdown",function(o){a.eBV(e);const i=t.XpG(2);return a.Njj(i.viewMarkdown.emit(o))}),t.k0s()}if(2&c){const e=t.XpG(2);t.Y8G("cue",e.cue())("projectId",e.projectId())("uuid",l)("showLogo",e.showLogo())("variant",e.variant()),t.R7$(),t.Y8G("contextDoc",e.contextDoc())("documentData",e.documentData())("entityData",e.entityData())("handlers",e._handlers())("variant",e.variant())}}function H(c,l){if(1&c){const e=t.RV6();t.nrm(0,"cue-entity-viewer-wc",6),t.j41(1,"cue-context-viewer-inner",5),t.bIt("viewMarkdown",function(o){a.eBV(e);const i=t.XpG(2);return a.Njj(i.viewMarkdown.emit(o))}),t.k0s()}if(2&c){const e=t.XpG(2);t.Y8G("cue",e.cue())("projectId",e.projectId())("iri",l)("showLogo",e.showLogo())("variant",e.variant()),t.R7$(),t.Y8G("contextDoc",e.contextDoc())("documentData",e.documentData())("entityData",e.entityData())("handlers",e._handlers())("variant",e.variant())}}function O(c,l){if(1&c&&t.nrm(0,"cue-logo-link",8),2&c){const e=t.XpG(3);t.Y8G("projectId",e.projectId())}}function z(c,l){if(1&c){const e=t.RV6();t.j41(0,"cue-context-viewer-inner",7),t.bIt("itemRowClicked",function(o){a.eBV(e);const i=t.XpG(2);return a.Njj(i.itemRowClicked.emit(o))})("addSelection",function(o){a.eBV(e);const i=t.XpG(2);return a.Njj(i.onAddSelection(o))})("viewMarkdown",function(o){a.eBV(e);const i=t.XpG(2);return a.Njj(i.viewMarkdown.emit(o))}),t.k0s(),t.nVh(1,O,1,1,"cue-logo-link",8)}if(2&c){const e=t.XpG(2);t.Y8G("contextDoc",e.contextDoc())("documentData",e.documentData())("entityData",e.entityData())("handlers",e._handlers())("variant",e.variant())("adding",e.adding()),t.R7$(),t.vxM(e.showLogo()?1:-1)}}function U(c,l){if(1&c&&(t.j41(0,"div",1),t.nVh(1,$,2,10)(2,H,2,10)(3,z,2,7),t.k0s()),2&c){let e;const n=t.XpG();t.Y8G("cueLogoLoader","loading"===n.state()),t.R7$(),t.vxM((e=n._singleDocumentUuid())?1:(e=n._singleEntityIri())?2:3,e)}}function K(c){return{id:c.id,contentIRI:c.contentIRI??c.id,path:c.path??"",suffix:c.suffix??"",size:c.size??0,tags:c.tags??[],summary:c.summary??"",categories:c.categories??[],subject:c.subject,providerId:c.providerId,relevance:0}}let Q=(()=>{class c{cue=(0,d.hFB)(void 0);projectId=(0,d.hFB)(void 0);contextId=(0,d.hFB)(void 0);variant=(0,d.hFB)("none");showLogo=(0,d.hFB)(!1,{transform:d.L39});itemRowClicked=(0,d.CGW)();selectionResult=(0,d.CGW)();viewMarkdown=(0,d.CGW)();adding=(0,a.vPA)(!1);state=(0,a.vPA)("idle");errorMessage=(0,a.vPA)(null);contextDoc=(0,a.vPA)(void 0);documentData=(0,a.vPA)({});entityData=(0,a.vPA)({});_documents=(0,a.vPA)(void 0);_entities=(0,a.vPA)(void 0);_unsubDocs;_unsubEntities;_inputWarningTimer;_singleDocumentUuid=(0,r.EW)(()=>{const e=this.contextDoc()?.items??[],n=e.filter(i=>"document"===i.type),o=e.filter(i=>"entity"===i.type);return 1===n.length&&0===o.length?n[0].id:void 0});_singleEntityIri=(0,r.EW)(()=>{const e=this.contextDoc()?.items??[],n=e.filter(i=>"document"===i.type),o=e.filter(i=>"entity"===i.type);return 1===o.length&&0===n.length?o[0].id:void 0});_handlers=(0,r.EW)(()=>({requestDocumentData:e=>this._documents()?.requestDocumentData(e),requestEntityData:(e,n)=>this._entities()?.requestEntityData(e,n)}));onAddSelection(e){var n=this;return(0,g.A)(function*(){const o=n.cue(),i=n.projectId(),u=n.contextId();if(o&&i&&u&&0!==e.length){n.adding.set(!0);try{const _=yield o.api.mcp.callTool("select",{ctx:u,column:"index",value:e,space_id:i});n.selectionResult.emit(_)}catch(_){console.error('[cue-context-viewer] "select" MCP call failed',_)}finally{n.adding.set(!1)}}})()}constructor(){this._inputWarningTimer=setTimeout(()=>{this.cue()||console.warn('[cue-context-viewer] Required input "cue" is not set. Pass an authenticated Cue SDK instance.'),this.projectId()||console.warn('[cue-context-viewer] Required input "projectId" is not set.'),this.contextId()||console.warn('[cue-context-viewer] Required input "contextId" is not set.')},3e3),(0,a.QZP)(()=>{this._load(this.cue(),this.projectId(),this.contextId())})}ngOnDestroy(){clearTimeout(this._inputWarningTimer),this._teardown()}_load(e,n,o){var i=this;return(0,g.A)(function*(){if(i._teardown(),i.contextDoc.set(void 0),i.documentData.set({}),i.entityData.set({}),e&&n&&o){i.state.set("loading"),i.errorMessage.set(null);try{const u=yield e.api.contexts.getContext(n,o);i.contextDoc.set(u);const _=new h.f$(e.api,n),m=new h.g8(e.api,n);i._documents.set(_),i._entities.set(m),i._unsubDocs=_.documentInfoMap.subscribe(()=>i._syncDocumentData(_)),i._unsubEntities=m.entityInfoMap.subscribe(()=>i._syncEntityData(m)),i.state.set("ready")}catch(u){console.error("[cue-context-viewer] Failed to load context",u),i.errorMessage.set(u instanceof Error?u.message:"Failed to load context."),i.state.set("error")}}else i.state.set("idle")})()}_syncDocumentData(e){const n=e.documentInfoMap.get(),o={};for(const[i,u]of Object.entries(n))o[i]=K(u);this.documentData.set(o)}_syncEntityData(e){const n=e.entityInfoMap.get(),o={};for(const[i,u]of Object.entries(n))o[i]={value:u.value??i,categories:u.categories??[],mentionCount:u.mentionCount};this.entityData.set(o)}_teardown(){this._unsubDocs?.(),this._unsubEntities?.(),this._unsubDocs=void 0,this._unsubEntities=void 0,this._documents.set(void 0),this._entities.set(void 0)}static \u0275fac=function(n){return new(n||c)};static \u0275cmp=t.VBU({type:c,selectors:[["cue-context-viewer"]],inputs:{cue:[1,"cue"],projectId:[1,"projectId"],contextId:[1,"contextId"],variant:[1,"variant"],showLogo:[1,"showLogo"]},outputs:{itemRowClicked:"itemRowClicked",selectionResult:"selectionResult",viewMarkdown:"viewMarkdown"},decls:3,vars:1,consts:[["direction","column","align","center","justify","center",2,"height","100%","width","100%","padding","8px"],[2,"position","relative","height","100%","width","100%",3,"cueLogoLoader"],[2,"color","#c44","font-size","13px"],[2,"color","#9ca3af","font-size","13px"],[2,"height","100%","display","block",3,"cue","projectId","uuid","showLogo","variant"],[2,"display","none",3,"viewMarkdown","contextDoc","documentData","entityData","handlers","variant"],[2,"height","100%","display","block",3,"cue","projectId","iri","showLogo","variant"],[2,"height","100%",3,"itemRowClicked","addSelection","viewMarkdown","contextDoc","documentData","entityData","handlers","variant","adding"],[2,"position","absolute","top","12px","left","12px","z-index","5",3,"projectId"]],template:function(n,o){1&n&&t.nVh(0,Y,3,1,"cue-flexcontainer",0)(1,A,3,0,"cue-flexcontainer",0)(2,U,4,2,"div",1),2&n&&t.vxM("error"===o.state()?0:"idle"===o.state()?1:2)},dependencies:[L,X.FlexContainer,F.Typography,v.k,S.x,W.CueDocumentViewer,P.CueEntityViewer],styles:["[_nghost-%COMP%]{display:block;width:100%;height:100%}"],changeDetection:0})}return c})()}}]);
1
+ "use strict";(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[9396],{19396(Z,D,s){s.d(D,{CueContextViewer:()=>Q});var g=s(10467),d=s(17705),a=s(85802),r=s(32271),h=s(91110),p=s(73656),w=s(32839),x=s(74631),C=s(91625),f=s(16455),y=s(68334),v=s(97851),I=s(85971),M=s(75448),b=s(2014),k=s(59352),t=s(35547);function V(c,l){1&c&&(t.j41(0,"div",1),t.EFF(1),t.nI1(2,"transloco"),t.k0s()),2&c&&(t.R7$(),t.JRh(t.bMT(2,1,"components.contextViewer.infoNoContext")))}function j(c,l){if(1&c){const e=t.RV6();t.j41(0,"cue-tabs",2)(1,"cue-tab",6),t.nI1(2,"transloco"),t.j41(3,"cue-doc-list",7),t.bIt("clickedDocument",function(o){a.eBV(e);const i=t.XpG();return a.Njj(i.onDocumentClicked(o))})("selectionChanged",function(o){a.eBV(e);const i=t.XpG();return a.Njj(i.onDocSelectionChanged(o))})("viewMarkdown",function(o){a.eBV(e);const i=t.XpG();return a.Njj(i.onDocumentViewMarkdown(o))}),t.k0s()(),t.j41(4,"cue-tab",6),t.nI1(5,"transloco"),t.j41(6,"cue-ent-list-inner",8),t.bIt("rowClicked",function(o){a.eBV(e);const i=t.XpG();return a.Njj(i.onEntityRowClicked(o))})("selectionChanged",function(o){a.eBV(e);const i=t.XpG();return a.Njj(i.onEntitySelectionChanged(o))})("viewMarkdown",function(o){a.eBV(e);const i=t.XpG();return a.Njj(i.onEntityViewMarkdown(o))}),t.k0s()()()}if(2&c){const e=t.XpG();t.R7$(),t.Y8G("label",t.bMT(2,11,"components.contextViewer.tabDocuments")),t.R7$(2),t.Y8G("documentRefs",e.documentRefs())("documentData",e.documentData())("handlers",e._docHandlers())("variant",e.variant())("selectable",e.selectable()),t.R7$(),t.Y8G("label",t.bMT(5,13,"components.contextViewer.tabEntities")),t.R7$(2),t.Y8G("entities",e.entityIris())("entityData",e.entityData())("handlers",e._entityHandlers())("selectable",e.selectable())}}function E(c,l){if(1&c){const e=t.RV6();t.nrm(0,"cue-document-info",9),t.j41(1,"cue-doc-list",10),t.bIt("viewMarkdown",function(o){a.eBV(e);const i=t.XpG();return a.Njj(i.onDocumentViewMarkdown(o))}),t.k0s()}if(2&c){const e=t.XpG();t.Y8G("subject",e.singleDocumentSubject())("handlers",e._docInfoHandlers)("contentCategories",e.singleDocument().categories)("fileLocations",e.singleDocumentFileLocations()),t.R7$(),t.Y8G("documentRefs",e.documentRefs())("documentData",e.documentData())("handlers",e._docHandlers())("variant",e.variant())}}function N(c,l){if(1&c){const e=t.RV6();t.j41(0,"cue-doc-list",7),t.bIt("clickedDocument",function(o){a.eBV(e);const i=t.XpG();return a.Njj(i.onDocumentClicked(o))})("selectionChanged",function(o){a.eBV(e);const i=t.XpG();return a.Njj(i.onDocSelectionChanged(o))})("viewMarkdown",function(o){a.eBV(e);const i=t.XpG();return a.Njj(i.onDocumentViewMarkdown(o))}),t.k0s()}if(2&c){const e=t.XpG();t.Y8G("documentRefs",e.documentRefs())("documentData",e.documentData())("handlers",e._docHandlers())("variant",e.variant())("selectable",e.selectable())}}function R(c,l){if(1&c){const e=t.RV6();t.nrm(0,"cue-entity-info",11),t.j41(1,"cue-ent-list-inner",12),t.bIt("viewMarkdown",function(o){a.eBV(e);const i=t.XpG();return a.Njj(i.onEntityViewMarkdown(o))}),t.k0s()}if(2&c){const e=t.XpG();t.Y8G("entity",e.singleEntity())("handlers",e._entityInfoHandlers),t.R7$(),t.Y8G("entities",e.entityIris())("entityData",e.entityData())("handlers",e._entityHandlers())}}function G(c,l){if(1&c){const e=t.RV6();t.j41(0,"cue-ent-list-inner",13),t.bIt("rowClicked",function(o){a.eBV(e);const i=t.XpG();return a.Njj(i.onEntityRowClicked(o))})("selectionChanged",function(o){a.eBV(e);const i=t.XpG();return a.Njj(i.onEntitySelectionChanged(o))})("viewMarkdown",function(o){a.eBV(e);const i=t.XpG();return a.Njj(i.onEntityViewMarkdown(o))}),t.k0s()}if(2&c){const e=t.XpG();t.Y8G("entities",e.entityIris())("entityData",e.entityData())("handlers",e._entityHandlers())("selectable",e.selectable())}}function T(c,l){1&c&&(t.j41(0,"div",1),t.EFF(1),t.nI1(2,"transloco"),t.k0s()),2&c&&(t.R7$(),t.JRh(t.bMT(2,1,"components.contextViewer.infoNoItems")))}function B(c,l){if(1&c){const e=t.RV6();t.j41(0,"div",5)(1,"cue-button",14),t.bIt("click",function(){a.eBV(e);const o=t.XpG();return a.Njj(o.onAddSelectionClicked())}),t.nrm(2,"cue-button-padder"),t.j41(3,"cue-button-label"),t.EFF(4),t.nI1(5,"transloco"),t.k0s(),t.nrm(6,"cue-button-padder"),t.k0s()()}if(2&c){const e=t.XpG();t.R7$(),t.Y8G("loading",e.adding())("disabled",e.adding()),t.R7$(3),t.Lme(" ",t.bMT(5,4,"components.contextViewer.buttonAddSelection")," (",e.selectedIndices().length,") ")}}let L=(()=>{class c{contextId=(0,d.hFB)(void 0);handlers=(0,d.hFB)(void 0);variant=(0,d.hFB)("none");contextDoc=(0,d.hFB)(void 0);documentData=(0,d.hFB)({});entityData=(0,d.hFB)({});selectable=(0,d.hFB)(!0);adding=(0,d.hFB)(!1);itemRowClicked=(0,d.CGW)();viewMarkdown=(0,d.CGW)();addSelection=(0,d.CGW)();loading=(0,r.EW)(()=>!!this.contextId()&&!this.contextDoc());_docItems=(0,r.EW)(()=>(this.contextDoc()?.items??[]).filter(e=>"document"===e.type));_entityItems=(0,r.EW)(()=>(this.contextDoc()?.items??[]).filter(e=>"entity"===e.type));hasDocuments=(0,r.EW)(()=>this._docItems().length>0);hasEntities=(0,r.EW)(()=>this._entityItems().length>0);hasBoth=(0,r.EW)(()=>this.hasDocuments()&&this.hasEntities());documentRefs=(0,r.EW)(()=>this._docItems().map(e=>({id:e.id,relevance:e.relevance})));entityIris=(0,r.EW)(()=>this._entityItems().map(e=>e.id));singleDocument=(0,r.EW)(()=>{if(1===this._docItems().length)return this.documentData()[this._docItems()[0].id]});isSingleDocument=(0,r.EW)(()=>this.hasDocuments()&&!this.hasEntities()&&!!this.singleDocument());singleDocumentSubject=(0,r.EW)(()=>this.singleDocument()?.subject||this.singleDocument()?.path||"");singleDocumentFileLocations=(0,r.EW)(()=>{const e=this.singleDocument();return e?[{iri:e.id,path:e.path,providerId:e.providerId}]:[]});_docInfoHandlers={};singleEntity=(0,r.EW)(()=>{if(1!==this._entityItems().length)return;const e=this._entityItems()[0].id,n=this.entityData()[e];return n?{iri:e,value:n.value,categories:n.categories}:void 0});isSingleEntity=(0,r.EW)(()=>this.hasEntities()&&!this.hasDocuments()&&!!this.singleEntity());_entityInfoHandlers={};_docHandlers=(0,r.EW)(()=>({requestData:e=>this.handlers()?.requestDocumentData?.(e),requestDownload:e=>this.handlers()?.requestDownloadDocument?.(e),requestOpen:(e,n)=>this.handlers()?.requestOpenDocument?.(e,n),requestOpenInDir:(e,n)=>this.handlers()?.requestOpenDocumentInDir?.(e,n)}));_entityHandlers=(0,r.EW)(()=>({requestData:(e,n)=>this.handlers()?.requestEntityData?.(e,n),requestOpen:e=>this.handlers()?.requestOpenEntity?.(e)}));onEntityRowClicked({row:e}){this.itemRowClicked.emit({type:"entity",row:e,index:this._originalIndex(e.entity)})}onDocumentClicked(e){this.itemRowClicked.emit({type:"document",row:e,index:this._originalIndex(e.id)})}_selectedDocIndices=(0,a.vPA)([]);_selectedEntityIndices=(0,a.vPA)([]);selectedIndices=(0,r.EW)(()=>Array.from(new Set([...this._selectedDocIndices(),...this._selectedEntityIndices()])).sort((e,n)=>e-n));onDocSelectionChanged(e){this._selectedDocIndices.set(e.map(n=>this._originalIndex(n.id)).filter(n=>n>=0))}onEntitySelectionChanged(e){this._selectedEntityIndices.set(e.map(n=>this._originalIndex(n.entity)).filter(n=>n>=0))}onAddSelectionClicked(){const e=this.selectedIndices();e.length>0&&this.addSelection.emit(e)}onDocumentViewMarkdown(e){this.viewMarkdown.emit({type:"document",markdown:e})}onEntityViewMarkdown(e){this.viewMarkdown.emit({type:"entity",markdown:e})}_originalIndex(e){return(this.contextDoc()?.items??[]).findIndex(n=>n.id===e)}constructor(){let e;(0,a.QZP)(()=>{const n=this.contextId();n&&this.handlers()?.requestContext?.(n)}),(0,a.QZP)(()=>{const n=this.contextDoc()?.id;n!==e&&(e=n,this._selectedDocIndices.set([]),this._selectedEntityIndices.set([]))})}static \u0275fac=function(n){return new(n||c)};static \u0275cmp=t.VBU({type:c,selectors:[["cue-context-viewer-inner"]],inputs:{contextId:[1,"contextId"],handlers:[1,"handlers"],variant:[1,"variant"],contextDoc:[1,"contextDoc"],documentData:[1,"documentData"],entityData:[1,"entityData"],selectable:[1,"selectable"],adding:[1,"adding"]},outputs:{itemRowClicked:"itemRowClicked",viewMarkdown:"viewMarkdown",addSelection:"addSelection"},decls:10,vars:6,consts:[[2,"position","relative","height","100%","width","100%",3,"cueLogoLoader","cueLogoLoaderMessage"],[1,"cv-status"],[2,"height","100%"],[3,"documentRefs","documentData","handlers","variant","selectable"],[2,"height","400px",3,"entities","entityData","handlers","selectable"],[1,"cv-add-selection"],[3,"label"],[3,"clickedDocument","selectionChanged","viewMarkdown","documentRefs","documentData","handlers","variant","selectable"],[2,"height","100%",3,"rowClicked","selectionChanged","viewMarkdown","entities","entityData","handlers","selectable"],[3,"subject","handlers","contentCategories","fileLocations"],[2,"display","none",3,"viewMarkdown","documentRefs","documentData","handlers","variant"],[3,"entity","handlers"],[2,"display","none",3,"viewMarkdown","entities","entityData","handlers"],[2,"height","400px",3,"rowClicked","selectionChanged","viewMarkdown","entities","entityData","handlers","selectable"],["variant","primary",3,"click","loading","disabled"]],template:function(n,o){1&n&&(t.j41(0,"div",0),t.nI1(1,"transloco"),t.nVh(2,V,3,3,"div",1)(3,j,7,15,"cue-tabs",2)(4,E,2,8)(5,N,1,5,"cue-doc-list",3)(6,R,2,5)(7,G,1,4,"cue-ent-list-inner",4)(8,T,3,3,"div",1),t.nVh(9,B,7,6,"div",5),t.k0s()),2&n&&(t.Y8G("cueLogoLoader",o.loading())("cueLogoLoaderMessage",t.bMT(1,4,"components.contextViewer.infoLoading")),t.R7$(2),t.vxM(o.contextDoc()?o.hasBoth()?3:o.isSingleDocument()?4:o.hasDocuments()?5:o.isSingleEntity()?6:o.hasEntities()?7:8:2),t.R7$(7),t.vxM(o.selectable()&&o.selectedIndices().length>0?9:-1))},dependencies:[p.g,w.u,x.G,C.U,f.t,y.o,v.k,I.Button,M.ButtonLabel,b.ButtonPadder,k.Kj],styles:["[_nghost-%COMP%]{display:block;width:100%;height:100%}.cv-status[_ngcontent-%COMP%]{padding:16px;color:var(--cue-color-midgray, #888);font-size:13px}.cv-add-selection[_ngcontent-%COMP%]{position:fixed;right:24px;bottom:24px;z-index:20}"],changeDetection:0})}return c})();var X=s(35381),F=s(42245),S=s(57293),W=s(77727),P=s(13202);function Y(c,l){if(1&c&&(t.j41(0,"cue-flexcontainer",0)(1,"cue-typography",2),t.EFF(2),t.k0s()()),2&c){const e=t.XpG();t.R7$(2),t.SpI(" ",e.errorMessage()," ")}}function A(c,l){1&c&&(t.j41(0,"cue-flexcontainer",0)(1,"cue-typography",3),t.EFF(2," No project connected. "),t.k0s()())}function $(c,l){if(1&c){const e=t.RV6();t.nrm(0,"cue-document-viewer-wc",4),t.j41(1,"cue-context-viewer-inner",5),t.bIt("viewMarkdown",function(o){a.eBV(e);const i=t.XpG(2);return a.Njj(i.viewMarkdown.emit(o))}),t.k0s()}if(2&c){const e=t.XpG(2);t.Y8G("cue",e.cue())("projectId",e.projectId())("uuid",l)("showLogo",e.showLogo())("variant",e.variant()),t.R7$(),t.Y8G("contextDoc",e.contextDoc())("documentData",e.documentData())("entityData",e.entityData())("handlers",e._handlers())("variant",e.variant())}}function H(c,l){if(1&c){const e=t.RV6();t.nrm(0,"cue-entity-viewer-wc",6),t.j41(1,"cue-context-viewer-inner",5),t.bIt("viewMarkdown",function(o){a.eBV(e);const i=t.XpG(2);return a.Njj(i.viewMarkdown.emit(o))}),t.k0s()}if(2&c){const e=t.XpG(2);t.Y8G("cue",e.cue())("projectId",e.projectId())("iri",l)("showLogo",e.showLogo())("variant",e.variant()),t.R7$(),t.Y8G("contextDoc",e.contextDoc())("documentData",e.documentData())("entityData",e.entityData())("handlers",e._handlers())("variant",e.variant())}}function O(c,l){if(1&c&&t.nrm(0,"cue-logo-link",8),2&c){const e=t.XpG(3);t.Y8G("projectId",e.projectId())}}function z(c,l){if(1&c){const e=t.RV6();t.j41(0,"cue-context-viewer-inner",7),t.bIt("itemRowClicked",function(o){a.eBV(e);const i=t.XpG(2);return a.Njj(i.itemRowClicked.emit(o))})("addSelection",function(o){a.eBV(e);const i=t.XpG(2);return a.Njj(i.onAddSelection(o))})("viewMarkdown",function(o){a.eBV(e);const i=t.XpG(2);return a.Njj(i.viewMarkdown.emit(o))}),t.k0s(),t.nVh(1,O,1,1,"cue-logo-link",8)}if(2&c){const e=t.XpG(2);t.Y8G("contextDoc",e.contextDoc())("documentData",e.documentData())("entityData",e.entityData())("handlers",e._handlers())("variant",e.variant())("adding",e.adding()),t.R7$(),t.vxM(e.showLogo()?1:-1)}}function U(c,l){if(1&c&&(t.j41(0,"div",1),t.nVh(1,$,2,10)(2,H,2,10)(3,z,2,7),t.k0s()),2&c){let e;const n=t.XpG();t.Y8G("cueLogoLoader","loading"===n.state()),t.R7$(),t.vxM((e=n._singleDocumentUuid())?1:(e=n._singleEntityIri())?2:3,e)}}function K(c){return{id:c.id,contentIRI:c.contentIRI??c.id,path:c.path??"",suffix:c.suffix??"",size:c.size??0,tags:c.tags??[],summary:c.summary??"",categories:c.categories??[],subject:c.subject,providerId:c.providerId,relevance:0}}let Q=(()=>{class c{cue=(0,d.hFB)(void 0);projectId=(0,d.hFB)(void 0);contextId=(0,d.hFB)(void 0);variant=(0,d.hFB)("none");showLogo=(0,d.hFB)(!1,{transform:d.L39});itemRowClicked=(0,d.CGW)();selectionResult=(0,d.CGW)();viewMarkdown=(0,d.CGW)();adding=(0,a.vPA)(!1);state=(0,a.vPA)("idle");errorMessage=(0,a.vPA)(null);contextDoc=(0,a.vPA)(void 0);documentData=(0,a.vPA)({});entityData=(0,a.vPA)({});_documents=(0,a.vPA)(void 0);_entities=(0,a.vPA)(void 0);_unsubDocs;_unsubEntities;_inputWarningTimer;_singleDocumentUuid=(0,r.EW)(()=>{const e=this.contextDoc()?.items??[],n=e.filter(i=>"document"===i.type),o=e.filter(i=>"entity"===i.type);return 1===n.length&&0===o.length?n[0].id:void 0});_singleEntityIri=(0,r.EW)(()=>{const e=this.contextDoc()?.items??[],n=e.filter(i=>"document"===i.type),o=e.filter(i=>"entity"===i.type);return 1===o.length&&0===n.length?o[0].id:void 0});_handlers=(0,r.EW)(()=>({requestDocumentData:e=>this._documents()?.requestDocumentData(e),requestEntityData:(e,n)=>this._entities()?.requestEntityData(e,n)}));onAddSelection(e){var n=this;return(0,g.A)(function*(){const o=n.cue(),i=n.projectId(),u=n.contextId();if(o&&i&&u&&0!==e.length){n.adding.set(!0);try{const _=yield o.api.mcp.callTool("select",{ctx:u,column:"index",value:e,space_id:i});n.selectionResult.emit(_)}catch(_){console.error('[cue-context-viewer] "select" MCP call failed',_)}finally{n.adding.set(!1)}}})()}constructor(){this._inputWarningTimer=setTimeout(()=>{this.cue()||console.warn('[cue-context-viewer] Required input "cue" is not set. Pass an authenticated Cue SDK instance.'),this.projectId()||console.warn('[cue-context-viewer] Required input "projectId" is not set.'),this.contextId()||console.warn('[cue-context-viewer] Required input "contextId" is not set.')},3e3),(0,a.QZP)(()=>{this._load(this.cue(),this.projectId(),this.contextId())})}ngOnDestroy(){clearTimeout(this._inputWarningTimer),this._teardown()}_load(e,n,o){var i=this;return(0,g.A)(function*(){if(i._teardown(),i.contextDoc.set(void 0),i.documentData.set({}),i.entityData.set({}),e&&n&&o){i.state.set("loading"),i.errorMessage.set(null);try{const u=yield e.api.contexts.getContext(n,o);i.contextDoc.set(u);const _=new h.f$(e.api,n),m=new h.g8(e.api,n);i._documents.set(_),i._entities.set(m),i._unsubDocs=_.documentInfoMap.subscribe(()=>i._syncDocumentData(_)),i._unsubEntities=m.entityInfoMap.subscribe(()=>i._syncEntityData(m)),i.state.set("ready")}catch(u){console.error("[cue-context-viewer] Failed to load context",u),i.errorMessage.set(u instanceof Error?u.message:"Failed to load context."),i.state.set("error")}}else i.state.set("idle")})()}_syncDocumentData(e){const n=e.documentInfoMap.get(),o={};for(const[i,u]of Object.entries(n))o[i]=K(u);this.documentData.set(o)}_syncEntityData(e){const n=e.entityInfoMap.get(),o={};for(const[i,u]of Object.entries(n))o[i]={value:u.value??i,categories:u.categories??[],mentionCount:u.mentionCount};this.entityData.set(o)}_teardown(){this._unsubDocs?.(),this._unsubEntities?.(),this._unsubDocs=void 0,this._unsubEntities=void 0,this._documents.set(void 0),this._entities.set(void 0)}static \u0275fac=function(n){return new(n||c)};static \u0275cmp=t.VBU({type:c,selectors:[["cue-context-viewer"]],inputs:{cue:[1,"cue"],projectId:[1,"projectId"],contextId:[1,"contextId"],variant:[1,"variant"],showLogo:[1,"showLogo"]},outputs:{itemRowClicked:"itemRowClicked",selectionResult:"selectionResult",viewMarkdown:"viewMarkdown"},decls:3,vars:1,consts:[["direction","column","align","center","justify","center",2,"height","100%","width","100%","padding","8px"],[2,"position","relative","height","100%","width","100%",3,"cueLogoLoader"],[2,"color","#c44","font-size","13px"],[2,"color","#9ca3af","font-size","13px"],[2,"height","100%","display","block",3,"cue","projectId","uuid","showLogo","variant"],[2,"display","none",3,"viewMarkdown","contextDoc","documentData","entityData","handlers","variant"],[2,"height","100%","display","block",3,"cue","projectId","iri","showLogo","variant"],[2,"height","100%",3,"itemRowClicked","addSelection","viewMarkdown","contextDoc","documentData","entityData","handlers","variant","adding"],[2,"position","absolute","top","12px","left","12px","z-index","5",3,"projectId"]],template:function(n,o){1&n&&t.nVh(0,Y,3,1,"cue-flexcontainer",0)(1,A,3,0,"cue-flexcontainer",0)(2,U,4,2,"div",1),2&n&&t.vxM("error"===o.state()?0:"idle"===o.state()?1:2)},dependencies:[L,X.FlexContainer,F.Typography,v.k,S.x,W.CueDocumentViewer,P.CueEntityViewer],styles:["[_nghost-%COMP%]{display:block;width:100%;height:100%}"],changeDetection:0})}return c})()}}]);
package/README.md CHANGED
@@ -109,6 +109,26 @@ import '@qaecy/cue-ui';
109
109
  import '@qaecy/cue-ui/styles';
110
110
  ```
111
111
 
112
+ > **With a bundler (Vite, esbuild, …)** — prefer serving the package as static files over
113
+ > importing it. The loader fetches its ~110 lazy chunks, the IFC wasm and the PDF worker
114
+ > relative to wherever `index.js` is hosted, and re-bundling it breaks that. Copy
115
+ > `node_modules/@qaecy/cue-ui/` to e.g. `/cue-ui/` in your build output and add
116
+ > `<script type="module" src="/cue-ui/index.js"></script>`. This also removes the jsDelivr
117
+ > dependency, which matters under a strict CSP or on-prem.
118
+
119
+ ### Loader behaviour
120
+
121
+ - **Lazy boot.** Angular starts only when the first cue-ui tag is requested (`data-components`)
122
+ or appears in the DOM, so loading the script up front costs one request.
123
+ - **Dynamic tags.** Tags added to `document` later — including by a host that renders
124
+ everything from JS — are registered automatically. `data-components` is only needed to
125
+ preload chunks. Tags created inside another element's shadow root are not seen.
126
+ - **Language** follows `<html lang>` (`en`, `da`, `de`, `fr`, `it`; `de-CH` → `de`; anything
127
+ else → `en`), and changes to the attribute switch the language live.
128
+ - **Static assets.** `wasm/ifc-lite_bg.wasm` (IFC geometry) and `pdf.worker.min.mjs` ship
129
+ with the package and are resolved next to `index.js`. Set `window.pdfWorkerSrc` before
130
+ loading the script to use a different PDF worker.
131
+
112
132
  ---
113
133
 
114
134
  ## `<cue-logo>`
package/common.js CHANGED
@@ -1 +1 @@
1
- (self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[2076],{90417(h,f,e){"use strict";e.d(f,{m:()=>c});var l=e(58469);class s{mtextRender}class c{baseUrl;useMainThreadDraw=!0;webworkerFileUrls=new s;toolbar=new l.g;pickingEnabled=!0}},58469(h,f,e){"use strict";e.d(f,{g:()=>l});class l{hidden=!1;position="bottom";margin="20px";displayZoom=!0;displayLayers=!0;displayLayouts=!0;displayBlackWhite=!0;displaySnapMenu=!1}},61485(h,f,e){"use strict";e.d(f,{B:()=>n});var l=e(10467),s=e(17705),c=e(85802),g=e(49769),p=e(96696),i=e(35547);const a=["panel"];let n=(()=>{class r{content=(0,s.geq)("");type=(0,s.hFB)("text");variant=(0,s.hFB)("default");readonly=(0,s.hFB)(!1);contentChanged=(0,s.CGW)();invalid=(0,s.CGW)();error=(0,s.CGW)();panel;_editor;_buildToken=0;onVariantChange=(0,c.QZP)(()=>{const o=this.variant();void 0!==this._editor&&(this._editor.theme=o)});editorValue=(0,c.vPA)("");onContentChange=(0,c.QZP)(()=>{const o=this.content();if(o===this.editorValue())return;let m=o;const O=this.type();"json"!==O&&"jsonld"!==O&&"object"==typeof m&&(m=JSON.stringify(m,null,2)),void 0!==this._editor&&this._editor.content!==m&&(this._editor.content=m)});ngAfterViewInit(){Promise.resolve().then(()=>{this.build()})}build(){var o=this;return(0,l.A)(function*(){let d=o.type();"string"!=typeof o.content()&&"jsonld"!==d&&(d="json");const m=++o._buildToken,O=yield(0,p.i)(d,o.panel.nativeElement,o.variant());if(m!==o._buildToken)return void O.dispose();o._editor=O;const D=o.content();if(o._editor.content=D,o.editorValue.set(D),o.readonly()){const y=o._editor._editor;if(y){const{applyReadOnly:v}=yield Promise.all([e.e(1380),e.e(6670)]).then(e.bind(e,76670));v(y)}}o._editor.events.addListener("contentChanged",y=>{o.content()!==y&&(o.editorValue.set(y),o.contentChanged.emit(y),o.content.set(y))}),o._editor.events.addListener("contentValid",y=>{o.invalid.emit(!y)}),o._editor.events.addListener("error",y=>{o.error.emit(y)})})()}static \u0275fac=function(d){return new(d||r)};static \u0275cmp=i.VBU({type:r,selectors:[["cue-code-editor"]],viewQuery:function(d,m){if(1&d&&i.GBs(a,5),2&d){let O;i.mGM(O=i.lsd())&&(m.panel=O.first)}},inputs:{content:[1,"content"],type:[1,"type"],variant:[1,"variant"],readonly:[1,"readonly"]},outputs:{content:"contentChange",contentChanged:"contentChanged",invalid:"invalid",error:"error"},decls:2,vars:0,consts:[["panel",""],[1,"panel"]],template:function(d,m){1&d&&i.Hgh(0,"div",1,0)},dependencies:[g.MD],styles:["[_nghost-%COMP%]{display:contents}.panel[_ngcontent-%COMP%]{overflow-y:auto;height:100%;width:100%;border:1px solid var(--borderColor-default);text-align:left}"]})}return r})()},43418(h,f,e){"use strict";e.r(f),e.d(f,{DocumentViewerInteractions:()=>p,DocumentViewerSettings:()=>g,IfcViewerInteractions:()=>i});var l=e(90417),s=e(76149),c=e(43231);class g{bim=new c.IfcViewerSettings;cad=new l.m;pdf=new s._}class p{ifc=new i}class i{clickedElement=null;selectedElements=null}},43231(h,f,e){"use strict";e.r(f),e.d(f,{IfcViewerSettings:()=>s,ModelDef:()=>c,ModelOverrides:()=>g});var l=e(49329);class s{showModelList=!0;clickEnabled=!0;showPropertiesOnClick=!0;elementClickOptions=[];toolbar=new l.g;detailedViewEnabled=!1}class c{id;name;fileURL;visible;overrides=new g;constructor(i,a,n,r=!0){this.id=i,this.name=a,this.fileURL=n,this.visible=r}}class g{hiddenTypes=[/SPACE/i]}},49329(h,f,e){"use strict";e.d(f,{g:()=>l});class l{hidden=!1;position="bottom";margin="20px";displayZoom=!0;displayDecompositionTree=void 0}},2036(h,f,e){"use strict";function l(){return{xywhs:[],circles:[],polygons:[],svgPaths:[]}}e.d(f,{x:()=>l})},55821(h,f,e){"use strict";e.d(f,{m:()=>y});var l=e(17705),s=e(85802),c=e(32271),g=e(59352),p=e(13319),i=e(85971),a=e(35381),n=e(42245),r=e(70063),t=e(35547);const o=(v,E,u)=>({startIndex:v,endIndex:E,totalItems:u});function d(v,E){if(1&v){const u=t.RV6();t.j41(0,"cue-flexcontainer",3)(1,"cue-typography",4),t.EFF(2),t.nI1(3,"transloco"),t.k0s(),t.j41(4,"cue-select",5),t.mxI("valueChange",function(P){s.eBV(u);const C=t.XpG(2);return t.DH7(C.pageSize,P)||(C.pageSize=P),s.Njj(P)}),t.k0s()(),t.nrm(5,"span",6)}if(2&v){const u=t.XpG(2);t.R7$(),t.Y8G("noWrap",!0),t.R7$(),t.JRh(t.bMT(3,5,"components.paginator.itemsPerPage")),t.R7$(2),t.R50("value",u.pageSize),t.Y8G("options",u.pageSizeOptions())("underline",!1)}}function m(v,E){if(1&v&&t.nVh(0,d,6,7),2&v){const u=t.XpG();t.vxM(u.pageSizeOptions().length>1?0:-1)}}function O(v,E){if(1&v){const u=t.RV6();t.j41(0,"cue-button",7),t.bIt("click",function(){s.eBV(u);const P=t.XpG();return s.Njj(P.first())}),t.nrm(1,"cue-button-icon",8),t.k0s(),t.j41(2,"cue-button",7),t.bIt("click",function(){s.eBV(u);const P=t.XpG();return s.Njj(P.back())}),t.nrm(3,"cue-button-icon",9),t.k0s()}}function D(v,E){if(1&v){const u=t.RV6();t.j41(0,"cue-button",7),t.bIt("click",function(){s.eBV(u);const P=t.XpG();return s.Njj(P.next())}),t.nrm(1,"cue-button-icon",10),t.k0s(),t.j41(2,"cue-button",7),t.bIt("click",function(){s.eBV(u);const P=t.XpG();return s.Njj(P.last())}),t.nrm(3,"cue-button-icon",11),t.k0s()}}let y=(()=>{class v{pageSizeOptions=(0,l.hFB)([5,10,25,100]);size=(0,l.hFB)(111);pageSize=(0,l.geq)(10);menuPosition=(0,l.hFB)("topright");autoAdjust=(0,l.hFB)(!0);currentPage=(0,l.CGW)();_startIndex=(0,s.vPA)(0);_endIndex=(0,s.vPA)(0);anythingToPaginate=(0,c.EW)(()=>{const u=this.adjustedPageSizeOptions()[this.adjustedPageSizeOptions().length-1];return this.size()>u});startIndex=(0,c.EW)(()=>this._startIndex()+1);endIndex=(0,c.EW)(()=>Math.min(this._endIndex(),this.size()));isFirstPage=(0,c.EW)(()=>0===this._startIndex());isLastPage=(0,c.EW)(()=>this._endIndex()>=this.size());adjustedPageSizeOptions=(0,c.EW)(()=>{let u=this.pageSizeOptions();if(!this.autoAdjust())return u;const x=u[u.length-1],P=this.size();return P<x&&(u=u.filter(C=>C<=P),u.length||(u=[P])),u});constructor(){(0,s.QZP)(()=>{this._resetPagination()}),(0,s.QZP)(()=>{this.currentPage.emit({startIndex:this._startIndex(),endIndex:this._endIndex(),pageSize:this.pageSize()})})}setSize(u){this.pageSize.set(u),this._resetPagination()}next(){const u=this._endIndex();this._startIndex.set(u),this._endIndex.set(u+this.pageSize())}back(){const u=Math.max(0,this._startIndex()-this.pageSize());this._startIndex.set(u),this._endIndex.set(u+this.pageSize())}first(){this._startIndex.set(0),this._endIndex.set(this.pageSize())}last(){const u=Math.max(0,this.size()-(this.size()%this.pageSize()||this.pageSize()));this._startIndex.set(u),this._endIndex.set(this.size())}_resetPagination(){this._startIndex.set(0),this._endIndex.set(Math.min(this.pageSize(),this.size()))}static \u0275fac=function(x){return new(x||v)};static \u0275cmp=t.VBU({type:v,selectors:[["cue-paginator"]],inputs:{pageSizeOptions:[1,"pageSizeOptions"],size:[1,"size"],pageSize:[1,"pageSize"],menuPosition:[1,"menuPosition"],autoAdjust:[1,"autoAdjust"]},outputs:{pageSize:"pageSizeChange",currentPage:"currentPage"},decls:8,vars:11,consts:[["direction","row","justify","end","align","center",1,"paginator",2,"width","calc(100% - 4px)","padding","0 2px"],["size","s"],["direction","row","gap","s"],["direction","row","gap","s","align","center"],["size","s",3,"noWrap"],["size","xs","menuPosition","topright",3,"valueChange","value","options","underline"],[2,"flex","1"],["size","xs","variant","tertiary",3,"click"],["icon","paginator-first"],["icon","paginator-back"],["icon","paginator-next"],["icon","paginator-last"]],template:function(x,P){1&x&&(t.j41(0,"cue-flexcontainer",0),t.nVh(1,m,1,1),t.j41(2,"cue-typography",1),t.EFF(3),t.nI1(4,"transloco"),t.k0s(),t.j41(5,"cue-flexcontainer",2),t.nVh(6,O,4,0),t.nVh(7,D,4,0),t.k0s()()),2&x&&(t.R7$(),t.vxM(!P.autoAdjust()||P.anythingToPaginate()?1:-1),t.R7$(2),t.JRh(t.i5U(4,4,"components.paginator.currentDisplay",t.sMw(7,o,P.startIndex(),P.endIndex(),P.size()))),t.R7$(3),t.vxM(P.isFirstPage()?-1:6),t.R7$(),t.vxM(P.isLastPage()?-1:7))},dependencies:[a.FlexContainer,n.Typography,i.Button,p.ButtonIcon,r.Select,g.Kj],styles:[".paginator[_ngcontent-%COMP%]{color:var(--cue-paginator-text-color);padding-top:3px;padding-bottom:3px}"],changeDetection:0})}return v})()},76149(h,f,e){"use strict";e.d(f,{_:()=>s,g:()=>c});var l=e(2036);class s{page="1";renderText=!0;originalSize=!0;renderTextMode=1;stickToPage=!1;rotation=0;externalLinkTarget="blank";autoresize=!0;fitToPage=!0;showBorders=!1;zoom=1;minZoom=.1;toolbarOptions=new c;panOffset={x:0,y:0};panMode=!1;drawMode="none";drawingArtefacts=(0,l.x)();editMode=!1}class c{hidden=!1;position="bottom";margin="20px";displayPageSelect=!0;displayZoom=!0;displayRotate=!0;displayPan=!0;hidePageSelectOnSinglePageDocument=!0}},72716(h,f,e){"use strict";e.d(f,{OX:()=>g,QA:()=>l,d9:()=>s});class l{menuDisplaySettings=new s;columnSelectSettings=new g}class s{hide=!0;buttonVariant="tertiary";buttonSize="s";showColumnSelect=!0;showDownload=!0}class g{allowEditing=!0;allowToggleEditable=!0;allowToggleHideOnHover=!0;allowSettingTextAlign=!0;allowSettingLabel=!0}},9457(h,f,e){"use strict";e.d(f,{F:()=>p});var l=e(10467),s=e(17705),g=e(35547);let p=(()=>{class i{appendClassToParentRow=(0,s.hFB)(!0);fileOverClass=(0,s.hFB)("file-hover");dropEnabled=(0,s.hFB)(!0);filesDropped=(0,s.CGW)();filesHovered=(0,s.CGW)();onDragOver(n){this.dropEnabled()&&(n.preventDefault(),n.stopPropagation(),this._appendFileHoverClass(n.target),this.filesHovered.emit(!0))}onDragLeave(n){n.preventDefault(),n.stopPropagation(),this._removeFileHoverClass(n.target),this.filesHovered.emit(!1)}onDrop(n){var r=this;return(0,l.A)(function*(){if(n instanceof DragEvent&&n.dataTransfer){n.preventDefault(),r._removeFileHoverClass(n.target);const t=yield function c(i){function a(r,t=""){return new Promise(o=>{r&&(r.isFile?r.file(d=>{d.filepath=t+d.name,n.push(d),o(d)}):r.isDirectory&&r.createReader().readEntries(m=>{const O=[];for(const D of m)O.push(a(D,t+r.name+"/"));o(Promise.all(O))}))})}const n=[];return new Promise(r=>{const t=[];for(const o of i)t.push(a(o.webkitGetAsEntry()));Promise.all(t).then(()=>{const o=[".DS_Store"],d=n.filter(m=>!o.includes(m.name));console.info(`${d.length} files dropped`),r(d)})})}(n.dataTransfer.items);r.filesDropped.emit(t),r.filesHovered.emit(!1)}})()}_appendFileHoverClass(n){if(this.appendClassToParentRow()){const r=this._getParentRow(n);r?r.classList.add(this.fileOverClass()):n.classList.add(this.fileOverClass())}else n.classList.add(this.fileOverClass())}_removeFileHoverClass(n){if(this.appendClassToParentRow()){const r=this._getParentRow(n);r?r.classList.remove(this.fileOverClass()):n.classList.remove(this.fileOverClass())}else n.classList.remove(this.fileOverClass())}_getParentRow(n){for(;n;){if("TR"===n.tagName)return n;n=n.parentNode}return null}static \u0275fac=function(r){return new(r||i)};static \u0275dir=g.FsC({type:i,selectors:[["","cueFileDrop",""]],hostBindings:function(r,t){1&r&&g.bIt("dragover",function(d){return t.onDragOver(d)})("dragleave",function(d){return t.onDragLeave(d)})("drop",function(d){return t.onDrop(d)})},inputs:{appendClassToParentRow:[1,"appendClassToParentRow"],fileOverClass:[1,"fileOverClass"],dropEnabled:[1,"dropEnabled"]},outputs:{filesDropped:"filesDropped",filesHovered:"filesHovered"}})}return i})()},96696(h,f,e){"use strict";e.d(f,{i:()=>c,z:()=>g});var l=e(10467);const s={csv:(i=(0,l.A)(function*(a,n){return new((yield Promise.all([e.e(1380),e.e(6495),e.e(3185)]).then(e.bind(e,13185))).CSVEditor)(a,n)}),function(n,r){return i.apply(this,arguments)}),json:function(){var i=(0,l.A)(function*(a,n){return new((yield Promise.all([e.e(1380),e.e(6495),e.e(5191),e.e(2076),e.e(5039)]).then(e.bind(e,25039))).JSONEditor)(a,n)});return function(n,r){return i.apply(this,arguments)}}(),jsonld:function(){var i=(0,l.A)(function*(a,n){return new((yield Promise.all([e.e(1380),e.e(6495),e.e(5191),e.e(2076),e.e(7839)]).then(e.bind(e,57839))).JsonLdEditor)(a,n)});return function(n,r){return i.apply(this,arguments)}}(),sparql:function(){var i=(0,l.A)(function*(a,n){return new((yield Promise.all([e.e(1380),e.e(6495),e.e(6593),e.e(4478)]).then(e.bind(e,44478))).SPARQLEditor)(a,n)});return function(n,r){return i.apply(this,arguments)}}(),text:function(){var i=(0,l.A)(function*(a,n){return new((yield Promise.all([e.e(1380),e.e(6495),e.e(2380)]).then(e.bind(e,22380))).TextEditor)(a,n)});return function(n,r){return i.apply(this,arguments)}}(),ttl:function(){var i=(0,l.A)(function*(a,n){return new((yield Promise.all([e.e(1380),e.e(6495),e.e(5191),e.e(7923)]).then(e.bind(e,97923))).TurtleEditor)(a,n)});return function(n,r){return i.apply(this,arguments)}}(),xml:function(){var i=(0,l.A)(function*(a,n){return new((yield Promise.all([e.e(1380),e.e(6495),e.e(5191),e.e(1061)]).then(e.bind(e,51061))).XMLEditor)(a,n)});return function(n,r){return i.apply(this,arguments)}}(),yml:function(){var i=(0,l.A)(function*(a,n){return new((yield Promise.all([e.e(1380),e.e(6495),e.e(5191),e.e(8612)]).then(e.bind(e,88612))).YAMLEditor)(a,n)});return function(n,r){return i.apply(this,arguments)}}()};var i;function c(i,a,n){return s[i](a,n)}function g(i,a){return p.apply(this,arguments)}function p(){return p=(0,l.A)(function*(i,a){return new((yield Promise.all([e.e(1380),e.e(6495),e.e(6593),e.e(4478)]).then(e.bind(e,44478))).SPARQLEditor)(i,a)}),p.apply(this,arguments)}},46019(h,f,e){"use strict";e.d(f,{t:()=>c});var l=e(56593);function c(g){const p=new l.Parser({sparqlStar:!0});try{return p.parse(g)}catch(i){if(-1!=i.toString().indexOf("SPARQL*"))return{type:"query",queryType:"CONSTRUCT",sparqlStar:!0};throw"Couldn't get query details: "+i.toString()}}},25172(h){h.exports=function f(e,l){this.v=e,this.k=l},h.exports.__esModule=!0,h.exports.default=h.exports},53344(h,f,e){var l=e(25172);h.exports=function s(c){return new l(c,0)},h.exports.__esModule=!0,h.exports.default=h.exports},42958(h,f,e){var l=e(25172);function c(g){var p,i;function a(r,t){try{var o=g[r](t),d=o.value,m=d instanceof l;Promise.resolve(m?d.v:d).then(function(O){if(m){var D="return"===r&&d.k?r:"next";if(!d.k||O.done)return a(D,O);O=g[D](O).value}n(!!o.done,O)},function(O){a("throw",O)})}catch(O){n(2,O)}}function n(r,t){2===r?p.reject(t):p.resolve({value:t,done:r}),(p=p.next)?a(p.key,p.arg):i=null}this._invoke=function(r,t){return new Promise(function(o,d){var m={key:r,arg:t,resolve:o,reject:d,next:null};i?i=i.next=m:(p=i=m,a(r,t))})},"function"!=typeof g.return&&(this.return=void 0)}c.prototype["function"==typeof Symbol&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},c.prototype.next=function(g){return this._invoke("next",g)},c.prototype.throw=function(g){return this._invoke("throw",g)},c.prototype.return=function(g){return this._invoke("return",g)},h.exports=function s(g){return function(){return new c(g.apply(this,arguments))}},h.exports.__esModule=!0,h.exports.default=h.exports},89758(h,f,e){"use strict";e.d(f,{Pq:()=>r});var l=e(45191),s=e(19125);const c=(0,s.pn)({String:s._A.string,Number:s._A.number,"True False":s._A.bool,PropertyName:s._A.propertyName,Null:s._A.null,", :":s._A.separator,"[ ]":s._A.squareBracket,"{ }":s._A.brace}),g=l.U1.deserialize({version:14,states:"$bOVQPOOOOQO'#Cb'#CbOnQPO'#CeOvQPO'#ClOOQO'#Cr'#CrQOQPOOOOQO'#Cg'#CgO}QPO'#CfO!SQPO'#CtOOQO,59P,59PO![QPO,59PO!aQPO'#CuOOQO,59W,59WO!iQPO,59WOVQPO,59QOqQPO'#CmO!nQPO,59`OOQO1G.k1G.kOVQPO'#CnO!vQPO,59aOOQO1G.r1G.rOOQO1G.l1G.lOOQO,59X,59XOOQO-E6k-E6kOOQO,59Y,59YOOQO-E6l-E6l",stateData:"#O~OeOS~OQSORSOSSOTSOWQO_ROgPO~OVXOgUO~O^[O~PVO[^O~O]_OVhX~OVaO~O]bO^iX~O^dO~O]_OVha~O]bO^ia~O",goto:"!kjPPPPPPkPPkqwPPPPk{!RPPP!XP!e!hXSOR^bQWQRf_TVQ_Q`WRg`QcZRicQTOQZRQe^RhbRYQR]R",nodeNames:"\u26a0 JsonText True False Null Number String } { Object Property PropertyName : , ] [ Array",maxTerm:25,nodeProps:[["isolate",-2,6,11,""],["openedBy",7,"{",14,"["],["closedBy",8,"}",15,"]"]],propSources:[c],skippedNodes:[0],repeatNodeCount:2,tokenData:"(|~RaXY!WYZ!W]^!Wpq!Wrs!]|}$u}!O$z!Q!R%T!R![&c![!]&t!}#O&y#P#Q'O#Y#Z'T#b#c'r#h#i(Z#o#p(r#q#r(w~!]Oe~~!`Wpq!]qr!]rs!xs#O!]#O#P!}#P;'S!];'S;=`$o<%lO!]~!}Og~~#QXrs!]!P!Q!]#O#P!]#U#V!]#Y#Z!]#b#c!]#f#g!]#h#i!]#i#j#m~#pR!Q![#y!c!i#y#T#Z#y~#|R!Q![$V!c!i$V#T#Z$V~$YR!Q![$c!c!i$c#T#Z$c~$fR!Q![!]!c!i!]#T#Z!]~$rP;=`<%l!]~$zO]~~$}Q!Q!R%T!R![&c~%YRT~!O!P%c!g!h%w#X#Y%w~%fP!Q![%i~%nRT~!Q![%i!g!h%w#X#Y%w~%zR{|&T}!O&T!Q![&Z~&WP!Q![&Z~&`PT~!Q![&Z~&hST~!O!P%c!Q![&c!g!h%w#X#Y%w~&yO[~~'OO_~~'TO^~~'WP#T#U'Z~'^P#`#a'a~'dP#g#h'g~'jP#X#Y'm~'rOR~~'uP#i#j'x~'{P#`#a(O~(RP#`#a(U~(ZOS~~(^P#f#g(a~(dP#i#j(g~(jP#X#Y(m~(rOQ~~(wOW~~(|OV~",tokenizers:[0],topRules:{JsonText:[0,1]},tokenPrec:0});var p=e(75759);const n=p.bj.define({name:"json",parser:g.configure({props:[p.Oh.add({Object:(0,p.mz)({except:/^\s*\}/}),Array:(0,p.mz)({except:/^\s*\]/})}),p.b_.add({"Object Array":p.yd})]}),languageData:{closeBrackets:{brackets:["[","{",'"']},indentOnInput:/^\s*[\}\]]$/}});function r(){return new p.Yy(n)}}}]);
1
+ (self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[2076],{90417(g,p,t){"use strict";if(t.d(p,{m:()=>c}),9121==t.j)var u=t(58469);class o{mtextRender}class c{baseUrl;useMainThreadDraw=!0;webworkerFileUrls=new o;toolbar=new u.g;pickingEnabled=!0}},58469(g,p,t){"use strict";t.d(p,{g:()=>u});class u{hidden=!1;position="bottom";margin="20px";displayZoom=!0;displayLayers=!0;displayLayouts=!0;displayBlackWhite=!0;displaySnapMenu=!1}},61485(g,p,t){"use strict";if(t.d(p,{B:()=>n}),9121==t.j)var u=t(10467);if(9121==t.j)var o=t(17705);if(9121==t.j)var c=t(85802);if(9121==t.j)var f=t(49769);if(9121==t.j)var d=t(96696);if(9121==t.j)var i=t(35547);const r=9121==t.j?["panel"]:null;let n=9121==t.j?(()=>{class a{content=(0,o.geq)("");type=(0,o.hFB)("text");variant=(0,o.hFB)("default");readonly=(0,o.hFB)(!1);contentChanged=(0,o.CGW)();invalid=(0,o.CGW)();error=(0,o.CGW)();panel;_editor;_buildToken=0;onVariantChange=(0,c.QZP)(()=>{const s=this.variant();void 0!==this._editor&&(this._editor.theme=s)});editorValue=(0,c.vPA)("");onContentChange=(0,c.QZP)(()=>{const s=this.content();if(s===this.editorValue())return;let h=s;const y=this.type();"json"!==y&&"jsonld"!==y&&"object"==typeof h&&(h=JSON.stringify(h,null,2)),void 0!==this._editor&&this._editor.content!==h&&(this._editor.content=h)});ngAfterViewInit(){Promise.resolve().then(()=>{this.build()})}build(){var s=this;return(0,u.A)(function*(){let l=s.type();"string"!=typeof s.content()&&"jsonld"!==l&&(l="json");const h=++s._buildToken,y=yield(0,d.i)(l,s.panel.nativeElement,s.variant());if(h!==s._buildToken)return void y.dispose();s._editor=y;const S=s.content();if(s._editor.content=S,s.editorValue.set(S),s.readonly()){const j=s._editor._editor;if(j){const{applyReadOnly:v}=yield Promise.all([t.e(1380),t.e(6670)]).then(t.bind(t,76670));v(j)}}s._editor.events.addListener("contentChanged",j=>{s.content()!==j&&(s.editorValue.set(j),s.contentChanged.emit(j),s.content.set(j))}),s._editor.events.addListener("contentValid",j=>{s.invalid.emit(!j)}),s._editor.events.addListener("error",j=>{s.error.emit(j)})})()}static \u0275fac=function(l){return new(l||a)};static \u0275cmp=i.VBU({type:a,selectors:[["cue-code-editor"]],viewQuery:function(l,h){if(1&l&&i.GBs(r,5),2&l){let y;i.mGM(y=i.lsd())&&(h.panel=y.first)}},inputs:{content:[1,"content"],type:[1,"type"],variant:[1,"variant"],readonly:[1,"readonly"]},outputs:{content:"contentChange",contentChanged:"contentChanged",invalid:"invalid",error:"error"},decls:2,vars:0,consts:[["panel",""],[1,"panel"]],template:function(l,h){1&l&&i.Hgh(0,"div",1,0)},dependencies:[f.MD],styles:["[_nghost-%COMP%]{display:contents}.panel[_ngcontent-%COMP%]{overflow-y:auto;height:100%;width:100%;border:1px solid var(--borderColor-default);text-align:left}"]})}return a})():null},43418(g,p,t){"use strict";if(t.r(p),t.d(p,{DocumentViewerInteractions:()=>d,DocumentViewerSettings:()=>f,IfcViewerInteractions:()=>i}),9121==t.j)var u=t(90417);if(9121==t.j)var o=t(76149);if(9121==t.j)var c=t(43231);class f{bim=new c.IfcViewerSettings;cad=new u.m;pdf=new o._}class d{ifc=new i}class i{clickedElement=null;selectedElements=null}},43231(g,p,t){"use strict";if(t.r(p),t.d(p,{IfcViewerSettings:()=>o,ModelDef:()=>c,ModelOverrides:()=>f}),9121==t.j)var u=t(49329);class o{showModelList=!0;clickEnabled=!0;showPropertiesOnClick=!0;elementClickOptions=[];toolbar=new u.g;detailedViewEnabled=!1}class c{id;name;fileURL;visible;overrides=new f;constructor(i,r,n,a=!0){this.id=i,this.name=r,this.fileURL=n,this.visible=a}}class f{hiddenTypes=[/SPACE/i]}},49329(g,p,t){"use strict";t.d(p,{g:()=>u});class u{hidden=!1;position="bottom";margin="20px";displayZoom=!0;displayDecompositionTree=void 0}},2036(g,p,t){"use strict";function u(){return{xywhs:[],circles:[],polygons:[],svgPaths:[]}}t.d(p,{x:()=>u})},55821(g,p,t){"use strict";if(t.d(p,{m:()=>j}),9121==t.j)var u=t(17705);if(9121==t.j)var o=t(85802);if(9121==t.j)var c=t(32271);if(9121==t.j)var f=t(59352);if(9121==t.j)var d=t(13319);if(9121==t.j)var i=t(85971);if(9121==t.j)var r=t(35381);if(9121==t.j)var n=t(70063);if(9121==t.j)var a=t(42245);if(9121==t.j)var e=t(35547);const s=(v,w,m)=>({startIndex:v,endIndex:w,totalItems:m});function l(v,w){if(1&v){const m=e.RV6();e.j41(0,"cue-flexcontainer",3)(1,"cue-typography",4),e.EFF(2),e.nI1(3,"transloco"),e.k0s(),e.j41(4,"cue-select",5),e.mxI("valueChange",function(x){o.eBV(m);const z=e.XpG(2);return e.DH7(z.pageSize,x)||(z.pageSize=x),o.Njj(x)}),e.k0s()(),e.nrm(5,"span",6)}if(2&v){const m=e.XpG(2);e.R7$(),e.Y8G("noWrap",!0),e.R7$(),e.JRh(e.bMT(3,5,"components.paginator.itemsPerPage")),e.R7$(2),e.R50("value",m.pageSize),e.Y8G("options",m.pageSizeOptions())("underline",!1)}}function h(v,w){if(1&v&&e.nVh(0,l,6,7),2&v){const m=e.XpG();e.vxM(m.pageSizeOptions().length>1?0:-1)}}function y(v,w){if(1&v){const m=e.RV6();e.j41(0,"cue-button",7),e.bIt("click",function(){o.eBV(m);const x=e.XpG();return o.Njj(x.first())}),e.nrm(1,"cue-button-icon",8),e.k0s(),e.j41(2,"cue-button",7),e.bIt("click",function(){o.eBV(m);const x=e.XpG();return o.Njj(x.back())}),e.nrm(3,"cue-button-icon",9),e.k0s()}}function S(v,w){if(1&v){const m=e.RV6();e.j41(0,"cue-button",7),e.bIt("click",function(){o.eBV(m);const x=e.XpG();return o.Njj(x.next())}),e.nrm(1,"cue-button-icon",10),e.k0s(),e.j41(2,"cue-button",7),e.bIt("click",function(){o.eBV(m);const x=e.XpG();return o.Njj(x.last())}),e.nrm(3,"cue-button-icon",11),e.k0s()}}let j=9121==t.j?(()=>{class v{pageSizeOptions=(0,u.hFB)([5,10,25,100]);size=(0,u.hFB)(111);pageSize=(0,u.geq)(10);menuPosition=(0,u.hFB)("topright");autoAdjust=(0,u.hFB)(!0);currentPage=(0,u.CGW)();_startIndex=(0,o.vPA)(0);_endIndex=(0,o.vPA)(0);anythingToPaginate=(0,c.EW)(()=>{const m=this.adjustedPageSizeOptions()[this.adjustedPageSizeOptions().length-1];return this.size()>m});startIndex=(0,c.EW)(()=>this._startIndex()+1);endIndex=(0,c.EW)(()=>Math.min(this._endIndex(),this.size()));isFirstPage=(0,c.EW)(()=>0===this._startIndex());isLastPage=(0,c.EW)(()=>this._endIndex()>=this.size());adjustedPageSizeOptions=(0,c.EW)(()=>{let m=this.pageSizeOptions();if(!this.autoAdjust())return m;const F=m[m.length-1],x=this.size();return x<F&&(m=m.filter(z=>z<=x),m.length||(m=[x])),m});constructor(){(0,o.QZP)(()=>{this._resetPagination()}),(0,o.QZP)(()=>{this.currentPage.emit({startIndex:this._startIndex(),endIndex:this._endIndex(),pageSize:this.pageSize()})})}setSize(m){this.pageSize.set(m),this._resetPagination()}next(){const m=this._endIndex();this._startIndex.set(m),this._endIndex.set(m+this.pageSize())}back(){const m=Math.max(0,this._startIndex()-this.pageSize());this._startIndex.set(m),this._endIndex.set(m+this.pageSize())}first(){this._startIndex.set(0),this._endIndex.set(this.pageSize())}last(){const m=Math.max(0,this.size()-(this.size()%this.pageSize()||this.pageSize()));this._startIndex.set(m),this._endIndex.set(this.size())}_resetPagination(){this._startIndex.set(0),this._endIndex.set(Math.min(this.pageSize(),this.size()))}static \u0275fac=function(F){return new(F||v)};static \u0275cmp=e.VBU({type:v,selectors:[["cue-paginator"]],inputs:{pageSizeOptions:[1,"pageSizeOptions"],size:[1,"size"],pageSize:[1,"pageSize"],menuPosition:[1,"menuPosition"],autoAdjust:[1,"autoAdjust"]},outputs:{pageSize:"pageSizeChange",currentPage:"currentPage"},decls:8,vars:11,consts:[["direction","row","justify","end","align","center",1,"paginator",2,"width","calc(100% - 4px)","padding","0 2px"],["size","s"],["direction","row","gap","s"],["direction","row","gap","s","align","center"],["size","s",3,"noWrap"],["size","xs","menuPosition","topright",3,"valueChange","value","options","underline"],[2,"flex","1"],["size","xs","variant","tertiary",3,"click"],["icon","paginator-first"],["icon","paginator-back"],["icon","paginator-next"],["icon","paginator-last"]],template:function(F,x){1&F&&(e.j41(0,"cue-flexcontainer",0),e.nVh(1,h,1,1),e.j41(2,"cue-typography",1),e.EFF(3),e.nI1(4,"transloco"),e.k0s(),e.j41(5,"cue-flexcontainer",2),e.nVh(6,y,4,0),e.nVh(7,S,4,0),e.k0s()()),2&F&&(e.R7$(),e.vxM(!x.autoAdjust()||x.anythingToPaginate()?1:-1),e.R7$(2),e.JRh(e.i5U(4,4,"components.paginator.currentDisplay",e.sMw(7,s,x.startIndex(),x.endIndex(),x.size()))),e.R7$(3),e.vxM(x.isFirstPage()?-1:6),e.R7$(),e.vxM(x.isLastPage()?-1:7))},dependencies:[r.FlexContainer,a.Typography,i.Button,d.ButtonIcon,n.Select,f.Kj],styles:[".paginator[_ngcontent-%COMP%]{color:var(--cue-paginator-text-color);padding-top:3px;padding-bottom:3px}"],changeDetection:0})}return v})():null},76149(g,p,t){"use strict";if(t.d(p,{_:()=>o,g:()=>c}),9121==t.j)var u=t(2036);class o{page="1";renderText=!0;originalSize=!0;renderTextMode=1;stickToPage=!1;rotation=0;externalLinkTarget="blank";autoresize=!0;fitToPage=!0;showBorders=!1;zoom=1;minZoom=.1;toolbarOptions=new c;panOffset={x:0,y:0};panMode=!1;drawMode="none";drawingArtefacts=(0,u.x)();editMode=!1}class c{hidden=!1;position="bottom";margin="20px";displayPageSelect=!0;displayZoom=!0;displayRotate=!0;displayPan=!0;hidePageSelectOnSinglePageDocument=!0}},72716(g,p,t){"use strict";t.d(p,{OX:()=>f,QA:()=>u,d9:()=>o});class u{menuDisplaySettings=new o;columnSelectSettings=new f}class o{hide=!0;buttonVariant="tertiary";buttonSize="s";showColumnSelect=!0;showDownload=!0}class f{allowEditing=!0;allowToggleEditable=!0;allowToggleHideOnHover=!0;allowSettingTextAlign=!0;allowSettingLabel=!0}},79462(g,p,t){"use strict";if(t.d(p,{F:()=>d}),9121==t.j)var u=t(10467);if(9121==t.j)var o=t(17705);if(9121==t.j)var c=t(73289);if(9121==t.j)var f=t(35547);let d=9121==t.j?(()=>{class i{appendClassToParentRow=(0,o.hFB)(!0);fileOverClass=(0,o.hFB)("file-hover");dropEnabled=(0,o.hFB)(!0);filesDropped=(0,o.CGW)();filesHovered=(0,o.CGW)();onDragOver(n){this.dropEnabled()&&(n.preventDefault(),n.stopPropagation(),this._appendFileHoverClass(n.target),this.filesHovered.emit(!0))}onDragLeave(n){n.preventDefault(),n.stopPropagation(),this._removeFileHoverClass(n.target),this.filesHovered.emit(!1)}onDrop(n){var a=this;return(0,u.A)(function*(){if(n instanceof DragEvent&&n.dataTransfer){n.preventDefault(),a._removeFileHoverClass(n.target);const e=yield(0,c.y)(n.dataTransfer.items);a.filesDropped.emit(e),a.filesHovered.emit(!1)}})()}_appendFileHoverClass(n){if(this.appendClassToParentRow()){const a=this._getParentRow(n);a?a.classList.add(this.fileOverClass()):n.classList.add(this.fileOverClass())}else n.classList.add(this.fileOverClass())}_removeFileHoverClass(n){if(this.appendClassToParentRow()){const a=this._getParentRow(n);a?a.classList.remove(this.fileOverClass()):n.classList.remove(this.fileOverClass())}else n.classList.remove(this.fileOverClass())}_getParentRow(n){for(;n;){if("TR"===n.tagName)return n;n=n.parentNode}return null}static \u0275fac=function(a){return new(a||i)};static \u0275dir=f.FsC({type:i,selectors:[["","cueFileDrop",""]],hostBindings:function(a,e){1&a&&f.bIt("dragover",function(l){return e.onDragOver(l)})("dragleave",function(l){return e.onDragLeave(l)})("drop",function(l){return e.onDrop(l)})},inputs:{appendClassToParentRow:[1,"appendClassToParentRow"],fileOverClass:[1,"fileOverClass"],dropEnabled:[1,"dropEnabled"]},outputs:{filesDropped:"filesDropped",filesHovered:"filesHovered"}})}return i})():null},96696(g,p,t){"use strict";t.d(p,{i:()=>c,z:()=>f});var u=t(10467);const o={csv:(i=(0,u.A)(function*(r,n){return new((yield Promise.all([t.e(1380),t.e(6495),t.e(3185)]).then(t.bind(t,13185))).CSVEditor)(r,n)}),function(n,a){return i.apply(this,arguments)}),json:function(){var i=(0,u.A)(function*(r,n){return new((yield Promise.all([t.e(1380),t.e(6495),t.e(5191),t.e(2076),t.e(5039)]).then(t.bind(t,25039))).JSONEditor)(r,n)});return function(n,a){return i.apply(this,arguments)}}(),jsonld:function(){var i=(0,u.A)(function*(r,n){return new((yield Promise.all([t.e(1380),t.e(6495),t.e(5191),t.e(2076),t.e(7839)]).then(t.bind(t,57839))).JsonLdEditor)(r,n)});return function(n,a){return i.apply(this,arguments)}}(),sparql:function(){var i=(0,u.A)(function*(r,n){return new((yield Promise.all([t.e(1380),t.e(6495),t.e(6593),t.e(4478)]).then(t.bind(t,44478))).SPARQLEditor)(r,n)});return function(n,a){return i.apply(this,arguments)}}(),text:function(){var i=(0,u.A)(function*(r,n){return new((yield Promise.all([t.e(1380),t.e(6495),t.e(2380)]).then(t.bind(t,22380))).TextEditor)(r,n)});return function(n,a){return i.apply(this,arguments)}}(),ttl:function(){var i=(0,u.A)(function*(r,n){return new((yield Promise.all([t.e(1380),t.e(6495),t.e(5191),t.e(7923)]).then(t.bind(t,97923))).TurtleEditor)(r,n)});return function(n,a){return i.apply(this,arguments)}}(),xml:function(){var i=(0,u.A)(function*(r,n){return new((yield Promise.all([t.e(1380),t.e(6495),t.e(5191),t.e(1061)]).then(t.bind(t,51061))).XMLEditor)(r,n)});return function(n,a){return i.apply(this,arguments)}}(),yml:function(){var i=(0,u.A)(function*(r,n){return new((yield Promise.all([t.e(1380),t.e(6495),t.e(5191),t.e(8612)]).then(t.bind(t,88612))).YAMLEditor)(r,n)});return function(n,a){return i.apply(this,arguments)}}()};var i;function c(i,r,n){return o[i](r,n)}function f(i,r){return d.apply(this,arguments)}function d(){return d=(0,u.A)(function*(i,r){return new((yield Promise.all([t.e(1380),t.e(6495),t.e(6593),t.e(4478)]).then(t.bind(t,44478))).SPARQLEditor)(i,r)}),d.apply(this,arguments)}},73289(g,p,t){"use strict";function u(o){function c(d,i=""){return new Promise(r=>{d&&(d.isFile?d.file(n=>{n.filepath=i+n.name,f.push(n),r(n)}):d.isDirectory&&d.createReader().readEntries(a=>{const e=[];for(const s of a)e.push(c(s,i+d.name+"/"));r(Promise.all(e))}))})}const f=[];return new Promise(d=>{const i=[];for(const r of o)i.push(c(r.webkitGetAsEntry()));Promise.all(i).then(()=>{const r=[".DS_Store"],n=f.filter(a=>!r.includes(a.name));console.info(`${n.length} files dropped`),d(n)})})}t.d(p,{y:()=>u})},46019(g,p,t){"use strict";t.d(p,{t:()=>c});var u=t(56593);function c(f){const d=new u.Parser({sparqlStar:!0});try{return d.parse(f)}catch(i){if(-1!=i.toString().indexOf("SPARQL*"))return{type:"query",queryType:"CONSTRUCT",sparqlStar:!0};throw"Couldn't get query details: "+i.toString()}}},25172(g){g.exports=function p(t,u){this.v=t,this.k=u},g.exports.__esModule=!0,g.exports.default=g.exports},29293(g){function p(u,o,c,f,d,i,r){try{var n=u[i](r),a=n.value}catch(e){return void c(e)}n.done?o(a):Promise.resolve(a).then(f,d)}g.exports=function t(u){return function(){var o=this,c=arguments;return new Promise(function(f,d){var i=u.apply(o,c);function r(a){p(i,f,d,r,n,"next",a)}function n(a){p(i,f,d,r,n,"throw",a)}r(void 0)})}},g.exports.__esModule=!0,g.exports.default=g.exports},53344(g,p,t){var u=t(25172);g.exports=function o(c){return new u(c,0)},g.exports.__esModule=!0,g.exports.default=g.exports},42958(g,p,t){var u=t(25172);function c(f){var d,i;function r(a,e){try{var s=f[a](e),l=s.value,h=l instanceof u;Promise.resolve(h?l.v:l).then(function(y){if(h){var S="return"===a&&l.k?a:"next";if(!l.k||y.done)return r(S,y);y=f[S](y).value}n(!!s.done,y)},function(y){r("throw",y)})}catch(y){n(2,y)}}function n(a,e){2===a?d.reject(e):d.resolve({value:e,done:a}),(d=d.next)?r(d.key,d.arg):i=null}this._invoke=function(a,e){return new Promise(function(s,l){var h={key:a,arg:e,resolve:s,reject:l,next:null};i?i=i.next=h:(d=i=h,r(a,e))})},"function"!=typeof f.return&&(this.return=void 0)}c.prototype["function"==typeof Symbol&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},c.prototype.next=function(f){return this._invoke("next",f)},c.prototype.throw=function(f){return this._invoke("throw",f)},c.prototype.return=function(f){return this._invoke("return",f)},g.exports=function o(f){return function(){return new c(f.apply(this,arguments))}},g.exports.__esModule=!0,g.exports.default=g.exports},89758(g,p,t){"use strict";t.d(p,{Pq:()=>a});var u=t(45191),o=t(19125);const c=(0,o.pn)({String:o._A.string,Number:o._A.number,"True False":o._A.bool,PropertyName:o._A.propertyName,Null:o._A.null,", :":o._A.separator,"[ ]":o._A.squareBracket,"{ }":o._A.brace}),f=u.U1.deserialize({version:14,states:"$bOVQPOOOOQO'#Cb'#CbOnQPO'#CeOvQPO'#ClOOQO'#Cr'#CrQOQPOOOOQO'#Cg'#CgO}QPO'#CfO!SQPO'#CtOOQO,59P,59PO![QPO,59PO!aQPO'#CuOOQO,59W,59WO!iQPO,59WOVQPO,59QOqQPO'#CmO!nQPO,59`OOQO1G.k1G.kOVQPO'#CnO!vQPO,59aOOQO1G.r1G.rOOQO1G.l1G.lOOQO,59X,59XOOQO-E6k-E6kOOQO,59Y,59YOOQO-E6l-E6l",stateData:"#O~OeOS~OQSORSOSSOTSOWQO_ROgPO~OVXOgUO~O^[O~PVO[^O~O]_OVhX~OVaO~O]bO^iX~O^dO~O]_OVha~O]bO^ia~O",goto:"!kjPPPPPPkPPkqwPPPPk{!RPPP!XP!e!hXSOR^bQWQRf_TVQ_Q`WRg`QcZRicQTOQZRQe^RhbRYQR]R",nodeNames:"\u26a0 JsonText True False Null Number String } { Object Property PropertyName : , ] [ Array",maxTerm:25,nodeProps:[["isolate",-2,6,11,""],["openedBy",7,"{",14,"["],["closedBy",8,"}",15,"]"]],propSources:[c],skippedNodes:[0],repeatNodeCount:2,tokenData:"(|~RaXY!WYZ!W]^!Wpq!Wrs!]|}$u}!O$z!Q!R%T!R![&c![!]&t!}#O&y#P#Q'O#Y#Z'T#b#c'r#h#i(Z#o#p(r#q#r(w~!]Oe~~!`Wpq!]qr!]rs!xs#O!]#O#P!}#P;'S!];'S;=`$o<%lO!]~!}Og~~#QXrs!]!P!Q!]#O#P!]#U#V!]#Y#Z!]#b#c!]#f#g!]#h#i!]#i#j#m~#pR!Q![#y!c!i#y#T#Z#y~#|R!Q![$V!c!i$V#T#Z$V~$YR!Q![$c!c!i$c#T#Z$c~$fR!Q![!]!c!i!]#T#Z!]~$rP;=`<%l!]~$zO]~~$}Q!Q!R%T!R![&c~%YRT~!O!P%c!g!h%w#X#Y%w~%fP!Q![%i~%nRT~!Q![%i!g!h%w#X#Y%w~%zR{|&T}!O&T!Q![&Z~&WP!Q![&Z~&`PT~!Q![&Z~&hST~!O!P%c!Q![&c!g!h%w#X#Y%w~&yO[~~'OO_~~'TO^~~'WP#T#U'Z~'^P#`#a'a~'dP#g#h'g~'jP#X#Y'm~'rOR~~'uP#i#j'x~'{P#`#a(O~(RP#`#a(U~(ZOS~~(^P#f#g(a~(dP#i#j(g~(jP#X#Y(m~(rOQ~~(wOW~~(|OV~",tokenizers:[0],topRules:{JsonText:[0,1]},tokenPrec:0});var d=t(75759);const n=d.bj.define({name:"json",parser:f.configure({props:[d.Oh.add({Object:(0,d.mz)({except:/^\s*\}/}),Array:(0,d.mz)({except:/^\s*\]/})}),d.b_.add({"Object Array":d.yd})]}),languageData:{closeBrackets:{brackets:["[","{",'"']},indentOnInput:/^\s*[\}\]]$/}});function a(){return new d.Yy(n)}},16694(g,p,t){"use strict";if(t.d(p,{b:()=>r}),5350!=t.j)var u=t(10467);function o(a){return!/compileerror|validation error|magic (?:word|number)|invalid (?:wasm|module)/i.test(a)&&/HTTP status code is not ok|failed to fetch|network ?error|load failed/i.test(a)}const c=/wasm|webassembly/i,f=/dynamically imported module|module script/i,i=a=>new Promise(e=>setTimeout(e,a));function r(a){return n.apply(this,arguments)}function n(){return(n=(0,u.A)(function*(a,e={}){const{retryDelayMs:s=300,sleep:l=i,warn:h=console.warn,label:y="wasm"}=e;try{return void(yield a())}catch(S){const j=S instanceof Error?S.message:String(S);if(!o(j))throw S;h(`[${y}] WASM engine load failed (${j}); retrying once`),yield l(s);try{yield a()}catch(v){throw function d(a,e){if(!(a instanceof Error))return a;const s=a.message;return!o(s)||c.test(s)||f.test(s)?a:new Error(`Failed to load the WASM engine binary (ifc-lite_bg.wasm) in ${e}: ${s}`,{cause:a})}(v,y)}}})).apply(this,arguments)}},80070(g,p,t){"use strict";t.d(p,{V_:()=>n,iX:()=>i,jb:()=>d,wu:()=>r});const o={0:20,1:28,2:26,3:34,4:57,5:63,6:30,7:36,8:38,9:59,10:67},c=new Set([1,3,4,5,6,7,8,9,10]),f=new Set([2,3,5,7,8,10]);function d(s){const l=s instanceof Uint8Array?s:new Uint8Array(s);if(l.length<227)throw new Error("LAS: header truncated");const h=new DataView(l.buffer,l.byteOffset,l.byteLength);if(1179861324!==h.getUint32(0,!0))throw new Error('LAS: bad magic \u2014 expected "LASF"');const y=h.getUint8(24),S=h.getUint8(25),j=h.getUint16(94,!0),v=h.getUint32(96,!0),w=h.getUint32(100,!0),m=63&h.getUint8(104),F=h.getUint16(105,!0);let z=h.getUint32(107,!0);if(y>=1&&S>=4&&l.length>=255){const Q=function e(s,l){const h=s.getUint32(l,!0);return 4294967296*s.getUint32(l+4,!0)+h}(h,247);Q>0&&(z=Q)}if(!Number.isFinite(z)||z<0)throw new Error("LAS: invalid point count");const N=[h.getFloat64(131,!0),h.getFloat64(139,!0),h.getFloat64(147,!0)],V=[h.getFloat64(155,!0),h.getFloat64(163,!0),h.getFloat64(171,!0)],G=h.getFloat64(179,!0),X=h.getFloat64(187,!0),Z=h.getFloat64(195,!0),H=h.getFloat64(203,!0),Y=h.getFloat64(211,!0),A={min:[X,H,h.getFloat64(219,!0)],max:[G,Z,Y]};if(void 0===o[m])throw new Error(`LAS: unsupported point data format ${m}`);const T=o[m];if(F<T)throw new Error(`LAS: header point-record length (${F}) smaller than format ${m} baseline (${T})`);return{versionMajor:y,versionMinor:S,headerSize:j,pointDataOffset:v,numberOfVlrs:w,pointDataFormatId:m,pointRecordLength:F,pointCount:z,scale:N,offset:V,bbox:A,hasGpsTime:c.has(m),hasRgb:f.has(m)}}function i(s,l){if(!l)return s;const[h,y,S]=l;return{min:[s.min[0]-h,s.min[1]-y,s.min[2]-S],max:[s.max[0]-h,s.max[1]-y,s.max[2]-S]}}function r(s,l,h,y=l.pointRecordLength,S=1,j){if(s.length<h*y)throw new Error(`LAS: decode expects ${h*y} bytes, got ${s.length}`);const v=new DataView(s.buffer,s.byteOffset,s.byteLength),w=new Float32Array(3*h),m=new Uint16Array(h),F=new Uint8Array(h),x=l.hasRgb?new Float32Array(3*h):void 0,z=a(l.pointDataFormatId),N=l.pointDataFormatId>=6?16:15;let V=1/0,G=1/0,X=1/0,Z=-1/0,H=-1/0,Y=-1/0;const O=j?.[0]??0,A=j?.[1]??0,T=j?.[2]??0;for(let Q=0;Q<h;Q++){const b=Q*y,$=v.getInt32(b,!0)*l.scale[0]+l.offset[0]-O,J=v.getInt32(b+4,!0)*l.scale[1]+l.offset[1]-A,C=v.getInt32(b+8,!0)*l.scale[2]+l.offset[2]-T;if(w[3*Q]=$,w[3*Q+1]=J,w[3*Q+2]=C,$<V&&(V=$),$>Z&&(Z=$),J<G&&(G=J),J>H&&(H=J),C<X&&(X=C),C>Y&&(Y=C),m[Q]=v.getUint16(b+12,!0),F[Q]=l.pointDataFormatId>=6?v.getUint8(b+N):31&v.getUint8(b+N),x&&z>=0){const I=v.getUint16(b+z,!0),R=v.getUint16(b+z+2,!0),k=v.getUint16(b+z+4,!0);x[3*Q]=I*S/65535,x[3*Q+1]=R*S/65535,x[3*Q+2]=k*S/65535}}return{positions:w,colors:x,classifications:F,intensities:m,pointCount:h,bbox:{min:[V,G,X],max:[Z,H,Y]}}}function n(s,l,h=1024){if(!l.hasRgb)return 0;const y=l.pointRecordLength,S=Math.min(l.pointCount,Math.floor(s.length/y));if(0===S)return 0;const j=new DataView(s.buffer,s.byteOffset,s.byteLength),v=a(l.pointDataFormatId);if(v<0)return 0;const w=Math.max(1,Math.floor(S/Math.min(h,S)));let m=0;for(let F=0;F<S;F+=w){const x=F*y,z=j.getUint16(x+v,!0),N=j.getUint16(x+v+2,!0),V=j.getUint16(x+v+4,!0);z>m&&(m=z),N>m&&(m=N),V>m&&(m=V)}return m}function a(s){switch(s){case 2:return 20;case 3:case 5:return 28;case 7:case 8:case 10:return 30;default:return-1}}},18209(g,p,t){"use strict";if(t.d(p,{j:()=>o}),5350==t.j)var u=t(10467);class o{blob;constructor(f){this.blob=f}get size(){return this.blob.size}read(f,d){var i=this;return(0,u.A)(function*(){const r=Math.max(0,f),n=Math.min(d,i.blob.size);if(n<=r)return new Uint8Array(0);const e=yield i.blob.slice(r,n).arrayBuffer();return new Uint8Array(e)})()}}},14582(g,p,t){"use strict";function u(o){let c=null;return()=>(c??=Promise.resolve().then(o).catch(f=>{throw c=null,f}),c)}t.d(p,{T:()=>u})},19495(g,p,t){"use strict";function u(c){var f,d,i,r=2;for(typeof Symbol<"u"&&(d=Symbol.asyncIterator,i=Symbol.iterator);r--;){if(d&&null!=(f=c[d]))return f.call(c);if(i&&null!=(f=c[i]))return new o(f.call(c));d="@@asyncIterator",i="@@iterator"}throw new TypeError("Object is not async iterable")}function o(c){function f(d){if(Object(d)!==d)return Promise.reject(new TypeError(d+" is not an object."));var i=d.done;return Promise.resolve(d.value).then(function(r){return{value:r,done:i}})}return(o=function(i){this.s=i,this.n=i.next}).prototype={s:null,n:null,next:function(){return f(this.n.apply(this.s,arguments))},return:function(i){var r=this.s.return;return void 0===r?Promise.resolve({value:i,done:!0}):f(r.apply(this.s,arguments))},throw:function(i){var r=this.s.return;return void 0===r?Promise.reject(i):f(r.apply(this.s,arguments))}},new o(c)}t.d(p,{A:()=>u})},10467(g,p,t){"use strict";function u(c,f,d,i,r,n,a){try{var e=c[n](a),s=e.value}catch(l){return void d(l)}e.done?f(s):Promise.resolve(s).then(i,r)}function o(c){return function(){var f=this,d=arguments;return new Promise(function(i,r){var n=c.apply(f,d);function a(s){u(n,i,r,a,e,"next",s)}function e(s){u(n,i,r,a,e,"throw",s)}a(void 0)})}}t.d(p,{A:()=>o})},56218(g,p,t){"use strict";if(t.d(p,{A:()=>o}),9121==t.j)var u=t(27106);function o(c){return new u.A(c,0)}}}]);
@@ -0,0 +1 @@
1
+ (()=>{"use strict";var n,m={93961(n,c,t){var h=t(10467);const d=new Map;let p=1;function y(){return y=(0,h.A)(function*(e){let o;try{const s=yield function S(e,o,s){return b.apply(this,arguments)}(e.format,e.blob,{label:e.label,downsample:{stride:Math.max(1,0|e.stride)},originOffset:e.originOffset}),i=new AbortController,f=yield s.open(i.signal);o={source:s,abort:i};const O=p++;v({kind:"opened",requestId:e.requestId,sourceId:O,info:f}),d.set(O,{source:s,abort:i}),o=void 0}catch(s){if(o)try{o.abort.abort(),o.source.close()}catch(i){console.warn("[decode-worker] cleanup after failed open() post failed:",g(i))}v({kind:"error",requestId:e.requestId,message:g(s)})}}),y.apply(this,arguments)}function x(){return(x=(0,h.A)(function*(e){const o=d.get(e.sourceId);if(o)try{const s=yield o.source.next(e.maxPoints,o.abort.signal);if(!s)return void v({kind:"chunk",requestId:e.requestId,sourceId:e.sourceId,chunk:null});const{payload:i,transfer:f}=function u(e){const o=e.positions.buffer,s=[o],i={positions:o,pointCount:e.pointCount,bbox:e.bbox};if(e.colors){const f=e.colors.buffer;i.colors=f,s.push(f)}if(e.classifications){const f=e.classifications.buffer;i.classifications=f,s.push(f)}if(e.intensities){const f=e.intensities.buffer;i.intensities=f,s.push(f)}return{payload:i,transfer:s}}(s);v({kind:"chunk",requestId:e.requestId,sourceId:e.sourceId,chunk:i},f)}catch(s){v({kind:"error",requestId:e.requestId,message:g(s)})}else v({kind:"error",requestId:e.requestId,message:`Unknown sourceId ${e.sourceId}`})})).apply(this,arguments)}function b(){return(b=(0,h.A)(function*(e,o,s){switch(e){case"las":{const{LasStreamingSource:i}=yield Promise.all([t.e(2076),t.e(3630)]).then(t.bind(t,43630));return new i(o,s)}case"laz":{const{LazStreamingSource:i}=yield Promise.all([t.e(2076),t.e(8647)]).then(t.bind(t,68647));return new i(o,s)}case"ply":{const{PlyStreamingSource:i}=yield t.e(1231).then(t.bind(t,71231));return new i(o,s)}case"pcd":{const{PcdStreamingSource:i}=yield t.e(7003).then(t.bind(t,57003));return new i(o,s)}case"e57":{const{E57StreamingSource:i}=yield Promise.all([t.e(2076),t.e(179)]).then(t.bind(t,50179));return new i(o,s)}case"pts":{const{AsciiPointsStreamingSource:i}=yield t.e(3).then(t.bind(t,90003));return new i(o,"pts",s)}case"xyz":{const{AsciiPointsStreamingSource:i}=yield t.e(3).then(t.bind(t,90003));return new i(o,"xyz",s)}default:throw new Error(`decode-worker: unknown format "${e}"`)}})).apply(this,arguments)}function v(e,o=[]){self.postMessage(e,o)}function g(e){return e instanceof Error?e.message:String(e)}self.onmessage=e=>{const o=e.data;switch(o.kind){case"open":return void function l(e){y.apply(this,arguments)}(o);case"next":return void function P(e){x.apply(this,arguments)}(o);case"close":return void function w(e){const o=d.get(e);if(o){try{o.abort.abort(),o.source.close()}catch(s){console.warn("[decode-worker] close failed:",g(s))}d.delete(e)}}(o.sourceId);case"abort":return void function C(e){const o=d.get(e);o&&o.abort.abort()}(o.sourceId)}}}},I={};function r(n){var c=I[n];if(void 0!==c)return c.exports;var t=I[n]={exports:{}};return m[n](t,t.exports,r),t.exports}r.m=m,r.x=()=>{var n=r.O(void 0,[2076],()=>r(93961));return r.O(n)},n=[],r.O=(c,t,h,u)=>{if(!t){var d=1/0;for(a=0;a<n.length;a++){for(var[t,h,u]=n[a],p=!0,l=0;l<t.length;l++)(!1&u||d>=u)&&Object.keys(r.O).every(S=>r.O[S](t[l]))?t.splice(l--,1):(p=!1,u<d&&(d=u));if(p){n.splice(a--,1);var y=h();void 0!==y&&(c=y)}}return c}u=u||0;for(var a=n.length;a>0&&n[a-1][2]>u;a--)n[a]=n[a-1];n[a]=[t,h,u]},r.n=n=>{var c=n&&n.__esModule?()=>n.default:()=>n;return r.d(c,{a:c}),c},r.d=(n,c)=>{for(var t in c)r.o(c,t)&&!r.o(n,t)&&Object.defineProperty(n,t,{enumerable:!0,get:c[t]})},r.f={},r.e=n=>Promise.all(Object.keys(r.f).reduce((c,t)=>(r.f[t](n,c),c),[])),r.u=n=>(2076===n?"common":n)+".js",r.miniCssF=n=>{},r.o=(n,c)=>Object.prototype.hasOwnProperty.call(n,c),r.r=n=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},r.j=5350,(()=>{var n;r.tt=()=>(void 0===n&&(n={createScriptURL:c=>c},typeof trustedTypes<"u"&&trustedTypes.createPolicy&&(n=trustedTypes.createPolicy("angular#bundler",n))),n)})(),r.tu=n=>r.tt().createScriptURL(n),r.p="",(()=>{var n={5350:1};r.f.i=(u,a)=>{n[u]||importScripts(r.tu(r.p+r.u(u)))};var t=self.webpackChunkcue_ui=self.webpackChunkcue_ui||[],h=t.push.bind(t);t.push=u=>{var[a,d,p]=u;for(var l in d)r.o(d,l)&&(r.m[l]=d[l]);for(p&&p(r);a.length;)n[a.pop()]=1;h(u)}})(),(()=>{var n=r.x;r.x=()=>r.e(2076).then(n)})(),r.x()})();