"use strict";(this.__LOADABLE_LOADED_CHUNKS__=this.__LOADABLE_LOADED_CHUNKS__||[]).push([[9351],{60275:(e,t,n)=>{n.d(t,{Z:()=>f});var r=n(56643),i=n(46255),o=n(55028);const s=(0,i.Z)(o.Z,{target:"e1nvcegb0"})({name:"59ntg8",styles:"line-height:1em;margin-top:-.5em;position:absolute;right:1.5rem;top:50%"});var a=n(60655);const l=(0,i.Z)("div",{target:"eirbp3z0"})((({theme:e})=>({backgroundColor:e.colors.white.primary,border:`1px solid ${e.colors.gray[300]}`,fontSize:e.fonts.size.small,height:"3.7rem",lineHeight:"normal",outline:"none",padding:"0 1rem",borderRadius:"0.5rem",display:"block",position:"relative",verticalAlign:"top","p.default":{color:e.colors.gray[400]},"&:hover":{border:`1px solid darken(${e.colors.gray[300]}, 10)`},select:{appearance:"none",cursor:"pointer",height:"100%",left:"0",opacity:"0",position:"absolute",top:"0",width:"100%",zIndex:1},"&.short":{height:"3.2rem",lineHeight:"calc(3.2rem - 4px)"}})),"");function c(){return c=Object.assign?Object.assign.bind():function(e){for(var t=1;tc({},e.mixins.ellipsis,{height:"3.7rem",left:"0",lineHeight:"calc(3.2rem - 4px)",maxWidth:"100%",padding:"0 1.5rem",paddingRight:"3rem",position:"absolute",top:"0"})),"");var d=n(3654),p=n(96832),u=n(34853);function g(e){try{return(0,d.Z)(e)}catch(t){return e}}class m extends p.Component{constructor(...e){super(...e),this.state={changed:!1,selectedOption:this.props.selectedOption},this.onChange=e=>{const t=e.target,n=this.getOptions()[t.selectedIndex];this.setState({changed:!0,selectedOption:n}),this.props.onChange&&this.props.onChange(n.value,n.title)},this.hasChanged=()=>this.state.changed,this.blur=()=>{this.innerSelectRef.blur()},this.getOptions=()=>this.props.options.map((e=>{if(!function(e){return(0,r.Z)(e)&&Object.keys(e).includes("value")&&Object.keys(e).includes("title")}(e))return{title:e,value:e};if(void 0===e.value)throw new Error(`Value for option ${e.title} cannot be undefined!`);return e}))}UNSAFE_componentWillReceiveProps(e){e.selectedOption&&this.setState({selectedOption:null})}render(){const e=[""].concat(this.props.classes,this.props.className),t=this.state.selectedOption||this.props.selectedOption,n=this.getOptions(),r=["input-select"].concat(this.props.selectClasses);let i,o=0;const c=n.map(((e,n)=>(t.title===e.title&&(o=n),(0,u.tZ)("option",{value:g(e.value),children:e.title},n))));return this.props.title&&(i=(0,u.tZ)("label",{htmlFor:this.props.name,style:{display:"block",marginBottom:"1rem"},children:this.props.title})),(0,u.BX)("div",{className:e.join(" "),css:this.props.selectStyles,"data-test":this.props.dataTest,children:[i,(0,u.BX)(l,{className:r.join(" "),children:[(0,u.tZ)(h,{className:this.state.changed?"":" default",children:n[o].title}),(0,u.tZ)("select",{className:this.props.inputClasses,"data-test":`${this.props.dataTest}-select`,name:this.props.name,onChange:this.onChange,ref:e=>{this.innerSelectRef=e},tabIndex:this.props.tabIndex,value:t?g(n[o].value):null,children:c}),(0,u.tZ)(s,{onClick:this.onChange})]}),(0,u.tZ)(a.Z,{children:this.props.errorMessage})]})}}m.defaultProps={classes:[],className:"",dataTest:void 0,inputClasses:"",name:"",options:[],selectStyles:{},tabIndex:void 0};const f=m},60655:(e,t,n)=>{n.d(t,{Z:()=>r});const r=(0,n(46255).Z)("div",{target:"ezxqs5i0"})((({theme:e,visible:t=!1})=>({alignItems:"center",justifyContent:"flex-start",display:t?"flex":"none",flexDirection:"row",color:"#A82700",fontSize:e.fonts.size[12],lineHeight:e.fonts.lineHeight[16],margin:"0.4rem 0 0.4rem","& svg":{marginRight:"0.4rem"}})),"")},73913:(e,t,n)=>{n.d(t,{Z:()=>v});var r=n(46255),i=n(53007);const o=(0,r.Z)("div",{target:"eddvmsq0"})({display:"inline-block",position:"relative",verticalAlign:"middle","&:hover":{[i.Z.toString()]:{opacity:1,pointerEvents:"all"}}},"");var s=n(62914),a=n(46887);const l=(0,r.Z)("span",{target:"e1tt09dx0"})((({pointUp:e=!1})=>({clear:"both",display:"block",float:"right",height:"1.1rem",paddingLeft:"1.5rem",paddingRight:"1rem",position:"relative",zIndex:4,svg:{bottom:"auto",display:"block",position:"relative",transform:`translateY(${e?"0.5rem":"-0.5rem"})`,transition:"all 0.1s cubic-bezier(0.3, 0, 0, 1.1)",width:"2rem"}})),"");var c=n(97216),h=n(48156),d=n(34853);const p=function({pointUp:e=!1,customId:t=""}){const n=t||(0,h.Z)();return(0,d.tZ)(l,{pointUp:e,children:(0,d.BX)("svg",{viewBox:"0 0 20 10",children:[(0,d.tZ)("filter",{id:n,children:(0,d.tZ)("feGaussianBlur",{in:"SourceGraphic",stdDeviation:"2"})}),(0,d.tZ)(c.Z,{shouldShow:e,children:(0,d.BX)("g",{children:[(0,d.tZ)("path",{filter:`url(#${n})`,opacity:"0.2",points:"M0,20 L10,10 L20,20",stroke:"black"}),(0,d.tZ)("polygon",{fill:"white",points:"0,10 10,0 20,10"})]})}),(0,d.tZ)(c.Z,{shouldShow:!e,children:(0,d.BX)("g",{children:[(0,d.tZ)("path",{d:"M0,0 L10,10 L20,0",filter:`url(#${n})`,opacity:"0.2",stroke:"black"}),(0,d.tZ)("polygon",{fill:"white",points:"0,0 10,10, 20,0"})]})})]})})};var u=n(93202);const g=(0,r.Z)("ul",{target:"e18xja450"})((({extendDown:e=!1,numChildren:t=1,theme:n})=>({backgroundColor:n.colors.white.primary,borderRadius:"0.5rem",boxShadow:`0 0.1rem 1rem ${u.Z.transparent.secondary}`,clear:"both",color:n.colors.black.primary,display:"flex",flexDirection:e?"column-reverse":"column",listStyle:"none",margin:0,overflowY:"auto",padding:t>1?"1.5rem 0":"0",textAlign:"left",width:"100%",li:{margin:"0.3rem 1.5rem"},a:{cursor:"pointer",whiteSpace:"nowrap","&:hover":{textDecoration:"underline"}},".separator":{borderBottom:`0.1rem solid ${u.Z.gray[300]}`,display:"block",height:0,margin:0}})),"");var m=n(96832);const f=function({children:e,dataTest:t="",extendDown:n=!1,customId:r=""}){return(0,d.BX)(a.Z,{"data-test":"dropdown-content-wrapper",extendDown:n,children:[(0,d.tZ)(g,{"data-test":"dropdown-content-list",numChildren:m.Children.count(e),children:m.Children.map(e,((e,n)=>(0,d.tZ)(c.Z,{shouldShow:!!e,children:(0,d.tZ)("li",{"data-test":t,children:e},`dropdown--${n}--${t||""}--${r||""}`)})))}),(0,d.tZ)(p,{customId:r,pointUp:n})]})},v=function({children:e,className:t="",customId:n="",dataTest:r,disabled:a=!1,extendDown:l=!1,role:h,styles:p={},triggerBtn:u=(0,d.tZ)(s.Z,{})}){return(0,d.BX)(o,{className:t,"data-test":r,role:h,style:p,children:[(0,d.tZ)(i.Z,{"data-test":"dropdown-trigger-wrapper",extendDown:l,children:u}),(0,d.tZ)(c.Z,{shouldShow:!a,children:(0,d.tZ)(f,{customId:n,dataTest:"dropdown-item",extendDown:l,children:e})})]})}},46887:(e,t,n)=>{n.d(t,{Z:()=>s});var r=n(46255);const i="1rem",o=`calc(100% - 1rem + ${i})`,s=(0,r.Z)("div",{target:"e143hhpv0"})((({extendDown:e=!1})=>({alignItems:"flex-end",bottom:e?"auto":o,display:"flex",flexDirection:e?"column-reverse":"column",maxHeight:0,maxWidth:0,opacity:0,overflow:"hidden",position:"absolute",right:`calc(-${i} - 0.1rem)`,top:e?o:"auto","&:hover":{maxHeight:"100vh",maxWidth:"100vw",opacity:1,overflow:"initial",svg:{transform:`translateY(${e?"0.1rem":"0"})`}}})),"")},53007:(e,t,n)=>{n.d(t,{Z:()=>o});var r=n(46255),i=n(46887);const o=(0,r.Z)("span",{target:"e1hv8gad0"})((({extendDown:e=!1})=>({display:"flex",flexDirection:"column",opacity:.6,"&:hover, &.cy-hover":{opacity:1,[`& + ${i.Z.toString()}`]:{maxHeight:"100vh",maxWidth:"100vw",opacity:1,overflow:"initial",svg:{transform:`translateY(${e?"0.1rem":"0"})`}}}})),"")},41571:(e,t,n)=>{n.r(t),n.d(t,{default:()=>_e});var r=n(23417),i=n(17),o=n(46255);const s=(0,o.Z)("div",{target:"ejyllfg0"})({name:"gtcvps",styles:"height:100%;width:100%;display:flex;align-content:center;justify-content:center;padding:0.5rem"});var a=n(95928);function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;t({borderBottom:`2px solid ${n.colors.gray[300]}`,height:e&&r?`calc(${n.dimensions.headerHeight} + 11.2rem)`:n.dimensions.headerHeight,marginTop:0,width:"100%",[(0,a.Z)(n.mediaQueries.max.width[768])]:{height:r&&!t?`calc(${n.dimensions.headerHeight} + 6.2rem)`:n.dimensions.headerHeight},[(0,a.Z)(n.mediaQueries.max.width[599])]:t?{height:"9.8rem"}:{}}),h=(0,o.Z)("div",{target:"e1z1nwu0"})((({listenInAppVisible:e=!1,pushDown:t=!1,isSearchOpen:n=!1,theme:r,isAdsEnabled:i})=>l({backgroundColor:r.colors.white.primary,position:"fixed",top:0,zIndex:r.zIndex.header},e?{".tabs":{marginTop:0},".listen-in-app":{top:0}}:{},!t&&!i||n?{}:{display:"flex",flexDirection:"column",justifyContent:"flex-end"},c({listenInAppVisible:e,pushDown:t,isSearchOpen:n,theme:r,isAdsEnabled:i}))),"");var d=n(73913),p=n(58059);function u(){return u=Object.assign?Object.assign.bind():function(e){for(var t=1;tu({alignItems:"center",display:"flex",justifyContent:"space-between",width:"100%"},e?{maxWidth:"142rem",padding:"0 1.5rem"}:{},{[(0,a.Z)(n.mediaQueries.max.width[599])]:{flexDirection:"column",height:"100%",justifyContent:"space-around"}},t?{}:{[(0,a.Z)(n.mediaQueries.max.width[768])]:{display:"none"}})),"");var m=n(61711);const f=(0,o.Z)("div",{target:"eeuvlzf0"})({name:"yh8r41",styles:"align-items:center;display:flex;flex:0 0 auto;> :first-of-type{margin-right:0.5rem;}"});var v=n(58146),Z=n(70644),y=n(97216),w=n(90758),b=n(68062),S=n(24586),x=n(60067),O=n(61310),C=n(71130),E=n(34853);const k=function({allAccessPreview:e,hasUpgrade:t,isInitialRender:n,upgradeUrl:r}){const i=(0,w.Z)(),o=(0,b.F1)(r||"/upgrade",{upsellFrom:O._v}),s=(0,C.useDispatch)(),a=(0,C.useSelector)(x.SP),l=i(e?"Subscribe":"Upgrade");return(0,E.BX)(f,{"data-test":"header-left",children:[(0,E.tZ)(v.Z,{dark:!0,onClick:()=>s((0,S.Mr)())}),(0,E.tZ)(y.Z,{shouldShow:(t||e)&&!n&&!a,children:(0,E.tZ)(Z.Z,{title:i("Upgrade Now"),to:o,underline:!1,children:(0,E.tZ)(m.Z,{"aria-label":i("Upgrade Now"),"data-test":"upgrade-now",size:"small",children:l})})})]})},D=(0,o.Z)("div",{target:"e1xpvbbh0"})({name:"1431qdf",styles:"flex:auto;position:relative;text-align:left;width:100%"}),j=(0,o.Z)("div",{target:"ezc3esn0"})((({isSearchOpen:e=!1,theme:t})=>({alignItems:"center",display:"none",justifyContent:"space-between",width:"100%",[(0,a.Z)(t.mediaQueries.max.width[768])]:{display:e?"none":"flex"}})),"");var L=n(35498);const A=(0,o.Z)("input",{target:"e1oekcf0"})({name:"1uuzp28",styles:"height:2rem;left:0;position:absolute;top:0;width:1rem"}),B=(0,o.Z)("span",{target:"e1gr5uxl0"})((({theme:e})=>({":after":{backgroundColor:e.colors.white.primary,border:`1px solid ${e.colors.gray.tertiary}`,borderRadius:"50%",content:"''",height:"1.7rem",left:"-2px",position:"absolute",top:"-1px",transition:"top .5s",width:"1.7rem"},backgroundColor:e.colors.gray[200],border:`1px solid ${e.colors.gray[300]}`,borderRadius:"1rem",height:"3rem",left:0,position:"absolute",top:0,width:"1.5rem"})),""),I=(0,o.Z)("label",{target:"e1yvjc8n0"})({[`${A.toString()}:checked ~ ${B.toString()}`]:{"&::after":{top:"1.2rem"}},cursor:"pointer",paddingLeft:"2.1rem",position:"relative"},"");var P=n(9258),R=n(96832);const H=function(){const[e,t]=function(){const{isDark:e,setIsDark:t}=(0,R.useContext)(P.Z.Context);return[e,t]}();return(0,E.BX)(I,{children:[(0,E.tZ)(A,{onClick:()=>t(!e),type:"checkbox"}),(0,E.tZ)(B,{})]})};function N(){return N=Object.assign?Object.assign.bind():function(e){for(var t=1;tN({display:"flex",flex:"0 0 auto",maxHeight:"3rem",textAlign:"right",".image":{borderRadius:"50%",height:"100%",maxHeight:"3rem",maxWidth:"3rem",overflow:"hidden",width:"3rem"}},e?{[(0,a.Z)(t.mediaQueries.max.width[599])]:{width:"100%"}}:{})),""),$=(0,o.Z)("div",{target:"e6og19v0"})({name:"fr59j0",styles:"align-items:center;cursor:pointer;display:flex;justify-content:center;transform:translateY(-0.2rem);svg{margin-left:0.5rem;}"});var M=n(74763);const z=(0,o.Z)("button",{target:"e4n4x6d0"})({name:"1ih6hqk",styles:"align-items:center;background:transparent;border:none;display:flex;outline:none"});var T=n(53007);const U=(0,o.Z)(d.Z,{target:"e12ny13y0"})({[T.Z.toString()]:{opacity:1}},"");var F=n(31858);const W=(0,o.Z)(F.Z,{target:"e1qi5pa60"})((({theme:e})=>({color:e.colors.gray[600],fontWeight:e.fonts.weight.regular,letterSpacing:"initial",margin:"0 1rem",maxWidth:"11rem",overflow:"hidden",textOverflow:"ellipsis",textTransform:"initial",whiteSpace:"nowrap"})),"");var X=n(80571),_=n(14922);const K=(0,o.Z)("button",{target:"e1mvsyj0"})((({theme:e})=>({alignItems:"center",backgroundColor:e.colors.transparent.primary,border:`1px solid ${e.colors.gray[300]}`,borderRadius:"50%",cursor:"pointer",display:"flex",height:"3rem",justifyContent:"center",marginLeft:"1.5rem",minWidth:"3rem",width:"3rem","&:hover":{borderColor:e.colors.gray[500]},svg:{height:"1.3rem",width:"1.3rem",minWidth:"1.3rem"}})),"");var V=n(39309);function q(){return q=Object.assign?Object.assign.bind():function(e){for(var t=1;tq({paddingRight:"1.5rem",position:"relative",width:"100%"},e?{[(0,a.Z)(t.mediaQueries.max.width[1024])]:{width:"50%"},[(0,a.Z)(t.mediaQueries.max.width[599])]:{width:"100%"}}:{})),"");var Y=n(80942);const J=["color"];function ee(){return ee=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,J);return(0,E.tZ)("svg",ee({fill:"none",height:"24",viewBox:"0 0 24 24",width:"24"},n,{children:(0,E.tZ)("path",{d:"M15.5001 14H14.7101L14.4301 13.73C15.6301 12.33 16.2501 10.42 15.9101 8.39002C15.4401 5.61002 13.1201 3.39002 10.3201 3.05002C6.09014 2.53002 2.53014 6.09001 3.05014 10.32C3.39014 13.12 5.61014 15.44 8.39014 15.91C10.4201 16.25 12.3301 15.63 13.7301 14.43L14.0001 14.71V15.5L18.2501 19.75C18.6601 20.16 19.3301 20.16 19.7401 19.75C20.1501 19.34 20.1501 18.67 19.7401 18.26L15.5001 14ZM9.50014 14C7.01014 14 5.00014 11.99 5.00014 9.50002C5.00014 7.01002 7.01014 5.00002 9.50014 5.00002C11.9901 5.00002 14.0001 7.01002 14.0001 9.50002C14.0001 11.99 11.9901 14 9.50014 14Z",fill:t})}))},ne=(0,o.Z)(te,{target:"e1ga729l0"})({name:"uinwea",styles:"left:0;position:absolute;transform:translate(1rem, 0.5rem)"});function re(){return re=Object.assign?Object.assign.bind():function(e){for(var t=1;tre({color:t.colors.gray[600],textAlign:"center",verticalAlign:"middle",width:"21rem"},e?{alignItems:"center",bottom:0,display:"flex",justifyContent:"flex-end",width:"auto",[(0,a.Z)(t.mediaQueries.min.width[768])]:{justifyContent:"center",left:0,margin:"auto",position:"absolute",right:0,top:0,width:"50%"},[(0,a.Z)(t.mediaQueries.max.width[599])]:{width:"100%",".search-filter":{width:"20rem"}}}:{})),"");var oe=n(60275);const se=(0,o.Z)("input",{target:"e4ad1lc2"})({name:"1p242t0",styles:"border-radius:3.6rem;height:3.2rem;line-height:3.2rem;padding-left:3.5rem"}),ae=(0,o.Z)(se,{target:"e4ad1lc1"})({[(0,a.Z)("(min-width: 1025px)")]:{display:"none"}},""),le=(0,o.Z)(se,{target:"e4ad1lc0"})((({theme:e})=>({[(0,a.Z)(e.mediaQueries.max.width[1024])]:{display:"none"}})),"");var ce=n(62623);function he(e,t){return[{title:e("All"),value:ce.Eu.ALL},{title:e("Live Stations"),value:ce.Eu.LIVE},{title:e("Artists"),value:ce.Eu.ARTIST},{title:e("Albums"),value:t?ce.Eu.BUNDLE:ce.Eu.ALBUM},{title:e("Songs"),value:ce.Eu.SONG},{title:e("Playlists"),value:ce.Eu.COLLECTION},{title:e("Podcasts"),value:ce.Eu.PODCAST}]}class de extends R.PureComponent{constructor(...e){super(...e),this.state={searchQuery:""},this.debouncedSetSearchQuery=(0,_.Z)((e=>{const{setSearchQuery:t}=this.props;t({query:e})}),600,{maxWait:1e3}),this.onSearch=e=>{const t=e&&e.target.value||"";this.setState({searchQuery:t}),this.debouncedSetSearchQuery(t),this.openSearch()},this.onSearchFocus=()=>{window.addEventListener("keydown",this.onKeyDown),this.openSearch()},this.onSearchBlur=()=>{window.removeEventListener("keydown",this.onKeyDown)},this.onKeyDown=e=>{38!==e.keyCode&&40!==e.keyCode&&13!==e.keyCode||this.input.blur()},this.onSubmit=e=>{e.preventDefault(),this.openSearch()},this.onFilterChange=e=>{const{setSearchFilter:t}=this.props;t({filter:e}),this.filter.blur()},this.onSearchCloseFocus=()=>{window.addEventListener("keydown",this.onSearchCloseKeyDown)},this.onSearchCloseBlur=()=>{window.removeEventListener("keydown",this.onSearchCloseKeyDown)},this.onSearchCloseClick=()=>{this.closeSearch()},this.onSearchCloseKeyDown=e=>{13===e.keyCode&&this.closeSearch()},this.closeSearch=()=>{const{closeModal:e}=this.props;e()},this.openSearch=()=>{const{openSearch:e,setSearchFilter:t,isSearchOpen:n}=this.props;n||(t({filter:""}),e())}}componentDidMount(){const{isSearchOpen:e,searchQuery:t}=this.props;e&&this.input&&this.input.focus(),t&&this.setState({searchQuery:t})}componentDidUpdate(e){const{isSearchOpen:t,searchFilter:n,translate:r}=this.props,i=he(r,ce.Eu);t&&!e.isSearchOpen&&this.input.focus(),this.filter&&n!==e.searchFilter&&this.filter.setState({selectedOption:i.find((({value:e})=>e===n))||i[0]})}componentWillUnmount(){window.removeEventListener("keydown",this.onKeyDown),window.removeEventListener("keydown",this.onSearchCloseKeyDown)}getPlaceholder(){const{customRadioEnabled:e,liveRadioEnabled:t,isSearchOpen:n,translate:r}=this.props;return n?r(e?"artists, stations or podcasts":t?"stations or podcasts":"podcasts"):""}renderInput(e,t){return(0,E.tZ)(e,{"aria-label":"Search","data-test":"header-search-input",onBlur:this.onSearchBlur,onChange:this.onSearch,onFocus:this.onSearchFocus,placeholder:t,ref:e=>{this.input=e},type:"text",value:this.state.searchQuery})}render(){const{showPlaylists:e,customRadioEnabled:t,internationalPlaylistRadioEnabled:n,liveRadioEnabled:r,onDemandEnabled:i,searchFilter:o,isSearchOpen:s,translate:a}=this.props,l=he(a,ce.Eu),c=l.filter((({value:o})=>{switch(o){case ce.Eu.COLLECTION:return e||n;case ce.Eu.SONG:case ce.Eu.ARTIST:return t;case ce.Eu.ALBUM:case ce.Eu.BUNDLE:return i;case ce.Eu.LIVE:return r;default:return!0}})),h=l.find((e=>e.value===o));return(0,E.BX)(ie,{"data-test":"header-search-form",isSearchOpen:s,onSubmit:this.onSubmit,children:[(0,E.BX)(G,{isSearchOpen:s,children:[(0,E.tZ)(ne,{}),this.renderInput(le,this.getPlaceholder()),this.renderInput(ae,a("search"))]}),(0,E.tZ)(y.Z,{shouldShow:s,children:(0,E.BX)(E.HY,{children:[(0,E.tZ)(y.Z,{shouldShow:c.filter((({value:e})=>e!==ce.Eu.ALL)).length>1,children:(0,E.tZ)(oe.Z,{dataTest:"search-form",name:"Filter",onChange:this.onFilterChange,options:c,ref:e=>{this.filter=e},selectClasses:"short",selectedOption:h||c[0],selectStyles:{width:"50%"},tabindex:4})}),(0,E.tZ)(K,{"aria-label":"Close search form","data-test":"search-form-close-button",onBlur:this.onSearchCloseBlur,onClick:this.onSearchCloseClick,onFocus:this.onSearchCloseFocus,children:(0,E.tZ)(V.Z,{})})]})})]})}}var pe=n(1441),ue=n(29929),ge=n(32034),me=n(98329),fe=n(10003),ve=n(79897),Ze=n(3849),ye=n(74940),we=n(89781);const be=(0,pe.qC)((0,Ze.NC)("translate"),(0,C.connect)((0,ge.zB)({abTestGroups:me.UF,customRadioEnabled:fe.BB,liveRadioEnabled:fe.Ew,newSearchEnabled:fe.D2,onDemandEnabled:fe.pO,searchFilter:ve.QT,isSearchOpen:x.SP,searchQuery:ve.uP,showPlaylists:we.A_,internationalPlaylistRadioEnabled:fe.II}),{setSearchFilter:ye.Q,openSearch:()=>(0,S.h7)({id:ue.eO.Search,context:null}),closeModal:S.Mr,setSearchQuery:ye.q}))(de),Se=function({darkModeAvailable:e,displayName:t,isInitialRender:n,isLoggedOut:r,logoutAndStartAnonymousSession:i,onLoginClick:o,isSearchOpen:s,showLoginInNav:a}){const l=(0,w.Z)(),c=!r&&!n,h=(0,E.tZ)(y.Z,{shouldShow:c,children:(0,E.BX)(z,{children:[(0,E.tZ)(X.Z,{size:30}),(0,E.tZ)(W,{"data-test":"header-profile-name",children:t}),(0,E.tZ)(p.Z,{})]})});return(0,E.BX)(Q,{"data-test":"header-right",isSearchOpen:s,children:[(0,E.tZ)(y.Z,{shouldShow:!n,children:(0,E.tZ)(be,{})}),(0,E.tZ)(y.Z,{shouldShow:e,children:(0,E.tZ)(H,{})}),(0,E.tZ)(y.Z,{shouldShow:c&&!s,children:(0,E.BX)(U,{extendDown:!0,triggerBtn:h,children:[(0,E.tZ)(M.Z,{dataTest:"profile-dropdown-settings",title:l("Settings"),to:"/my/settings/",children:l("Settings")}),(0,E.tZ)(M.Z,{dataTest:"profile-dropdown-logout",onClick:()=>{i({forced:!1,noRedirect:!1})},title:l("Log Out"),underline:!0,children:l("Log Out")})]})}),(0,E.tZ)(y.Z,{shouldShow:a&&!c&&!s,children:(0,E.tZ)($,{onClick:o,title:l("Account"),children:(0,E.tZ)(L.Z,{"data-test":"account-icon"})})})]})};var xe=n(11692);const Oe=(0,o.Z)("ul",{target:"em9d7m0"})((({theme:e})=>({display:"flex",flexWrap:"nowrap",justifyContent:"center",margin:0,padding:"0 2rem",".btn":{paddingLeft:0},[(0,a.Z)(e.mediaQueries.max.width[1280])]:{justifyContent:"center"}})),""),Ce=["color"];function Ee(){return Ee=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,Ce);return(0,E.tZ)("svg",Ee({fill:"none",height:"24",viewBox:"0 0 24 24",width:"24"},n,{children:(0,E.tZ)("path",{d:"M4 18H20C20.55 18 21 17.55 21 17C21 16.45 20.55 16 20 16H4C3.45 16 3 16.45 3 17C3 17.55 3.45 18 4 18ZM4 13H20C20.55 13 21 12.55 21 12C21 11.45 20.55 11 20 11H4C3.45 11 3 11.45 3 12C3 12.55 3.45 13 4 13ZM3 7C3 7.55 3.45 8 4 8H20C20.55 8 21 7.55 21 7C21 6.45 20.55 6 20 6H4C3.45 6 3 6.45 3 7Z",fill:t})}))},De=(0,o.Z)("li",{target:"e4cggn20"})((({theme:e})=>({display:"inline-block",marginRight:"3rem",whiteSpace:"nowrap",a:{color:e.colors.gray[400],position:"relative",textDecoration:"none","&.active":{borderBottom:`0.3rem solid ${e.colors.red.primary}`,paddingBottom:"1.5rem"},"&:hover":{color:e.colors.gray[600]}}})),"");function je(){return je=Object.assign?Object.assign.bind():function(e){for(var t=1;tje({flexShrink:0},c({listenInAppVisible:e,pushDown:t,isSearchOpen:n,theme:r,isAdsEnabled:i}))),"");var Ae=n(99861);var Be=n(61993);function Ie(){return Ie=Object.assign?Object.assign.bind():function(e){for(var t=1;tIe({display:"flex",height:t.dimensions.headerHeight,margin:"0 auto",maxWidth:"142rem",padding:"0 1.5rem",position:"relative",width:"100%",flexShrink:0,[(0,a.Z)(t.mediaQueries.max.width[599])]:n?{height:"100%"}:{}},e?{backgroundColor:t.colors.white.primary,justifyContent:"center",maxWidth:"unset",padding:0}:{})),"");var Re=n(82535),He=n(41126),Ne=n(83533),Qe=n(11129);const $e=(0,Ne.ZP)().getState(),Me={"/":(0,Qe.Ld)($e)?{ccrpos:2014}:null,"/your-library":{ccrpos:2014}};function ze(e){return!!function(e){const t=`/${(e||window.location.pathname).split("/")[1]}`;return Me[t]}(e)}var Te=n(66630),Ue=n(95009),Fe=n(62727);const We=["text"];function Xe(){return Xe=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{adFree:t,appMounted:n,allAccessPreview:o,customRadioEnabled:a,darkModeAvailable:l,displayName:c,hasUpgrade:u,isLoggedOut:m,internationalPlaylistRadioEnabled:f,listenInAppVisible:Z,logoutAndStartAnonymousSession:b,navLinks:x,path:O,isSearchOpen:L,showLoginInNav:A,showPlaylists:B,showSideNav:I,subInfoLoaded:P,upgradeUrl:H}=e,[N,Q]=(0,R.useState)(!0),[z,T]=(0,R.useState)(0),U=(0,w.Z)(),F=(0,R.useRef)(null),W=(0,R.useRef)(null),X=(0,R.useRef)(null),_=(0,C.useDispatch)(),K=(0,R.useCallback)((e=>{const t=e<0?0:e;z!==t&&T(t)}),[z]),V=(0,R.useCallback)((0,r.Z)((()=>{if(!L&&P)if(window.innerWidth<768)0!==z&&T(0);else if(F&&W&&X){const e=(0,i.Z)(F,["current","offsetWidth"],0)-(0,i.Z)(W,["current","offsetWidth"],0)-(0,i.Z)(X,["current","offsetWidth"],0),t=Math.floor(e/115)-1;K(t)}}),300),[L,P]),q=(0,R.useCallback)((()=>{I()}),[I]),G=(0,R.useCallback)((()=>(0,Te.i)({customRadioEnabled:a,internationalPlaylistRadioEnabled:f,navLinks:x,pageNamePrefix:"discover",showPlaylists:!N&&B,translate:U}).map((e=>{let{text:t}=e,n=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r=0||(i[n]=e[n]);return i}(e,We);return(0,E.tZ)(M.Z,Xe({},n,{children:t}),n.dataTest)}))),[N,f,a,x,B,U]);(0,Be.Z)((()=>{xe.Z.on(xe.E.PAGE_RENDERED,(()=>V()))})),function({element:e,event:t,handler:n,passive:r=!1}){(0,R.useEffect)((()=>{const i=e||window;return i.addEventListener(t,n,r),function(){i.removeEventListener(t,n)}}))}({event:"resize",handler:V}),(0,R.useEffect)((()=>{N&&(Q(!1),V())}),[N,V]),(0,R.useEffect)((()=>{L&&!P||(T(0),V())}),[V,L,P]),(0,R.useEffect)((()=>{V()}),[V,u]);const Y=G(),J=Y.slice(0,z).map((e=>(0,E.tZ)(De,{"data-test":"header-menu-item",children:e},e.key))),ee=N?[]:Y.slice(z),ne=(0,E.BX)($,{children:[U("More"),(0,E.tZ)(p.Z,{height:"24",width:"12"})]}),{isAdsEnabled:re}=(0,Ae.Z)(),ie=n&&!t&&ze(O)&&!L;return(0,E.BX)(E.HY,{children:[(0,E.tZ)(Le,{isAdsEnabled:re,isSearchOpen:L,listenInAppVisible:Z,pushDown:ie}),(0,E.BX)(h,{isAdsEnabled:re,isSearchOpen:L,listenInAppVisible:Z,pushDown:ie,children:[re&&!L?(0,E.tZ)(s,{children:(0,E.tZ)(Ue.z,{maxWidths:[Re.j.LARGE],children:([e])=>n?e?(0,E.tZ)(He.oU,{ccrpos:"2014",ContainerPrimitive:He.t6,dimensions:Fe.N.HEADER_MOBILE}):!e&&ze(O)?(0,E.tZ)(He.oU,{ccrpos:"2014",ContainerPrimitive:He.t6,dimensions:Fe.N.HEADER_DESKTOP}):null:null})}):null,(0,E.BX)(Pe,{id:"NavHeader",isSearchOpen:L,pushDown:ie,children:[(0,E.BX)(j,{"data-test":"header-mobile",isSearchOpen:L,children:[(0,E.tZ)($,{"data-test":"header-hamburger",onClick:q,children:(0,E.tZ)(ke,{})}),(0,E.tZ)(v.Z,{dark:!0,onClick:()=>_((0,S.Mr)())}),(0,E.tZ)($,{"data-test":"header-search",onClick:()=>{_((0,S.h7)({id:ue.eO.Search,context:null}))},children:(0,E.tZ)(te,{})})]}),(0,E.BX)(g,{isSearchOpen:L,pushDown:ie,ref:F,children:[(0,E.tZ)("span",{ref:W,children:(0,E.tZ)(k,{allAccessPreview:o,hasUpgrade:u,isInitialRender:N,upgradeUrl:H})}),(0,E.tZ)(y.Z,{shouldShow:!L,children:(0,E.tZ)(D,{"data-test":"header-middle",children:(0,E.BX)(Oe,{"data-test":"header-menu-main",children:[J,(0,E.tZ)(y.Z,{shouldShow:!!ee.length,children:(0,E.tZ)(d.Z,{customId:"headerMenuDropdown",extendDown:!0,role:"listitem",triggerBtn:ne,children:ee})})]})})}),(0,E.tZ)("span",{ref:X,children:(0,E.tZ)(Se,{darkModeAvailable:l,displayName:c,isInitialRender:N,isLoggedOut:m,isSearchOpen:L,logoutAndStartAnonymousSession:b,onLoginClick:()=>{_((0,S.Mo)({context:"profile"}))},showLoginInNav:A})})]})]})]})]})}},31858:(e,t,n)=>{n.d(t,{Z:()=>r});const r=(0,n(46255).Z)("h6",{target:"eiuej810"})((({theme:e})=>({color:e.colors.gray[600],fontSize:e.fonts.size[14],fontWeight:e.fonts.weight.medium,letterSpacing:"0.15rem",lineHeight:e.fonts.lineHeight[18],margin:"0.1rem 0",textTransform:"uppercase",transition:"all 300ms ease-in-out"})),"")},70644:(e,t,n)=>{n.d(t,{Z:()=>o});var r=n(46255),i=n(74763);const o=(0,r.Z)(i.Z,{target:"elvgrfh0"})((({floatRight:e=!1,isBlock:t=!1,underline:n=!0,theme:r})=>({color:r.colors.gray[600],cursor:"pointer",float:e?"right":"none",fontSize:r.fonts.size[14],fontWeight:r.fonts.weight.regular,lineHeight:r.fonts.lineHeight[16],textDecoration:n?"underline":"none",transition:"all 300ms ease-in-out","&:hover":{textDecoration:n?"underline":"none"},width:t?"100%":"auto"})),"")},79897:(e,t,n)=>{n.d(t,{QT:()=>a,uP:()=>s});var r=n(17),i=n(32034);const o=(0,i.P1)((e=>e),(e=>e.search||(0,r.Z)(e,"search",{}))),s=(0,i.P1)(o,(e=>(0,r.Z)(e,"searchQuery",""))),a=(0,i.P1)(o,(e=>(0,r.Z)(e,"searchFilter","")))},55028:(e,t,n)=>{n.d(t,{Z:()=>s});var r=n(34853);const i=["data-test"];function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,i);return(0,r.tZ)("svg",o({"data-test":t,height:"15",viewBox:"0 0 320 512",width:"15",xmlns:"http://www.w3.org/2000/svg"},n,{children:(0,r.tZ)("path",{d:"M143 352.3L7 216.3c-9.4-9.4-9.4-24.6 0-33.9l22.6-22.6c9.4-9.4 24.6-9.4 33.9 0l96.4 96.4 96.4-96.4c9.4-9.4 24.6-9.4 33.9 0l22.6 22.6c9.4 9.4 9.4 24.6 0 33.9l-136 136c-9.2 9.4-24.4 9.4-33.8 0z"})}))}}}]); //# sourceMappingURL=Header.www.js.map