PageSourceSearch

https://music.cobrand.com/_next/static/chunks/5253-a05ee992ae93e556.js

js cobrand.com collected 2026-09-24 18:45:03 UTC 20,396 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5253],{624:(e,t,s)=>{s.d(t,{Y:()=>N,c:()=>S});var l=s(6029),a=s(75828),i=s.n(a),n=s(12482),r=s(19117),o=s(14027),c=s(42042),d=s(63804),u=s(99476),m=s(63752),x=s(12492),p=s(25984),h=s(83438),y=s(52499),g=s(59993),f=s(11321),v=s(40571),j=s(54043),_=s(20598),b=s(49956);let N=[{title:"Views",value:"play_count_delta"},{title:"Likes",value:"like_count_delta"},{title:"Comments",value:"comment_count_delta"},{title:"Shares",value:"share_count_delta"},{title:"Creates",value:"content_count_delta"},{title:"Engagement",value:"engagement_count_delta"},{title:"Lifetime Views",value:"play_count"},{title:"Lifetime Likes",value:"like_count"},{title:"Lifetime Comments",value:"comment_count"},{title:"Lifetime Shares",value:"share_count"},{title:"Lifetime Creates",value:"content_count"},{title:"Lifetime Engagement",value:"engagement_count"}],S=e=>{let{graphData:t,metricDropdownItems:s,isLoading:a,startDate:N,endDate:S,setStartDate:C,setEndDate:k,selectedMetricIndex:w,setSelectedMetricIndex:A,showTitle:T=!0,className:E,organizationId:I,segmentId:M,segmentIds:z,brandIds:O,hideAddChartEvent:P=!1,additionalControls:D,getSoundLinkTo:L,selectedMetrics:Q,setSelectorIsOpen:F,graphedMetrics:R,onGraphMetric:V,getMetricCardValue:q,brandId:$}=e,{data:H}=(e=>{let t=(0,r.MI)({needsAuthentication:!0});return(0,n.I)({queryKey:["BRANDS_FROM_SEGMENT",e],queryFn:()=>t("/brand/v2/list_brands_from_segment",{method:"POST",body:JSON.stringify(e)}),enabled:!!(e.organization_id&&e.segment_id)})})({segment_id:M,organization_id:I}),{data:K}=(0,o.P)(z?{segment_id__in:z,brand_id:$,start_date:N.format(c.a7),end_date:S.format(c.a7),organization_id:I}:{segment_id:M,brand_id:$,start_date:N.format(c.a7),end_date:S.format(c.a7),organization_id:I}),G=null==H?void 0:H.map(e=>e.id);return O&&O.length>0||G&&G.length,(0,l.jsxs)("div",{className:i()("space-y-6 py-10",E),children:[(0,l.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-8",children:[T?(0,l.jsxs)("div",{className:"space-y-1",children:[(0,l.jsx)(b.E,{className:"text-slate-800",typography:b.o.Subheadline,bold:!0,children:"Segment Performance"}),(0,l.jsx)(b.E,{className:"text-slate-500",typography:b.o.Footnote,children:"Aggregate content performance broken down by sounds, search terms, #hashtags, or @mentions used in this segment."})]}):null,(0,l.jsxs)(m.e,{children:[(0,l.jsx)(x.U,{startDate:N,endDate:S,onDateChange:(e,t)=>
1{e&&t&&(C(e),k(t))}}),D,(0,l.jsx)(p.m,{items:s,selectedIndex:w,onItemIndexChange:A,prefix:"Metric:"})]})]}),(0,l.jsxs)(j.X,{children:[a&&[1,2,3,4].map(e=>(0,l.jsx)(_.W,{},e)),!a&&Q.map(e=>{let s=R.find(t=>t.key===e.key);return(0,l.jsx)(v.f,{title:e.title,iconType:(0,d.tV)(e.source),isSelectable:!0,isSelected:!!s,colorHex:e.color,value:q(t,e.key),onClick:()=>V(e),linkTo:null==L?void 0:L(e)},e.key)})]}),(0,l.jsx)(g.l,{metrics:R,data:t,singleYAxis:!0,isLoading:a,chartEventPerDateData:K,organizationId:I,brandIds:O||G,segmentId:M||(null==z?void 0:z[0]),header:(0,l.jsxs)("div",{className:"flex flex-row items-start justify-between space-x-3",children:[(0,l.jsx)(y.A,{title:"By Sounds",startDate:N,endDate:S,subtitle:(0,l.jsx)(f.A,{})}),(0,l.jsxs)("div",{className:"flex flex-row items-start space-x-3",children:[!P&&(()=>{let e=M||(null==z?void 0:z[0]),t=O||G;return e?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(u.A,{organizationId:I,segmentId:e}),(0,l.jsx)("div",{className:"h-[12px] w-[1px] bg-slate-200"})]}):t&&t.length>0?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(u.A,{organizationId:I,brandIds:t}),(0,l.jsx)("div",{className:"h-[12px] w-[1px] bg-slate-200"})]}):null})(),(0,l.jsx)(h.A,{onClick:()=>F(e=>!e),text:"Select Sounds"})]})]})})]})}},11321:(e,t,s)=>{s.d(t,{A:()=>c});var l=s(6029),a=s(55729),i=s(83409),n=s(35430),r=s(74369),o=s(49956);let c=()=>{let[e,t]=(0,a.useState)(!1);return(0,l.jsxs)(l.Fragment,{children:[e&&(0,l.jsxs)(n.a,{isOpen:e,className:"flex max-h-full w-full max-w-[500px] flex-col overflow-hidden",children:[(0,l.jsx)(r.r,{title:"co:brand Sound Data",onClose:()=>t(!1)}),(0,l.jsxs)("div",{className:"flex-grow space-y-6 overflow-auto p-6",children:[(0,l.jsx)(o.E,{typography:o.o.Footnote,children:"co:brand sound data will update several times per day, although the specific time of day varies."}),(0,l.jsxs)(o.E,{typography:o.o.Footnote,children:["When looking at current day Creates, the 24 hour metric will compare the most recent Creates count in co:brand to the ",(0,l.jsx)("span",{className:"font-semibold",children:"same time of the prior day"}),". This provides accurate full-day metric. All historical dates lock in end-of-day values."]}),(0,l.jsx)("div",{children:(0,l.jsx)("a",{href:"https://help.cobrand.com/en/articles/14434709-song-data-faq",target:"_blank",rel:"noopener noreferrer",children:(0,l.jsx)(i.$n,{type:i.VQ.Link,size:i.Mp.Small,onClick:()=>{},text:"Common questions about co:brand sound data",textClassName:"underline"})})})]})]}),(0,l.jsx)(o.E,{typography:o.o.Caption2,className:"text-slate-400",children:" • "}),(0,l.jsx)(i.$n,{type:i.VQ.Text,size:i.Mp.Micro,onClick:()=>t(e=>!e),text:"Learn about co:brand sound data",textClassName:"underline",bold:!1})]})}},26727:(e,t,s)=>{s.d(t,{u:()=>c});var l=s(93486),a=s(19117),i=s(38718),n=s(93251),r=s(16932),o=s(50301);let c=()=>{let{addToast:e}=(0,l.Xm)(),t=(0,n.jE)(),s=(0,a.MI)({needsAuthentication:!0});return(0,r.n)({mutationFn:e=>s("/brand/v2/segments/manage_performance_subscription",{method:"POST",body:JSON.stringify(e)}),onMutate:async e=>{await t.cancelQueries({queryKey:[o.H,{segment_id:e.segment_id}]});let s=t.getQueryData([o.H,{segment_id:e.segment_id}]);return t.setQueryData([o.H,{segment_id:e.segment_id}],{...s,...e}),e.organization_id&&t.setQueryData([o.H,{organizationId:e.organization_id}],function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],s=t.find(t=>t.segment_id===e.segment_id);return s?[...t.filter(t=>t.segment_id!==e.segment_id),{...s,...e}]:t}),{previous:s,updated:e}},onError:(s,l,a)=>{t.setQueryData([o.H,{segment_id:null==a?void 0:a.updated.segment_id}],null==a?void 0:a.previous),e(i.K.Error,"Failed to update subscription")},onSettled:()=>{t.invalidateQueries({queryKey:[o.H]})}})}},29035:(e,t,s)=>{s.d(t,{A:()=>n});var l=s(6029),a=s(83409),i=s(82558);let n=e=>{let{links:t,setCursor:s}=e,{next:n,previous:r,has_next:o,has_previous:c}=t||{};return(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)(a.$n,{className:"rotate-180",type:a.VQ.Tertiary,size:a.Mp.Small,iconType:i.A.ArrowRight,disabled:!c,onClick:()=>{c&&s(r)}}),(0,l.jsx)(a.$n,{type:a.VQ.Tertiary,size:a.Mp.Small,iconType:i.A.ArrowRight,disabled:!o,onClick:()=>{o&&s(n)}})]})}},33724:(e,t,s)=>{s.d(t,{A:()=>r});var l=s(6029),a=s(16671),i=s(42042),n=s(49956);let r=e=>{let{startDate:t,endDate:s}=e,r=a.wu.find(e=>{var l,a;return(null==(l=e.startDate)?void 0:l.isSame(t,"d"))&&(null==(a=e.endDate)?void 0:a.isSame(s,"d"))});return(0,l.jsx)(n.E,{typography:n.o.Caption2,className:"text-slate-400",children:"".concat(r?"".concat(r.title," • "):"").concat(t&&s?"".concat(t.format(i._5)," → ").concat(s.format(i._5)):"All Time")})}},43584:(e,t,s)=>{s.d(t,{A:()=>b});var l=s(6029),a=s(82203),i=s.n(a),n=s(81278),r=s(55729),o=s(80589),c=s(50301),d=s(26727),u=s(83409),m=s(63752),x=s(82558),p=s(79895),h=s(74369),y=s(14430),g=s(10783),f=s(49956),v=s(38718),j=s(93486),_=s(96001);let b=e=>{let{segmentId:t,buttonType:s=u.VQ.Quaternary}=e,a=(0,n.useRouter)(),{addToast:b}=(0,j.Xm)(),{activeOrganizationId:N}=(0,o.A)(),[S,C]=(0,r.useState)(!1),[k,w]=(0,r.useState)(!1),{data:A}=(0,c.Y)({segment_id:t,organization_id:N}),T=(0,d.u)();(0,r.useEffect)(()=>{A&&w(A.is_subscribed)},[A,S]);let E=(0,l.jsxs)(y.i,{className:"w-[460px] !rounded-2xl !p-0",children:[(0,l.jsx)(h.r,{title:"Alerts"}),(0,l.jsx)("div",{className:"flex flex-col divide-y divide-slate-200 p-6 [&>*:first-child]:pt-0 [&>*:last-child]:pb-0 [&>*]:py-4",children:(0,l.jsxs)("div",{className:"flex flex-row items-center justify-between space-x-8",children:[(0,l.jsxs)("div",{className:"flex flex-col space-y-1",children:[(0,l.jsx)(f.E,{bold:!0,className:"text-slate-600",typography:f.o.Footnote,children:"Daily Updates (Email Only)"}),(0,l.jsx)(f.E,{className:"text-slate-500",typography:f.o.Caption1,children:"Get daily performance update emails for this song."})]}),(0,l.jsx)(_.l,{isToggled:k,onToggle:e=>w(e)})]})}),(0,l.jsxs)(p.j,{className:"justify-between",children:[(0,l.jsxs)(f.E,{typography:f.o.Caption1,className:"text-slate-400",children:["See"," ",(0,l.jsx)(i(),{href:{pathname:"/settings/",query:{...a.query,tab:"notifications-&-alerts"}},className:"text-blue-600 underline",children:"Settings"})," ","for all alert configs."]}
1),(0,l.jsxs)(m.e,{children:[(0,l.jsx)(u.$n,{type:u.VQ.Quaternary,size:u.Mp.Small,onClick:()=>C(!1),text:"Cancel"}),(0,l.jsx)(u.$n,{type:u.VQ.Primary,size:u.Mp.Small,onClick:()=>{if(t){let e=[];k!==(null==A?void 0:A.is_subscribed)&&e.push(T.mutateAsync({organization_id:N,segment_id:t,is_subscribed:k})),Promise.all(e).then(()=>{b(v.K.Success,"Alerts Configurations Saved")}).catch(()=>{b(v.K.Error,"Failed to Save Alerts Configurations")})}},disabled:k===(null==A?void 0:A.is_subscribed),text:"Save Changes",loading:T.isPending})]})]})]}),I=null==A?void 0:A.is_subscribed;return(0,l.jsx)(g.AM,{content:E,isOpen:S,onOutsideClick:()=>C(!1),align:g.bq.End,children:(0,l.jsx)(u.$n,{type:s,size:u.Mp.Small,onClick:()=>C(e=>!e),iconType:x.A.Notification,tooltipTitle:"Alert Configurations",text:I?"On":"Off"})})}},50301:(e,t,s)=>{s.d(t,{H:()=>i,Y:()=>n});var l=s(19117),a=s(12482);let i="PERFORMANCE_SUBSCRIPTION",n=e=>{let{segment_id:t,organization_id:s}=e,n=(0,l.MI)({needsAuthentication:!0});return(0,a.I)({queryKey:[i,{segment_id:t,organization_id:s}],queryFn:()=>n("/brand/v2/segments/performance_subscription_detail",{method:"POST",body:JSON.stringify({segment_id:t,organization_id:s})}),enabled:!!(s&&t)})}},52499:(e,t,s)=>{s.d(t,{A:()=>n});var l=s(6029),a=s(33724),i=s(49956);let n=e=>{let{title:t,startDate:s,endDate:n,subtitle:r}=e;return(0,l.jsxs)("div",{className:"space-y-1",children:[(0,l.jsx)(i.E,{typography:i.o.Subheadline,bold:!0,children:t}),(0,l.jsxs)("div",{className:"flex flex-row flex-wrap items-center gap-1",children:[(0,l.jsx)(a.A,{startDate:s,endDate:n}),r]})]})}},55824:(e,t,s)=>{s.d(t,{A:()=>v});var l=s(6029),a=s(55729),i=s(624),n=s(20884),r=s(91550),o=s(20300),c=s(83409),d=s(63752),u=s(82558),m=s(85077),x=s(35430),p=s(74369),h=s(75234),y=s(49616),g=s(24447),f=s(49956);let v=e=>{let{isOpen:t,onClose:s,selectedMetrics:v,setSelectedMetrics:j,maxNumOfSelectedMetrics:_,useQueryResults:b,orderBy:N,orderDirection:S,setOrderBy:C,setOrderDirection:k}=e,[w,A]=(0,a.useState)(v),{data:T,isLoading:E,fetchNextPage:I,hasNextPage:M,isFetchingNextPage:z}=b;(0,a.useEffect)(()=>{t&&A(v)},[t]);let O=(0,a.useRef)(null),P=(null==T?void 0:T.pages.flatMap(e=>(null==e?void 0:e.items)||[]))||[],D=[{key:"metric",title:"Sound",colspan:2,cell:e=>{let{row:t}=e;return(0,l.jsx)(y.A,{title:t.title,authorName:t.author_name,platform:t.platform,hrefUrl:t.url||(0,o.GP)(t),coverUrl:t.cover_url,playUrl:t.play_url,additionalThumbnailElements:(0,l.jsx)(h.A,{sound:t})})},sticky:!0},...i.Y.map(e=>({key:"summary__".concat(e.value),title:e.value.includes("delta")?"".concat(e.title," (24h)"):e.title,colspan:.75,cell:m.r,sortable:!0}))];return(0,l.jsxs)(x.a,{isOpen:t,className:"flex h-full w-full flex-col overflow-hidden",children:[(0,l.jsx)(p.r,{title:"Customize Metrics",onClose:s}),(0,l.jsxs)("div",{className:"flex w-full flex-grow flex-col divide-slate-200 overflow-hidden max-md:divide-y md:flex-row md:divide-x",children:[(0,l.jsx)("div",{className:"flex flex-col overflow-hidden",children:(0,l.jsx)(g.XI,{headers:D,data:P,pageSize:25,isLoading:E||z,onRowClick:e=>{let t=[...w],s=t.findIndex(t=>t.key===e.id);s>=0?t.splice(s,1):w.length<_&&t.push({key:e.id,title:e.title||"",unit:r.N.Number,source:e.platform}),A(t)},sort:N,sortDirection:S,onSortChange:(e,t)=>
1{C(e),k(t)},isMultiselect:!0,selectedRows:w.map(e=>({id:e.key})),shouldDisableMultiselect:e=>!w.find(t=>t.key===e.id)&&w.length>=_,ref:O,onScroll:()=>{(()=>{let e=O.current;if(e){let t=e.scrollHeight<=e.clientHeight,s=e.scrollTop+e.clientHeight>=e.scrollHeight-300;(t||s)&&M&&!z&&I()}})()},className:"flex-grow"})}),(0,l.jsxs)("div",{className:"flex min-w-[400px] flex-col overflow-hidden",children:[(0,l.jsxs)("div",{className:"flex flex-row justify-between px-6 pb-3 pt-6",children:[(0,l.jsx)(f.E,{typography:f.o.Caption2,bold:!0,className:"uppercase text-slate-500",children:"".concat(w.length,"/").concat(_," Selected")}),(0,l.jsx)(c.$n,{type:c.VQ.Link,size:c.Mp.Small,onClick:()=>A([]),text:"Clear All"})]}),(0,l.jsx)("div",{className:"flex-grow overflow-auto",children:w.map(e=>(0,l.jsxs)(a.Fragment,{children:[(0,l.jsxs)("div",{className:"group flex flex-row items-center justify-between space-x-3 px-6 py-3 transition hover:bg-slate-50",children:[(0,l.jsxs)("div",{className:"flex flex-row items-center space-x-1",children:[(0,l.jsx)(u.I,{type:(0,n.x)(e.source),size:16,className:"fill-slate-500 transition group-hover:fill-slate-800"}),(0,l.jsx)(f.E,{typography:f.o.Footnote,bold:!0,className:"text-slate-500 transition group-hover:text-slate-800",children:e.title})]}),(0,l.jsx)(c.$n,{type:c.VQ.IconOnly,size:c.Mp.Small,onClick:()=>A(t=>t.filter(t=>t.key!==e.key)),iconType:u.A.Clear,className:"opacity-0 transition group-hover:opacity-100"})]}),(0,l.jsx)("div",{className:"px-6",children:(0,l.jsx)("div",{className:"w-full border-b border-slate-100"})})]},"sound-graph-metric-selector__selected__".concat(e.key)))}),(0,l.jsxs)(d.e,{className:"justify-end p-4",children:[(0,l.jsx)(c.$n,{className:"w-full",type:c.VQ.Tertiary,text:"Cancel",size:c.Mp.Small,onClick:s}),(0,l.jsx)(c.$n,{className:"w-full",type:c.VQ.Primary,text:"Apply Selected",size:c.Mp.Small,onClick:()=>{j(w),s()},disabled:!(()=>{let e=v.map(e=>e.key).sort(),t=w.map(e=>e.key).sort();return JSON.stringify(e)!==JSON.stringify(t)})()||!w.length})]})]})]})]})}},60588:(e,t,s)=>{s.d(t,{A:()=>h});var l=s(6029),a=s(55729),i=s(83409),n=s(63752),r=s(99998),o=s(79895),c=s(10783),d=s(92711),u=s(19117),m=s(12482),x=s(93251),p=s(16932);let h=e=>{let{organizationId:t,segmentId:s,buttonType:h=i.VQ.Quaternary}=e,[y,g]=(0,a.useState)(!1),{data:f,isLoading:v}=(e=>{let{segmentId:t,organizationId:s}=e,l=(0,u.MI)({needsAuthentication:!0});return(0,m.I)({queryKey:["LIST_SEGMENT_PERFORMANCE_EMAILS",{segmentId:t,organizationId:s}],queryFn:()=>l("/brand/v2/list_segment_performance_subscription_emails",{method:"POST",body:JSON.stringify({segment_id:t,organization_id:s})}),enabled:!!(t&&s)})})({segmentId:s,organizationId:t}),[j,_]=(0,a.useState)(""),{update:b}=(e=>{let{segmentId:t,organizationId:s}=e,l=(0,u.MI)({needsAuthentication:!0}),a=(0,x.jE)();return{update:(0,p.n)({mutationFn:e=>l("/brand/v2/update_segment_performance_subscription_emails",{method:"POST",body:JSON.stringify({segment_id:t,email_addresses:e,organization_id:s})}),onSuccess:()=>{a.invalidateQueries({queryKey:["LIST_SEGMENT_PERFORMANCE_EMAILS"]}),a.invalidateQueries({queryKey:["PERFORMANCE_SUBSCRIPTION"]})}})}})({organizationId:t,segmentId:s});(0,a.useEffect)(()=>{!f||v||j||_(f.map(e=>e.email_address).join("\n"))},[f,v,j]);let N=(0,l.jsx)("div",{className:"min-w-[420px] max-w-[420px] rounded-lg border border-slate-200 bg-white",children:v?(0,l.jsx)("div",{className:"p-4",children:(0,l.jsx)(r.I,{className:"fill-primary-600",size:16})}):(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{className:"space-y-2 p-4",children:(0,l.jsx)(d.f,{className:"w-full",placeholder:"[email protected]",value:j,onChange:e=>_(e.target.value)})}),(0,l.jsx)(o.j,{className:"flex justify-end",children:(0,l.jsxs)(n.e,{children:[(0,l.jsx)(i.$n,{type:i.VQ.Tertiary,size:i.Mp.Small,text:"Cancel",onClick:()=>g(!1)}),(0,l.jsx)(i.$n,{type:i.VQ.Primary,size:i.Mp.Small,text:"Save",loading:b.isPending,onClick:()=>{let e=j.split("\n").map(e=>e.trim()).filter(Boolean);b.mutateAsync(e).then(()=>{g(!1)})}})]})})]})});return(0,l.jsx)(c.AM,{content:N,isOpen:y,align:c.bq.End,children:(0,l.jsx)(i.$n,{type:h,text:"\uD83D\uDCE7 Email Overlord \uD83D\uDEE0️",size:i.Mp.Small,onClick:()=>{g(e=>!e)}})})}},83598:(e,t,s)=>{s.d(t,{u:()=>A,W:()=>T});
1var l=s(6029),a=s(75828),i=s.n(a),n=s(72152),r=s(45063),o=s(63752),c=s(20284),d=s(82558),u=s(85077),m=s(29035),x=s(1420),p=s(48290),h=s(85889),y=s(24447),g=s(15935),f=s(55729),v=s(91550),j=s(60907),_=s(42042),b=s(29571),N=s(91401),S=s(49956);let C=e=>{var t;let{country:s}=e,a=(0,f.useMemo)(()=>{if(s.country_code){var e;let t=null==(e=s.country_code)?void 0:e.toLowerCase();return(0,l.jsx)("img",{className:"block",src:"https://flagcdn.com/16x12/".concat(t,".png"),srcSet:"https://flagcdn.com/32x24/".concat(t,".png 2x,\n    https://flagcdn.com/48x36/").concat(t,".png 3x"),width:"16",height:"12",alt:s.country_code})}},[s.country_code]),i=j.ax.get(null==(t=s.country_code)?void 0:t.toUpperCase());return(0,l.jsxs)("div",{className:"w-full space-y-1",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between",children:[(0,l.jsxs)("div",{className:"flex items-center gap-1",children:[a,(0,l.jsx)(S.E,{typography:S.o.Caption1,bold:!0,children:i||"Other"})]}),(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[void 0!==s.video_count?(0,l.jsx)(b.X,{iconType:d.A.Video,value:s.video_count}):null,void 0!==s.play_count?(0,l.jsx)(b.X,{iconType:d.A.Play,value:s.play_count}):null,(0,l.jsx)(S.E,{className:"text-slate-200",typography:S.o.Caption1,children:"|"}),(0,l.jsx)(S.E,{className:"text-slate-500",typography:S.o.Caption1,children:(0,_.ZV)(s.share_of_videos,v.N.Percent)})]})]}),(0,l.jsx)(N.A,{progress:100*s.share_of_videos})]})};var k=s(26258);let w=e=>{let{row:t,header:s}=e,a=t[s.key],i=j.ax.get(null==a?void 0:a.toUpperCase());return a?(0,l.jsxs)("div",{className:"flex h-full items-center space-x-3",children:[(e=>{if(!e)return null;let t=null==e?void 0:e.toLowerCase();return(0,l.jsx)("img",{src:"https://flagcdn.com/24x18/".concat(t,".png"),srcSet:"https://flagcdn.com/48x36/".concat(t,".png 2x,\n    https://flagcdn.com/72x54/").concat(t,".png 3x"),width:"24",height:"18",alt:i})})(a),(0,l.jsx)(S.E,{className:"text-slate-600",typography:S.o.Footnote,bold:!0,children:i||"Other"})]}):(0,l.jsx)(k.A,{})},A=15,T=e=>{let{data:t,isLoading:s,cursor:a,pageSize:f,setPageSize:v,setCursor:j,displayMode:_,setDisplayMode:b,sectionSubtitle:N,hideControls:S,platforms:k,setPlatforms:A,orderBy:T,orderDirection:E,onOrderChange:I}=e,M=null==t?void 0:t.items.map(e=>({...e,id:e.country_code})),z=void 0!==T&&void 0!==I,O=[{key:"country_code",title:"Country",colspan:1.5,cell:w},{key:"video_count",title:"Total Creates",colspan:1,cell:u.r,sortable:z},{key:"play_count",title:"Total Views",colspan:1,cell:u.r,sortable:z},{key:"heart_count",title:"Total Likes",colspan:1,cell:u.r,sortable:z},{key:"comment_count",title:"Total Comments",colspan:1,cell:u.r,sortable:z},{key:"share_count",title:"Total Shares",colspan:1,cell:u.r,sortable:z}],P="GRID"===_&&z;return(0,l.jsxs)("div",{className:"space-y-6 py-10",children:[(0,l.jsxs)("div",{className:"space-y-4",children:[(0,l.jsxs)("div",{className:"space-y-7",children:[(0,l.jsx)(x._,{title:"Performance Distribution by Country",subtitle:N}),!S&&(0,l.jsxs)("div",{className:i()("flex flex-row items-center gap-2",{"justify-between":P,"justify-end":!P}),children:[P&&(0,l.jsx)(h.J,{headers:O,sortKey:T,onSortByChange:(e,t)=>
1I(e,t?n.m.Asc:n.m.Desc)}),(0,l.jsxs)(o.e,{children:[(0,l.jsx)(m.A,{links:null==t?void 0:t.links,setCursor:j}),(0,l.jsx)(p.I,{tabs:[{title:"List",iconType:d.A.TextBulletList},{title:"Grid",iconType:d.A.Grid}],index:+("LIST"!==_),onTabChange:e=>{b(0===e?"LIST":"GRID")}})]})]})]}),(0,l.jsx)(c.B,{availablePlatforms:[{title:"TikTok",iconType:d.A.TikTok,value:r.O.TikTok},{title:"Instagram",iconType:d.A.Instagram,value:r.O.Instagram},{title:"YouTube",iconType:d.A.Youtube,value:r.O.Youtube}],selectedPlatforms:k,onChange:A})]}),"GRID"===_?(0,l.jsx)("div",{className:"grid grid-flow-col grid-cols-3 grid-rows-5 gap-x-8 gap-y-5",children:null==t?void 0:t.items.map(e=>(0,l.jsx)(C,{country:e},e.country_code))}):null,"LIST"===_?(0,l.jsx)(y.XI,{headers:O,data:M,isLoading:s,hideFooter:S,pageSize:f,resetTableData:()=>{j(void 0)},footer:(0,l.jsx)(g.A,{cursor:a,links:null==t?void 0:t.links,onPageChange:e=>{j(e)},pageSize:f,setPageSize:v}),sort:T,sortDirection:E,onSortChange:I}):null]})}}}]);

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.