PageSourceSearch

https://claibe.com/_next/static/chunks/8728.50a70999cfd783c9.js

js claibe.com collected 2026-09-24 14:42:04 UTC 13,895 bytes, 1 lines download raw bytes

1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},a=(new e.Error).stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="d7746aa9-e519-46b5-b5a3-6ea1745bb60b",e._sentryDebugIdIdentifier="sentry-dbid-d7746aa9-e519-46b5-b5a3-6ea1745bb60b")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8728],{8728:(e,a,t)=>{t.r(a),t.d(a,{DashboardChartsGrid:()=>g});var r=t(50669),i=t(27677),n=t.n(i),s=t(45246),l=t(43534),d=t(58074),o=t(80926),c=t(91717),m=t(73805),u=t(78983);let x={free:m.Uv.planFree,trial:m.Uv.planTrial,pro:m.Uv.planPro,enterprise:m.Uv.planEnterprise,"no-plan":m.Uv.planFree,"free-pro":m.Uv.planTrial};function p(e,a){let t=e.toLowerCase();if(x[t])return x[t];let r=((e,a,t,r)=>{let i=(null==a?void 0:a.trim())||r,n=i.toLowerCase();return"gratis pro"===n?{id:"free-pro",name:"Gratis Pro"}:n.includes("enterprise")?{id:"enterprise",name:"Enterprise"}:n.includes("pro")?{id:"pro",name:"Pro"}:{id:e||i,name:i}})(e,a,0,a);return"enterprise"===r.id?x.enterprise:"pro"===r.id?x.pro:r.name.toLowerCase().includes("trial")?x.trial:x.free}function h(e){let{message:a}=e;return(0,r.jsx)("div",{className:"bg-hairline-soft/50 text-claibe-muted flex h-full items-center justify-center rounded-[8px] px-6 text-center text-sm",children:a})}function g(e){var a,t,i,x,g,b,f;let{startDate:v,endDate:y}=e,{data:j,error:k,isLoading:N}=(0,d.Ay)("/api/super-admin/stats/user-activity?startDate=".concat(v,"&endDate=").concat(y),u.V),{data:w,error:L,isLoading:F}=(0,d.Ay)("/api/super-admin/stats/token-usage?startDate=".concat(v,"&endDate=").concat(y),u.V),{data:D,error:S,isLoading:K}=(0,d.Ay)("/api/super-admin/stats/plans",u.V),{data:A,error:I,isLoading:z}=(0,d.Ay)("/api/super-admin/stats/organization-usage?startDate=".concat(v,"&endDate=").concat(y,"&sortBy=lastActivity&sortOrder=desc"),u.V),U=e=>(0,o.el)(e,{startDate:v,endDate:y}),T=null!=(i=null==j||null==(a=j[j.length-1])?void 0:a.activeUsers)?i:0,M=null!=(x=null==w||null==(t=w[w.length-1])?void 0:t.tokens)?x:0,P=null!=(g=null==D?void 0:D.plans)?g:[],C=P.reduce((e,a)=>e+a.count,0),E=null!=(b=null==D?void 0:D.payingOrganizations)?b:0,W=C>0?(E/C*100).toLocaleString("da-DK",{maximumFractionDigits:1}):"0",_=(null!=w?w:[]).slice(-14).map((e,a,t)=>{let r=a===t.length-1,i=a===t.length-2,n=m.Uv.rampSoft;return r?n=m.Uv.rampPeak:i?n=m.Uv.rampStrong:a>=t.length-4&&(n=m.Uv.rampMid),{...e,fill:n}});return(0,r.jsxs)("div",{className:"space-y-7",children:[(0,r.jsxs)("section",{"aria-labelledby":"dashboard-trends-heading",className:"space-y-3",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("h2",{id:"dashboard-trends-heading",className:"text-claibe-dark text-[14px] font-semibold",children:"Tendenser i den valgte periode"}),(0,r.jsx)("p",{className:"text-claibe-muted mt-1 text-xs",children:"Brug kurverne til at se retningen; KPI’erne ovenfor viser niveau og \xe6ndring."})]}),(0,r.jsxs)("div",{className:"grid gap-4 lg:grid-cols-2",children:[(0,r.jsx)(m.wm,{badge:(0,r.jsxs)("span",{className:"bg-hairline-soft text-claibe-muted shrink-0 rounded-[6px] px-2 py-0.5 text-[11px] font-medium tabular-nums",children:["Seneste punkt ",(0,o.i5)(T)]}),title:"Brugeraktivitet",children:(0,r.jsx)(m.EW,{ariaLabel:"Aktive brugere i den valgte periode",data:j,emptyMessage:"Ingen brugeraktivitet i perioden",error:k&&!j?k:void 0,errorMessage:"Brugeraktiviteten kunne ikke hentes",isLoading:N,series:[{dataKey:"activeUsers",label:"Aktive brugere",color:m.Uv.primary}],showLegend:!1,tooltipLabelFormatter:U,xKey:"date",xTickFormatter:U,yWidth:32})}),(0,r.jsx)(m.wm,{badge:(0,r.jsxs)("span",{className:"bg-hairline-soft text-claibe-muted shrink-0 rounded-[6px] px-2 py-0.5 text-[11px] font-medium tabular-nums",children:["Seneste punkt ",(0,o.i5)(M)]}),title:"Tokenforbrug",children:(0,r.jsx)(m.N1,{ariaLabel:"Tokenforbrug i den valgte periode",data:_,emptyMessage:"Intet tokenforbrug i perioden",error:L&&!w?L:void 0,errorMessage:"Tokenforbruget kunne ikke hentes",isLoading:F,series:[{dataKey:"tokens",label:"Tokens brugt",color:m.Uv.primary,colorKey:"fill"}],showLegend:!1,tooltipLabelFormatter:U,xKey:"date",xTickFormatter:U,yTickFormatter:o.ZV})})]})]}),(0,r.jsxs)("section",{"aria-labelledby":"dashboard-portfolio-detail-heading",className:"space-y-3",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("h2",{id:"dashboard-portfolio-detail-heading",className:"text-claibe-dark text-[14px] font-semibold",children:"Kundeportef\xf8lje"}),(0,r.jsx)("p",{className:"text-claibe-muted mt-1 text-xs",children:"Planfordelingen er et \xf8jebliksbillede; aktivitetslisten f\xf8lger den valgte periode."})]}),(0,r.jsxs)("div",{className:"grid gap-4 lg:grid-cols-2",children:[(0,r.jsx)(c.iv,{action:(0,r.jsx)(c.qs,{label:"Lige nu",tone:"neutral"}),title:"Planfordeling",children:K?(0,r.jsx)("div",{className:"admin-shimmer h-40 rounded"}):S&&!D?(0,r.jsx)("div",{className:"h-40",children:(0,r.jsx)(h,{message:"Planfordelingen kunne ikke hentes"})}):0===P.length?(0,r.jsx)(h,{message:"Ingen organisationer at fordele"}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"mb-4 flex h-2.5 overflow-hidden rounded-full",children:P.map(e=>{let a=C>0?e.count/C*100:0;return a<=0?null:(0,r.jsx)("div",{style:{width:"".concat(a,"%"),backgroundColor:p(e.id,e.name)},title:"".concat(e.name," ").concat(a.toFixed(1),"%")},e.id)})}),(0,r.jsx)("ul",{className:"space-y-2",children:P.map(e=>(0,r.jsxs)("li",{className:"flex items-center justify-between text-[13px]",children:[(0,r.jsxs)("span",{className:"text-claibe-ink-tertiary flex items-center gap-2",children:[(0,r.jsx)("span",{className:"size-2 roun
1ded-full",style:{backgroundColor:p(e.id,e.name)}}),e.name]}),(0,r.jsx)("span",{className:"text-claibe-muted tabular-nums",children:(0,o.i5)(e.count)})]},e.id))}),(0,r.jsxs)("p",{className:"text-claibe-muted-soft mt-4 text-[12.5px]",children:[W," % af alle organisationer betaler"]})]})}),(0,r.jsx)(c.iv,{action:(0,r.jsx)(n(),{href:"/super-admin/organizations",className:"text-claibe-primary-hover text-[12.5px] font-medium hover:underline",children:"Se alle →"}),title:"Senest aktive i perioden",children:z?(0,r.jsx)("div",{className:"space-y-2",children:Array.from({length:5}).map((e,a)=>(0,r.jsx)("div",{className:"admin-shimmer h-10 rounded"},a))}):I&&!A?(0,r.jsx)("div",{className:"h-40",children:(0,r.jsx)(h,{message:"Aktive organisationer kunne ikke hentes"})}):(null!=(f=null==A?void 0:A.length)?f:0)===0?(0,r.jsx)("div",{className:"h-40",children:(0,r.jsx)(h,{message:"Ingen organisationer var aktive i perioden"})}):(0,r.jsx)("ul",{className:"divide-hairline-soft divide-y",children:(null!=A?A:[]).slice(0,5).map(e=>(0,r.jsx)("li",{children:(0,r.jsxs)(n(),{href:"/super-admin/organizations/".concat(e.organizationId),className:"hover:bg-claibe-accent-tint/45 focus-visible:ring-claibe-primary/30 flex min-h-11 items-center gap-3 rounded px-1 py-2.5 focus-visible:ring-2 focus-visible:outline-none",children:[(0,r.jsx)("span",{className:"bg-claibe-accent-tint text-claibe-primary-hover inline-flex size-8 shrink-0 items-center justify-center rounded-[7px] text-[11px] font-semibold",children:e.organizationName.slice(0,2).toUpperCase()}),(0,r.jsxs)("span",{className:"min-w-0 flex-1",children:[(0,r.jsx)("span",{className:"text-claibe-dark block truncate text-[13px] font-semibold",children:e.organizationName}),(0,r.jsx)("span",{className:"text-claibe-muted-soft block truncate text-[11.5px]",children:(0,s.m)(new Date(e.lastActivity),{addSuffix:!0,locale:l.da})})]}),(0,r.jsx)(c.qs,{label:"Aktiv",tone:"green",className:"shrink-0"})]})},e.organizationId))})})]})]})]})}},73805:(e,a,t)=>{t.d(a,{Uv:()=>h,N1:()=>w,wm:()=>k,EW:()=>N,sN:()=>b});var r=t(50669),i=t(77939),n=t(45678),s=t(17668),l=t(75903),d=t(84716),o=t(69368),c=t(51596),m=t(31959),u=t(69839),x=t(3201),p=t(25813);let h={primary:"#5d59de",secondary:"#7c74e8",tertiary:"#c9bffa",rampSoft:"#dcd7f6",rampMid:"#c9bffa",rampStrong:"#7c74e8",rampPeak:"#5d59de",planFree:"#e9e7f2",planTrial:"#c9bffa",planPro:"#5d59de",planEnterprise:"#1a1a22",outcomeSuccess:"#5d59de",outcomeRefund:"#f0c464",outcomeFail:"#e28a8f",success:"#22c55e",warning:"#f59e0b",destructive:"#b4232a",muted:"#c9bffa",grid:"#f1eff6",tick:"#8b88a0"},g=[h.rampPeak,h.rampStrong,h.rampMid,h.rampSoft,h.planEnterprise,h.outcomeRefund];function b(e){return g[e%g.length]}function f(e){let{series:a}=e;return a.length<2?null:(0,r.jsx)("ul",{"aria-label":"Dataserier",className:"mb-2 flex flex-wrap gap-x-4 gap-y-1 text-xs",children:a.map(e=>(0,r.jsxs)("li",{className:"text-claibe-muted flex items-center gap-1.5",children:[(0,r.jsx)("span",{"aria-hidden":"true",className:"size-2 rounded-full",style:{backgroundColor:e.color}}),e.label]},e.dataKey))})}function v(e){let{ariaLabel:a,children:t,className:i,dataLength:n,emptyMessage:s,error:l,errorRecoveryMessage:d,errorMessage:o,height:c,isLoading:m,loadingLabel:u}=e,x={height:c};return m?(0,r.jsx)("div",{"aria-busy":"true","aria-label":u,className:(0,p.cn)("admin-shimmer rounded-[8px]",i),role:"status",style:x}):l?(0,r.jsxs)("div",{className:(0,p.cn)("border-claibe-danger-border bg-claibe-destructive-wash text-claibe-destructive flex items-center justify-center rounded-[8px] border px-6 text-center text-[13px]",i),role:"alert",style:x,children:[o,". ",d]}):0===n?(0,r.jsx)("div",{className:(0,p.cn)("text-claibe-muted-soft flex items-center justify-center rounded-[8px] px-6 text-center text-[13px]",i),role:"status",style:x,children:s}):(0,r.jsx)("div",{"aria-label":a,className:(0,p.cn)("flex min-w-0 flex-col",i),role:"group",style:x,children:t})}
1function y(){return{axisLine:!1,tick:{fontSize:10.5,fill:h.tick},tickLine:!1}}function j(e){return{contentStyle:{backgroundColor:"#ffffff",border:"1px solid var(--color-claibe-card-border)",borderRadius:"8px",boxShadow:"var(--shadow-claibe-popover)",fontSize:"12px"},cursor:{fill:"rgb(93 89 222 / 6%)"},formatter:(a,t)=>{var r,i;let n="number"==typeof a||"string"==typeof a?a:Array.isArray(a)?a.map(String).join(" – "):String(null!=a?a:""),s=String(null!=t?t:""),l=e.find(e=>e.label===s);return[null!=(i=null==l||null==(r=l.valueFormatter)?void 0:r.call(l,n))?i:"number"==typeof n?new Intl.NumberFormat("da-DK").format(n):n,s]}}}function k(e){let{badge:a,children:t,className:i,description:n,title:s}=e;return(0,r.jsxs)("section",{className:(0,p.cn)("border-claibe-card-border shadow-claibe-card rounded-[10px] border bg-white p-4",i),children:[(0,r.jsxs)("div",{className:"mb-3 flex items-start justify-between gap-3",children:[(0,r.jsxs)("div",{className:"min-w-0",children:[(0,r.jsx)("h3",{className:"text-claibe-dark flex items-center gap-2 text-[14px] font-semibold",children:s}),n?(0,r.jsx)("div",{className:"text-claibe-muted mt-1 text-xs",children:n}):null]}),a]}),t]})}function N(e){let{ariaLabel:a,className:t,data:m,emptyMessage:u,error:x,errorRecoveryMessage:p="Genindl\xe6s siden, f\xf8r tallene bruges til en beslutning.",errorMessage:g,height:b=208,isLoading:k,loadingLabel:N="Indl\xe6ser diagram",series:w,showLegend:L=!0,tooltipLabelFormatter:F,xKey:D,xTickAngle:S,xTickFormatter:K,xTickHeight:A,xTickTextAnchor:I,yTickFormatter:z,yWidth:U=40}=e,T=m?[...m]:[];return(0,r.jsxs)(v,{ariaLabel:a,className:t,dataLength:T.length,emptyMessage:u,error:x,errorRecoveryMessage:p,errorMessage:g,height:b,isLoading:k,loadingLabel:N,children:[L?(0,r.jsx)(f,{series:w}):null,(0,r.jsx)("div",{className:"min-h-0 flex-1",children:(0,r.jsx)(i.u,{width:"100%",height:"100%",initialDimension:{width:320,height:b},children:(0,r.jsxs)(n.b,{accessibilityLayer:!0,data:T,margin:{top:8,right:8,left:0},children:[(0,r.jsx)(s.d,{stroke:h.grid,vertical:!1}),(0,r.jsx)(l.W,{...y(),angle:S,dataKey:D,height:A,minTickGap:20,textAnchor:I,tickFormatter:K}),(0,r.jsx)(d.h,{...y(),allowDecimals:!1,tickFormatter:z,width:U}),(0,r.jsx)(o.m,{...j(w),labelFormatter:F}),w.map(e=>{var a;return(0,r.jsx)(c.N1,{activeDot:{r:4,fill:e.color,strokeWidth:0},dataKey:e.dataKey,dot:!1,isAnimationActive:!1,name:e.label,stroke:e.color,strokeDasharray:e.dashed?"4 4":void 0,strokeWidth:null!=(a=e.strokeWidth)?a:2,type:"monotone"},e.dataKey)})]})})})]})}function w(e){let{ariaLabel:a,barRadius:t=[4,4,0,0],className:n,data:c,emptyMessage:p,error:g,errorRecoveryMessage:b="Genindl\xe6s siden, f\xf8r tallene bruges til en beslutning.",errorMessage:k,height:N=208,isLoading:w,layout:L="vertical",categoryWidth:F=110,loadingLabel:D="Indl\xe6ser diagram",series:S,showLegend:K=!0,tooltipLabelFormatter:A,xKey:I,xTickAngle:z,xTickFormatter:U,xTickHeight:T,xTickTextAnchor:M,yTickFormatter:P,yWidth:C=40}=e,E=c?[...c]:[],W="horizontal"===L;return(0,r.jsxs)(v,{ariaLabel:a,className:n,dataLength:E.length,emptyMessage:p,error:g,errorRecoveryMessage:b,errorMessage:k,height:N,isLoading:w,loadingLabel:D,children:[K?(0,r.jsx)(f,{series:S}):null,(0,r.jsx)("div",{className:"min-h-0 flex-1",children:(0,r.jsx)(i.u,{width:"100%",height:"100%",initialDimension:{width:320,height:N},children:(0,r.jsxs)(m.E,{accessibilityLayer:!0,data:E,layout:W?"vertical":"horizontal",margin:{top:8,right:8,left:0},children:[(0,r.jsx)(s.d,{stroke:h.grid,horizontal:W,vertical:!!W}),W?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(l.W,{...y(),allowDecimals:!1,tickFormatter:P,type:"number"}),(0,r.jsx)(d.h,{...y(),dataKey:I,tickFormatter:U,type:"category",width:F})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(l.W,{...y(),angle:z,dataKey:I,height:T,minTickGap:12,textAnchor:M,tickFormatter:U}),(0,r.jsx)(d.h,{...y(),allowDecimals:!1,tickFormatter:P,width:C})]}),(0,r.jsx)(o.m,{...j(S),labelFormatter:A}),S.map(e=>(0,r.jsx)(u.yP,{dataKey:e.dataKey,fill:e.color,isAnimationActive:!1,name:e.label,radius:W?[0,4,4,0]:t,stackId:e.stackId,children:e.colorKey?E.map((a,t)=>{var i;return(0,r.jsx)(x.f,{fill:String(null!=(i=a[e.colorKey])?i:e.color)},"".concat(String(a[I]),"-").concat(t))}):null},e.dataKey))]})})})]})}}}]);

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.