"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[708],{31846:function(e,t,n){var a,l,i,r=n(52983);function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},o.apply(this,arguments)}t.Z=function(e){return r.createElement("svg",o({width:"1em",height:"1em",viewBox:"0 0 16 17",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),a||(a=r.createElement("circle",{cx:8,cy:8.5,r:8,fill:"url(#ai-insights_svg__paint0_linear_3694_18092)"})),l||(l=r.createElement("g",{clipPath:"url(#ai-insights_svg__clip0_3694_18092)",fill:"#fff"},r.createElement("path",{d:"M11.602 6.9c-.58 0-.904.576-.772 1.004L9.41 9.328a.815.815 0 00-.416 0l-1.02-1.02a.8.8 0 10-1.544 0l-1.824 1.82c-.428-.132-1.004.192-1.004.772 0 .44.36.8.8.8.58 0 .904-.576.772-1.004l1.82-1.824c.12.036.296.036.416 0l1.02 1.02a.8.8 0 101.544 0l1.424-1.42c.428.132 1.004-.192 1.004-.772 0-.44-.36-.8-.8-.8z"}),r.createElement("path",{d:"M9.202 7.3l.376-.828.824-.372-.824-.372-.376-.828-.368.828-.832.372.832.372.368.828zM4.602 8.1l.2-.8.8-.2-.8-.2-.2-.8-.2.8-.8.2.8.2.2.8z"}))),i||(i=r.createElement("defs",null,r.createElement("linearGradient",{id:"ai-insights_svg__paint0_linear_3694_18092",x1:0,y1:8.5,x2:16,y2:8.5,gradientUnits:"userSpaceOnUse"},r.createElement("stop",{stopColor:"#4800BA"}),r.createElement("stop",{offset:1,stopColor:"#3968FF"})),r.createElement("clipPath",{id:"ai-insights_svg__clip0_3694_18092"},r.createElement("path",{fill:"#fff",transform:"translate(3.201 3.7)",d:"M0 0h9.6v9.6H0z"})))))}},51741:function(e,t,n){var a,l,i,r,o,s,c=n(52983);function d(){return d=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},d.apply(this,arguments)}t.Z=function(e){return c.createElement("svg",d({width:"1em",height:"1em",viewBox:"0 0 201 141",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),a||(a=c.createElement("path",{stroke:"#C6C6C6",strokeDasharray:"5 5",d:"M.5.5h175v101H.5z"})),l||(l=c.createElement("path",{d:"M118 24.333H58c-3.667 0-6.667 3-6.667 6.667v40c0 3.667 3 6.667 6.667 6.667h60c3.667 0 6.667-3 6.667-6.667V31c0-3.667-3-6.667-6.667-6.667zM118 71H58V31h60v40zM96.333 47.667L84.667 62.7l-8.334-10.033-11.666 15h46.666l-15-20z",fill:"#fff"})),i||(i=c.createElement("circle",{opacity:.5,cx:176,cy:97,r:25,fill:"#F4F4F4"})),r||(r=c.createElement("circle",{cx:176,cy:97,r:17.5,fill:"#E0E0E0",stroke:"#fff",strokeWidth:5})),o||(o=c.createElement("g",{filter:"url(#image-placeholder_svg__filter0_d_613_42151)",fill:"#fff"},c.createElement("path",{d:"M194.875 120.625c.937 0 1.5-1.25.75-2l-17.75-18.25c-.687-.75-1.875-.25-1.875.813V128c0 1 1.125 1.562 1.875.812l5.375-5.562 3.312 8.062c.25.563.938.876 1.5.626l3.063-1.313c.563-.25.813-.937.563-1.5l-3.438-8.5h6.625z"}),c.createElement("path",{d:"M195.625 118.625l-.717.697.01.01.707-.707zm-17.75-18.25l-.737.676.01.011.01.01.717-.697zm0 28.437l.707.708.006-.006.006-.007-.719-.695zm5.375-5.562l.925-.38-.581-1.415-1.063 1.1.719.695zm3.312 8.062l-.924.381.005.013.006.013.913-.407zm1.5.626l-.393-.92-.013.006.406.914zm3.063-1.313l.394.919.012-.005-.406-.914zm.563-1.5l-.928.375.007.016.007.015.914-.406zm-3.438-8.5v-1h-1.483l.556 1.375.927-.375zm6.625 1c1.859 0 2.815-2.349 1.457-3.707l-1.414 1.414c.039.039.049.069.052.091a.204.204 0 01-.014.109.201.201 0 01-.061.084c-.012.01-.016.009-.02.009v2zm1.467-3.697l-17.75-18.25-1.434 1.394 17.75 18.25 1.434-1.394zm-17.73-18.229a2.035 2.035 0 00-2.326-.517c-.749.321-1.286 1.072-1.286 2.006h2c0-.075.019-.113.03-.13a.103.103 0 01.044-.037l.015-.005h.005l.008.004a.153.153 0 01.036.031l1.474-1.352zM175 101.188V128h2v-26.812h-2zM175 128c0 .895.513 1.638 1.24 1.972.749.343 1.667.222 2.342-.452l-1.414-1.415a.263.263 0 01-.058.046c-.01.005-.016.006-.018.007-.001 0-.007.001-.019-.005a.11.11 0 01-.045-.041A.196.196 0 01177 128h-2zm3.594 1.507l5.375-5.562-1.438-1.39-5.375 5.563 1.438 1.389zm3.731-5.877l3.313 8.063 1.849-.761-3.312-8.062-1.85.76zm3.324 8.089c.445 1.001 1.689 1.635 2.82 1.132l-.813-1.827h-.001l-.009.001a.18.18 0 01-.057-.014.225.225 0 01-.113-.105l-1.827.813zm2.807 1.138l3.063-1.313-.788-1.838-3.062 1.312.787 1.839zm3.075-1.318c1.087-.483 1.536-1.773 1.07-2.82l-1.827.812a.156.156 0 010 .113c-.016.043-.04.061-.055.067l.812 1.828zm1.084-2.789l-3.438-8.5-1.854.75 3.437 8.5 1.855-.75zm-4.365-7.125h6.625v-2h-6.625v2z"}))),s||(s=c.createElement("defs",null,c.createElement("filter",{id:"image-placeholder_svg__filter0_d_613_42151",x:172,y:99.625,width:28.375,height:40.563,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},c.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),c.createElement("feColorMatrix",{in:"SourceAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),c.createElement("feOffset",{dy:4}),c.createElement("feGaussianBlur",{stdDeviation:2}),c.createElement("feComposite",{in2:"hardAlpha",operator:"out"}),c.createElement("feColorMatrix",{values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"}),c.createElement("feBlend",{in2:"BackgroundImageFix",result:"effect1_dropShadow_613_42151"}),c.createElement("feBlend",{in:"SourceGraphic",in2:"effect1_dropShadow_613_42151",result:"shape"})))))}},27986:function(e,t,n){var a,l=n(52983);function i(){return i=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},i.apply(this,arguments)}t.Z=function(e){return l.createElement("svg",i({width:"1em",height:"1em",viewBox:"0 0 48 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),a||(a=l.createElement("path",{d:"M47.333 14.333H28.667V9.667h18.666v4.666zm0-14H28.667V5h18.666V.333zM28.667 23.667h18.666V19H28.667v4.667zM24 5v14a4.68 4.68 0 01-4.667 4.667h-14A4.68 4.68 0 01.667 19V5A4.68 4.68 0 015.333.333h14A4.68 4.68 0 0124 5zm-3.5 14l-5.25-7-4.084 5.273L8.25 13.75 4.167 19H20.5z",fill:"#D7E1FF"})))}},43648:function(e,t,n){var a=n(4271),l=n(38787),i=n(2001),r=n(54335),o=n(97458),s=n(52983),c=n(96525),d=n(10480),u=n(99108),m=n(58374),f=n(33144);t.Z=function(e){var t=e.graphConfig,n=e.templateType,v=e.graphType,h=e.paletteType,p=e.colorScheme,x=e.renderGraphFn,g=e.isApplied,j=void 0!==g&&g,_=e.className,b=void 0===_?"":_,w=e.children,y=e.renderBelowFn,N=void 0===y?function(){return(0,o.jsx)(o.Fragment,{})}:y,C=e.defaultColors,E=(0,s.useRef)(null),S=(0,r._)((0,u.Z0)(),2),k=S[0].chartColorsData,A=S[1];(0,s.useEffect)((function(){var e;(null===(e=k[v])||void 0===e?void 0:e.colors.length)||A((0,c.E)({chartColorsData:(0,i._)((0,l._)({},k),(0,a._)({},v,{colors:p,previewColors:p,isApplied:j,defaultColors:C}))}))}),[k,v,A]);var F=function(){var e,t,n=arguments.length>0&&void 0!==arguments[0]&&arguments[0],a=null!==(e=k[v])&&void 0!==e?e:{},l=p;n?l=(null===a||void 0===a||null===(t=a.previewColors)||void 0===t?void 0:t.length)?a.previewColors:a.colors:a.isApplied&&a.colors.length&&(l=a.colors);var i=l.map((function(e){return(0,f.RN)(e)}));return x({chartColors:l,textColors:i,isPreview:n})};return(0,o.jsxs)("div",{className:b||"",ref:E,children:[(0,o.jsxs)("div",{className:"flex justify-between items-center mb-2",id:"remove-from-download",children:[(0,o.jsx)(m.VGH,{config:t,wrapperClassName:"!mb-0"}),(0,o.jsx)(d.Z,{graphRef:E,fileName:t.title||t.graph_title,renderRightSideGraph:function(){return(0,o.jsx)("div",{className:"h-full w-full grid place-content-center",children:F(!0)})},graphType:v,paletteType:h,templateType:n})]}),w,F(!1),N()]})}},32758:function(e,t,n){var a=n(97458);n(52983);t.Z=function(e){var t=e.children,n=e.tooltip;return(0,a.jsx)("div",{"data-tooltip-content":n,"data-tooltip-id":"tooltip",className:"p-1 bg-primary-blue-20 text-primary-blue-60 text-xs leading-3 inline-block rounded",children:t})}},66129:function(e,t,n){var a=n(4271),l=n(38787),i=n(2001),r=n(38485),o=n(54335),s=n(97458),c=n(52983),d=n(96525),u=n(99108),m=n(58374),f=n(71014),v=n(10966),h=n(68423),p=n(33727),x=n(10480),g=n(3612);t.Z=function(e){var t=e.graphData,n=e.config,j=e.chartColors,_=void 0===j?[]:j,b=(0,r._)(e,["graphData","config","chartColors"]),w=(0,o._)((0,u.Z0)(),2),y=w[0].chartColorsData,N=w[1],C=t.data,E=void 0===C?{}:C,S=(0,c.useRef)(null),k=null===y||void 0===y?void 0:y[v.Hv.BRAND_VALUE_ANALYSIS];(0,c.useEffect)((function(){var e;(null===k||void 0===k||null===(e=k.colors)||void 0===e?void 0:e.length)||N((0,d.E)({chartColorsData:(0,i._)((0,l._)({},y),(0,a._)({},v.Hv.BRAND_VALUE_ANALYSIS,{colors:null!==_&&void 0!==_?_:m.ZE4,previewColors:null!==_&&void 0!==_?_:m.ZE4,isApplied:!1}))}))}),[k,N]);var A=function(e){var t=null!==k&&void 0!==k?k:{},a=t.colors,r=void 0===a?_:a,o=t.isApplied,c=t.previewColors,d=void 0===c?_:c,u=(null===d||void 0===d?void 0:d.length)?d:r;return o&&!e&&(u=null!==r&&void 0!==r?r:_),(0,s.jsx)(h.Z,{children:function(e){var t=e.width;return(0,s.jsx)(g.Z,(0,l._)({graphData:E,chartsConfig:(0,i._)((0,l._)({},n),{graph_title:""}),width:t,height:420,graphColors:u},b))}})};return(0,s.jsx)(p.Z,{children:(0,s.jsxs)("div",{className:"flex flex-col w-full h-full pt-7 px-7 bg-white",children:[(0,s.jsxs)("div",{className:"flex justify-between items-center",children:[(0,s.jsx)(m.VGH,{config:n}),(0,s.jsx)(x.Z,{graphRef:S,fileName:null===n||void 0===n?void 0:n.graph_title,renderRightSideGraph:function(){return A(!0)},graphType:v.Hv.BRAND_VALUE_ANALYSIS,paletteType:"five_color",templateType:f.k6.AD_EVAL_PHASE_TWO})]}),(0,s.jsx)("div",{ref:S,children:A(!1)})]})})}},37413:function(e,t,n){n.d(t,{Z:function(){return F}});var a,l=n(4271),i=n(38787),r=n(2001),o=n(38485),s=n(54335),c=n(97458),d=n(52983),u=n(96525),m=n(76975),f=n(50713),v=n(10480),h=n(40879),p=n(99108),x=n(50381),g=n(58374),j=n(33144),_=n(71014),b=n(10966),w=n(88480),y=n(13320),N=n(74447),C=n(36193);!function(e){e.VIEW_BY_AD="tag_values",e.VIEW_BY_BRAND_VALUE="brand_values"}(a||(a={}));var E=n(56435),S=function(e){var t=e.setFilteredGraphData,n=e.graphData,l=e.config,o=e.videoOptions,s=e.selectedFilter,u=void 0===s?"":s,m=n.data,f=n.brand_values,v=void 0===f?[]:f,h=n.tag_values,p=null!==o&&void 0!==o?o:void 0===h?[]:h,x=l.filter_config,b=void 0===x?{}:x,y=b.brand_value_dropdown_title,S=b.ad_dropdown_title,k=b.view_by_config,A=void 0===k?[]:k,F=(0,d.useRef)(null),T=(0,d.useMemo)((function(){var e,t;return{firstBrandOption:[null===(e=(0,j.BZ)(v))||void 0===e?void 0:e.value],firstAd:[null===(t=(0,j.BZ)(p))||void 0===t?void 0:t.value]}}),[p,v]),D=T.firstBrandOption,O=T.firstAd,Z=(0,d.useState)(v),M=Z[0],z=Z[1],I=(0,d.useState)(p),R=I[0],V=I[1],L=(0,d.useState)(a.VIEW_BY_AD),B=L[0],H=L[1],P=(0,d.useState)([]),G=P[0],Y=P[1],U=(0,d.useMemo)((function(){var e=B===a.VIEW_BY_AD;return[{id:y,placeholder:y,options:M,type:E.x.pill,accessor:function(e){return e.brand_value},isMulti:e}]}),[B,y,S]);(0,d.useEffect)((function(){v&&!M.length&&z(v)}),[v,null===M||void 0===M?void 0:M.length]),(0,d.useEffect)((function(){p&&!R.length&&V(p)}),[p,null===R||void 0===R?void 0:R.length]),(0,d.useEffect)((function(){var e;if(F.current){var t,n,l=U.findIndex((function(e){return e.placeholder===y})),i=U.findIndex((function(e){return e.placeholder===S}));if(null===(e=F.current)||void 0===e||e.reset(),B===a.VIEW_BY_AD)null===(t=F.current)||void 0===t||t.setDropdownFilter(i,O),null===(n=F.current)||void 0===n||n.setDropdownFilter(l,[]);else if(B===a.VIEW_BY_BRAND_VALUE){var r,o;null===(r=F.current)||void 0===r||r.setDropdownFilter(i,[]),null===(o=F.current)||void 0===o||o.setDropdownFilter(l,D)}}}),[B]);var W=function(e){var t,n=(null!==(t=null===e||void 0===e?void 0:e.target)&&void 0!==t?t:{}).value;H(n)},K=function(e){var n,l,o=u?[u]:[],s=null!==(l=null===(n=e.find((function(e){return e.filter.id===y})))||void 0===n?void 0:n.appliedFilter)&&void 0!==l?l:[];Y(s);var c=(0,w.xb)(o)||o.includes(_.wj.value),d=(0,w.xb)(s)||s.includes(_.wj.value)?v.map((function(e){return e.value})):s,f=c?p.map((function(e){return e.value})):o,h={};B===a.VIEW_BY_AD?h=d.reduce((function(e,t){return e[t]=[],f.filter((function(e){return m[e]})).forEach((function(n){var a=m[n][t].map((function(e){return(0,r._)((0,i._)({},e),{text:t})}));e[t]=(0,N._)(e[t]).concat((0,N._)(a))})),e}),{}):B===a.VIEW_BY_BRAND_VALUE&&(h=f.reduce((function(e,t){return e[t]=[],d.filter((function(e){var n;return null===m||void 0===m||null===(n=m[t])||void 0===n?void 0:n[e]})).forEach((function(n){var a,l,o,s=null!==(o=null===m||void 0===m||null===(a=m[t])||void 0===a||null===(l=a[n])||void 0===l?void 0:l.map((function(e){return(0,r._)((0,i._)({},e),{text:t})})))&&void 0!==o?o:[];e[t]=(0,N._)(e[t]).concat((0,N._)(s))})),e}),{})),t(JSON.parse(JSON.stringify(h)))};return(0,d.useEffect)((function(){u&&K([{filter:{id:y,placeholder:y,accessor:function(e){return e},type:E.x.pill,options:M,isMulti:!0},appliedFilter:G}])}),[u]),(0,c.jsxs)(c.Fragment,{children:[(0,c.jsxs)("div",{className:"flex items-center",id:"remove-from-download",children:[(0,c.jsx)("div",{className:"leading-9",children:"View by:"}),(0,c.jsx)("div",{className:"m-2 text-sm items-center",children:A.map((function(e){return(0,c.jsx)(g.EUY,{label:e.label,id:e.value,name:e.label,value:e.value,radioType:"default",wrapperClassName:"m-2",labelClassName:"before:!top-0",onChange:W,checked:B===e.value},e.value)}))})]}),(0,c.jsx)("div",{className:"flex flex-col",children:(0,c.jsx)(C.Z,{ref:F,filters:U,onFilterChange:K})})]})},k=(0,d.memo)(S),A=function(e){var t=e.graphData,n=e.config,a=e.videoOptions,N=e.selectedFilter,C=void 0===N?"":N,E=t.data,S=t.tag_values,A=void 0===S?[]:S,F=t.has_ai_insights,T=(0,d.useRef)(null),D=(0,s._)((0,p.Z0)(),2),O=D[0].chartColorsData,Z=D[1],M=(0,d.useState)(),z=M[0],I=M[1],R=null!==n&&void 0!==n?n:{},V=R.graph_title,L=void 0===V?"":V,B=(0,o._)(R,["graph_title"]),H=(0,d.useState)({}),P=H[0],G=H[1],Y=(0,x.Z)(),U=Y.yDomainValue,W=Y.computeYDomainValue,K=[U[0],Math.max(U[1],.4)],X=null===O||void 0===O?void 0:O[b.Hv.VIDEO_FRAMES_EXPLORATION],q={y:.4,lineColor:"#A8A8A8",fillColor:"#8D8D8D80",gradientToColor:"#E5E7EB33"};(0,d.useEffect)((function(){(null===A||void 0===A?void 0:A.length)&&(G(E[A[0].value]),W(E[A[0].value]))}),[E,A]);var J=function(e){var t=Object.values(e).flat(1);W(t),G(e)},Q=(0,d.useMemo)((function(){var e=Object.keys(P).reduce((function(e,t,n){return e[t]=(0,j.Eu)(n),e}),{});return{graphLegends:Object.keys(P),labelColorMapping:e}}),[P]),$=Q.graphLegends,ee=Q.labelColorMapping;(0,d.useEffect)((function(){var e;(null===X||void 0===X||null===(e=X.colors)||void 0===e?void 0:e.length)||Z((0,u.E)({chartColorsData:(0,r._)((0,i._)({},O),(0,l._)({},b.Hv.VIDEO_FRAMES_EXPLORATION,{colors:g.ZE4,previewColors:g.ZE4,isApplied:!1}))}))}),[O,Z]);var te,ne=function(e){(0,w.xb)(e.ai_insights)||I(e)},ae=function(e,t){var n=!(0,w.xb)(null===t||void 0===t?void 0:t.ai_insights);return(0,c.jsxs)("g",{children:[n?(0,c.jsx)("circle",{x:e.x,y:e.y,r:e.r,fill:"#3968FF",className:"animate-ping-custom"}):(0,c.jsx)(c.Fragment,{}),(0,c.jsx)("circle",(0,i._)({},e))]})},le=function(e,t){var a,l=!(0,w.xb)(null===t||void 0===t?void 0:t.ai_insights),i=null!==(a=n.tooltip_title)&&void 0!==a?a:[];return(0,c.jsxs)("div",{className:"space-y-4 px-2 py-1 w-64",children:[l?(0,c.jsx)(f.Z,{}):(0,c.jsx)(c.Fragment,{}),(0,c.jsx)("div",{className:"text-white leading-4 whitespace-pre-wrap break-normal",children:i.map((function(e){return(0,c.jsxs)("div",{children:[(0,c.jsx)("span",{className:"font-light",children:e}),": ",(0,c.jsx)("b",{children:t[e]})]},e)}))})]})},ie=function(e){var l=null!==X&&void 0!==X?X:{},o=l.isApplied,s=l.colors,d=void 0===s?[]:s,u=l.previewColors,m=void 0===u?[]:u,v=(null===m||void 0===m?void 0:m.length)?m:d;return o&&!e&&(v=d),(0,c.jsxs)(c.Fragment,{children:[e?(0,c.jsx)(c.Fragment,{}):(0,c.jsxs)("div",{className:"pb-6",children:[F?(0,c.jsxs)("div",{className:"flex gap-1 items-center",children:[(0,c.jsx)("span",{children:"Click on line peaks and dips to get consumer voice powered by"}),(0,c.jsx)(f.Z,{})]}):(0,c.jsx)(c.Fragment,{}),(0,c.jsx)("div",{className:"flex flex-col",children:(0,c.jsx)(k,{setFilteredGraphData:J,graphData:t,config:n,selectedFilter:C,videoOptions:a})})]}),(0,c.jsx)(h.Z,{filteredGraphData:P,yDomainValue:K,graphConfig:(0,r._)((0,i._)({},B),{graph_title:""}),showGraphOptions:!1,templateType:_.k6.AD_EVAL_PHASE_TWO,hideThumbnail:e,hideFootnote:e,hideLegends:e,isZoomEnabled:!e,hasFrameLimit:!e,graphColors:v,customGlyphRenderer:ae,customTooltipRenderer:le,onDataPointClick:ne,legends:$,labelColorMapping:ee,referenceLine:q})]})};return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsxs)("div",{className:"flex justify-between items-center",children:[(0,c.jsx)(y.Z,{shouldShowTitle:!!L,chartsConfig:n,titleClassName:"text-xl mb-4"}),(0,c.jsx)(v.Z,{graphRef:T,fileName:null!==(te=null===n||void 0===n?void 0:n.graph_title)&&void 0!==te?te:"",renderRightSideGraph:function(){return ie(!0)},graphType:b.Hv.VIDEO_FRAMES_EXPLORATION,paletteType:"five_color",templateType:_.k6.AD_EVAL_PHASE_TWO})]}),(0,c.jsx)("div",{className:"mt-2",ref:T,children:ie(!1)}),(0,c.jsx)(m.Z,{data:z,insightsAccessor:function(e){return null===e||void 0===e?void 0:e.ai_insights},imageTextAccessor:function(e){return null===e||void 0===e?void 0:e.image_url},descriptionRenderer:function(e){return(0,c.jsxs)("ul",{className:"flex flex-col",children:[(0,c.jsxs)("li",{children:[e["Ad name"]," - ",e.time]}),(0,c.jsx)("li",{children:(0,w._p)(e["Brand value"])}),(0,c.jsxs)("li",{children:["Proximity score: ",e["Proximity score"]]})]})},insightsConfig:[{title:"Generation",key:"generation"},{title:"Country",key:"country"},{title:"Detailed reason",key:"reason"}],variant:"image",isOpen:!!z,onModalPrimaryClick:function(){return I(void 0)}})]})},F=(0,d.memo)(A)},76975:function(e,t,n){n.d(t,{Z:function(){return x}});var a=n(70997),l=n(38787),i=n(2001),r=n(38485),o=n(54323),s=n.n(o),c=n(97458),d=n(52983),u=n(67163),m=n(32758),f=n(58374),v=function(e){var t=e.children,n=e.className,a=void 0===n?"":n,l=(0,d.useState)(!1),i=l[0],r=l[1],o=(0,d.useState)(!1),s=o[0],u=o[1],m="absolute pointer-events-none bg-gradient-to-t from-[#ffffff00] to-[#ffffffCC] z-[1] w-full h-20",v=function(e,t){"top"===e?r(t):"bottom"===e&&u(t)};return(0,c.jsxs)("div",{className:"relative overflow-hidden",children:[(0,c.jsx)("div",{className:(0,f.m6x)(m,"transition-opacity opacity-100 top-0 bg-gradient-to-t",i&&"opacity-0")}),(0,c.jsxs)("div",{className:(0,f.m6x)("overflow-auto ",a),children:[(0,c.jsx)(f.dfh,{as:"div",className:"translate-y-1",onChange:function(e){v("top",e)}}),t,(0,c.jsx)(f.dfh,{as:"div",className:"-translate-y-1",onChange:function(e){v("bottom",e)}})]}),(0,c.jsx)("div",{className:(0,f.m6x)(m,"transition-opacity opacity-100 bottom-0 bg-gradient-to-b",s&&"opacity-0")})]})},h=n(50713),p=n(36255),x=function(e){var t=e.data,n=e.insightsAccessor,o=e.imageTextAccessor,d=e.descriptionRenderer,x=e.textPillAccessor,g=e.insightsConfig,j=e.variant,_=void 0===j?"image":j,b=e.insightsCardLayout,w=void 0===b?"default":b,y=e.title,N=void 0===y?"Frame by frame analysis":y,C=(0,r._)(e,["data","insightsAccessor","imageTextAccessor","descriptionRenderer","textPillAccessor","insightsConfig","variant","insightsCardLayout","title"]),E=(0,f.m9Y)().copyImageToClipboard,S=(0,f.pmc)().showToast,k=t?o(t):void 0,A=t?n(t):void 0,F=t&&x?x(t):void 0,T=function(){var e=(0,a._)(s().mark((function e(){return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,E(k).then((function(){S({message:"Image copied"})})).catch((function(e){S({message:"Image cannot be copied - ".concat(e),isError:!0})}));case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return(0,c.jsx)(f.SoM,(0,i._)((0,l._)({},C),{title:(0,c.jsxs)("div",{className:"flex gap-5",children:[(0,c.jsx)(h.Z,{})," ",(0,c.jsx)("div",{className:"font-bold",children:N})]}),primaryBtnText:"Close",content:(0,c.jsx)("div",{children:(0,c.jsxs)("div",{className:"flex item-start max-h-[calc(90vh-190px)] oveflow-hidden gap-6 ",children:["image"===_?(0,c.jsx)("div",{className:"w-[320px] shrink-0",children:(0,c.jsxs)("div",{className:"space-y-2",children:[(0,c.jsx)("div",{className:" flex-1 bg-grey-85 grow-0 flex items-center justify-center rounded-lg",children:(0,c.jsx)("img",{loading:"lazy",className:"w-full object-contain ",src:k,alt:"selected image"})}),k?(0,c.jsx)("div",{children:(0,c.jsx)(f.zxk,{className:"bg-grey-10 p-1 hover:bg-grey-30",btnSize:"npm",variant:"roundIcon",onClick:T,children:(0,c.jsx)(u.MdContentCopy,{size:16})})}):(0,c.jsx)(c.Fragment,{}),t&&d?(0,c.jsx)("div",{className:" text-left text-sm ",children:d(t)}):(0,c.jsx)(c.Fragment,{})]})}):(0,c.jsx)("div",{className:"w-[409px] shrink-0",children:(0,c.jsx)(p.Z,{text:null!==k&&void 0!==k?k:"",leftBluePillText:F,isClickable:!1,maxHeightClassName:"max-h-full"})}),(0,c.jsx)(v,{className:" h-full w-full pr-2 ",children:(0,c.jsx)("div",{className:"flex gap-2 flex-col",children:null===A||void 0===A?void 0:A.map((function(e){return function(e){var t=g.map((function(t){var n=t.key,a=(0,r._)(t,["key"]);return(0,i._)((0,l._)({},a),{value:e[n]||"-"})}));return(0,c.jsx)("div",{className:(0,f.m6x)(" shrink-0  max-w-full bg-grey-10 rounded-lg p-4  flex flex-wrap gap-y-5 gap-x-12  w-full    "),children:t.map((function(e,t){var n,a=e.title,l=e.value,i=e.isBluePill;return(0,c.jsxs)("div",{className:(0,f.m6x)("flex gap-2 flex-col  ",(n=t,[n>("default"===w?1:2)?"w-full":"min-w-[15%] w-[auto]"])),children:[(0,c.jsx)("b",{children:a}),i?(0,c.jsx)("div",{children:(0,c.jsxs)(m.Z,{children:[l," "]})}):(0,c.jsx)("p",{className:t<2?"truncate":"",children:l})]},"".concat(a,"-").concat(l))}))})}(e)}))})})]})}),size:"large"}))}},50713:function(e,t,n){var a=n(97458),l=(n(52983),n(31846));t.Z=function(){return(0,a.jsxs)("div",{className:" leading-4 text-base rounded-[48px] w-[115px] whitespace-nowrap flex items-center gap-1 bg-primary-blue-20 text-black px-2 py-1.5 m-0",children:[(0,a.jsx)(l.Z,{}),(0,a.jsx)("div",{children:"AI insights"})]})}},36255:function(e,t,n){var a=n(97458),l=(n(52983),n(32758)),i=n(58374);t.Z=function(e){var t=e.text,n=e.leftBluePillText,r=e.rightBluePillText,o=e.onClick,s=e.isClickable,c=e.maxHeightClassName,d=void 0===c?"max-h-[132px]":c,u=!n||!r;return(0,a.jsx)("div",{onClick:o,className:(0,i.m6x)("p-4 rounded-lg border border-grey-30 text-xs flex gap-2 justify-between h-fit  max-w-[638px]",s&&"hover:border-primary-blue-60 hover:text-primary-blue-60 cursor-pointer ",d),children:(0,a.jsxs)("div",{className:"flex flex-col gap-2 overflow-hidden w-full max-h-full",children:[(0,a.jsxs)("p",{className:"min-h-[32px] break-words overflow-auto ",children:[t," "]}),(0,a.jsxs)("div",{className:(0,i.m6x)("flex w-full justify-between sticky bottom-0",u&&"justify-start"),children:[n?(0,a.jsx)(l.Z,{children:n}):(0,a.jsx)(a.Fragment,{}),r?(0,a.jsx)(l.Z,{children:r}):(0,a.jsx)(a.Fragment,{})]})]})})}},33727:function(e,t,n){var a=n(97458),l=(n(52983),n(91814));t.Z=function(e){var t=e.children;return(0,a.jsx)(l.Z,{children:(0,a.jsx)("div",{className:"rounded-2xl border border-grey-30 overflow-hidden shadow-card w-full h-full",children:t})})}},15534:function(e,t,n){var a=n(97458),l=(n(52983),n(58374));t.Z=function(e){var t=e.className,n=void 0===t?"":t,i=e.imageName;return(0,a.jsx)("div",{className:"bg-white p-5 rounded-lg shadow-md w-full flex items-center justify-center h-96 mt-6 ".concat(n),children:(0,a.jsxs)("div",{className:"self-center",children:[(0,a.jsx)("div",{className:"w-16 h-16 rounded-full bg-gray-200 flex items-center justify-center m-auto",children:(0,a.jsx)(l.JO$,{src:"/images/".concat(i,".svg"),className:"m-auto"})}),(0,a.jsx)("div",{className:"text-xs pt-2 text-gray-300",children:"Loading your data"})]})})}},82209:function(e,t,n){var a=n(97458),l=n(58374);t.Z=function(e){var t=e.isPreview,n=void 0!==t&&t,i=e.isLoading,r=e.isEmpty,o=e.graphColors,s=e.textColors,c=e.graphData,d=e.onSliceClickCB,u=e.graphClassName,m=void 0===u?"":u;return c?(0,a.jsxs)("div",{className:"mt-6",children:[(0,a.jsx)("div",{className:"flex gap-5",children:c.map((function(e,t){return n=e.label,l=o[t],(0,a.jsxs)("div",{className:"flex items-center justify-center mb-4",children:[(0,a.jsx)("span",{className:"rounded-full h-4 w-4 mr-2.5",style:{backgroundColor:l}}),(0,a.jsx)("span",{children:n})]},l);var n,l}))}),(0,a.jsx)("div",{className:(0,l.m6x)("w-full flex justify-center items-center",m),children:r?(0,a.jsx)("div",{className:"text-center w-full",children:"No data available"}):(0,a.jsxs)("div",{className:(0,l.m6x)("max-w-[880px] h-20 flex overflow-hidden rounded-lg",n?"w-[500px]":"w-full"),children:[!i&&c.map((function(e,t){return(0,a.jsx)("div",{className:"grid place-items-center cursor-pointer transition-all",style:{width:i?"0%":"".concat(e.value,"%"),backgroundColor:o[t],color:s[t]},"data-tooltip-content":n?"":e.tooltip,"data-tooltip-id":"tooltip",onClick:function(){return function(e){d&&d(e)}(e)},children:e.value>5?(0,a.jsxs)(a.Fragment,{children:[e.value,"%"]}):(0,a.jsx)(a.Fragment,{})},e.id)})),i&&(0,a.jsx)("div",{className:"grid place-items-center cursor-pointer transition-all",style:{width:i&&"100%",backgroundColor:o[o.length-1],color:s[s.length-1]},"data-tooltip-content":n?"":"Fetching data...","data-tooltip-id":"tooltip",children:(0,a.jsx)(a.Fragment,{children:"Fetching data..."})})]})})]}):(0,a.jsx)(a.Fragment,{})}},13320:function(e,t,n){var a=n(97458),l=(n(52983),n(26667)),i=n(67163),r=n(34978),o=n(58374);t.Z=function(e){var t=e.shouldShowTitle,n=e.chartsConfig,s=e.isClippingActive,c=e.titleClassName,d=void 0===c?"":c,u=e.modalTitle,m=void 0===u?"":u,f=e.modalContent,v=e.modalTitleClassName,h=void 0===v?"":v,p=(0,r.Z)().trackGaEvents,x=n.graph_title,g=n.is_header_tooltip_enabled,j=n.graph_title_tooltip,_=n.sub_header,b=n.is_header_help_info_enabled,w=g&&j;return t?(0,a.jsx)("div",{className:"font-bold mb-3",children:(0,a.jsxs)("span",{className:d,children:[(0,a.jsx)("span",{children:x}),w?(0,a.jsx)("span",{className:"ml-2.5 inline-block align-middle mr-2.5",children:(0,a.jsx)(l.ocf,{"data-tooltip-id":"tooltip","data-tooltip-html":'<div class="w-72 break-normal whitespace-pre-wrap">'.concat(j,"</div>")})}):(0,a.jsx)(a.Fragment,{}),b&&f?(0,a.jsxs)(o.u_l,{children:[(0,a.jsx)(o.Sqw,{children:(0,a.jsx)("div",{className:"inline-block align-middle",children:(0,a.jsx)(o.zxk,{type:"button",variant:"transparent",btnSize:"lg",className:"inline-block align-middle !px-2",onClick:function(){p("charts_info_modal",[],{graph_title:x,modal_header:m})},children:(0,a.jsx)(i.MdHelpOutline,{className:"text-black"})})})}),(0,a.jsx)(o.yQW,{title:m,modalTitleClassName:h,children:(0,a.jsx)("div",{className:"p-8",children:f()})})]}):(0,a.jsx)(a.Fragment,{}),s&&_?(0,a.jsxs)("span",{className:"text-gray-400 text-xs font-normal inline-block align-middle ml-1",children:[" ",_]}):(0,a.jsx)(a.Fragment,{})]})}):(0,a.jsx)(a.Fragment,{})}},66997:function(e,t,n){var a=n(97458),l=n(52983),i=n(40718),r=n(23360),o=n(58374),s=function(e){var t=e.labelOptions,n=e.locationOptions,s=e.onLabelSelect,c=e.onLocationSelect,d=e.onDateRangeSelect,u=e.config,m=null!==u&&void 0!==u?u:{},f=m.location_filter_enabled,v=m.label_filter_enabled,h=m.date_range_filter_enabled,p=m.location_drop_down_title,x=m.label_drop_down_title,g=(0,l.useState)(),j=g[0],_=g[1],b=(0,l.useState)(),w=b[0],y=b[1],N=(0,l.useState)([]),C=N[0],E=N[1],S=(0,l.useState)([]),k=S[0],A=S[1],F=(0,l.useState)(r.K.ONE_YEAR),T=F[0],D=F[1];(0,l.useEffect)((function(){c(k,C,T)}),[]);var O=function(e){D(e),d(k,C,e)},Z=function(e){return T===e?"bg-primary-blue-60 !text-white rounded":"!text-grey-80 "};return(0,l.useEffect)((function(){!j&&t&&_(t),!w&&n&&y(n)}),[t,n]),(0,a.jsxs)("div",{className:"flex gap-6 mb-6 justify-start items-center",children:[v?(0,a.jsx)(i.Z,{dropdownClass:"w-72",isMulti:!0,options:null!==j&&void 0!==j?j:[],placeholder:null!==x&&void 0!==x?x:"",onChange:function(e){return E(t=e),void s(k,t,T);var t}}):(0,a.jsx)(a.Fragment,{}),f?(0,a.jsx)(i.Z,{dropdownClass:"w-72",isMulti:!0,options:null!==w&&void 0!==w?w:[],placeholder:null!==p&&void 0!==p?p:"",onChange:function(e){return A(t=e),void c(t,C,T);var t}}):(0,a.jsx)(a.Fragment,{}),h?(0,a.jsxs)("div",{className:"flex self-center ",children:[(0,a.jsx)(o.zxk,{type:"button",variant:"transparent",className:"!p-1  w-10 h-10 ".concat(Z(r.K.SIX_MONTH)),onClick:function(){return O(r.K.SIX_MONTH)},children:"6M"}),(0,a.jsx)(o.zxk,{type:"button",variant:"transparent",className:"!p-1 w-10 h-10 ".concat(Z(r.K.ONE_YEAR)),onClick:function(){return O(r.K.ONE_YEAR)},children:"1Y"})]}):(0,a.jsx)(a.Fragment,{})]})};t.Z=(0,l.memo)(s)},87975:function(e,t,n){var a=n(97458),l=n(52983),i=n(34077),r=n(58374),o=n(33144),s=function(e){var t=e.data,n=e.selectedPoint,s=e.selectedCategory,c=e.circleIsFilled,d=void 0===c||c,u=e.customInfoTableDescription,m=e.customSortIcons,f=null!==n&&void 0!==n?n:{},v=f.text,h=f.pointColor,p=l.useMemo((function(){return[{Header:(0,a.jsx)("span",{className:"font-medium text-xs whitespace-nowrap",children:"Keywords"}),accessor:"keyword",disableSortBy:!0,Cell:function(e){var t=e.value;return(0,a.jsx)("div",{className:"text-xs text-primary-blue-60 text-left",children:t})}},{Header:(0,a.jsx)("span",{className:"text-xs font-medium whitespace-nowrap",children:"Total Volume"}),accessor:"search_volume",disableSortBy:!1,Cell:function(e){var t=e.value;return(0,a.jsx)("div",{className:"text-xs text-left",children:(0,o.V2)(t,0)})}},{Header:(0,a.jsx)("span",{className:"text-xs font-medium whitespace-nowrap",children:"Growth"}),accessor:"growth",disableSortBy:!1,Cell:function(e){var t=e.value;return(0,a.jsx)("div",{className:"text-xs text-left",children:Number(t)>0?"+".concat(t,"%"):"".concat(t,"%")})}}]}),[]);return(0,a.jsxs)("div",{className:"border flex max-h-full overflow-hidden flex-col",children:[(0,a.jsxs)("div",{className:"w-full border-b bg-grey-10 align-middle m-auto py-3 px-2 text-left flex items-center",children:[d?(0,a.jsx)(i.FaCircle,{style:{fill:h}}):(0,a.jsx)(i.FaRegCircle,{style:{fill:h}}),(0,a.jsx)("div",{className:"ml-2",children:v})]}),(0,a.jsxs)("div",{className:"m-4 text-sm",children:[(0,a.jsxs)("div",{className:"my-2 font-medium capitalize",children:["Category: ",s]}),u?u(t):(0,a.jsx)("div",{className:"my-2",children:"Top 15 Searched Keywords"})]}),(null===t||void 0===t?void 0:t.length)?(0,a.jsx)("div",{className:"overflow-auto ",children:(0,a.jsx)(r.iA_,{variant:"fixed_header_without_borders",tableData:t,columns:p,totalCount:0,fetchData:function(){},shouldUseSorting:!0,shouldUseManualSorting:!1,isPaginationEnabled:!1,renderCustomSortIcons:m,customClassNameByComponent:{tableClass:"!mb-0",thClass:"!top-0"}})}):(0,a.jsx)("div",{className:"m-4 text-sm",children:"No Keywords to display"})]})};t.Z=(0,l.memo)(s)},25351:function(e,t,n){var a=n(4271),l=n(38787),i=n(2001),r=n(74447),o=n(97458),s=n(52983),c=n(27986),d=n(3686),u=n(4664),m=n(5922),f=n(48857),v=n(23360),h=n(58374),p=n(71014),x=n(88480),g=n(68423),j=n(58551),_=n(66997),b=n(87975),w=function(e){var t=e.graphData,n=e.labelColorMapping,w=e.config,y=e.customInfoTablePlaceholder,N=e.customInfoTableDescription,C=function(e,t){var n={};n=ee?e.reduce((function(e,n){var a,l=null!==(a=t[n])&&void 0!==a?a:{};return W.forEach((function(t){if(e[t]&&l[t]){var n=(0,r._)(e[t]).concat((0,r._)(l[t])),a=(0,x.vM)(n,"keyword"),i=Object.keys(a).map((function(e){var t=a[e],n=t.reduce((function(e,t){return e+Number(t.search_volume)}),0);return{keyword:e,growth:t.reduce((function(e,t){return e+Number(t.growth)}),0),search_volume:n}}));e[t]=i}else e[t]=l[t]})),e}),{}):t,V(n)},E=(0,f.Z)().renderGraphActionsSaveChart,S=(0,s.useRef)(null),k=(0,s.useState)(null),A=k[0],F=k[1],T=(0,s.useState)(""),D=T[0],O=T[1],Z=(0,s.useState)([]),M=Z[0],z=Z[1],I=(0,s.useState)(),R=I[0],V=I[1],L=t.data,B=t.labels_info,H=t.six_month_data,P=t.six_month_labels_info,G=t.location_dropdown_options,Y=void 0===G?[]:G,U=t.labels,W=void 0===U?[]:U,K=t.locations,X=void 0===K?[]:K,q=w.filter_enabled,J=w.filter_config,Q=["Trending","Established"],$=["Static","Stable"],ee=null===J||void 0===J?void 0:J.location_filter_enabled;(0,s.useEffect)((function(){if(L){var e=M.length?M:L;if(z(e),R&&!(0,x.xb)(R))V(R);else C(X,B)}}),[L,X]);var te=(0,j.Z)({domain:Object.keys(n).flat(),range:Object.values(n).flat()}),ne=function(e,t,n){var o,s=(0,r._)(L),c=(0,l._)({},B);n===v.K.SIX_MONTH&&(s=(0,r._)(H),c=(0,l._)({},P));var d=null!==(o=null===e||void 0===e?void 0:e.map((function(e){return e.label})))&&void 0!==o?o:[],u=d.length?d:X,m={},f=s;if(ee){var h=(0,r._)(s).map((function(e){var t,n,r,o=null===u||void 0===u?void 0:u.reduce((function(n,a){var l;return n+(null!==(t=null===(l=e.locationsVolume[a])||void 0===l?void 0:l.total)&&void 0!==t?t:0)}),0),s=null===u||void 0===u?void 0:u.reduce((function(t,a){var l;return t+(null!==(n=null===(l=e.locationsGrowth[a])||void 0===l?void 0:l.total)&&void 0!==n?n:0)}),0);return m=(0,i._)((0,l._)({},m),(0,a._)({},e.text,u.reduce((function(t,n){var a;return t+(null!==(r=null===(a=e.locationsVolume[n])||void 0===a?void 0:a.no_keywords)&&void 0!==r?r:0)}),0))),(0,i._)((0,l._)({},e),{x:o,y:s})}));f=h.map((function(e){var t=(e.x/m[e.text]).toFixed(2),n=(e.y/m[e.text]).toFixed(2);return(0,i._)((0,l._)({},e),{x:Number(t),y:Number(n),"Average Growth":"".concat(n,"%"),"Average Search Volume":Number(t)})}))}C(u,c),z(f),O(""),F(null)},ae=(0,s.useCallback)((function(){if(R&&A&&R[null===A||void 0===A?void 0:A.text]){var e=R[null===A||void 0===A?void 0:A.text],t=(0,x.MR)((0,r._)(e),"search_volume","desc"),n=(0,r._)(t).slice(0,15);return(0,r._)(n)}return[]}),[R,A]),le=function(e){var t=e.x,n=e.y,a=e.xAverage,l=e.yAverage,i="";t>a&&n>l?i="established":t>a&&n<l?i="stable":t<a&&n>l?i="trending":t<a&&n<l&&(i="static"),F(e),O(i)},ie=(0,s.useCallback)(m.fu,[]);return(0,o.jsxs)(h.lx9,{variant:"chart",children:[(0,o.jsxs)("div",{className:"flex justify-between",children:[(0,o.jsx)(h.VGH,{config:w,modalContent:function(){return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("div",{children:"Labels of keywords are identified and grouped into 4 categories:"}),(0,o.jsxs)("div",{className:"my-4",children:[(0,o.jsx)("div",{className:"text-primary-blue-60 font-bold",children:"1. Trending"}),(0,o.jsx)("div",{className:"pl-[1rem]",children:"Low search volume, high rate of change"})]}),(0,o.jsxs)("div",{className:"my-4",children:[(0,o.jsx)("div",{className:"text-primary-blue-60 font-bold",children:"2. Established"}),(0,o.jsx)("div",{className:"pl-[1rem]",children:"High search volume, high rate of change"})]}),(0,o.jsxs)("div",{className:"my-4",children:[(0,o.jsx)("div",{className:"text-primary-blue-60 font-bold",children:"3. Static"}),(0,o.jsx)("div",{className:"pl-[1rem]",children:"Low search volume, low rate of change"})]}),(0,o.jsxs)("div",{className:"my-4",children:[(0,o.jsx)("div",{className:"text-primary-blue-60 font-bold",children:"4. Stable"}),(0,o.jsx)("div",{className:"pl-[1rem]",children:"High search volume, low rate of change"})]})]})},modalTitle:"Search Categories"}),E(S,"Search Categories",p.a2)]}),q?(0,o.jsx)(_.Z,{locationOptions:Y,labelOptions:[],onLocationSelect:ne,onLabelSelect:function(){},onDateRangeSelect:ne,config:J}):(0,o.jsx)(o.Fragment,{}),(0,o.jsxs)("div",{className:"grid xl:grid-cols-3 md:grid-cols-1 gap-2 xl:grid-flow-row overflow-visible",children:[(0,o.jsxs)("div",{className:"xl:col-span-2",ref:S,children:[(0,o.jsx)(d.Z,{legendScale:te,marginTop:10,legendWrapperClassName:"mb-6"}),(0,o.jsx)(g.Z,{children:function(e){var t=e.width;return(0,o.jsx)(u.Z,{graphData:{data:M,foot_note:""},chartsConfig:(0,i._)((0,l._)({},w),{graph_title:""}),width:t,isImageTypeTooltip:!1,shouldShowNegativeValues:!1,displayAnnotationLine:!0,onPointSelect:le,labelColorMapping:n,topCategories:Q,bottomCategories:$})}})]}),(0,o.jsx)("div",{className:"xl:border-l xl:h-0 xl:min-h-full xl:pt-0 overflow-auto pt-2 max-h-96 ",children:A&&R?(0,o.jsx)(b.Z,{customInfoTableDescription:N,data:ae(),selectedPoint:A,selectedCategory:D,customSortIcons:ie}):y?y():(0,o.jsxs)("div",{className:"flex flex-col h-full text-center p-4 justify-center items-center",children:[(0,o.jsx)(c.Z,{height:24,width:48,className:"h-6 m-auto my-3"}),(0,o.jsx)("div",{children:"Click on any data point to learn more about the label."})]})})]})]})};t.Z=(0,s.memo)(w)},40879:function(e,t,n){var a=n(38787),l=n(97458),i=n(52983),r=n(51741),o=n(44898),s=n(58374),c=n(68423),d=n(33854);t.Z=function(e){var t=e.filteredGraphData,n=e.yDomainValue,u=void 0===n?[]:n,m=e.graphConfig,f=e.labelColorMapping,v=void 0===f?{}:f,h=e.isZoomEnabled,p=void 0===h||h,x=e.hasFrameLimit,g=void 0===x||x,j=e.lineGraphClassName,_=void 0===j?"":j,b=e.imageWrapperClassName,w=void 0===b?"h-[356px]":b,y=e.imageClassName,N=void 0===y?"max-h-[356px]":y,C=e.lineGraphHeight,E=e.placeholderMessage,S=void 0===E?"Hover over each data point to view the frame that signals the respective brand value.":E,k=e.showSharedTooltip,A=void 0!==k&&k,F=e.showVerticalCrosshair,T=void 0!==F&&F,D=e.sortLegendsInReverseOrder,O=void 0!==D&&D,Z=e.customColorData,M=void 0===Z?{}:Z,z=e.graphType,I=e.showGraphOptions,R=e.templateType,V=e.hideThumbnail,L=e.hideFootnote,B=e.hideLegends,H=e.graphColors,P=e.customGlyphRenderer,G=e.customTooltipRenderer,Y=e.onDataPointClick,U=e.legends,W=e.referenceLine,K=(0,i.useState)(null),X=K[0],q=K[1],J=(0,i.useRef)(null);return(0,l.jsxs)("div",{className:"flex gap-4",children:[(0,l.jsx)("div",{className:(0,s.m6x)("w-3/4",_),ref:J,children:(0,l.jsx)(c.Z,{children:function(e){var n=e.width;return(0,l.jsx)(d.Z,{graphRef:J,isZoomEnabled:p,graphData:null!==t&&void 0!==t?t:{},chartsConfig:(0,a._)({},m),width:n,setHoveredImageUrl:q,hasFrameLimit:g,yAxisDomain:u,isOfTypeDate:!1,scaleType:o.l.linear,labelColorMapping:v,height:C,showSharedTooltip:A,showVerticalCrosshair:T,sortLegendsInReverseOrder:O,customColorData:M,graphType:z,showGraphOptions:I,templateType:null!==R&&void 0!==R?R:"",hideFootnote:L,hideLegends:B,graphColors:H,onDataPointClick:Y,customGlyphRenderer:P,customTooltipRenderer:G,legends:U,referenceLine:W})}})}),V?(0,l.jsx)(l.Fragment,{}):(0,l.jsx)("div",{className:"w-2/6 h-auto",children:X?(0,l.jsx)(s.JO$,{src:X,className:(0,s.m6x)("w-full h-full object-contain",N),wrapperClassName:(0,s.m6x)("w-full bg-black flex flex-col justify-center items-center",w)}):(0,l.jsxs)("div",{className:(0,s.m6x)("w-full bg-black flex flex-col justify-center items-center",w),children:[(0,l.jsx)(r.Z,{className:"max-w-[200px] max-h-[132px] h-auto w-1/2 -mr-[25px]"}),(0,l.jsx)("div",{className:"text-center mt-2 text-white w-10/12 max-w-[360px]",children:S})]})})]})}},31978:function(e,t,n){var a=n(38787),l=n(97458),i=n(52983),r=n(58374),o=function(e){return(0,l.jsx)(r.ucW,(0,a._)({},e))};t.Z=(0,i.memo)(o)},3612:function(e,t,n){var a=n(38787),l=n(97458),i=n(52983),r=n(58374),o=function(e){return(0,l.jsx)(r.HM7,(0,a._)({},e))};t.Z=(0,i.memo)(o)},4664:function(e,t,n){var a=n(38787),l=n(2001),i=n(97458),r=n(52983),o=n(58374),s=function(e){return(0,i.jsx)(o.cMj,(0,l._)((0,a._)({},e),{customCircleSize:e.customCircleSize}))};t.Z=(0,r.memo)(s)},82063:function(e,t,n){var a=n(97458),l=(n(52983),n(26667)),i=n(67163),r=n(34978),o=n(58374);t.Z=function(e){var t=e.sectionTitle,n=e.isSectionHeaderTooltipEnabled,s=e.sectionTooltipValue,c=e.modalTitle,d=void 0===c?"":c,u=e.modalContent,m=e.titleClassName,f=void 0===m?"":m,v=e.isHeaderhelpEnabled,h=e.iconClassName,p=void 0===h?"":h,x=e.modalTitleClassName,g=void 0===x?"":x,j=(0,r.Z)().trackGaEvents;return t?(0,a.jsx)("div",{className:"font-bold mb-5 pt-2",children:(0,a.jsxs)("span",{className:"".concat(f),children:[t,n?(0,a.jsx)("span",{className:"ml-2.5 inline-block align-middle",children:(0,a.jsx)(l.ocf,{"data-tooltip-id":"tooltip","data-tooltip-html":'<div class="break-normal w-64 whitespace-pre-wrap">'.concat(s,"</div>"),className:"".concat(p)})}):(0,a.jsx)(a.Fragment,{}),v&&u?(0,a.jsxs)(o.u_l,{children:[(0,a.jsx)(o.Sqw,{children:(0,a.jsx)("div",{className:"inline-block align-middle",children:(0,a.jsx)(o.zxk,{type:"button",variant:"transparent",btnSize:"lg",className:"inline-block align-middle !px-2",onClick:function(){j("charts_info_modal",[],{graph_title:t,modal_header:d})},children:(0,a.jsx)(i.MdHelpOutline,{className:"text-black ".concat(p)})})})}),(0,a.jsx)(o.yQW,{title:d,modalTitleClassName:g,children:(0,a.jsx)("div",{className:"p-8",children:u()})})]}):(0,a.jsx)(a.Fragment,{})]})}):(0,a.jsx)(a.Fragment,{})}},76530:function(e,t,n){var a=n(70997),l=n(54323),i=n.n(l),r=n(97458),o=n(52983),s=n(67163),c=n(58374);t.Z=function(e){var t=e.initalSelectedIndex,n=e.imageAccessor,l=e.linkAccessor,d=e.onSelectedIndexChange,u=e.data,m=e.descriptionComponentRenderer,f=e.isOpen,v=e.title,h=e.onModalPrimaryClick,p=e.variant,x=void 0===p?"carousel_btn":p,g=e.topRightComponentRenderer,j=e.selectedImageDescription,_=e.enableCopyImage,b=void 0===_||_,w=e.enableOpenInNewLink,y=void 0!==w&&w,N=e.enableCopyImageUrl,C=void 0===N||N,E=(0,o.useState)(null!==t&&void 0!==t?t:0),S=E[0],k=E[1],A=(0,c.m9Y)(),F=A.copyImageToClipboard,T=A.copyToClipboard,D=(0,c.pmc)().showToast,O=u[null!==S&&void 0!==S?S:-1],Z=O?n(O):"",M=function(){var e=(0,a._)(i().mark((function e(){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,F(Z).then((function(){D({message:"Image copied"})})).catch((function(e){D({message:"Image cannot be copied - ".concat(e),isError:!0})}));case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();(0,o.useEffect)((function(){f&&k(null!==t&&void 0!==t?t:0)}),[f]),(0,o.useEffect)((function(){k(0)}),[u]),(0,o.useEffect)((function(){d&&d(S)}),[S]);var z=[{id:"copy-img",onClick:function(){return M()},icon:s.MdContentCopy,enabled:b},{id:"open-img",onClick:function(){return function(){var e=l?l(O):Z;window.open(e)}()},icon:s.MdOpenInNew,enabled:y},{id:"copy-img-url",onClick:function(){return T(Z),void D({message:"Image URL copied"})},icon:s.MdLink,enabled:C}],I=function(){var e=(0,r.jsx)(r.Fragment,{});switch(x){case"carousel_btn":e=u[S]?m(u[S]):(0,r.jsx)(r.Fragment,{});break;case"image_grid":e=(0,r.jsx)("div",{className:"grid grid-cols-3 lg:grid-cols-4 gap-3.5",children:u.map((function(e,t){var a=n(e);return(0,r.jsx)(c.zxk,{variant:"transparent",btnSize:"npm",onClick:function(){return k(t)},className:(0,c.m6x)("h-20 rounded-lg overflow-hidden hover:shadow-card ",S===t&&"border-primary-blue-60 border-2"),children:(0,r.jsx)("img",{className:"w-full h-full object-cover",src:a})},a)}))})}return e},R=Z?(0,r.jsxs)("div",{className:"space-y-4 overflow-x-hidden",children:[(0,r.jsxs)("div",{className:"flex justify-between gap-1 sticky top-0 bg-white z-10",children:[(0,r.jsx)("span",{className:"text-primary-purple-60 font-bold text-2xl",children:v}),g?g():(0,r.jsx)(c.SAY,{onValueChange:function(e){setTimeout((function(){k(e)}))},wrapperDivClassName:"w-12 p-0 shrink-0",lengthOfSlides:1,totalCount:u.length,tabIndex:null!==S&&void 0!==S?S:0,showDisabledBtns:!0,hidePageTextAndCount:!0,btnSize:"sm"})]}),function(){var e,t,n,a=u[S]?I():(0,r.jsx)(r.Fragment,{}),l=null!==(n=null===a||void 0===a||null===(e=a.props)||void 0===e||null===(t=e.children)||void 0===t?void 0:t.length)&&void 0!==n?n:0;return(0,r.jsxs)("div",{className:"flex item-start h-[55vh] gap-6 ",children:[(0,r.jsxs)("div",{className:"relative flex-1 bg-grey-85 flex items-center justify-center rounded-lg",children:[(0,r.jsx)("img",{loading:"lazy",className:"w-[auto] max-h-full ",src:Z,alt:"selected image"}),j?(0,r.jsx)("div",{className:"truncate bg-grey-85 opacity-80 text-white text-center text-xs absolute bottom-3 w-full px-2",children:j(u[S])}):(0,r.jsx)(r.Fragment,{}),(0,r.jsx)("div",{className:"flex flex-col gap-2 absolute z-[2] top-5 right-5",children:z.filter((function(e){return e.enabled})).map((function(e){var t=e.id,n=e.onClick,a=e.icon;return(0,r.jsx)(c.zxk,{className:"bg-grey-10 p-1 hover:bg-grey-30",btnSize:"npm",variant:"roundIcon",onClick:n,children:(0,r.jsx)(a,{size:16})},t)}))})]}),l?(0,r.jsx)("div",{className:(0,c.m6x)("w-1/3 shrink-0 min-w-[100px] overflow-auto overflow-x-hidden","image_grid"===x&&"w-1/2"),children:I()},S):(0,r.jsx)(r.Fragment,{})]})}()]}):(0,r.jsx)("div",{className:"h-full grid place-content-center",children:"No data available"});return(0,r.jsx)(c.SoM,{onModalPrimaryClick:h,isOpen:f,primaryBtnText:"Close",content:R,size:"image_grid"===x?"large":"default"})}},96739:function(e,t,n){var a=n(38787),l=n(2001),i=n(97458),r=n(52983),o=n(58374),s=(0,r.forwardRef)((function(e,t){return(0,i.jsx)(o.F_9,(0,l._)((0,a._)({},e),{parentRef:t}))}));t.Z=(0,r.memo)(s)},5922:function(e,t,n){n.d(t,{Iw:function(){return r},Pq:function(){return c},fu:function(){return o},l0:function(){return s}});var a=n(97458),l=n(72688),i=n(33144),r=function(e,t){return(0,a.jsxs)("div",{className:"w-full h-5 flex justify-between",children:[(0,a.jsx)("div",{className:"h-5 bg-primary-blue-60 rounded-r-md",style:{width:"".concat(t,"%")}}),(0,a.jsx)("div",{className:"text-xs whitespace-nowrap ml-1 self-center",children:(0,i.Nf)(e,{})})]})},o=function(e){return(null===e||void 0===e?void 0:e.isSorted)?["keyword","audience_group","product_name"].includes(e.id)?e.isSortedDesc?(0,a.jsx)(l.P1D,{}):(0,a.jsx)(l.OZq,{}):e.isSortedDesc?(0,a.jsx)(l.Vjs,{}):(0,a.jsx)(l.LZ7,{}):(0,a.jsx)(l.r0X,{})},s=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e?(0,a.jsx)("div",{className:"absolute border-l border-black border-dashed z-[2] top-0 h-full ".concat(t),style:{left:"".concat(e,"%")}}):(0,a.jsx)(a.Fragment,{})},c=function(e,t,n,l){return(0,a.jsxs)(a.Fragment,{children:[s(n),(0,a.jsx)("div",{className:"relative w-full",children:(0,a.jsx)("div",{className:"h-5 bg-[#6186FF] rounded-tr rounded-br",style:{width:"".concat(e,"%")},"data-tooltip-id":"tooltip","data-tooltip-html":'<div class="line-clamp-5 w-64 break-normal whitespace-pre-wrap">'.concat(function(){var e="";return l.forEach((function(n){e+="".concat(n,": <b>").concat(t[n],"</b>\n")})),e}(),"</div>")})})]})}},48857:function(e,t,n){var a=n(97458),l=n(10480);t.Z=function(){return{renderGraphActionsSaveChart:function(e,t,n){return(0,a.jsx)(l.Z,{graphRef:e,fileName:t,graphType:n,templateType:"",disableColorChange:!0})}}}},50381:function(e,t,n){var a=n(74447),l=n(52983);t.Z=function(){var e=(0,l.useState)(0),t=e[0],n=e[1],i=(0,l.useState)(0),r=i[0],o=i[1],s=(0,l.useCallback)((function(e){var t,n=(t=Math).max.apply(t,(0,a._)(Object.values(e).flat().map((function(e){return e.y}))));o(n)}),[]),c=(0,l.useCallback)((function(e){var t,l=(t=Math).max.apply(t,(0,a._)(Object.values(e).flat().map((function(e){return e.x}))));n(l)}),[]),d=(0,l.useCallback)((function(e){c(e),s(e)}),[c,s]);return(0,l.useMemo)((function(){return{xDomainValue:[0,t],yDomainValue:[0,r],computeDomainValues:d,computeYDomainValue:s,computeXDomainValue:c}}),[d,c,s,t,r])}},98661:function(e,t,n){var a=n(38787),l=n(2001),i=n(54335),r=n(74447),o=n(52983),s=n(23360),c=n(88480);t.Z=function(e){var t=e.data,n=e.four_month_data,d=e.six_month_data,u=(0,o.useState)(t),m=u[0],f=u[1],v=(0,o.useState)(t),h=v[0],p=v[1];(0,o.useEffect)((function(){if(m){var e=m;f(e),p(e)}}),[]);var x=(0,o.useCallback)((function(e){if(null===e||void 0===e?void 0:e.length){var t=(0,i._)(e,1)[0],n=t.id,a=t.desc?"desc":"asc",l=(0,c.MR)((0,r._)(h),n,a);f((0,r._)(l))}else f((0,r._)(h))}),[h]);return{handleSort:x,filterByDate:function(e){var a=t;return e===s.K.FOUR_MONTH?a=n:e===s.K.SIX_MONTH&&(a=d),a},tableData:m,calculateVolumeAndGrowthAvg:function(e,t,n,i){var r=0,o=e.map((function(e){var o,s,c=t.length?null===t||void 0===t?void 0:t.reduce((function(t,a){return t+(null!==(o=e[n][a])&&void 0!==o?o:0)}),0):e.volume,d=t.length?null===t||void 0===t?void 0:t.reduce((function(t,n){return t+(null!==(s=e[i][n])&&void 0!==s?s:0)}),0):e.growth;return r=Math.max(c,r),(0,l._)((0,a._)({},e),{volume:c,growth:d})})).map((function(e){var t=Math.floor(100*e.volume/r);return(0,l._)((0,a._)({},e),{averageVolume:t})}));f(o),p(o)},setTableData:f,setUnSortedData:p}}},23360:function(e,t,n){var a;n.d(t,{K:function(){return a}}),function(e){e.ONE_YEAR="one_year",e.SIX_MONTH="six_month",e.TWO_MONTH="two_month",e.FOUR_MONTH="four_month"}(a||(a={}))}}]);