(function(){try{var g=typeof window!=="undefined"?window:typeof global!=="undefined"?global:typeof self!=="undefined"?self:{};g["__faroBundleId_Speechify Chrome Extension"]="13.4.1"}catch(l){}})();
import{a as ot,c as tt,d as Le}from"./chunk-EVHRVMJT.js";import{a as rt}from"./chunk-LSJOZXIQ.js";import{a as et}from"./chunk-Z3FNN5ZZ.js";import{a as No}from"./chunk-6U3SPWIY.js";import{A as te,B as So,C as xo,Ca as To,Cb as O,Cc as Pe,Ec as ge,Fe as Ko,Gb as we,Hb as Ao,I as Co,Id as Z,Kd as qo,L as bo,Ma as Do,N as yo,O as vo,Pc as Wo,Pd as Yo,Qc as Bo,R as wo,Rc as _o,Re as Xo,S as Q,Sc as Oo,T as Vo,V as Po,W as Ue,X as Lo,Y as Ze,Z as fe,a as ti,ad as Uo,b as fo,fc as Ve,hc as W,lc as Mo,nd as jo,of as Jo,pf as Qo,qa as ko,qf as Ho,ra as Io,sa as Ro,tc as Fo,ua as Eo,uc as U,x as si,y as ho,z as ue}from"./chunk-XMRXO6YU.js";import{b as ii,f as go,g as ni,h as ve,m as $o}from"./chunk-ODCFEFOB.js";import{H as Zo,R as he,S as zo,T as Go,i as l,l as a,q as k,s as T}from"./chunk-24ZZP5UQ.js";import{b as Oe,f as ri,g as y}from"./chunk-GQY3J744.js";import{M as uo,j as co}from"./chunk-NWEJW7RD.js";import{c as ze}from"./chunk-ASZMUWWE.js";import{a as po,b as mo}from"./chunk-6I7EUWRH.js";import{b as me,d as x,g as i,i as o,j as m,n}from"./chunk-CLPINNGF.js";var Et=me((Sl,Rt)=>{n();i();var xi=go(),It=1/0,Ci=17976931348623157e292;function bi(e){if(!e)return e===0?e:0;if(e=xi(e),e===It||e===-It){var r=e<0?-1:1;return r*Ci}return e===e?e:0}Rt.exports=bi});var Dt=me((bl,Tt)=>{n();i();var yi=Et();function vi(e){var r=yi(e),t=r%1;return r===r?t?r-t:r:0}Tt.exports=vi});var $t=me((wl,Mt)=>{n();i();var wi=ii(),Vi=Dt(),Pi=go(),At=wo(),Li=wi.isFinite,ki=Math.min;function Ii(e){var r=Math[e];return function(t,s){if(t=Pi(t),s=s==null?0:ki(Vi(s),292),s&&Li(t)){var c=(At(t)+"e").split("e"),p=r(c[0]+"e"+(+c[1]+s));return c=(At(p)+"e").split("e"),+(c[0]+"e"+(+c[1]-s))}return r(t)}}Mt.exports=Ii});var Nt=me((Ll,Ft)=>{n();i();var Ri=$t(),Ei=Ri("round");Ft.exports=Ei});var Ir=me((ud,kr)=>{n();i();var dn=wo(),pn=0;function mn(e){var r=++pn;return dn(e)+r}kr.exports=mn});n();i();var Xr=x(ti());n();i();var st=x(y());var lt=l.div`
  border-radius: 9999px;
  background: ${a["bg-sec-0-70"]};
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  box-sizing: border-box;
`,li=l(lt)`
  transform: rotate(180deg);
`,it=l(T)`
  display: flex;
  align-items: center;
  gap: 4px;
`;function nt(){return o("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},o("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.96625 4.75971C4.25915 4.46682 4.73402 4.46682 5.02691 4.75971L7.80632 7.53912C7.94697 7.67977 8.02599 7.87054 8.02599 8.06945C8.02599 8.26836 7.94697 8.45913 7.80632 8.59978L5.02691 11.3792C4.73402 11.6721 4.25914 11.6721 3.96625 11.3792C3.67336 11.0863 3.67336 10.6114 3.96625 10.3185L6.21533 8.06944L3.96625 5.82037C3.67336 5.52748 3.67336 5.0526 3.96625 4.75971ZM8.51499 4.75971C8.80788 4.46682 9.28276 4.46682 9.57565 4.75971L12.3551 7.53912C12.4957 7.67977 12.5747 7.87054 12.5747 8.06945C12.5747 8.26836 12.4957 8.45913 12.3551 8.59978L9.57565 11.3792C9.28275 11.6721 8.80788 11.6721 8.51499 11.3792C8.22209 11.0863 8.2221 10.6114 8.51499 10.3185L10.7641 8.06945L8.51499 5.82037C8.2221 5.52748 8.2221 5.0526 8.51499 4.75971Z",fill:"white"}))}function Ge(){return(0,st.useEffect)(()=>{Eo()},[]),o(jo,{onClose:()=>ke("/"),width:219,showDismiss:!0},o(it,{font:"body-5"},"Click",o(lt,null,o(nt,null)),"to skip forward."),o(it,{font:"body-5",style:{marginTop:"8px"}},"Click",o(li,null,o(nt,null)),"to skip backward."))}n();i();var Se=x(y());n();i();var ai=l.div`
  width: 258px;
  box-sizing: border-box;
  padding: 0 8px 8px;
  display: flex;
  flex-direction: column;
`,ci=l.div`
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 6px;
  border-radius: 6px;
  background: ${({actionDone:e})=>e?a["bg-success"]:a["bg-sec-0-80"]};

  path {
    fill: ${({actionDone:e})=>e?a["icn-txt-success"]:a["icn-txt-prim"]};
  }
`,di=l.div`
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px;
  border-radius: 12px;

  .chevron-right {
    color: ${a["icn-txt-tert"]};
  }

  &:hover {
    background: ${a["sf-sec-hov-0-100"]};
  }

  &:active {
    background: ${a["sf-sec-pres-0-100"]};
  }

  ${({actionDone:e})=>e?"background: transparent !important; cursor: default;":""}
`,pi=l.div`
  display: flex;
  align-items: center;
  gap: 8px;
`,mi=l.div`
  align-self: baseline;
`,re={ButtonsList:ai,Button:di,HelpCenterArrowWrapper:mi,ButtonContent:pi,IconButton:ci};var ui="https://help.speechify.com/en/collections/2750947-speechify-for-chrome",at=()=>{let{reportedDomains:e}=O(),r=(0,Se.useMemo)(()=>e?.includes(ze()),[e]),t=(0,Se.useCallback)(()=>{ke("/")},[]),s=(0,Se.useMemo)(()=>{let c=()=>{Mo("extension_usage_broken_site_reported"),Do(ze())},p=d=>{uo("show-settings-modal"),Ko(d)};return[{icon:o(Zo,null),label:"Capture & Listen",onClick:()=>Xo("broken-site-menu")},{icon:o(Wo,null),label:"Accessibility",onClick:()=>p("/accessibility")},{icon:o(Bo,null),label:"Keyboard Shortcuts",onClick:()=>p("/keyboardshortcuts")},{icon:r?o(Go,null):o(_o,null),label:r?"Website Reported":"Report Site",onClick:c,disabled:r,actionDone:r,preventClose:!0},{icon:o(Oo,null),label:"Open Help Center",onClick:()=>window.open(ui,"_blank","noopener"),suffixIcon:o(re.HelpCenterArrowWrapper,null,o(zo,null))}]},[r]);return o(re.ButtonsList,null,s.map(({icon:c,label:p,onClick:d,suffixIcon:u,actionDone:g,preventClose:h})=>o(re.Button,{key:p,actionDone:g,onClick:()=>{g||(d(),h||t())}},o(re.ButtonContent,null,o(re.IconButton,{actionDone:g},c),o(T,{font:"subheading-6"},p),u),!g&&o(he,{className:"chevron-right"}))))};n();i();var B=x(y());var tr=x(ni());n();i();var Ie=x(y());n();i();var ct=l.div`
  align-items: flex-start;
  display: flex;
  justify-content: space-between;
  padding: 16px 40px 24px;
`,dt=l.div`
  align-items: center;
  display: flex;
  flex-shrink: 0;
  gap: 0px;
  justify-content: flex-end;
  padding: 0px 4px;
  width: 48px;

  .react-switch-bg {
    background: ${({checked:e})=>e?"radial-gradient(263.4% 263.4% at -38.15% -15%, #ea6aff 22.4%, #6b78fc 66.49%) !important":"initial"};
  }

  .react-switch-handle {
    background: ${a["icn-txt-white"]} !important;
  }
`,pt=l.div`
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  flex-shrink: 0;
  gap: 4px;
  width: 216px;
`,mt=l.div`
  align-self: stretch;
  color: ${a["icn-txt-prim"]};
  ${k["subheading-6"]};
`,ut=l.div`
  align-self: stretch;
  color: ${a["icn-txt-sec"]};
  ${k["body-7"]};
`;var fi=({isLocked:e,playbackSpeed:r})=>{let{autoSpeedUp:t}=O(),s=(0,Ie.useMemo)(()=>e?"You reached your speed limit":`Speed up as you go every ${ot(r||1.1)} words`,[e,r]),c=(0,Ie.useCallback)(()=>To(!t),[t]);return o(ct,null,o(pt,null,o(mt,null,"Increase Speed Automatically"),o(ut,null,s)),o(dt,{checked:!!t},o(qo,{width:40,height:24,"aria-label":Fo("AUTOMATIC_PLAYBACK_SPEED_UP_SWITCH"),"data-testid":U.AUTOMATIC_PLAYBACK_SPEED_UP_SWITCH,checked:t,disabled:e,onChange:c})))},ft=fi;n();i();var qe=x(y());n();i();var gt=()=>o("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},o("g",{clipPath:"url(#clip0_20322_3343)"},o("rect",{width:"16",height:"16",rx:"8",fill:"#1E1E1E"}),o("circle",{cx:"8.00006",cy:"8.00006",r:"6.02545",fill:"#1E1E1E"}),o("path",{d:"M7.2 5.5V7H8.8V5.5C8.8 5.05817 8.44183 4.7 8 4.7C7.55817 4.7 7.2 5.05817 7.2 5.5Z",fill:"#AFB9C8"}),o("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8 16C12.4183 16 16 12.4183 16 8C16 3.58172 12.4183 0 8 0C3.58172 0 0 3.58172 0 8C0 12.4183 3.58172 16 8 16ZM5.7 7H6V5.5C6 4.39543 6.89543 3.5 8 3.5C9.10457 3.5 10 4.39543 10 5.5V7H10.3C10.9627 7 11.5 7.53726 11.5 8.2V10.7371C11.5 11.3999 10.9627 11.9371 10.3 11.9371H5.7C5.03726 11.9371 4.5 11.3999 4.5 10.7371V8.2C4.5 7.53726 5.03726 7 5.7 7Z",fill:"#AFB9C8"})),o("defs",null,o("clipPath",{id:"clip0_20322_3343"},o("rect",{width:"16",height:"16",rx:"8",fill:"white"})))),ht=()=>o("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o("g",{id:"icons/20"},o("path",{id:"Vector",d:"M9 9H3C2.44772 9 2 9.44772 2 10C2 10.5523 2.44772 11 3 11H9H11H17C17.5523 11 18 10.5523 18 10C18 9.44772 17.5523 9 17 9H11H9Z",fill:"currentColor"}))),St=()=>o("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o("g",{id:"icons/20"},o("path",{id:"Vector",fillRule:"evenodd",clipRule:"evenodd",d:"M11 3C11 2.44772 10.5523 2 10 2C9.44772 2 9 2.44772 9 3V9H3C2.44772 9 2 9.44772 2 10C2 10.5523 2.44772 11 3 11H9V17C9 17.5523 9.44772 18 10 18C10.5523 18 11 17.5523 11 17V11H17C17.5523 11 18 10.5523 18 10C18 9.44772 17.5523 9 17 9H11V3Z",fill:"currentColor"})));n();i();var je=x(y()),gi=l.div`
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding-top: 10px;

  gap: 8px;
  width: 100%;
`,Ct=({updatePlaybackSpeed:e})=>{let r=Z(),t=(0,je.useMemo)(()=>r&&te(r)&&r.status!=="expired",[r]),s=(0,je.useMemo)(()=>t?[.8,1,1.2,1.5,2,2.5]:[.8,1,1.2],[t]);return o(gi,null,s.map(c=>o(ge,{key:c,onClick:()=>e(c)},parseFloat(c.toFixed(2)),"x")))};n();i();var bt=l.div`
  align-items: center;
  display: flex;
  flex-direction: column;
  gap: 32px;
`,yt=l.div`
  display: flex;
  align-items: center;
  align-self: stretch;
  flex-direction: column;
  gap: 32px;
  justify-content: center;
  padding: 12px 0;
`,vt=l.div`
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: center;
`,wt=l.div`
  ${k["heading-2"]};
  color: ${a["icn-txt-prim"]};
  text-align: center;
  width: 80px;
`,Vt=l.div`
  align-self: stretch;
  color: ${a["icn-txt-sec"]};
  ${k["subheading-7"]}
  text-align: center;
`,Pt=l.div`
  display: flex;
  align-items: center;
  align-self: stretch;
  flex-direction: column;
  gap: 4px;
`,Lt=l.div`
  align-items: center;
  align-self: stretch;
  color: ${a["icn-txt-prim"]};
  display: flex;
  font-size: 18px;
  font-style: normal;
  font-weight: 700;
  gap: 4px;
  justify-content: center;
  letter-spacing: 0.16px;
  line-height: 24px;
  text-align: center;
`;var hi=e=>{let r={Slow:[.4,1],Normal:[1,1.5],Fast:[1.5,3],"Speed Reader":[3,4.6]};for(let[t,[s,c]]of Object.entries(r))if(e>=s&&e<c)return t;return"Invalid Speed"},Si=({maxPlaybackSpeed:e,minPlaybackSpeed:r,updatePlaybackSpeed:t,playbackSpeed:s})=>{let c=(0,qe.useCallback)(()=>t(s-.05),[s,t]),p=(0,qe.useCallback)(()=>t(s+.05),[s,t]),d=W.useTime(),u=d.isLoading===!0?0:d.totalEstimatedDuration,g=$o("short")(u);return o(yt,null,o(Pt,null,o(Lt,null,hi(s)),o(Vt,null,"Duration: ~",g)),o(bt,null,o(vt,null,o(ge,{iconOnly:!0,disabled:s===r,onClick:c},o(ht,null)),o(wt,{"data-testid":U.PLAYBACK_SPEED_PANEL_SPEED_VALUE},parseFloat(s.toFixed(2)),"x"),o(ge,{iconOnly:!0,disabled:s===e,onClick:p},o(St,null))),o(Ct,{updatePlaybackSpeed:t})))},kt=Si;n();i();var Jt=x(tt()),Ee=x(y());n();i();var Yt=x(Nt()),xe=x(y());n();i();var jt=x(y());n();i();var Wt=l.div`
  background: ${({isLocked:e})=>e?a["bg-tert-10-70"]:a["bg-sec-0-90"]};
  display: flex;
  flex-direction: column-reverse;
  justify-content: space-between;
  align-items: center;
  flex-grow: 1;
  position: relative;
  padding: 4px 8px;

  ${({isFirst:e})=>e?"border-bottom-left-radius: 8px; border-bottom-right-radius: 8px;":""}

  ${({isLast:e})=>e?"border-top-left-radius: 8px; border-top-right-radius: 8px;":""}
`,Bt=l.div`
  height: 2px;
  cursor: pointer;
  background-color: ${a["brdr-sec-20-60"]};
  border-radius: 9999px;
  transition: background-color 0.2s ease;

  width: ${({stepWidth:e})=>e}px;

  ${({isLocked:e})=>e?`
        opacity: 0.75;
      `:`
        &:hover {
          background-color: ${a["icn-txt-prim-electric"]};
        }
      `}
`,_t=l.div`
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
`,Ot=l.div`
  display: flex;
  flex-direction: column-reverse;
  height: 100%;
  position: relative;
`,Ut=l.div`
  padding: 6px 0;
`,Zt=l.div`
  -webkit-user-drag: none;
  user-drag: none;

  position: relative;
  height: 286px;
  width: 48px;

  cursor: pointer;
  border-radius: 8px;

  // display: flex;
  gap: 1px;
`,zt=l.div`
  position: absolute;
  bottom: 1px;
  margin: 0 2px;
  box-sizing: border-box;

  width: 44px;
  padding: 3px;
  border-radius: 8px;

  background: ${({isIncreased:e})=>e?"linear-gradient(315deg, #EA6AFF 0%, #6B78FC 100%)":a["bg-prim-cta"]};
`,Gt=l.div`
  padding-top: 4px;
  padding-bottom: 4px;

  border-radius: 12px;
  cursor: grab;

  background-color: ${a["icn-txt-white"]};
`;var Ye={HIDDEN:0,NORMAL:24,PROMINENT:36},Ti=e=>{let r=e%2===1,t=r&&(e-1)/2%2===1;return r?t?Ye.PROMINENT:Ye.NORMAL:Ye.HIDDEN},qt=jt.default.memo(function({steps:r,isLocked:t,isFirst:s,isLast:c,onLockedInteraction:p}){return o(Wt,{onPointerDown:()=>{t&&p()},isFirst:s,isLast:c,isLocked:t},r.map((d,u)=>{let g=Ti(u);return c&&u===r.length-1?null:o(Bt,{isLocked:t,stepWidth:g,key:`speed-picker-step-${d}`})}),t&&o(_t,null,o(gt,null)))});var Di=(e,r)=>{let t=(r-e)/10;return Array.from({length:8},(s,c)=>(0,Yt.default)(e+t*(c+1),2))},Kt=xe.default.memo(function({onLockedInteraction:r,sectionRanges:t}){let s=(0,xe.useMemo)(()=>t.map(d=>Di(d.min,d.max)),[t]),c=Z(),p=(0,xe.useMemo)(()=>c&&te(c)&&c.status!=="expired",[c]);return o(Ot,null,s.map((d,u)=>o(qt,{key:`speed-picker-section-${u}`,steps:d,isFirst:u===0,isLast:u===s.length-1,isLocked:!p&&u>=2,onLockedInteraction:r})))});n();i();var Re=x(tt()),V=x(y());var Ai=e=>{let r=M.length,t=100/r,s=(0,Re.default)(Math.floor(e/t),0,r-1);if(s===r-1){let{min:u,max:g}=M[s];return u+(e-t*(r-1))/t*(g-u)}let{min:c,max:p}=M[s],d=e%t;return c+d/t*(p-c)},Mi=166,Xt=({sliderRef:e,maxPlaybackSpeed:r,minPlaybackSpeed:t,playbackSpeed:s,onMouseMove:c,onPlaybackSpeedChange:p})=>{let[d,u]=(0,V.useState)(!1),[g,h]=(0,V.useState)(!1),C=(0,V.useRef)(!1),b=(0,V.useRef)(0),v=(0,V.useRef)(s),I=(0,V.useRef)(null),P=(0,V.useCallback)(w=>{if(I.current){let A=I.current.height,J=w-I.current.top,Hr=(0,Re.default)((A-J)/A*100,0,100),ei=Ai(Hr),oi=Math.round(ei*20)/20,ao=(0,Re.default)(oi,t,r);C.current?c(ao):p(ao)}},[p,c,t,r]),D=(0,V.useCallback)(w=>{C.current=!0,u(!0),P(w)},[P]),E=(0,V.useCallback)(w=>{C.current=!1,u(!1),P(w.clientY)},[]),L=(0,V.useCallback)(w=>{w.preventDefault(),w.stopPropagation(),D(w.clientY),e.current?.setPointerCapture(w.pointerId)},[D]),R=(0,V.useCallback)(w=>{E(w),e.current?.releasePointerCapture(w.pointerId)},[E]),N=(0,V.useCallback)(w=>{C.current&&P(w)},[P]),F=(0,V.useCallback)(w=>{C.current&&(w.preventDefault(),N(w.touches[0].clientY))},[N]);return(0,V.useLayoutEffect)(()=>{let w=setTimeout(()=>{e.current&&(I.current=e.current.getBoundingClientRect())},350);return()=>clearTimeout(w)},[]),(0,V.useEffect)(()=>{let w=A=>{N(A.clientY)};return e.current?.addEventListener("pointermove",w,{passive:!0}),e.current?.addEventListener("pointerup",E,{passive:!0}),()=>{e.current?.removeEventListener("pointermove",w),e.current?.removeEventListener("pointerup",E)}},[N,E,F]),(0,V.useEffect)(()=>{if(v.current===s)return;if(C.current){h(!1),v.current=s,b.current=performance.now?.()??Date.now();return}let w=performance.now?.()??Date.now(),J=w-(b.current||0)>Mi;h(J),v.current=s,b.current=w},[s]),{handlePointerDown:L,handlePointerUp:R,isDragging:d,shouldDelay:g}};var M=[{min:.4,max:1},{min:1,max:1.5},{min:1.5,max:3},{min:3,max:4.5}],$i=({playbackSpeed:e,maxPlaybackSpeed:r,minPlaybackSpeed:t,onPlaybackSpeedChange:s,onMouseMove:c,isIncreased:p,onLockedInteraction:d=()=>{}})=>{let u=(0,Ee.useRef)(null),g=(0,Ee.useMemo)(()=>(0,Jt.default)((()=>{let P=M.find(F=>e>=F.min&&e<=F.max);if(!P)return e<=M[0].min?0:100;let{min:D,max:E}=P,L=M.indexOf(P),R=100/M.length*L,N=(e-D)/(E-D)*(100/M.length);return R+N})(),6,100),[e]),{handlePointerDown:h,handlePointerUp:C,isDragging:b,shouldDelay:v}=Xt({maxPlaybackSpeed:r,minPlaybackSpeed:t,onMouseMove:c,onPlaybackSpeedChange:s,playbackSpeed:e,sliderRef:u});return o(Ut,null,o(Zt,{ref:u,role:"slider","aria-label":"Playback Speed","aria-valuenow":e,"aria-valuemin":M[0].min,"aria-valuemax":M[M.length-1].max,tabIndex:0,onPointerDown:h,onPointerUp:C},o(Kt,{onLockedInteraction:d,sectionRanges:M}),o(zt,{isIncreased:p,style:{height:`${g}%`,transitionProperty:b?"none":"height",transitionDuration:b?"0ms":"600ms",transitionTimingFunction:"cubic-bezier(0.14, 1, 0.34, 1)",transitionDelay:b?"0ms":v?"166ms":"0ms"}},o(Gt,null))))},Qt=$i;n();i();var Ht=x(y());var er=l.div`
  align-items: center;
  display: flex;
  gap: 48px;
  justify-content: center;
`,or=l.div`
  align-items: flex-start;
  background: ${a["bg-sec-0-100"]};
  display: flex;
  flex-direction: column;
  padding: 0 40px;
`;var c1=l.div`
  background: #fff;
  border-radius: 6px;
  box-shadow: 0px 4px 6px 0px rgba(0, 0, 0, 0.32);
  color: #1e1e1e;
  font-size: 12px;
  ${({showOnRight:e=!1})=>e?"left: 50px;":"right: 48px"};
  line-height: 16px;
  padding: 4px 8px;
  position: absolute;
  text-align: center;
  top: 20%;
  width: max-content;
  max-width: 200px;
`,d1=l.div`
  position: relative;
  opacity: ${({visible:e})=>e?1:0};
  ${({visible:e})=>!e&&"pointer-events: none;"}
  transition: opacity 0.15s ease-in-out;
`;var Ke=.5,Ni=4.5,Wi=1e3,Bi=({playbackSpeed:e,setPlaybackSpeed:r})=>{let{autoSpeedUp:t}=O(),s=Z(),c=(0,B.useRef)(Date.now()),p=(0,B.useMemo)(()=>s&&te(s)&&s.status!=="expired"?Ni:mo,[s]),d=(0,B.useMemo)(()=>e>=p,[e,p]),u=(0,B.useCallback)((0,tr.default)(b=>ko(b,p),150),[p]),g=(0,B.useCallback)(b=>{let v=co(Ke,p,b);r(v),u(v)},[p]),h=()=>{Pe("speed_picker","increased_listening_speeds")},C=(0,B.useCallback)(b=>{r(b);let v=Date.now();v-c.current>Wi&&(c.current=v,g(b))},[g]);return o(m,null,o(or,null,o(er,null,o(kt,{maxPlaybackSpeed:p,minPlaybackSpeed:Ke,updatePlaybackSpeed:g,playbackSpeed:e}),o(Qt,{onLockedInteraction:h,onMouseMove:C,onPlaybackSpeedChange:g,playbackSpeed:e,maxPlaybackSpeed:p,minPlaybackSpeed:Ke,isIncreased:!!t&&!d}))),o(ft,{isLocked:d,playbackSpeed:e}))},rr=Bi;n();i();var ir=x(y());var _i=l(fo)`
  width: 100%;
  padding: 32px;
  box-sizing: border-box;
`,nr=()=>{let{state:e}=W.usePlayingState();return(0,ir.useEffect)(()=>{["playing","buffering"].includes(e)&&(lr(!1),sr(!0))},[e]),o(_i,{column:!0,xAlign:!0,separation:"32px"},o(Yo,{align:!0},"This website is unsupported"))};n();i();n();i();var He=x(y());n();i();var z=x(y());n();i();var ar=e=>o("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},o("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13.1384 6.88837C13.4313 6.59548 13.9061 6.59548 14.199 6.88837C14.4919 7.18127 14.4919 7.65614 14.199 7.94903L11.7294 10.4187L14.1991 12.8884C14.492 13.1813 14.492 13.6561 14.1991 13.949C13.9062 14.2419 13.4313 14.2419 13.1384 13.949L10.6687 11.4793L8.19897 13.949C7.90607 14.2419 7.4312 14.2419 7.13831 13.949C6.84542 13.6561 6.84542 13.1813 7.13831 12.8884L9.60803 10.4187L7.13837 7.94903C6.84547 7.65614 6.84547 7.18127 7.13836 6.88837C7.43125 6.59548 7.90613 6.59548 8.19902 6.88837L10.6687 9.35802L13.1384 6.88837Z",fill:"currentColor"}));n();i();var dr=x(y());n();i();var cr=()=>o("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M18.0168 4.59677C18.4073 4.98731 18.4073 5.62047 18.0168 6.01098L8.62378 15.4034C8.43623 15.591 8.18185 15.6963 7.91662 15.6963C7.65139 15.6963 7.39703 15.5909 7.20951 15.4033L1.98324 10.1759C1.59276 9.78533 1.59283 9.15217 1.9834 8.76169C2.37397 8.37121 3.00713 8.37128 3.39761 8.76184L7.91679 13.282L16.6026 4.59673C16.9932 4.20622 17.6263 4.20623 18.0168 4.59677Z",fill:"currentColor"}));n();i();var Oi=l.div`
  position: relative;
`,Ui=l.div`
  ${k["subheading-6"]};
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 8px 8px 12px;
  min-width: 140px;
  box-sizing: border-box;
  border-radius: 10px;
  cursor: pointer;
  color: ${a["icn-txt-prim"]};
  background: ${a["sf-sec-0-90"]};

  &:hover {
    background: ${a["sf-sec-hov-0-90"]};
  }

  &:active {
    background: ${a["sf-sec-pres-0-90"]};
  }

  ${({isOpen:e})=>e?`background: ${a["sf-sec-hov-0-90"]} !important;`:""}

  ${({hasSelectedOption:e})=>e?`
    color: ${a["icn-txt-blue"]};
    background: ${a["sf-act-blue"]};
  `:""}
`,Zi=l.div`
  display: flex;
  align-items: center;

  ${({isOpen:e})=>e?"transform: rotate(180deg);":""}
`,zi=l.div`
  overflow: hidden;
  border-radius: 12px;
  position: absolute;
  z-index: 9999;
  transform: translateY(100%);

  ${({isSubmenu:e,showSubmenuOnRight:r})=>e?`left: ${r?"-3px":"-1px"}`:"0"};
  ${({isSubmenu:e,showSubmenuOnRight:r,top:t})=>e?`transform: translateX(${r?"100%":"-100%"}); top: ${t}px;`:"bottom: -4px;"}
`,Gi=l.div`
  overflow: auto;
  min-width: 180px;
  max-height: 300px;
  ${Le};
  box-sizing: border-box;
  padding: 4px 0;
  background: ${a["bg-prim-w-90"]};
  border-radius: 12px;
  color: ${a["icn-txt-prim"]};
  display: flex;
  flex-direction: column;
  gap: 2px;

  &::-webkit-scrollbar {
    width: 4px;
  }
`,Xe=40,ji=l.div`
  position: relative;
  white-space: nowrap;
  ${k["subheading-6"]};
  color: ${a["icn-txt-prim"]};
  display: flex;
  padding: 10px 12px;
  gap: 12px;
  justify-content: space-between;
  background: ${a["sf-prim-w-90"]};
  cursor: pointer;
  border-radius: 8px;
  height: ${Xe}px;
  box-sizing: border-box;

  &:hover {
    background: ${a["sf-prim-hov-w-90"]};
  }

  &:active {
    background: ${a["sf-prim-pres-w-90"]};
  }

  ${({isSelected:e})=>e?`background: ${a["sf-prim-hov-w-90"]}`:""}
`,qi=l.div`
  width: 20px;
  height: 20px;
`,Yi=l.div`
  display: flex;
  gap: 8px;
`,Ki=l.div`
  color: ${a["icn-txt-tert"]};
  display: flex;
  align-items: center;
  transform: rotate(270deg);
`,$={ExpandIcon:Zi,Dropdown:Ui,Wrapper:Oi,DowndownList:Gi,DropdownItem:ji,DropdownItemLabel:Yi,ChevronIconWrapper:Ki,CheckMarkPlaceholder:qi,DowndownListWrapper:zi};var Je=({item:e,selectedOption:r,renderDropdownLabel:t,onSelection:s,setSubmenuItem:c,submenuItem:p})=>{let d=(0,dr.useMemo)(()=>e.value===r||!!r&&!!e.items?.find(({value:h})=>h===r),[e,r]),u=()=>{if(!e.items||e.items.length===1){p?.items?.includes(e)||c(void 0);return}c(e)},g=h=>{h.stopPropagation(),s(e.value)};return o($.DropdownItem,{isSelected:d,onMouseUp:g,onMouseEnter:u},o($.DropdownItemLabel,null,d?o(cr,null):o($.CheckMarkPlaceholder,null),t(e)),e.items&&e.items?.length>1&&o($.ChevronIconWrapper,null,o(we,null)))};var pr=({selectedOption:e,onSelection:r,placeholder:t,items:s,renderDropdownLabel:c,showSubmenuOnRight:p})=>{let d=(0,z.useRef)(null),[u,g]=(0,z.useState)(!1),[h,C]=(0,z.useState)(),b=R=>{R.stopPropagation(),r(void 0)},v=!!e,I=(0,z.useMemo)(()=>s.findIndex(({value:R})=>h?.value===R)*(Xe+2)+4-(d.current?.scrollTop||0),[h,s]),P=()=>{g(!1),C(void 0)},D=()=>g(!0),E=R=>{r(R),P()},L=(0,z.useRef)(null);return et([L],P),o($.Wrapper,{ref:L},o($.Dropdown,{isOpen:u,hasSelectedOption:v,tabIndex:0,onClick:u?P:D},t,v?o(ar,{onClick:b}):o($.ExpandIcon,{isOpen:u},o(we,null))),o("div",{style:{position:"relative"}},u&&o($.DowndownListWrapper,null,o($.DowndownList,{ref:d},s.map(R=>o(Je,{item:R,key:R.value,selectedOption:e,renderDropdownLabel:c,onSelection:E,setSubmenuItem:C,submenuItem:h})))),h?.items&&o($.DowndownListWrapper,{isSubmenu:!0,top:I,showSubmenuOnRight:p},o($.DowndownList,null,h.items.map(R=>o(Je,{item:R,key:R.value,selectedOption:e,renderDropdownLabel:c,onSelection:E,setSubmenuItem:C,submenuItem:h}))))))};n();i();n();i();var G=e=>new Intl.DisplayNames("en",{type:"language"}).of(e),Qe=e=>{let[,r]=e.split("-");return new Intl.DisplayNames("en",{type:"region"}).of(r.toUpperCase())},ie=[{lang:"en",locales:["en-US","en-GB","en-AU","en-IN","en-NG","en-ZA","en-IE"]},{lang:"de",locales:["de-CH","de-DE"]},{lang:"pt",locales:["pt-BR","pt-PT"]},{lang:"es",locales:["es-ES","es-MX","es-US"]},{lang:"it",locales:["it-IT"]},{lang:"fr",locales:["fr-BE","fr-CA","fr-CH","fr-FR"]},{lang:"ja",locales:["ja-JP"]},{lang:"zh",locales:["zh-CN","zh-HK","zh-TW"]},{lang:"da",locales:["da-DK"]},{lang:"fi",locales:["fi-FI"]},{lang:"id",locales:["id-ID"]},{lang:"ms",locales:["ms-MY"]},{lang:"nl",locales:["nl-BE","nl-NL"]},{lang:"nb",locales:["nb-NO"]},{lang:"pl",locales:["pl-PL"]},{lang:"ru",locales:["ru-RU"]},{lang:"sv",locales:["sv-SE"]},{lang:"af",locales:["af-ZA"]},{lang:"ar",locales:["ar-AE","ar-IQ"]},{lang:"bg",locales:["bg-BG"]},{lang:"bn",locales:["bn-IN"]},{lang:"ca",locales:["ca-ES"]},{lang:"cmn",locales:["cmn-CN"]},{lang:"cs",locales:["cs-CZ"]},{lang:"el",locales:["el-GR"]},{lang:"et",locales:["et-EE"]},{lang:"fa",locales:["fa-IR"]},{lang:"fil",locales:["fil-PH"]},{lang:"ga",locales:["ga-IE"]},{lang:"he",locales:["he-IL"]},{lang:"hi",locales:["hi-IN"]},{lang:"hr",locales:["hr-HR"]},{lang:"hu",locales:["hu-HU"]},{lang:"is",locales:["is-IS"]},{lang:"ka",locales:["ka-GE"]},{lang:"kk",locales:["kk-KZ"]},{lang:"ko",locales:["ko-KR"]},{lang:"lt",locales:["lt-LT"]},{lang:"lv",locales:["lv-LV"]},{lang:"ne",locales:["ne-NP"]},{lang:"ro",locales:["ro-RO"]},{lang:"si",locales:["si-LK"]},{lang:"sk",locales:["sk-SK"]},{lang:"sl",locales:["sl-SI"]},{lang:"sw",locales:["sw-TZ"]},{lang:"ta",locales:["ta-IN","ta-LK","ta-MY","ta-SG"]},{lang:"te",locales:["te-IN"]},{lang:"th",locales:["th-TH"]},{lang:"tr",locales:["tr-TR"]},{lang:"uk",locales:["uk-UA"]},{lang:"ur",locales:["ur-IN","ur-PK"]},{lang:"vi",locales:["vi-VN"]},{lang:"yue",locales:["yue-CN"]}];n();i();var S=ve(()=>({showOnRight:!1,allVoices:[],featuredVoices:[],freeVoices:[],clonedVoices:[],premiumVoices:[],favoriteVoices:[],recentVoices:[],hasAccessToPremiumVoices:!1,selectedVoice:void 0,selectedLocale:void 0,search:"",searchExpanded:!1})),Xi=e=>S.setState({selectedLocale:e}),Ji=e=>S.setState({search:e}),Qi=e=>S.setState({searchExpanded:e}),Hi=(e,r)=>{Io(e,{isUserSelection:r})},ne=({displayName:e,language:r})=>`${e}-${r}`,j={setSelectedLocale:Xi,setSearch:Ji,toggleSearch:Qi,setSelectedVoice:Hi};var mr=()=>{let{selectedLocale:e,showOnRight:r}=S(),t=(0,He.useMemo)(()=>[{value:void 0},...ie.map(p=>({value:p.lang,items:p.locales.map(d=>({value:d}))}))],[]),s=(0,He.useMemo)(()=>{if(!e)return"Language";if(ie.find(u=>e===u.lang))return G(e);let[p,d]=e?.split("-")||"";return`${G(p)} - ${d.toUpperCase()}`},[e]),c=p=>p.value?p.items?G(p.value)||"":Qe(p.value)||"":"Any";return o(pr,{showSubmenuOnRight:r,items:t,onSelection:j.setSelectedLocale,placeholder:s,selectedOption:e,renderDropdownLabel:c})};var en=l.div`
  padding-left: 44px;
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-start;
  flex-grow: 1;
`,ur=()=>o(en,null,o(mr,null));n();i();var de=x(y());n();i();var fr=x(y());var Te=e=>{let{hasAccessToPremiumVoices:r}=S();return(0,fr.useMemo)(()=>r?e:e.filter(t=>!t.premium),[e,r])};n();i();var io=x(y());n();i();var se=(e,r)=>e.id===r.id;n();i();var H=x(y());n();i();ri();n();i();var gr=x(si());var on=(0,gr.default)(rt,1e4),eo=Co(async({voice:e,format:r,ssml:t})=>{try{let s=ho("/tts/get-audio",{ssml:t,audioFormat:po()?"mp3":void 0,voice:e});if("message"in s)throw new Error(s.message);return s}catch(s){throw s.message==="You have been rate limited"&&(on(),eo.invalidateCache([{voice:e,format:r,ssml:t}])),s}},{argsToKey:({voice:e,ssml:r,format:t})=>e.language+e.engine+e.name+r+t});var hr=ve(()=>({playingId:void 0})),q=e=>hr.setState({playingId:e}),De=(e,r)=>{let{audioPlayer:t}=S(),s=W.getPlayingState(),{playingId:c}=hr();return Oe(()=>{["playing","buffering","errored"].includes(s)&&q(void 0)},[s]),Oe(()=>{let u=()=>{q(void 0)};return t&&t.addEventListener("ended",u),()=>{t&&t.removeEventListener("ended",u)}},[t]),{isPlaying:c===r,playPreview:()=>{if(t&&(t.pause(),speechSynthesis.cancel(),q(void 0)),!t)return;if(e.previewAudio){t.src=e.previewAudio,t.play().then(()=>q(r));return}if(e.engine!==Q)return eo({voice:e,ssml:`<speak>${Ue(e)}</speak>`}).then(({audioData:g})=>{t.src=g,t.play().then(()=>q(r))});let u=new SpeechSynthesisUtterance(Ue(e));u.voice=speechSynthesis.getVoices().find(g=>g.name?.toLowerCase()===e.name?.toLowerCase())??null,speechSynthesis.cancel(),setTimeout(()=>{speechSynthesis.speak(u),q(r),u.addEventListener("end",()=>q(void 0))},250)},stopPreview:()=>{t?t.pause():speechSynthesis.cancel(),q(void 0)}}};n();i();var oo=e=>e.engine===Q?e.name:e.slug||e.name.replace("PVL:",""),tn=50,Sr=()=>{let{favoriteVoices:e}=S(),r=async c=>{let p=c.map(oo).filter(Boolean),d=[...new Set(p)];await Ro(d)};return{addToFavorites:async c=>{await r([c,...e].slice(0,tn))},removeFromFavorites:async c=>{await r(e.filter(p=>!se(p,c)))}}};n();i();var le=e=>({handleFreeUserVoiceClick:async()=>{let t=!!e.premium,s=await bo(),c=xo(s);return t?c?!1:!ue(s)&&t&&(So(s)||s.status==="expired")?(await No(!0),await Pe("popup_voice_switch","premium_voices"),!1):!0:!0}});n();i();var xr=x(y());var Y=e=>{let{selectedVoice:r}=S();return{isSelected:(0,xr.useMemo)(()=>r?se(r,e):!1,[r,e])}};n();i();var br=x(y());n();i();var Cr=e=>Uo(e.split(":")?.at(-1)?.split(" ")[0]||"");var Ae=e=>(0,br.useMemo)(()=>{let t=e?.labels?.find(c=>c.includes("style:")),s=e?.labels?.find(c=>c.includes("timbre:"));return t?Cr(t):s?Ze(s):""},[e]);n();i();var yr=({filled:e})=>e?o("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o("path",{d:"M15.2741 2.10139C14.2036 1.86318 13.1292 2.06127 12.189 2.52243C11.3756 2.9214 10.634 3.52644 9.99922 4.29212C9.36479 3.5266 8.62351 2.92162 7.81046 2.52264C6.8705 2.06138 5.7962 1.86323 4.72569 2.1015C3.63326 2.34465 2.69906 3.00994 2.03913 3.98881C0.306957 6.55814 0.961614 9.53359 2.37547 11.849C3.80429 14.1889 6.22085 16.3047 9.0202 17.7602C9.63545 18.08 10.3622 18.0801 10.9775 17.7604C13.7781 16.305 16.1953 14.1891 17.6245 11.8492C19.0387 9.53363 19.6933 6.55817 17.9612 3.98883C17.3012 3.00969 16.3667 2.34448 15.2741 2.10139Z",fill:a["icn-txt-prim"]})):o("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12.1889 2.52243C13.129 2.06127 14.2035 1.86318 15.274 2.10139C16.3666 2.34448 17.301 3.00969 17.9611 3.98883C19.6932 6.55817 19.0385 9.53363 17.6243 11.8492C16.1952 14.1891 13.778 16.305 10.9774 17.7604C10.3621 18.0801 9.63533 18.08 9.02007 17.7602C6.22073 16.3047 3.80417 14.1889 2.37535 11.849C0.961492 9.53359 0.306835 6.55814 2.03901 3.98881L2.86817 4.54781L2.03901 3.98881C2.69894 3.00994 3.63314 2.34465 4.72557 2.1015C5.79608 1.86323 6.87037 2.06138 7.81034 2.52264C8.62338 2.92162 9.36466 3.5266 9.9991 4.29212C10.6339 3.52644 11.3755 2.9214 12.1889 2.52243ZM14.8396 4.05364C14.2891 3.93115 13.6784 4.01942 13.0697 4.31804C12.2752 4.70772 11.4888 5.45205 10.869 6.54595C10.6915 6.85934 10.3591 7.05303 9.99892 7.053C9.63872 7.05298 9.30637 6.85925 9.12886 6.54584C8.50931 5.452 7.72327 4.70775 6.92926 4.3181C6.32076 4.0195 5.71039 3.93124 5.16009 4.05373C4.61006 4.17615 4.09657 4.51463 3.69734 5.10681C2.58304 6.75966 2.87555 8.8305 4.08228 10.8067C5.28541 12.777 7.39962 14.6635 9.94267 15.9857C9.97972 16.0049 10.0181 16.0049 10.0551 15.9857C12.5994 14.6635 14.7141 12.777 15.9175 10.8067C17.1245 8.83049 17.417 6.75963 16.3027 5.10678C15.9035 4.51458 15.3899 4.17608 14.8396 4.05364Z",fill:"currentColor"}));n();i();var Ar=x(y());n();i();var vr=()=>o("svg",{width:"21",height:"22",viewBox:"0 0 21 22",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o("path",{d:"M19.3298 9.00727C20.8901 9.89293 20.8901 12.1071 19.3298 12.9927L4.01064 21.6883C2.45035 22.5739 0.500001 21.4669 0.500001 19.6956L0.500002 2.30444C0.500002 0.533122 2.45036 -0.57395 4.01064 0.311709L19.3298 9.00727Z",fill:"currentColor"}));n();i();var rn=l.div`
  position: relative;
  cursor: pointer;
`,nn=l.div`
  display: ${({visible:e})=>e?"block":"none"};
`,sn=l.div`
  position: absolute;
  top: 0;
  left: -0.5px;
  width: 100%;
  height: 100%;
  border-radius: 100%;
  background-color: black;
  opacity: 0.4;
`,ln=l.div`
  position: absolute;
  top: 50%;
  left: calc(50% + 3px);
  transform: translate(-50%, -50%);
  border-radius: 100%;
  color: ${a["icn-txt-white"]};
  width: 21px;
  height: 22px;
`,an=l.div`
  position: absolute;
  inset: -22px;
  display: block;
  border-radius: 100%;
  transform: scale(0.85);
  transition: background-color 0.2s ease;

  ${({background:e,hasRegularAvatar:r})=>r?`background-color: ${e};`:""}

  ${({isPlaying:e})=>e?`background-color: ${a["bg-prim-cta"]};`:""}
`,cn=l.img`
  position: absolute;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 100%;

  ${({hasRegularAvatar:e})=>!e&&`
      transform: scale(1.3);
      top: 0;
    `}
`,K={PlayIconWrapper:ln,PlayIconOverlay:sn,PlayContainer:nn,VoiceAvatar:rn,VoiceImage:an,AvatarImg:cn};n();i();n();i();var wr=()=>o("svg",{width:"25",height:"24",viewBox:"0 0 25 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o("g",{clipPath:"url(#clip0_266_6657)"},o("rect",{x:"2.66669",y:"2",width:"20",height:"20",rx:"10",fill:a["icn-txt-prim-inv"]}),o("path",{d:"M11.6667 8.875V10.75H13.6667V8.875C13.6667 8.32272 13.219 7.875 12.6667 7.875C12.1144 7.875 11.6667 8.32272 11.6667 8.875Z",fill:a["icn-txt-prim"]}),o("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12.6667 22C18.1895 22 22.6667 17.5228 22.6667 12C22.6667 6.47715 18.1895 2 12.6667 2C7.14384 2 2.66669 6.47715 2.66669 12C2.66669 17.5228 7.14384 22 12.6667 22ZM9.79169 10.75H10.1667V8.875C10.1667 7.49429 11.286 6.375 12.6667 6.375C14.0474 6.375 15.1667 7.49429 15.1667 8.875V10.75H15.5417C16.3701 10.75 17.0417 11.4216 17.0417 12.25V15.4214C17.0417 16.2498 16.3701 16.9214 15.5417 16.9214H9.79169C8.96326 16.9214 8.29169 16.2498 8.29169 15.4214V12.25C8.29169 11.4216 8.96326 10.75 9.79169 10.75Z",fill:a["icn-txt-prim"]})),o("rect",{x:"1.66669",y:"1",width:"22",height:"22",rx:"11",stroke:a["sf-prim-w-100"],strokeWidth:"2"}),o("defs",null,o("clipPath",{id:"clip0_266_6657"},o("rect",{x:"2.66669",y:"2",width:"20",height:"20",rx:"10",fill:a["icn-txt-prim"]}))));n();i();var Me=({regular:e})=>e?o("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8 15C11.866 15 15 11.866 15 8C15 4.13401 11.866 1 8 1C4.13401 1 1 4.13401 1 8C1 11.866 4.13401 15 8 15Z",fill:a["icn-txt-prim-electric"]}),o("path",{d:"M11.8986 6.52683C12.2111 6.21442 12.2111 5.70788 11.8987 5.39546C11.5862 5.08303 11.0797 5.08302 10.7673 5.39544L7.10462 9.05797L5.23263 7.18598C4.92021 6.87356 4.41368 6.87356 4.10126 7.18598C3.78884 7.4984 3.78884 8.00493 4.10126 8.31735L6.53892 10.755C6.85134 11.0674 7.35786 11.0674 7.67028 10.755L11.8986 6.52683Z",fill:a["icn-txt-white"]})):o("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o("g",{clipPath:"url(#clip0_229_1981)"},o("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z",fill:a["icn-txt-prim-electric"]}),o("path",{d:"M16.6413 10.2461C17.0132 9.87418 17.0132 9.27116 16.6413 8.89923C16.2694 8.52729 15.6664 8.52728 15.2944 8.8992L10.9341 13.2594L8.70556 11.0308C8.33363 10.6589 7.73062 10.6589 7.35869 11.0308C6.98676 11.4027 6.98676 12.0057 7.35869 12.3777L10.2607 15.2797C10.6326 15.6516 11.2356 15.6516 11.6075 15.2797L16.6413 10.2461Z",fill:a["icn-txt-white"]})),o("rect",{x:"1",y:"1",width:"22",height:"22",rx:"11",stroke:a["brdr-prim-10-100"],strokeWidth:"2"}),o("defs",null,o("clipPath",{id:"clip0_229_1981"},o("rect",{x:"2",y:"2",width:"20",height:"20",rx:"10",fill:a["icn-txt-white"]}))));var Vr=e=>e==="large"?"width: 24px; height: 24px;":e==="medium"?"width: 20px; height: 20px;":"",Pr=l.div`
  position: absolute;
  bottom: -2px;
  right: -1px;
  ${({size:e})=>Vr(e)};
  ${({size:e})=>`svg { ${Vr(e)}}`};
`,Lr=({voice:e,isSelected:r,size:t})=>{let{hasAccessToPremiumVoices:s}=S(),c=!!e.premium;return!s&&c?o(Pr,{size:t},o(wr,null)):r?o(Pr,{size:t},o(Me,null)):null};n();i();var to=x(y()),Tr=x(Ir());n();i();var $e=x(y()),Rr=["M 90 10 C 115.4878 10.0578 137.506 21.2689 152.2129 40.3497 C 166.5126 58.9011 171.8853 84.8185 166.8297 107.6195 C 161.7226 130.6591 145.001 150.5515 123.6438 160.9633 C 102.0667 171.4828 76.9193 171.0464 55.1314 160.9633 C 33.0044 150.7235 17.699 131.9918 12.0222 108.4525 C 6.2749 84.6199 10.5228 59.5361 25.9011 40.3497 C 41.3162 21.1173 64.919 9.0725 90 10 Z  ","M89.2367 10.0119C113.461 10.3197 137.6 17.6659 153.138 36.2528C169.098 55.3446 174.303 81.1051 168.989 105.415C163.612 130.015 148.621 152.532 125.527 162.569C103.33 172.216 78.6408 164.986 57.0386 154.072C36.0719 143.479 17.8842 127.561 11.4942 104.956C4.68939 80.8838 7.41856 53.9582 23.267 34.603C38.9093 15.4996 64.5481 9.69833 89.2367 10.0119Z","M89.1936 11.2181C112.755 12.7304 132.43 27.053 147.105 45.5481C161.726 63.9743 172.046 86.5188 167.205 109.537C162.274 132.979 144.666 151.741 122.74 161.391C101.715 170.645 77.9293 168.063 57.3309 157.895C37.009 147.863 22.1603 130.224 15.6385 108.52C8.44601 84.583 6.07147 57.4015 21.1437 37.4634C36.5683 17.0591 63.6677 9.57975 89.1936 11.2181Z","M88.5283 11.0239C112.949 11.5839 134.965 23.9414 150.527 42.7699C166.477 62.0676 177.345 86.8103 171.236 111.09C165.252 134.869 143.575 150.047 121.079 159.805C99.8766 169.002 76.4054 170.609 55.1979 161.423C32.8174 151.73 13.9171 134.243 7.64761 110.673C1.11679 86.12 6.84717 59.5687 22.8583 39.8422C38.708 20.3146 63.3846 10.4473 88.5283 11.0239Z","M84.8829 5.02128C110.352 4.37891 133.571 18.343 149.494 38.2311C165.457 58.1704 173.318 83.743 167.891 108.702C162.396 133.971 145.132 155.269 121.678 166.161C98.6186 176.87 71.6218 175.834 49.2198 163.812C27.9425 152.393 15.6405 130.323 10.8115 106.663C6.13818 83.7648 10.4703 60.2771 24.234 41.3904C38.8404 21.3474 60.0902 5.64661 84.8829 5.02128Z","M87.722 11.0085C112.54 11.2567 137.559 17.9968 153.557 36.9716C170.057 56.5424 175.951 83.3623 169.639 108.17C163.505 132.277 144.856 150.822 122.058 160.772C100.337 170.251 75.9069 168.627 54.5227 158.412C33.0453 148.153 16.3642 130.146 9.95837 107.222C3.13308 82.7971 4.27333 55.362 20.215 35.6381C36.0562 16.0384 62.5222 10.7565 87.722 11.0085Z","M87.3439 10.123C111.023 10.9486 133.976 18.7079 149.496 36.6104C165.853 55.4786 174.327 80.4274 169.541 104.936C164.571 130.381 148.401 153.242 124.675 163.693C101.775 173.78 75.8225 167.721 53.7471 155.939C32.9437 144.837 18.0339 126.157 11.7513 103.428C5.04516 79.1684 3.66418 51.6352 19.5086 32.0781C35.249 12.6494 62.3544 9.25163 87.3439 10.123Z","M84.841 6.00001C109.966 5.98475 132.559 19.4435 148.501 38.8623C164.763 58.6714 175.115 83.945 169.329 108.913C163.562 133.795 143.006 151.546 119.876 162.38C97.1021 173.048 70.6348 177.075 48.2392 165.634C26.3704 154.461 15.7393 130.587 10.6279 106.568C5.6305 83.0842 7.02224 58.2583 21.2784 38.9396C36.1861 18.7379 59.7343 6.01526 84.841 6.00001Z","M86.9407 10.0009C110.563 10.1273 130.783 24.7939 145.517 43.2587C160.258 61.7314 170.4 84.7808 164.965 107.78C159.571 130.603 139.945 145.986 118.829 156.188C97.6717 166.408 73.4256 172.184 52.1096 162.3C30.4727 152.267 17.4054 130.3 12.6149 106.936C7.96398 84.2531 13.4828 61.0024 27.5722 42.6272C42.0279 23.774 63.1837 9.87366 86.9407 10.0009Z","M90.3692 10.0007C114.309 9.93544 139.537 14.7558 154.475 33.4635C169.423 52.1826 168.789 77.9155 163.204 101.21C157.711 124.123 145.705 145.248 124.985 156.467C103.013 168.364 76.3182 171.35 53.8483 160.423C31.4696 149.54 18.55 126.501 13.3327 102.169C8.21125 78.2854 11.0341 52.554 26.6994 33.8115C41.9877 15.5201 66.53 10.0656 90.3692 10.0007Z"],Er=({isPlaying:e,id:r})=>{let[t,s]=(0,$e.useState)(0);return(0,$e.useEffect)(()=>{if(!e){s(0);return}let p=setTimeout(()=>{if(Rr.length<=t+1){s(0);return}s(t+1)},t===0?0:300);return()=>clearTimeout(p)},[t,e]),o("svg",{width:178,height:178,viewBox:"0 0 178 178"},o("clipPath",{id:r},o("path",{d:Rr[t],fill:"currentColor",style:{transition:"0.3s linear"}})))};var Ce=136,Dr=({voice:e,isPlaying:r,size:t,background:s})=>{let c=(0,to.useMemo)(()=>(0,Tr.default)(),[]),p=!!e.avatarImage&&!fe(e),d=(0,to.useMemo)(()=>t==="large"?64:t==="medium"?48:32,[t]),u=d/Ce;return o("div",{style:{width:d,height:d}},o("div",{style:{position:"absolute",transform:`scale(${u}) translate(-50%, -50%)`,top:d-Ce/2,left:d-Ce/2}},o("div",{style:{position:"relative",width:Ce,height:Ce}},o(K.VoiceImage,{isPlaying:r,background:s,hasRegularAvatar:p,style:{WebkitClipPath:`url(#${c})`,clipPath:`url(#${c})`}},o(Er,{isPlaying:r,id:c}),o(K.AvatarImg,{hasRegularAvatar:p,alt:e.name,src:e.avatarImage||Vo(e.language),width:140,height:140})))))};var ae=({onClick:e,voice:r,size:t,isPlaying:s=!1,showIcons:c=!0,background:p,showPlayIcon:d=!0})=>{let{hasAccessToPremiumVoices:u}=S(),{isSelected:g}=Y(r),h=!!r.premium,[C,b]=(0,Ar.useState)(!1),v=!h||u,I=P=>{e&&(P.stopPropagation(),e())};return o(K.VoiceAvatar,{onMouseEnter:()=>b(!0),onMouseLeave:()=>b(!1),onClick:I},o(Dr,{isPlaying:s,voice:r,size:t,background:p}),!s&&!!e&&d&&o(K.PlayContainer,{visible:v&&C},o(K.PlayIconOverlay,null),o(K.PlayIconWrapper,null,o(vr,null))),c&&o(Lr,{voice:r,isSelected:g,size:t}))};n();i();var ro=x(y());n();i();var Mr=e=>o("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},o("path",{d:"M6.7501 3.65226C7.19599 3.29357 7.41893 3.11423 7.6664 3.04548C7.88467 2.98484 8.11533 2.98484 8.3336 3.04548C8.58107 3.11423 8.80401 3.29357 9.2499 3.65226L9.53007 3.87763C9.66494 3.98613 9.73237 4.04037 9.8058 4.08441C9.87101 4.12353 9.93966 4.15659 10.0109 4.18319C10.0911 4.21314 10.1756 4.23204 10.3445 4.26984L10.6954 4.34836C11.2538 4.47333 11.533 4.53582 11.7411 4.68643C11.9246 4.81927 12.0684 4.99962 12.1571 5.20807C12.2576 5.44441 12.2564 5.73054 12.254 6.30279L12.2524 6.66234C12.2517 6.83544 12.2513 6.92198 12.2627 7.00685C12.2728 7.08222 12.2897 7.15651 12.3134 7.22879C12.34 7.31017 12.3778 7.38799 12.4536 7.54362L12.611 7.86691C12.8615 8.38144 12.9867 8.6387 12.9986 8.89526C13.0092 9.12155 12.9579 9.34643 12.8502 9.54574C12.7281 9.7717 12.5036 9.94915 12.0547 10.304L11.7727 10.527C11.6369 10.6344 11.569 10.6881 11.5097 10.7498C11.4571 10.8047 11.4095 10.8643 11.3678 10.9278C11.3207 10.9994 11.2835 11.0775 11.2091 11.2338L11.0544 11.5584C10.8083 12.075 10.6853 12.3333 10.4921 12.5026C10.3218 12.652 10.114 12.752 9.891 12.7921C9.63822 12.8376 9.35954 12.7727 8.80217 12.643L8.45197 12.5615C8.28338 12.5223 8.19909 12.5027 8.11382 12.4948C8.0381 12.4879 7.9619 12.4879 7.88618 12.4948C7.80091 12.5027 7.71662 12.5223 7.54803 12.5615L7.19783 12.643C6.64046 12.7727 6.36178 12.8376 6.109 12.7921C5.88603 12.752 5.67821 12.652 5.50786 12.5026C5.31473 12.3333 5.19168 12.075 4.94558 11.5584L4.79095 11.2338C4.71651 11.0775 4.67929 10.9994 4.63224 10.9278C4.59046 10.8643 4.54294 10.8047 4.4903 10.7498C4.43103 10.6881 4.36313 10.6344 4.22735 10.527L3.94529 10.304C3.49637 9.94915 3.27191 9.7717 3.14982 9.54574C3.04213 9.34643 2.9908 9.12155 3.00135 8.89526C3.01331 8.6387 3.13855 8.38144 3.38903 7.86691L3.5464 7.54362C3.62217 7.38799 3.66005 7.31017 3.68665 7.22879C3.71027 7.15651 3.72722 7.08222 3.7373 7.00685C3.74865 6.92198 3.74828 6.83544 3.74755 6.66235L3.74603 6.30279C3.7436 5.73054 3.74239 5.44441 3.84293 5.20807C3.93161 4.99962 4.07543 4.81927 4.25892 4.68643C4.46697 4.53582 4.74619 4.47333 5.30463 4.34836L5.65551 4.26984C5.82443 4.23204 5.90888 4.21314 5.9891 4.18319C6.06034 4.15659 6.12899 4.12353 6.1942 4.08441C6.26763 4.04037 6.33506 3.98613 6.46993 3.87763L6.7501 3.65226Z",fill:a["icn-txt-prim"]}),o("path",{d:"M5.75 8.29999L7.25 9.79999L10.25 6.79999",stroke:a["icn-txt-prim-inv"],strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}));var un=l.div`
  display: flex;
  align-items: center;
  justify-content: center;
`,ce=({voice:e,style:r,showFull:t=!1})=>{let s=(0,ro.useMemo)(()=>e.labels?.includes("label:founder")||e.labels?.includes("label:partner"),[e.labels]),c=(0,ro.useMemo)(()=>e.engine===Q?e.name.split(/ \(| -/)[0]:t?e.displayName:e.displayName.split(" ")[0],[e,t]);return o(un,{style:r,"data-testid":`${U.VOICE_NAME_TEXT(c)}`,"data-local-voice":e.engine===Q?"true":"false"},c,s&&o(Mr,null))};n();i();var fn=l.div`
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding-left: 8px;
  box-sizing: border-box;
  cursor: pointer;
  border-radius: 10px;

  background: ${a["sf-prim-w-100"]};

  &:hover {
    background: ${a["sf-sec-hov-0-90"]};
  }

  &:active {
    background: ${a["sf-sec-pres-0-90"]};
  }

  ${({isSelected:e})=>e?`background: ${a["sf-act-blue"]} !important`:""}
  ${({hasPremium:e})=>e?"":`background: ${a["sf-prim-w-100"]} !important`}
`,gn=l.div`
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 10px 16px 10px 0;
  border-bottom: 0.5px solid ${a["brdr-prim-10-80"]};
`,hn=l.div`
  flex-grow: 1;
  width: 100%;
`,Sn=l.div`
  text-align: right;
  flex-grow: 1;
  width: 20px;
  height: 20px;

  color: ${a["icn-txt-sec"]};

  &:hover {
    color: ${a["icn-txt-prim"]};
  }
`,xn=l.div`
  padding: 4px 8px;
  ${k["heading-6"]};
  color: ${a["icn-txt-prim"]};
  background: ${a["bg-prim-w-100"]};
  position: sticky;
  top: 0;
  z-index: 1;
`,be={Header:xn,Icon:Sn,VoiceItem:fn,VoiceInfo:hn,VoiceInfoWrapper:gn};var Fe=({voice:e})=>{let r=(0,H.useMemo)(()=>Ve(),[]),{isSelected:t}=Y(e),{hasAccessToPremiumVoices:s,favoriteVoices:c}=S(),{playPreview:p,stopPreview:d,isPlaying:u}=De(e,r),h=!!!e.premium||s,[C,b]=(0,H.useState)(!1),v=Ae(e),I=(0,H.useMemo)(()=>t?a["bg-prim-w-100"]:C?a["bg-prim-w-100"]:a["bg-sec-0-80"],[t,C]),{handleFreeUserVoiceClick:P}=le(e),D=async()=>{if(!await P())return;j.setSelectedVoice(e,!0),W.getPlayingState()!=="playing"&&(u?d():p())},E=(0,H.useMemo)(()=>!!c?.find(A=>se(A,e)),[c,e]),{addToFavorites:L,removeFromFavorites:R}=Sr(),N=A=>{A.preventDefault(),A.stopPropagation(),E?R(e):L(e)},F=(0,H.useMemo)(()=>{let[A,J]=e.language.split("-");return J?J.toUpperCase():A.toUpperCase()},[e]),w=h&&(E||C);return o(be.VoiceItem,{onClick:D,hasPremium:h,isSelected:t,onMouseEnter:()=>b(!0),onMouseLeave:()=>b(!1),"aria-selected":t,"data-checked":t},o(ae,{size:"medium",showIcons:!0,voice:e,background:I,isPlaying:u,onClick:D,showPlayIcon:!1}),o(be.VoiceInfoWrapper,null,o(be.VoiceInfo,null,o(T,{font:"subheading-5",color:"icn-txt-prim"},o(ce,{showFull:!0,voice:e,style:{gap:"2px",justifyContent:"flex-start"}})),o(T,{font:"body-6",color:"icn-txt-sec"},F," ",v&&`∙ ${v}`)),w&&o(be.Icon,{onClick:N},o(yr,{filled:E}))))};n();i();n();i();var $r=()=>o("svg",{width:"120",height:"120",viewBox:"0 0 120 120",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o("g",{clipPath:"url(#clip0_266_6488)"},o("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0.771446 36.7833C1.69666 23.2765 2.15927 16.5231 9.40756 9.29259C16.6558 2.0621 23.3588 1.6195 36.7648 0.734304C43.467 0.291751 51.2164 0 60 0C68.7836 0 76.533 0.291751 83.2352 0.734303C96.6412 1.6195 103.344 2.0621 110.592 9.29259C117.841 16.5231 118.303 23.2765 119.229 36.7833C119.692 43.5468 120 51.3112 120 60C120 68.1873 119.726 75.5538 119.307 82.0355C118.39 96.2158 117.932 103.306 110.686 110.569C103.441 117.832 96.3017 118.312 82.0226 119.271C75.4768 119.711 68.0938 120 60 120C51.9062 120 44.5232 119.711 37.9774 119.271C23.6983 118.312 16.5587 117.832 9.31357 110.569C2.06844 103.306 1.60989 96.2158 0.692796 82.0355C0.273599 75.5538 0 68.1873 0 60C0 51.3111 0.308148 43.5467 0.771446 36.7833Z",fill:"#252627"}),o("path",{d:"M88.6672 24.3774C99.4949 33.8446 100.854 50.2746 91.6111 61.4026L91.1656 61.9251C81.6984 72.7527 65.2692 74.1125 54.1412 64.8696L53.6179 64.4235C42.9623 55.1065 41.4762 39.0467 50.2415 27.9327L50.6734 27.399C60.0633 16.0944 76.8401 14.5421 88.1447 23.9319L88.6672 24.3774ZM82.4416 30.7981C74.9289 24.5579 63.7797 25.5895 57.5396 33.1022C51.2996 40.6148 52.3317 51.7633 59.8443 58.0034C67.3569 64.2433 78.5048 63.2118 84.7449 55.6995C90.985 48.1869 89.954 37.0383 82.4416 30.7981Z",fill:"url(#paint0_linear_266_6488)"}),o("path",{d:"M48.0616 65.0728C49.6654 63.2965 52.3847 63.1014 54.2256 64.6305L54.3874 64.7649C56.2172 66.2848 56.5333 68.9728 55.106 70.8758L37.0889 94.8957C35.0535 97.6093 31.1613 98.0669 28.5519 95.8995C25.9574 93.7445 25.6789 89.863 27.9392 87.3597L48.0616 65.0728Z",fill:"url(#paint1_linear_266_6488)"}),o("path",{d:"M62.5476 35.8062L79.7367 52.9953",stroke:"#424242",strokeWidth:"7.43802",strokeLinecap:"round"}),o("path",{d:"M79.7371 35.8062L62.548 52.9953",stroke:"#424242",strokeWidth:"7.43802",strokeLinecap:"round"})),o("defs",null,o("linearGradient",{id:"paint0_linear_266_6488",x1:"46.5575",y1:"111.978",x2:"47.8749",y2:"-8.18024",gradientUnits:"userSpaceOnUse"},o("stop",{offset:"0.202777",stopColor:"#353535"}),o("stop",{offset:"0.602023",stopColor:"#474747"})),o("linearGradient",{id:"paint1_linear_266_6488",x1:"12.971",y1:"123.56",x2:"-7.56908",y2:"87.3829",gradientUnits:"userSpaceOnUse"},o("stop",{offset:"0.202777",stopColor:"#353535"}),o("stop",{offset:"0.602023",stopColor:"#474747"})),o("clipPath",{id:"clip0_266_6488"},o("rect",{width:"120",height:"120",fill:"white"}))));var Cn=l.div`
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
`,Fr=()=>{let{search:e}=S();return o(Cn,null,o($r,null),o(T,{font:"subheading-6",color:"icn-txt-sec"},"No results for “",e,"”"))};n();i();var bn=l.div`
  margin-top: ${({isFiltered:e})=>e?"0":"8px"};
`,yn=l.div`
  padding: 4px 8px;
  ${k["heading-6"]};
  color: ${a["icn-txt-prim"]};
  background: ${a["bg-prim-w-100"]};
  position: sticky;
  top: 0;
  z-index: 1;
`,vn=l.div`
  display: flex;
  flex-direction: column;
  gap: 16px;
`,wn=l.div``,ye={Wrapper:bn,Header:yn,LocaleSectionsList:vn,VoiceItemWrapper:wn};var Nr=()=>{let{allVoices:e,search:r,selectedLocale:t}=S(),s=(0,io.useMemo)(()=>e.filter(d=>{let u=t?d.language.startsWith(t)||d.language===t:!0,g=r?d.language.toLowerCase().includes(r.toLowerCase())||G(d.language.split("-")[0])?.toLowerCase().includes(r.toLowerCase())||d.displayName.toLowerCase().includes(r.toLowerCase()):!0;return u&&g}),[e,t,r]),c=!!t||!!r,p=(0,io.useMemo)(()=>ie.map(d=>({localeData:d,voices:s.filter(u=>{let g=d.locales.includes(u.language);return c?g:g&&!fe(u)})})),[s,c]);return r&&s.length===0?o(Fr,null):o(ye.Wrapper,{isFiltered:c},o(ye.LocaleSectionsList,null,p.map(({localeData:d,voices:u})=>u.length?o(ye.VoiceItemWrapper,null,o(ye.Header,null,G(d.lang)),u.map(g=>o(Fe,{key:`regular-${g.displayName}`,voice:g}))):null)))};n();i();n();i();var Ne=x(y());n();i();var Vn=l.div`
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
`,Pn=l.span`
  ${k["subheading-5"]};
  color: ${a["icn-txt-prim"]};
  margin-top: 8px;
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;

  svg {
    display: inline;
    margin-left: 2px;
    vertical-align: -3px;
  }
`,Wr=({voice:e})=>o(Vn,null,o(Pn,null,o(ce,{voice:e})));n();i();var Ln=l.div`
  font-family: system-ui, sans-serif;
  display: flex;
  align-items: center;
  flex-direction: column;
  padding: 8px 12px;
  height: 132px;
  box-sizing: border-box;
`,kn=l.div`
  ${k["body-6"]};
  color: ${a["icn-txt-sec"]};
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
`,In=l.div`
  ${k["heading-6"]};
  color: ${a["icn-txt-prim"]};
  padding: 4px 8px;
`,Rn=l.div`
  padding: 0;
  display: grid;
  grid-auto-flow: row;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: 4px;
`,En=l.div``,ee={Wrapper:En,VoicesListGrid:Rn,Header:In,VoiceItem:Ln,VoiceLabel:kn};var Br=({voice:e})=>{let r=(0,Ne.useMemo)(()=>Ve(),[]),{playPreview:t,stopPreview:s,isPlaying:c}=De(e,r),p=Ae(e),{isSelected:d}=Y(e),{featuredVoices:u}=S(),g=(0,Ne.useMemo)(()=>{let v=u.some(({slug:I})=>e.slug===I);return e.labels?.includes("label:founder")?"Founder":e.labels?.includes("label:partner")?"Official Voice":v?"Narrator":p},[e,u,p]),{handleFreeUserVoiceClick:h}=le(e),C=async()=>{if(!await h())return;j.setSelectedVoice(e,!0),W.getPlayingState()!=="playing"&&(c?s():t())},b=(0,Ne.useMemo)(()=>c?a["bg-prim-cta"]:d?a["bg-blue"]:a["bg-sec-0-80"],[d,c]);return o(ee.VoiceItem,null,o(ae,{voice:e,onClick:C,isPlaying:c,size:"large",background:b}),o(Wr,{voice:e}),o(ee.VoiceLabel,null,g))};var _r=()=>{let{featuredVoices:e}=S(),r=e.slice(0,6);return o(ee.Wrapper,null,o(ee.Header,null,"Featured"),o(ee.VoicesListGrid,null,r.map(t=>o(Br,{key:`featured-${t.name}`,voice:t}))))};n();i();var zr=x(y());n();i();var Tn=l.div`
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  box-sizing: border-box;
  border-radius: 12px;
  cursor: pointer;
  flex-shrink: 0;

  background: ${a["sf-sec-0-90"]};

  &:hover {
    background: ${a["sf-sec-hov-0-90"]};
  }

  &:active {
    background: ${a["sf-sec-pres-0-90"]};
  }

  ${({isSelected:e})=>e?`background: ${a["sf-act-blue"]} !important`:""}
`,Dn=l.div``,An=l.div`
  text-align: right;
  flex-grow: 1;
  width: 16px;
  height: 16px;

  svg {
    width: 16px;
    height: 16px;
  }
`,Or=({voice:e})=>{let{isSelected:r}=Y(e),{handleFreeUserVoiceClick:t}=le(e),s=async()=>{await t()&&j.setSelectedVoice(e,!0)},c=e.language.split("-")[0].toUpperCase();return o(Tn,{isSelected:r,onClick:s},o(ae,{voice:e,size:"small",showIcons:!1,background:a["bg-prim-w-100"]}),o(Dn,null,o(T,{font:"subheading-6",color:"icn-txt-prim"},o(ce,{voice:e})),o(T,{font:"subheading-7",color:"icn-txt-sec"},c)),o(An,null,r&&o(Me,{regular:!0})))};n();i();var _=x(y());n();i();var We=x(y());function Ur(e,r=100){let[t,s]=(0,We.useState)(0);return(0,We.useEffect)(()=>{if(!e.current)return;let c,p=new ResizeObserver(d=>{clearTimeout(c),c=setTimeout(()=>{for(let u of d){let g=u.contentRect.width;s(h=>Math.abs(h-g)>1?g:h)}},r)});return p.observe(e.current),()=>{clearTimeout(c),p.disconnect()}},[e,r]),t}n();i();var Mn=l.div`
  width: 100%;
`,$n=l.div`
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 4px 4px 8px;
`,Fn=l.div`
  margin-top: 4px;
  width: 100%;
  overflow: auto;
  display: flex;
  gap: 8px;
  padding: 0 8px 12px 8px;
  box-sizing: border-box;

  &::-webkit-scrollbar {
    display: none;
  }
  scrollbar-width: none;
`,Nn=l.div`
  display: flex;
  gap: 8px;
`,no=l.div`
  color: ${a["icn-txt-prim"]};
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;

  &:hover {
    opacity: 0.75;
  }

  &:active {
    opacity: 0.5;
  }

  ${({disabled:e})=>e?"opacity: 0.2 !important; pointer-events: none;":""}
`,Wn=l(no)`
  transform: rotate(180deg);
`,Bn=l(no)``,X={Wrapper:Mn,Header:$n,VoicesWrapper:Fn,Arrows:Nn,Arrow:no,ArrowLeftButton:Wn,ArrowRightButton:Bn};var Zr=({scrollRef:e})=>{let[r,t]=(0,_.useState)(!1),[s,c]=(0,_.useState)(!1),p=Ur(e,10),d=(0,_.useCallback)((h=0)=>{let C=e.current;if(!C)return;let b=C.scrollLeft+h;c(!(b>0)),t(!(b+C.offsetWidth<C.scrollWidth))},[]);(0,_.useEffect)(()=>{if(!e.current)return;let h=()=>d();return e.current.addEventListener("scroll",h),()=>e.current?.removeEventListener("scroll",h)},[]),(0,_.useEffect)(()=>{d()},[p,d]);let u=(0,_.useCallback)(h=>{if(!e.current)return;let C=150*h;e.current.scrollBy({left:C,behavior:"smooth"}),d(C)},[d]),g=!(s&&r);return o(X.Header,null,o(T,{font:"heading-6"},"Recents"),g&&o(X.Arrows,null,o(X.ArrowLeftButton,{disabled:s,onClick:()=>u(-1)},o(he,null)),o(X.ArrowRightButton,{disabled:r,onClick:()=>u(1)},o(he,null))))};var Gr=()=>{let e=(0,zr.useRef)(null),{recentVoices:r}=S(),t=Te(r);return o(X.Wrapper,null,o(Zr,{scrollRef:e}),o(X.VoicesWrapper,{ref:e},t.map(s=>o(Or,{voice:s,key:`recent-${s.name}`}))))};n();i();var _n=l.div`
  margin-top: 8px;
`,On=l.div`
  padding: 4px 8px;
  ${k["heading-6"]};
  color: ${a["icn-txt-prim"]};
  background: ${a["bg-prim-w-100"]};
  position: sticky;
  top: 0;
  z-index: 1;
`,Un=l.div``,so=({voices:e,heading:r})=>o(_n,null,o(On,null,r),o(Un,null,e.map(t=>o(Fe,{key:`${r}-${t.displayName}`,voice:t}))));n();i();var oe=x(y());n();i();var Be=x(y());function jr(){let{allVoices:e,clonedVoices:r}=S(),t=(0,Be.useRef)(!1);(0,Be.useEffect)(()=>{let s=Qo.subscribe(({history:c})=>{if(e&&t.current){let p=c.map(d=>d.name.startsWith("PVL:")&&r.some(u=>d.name===u.name)?d:e.find(u=>Lo(d,u))).filter(d=>!!d);S.setState({recentVoices:p.slice(0,6).map(d=>({...d,id:`${d.displayName}-${d.language}`}))})}});return Ho().then(()=>{t.current=!0}),s},[e,r])}var qr=({audioPlayer:e,showOnRight:r})=>{let{voice:t,favoriteVoices:s}=O(),{allVoices:c,freeVoices:p}=S(),d=Z();jr(),(0,oe.useEffect)(()=>{(async()=>{let[g,h,C]=await Promise.all([vo(),Po(),yo({forceRefetch:!0})]),b=(L,R)=>L?.categories?.flatMap(N=>N.voices.filter(({avatarImage:F})=>!!F).map(F=>({...F,id:ne(F),premium:R})))??[],v=g.tabs.find(L=>L.displayName==="All"),I=g.tabs.find(L=>L.displayName==="Recommended"),P=b(v,!0),D=h.map(L=>({...L,free:!0,id:ne(L)})),E=C.map(L=>({...L,personal:!0,id:ne(L)}));S.setState({allVoices:[...P,...D,...E],featuredVoices:b(I,!0),freeVoices:D,clonedVoices:E,premiumVoices:P})})()},[]),(0,oe.useEffect)(()=>{let u=Jo.on("updated",({personalVoiceList:g})=>{S.setState({clonedVoices:g.map(h=>({...h,category:"personal",id:`${h.displayName}-${h.language}`}))})});return()=>u()}),(0,oe.useEffect)(()=>{(async()=>{if(!t)return;if((!d||!ue(d))&&t.premium){let g=p.find(h=>h.language===t.language)||p[0];if(!g)return;S.setState({selectedVoice:{...g,id:ne(g)}})}S.setState({selectedVoice:{...t,id:ne(t)}})})()},[t,d,p]),(0,oe.useEffect)(()=>{let u=s?.map(g=>c.find(h=>oo(h)===g)).filter(Boolean)||[];S.setState({favoriteVoices:u})},[c,s]),(0,oe.useEffect)(()=>{S.setState({audioPlayer:e,showOnRight:r})},[e,r]),(0,oe.useEffect)(()=>{S.setState({hasAccessToPremiumVoices:d?ue(d):!1})},[d])};n();i();var Zn=l.div`
  padding: 0;
  width: 400px;
  height: ${({height:e})=>e}px;
  overflow: hidden auto;
  ${Le};
`,zn=l.div`
  overflow: hidden;
  border-radius: 0 0 12px 0;
`,Gn=l.div`
  width: 100%;
  height: 100%;
`,_e={VoicesSelectorWrapper:Zn,ScrollableListWrapper:Gn,Wrapper:zn};var lo=450,Yr=24,Kr=({audioPlayer:e,showOnRight:r})=>{qr({audioPlayer:e,showOnRight:r});let t=(0,de.useRef)(null),{selectedLocale:s,search:c}=S(),{favoriteVoices:p,recentVoices:d,clonedVoices:u}=S(),{height:g}=Ao(),h=s||c,[C,b]=(0,de.useState)(lo),v=t.current?.getBoundingClientRect().top||0,I=Te(p);return(0,de.useEffect)(()=>{!t.current||!v||(v+lo+Yr>g?b(g-v-Yr):b(lo))},[g,v]),o(_e.Wrapper,{"data-testid":U.VOICE_AND_SPEED_PANEL},o(_e.VoicesSelectorWrapper,{ref:t,height:C},o(_e.ScrollableListWrapper,null,!h&&o(m,null,d.length>0&&o(Gr,null),o(_r,null),I.length>0&&o(so,{heading:"Favorites",voices:I}),u.length>0&&o(so,{heading:"Cloned",voices:u})),o(Nr,null))))};var Jr={route:"/",defaultRoute:"/",collapseState:"collapsed",allowCollapse:!0,isPlayerMinimized:!1},pe=new Xr.Store({...Jr});function a2(){pe.set(()=>({...Jr}))}function ke(e){pe.set(()=>({route:e}))}var Qr={"/help":{titleContent:"Get Help",render:at},"/featureprompt/skipsentences":{isPopupDesign:!0,render:Ge},"/speed":{titleContent:"",render:rr},"/unsupported":{titleContent:"Unsupported Website",render:nr},"/voices":{titleContent:o(ur,null),render:Kr}};function c2(e){return Qr[e]?.render}function d2(e){return Qr[e]??{}}function sr(e){pe.get().allowCollapseModified||pe.set(()=>({allowCollapse:e,collapseState:"expanded"}))}function lr(e){pe.get().allowCollapseModified||pe.set(()=>({hidePlayerPill:e}))}export{S as a,j as b,pe as c,a2 as d,ke as e,c2 as f,d2 as g};
//# sourceMappingURL=chunk-A23U5IW7.js.map
