78227.b63d41a227e10bfa.js 47 KB

12
  1. (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[78227],{15273:function(e,n,t){"use strict";var r,o=t(67597);function i(){return i=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)({}).hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},i.apply(null,arguments)}n.Z=function(e){return o.createElement("svg",i({viewBox:"0 0 24 24",width:18,height:18,stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round",fill:"none",shapeRendering:"geometricPrecision",style:{color:"currentcolor"}},e),r||(r=o.createElement("path",{d:"m6 9 6 6 6-6"})))}},1614:function(e,n,t){"use strict";var r,o=t(67597);function i(){return i=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)({}).hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},i.apply(null,arguments)}n.Z=function(e){return o.createElement("svg",i({width:15,height:15,viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),r||(r=o.createElement("path",{d:"M11.467 3.727c.289.189.37.576.181.865l-4.25 6.5a.625.625 0 0 1-.944.12l-2.75-2.5a.625.625 0 0 1 .841-.925l2.208 2.007 3.849-5.886a.625.625 0 0 1 .865-.181Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})))}},46031:function(e,n,t){"use strict";var r,o=t(67597);function i(){return i=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)({}).hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},i.apply(null,arguments)}n.Z=function(e){return o.createElement("svg",i({width:15,height:15,viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),r||(r=o.createElement("path",{d:"M7.5 1.05a.45.45 0 0 1 .45.45v6.914l2.232-2.232a.45.45 0 1 1 .636.636l-3 3a.45.45 0 0 1-.636 0l-3-3a.45.45 0 1 1 .636-.636L7.05 8.414V1.5a.45.45 0 0 1 .45-.45ZM2.5 10a.5.5 0 0 1 .5.5V12c0 .554.446 1 .996 1h7.005A.999.999 0 0 0 12 12v-1.5a.5.5 0 0 1 1 0V12c0 1.104-.894 2-1.999 2H3.996A1.997 1.997 0 0 1 2 12v-1.5a.5.5 0 0 1 .5-.5Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})))}},54988:function(e,n,t){"use strict";var r,o=t(67597);function i(){return i=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)({}).hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},i.apply(null,arguments)}n.Z=function(e){return o.createElement("svg",i({width:24,height:24,viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},e),r||(r=o.createElement("path",{d:"M12 13a1 1 0 1 0 0-2 1 1 0 0 0 0 2ZM19 13a1 1 0 1 0 0-2 1 1 0 0 0 0 2ZM5 13a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})))}},68414:function(e,n,t){"use strict";var r,o=t(67597);function i(){return i=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)({}).hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},i.apply(null,arguments)}n.Z=function(e){return o.createElement("svg",i({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),r||(r=o.createElement("path",{d:"M5 20h4.571V4H5v16Zm9.143-16v16h4.571V4h-4.571Z",fill:"currentColor"})))}},71714:function(e,n,t){"use strict";var r,o=t(67597);function i(){return i=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)({}).hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},i.apply(null,arguments)}n.Z=function(e){return o.createElement("svg",i({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),r||(r=o.createElement("path",{d:"M4 2v20.364l16-10.182L4 2Z",fill:"currentColor"})))}},77107:function(e,n,t){"use strict";var r,o=t(67597);function i(){return i=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)({}).hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},i.apply(null,arguments)}n.Z=function(e){return o.createElement("svg",i({width:15,height:15,viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),r||(r=o.createElement("path",{d:"M8 2.75a.5.5 0 0 0-1 0V7H2.75a.5.5 0 0 0 0 1H7v4.25a.5.5 0 0 0 1 0V8h4.25a.5.5 0 0 0 0-1H8V2.75Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})))}},67385:function(e,n,t){"use strict";t.d(n,{Z:function(){return s}});var r=t(67597),o=t(61395),i=/<(\w+)>(.*?)<\/\1>|<(\w+)\/>/,a=/(?:\r\n|\r|\n)/g;function c(e){if(!e.length)return[];var n=e.slice(0,4),t=n[0],r=n[1],o=n[2];return[[t||o,r||"",n[3]]].concat(c(e.slice(4,e.length)))}function l(e,n){void 0===n&&(n=[]);var t=e.replace(a,"").split(i);if(1===t.length)return e;var o=[],s=t.shift();return s&&o.push(s),c(t).forEach((function(e,t){var i=e[0],a=e[1],c=e[2],s=n[i]||r.createElement(r.Fragment,null);o.push((0,r.cloneElement)(s,{key:t},a?l(a,n):s.props.children)),c&&o.push(c)})),o}function s(e){var n=e.i18nKey,t=e.values,i=e.components,a=e.fallback,c=e.defaultTrans,s=e.ns,u=(0,o.Z)(s),d=u.t,v=u.lang;return(0,r.useMemo)((function(){var e=d(n,t,{fallback:a,default:c});return i&&0!==i.length?l(e,i):e}),[n,t,i,v])}},36279:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return it}});var r=t(57611),o=t(67597),i=t(21594),a=t(47189),c=t(12195),l=t(82427),s=function(e){var n=e.togglePlaying,t=e.isAudioPlayerHidden,i=(0,o.useContext)(l.c),s=(0,o.useCallback)((function(e){(0,c.Kz)("audio_player_toggle_keyboard_shortcut"),e.preventDefault(),n()}),[n]),u={enabled:!t};return(0,a.y1)("space",s,u,[n]),(0,a.y1)("right",(function(e){(0,c.Kz)("audio_player_fwd_keyboard_shortcut"),e.preventDefault(),i.send({type:"NEXT_AYAH"})}),u),(0,a.y1)("left",(function(e){(0,c.Kz)("audio_player_bwd_keyboard_shortcut"),e.preventDefault(),i.send({type:"PREV_AYAH"})}),u),(0,r.jsx)(r.Fragment,{})},u=t(69976),d=t(15129),v=t(77012),f=t.n(v),p=t(45361),h=t(57044),m=t(16946),x=t(57384);function _(e,[n,t]){return Math.min(t,Math.max(n,e))}var g=t(90149),y=t(71641),w=t(61544),E=t(82305),b=t(4460),j=t(10810),C=t(81319),Z=t(4300),S=t(67016);const k=["PageUp","PageDown"],R=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],P={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},I="Slider",[O,A,M]=(0,S.B)(I),[L,T]=(0,w.b)(I,[M]),[N,D]=L(I),B=(0,o.forwardRef)(((e,n)=>{const{name:t,min:r=0,max:i=100,step:a=1,orientation:c="horizontal",disabled:l=!1,minStepsBetweenThumbs:s=0,defaultValue:u=[r],value:d,onValueChange:v=(()=>{}),onValueCommit:f=(()=>{}),inverted:p=!1,...h}=e,[m,w]=(0,o.useState)(null),b=(0,y.e)(n,(e=>w(e))),j=(0,o.useRef)(new Set),C=(0,o.useRef)(0),Z="horizontal"===c,S=!m||Boolean(m.closest("form")),P=Z?H:W,[I=[],A]=(0,E.T)({prop:d,defaultProp:u,onChange:e=>{var n;null===(n=[...j.current][C.current])||void 0===n||n.focus(),v(e)}}),M=(0,o.useRef)(I);function L(e,n,{commit:t}={commit:!1}){const o=function(e){return(String(e).split(".")[1]||"").length}(a),c=function(e,n){const t=Math.pow(10,n);return Math.round(e*t)/t}(Math.round((e-r)/a)*a+r,o),l=_(c,[r,i]);A(((e=[])=>{const r=function(e=[],n,t){const r=[...e];return r[t]=n,r.sort(((e,n)=>e-n))}(e,l,n);if(function(e,n){if(n>0){const t=function(e){return e.slice(0,-1).map(((n,t)=>e[t+1]-n))}(e);return Math.min(...t)>=n}return!0}(r,s*a)){C.current=r.indexOf(l);const n=String(r)!==String(e);return n&&t&&f(r),n?r:e}return e}))}return(0,o.createElement)(N,{scope:e.__scopeSlider,disabled:l,min:r,max:i,valueIndexToChangeRef:C,thumbs:j.current,values:I,orientation:c},(0,o.createElement)(O.Provider,{scope:e.__scopeSlider},(0,o.createElement)(O.Slot,{scope:e.__scopeSlider},(0,o.createElement)(P,(0,x.Z)({"aria-disabled":l,"data-disabled":l?"":void 0},h,{ref:b,onPointerDown:(0,g.M)(h.onPointerDown,(()=>{l||(M.current=I)})),min:r,max:i,inverted:p,onSlideStart:l?void 0:function(e){const n=function(e,n){if(1===e.length)return 0;const t=e.map((e=>Math.abs(e-n))),r=Math.min(...t);return t.indexOf(r)}(I,e);L(e,n)},onSlideMove:l?void 0:function(e){L(e,C.current)},onSlideEnd:l?void 0:function(){const e=M.current[C.current];I[C.current]!==e&&f(I)},onHomeKeyDown:()=>!l&&L(r,0,{commit:!0}),onEndKeyDown:()=>!l&&L(i,I.length-1,{commit:!0}),onStepKeyDown:({event:e,direction:n})=>{if(!l){const t=k.includes(e.key)||e.shiftKey&&R.includes(e.key)?10:1,r=C.current;L(I[r]+a*t*n,r,{commit:!0})}}})))),S&&I.map(((e,n)=>(0,o.createElement)($,{key:n,name:t?t+(I.length>1?"[]":""):void 0,value:e}))))})),[V,G]=L(I,{startEdge:"left",endEdge:"right",size:"width",direction:1}),H=(0,o.forwardRef)(((e,n)=>{const{min:t,max:r,dir:i,inverted:a,onSlideStart:c,onSlideMove:l,onSlideEnd:s,onStepKeyDown:u,...d}=e,[v,f]=(0,o.useState)(null),p=(0,y.e)(n,(e=>f(e))),h=(0,o.useRef)(),m=(0,b.gm)(i),_="ltr"===m,g=_&&!a||!_&&a;function w(e){const n=h.current||v.getBoundingClientRect(),o=ee([0,n.width],g?[t,r]:[r,t]);return h.current=n,o(e-n.left)}return(0,o.createElement)(V,{scope:e.__scopeSlider,startEdge:g?"left":"right",endEdge:g?"right":"left",direction:g?1:-1,size:"width"},(0,o.createElement)(F,(0,x.Z)({dir:m,"data-orientation":"horizontal"},d,{ref:p,style:{...d.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:e=>{const n=w(e.clientX);null===c||void 0===c||c(n)},onSlideMove:e=>{const n=w(e.clientX);null===l||void 0===l||l(n)},onSlideEnd:()=>{h.current=void 0,null===s||void 0===s||s()},onStepKeyDown:e=>{const n=P[g?"from-left":"from-right"].includes(e.key);null===u||void 0===u||u({event:e,direction:n?-1:1})}})))})),W=(0,o.forwardRef)(((e,n)=>{const{min:t,max:r,inverted:i,onSlideStart:a,onSlideMove:c,onSlideEnd:l,onStepKeyDown:s,...u}=e,d=(0,o.useRef)(null),v=(0,y.e)(n,d),f=(0,o.useRef)(),p=!i;function h(e){const n=f.current||d.current.getBoundingClientRect(),o=ee([0,n.height],p?[r,t]:[t,r]);return f.current=n,o(e-n.top)}return(0,o.createElement)(V,{scope:e.__scopeSlider,startEdge:p?"bottom":"top",endEdge:p?"top":"bottom",size:"height",direction:p?1:-1},(0,o.createElement)(F,(0,x.Z)({"data-orientation":"vertical"},u,{ref:v,style:{...u.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:e=>{const n=h(e.clientY);null===a||void 0===a||a(n)},onSlideMove:e=>{const n=h(e.clientY);null===c||void 0===c||c(n)},onSlideEnd:()=>{f.current=void 0,null===l||void 0===l||l()},onStepKeyDown:e=>{const n=P[p?"from-bottom":"from-top"].includes(e.key);null===s||void 0===s||s({event:e,direction:n?-1:1})}})))})),F=(0,o.forwardRef)(((e,n)=>{const{__scopeSlider:t,onSlideStart:r,onSlideMove:i,onSlideEnd:a,onHomeKeyDown:c,onEndKeyDown:l,onStepKeyDown:s,...u}=e,d=D(I,t);return(0,o.createElement)(Z.WV.span,(0,x.Z)({},u,{ref:n,onKeyDown:(0,g.M)(e.onKeyDown,(e=>{"Home"===e.key?(c(e),e.preventDefault()):"End"===e.key?(l(e),e.preventDefault()):k.concat(R).includes(e.key)&&(s(e),e.preventDefault())})),onPointerDown:(0,g.M)(e.onPointerDown,(e=>{const n=e.target;n.setPointerCapture(e.pointerId),e.preventDefault(),d.thumbs.has(n)?n.focus():r(e)})),onPointerMove:(0,g.M)(e.onPointerMove,(e=>{e.target.hasPointerCapture(e.pointerId)&&i(e)})),onPointerUp:(0,g.M)(e.onPointerUp,(e=>{const n=e.target;n.hasPointerCapture(e.pointerId)&&(n.releasePointerCapture(e.pointerId),a(e))}))}))})),K="SliderTrack",U=(0,o.forwardRef)(((e,n)=>{const{__scopeSlider:t,...r}=e,i=D(K,t);return(0,o.createElement)(Z.WV.span,(0,x.Z)({"data-disabled":i.disabled?"":void 0,"data-orientation":i.orientation},r,{ref:n}))})),z="SliderRange",Y=(0,o.forwardRef)(((e,n)=>{const{__scopeSlider:t,...r}=e,i=D(z,t),a=G(z,t),c=(0,o.useRef)(null),l=(0,y.e)(n,c),s=i.values.length,u=i.values.map((e=>J(e,i.min,i.max))),d=s>1?Math.min(...u):0,v=100-Math.max(...u);return(0,o.createElement)(Z.WV.span,(0,x.Z)({"data-orientation":i.orientation,"data-disabled":i.disabled?"":void 0},r,{ref:l,style:{...e.style,[a.startEdge]:d+"%",[a.endEdge]:v+"%"}}))})),X="SliderThumb",q=(0,o.forwardRef)(((e,n)=>{const t=A(e.__scopeSlider),[r,i]=(0,o.useState)(null),a=(0,y.e)(n,(e=>i(e))),c=(0,o.useMemo)((()=>r?t().findIndex((e=>e.ref.current===r)):-1),[t,r]);return(0,o.createElement)(Q,(0,x.Z)({},e,{ref:a,index:c}))})),Q=(0,o.forwardRef)(((e,n)=>{const{__scopeSlider:t,index:r,...i}=e,a=D(X,t),c=G(X,t),[l,s]=(0,o.useState)(null),u=(0,y.e)(n,(e=>s(e))),d=(0,C.t)(l),v=a.values[r],f=void 0===v?0:J(v,a.min,a.max),p=function(e,n){return n>2?`Value ${e+1} of ${n}`:2===n?["Minimum","Maximum"][e]:void 0}(r,a.values.length),h=null===d||void 0===d?void 0:d[c.size],m=h?function(e,n,t){const r=e/2,o=ee([0,50],[0,r]);return(r-o(n)*t)*t}(h,f,c.direction):0;return(0,o.useEffect)((()=>{if(l)return a.thumbs.add(l),()=>{a.thumbs.delete(l)}}),[l,a.thumbs]),(0,o.createElement)("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[c.startEdge]:`calc(${f}% + ${m}px)`}},(0,o.createElement)(O.ItemSlot,{scope:e.__scopeSlider},(0,o.createElement)(Z.WV.span,(0,x.Z)({role:"slider","aria-label":e["aria-label"]||p,"aria-valuemin":a.min,"aria-valuenow":v,"aria-valuemax":a.max,"aria-orientation":a.orientation,"data-orientation":a.orientation,"data-disabled":a.disabled?"":void 0,tabIndex:a.disabled?void 0:0},i,{ref:u,style:void 0===v?{display:"none"}:e.style,onFocus:(0,g.M)(e.onFocus,(()=>{a.valueIndexToChangeRef.current=r}))}))))})),$=e=>{const{value:n,...t}=e,r=(0,o.useRef)(null),i=(0,j.D)(n);return(0,o.useEffect)((()=>{const e=r.current,t=window.HTMLInputElement.prototype,o=Object.getOwnPropertyDescriptor(t,"value").set;if(i!==n&&o){const t=new Event("input",{bubbles:!0});o.call(e,n),e.dispatchEvent(t)}}),[i,n]),(0,o.createElement)("input",(0,x.Z)({style:{display:"none"}},t,{ref:r,defaultValue:n}))};function J(e,n,t){return _(100/(t-n)*(e-n),[0,100])}function ee(e,n){return t=>{if(e[0]===e[1]||n[0]===n[1])return n[0];const r=(n[1]-n[0])/(e[1]-e[0]);return n[0]+r*(t-e[0])}}const ne=U,te=Y,re=q;var oe,ie,ae,ce=t(37014),le=t.n(ce),se=t(48998),ue=t.n(se);!function(e){e.Horizontal="horizontal",e.Vertical="vertical"}(oe||(oe={})),function(e){e.ltr="ltr",e.rtl="rtl"}(ie||(ie={})),function(e){e.Primary="primary",e.Secondary="secondary"}(ae||(ae={}));var de,ve=function(e){var n,t=e.label,o=e.name,i=e.onValueChange,a=e.min,c=void 0===a?0:a,l=e.max,s=void 0===l?100:l,d=e.step,v=void 0===d?1:d,f=e.minStepsBetweenThumbs,x=void 0===f?0:f,_=e.direction,g=void 0===_?ie.ltr:_,y=e.orientation,w=void 0===y?oe.Horizontal:y,E=e.disabled,b=void 0!==E&&E,j=e.defaultValue,C=e.value,Z=e.showThumbs,S=void 0===Z||Z,k=e.variant,R=void 0===k?ae.Primary:k,P=e.withBackground,I=void 0!==P&&P,O=C||j;return(0,r.jsxs)(B,(0,m.Z)((0,h.Z)({className:ue().slider,min:c,max:s,step:v,minStepsBetweenThumbs:x,dir:g,orientation:w,disabled:b,"aria-label":t},j&&{defaultValue:j},C&&{value:C},i&&{onValueChange:i},o&&{name:o}),{children:[(0,r.jsx)(ne,{className:le()(ue().track,I&&ue().trackBackground),children:(0,r.jsx)(te,{className:le()(ue().range,(n={},(0,p.Z)(n,ue().primary,R===ae.Primary),(0,p.Z)(n,ue().secondary,R===ae.Secondary),n))})}),S&&O.map((function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];var o=(0,u.Z)(n,2),i=o[1];return(0,r.jsx)(re,{className:ue().thumb},i)}))]}))},fe=(0,o.memo)(ve),pe=t(22209),he=t(85149),me=function(){var e=(0,d.useRouter)().locale,n=(0,pe.Z)(),t=(0,o.useContext)(l.c),a=(0,i.v)(t,(function(e){return e.context.elapsed})),s=(0,i.v)(t,(function(e){return e.context.downloadProgress})),v=(0,i.v)(t,(function(e){return e.context.duration}));return(0,r.jsxs)("div",{className:f().container,children:[(0,r.jsx)("span",{className:f().currentTime,children:(0,he.I_)(a,e)}),(0,r.jsx)("div",{className:f().sliderContainer,children:(0,r.jsx)(fe,{showThumbs:!1,variant:ae.Secondary,label:"audio-player",value:[s],onValueChange:function(e){var n=(0,u.Z)(e,1)[0];(0,c.Kz)("audio_player_slider_value_change"),t.send({type:"SEEK_TO",timestamp:n})},max:v,direction:n,withBackground:!0})}),(0,r.jsx)("div",{className:f().sliderContainer,children:(0,r.jsx)(fe,{label:"audio-player",value:[a],onValueChange:function(e){var n=(0,u.Z)(e,1)[0];(0,c.Kz)("audio_player_slider_value_change"),t.send({type:"SEEK_TO",timestamp:n})},max:v,direction:n})}),(0,r.jsx)("span",{className:f().remainingTime,children:(0,he.I_)(v,e)})]})},xe=t(61395),_e=t(85494),ge=t(43172),ye=function(e){return function(n){n.stopPropagation(),e()}},we=function(){var e=(0,xe.Z)("common").t,n=(0,o.useContext)(l.c);return(0,r.jsx)(_e.ZP,{tooltip:e("audio.player.close-audio-player"),shape:_e.jL.Circle,variant:_e.Wu.Ghost,onClick:ye((function(){(0,c.MY)("audio_player_overflow_menu_close"),n.send({type:"CLOSE"})})),shouldFlipOnRTL:!1,children:(0,r.jsx)(ge.Z,{})})},Ee=t(10117),be=t(68414),je=t(71714),Ce=t(11664),Ze=function(){var e=(0,xe.Z)("common").t,n=(0,o.useContext)(l.c),t=(0,i.v)(n,(function(e){return e.matches("VISIBLE.AUDIO_PLAYER_INITIATED.PLAYING")})),a=(0,i.v)(n,Ce.xU);return a?(0,r.jsx)(_e.ZP,{tooltip:"".concat(e("loading"),"..."),shape:_e.jL.Circle,variant:_e.Wu.Ghost,isDisabled:a,children:(0,r.jsx)(Ee.Z,{size:Ee.E.Large})}):t?(0,r.jsx)(_e.ZP,{tooltip:e("audio.player.pause"),shape:_e.jL.Circle,variant:_e.Wu.Ghost,onClick:ye((function(){(0,c.MY)("audio_player_pause"),n.send("TOGGLE")})),children:(0,r.jsx)(be.Z,{})}):(0,r.jsx)(_e.ZP,{tooltip:e("audio.player.play"),shape:_e.jL.Circle,variant:_e.Wu.Ghost,onClick:ye((function(){(0,c.MY)("audio_player_play"),n.send("TOGGLE")})),shouldFlipOnRTL:!1,children:(0,r.jsx)(je.Z,{})})},Se=t(54935),ke=t.n(Se),Re=t(18356);function Pe(){return Pe=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)({}).hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},Pe.apply(null,arguments)}var Ie,Oe=function(e){return o.createElement("svg",Pe({xmlns:"http://www.w3.org/2000/svg",height:24,viewBox:"0 -960 960 960",width:24},e),de||(de=o.createElement("path",{d:"m616-320-56-56 104-104-104-104 56-56 104 104 104-104 56 56-104 104 104 104-56 56-104-104-104 104Zm-496-40v-240h160l200-200v640L280-360H120Zm280-246-86 86H200v80h114l86 86v-252ZM300-480Z",fill:"currentColor"})))};function Ae(){return Ae=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)({}).hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},Ae.apply(null,arguments)}var Me,Le=function(e){return o.createElement("svg",Ae({xmlns:"http://www.w3.org/2000/svg",height:24,viewBox:"0 -960 960 960",width:24},e),Ie||(Ie=o.createElement("path",{d:"M200-360v-240h160l200-200v640L360-360H200Zm440 40v-322q45 21 72.5 65t27.5 97q0 53-27.5 96T640-320ZM480-606l-86 86H280v80h114l86 86v-252ZM380-480Z",fill:"currentColor"})))};function Te(){return Te=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)({}).hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},Te.apply(null,arguments)}var Ne,De=function(e){return o.createElement("svg",Te({xmlns:"http://www.w3.org/2000/svg",height:24,viewBox:"0 -960 960 960",width:24},e),Me||(Me=o.createElement("path",{d:"M560-131v-82q90-26 145-100t55-168q0-94-55-168T560-749v-82q124 28 202 125.5T840-481q0 127-78 224.5T560-131ZM120-360v-240h160l200-200v640L280-360H120Zm440 40v-322q47 22 73.5 66t26.5 96q0 51-26.5 94.5T560-320ZM400-606l-86 86H200v80h114l86 86v-252ZM300-480Z",fill:"currentColor"})))},Be={VOLUME_UP:(0,r.jsx)(De,{}),VOLUME_DOWN:(0,r.jsx)(Le,{}),NO_SOUND:(0,r.jsx)(Oe,{})},Ve=function(e){return e<1?"NO_SOUND":e<50?"VOLUME_DOWN":"VOLUME_UP"},Ge=function(){var e=(0,pe.Z)(),n=(0,xe.Z)("common").t,t=(0,o.useContext)(l.c),a=(0,i.v)(t,(function(e){return e.context.volume})),s=(0,o.useState)(!1),d=s[0],v=s[1],f=(0,o.useState)(Ve(100*a)),p=f[0],h=f[1];return(0,o.useEffect)((function(){var e=setTimeout((function(){v(!1)}),1500);return function(){return clearTimeout(e)}}),[a]),(0,r.jsx)("div",{dir:e,children:(0,r.jsx)(Re.Z,{isPortalled:!0,isModal:!0,isOpen:d,contentClassName:ke().content,onOpenChange:v,trigger:(0,r.jsx)(_e.ZP,{tooltip:n("audio.player.volume-control"),shape:_e.jL.Circle,variant:_e.Wu.Ghost,children:Be[p]}),children:(0,r.jsx)(fe,{min:0,max:100,step:1,label:"Volume",withBackground:!0,value:[100*a],onValueChange:function(e){var n=(0,u.Z)(e,1)[0];(0,c.Q8)("audio_player_volume",a,n),t.send({type:"UPDATE_VOLUME",volume:n/100}),h(Ve(n))},variant:ae.Primary})})})},He=t(43609),We=function(e){var n=e.rangeActor,t=(0,xe.Z)("common").lang,o=(0,i.v)(n,(function(e){var n=e.context;return n.totalRangeCycle-n.currentRangeCycle+1})),a=(0,He.rQ)(o,t);return(0,r.jsx)("span",{children:a})},Fe=t(50855),Ke=t(3390),Ue=t(54988),ze=function(){var e=(0,xe.Z)("common").t,n=(0,o.useContext)(l.c),t=(0,i.v)(n,(function(e){return e.context.repeatActor})),a=!!t;return(0,r.jsx)(Fe.Z,{shouldWrap:a,wrapper:function(e){return(0,r.jsx)(Ke.Z,{content:a&&(0,r.jsx)(We,{rangeActor:t.getSnapshot().context.rangeCycleActor}),children:e})},children:(0,r.jsx)(_e.ZP,{tooltip:e("more"),variant:_e.Wu.Ghost,shape:_e.jL.Circle,id:"audio-player-overflow-menu-trigger",children:(0,r.jsx)(Ue.Z,{})})})},Ye=t(648),Xe=t(70431),qe=t.n(Xe),Qe=t(67385),$e=function(e){var n=e.showTooltipFor,t=(0,xe.Z)("common").t;return n&&n.length?(0,r.jsxs)("p",{className:qe().tooltipText,children:["".concat(t("audio.displaying"),": "),null===n||void 0===n?void 0:n.map((function(e,o){return(0,r.jsxs)("span",{children:[t(e),"".concat(0===o&&n.length>1?" \u2022 ":"")]},e)}))]}):(0,r.jsx)(r.Fragment,{})},Je=t(46581),en=function(e){var n=e.showTooltipFor,t=(0,Ye.v9)(Je.XQ);return(0,r.jsxs)(r.Fragment,{children:[t&&(0,r.jsx)($e,{showTooltipFor:n}),(0,r.jsx)("div",{className:qe().helpText,children:(0,r.jsx)(Qe.Z,{i18nKey:"".concat(t?"common:audio.exp-tip":"common:audio.exp-tip-no-select"),components:{span:(0,r.jsx)("span",{},0),br:(0,r.jsx)("br",{},1),boldSpan:(0,r.jsx)("span",{className:qe().bold},2)}})})]})},nn=t(41418),tn=t(81787),rn=t(89932),on=t(33294),an=t(70356),cn=function(e){var n=e.onBack,t=(0,xe.Z)("common").t,o=(0,tn.Z)(),i=o.isLoading,a=o.actions.onSettingsChange,l=(0,Ye.v9)(on.eU),s=l.enableAutoScrolling,u=l.showTooltipWhenPlayingAudio,d=(0,Ye.v9)(Je.SV),v=function(e,n,t){a(e,n,t(n),t(l[e]),an.Z.AUDIO)};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(Re.Z.Item,{shouldFlipOnRTL:!0,icon:(0,r.jsx)(rn.Z,{}),onClick:n,children:t("audio.experience")}),(0,r.jsx)(Re.Z.Divider,{}),i&&(0,r.jsx)(Ee.Z,{}),(0,r.jsxs)("div",{className:qe().checkboxContainer,children:[(0,r.jsx)("div",{children:(0,r.jsx)(nn.Z,{checked:s,id:"auto-scrolling",name:"auto-scrolling",label:t("audio.auto-scroll.title"),onChange:function(e){(0,c.Q8)("audio_settings_auto_scrolling_enabled",!e,e),v("enableAutoScrolling",e,on.$8)},disabled:i})}),(0,r.jsxs)("div",{children:[(0,r.jsx)(nn.Z,{checked:u,id:"show-tooltip",name:"show-tooltip",label:t("settings.show-tooltip-when-playing-audio"),onChange:function(e){(0,c.Q8)("audio_settings_show_tooltip_when_playing_audio",!e,e),v("showTooltipWhenPlayingAudio",e,on.Wf)},disabled:i||d&&0===d.length}),(0,r.jsx)("div",{className:le()(qe().experienceTipContainer,qe().helpText),children:(0,r.jsx)(en,{showTooltipFor:d})})]})]})]})},ln=t(1614),sn=[.25,.5,.75,1,1.25,1.5,1.75,2],un=function(e){var n=e.onBack,t=(0,xe.Z)("common"),a=t.t,s=t.lang,u=(0,tn.Z)(),d=u.actions.onXstateSettingsChange,v=u.isLoading,f=(0,o.useContext)(l.c),p=(0,i.v)(f,(function(e){return e.context.playbackRate})),h=(0,o.useCallback)((function(e){return 1===e?a("audio.playback-normal"):(0,He.rQ)(e,s)}),[s,a]),m=function(e){return p===e?v?(0,r.jsx)(Ee.Z,{}):(0,r.jsx)(ln.Z,{}):(0,r.jsx)("span",{})},x=sn.map((function(e){return(0,r.jsx)(Re.Z.Item,{icon:m(e),onClick:function(){(0,c.MY)("audio_player_menu_playback_item"),(0,c.Q8)("audio_playback_rate",p,e),function(e){var t=p;d("playbackRate",e,(function(){return f.send({type:"SET_PLAYBACK_SPEED",playbackRate:e})}),(function(){return f.send({type:"SET_PLAYBACK_SPEED",playbackRate:t})}),an.Z.AUDIO,n)}(e)},children:h(e)},e)}));return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(Re.Z.Item,{shouldFlipOnRTL:!0,icon:(0,r.jsx)(rn.Z,{}),onClick:n,children:a("audio.playback-speed")}),(0,r.jsx)(Re.Z.Divider,{}),x]})},dn=t(84620),vn=t(50814),fn=t(11155),pn=t(5754),hn=function(){var e=(0,xe.Z)("common").t,n=(0,o.useContext)(l.c),t=(0,o.useState)(!1),a=t[0],s=t[1],u=(0,i.v)(n,(function(e){return e.context.surah})),d=(0,i.v)(n,Ce.xU),v=(0,i.v)(n,(function(e){return e.context.repeatActor})),f=!!v;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(Re.Z.Item,{onClick:function(){(0,c.MY)("audio_player_repeat"),s(!0)},isDisabled:d,icon:d?(0,r.jsx)(Ee.Z,{size:Ee.E.Large}):(0,r.jsx)(Fe.Z,{shouldWrap:f,wrapper:function(e){return(0,r.jsx)(Ke.Z,{content:f&&(0,r.jsx)(We,{rangeActor:v.getSnapshot().context.rangeCycleActor}),children:e})},children:(0,r.jsx)(pn.Z,{})}),children:e("audio.player.manage-repeat-settings")}),!d&&(0,r.jsx)(vn.Z,{defaultRepetitionMode:fn.m.Range,chapterId:u.toString(),isOpen:a,onClose:function(){return s(!1)}})]})},mn=t(2787),xn=t.n(mn),_n=t(73756),gn=t(18419),yn=t(96749),wn=t(27967),En=function(e){var n=e.onBack,t=(0,xe.Z)("common"),a=t.lang,s=t.t,u=(0,o.useContext)(l.c),d=(0,i.v)(u,(function(e){return e.context.reciterId})),v=(0,tn.Z)(),f=v.actions.onXstateSettingsChange,p=v.isLoading,h=(0,gn.P)(),m=h.isActive,x=h.activeStepGroup,_=h.activeStepIndex,g=h.nextStep;(0,o.useEffect)((function(){m&&x===yn.Z.READING_EXPERIENCE&&3===_&&g()}),[m,x,_,g]);var y=(0,o.useCallback)((function(e){var t=d;f("reciter",e.id,(function(){return u.send({type:"CHANGE_RECITER",reciterId:e.id})}),(function(){return u.send({type:"CHANGE_RECITER",reciterId:t})}),an.Z.AUDIO,n)}),[u,n,f,d]),w=(0,o.useCallback)((function(e,n){return n===e?p?(0,r.jsx)(Ee.Z,{}):(0,r.jsx)(ln.Z,{}):(0,r.jsx)("span",{})}),[p]),E=(0,o.useCallback)((function(e){return(0,r.jsx)("div",{children:e.reciters.map((function(e){return(0,r.jsxs)(Re.Z.Item,{icon:w(e.id,d),onClick:function(){(0,c.MY)("audio_player_overflow_menu_reciter_item"),(0,c.Q8)("reciter",d,e.id),(0,c.u8)("reciter",e.id),y(e)},children:[e.translatedName.name,"Murattal"!==e.style.name&&(0,r.jsx)("p",{className:xn().reciterStyle,children:" - ".concat(e.style.name)})]},e.id)}))})}),[w,d,y]),b=(0,r.jsx)("div",{id:"audio-player-reciter-list",children:(0,r.jsx)(_n.Z,{queryKey:(0,wn.jL)(a),render:E})});return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(Re.Z.Item,{icon:(0,r.jsx)(rn.Z,{}),onClick:n,shouldFlipOnRTL:!0,id:"audio-player-reciter-select-item",children:s("audio.select-reciter")}),(0,r.jsx)(Re.Z.Divider,{}),b]})},bn=t(51519),jn=t.n(bn),Cn=t(37362),Zn=t(4845);function Sn(){return Sn=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)({}).hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},Sn.apply(null,arguments)}var kn,Rn=function(e){return o.createElement("svg",Sn({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 114 174",width:114,height:174,fill:"currentColor"},e),Ne||(Ne=o.createElement("path",{d:"m68.5 6.5.3 29.7L69 66h20c11 0 20 .3 20 .6s-13.4 22.9-29.7 50.2l-29.8 49.6-.3-29.7L49 107H8.1l30.2-50.3z"})))};function Pn(){return Pn=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)({}).hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},Pn.apply(null,arguments)}var In,On=function(e){return o.createElement("svg",Pn({width:15,height:15,viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),kn||(kn=o.createElement("path",{d:"M7.5.875a3.625 3.625 0 0 0-1.006 7.109c-1.194.145-2.218.567-2.99 1.328-.982.967-1.479 2.408-1.479 4.288a.475.475 0 1 0 .95 0c0-1.72.453-2.88 1.196-3.612.744-.733 1.856-1.113 3.329-1.113s2.585.38 3.33 1.113c.742.733 1.195 1.892 1.195 3.612a.475.475 0 1 0 .95 0c0-1.88-.497-3.32-1.48-4.288-.77-.76-1.795-1.183-2.989-1.328A3.627 3.627 0 0 0 7.5.875ZM4.825 4.5a2.675 2.675 0 1 1 5.35 0 2.675 2.675 0 0 1-5.35 0Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})))},An=function(e){return e.toString().length>=4?11:14};!function(e){e.Main="main",e.AudioSpeed="audio-speed",e.Reciter="reciter",e.Experience="experience"}(In||(In={}));var Mn,Ln=function(){var e=(0,o.useState)(In.Main),n=e[0],t=e[1],a=(0,o.useContext)(l.c),s=(0,xe.Z)("common").t,u=(0,i.v)(a,(function(e){return e.context.playbackRate})),d=(0,gn.P)(),v=d.prevStep,f=d.nextStep;(0,o.useEffect)((function(){var e=function(){t(In.Main),v()},n=function(){t(In.Reciter),f()};return window.addEventListener(Cn.Z.STEP_BEFORE_CHOOSING_RECITER_FROM_LIST,e),window.addEventListener(Cn.Z.STEP_AFTER_RECITER_LIST_ITEM_CLICK,n),function(){window.removeEventListener(Cn.Z.STEP_BEFORE_CHOOSING_RECITER_FROM_LIST,e),window.removeEventListener(Cn.Z.STEP_AFTER_RECITER_LIST_ITEM_CLICK,n)}}),[f,v]);var h=(0,o.useMemo)((function(){var e;return e={},(0,p.Z)(e,In.Main,[(0,r.jsx)(dn.Z,{},0),(0,r.jsx)(hn,{},1),(0,r.jsx)(Re.Z.Divider,{},2),(0,r.jsx)(Re.Z.Item,{icon:(0,r.jsx)(Rn,{}),onClick:function(){(0,c.MY)("audio_player_overflow_menu_experience"),t(In.Experience)},children:(0,r.jsxs)("div",{className:jn().menuWithNestedItems,children:[s("audio.experience"),(0,r.jsx)(Zn.Z,{})]})},3),(0,r.jsx)(Re.Z.Item,{icon:(0,r.jsxs)("span",{style:{fontSize:An(u)},children:[u,s("audio.playback-speed-unit")]}),onClick:function(){(0,c.MY)("audio_player_overflow_menu_playback"),t(In.AudioSpeed)},children:(0,r.jsxs)("div",{className:jn().menuWithNestedItems,children:[s("audio.speed"),(0,r.jsx)(Zn.Z,{})]})},4),(0,r.jsx)(Re.Z.Item,{icon:(0,r.jsx)(On,{}),onClick:function(){(0,c.MY)("audio_player_overflow_menu_reciter"),t(In.Reciter)},id:"audio-player-overflow-menu-reciter",children:(0,r.jsxs)("div",{className:jn().menuWithNestedItems,children:[s("reciter"),(0,r.jsx)(Zn.Z,{})]})},5)]),(0,p.Z)(e,In.AudioSpeed,(0,r.jsx)(un,{onBack:function(){return t(In.Main)}})),(0,p.Z)(e,In.Reciter,(0,r.jsx)(En,{onBack:function(){return t(In.Main)}})),(0,p.Z)(e,In.Experience,(0,r.jsx)(cn,{onBack:function(){return t(In.Main)}})),e}),[s,u]);return(0,r.jsx)(r.Fragment,{children:h[n]})},Tn=t(24976),Nn=t.n(Tn),Dn=function(){var e=(0,pe.Z)(),n=(0,gn.P)(),t=n.isActive,i=n.activeStepGroup,a=n.activeStepIndex,l=n.nextStep,s=n.prevStep,u=(0,o.useState)(!1),d=u[0],v=u[1];(0,o.useEffect)((function(){var e=function(){v(!1),l()},n=function(){v(!1),s()},t=function(){var e;null===(e=document.getElementById("audio-player-overflow-menu-trigger"))||void 0===e||e.click(),l()};return window.addEventListener(Cn.Z.STEP_AFTER_CHOOSING_RECITER_FROM_LIST,e),window.addEventListener(Cn.Z.STEP_AFTER_AUDIO_PLAYER_TRIGGER,t),window.addEventListener(Cn.Z.STEP_BEFORE_RECITER_LIST_ITEM_CLICK,n),function(){window.removeEventListener(Cn.Z.STEP_AFTER_CHOOSING_RECITER_FROM_LIST,e),window.removeEventListener(Cn.Z.STEP_AFTER_AUDIO_PLAYER_TRIGGER,t),window.removeEventListener(Cn.Z.STEP_BEFORE_RECITER_LIST_ITEM_CLICK,n)}}),[l,s]);var f=t&&i===yn.Z.READING_EXPERIENCE&&(3===a||4===a);return(0,r.jsx)("div",{dir:e,children:(0,r.jsx)(Re.Z,{isOpen:d,isPortalled:!0,shouldClose:!f,isModal:!f,trigger:(0,r.jsx)(ze,{}),onOpenChange:function(e){(0,c.Kz)("audio_player_overflow_menu_".concat(d?"open":"close")),v(e),e&&t&&i===yn.Z.READING_EXPERIENCE&&2===a&&l()},contentClassName:Nn().overriddenPopoverMenuContentPositioning,children:(0,r.jsx)(Ln,{})})})},Bn=t(81362),Vn=t.n(Bn);function Gn(){return Gn=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)({}).hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},Gn.apply(null,arguments)}var Hn,Wn=function(e){return o.createElement("svg",Gn({"aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},e),Mn||(Mn=o.createElement("path",{fill:"currentColor",d:"M459.5 71.41 288 214.31v83.45l171.5 142.9c20.6 17.04 52.5 2.64 52.5-25.56V96.03c0-27.37-31.9-41.75-52.5-24.62zm-256 0L11.44 231.4c-15.25 12.87-15.25 36.37 0 49.24l192 159.1c20.63 17.12 52.51 2.749 52.51-24.62V95.22c-.85-26.56-31.85-40.94-52.45-23.81z"})))};function Fn(){return Fn=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)({}).hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},Fn.apply(null,arguments)}var Kn,Un=function(e){return o.createElement("svg",Fn({"aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},e),Hn||(Hn=o.createElement("path",{fill:"currentColor",d:"m52.51 440.6 171.5-142.9v-83.4L52.51 71.41C31.88 54.28 0 68.66 0 96.03v319.9c0 27.37 31.88 41.77 52.51 24.67zm255.99 0 192-159.1c15.25-12.87 15.25-36.37 0-49.24l-192-159.1c-20.63-17.12-52.51-2.749-52.51 24.62v319.9c.01 25.62 31.91 40.02 52.51 22.92z"})))},zn=t(22582),Yn=t(9192);!function(e){e.NextAyah="nextAyah",e.PrevAyah="prevAyah"}(Kn||(Kn={}));var Xn=function(e){var n=e.type,t=e.isLoading,a=(0,o.useContext)(l.c),s=(0,o.useContext)(Yn.Z),u=(0,i.v)(a,(function(e){return e.context.surah})),d=(0,i.v)(a,(function(e){return e.context.ayahNumber})),v=(0,o.useMemo)((function(){return(0,zn.dy)(s,null===u||void 0===u?void 0:u.toString())}),[s,u]),f=(0,xe.Z)("common").t,p=t||n===Kn.PrevAyah&&d<=1||n===Kn.NextAyah&&d>=(null===v||void 0===v?void 0:v.versesCount);return(0,r.jsx)(_e.ZP,{tooltip:n===Kn.PrevAyah?f("previous-ayah"):f("next-ayah"),variant:_e.Wu.Ghost,shape:_e.jL.Circle,onClick:function(){(0,c.MY)("audio_player_".concat(n)),a.send({type:n===Kn.NextAyah?"NEXT_AYAH":"PREV_AYAH"})},isDisabled:p,children:n===Kn.PrevAyah?(0,r.jsx)(Wn,{}):(0,r.jsx)(Un,{})})},qn=function(){var e=(0,o.useContext)(l.c),n=(0,i.v)(e,Ce.xU);return(0,r.jsxs)("div",{className:Vn().container,children:[(0,r.jsx)("div",{className:Vn().actionItem,children:(0,r.jsx)(Dn,{})}),(0,r.jsx)("div",{className:Vn().actionItem,children:(0,r.jsx)(Ge,{})}),(0,r.jsx)("div",{className:Vn().actionItem,children:(0,r.jsx)(Xn,{type:Kn.PrevAyah,isLoading:n})}),(0,r.jsx)("div",{className:Vn().actionItem,children:(0,r.jsx)(Ze,{})}),(0,r.jsx)("div",{className:Vn().actionItem,children:(0,r.jsx)(Xn,{type:Kn.NextAyah,isLoading:n})}),(0,r.jsx)("div",{className:Vn().actionItem,children:(0,r.jsx)(we,{})})]})},Qn=t(35090),$n=function(){var e=(0,xe.Z)("common").t,n=(0,o.useContext)(l.c);return(0,r.jsx)(_e.ZP,{tooltip:e("close"),shape:_e.jL.Circle,variant:_e.Wu.Ghost,onClick:ye((function(){(0,c.MY)("radio_player_close"),n.send("CLOSE_RADIO")})),shouldFlipOnRTL:!1,children:(0,r.jsx)(ge.Z,{})})},Jn=t(31806),et=t.n(Jn),nt=t(9734),tt=function(e){var n=e.radioActor,t=(0,u.Z)((0,Qn.L)(n),1)[0],o=(0,nt.Z)(t.context);return(0,r.jsxs)("div",{className:et().container,children:[(0,r.jsxs)("div",{className:et().infoContainer,children:[(0,r.jsx)("div",{className:et().title,children:o.title}),(0,r.jsx)("div",{className:et().description,children:o.description})]}),(0,r.jsxs)("div",{className:et().actions,children:[(0,r.jsx)(Ze,{}),(0,r.jsx)($n,{})]})]})},rt=t(44638),ot=t.n(rt),it=function(){var e=(0,o.useContext)(l.c),n=(0,i.v)(e,(function(e){return!!e.context.radioActor})),t=(0,gn.P)(),a=t.isActive,c=t.activeStepGroup,u=t.activeStepIndex,d=t.nextStep;return(0,o.useEffect)((function(){a&&c===yn.Z.READING_EXPERIENCE&&1===u&&d()}),[a,c,u,d]),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:ot().innerContainer,children:[(0,r.jsx)(s,{togglePlaying:function(){return e.send("TOGGLE")},isAudioPlayerHidden:!1}),!n&&(0,r.jsx)("div",{className:ot().sliderContainer,children:(0,r.jsx)(me,{})})]}),n?(0,r.jsx)(tt,{radioActor:e.getSnapshot().context.radioActor}):(0,r.jsx)(qn,{})]})}},84620:function(e,n,t){"use strict";t.d(n,{L:function(){return h}});var r=t(69976),o=t(57611),i=t(67597),a=t(21594),c=t(61395),l=t(648),s=t(18356),u=t(10117),d=t(46031),v=t(33294),f=t(12195),p=t(82427),h=function(e,n){var t=e.substring(e.lastIndexOf("/")+1).split("?"),o=(0,r.Z)(t,1)[0],i=new XMLHttpRequest;i.responseType="blob",i.onload=function(){var e=document.createElement("a");e.href=window.URL.createObjectURL(i.response),e.download=o,e.style.display="none",document.body.appendChild(e),e.click(),n()},i.open("GET",e),i.send()};n.Z=function(){var e=(0,c.Z)("common").t,n=(0,i.useContext)(p.c),t=(0,a.v)(n,(function(e){return e.context.audioData.audioUrl})),r=(0,l.v9)(v.iL),m=(0,l.I0)();return(0,o.jsx)(s.Z.Item,{onClick:function(){(0,f.MY)("audio_player_download"),m((0,v.f3)(!0)),h(t,(function(){m((0,v.f3)(!1))}))},icon:r?(0,o.jsx)(u.Z,{size:u.E.Large}):(0,o.jsx)(d.Z,{}),children:e("audio.player.download")})}},73756:function(e,n,t){"use strict";var r=t(57611),o=t(67597),i=t(62103),a=t(19175),c=t(10117),l=t(87739),s=function(e){var n=e.queryKey,t=e.render,o=e.renderError,s=e.initialData,u=e.loading,d=void 0===u?function(){return(0,r.jsx)(c.Z,{})}:u,v=e.fetcher,f=void 0===v?l._i:v,p=e.showSpinnerOnRevalidate,h=void 0===p||p,m=e.onFetchSuccess,x=(0,i.Z)(n,(function(){return f(n).then((function(e){return null===m||void 0===m||m(e),Promise.resolve(e)})).catch((function(e){return Promise.reject(e)}))}),{fallbackData:s}),_=x.data,g=x.error,y=x.isValidating,w=x.mutate;if(h?y:y&&!_)return d();if(g){if(o){var E=o(g);if("undefined"!==typeof E)return E}return(0,r.jsx)(a.Z,{onRetryClicked:function(){w()},error:g})}return t(_)};n.Z=(0,o.memo)(s)},19175:function(e,n,t){"use strict";t.d(n,{Z:function(){return f}});var r,o=t(57611),i=t(67597),a=t(61395),c=t(36284),l=t.n(c),s=t(85494);function u(){return u=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)({}).hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},u.apply(null,arguments)}var d=function(e){return i.createElement("svg",u({width:15,height:15,viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),r||(r=i.createElement("path",{d:"M1.85 7.5c0-2.835 2.21-5.65 5.65-5.65 2.778 0 4.152 2.056 4.737 3.15H10.5a.5.5 0 0 0 0 1h3a.5.5 0 0 0 .5-.5v-3a.5.5 0 0 0-1 0v1.813C12.296 3.071 10.666.85 7.5.85 3.437.85.85 4.185.85 7.5c0 3.315 2.587 6.65 6.65 6.65 1.944 0 3.562-.77 4.714-1.942a6.77 6.77 0 0 0 1.428-2.167.5.5 0 1 0-.925-.38 5.77 5.77 0 0 1-1.216 1.846c-.971.99-2.336 1.643-4.001 1.643-3.44 0-5.65-2.815-5.65-5.65Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})))},v=t(87739),f=function(e){var n=e.onRetryClicked,t=e.error,r=(0,a.Z)("common").t;return(0,o.jsxs)("div",{className:l().container,children:[(0,o.jsx)("p",{className:l().text,children:t.message!==v.yH?r("error.general"):r("error.offline")}),(0,o.jsx)(s.ZP,{prefix:(0,o.jsx)(d,{}),size:s.qE.Small,type:s.L$.Secondary,onClick:n,children:r("retry")})]})}},3390:function(e,n,t){"use strict";var r=t(57611),o=t(37014),i=t.n(o),a=t(11043),c=t.n(a);n.Z=function(e){var n=e.content,t=e.children,o=e.contentClassName,a=e.className;return(0,r.jsxs)("div",{className:i()(c().container,a),children:[t,(0,r.jsx)("div",{className:i()(o,c().content,c().positionBottomRight),children:n})]})}},28472:function(e,n,t){"use strict";t.d(n,{Z:function(){return p}});var r,o=t(57611),i=t(67597),a=t(61395),c=t(20671),l=t.n(c),s=t(85494);function u(){return u=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)({}).hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},u.apply(null,arguments)}var d=function(e){return i.createElement("svg",u({width:15,height:15,viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),r||(r=i.createElement("path",{d:"M2.25 7.5a.5.5 0 0 1 .5-.5h9.5a.5.5 0 0 1 0 1h-9.5a.5.5 0 0 1-.5-.5Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})))},v=t(77107),f=t(43609),p=function(e){var n=e.count,t=e.onIncrement,r=e.onDecrement,c=(0,a.Z)("common"),u=c.t,p=c.lang,h=(0,i.useMemo)((function(){return(0,f.rQ)(Number(n),p)}),[n,p]);return(0,o.jsxs)("div",{className:l().container,children:[(0,o.jsx)(s.ZP,{tooltip:u("counter.decrease"),shape:s.jL.Circle,variant:s.Wu.Ghost,isDisabled:!r,onClick:r,ariaLabel:u("counter.decrease"),children:(0,o.jsx)(d,{})}),(0,o.jsx)("span",{className:l().count,children:h}),(0,o.jsx)(s.ZP,{tooltip:u("counter.increase"),variant:s.Wu.Ghost,shape:s.jL.Circle,isDisabled:!t,onClick:t,ariaLabel:u("counter.increase"),children:(0,o.jsx)(v.Z,{})})]})}},41418:function(e,n,t){"use strict";t.d(n,{Z:function(){return g}});var r,o=t(45361),i=t(57044),a=t(16946),c=t(57611),l=t(67597),s=t(36430),u=t(37014),d=t.n(u),v=t(192),f=t.n(v);function p(){return p=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)({}).hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},p.apply(null,arguments)}var h,m=function(e){return l.createElement("svg",p({viewBox:"0 0 20 20",height:16,width:16,fill:"none"},e),r||(r=l.createElement("path",{stroke:"var(--color-secondary-medium)",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",d:"M5 10h10"})))};function x(){return x=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)({}).hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},x.apply(null,arguments)}var _=function(e){return l.createElement("svg",x({viewBox:"0 0 20 20",height:20,width:20,fill:"none"},e),h||(h=l.createElement("path",{d:"m14 7-5.5 5.5L6 10",stroke:"var(--color-background-default)",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})))},g=function(e){var n=e.disabled,t=void 0!==n&&n,r=e.required,l=void 0!==r&&r,u=e.defaultChecked,v=e.checked,p=e.id,h=e.label,x=e.name,g=e.onChange;return(0,c.jsxs)("div",{className:d()(f().container,(0,o.Z)({},f().disabled,t)),children:[(0,c.jsx)(s.fC,(0,a.Z)((0,i.Z)({disabled:t,name:x,required:l,onCheckedChange:function(e){g(e)},id:p,className:f().checkbox,defaultChecked:u},void 0!==v&&{checked:v}),{children:(0,c.jsx)(s.z$,{className:d()(f().indicator,(0,o.Z)({},f().disabledIndicator,t)),children:"indeterminate"===v?(0,c.jsx)(m,{}):(0,c.jsx)(_,{})})})),h&&(0,c.jsx)("label",{className:f().label,htmlFor:p,children:h})]})}},9734:function(e,n,t){"use strict";var r=t(61395),o=t(62103),i=t(89893),a=t(81403),c=t(27967),l=t(87739);n.Z=function(e){var n=(0,r.Z)("radio"),t=n.t,s=n.lang,u=e,d=(0,o.Z)(u.type===a.T.Reciter?(0,c.Sn)(u.id,s):null,(function(){return(0,l.zm)(u.id,s)})).data;return u.type===a.T.Curated?function(){var e=i.Z[u.id];return{title:t("curated-station.".concat(e.title)),description:t("curated-station.".concat(e.description))}}():function(){var e,n,t=null===d||void 0===d?void 0:d.reciter;return{title:null===t||void 0===t||null===(e=t.translatedName)||void 0===e?void 0:e.name,description:null===t||void 0===t||null===(n=t.style)||void 0===n?void 0:n.name}}()}},11664:function(e,n,t){"use strict";t.d(n,{BP:function(){return a},XL:function(){return s},eU:function(){return u},iX:function(){return i},sI:function(){return l},xU:function(){return c}});var r=t(31887),o=t(69640),i=function(e){return e.context.reciterId===r.YS.id},a=function(e){var n;return null===(n=e.context.audioData)||void 0===n?void 0:n.reciterId},c=function(e){return e.hasTag("loading")},l=function(e,n){var t=function(e){return e.matches("VISIBLE.AUDIO_PLAYER_INITIATED.PLAYING")}(e),r=e.context.surah;return t&&r===n},s=function(e,n){var t=c(e),r=e.context.surah;return t&&r===n},u=function(e,n){var t=e.context,r=t.surah,i=t.ayahNumber;return c(e)&&(0,o.u)(r,i)===n}},44638:function(e){e.exports={innerContainer:"AudioPlayerBody_innerContainer__GtT8u",sliderContainer:"AudioPlayerBody_sliderContainer__LZwWP"}},77012:function(e){e.exports={container:"AudioPlayerSlider_container__3jtMx",sliderContainer:"AudioPlayerSlider_sliderContainer__4oR8q",currentTime:"AudioPlayerSlider_currentTime__lm6KI",remainingTime:"AudioPlayerSlider_remainingTime__X1p9_"}},70431:function(e){e.exports={checkboxContainer:"AudioExperienceMenu_checkboxContainer__8hmg_",experienceTipContainer:"AudioExperienceMenu_experienceTipContainer__cY9lE",link:"AudioExperienceMenu_link__zGV1W",bold:"AudioExperienceMenu_bold__eo7pp",helpText:"AudioExperienceMenu_helpText__a_vH5"}},2787:function(e){e.exports={reciterStyle:"SelectReciterMenu_reciterStyle__a16nc"}},54935:function(e){e.exports={content:"VolumeControl_content__KQW7C"}},51519:function(e){e.exports={menuWithNestedItems:"OverflowAudioPlayActionsMenuBody_menuWithNestedItems__Vok9Z"}},24976:function(e){e.exports={overriddenPopoverMenuContentPositioning:"OverflowAudioPlayerActionsMenu_overriddenPopoverMenuContentPositioning__W2KGs"}},81362:function(e){e.exports={container:"PlaybackControls_container__qbAEo",actionItem:"PlaybackControls_actionItem__t1_CP"}},31806:function(e){e.exports={container:"RadioPlaybackControl_container__gNX1o",infoContainer:"RadioPlaybackControl_infoContainer__5Lcad",title:"RadioPlaybackControl_title__VhoX_",description:"RadioPlaybackControl_description___I0Tp",actions:"RadioPlaybackControl_actions__Iq_bm"}},36284:function(e){e.exports={container:"Error_container__1m9XV",text:"Error_text__yg4kD"}},11043:function(e){e.exports={container:"Badge_container__GXfIf",content:"Badge_content__Ue8Y7",positionBottomRight:"Badge_positionBottomRight__1JJDw"}},20671:function(e){e.exports={container:"Counter_container__WfR1A",count:"Counter_count__Q6LdA"}},192:function(e){e.exports={container:"Checkbox_container__LWbsV",checkbox:"Checkbox_checkbox__bbyfA",label:"Checkbox_label__MrEvp",disabled:"Checkbox_disabled__3XIf_",indicator:"Checkbox_indicator__6umIV",disabledIndicator:"Checkbox_disabledIndicator__Dmw2E"}},48998:function(e){e.exports={slider:"Slider_slider__a38US",track:"Slider_track__WpG08",trackBackground:"Slider_trackBackground__CLV1R",range:"Slider_range__hepcD",primary:"Slider_primary__69eXe",secondary:"Slider_secondary__y17ey",thumb:"Slider_thumb__B0v_r"}},36430:function(e,n,t){"use strict";t.d(n,{fC:function(){return j},z$:function(){return C}});var r=t(57384),o=t(67597),i=t(71641),a=t(61544),c=t(90149),l=t(82305),s=t(10810),u=t(81319),d=t(8591),v=t(4300);const f="Checkbox",[p,h]=(0,a.b)(f),[m,x]=p(f),_=(0,o.forwardRef)(((e,n)=>{const{__scopeCheckbox:t,name:a,checked:s,defaultChecked:u,required:d,disabled:f,value:p="on",onCheckedChange:h,...x}=e,[_,g]=(0,o.useState)(null),y=(0,i.e)(n,(e=>g(e))),j=(0,o.useRef)(!1),C=!_||Boolean(_.closest("form")),[Z=!1,S]=(0,l.T)({prop:s,defaultProp:u,onChange:h}),k=(0,o.useRef)(Z);return(0,o.useEffect)((()=>{const e=null===_||void 0===_?void 0:_.form;if(e){const n=()=>S(k.current);return e.addEventListener("reset",n),()=>e.removeEventListener("reset",n)}}),[_,S]),(0,o.createElement)(m,{scope:t,state:Z,disabled:f},(0,o.createElement)(v.WV.button,(0,r.Z)({type:"button",role:"checkbox","aria-checked":E(Z)?"mixed":Z,"aria-required":d,"data-state":b(Z),"data-disabled":f?"":void 0,disabled:f,value:p},x,{ref:y,onKeyDown:(0,c.M)(e.onKeyDown,(e=>{"Enter"===e.key&&e.preventDefault()})),onClick:(0,c.M)(e.onClick,(e=>{S((e=>!!E(e)||!e)),C&&(j.current=e.isPropagationStopped(),j.current||e.stopPropagation())}))})),C&&(0,o.createElement)(w,{control:_,bubbles:!j.current,name:a,value:p,checked:Z,required:d,disabled:f,style:{transform:"translateX(-100%)"}}))})),g="CheckboxIndicator",y=(0,o.forwardRef)(((e,n)=>{const{__scopeCheckbox:t,forceMount:i,...a}=e,c=x(g,t);return(0,o.createElement)(d.z,{present:i||E(c.state)||!0===c.state},(0,o.createElement)(v.WV.span,(0,r.Z)({"data-state":b(c.state),"data-disabled":c.disabled?"":void 0},a,{ref:n,style:{pointerEvents:"none",...e.style}})))})),w=e=>{const{control:n,checked:t,bubbles:i=!0,...a}=e,c=(0,o.useRef)(null),l=(0,s.D)(t),d=(0,u.t)(n);return(0,o.useEffect)((()=>{const e=c.current,n=window.HTMLInputElement.prototype,r=Object.getOwnPropertyDescriptor(n,"checked").set;if(l!==t&&r){const n=new Event("click",{bubbles:i});e.indeterminate=E(t),r.call(e,!E(t)&&t),e.dispatchEvent(n)}}),[l,t,i]),(0,o.createElement)("input",(0,r.Z)({type:"checkbox","aria-hidden":!0,defaultChecked:!E(t)&&t},a,{tabIndex:-1,ref:c,style:{...e.style,...d,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function E(e){return"indeterminate"===e}function b(e){return E(e)?"indeterminate":e?"checked":"unchecked"}const j=_,C=y},10810:function(e,n,t){"use strict";t.d(n,{D:function(){return o}});var r=t(67597);function o(e){const n=(0,r.useRef)({value:e,previous:e});return(0,r.useMemo)((()=>(n.current.value!==e&&(n.current.previous=n.current.value,n.current.value=e),n.current.previous)),[e])}}}]);
  2. //# sourceMappingURL=78227.b63d41a227e10bfa.js.map