@signalk/freeboard-sk 3.0.0 → 3.0.1

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.
@@ -1,7 +1,7 @@
1
- import{a as Pt,b as It,c as Nt,d as Bt}from"./chunk-BJM4SVXD.js";import{a as vt,b as Mt,c as Ft,d as Tt,e as Ot,g as Et}from"./chunk-IURS3QQO.js";import{a as Ct}from"./chunk-3CRIFTHA.js";import{c as _t}from"./chunk-XHEJEIFO.js";import{e as Dt,f as xt,i as bt,j as Rt,n as kt,o as St}from"./chunk-WX7YZB5N.js";import{$ as ue,$a as De,$d as pt,Bc as ot,Cb as Ke,Cc as rt,Da as W,Dd as ct,Ea as y,Eb as Ye,Fa as C,Gc as at,I as Q,Ia as Qe,Ib as ae,Ja as We,Jd as dt,Ka as E,La as s,Lb as Xe,M as de,Ma as l,N as ve,Na as J,P as c,Q as g,R as w,Ra as K,Rd as ut,Sa as Y,Ta as k,U as Ue,Ua as P,V as je,Vb as Ge,Wa as R,Wb as te,Wd as ft,X as $e,Xb as A,Ya as u,Yd as mt,Z as j,Za as me,Zd as ht,_ as qe,_a as $,aa as O,bb as L,c as G,ca as B,cb as U,cc as Ze,d as Ve,ee as gt,f as Ae,g as He,ga as ne,hb as re,he as wt,i as Ce,ib as q,j as ze,ja as d,ka as oe,la as H,lb as m,lc as Je,ld as st,m as ce,mb as S,nb as ee,nd as lt,pe as yt,qa as Z,ra as V,sa as fe,ta as p,tc as et,u as Le,uc as he,va as b,vc as tt,wa as z,wb as I,wc as it,xc as nt}from"./chunk-4BSA3TDQ.js";import{f as Be}from"./chunk-EQVTEUXC.js";var ni=[[["caption"]],[["colgroup"],["col"]],"*"],oi=["caption","colgroup, col","*"];function ri(i,o){i&1&&$(0,2)}function ai(i,o){i&1&&(s(0,"thead",0),k(1,1),l(),s(2,"tbody",0),k(3,2)(4,3),l(),s(5,"tfoot",0),k(6,4),l())}function si(i,o){i&1&&k(0,1)(1,2)(2,3)(3,4)}var N=new ve("CDK_TABLE");var ge=(()=>{class i{template=c(H);constructor(){}static \u0275fac=function(t){return new(t||i)};static \u0275dir=p({type:i,selectors:[["","cdkCellDef",""]]})}return i})(),we=(()=>{class i{template=c(H);constructor(){}static \u0275fac=function(t){return new(t||i)};static \u0275dir=p({type:i,selectors:[["","cdkHeaderCellDef",""]]})}return i})(),zt=(()=>{class i{template=c(H);constructor(){}static \u0275fac=function(t){return new(t||i)};static \u0275dir=p({type:i,selectors:[["","cdkFooterCellDef",""]]})}return i})(),ie=(()=>{class i{_table=c(N,{optional:!0});_hasStickyChanged=!1;get name(){return this._name}set name(e){this._setNameInput(e)}_name;get sticky(){return this._sticky}set sticky(e){e!==this._sticky&&(this._sticky=e,this._hasStickyChanged=!0)}_sticky=!1;get stickyEnd(){return this._stickyEnd}set stickyEnd(e){e!==this._stickyEnd&&(this._stickyEnd=e,this._hasStickyChanged=!0)}_stickyEnd=!1;cell;headerCell;footerCell;cssClassFriendlyName;_columnCssClassName;constructor(){}hasStickyChanged(){let e=this._hasStickyChanged;return this.resetStickyChanged(),e}resetStickyChanged(){this._hasStickyChanged=!1}_updateColumnCssClassName(){this._columnCssClassName=[`cdk-column-${this.cssClassFriendlyName}`]}_setNameInput(e){e&&(this._name=e,this.cssClassFriendlyName=e.replace(/[^a-z0-9_-]/gi,"-"),this._updateColumnCssClassName())}static \u0275fac=function(t){return new(t||i)};static \u0275dir=p({type:i,selectors:[["","cdkColumnDef",""]],contentQueries:function(t,n,r){if(t&1&&De(r,ge,5)(r,we,5)(r,zt,5),t&2){let a;L(a=U())&&(n.cell=a.first),L(a=U())&&(n.headerCell=a.first),L(a=U())&&(n.footerCell=a.first)}},inputs:{name:[0,"cdkColumnDef","name"],sticky:[2,"sticky","sticky",A],stickyEnd:[2,"stickyEnd","stickyEnd",A]}})}return i})(),pe=class{constructor(o,e){e.nativeElement.classList.add(...o._columnCssClassName)}},Lt=(()=>{class i extends pe{constructor(){super(c(ie),c(B))}static \u0275fac=function(t){return new(t||i)};static \u0275dir=p({type:i,selectors:[["cdk-header-cell"],["th","cdk-header-cell",""]],hostAttrs:["role","columnheader",1,"cdk-header-cell"],features:[b]})}return i})();var Ut=(()=>{class i extends pe{constructor(){let e=c(ie),t=c(B);super(e,t);let n=e._table?._getCellRole();n&&t.nativeElement.setAttribute("role",n)}static \u0275fac=function(t){return new(t||i)};static \u0275dir=p({type:i,selectors:[["cdk-cell"],["td","cdk-cell",""]],hostAttrs:[1,"cdk-cell"],features:[b]})}return i})();var be=(()=>{class i{template=c(H);_differs=c(te);columns;_columnsDiffer;constructor(){}ngOnChanges(e){if(!this._columnsDiffer){let t=e.columns&&e.columns.currentValue||[];this._columnsDiffer=this._differs.find(t).create(),this._columnsDiffer.diff(t)}}getColumnsDiff(){return this._columnsDiffer.diff(this.columns)}extractCellTemplate(e){return this instanceof le?e.headerCell.template:this instanceof Re?e.footerCell.template:e.cell.template}static \u0275fac=function(t){return new(t||i)};static \u0275dir=p({type:i,features:[ue]})}return i})(),le=(()=>{class i extends be{_table=c(N,{optional:!0});_hasStickyChanged=!1;get sticky(){return this._sticky}set sticky(e){e!==this._sticky&&(this._sticky=e,this._hasStickyChanged=!0)}_sticky=!1;constructor(){super(c(H),c(te))}ngOnChanges(e){super.ngOnChanges(e)}hasStickyChanged(){let e=this._hasStickyChanged;return this.resetStickyChanged(),e}resetStickyChanged(){this._hasStickyChanged=!1}static \u0275fac=function(t){return new(t||i)};static \u0275dir=p({type:i,selectors:[["","cdkHeaderRowDef",""]],inputs:{columns:[0,"cdkHeaderRowDef","columns"],sticky:[2,"cdkHeaderRowDefSticky","sticky",A]},features:[b,ue]})}return i})(),Re=(()=>{class i extends be{_table=c(N,{optional:!0});_hasStickyChanged=!1;get sticky(){return this._sticky}set sticky(e){e!==this._sticky&&(this._sticky=e,this._hasStickyChanged=!0)}_sticky=!1;constructor(){super(c(H),c(te))}ngOnChanges(e){super.ngOnChanges(e)}hasStickyChanged(){let e=this._hasStickyChanged;return this.resetStickyChanged(),e}resetStickyChanged(){this._hasStickyChanged=!1}static \u0275fac=function(t){return new(t||i)};static \u0275dir=p({type:i,selectors:[["","cdkFooterRowDef",""]],inputs:{columns:[0,"cdkFooterRowDef","columns"],sticky:[2,"cdkFooterRowDefSticky","sticky",A]},features:[b,ue]})}return i})(),ye=(()=>{class i extends be{_table=c(N,{optional:!0});when;constructor(){super(c(H),c(te))}static \u0275fac=function(t){return new(t||i)};static \u0275dir=p({type:i,selectors:[["","cdkRowDef",""]],inputs:{columns:[0,"cdkRowDefColumns","columns"],when:[0,"cdkRowDefWhen","when"]},features:[b]})}return i})(),X=(()=>{class i{_viewContainer=c(Z);cells;context;static mostRecentCellOutlet=null;constructor(){i.mostRecentCellOutlet=this}ngOnDestroy(){i.mostRecentCellOutlet===this&&(i.mostRecentCellOutlet=null)}static \u0275fac=function(t){return new(t||i)};static \u0275dir=p({type:i,selectors:[["","cdkCellOutlet",""]]})}return i})(),ke=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275cmp=V({type:i,selectors:[["cdk-header-row"],["tr","cdk-header-row",""]],hostAttrs:["role","row",1,"cdk-header-row"],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(t,n){t&1&&k(0,0)},dependencies:[X],encapsulation:2})}return i})();var Se=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275cmp=V({type:i,selectors:[["cdk-row"],["tr","cdk-row",""]],hostAttrs:["role","row",1,"cdk-row"],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(t,n){t&1&&k(0,0)},dependencies:[X],encapsulation:2})}return i})(),jt=(()=>{class i{templateRef=c(H);_contentClassNames=["cdk-no-data-row","cdk-row"];_cellClassNames=["cdk-cell","cdk-no-data-cell"];_cellSelector="td, cdk-cell, [cdk-cell], .cdk-cell";constructor(){}static \u0275fac=function(t){return new(t||i)};static \u0275dir=p({type:i,selectors:[["ng-template","cdkNoDataRow",""]]})}return i})(),Vt=["top","bottom","left","right"],xe=class{_isNativeHtmlTable;_stickCellCss;_isBrowser;_needsPositionStickyOnElement;direction;_positionListener;_tableInjector;_elemSizeCache=new WeakMap;_resizeObserver=globalThis?.ResizeObserver?new globalThis.ResizeObserver(o=>this._updateCachedSizes(o)):null;_updatedStickyColumnsParamsToReplay=[];_stickyColumnsReplayTimeout=null;_cachedCellWidths=[];_borderCellCss;_destroyed=!1;constructor(o,e,t=!0,n=!0,r,a,f){this._isNativeHtmlTable=o,this._stickCellCss=e,this._isBrowser=t,this._needsPositionStickyOnElement=n,this.direction=r,this._positionListener=a,this._tableInjector=f,this._borderCellCss={top:`${e}-border-elem-top`,bottom:`${e}-border-elem-bottom`,left:`${e}-border-elem-left`,right:`${e}-border-elem-right`}}clearStickyPositioning(o,e){(e.includes("left")||e.includes("right"))&&this._removeFromStickyColumnReplayQueue(o);let t=[];for(let n of o)n.nodeType===n.ELEMENT_NODE&&t.push(n,...Array.from(n.children));oe({write:()=>{for(let n of t)this._removeStickyStyle(n,e)}},{injector:this._tableInjector})}updateStickyColumns(o,e,t,n=!0,r=!0){if(!o.length||!this._isBrowser||!(e.some(T=>T)||t.some(T=>T))){this._positionListener?.stickyColumnsUpdated({sizes:[]}),this._positionListener?.stickyEndColumnsUpdated({sizes:[]});return}let a=o[0],f=a.children.length,h=this.direction==="rtl",_=h?"right":"left",v=h?"left":"right",F=e.lastIndexOf(!0),D=t.indexOf(!0),x,Pe,Ie;r&&this._updateStickyColumnReplayQueue({rows:[...o],stickyStartStates:[...e],stickyEndStates:[...t]}),oe({earlyRead:()=>{x=this._getCellWidths(a,n),Pe=this._getStickyStartColumnPositions(x,e),Ie=this._getStickyEndColumnPositions(x,t)},write:()=>{for(let T of o)for(let M=0;M<f;M++){let Ne=T.children[M];e[M]&&this._addStickyStyle(Ne,_,Pe[M],M===F),t[M]&&this._addStickyStyle(Ne,v,Ie[M],M===D)}this._positionListener&&x.some(T=>!!T)&&(this._positionListener.stickyColumnsUpdated({sizes:F===-1?[]:x.slice(0,F+1).map((T,M)=>e[M]?T:null)}),this._positionListener.stickyEndColumnsUpdated({sizes:D===-1?[]:x.slice(D).map((T,M)=>t[M+D]?T:null).reverse()}))}},{injector:this._tableInjector})}stickRows(o,e,t){if(!this._isBrowser)return;let n=t==="bottom"?o.slice().reverse():o,r=t==="bottom"?e.slice().reverse():e,a=[],f=[],h=[];oe({earlyRead:()=>{for(let _=0,v=0;_<n.length;_++){if(!r[_])continue;a[_]=v;let F=n[_];h[_]=this._isNativeHtmlTable?Array.from(F.children):[F];let D=this._retrieveElementSize(F).height;v+=D,f[_]=D}},write:()=>{let _=r.lastIndexOf(!0);for(let v=0;v<n.length;v++){if(!r[v])continue;let F=a[v],D=v===_;for(let x of h[v])this._addStickyStyle(x,t,F,D)}t==="top"?this._positionListener?.stickyHeaderRowsUpdated({sizes:f,offsets:a,elements:h}):this._positionListener?.stickyFooterRowsUpdated({sizes:f,offsets:a,elements:h})}},{injector:this._tableInjector})}updateStickyFooterContainer(o,e){this._isNativeHtmlTable&&oe({write:()=>{let t=o.querySelector("tfoot");t&&(e.some(n=>!n)?this._removeStickyStyle(t,["bottom"]):this._addStickyStyle(t,"bottom",0,!1))}},{injector:this._tableInjector})}destroy(){this._stickyColumnsReplayTimeout&&clearTimeout(this._stickyColumnsReplayTimeout),this._resizeObserver?.disconnect(),this._destroyed=!0}_removeStickyStyle(o,e){if(!o.classList.contains(this._stickCellCss))return;for(let n of e)o.style[n]="",o.classList.remove(this._borderCellCss[n]);Vt.some(n=>e.indexOf(n)===-1&&o.style[n])?o.style.zIndex=this._getCalculatedZIndex(o):(o.style.zIndex="",this._needsPositionStickyOnElement&&(o.style.position=""),o.classList.remove(this._stickCellCss))}_addStickyStyle(o,e,t,n){o.classList.add(this._stickCellCss),n&&o.classList.add(this._borderCellCss[e]),o.style[e]=`${t}px`,o.style.zIndex=this._getCalculatedZIndex(o),this._needsPositionStickyOnElement&&(o.style.cssText+="position: -webkit-sticky; position: sticky; ")}_getCalculatedZIndex(o){let e={top:100,bottom:10,left:1,right:1},t=0;for(let n of Vt)o.style[n]&&(t+=e[n]);return t?`${t}`:""}_getCellWidths(o,e=!0){if(!e&&this._cachedCellWidths.length)return this._cachedCellWidths;let t=[],n=o.children;for(let r=0;r<n.length;r++){let a=n[r];t.push(this._retrieveElementSize(a).width)}return this._cachedCellWidths=t,t}_getStickyStartColumnPositions(o,e){let t=[],n=0;for(let r=0;r<o.length;r++)e[r]&&(t[r]=n,n+=o[r]);return t}_getStickyEndColumnPositions(o,e){let t=[],n=0;for(let r=o.length;r>0;r--)e[r]&&(t[r]=n,n+=o[r]);return t}_retrieveElementSize(o){let e=this._elemSizeCache.get(o);if(e)return e;let t=o.getBoundingClientRect(),n={width:t.width,height:t.height};return this._resizeObserver&&(this._elemSizeCache.set(o,n),this._resizeObserver.observe(o,{box:"border-box"})),n}_updateStickyColumnReplayQueue(o){this._removeFromStickyColumnReplayQueue(o.rows),this._stickyColumnsReplayTimeout||this._updatedStickyColumnsParamsToReplay.push(o)}_removeFromStickyColumnReplayQueue(o){let e=new Set(o);for(let t of this._updatedStickyColumnsParamsToReplay)t.rows=t.rows.filter(n=>!e.has(n));this._updatedStickyColumnsParamsToReplay=this._updatedStickyColumnsParamsToReplay.filter(t=>!!t.rows.length)}_updateCachedSizes(o){let e=!1;for(let t of o){let n=t.borderBoxSize?.length?{width:t.borderBoxSize[0].inlineSize,height:t.borderBoxSize[0].blockSize}:{width:t.contentRect.width,height:t.contentRect.height};n.width!==this._elemSizeCache.get(t.target)?.width&&li(t.target)&&(e=!0),this._elemSizeCache.set(t.target,n)}e&&this._updatedStickyColumnsParamsToReplay.length&&(this._stickyColumnsReplayTimeout&&clearTimeout(this._stickyColumnsReplayTimeout),this._stickyColumnsReplayTimeout=setTimeout(()=>{if(!this._destroyed){for(let t of this._updatedStickyColumnsParamsToReplay)this.updateStickyColumns(t.rows,t.stickyStartStates,t.stickyEndStates,!0,!1);this._updatedStickyColumnsParamsToReplay=[],this._stickyColumnsReplayTimeout=null}},0))}};function li(i){return["cdk-cell","cdk-header-cell","cdk-footer-cell"].some(o=>i.classList.contains(o))}var se=new ve("STICKY_POSITIONING_LISTENER");var Me=(()=>{class i{viewContainer=c(Z);elementRef=c(B);constructor(){let e=c(N);e._rowOutlet=this,e._outletAssigned()}static \u0275fac=function(t){return new(t||i)};static \u0275dir=p({type:i,selectors:[["","rowOutlet",""]]})}return i})(),Fe=(()=>{class i{viewContainer=c(Z);elementRef=c(B);constructor(){let e=c(N);e._headerRowOutlet=this,e._outletAssigned()}static \u0275fac=function(t){return new(t||i)};static \u0275dir=p({type:i,selectors:[["","headerRowOutlet",""]]})}return i})(),Te=(()=>{class i{viewContainer=c(Z);elementRef=c(B);constructor(){let e=c(N);e._footerRowOutlet=this,e._outletAssigned()}static \u0275fac=function(t){return new(t||i)};static \u0275dir=p({type:i,selectors:[["","footerRowOutlet",""]]})}return i})(),Oe=(()=>{class i{viewContainer=c(Z);elementRef=c(B);constructor(){let e=c(N);e._noDataRowOutlet=this,e._outletAssigned()}static \u0275fac=function(t){return new(t||i)};static \u0275dir=p({type:i,selectors:[["","noDataRowOutlet",""]]})}return i})(),Ee=(()=>{class i{_differs=c(te);_changeDetectorRef=c(Ge);_elementRef=c(B);_dir=c(et,{optional:!0});_platform=c(Je);_viewRepeater;_viewportRuler=c(ot);_injector=c(Ue);_virtualScrollViewport=c(rt,{optional:!0,host:!0});_positionListener=c(se,{optional:!0})||c(se,{optional:!0,skipSelf:!0});_document=c(je);_data;_renderedRange;_onDestroy=new G;_renderRows;_renderChangeSubscription=null;_columnDefsByName=new Map;_rowDefs;_headerRowDefs;_footerRowDefs;_dataDiffer;_defaultRowDef=null;_customColumnDefs=new Set;_customRowDefs=new Set;_customHeaderRowDefs=new Set;_customFooterRowDefs=new Set;_customNoDataRow=null;_headerRowDefChanged=!0;_footerRowDefChanged=!0;_stickyColumnStylesNeedReset=!0;_forceRecalculateCellWidths=!0;_cachedRenderRowsMap=new Map;_isNativeHtmlTable;_stickyStyler;stickyCssClass="cdk-table-sticky";needsPositionStickyOnElement=!0;_isServer;_isShowingNoDataRow=!1;_hasAllOutlets=!1;_hasInitialized=!1;_headerRowStickyUpdates=new G;_footerRowStickyUpdates=new G;_disableVirtualScrolling=!1;_getCellRole(){if(this._cellRoleInternal===void 0){let e=this._elementRef.nativeElement.getAttribute("role");return e==="grid"||e==="treegrid"?"gridcell":"cell"}return this._cellRoleInternal}_cellRoleInternal=void 0;get trackBy(){return this._trackByFn}set trackBy(e){this._trackByFn=e}_trackByFn;get dataSource(){return this._dataSource}set dataSource(e){this._dataSource!==e&&(this._switchDataSource(e),this._changeDetectorRef.markForCheck())}_dataSource;_dataSourceChanges=new G;_dataStream=new G;get multiTemplateDataRows(){return this._multiTemplateDataRows}set multiTemplateDataRows(e){this._multiTemplateDataRows=e,this._rowOutlet&&this._rowOutlet.viewContainer.length&&(this._forceRenderDataRows(),this.updateStickyColumnStyles())}_multiTemplateDataRows=!1;get fixedLayout(){return this._virtualScrollEnabled()?!0:this._fixedLayout}set fixedLayout(e){this._fixedLayout=e,this._forceRecalculateCellWidths=!0,this._stickyColumnStylesNeedReset=!0}_fixedLayout=!1;recycleRows=!1;contentChanged=new $e;viewChange=new Ve({start:0,end:Number.MAX_VALUE});_rowOutlet;_headerRowOutlet;_footerRowOutlet;_noDataRowOutlet;_contentColumnDefs;_contentRowDefs;_contentHeaderRowDefs;_contentFooterRowDefs;_noDataRow;constructor(){c(new Xe("role"),{optional:!0})||this._elementRef.nativeElement.setAttribute("role","table"),this._isServer=!this._platform.isBrowser,this._isNativeHtmlTable=this._elementRef.nativeElement.nodeName==="TABLE",this._dataDiffer=this._differs.find([]).create((t,n)=>this.trackBy?this.trackBy(n.dataIndex,n.data):n)}ngOnInit(){this._setupStickyStyler(),this._viewportRuler.change().pipe(Q(this._onDestroy)).subscribe(()=>{this._forceRecalculateCellWidths=!0})}ngAfterContentInit(){this._viewRepeater=this.recycleRows||this._virtualScrollEnabled()?new it:new _t,this._virtualScrollEnabled()&&this._setupVirtualScrolling(this._virtualScrollViewport),this._hasInitialized=!0}ngAfterContentChecked(){this._canRender()&&this._render()}ngOnDestroy(){this._stickyStyler?.destroy(),[this._rowOutlet?.viewContainer,this._headerRowOutlet?.viewContainer,this._footerRowOutlet?.viewContainer,this._cachedRenderRowsMap,this._customColumnDefs,this._customRowDefs,this._customHeaderRowDefs,this._customFooterRowDefs,this._columnDefsByName].forEach(e=>{e?.clear()}),this._headerRowDefs=[],this._footerRowDefs=[],this._defaultRowDef=null,this._headerRowStickyUpdates.complete(),this._footerRowStickyUpdates.complete(),this._onDestroy.next(),this._onDestroy.complete(),he(this.dataSource)&&this.dataSource.disconnect(this)}renderRows(){this._renderRows=this._getAllRenderRows();let e=this._dataDiffer.diff(this._renderRows);if(!e){this._updateNoDataRow(),this.contentChanged.next();return}let t=this._rowOutlet.viewContainer;this._viewRepeater.applyChanges(e,t,(n,r,a)=>this._getEmbeddedViewArgs(n.item,a),n=>n.item.data,n=>{n.operation===tt.INSERTED&&n.context&&this._renderCellTemplateForItem(n.record.item.rowDef,n.context)}),this._updateRowIndexContext(),e.forEachIdentityChange(n=>{let r=t.get(n.currentIndex);r.context.$implicit=n.item.data}),this._updateNoDataRow(),this.contentChanged.next(),this.updateStickyColumnStyles()}addColumnDef(e){this._customColumnDefs.add(e)}removeColumnDef(e){this._customColumnDefs.delete(e)}addRowDef(e){this._customRowDefs.add(e)}removeRowDef(e){this._customRowDefs.delete(e)}addHeaderRowDef(e){this._customHeaderRowDefs.add(e),this._headerRowDefChanged=!0}removeHeaderRowDef(e){this._customHeaderRowDefs.delete(e),this._headerRowDefChanged=!0}addFooterRowDef(e){this._customFooterRowDefs.add(e),this._footerRowDefChanged=!0}removeFooterRowDef(e){this._customFooterRowDefs.delete(e),this._footerRowDefChanged=!0}setNoDataRow(e){this._customNoDataRow=e}updateStickyHeaderRowStyles(){let e=this._getRenderedRows(this._headerRowOutlet);if(this._isNativeHtmlTable){let n=At(this._headerRowOutlet,"thead");n&&(n.style.display=e.length?"":"none")}let t=this._headerRowDefs.map(n=>n.sticky);this._stickyStyler.clearStickyPositioning(e,["top"]),this._stickyStyler.stickRows(e,t,"top"),this._headerRowDefs.forEach(n=>n.resetStickyChanged())}updateStickyFooterRowStyles(){let e=this._getRenderedRows(this._footerRowOutlet);if(this._isNativeHtmlTable){let n=At(this._footerRowOutlet,"tfoot");n&&(n.style.display=e.length?"":"none")}let t=this._footerRowDefs.map(n=>n.sticky);this._stickyStyler.clearStickyPositioning(e,["bottom"]),this._stickyStyler.stickRows(e,t,"bottom"),this._stickyStyler.updateStickyFooterContainer(this._elementRef.nativeElement,t),this._footerRowDefs.forEach(n=>n.resetStickyChanged())}updateStickyColumnStyles(){let e=this._getRenderedRows(this._headerRowOutlet),t=this._getRenderedRows(this._rowOutlet),n=this._getRenderedRows(this._footerRowOutlet);(this._isNativeHtmlTable&&!this.fixedLayout||this._stickyColumnStylesNeedReset)&&(this._stickyStyler.clearStickyPositioning([...e,...t,...n],["left","right"]),this._stickyColumnStylesNeedReset=!1),e.forEach((r,a)=>{this._addStickyColumnStyles([r],this._headerRowDefs[a])}),this._rowDefs.forEach(r=>{let a=[];for(let f=0;f<t.length;f++)this._renderRows[f].rowDef===r&&a.push(t[f]);this._addStickyColumnStyles(a,r)}),n.forEach((r,a)=>{this._addStickyColumnStyles([r],this._footerRowDefs[a])}),Array.from(this._columnDefsByName.values()).forEach(r=>r.resetStickyChanged())}stickyColumnsUpdated(e){this._positionListener?.stickyColumnsUpdated(e)}stickyEndColumnsUpdated(e){this._positionListener?.stickyEndColumnsUpdated(e)}stickyHeaderRowsUpdated(e){this._headerRowStickyUpdates.next(e),this._positionListener?.stickyHeaderRowsUpdated(e)}stickyFooterRowsUpdated(e){this._footerRowStickyUpdates.next(e),this._positionListener?.stickyFooterRowsUpdated(e)}_outletAssigned(){!this._hasAllOutlets&&this._rowOutlet&&this._headerRowOutlet&&this._footerRowOutlet&&this._noDataRowOutlet&&(this._hasAllOutlets=!0,this._canRender()&&this._render())}_canRender(){return this._hasAllOutlets&&this._hasInitialized}_render(){this._cacheRowDefs(),this._cacheColumnDefs(),!this._headerRowDefs.length&&!this._footerRowDefs.length&&this._rowDefs.length;let t=this._renderUpdatedColumns()||this._headerRowDefChanged||this._footerRowDefChanged;this._stickyColumnStylesNeedReset=this._stickyColumnStylesNeedReset||t,this._forceRecalculateCellWidths=t,this._headerRowDefChanged&&(this._forceRenderHeaderRows(),this._headerRowDefChanged=!1),this._footerRowDefChanged&&(this._forceRenderFooterRows(),this._footerRowDefChanged=!1),this.dataSource&&this._rowDefs.length>0&&!this._renderChangeSubscription?this._observeRenderChanges():this._stickyColumnStylesNeedReset&&this.updateStickyColumnStyles(),this._checkStickyStates()}_getAllRenderRows(){if(!Array.isArray(this._data)||!this._renderedRange)return[];let e=[],t=Math.min(this._data.length,this._renderedRange.end),n=this._cachedRenderRowsMap;this._cachedRenderRowsMap=new Map;for(let r=this._renderedRange.start;r<t;r++){let a=this._data[r],f=this._getRenderRowsForData(a,r,n.get(a));this._cachedRenderRowsMap.has(a)||this._cachedRenderRowsMap.set(a,new WeakMap);for(let h=0;h<f.length;h++){let _=f[h],v=this._cachedRenderRowsMap.get(_.data);v.has(_.rowDef)?v.get(_.rowDef).push(_):v.set(_.rowDef,[_]),e.push(_)}}return e}_getRenderRowsForData(e,t,n){return this._getRowDefs(e,t).map(a=>{let f=n&&n.has(a)?n.get(a):[];if(f.length){let h=f.shift();return h.dataIndex=t,h}else return{data:e,rowDef:a,dataIndex:t}})}_cacheColumnDefs(){this._columnDefsByName.clear(),_e(this._getOwnDefs(this._contentColumnDefs),this._customColumnDefs).forEach(t=>{this._columnDefsByName.has(t.name),this._columnDefsByName.set(t.name,t)})}_cacheRowDefs(){this._headerRowDefs=_e(this._getOwnDefs(this._contentHeaderRowDefs),this._customHeaderRowDefs),this._footerRowDefs=_e(this._getOwnDefs(this._contentFooterRowDefs),this._customFooterRowDefs),this._rowDefs=_e(this._getOwnDefs(this._contentRowDefs),this._customRowDefs);let e=this._rowDefs.filter(t=>!t.when);this._defaultRowDef=e[0]}_renderUpdatedColumns(){let e=(a,f)=>{let h=!!f.getColumnsDiff();return a||h},t=this._rowDefs.reduce(e,!1);t&&this._forceRenderDataRows();let n=this._headerRowDefs.reduce(e,!1);n&&this._forceRenderHeaderRows();let r=this._footerRowDefs.reduce(e,!1);return r&&this._forceRenderFooterRows(),t||n||r}_switchDataSource(e){this._data=[],he(this.dataSource)&&this.dataSource.disconnect(this),this._renderChangeSubscription&&(this._renderChangeSubscription.unsubscribe(),this._renderChangeSubscription=null),e||(this._dataDiffer&&this._dataDiffer.diff([]),this._rowOutlet&&this._rowOutlet.viewContainer.clear()),this._dataSource=e}_observeRenderChanges(){if(!this.dataSource)return;let e;he(this.dataSource)?e=this.dataSource.connect(this):ze(this.dataSource)?e=this.dataSource:Array.isArray(this.dataSource)&&(e=Ce(this.dataSource)),this._renderChangeSubscription=ce([e,this.viewChange]).pipe(Q(this._onDestroy)).subscribe(([t,n])=>{this._data=t||[],this._renderedRange=n,this._dataStream.next(t),this.renderRows()})}_forceRenderHeaderRows(){this._headerRowOutlet.viewContainer.length>0&&this._headerRowOutlet.viewContainer.clear(),this._headerRowDefs.forEach((e,t)=>this._renderRow(this._headerRowOutlet,e,t)),this.updateStickyHeaderRowStyles()}_forceRenderFooterRows(){this._footerRowOutlet.viewContainer.length>0&&this._footerRowOutlet.viewContainer.clear(),this._footerRowDefs.forEach((e,t)=>this._renderRow(this._footerRowOutlet,e,t)),this.updateStickyFooterRowStyles()}_addStickyColumnStyles(e,t){let n=Array.from(t?.columns||[]).map(f=>{let h=this._columnDefsByName.get(f);return h}),r=n.map(f=>f.sticky),a=n.map(f=>f.stickyEnd);this._stickyStyler.updateStickyColumns(e,r,a,!this.fixedLayout||this._forceRecalculateCellWidths)}_getRenderedRows(e){let t=[];for(let n=0;n<e.viewContainer.length;n++){let r=e.viewContainer.get(n);t.push(r.rootNodes[0])}return t}_getRowDefs(e,t){if(this._rowDefs.length===1)return[this._rowDefs[0]];let n=[];if(this.multiTemplateDataRows)n=this._rowDefs.filter(r=>!r.when||r.when(t,e));else{let r=this._rowDefs.find(a=>a.when&&a.when(t,e))||this._defaultRowDef;r&&n.push(r)}return n.length,n}_getEmbeddedViewArgs(e,t){let n=e.rowDef,r={$implicit:e.data};return{templateRef:n.template,context:r,index:t}}_renderRow(e,t,n,r={}){let a=e.viewContainer.createEmbeddedView(t.template,r,n);return this._renderCellTemplateForItem(t,r),a}_renderCellTemplateForItem(e,t){for(let n of this._getCellTemplates(e))X.mostRecentCellOutlet&&X.mostRecentCellOutlet._viewContainer.createEmbeddedView(n,t);this._changeDetectorRef.markForCheck()}_updateRowIndexContext(){let e=this._rowOutlet.viewContainer;for(let t=0,n=e.length;t<n;t++){let a=e.get(t).context;a.count=n,a.first=t===0,a.last=t===n-1,a.even=t%2===0,a.odd=!a.even,this.multiTemplateDataRows?(a.dataIndex=this._renderRows[t].dataIndex,a.renderIndex=t):a.index=this._renderRows[t].dataIndex}}_getCellTemplates(e){return!e||!e.columns?[]:Array.from(e.columns,t=>{let n=this._columnDefsByName.get(t);return e.extractCellTemplate(n)})}_forceRenderDataRows(){this._dataDiffer.diff([]),this._rowOutlet.viewContainer.clear(),this.renderRows()}_checkStickyStates(){let e=(t,n)=>t||n.hasStickyChanged();this._headerRowDefs.reduce(e,!1)&&this.updateStickyHeaderRowStyles(),this._footerRowDefs.reduce(e,!1)&&this.updateStickyFooterRowStyles(),Array.from(this._columnDefsByName.values()).reduce(e,!1)&&(this._stickyColumnStylesNeedReset=!0,this.updateStickyColumnStyles())}_setupStickyStyler(){let e=this._dir?this._dir.value:"ltr",t=this._injector;this._stickyStyler=new xe(this._isNativeHtmlTable,this.stickyCssClass,this._platform.isBrowser,this.needsPositionStickyOnElement,e,this,t),(this._dir?this._dir.change:Ce()).pipe(Q(this._onDestroy)).subscribe(n=>{this._stickyStyler.direction=n,this.updateStickyColumnStyles()})}_setupVirtualScrolling(e){let t=typeof requestAnimationFrame<"u"?He:Ae;this.viewChange.next({start:0,end:0}),e.renderedRangeStream.pipe(Le(0,t),Q(this._onDestroy)).subscribe(this.viewChange),e.attach({dataStream:this._dataStream,measureRangeSize:(n,r)=>this._measureRangeSize(n,r)}),ce([e.renderedContentOffset,this._headerRowStickyUpdates]).pipe(Q(this._onDestroy)).subscribe(([n,r])=>{if(!(!r.sizes||!r.offsets||!r.elements))for(let a=0;a<r.elements.length;a++){let f=r.elements[a];if(f){let h=r.offsets[a],_=n!==0?Math.max(n-h,h):-h;for(let v of f)v.style.top=`${-_}px`}}}),ce([e.renderedContentOffset,this._footerRowStickyUpdates]).pipe(Q(this._onDestroy)).subscribe(([n,r])=>{if(!(!r.sizes||!r.offsets||!r.elements))for(let a=0;a<r.elements.length;a++){let f=r.elements[a];if(f)for(let h of f)h.style.bottom=`${n+r.offsets[a]}px`}})}_getOwnDefs(e){return e.filter(t=>!t._table||t._table===this)}_updateNoDataRow(){let e=this._customNoDataRow||this._noDataRow;if(!e)return;let t=this._rowOutlet.viewContainer.length===0;if(t===this._isShowingNoDataRow)return;let n=this._noDataRowOutlet.viewContainer;if(t){let r=n.createEmbeddedView(e.templateRef),a=r.rootNodes[0];if(r.rootNodes.length===1&&a?.nodeType===this._document.ELEMENT_NODE){a.setAttribute("role","row"),a.classList.add(...e._contentClassNames);let f=a.querySelectorAll(e._cellSelector);for(let h=0;h<f.length;h++)f[h].classList.add(...e._cellClassNames)}}else n.clear();this._isShowingNoDataRow=t,this._changeDetectorRef.markForCheck()}_measureRangeSize(e,t){if(e.start>=e.end||t!=="vertical")return 0;let n=this.viewChange.value,r=this._rowOutlet.viewContainer;e.start<n.start||e.end>n.end;let a=e.start-n.start,f=e.end-e.start,h,_;for(let D=0;D<f;D++){let x=r.get(D+a);if(x&&x.rootNodes.length){h=_=x.rootNodes[0];break}}for(let D=f-1;D>-1;D--){let x=r.get(D+a);if(x&&x.rootNodes.length){_=x.rootNodes[x.rootNodes.length-1];break}}let v=h?.getBoundingClientRect?.(),F=_?.getBoundingClientRect?.();return v&&F?F.bottom-v.top:0}_virtualScrollEnabled(){return!this._disableVirtualScrolling&&this._virtualScrollViewport!=null}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=V({type:i,selectors:[["cdk-table"],["table","cdk-table",""]],contentQueries:function(t,n,r){if(t&1&&De(r,jt,5)(r,ie,5)(r,ye,5)(r,le,5)(r,Re,5),t&2){let a;L(a=U())&&(n._noDataRow=a.first),L(a=U())&&(n._contentColumnDefs=a),L(a=U())&&(n._contentRowDefs=a),L(a=U())&&(n._contentHeaderRowDefs=a),L(a=U())&&(n._contentFooterRowDefs=a)}},hostAttrs:[1,"cdk-table"],hostVars:2,hostBindings:function(t,n){t&2&&q("cdk-table-fixed-layout",n.fixedLayout)},inputs:{trackBy:"trackBy",dataSource:"dataSource",multiTemplateDataRows:[2,"multiTemplateDataRows","multiTemplateDataRows",A],fixedLayout:[2,"fixedLayout","fixedLayout",A],recycleRows:[2,"recycleRows","recycleRows",A]},outputs:{contentChanged:"contentChanged"},exportAs:["cdkTable"],features:[I([{provide:N,useExisting:i},{provide:se,useValue:null}])],ngContentSelectors:oi,decls:5,vars:2,consts:[["role","rowgroup"],["headerRowOutlet",""],["rowOutlet",""],["noDataRowOutlet",""],["footerRowOutlet",""]],template:function(t,n){t&1&&(me(ni),$(0),$(1,1),y(2,ri,1,0),y(3,ai,7,0)(4,si,4,0)),t&2&&(d(2),C(n._isServer?2:-1),d(),C(n._isNativeHtmlTable?3:4))},dependencies:[Fe,Me,Oe,Te],styles:[`.cdk-table-fixed-layout {
1
+ import{a as Pt,b as It,c as Nt,d as Bt}from"./chunk-BJM4SVXD.js";import{a as vt,b as Mt,c as Ft,d as Tt,e as Ot,g as Et}from"./chunk-IURS3QQO.js";import{a as Ct}from"./chunk-3CRIFTHA.js";import{c as _t}from"./chunk-XHEJEIFO.js";import{e as Dt,f as bt,i as xt,j as kt,n as Rt,o as St}from"./chunk-WX7YZB5N.js";import{$ as ue,$a as De,$d as pt,Bc as ot,Cb as Ke,Cc as rt,Da as W,Dd as ct,Ea as y,Eb as Ye,Fa as C,Gc as at,I as Q,Ia as Qe,Ib as ae,Ja as We,Jd as dt,Ka as E,La as s,Lb as Xe,M as de,Ma as l,N as ve,Na as J,P as c,Q as g,R as w,Ra as K,Rd as ut,Sa as Y,Ta as R,U as Ue,Ua as P,V as je,Vb as Ge,Wa as k,Wb as te,Wd as mt,X as $e,Xb as A,Ya as u,Yd as ft,Z as j,Za as fe,Zd as ht,_ as qe,_a as $,aa as O,bb as L,c as G,ca as B,cb as U,cc as Ze,d as Ve,ee as gt,f as Ae,g as He,ga as ie,hb as re,he as wt,i as Ce,ib as q,j as ze,ja as d,ka as oe,la as H,lb as f,lc as Je,ld as st,m as ce,mb as S,nb as ee,nd as lt,pe as yt,qa as Z,ra as V,sa as me,ta as p,tc as et,u as Le,uc as he,va as x,vc as tt,wa as z,wb as I,wc as nt,xc as it}from"./chunk-4BSA3TDQ.js";import{f as Be}from"./chunk-EQVTEUXC.js";var on=[[["caption"]],[["colgroup"],["col"]],"*"],rn=["caption","colgroup, col","*"];function an(n,o){n&1&&$(0,2)}function sn(n,o){n&1&&(s(0,"thead",0),R(1,1),l(),s(2,"tbody",0),R(3,2)(4,3),l(),s(5,"tfoot",0),R(6,4),l())}function ln(n,o){n&1&&R(0,1)(1,2)(2,3)(3,4)}var N=new ve("CDK_TABLE");var ge=(()=>{class n{template=c(H);constructor(){}static \u0275fac=function(t){return new(t||n)};static \u0275dir=p({type:n,selectors:[["","cdkCellDef",""]]})}return n})(),we=(()=>{class n{template=c(H);constructor(){}static \u0275fac=function(t){return new(t||n)};static \u0275dir=p({type:n,selectors:[["","cdkHeaderCellDef",""]]})}return n})(),zt=(()=>{class n{template=c(H);constructor(){}static \u0275fac=function(t){return new(t||n)};static \u0275dir=p({type:n,selectors:[["","cdkFooterCellDef",""]]})}return n})(),ne=(()=>{class n{_table=c(N,{optional:!0});_hasStickyChanged=!1;get name(){return this._name}set name(e){this._setNameInput(e)}_name;get sticky(){return this._sticky}set sticky(e){e!==this._sticky&&(this._sticky=e,this._hasStickyChanged=!0)}_sticky=!1;get stickyEnd(){return this._stickyEnd}set stickyEnd(e){e!==this._stickyEnd&&(this._stickyEnd=e,this._hasStickyChanged=!0)}_stickyEnd=!1;cell;headerCell;footerCell;cssClassFriendlyName;_columnCssClassName;constructor(){}hasStickyChanged(){let e=this._hasStickyChanged;return this.resetStickyChanged(),e}resetStickyChanged(){this._hasStickyChanged=!1}_updateColumnCssClassName(){this._columnCssClassName=[`cdk-column-${this.cssClassFriendlyName}`]}_setNameInput(e){e&&(this._name=e,this.cssClassFriendlyName=e.replace(/[^a-z0-9_-]/gi,"-"),this._updateColumnCssClassName())}static \u0275fac=function(t){return new(t||n)};static \u0275dir=p({type:n,selectors:[["","cdkColumnDef",""]],contentQueries:function(t,i,r){if(t&1&&De(r,ge,5)(r,we,5)(r,zt,5),t&2){let a;L(a=U())&&(i.cell=a.first),L(a=U())&&(i.headerCell=a.first),L(a=U())&&(i.footerCell=a.first)}},inputs:{name:[0,"cdkColumnDef","name"],sticky:[2,"sticky","sticky",A],stickyEnd:[2,"stickyEnd","stickyEnd",A]}})}return n})(),pe=class{constructor(o,e){e.nativeElement.classList.add(...o._columnCssClassName)}},Lt=(()=>{class n extends pe{constructor(){super(c(ne),c(B))}static \u0275fac=function(t){return new(t||n)};static \u0275dir=p({type:n,selectors:[["cdk-header-cell"],["th","cdk-header-cell",""]],hostAttrs:["role","columnheader",1,"cdk-header-cell"],features:[x]})}return n})();var Ut=(()=>{class n extends pe{constructor(){let e=c(ne),t=c(B);super(e,t);let i=e._table?._getCellRole();i&&t.nativeElement.setAttribute("role",i)}static \u0275fac=function(t){return new(t||n)};static \u0275dir=p({type:n,selectors:[["cdk-cell"],["td","cdk-cell",""]],hostAttrs:[1,"cdk-cell"],features:[x]})}return n})();var xe=(()=>{class n{template=c(H);_differs=c(te);columns;_columnsDiffer;constructor(){}ngOnChanges(e){if(!this._columnsDiffer){let t=e.columns&&e.columns.currentValue||[];this._columnsDiffer=this._differs.find(t).create(),this._columnsDiffer.diff(t)}}getColumnsDiff(){return this._columnsDiffer.diff(this.columns)}extractCellTemplate(e){return this instanceof le?e.headerCell.template:this instanceof ke?e.footerCell.template:e.cell.template}static \u0275fac=function(t){return new(t||n)};static \u0275dir=p({type:n,features:[ue]})}return n})(),le=(()=>{class n extends xe{_table=c(N,{optional:!0});_hasStickyChanged=!1;get sticky(){return this._sticky}set sticky(e){e!==this._sticky&&(this._sticky=e,this._hasStickyChanged=!0)}_sticky=!1;constructor(){super(c(H),c(te))}ngOnChanges(e){super.ngOnChanges(e)}hasStickyChanged(){let e=this._hasStickyChanged;return this.resetStickyChanged(),e}resetStickyChanged(){this._hasStickyChanged=!1}static \u0275fac=function(t){return new(t||n)};static \u0275dir=p({type:n,selectors:[["","cdkHeaderRowDef",""]],inputs:{columns:[0,"cdkHeaderRowDef","columns"],sticky:[2,"cdkHeaderRowDefSticky","sticky",A]},features:[x,ue]})}return n})(),ke=(()=>{class n extends xe{_table=c(N,{optional:!0});_hasStickyChanged=!1;get sticky(){return this._sticky}set sticky(e){e!==this._sticky&&(this._sticky=e,this._hasStickyChanged=!0)}_sticky=!1;constructor(){super(c(H),c(te))}ngOnChanges(e){super.ngOnChanges(e)}hasStickyChanged(){let e=this._hasStickyChanged;return this.resetStickyChanged(),e}resetStickyChanged(){this._hasStickyChanged=!1}static \u0275fac=function(t){return new(t||n)};static \u0275dir=p({type:n,selectors:[["","cdkFooterRowDef",""]],inputs:{columns:[0,"cdkFooterRowDef","columns"],sticky:[2,"cdkFooterRowDefSticky","sticky",A]},features:[x,ue]})}return n})(),ye=(()=>{class n extends xe{_table=c(N,{optional:!0});when;constructor(){super(c(H),c(te))}static \u0275fac=function(t){return new(t||n)};static \u0275dir=p({type:n,selectors:[["","cdkRowDef",""]],inputs:{columns:[0,"cdkRowDefColumns","columns"],when:[0,"cdkRowDefWhen","when"]},features:[x]})}return n})(),X=(()=>{class n{_viewContainer=c(Z);cells;context;static mostRecentCellOutlet=null;constructor(){n.mostRecentCellOutlet=this}ngOnDestroy(){n.mostRecentCellOutlet===this&&(n.mostRecentCellOutlet=null)}static \u0275fac=function(t){return new(t||n)};static \u0275dir=p({type:n,selectors:[["","cdkCellOutlet",""]]})}return n})(),Re=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275cmp=V({type:n,selectors:[["cdk-header-row"],["tr","cdk-header-row",""]],hostAttrs:["role","row",1,"cdk-header-row"],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(t,i){t&1&&R(0,0)},dependencies:[X],encapsulation:2})}return n})();var Se=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275cmp=V({type:n,selectors:[["cdk-row"],["tr","cdk-row",""]],hostAttrs:["role","row",1,"cdk-row"],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(t,i){t&1&&R(0,0)},dependencies:[X],encapsulation:2})}return n})(),jt=(()=>{class n{templateRef=c(H);_contentClassNames=["cdk-no-data-row","cdk-row"];_cellClassNames=["cdk-cell","cdk-no-data-cell"];_cellSelector="td, cdk-cell, [cdk-cell], .cdk-cell";constructor(){}static \u0275fac=function(t){return new(t||n)};static \u0275dir=p({type:n,selectors:[["ng-template","cdkNoDataRow",""]]})}return n})(),Vt=["top","bottom","left","right"],be=class{_isNativeHtmlTable;_stickCellCss;_isBrowser;_needsPositionStickyOnElement;direction;_positionListener;_tableInjector;_elemSizeCache=new WeakMap;_resizeObserver=globalThis?.ResizeObserver?new globalThis.ResizeObserver(o=>this._updateCachedSizes(o)):null;_updatedStickyColumnsParamsToReplay=[];_stickyColumnsReplayTimeout=null;_cachedCellWidths=[];_borderCellCss;_destroyed=!1;constructor(o,e,t=!0,i=!0,r,a,m){this._isNativeHtmlTable=o,this._stickCellCss=e,this._isBrowser=t,this._needsPositionStickyOnElement=i,this.direction=r,this._positionListener=a,this._tableInjector=m,this._borderCellCss={top:`${e}-border-elem-top`,bottom:`${e}-border-elem-bottom`,left:`${e}-border-elem-left`,right:`${e}-border-elem-right`}}clearStickyPositioning(o,e){(e.includes("left")||e.includes("right"))&&this._removeFromStickyColumnReplayQueue(o);let t=[];for(let i of o)i.nodeType===i.ELEMENT_NODE&&t.push(i,...Array.from(i.children));oe({write:()=>{for(let i of t)this._removeStickyStyle(i,e)}},{injector:this._tableInjector})}updateStickyColumns(o,e,t,i=!0,r=!0){if(!o.length||!this._isBrowser||!(e.some(T=>T)||t.some(T=>T))){this._positionListener?.stickyColumnsUpdated({sizes:[]}),this._positionListener?.stickyEndColumnsUpdated({sizes:[]});return}let a=o[0],m=a.children.length,h=this.direction==="rtl",_=h?"right":"left",v=h?"left":"right",F=e.lastIndexOf(!0),D=t.indexOf(!0),b,Pe,Ie;r&&this._updateStickyColumnReplayQueue({rows:[...o],stickyStartStates:[...e],stickyEndStates:[...t]}),oe({earlyRead:()=>{b=this._getCellWidths(a,i),Pe=this._getStickyStartColumnPositions(b,e),Ie=this._getStickyEndColumnPositions(b,t)},write:()=>{for(let T of o)for(let M=0;M<m;M++){let Ne=T.children[M];e[M]&&this._addStickyStyle(Ne,_,Pe[M],M===F),t[M]&&this._addStickyStyle(Ne,v,Ie[M],M===D)}this._positionListener&&b.some(T=>!!T)&&(this._positionListener.stickyColumnsUpdated({sizes:F===-1?[]:b.slice(0,F+1).map((T,M)=>e[M]?T:null)}),this._positionListener.stickyEndColumnsUpdated({sizes:D===-1?[]:b.slice(D).map((T,M)=>t[M+D]?T:null).reverse()}))}},{injector:this._tableInjector})}stickRows(o,e,t){if(!this._isBrowser)return;let i=t==="bottom"?o.slice().reverse():o,r=t==="bottom"?e.slice().reverse():e,a=[],m=[],h=[];oe({earlyRead:()=>{for(let _=0,v=0;_<i.length;_++){if(!r[_])continue;a[_]=v;let F=i[_];h[_]=this._isNativeHtmlTable?Array.from(F.children):[F];let D=this._retrieveElementSize(F).height;v+=D,m[_]=D}},write:()=>{let _=r.lastIndexOf(!0);for(let v=0;v<i.length;v++){if(!r[v])continue;let F=a[v],D=v===_;for(let b of h[v])this._addStickyStyle(b,t,F,D)}t==="top"?this._positionListener?.stickyHeaderRowsUpdated({sizes:m,offsets:a,elements:h}):this._positionListener?.stickyFooterRowsUpdated({sizes:m,offsets:a,elements:h})}},{injector:this._tableInjector})}updateStickyFooterContainer(o,e){this._isNativeHtmlTable&&oe({write:()=>{let t=o.querySelector("tfoot");t&&(e.some(i=>!i)?this._removeStickyStyle(t,["bottom"]):this._addStickyStyle(t,"bottom",0,!1))}},{injector:this._tableInjector})}destroy(){this._stickyColumnsReplayTimeout&&clearTimeout(this._stickyColumnsReplayTimeout),this._resizeObserver?.disconnect(),this._destroyed=!0}_removeStickyStyle(o,e){if(!o.classList.contains(this._stickCellCss))return;for(let i of e)o.style[i]="",o.classList.remove(this._borderCellCss[i]);Vt.some(i=>e.indexOf(i)===-1&&o.style[i])?o.style.zIndex=this._getCalculatedZIndex(o):(o.style.zIndex="",this._needsPositionStickyOnElement&&(o.style.position=""),o.classList.remove(this._stickCellCss))}_addStickyStyle(o,e,t,i){o.classList.add(this._stickCellCss),i&&o.classList.add(this._borderCellCss[e]),o.style[e]=`${t}px`,o.style.zIndex=this._getCalculatedZIndex(o),this._needsPositionStickyOnElement&&(o.style.cssText+="position: -webkit-sticky; position: sticky; ")}_getCalculatedZIndex(o){let e={top:100,bottom:10,left:1,right:1},t=0;for(let i of Vt)o.style[i]&&(t+=e[i]);return t?`${t}`:""}_getCellWidths(o,e=!0){if(!e&&this._cachedCellWidths.length)return this._cachedCellWidths;let t=[],i=o.children;for(let r=0;r<i.length;r++){let a=i[r];t.push(this._retrieveElementSize(a).width)}return this._cachedCellWidths=t,t}_getStickyStartColumnPositions(o,e){let t=[],i=0;for(let r=0;r<o.length;r++)e[r]&&(t[r]=i,i+=o[r]);return t}_getStickyEndColumnPositions(o,e){let t=[],i=0;for(let r=o.length;r>0;r--)e[r]&&(t[r]=i,i+=o[r]);return t}_retrieveElementSize(o){let e=this._elemSizeCache.get(o);if(e)return e;let t=o.getBoundingClientRect(),i={width:t.width,height:t.height};return this._resizeObserver&&(this._elemSizeCache.set(o,i),this._resizeObserver.observe(o,{box:"border-box"})),i}_updateStickyColumnReplayQueue(o){this._removeFromStickyColumnReplayQueue(o.rows),this._stickyColumnsReplayTimeout||this._updatedStickyColumnsParamsToReplay.push(o)}_removeFromStickyColumnReplayQueue(o){let e=new Set(o);for(let t of this._updatedStickyColumnsParamsToReplay)t.rows=t.rows.filter(i=>!e.has(i));this._updatedStickyColumnsParamsToReplay=this._updatedStickyColumnsParamsToReplay.filter(t=>!!t.rows.length)}_updateCachedSizes(o){let e=!1;for(let t of o){let i=t.borderBoxSize?.length?{width:t.borderBoxSize[0].inlineSize,height:t.borderBoxSize[0].blockSize}:{width:t.contentRect.width,height:t.contentRect.height};i.width!==this._elemSizeCache.get(t.target)?.width&&cn(t.target)&&(e=!0),this._elemSizeCache.set(t.target,i)}e&&this._updatedStickyColumnsParamsToReplay.length&&(this._stickyColumnsReplayTimeout&&clearTimeout(this._stickyColumnsReplayTimeout),this._stickyColumnsReplayTimeout=setTimeout(()=>{if(!this._destroyed){for(let t of this._updatedStickyColumnsParamsToReplay)this.updateStickyColumns(t.rows,t.stickyStartStates,t.stickyEndStates,!0,!1);this._updatedStickyColumnsParamsToReplay=[],this._stickyColumnsReplayTimeout=null}},0))}};function cn(n){return["cdk-cell","cdk-header-cell","cdk-footer-cell"].some(o=>n.classList.contains(o))}var se=new ve("STICKY_POSITIONING_LISTENER");var Me=(()=>{class n{viewContainer=c(Z);elementRef=c(B);constructor(){let e=c(N);e._rowOutlet=this,e._outletAssigned()}static \u0275fac=function(t){return new(t||n)};static \u0275dir=p({type:n,selectors:[["","rowOutlet",""]]})}return n})(),Fe=(()=>{class n{viewContainer=c(Z);elementRef=c(B);constructor(){let e=c(N);e._headerRowOutlet=this,e._outletAssigned()}static \u0275fac=function(t){return new(t||n)};static \u0275dir=p({type:n,selectors:[["","headerRowOutlet",""]]})}return n})(),Te=(()=>{class n{viewContainer=c(Z);elementRef=c(B);constructor(){let e=c(N);e._footerRowOutlet=this,e._outletAssigned()}static \u0275fac=function(t){return new(t||n)};static \u0275dir=p({type:n,selectors:[["","footerRowOutlet",""]]})}return n})(),Oe=(()=>{class n{viewContainer=c(Z);elementRef=c(B);constructor(){let e=c(N);e._noDataRowOutlet=this,e._outletAssigned()}static \u0275fac=function(t){return new(t||n)};static \u0275dir=p({type:n,selectors:[["","noDataRowOutlet",""]]})}return n})(),Ee=(()=>{class n{_differs=c(te);_changeDetectorRef=c(Ge);_elementRef=c(B);_dir=c(et,{optional:!0});_platform=c(Je);_viewRepeater;_viewportRuler=c(ot);_injector=c(Ue);_virtualScrollViewport=c(rt,{optional:!0,host:!0});_positionListener=c(se,{optional:!0})||c(se,{optional:!0,skipSelf:!0});_document=c(je);_data;_renderedRange;_onDestroy=new G;_renderRows;_renderChangeSubscription=null;_columnDefsByName=new Map;_rowDefs;_headerRowDefs;_footerRowDefs;_dataDiffer;_defaultRowDef=null;_customColumnDefs=new Set;_customRowDefs=new Set;_customHeaderRowDefs=new Set;_customFooterRowDefs=new Set;_customNoDataRow=null;_headerRowDefChanged=!0;_footerRowDefChanged=!0;_stickyColumnStylesNeedReset=!0;_forceRecalculateCellWidths=!0;_cachedRenderRowsMap=new Map;_isNativeHtmlTable;_stickyStyler;stickyCssClass="cdk-table-sticky";needsPositionStickyOnElement=!0;_isServer;_isShowingNoDataRow=!1;_hasAllOutlets=!1;_hasInitialized=!1;_headerRowStickyUpdates=new G;_footerRowStickyUpdates=new G;_disableVirtualScrolling=!1;_getCellRole(){if(this._cellRoleInternal===void 0){let e=this._elementRef.nativeElement.getAttribute("role");return e==="grid"||e==="treegrid"?"gridcell":"cell"}return this._cellRoleInternal}_cellRoleInternal=void 0;get trackBy(){return this._trackByFn}set trackBy(e){this._trackByFn=e}_trackByFn;get dataSource(){return this._dataSource}set dataSource(e){this._dataSource!==e&&(this._switchDataSource(e),this._changeDetectorRef.markForCheck())}_dataSource;_dataSourceChanges=new G;_dataStream=new G;get multiTemplateDataRows(){return this._multiTemplateDataRows}set multiTemplateDataRows(e){this._multiTemplateDataRows=e,this._rowOutlet&&this._rowOutlet.viewContainer.length&&(this._forceRenderDataRows(),this.updateStickyColumnStyles())}_multiTemplateDataRows=!1;get fixedLayout(){return this._virtualScrollEnabled()?!0:this._fixedLayout}set fixedLayout(e){this._fixedLayout=e,this._forceRecalculateCellWidths=!0,this._stickyColumnStylesNeedReset=!0}_fixedLayout=!1;recycleRows=!1;contentChanged=new $e;viewChange=new Ve({start:0,end:Number.MAX_VALUE});_rowOutlet;_headerRowOutlet;_footerRowOutlet;_noDataRowOutlet;_contentColumnDefs;_contentRowDefs;_contentHeaderRowDefs;_contentFooterRowDefs;_noDataRow;constructor(){c(new Xe("role"),{optional:!0})||this._elementRef.nativeElement.setAttribute("role","table"),this._isServer=!this._platform.isBrowser,this._isNativeHtmlTable=this._elementRef.nativeElement.nodeName==="TABLE",this._dataDiffer=this._differs.find([]).create((t,i)=>this.trackBy?this.trackBy(i.dataIndex,i.data):i)}ngOnInit(){this._setupStickyStyler(),this._viewportRuler.change().pipe(Q(this._onDestroy)).subscribe(()=>{this._forceRecalculateCellWidths=!0})}ngAfterContentInit(){this._viewRepeater=this.recycleRows||this._virtualScrollEnabled()?new nt:new _t,this._virtualScrollEnabled()&&this._setupVirtualScrolling(this._virtualScrollViewport),this._hasInitialized=!0}ngAfterContentChecked(){this._canRender()&&this._render()}ngOnDestroy(){this._stickyStyler?.destroy(),[this._rowOutlet?.viewContainer,this._headerRowOutlet?.viewContainer,this._footerRowOutlet?.viewContainer,this._cachedRenderRowsMap,this._customColumnDefs,this._customRowDefs,this._customHeaderRowDefs,this._customFooterRowDefs,this._columnDefsByName].forEach(e=>{e?.clear()}),this._headerRowDefs=[],this._footerRowDefs=[],this._defaultRowDef=null,this._headerRowStickyUpdates.complete(),this._footerRowStickyUpdates.complete(),this._onDestroy.next(),this._onDestroy.complete(),he(this.dataSource)&&this.dataSource.disconnect(this)}renderRows(){this._renderRows=this._getAllRenderRows();let e=this._dataDiffer.diff(this._renderRows);if(!e){this._updateNoDataRow(),this.contentChanged.next();return}let t=this._rowOutlet.viewContainer;this._viewRepeater.applyChanges(e,t,(i,r,a)=>this._getEmbeddedViewArgs(i.item,a),i=>i.item.data,i=>{i.operation===tt.INSERTED&&i.context&&this._renderCellTemplateForItem(i.record.item.rowDef,i.context)}),this._updateRowIndexContext(),e.forEachIdentityChange(i=>{let r=t.get(i.currentIndex);r.context.$implicit=i.item.data}),this._updateNoDataRow(),this.contentChanged.next(),this.updateStickyColumnStyles()}addColumnDef(e){this._customColumnDefs.add(e)}removeColumnDef(e){this._customColumnDefs.delete(e)}addRowDef(e){this._customRowDefs.add(e)}removeRowDef(e){this._customRowDefs.delete(e)}addHeaderRowDef(e){this._customHeaderRowDefs.add(e),this._headerRowDefChanged=!0}removeHeaderRowDef(e){this._customHeaderRowDefs.delete(e),this._headerRowDefChanged=!0}addFooterRowDef(e){this._customFooterRowDefs.add(e),this._footerRowDefChanged=!0}removeFooterRowDef(e){this._customFooterRowDefs.delete(e),this._footerRowDefChanged=!0}setNoDataRow(e){this._customNoDataRow=e}updateStickyHeaderRowStyles(){let e=this._getRenderedRows(this._headerRowOutlet);if(this._isNativeHtmlTable){let i=At(this._headerRowOutlet,"thead");i&&(i.style.display=e.length?"":"none")}let t=this._headerRowDefs.map(i=>i.sticky);this._stickyStyler.clearStickyPositioning(e,["top"]),this._stickyStyler.stickRows(e,t,"top"),this._headerRowDefs.forEach(i=>i.resetStickyChanged())}updateStickyFooterRowStyles(){let e=this._getRenderedRows(this._footerRowOutlet);if(this._isNativeHtmlTable){let i=At(this._footerRowOutlet,"tfoot");i&&(i.style.display=e.length?"":"none")}let t=this._footerRowDefs.map(i=>i.sticky);this._stickyStyler.clearStickyPositioning(e,["bottom"]),this._stickyStyler.stickRows(e,t,"bottom"),this._stickyStyler.updateStickyFooterContainer(this._elementRef.nativeElement,t),this._footerRowDefs.forEach(i=>i.resetStickyChanged())}updateStickyColumnStyles(){let e=this._getRenderedRows(this._headerRowOutlet),t=this._getRenderedRows(this._rowOutlet),i=this._getRenderedRows(this._footerRowOutlet);(this._isNativeHtmlTable&&!this.fixedLayout||this._stickyColumnStylesNeedReset)&&(this._stickyStyler.clearStickyPositioning([...e,...t,...i],["left","right"]),this._stickyColumnStylesNeedReset=!1),e.forEach((r,a)=>{this._addStickyColumnStyles([r],this._headerRowDefs[a])}),this._rowDefs.forEach(r=>{let a=[];for(let m=0;m<t.length;m++)this._renderRows[m].rowDef===r&&a.push(t[m]);this._addStickyColumnStyles(a,r)}),i.forEach((r,a)=>{this._addStickyColumnStyles([r],this._footerRowDefs[a])}),Array.from(this._columnDefsByName.values()).forEach(r=>r.resetStickyChanged())}stickyColumnsUpdated(e){this._positionListener?.stickyColumnsUpdated(e)}stickyEndColumnsUpdated(e){this._positionListener?.stickyEndColumnsUpdated(e)}stickyHeaderRowsUpdated(e){this._headerRowStickyUpdates.next(e),this._positionListener?.stickyHeaderRowsUpdated(e)}stickyFooterRowsUpdated(e){this._footerRowStickyUpdates.next(e),this._positionListener?.stickyFooterRowsUpdated(e)}_outletAssigned(){!this._hasAllOutlets&&this._rowOutlet&&this._headerRowOutlet&&this._footerRowOutlet&&this._noDataRowOutlet&&(this._hasAllOutlets=!0,this._canRender()&&this._render())}_canRender(){return this._hasAllOutlets&&this._hasInitialized}_render(){this._cacheRowDefs(),this._cacheColumnDefs(),!this._headerRowDefs.length&&!this._footerRowDefs.length&&this._rowDefs.length;let t=this._renderUpdatedColumns()||this._headerRowDefChanged||this._footerRowDefChanged;this._stickyColumnStylesNeedReset=this._stickyColumnStylesNeedReset||t,this._forceRecalculateCellWidths=t,this._headerRowDefChanged&&(this._forceRenderHeaderRows(),this._headerRowDefChanged=!1),this._footerRowDefChanged&&(this._forceRenderFooterRows(),this._footerRowDefChanged=!1),this.dataSource&&this._rowDefs.length>0&&!this._renderChangeSubscription?this._observeRenderChanges():this._stickyColumnStylesNeedReset&&this.updateStickyColumnStyles(),this._checkStickyStates()}_getAllRenderRows(){if(!Array.isArray(this._data)||!this._renderedRange)return[];let e=[],t=Math.min(this._data.length,this._renderedRange.end),i=this._cachedRenderRowsMap;this._cachedRenderRowsMap=new Map;for(let r=this._renderedRange.start;r<t;r++){let a=this._data[r],m=this._getRenderRowsForData(a,r,i.get(a));this._cachedRenderRowsMap.has(a)||this._cachedRenderRowsMap.set(a,new WeakMap);for(let h=0;h<m.length;h++){let _=m[h],v=this._cachedRenderRowsMap.get(_.data);v.has(_.rowDef)?v.get(_.rowDef).push(_):v.set(_.rowDef,[_]),e.push(_)}}return e}_getRenderRowsForData(e,t,i){return this._getRowDefs(e,t).map(a=>{let m=i&&i.has(a)?i.get(a):[];if(m.length){let h=m.shift();return h.dataIndex=t,h}else return{data:e,rowDef:a,dataIndex:t}})}_cacheColumnDefs(){this._columnDefsByName.clear(),_e(this._getOwnDefs(this._contentColumnDefs),this._customColumnDefs).forEach(t=>{this._columnDefsByName.has(t.name),this._columnDefsByName.set(t.name,t)})}_cacheRowDefs(){this._headerRowDefs=_e(this._getOwnDefs(this._contentHeaderRowDefs),this._customHeaderRowDefs),this._footerRowDefs=_e(this._getOwnDefs(this._contentFooterRowDefs),this._customFooterRowDefs),this._rowDefs=_e(this._getOwnDefs(this._contentRowDefs),this._customRowDefs);let e=this._rowDefs.filter(t=>!t.when);this._defaultRowDef=e[0]}_renderUpdatedColumns(){let e=(a,m)=>{let h=!!m.getColumnsDiff();return a||h},t=this._rowDefs.reduce(e,!1);t&&this._forceRenderDataRows();let i=this._headerRowDefs.reduce(e,!1);i&&this._forceRenderHeaderRows();let r=this._footerRowDefs.reduce(e,!1);return r&&this._forceRenderFooterRows(),t||i||r}_switchDataSource(e){this._data=[],he(this.dataSource)&&this.dataSource.disconnect(this),this._renderChangeSubscription&&(this._renderChangeSubscription.unsubscribe(),this._renderChangeSubscription=null),e||(this._dataDiffer&&this._dataDiffer.diff([]),this._rowOutlet&&this._rowOutlet.viewContainer.clear()),this._dataSource=e}_observeRenderChanges(){if(!this.dataSource)return;let e;he(this.dataSource)?e=this.dataSource.connect(this):ze(this.dataSource)?e=this.dataSource:Array.isArray(this.dataSource)&&(e=Ce(this.dataSource)),this._renderChangeSubscription=ce([e,this.viewChange]).pipe(Q(this._onDestroy)).subscribe(([t,i])=>{this._data=t||[],this._renderedRange=i,this._dataStream.next(t),this.renderRows()})}_forceRenderHeaderRows(){this._headerRowOutlet.viewContainer.length>0&&this._headerRowOutlet.viewContainer.clear(),this._headerRowDefs.forEach((e,t)=>this._renderRow(this._headerRowOutlet,e,t)),this.updateStickyHeaderRowStyles()}_forceRenderFooterRows(){this._footerRowOutlet.viewContainer.length>0&&this._footerRowOutlet.viewContainer.clear(),this._footerRowDefs.forEach((e,t)=>this._renderRow(this._footerRowOutlet,e,t)),this.updateStickyFooterRowStyles()}_addStickyColumnStyles(e,t){let i=Array.from(t?.columns||[]).map(m=>{let h=this._columnDefsByName.get(m);return h}),r=i.map(m=>m.sticky),a=i.map(m=>m.stickyEnd);this._stickyStyler.updateStickyColumns(e,r,a,!this.fixedLayout||this._forceRecalculateCellWidths)}_getRenderedRows(e){let t=[];for(let i=0;i<e.viewContainer.length;i++){let r=e.viewContainer.get(i);t.push(r.rootNodes[0])}return t}_getRowDefs(e,t){if(this._rowDefs.length===1)return[this._rowDefs[0]];let i=[];if(this.multiTemplateDataRows)i=this._rowDefs.filter(r=>!r.when||r.when(t,e));else{let r=this._rowDefs.find(a=>a.when&&a.when(t,e))||this._defaultRowDef;r&&i.push(r)}return i.length,i}_getEmbeddedViewArgs(e,t){let i=e.rowDef,r={$implicit:e.data};return{templateRef:i.template,context:r,index:t}}_renderRow(e,t,i,r={}){let a=e.viewContainer.createEmbeddedView(t.template,r,i);return this._renderCellTemplateForItem(t,r),a}_renderCellTemplateForItem(e,t){for(let i of this._getCellTemplates(e))X.mostRecentCellOutlet&&X.mostRecentCellOutlet._viewContainer.createEmbeddedView(i,t);this._changeDetectorRef.markForCheck()}_updateRowIndexContext(){let e=this._rowOutlet.viewContainer;for(let t=0,i=e.length;t<i;t++){let a=e.get(t).context;a.count=i,a.first=t===0,a.last=t===i-1,a.even=t%2===0,a.odd=!a.even,this.multiTemplateDataRows?(a.dataIndex=this._renderRows[t].dataIndex,a.renderIndex=t):a.index=this._renderRows[t].dataIndex}}_getCellTemplates(e){return!e||!e.columns?[]:Array.from(e.columns,t=>{let i=this._columnDefsByName.get(t);return e.extractCellTemplate(i)})}_forceRenderDataRows(){this._dataDiffer.diff([]),this._rowOutlet.viewContainer.clear(),this.renderRows()}_checkStickyStates(){let e=(t,i)=>t||i.hasStickyChanged();this._headerRowDefs.reduce(e,!1)&&this.updateStickyHeaderRowStyles(),this._footerRowDefs.reduce(e,!1)&&this.updateStickyFooterRowStyles(),Array.from(this._columnDefsByName.values()).reduce(e,!1)&&(this._stickyColumnStylesNeedReset=!0,this.updateStickyColumnStyles())}_setupStickyStyler(){let e=this._dir?this._dir.value:"ltr",t=this._injector;this._stickyStyler=new be(this._isNativeHtmlTable,this.stickyCssClass,this._platform.isBrowser,this.needsPositionStickyOnElement,e,this,t),(this._dir?this._dir.change:Ce()).pipe(Q(this._onDestroy)).subscribe(i=>{this._stickyStyler.direction=i,this.updateStickyColumnStyles()})}_setupVirtualScrolling(e){let t=typeof requestAnimationFrame<"u"?He:Ae;this.viewChange.next({start:0,end:0}),e.renderedRangeStream.pipe(Le(0,t),Q(this._onDestroy)).subscribe(this.viewChange),e.attach({dataStream:this._dataStream,measureRangeSize:(i,r)=>this._measureRangeSize(i,r)}),ce([e.renderedContentOffset,this._headerRowStickyUpdates]).pipe(Q(this._onDestroy)).subscribe(([i,r])=>{if(!(!r.sizes||!r.offsets||!r.elements))for(let a=0;a<r.elements.length;a++){let m=r.elements[a];if(m){let h=r.offsets[a],_=i!==0?Math.max(i-h,h):-h;for(let v of m)v.style.top=`${-_}px`}}}),ce([e.renderedContentOffset,this._footerRowStickyUpdates]).pipe(Q(this._onDestroy)).subscribe(([i,r])=>{if(!(!r.sizes||!r.offsets||!r.elements))for(let a=0;a<r.elements.length;a++){let m=r.elements[a];if(m)for(let h of m)h.style.bottom=`${i+r.offsets[a]}px`}})}_getOwnDefs(e){return e.filter(t=>!t._table||t._table===this)}_updateNoDataRow(){let e=this._customNoDataRow||this._noDataRow;if(!e)return;let t=this._rowOutlet.viewContainer.length===0;if(t===this._isShowingNoDataRow)return;let i=this._noDataRowOutlet.viewContainer;if(t){let r=i.createEmbeddedView(e.templateRef),a=r.rootNodes[0];if(r.rootNodes.length===1&&a?.nodeType===this._document.ELEMENT_NODE){a.setAttribute("role","row"),a.classList.add(...e._contentClassNames);let m=a.querySelectorAll(e._cellSelector);for(let h=0;h<m.length;h++)m[h].classList.add(...e._cellClassNames)}}else i.clear();this._isShowingNoDataRow=t,this._changeDetectorRef.markForCheck()}_measureRangeSize(e,t){if(e.start>=e.end||t!=="vertical")return 0;let i=this.viewChange.value,r=this._rowOutlet.viewContainer;e.start<i.start||e.end>i.end;let a=e.start-i.start,m=e.end-e.start,h,_;for(let D=0;D<m;D++){let b=r.get(D+a);if(b&&b.rootNodes.length){h=_=b.rootNodes[0];break}}for(let D=m-1;D>-1;D--){let b=r.get(D+a);if(b&&b.rootNodes.length){_=b.rootNodes[b.rootNodes.length-1];break}}let v=h?.getBoundingClientRect?.(),F=_?.getBoundingClientRect?.();return v&&F?F.bottom-v.top:0}_virtualScrollEnabled(){return!this._disableVirtualScrolling&&this._virtualScrollViewport!=null}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=V({type:n,selectors:[["cdk-table"],["table","cdk-table",""]],contentQueries:function(t,i,r){if(t&1&&De(r,jt,5)(r,ne,5)(r,ye,5)(r,le,5)(r,ke,5),t&2){let a;L(a=U())&&(i._noDataRow=a.first),L(a=U())&&(i._contentColumnDefs=a),L(a=U())&&(i._contentRowDefs=a),L(a=U())&&(i._contentHeaderRowDefs=a),L(a=U())&&(i._contentFooterRowDefs=a)}},hostAttrs:[1,"cdk-table"],hostVars:2,hostBindings:function(t,i){t&2&&q("cdk-table-fixed-layout",i.fixedLayout)},inputs:{trackBy:"trackBy",dataSource:"dataSource",multiTemplateDataRows:[2,"multiTemplateDataRows","multiTemplateDataRows",A],fixedLayout:[2,"fixedLayout","fixedLayout",A],recycleRows:[2,"recycleRows","recycleRows",A]},outputs:{contentChanged:"contentChanged"},exportAs:["cdkTable"],features:[I([{provide:N,useExisting:n},{provide:se,useValue:null}])],ngContentSelectors:rn,decls:5,vars:2,consts:[["role","rowgroup"],["headerRowOutlet",""],["rowOutlet",""],["noDataRowOutlet",""],["footerRowOutlet",""]],template:function(t,i){t&1&&(fe(on),$(0),$(1,1),y(2,an,1,0),y(3,sn,7,0)(4,ln,4,0)),t&2&&(d(2),C(i._isServer?2:-1),d(),C(i._isNativeHtmlTable?3:4))},dependencies:[Fe,Me,Oe,Te],styles:[`.cdk-table-fixed-layout {
2
2
  table-layout: fixed;
3
3
  }
4
- `],encapsulation:2})}return i})();function _e(i,o){return i.concat(Array.from(o))}function At(i,o){let e=o.toUpperCase(),t=i.viewContainer.element.nativeElement;for(;t;){let n=t.nodeType===1?t.nodeName:null;if(n===e)return t;if(n==="TABLE")break;t=t.parentNode}return null}var $t=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=fe({type:i});static \u0275inj=de({imports:[at]})}return i})();var ci=[[["caption"]],[["colgroup"],["col"]],"*"],di=["caption","colgroup, col","*"];function ui(i,o){i&1&&$(0,2)}function fi(i,o){i&1&&(s(0,"thead",0),k(1,1),l(),s(2,"tbody",2),k(3,3)(4,4),l(),s(5,"tfoot",0),k(6,5),l())}function mi(i,o){i&1&&k(0,1)(1,3)(2,4)(3,5)}var qt=(()=>{class i extends Ee{stickyCssClass="mat-mdc-table-sticky";needsPositionStickyOnElement=!1;static \u0275fac=(()=>{let e;return function(n){return(e||(e=O(i)))(n||i)}})();static \u0275cmp=V({type:i,selectors:[["mat-table"],["table","mat-table",""]],hostAttrs:[1,"mat-mdc-table","mdc-data-table__table"],hostVars:2,hostBindings:function(t,n){t&2&&q("mat-table-fixed-layout",n.fixedLayout)},exportAs:["matTable"],features:[I([{provide:Ee,useExisting:i},{provide:N,useExisting:i},{provide:se,useValue:null}]),b],ngContentSelectors:di,decls:5,vars:2,consts:[["role","rowgroup"],["headerRowOutlet",""],["role","rowgroup",1,"mdc-data-table__content"],["rowOutlet",""],["noDataRowOutlet",""],["footerRowOutlet",""]],template:function(t,n){t&1&&(me(ci),$(0),$(1,1),y(2,ui,1,0),y(3,fi,7,0)(4,mi,4,0)),t&2&&(d(2),C(n._isServer?2:-1),d(),C(n._isNativeHtmlTable?3:4))},dependencies:[Fe,Me,Oe,Te],styles:[`.mat-mdc-table-sticky {
4
+ `],encapsulation:2})}return n})();function _e(n,o){return n.concat(Array.from(o))}function At(n,o){let e=o.toUpperCase(),t=n.viewContainer.element.nativeElement;for(;t;){let i=t.nodeType===1?t.nodeName:null;if(i===e)return t;if(i==="TABLE")break;t=t.parentNode}return null}var $t=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275mod=me({type:n});static \u0275inj=de({imports:[at]})}return n})();var dn=[[["caption"]],[["colgroup"],["col"]],"*"],un=["caption","colgroup, col","*"];function mn(n,o){n&1&&$(0,2)}function fn(n,o){n&1&&(s(0,"thead",0),R(1,1),l(),s(2,"tbody",2),R(3,3)(4,4),l(),s(5,"tfoot",0),R(6,5),l())}function hn(n,o){n&1&&R(0,1)(1,3)(2,4)(3,5)}var qt=(()=>{class n extends Ee{stickyCssClass="mat-mdc-table-sticky";needsPositionStickyOnElement=!1;static \u0275fac=(()=>{let e;return function(i){return(e||(e=O(n)))(i||n)}})();static \u0275cmp=V({type:n,selectors:[["mat-table"],["table","mat-table",""]],hostAttrs:[1,"mat-mdc-table","mdc-data-table__table"],hostVars:2,hostBindings:function(t,i){t&2&&q("mat-table-fixed-layout",i.fixedLayout)},exportAs:["matTable"],features:[I([{provide:Ee,useExisting:n},{provide:N,useExisting:n},{provide:se,useValue:null}]),x],ngContentSelectors:un,decls:5,vars:2,consts:[["role","rowgroup"],["headerRowOutlet",""],["role","rowgroup",1,"mdc-data-table__content"],["rowOutlet",""],["noDataRowOutlet",""],["footerRowOutlet",""]],template:function(t,i){t&1&&(fe(dn),$(0),$(1,1),y(2,mn,1,0),y(3,fn,7,0)(4,hn,4,0)),t&2&&(d(2),C(i._isServer?2:-1),d(),C(i._isNativeHtmlTable?3:4))},dependencies:[Fe,Me,Oe,Te],styles:[`.mat-mdc-table-sticky {
5
5
  position: sticky !important;
6
6
  }
7
7
 
@@ -178,4 +178,4 @@ mat-cell.mat-mdc-cell,
178
178
  mat-footer-cell.mat-mdc-footer-cell {
179
179
  align-self: stretch;
180
180
  }
181
- `],encapsulation:2})}return i})(),Qt=(()=>{class i extends ge{static \u0275fac=(()=>{let e;return function(n){return(e||(e=O(i)))(n||i)}})();static \u0275dir=p({type:i,selectors:[["","matCellDef",""]],features:[I([{provide:ge,useExisting:i}]),b]})}return i})(),Wt=(()=>{class i extends we{static \u0275fac=(()=>{let e;return function(n){return(e||(e=O(i)))(n||i)}})();static \u0275dir=p({type:i,selectors:[["","matHeaderCellDef",""]],features:[I([{provide:we,useExisting:i}]),b]})}return i})();var Kt=(()=>{class i extends ie{get name(){return this._name}set name(e){this._setNameInput(e)}_updateColumnCssClassName(){super._updateColumnCssClassName(),this._columnCssClassName.push(`mat-column-${this.cssClassFriendlyName}`)}static \u0275fac=(()=>{let e;return function(n){return(e||(e=O(i)))(n||i)}})();static \u0275dir=p({type:i,selectors:[["","matColumnDef",""]],inputs:{name:[0,"matColumnDef","name"]},features:[I([{provide:ie,useExisting:i}]),b]})}return i})(),Yt=(()=>{class i extends Lt{static \u0275fac=(()=>{let e;return function(n){return(e||(e=O(i)))(n||i)}})();static \u0275dir=p({type:i,selectors:[["mat-header-cell"],["th","mat-header-cell",""]],hostAttrs:["role","columnheader",1,"mat-mdc-header-cell","mdc-data-table__header-cell"],features:[b]})}return i})();var Xt=(()=>{class i extends Ut{static \u0275fac=(()=>{let e;return function(n){return(e||(e=O(i)))(n||i)}})();static \u0275dir=p({type:i,selectors:[["mat-cell"],["td","mat-cell",""]],hostAttrs:[1,"mat-mdc-cell","mdc-data-table__cell"],features:[b]})}return i})();var Gt=(()=>{class i extends le{static \u0275fac=(()=>{let e;return function(n){return(e||(e=O(i)))(n||i)}})();static \u0275dir=p({type:i,selectors:[["","matHeaderRowDef",""]],inputs:{columns:[0,"matHeaderRowDef","columns"],sticky:[2,"matHeaderRowDefSticky","sticky",A]},features:[I([{provide:le,useExisting:i}]),b]})}return i})();var Zt=(()=>{class i extends ye{static \u0275fac=(()=>{let e;return function(n){return(e||(e=O(i)))(n||i)}})();static \u0275dir=p({type:i,selectors:[["","matRowDef",""]],inputs:{columns:[0,"matRowDefColumns","columns"],when:[0,"matRowDefWhen","when"]},features:[I([{provide:ye,useExisting:i}]),b]})}return i})(),Jt=(()=>{class i extends ke{static \u0275fac=(()=>{let e;return function(n){return(e||(e=O(i)))(n||i)}})();static \u0275cmp=V({type:i,selectors:[["mat-header-row"],["tr","mat-header-row",""]],hostAttrs:["role","row",1,"mat-mdc-header-row","mdc-data-table__header-row"],exportAs:["matHeaderRow"],features:[I([{provide:ke,useExisting:i}]),b],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(t,n){t&1&&k(0,0)},dependencies:[X],encapsulation:2})}return i})();var ei=(()=>{class i extends Se{static \u0275fac=(()=>{let e;return function(n){return(e||(e=O(i)))(n||i)}})();static \u0275cmp=V({type:i,selectors:[["mat-row"],["tr","mat-row",""]],hostAttrs:["role","row",1,"mat-mdc-row","mdc-data-table__row"],exportAs:["matRow"],features:[I([{provide:Se,useExisting:i}]),b],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(t,n){t&1&&k(0,0)},dependencies:[X],encapsulation:2})}return i})();var ti=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=fe({type:i});static \u0275inj=de({imports:[$t,nt]})}return i})();var _i=(i,o)=>o.pr;function pi(i,o){i&1&&(s(0,"div",5),m(1,"Loading\u2026"),l())}function gi(i,o){i&1&&(s(0,"div",5)(1,"mat-icon",7),m(2,"tips_and_updates"),l(),s(3,"p"),m(4,"No features have been documented yet."),l()())}function wi(i,o){if(i&1&&(s(0,"figcaption"),m(1),l()),i&2){let e=u(2);d(),S(e.images[0].alt)}}function yi(i,o){if(i&1){let e=P();s(0,"figure",35),R("click",function(){g(e);let n=u(),r=u(2);return w(r.openViewer(n.images[0].url))})("keydown.enter",function(){g(e);let n=u(),r=u(2);return w(r.openViewer(n.images[0].url))})("keydown.space",function(n){g(e);let r=u();return u(2).openViewer(r.images[0].url),w(n.preventDefault())}),J(1,"img",36),y(2,wi,2,1,"figcaption"),l()}if(i&2){let e=u(),t=u(2);W("aria-label","Enlarge "+(e.images[0].alt||"screenshot")),d(),E("src",t.resolveShot(e.images[0].url),ne)("alt",e.images[0].alt||""),d(),C(e.images[0].alt?2:-1)}}function Ci(i,o){if(i&1&&(s(0,"span",37),m(1),l()),i&2){let e=u(),t=u(2);q("enhanced",e.latestKind==="enhanced"),d(),ee(" ",t.sinceLabel(e)," ")}}function vi(i,o){i&1&&(s(0,"span",30),m(1,"Unreleased"),l())}function Di(i,o){if(i&1&&(s(0,"figcaption"),m(1),l()),i&2){let e=u().$implicit;d(),S(e.alt)}}function xi(i,o){if(i&1){let e=P();s(0,"figure",38),R("click",function(){let n=g(e).$implicit,r=u(3);return w(r.openViewer(n.url))})("keydown.enter",function(){let n=g(e).$implicit,r=u(3);return w(r.openViewer(n.url))})("keydown.space",function(n){let r=g(e).$implicit;return u(3).openViewer(r.url),w(n.preventDefault())}),J(1,"img",36),y(2,Di,2,1,"figcaption"),l()}if(i&2){let e=o.$implicit,t=u(3);W("aria-label","Enlarge "+(e.alt||"screenshot")),d(),E("src",t.resolveShot(e.url),ne)("alt",e.alt||""),d(),C(e.alt?2:-1)}}function bi(i,o){if(i&1&&(s(0,"a",43),m(1),l()),i&2){let e=o,t=u(5);E("href",t.prUrl(e),ne),d(),ee("#",e)}}function Ri(i,o){if(i&1&&(s(0,"tr")(1,"td",41),m(2),Ke(3,"date"),l(),s(4,"td",42),y(5,bi,2,2,"a",43),l(),s(6,"td",44),m(7),l()()),i&2){let e,t=o.$implicit;d(2),ee(" ",t.date?Ye(3,3,t.date,"mediumDate"):""," "),d(3),C((e=t.pr)?5:-1,e),d(2),S(t.title)}}function ki(i,o){if(i&1&&(s(0,"div",34)(1,"div",39),m(2,"History"),l(),s(3,"table",40),Qe(4,Ri,8,6,"tr",null,_i),l()()),i&2){let e=u();d(4),We(e.events)}}function Si(i,o){if(i&1&&(s(0,"div",9),y(1,yi,3,4,"figure",26),s(2,"h2"),m(3),l(),s(4,"div",27)(5,"span",28),m(6),l(),y(7,Ci,2,3,"span",29)(8,vi,2,0,"span",30),l(),s(9,"div",31)(10,"remark",32),z(11,xi,3,4,"ng-template",33),l()(),y(12,ki,6,0,"div",34),l()),i&2){let e=o,t=u(2);d(),C(e.images.length?1:-1),d(2),S(e.title),d(2),re("--cat-hue",t.categoryHue(e.category)),d(),S(e.category),d(),C(e.since?7:8),d(3),E("processor",t.mdProcessor)("markdown",e.body),d(2),C(e.events.length?12:-1)}}function Mi(i,o){i&1&&(s(0,"div",5),m(1,"No matching features."),l())}function Fi(i,o){if(i&1){let e=P();s(0,"button",45),R("click",function(){g(e);let n=u(2);return w(n.query.set(""))}),s(1,"mat-icon"),m(2,"close"),l()()}}function Ti(i,o){if(i&1){let e=P();s(0,"th",46),R("click",function(){g(e);let n=u(2);return w(n.setSort("category"))})("keydown.enter",function(){g(e);let n=u(2);return w(n.setSort("category"))})("keydown.space",function(n){return g(e),u(2).setSort("category"),w(n.preventDefault())}),m(1," Category "),s(2,"mat-icon",47),m(3),l()()}if(i&2){let e=u(2);W("aria-sort",e.ariaSort("category")),d(3),S(e.sortIcon("category"))}}function Oi(i,o){if(i&1&&(s(0,"td",48)(1,"span",28),m(2),l()()),i&2){let e=o.$implicit,t=u(2);d(),re("--cat-hue",t.categoryHue(e.category)),d(),S(e.category)}}function Ei(i,o){if(i&1){let e=P();s(0,"th",46),R("click",function(){g(e);let n=u(2);return w(n.setSort("title"))})("keydown.enter",function(){g(e);let n=u(2);return w(n.setSort("title"))})("keydown.space",function(n){return g(e),u(2).setSort("title"),w(n.preventDefault())}),m(1," Feature "),s(2,"mat-icon",47),m(3),l()()}if(i&2){let e=u(2);W("aria-sort",e.ariaSort("title")),d(3),S(e.sortIcon("title"))}}function Pi(i,o){if(i&1&&(s(0,"td",48),m(1),l()),i&2){let e=o.$implicit;d(),S(e.title)}}function Ii(i,o){i&1&&(s(0,"th",49),m(1,"Status"),l())}function Ni(i,o){if(i&1&&(s(0,"span",51),m(1),l()),i&2){let e=u().$implicit;q("enhanced",e.latestKind==="enhanced"),d(),S(e.latestKind==="enhanced"?"Updated":"New")}}function Bi(i,o){if(i&1&&(s(0,"td",48),y(1,Ni,2,3,"span",50),l()),i&2){let e=o.$implicit;d(),C(e.latestKind?1:-1)}}function Vi(i,o){if(i&1){let e=P();s(0,"th",46),R("click",function(){g(e);let n=u(2);return w(n.setSort("since"))})("keydown.enter",function(){g(e);let n=u(2);return w(n.setSort("since"))})("keydown.space",function(n){return g(e),u(2).setSort("since"),w(n.preventDefault())}),m(1," Since "),s(2,"mat-icon",47),m(3),l()()}if(i&2){let e=u(2);W("aria-sort",e.ariaSort("since")),d(3),S(e.sortIcon("since"))}}function Ai(i,o){if(i&1&&(s(0,"td",48),m(1),l()),i&2){let e=o.$implicit;d(),S(e.since??"\u2014")}}function Hi(i,o){i&1&&J(0,"tr",52)}function zi(i,o){if(i&1){let e=P();s(0,"tr",53),R("click",function(){let n=g(e).$implicit,r=u(2);return w(r.select(n))}),l()}if(i&2){let e=o.$implicit,t=u(2);q("active",t.isActive(e))}}function Li(i,o){i&1&&(s(0,"div",5),m(1,"No matching features."),l())}function Ui(i,o){if(i&1){let e=P();s(0,"div",8),y(1,Si,13,9,"div",9)(2,Mi,2,0,"div",5),l(),s(3,"div",10)(4,"mat-form-field",11)(5,"mat-icon",12),m(6,"search"),l(),s(7,"input",13),R("ngModelChange",function(n){g(e);let r=u();return w(r.query.set(n))}),l(),y(8,Fi,3,0,"button",14),l(),s(9,"div",15)(10,"table",16),K(11,17),z(12,Ti,4,2,"th",18)(13,Oi,3,3,"td",19),Y(),K(14,20),z(15,Ei,4,2,"th",18)(16,Pi,2,1,"td",19),Y(),K(17,21),z(18,Ii,2,0,"th",22)(19,Bi,2,1,"td",19),Y(),K(20,23),z(21,Vi,4,2,"th",18)(22,Ai,2,1,"td",19),Y(),z(23,Hi,1,0,"tr",24)(24,zi,1,2,"tr",25),l(),y(25,Li,2,0,"div",5),l()()}if(i&2){let e,t=u();d(),C((e=t.activeFeature())?1:2,e),d(6),E("ngModel",t.query()),d(),C(t.query()?8:-1),d(2),E("dataSource",t.displayed()),d(13),E("matHeaderRowDef",t.columns)("matHeaderRowDefSticky",!0),d(),E("matRowDefColumns",t.columns),d(),C(t.displayed().length===0?25:-1)}}function ji(i,o){if(i&1){let e=P();s(0,"button",57),R("click",function(n){return g(e),u(2).stepViewer(-1),w(n.stopPropagation())}),s(1,"mat-icon"),m(2,"chevron_left"),l()(),s(3,"button",58),R("click",function(n){return g(e),u(2).stepViewer(1),w(n.stopPropagation())}),s(4,"mat-icon"),m(5,"chevron_right"),l()()}}function $i(i,o){if(i&1&&(s(0,"figcaption"),m(1),l()),i&2){let e=u();d(),S(e.alt)}}function qi(i,o){if(i&1){let e=P();s(0,"div",54),R("click",function(){g(e);let n=u();return w(n.closeViewer())}),s(1,"button",55),R("click",function(n){return g(e),u().closeViewer(),w(n.stopPropagation())}),s(2,"mat-icon"),m(3,"close"),l()(),y(4,ji,6,0),s(5,"figure",56),R("click",function(n){return n.stopPropagation()}),J(6,"img",36),y(7,$i,2,1,"figcaption"),l()()}if(i&2){let e=o,t=u();E("cdkTrapFocusAutoCapture",!0),W("aria-label",e.alt||"Image viewer"),d(4),C(t.viewerHasMultiple()?4:-1),d(2),E("src",t.resolveShot(e.url),ne)("alt",e.alt||""),d(),C(e.alt?7:-1)}}var ii=class i{mdProcessor=Tt;corpus=c(Bt);dialogRef=c(ct);host=c(B);loading=j(!0);query=j("");sortColumn=j("since");sortDirection=j("desc");selectedId=j(null);all=j([]);columns=["category","title","status","since"];displayed=ae(()=>Pt(Nt(this.all(),this.query()),this.sortColumn(),this.sortDirection()));activeFeature=ae(()=>{let o=this.displayed(),e=this.selectedId();return o.find(t=>t.id===e)??o[0]??null});viewerIndex=j(null);viewerImage=ae(()=>{let o=this.viewerIndex(),e=this.activeFeature()?.images??[];return o===null?null:e[o]??null});viewerHasMultiple=ae(()=>(this.activeFeature()?.images.length??0)>1);constructor(){qe(()=>{this.activeFeature(),this.resetDetailsScroll()})}ngOnInit(){return Be(this,null,function*(){this.dialogRef.keydownEvents().subscribe(o=>this.handleKey(o)),this.all.set(yield this.corpus.load()),this.loading.set(!1)})}setSort(o){this.sortColumn()===o?this.sortDirection.update(e=>e==="asc"?"desc":"asc"):(this.sortColumn.set(o),this.sortDirection.set(o==="since"?"desc":"asc"))}sortIcon(o){return this.sortColumn()!==o?"":this.sortDirection()==="asc"?"arrow_upward":"arrow_downward"}ariaSort(o){return this.sortColumn()!==o?"none":this.sortDirection()==="asc"?"ascending":"descending"}select(o){this.selectedId.set(o.id)}handleKey(o){if(this.viewerIndex()!==null){o.key==="ArrowLeft"?(o.preventDefault(),this.stepViewer(-1)):o.key==="ArrowRight"?(o.preventDefault(),this.stepViewer(1)):o.key==="Escape"&&(o.preventDefault(),this.closeViewer());return}if(o.key!=="ArrowDown"&&o.key!=="ArrowUp")return;let e=this.displayed();if(e.length===0)return;o.preventDefault();let t=e.findIndex(r=>r.id===this.activeFeature()?.id),n=It(t,o.key,e.length);this.selectedId.set(e[n].id),requestAnimationFrame(()=>this.revealRow(n))}resetDetailsScroll(){let o=this.host.nativeElement.querySelector(".details");o&&(o.scrollTop=0)}revealRow(o){let e=this.host.nativeElement,t=e.querySelector(".table-scroll"),n=e.querySelectorAll("tr[mat-row]")[o];if(!t||!n)return;let r=e.querySelector("tr[mat-header-row]")?.offsetHeight??0,a=t.getBoundingClientRect(),f=n.getBoundingClientRect(),h=a.top+r;f.top<h?t.scrollTop-=h-f.top:f.bottom>a.bottom&&(t.scrollTop+=f.bottom-a.bottom)}isActive(o){return this.activeFeature()?.id===o.id}sinceLabel(o){return o.since?`${o.latestKind==="enhanced"?"Updated":"New"} in ${o.since}`:"Unreleased"}categoryHue(o){return this.corpus.hueFor(o)}prUrl(o){return`https://github.com/SignalK/freeboard-sk/pull/${o}`}resolveShot(o){return/^(https?:|data:)/i.test(o)?o:`assets/features/${o.replace(/^\/+/,"")}`}openViewer(o){let t=(this.activeFeature()?.images??[]).findIndex(n=>n.url===o);t<0||(this.dialogRef.disableClose=!0,this.viewerIndex.set(t))}closeViewer(){this.viewerIndex.set(null),this.dialogRef.disableClose=!1}stepViewer(o){let e=this.activeFeature()?.images??[],t=this.viewerIndex();t===null||e.length===0||this.viewerIndex.set((t+o+e.length)%e.length)}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=V({type:i,selectors:[["fb-feature-browser"]],decls:14,vars:2,consts:[[1,"feature-browser"],[1,"icon-accent"],[1,"title"],[1,"spacer"],["mat-icon-button","","aria-label","Close","matTooltip","Close",3,"click"],[1,"empty"],["role","dialog","aria-modal","true","cdkTrapFocus","",1,"viewer",3,"cdkTrapFocusAutoCapture"],[1,"empty-icon"],[1,"details"],[1,"details-flow"],[1,"list"],["appearance","outline","subscriptSizing","dynamic",1,"search"],["matPrefix",""],["matInput","","placeholder","Search features",3,"ngModelChange","ngModel"],["matSuffix","","mat-icon-button","","aria-label","Clear search"],[1,"table-scroll"],["mat-table","",3,"dataSource"],["matColumnDef","category"],["mat-header-cell","","tabindex","0",3,"click","keydown.enter","keydown.space",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","title"],["matColumnDef","status"],["mat-header-cell","",4,"matHeaderCellDef"],["matColumnDef","since"],["mat-header-row","",4,"matHeaderRowDef","matHeaderRowDefSticky"],["mat-row","",3,"active","click",4,"matRowDef","matRowDefColumns"],["role","button","tabindex","0",1,"shot","lead"],[1,"meta"],[1,"cat-chip"],[1,"since-badge",3,"enhanced"],[1,"since"],[1,"body"],[3,"processor","markdown"],["remarkTemplate","image"],[1,"pr-history"],["role","button","tabindex","0",1,"shot","lead",3,"click","keydown.enter","keydown.space"],[3,"src","alt"],[1,"since-badge"],["role","button","tabindex","0",1,"shot",3,"click","keydown.enter","keydown.space"],[1,"pr-history-title"],[1,"pr-table"],[1,"pr-date"],[1,"pr-num"],["target","_blank","rel","noopener",3,"href"],[1,"pr-title"],["matSuffix","","mat-icon-button","","aria-label","Clear search",3,"click"],["mat-header-cell","","tabindex","0",3,"click","keydown.enter","keydown.space"],[1,"sort"],["mat-cell",""],["mat-header-cell",""],[1,"kind-badge",3,"enhanced"],[1,"kind-badge"],["mat-header-row",""],["mat-row","",3,"click"],["role","dialog","aria-modal","true","cdkTrapFocus","",1,"viewer",3,"click","cdkTrapFocusAutoCapture"],["mat-icon-button","","aria-label","Close image viewer",1,"viewer-btn","viewer-close",3,"click"],[1,"viewer-figure",3,"click"],["mat-icon-button","","aria-label","Previous image",1,"viewer-btn","viewer-prev",3,"click"],["mat-icon-button","","aria-label","Next image",1,"viewer-btn","viewer-next",3,"click"]],template:function(e,t){if(e&1&&(s(0,"div",0)(1,"mat-toolbar")(2,"mat-icon",1),m(3,"tips_and_updates"),l(),s(4,"span",2),m(5,"What's New"),l(),J(6,"span",3),s(7,"button",4),R("click",function(){return t.dialogRef.close()}),s(8,"mat-icon"),m(9,"close"),l()()(),y(10,pi,2,0,"div",5)(11,gi,5,0,"div",5)(12,Ui,26,8),y(13,qi,8,6,"div",6),l()),e&2){let n;d(10),C(t.loading()?10:t.all().length===0?11:12),d(3),C((n=t.viewerImage())?13:-1,n)}},dependencies:[yt,pt,gt,wt,dt,Ft,Mt,ft,ut,ht,mt,Rt,bt,Dt,xt,St,kt,ti,qt,Wt,Gt,Kt,Qt,Zt,Yt,Xt,Jt,ei,vt,Ct,lt,st,Et,Ot,Ze],styles:[".feature-browser[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;width:100%;height:72vh;max-height:680px}mat-toolbar[_ngcontent-%COMP%]{min-height:48px;height:48px;gap:8px;border-bottom:1px solid var(--mat-sys-outline-variant, #e0e0e0)}mat-toolbar[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{font-size:1rem;font-weight:500}.spacer[_ngcontent-%COMP%]{flex:1 1 auto}.details[_ngcontent-%COMP%]{flex:1 1 55%;overflow:auto;padding:20px 20px 16px;min-height:0}.details[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{margin:0 0 10px;font-size:1.3rem;font-weight:500;line-height:1.2}.details[_ngcontent-%COMP%] .meta[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;margin-bottom:14px}.details-flow[_ngcontent-%COMP%]{display:flow-root}.details[_ngcontent-%COMP%] .body[_ngcontent-%COMP%]{line-height:1.6}figure.shot[_ngcontent-%COMP%]{float:right;clear:right;width:46%;max-width:300px;margin:2px 0 12px 16px;cursor:pointer}figure.shot.lead[_ngcontent-%COMP%]{margin-top:0}figure.shot[_ngcontent-%COMP%]:focus-visible, th[mat-header-cell][_ngcontent-%COMP%]:focus-visible{outline:2px solid var(--mat-sys-primary, #415f91);outline-offset:2px}figure.shot[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{display:block;width:100%;height:auto;border-radius:8px;border:1px solid var(--mat-sys-outline-variant, #d8dae0);box-shadow:0 1px 6px #00000024}figure.shot[_ngcontent-%COMP%] figcaption[_ngcontent-%COMP%]{margin-top:4px;font-size:.75rem;font-style:italic;text-align:center;color:var(--mat-sys-on-surface-variant, #6b7079)}.details[_ngcontent-%COMP%] .body[_ngcontent-%COMP%] [_ngcontent-%COMP%]:first-child{margin-top:0}.cat-chip[_ngcontent-%COMP%]{display:inline-block;padding:2px 10px;border-radius:11px;font-size:.72rem;font-weight:500;line-height:1.5;white-space:nowrap;background:hsl(var(--cat-hue, 210) 58% 90%);color:hsl(var(--cat-hue, 210) 42% 30%)}.since-badge[_ngcontent-%COMP%]{font-size:.72rem;font-weight:500;padding:2px 10px;border-radius:11px;white-space:nowrap;background:#e4f4e8;color:#1b5e20}.since-badge.enhanced[_ngcontent-%COMP%]{background:#e2eefc;color:#0d47a1}.details[_ngcontent-%COMP%] .since[_ngcontent-%COMP%]{font-size:.8rem;opacity:.7}.pr-history[_ngcontent-%COMP%]{display:flow-root;margin-top:18px;padding-top:12px;border-top:1px solid var(--mat-sys-outline-variant, #e0e0e0)}.pr-history-title[_ngcontent-%COMP%]{font-size:.72rem;font-weight:600;letter-spacing:.02em;text-transform:uppercase;color:var(--mat-sys-on-surface-variant, #565a63);margin-bottom:6px}.pr-table[_ngcontent-%COMP%]{width:100%;border-collapse:collapse;font-size:.85rem}.pr-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:4px 10px 4px 0;vertical-align:top;border-bottom:1px solid var(--mat-sys-outline-variant, #f0f0f0)}.pr-table[_ngcontent-%COMP%] .pr-date[_ngcontent-%COMP%]{white-space:nowrap;width:1%;color:var(--mat-sys-on-surface-variant, #6b7079)}.pr-table[_ngcontent-%COMP%] .pr-num[_ngcontent-%COMP%]{white-space:nowrap;width:1%}.pr-table[_ngcontent-%COMP%] .pr-num[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:var(--mat-sys-primary, #415f91);text-decoration:none;font-weight:500}.pr-table[_ngcontent-%COMP%] .pr-num[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{text-decoration:underline}.pr-table[_ngcontent-%COMP%] .pr-title[_ngcontent-%COMP%]{width:100%}.list[_ngcontent-%COMP%]{flex:1 1 45%;display:flex;flex-direction:column;min-height:0;border-top:1px solid var(--mat-sys-outline-variant, #e0e0e0)}.list[_ngcontent-%COMP%] .search[_ngcontent-%COMP%]{margin:8px 14px 0}.list[_ngcontent-%COMP%] .search[_ngcontent-%COMP%] .mat-mdc-text-field-wrapper{padding-top:0;padding-bottom:0}.list[_ngcontent-%COMP%] .search[_ngcontent-%COMP%] .mat-mdc-form-field-infix{min-height:38px;padding-top:7px;padding-bottom:7px}.list[_ngcontent-%COMP%] .search[_ngcontent-%COMP%] input.mat-mdc-input-element{font-size:.875rem}.table-scroll[_ngcontent-%COMP%]{flex:1 1 auto;overflow:auto}table[_ngcontent-%COMP%]{width:100%;background:transparent}tr[mat-row][_ngcontent-%COMP%], tr[mat-header-row][_ngcontent-%COMP%]{height:42px}td[mat-cell][_ngcontent-%COMP%], th[mat-header-cell][_ngcontent-%COMP%]{padding-top:4px;padding-bottom:4px;border-bottom-color:var(--mat-sys-outline-variant, #eee)}th[mat-header-cell][_ngcontent-%COMP%]{cursor:pointer;-webkit-user-select:none;user-select:none;white-space:nowrap;font-weight:600;font-size:.72rem;letter-spacing:.02em;text-transform:uppercase;color:var(--mat-sys-on-surface-variant, #565a63);background-color:var(--mat-sys-surface, #fff)}.sort[_ngcontent-%COMP%]{font-size:16px;height:16px;width:16px;vertical-align:middle;opacity:.7}tr[mat-row][_ngcontent-%COMP%]{cursor:pointer;transition:background-color .12s ease}tr[mat-row][_ngcontent-%COMP%]:hover td[_ngcontent-%COMP%]{background:#415f9112}tr[mat-row].active[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{background:var(--mat-sys-primary-container, #d7e2ff);color:var(--mat-sys-on-primary-container, #274777);font-weight:500}tr[mat-row].active[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:first-child{box-shadow:inset 3px 0 0 0 var(--mat-sys-primary, #415f91)}.kind-badge[_ngcontent-%COMP%]{display:inline-block;padding:1px 9px;border-radius:10px;font-size:.7rem;font-weight:500;white-space:nowrap;background:#e4f4e8;color:#1b5e20}.kind-badge.enhanced[_ngcontent-%COMP%]{background:#e2eefc;color:#0d47a1}.empty[_ngcontent-%COMP%]{padding:32px 16px;text-align:center;opacity:.7}.empty[_ngcontent-%COMP%] .empty-icon[_ngcontent-%COMP%]{font-size:40px;height:40px;width:40px;opacity:.5}.viewer[_ngcontent-%COMP%]{position:absolute;inset:0;z-index:1000;display:flex;align-items:center;justify-content:center;padding:44px;background:#000000d1}.viewer-figure[_ngcontent-%COMP%]{margin:0;max-width:100%;max-height:100%;display:flex;flex-direction:column;align-items:center}.viewer-figure[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:100%;max-height:78vh;object-fit:contain;border-radius:4px;box-shadow:0 6px 28px #0000008c}.viewer-figure[_ngcontent-%COMP%] figcaption[_ngcontent-%COMP%]{margin-top:12px;color:#fff;font-size:.85rem;text-align:center}.viewer-btn[_ngcontent-%COMP%]{position:absolute;color:#fff}.viewer-close[_ngcontent-%COMP%]{top:6px;right:6px}.viewer-prev[_ngcontent-%COMP%]{top:50%;left:6px;transform:translateY(-50%)}.viewer-next[_ngcontent-%COMP%]{top:50%;right:6px;transform:translateY(-50%)}"]})};export{ii as FeatureBrowserDialog};
181
+ `],encapsulation:2})}return n})(),Qt=(()=>{class n extends ge{static \u0275fac=(()=>{let e;return function(i){return(e||(e=O(n)))(i||n)}})();static \u0275dir=p({type:n,selectors:[["","matCellDef",""]],features:[I([{provide:ge,useExisting:n}]),x]})}return n})(),Wt=(()=>{class n extends we{static \u0275fac=(()=>{let e;return function(i){return(e||(e=O(n)))(i||n)}})();static \u0275dir=p({type:n,selectors:[["","matHeaderCellDef",""]],features:[I([{provide:we,useExisting:n}]),x]})}return n})();var Kt=(()=>{class n extends ne{get name(){return this._name}set name(e){this._setNameInput(e)}_updateColumnCssClassName(){super._updateColumnCssClassName(),this._columnCssClassName.push(`mat-column-${this.cssClassFriendlyName}`)}static \u0275fac=(()=>{let e;return function(i){return(e||(e=O(n)))(i||n)}})();static \u0275dir=p({type:n,selectors:[["","matColumnDef",""]],inputs:{name:[0,"matColumnDef","name"]},features:[I([{provide:ne,useExisting:n}]),x]})}return n})(),Yt=(()=>{class n extends Lt{static \u0275fac=(()=>{let e;return function(i){return(e||(e=O(n)))(i||n)}})();static \u0275dir=p({type:n,selectors:[["mat-header-cell"],["th","mat-header-cell",""]],hostAttrs:["role","columnheader",1,"mat-mdc-header-cell","mdc-data-table__header-cell"],features:[x]})}return n})();var Xt=(()=>{class n extends Ut{static \u0275fac=(()=>{let e;return function(i){return(e||(e=O(n)))(i||n)}})();static \u0275dir=p({type:n,selectors:[["mat-cell"],["td","mat-cell",""]],hostAttrs:[1,"mat-mdc-cell","mdc-data-table__cell"],features:[x]})}return n})();var Gt=(()=>{class n extends le{static \u0275fac=(()=>{let e;return function(i){return(e||(e=O(n)))(i||n)}})();static \u0275dir=p({type:n,selectors:[["","matHeaderRowDef",""]],inputs:{columns:[0,"matHeaderRowDef","columns"],sticky:[2,"matHeaderRowDefSticky","sticky",A]},features:[I([{provide:le,useExisting:n}]),x]})}return n})();var Zt=(()=>{class n extends ye{static \u0275fac=(()=>{let e;return function(i){return(e||(e=O(n)))(i||n)}})();static \u0275dir=p({type:n,selectors:[["","matRowDef",""]],inputs:{columns:[0,"matRowDefColumns","columns"],when:[0,"matRowDefWhen","when"]},features:[I([{provide:ye,useExisting:n}]),x]})}return n})(),Jt=(()=>{class n extends Re{static \u0275fac=(()=>{let e;return function(i){return(e||(e=O(n)))(i||n)}})();static \u0275cmp=V({type:n,selectors:[["mat-header-row"],["tr","mat-header-row",""]],hostAttrs:["role","row",1,"mat-mdc-header-row","mdc-data-table__header-row"],exportAs:["matHeaderRow"],features:[I([{provide:Re,useExisting:n}]),x],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(t,i){t&1&&R(0,0)},dependencies:[X],encapsulation:2})}return n})();var en=(()=>{class n extends Se{static \u0275fac=(()=>{let e;return function(i){return(e||(e=O(n)))(i||n)}})();static \u0275cmp=V({type:n,selectors:[["mat-row"],["tr","mat-row",""]],hostAttrs:["role","row",1,"mat-mdc-row","mdc-data-table__row"],exportAs:["matRow"],features:[I([{provide:Se,useExisting:n}]),x],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(t,i){t&1&&R(0,0)},dependencies:[X],encapsulation:2})}return n})();var tn=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275mod=me({type:n});static \u0275inj=de({imports:[$t,it]})}return n})();var pn=(n,o)=>o.pr;function gn(n,o){n&1&&(s(0,"div",5),f(1,"Loading\u2026"),l())}function wn(n,o){n&1&&(s(0,"div",5)(1,"mat-icon",7),f(2,"tips_and_updates"),l(),s(3,"p"),f(4,"No features have been documented yet."),l()())}function yn(n,o){if(n&1&&(s(0,"figcaption"),f(1),l()),n&2){let e=u(2);d(),S(e.images[0].alt)}}function Cn(n,o){if(n&1){let e=P();s(0,"figure",35),k("click",function(){g(e);let i=u(),r=u(2);return w(r.openViewer(i.images[0].url))})("keydown.enter",function(){g(e);let i=u(),r=u(2);return w(r.openViewer(i.images[0].url))})("keydown.space",function(i){g(e);let r=u();return u(2).openViewer(r.images[0].url),w(i.preventDefault())}),J(1,"img",36),y(2,yn,2,1,"figcaption"),l()}if(n&2){let e=u(),t=u(2);W("aria-label","Enlarge "+(e.images[0].alt||"screenshot")),d(),E("src",t.resolveShot(e.images[0].url),ie)("alt",e.images[0].alt||""),d(),C(e.images[0].alt?2:-1)}}function vn(n,o){if(n&1&&(s(0,"span",37),f(1),l()),n&2){let e=u(),t=u(2);q("enhanced",e.latestKind==="enhanced"),d(),ee(" ",t.sinceLabel(e)," ")}}function Dn(n,o){n&1&&(s(0,"span",30),f(1,"Unreleased"),l())}function bn(n,o){if(n&1&&(s(0,"figcaption"),f(1),l()),n&2){let e=u().$implicit;d(),S(e.alt)}}function xn(n,o){if(n&1){let e=P();s(0,"figure",38),k("click",function(){let i=g(e).$implicit,r=u(3);return w(r.openViewer(i.url))})("keydown.enter",function(){let i=g(e).$implicit,r=u(3);return w(r.openViewer(i.url))})("keydown.space",function(i){let r=g(e).$implicit;return u(3).openViewer(r.url),w(i.preventDefault())}),J(1,"img",36),y(2,bn,2,1,"figcaption"),l()}if(n&2){let e=o.$implicit,t=u(3);W("aria-label","Enlarge "+(e.alt||"screenshot")),d(),E("src",t.resolveShot(e.url),ie)("alt",e.alt||""),d(),C(e.alt?2:-1)}}function kn(n,o){if(n&1&&(s(0,"a",43),f(1),l()),n&2){let e=o,t=u(5);E("href",t.prUrl(e),ie),d(),ee("#",e)}}function Rn(n,o){if(n&1&&(s(0,"tr")(1,"td",41),f(2),Ke(3,"date"),l(),s(4,"td",42),y(5,kn,2,2,"a",43),l(),s(6,"td",44),f(7),l()()),n&2){let e,t=o.$implicit;d(2),ee(" ",t.date?Ye(3,3,t.date,"mediumDate"):""," "),d(3),C((e=t.pr)?5:-1,e),d(2),S(t.title)}}function Sn(n,o){if(n&1&&(s(0,"div",34)(1,"div",39),f(2,"History"),l(),s(3,"table",40),Qe(4,Rn,8,6,"tr",null,pn),l()()),n&2){let e=u();d(4),We(e.events)}}function Mn(n,o){if(n&1&&(s(0,"div",9),y(1,Cn,3,4,"figure",26),s(2,"h2"),f(3),l(),s(4,"div",27)(5,"span",28),f(6),l(),y(7,vn,2,3,"span",29)(8,Dn,2,0,"span",30),l(),s(9,"div",31)(10,"remark",32),z(11,xn,3,4,"ng-template",33),l()(),y(12,Sn,6,0,"div",34),l()),n&2){let e=o,t=u(2);d(),C(e.images.length?1:-1),d(2),S(e.title),d(2),re("--cat-hue",t.categoryHue(e.category)),d(),S(e.category),d(),C(e.since?7:8),d(3),E("processor",t.mdProcessor)("markdown",e.body),d(2),C(e.events.length?12:-1)}}function Fn(n,o){n&1&&(s(0,"div",5),f(1,"No matching features."),l())}function Tn(n,o){if(n&1){let e=P();s(0,"button",45),k("click",function(){g(e);let i=u(2);return w(i.query.set(""))}),s(1,"mat-icon"),f(2,"close"),l()()}}function On(n,o){if(n&1){let e=P();s(0,"th",46),k("click",function(){g(e);let i=u(2);return w(i.setSort("category"))})("keydown.enter",function(){g(e);let i=u(2);return w(i.setSort("category"))})("keydown.space",function(i){return g(e),u(2).setSort("category"),w(i.preventDefault())}),f(1," Category "),s(2,"mat-icon",47),f(3),l()()}if(n&2){let e=u(2);W("aria-sort",e.ariaSort("category")),d(3),S(e.sortIcon("category"))}}function En(n,o){if(n&1&&(s(0,"td",48)(1,"span",28),f(2),l()()),n&2){let e=o.$implicit,t=u(2);d(),re("--cat-hue",t.categoryHue(e.category)),d(),S(e.category)}}function Pn(n,o){if(n&1){let e=P();s(0,"th",46),k("click",function(){g(e);let i=u(2);return w(i.setSort("title"))})("keydown.enter",function(){g(e);let i=u(2);return w(i.setSort("title"))})("keydown.space",function(i){return g(e),u(2).setSort("title"),w(i.preventDefault())}),f(1," Feature "),s(2,"mat-icon",47),f(3),l()()}if(n&2){let e=u(2);W("aria-sort",e.ariaSort("title")),d(3),S(e.sortIcon("title"))}}function In(n,o){if(n&1&&(s(0,"td",48),f(1),l()),n&2){let e=o.$implicit;d(),S(e.title)}}function Nn(n,o){n&1&&(s(0,"th",49),f(1,"Status"),l())}function Bn(n,o){if(n&1&&(s(0,"span",51),f(1),l()),n&2){let e=u().$implicit;q("enhanced",e.latestKind==="enhanced"),d(),S(e.latestKind==="enhanced"?"Updated":"New")}}function Vn(n,o){if(n&1&&(s(0,"td",48),y(1,Bn,2,3,"span",50),l()),n&2){let e=o.$implicit;d(),C(e.latestKind?1:-1)}}function An(n,o){if(n&1){let e=P();s(0,"th",46),k("click",function(){g(e);let i=u(2);return w(i.setSort("since"))})("keydown.enter",function(){g(e);let i=u(2);return w(i.setSort("since"))})("keydown.space",function(i){return g(e),u(2).setSort("since"),w(i.preventDefault())}),f(1," Since "),s(2,"mat-icon",47),f(3),l()()}if(n&2){let e=u(2);W("aria-sort",e.ariaSort("since")),d(3),S(e.sortIcon("since"))}}function Hn(n,o){if(n&1&&(s(0,"td",48),f(1),l()),n&2){let e=o.$implicit;d(),S(e.since??"\u2014")}}function zn(n,o){n&1&&J(0,"tr",52)}function Ln(n,o){if(n&1){let e=P();s(0,"tr",53),k("click",function(){let i=g(e).$implicit,r=u(2);return w(r.select(i))}),l()}if(n&2){let e=o.$implicit,t=u(2);q("active",t.isActive(e))}}function Un(n,o){n&1&&(s(0,"div",5),f(1,"No matching features."),l())}function jn(n,o){if(n&1){let e=P();s(0,"div",8),y(1,Mn,13,9,"div",9)(2,Fn,2,0,"div",5),l(),s(3,"div",10)(4,"mat-form-field",11)(5,"mat-icon",12),f(6,"search"),l(),s(7,"input",13),k("ngModelChange",function(i){g(e);let r=u();return w(r.query.set(i))}),l(),y(8,Tn,3,0,"button",14),l(),s(9,"div",15)(10,"table",16),K(11,17),z(12,On,4,2,"th",18)(13,En,3,3,"td",19),Y(),K(14,20),z(15,Pn,4,2,"th",18)(16,In,2,1,"td",19),Y(),K(17,21),z(18,Nn,2,0,"th",22)(19,Vn,2,1,"td",19),Y(),K(20,23),z(21,An,4,2,"th",18)(22,Hn,2,1,"td",19),Y(),z(23,zn,1,0,"tr",24)(24,Ln,1,2,"tr",25),l(),y(25,Un,2,0,"div",5),l()()}if(n&2){let e,t=u();d(),C((e=t.activeFeature())?1:2,e),d(6),E("ngModel",t.query()),d(),C(t.query()?8:-1),d(2),E("dataSource",t.displayed()),d(13),E("matHeaderRowDef",t.columns)("matHeaderRowDefSticky",!0),d(),E("matRowDefColumns",t.columns),d(),C(t.displayed().length===0?25:-1)}}function $n(n,o){if(n&1){let e=P();s(0,"button",57),k("click",function(i){return g(e),u(2).stepViewer(-1),w(i.stopPropagation())}),s(1,"mat-icon"),f(2,"chevron_left"),l()(),s(3,"button",58),k("click",function(i){return g(e),u(2).stepViewer(1),w(i.stopPropagation())}),s(4,"mat-icon"),f(5,"chevron_right"),l()()}}function qn(n,o){if(n&1&&(s(0,"figcaption"),f(1),l()),n&2){let e=u();d(),S(e.alt)}}function Qn(n,o){if(n&1){let e=P();s(0,"div",54),k("click",function(){g(e);let i=u();return w(i.closeViewer())}),s(1,"button",55),k("click",function(i){return g(e),u().closeViewer(),w(i.stopPropagation())}),s(2,"mat-icon"),f(3,"close"),l()(),y(4,$n,6,0),s(5,"figure",56),k("click",function(i){return i.stopPropagation()}),J(6,"img",36),y(7,qn,2,1,"figcaption"),l()()}if(n&2){let e=o,t=u();E("cdkTrapFocusAutoCapture",!0),W("aria-label",e.alt||"Image viewer"),d(4),C(t.viewerHasMultiple()?4:-1),d(2),E("src",t.resolveShot(e.url),ie)("alt",e.alt||""),d(),C(e.alt?7:-1)}}var nn=class n{mdProcessor=Tt;corpus=c(Bt);dialogRef=c(ct);host=c(B);loading=j(!0);query=j("");sortColumn=j("since");sortDirection=j("desc");selectedId=j(null);all=j([]);columns=["category","title","status","since"];displayed=ae(()=>Pt(Nt(this.all(),this.query()),this.sortColumn(),this.sortDirection()));activeFeature=ae(()=>{let o=this.displayed(),e=this.selectedId();return o.find(t=>t.id===e)??o[0]??null});viewerIndex=j(null);viewerImage=ae(()=>{let o=this.viewerIndex(),e=this.activeFeature()?.images??[];return o===null?null:e[o]??null});viewerHasMultiple=ae(()=>(this.activeFeature()?.images.length??0)>1);constructor(){qe(()=>{this.activeFeature(),this.resetDetailsScroll()})}ngOnInit(){return Be(this,null,function*(){this.dialogRef.keydownEvents().subscribe(o=>this.handleKey(o)),this.all.set(yield this.corpus.load()),this.loading.set(!1)})}setSort(o){this.sortColumn()===o?this.sortDirection.update(e=>e==="asc"?"desc":"asc"):(this.sortColumn.set(o),this.sortDirection.set(o==="since"?"desc":"asc"))}sortIcon(o){return this.sortColumn()!==o?"":this.sortDirection()==="asc"?"arrow_upward":"arrow_downward"}ariaSort(o){return this.sortColumn()!==o?"none":this.sortDirection()==="asc"?"ascending":"descending"}select(o){this.selectedId.set(o.id)}handleKey(o){if(this.viewerIndex()!==null){o.key==="ArrowLeft"?(o.preventDefault(),this.stepViewer(-1)):o.key==="ArrowRight"?(o.preventDefault(),this.stepViewer(1)):o.key==="Escape"&&(o.preventDefault(),this.closeViewer());return}if(o.key!=="ArrowDown"&&o.key!=="ArrowUp")return;let e=this.displayed();if(e.length===0)return;o.preventDefault();let t=e.findIndex(r=>r.id===this.activeFeature()?.id),i=It(t,o.key,e.length);this.selectedId.set(e[i].id),requestAnimationFrame(()=>this.revealRow(i))}resetDetailsScroll(){let o=this.host.nativeElement.querySelector(".details");o&&(o.scrollTop=0)}revealRow(o){let e=this.host.nativeElement,t=e.querySelector(".table-scroll"),i=e.querySelectorAll("tr[mat-row]")[o];if(!t||!i)return;let r=e.querySelector("tr[mat-header-row]")?.offsetHeight??0,a=t.getBoundingClientRect(),m=i.getBoundingClientRect(),h=a.top+r;m.top<h?t.scrollTop-=h-m.top:m.bottom>a.bottom&&(t.scrollTop+=m.bottom-a.bottom)}isActive(o){return this.activeFeature()?.id===o.id}sinceLabel(o){return o.since?`${o.latestKind==="enhanced"?"Updated":"New"} in ${o.since}`:"Unreleased"}categoryHue(o){return this.corpus.hueFor(o)}prUrl(o){return`https://github.com/SignalK/freeboard-sk/pull/${o}`}resolveShot(o){return/^(https?:|data:)/i.test(o)?o:`assets/features/${o.replace(/^\/+/,"")}`}openViewer(o){let t=(this.activeFeature()?.images??[]).findIndex(i=>i.url===o);t<0||(this.dialogRef.disableClose=!0,this.viewerIndex.set(t))}closeViewer(){this.viewerIndex.set(null),this.dialogRef.disableClose=!1}stepViewer(o){let e=this.activeFeature()?.images??[],t=this.viewerIndex();t===null||e.length===0||this.viewerIndex.set((t+o+e.length)%e.length)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=V({type:n,selectors:[["fb-feature-browser"]],decls:14,vars:2,consts:[[1,"feature-browser"],[1,"icon-accent"],[1,"title"],[1,"spacer"],["mat-icon-button","","aria-label","Close","matTooltip","Close",3,"click"],[1,"empty"],["role","dialog","aria-modal","true","cdkTrapFocus","",1,"viewer",3,"cdkTrapFocusAutoCapture"],[1,"empty-icon"],[1,"details"],[1,"details-flow"],[1,"list"],["appearance","outline","subscriptSizing","dynamic",1,"search"],["matPrefix",""],["matInput","","placeholder","Search features",3,"ngModelChange","ngModel"],["matSuffix","","mat-icon-button","","aria-label","Clear search"],[1,"table-scroll"],["mat-table","",3,"dataSource"],["matColumnDef","category"],["mat-header-cell","","tabindex","0",3,"click","keydown.enter","keydown.space",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","title"],["matColumnDef","status"],["mat-header-cell","",4,"matHeaderCellDef"],["matColumnDef","since"],["mat-header-row","",4,"matHeaderRowDef","matHeaderRowDefSticky"],["mat-row","",3,"active","click",4,"matRowDef","matRowDefColumns"],["role","button","tabindex","0",1,"shot","lead"],[1,"meta"],[1,"cat-chip"],[1,"since-badge",3,"enhanced"],[1,"since"],[1,"body"],[3,"processor","markdown"],["remarkTemplate","image"],[1,"pr-history"],["role","button","tabindex","0",1,"shot","lead",3,"click","keydown.enter","keydown.space"],[3,"src","alt"],[1,"since-badge"],["role","button","tabindex","0",1,"shot",3,"click","keydown.enter","keydown.space"],[1,"pr-history-title"],[1,"pr-table"],[1,"pr-date"],[1,"pr-num"],["target","_blank","rel","noopener",3,"href"],[1,"pr-title"],["matSuffix","","mat-icon-button","","aria-label","Clear search",3,"click"],["mat-header-cell","","tabindex","0",3,"click","keydown.enter","keydown.space"],[1,"sort"],["mat-cell",""],["mat-header-cell",""],[1,"kind-badge",3,"enhanced"],[1,"kind-badge"],["mat-header-row",""],["mat-row","",3,"click"],["role","dialog","aria-modal","true","cdkTrapFocus","",1,"viewer",3,"click","cdkTrapFocusAutoCapture"],["mat-icon-button","","aria-label","Close image viewer",1,"viewer-btn","viewer-close",3,"click"],[1,"viewer-figure",3,"click"],["mat-icon-button","","aria-label","Previous image",1,"viewer-btn","viewer-prev",3,"click"],["mat-icon-button","","aria-label","Next image",1,"viewer-btn","viewer-next",3,"click"]],template:function(e,t){if(e&1&&(s(0,"div",0)(1,"mat-toolbar")(2,"mat-icon",1),f(3,"tips_and_updates"),l(),s(4,"span",2),f(5,"What's New"),l(),J(6,"span",3),s(7,"button",4),k("click",function(){return t.dialogRef.close()}),s(8,"mat-icon"),f(9,"close"),l()()(),y(10,gn,2,0,"div",5)(11,wn,5,0,"div",5)(12,jn,26,8),y(13,Qn,8,6,"div",6),l()),e&2){let i;d(10),C(t.loading()?10:t.all().length===0?11:12),d(3),C((i=t.viewerImage())?13:-1,i)}},dependencies:[yt,pt,gt,wt,dt,Ft,Mt,mt,ut,ht,ft,kt,xt,Dt,bt,St,Rt,tn,qt,Wt,Gt,Kt,Qt,Zt,Yt,Xt,Jt,en,vt,Ct,lt,st,Et,Ot,Ze],styles:[".feature-browser[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;width:100%;height:72vh;max-height:680px}mat-toolbar[_ngcontent-%COMP%]{min-height:48px;height:48px;gap:8px;border-bottom:1px solid var(--mat-sys-outline-variant, #e0e0e0)}mat-toolbar[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{font-size:1rem;font-weight:500}.spacer[_ngcontent-%COMP%]{flex:1 1 auto}.details[_ngcontent-%COMP%]{flex:1 1 55%;overflow:auto;padding:20px 20px 16px;min-height:0}.details[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{margin:0 0 10px;font-size:1.3rem;font-weight:500;line-height:1.2}.details[_ngcontent-%COMP%] .meta[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;margin-bottom:14px}.details-flow[_ngcontent-%COMP%]{display:flow-root}.details[_ngcontent-%COMP%] .body[_ngcontent-%COMP%]{line-height:1.6}figure.shot[_ngcontent-%COMP%]{float:right;clear:right;width:46%;max-width:300px;margin:2px 0 12px 16px;cursor:pointer}figure.shot.lead[_ngcontent-%COMP%]{margin-top:0}figure.shot[_ngcontent-%COMP%]:focus-visible, th[mat-header-cell][_ngcontent-%COMP%]:focus-visible{outline:2px solid var(--mat-sys-primary, #415f91);outline-offset:2px}figure.shot[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{display:block;width:100%;height:auto;border-radius:8px;border:1px solid var(--mat-sys-outline-variant, #d8dae0);box-shadow:0 1px 6px #00000024}figure.shot[_ngcontent-%COMP%] figcaption[_ngcontent-%COMP%]{margin-top:4px;font-size:.75rem;font-style:italic;text-align:center;color:var(--mat-sys-on-surface-variant, #6b7079)}.details[_ngcontent-%COMP%] .body[_ngcontent-%COMP%] [_ngcontent-%COMP%]:first-child{margin-top:0}.cat-chip[_ngcontent-%COMP%]{display:inline-block;padding:2px 10px;border-radius:11px;font-size:.72rem;font-weight:500;line-height:1.5;white-space:nowrap;background:hsl(var(--cat-hue, 210) 58% 90%);color:hsl(var(--cat-hue, 210) 42% 30%)}.since-badge[_ngcontent-%COMP%]{font-size:.72rem;font-weight:500;padding:2px 10px;border-radius:11px;white-space:nowrap;background:#e4f4e8;color:#1b5e20}.since-badge.enhanced[_ngcontent-%COMP%]{background:#e2eefc;color:#0d47a1}.details[_ngcontent-%COMP%] .since[_ngcontent-%COMP%]{font-size:.8rem;opacity:.7}.pr-history[_ngcontent-%COMP%]{display:flow-root;margin-top:18px;padding-top:12px;border-top:1px solid var(--mat-sys-outline-variant, #e0e0e0)}.pr-history-title[_ngcontent-%COMP%]{font-size:.72rem;font-weight:600;letter-spacing:.02em;text-transform:uppercase;color:var(--mat-sys-on-surface-variant, #565a63);margin-bottom:6px}.pr-table[_ngcontent-%COMP%]{width:100%;border-collapse:collapse;font-size:.85rem}.pr-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:4px 10px 4px 0;vertical-align:top;border-bottom:1px solid var(--mat-sys-outline-variant, #f0f0f0)}.pr-table[_ngcontent-%COMP%] .pr-date[_ngcontent-%COMP%]{white-space:nowrap;width:1%;color:var(--mat-sys-on-surface-variant, #6b7079)}.pr-table[_ngcontent-%COMP%] .pr-num[_ngcontent-%COMP%]{white-space:nowrap;width:1%}.pr-table[_ngcontent-%COMP%] .pr-num[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:var(--mat-sys-primary, #415f91);text-decoration:none;font-weight:500}.pr-table[_ngcontent-%COMP%] .pr-num[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{text-decoration:underline}.pr-table[_ngcontent-%COMP%] .pr-title[_ngcontent-%COMP%]{width:100%}.list[_ngcontent-%COMP%]{flex:1 1 45%;display:flex;flex-direction:column;min-height:0;border-top:1px solid var(--mat-sys-outline-variant, #e0e0e0)}.list[_ngcontent-%COMP%] .search[_ngcontent-%COMP%]{margin:8px 14px 0}.list[_ngcontent-%COMP%] .search[_ngcontent-%COMP%] .mat-mdc-text-field-wrapper{padding-top:0;padding-bottom:0}.list[_ngcontent-%COMP%] .search[_ngcontent-%COMP%] .mat-mdc-form-field-infix{min-height:38px;padding-top:7px;padding-bottom:7px}.list[_ngcontent-%COMP%] .search[_ngcontent-%COMP%] input.mat-mdc-input-element{font-size:.875rem}.table-scroll[_ngcontent-%COMP%]{flex:1 1 auto;overflow:auto}table[_ngcontent-%COMP%]{width:100%;background:transparent}tr[mat-row][_ngcontent-%COMP%], tr[mat-header-row][_ngcontent-%COMP%]{height:42px}td[mat-cell][_ngcontent-%COMP%], th[mat-header-cell][_ngcontent-%COMP%]{padding-top:4px;padding-bottom:4px;border-bottom-color:var(--mat-sys-outline-variant, #eee)}th[mat-header-cell][_ngcontent-%COMP%]{cursor:pointer;-webkit-user-select:none;user-select:none;white-space:nowrap;font-weight:600;font-size:.72rem;letter-spacing:.02em;text-transform:uppercase;color:var(--mat-sys-on-surface-variant, #565a63);background-color:var(--mat-sys-surface, #fff)}.sort[_ngcontent-%COMP%]{font-size:16px;height:16px;width:16px;vertical-align:middle;opacity:.7}tr[mat-row][_ngcontent-%COMP%]{cursor:pointer;transition:background-color .12s ease}tr[mat-row][_ngcontent-%COMP%]:hover td[_ngcontent-%COMP%]{background:#415f9112}tr[mat-row].active[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{background:var(--mat-sys-primary-container, #d7e2ff);color:var(--mat-sys-on-primary-container, #274777);font-weight:500}tr[mat-row].active[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:first-child{box-shadow:inset 3px 0 0 0 var(--mat-sys-primary, #415f91)}.kind-badge[_ngcontent-%COMP%]{display:inline-block;padding:1px 9px;border-radius:10px;font-size:.7rem;font-weight:500;white-space:nowrap;background:#e4f4e8;color:#1b5e20}.kind-badge.enhanced[_ngcontent-%COMP%]{background:#e2eefc;color:#0d47a1}.empty[_ngcontent-%COMP%]{padding:32px 16px;text-align:center;opacity:.7}.empty[_ngcontent-%COMP%] .empty-icon[_ngcontent-%COMP%]{font-size:40px;height:40px;width:40px;opacity:.5}.viewer[_ngcontent-%COMP%]{position:absolute;inset:0;z-index:1000;display:flex;align-items:center;justify-content:center;padding:44px;background:#000000d1}.viewer-figure[_ngcontent-%COMP%]{margin:0;max-width:100%;max-height:100%;display:flex;flex-direction:column;align-items:center}.viewer-figure[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:100%;max-height:78vh;object-fit:contain;border-radius:4px;box-shadow:0 6px 28px #0000008c}.viewer-figure[_ngcontent-%COMP%] figcaption[_ngcontent-%COMP%]{margin-top:12px;color:#fff;font-size:.85rem;text-align:center}.viewer-btn[_ngcontent-%COMP%]{position:absolute;color:#fff}.viewer-close[_ngcontent-%COMP%]{top:6px;right:6px}.viewer-prev[_ngcontent-%COMP%]{top:50%;left:6px;transform:translateY(-50%)}.viewer-next[_ngcontent-%COMP%]{top:50%;right:6px;transform:translateY(-50%)}.dark-theme[_nghost-%COMP%], .dark-theme [_nghost-%COMP%]{--mat-sys-surface: #181211;--mat-sys-on-surface: #ede0dd;--mat-sys-on-surface-variant: #cabfbc;--mat-sys-outline-variant: #4a4340;--mat-sys-primary: #adc6ff;--mat-sys-primary-container: #2b3b57;--mat-sys-on-primary-container: #d7e2ff}.dark-theme[_nghost-%COMP%] .feature-browser[_ngcontent-%COMP%], .dark-theme [_nghost-%COMP%] .feature-browser[_ngcontent-%COMP%]{color:var(--mat-sys-on-surface)}.dark-theme[_nghost-%COMP%] .details[_ngcontent-%COMP%] .body[_ngcontent-%COMP%] a, .dark-theme [_nghost-%COMP%] .details[_ngcontent-%COMP%] .body[_ngcontent-%COMP%] a{color:var(--mat-sys-primary)}"]})};export{nn as FeatureBrowserDialog};
@@ -1 +1 @@
1
- import{ta as z}from"./chunk-OTJKIGKW.js";import"./chunk-IURS3QQO.js";import"./chunk-4BXCQ655.js";import"./chunk-LXTM3LEN.js";import"./chunk-IYNTZMNB.js";import"./chunk-3CRIFTHA.js";import"./chunk-UF7LOYCE.js";import"./chunk-XHEJEIFO.js";import"./chunk-I3OUN6B4.js";import"./chunk-WX7YZB5N.js";import{Dd as C,Ea as m,Ed as w,Fa as d,Gd as S,Hd as R,Id as E,Jd as O,Ka as _,La as a,Ma as o,Na as v,Q as f,R as u,Rd as T,Td as A,Ua as D,Wa as p,Wd as k,Ya as g,Yd as j,Zd as V,ab as b,bb as x,cb as y,ha as h,ja as s,kc as I,lb as r,mb as M,oa as c,ra as P}from"./chunk-4BSA3TDQ.js";import"./chunk-EQVTEUXC.js";var U=["frame"];function Q(n,e){if(n&1&&(a(0,"mat-dialog-content",3),v(1,"iframe",6,0),o()),n&2){let t=g();s(),_("src",t.url,h)("title",t.data.panel.title)}}function B(n,e){n&1&&(a(0,"mat-dialog-content",4),r(1," This widget has no settings. "),o())}function F(n,e){if(n&1){let t=D();a(0,"mat-dialog-actions",5)(1,"button",7),p("click",function(){f(t);let l=g();return u(l.removeWidget())}),a(2,"mat-icon"),r(3,"delete"),o(),r(4," Remove widget "),o()()}}var W=class n{constructor(e,t,i,l){this.dialogRef=e;this.data=t;this.service=i;this.sanitizer=l}frame;url;detach=null;ngOnInit(){let e=this.data.panel;e&&(this.url=this.sanitizer.bypassSecurityTrustResourceUrl(e.url?this.service.resolveAssetUrl(e.url):"about:blank"))}ngAfterViewInit(){let e=this.data.panel;!e||!this.frame||(this.detach=this.service.attachPanel(this.frame.nativeElement,{extension:this.data.extension,panel:e,targetInstance:this.data.targetInstance,targetWidget:this.data.targetWidget,close:()=>this.dialogRef.close()}))}removeWidget(){this.data.targetInstance&&this.service.removeWidget(this.data.targetInstance),this.dialogRef.close()}ngOnDestroy(){this.detach?.(),this.detach=null}static \u0275fac=function(t){return new(t||n)(c(C),c(w),c(z),c(I))};static \u0275cmp=P({type:n,selectors:[["fb-plotterext-panel-dialog"]],viewQuery:function(t,i){if(t&1&&b(U,5),t&2){let l;x(l=y())&&(i.frame=l.first)}},decls:9,vars:3,consts:[["frame",""],["mat-dialog-title","",1,"pe-panel-header"],["mat-icon-button","","aria-label","Close",3,"click"],[1,"pe-panel-content"],[1,"pe-panel-noconfig"],[1,"pe-panel-actions"],["sandbox","allow-scripts allow-same-origin allow-forms",3,"src","title"],["mat-button","",1,"pe-remove",3,"click"]],template:function(t,i){t&1&&(a(0,"div",1)(1,"span"),r(2),o(),a(3,"button",2),p("click",function(){return i.dialogRef.close()}),a(4,"mat-icon"),r(5,"close"),o()()(),m(6,Q,3,2,"mat-dialog-content",3)(7,B,2,0,"mat-dialog-content",4),m(8,F,5,0,"mat-dialog-actions",5)),t&2&&(s(2),M(i.data.panel?i.data.panel.title:i.data.title),s(4),d(i.data.panel?6:7),s(2),d(i.data.targetInstance?8:-1))},dependencies:[O,S,E,R,k,A,T,V,j],styles:[".pe-panel-header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding-right:8px}.pe-panel-content[_ngcontent-%COMP%]{padding:0;height:60vh}.pe-panel-noconfig[_ngcontent-%COMP%]{padding:16px 24px;color:#0009}iframe[_ngcontent-%COMP%]{display:block;width:100%;height:100%;border:none}.pe-panel-actions[_ngcontent-%COMP%]{justify-content:flex-start}.pe-remove[_ngcontent-%COMP%]{color:#d32f2f}"]})};export{W as PlotterPanelDialog};
1
+ import{ta as z}from"./chunk-RXMZCTQL.js";import"./chunk-IURS3QQO.js";import"./chunk-4BXCQ655.js";import"./chunk-LXTM3LEN.js";import"./chunk-IYNTZMNB.js";import"./chunk-3CRIFTHA.js";import"./chunk-UF7LOYCE.js";import"./chunk-XHEJEIFO.js";import"./chunk-I3OUN6B4.js";import"./chunk-WX7YZB5N.js";import{Dd as C,Ea as m,Ed as w,Fa as d,Gd as S,Hd as R,Id as E,Jd as O,Ka as _,La as a,Ma as o,Na as v,Q as f,R as u,Rd as T,Td as A,Ua as D,Wa as p,Wd as k,Ya as g,Yd as j,Zd as V,ab as b,bb as x,cb as y,ha as h,ja as s,kc as I,lb as r,mb as M,oa as c,ra as P}from"./chunk-4BSA3TDQ.js";import"./chunk-EQVTEUXC.js";var U=["frame"];function Q(n,e){if(n&1&&(a(0,"mat-dialog-content",3),v(1,"iframe",6,0),o()),n&2){let t=g();s(),_("src",t.url,h)("title",t.data.panel.title)}}function B(n,e){n&1&&(a(0,"mat-dialog-content",4),r(1," This widget has no settings. "),o())}function F(n,e){if(n&1){let t=D();a(0,"mat-dialog-actions",5)(1,"button",7),p("click",function(){f(t);let l=g();return u(l.removeWidget())}),a(2,"mat-icon"),r(3,"delete"),o(),r(4," Remove widget "),o()()}}var W=class n{constructor(e,t,i,l){this.dialogRef=e;this.data=t;this.service=i;this.sanitizer=l}frame;url;detach=null;ngOnInit(){let e=this.data.panel;e&&(this.url=this.sanitizer.bypassSecurityTrustResourceUrl(e.url?this.service.resolveAssetUrl(e.url):"about:blank"))}ngAfterViewInit(){let e=this.data.panel;!e||!this.frame||(this.detach=this.service.attachPanel(this.frame.nativeElement,{extension:this.data.extension,panel:e,targetInstance:this.data.targetInstance,targetWidget:this.data.targetWidget,close:()=>this.dialogRef.close()}))}removeWidget(){this.data.targetInstance&&this.service.removeWidget(this.data.targetInstance),this.dialogRef.close()}ngOnDestroy(){this.detach?.(),this.detach=null}static \u0275fac=function(t){return new(t||n)(c(C),c(w),c(z),c(I))};static \u0275cmp=P({type:n,selectors:[["fb-plotterext-panel-dialog"]],viewQuery:function(t,i){if(t&1&&b(U,5),t&2){let l;x(l=y())&&(i.frame=l.first)}},decls:9,vars:3,consts:[["frame",""],["mat-dialog-title","",1,"pe-panel-header"],["mat-icon-button","","aria-label","Close",3,"click"],[1,"pe-panel-content"],[1,"pe-panel-noconfig"],[1,"pe-panel-actions"],["sandbox","allow-scripts allow-same-origin allow-forms",3,"src","title"],["mat-button","",1,"pe-remove",3,"click"]],template:function(t,i){t&1&&(a(0,"div",1)(1,"span"),r(2),o(),a(3,"button",2),p("click",function(){return i.dialogRef.close()}),a(4,"mat-icon"),r(5,"close"),o()()(),m(6,Q,3,2,"mat-dialog-content",3)(7,B,2,0,"mat-dialog-content",4),m(8,F,5,0,"mat-dialog-actions",5)),t&2&&(s(2),M(i.data.panel?i.data.panel.title:i.data.title),s(4),d(i.data.panel?6:7),s(2),d(i.data.targetInstance?8:-1))},dependencies:[O,S,E,R,k,A,T,V,j],styles:[".pe-panel-header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding-right:8px}.pe-panel-content[_ngcontent-%COMP%]{padding:0;height:60vh}.pe-panel-noconfig[_ngcontent-%COMP%]{padding:16px 24px;color:#0009}iframe[_ngcontent-%COMP%]{display:block;width:100%;height:100%;border:none}.pe-panel-actions[_ngcontent-%COMP%]{justify-content:flex-start}.pe-remove[_ngcontent-%COMP%]{color:#d32f2f}"]})};export{W as PlotterPanelDialog};