@qaecy/cue-ui 0.0.58 → 0.0.59
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/1520.js +1 -1
- package/{2021.js → 1701.js} +1 -1
- package/1837.js +1 -1
- package/2283.js +1 -1
- package/2317.js +1 -1
- package/2775.js +1 -1
- package/2839.js +1 -1
- package/29.js +1 -1
- package/3202.js +1 -0
- package/{5277.js → 3213.js} +1 -1
- package/3614.js +1 -1
- package/{2003.js → 3842.js} +1 -1
- package/3869.js +1 -0
- package/4098.js +1 -1
- package/5381.js +1 -1
- package/5649.js +1 -1
- package/6233.js +1 -1
- package/6947.js +1 -1
- package/7727.js +1 -0
- package/9396.js +1 -1
- package/9707.js +1 -0
- package/992.js +1 -1
- package/index.js +1 -1
- package/main.js +1 -1
- package/package.json +1 -1
- package/2081.js +0 -1
- package/880.js +0 -1
- package/8855.js +0 -1
package/7727.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[7727],{4631(se,B,u){u.d(B,{G:()=>ue});var M=u(467),f=u(7705),y=u(2271),h=u(5802),l=u(5381),V=u(1024),j=u(9421),G=u(5794),w=u(9352),$=u(6117),U=u(8547),I=u(3319),T=u(5971),O=u(7573),X=u(9769),e=u(5547);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 S=u(2245),Z=u(5745),q=u(63),ee=u(9695),m=u(5448),x=u(2611);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,j.F,I.ButtonIcon,T.Button,m.ButtonLabel,S.Typography,Z.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,V.p,j.F,G.L,$.W,U.T,I.ButtonIcon,T.Button,K,S.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})()},7727(se,B,u){u.d(B,{CueDocumentViewer:()=>ee});var M=u(467),f=u(7705),y=u(2271),h=u(5802),l=u(5547),V=u(9769),j=u(5381),G=u(2245),w=u(4631);class ${requestRDFChange;requestFileLocations;requestFilePathEntityAdd}var U=u(2065),I=u(5187),T=u(7293);const O=["viewerHost"];function X(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 e(m,x){1&m&&(l.j41(0,"cue-flexcontainer",5)(1,"cue-typography"),l.EFF(2,"Loading\u2026"),l.k0s()())}function W(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 H(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 z(m,x){if(1&m&&(l.j41(0,"div",3),l.nVh(1,X,1,3,"cue-document-info",4),l.nVh(2,e,3,0,"cue-flexcontainer",5)(3,W,3,1,"cue-flexcontainer",5),l.j41(4,"div",6),l.eu8(5,null,1),l.k0s(),l.nVh(7,H,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 Y(m,x){1&m&&l.eu8(0)}function J(m,x){if(1&m&&(l.j41(0,"cue-card",2),l.DNE(1,Y,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 Q(m,x){1&m&&l.eu8(0)}function K(m,x){if(1&m&&l.DNE(0,Q,1,0,"ng-container",9),2&m){l.XpG();const a=l.sdS(1);l.Y8G("ngTemplateOutlet",a)}}const S=[".fragments",".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=S.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(3418),u.e(3036)]).then(u.bind(u,3036)),{DocumentViewerSettings:P}=yield u.e(3418).then(u.bind(u,3418));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,U.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(O,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,z,8,3,"ng-template",null,0,l.C5r),l.nVh(2,J,2,3,"cue-card",2)(3,K,1,1,"ng-container")),2&d&&(l.R7$(2),l.vxM("none"!==g.variant()?2:3))},dependencies:[V.MD,V.T3,j.FlexContainer,G.Typography,w.G,I.Card,T.x],styles:["[_nghost-%COMP%]{display:contents}"],changeDetection:0})}return m})()}}]);
|
package/9396.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[9396],{9396(W,x,c){c.d(x,{CueContextViewer:()=>L});var p=c(467),d=c(7705),a=c(5802),r=c(2271),g=c(1492),v=c(2283),_=c(2839),f=c(6455),C=c(8334),y=c(9352),D=c(7851),e=c(5547);function I(n,l){1&n&&(e.j41(0,"div",1),e.EFF(1),e.nI1(2,"transloco"),e.k0s()),2&n&&(e.R7$(),e.JRh(e.bMT(2,1,"components.contextViewer.infoNoContext")))}function w(n,l){if(1&n){const t=e.RV6();e.j41(0,"cue-tabs",2)(1,"cue-tab",5),e.nI1(2,"transloco"),e.j41(3,"cue-doc-list",6),e.bIt("clickedDocument",function(s){a.eBV(t);const i=e.XpG();return a.Njj(i.onDocumentClicked(s))}),e.k0s()(),e.j41(4,"cue-tab",5),e.nI1(5,"transloco"),e.j41(6,"cue-ent-list-inner",7),e.bIt("rowClicked",function(s){a.eBV(t);const i=e.XpG();return a.Njj(i.onEntityRowClicked(s))}),e.k0s()()()}if(2&n){const t=e.XpG();e.R7$(),e.Y8G("label",e.bMT(2,9,"components.contextViewer.tabDocuments")),e.R7$(2),e.Y8G("documentRefs",t.documentRefs())("documentData",t.documentData())("handlers",t._docHandlers())("variant",t.variant()),e.R7$(),e.Y8G("label",e.bMT(5,11,"components.contextViewer.tabEntities")),e.R7$(2),e.Y8G("entities",t.entityIris())("entityData",t.entityData())("handlers",t._entityHandlers())}}function b(n,l){if(1&n){const t=e.RV6();e.j41(0,"cue-doc-list",6),e.bIt("clickedDocument",function(s){a.eBV(t);const i=e.XpG();return a.Njj(i.onDocumentClicked(s))}),e.k0s()}if(2&n){const t=e.XpG();e.Y8G("documentRefs",t.documentRefs())("documentData",t.documentData())("handlers",t._docHandlers())("variant",t.variant())}}function M(n,l){if(1&n){const t=e.RV6();e.j41(0,"cue-ent-list-inner",8),e.bIt("rowClicked",function(s){a.eBV(t);const i=e.XpG();return a.Njj(i.onEntityRowClicked(s))}),e.k0s()}if(2&n){const t=e.XpG();e.Y8G("entities",t.entityIris())("entityData",t.entityData())("handlers",t._entityHandlers())}}function R(n,l){1&n&&(e.j41(0,"div",1),e.EFF(1),e.nI1(2,"transloco"),e.k0s()),2&n&&(e.R7$(),e.JRh(e.bMT(2,1,"components.contextViewer.infoNoItems")))}let k=(()=>{class n{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)({});itemRowClicked=(0,d.CGW)();loading=(0,r.EW)(()=>!!this.contextId()&&!this.contextDoc());_docItems=(0,r.EW)(()=>(this.contextDoc()?.items??[]).filter(t=>"document"===t.type));_entityItems=(0,r.EW)(()=>(this.contextDoc()?.items??[]).filter(t=>"entity"===t.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(t=>({id:t.id,relevance:t.relevance})));entityIris=(0,r.EW)(()=>this._entityItems().map(t=>t.id));_docHandlers=(0,r.EW)(()=>({requestData:t=>this.handlers()?.requestDocumentData?.(t),requestDownload:t=>this.handlers()?.requestDownloadDocument?.(t),requestOpen:(t,o)=>this.handlers()?.requestOpenDocument?.(t,o),requestOpenInDir:(t,o)=>this.handlers()?.requestOpenDocumentInDir?.(t,o)}));_entityHandlers=(0,r.EW)(()=>({requestData:(t,o)=>this.handlers()?.requestEntityData?.(t,o),requestOpen:t=>this.handlers()?.requestOpenEntity?.(t)}));onEntityRowClicked({row:t}){this.itemRowClicked.emit({type:"entity",row:t,index:this._originalIndex(t.entity)})}onDocumentClicked(t){this.itemRowClicked.emit({type:"document",row:t,index:this._originalIndex(t.id)})}_originalIndex(t){return(this.contextDoc()?.items??[]).findIndex(o=>o.id===t)}constructor(){(0,a.QZP)(()=>{const t=this.contextId();t&&this.handlers()?.requestContext?.(t)})}static \u0275fac=function(o){return new(o||n)};static \u0275cmp=e.VBU({type:n,selectors:[["cue-context-viewer-inner"]],inputs:{contextId:[1,"contextId"],handlers:[1,"handlers"],variant:[1,"variant"],contextDoc:[1,"contextDoc"],documentData:[1,"documentData"],entityData:[1,"entityData"]},outputs:{itemRowClicked:"itemRowClicked"},decls:7,vars:5,consts:[[2,"position","relative","height","100%","width","100%",3,"cueLogoLoader","cueLogoLoaderMessage"],[1,"cv-status"],[2,"height","100%"],[3,"documentRefs","documentData","handlers","variant"],[2,"height","400px",3,"entities","entityData","handlers"],[3,"label"],[3,"clickedDocument","documentRefs","documentData","handlers","variant"],[2,"height","100%",3,"rowClicked","entities","entityData","handlers"],[2,"height","400px",3,"rowClicked","entities","entityData","handlers"]],template:function(o,s){1&o&&(e.j41(0,"div",0),e.nI1(1,"transloco"),e.nVh(2,I,3,3,"div",1)(3,w,7,13,"cue-tabs",2)(4,b,1,4,"cue-doc-list",3)(5,M,1,3,"cue-ent-list-inner",4)(6,R,3,3,"div",1),e.k0s()),2&o&&(e.Y8G("cueLogoLoader",s.loading())("cueLogoLoaderMessage",e.bMT(1,3,"components.contextViewer.infoLoading")),e.R7$(2),e.vxM(s.contextDoc()?s.hasBoth()?3:s.hasDocuments()?4:s.hasEntities()?5:6:2))},dependencies:[v.g,_.u,f.t,C.o,D.k,y.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}"],changeDetection:0})}return n})();var V=c(5381),j=c(2245),N=c(7293);function E(n,l){if(1&n&&(e.j41(0,"cue-flexcontainer",0)(1,"cue-typography",2),e.EFF(2),e.k0s()()),2&n){const t=e.XpG();e.R7$(2),e.SpI(" ",t.errorMessage()," ")}}function T(n,l){1&n&&(e.j41(0,"cue-flexcontainer",0)(1,"cue-typography",3),e.EFF(2," No project connected. "),e.k0s()())}function F(n,l){if(1&n&&e.nrm(0,"cue-logo-link",5),2&n){const t=e.XpG(2);e.Y8G("projectId",t.projectId())}}function G(n,l){if(1&n){const t=e.RV6();e.j41(0,"div",1)(1,"cue-context-viewer-inner",4),e.bIt("itemRowClicked",function(s){a.eBV(t);const i=e.XpG();return a.Njj(i.itemRowClicked.emit(s))}),e.k0s(),e.nVh(2,F,1,1,"cue-logo-link",5),e.k0s()}if(2&n){const t=e.XpG();e.Y8G("cueLogoLoader","loading"===t.state()),e.R7$(),e.Y8G("contextDoc",t.contextDoc())("documentData",t.documentData())("entityData",t.entityData())("handlers",t._handlers())("variant",t.variant()),e.R7$(),e.vxM(t.showLogo()?2:-1)}}function B(n){return{id:n.id,contentIRI:n.contentIRI??n.id,path:n.path??"",suffix:n.suffix??"",size:n.size??0,tags:n.tags??[],summary:n.summary??"",categories:n.categories??[],subject:n.subject,providerId:n.providerId,relevance:0}}let L=(()=>{class n{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)();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;_handlers=(0,r.EW)(()=>({requestDocumentData:t=>this._documents()?.requestDocumentData(t),requestEntityData:(t,o)=>this._entities()?.requestEntityData(t,o)}));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(t,o,s){var i=this;return(0,p.A)(function*(){if(i._teardown(),i.contextDoc.set(void 0),i.documentData.set({}),i.entityData.set({}),t&&o&&s){i.state.set("loading"),i.errorMessage.set(null);try{const u=yield t.api.contexts.getContext(o,s);i.contextDoc.set(u);const m=new g.f$(t.api,o),h=new g.g8(t.api,o);i._documents.set(m),i._entities.set(h),i._unsubDocs=m.documentInfoMap.subscribe(()=>i._syncDocumentData(m)),i._unsubEntities=h.entityInfoMap.subscribe(()=>i._syncEntityData(h)),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(t){const o=t.documentInfoMap.get(),s={};for(const[i,u]of Object.entries(o))s[i]=B(u);this.documentData.set(s)}_syncEntityData(t){const o=t.entityInfoMap.get(),s={};for(const[i,u]of Object.entries(o))s[i]={value:u.value??i,categories:u.categories??[],mentionCount:u.mentionCount};this.entityData.set(s)}_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(o){return new(o||n)};static \u0275cmp=e.VBU({type:n,selectors:[["cue-context-viewer"]],inputs:{cue:[1,"cue"],projectId:[1,"projectId"],contextId:[1,"contextId"],variant:[1,"variant"],showLogo:[1,"showLogo"]},outputs:{itemRowClicked:"itemRowClicked"},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%",3,"itemRowClicked","contextDoc","documentData","entityData","handlers","variant"],[2,"position","absolute","top","12px","left","12px","z-index","5",3,"projectId"]],template:function(o,s){1&o&&e.nVh(0,E,3,1,"cue-flexcontainer",0)(1,T,3,0,"cue-flexcontainer",0)(2,G,3,7,"div",1),2&o&&e.vxM("error"===s.state()?0:"idle"===s.state()?1:2)},dependencies:[k,V.FlexContainer,j.Typography,D.k,N.x],styles:["[_nghost-%COMP%]{display:block;width:100%;height:100%}"],changeDetection:0})}return n})()}}]);
|
|
1
|
+
"use strict";(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[9396],{9396(U,p,c){c.d(p,{CueContextViewer:()=>A});var _=c(467),u=c(7705),a=c(5802),d=c(2271),h=c(8645),v=c(2283),x=c(2839),f=c(4631),y=c(1625),C=c(6455),I=c(8334),w=c(9352),D=c(7851),t=c(5547);function b(n,r){1&n&&(t.j41(0,"div",1),t.EFF(1),t.nI1(2,"transloco"),t.k0s()),2&n&&(t.R7$(),t.JRh(t.bMT(2,1,"components.contextViewer.infoNoContext")))}function M(n,r){if(1&n){const e=t.RV6();t.j41(0,"cue-tabs",2)(1,"cue-tab",7),t.nI1(2,"transloco"),t.j41(3,"cue-doc-list",8),t.bIt("clickedDocument",function(s){a.eBV(e);const o=t.XpG();return a.Njj(o.onDocumentClicked(s))}),t.k0s()(),t.j41(4,"cue-tab",7),t.nI1(5,"transloco"),t.j41(6,"cue-ent-list-inner",9),t.bIt("rowClicked",function(s){a.eBV(e);const o=t.XpG();return a.Njj(o.onEntityRowClicked(s))}),t.k0s()()()}if(2&n){const e=t.XpG();t.R7$(),t.Y8G("label",t.bMT(2,9,"components.contextViewer.tabDocuments")),t.R7$(2),t.Y8G("documentRefs",e.documentRefs())("documentData",e.documentData())("handlers",e._docHandlers())("variant",e.variant()),t.R7$(),t.Y8G("label",t.bMT(5,11,"components.contextViewer.tabEntities")),t.R7$(2),t.Y8G("entities",e.entityIris())("entityData",e.entityData())("handlers",e._entityHandlers())}}function E(n,r){if(1&n&&t.nrm(0,"cue-document-info",3),2&n){const e=t.XpG();t.Y8G("subject",e.singleDocumentSubject())("handlers",e._docInfoHandlers)("contentCategories",e.singleDocument().categories)("fileLocations",e.singleDocumentFileLocations())}}function j(n,r){if(1&n){const e=t.RV6();t.j41(0,"cue-doc-list",8),t.bIt("clickedDocument",function(s){a.eBV(e);const o=t.XpG();return a.Njj(o.onDocumentClicked(s))}),t.k0s()}if(2&n){const e=t.XpG();t.Y8G("documentRefs",e.documentRefs())("documentData",e.documentData())("handlers",e._docHandlers())("variant",e.variant())}}function V(n,r){if(1&n&&t.nrm(0,"cue-entity-info",5),2&n){const e=t.XpG();t.Y8G("entity",e.singleEntity())("handlers",e._entityInfoHandlers)}}function N(n,r){if(1&n){const e=t.RV6();t.j41(0,"cue-ent-list-inner",10),t.bIt("rowClicked",function(s){a.eBV(e);const o=t.XpG();return a.Njj(o.onEntityRowClicked(s))}),t.k0s()}if(2&n){const e=t.XpG();t.Y8G("entities",e.entityIris())("entityData",e.entityData())("handlers",e._entityHandlers())}}function R(n,r){1&n&&(t.j41(0,"div",1),t.EFF(1),t.nI1(2,"transloco"),t.k0s()),2&n&&(t.R7$(),t.JRh(t.bMT(2,1,"components.contextViewer.infoNoItems")))}let k=(()=>{class n{contextId=(0,u.hFB)(void 0);handlers=(0,u.hFB)(void 0);variant=(0,u.hFB)("none");contextDoc=(0,u.hFB)(void 0);documentData=(0,u.hFB)({});entityData=(0,u.hFB)({});itemRowClicked=(0,u.CGW)();loading=(0,d.EW)(()=>!!this.contextId()&&!this.contextDoc());_docItems=(0,d.EW)(()=>(this.contextDoc()?.items??[]).filter(e=>"document"===e.type));_entityItems=(0,d.EW)(()=>(this.contextDoc()?.items??[]).filter(e=>"entity"===e.type));hasDocuments=(0,d.EW)(()=>this._docItems().length>0);hasEntities=(0,d.EW)(()=>this._entityItems().length>0);hasBoth=(0,d.EW)(()=>this.hasDocuments()&&this.hasEntities());documentRefs=(0,d.EW)(()=>this._docItems().map(e=>({id:e.id,relevance:e.relevance})));entityIris=(0,d.EW)(()=>this._entityItems().map(e=>e.id));singleDocument=(0,d.EW)(()=>{if(1===this._docItems().length)return this.documentData()[this._docItems()[0].id]});isSingleDocument=(0,d.EW)(()=>this.hasDocuments()&&!this.hasEntities()&&!!this.singleDocument());singleDocumentSubject=(0,d.EW)(()=>this.singleDocument()?.subject||this.singleDocument()?.path||"");singleDocumentFileLocations=(0,d.EW)(()=>{const e=this.singleDocument();return e?[{iri:e.id,path:e.path,providerId:e.providerId}]:[]});_docInfoHandlers={};singleEntity=(0,d.EW)(()=>{if(1!==this._entityItems().length)return;const e=this._entityItems()[0].id,i=this.entityData()[e];return i?{iri:e,value:i.value,categories:i.categories}:void 0});isSingleEntity=(0,d.EW)(()=>this.hasEntities()&&!this.hasDocuments()&&!!this.singleEntity());_entityInfoHandlers={};_docHandlers=(0,d.EW)(()=>({requestData:e=>this.handlers()?.requestDocumentData?.(e),requestDownload:e=>this.handlers()?.requestDownloadDocument?.(e),requestOpen:(e,i)=>this.handlers()?.requestOpenDocument?.(e,i),requestOpenInDir:(e,i)=>this.handlers()?.requestOpenDocumentInDir?.(e,i)}));_entityHandlers=(0,d.EW)(()=>({requestData:(e,i)=>this.handlers()?.requestEntityData?.(e,i),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)})}_originalIndex(e){return(this.contextDoc()?.items??[]).findIndex(i=>i.id===e)}constructor(){(0,a.QZP)(()=>{const e=this.contextId();e&&this.handlers()?.requestContext?.(e)})}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=t.VBU({type:n,selectors:[["cue-context-viewer-inner"]],inputs:{contextId:[1,"contextId"],handlers:[1,"handlers"],variant:[1,"variant"],contextDoc:[1,"contextDoc"],documentData:[1,"documentData"],entityData:[1,"entityData"]},outputs:{itemRowClicked:"itemRowClicked"},decls:9,vars:5,consts:[[2,"position","relative","height","100%","width","100%",3,"cueLogoLoader","cueLogoLoaderMessage"],[1,"cv-status"],[2,"height","100%"],[3,"subject","handlers","contentCategories","fileLocations"],[3,"documentRefs","documentData","handlers","variant"],[3,"entity","handlers"],[2,"height","400px",3,"entities","entityData","handlers"],[3,"label"],[3,"clickedDocument","documentRefs","documentData","handlers","variant"],[2,"height","100%",3,"rowClicked","entities","entityData","handlers"],[2,"height","400px",3,"rowClicked","entities","entityData","handlers"]],template:function(i,s){1&i&&(t.j41(0,"div",0),t.nI1(1,"transloco"),t.nVh(2,b,3,3,"div",1)(3,M,7,13,"cue-tabs",2)(4,E,1,4,"cue-document-info",3)(5,j,1,4,"cue-doc-list",4)(6,V,1,2,"cue-entity-info",5)(7,N,1,3,"cue-ent-list-inner",6)(8,R,3,3,"div",1),t.k0s()),2&i&&(t.Y8G("cueLogoLoader",s.loading())("cueLogoLoaderMessage",t.bMT(1,3,"components.contextViewer.infoLoading")),t.R7$(2),t.vxM(s.contextDoc()?s.hasBoth()?3:s.isSingleDocument()?4:s.hasDocuments()?5:s.isSingleEntity()?6:s.hasEntities()?7:8:2))},dependencies:[v.g,x.u,f.G,y.U,C.t,I.o,D.k,w.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}"],changeDetection:0})}return n})();var G=c(5381),T=c(2245),L=c(7293),F=c(7727),W=c(3202);function B(n,r){if(1&n&&(t.j41(0,"cue-flexcontainer",0)(1,"cue-typography",2),t.EFF(2),t.k0s()()),2&n){const e=t.XpG();t.R7$(2),t.SpI(" ",e.errorMessage()," ")}}function X(n,r){1&n&&(t.j41(0,"cue-flexcontainer",0)(1,"cue-typography",3),t.EFF(2," No project connected. "),t.k0s()())}function Y(n,r){if(1&n&&t.nrm(0,"cue-document-viewer-wc",4),2&n){const e=t.XpG(2);t.Y8G("cue",e.cue())("projectId",e.projectId())("uuid",r)("showLogo",e.showLogo())("variant",e.variant())}}function P(n,r){if(1&n&&t.nrm(0,"cue-entity-viewer-wc",5),2&n){const e=t.XpG(2);t.Y8G("cue",e.cue())("projectId",e.projectId())("iri",r)("showLogo",e.showLogo())("variant",e.variant())}}function H(n,r){if(1&n&&t.nrm(0,"cue-logo-link",7),2&n){const e=t.XpG(3);t.Y8G("projectId",e.projectId())}}function O(n,r){if(1&n){const e=t.RV6();t.j41(0,"cue-context-viewer-inner",6),t.bIt("itemRowClicked",function(s){a.eBV(e);const o=t.XpG(2);return a.Njj(o.itemRowClicked.emit(s))}),t.k0s(),t.nVh(1,H,1,1,"cue-logo-link",7)}if(2&n){const e=t.XpG(2);t.Y8G("contextDoc",e.contextDoc())("documentData",e.documentData())("entityData",e.entityData())("handlers",e._handlers())("variant",e.variant()),t.R7$(),t.vxM(e.showLogo()?1:-1)}}function S(n,r){if(1&n&&(t.j41(0,"div",1),t.nVh(1,Y,1,5,"cue-document-viewer-wc",4)(2,P,1,5,"cue-entity-viewer-wc",5)(3,O,2,6),t.k0s()),2&n){let e;const i=t.XpG();t.Y8G("cueLogoLoader","loading"===i.state()),t.R7$(),t.vxM((e=i._singleDocumentUuid())?1:(e=i._singleEntityIri())?2:3,e)}}function $(n){return{id:n.id,contentIRI:n.contentIRI??n.id,path:n.path??"",suffix:n.suffix??"",size:n.size??0,tags:n.tags??[],summary:n.summary??"",categories:n.categories??[],subject:n.subject,providerId:n.providerId,relevance:0}}let A=(()=>{class n{cue=(0,u.hFB)(void 0);projectId=(0,u.hFB)(void 0);contextId=(0,u.hFB)(void 0);variant=(0,u.hFB)("none");showLogo=(0,u.hFB)(!1,{transform:u.L39});itemRowClicked=(0,u.CGW)();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,d.EW)(()=>{const e=this.contextDoc()?.items??[],i=e.filter(o=>"document"===o.type),s=e.filter(o=>"entity"===o.type);return 1===i.length&&0===s.length?i[0].id:void 0});_singleEntityIri=(0,d.EW)(()=>{const e=this.contextDoc()?.items??[],i=e.filter(o=>"document"===o.type),s=e.filter(o=>"entity"===o.type);return 1===s.length&&0===i.length?s[0].id:void 0});_handlers=(0,d.EW)(()=>({requestDocumentData:e=>this._documents()?.requestDocumentData(e),requestEntityData:(e,i)=>this._entities()?.requestEntityData(e,i)}));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,i,s){var o=this;return(0,_.A)(function*(){if(o._teardown(),o.contextDoc.set(void 0),o.documentData.set({}),o.entityData.set({}),e&&i&&s){o.state.set("loading"),o.errorMessage.set(null);try{const l=yield e.api.contexts.getContext(i,s);o.contextDoc.set(l);const m=new h.f$(e.api,i),g=new h.g8(e.api,i);o._documents.set(m),o._entities.set(g),o._unsubDocs=m.documentInfoMap.subscribe(()=>o._syncDocumentData(m)),o._unsubEntities=g.entityInfoMap.subscribe(()=>o._syncEntityData(g)),o.state.set("ready")}catch(l){console.error("[cue-context-viewer] Failed to load context",l),o.errorMessage.set(l instanceof Error?l.message:"Failed to load context."),o.state.set("error")}}else o.state.set("idle")})()}_syncDocumentData(e){const i=e.documentInfoMap.get(),s={};for(const[o,l]of Object.entries(i))s[o]=$(l);this.documentData.set(s)}_syncEntityData(e){const i=e.entityInfoMap.get(),s={};for(const[o,l]of Object.entries(i))s[o]={value:l.value??o,categories:l.categories??[],mentionCount:l.mentionCount};this.entityData.set(s)}_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(i){return new(i||n)};static \u0275cmp=t.VBU({type:n,selectors:[["cue-context-viewer"]],inputs:{cue:[1,"cue"],projectId:[1,"projectId"],contextId:[1,"contextId"],variant:[1,"variant"],showLogo:[1,"showLogo"]},outputs:{itemRowClicked:"itemRowClicked"},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,"height","100%","display","block",3,"cue","projectId","iri","showLogo","variant"],[2,"height","100%",3,"itemRowClicked","contextDoc","documentData","entityData","handlers","variant"],[2,"position","absolute","top","12px","left","12px","z-index","5",3,"projectId"]],template:function(i,s){1&i&&t.nVh(0,B,3,1,"cue-flexcontainer",0)(1,X,3,0,"cue-flexcontainer",0)(2,S,4,2,"div",1),2&i&&t.vxM("error"===s.state()?0:"idle"===s.state()?1:2)},dependencies:[k,G.FlexContainer,T.Typography,D.k,L.x,F.CueDocumentViewer,W.CueEntityViewer],styles:["[_nghost-%COMP%]{display:block;width:100%;height:100%}"],changeDetection:0})}return n})()}}]);
|
package/9707.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[9695,9707],{5448(R,O,_){"use strict";_.d(O,{ButtonLabel:()=>D});var g=_(7705),x=_(2245),u=_(5547);const e=["*"];let D=(()=>{class p{fontSize=(0,g.hFB)("m");italic=(0,g.hFB)(!1);noWrap=(0,g.hFB)(!0);static \u0275fac=function(b){return new(b||p)};static \u0275cmp=u.VBU({type:p,selectors:[["cue-button-label"]],inputs:{fontSize:[1,"fontSize"],italic:[1,"italic"],noWrap:[1,"noWrap"]},ngContentSelectors:e,decls:3,vars:3,consts:[[3,"size","italic","noWrap"]],template:function(b,v){1&b&&(u.NAR(),u.j41(0,"div")(1,"cue-typography",0),u.SdG(2),u.k0s()()),2&b&&(u.R7$(),u.Y8G("size",v.fontSize())("italic",v.italic())("noWrap",v.noWrap()))},dependencies:[x.Typography],styles:["div[_ngcontent-%COMP%]{transform:translateY(.05em)}"]})}return p})()},9695(R,O,_){"use strict";_.d(O,{Switch:()=>p});var g=_(7705),x=_(29),u=_(5547);function e(d,s){if(1&d&&u.nrm(0,"cue-svg-icon",2),2&d){const b=u.XpG();u.Y8G("name",b.iconChecked())}}function D(d,s){if(1&d&&u.nrm(0,"cue-svg-icon",2),2&d){const b=u.XpG();u.Y8G("name",b.icon())}}let p=(()=>{class d{size=(0,g.hFB)("m");icon=(0,g.hFB)(void 0);iconChecked=(0,g.hFB)(void 0);disabled=(0,g.hFB)(!1);checked=(0,g.geq)(!1);toggleChange=(0,g.CGW)();toggle(){this.checked.set(!this.checked()),this.toggleChange.emit(this.checked())}static \u0275fac=function(v){return new(v||d)};static \u0275cmp=u.VBU({type:d,selectors:[["cue-input-switch"]],hostVars:5,hostBindings:function(v,M){2&v&&(u.BMQ("size",M.size()),u.AVh("checked",M.checked())("disabled",M.disabled()))},inputs:{size:[1,"size"],icon:[1,"icon"],iconChecked:[1,"iconChecked"],disabled:[1,"disabled"],checked:[1,"checked"]},outputs:{checked:"checkedChange",toggleChange:"toggleChange"},decls:4,vars:3,consts:[["type","checkbox",3,"click","checked","disabled"],[1,"indicator"],[3,"name"]],template:function(v,M){1&v&&(u.j41(0,"input",0),u.bIt("click",function(){return M.toggle()}),u.k0s(),u.j41(1,"div",1),u.nVh(2,e,1,1,"cue-svg-icon",2)(3,D,1,1,"cue-svg-icon",2),u.k0s()),2&v&&(u.Y8G("checked",M.checked())("disabled",M.disabled()),u.R7$(2),u.vxM(M.checked()&&M.iconChecked()?2:M.icon()?3:-1))},dependencies:[x.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})()},5745(R,O,_){"use strict";_.d(O,{a:()=>I});var g=_(7705),x=_(5802),u=_(2271),e=_(5547);const D=["dialog"],p=["*",[["","modal-footer",""]]],d=["*","[modal-footer]"];function s(w,z){if(1&w&&(e.rj2(0,"h2",7),e.EFF(1),e.eux()),2&w){const l=e.XpG(3);e.R7$(),e.JRh(l.effectiveTitle())}}function b(w,z){if(1&w&&(e.rj2(0,"p",8),e.EFF(1),e.eux()),2&w){const l=e.XpG(3);e.R7$(),e.JRh(l.subtitle())}}function v(w,z){if(1&w){const l=e.RV6();e.rj2(0,"button",10),e.VwU("click",function(){x.eBV(l);const P=e.XpG(3);return x.Njj(P.onClose())}),x.qSk(),e.rj2(1,"svg",11),e.Hgh(2,"path",12),e.eux()()}}function M(w,z){if(1&w&&(e.rj2(0,"div",4)(1,"div",6),e.nVh(2,s,2,1,"h2",7),e.nVh(3,b,2,1,"p",8),e.eux(),e.nVh(4,v,3,0,"button",9),e.eux()),2&w){const l=e.XpG(2);e.R7$(2),e.vxM(l.effectiveTitle()?2:-1),e.R7$(),e.vxM(l.subtitle()?3:-1),e.R7$(),e.vxM(l.displayCloseBtn()?4:-1)}}function U(w,z){if(1&w&&(e.rj2(0,"div",3),e.VwU("click",function(S){return S.stopPropagation()}),e.nVh(1,M,5,3,"div",4),e.rj2(2,"div",5),e.SdG(3),e.eux(),e.SdG(4,1),e.eux()),2&w){const l=e.XpG();e.xc7("min-width",l.minWidth()),e.AVh("has-header",l.effectiveTitle()||l.displayCloseBtn()),e.R7$(),e.vxM(l.effectiveTitle()||l.displayCloseBtn()?1:-1)}}let I=(()=>{class w{visible=(0,g.geq)(!0);closeOnBackgroundClick=(0,g.hFB)(!0);displayCloseBtn=(0,g.hFB)(!0);label=(0,g.hFB)("");title=(0,g.hFB)("");subtitle=(0,g.hFB)("");minWidth=(0,g.hFB)();close=(0,g.CGW)();dialogRef=g.ebz.required("dialog");effectiveTitle=(0,u.EW)(()=>this.title()||this.label());constructor(){(0,x.QZP)(()=>{const l=this.dialogRef().nativeElement;this.visible()?l.open||l.showModal():l.open&&l.close()})}onBackdropClick(){this.closeOnBackgroundClick()&&this.onClose()}onClose(){this.visible.set(!1),this.close.emit()}static \u0275fac=function(S){return new(S||w)};static \u0275cmp=e.VBU({type:w,selectors:[["cue-modal"]],viewQuery:function(S,P){1&S&&e.wEZ(P.dialogRef,D,5),2&S&&e.NyB()},inputs:{visible:[1,"visible"],closeOnBackgroundClick:[1,"closeOnBackgroundClick"],displayCloseBtn:[1,"displayCloseBtn"],label:[1,"label"],title:[1,"title"],subtitle:[1,"subtitle"],minWidth:[1,"minWidth"]},outputs:{visible:"visibleChange",close:"close"},ngContentSelectors:d,decls:3,vars:1,consts:[["dialog",""],[1,"modal-dialog",3,"cancel","click"],[1,"panel",3,"has-header","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(S,P){1&S&&(e.NAR(p),e.rj2(0,"dialog",1,0),e.VwU("cancel",function(){return P.onClose()})("click",function(){return P.onBackdropClick()}),e.nVh(2,U,5,5,"div",2),e.eux()),2&S&&(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}"]})}return w})()},2065(R,O,_){"use strict";function u(p,d,s="text/plain"){return function g(p,d="data.zip"){const s=document.createElement("a"),b=URL.createObjectURL(p);s.href=b,s.download=d,document.body.appendChild(s),s.click(),document.body.removeChild(s),URL.revokeObjectURL(b)}(new Blob([p],{type:s}),d)}function e(p,d){const s=document.createElement("a");s.style.display="hidden",s.setAttribute("href",window.URL.createObjectURL(p)),s.setAttribute("download",d),document.body.appendChild(s),s.click(),s.remove()}_.d(O,{KE:()=>e,YN:()=>u})},7573(R,O,_){"use strict";_.d(O,{E:()=>g});const g={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#"}},7374(R){R.exports=function(){"use strict";var _=6e4,g=36e5,x="millisecond",u="second",e="minute",D="hour",p="day",d="week",s="month",b="quarter",v="year",M="date",U="Invalid Date",I=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,w=/\[([^\]]+)]|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,z={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(c){var i=["th","st","nd","rd"],t=c%100;return"["+c+(i[(t-20)%10]||i[t]||i[0])+"]"}},l=function(c,i,t){var o=String(c);return!o||o.length>=i?c:""+Array(i+1-o.length).join(t)+c},S={s:l,z:function(c){var i=-c.utcOffset(),t=Math.abs(i),o=Math.floor(t/60),n=t%60;return(i<=0?"+":"-")+l(o,2,"0")+":"+l(n,2,"0")},m:function c(i,t){if(i.date()<t.date())return-c(t,i);var o=12*(t.year()-i.year())+(t.month()-i.month()),n=i.clone().add(o,s),r=t-n<0,a=i.clone().add(o+(r?-1:1),s);return+(-(o+(t-n)/(r?n-a:a-n))||0)},a:function(c){return c<0?Math.ceil(c)||0:Math.floor(c)},p:function(c){return{M:s,y:v,w:d,d:p,D:M,h:D,m:e,s:u,ms:x,Q:b}[c]||String(c||"").toLowerCase().replace(/s$/,"")},u:function(c){return void 0===c}},P="en",T={};T[P]=z;var H="$isDayjsObject",G=function(c){return c instanceof Y||!(!c||!c[H])},F=function c(i,t,o){var n;if(!i)return P;if("string"==typeof i){var r=i.toLowerCase();T[r]&&(n=r),t&&(T[r]=t,n=r);var a=i.split("-");if(!n&&a.length>1)return c(a[0])}else{var f=i.name;T[f]=i,n=f}return!o&&n&&(P=n),n||!o&&P},C=function(c,i){if(G(c))return c.clone();var t="object"==typeof i?i:{};return t.date=c,t.args=arguments,new Y(t)},h=S;h.l=F,h.i=G,h.w=function(c,i){return C(c,{locale:i.$L,utc:i.$u,x:i.$x,$offset:i.$offset})};var Y=function(){function c(t){this.$L=F(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[H]=!0}var i=c.prototype;return i.parse=function(t){this.$d=function(o){var n=o.date,r=o.utc;if(null===n)return new Date(NaN);if(h.u(n))return new Date;if(n instanceof Date)return new Date(n);if("string"==typeof n&&!/Z$/i.test(n)){var a=n.match(I);if(a){var f=a[2]-1||0,m=(a[7]||"0").substring(0,3);return r?new Date(Date.UTC(a[1],f,a[3]||1,a[4]||0,a[5]||0,a[6]||0,m)):new Date(a[1],f,a[3]||1,a[4]||0,a[5]||0,a[6]||0,m)}}return new Date(n)}(t),this.init()},i.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()},i.$utils=function(){return h},i.isValid=function(){return this.$d.toString()!==U},i.isSame=function(t,o){var n=C(t);return this.startOf(o)<=n&&n<=this.endOf(o)},i.isAfter=function(t,o){return C(t)<this.startOf(o)},i.isBefore=function(t,o){return this.endOf(o)<C(t)},i.$g=function(t,o,n){return h.u(t)?this[o]:this.set(n,t)},i.unix=function(){return Math.floor(this.valueOf()/1e3)},i.valueOf=function(){return this.$d.getTime()},i.startOf=function(t,o){var n=this,r=!!h.u(o)||o,a=h.p(t),f=function(W,$){var E=h.w(n.$u?Date.UTC(n.$y,$,W):new Date(n.$y,$,W),n);return r?E:E.endOf(p)},m=function(W,$){return h.w(n.toDate()[W].apply(n.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice($)),n)},y=this.$W,k=this.$M,B=this.$D,A="set"+(this.$u?"UTC":"");switch(a){case v:return r?f(1,0):f(31,11);case s:return r?f(1,k):f(0,k+1);case d:var L=this.$locale().weekStart||0,j=(y<L?y+7:y)-L;return f(r?B-j:B+(6-j),k);case p:case M:return m(A+"Hours",0);case D:return m(A+"Minutes",1);case e:return m(A+"Seconds",2);case u:return m(A+"Milliseconds",3);default:return this.clone()}},i.endOf=function(t){return this.startOf(t,!1)},i.$set=function(t,o){var n,r=h.p(t),a="set"+(this.$u?"UTC":""),f=(n={},n[p]=a+"Date",n[M]=a+"Date",n[s]=a+"Month",n[v]=a+"FullYear",n[D]=a+"Hours",n[e]=a+"Minutes",n[u]=a+"Seconds",n[x]=a+"Milliseconds",n)[r],m=r===p?this.$D+(o-this.$W):o;if(r===s||r===v){var y=this.clone().set(M,1);y.$d[f](m),y.init(),this.$d=y.set(M,Math.min(this.$D,y.daysInMonth())).$d}else f&&this.$d[f](m);return this.init(),this},i.set=function(t,o){return this.clone().$set(t,o)},i.get=function(t){return this[h.p(t)]()},i.add=function(t,o){var n,r=this;t=Number(t);var a=h.p(o),f=function(k){var B=C(r);return h.w(B.date(B.date()+Math.round(k*t)),r)};if(a===s)return this.set(s,this.$M+t);if(a===v)return this.set(v,this.$y+t);if(a===p)return f(1);if(a===d)return f(7);var m=(n={},n[e]=_,n[D]=g,n[u]=1e3,n)[a]||1,y=this.$d.getTime()+t*m;return h.w(y,this)},i.subtract=function(t,o){return this.add(-1*t,o)},i.format=function(t){var o=this,n=this.$locale();if(!this.isValid())return n.invalidDate||U;var r=t||"YYYY-MM-DDTHH:mm:ssZ",a=h.z(this),f=this.$H,m=this.$m,y=this.$M,k=n.weekdays,B=n.months,L=function($,E,N,V){return $&&($[E]||$(o,r))||N[E].slice(0,V)},j=function($){return h.s(f%12||12,$,"0")},W=n.meridiem||function($,E,N){var V=$<12?"AM":"PM";return N?V.toLowerCase():V};return r.replace(w,function($,E){return E||function(N){switch(N){case"YY":return String(o.$y).slice(-2);case"YYYY":return h.s(o.$y,4,"0");case"M":return y+1;case"MM":return h.s(y+1,2,"0");case"MMM":return L(n.monthsShort,y,B,3);case"MMMM":return L(B,y);case"D":return o.$D;case"DD":return h.s(o.$D,2,"0");case"d":return String(o.$W);case"dd":return L(n.weekdaysMin,o.$W,k,2);case"ddd":return L(n.weekdaysShort,o.$W,k,3);case"dddd":return k[o.$W];case"H":return String(f);case"HH":return h.s(f,2,"0");case"h":return j(1);case"hh":return j(2);case"a":return W(f,m,!0);case"A":return W(f,m,!1);case"m":return String(m);case"mm":return h.s(m,2,"0");case"s":return String(o.$s);case"ss":return h.s(o.$s,2,"0");case"SSS":return h.s(o.$ms,3,"0");case"Z":return a}return null}($)||a.replace(":","")})},i.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},i.diff=function(t,o,n){var r,a=this,f=h.p(o),m=C(t),y=(m.utcOffset()-this.utcOffset())*_,k=this-m,B=function(){return h.m(a,m)};switch(f){case v:r=B()/12;break;case s:r=B();break;case b:r=B()/3;break;case d:r=(k-y)/6048e5;break;case p:r=(k-y)/864e5;break;case D:r=k/g;break;case e:r=k/_;break;case u:r=k/1e3;break;default:r=k}return n?r:h.a(r)},i.daysInMonth=function(){return this.endOf(s).$D},i.$locale=function(){return T[this.$L]},i.locale=function(t,o){if(!t)return this.$L;var n=this.clone(),r=F(t,o,!0);return r&&(n.$L=r),n},i.clone=function(){return h.w(this.$d,this)},i.toDate=function(){return new Date(this.valueOf())},i.toJSON=function(){return this.isValid()?this.toISOString():null},i.toISOString=function(){return this.$d.toISOString()},i.toString=function(){return this.$d.toUTCString()},c}(),K=Y.prototype;return C.prototype=K,[["$ms",x],["$s",u],["$m",e],["$H",D],["$W",p],["$M",s],["$y",v],["$D",M]].forEach(function(c){K[c[1]]=function(i){return this.$g(i,c[0],c[1])}}),C.extend=function(c,i){return c.$i||(c(i,Y,C),c.$i=!0),C},C.locale=F,C.isDayjs=G,C.unix=function(c){return C(1e3*c)},C.en=T[P],C.Ls=T,C.p={},C}()}}]);
|
package/992.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[992],{4152(ue,x,k){k.d(x,{B:()=>P});var w=k(2065),_=k(7284),F=k.n(_);function P(R,A,M="table.csv"){const p=A.map(v=>v.label),b=R.map(v=>A.map(O=>O.formatter?O.formatter(v[O.key]):v[O.key])),$=F().unparse({fields:p,data:b});(0,w.YN)($,M,"text/csv")}},992(ue,x,k){k.d(x,{a:()=>ct});var w=k(2271),_=k(5802);function F(e){return Array.isArray?Array.isArray(e):"[object Array]"===ae(e)}function R(e){return null==e?"":function P(e){if("string"==typeof e)return e;if("bigint"==typeof e)return e.toString();const t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(e)}function A(e){return"string"==typeof e}function M(e){return"number"==typeof e}function b(e){return"object"==typeof e}function v(e){return null!=e}function O(e){return!e.trim().length}function ae(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const Y="Invalid doc index: must be a non-negative integer within the bounds of the docs array",he=Object.prototype.hasOwnProperty;var Ie=class{constructor(e){this._keys=[],this._keyMap={};let t=0;e.forEach(s=>{const n=le(s);this._keys.push(n),this._keyMap[n.id]=n,t+=n.weight}),this._keys.forEach(s=>{s.weight/=t})}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}};function le(e){let t=null,s=null,n=null,i=1,r=null;if(A(e)||F(e))n=e,t=de(e),s=K(e);else{if(!he.call(e,"name"))throw new Error("Missing name property in key");const c=e.name;if(n=c,he.call(e,"weight")&&void 0!==e.weight&&(i=e.weight,i<=0))throw new Error((e=>`Property 'weight' in key '${e}' must be a positive integer`)(K(c)));t=de(c),s=K(c),r=e.getFn??null}return{path:t,id:s,weight:i,src:n,getFn:r}}function de(e){return F(e)?e:e.split(".")}function K(e){return F(e)?e.join("."):e}const f=Object.freeze({isCaseSensitive:!1,ignoreDiacritics:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(e,t)=>e.score===t.score?e.idx<t.idx?-1:1:e.score<t.score?-1:1,includeMatches:!1,findAllMatches:!1,minMatchCharLength:1,location:0,threshold:.6,distance:100,useExtendedSearch:!1,useTokenSearch:!1,tokenize:void 0,tokenMatch:"any",getFn:function Be(e,t){const s=[];let n=!1;const i=(r,c,u,o)=>{if(v(r))if(c[u]){const h=r[c[u]];if(!v(h))return;if(u===c.length-1&&(A(h)||M(h)||function p(e){return!0===e||!1===e||function $(e){return b(e)&&null!==e}(e)&&"[object Boolean]"==ae(e)}(h)||"bigint"==typeof h))s.push(void 0!==o?{v:R(h),i:o}:R(h));else if(F(h)){n=!0;for(let a=0,l=h.length;a<l;a+=1)i(h[a],c,u+1,a)}else c.length&&i(h,c,u+1,o)}else s.push(void 0!==o?{v:r,i:o}:r)};return i(e,A(t)?t.split("."):t,0),n?s:s[0]},ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1});var Q=class{constructor({getFn:e=f.getFn,fieldNormWeight:t=f.fieldNormWeight}={}){this.norm=function Oe(e=1,t=3){const s=new Map,n=Math.pow(10,t);return{get(i){let r=1,c=!1;for(let o=0;o<i.length;o++)32===i.charCodeAt(o)?c||(r++,c=!0):c=!1;if(s.has(r))return s.get(r);const u=Math.round(n/Math.pow(r,.5*e))/n;return s.set(r,u),u},clear(){s.clear()}}}(t,3),this.getFn=e,this.isCreated=!1,this.docs=[],this.keys=[],this._keysMap={},this.setIndexRecords()}setSources(e=[]){this.docs=e}setIndexRecords(e=[]){this.records=e}setKeys(e=[]){this.keys=e,this._keysMap={},e.forEach((t,s)=>{this._keysMap[t.id]=s})}create(){if(this.isCreated||!this.docs.length)return;this.isCreated=!0;const e=this.docs.length;this.records=new Array(e);let t=0;if(A(this.docs[0]))for(let s=0;s<e;s++){const n=this._createStringRecord(this.docs[s],s);n&&(this.records[t++]=n)}else for(let s=0;s<e;s++)this.records[t++]=this._createObjectRecord(this.docs[s],s);this.records.length=t,this.norm.clear()}add(e,t){if(!Number.isInteger(t)||t<0)throw new Error(Y);if(A(e)){const n=this._createStringRecord(e,t);return n&&this.records.push(n),n}const s=this._createObjectRecord(e,t);return this.records.push(s),s}removeAt(e){if(!Number.isInteger(e)||e<0)throw new Error(Y);for(let t=0,s=this.records.length;t<s;t+=1)if(this.records[t].i===e){this.records.splice(t,1);break}for(let t=0,s=this.records.length;t<s;t+=1)this.records[t].i>e&&(this.records[t].i-=1)}removeAll(e){const t=new Set;for(const n of e)Number.isInteger(n)&&n>=0&&t.add(n);if(0===t.size)return;this.records=this.records.filter(n=>!t.has(n.i));const s=Array.from(t).sort((n,i)=>n-i);for(const n of this.records){let i=0,r=s.length;for(;i<r;){const c=i+r>>>1;s[c]<n.i?i=c+1:r=c}n.i-=i}}getValueForItemAtKeyId(e,t){return e[this._keysMap[t]]}size(){return this.records.length}_createStringRecord(e,t){return!v(e)||O(e)?null:{v:e,i:t,n:this.norm.get(e)}}_createObjectRecord(e,t){const s={i:t,$:{}};for(let n=0,i=this.keys.length;n<i;n++){const r=this.keys[n],c=r.getFn?r.getFn(e):this.getFn(e,r.path);if(v(c))if(F(c)){const u=[];for(let o=0,h=c.length;o<h;o+=1){const a=c[o];if(v(a))if(A(a)){if(!O(a)){const l={v:a,i:o,n:this.norm.get(a)};u.push(l)}}else if(v(a.v)){const l=A(a.v)?a.v:R(a.v);if(!O(l)){const d={v:l,i:a.i,n:this.norm.get(l)};u.push(d)}}}s.$[n]=u}else if(A(c)&&!O(c)){const u={v:c,n:this.norm.get(c)};s.$[n]=u}}return s}toJSON(){return{keys:this.keys.map(({getFn:e,...t})=>t),records:this.records}}};function fe(e,t,{getFn:s=f.getFn,fieldNormWeight:n=f.fieldNormWeight}={}){const i=new Q({getFn:s,fieldNormWeight:n});return i.setKeys(e.map(le)),i.setSources(t),i.create(),i}function Te(e,{getFn:t=f.getFn,fieldNormWeight:s=f.fieldNormWeight}={}){const{keys:n,records:i}=e,r=new Q({getFn:t,fieldNormWeight:s});return r.setKeys(n),r.setIndexRecords(i),r}function Ne(e){const t={};for(let s=0,n=e.length;s<n;s+=1){const i=e.charAt(s);t[i]=(t[i]||0)|1<<n-s-1}return t}function G(e){if(e.length<=1)return e;e.sort((s,n)=>s[0]-n[0]||s[1]-n[1]);const t=[e[0]];for(let s=1,n=e.length;s<n;s+=1){const i=t[t.length-1],r=e[s];r[0]<=i[1]+1?i[1]=Math.max(i[1],r[1]):t.push(r)}return t}const ge={\u0142:"l",\u0141:"L",\u0111:"d",\u0110:"D",\u00f8:"o",\u00d8:"O",\u0127:"h",\u0126:"H",\u0167:"t",\u0166:"T",\u0131:"i",\u00df:"ss"},xe=new RegExp("["+Object.keys(ge).join("")+"]","g"),z="function"==typeof String.prototype.normalize?e=>e.normalize("NFD").replace(/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/g,"").replace(xe,t=>ge[t]):e=>e;var J=class{constructor(e,{location:t=f.location,threshold:s=f.threshold,distance:n=f.distance,includeMatches:i=f.includeMatches,findAllMatches:r=f.findAllMatches,minMatchCharLength:c=f.minMatchCharLength,isCaseSensitive:u=f.isCaseSensitive,ignoreDiacritics:o=f.ignoreDiacritics,ignoreLocation:h=f.ignoreLocation}={}){if(this.options={location:t,threshold:s,distance:n,includeMatches:i,findAllMatches:r,minMatchCharLength:c,isCaseSensitive:u,ignoreDiacritics:o,ignoreLocation:h},e=u?e:e.toLowerCase(),e=o?z(e):e,this.pattern=e,this.chunks=[],!this.pattern.length)return;const a=(d,m)=>{this.chunks.push({pattern:d,alphabet:Ne(d),startIndex:m})},l=this.pattern.length;if(l>32){let d=0;const m=l%32,g=l-m;for(;d<g;)a(this.pattern.substr(d,32),d),d+=32;if(m){const C=l-32;a(this.pattern.substr(C),C)}}else a(this.pattern,0)}searchIn(e){const{isCaseSensitive:t,ignoreDiacritics:s,includeMatches:n}=this.options;if(e=t?e:e.toLowerCase(),e=s?z(e):e,this.pattern===e){const g={isMatch:!0,score:0};return n&&(g.indices=[[0,e.length-1]]),g}const{location:i,distance:r,threshold:c,findAllMatches:u,minMatchCharLength:o,ignoreLocation:h}=this.options,a=[];let l=0,d=!1;this.chunks.forEach(({pattern:g,alphabet:C,startIndex:E})=>{const{isMatch:I,score:L,indices:T}=function Le(e,t,s,{location:n=f.location,distance:i=f.distance,threshold:r=f.threshold,findAllMatches:c=f.findAllMatches,minMatchCharLength:u=f.minMatchCharLength,includeMatches:o=f.includeMatches,ignoreLocation:h=f.ignoreLocation}={}){if(t.length>32)throw new Error("Pattern length exceeds max of 32.");const a=t.length,l=e.length,d=Math.max(0,Math.min(n,l));let m=r,g=d;const C=(D,y)=>{const S=D/a;if(h)return S;const j=Math.abs(d-y);return i?S+j/i:j?1:S},E=u>1||o,I=E?Array(l):[];let L;for(;(L=e.indexOf(t,g))>-1;){const D=C(0,L);if(m=Math.min(D,m),g=L+a,E){let y=0;for(;y<a;)I[L+y]=1,y+=1}}g=-1;let T=[],U=1,_e=0,V=a+l;const ut=1<<a-1;for(let D=0;D<a;D+=1){let y=0,S=V;for(;y<S;)C(D,d+S)<=m?y=S:V=S,S=Math.floor((V-y)/2+y);V=S;let j=Math.max(1,d-S+1);const oe=c?l:Math.min(d+S,l)+a,N=Array(oe+2);N[oe+1]=(1<<D)-1;for(let B=oe;B>=j;B-=1){const ce=B-1;if(N[B]=(N[B+1]<<1|1)&s[e[ce]],D&&(N[B]|=(T[B+1]|T[B])<<1|1|T[B+1]),N[B]&ut&&(U=C(D,ce),U<=m)){if(m=U,g=ce,_e=D,g<=d)break;j=Math.max(1,2*d-g)}}if(C(D+1,d)>m)break;T=N}if(E&&g>=0){const D=Math.min(l-1,g+a-1+_e);for(let y=g;y<=D;y+=1)s[e[y]]&&(I[y]=1)}const re={isMatch:g>=0,score:Math.max(.001,U)};if(E){const D=function Re(e=[],t=f.minMatchCharLength){const s=[];let n=-1,i=-1,r=0;for(let c=e.length;r<c;r+=1){const u=e[r];u&&-1===n?n=r:!u&&-1!==n&&(i=r-1,i-n+1>=t&&s.push([n,i]),n=-1)}return e[r-1]&&r-n>=t&&s.push([n,r-1]),s}(I,u);D.length?o&&(re.indices=D):re.isMatch=!1}return re}(e,g,C,{location:i+E,distance:r,threshold:c,findAllMatches:u,minMatchCharLength:o,includeMatches:n,ignoreLocation:h});I&&(d=!0),l+=L,I&&T&&a.push(...T)});const m={isMatch:d,score:d?l/this.chunks.length:1};return d&&n&&(m.indices=G(a)),m}};const Pe=new Set(["fuzzy","include"]);function $e(e){return e.startsWith("inverse")}const X=[{type:"exact",multiRegex:/^="(.*)"$/,singleRegex:/^=(.*)$/,create:e=>({type:"exact",search(t){const s=t===e;return{isMatch:s,score:s?0:1,indices:[0,e.length-1]}}})},{type:"include",multiRegex:/^'"(.*)"$/,singleRegex:/^'(.*)$/,create:e=>({type:"include",search(t){let n,s=0;const i=[],r=e.length;for(;(n=t.indexOf(e,s))>-1;)s=n+r,i.push([n,s-1]);const c=!!i.length;return{isMatch:c,score:c?0:1,indices:i}}})},{type:"prefix-exact",multiRegex:/^\^"(.*)"$/,singleRegex:/^\^(.*)$/,create:e=>({type:"prefix-exact",search(t){const s=t.startsWith(e);return{isMatch:s,score:s?0:1,indices:[0,e.length-1]}}})},{type:"inverse-prefix-exact",multiRegex:/^!\^"(.*)"$/,singleRegex:/^!\^(.*)$/,create:e=>({type:"inverse-prefix-exact",search(t){const s=!t.startsWith(e);return{isMatch:s,score:s?0:1,indices:[0,t.length-1]}}})},{type:"inverse-suffix-exact",multiRegex:/^!"(.*)"\$$/,singleRegex:/^!(.*)\$$/,create:e=>({type:"inverse-suffix-exact",search(t){const s=!t.endsWith(e);return{isMatch:s,score:s?0:1,indices:[0,t.length-1]}}})},{type:"suffix-exact",multiRegex:/^"(.*)"\$$/,singleRegex:/^(.*)\$$/,create:e=>({type:"suffix-exact",search(t){const s=t.endsWith(e);return{isMatch:s,score:s?0:1,indices:[t.length-e.length,t.length-1]}}})},{type:"inverse-exact",multiRegex:/^!"(.*)"$/,singleRegex:/^!(.*)$/,create:e=>({type:"inverse-exact",search(t){const s=-1===t.indexOf(e);return{isMatch:s,score:s?0:1,indices:[0,t.length-1]}}})},{type:"fuzzy",multiRegex:/^"(.*)"$/,singleRegex:/^(.*)$/,create:(e,t={})=>{const s=new J(e,{location:t.location??f.location,threshold:t.threshold??f.threshold,distance:t.distance??f.distance,includeMatches:t.includeMatches??f.includeMatches,findAllMatches:t.findAllMatches??f.findAllMatches,minMatchCharLength:t.minMatchCharLength??f.minMatchCharLength,isCaseSensitive:t.isCaseSensitive??f.isCaseSensitive,ignoreDiacritics:t.ignoreDiacritics??f.ignoreDiacritics,ignoreLocation:t.ignoreLocation??f.ignoreLocation});return{type:"fuzzy",search:n=>s.searchIn(n)}}}],me=X.length;function Ae(e,t){const s=e.match(t);return s?s[1]:null}const Z=[];function q(...e){Z.push(...e)}function W(e,t){for(let s=0,n=Z.length;s<n;s+=1){const i=Z[s];if(i.condition(e,t))return new i(e,t)}return new J(e,t)}const H_AND="$and",te=e=>!(!e.$and&&!e.$or),pe=e=>({[H_AND]:Object.keys(e).map(t=>({[t]:e[t]}))});function Ce(e,t,{auto:s=!0}={}){const n=i=>{if(A(i)){const o={keyId:null,pattern:i};return s&&(o.searcher=W(i,t)),o}const r=Object.keys(i),c=(e=>!!e.$path)(i);if(!c&&r.length>1&&!te(i))return n(pe(i));if((e=>!F(e)&&b(e)&&!te(e))(i)){const o=c?i.$path:r[0],h=c?i.$val:i[o];if(!A(h))throw new Error((e=>`Invalid value for key ${e}`)(o));const a={keyId:K(o),pattern:h};return s&&(a.searcher=W(h,t)),a}const u={children:[],operator:r[0]};return r.forEach(o=>{const h=i[o];F(h)&&h.forEach(a=>{u.children.push(n(a))})}),u};return te(e)||(e=pe(e)),n(e)}function se(e,{ignoreFieldNorm:t=f.ignoreFieldNorm}){let s=1;return e.forEach(({key:n,norm:i,score:r})=>{const c=n?n.weight:null;s*=Math.pow(0===r&&c?Number.EPSILON:r,(c||1)*(t?1:i))}),s}var Qe=class{constructor(e){this.limit=e,this.heap=[]}get size(){return this.heap.length}shouldInsert(e){return this.size<this.limit||e<this.heap[0].score}insert(e){this.size<this.limit?(this.heap.push(e),this._bubbleUp(this.size-1)):e.score<this.heap[0].score&&(this.heap[0]=e,this._sinkDown(0))}extractSorted(e){return this.heap.sort(e)}_bubbleUp(e){const t=this.heap;for(;e>0;){const s=e-1>>1;if(t[e].score<=t[s].score)break;const n=t[e];t[e]=t[s],t[s]=n,e=s}}_sinkDown(e){const t=this.heap,s=t.length;let n=e;do{const i=2*(e=n)+1,r=2*e+2;if(i<s&&t[i].score>t[n].score&&(n=i),r<s&&t[r].score>t[n].score&&(n=r),n!==e){const c=t[e];t[e]=t[n],t[n]=c}}while(n!==e)}};const Xe=/[\p{L}\p{M}\p{N}_]+/gu,Me=new WeakSet;function ne({isCaseSensitive:e=!1,ignoreDiacritics:t=!1,tokenize:s}={}){const n=function qe(e){if("function"==typeof e){let t=!1;return s=>{const n=e(s);if(!t&&(t=!0,!Array.isArray(n)||n.some(i=>"string"!=typeof i)))throw new Error(`[Fuse] tokenize function must return string[]; received ${Array.isArray(n)?"array containing non-strings":typeof n}.`);return n}}return e instanceof RegExp?(e.global||function Ze(e){Me.has(e)||(Me.add(e),console.warn(`[Fuse] tokenize regex ${e} lacks the global flag; only the first match per text will be returned. Add the 'g' flag.`))}(e),t=>t.match(e)||[]):t=>t.match(Xe)||[]}(s);return{tokenize:i=>(e||(i=i.toLowerCase()),t&&(i=z(i)),n(i))}}function ie(e,t,s,n){const i=n.tokenize(t);if(!i.length)return;e.fieldCount++,e.docFieldCount.set(s,(e.docFieldCount.get(s)||0)+1);const r=new Set(i);let c=e.docTermFieldHits.get(s);c||(c=new Map,e.docTermFieldHits.set(s,c));for(const u of r)c.set(u,(c.get(u)||0)+1),e.df.set(u,(e.df.get(u)||0)+1)}function ve(e,t,s,n){const{i,v:r,$:c}=t;if(void 0===r){if(c)for(let u=0;u<s;u++){const o=c[u];if(o)if(Array.isArray(o))for(const h of o)ie(e,h.v,i,n);else ie(e,o.v,i,n)}}else ie(e,r,i,n)}function nt(e,t){const s=e.docFieldCount.get(t);if(void 0===s)return;e.fieldCount-=s,e.docFieldCount.delete(t);const n=e.docTermFieldHits.get(t);if(n){for(const[i,r]of n){const c=(e.df.get(i)||0)-r;c<=0?e.df.delete(i):e.df.set(i,c)}e.docTermFieldHits.delete(t)}}function Ee(e,t){if(0===t.length)return;const s=Array.from(new Set(t)).sort((u,o)=>u-o);for(const u of s)nt(e,u);const n=u=>{let o=0,h=s.length;for(;o<h;){const a=o+h>>>1;s[a]<u?o=a+1:h=a}return u-o},i=s[0],r=new Map;for(const[u,o]of e.docFieldCount)r.set(u>i?n(u):u,o);e.docFieldCount=r;const c=new Map;for(const[u,o]of e.docTermFieldHits)c.set(u>i?n(u):u,o);e.docTermFieldHits=c}var De=(()=>{let e=class{constructor(t,s,n){this.options={...f,...s},this._keyStore=new Ie(this.options.keys),this._docs=t,this._myIndex=null,this._invertedIndex=null,this.setCollection(t,n),this._lastQuery=null,this._lastSearcher=null}_getSearcher(t){if(this._lastQuery===t)return this._lastSearcher;const s=W(t,this._invertedIndex?{...this.options,_invertedIndex:this._invertedIndex}:this.options);return this._lastQuery=t,this._lastSearcher=s,s}setCollection(t,s){if(this._docs=t,s&&!(s instanceof Q))throw new Error("Incorrect 'index' type");if(this._myIndex=s||fe(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight}),this.options.useTokenSearch){const n=ne({isCaseSensitive:this.options.isCaseSensitive,ignoreDiacritics:this.options.ignoreDiacritics,tokenize:this.options.tokenize});this._invertedIndex=function tt(e,t,s){const n={fieldCount:0,df:new Map,docFieldCount:new Map,docTermFieldHits:new Map};for(const i of e)ve(n,i,t,s);return n}(this._myIndex.records,this._myIndex.keys.length,n)}this._invalidateSearcherCache()}add(t){if(!v(t))return;this._docs.push(t);const s=this._myIndex.add(t,this._docs.length-1);if(this._invertedIndex&&s){const n=ne({isCaseSensitive:this.options.isCaseSensitive,ignoreDiacritics:this.options.ignoreDiacritics,tokenize:this.options.tokenize});!function st(e,t,s,n){ve(e,t,s,n)}(this._invertedIndex,s,this._myIndex.keys.length,n)}this._invalidateSearcherCache()}remove(t=()=>!1){const s=[],n=[];for(let i=0,r=this._docs.length;i<r;i+=1)t(this._docs[i],i)&&(s.push(this._docs[i]),n.push(i));if(n.length){this._invertedIndex&&Ee(this._invertedIndex,n);const i=new Set(n);this._docs=this._docs.filter((r,c)=>!i.has(c)),this._myIndex.removeAll(n),this._invalidateSearcherCache()}return s}removeAt(t){if(!Number.isInteger(t)||t<0||t>=this._docs.length)throw new Error(Y);this._invertedIndex&&Ee(this._invertedIndex,[t]);const s=this._docs.splice(t,1)[0];return this._myIndex.removeAt(t),this._invalidateSearcherCache(),s}_invalidateSearcherCache(){this._lastQuery=null,this._lastSearcher=null}getIndex(){return this._myIndex}search(t,s){const{limit:n=-1}=s||{},{includeMatches:i,includeScore:r,shouldSort:c,sortFn:u,ignoreFieldNorm:o}=this.options;if(A(t)&&!t.trim()){let l=this._docs.map((d,m)=>({item:d,refIndex:m}));return M(n)&&n>-1&&(l=l.slice(0,n)),l}let a;if(M(n)&&n>0&&A(t)){const l=new Qe(n);A(this._docs[0])?this._searchStringList(t,{heap:l,ignoreFieldNorm:o}):this._searchObjectList(t,{heap:l,ignoreFieldNorm:o}),a=l.extractSorted(u)}else a=A(t)?A(this._docs[0])?this._searchStringList(t):this._searchObjectList(t):this._searchLogical(t),function Ye(e,{ignoreFieldNorm:t=f.ignoreFieldNorm}){e.forEach(s=>{s.score=se(s.matches,{ignoreFieldNorm:t})})}(a,{ignoreFieldNorm:o}),c&&a.sort(u),M(n)&&n>-1&&(a=a.slice(0,n));return function Je(e,t,{includeMatches:s=f.includeMatches,includeScore:n=f.includeScore}={}){return e.map(i=>{const{idx:r}=i,c={item:t[r],refIndex:r};return s&&(c.matches=function Ge(e){const t=[];return e.matches.forEach(s=>{if(!v(s.indices)||!s.indices.length)return;const n={indices:s.indices,value:s.value};s.key&&(n.key=s.key.id),s.idx>-1&&(n.refIndex=s.idx),t.push(n)}),t}(i)),n&&(c.score=i.score),c})}(a,this._docs,{includeMatches:i,includeScore:r})}_searchStringList(t,{heap:s,ignoreFieldNorm:n}={}){const i=this._getSearcher(t),r=this.options.useTokenSearch&&"all"===this.options.tokenMatch,{records:c}=this._myIndex,u=s?null:[];return c.forEach(({v:o,i:h,n:a})=>{if(!v(o))return;const l=i.searchIn(o);if(l.isMatch){const d={score:l.score,value:o,norm:a,indices:l.indices};r&&(d.matchedMask=l.matchedMask,d.matchedTerms=l.matchedTerms,d.termCount=l.termCount);const m=[d];if(!r||this._coversAllTokens(m)){const g={item:o,idx:h,matches:m};s?(g.score=se(g.matches,{ignoreFieldNorm:n}),s.shouldInsert(g.score)&&s.insert(g)):u.push(g)}}}),u}_searchLogical(t){const s=Ce(t,this.options),n=(u,o,h)=>{if(!("children"in u)){const{keyId:m,searcher:g}=u;let C;return null===m?(C=[],this._myIndex.keys.forEach((E,I)=>{C.push(...this._findMatches({key:E,value:o[I],searcher:g}))})):C=this._findMatches({key:this._keyStore.get(m),value:this._myIndex.getValueForItemAtKeyId(o,m),searcher:g}),C&&C.length?[{idx:h,item:o,matches:C}]:[]}const{children:a,operator:l}=u,d=[];for(let m=0,g=a.length;m<g;m+=1){const E=n(a[m],o,h);if(E.length)d.push(...E);else if("$and"===l)return[]}return d},i=this._myIndex.records,r=new Map,c=[];return i.forEach(({$:u,i:o})=>{if(v(u)){const h=n(s,u,o);h.length&&(r.has(o)||(r.set(o,{idx:o,item:u,matches:[]}),c.push(r.get(o))),h.forEach(({matches:a})=>{r.get(o).matches.push(...a)}))}}),c}_searchObjectList(t,{heap:s,ignoreFieldNorm:n}={}){const i=this._getSearcher(t),r=this.options.useTokenSearch&&"all"===this.options.tokenMatch,{keys:c,records:u}=this._myIndex,o=s?null:[];return u.forEach(({$:h,i:a})=>{if(!v(h))return;const l=[];let d=!1,m=!1;if(c.forEach((g,C)=>{const E=this._findMatches({key:g,value:h[C],searcher:i});E.length?(l.push(...E),E[0].hasInverse&&(m=!0)):d=!0}),(!m||!d)&&l.length&&(!r||this._coversAllTokens(l))){const g={idx:a,item:h,matches:l};s?(g.score=se(g.matches,{ignoreFieldNorm:n}),s.shouldInsert(g.score)&&s.insert(g)):o.push(g)}}),o}_findMatches({key:t,value:s,searcher:n}){if(!v(s))return[];const i=[];if(F(s))s.forEach(({v:r,i:c,n:u})=>{if(!v(r))return;const o=n.searchIn(r);if(o.isMatch){const h={score:o.score,key:t,value:r,idx:c,norm:u,indices:o.indices,hasInverse:o.hasInverse};void 0!==o.termCount&&(h.matchedMask=o.matchedMask,h.matchedTerms=o.matchedTerms,h.termCount=o.termCount),i.push(h)}});else{const{v:r,n:c}=s,u=n.searchIn(r);if(u.isMatch){const o={score:u.score,key:t,value:r,norm:c,indices:u.indices,hasInverse:u.hasInverse};void 0!==u.termCount&&(o.matchedMask=u.matchedMask,o.matchedTerms=u.matchedTerms,o.termCount=u.termCount),i.push(o)}}return i}_coversAllTokens(t){const s=t.length?t[0].termCount:void 0;if(void 0===s)return!0;if(s<=31){let i=0;for(let r=0;r<t.length;r++)i|=t[r].matchedMask||0;return i===2**s-1}const n=new Set;for(let i=0;i<t.length;i++){const r=t[i].matchedTerms;if(r)for(const c of r)n.add(c)}return n.size===s}};return e.version="7.4.2",e.createIndex=fe,e.parseIndex=Te,e.config=f,e.match=function(t,s,n){if(n&&n.useTokenSearch)throw new Error("Fuse.match does not support useTokenSearch: token search requires corpus-level statistics (df, fieldCount) that a one-off string comparison does not have. Use new Fuse(...).search(...) instead.");return W(t,{...f,...n}).searchIn(s)},e.parseQuery=Ce,e})();q(class{constructor(e,{isCaseSensitive:t=f.isCaseSensitive,ignoreDiacritics:s=f.ignoreDiacritics,includeMatches:n=f.includeMatches,minMatchCharLength:i=f.minMatchCharLength,ignoreLocation:r=f.ignoreLocation,findAllMatches:c=f.findAllMatches,location:u=f.location,threshold:o=f.threshold,distance:h=f.distance}={}){this.query=null,this.options={isCaseSensitive:t,ignoreDiacritics:s,includeMatches:n,minMatchCharLength:i,findAllMatches:c,ignoreLocation:r,location:u,threshold:o,distance:h},e=t?e:e.toLowerCase(),e=s?z(e):e,this.pattern=e,this.query=function We(e,t={}){return e.replace(/\\\|/g,"\0").split("|").map(s=>{const n=function Ke(e){const t=[],s=e.length;let n=0;for(;n<s;){for(;n<s&&" "===e[n];)n++;if(n>=s)break;let i=n;for(;i<s&&" "!==e[i]&&'"'!==e[i];)i++;if(i<s&&'"'===e[i]){for(i++;i<s;){if('"'===e[i]){const r=i+1;if(r>=s||" "===e[r]){i++;break}if("$"===e[r]&&(r+1>=s||" "===e[r+1])){i+=2;break}}i++}t.push(e.substring(n,i)),n=i}else{for(;i<s&&" "!==e[i];)i++;t.push(e.substring(n,i)),n=i}}return t}(s.replace(/\u0000/g,"|").trim()).filter(r=>r&&!!r.trim()),i=[];for(let r=0,c=n.length;r<c;r+=1){const u=n[r];let o=!1,h=-1;for(;!o&&++h<me;){const a=X[h],l=Ae(u,a.multiRegex);l&&(i.push(a.create(l,t)),o=!0)}if(!o)for(h=-1;++h<me;){const a=X[h],l=Ae(u,a.singleRegex);if(l){i.push(a.create(l,t));break}}}return i})}(this.pattern,this.options)}static condition(e,t){return t.useExtendedSearch}searchIn(e){const t=this.query;if(!t)return{isMatch:!1,score:1};const{includeMatches:s,isCaseSensitive:n,ignoreDiacritics:i}=this.options;e=n?e:e.toLowerCase(),e=i?z(e):e;let r=0;const c=[];let u=0,o=!1;for(let h=0,a=t.length;h<a;h+=1){const l=t[h];c.length=0,r=0,o=!1;for(let d=0,m=l.length;d<m;d+=1){const g=l[d],{isMatch:C,indices:E,score:I}=g.search(e);if(!C){u=0,r=0,c.length=0,o=!1;break}r+=1,u+=I,$e(g.type)&&(o=!0),s&&(Pe.has(g.type)?c.push(...E):c.push(E))}if(r){const d={isMatch:!0,score:u/r};return o&&(d.hasInverse=!0),s&&(d.indices=G(c)),d}}return{isMatch:!1,score:1}}}),q(class{static condition(e,t){return t.useTokenSearch}constructor(e,t){this.options=t,this.analyzer=ne({isCaseSensitive:t.isCaseSensitive,ignoreDiacritics:t.ignoreDiacritics,tokenize:t.tokenize});const s=this.analyzer.tokenize(e),{df:n,fieldCount:i}=t._invertedIndex;this.termSearchers=[],this.idfWeights=[];for(const r of s){this.termSearchers.push(new J(r,{location:t.location,threshold:t.threshold,distance:t.distance,includeMatches:t.includeMatches,findAllMatches:t.findAllMatches,minMatchCharLength:t.minMatchCharLength,isCaseSensitive:t.isCaseSensitive,ignoreDiacritics:t.ignoreDiacritics,ignoreLocation:!0}));const c=n.get(r)||0,u=Math.log(1+(i-c+.5)/(c+.5));this.idfWeights.push(u)}this.combineAll="all"===t.tokenMatch,this.numTerms=this.termSearchers.length,this.useMask=this.numTerms<=31}searchIn(e){if(!this.termSearchers.length)return{isMatch:!1,score:1};const t=[];let s=0,n=0,i=0,r=0;const c=this.combineAll&&!this.useMask?new Set:null;for(let h=0;h<this.termSearchers.length;h++){const a=this.termSearchers[h].searchIn(e),l=this.idfWeights[h];n+=l,a.isMatch&&(i++,s+=l*(1-a.score),a.indices&&t.push(...a.indices),this.combineAll&&(this.useMask?r|=1<<h:c.add(h)))}if(0===i)return{isMatch:!1,score:1};const o={isMatch:!0,score:Math.max(.001,n>0?1-s/n:0)};return this.options.includeMatches&&t.length&&(o.indices=G(t)),this.combineAll&&(this.useMask?o.matchedMask=r:o.matchedTerms=c,o.termCount=this.numTerms),o}}),De.use=function(...e){e.forEach(t=>q(t))};var it=De,ot=k(4152);let ct=(()=>{class e{filterOptions=(0,w.uu)(()=>({isCaseSensitive:!!this.filterExactMatch(),includeScore:!1,ignoreDiacritics:!1,shouldSort:!0,includeMatches:!1,findAllMatches:!1,minMatchCharLength:1,location:0,threshold:this.filterExactMatch()?0:.3,distance:100,useExtendedSearch:!1,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1,keys:this.filterKeys()}));fuse=(0,w.EW)(()=>new it(this.sorted(),this.filterOptions()));columnDefs=(0,_.vPA)([]);data=(0,_.vPA)([]);sortCol=(0,_.vPA)(void 0);sortOrder=(0,_.vPA)("ASC");filterValue=(0,_.vPA)(void 0);filterOnlyVisible=(0,_.vPA)(!0);paginatorStartIndex=(0,_.vPA)(1);paginatorEndIndex=(0,_.vPA)(5);showColumnSettings=(0,_.vPA)(!1);totalRows=(0,w.EW)(()=>this.sortedAndFiltered().length);sorted=(0,w.EW)(()=>function rt(e,t,s){if(void 0===e)return[...t];const n=e.split(",").map(r=>r.trim()),i=s.split(",").map(r=>r.trim());return[...t].sort((r,c)=>{for(let u=0;u<n.length;u++){const o=n[u],h=i[u]||i[0];if(!(o in r))continue;let a=r[o],l=c[o];if("object"==typeof a&&(a=r[o].value,l=c[o].value),null==a)return 1;if(null==l)return-1;let d=0;if(d="string"==typeof a&&"string"==typeof l?a.localeCompare(l):a>l?1:a<l?-1:0,"DESC"===h&&(d*=-1),0!==d)return d}return 0})}(this.sortCol(),this.data(),this.sortOrder()));filterCol=(0,_.vPA)(void 0);filterExactMatch=(0,_.vPA)(!1);filterKeys=(0,w.EW)(()=>{const s=this.filterCol();return void 0!==s?[s]:this.filterOnlyVisible()?this.columnDefs().map(n=>n.key):Object.keys(this.sorted()[0]||{})});sortedAndFiltered=(0,w.EW)(()=>{const s=this.filterValue()??"";return""===s?this.sorted():this.fuse().search(s).map(i=>i.item)});sortedFilteredAndPaginated=(0,w.EW)(()=>this.sortedAndFiltered().slice(this.paginatorStartIndex(),this.paginatorEndIndex()));downloadCSV(){const s=this.sortedFilteredAndPaginated(),n=this.columnDefs();(0,ot.B)(s,n)}static \u0275fac=function(n){return new(n||e)};static \u0275prov=_.jDH({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})()},2065(ue,x,k){function F(A,M,p="text/plain"){return function w(A,M="data.zip"){const p=document.createElement("a"),b=URL.createObjectURL(A);p.href=b,p.download=M,document.body.appendChild(p),p.click(),document.body.removeChild(p),URL.revokeObjectURL(b)}(new Blob([A],{type:p}),M)}function P(A,M){const p=document.createElement("a");p.style.display="hidden",p.setAttribute("href",window.URL.createObjectURL(A)),p.setAttribute("download",M),document.body.appendChild(p),p.click(),p.remove()}k.d(x,{KE:()=>P,YN:()=>F})}}]);
|
|
1
|
+
"use strict";(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[992],{4152(_e,K,k){k.d(K,{B:()=>H});var I=k(2065),D=k(7284),F=k.n(D);function H(N,C,b="table.csv"){const V=C.map(p=>p.label),x=N.map(p=>C.map(B=>B.formatter?B.formatter(p[B.key]):p[B.key])),U=F().unparse({fields:V,data:x});(0,I.YN)(U,b,"text/csv")}},992(_e,K,k){k.d(K,{a:()=>ct});var I=k(2271),D=k(5802);function F(e){return Array.isArray?Array.isArray(e):"[object Array]"===ue(e)}function N(e){return null==e?"":function H(e){if("string"==typeof e)return e;if("bigint"==typeof e)return e.toString();const t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(e)}function C(e){return"string"==typeof e}function b(e){return"number"==typeof e}function x(e){return"object"==typeof e}function p(e){return null!=e}function B(e){return!e.trim().length}function ue(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const Q="Invalid doc index: must be a non-negative integer within the bounds of the docs array",he=Object.prototype.hasOwnProperty;var we=class{constructor(e){this._keys=[],this._keyMap={};let t=0;e.forEach(s=>{const n=ae(s);this._keys.push(n),this._keyMap[n.id]=n,t+=n.weight}),this._keys.forEach(s=>{s.weight/=t})}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}};function ae(e){let t=null,s=null,n=null,i=1,r=null;if(C(e)||F(e))n=e,t=le(e),s=P(e);else{if(!he.call(e,"name"))throw new Error("Missing name property in key");const c=e.name;if(n=c,he.call(e,"weight")&&void 0!==e.weight&&(i=e.weight,i<=0))throw new Error((e=>`Property 'weight' in key '${e}' must be a positive integer`)(P(c)));t=le(c),s=P(c),r=e.getFn??null}return{path:t,id:s,weight:i,src:n,getFn:r}}function le(e){return F(e)?e:e.split(".")}function P(e){return F(e)?e.join("."):e}const d=Object.freeze({isCaseSensitive:!1,ignoreDiacritics:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(e,t)=>e.score===t.score?e.idx<t.idx?-1:1:e.score<t.score?-1:1,includeMatches:!1,findAllMatches:!1,minMatchCharLength:1,location:0,threshold:.6,distance:100,useExtendedSearch:!1,useTokenSearch:!1,tokenize:void 0,tokenMatch:"any",getFn:function be(e,t){const s=[];let n=!1;const i=(r,c,u,o)=>{if(p(r))if(c[u]){const a=r[c[u]];if(!p(a))return;if(u===c.length-1&&(C(a)||b(a)||function V(e){return!0===e||!1===e||function U(e){return x(e)&&null!==e}(e)&&"[object Boolean]"==ue(e)}(a)||"bigint"==typeof a))s.push(void 0!==o?{v:N(a),i:o}:N(a));else if(F(a)){n=!0;for(let h=0,l=a.length;h<l;h+=1)i(a[h],c,u+1,h)}else c.length&&i(a,c,u+1,o)}else s.push(void 0!==o?{v:r,i:o}:r)};return i(e,C(t)?t.split("."):t,0),n?s:s[0]},ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1});var Y=class{constructor({getFn:e=d.getFn,fieldNormWeight:t=d.fieldNormWeight}={}){this.norm=function Te(e=1,t=3){const s=new Map,n=Math.pow(10,t);return{get(i){let r=1,c=!1;for(let o=0;o<i.length;o++)32===i.charCodeAt(o)?c||(r++,c=!0):c=!1;if(s.has(r))return s.get(r);const u=Math.round(n/Math.pow(r,.5*e))/n;return s.set(r,u),u},clear(){s.clear()}}}(t,3),this.getFn=e,this.isCreated=!1,this.docs=[],this.keys=[],this._keysMap={},this.setIndexRecords()}setSources(e=[]){this.docs=e}setIndexRecords(e=[]){this.records=e}setKeys(e=[]){this.keys=e,this._keysMap={},e.forEach((t,s)=>{this._keysMap[t.id]=s})}create(){if(this.isCreated||!this.docs.length)return;this.isCreated=!0;const e=this.docs.length;this.records=new Array(e);let t=0;if(C(this.docs[0]))for(let s=0;s<e;s++){const n=this._createStringRecord(this.docs[s],s);n&&(this.records[t++]=n)}else for(let s=0;s<e;s++)this.records[t++]=this._createObjectRecord(this.docs[s],s);this.records.length=t,this.norm.clear()}add(e,t){if(!Number.isInteger(t)||t<0)throw new Error(Q);if(C(e)){const n=this._createStringRecord(e,t);return n&&this.records.push(n),n}const s=this._createObjectRecord(e,t);return this.records.push(s),s}removeAt(e){if(!Number.isInteger(e)||e<0)throw new Error(Q);for(let t=0,s=this.records.length;t<s;t+=1)if(this.records[t].i===e){this.records.splice(t,1);break}for(let t=0,s=this.records.length;t<s;t+=1)this.records[t].i>e&&(this.records[t].i-=1)}removeAll(e){const t=new Set;for(const n of e)Number.isInteger(n)&&n>=0&&t.add(n);if(0===t.size)return;this.records=this.records.filter(n=>!t.has(n.i));const s=Array.from(t).sort((n,i)=>n-i);for(const n of this.records){let i=0,r=s.length;for(;i<r;){const c=i+r>>>1;s[c]<n.i?i=c+1:r=c}n.i-=i}}getValueForItemAtKeyId(e,t){return e[this._keysMap[t]]}size(){return this.records.length}_createStringRecord(e,t){return!p(e)||B(e)?null:{v:e,i:t,n:this.norm.get(e)}}_createObjectRecord(e,t){const s={i:t,$:{}};for(let n=0,i=this.keys.length;n<i;n++){const r=this.keys[n],c=r.getFn?r.getFn(e):this.getFn(e,r.path);if(p(c))if(F(c)){const u=[];for(let o=0,a=c.length;o<a;o+=1){const h=c[o];if(p(h))if(C(h)){if(!B(h)){const l={v:h,i:o,n:this.norm.get(h)};u.push(l)}}else if(p(h.v)){const l=C(h.v)?h.v:N(h.v);if(!B(l)){const f={v:l,i:h.i,n:this.norm.get(l)};u.push(f)}}}s.$[n]=u}else if(C(c)&&!B(c)){const u={v:c,n:this.norm.get(c)};s.$[n]=u}}return s}toJSON(){return{keys:this.keys.map(({getFn:e,...t})=>t),records:this.records}}};function fe(e,t,{getFn:s=d.getFn,fieldNormWeight:n=d.fieldNormWeight}={}){const i=new Y({getFn:s,fieldNormWeight:n});return i.setKeys(e.map(ae)),i.setSources(t),i.create(),i}function Oe(e,{getFn:t=d.getFn,fieldNormWeight:s=d.fieldNormWeight}={}){const{keys:n,records:i}=e,r=new Y({getFn:t,fieldNormWeight:s});return r.setKeys(n),r.setIndexRecords(i),r}function Le(e){const t={};for(let s=0,n=e.length;s<n;s+=1){const i=e.charAt(s);t[i]=(t[i]||0)|1<<n-s-1}return t}function G(e){if(e.length<=1)return e;e.sort((s,n)=>s[0]-n[0]||s[1]-n[1]);const t=[e[0]];for(let s=1,n=e.length;s<n;s+=1){const i=t[t.length-1],r=e[s];r[0]<=i[1]+1?i[1]=Math.max(i[1],r[1]):t.push(r)}return t}const de={\u0142:"l",\u0141:"L",\u0111:"d",\u0110:"D",\u00f8:"o",\u00d8:"O",\u0127:"h",\u0126:"H",\u0167:"t",\u0166:"T",\u0131:"i",\u00df:"ss"},xe=new RegExp("["+Object.keys(de).join("")+"]","g"),R="function"==typeof String.prototype.normalize?e=>e.normalize("NFD").replace(/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/g,"").replace(xe,t=>de[t]):e=>e;var J=class{constructor(e,{location:t=d.location,threshold:s=d.threshold,distance:n=d.distance,includeMatches:i=d.includeMatches,findAllMatches:r=d.findAllMatches,minMatchCharLength:c=d.minMatchCharLength,isCaseSensitive:u=d.isCaseSensitive,ignoreDiacritics:o=d.ignoreDiacritics,ignoreLocation:a=d.ignoreLocation}={}){if(this.options={location:t,threshold:s,distance:n,includeMatches:i,findAllMatches:r,minMatchCharLength:c,isCaseSensitive:u,ignoreDiacritics:o,ignoreLocation:a},e=u?e:e.toLowerCase(),e=o?R(e):e,this.pattern=e,this.chunks=[],!this.pattern.length)return;const h=(f,m)=>{this.chunks.push({pattern:f,alphabet:Le(f),startIndex:m})},l=this.pattern.length;if(l>32){let f=0;const m=l%32,g=l-m;for(;f<g;)h(this.pattern.substr(f,32),f),f+=32;if(m){const A=l-32;h(this.pattern.substr(A),A)}}else h(this.pattern,0)}searchIn(e){const{isCaseSensitive:t,ignoreDiacritics:s,includeMatches:n}=this.options;if(e=t?e:e.toLowerCase(),e=s?R(e):e,this.pattern===e){const g={isMatch:!0,score:0};return n&&(g.indices=[[0,e.length-1]]),g}const{location:i,distance:r,threshold:c,findAllMatches:u,minMatchCharLength:o,ignoreLocation:a}=this.options,h=[];let l=0,f=!1;this.chunks.forEach(({pattern:g,alphabet:A,startIndex:M})=>{const{isMatch:y,score:T,indices:w}=function Re(e,t,s,{location:n=d.location,distance:i=d.distance,threshold:r=d.threshold,findAllMatches:c=d.findAllMatches,minMatchCharLength:u=d.minMatchCharLength,includeMatches:o=d.includeMatches,ignoreLocation:a=d.ignoreLocation}={}){if(t.length>32)throw new Error("Pattern length exceeds max of 32.");const h=t.length,l=e.length,f=Math.max(0,Math.min(n,l));let m=r,g=f;const A=(v,E)=>{const _=v/h;if(a)return _;const L=Math.abs(f-E);return i?_+L/i:L?1:_},M=u>1||o,y=M?Array(l):[];let T;for(;(T=e.indexOf(t,g))>-1;){const v=A(0,T);if(m=Math.min(v,m),g=T+h,M){let E=0;for(;E<h;)y[T+E]=1,E+=1}}g=-1;let w=[],j=1,De=0,W=h+l;const ut=1<<h-1;for(let v=0;v<h;v+=1){let E=0,_=W;for(;E<_;)A(v,f+_)<=m?E=_:W=_,_=Math.floor((W-E)/2+E);W=_;let L=Math.max(1,f-_+1);const oe=c?l:Math.min(f+_,l)+h,O=Array(oe+2);O[oe+1]=(1<<v)-1;for(let S=oe;S>=L;S-=1){const ce=S-1;if(O[S]=(O[S+1]<<1|1)&s[e[ce]],v&&(O[S]|=(w[S+1]|w[S])<<1|1|w[S+1]),O[S]&ut&&(j=A(v,ce),j<=m)){if(m=j,g=ce,De=v,g<=f)break;L=Math.max(1,2*f-g)}}if(A(v+1,f)>m)break;w=O}if(M&&g>=0){const v=Math.min(l-1,g+h-1+De);for(let E=g;E<=v;E+=1)s[e[E]]&&(y[E]=1)}const re={isMatch:g>=0,score:Math.max(.001,j)};if(M){const v=function Ne(e=[],t=d.minMatchCharLength){const s=[];let n=-1,i=-1,r=0;for(let c=e.length;r<c;r+=1){const u=e[r];u&&-1===n?n=r:!u&&-1!==n&&(i=r-1,i-n+1>=t&&s.push([n,i]),n=-1)}return e[r-1]&&r-n>=t&&s.push([n,r-1]),s}(y,u);v.length?o&&(re.indices=v):re.isMatch=!1}return re}(e,g,A,{location:i+M,distance:r,threshold:c,findAllMatches:u,minMatchCharLength:o,includeMatches:n,ignoreLocation:a});y&&(f=!0),l+=T,y&&w&&h.push(...w)});const m={isMatch:f,score:f?l/this.chunks.length:1};return f&&n&&(m.indices=G(h)),m}};const Pe=new Set(["fuzzy","include"]);function $e(e){return e.startsWith("inverse")}const X=[{type:"exact",multiRegex:/^="(.*)"$/,singleRegex:/^=(.*)$/,create:e=>({type:"exact",search(t){const s=t===e;return{isMatch:s,score:s?0:1,indices:[0,e.length-1]}}})},{type:"include",multiRegex:/^'"(.*)"$/,singleRegex:/^'(.*)$/,create:e=>({type:"include",search(t){let n,s=0;const i=[],r=e.length;for(;(n=t.indexOf(e,s))>-1;)s=n+r,i.push([n,s-1]);const c=!!i.length;return{isMatch:c,score:c?0:1,indices:i}}})},{type:"prefix-exact",multiRegex:/^\^"(.*)"$/,singleRegex:/^\^(.*)$/,create:e=>({type:"prefix-exact",search(t){const s=t.startsWith(e);return{isMatch:s,score:s?0:1,indices:[0,e.length-1]}}})},{type:"inverse-prefix-exact",multiRegex:/^!\^"(.*)"$/,singleRegex:/^!\^(.*)$/,create:e=>({type:"inverse-prefix-exact",search(t){const s=!t.startsWith(e);return{isMatch:s,score:s?0:1,indices:[0,t.length-1]}}})},{type:"inverse-suffix-exact",multiRegex:/^!"(.*)"\$$/,singleRegex:/^!(.*)\$$/,create:e=>({type:"inverse-suffix-exact",search(t){const s=!t.endsWith(e);return{isMatch:s,score:s?0:1,indices:[0,t.length-1]}}})},{type:"suffix-exact",multiRegex:/^"(.*)"\$$/,singleRegex:/^(.*)\$$/,create:e=>({type:"suffix-exact",search(t){const s=t.endsWith(e);return{isMatch:s,score:s?0:1,indices:[t.length-e.length,t.length-1]}}})},{type:"inverse-exact",multiRegex:/^!"(.*)"$/,singleRegex:/^!(.*)$/,create:e=>({type:"inverse-exact",search(t){const s=-1===t.indexOf(e);return{isMatch:s,score:s?0:1,indices:[0,t.length-1]}}})},{type:"fuzzy",multiRegex:/^"(.*)"$/,singleRegex:/^(.*)$/,create:(e,t={})=>{const s=new J(e,{location:t.location??d.location,threshold:t.threshold??d.threshold,distance:t.distance??d.distance,includeMatches:t.includeMatches??d.includeMatches,findAllMatches:t.findAllMatches??d.findAllMatches,minMatchCharLength:t.minMatchCharLength??d.minMatchCharLength,isCaseSensitive:t.isCaseSensitive??d.isCaseSensitive,ignoreDiacritics:t.ignoreDiacritics??d.ignoreDiacritics,ignoreLocation:t.ignoreLocation??d.ignoreLocation});return{type:"fuzzy",search:n=>s.searchIn(n)}}}],ge=X.length;function me(e,t){const s=e.match(t);return s?s[1]:null}const Z=[];function q(...e){Z.push(...e)}function $(e,t){for(let s=0,n=Z.length;s<n;s+=1){const i=Z[s];if(i.condition(e,t))return new i(e,t)}return new J(e,t)}const z_AND="$and",te=e=>!(!e.$and&&!e.$or),Ae=e=>({[z_AND]:Object.keys(e).map(t=>({[t]:e[t]}))});function Ce(e,t,{auto:s=!0}={}){const n=i=>{if(C(i)){const o={keyId:null,pattern:i};return s&&(o.searcher=$(i,t)),o}const r=Object.keys(i),c=(e=>!!e.$path)(i);if(!c&&r.length>1&&!te(i))return n(Ae(i));if((e=>!F(e)&&x(e)&&!te(e))(i)){const o=c?i.$path:r[0],a=c?i.$val:i[o];if(!C(a))throw new Error((e=>`Invalid value for key ${e}`)(o));const h={keyId:P(o),pattern:a};return s&&(h.searcher=$(a,t)),h}const u={children:[],operator:r[0]};return r.forEach(o=>{const a=i[o];F(a)&&a.forEach(h=>{u.children.push(n(h))})}),u};return te(e)||(e=Ae(e)),n(e)}function se(e,{ignoreFieldNorm:t=d.ignoreFieldNorm}){let s=1;return e.forEach(({key:n,norm:i,score:r})=>{const c=n?n.weight:null;s*=Math.pow(0===r&&c?Number.EPSILON:r,(c||1)*(t?1:i))}),s}var Ye=class{constructor(e){this.limit=e,this.heap=[]}get size(){return this.heap.length}shouldInsert(e){return this.size<this.limit||e<this.heap[0].score}insert(e){this.size<this.limit?(this.heap.push(e),this._bubbleUp(this.size-1)):e.score<this.heap[0].score&&(this.heap[0]=e,this._sinkDown(0))}extractSorted(e){return this.heap.sort(e)}_bubbleUp(e){const t=this.heap;for(;e>0;){const s=e-1>>1;if(t[e].score<=t[s].score)break;const n=t[e];t[e]=t[s],t[s]=n,e=s}}_sinkDown(e){const t=this.heap,s=t.length;let n=e;do{const i=2*(e=n)+1,r=2*e+2;if(i<s&&t[i].score>t[n].score&&(n=i),r<s&&t[r].score>t[n].score&&(n=r),n!==e){const c=t[e];t[e]=t[n],t[n]=c}}while(n!==e)}};const Xe=/[\p{L}\p{M}\p{N}_]+/gu,pe=new WeakSet;function ne({isCaseSensitive:e=!1,ignoreDiacritics:t=!1,tokenize:s}={}){const n=function qe(e){if("function"==typeof e){let t=!1;return s=>{const n=e(s);if(!t&&(t=!0,!Array.isArray(n)||n.some(i=>"string"!=typeof i)))throw new Error(`[Fuse] tokenize function must return string[]; received ${Array.isArray(n)?"array containing non-strings":typeof n}.`);return n}}return e instanceof RegExp?(e.global||function Ze(e){pe.has(e)||(pe.add(e),console.warn(`[Fuse] tokenize regex ${e} lacks the global flag; only the first match per text will be returned. Add the 'g' flag.`))}(e),t=>t.match(e)||[]):t=>t.match(Xe)||[]}(s);return{tokenize:i=>(e||(i=i.toLowerCase()),t&&(i=R(i)),n(i))}}function ie(e,t,s,n){const i=n.tokenize(t);if(!i.length)return;e.fieldCount++,e.docFieldCount.set(s,(e.docFieldCount.get(s)||0)+1);const r=new Set(i);let c=e.docTermFieldHits.get(s);c||(c=new Map,e.docTermFieldHits.set(s,c));for(const u of r)c.set(u,(c.get(u)||0)+1),e.df.set(u,(e.df.get(u)||0)+1)}function Me(e,t,s,n){const{i,v:r,$:c}=t;if(void 0===r){if(c)for(let u=0;u<s;u++){const o=c[u];if(o)if(Array.isArray(o))for(const a of o)ie(e,a.v,i,n);else ie(e,o.v,i,n)}}else ie(e,r,i,n)}function nt(e,t){const s=e.docFieldCount.get(t);if(void 0===s)return;e.fieldCount-=s,e.docFieldCount.delete(t);const n=e.docTermFieldHits.get(t);if(n){for(const[i,r]of n){const c=(e.df.get(i)||0)-r;c<=0?e.df.delete(i):e.df.set(i,c)}e.docTermFieldHits.delete(t)}}function ve(e,t){if(0===t.length)return;const s=Array.from(new Set(t)).sort((u,o)=>u-o);for(const u of s)nt(e,u);const n=u=>{let o=0,a=s.length;for(;o<a;){const h=o+a>>>1;s[h]<u?o=h+1:a=h}return u-o},i=s[0],r=new Map;for(const[u,o]of e.docFieldCount)r.set(u>i?n(u):u,o);e.docFieldCount=r;const c=new Map;for(const[u,o]of e.docTermFieldHits)c.set(u>i?n(u):u,o);e.docTermFieldHits=c}var Ee=(()=>{let e=class{constructor(t,s,n){this.options={...d,...s},this._keyStore=new we(this.options.keys),this._docs=t,this._myIndex=null,this._invertedIndex=null,this.setCollection(t,n),this._lastQuery=null,this._lastSearcher=null}_getSearcher(t){if(this._lastQuery===t)return this._lastSearcher;const s=$(t,this._invertedIndex?{...this.options,_invertedIndex:this._invertedIndex}:this.options);return this._lastQuery=t,this._lastSearcher=s,s}setCollection(t,s){if(this._docs=t,s&&!(s instanceof Y))throw new Error("Incorrect 'index' type");if(this._myIndex=s||fe(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight}),this.options.useTokenSearch){const n=ne({isCaseSensitive:this.options.isCaseSensitive,ignoreDiacritics:this.options.ignoreDiacritics,tokenize:this.options.tokenize});this._invertedIndex=function tt(e,t,s){const n={fieldCount:0,df:new Map,docFieldCount:new Map,docTermFieldHits:new Map};for(const i of e)Me(n,i,t,s);return n}(this._myIndex.records,this._myIndex.keys.length,n)}this._invalidateSearcherCache()}add(t){if(!p(t))return;this._docs.push(t);const s=this._myIndex.add(t,this._docs.length-1);if(this._invertedIndex&&s){const n=ne({isCaseSensitive:this.options.isCaseSensitive,ignoreDiacritics:this.options.ignoreDiacritics,tokenize:this.options.tokenize});!function st(e,t,s,n){Me(e,t,s,n)}(this._invertedIndex,s,this._myIndex.keys.length,n)}this._invalidateSearcherCache()}remove(t=()=>!1){const s=[],n=[];for(let i=0,r=this._docs.length;i<r;i+=1)t(this._docs[i],i)&&(s.push(this._docs[i]),n.push(i));if(n.length){this._invertedIndex&&ve(this._invertedIndex,n);const i=new Set(n);this._docs=this._docs.filter((r,c)=>!i.has(c)),this._myIndex.removeAll(n),this._invalidateSearcherCache()}return s}removeAt(t){if(!Number.isInteger(t)||t<0||t>=this._docs.length)throw new Error(Q);this._invertedIndex&&ve(this._invertedIndex,[t]);const s=this._docs.splice(t,1)[0];return this._myIndex.removeAt(t),this._invalidateSearcherCache(),s}_invalidateSearcherCache(){this._lastQuery=null,this._lastSearcher=null}getIndex(){return this._myIndex}search(t,s){const{limit:n=-1}=s||{},{includeMatches:i,includeScore:r,shouldSort:c,sortFn:u,ignoreFieldNorm:o}=this.options;if(C(t)&&!t.trim()){let l=this._docs.map((f,m)=>({item:f,refIndex:m}));return b(n)&&n>-1&&(l=l.slice(0,n)),l}let h;if(b(n)&&n>0&&C(t)){const l=new Ye(n);C(this._docs[0])?this._searchStringList(t,{heap:l,ignoreFieldNorm:o}):this._searchObjectList(t,{heap:l,ignoreFieldNorm:o}),h=l.extractSorted(u)}else h=C(t)?C(this._docs[0])?this._searchStringList(t):this._searchObjectList(t):this._searchLogical(t),function Qe(e,{ignoreFieldNorm:t=d.ignoreFieldNorm}){e.forEach(s=>{s.score=se(s.matches,{ignoreFieldNorm:t})})}(h,{ignoreFieldNorm:o}),c&&h.sort(u),b(n)&&n>-1&&(h=h.slice(0,n));return function Je(e,t,{includeMatches:s=d.includeMatches,includeScore:n=d.includeScore}={}){return e.map(i=>{const{idx:r}=i,c={item:t[r],refIndex:r};return s&&(c.matches=function Ge(e){const t=[];return e.matches.forEach(s=>{if(!p(s.indices)||!s.indices.length)return;const n={indices:s.indices,value:s.value};s.key&&(n.key=s.key.id),s.idx>-1&&(n.refIndex=s.idx),t.push(n)}),t}(i)),n&&(c.score=i.score),c})}(h,this._docs,{includeMatches:i,includeScore:r})}_searchStringList(t,{heap:s,ignoreFieldNorm:n}={}){const i=this._getSearcher(t),r=this.options.useTokenSearch&&"all"===this.options.tokenMatch,{records:c}=this._myIndex,u=s?null:[];return c.forEach(({v:o,i:a,n:h})=>{if(!p(o))return;const l=i.searchIn(o);if(l.isMatch){const f={score:l.score,value:o,norm:h,indices:l.indices};r&&(f.matchedMask=l.matchedMask,f.matchedTerms=l.matchedTerms,f.termCount=l.termCount);const m=[f];if(!r||this._coversAllTokens(m)){const g={item:o,idx:a,matches:m};s?(g.score=se(g.matches,{ignoreFieldNorm:n}),s.shouldInsert(g.score)&&s.insert(g)):u.push(g)}}}),u}_searchLogical(t){const s=Ce(t,this.options),n=(u,o,a)=>{if(!("children"in u)){const{keyId:m,searcher:g}=u;let A;return null===m?(A=[],this._myIndex.keys.forEach((M,y)=>{A.push(...this._findMatches({key:M,value:o[y],searcher:g}))})):A=this._findMatches({key:this._keyStore.get(m),value:this._myIndex.getValueForItemAtKeyId(o,m),searcher:g}),A&&A.length?[{idx:a,item:o,matches:A}]:[]}const{children:h,operator:l}=u,f=[];for(let m=0,g=h.length;m<g;m+=1){const M=n(h[m],o,a);if(M.length)f.push(...M);else if("$and"===l)return[]}return f},i=this._myIndex.records,r=new Map,c=[];return i.forEach(({$:u,i:o})=>{if(p(u)){const a=n(s,u,o);a.length&&(r.has(o)||(r.set(o,{idx:o,item:u,matches:[]}),c.push(r.get(o))),a.forEach(({matches:h})=>{r.get(o).matches.push(...h)}))}}),c}_searchObjectList(t,{heap:s,ignoreFieldNorm:n}={}){const i=this._getSearcher(t),r=this.options.useTokenSearch&&"all"===this.options.tokenMatch,{keys:c,records:u}=this._myIndex,o=s?null:[];return u.forEach(({$:a,i:h})=>{if(!p(a))return;const l=[];let f=!1,m=!1;if(c.forEach((g,A)=>{const M=this._findMatches({key:g,value:a[A],searcher:i});M.length?(l.push(...M),M[0].hasInverse&&(m=!0)):f=!0}),(!m||!f)&&l.length&&(!r||this._coversAllTokens(l))){const g={idx:h,item:a,matches:l};s?(g.score=se(g.matches,{ignoreFieldNorm:n}),s.shouldInsert(g.score)&&s.insert(g)):o.push(g)}}),o}_findMatches({key:t,value:s,searcher:n}){if(!p(s))return[];const i=[];if(F(s))s.forEach(({v:r,i:c,n:u})=>{if(!p(r))return;const o=n.searchIn(r);if(o.isMatch){const a={score:o.score,key:t,value:r,idx:c,norm:u,indices:o.indices,hasInverse:o.hasInverse};void 0!==o.termCount&&(a.matchedMask=o.matchedMask,a.matchedTerms=o.matchedTerms,a.termCount=o.termCount),i.push(a)}});else{const{v:r,n:c}=s,u=n.searchIn(r);if(u.isMatch){const o={score:u.score,key:t,value:r,norm:c,indices:u.indices,hasInverse:u.hasInverse};void 0!==u.termCount&&(o.matchedMask=u.matchedMask,o.matchedTerms=u.matchedTerms,o.termCount=u.termCount),i.push(o)}}return i}_coversAllTokens(t){const s=t.length?t[0].termCount:void 0;if(void 0===s)return!0;if(s<=31){let i=0;for(let r=0;r<t.length;r++)i|=t[r].matchedMask||0;return i===2**s-1}const n=new Set;for(let i=0;i<t.length;i++){const r=t[i].matchedTerms;if(r)for(const c of r)n.add(c)}return n.size===s}};return e.version="7.4.2",e.createIndex=fe,e.parseIndex=Oe,e.config=d,e.match=function(t,s,n){if(n&&n.useTokenSearch)throw new Error("Fuse.match does not support useTokenSearch: token search requires corpus-level statistics (df, fieldCount) that a one-off string comparison does not have. Use new Fuse(...).search(...) instead.");return $(t,{...d,...n}).searchIn(s)},e.parseQuery=Ce,e})();q(class{constructor(e,{isCaseSensitive:t=d.isCaseSensitive,ignoreDiacritics:s=d.ignoreDiacritics,includeMatches:n=d.includeMatches,minMatchCharLength:i=d.minMatchCharLength,ignoreLocation:r=d.ignoreLocation,findAllMatches:c=d.findAllMatches,location:u=d.location,threshold:o=d.threshold,distance:a=d.distance}={}){this.query=null,this.options={isCaseSensitive:t,ignoreDiacritics:s,includeMatches:n,minMatchCharLength:i,findAllMatches:c,ignoreLocation:r,location:u,threshold:o,distance:a},e=t?e:e.toLowerCase(),e=s?R(e):e,this.pattern=e,this.query=function Ke(e,t={}){return e.replace(/\\\|/g,"\0").split("|").map(s=>{const n=function We(e){const t=[],s=e.length;let n=0;for(;n<s;){for(;n<s&&" "===e[n];)n++;if(n>=s)break;let i=n;for(;i<s&&" "!==e[i]&&'"'!==e[i];)i++;if(i<s&&'"'===e[i]){for(i++;i<s;){if('"'===e[i]){const r=i+1;if(r>=s||" "===e[r]){i++;break}if("$"===e[r]&&(r+1>=s||" "===e[r+1])){i+=2;break}}i++}t.push(e.substring(n,i)),n=i}else{for(;i<s&&" "!==e[i];)i++;t.push(e.substring(n,i)),n=i}}return t}(s.replace(/\u0000/g,"|").trim()).filter(r=>r&&!!r.trim()),i=[];for(let r=0,c=n.length;r<c;r+=1){const u=n[r];let o=!1,a=-1;for(;!o&&++a<ge;){const h=X[a],l=me(u,h.multiRegex);l&&(i.push(h.create(l,t)),o=!0)}if(!o)for(a=-1;++a<ge;){const h=X[a],l=me(u,h.singleRegex);if(l){i.push(h.create(l,t));break}}}return i})}(this.pattern,this.options)}static condition(e,t){return t.useExtendedSearch}searchIn(e){const t=this.query;if(!t)return{isMatch:!1,score:1};const{includeMatches:s,isCaseSensitive:n,ignoreDiacritics:i}=this.options;e=n?e:e.toLowerCase(),e=i?R(e):e;let r=0;const c=[];let u=0,o=!1;for(let a=0,h=t.length;a<h;a+=1){const l=t[a];c.length=0,r=0,o=!1;for(let f=0,m=l.length;f<m;f+=1){const g=l[f],{isMatch:A,indices:M,score:y}=g.search(e);if(!A){u=0,r=0,c.length=0,o=!1;break}r+=1,u+=y,$e(g.type)&&(o=!0),s&&(Pe.has(g.type)?c.push(...M):c.push(M))}if(r){const f={isMatch:!0,score:u/r};return o&&(f.hasInverse=!0),s&&(f.indices=G(c)),f}}return{isMatch:!1,score:1}}}),q(class{static condition(e,t){return t.useTokenSearch}constructor(e,t){this.options=t,this.analyzer=ne({isCaseSensitive:t.isCaseSensitive,ignoreDiacritics:t.ignoreDiacritics,tokenize:t.tokenize});const s=this.analyzer.tokenize(e),{df:n,fieldCount:i}=t._invertedIndex;this.termSearchers=[],this.idfWeights=[];for(const r of s){this.termSearchers.push(new J(r,{location:t.location,threshold:t.threshold,distance:t.distance,includeMatches:t.includeMatches,findAllMatches:t.findAllMatches,minMatchCharLength:t.minMatchCharLength,isCaseSensitive:t.isCaseSensitive,ignoreDiacritics:t.ignoreDiacritics,ignoreLocation:!0}));const c=n.get(r)||0,u=Math.log(1+(i-c+.5)/(c+.5));this.idfWeights.push(u)}this.combineAll="all"===t.tokenMatch,this.numTerms=this.termSearchers.length,this.useMask=this.numTerms<=31}searchIn(e){if(!this.termSearchers.length)return{isMatch:!1,score:1};const t=[];let s=0,n=0,i=0,r=0;const c=this.combineAll&&!this.useMask?new Set:null;for(let a=0;a<this.termSearchers.length;a++){const h=this.termSearchers[a].searchIn(e),l=this.idfWeights[a];n+=l,h.isMatch&&(i++,s+=l*(1-h.score),h.indices&&t.push(...h.indices),this.combineAll&&(this.useMask?r|=1<<a:c.add(a)))}if(0===i)return{isMatch:!1,score:1};const o={isMatch:!0,score:Math.max(.001,n>0?1-s/n:0)};return this.options.includeMatches&&t.length&&(o.indices=G(t)),this.combineAll&&(this.useMask?o.matchedMask=r:o.matchedTerms=c,o.termCount=this.numTerms),o}}),Ee.use=function(...e){e.forEach(t=>q(t))};var it=Ee,ot=k(4152);let ct=(()=>{class e{filterOptions=(0,I.uu)(()=>({isCaseSensitive:!!this.filterExactMatch(),includeScore:!1,ignoreDiacritics:!1,shouldSort:!0,includeMatches:!1,findAllMatches:!1,minMatchCharLength:1,location:0,threshold:this.filterExactMatch()?0:.3,distance:100,useExtendedSearch:!1,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1,keys:this.filterKeys()}));fuse=(0,I.EW)(()=>new it(this.sorted(),this.filterOptions()));columnDefs=(0,D.vPA)([]);data=(0,D.vPA)([]);sortCol=(0,D.vPA)(void 0);sortOrder=(0,D.vPA)("ASC");filterValue=(0,D.vPA)(void 0);filterOnlyVisible=(0,D.vPA)(!0);paginatorStartIndex=(0,D.vPA)(1);paginatorEndIndex=(0,D.vPA)(5);showColumnSettings=(0,D.vPA)(!1);totalRows=(0,I.EW)(()=>this.sortedAndFiltered().length);sorted=(0,I.EW)(()=>function rt(e,t,s){if(void 0===e)return[...t];const n=e.split(",").map(r=>r.trim()),i=s.split(",").map(r=>r.trim());return[...t].sort((r,c)=>{for(let u=0;u<n.length;u++){const o=n[u],a=i[u]||i[0];if(!(o in r))continue;let h=r[o],l=c[o];if("object"==typeof h&&(h=r[o].value,l=c[o].value),null==h)return 1;if(null==l)return-1;let f=0;if(f="string"==typeof h&&"string"==typeof l?h.localeCompare(l):h>l?1:h<l?-1:0,"DESC"===a&&(f*=-1),0!==f)return f}return 0})}(this.sortCol(),this.data(),this.sortOrder()));filterCol=(0,D.vPA)(void 0);filterExactMatch=(0,D.vPA)(!1);filterKeys=(0,I.EW)(()=>{const s=this.filterCol();return void 0!==s?[s]:this.filterOnlyVisible()?this.columnDefs().map(n=>n.key):Object.keys(this.sorted()[0]||{})});sortedAndFiltered=(0,I.EW)(()=>{const s=this.filterValue()??"";return""===s?this.sorted():this.fuse().search(s).map(i=>i.item)});sortedFilteredAndPaginated=(0,I.EW)(()=>this.sortedAndFiltered().slice(this.paginatorStartIndex(),this.paginatorEndIndex()));downloadCSV(){const s=this.sortedFilteredAndPaginated(),n=this.columnDefs();(0,ot.B)(s,n)}static \u0275fac=function(n){return new(n||e)};static \u0275prov=D.jDH({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})()}}]);
|