PageSourceSearch

https://account.canapii.com/chunk-UZLZFI4E.js

js canapii.com collected 2026-10-01 12:02:13 UTC 9,935 bytes, 1 lines download raw bytes

1import{a as G,b as Q,c as X}from"./chunk-2SMGYAHO.js";import{a as q}from"./chunk-GA4ZWRQ2.js";import"./chunk-4MPIUD7L.js";import"./chunk-PU4BAJCF.js";import"./chunk-VJX6N2HB.js";import"./chunk-H4EPMV5Z.js";import"./chunk-6PXU6RTR.js";import"./chunk-6DH3EJIN.js";import"./chunk-UZY2R5Q5.js";import"./chunk-5GAGQHFR.js";import"./chunk-RXRKGCUL.js";import"./chunk-LW7CZM4G.js";import"./chunk-EW2NZJHY.js";import"./chunk-GAHMBGQ7.js";import"./chunk-UAWJ3VGL.js";import"./chunk-VT7CJSCD.js";import"./chunk-R2ER225G.js";import{Aa as J,C as V,Ca as U,F as N,I as j,P as H,Q as K,R as $,T as B,Y as A,j as M,l as R,m as O,v as I}from"./chunk-TU3JUKDL.js";import"./chunk-6JETGMQG.js";import"./chunk-VRQFSSVW.js";import"./chunk-Y4544WYO.js";import"./chunk-73R64QIM.js";import"./chunk-KOEZPSOA.js";import"./chunk-ZEL44FAF.js";import"./chunk-RT33Z4W3.js";import"./chunk-CTTXKPH2.js";import{a as D}from"./chunk-EURTYAWN.js";import"./chunk-CT5YU3F2.js";import{j as b}from"./chunk-B5NVKW3K.js";import{u as W}from"./chunk-MRC2PHN7.js";import{Eb as L,Ec as s,Fa as _,Fc as a,Gc as r,Hc as v,Id as T,Jb as o,Kd as P,Qc as S,Sa as w,Ta as E,Wb as k,Xc as m,Zc as h,bc as z,cc as C,gc as F,ld as p,md as f,xc as g,zc as u}from"./chunk-77LCFR2D.js";import{l as x}from"./chunk-6G35VSEK.js";function te(n,l){if(n&1){let e=S();a(0,"cnp-callout",17),m("dismissed",function(){w(e);let t=h();return E(t.dismissExportError())}),p(1),r()}if(n&2){let e=h();s("dismissible",!0),o(),f(e.exportError)}}function ne(n,l){n&1&&v(0,"cnp-skeleton",18)(1,"cnp-skeleton",19),n&2&&(s("rows",1),o(),s("rows",1))}function ie(n,l){if(n&1&&v(0,"cnp-stat-card",20)(1,"cnp-stat-card",21),n&2){let e=h();s("value",e.events.length),o(),s("value",e.organizations.length)}}function ae(n,l){if(n&1){let e=S();a(0,"cnp-button",22),m("click",function(){w(e);let t=h();return E(t.clearSearch())}),p(1," Clear search "),r()}}function re(n,l){if(n&1&&(a(0,"span",23),p(1),r()),n&2){let e=h().value;s("title",e),o(),f(e)}}function oe(n,l){n&1&&(a(0,"span",24),p(1,"\u2014"),r(),a(2,"span",25),p(3,"Empty"),r())}function se(n,l){if(n&1&&g(0,re,2,2,"span",23)(1,oe,4,0),n&2){let e=l.value;u(e?0:1)}}function le(n,l){if(n&1&&(a(0,"span",26),p(1),T(2,"date"),r()),n&2){let e=h().value;o(),f(P(2,1,e,"d MMM y"))}}function pe(n,l){n&1&&(a(0,"span",24),p(1,"\u2014"),r(),a(2,"span",25),p(3,"Empty"),r())}function ce(n,l){if(n&1&&g(0,le,3,4,"span",26)(1,pe,4,0),n&2){let e=l.value;u(e?0:1)}}function de(n,l){if(n&1&&(a(0,"a",27),p(1,"Console"),r()),n&2){let e=l.$implicit;s("href","/emp/"+e.url,L)}}var y=(()=>{class n{constructor(e,i){this.csvDownloadService=e,this.api=i,this.columns=[{key:"name",header:"Name",sortable:!0},{key:"organizationName",header:"Organization",sortable:!0,width:"18%",truncate:!0},{key:"startDate",header:"Start date",sortable:!0,width:"11%"},{key:"registered",header:"Registered",sortable:!0,align:"end",width:"10%"},{key:"loggedIn",header:"Logged in",sortable:!0,align:"end",width:"10%"},{key:"console",header:"",width:"120px",align:"end",ariaLabel:"Console"}],this.pageSizeOptions=[25,50,100],this.events=[],this.organizations=[],this.isLoading=!1,this.loadFailed=!1,this.isExporting=!1,this.exportError="",this.visibleRows=[],this.filteredCount=0,this.searchValue="",this.sort={key:"startDate",direction:"desc"},this.currentPage=1,this.pageSize=50,this.allRows=[],this.searchFilter="",this.byKey=t=>t.PK}ngOnInit(){this.load()}load(){return this.isLoading=!0,this.loadFailed=!1,this.api.get("/all-events/last-week").then(e=>{let i=!!e?.success&&Array.isArray(e.data);this.loadFailed=!i;let t=i?e.data:[];this.allRows=t,this.events=t,this.organizations=t.map(c=>c.organizationName).filter(c=>!!c).filter((c,d,ee)=>ee.indexOf(c)===d)}).catch(e=>{this.loadFailed=!0,console.error("Error loading last week events:",e)}).finally(()=>{this.isLoading=!1,this.refreshRows()})}get countLabel(){return`${this.filteredCount} ${this.filteredCount===1?"event":"events"}`}get announcement(){let e=this.sort;if(!e)return this.countLabel;let i=e.direction==="asc"?"ascending":"descending";return`${this.countLabel}, sorted by ${this.headerFor(e.key)}, ${i}`}get emptyHeading(){return this.loadFailed?"Events could not be loaded":this.searchFilter?"No events match your search":"No free-plan events last week"}
1get emptyDescription(){return this.loadFailed?"Refresh the page to try again.":this.searchFilter?"Try a different event or organization name.":"Free-plan events that started in the previous week appear here."}get emptyIcon(){return this.searchFilter||this.loadFailed?"no-results":"inbox"}get isSearching(){return this.searchFilter.length>0}clearSearch(){this.filter("")}filter(e){this.searchValue=e,this.searchFilter=e.trim().toLowerCase(),this.currentPage=1,this.refreshRows()}onSortChange(e){let i=this.sort,t=!!e&&!!i&&e.key===i.key&&i.direction==="desc"&&e.direction==="asc";this.sort=t?null:e,this.refreshRows()}dismissExportError(){this.exportError=""}onPageChange(e){this.currentPage=e,this.refreshRows()}onPageSizeChange(e){this.pageSize=e,this.currentPage=1,this.refreshRows()}export(){return x(this,null,function*(){let e=[["id","PK"],"name","organizationName","timezone","startDate","endDate","registered","loggedIn"],i=structuredClone(this.allRows);i.forEach(t=>{t.startDate=t.startDate?t.startDate.split("T")[0]:"",t.endDate=t.endD
1ate?t.endDate.split("T")[0]:""}),this.isExporting=!0,this.exportError="";try{yield this.csvDownloadService.fromJsonList("admin-free-events-last-week",i,e)}catch(t){console.error("Error exporting last week events:",t),this.exportError="Could not build the export. Try again."}finally{this.isExporting=!1}})}headerFor(e){return this.columns.find(i=>i.key===e)?.header??e}refreshRows(){let e=this.searchFilter?this.allRows.filter(t=>Q(t,this.searchFilter)):[...this.allRows],i=G(e,this.sort);this.filteredCount=i.length,this.visibleRows=X(i,this.currentPage,this.pageSize)}static{this.\u0275fac=function(i){return new(i||n)(k(q),k(D))}}static{this.\u0275cmp=z({type:n,selectors:[["app-events-last-week"]],decls:21,vars:20,consts:[[1,"last-week-page"],["heading","Free events last week","description","Free-plan events that started in the previous week."],["tone","danger",3,"dismissible"],[1,"stat-grid"],[1,"list-card"],["ariaLabel","Free event list controls",3,"count"],["cnpToolbarStart","","label","Search events","placeholder","Search events, organizations\u2026",1,"events-search",3,"valueChange","value"],["variant","secondary","loadingLabel","Exporting",3,"click","loading"],["name","export"],["role","status","cnpVisuallyHidden",""],["ariaLabel","Free events last week","loadingLabel","Loading events",3,"sortChange","columns","rows","rowKey","sort","loading"],["cnpTableEmpty","",3,"icon","heading","description","headingLevel"],["cnpEmptyStatePrimary","","size","sm","variant","secondary"],["cnpCell","name"],["cnpCell","startDate"],["cnpCell","console"],["noun","events",3,"pageChange","pageSizeChange","total","page","pageSize","pageSizeOptions"],["tone","danger",3,"dismissed","dismissible"],["preset","stat-card","label","Loading events",3,"rows"],["preset","stat-card","label","Loading organizations",3,"rows"],["label","Events",3,"value"],["label","Organizations",3,"value"],["cnpEmptyStatePrimary","","size","sm","variant","secondary",3,"click"],[1,"cell-name",3,"title"],["aria-hidden","true"],["cnpVisuallyHidden",""],[1,"cell-date"],["cnpButton","","variant","secondary","size","sm",3,"href"]],template:function(i,t){i&1&&(a(0,"div",0),v(1,"cnp-page-header",1),g(2,te,2,2,"cnp-callout",2),a(3,"div",3),g(4,ne,2,2)(5,ie,2,2),r(),a(6,"div",4)(7,"cnp-toolbar",5)(8,"cnp-search-field",6),m("valueChange",function(d){return t.filter(d)}),r(),a(9,"cnp-button",7),m("click",function(){return t.export()}),v(10,"cnp-icon",8),p(11," Export "),r()(),a(12,"span",9),p(13),r(),a(14,"cnp-table",10),m("sortChange",function(d){return t.onSortChange(d)}),a(15,"cnp-empty-state",11),g(16,ae,2,0,"cnp-button",12),r(),F(17,se,2,1,"ng-template",13)(18,ce,2,1,"ng-template",14)(19,de,2,1,"ng-template",15),r(),a(20,"cnp-paginator",16),m("pageChange",function(d){return t.onPageChange(d)})("pageSizeChange",function(d){return t.onPageSizeChange(d)}),r()()()),i&2&&(o(2),u(t.exportError?2:-1),o(2),u(t.isLoading?4:5),o(3),s("count",t.countLabel),o(),s("value",t.searchValue),o(),s("loading",t.isExporting),o(4),f(t.announcement),o(),s("columns",t.columns)("rows",t.visibleRows)("rowKey",t.byKey)("sort",t.sort)("loading",t.isLoading),o(),s("icon",t.emptyIcon)("heading",t.emptyHeading)("description",t.emptyDescription)("headingLevel",2),o(),u(t.isSearching&&!t.loadFailed?16:-1),o(4),s("total",t.filteredCount)("page",t.currentPage)("pageSize",t.pageSize)("pageSizeOptions",t.pageSizeOptions))},dependencies:[R,O,J,K,A,M,V,B,I,U,N,$,j,H,W],styles:["[_nghost-%COMP%]{display:block;padding:var(--cnp-space-page-gutter-y) var(--cnp-space-page-gutter-x)}.last-week-page[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:var(--cnp-space-card-gap)}.stat-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(auto-fill,minmax(11rem,14rem));gap:var(--cnp-space-card-gap)}.list-card[_ngcontent-%COMP%]{background:var(--cnp-color-bg-card);border-radius:var(--cnp-radius-container);box-shadow:var(--cnp-shadow-low);overflow:hidden}.events-search[_ngcontent-%COMP%]{--cnp-search-field-width: 22rem}.cell-name[_ngcontent-%COMP%]{display:block;max-width:26rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:var(--cnp-font-weight-semibold)}.cell-date[_ngcontent-%COMP%]{white-space:nowrap}"]})}}return n})();var me=[{path:"",component:y}],Z=(()=>{class n{static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275mod=C({type:n})}static{this.\u0275inj=_({imports:[b.forChild(me),b]})}}return n})();var be=(()=>{class n{static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275mod=C({type:n})}static{this.\u0275inj=_({imports:[Z,y]})}}return n})();export{be as LastWeekEventsModule};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.