1import{a as V,b as $e,c as je}from"./chunk-TFHCQGNH.js";import{b as Le,c as we,d as Te,f as ke,g as Ie,i as He,j as Ae,l as Qe,m as Be,o as Re,q as ze,r as Fe}from"./chunk-IRVXRWZD.js";import{a as De,b as Oe}from"./chunk-UAHJPPOQ.js";import{d as be,e as Me,g as Pe}from"./chunk-OASEBQL4.js";import{a as Ee}from"./chunk-M2SDBECC.js";import{b as ye}from"./chunk-H3ZOHFO7.js";import"./chunk-CIKJJUSN.js";import"./chunk-RRZRS5BZ.js";import"./chunk-LY7WOQZN.js";import"./chunk-Q4V6AKYI.js";import"./chunk-T3PLPHIG.js";import{c as W}from"./chunk-2JW6ZMWV.js";import"./chunk-NIP74ZKI.js";import"./chunk-QNUNLKYK.js";import{r as N}from"./chunk-RE4JJFV5.js";import{d as _e,e as ue,f as fe,i as Ce,j as he,k as xe}from"./chunk-COEKBYWO.js";import"./chunk-E2K2LIS4.js";import{a as U}from"./chunk-KJKRX6VS.js";import"./chunk-2CRWMDGS.js";import"./chunk-4WMDX4SQ.js";import"./chunk-IQLKO45Z.js";import"./chunk-V6KBZVCY.js";import"./chunk-6FQQM4CE.js";import"./chunk-VTTO24NQ.js";import"./chunk-Y5VOXWTF.js";import{l as ve,n as z,q as F}from"./chunk-YWHNFDXQ.js";import{l as Se}from"./chunk-FCTHY2PU.js";import"./chunk-DPVJW3LI.js";import"./chunk-GW33KQPR.js";import{T as $,U as j,x as ge}from"./chunk-TUEKBDZZ.js";import"./chunk-RLPOKPIS.js";import"./chunk-TPES7EAS.js";import{G as se,c as le,h as re,m as de,u as ce,v as me,w as pe}from"./chunk-QXJM3TTT.js";import{D as ae,F as R,r as oe,x as B}from"./chunk-TMOIAHHX.js";import{$a as y,Eb as ne,Fa as f,Fb as w,Ib as o,Jb as c,Kb as M,Lb as P,Nb as T,Rb as k,Sb as I,Tb as H,Wa as g,Xa as _,_a as O,aa as G,ab as p,bb as i,cb as n,cc as q,db as v,dc as ie,ga as a,hb as h,ib as x,kb as X,mc as S,nc as A,o as Y,oc as Q,p as J,qb as b,sa as C,tb as s,xb as Z,yb as ee,za as L,zb as te}from"./chunk-DJNWGYMM.js";import{ea as D,f as E}from"./chunk-VOZAGDK7.js";import"./chunk-E5QWB6YB.js";var Ze=(t,l)=>l.logoId;function et(t,l){t&1&&(i(0,"div",6),v(1,"mat-spinner",11),n()),t&2&&(a(),p("diameter",48))}function tt(t,l){t&1&&(i(0,"div",7),o(1,"No logos found for this entity."),n())}function nt(t,l){if(t&1&&(i(0,"span",16),o(1),n()),t&2){let e=s().$implicit;a(),c(e.purchasedTier)}}function it(t,l){t&1&&(i(0,"span",17),o(1,"refined"),n())}function ot(t,l){if(t&1&&(i(0,"div",22)(1,"span",25),o(2,"Colors:"),n(),o(3),n()),t&2){let e=s().$implicit;a(3),M(" ",e.colors)}}function at(t,l){if(t&1&&(i(0,"div",22)(1,"span",25),o(2,"Specs:"),n(),o(3),n()),t&2){let e=s().$implicit;a(3),M(" ",e.details)}}function lt(t,l){if(t&1&&(i(0,"details",23)(1,"summary"),o(2,"Prompt"),n(),i(3,"p"),o(4),n()()),t&2){let e=s().$implicit;a(4),c(e.prompt)}}function rt(t,l){if(t&1&&(i(0,"a",24)(1,"mat-icon"),o(2,"download"),n(),o(3," Original "),n()),t&2){let e=s().$implicit;p("href",e.origUrl,G)}}function dt(t,l){if(t&1&&(i(0,"div",13)(1,"div",14),v(2,"img",15),g(3,nt,2,1,"span",16),g(4,it,2,0,"span",17),n(),i(5,"div",18)(6,"div",19),o(7),n(),i(8,"div",20),o(9),n(),i(10,"div",21),o(11),S(12,"date"),n(),g(13,ot,4,1,"div",22),g(14,at,4,1,"div",22),g(15,lt,5,1,"details",23),g(16,rt,4,1,"a",24),n()()),t&2){let e=l.$implicit;w("purchased",e.purchased),a(2),p("src",e.previewUrl,G)("alt",e.styleKey),a(),_(e.purchased?3:-1),a(),_(e.refined?4:-1),a(3),P("",e.styleKey||"\u2014"," \xB7 ",e.provider||"xai"),a(2),c(e.generatedBy),a(2),c(Q(12,14,e.createdOn,"short")),a(2),_(e.colors?13:-1),a(),_(e.details?14:-1),a(),_(e.prompt?15:-1),a(),_(e.purchased&&e.origUrl?16:-1)}}function ct(t,l){if(t&1&&(i(0,"div",8),O(1,dt,17,17,"div",12,Ze),n()),t&2){let e=s();a(),y(e.logos)}}var Ue=(()=>{class t{data;dialogRef;api;notify;loading=!1;logos=[];_unsubscribeAll=new E;constructor(e,d,r,m){this.data=e,this.dialogRef=d,this.api=r,this.notify=m}ngOnInit(){this.load()}ngOnDestroy(){this._unsubscribeAll.next(!0),this._unsubscribeAll.complete()}get purchasedCount(){return this.logos.filter(e=>e.purchased).length}load(){this.loading=!0,this.api.get(`LogoGeneratorV2/dashboard/detail/${this.data.ownerType}/${this.data.ownerID}`,!0).pipe(D(this._unsubscribeAll)).subscribe({next:e=>{this.logos=Array.isArray(e)?e:[],this.loading=!1},error:e=>{this.loading=!1,this.notify.openAlertModal(e?.error?e.error:"An error has occurred",W.ERROR),this.dialogRef.close()}})}close(){this.dialogRef.close()}static \u0275fac=function(d){return new(d||t)(C(ue),C(_e),C(U),C(N))};static \u0275cmp=L({type:t,selectors:[["logo-detail-dialog"]],decls:17,vars:6,consts:[["id","LogoDetailDialog"],[1,"dialog-header"],[1,"dialog-title"],[1,"dialog-subtitle"],["mat-icon-button","","aria-label","Close",3,"click"],["mat-dialog-content","",1,"dialog-body"],[1,"spinner-wrap"],[1,"empty"],[1,"logo-grid"],["mat-dialog-actions","",1,"dialog-actions"],["mat-stroked-button","",3,"click"],[3,"diameter"],[1,"logo-card",3,"purchased"],[1,"logo-card"],[1,"thumb"],["loading","lazy",3,"src","alt"],[1,"badge"],[1,"badge","refined"],[1,"meta"],[1,"style"],[1,"by"],[1,"date"],[1,"choice"],[1,"prompt"],["target","_blank","rel","noopener",1,"download",3,"href"],[1,"choice-label"]],template:function(d,r){d&1&&(i(0,"div",0)(1,"div",1)(2,"div")(3,"h2",2),o(4),n(),i(5,"p",3),o(6),n()(),i(7,"button",4),b("click",function(){return r.close()}),i(8,"mat-icon"),o(9,"close"),n()()(),i(10,"div",5),g(11,et,2,1,"div",6)(12,tt,2,0,"div",7)(13,ct,3,0,"div",8),n(),i(14,"div",9)(15,"button",10),b("click",function(){return r.close()}),o(16,"Close"),n()()()),d&2&&(a(4),c(r.data.name),a(2),T(" ",r.data.ownerType," \xB7 ",r.logos.length," logo",r.logos.length===1?"":"s"," generated \xB7 ",r.purchasedCount," purchased "),a(5),_(r.loading?11:r.logos.length===0?12:13))}
1,dependencies:[R,xe,he,Ce,F,z,ve,j,$,Oe,De,B],styles:["#LogoDetailDialog[_ngcontent-%COMP%] .dialog-header[_ngcontent-%COMP%]{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:4px 4px 12px}#LogoDetailDialog[_ngcontent-%COMP%] .dialog-title[_ngcontent-%COMP%]{font-size:20px;font-weight:700;color:#0a2540;margin:0}#LogoDetailDialog[_ngcontent-%COMP%] .dialog-subtitle[_ngcontent-%COMP%]{font-size:13px;color:#4b5f77;margin:4px 0 0;text-transform:capitalize}#LogoDetailDialog[_ngcontent-%COMP%] .dialog-body[_ngcontent-%COMP%]{min-height:160px}#LogoDetailDialog[_ngcontent-%COMP%] .spinner-wrap[_ngcontent-%COMP%]{display:flex;justify-content:center;padding:48px 0}#LogoDetailDialog[_ngcontent-%COMP%] .empty[_ngcontent-%COMP%]{padding:48px 0;text-align:center;color:#8190a5}#LogoDetailDialog[_ngcontent-%COMP%] .logo-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:16px;padding:8px 0}#LogoDetailDialog[_ngcontent-%COMP%] .logo-card[_ngcontent-%COMP%]{border:1px solid #e3e8ef;border-radius:10px;overflow:hidden;background:#fff}#LogoDetailDialog[_ngcontent-%COMP%] .logo-card.purchased[_ngcontent-%COMP%]{border-color:#16a34a;box-shadow:0 0 0 1px #16a34a}#LogoDetailDialog[_ngcontent-%COMP%] .thumb[_ngcontent-%COMP%]{position:relative;aspect-ratio:1/1;background:#f5f7fa}#LogoDetailDialog[_ngcontent-%COMP%] .thumb[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:contain}#LogoDetailDialog[_ngcontent-%COMP%] .badge[_ngcontent-%COMP%]{position:absolute;top:8px;left:8px;font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.03em;padding:2px 8px;border-radius:999px;background:#16a34a;color:#fff}#LogoDetailDialog[_ngcontent-%COMP%] .badge.refined[_ngcontent-%COMP%]{left:auto;right:8px;background:#2b4f9e}#LogoDetailDialog[_ngcontent-%COMP%] .meta[_ngcontent-%COMP%]{padding:10px 12px}#LogoDetailDialog[_ngcontent-%COMP%] .meta[_ngcontent-%COMP%] .style[_ngcontent-%COMP%]{font-size:13px;font-weight:600;color:#0a2540;text-transform:capitalize}#LogoDetailDialog[_ngcontent-%COMP%] .meta[_ngcontent-%COMP%] .by[_ngcontent-%COMP%]{font-size:12px;color:#4b5f77;margin-top:2px}#LogoDetailDialog[_ngcontent-%COMP%] .meta[_ngcontent-%COMP%] .date[_ngcontent-%COMP%]{font-size:11px;color:#8190a5;margin-top:2px}#LogoDetailDialog[_ngcontent-%COMP%] .meta[_ngcontent-%COMP%] .choice[_ngcontent-%COMP%]{font-size:12px;color:#4b5f77;margin-top:4px;word-break:break-word}#LogoDetailDialog[_ngcontent-%COMP%] .meta[_ngcontent-%COMP%] .choice-label[_ngcontent-%COMP%]{font-weight:600;color:#0a2540}#LogoDetailDialog[_ngcontent-%COMP%] .meta[_ngcontent-%COMP%] .prompt[_ngcontent-%COMP%]{margin-top:6px}#LogoDetailDialog[_ngcontent-%COMP%] .meta[_ngcontent-%COMP%] .prompt[_ngcontent-%COMP%] summary[_ngcontent-%COMP%]{font-size:12px;font-weight:600;color:#2b4f9e;cursor:pointer}#LogoDetailDialog[_ngcontent-%COMP%] .meta[_ngcontent-%COMP%] .prompt[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font-size:12px;color:#4b5f77;line-height:1.4;margin:6px 0 0;white-space:pre-wrap;word-break:break-word}#LogoDetailDialog[_ngcontent-%COMP%] .meta[_ngcontent-%COMP%] .download[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:4px;margin-top:8px;font-size:12px;font-weight:600;color:#16a34a;text-decoration:none}#LogoDetailDialog[_ngcontent-%COMP%] .meta[_ngcontent-%COMP%] .download[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:16px;width:16px;height:16px}#LogoDetailDialog[_ngcontent-%COMP%] .dialog-actions[_ngcontent-%COMP%]{justify-content:flex-end;padding-top:8px}"]})}return t})();var mt=t=>({width:t}),Ne=()=>[],pt=(t,l)=>l.tier,st=(t,l)=>l.provider,gt=(t,l)=>l.style;function _t(t,l){if(t&1&&(i(0,"div",33)(1,"div",37),o(2),n(),i(3,"div",38),o(4),S(5,"currency"),n(),i(6,"div",39),o(7),n()()),t&2){let e=l.$implicit,d=s(2);a(2),c(d.tierLabel(e.tier)),a(2),c(A(5,3,e.amount)),a(3),M("",e.count," sold")}}function ut(t,l){t&1&&(i(0,"div",34),o(1,"No paid purchases in the selected period. Free digital claims are counted in the funnel above."),n())}function ft(t,l){if(t&1&&(i(0,"div",33)(1,"div",37),o(2),n(),i(3,"div",38),o(4),n(),i(5,"div",39),o(6),n()()),t&2){let e=l.$implicit,d=s(2);a(2),c(d.providerLabel(e.provider)),a(2),M("",d.pickRate(e),"%"),a(2),P("",e.picked," picked of ",e.generated," generated")}}function Ct(t,l){t&1&&(i(0,"div",34),o(1,"No logos generated in the selected period."),n())}function ht(t,l){t&1&&(i(0,"div",34),o(1,"No logos generated in the selected period."),n())}function xt(t,l){if(t&1&&(i(0,"div",40)(1,"div",41),o(2),n(),i(3,"div",42),v(4,"div",43),n(),i(5,"div",44),o(6),n()()),t&2){let e=l.$implicit,d=s(3);a(2),c(d.styleLabel(e.style)),a(2),ne("width",e.count/d.maxStyleCount*100,"%"),a(2),P("",e.count," \xB7 ",e.picked," picked")}}function vt(t,l){if(t&1&&(i(0,"div",35),O(1,xt,7,5,"div",40,gt),n()),t&2){let e=s(2);a(),y(e.styles)}}function bt(t,l){t&1&&(i(0,"div",34),o(1,"No events or teams have generated a logo yet."),n())}function Mt(t,l){t&1&&(i(0,"th",64),o(1,"Name"),n())}function Pt(t,l){if(t&1&&(i(0,"td",65),o(1),n()),t&2){let e=l.$implicit;a(),c(e.name)}}function St(t,l){t&1&&(i(0,"th",64),o(1,"Type"),n())}function Dt(t,l){if(t&1&&(i(0,"td",65)(1,"span",66),o(2),n()()),t&2){let e=l.$implicit;a(),w("team",e.ownerType==="team"),a(),c(e.ownerType)}}function Ot(t,l){t&1&&(i(0,"th",64),o(1,"Site"),n())}function yt(t,l){if(t&1&&(i(0,"td",65),o(1),n()),t&2){let e=l.$implicit;a(),c(e.site)}}function Et(t,l){t&1&&(i(0,"th",64),o(1,"Sport"),n())}function Lt(t,l){if(t&1&&(i(0,"td",65),o(1),n()),t&2){let e=l.$implicit;a(),c(e.sport)}}function wt(t,l){t&1&&(i(0,"th",64),o(1,"Season"),n())}function Tt(t,l){if(t&1&&(i(0,"td",65),o(1),n()),t&2){let e=l.$implicit;a(),c(e.season)}}function kt(t,l){t&1&&(i(0,"th",64),o(1,"Used By"),n())}function It(t,l){if(t&1&&(i(0,"td",65),o(1),n()),t&2){let e=l.$implicit;a(),c(e.usedBy)}}function Ht(t,l){t&1&&(i(0,"th",67),o(1,"Generated"),n())}function At(t,l){if(t&1&&(i(0,"td",68),o(1),n()),t&2){let e=l.$implicit;a(),c(e.logosGenerated)}}function Qt(t,l){t&1&&(i(0,"th",67),o(1,"Claimed"),n())}function Bt(t,l){if(t&1&&(i(0,"td",68),o(1),n()),t&2){let e=l.$implicit;a(),c(e.purchasedCount)}}function Rt(t,l){t&1&&(i(0,"th",67),o(1,"Revenue"),n())}function zt(t,l){if(t&1&&(i(0,"td",68),o(1),S(2,"currency"),n()),t&2){let e=l.$implicit;a(),c(A(2,1,e.revenue))}}function Ft(t,l){t&1&&(i(0,"th",64),o(1,"Last Activity"),n())}function $t(t,l){if(t&1&&(i(0,"td",65),o(1),S(2,"date"),n()),t&2){let e=l.$implicit;a(),c(Q(2,1,e.lastActivity,"medium"))}}function jt(t,l){t&1&&(i(0,"th",69),o(1,"Logos"),n())}function Ut(t,l){if(t&1){let e=X();i(0,"td",68)(1,"button",70),b("click",function(){let r=Y(e).$implicit,m=s(3);return J(m.openDetail(r))}),i(2,"mat-icon"),o(3,"image"),n(),i(4,"span",17),o(5,"View"),n()()()}}function Nt(t,l){t&1&&v(0,"tr",71)}function Wt(t,l){t&1&&v(0,"tr",72)}function Vt(t,l){if(t&1&&(i(0,"div",36)(1,"table",45),h(2,46),f(3,Mt,2,0,"th",47)(4,Pt,2,1,"td",48),x(),h(5,49),f(6,St,2,0,"th",47)(7,Dt,3,3,"td",48),x(),h(8,50),f(9,Ot,2,0,"th",47)(10,yt,2,1,"td",48),x(),h(11,51),f(12,Et,2,0,"th",47)(13,Lt,2,1,"td",48),x(),h(14,52),f(15,wt,2,0,"th",47)(16,Tt,2,1,"td",48),x(),h(17,53),f(18,kt,2,0,"th",47)(19,It,2,1,"td",48),x(),h(20,54),f(21,Ht,2,0,"th",55)(22,At,2,1,"td",56),x(),h(23,57),f(24,Qt,2,0,"th",55)(25,Bt,2,1,"td",56),x(),h(26,58),f(27,Rt,2,0,"th",55)(28,zt,3,3,"td",56),x(),h(29,59),f(30,Ft,2,0,"th",47)(31,$t,3,4,"td",48),x(),h(32,60),f(33,jt,2,0,"th",61)(34,Ut,6,0,"td",56),x(),f(35,Nt,1,0,"tr",62)(36,Wt,1,0,"tr",63),n()()),t&2){let e=s(2);a(),p("dataSource",e.dataSource),a(34),p("matHeaderRowDef",e.usageColumns),a(),p("matRowDefColumns",e.usageColumns)}}function Gt(t,l){if(t&1&&(i(0,"section",19)(1,"div",20)(2,"h3",21),o(3,"Funnel"),n(),i(4,"p",22),o(5),n()(),i(6,"div",23)(7,"div",24)(8,"div",25),o(9),n(),i(10,"div",26),o(11,"Studios Opened"),n()(),i(12,"div",24)(13,"div",25),o(14),n(),i(15,"div",26),o(16,"Generations"),n()(),i(17,"div",24)(18,"div",25),o(19),n(),i(20,"div",26),o(21,"Images Created"),n()(),i(22,"div",24)(23,"div",25),o(24),n(),i(25,"div",26),o(26,"Previews Opened"),n()(),i(27,"div",24)(28,"div",25),o(29),n(),i(30,"div",26),o(31,"Purchases Started"),n()(),i(32,"div",24)(33,"div",25),o(34),n(),i(35,"div",26),o(36,"Free Logos Claimed"),n()(),i(37,"div",27)(38,"div",25),o(39),n(),i(40,"div",26),o(41,"Packs Purchased"),n()(),i(42,"div",24)(43,"div",25),o(44),n(),i(45,"div",26),o(46,"Open \u2192 Paid"),n()(),i(47,"div",24)(48,"div",25),o(49),n(),i(50,"div",26),o(51,"Cap Hits"),n()()()(),i(52,"section",19)(53,"div",20)(54,"h3",21),o(55,"Revenue"),n(),i(56,"p",22),o(57),n()(),i(58,"div",28)(59,"div",29)(60,"div",30),o(61),S(62,"currency"),n(),i(63,"div",31),o(64,"Paid Revenue"),n()(),i(65,"div",32),O(66,_t,8,5,"div",33,pt),g(68,ut,2,0,"div",34),n()()(),i(69,"section",19)(70,"div",20)(71,"h3",21),o(72,"Provider Preference"),n(),i(73,"p",22),o(74,"Which AI's designs people pick \u2014 a pick is a free claim or a paid pack \xB7 selected period"),n()(),i(75,"div",32),O(76,ft,7,4,"div",33,st),g(78,Ct,2,0,"div",34),n()(),i(79,"section",19)(80,"div",20)(81,"h3",21),o(82,"Popular Styles"),n(),i(83,"p",22),o(84,"Generated per look, and how many were picked \xB7 selected period"),n()(),g(85,ht,2,0,"div",34)(86,vt,3,0,"div",35),n(),i(87,"section",19)(88,"div",20)(89,"h3",21),o(90,"Usage by Event / Team"),n(),i(91,"p",22),o(92),n()(),g(93,bt,2,0,"div",34)(94,Vt,37,3,"div",36),n()),t&2){let e=s();a(5),P("Selected period \xB7 ",e.fromDate||"all time","",e.toDate?" \u2013 "+e.toDate:""),a(4),c((e.funnel==null?null:e.funnel.studiosOpened)||0),a(5),c((e.funnel==null?null:e.funnel.generations)||0),a(5),c((e.funnel==null?null:e.funnel.imagesGenerated)||0),a(5),c((e.funnel==null?null:e.funnel.previewsOpened)||0),a(5),c((e.funnel==null?null:e.funnel.purchaseStarted)||0),a(5),c((e.funnel==null?null:e.funnel.freeClaims)||0),a(5),c((e.funnel==null?null:e.funnel.purchases)||0),a(5),M("",e.conversionRate,"%"),a(5),c((e.funnel==null?null:e.funnel.capHits)||0),a(8),T(" ",(e.revenue==null?null:e.revenue.purchaseCount)||0," paid purchase",(e.revenue==null?null:e.revenue.purchaseCount)===1?"":"s"," \xB7 ",(e.revenue==null?null:e.revenue.freeClaims)||0," free claim",(e.revenue==null?null:e.revenue.freeClaims)===1?"":"s"," \xB7 selected period "),a(4),c(A(62,22,(e.revenue==null?null:e.revenue.total)||0)),a(5),y((e.revenue==null?null:e.revenue.byTier)||q(24,Ne)),a(2),_(((e.revenue==null?null:e.revenue.byTier)||q(25,Ne)).length===0?68:-1),a(8),y(e.providers),a(2),_(e.providers.length===0?78:-1),a(7),_(e.styles.length===0?85:86),a(7),P("",e.dataSource.data.length," entit",e.dataSource.data.length===1?"y":"ies"," have used the studio \xB7 all time"),a(),_(e.dataSource.data.length===0?93:94)}}var K="loader-logo-studio-dashboard",qt={digital:"Web-Ready",print:"Print Pack",vector:"Vector Pack"},Kt={xai:"Grok (xAI)",ideogram:"Ideogram"},Yt={"bold-modern":"Bold & Modern",vintage:"Vintage Badge",mascot:"Mascot",elegant:"Elegant",playful:"Playful","retro-sport":"Retro Sport",unknown:"Unspecified"},Dn=(()=>{class t{api;notify;ngxLoader;dialog;_fuseConfigService;breakpointObserver;loading=!1;hasLoaded=!1;fuseConfig;isMobile=!1;fromDate="";toDate="";typeFilter="all";funnel=null;revenue=null;styles=[];providers=[];dataSource=new Fe([]);usageColumns=["name","ownerType","site","sport","season","usedBy","logosGenerated","purchasedCount","revenue","lastActivity","actions"];set matSort(e){e&&(this.dataSource.sort=e)}_unsubscribeAll=new E;constructor(e,d,r,m,u,We){this.api=e,this.notify=d,this.ngxLoader=r,this.dialog=m,this._fuseConfigService=u,this.breakpointObserver=We}ngOnInit(){let e=new Date,d=new Date;d.setDate(e.getDate()-30),this.toDate=this.toInputDate(e),this.fromDate=this.toInputDate(d),this.dataSource.sortingDataAccessor=(r,m)=>m==="lastActivity"?r.lastActivity?new Date(r.lastActivity).getTime():0:r[m],this.load(),this._fuseConfigService.config.pipe(D(this._unsubscribeAll)).subscribe(r=>{this.fuseConfig=r}),this.breakpointObserver.observe(["(max-width: 599px)"]).pipe(D(this._unsubscribeAll)).subscribe(r=>{this.isMobile=r.matches==!0}
1)}ngOnDestroy(){this._unsubscribeAll.next(!0),this._unsubscribeAll.complete()}toInputDate(e){return e.toISOString().slice(0,10)}clearDates(){this.fromDate="",this.toDate="",this.load()}load(){this.loading=!0,this.hasLoaded=!1,this.ngxLoader.startLoader(K);let e=[];this.fromDate&&e.push(`from=${encodeURIComponent(this.fromDate+"T00:00:00")}`),this.toDate&&e.push(`to=${encodeURIComponent(this.toDate+"T23:59:59")}`),this.typeFilter!=="all"&&e.push(`type=${this.typeFilter}`);let d="LogoGeneratorV2/dashboard"+(e.length?"?"+e.join("&"):"");this.api.get(d,!0).pipe(D(this._unsubscribeAll)).subscribe({next:r=>{this.funnel=r?.funnel??null,this.revenue=r?.revenue??null,this.styles=Array.isArray(r?.styles)?r.styles:[],this.providers=Array.isArray(r?.providers)?r.providers:[],this.dataSource.data=Array.isArray(r?.usage)?r.usage:[],this.hasLoaded=!0,this.loading=!1,this.ngxLoader.stopLoader(K)},error:r=>{this.loading=!1,this.ngxLoader.stopLoader(K),this.notify.openAlertModal(r?.error?r.error:"An error has occurred",W.ERROR)}})}get conversionRate(){return!this.funnel||!this.funnel.studiosOpened?0:Math.round(this.funnel.purchases/this.funnel.studiosOpened*100)}tierLabel(e){return qt[e]||e||"Unknown"}styleLabel(e){return Yt[e]||e||"Unspecified"}providerLabel(e){return Kt[e]||e||"Unknown"}pickRate(e){return e.generated?Math.round(e.picked/e.generated*100):0}get maxStyleCount(){return this.styles.reduce((e,d)=>Math.max(e,d.count),1)}openDetail(e){this.dialog.open(Ue,{data:{ownerType:e.ownerType,ownerID:e.ownerID,name:e.name},width:"960px",maxWidth:"95vw",maxHeight:"90vh",autoFocus:!1})}static \u0275fac=function(d){return new(d||t)(C(U),C(N),C(be),C(fe),C(Se),C(ge))};static \u0275cmp=L({type:t,selectors:[["logo-studio-dashboard"]],viewQuery:function(d,r){if(d&1&&Z(V,5),d&2){let m;ee(m=te())&&(r.matSort=m.first)}},decls:33,vars:15,consts:[["id","HQPage","fusePerfectScrollbar","",1,"page-layout","simple","fullwidth"],["title","Logo Studio Dashboard","matIcon","palette",3,"hideBanner"],[1,"content","p-24",2,"min-height","800px",3,"ngStyle"],[3,"loaderId","fgsSize"],[1,"intro"],[1,"filter-bar"],[1,"filter-control"],["for","from-date",1,"filter-label"],["id","from-date","type","date","name","fromDate",3,"ngModelChange","ngModel","disabled"],["for","to-date",1,"filter-label"],["id","to-date","type","date","name","toDate",3,"ngModelChange","ngModel","disabled"],["for","type-filter",1,"filter-label"],["id","type-filter","name","typeFilter",3,"ngModelChange","ngModel","disabled"],["value","all"],["value","event"],["value","team"],["mat-flat-button","",1,"apply-btn",3,"click","disabled"],[1,"ml-4"],["mat-stroked-button","",3,"click","disabled"],[1,"panel"],[1,"results-heading"],[1,"results-title"],[1,"results-subtitle"],[1,"kpi-grid"],[1,"kpi-card"],[1,"kpi-value"],[1,"kpi-label"],[1,"kpi-card","highlight"],[1,"revenue-row"],[1,"revenue-total"],[1,"revenue-total-value"],[1,"revenue-total-label"],[1,"tier-list"],[1,"tier-card"],[1,"info-message","p-16"],[1,"style-list"],[1,"table-shell"],[1,"tier-name"],[1,"tier-amount"],[1,"tier-count"],[1,"style-row"],[1,"style-name"],[1,"style-bar-wrap"],[1,"style-bar"],[1,"style-count"],["mat-table","","matSort","","matSortActive","lastActivity","matSortDirection","desc",1,"usage-table",3,"dataSource"],["matColumnDef","name"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","ownerType"],["matColumnDef","site"],["matColumnDef","sport"],["matColumnDef","season"],["matColumnDef","usedBy"],["matColumnDef","logosGenerated"],["mat-header-cell","","mat-sort-header","","class","right",4,"matHeaderCellDef"],["mat-cell","","class","right",4,"matCellDef"],["matColumnDef","purchasedCount"],["matColumnDef","revenue"],["matColumnDef","lastActivity"],["matColumnDef","actions"],["mat-header-cell","","class","right",4,"matHeaderCellDef"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],[1,"type-chip"],["mat-header-cell","","mat-sort-header","",1,"right"],["mat-cell","",1,"right"],["mat-header-cell","",1,"right"],["mat-flat-button","",1,"view-btn",3,"click"],["mat-header-row",""],["mat-row",""]],template:function(d,r){d&1&&(i(0,"div",0),v(1,"page-header",1),i(2,"div",2),v(3,"ngx-ui-loader",3),i(4,"p",4),o(5,"AI Logo Studio activity across all sites. The funnel and revenue below cover the selected period; the usage table lists every event and team that has used the studio. Click a row to see the logos it generated."),n(),i(6,"div",5)(7,"div",6)(8,"label",7),o(9,"From"),n(),i(10,"input",8),H("ngModelChange",function(u){return I(r.fromDate,u)||(r.fromDate=u),u}),n()(),i(11,"div",6)(12,"label",9),o(13,"To"),n(),i(14,"input",10),H("ngModelChange",function(u){return I(r.toDate,u)||(r.toDate=u),u}),n()(),i(15,"div",6)(16,"label",11),o(17,"Type"),n(),i(18,"select",12),H("ngModelChange",function(u){return I(r.typeFilter,u)||(r.typeFilter=u),u}),b("ngModelChange",function(){return r.load()}),i(19,"option",13),o(20,"All"),n(),i(21,"option",14),o(22,"Events"),n(),i(23,"option",15),o(24,"Teams"),n()()(),i(25,"button",16),b("click",function(){return r.load()}),i(26,"mat-icon"),o(27,"filter_alt"),n(),i(28,"span",17),o(29,"Apply"),n()(),i(30,"button",18),b("click",function(){return r.clearDates()}),o(31,"All time"),n()(),g(32,Gt,95,26),n()()),d&2&&(a(),p("hideBanner",!0),a(),p("ngStyle",ie(13,mt,r.fuseConfig.pageWidth&&!r.isMobile?r.fuseConfig.pageWidth+"%":"
1100%")),a(),p("loaderId","loader-logo-studio-dashboard")("fgsSize",75),a(7),k("ngModel",r.fromDate),p("disabled",r.loading),a(4),k("ngModel",r.toDate),p("disabled",r.loading),a(4),k("ngModel",r.typeFilter),p("disabled",r.loading),a(7),p("disabled",r.loading),a(5),p("disabled",r.loading),a(2),_(r.hasLoaded?32:-1))},dependencies:[R,oe,se,me,pe,le,ce,re,de,Pe,Me,Ee,ye,F,z,j,$,ze,Le,Te,Ae,ke,we,Qe,Ie,He,Be,Re,je,V,$e,ae,B],styles:["#HQPage[_ngcontent-%COMP%] .intro[_ngcontent-%COMP%]{max-width:1000px;color:#4b5f77;font-size:14px;line-height:1.5;margin:4px 0 16px}#HQPage[_ngcontent-%COMP%] .filter-bar[_ngcontent-%COMP%]{display:flex;align-items:flex-end;flex-wrap:wrap;gap:12px;margin:0 0 8px}#HQPage[_ngcontent-%COMP%] .filter-control[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:4px}#HQPage[_ngcontent-%COMP%] .filter-label[_ngcontent-%COMP%]{font-size:12px;font-weight:600;text-transform:uppercase;letter-spacing:.04em;color:#4b5f77}#HQPage[_ngcontent-%COMP%] .filter-control[_ngcontent-%COMP%] input[type=date][_ngcontent-%COMP%], #HQPage[_ngcontent-%COMP%] .filter-control[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{border:1px solid #d9e0ea;border-radius:8px;padding:8px 12px;font-size:14px;color:#0a2540;background:#fff}#HQPage[_ngcontent-%COMP%] .filter-control[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{appearance:auto;min-width:120px}#HQPage[_ngcontent-%COMP%] .apply-btn[_ngcontent-%COMP%]{background:#0a2540;color:#fff}#HQPage[_ngcontent-%COMP%] .info-message[_ngcontent-%COMP%]{background:#f5f7fa;border:1px solid #d9e0ea;border-radius:8px;color:#4b5f77}#HQPage[_ngcontent-%COMP%] .panel[_ngcontent-%COMP%]{margin-top:28px}#HQPage[_ngcontent-%COMP%] .results-heading[_ngcontent-%COMP%]{margin-bottom:12px}#HQPage[_ngcontent-%COMP%] .results-title[_ngcontent-%COMP%]{font-size:18px;font-weight:700;color:#0a2540;margin:0}#HQPage[_ngcontent-%COMP%] .results-subtitle[_ngcontent-%COMP%]{font-size:13px;color:#4b5f77;margin:2px 0 0}#HQPage[_ngcontent-%COMP%] .kpi-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:12px}#HQPage[_ngcontent-%COMP%] .kpi-card[_ngcontent-%COMP%]{border:1px solid #e3e8ef;border-radius:10px;background:#fff;padding:16px;text-align:center}#HQPage[_ngcontent-%COMP%] .kpi-card.highlight[_ngcontent-%COMP%]{background:#0a2540;border-color:#0a2540}#HQPage[_ngcontent-%COMP%] .kpi-card.highlight[_ngcontent-%COMP%] .kpi-value[_ngcontent-%COMP%]{color:#fff}#HQPage[_ngcontent-%COMP%] .kpi-card.highlight[_ngcontent-%COMP%] .kpi-label[_ngcontent-%COMP%]{color:#c7d2e0}#HQPage[_ngcontent-%COMP%] .kpi-value[_ngcontent-%COMP%]{font-size:28px;font-weight:800;color:#0a2540;line-height:1.1}#HQPage[_ngcontent-%COMP%] .kpi-label[_ngcontent-%COMP%]{font-size:12px;font-weight:600;text-transform:uppercase;letter-spacing:.03em;color:#4b5f77;margin-top:6px}#HQPage[_ngcontent-%COMP%] .revenue-row[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:16px;align-items:stretch}#HQPage[_ngcontent-%COMP%] .revenue-total[_ngcontent-%COMP%]{border:1px solid #0a2540;background:#0a2540;border-radius:10px;padding:20px 28px;color:#fff;
1min-width:200px;display:flex;flex-direction:column;justify-content:center}#HQPage[_ngcontent-%COMP%] .revenue-total-value[_ngcontent-%COMP%]{font-size:32px;font-weight:800;line-height:1.1}#HQPage[_ngcontent-%COMP%] .revenue-total-label[_ngcontent-%COMP%]{font-size:12px;font-weight:600;text-transform:uppercase;letter-spacing:.04em;color:#c7d2e0;margin-top:6px}#HQPage[_ngcontent-%COMP%] .tier-list[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:12px;flex:1}#HQPage[_ngcontent-%COMP%] .tier-card[_ngcontent-%COMP%]{border:1px solid #e3e8ef;border-radius:10px;background:#fff;padding:16px 20px;min-width:160px}#HQPage[_ngcontent-%COMP%] .tier-name[_ngcontent-%COMP%]{font-size:13px;font-weight:600;color:#4b5f77}#HQPage[_ngcontent-%COMP%] .tier-amount[_ngcontent-%COMP%]{font-size:22px;font-weight:800;color:#16a34a;margin-top:6px}#HQPage[_ngcontent-%COMP%] .tier-count[_ngcontent-%COMP%]{font-size:12px;color:#8190a5;margin-top:2px}#HQPage[_ngcontent-%COMP%] .style-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px;max-width:640px}#HQPage[_ngcontent-%COMP%] .style-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:140px 1fr 110px;align-items:center;gap:12px}#HQPage[_ngcontent-%COMP%] .style-name[_ngcontent-%COMP%]{font-size:13px;font-weight:600;color:#0a2540}#HQPage[_ngcontent-%COMP%] .style-bar-wrap[_ngcontent-%COMP%]{background:#eef2f7;border-radius:999px;
1height:14px;overflow:hidden}#HQPage[_ngcontent-%COMP%] .style-bar[_ngcontent-%COMP%]{height:100%;min-width:2px;background:#2b4f9e;border-radius:999px}#HQPage[_ngcontent-%COMP%] .style-count[_ngcontent-%COMP%]{font-size:13px;font-weight:700;color:#4b5f77;text-align:right}#HQPage[_ngcontent-%COMP%] .table-shell[_ngcontent-%COMP%]{border:1px solid #e3e8ef;border-radius:10px;overflow:auto}#HQPage[_ngcontent-%COMP%] table.mat-mdc-table[_ngcontent-%COMP%]{width:100%;background:#fff}#HQPage[_ngcontent-%COMP%] table.mat-mdc-table[_ngcontent-%COMP%] th.mat-mdc-header-cell[_ngcontent-%COMP%]{background:#0a2540;color:#fff;font-weight:600;white-space:nowrap}#HQPage[_ngcontent-%COMP%] table.mat-mdc-table[_ngcontent-%COMP%] th.mat-mdc-header-cell[_ngcontent-%COMP%] .mat-sort-header-arrow[_ngcontent-%COMP%]{color:#c7d2e0}#HQPage[_ngcontent-%COMP%] table.mat-mdc-table[_ngcontent-%COMP%] .right[_ngcontent-%COMP%]{text-align:right}#HQPage[_ngcontent-%COMP%] table.mat-mdc-table[_ngcontent-%COMP%] .center[_ngcontent-%COMP%]{text-align:center}#HQPage[_ngcontent-%COMP%] .type-chip[_ngcontent-%COMP%]{display:inline-block;font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.03em;padding:2px 8px;border-radius:999px;background:#e8eefb;color:#2b4f9e}#HQPage[_ngcontent-%COMP%] .type-chip.team[_ngcontent-%COMP%]{background:#e8f7ee;color:#1f7a44}#HQPage[_ngcontent-%COMP%] .view-btn[_ngcontent-%COMP%]{background:#0a2540;color:#fff}"]})}return t})();export{Dn as LogoStudioDashboardComponent};
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.