cafe-video-player 2.0.0 → 2.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (81) hide show
  1. package/backwardForward-ANENWZNK.js +13 -0
  2. package/backwardForward-H5Y45ECX.mjs +7 -0
  3. package/chunk-5RV6ALDC.js +11 -0
  4. package/chunk-6RXFIWS4.js +16 -0
  5. package/{chunk-G3NY7MF6.mjs → chunk-7FDJU7GJ.mjs} +2 -2
  6. package/{chunk-AHMSFS2W.js → chunk-7XCZYTE3.js} +8 -8
  7. package/chunk-CS743TPP.js +39 -0
  8. package/chunk-FP7YFRLU.js +93 -0
  9. package/chunk-FP7YFRLU.js.map +1 -0
  10. package/{chunk-Y4BSLEZW.js → chunk-HT67MK6R.js} +4 -4
  11. package/chunk-JT7DG257.mjs +9 -0
  12. package/{chunk-3SYQZL76.mjs → chunk-LBLKOPBG.mjs} +2 -2
  13. package/chunk-PQVEQBO2.mjs +8 -0
  14. package/chunk-PQVEQBO2.mjs.map +1 -0
  15. package/{chunk-63ZUB4L2.mjs → chunk-QPJBWU6N.mjs} +7 -7
  16. package/chunk-QSTM7PDU.mjs +15 -0
  17. package/{chunk-JQ2JCAJT.mjs → chunk-TZZSDVUB.mjs} +3 -3
  18. package/chunk-TZZSDVUB.mjs.map +1 -0
  19. package/chunk-VYQ6AKSK.js +20 -0
  20. package/chunk-VYQ6AKSK.js.map +1 -0
  21. package/index.js +5 -5
  22. package/index.mjs +5 -5
  23. package/nonStaticVideoTag-EBYDON7V.js +24 -0
  24. package/nonStaticVideoTag-EBYDON7V.js.map +1 -0
  25. package/nonStaticVideoTag-Z4T73YCJ.mjs +17 -0
  26. package/nonStaticVideoTag-Z4T73YCJ.mjs.map +1 -0
  27. package/package.json +1 -1
  28. package/staticPlayer-KIMAWG3L.js +17 -0
  29. package/{staticPlayer-ELMNNMQP.mjs → staticPlayer-UEYFLEQ5.mjs} +6 -6
  30. package/{staticVideoTag-IGHEAXZI.mjs → staticVideoTag-EYOCV4RJ.mjs} +4 -4
  31. package/staticVideoTag-L3AWDN3V.js +15 -0
  32. package/{touchVolumeBrightness-G7XRXNO5.mjs → touchVolumeBrightness-6637GYMZ.mjs} +2 -2
  33. package/{touchVolumeBrightness-3FDHY2VA.js → touchVolumeBrightness-CMH2CHTJ.js} +3 -3
  34. package/videoArea-4O7GK27E.js +16 -0
  35. package/videoArea-7KD47WSC.mjs +10 -0
  36. package/{vodPlayer-7DLOCIQD.js → vodPlayer-A2QWOHTK.js} +5 -5
  37. package/{vodPlayer-IRVHRBRB.mjs → vodPlayer-SWX2H5PV.mjs} +5 -5
  38. package/backwardForward-AWKGZCVB.js +0 -13
  39. package/backwardForward-LEAH3F4W.mjs +0 -7
  40. package/chunk-3ZHYUTMI.mjs +0 -8
  41. package/chunk-3ZHYUTMI.mjs.map +0 -1
  42. package/chunk-7T6VLIGJ.js +0 -93
  43. package/chunk-7T6VLIGJ.js.map +0 -1
  44. package/chunk-CVWCBKBR.mjs +0 -9
  45. package/chunk-FONLDNI3.js +0 -16
  46. package/chunk-JQ2JCAJT.mjs.map +0 -1
  47. package/chunk-MIEFZ2ZI.js +0 -39
  48. package/chunk-OMANHRIL.mjs +0 -15
  49. package/chunk-UQTAWRFP.js +0 -19
  50. package/chunk-UQTAWRFP.js.map +0 -1
  51. package/chunk-XTHPP5LC.js +0 -11
  52. package/nonStaticVideoTag-2NVH2HVY.mjs +0 -17
  53. package/nonStaticVideoTag-2NVH2HVY.mjs.map +0 -1
  54. package/nonStaticVideoTag-FNVTSWAG.js +0 -24
  55. package/nonStaticVideoTag-FNVTSWAG.js.map +0 -1
  56. package/staticPlayer-TZ5TWO3F.js +0 -17
  57. package/staticVideoTag-Q7RHS35J.js +0 -15
  58. package/videoArea-PBDGG7DD.js +0 -16
  59. package/videoArea-WLM5F2PO.mjs +0 -10
  60. /package/{backwardForward-AWKGZCVB.js.map → backwardForward-ANENWZNK.js.map} +0 -0
  61. /package/{backwardForward-LEAH3F4W.mjs.map → backwardForward-H5Y45ECX.mjs.map} +0 -0
  62. /package/{chunk-XTHPP5LC.js.map → chunk-5RV6ALDC.js.map} +0 -0
  63. /package/{chunk-FONLDNI3.js.map → chunk-6RXFIWS4.js.map} +0 -0
  64. /package/{chunk-G3NY7MF6.mjs.map → chunk-7FDJU7GJ.mjs.map} +0 -0
  65. /package/{chunk-AHMSFS2W.js.map → chunk-7XCZYTE3.js.map} +0 -0
  66. /package/{chunk-MIEFZ2ZI.js.map → chunk-CS743TPP.js.map} +0 -0
  67. /package/{chunk-Y4BSLEZW.js.map → chunk-HT67MK6R.js.map} +0 -0
  68. /package/{chunk-CVWCBKBR.mjs.map → chunk-JT7DG257.mjs.map} +0 -0
  69. /package/{chunk-3SYQZL76.mjs.map → chunk-LBLKOPBG.mjs.map} +0 -0
  70. /package/{chunk-63ZUB4L2.mjs.map → chunk-QPJBWU6N.mjs.map} +0 -0
  71. /package/{chunk-OMANHRIL.mjs.map → chunk-QSTM7PDU.mjs.map} +0 -0
  72. /package/{staticPlayer-TZ5TWO3F.js.map → staticPlayer-KIMAWG3L.js.map} +0 -0
  73. /package/{staticPlayer-ELMNNMQP.mjs.map → staticPlayer-UEYFLEQ5.mjs.map} +0 -0
  74. /package/{staticVideoTag-IGHEAXZI.mjs.map → staticVideoTag-EYOCV4RJ.mjs.map} +0 -0
  75. /package/{staticVideoTag-Q7RHS35J.js.map → staticVideoTag-L3AWDN3V.js.map} +0 -0
  76. /package/{touchVolumeBrightness-G7XRXNO5.mjs.map → touchVolumeBrightness-6637GYMZ.mjs.map} +0 -0
  77. /package/{touchVolumeBrightness-3FDHY2VA.js.map → touchVolumeBrightness-CMH2CHTJ.js.map} +0 -0
  78. /package/{videoArea-PBDGG7DD.js.map → videoArea-4O7GK27E.js.map} +0 -0
  79. /package/{videoArea-WLM5F2PO.mjs.map → videoArea-7KD47WSC.mjs.map} +0 -0
  80. /package/{vodPlayer-7DLOCIQD.js.map → vodPlayer-A2QWOHTK.js.map} +0 -0
  81. /package/{vodPlayer-IRVHRBRB.mjs.map → vodPlayer-SWX2H5PV.mjs.map} +0 -0
@@ -0,0 +1,13 @@
1
+ 'use strict';
2
+
3
+ var chunkHT67MK6R_js = require('./chunk-HT67MK6R.js');
4
+ require('./chunk-VYQ6AKSK.js');
5
+ require('./chunk-FP7YFRLU.js');
6
+ require('./chunk-MJGU6VON.js');
7
+ require('./chunk-SPUHJYDE.js');
8
+
9
+
10
+
11
+ module.exports = chunkHT67MK6R_js.a;
12
+ //# sourceMappingURL=out.js.map
13
+ //# sourceMappingURL=backwardForward-ANENWZNK.js.map
@@ -0,0 +1,7 @@
1
+ export { a as default } from './chunk-QSTM7PDU.mjs';
2
+ import './chunk-PQVEQBO2.mjs';
3
+ import './chunk-TZZSDVUB.mjs';
4
+ import './chunk-6567FIPA.mjs';
5
+ import './chunk-DBPGS72Q.mjs';
6
+ //# sourceMappingURL=out.js.map
7
+ //# sourceMappingURL=backwardForward-H5Y45ECX.mjs.map
@@ -0,0 +1,11 @@
1
+ 'use strict';
2
+
3
+ var chunkFP7YFRLU_js = require('./chunk-FP7YFRLU.js');
4
+ var chunkSPUHJYDE_js = require('./chunk-SPUHJYDE.js');
5
+
6
+ chunkSPUHJYDE_js.e();var w=()=>{let{params:r}=chunkFP7YFRLU_js.L.getState().videoData,t=chunkFP7YFRLU_js.ca().currentTime;if(t!==0){let d=chunkFP7YFRLU_js.ca().duration,i={video_id:+r.id,video_type:2,time:t===d?0:Math.floor(chunkFP7YFRLU_js.ca().currentTime)},o=localStorage.getItem("viewedVideos");if(o){let e=JSON.parse(o);e=e.filter(n=>n.video_id!==i.video_id||n.video_type!==i.video_type),e.length<10||e.shift(),e.push(i),localStorage.setItem("viewedVideos",JSON.stringify(e));}else localStorage.setItem("viewedVideos",JSON.stringify([i]));}},f=()=>{let r=chunkFP7YFRLU_js.L.dispatch,{params:t}=chunkFP7YFRLU_js.L.getState().videoData,d=localStorage.getItem("viewedVideos");if(d){let o=JSON.parse(d).find(e=>e.video_id===Number(t.id)&&e.video_type===2);o&&r(chunkFP7YFRLU_js.G({time:o.time}));}};
7
+
8
+ exports.a = w;
9
+ exports.b = f;
10
+ //# sourceMappingURL=out.js.map
11
+ //# sourceMappingURL=chunk-5RV6ALDC.js.map
@@ -0,0 +1,16 @@
1
+ 'use strict';
2
+
3
+ var chunkFP7YFRLU_js = require('./chunk-FP7YFRLU.js');
4
+ var chunkSPUHJYDE_js = require('./chunk-SPUHJYDE.js');
5
+ var I = require('axios');
6
+
7
+ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
8
+
9
+ var I__default = /*#__PURE__*/_interopDefault(I);
10
+
11
+ chunkSPUHJYDE_js.e();chunkSPUHJYDE_js.e();var k=t=>{let{params:e}=chunkFP7YFRLU_js.L.getState().videoData;return chunkFP7YFRLU_js.ha().vod.getVodUrl+(t||e.id)},s={url:"",maxRetryCount:0,headers:{},retryPolicy:[],errorCallback:void 0},v=t=>(s.url=k(t),s.maxRetryCount=3,s.retryPolicy=[{codeAbove:500,codeBelow:null,excludeCodes:[],includeCodes:[409],delay:1,count:3},{codeAbove:null,codeBelow:404,excludeCodes:[403,402,401,400],includeCodes:[],delay:10,count:6}],s),D=t=>(v(t),s);var P=t=>chunkFP7YFRLU_js.ga({url:chunkFP7YFRLU_js.ha().viewCount(t),data:{uuid:chunkFP7YFRLU_js.M()}}),z=async t=>{let e=chunkFP7YFRLU_js.L.dispatch;try{let o=await chunkFP7YFRLU_js.ga({...D(t)});if(chunkFP7YFRLU_js.T(o.status)){if(await I__default.default.head("https://"+chunkFP7YFRLU_js.V(o.data.hls_links)+o.data.path),t)return e(chunkFP7YFRLU_js.I(o.data));P(o.data.content_id),A(o.data);}else throw new Error(JSON.stringify({status:o.status,message:o.data}))}catch{e(chunkFP7YFRLU_js.u(!0)),e(chunkFP7YFRLU_js.v(!1));}},A=t=>{let e=chunkFP7YFRLU_js.L.dispatch;e(chunkFP7YFRLU_js.r({...t,stream_link:!!t.stream_link&&chunkFP7YFRLU_js.P("https://"+chunkFP7YFRLU_js.V(t.hls_links)+t.path)})),e(chunkFP7YFRLU_js.u(!0)),e(chunkFP7YFRLU_js.v(!0));},G=()=>{let t=chunkFP7YFRLU_js.L.dispatch,{subtitles:e,selectedSubtitle:o}=chunkFP7YFRLU_js.L.getState().videoData,i=e.find(u=>u.language==="fa");o?(Object.values(chunkFP7YFRLU_js.ca().textTracks).find(u=>u.mode==="showing").mode="disabled",t(chunkFP7YFRLU_js.A(void 0)),chunkFP7YFRLU_js.xa(chunkFP7YFRLU_js.wa("empty"))):i?(i.mode="showing",t(chunkFP7YFRLU_js.A(i)),chunkFP7YFRLU_js.xa(chunkFP7YFRLU_js.wa(i.language))):(chunkFP7YFRLU_js.ca().textTracks[0].mode="showing",t(chunkFP7YFRLU_js.A(chunkFP7YFRLU_js.ca().textTracks[0])),chunkFP7YFRLU_js.xa(chunkFP7YFRLU_js.wa(chunkFP7YFRLU_js.ca().textTracks[0].language)));};
12
+
13
+ exports.a = z;
14
+ exports.b = G;
15
+ //# sourceMappingURL=out.js.map
16
+ //# sourceMappingURL=chunk-6RXFIWS4.js.map
@@ -1,8 +1,8 @@
1
- import { L, ca, G } from './chunk-JQ2JCAJT.mjs';
1
+ import { L, ca, G } from './chunk-TZZSDVUB.mjs';
2
2
  import { e } from './chunk-DBPGS72Q.mjs';
3
3
 
4
4
  e();var f=()=>{let{params:r}=L.getState().videoData,t=ca().currentTime;if(t!==0){let d=ca().duration,i={video_id:+r.id,video_type:2,time:t===d?0:Math.floor(ca().currentTime)},o=localStorage.getItem("viewedVideos");if(o){let e=JSON.parse(o);e=e.filter(n=>n.video_id!==i.video_id||n.video_type!==i.video_type),e.length<10||e.shift(),e.push(i),localStorage.setItem("viewedVideos",JSON.stringify(e));}else localStorage.setItem("viewedVideos",JSON.stringify([i]));}},g=()=>{let r=L.dispatch,{params:t}=L.getState().videoData,d=localStorage.getItem("viewedVideos");if(d){let o=JSON.parse(d).find(e=>e.video_id===Number(t.id)&&e.video_type===2);o&&r(G({time:o.time}));}};
5
5
 
6
6
  export { f as a, g as b };
7
7
  //# sourceMappingURL=out.js.map
8
- //# sourceMappingURL=chunk-G3NY7MF6.mjs.map
8
+ //# sourceMappingURL=chunk-7FDJU7GJ.mjs.map
@@ -1,10 +1,10 @@
1
1
  'use strict';
2
2
 
3
- var chunkFONLDNI3_js = require('./chunk-FONLDNI3.js');
4
- var chunkY4BSLEZW_js = require('./chunk-Y4BSLEZW.js');
3
+ var chunk6RXFIWS4_js = require('./chunk-6RXFIWS4.js');
4
+ var chunkHT67MK6R_js = require('./chunk-HT67MK6R.js');
5
5
  var chunkESB3FO2C_js = require('./chunk-ESB3FO2C.js');
6
- var chunkUQTAWRFP_js = require('./chunk-UQTAWRFP.js');
7
- var chunk7T6VLIGJ_js = require('./chunk-7T6VLIGJ.js');
6
+ var chunkVYQ6AKSK_js = require('./chunk-VYQ6AKSK.js');
7
+ var chunkFP7YFRLU_js = require('./chunk-FP7YFRLU.js');
8
8
  var chunkMJGU6VON_js = require('./chunk-MJGU6VON.js');
9
9
  var chunkSPUHJYDE_js = require('./chunk-SPUHJYDE.js');
10
10
  var te = require('next/legacy/image');
@@ -19,14 +19,14 @@ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
19
19
  var te__default = /*#__PURE__*/_interopDefault(te);
20
20
  var no__default = /*#__PURE__*/_interopDefault(no);
21
21
 
22
- chunkSPUHJYDE_js.e();chunkSPUHJYDE_js.e();chunkSPUHJYDE_js.e();var Po=()=>{let{details:e,params:o}=chunk7T6VLIGJ_js.ba(({videoData:{details:l,params:i}})=>({details:l,params:i}),reactRedux.shallowEqual);return jsxRuntime.jsx("div",{className:`pl-w-full pl-max-w-[80%] pl-truncate pl-text-left pl-ml-4 pl-text-[16px] pl-font-normal pl-text-white pl-break-words pl-self-start animate__animated animate__faster ${chunk7T6VLIGJ_js.$("isActiveElements")?"animate__fadeIn pl-opacity-100":"pl-opacity-0 animate__fadeOut"}`,children:chunk7T6VLIGJ_js.$("hasTitle")?e.title:o.id})},tt=Po;chunkSPUHJYDE_js.e();var Co=()=>jsxRuntime.jsxs("div",{className:`pl-relative animate__animated animate__faster ${chunk7T6VLIGJ_js.$("isActiveElements")?"animate__fadeIn pl-pointer-events-auto":"animate__fadeOut pl-pointer-events-none"}`,children:[jsxRuntime.jsx(te__default.default,{src:chunkMJGU6VON_js.a.lock,alt:"lock-icon",width:20,height:20,onClick:()=>chunkUQTAWRFP_js.g("unlock")}),!localStorage.getItem("unlock-click")&&jsxRuntime.jsx("p",{className:"pl-text-[10px] pl-text-black/[0.87] pl-bg-[#F7F7F7] pl-absolute pl-left-0 pl-px-4 pl-py-3 pl-rounded-[8px] pl-w-max",children:"\u0628\u0631\u0627\u06CC \u0628\u0627\u0632 \u06A9\u0631\u062F\u0646 \u0642\u0641\u0644\u060C \u06A9\u0644\u06CC\u06A9 \u06A9\u0646\u06CC\u062F"})]}),lt=Co;var Lo=()=>(chunk7T6VLIGJ_js.ba(({controller:{lock:e,activeElements:o}})=>({lock:e,activeElements:o}),reactRedux.shallowEqual),jsxRuntime.jsxs("div",{className:`pl-flex pl-items-start pl-justify-end pl-mx-4 pl-mt-5 ${chunk7T6VLIGJ_js.$("isTouchScreenPortrait")?"pl-h-[16px]":"pl-h-[60px]"}`,children:[chunk7T6VLIGJ_js.$("showTitle")&&jsxRuntime.jsx(tt,{}),chunk7T6VLIGJ_js.$("isLock")&&jsxRuntime.jsx(lt,{})]})),rt=Lo;chunkSPUHJYDE_js.e();chunkSPUHJYDE_js.e();var Mo=()=>(chunk7T6VLIGJ_js.ba(({controller:{play:e}})=>({play:e}),reactRedux.shallowEqual),chunk7T6VLIGJ_js.ba(({videoData:{videoElementSizeInfo:e,params:o}})=>({videoElementSizeInfo:e,params:o}),reactRedux.shallowEqual),jsxRuntime.jsx("div",{className:`${!chunk7T6VLIGJ_js.$("isTouchScreen")&&"hover:pl-scale-125"} pl-transition-transform pl-ease-in-out pl-cursor-pointer`,onContextMenu:e=>e.preventDefault(),children:jsxRuntime.jsx(te__default.default,{alt:"",src:chunk7T6VLIGJ_js.$("isPlay")?chunkMJGU6VON_js.a.bigPause:chunkMJGU6VON_js.a.bigPlay,width:40,height:40,onClick:e=>chunkUQTAWRFP_js.a(e),onDoubleClick:e=>e.stopPropagation(),className:`${chunk7T6VLIGJ_js.$("isPlay")?"pl-big-play-icon":"pl-big-pause-icon"}`})})),pt=Mo;chunkSPUHJYDE_js.e();var $o=()=>jsxRuntime.jsxs("div",{className:"loader-spinner pl-absolute pl-top-[50%] pl-left-[50%] pl-mt-[-50px] pl-ml-[-42px] pl-w-screen pl-h-full pl-overflow-hidden",children:[jsxRuntime.jsx("div",{className:"pl-bg-white"}),jsxRuntime.jsx("div",{className:"pl-bg-white"}),jsxRuntime.jsx("div",{className:"pl-bg-white"}),jsxRuntime.jsx("div",{className:"pl-bg-white"}),jsxRuntime.jsx("div",{className:"pl-bg-white"}),jsxRuntime.jsx("div",{className:"pl-bg-white"}),jsxRuntime.jsx("div",{className:"pl-bg-white"}),jsxRuntime.jsx("div",{className:"pl-bg-white"}),jsxRuntime.jsx("div",{className:"pl-bg-white"}),jsxRuntime.jsx("div",{className:"pl-bg-white"}),jsxRuntime.jsx("div",{className:"pl-bg-white"}),jsxRuntime.jsx("div",{className:"pl-bg-white"})]}),at=$o;var _o=()=>{let[e,o]=react.useState(!1),[l,i]=react.useState(!1);chunk7T6VLIGJ_js.ba(({controller:{lock:c,firstPlay:a}})=>({lock:c,firstPlay:a}),reactRedux.shallowEqual);let{activeElements:r,isLoading:p}=chunk7T6VLIGJ_js.ba(({controller:{activeElements:c,isLoading:a}})=>({activeElements:c,isLoading:a}),reactRedux.shallowEqual);return react.useEffect(()=>{let c=null;return chunk7T6VLIGJ_js.$("isFirstPlay")||chunk7T6VLIGJ_js.$("isActiveElements")?c=setTimeout(()=>i(!0),100):i(!1),()=>clearTimeout(c)},[r]),react.useEffect(()=>{let c;return chunk7T6VLIGJ_js.$("isLoading")?c=setTimeout(()=>o(!0),chunk7T6VLIGJ_js.$("isFirstPlay")?0:chunkESB3FO2C_js.b):o(!1),()=>{clearTimeout(c),o(!1);}},[p]),jsxRuntime.jsx("main",{className:"pl-flex-1 pl-mt-1",children:e?jsxRuntime.jsx(at,{}):jsxRuntime.jsx(jsxRuntime.Fragment,{children:l&&!chunk7T6VLIGJ_js.$("isLock")&&jsxRuntime.jsx("div",{id:"main-content",className:`pl-h-full pl-flex pl-justify-center pl-items-center pl-text-center pl-relative ${chunk7T6VLIGJ_js.$("isActiveElements")?"pl-pointer-events-auto":"pl-pointer-events-none"}`,children:jsxRuntime.jsxs("div",{className:"pl-flex pl-justify-center pl-gap-8 pl-items-center pl-w-max",style:{zIndex:3},children:[!chunk7T6VLIGJ_js.$("isFirstPlay")&&jsxRuntime.jsx(chunkY4BSLEZW_js.a,{type:"forward"}),jsxRuntime.jsx(pt,{}),!chunk7T6VLIGJ_js.$("isFirstPlay")&&jsxRuntime.jsx(chunkY4BSLEZW_js.a,{type:"backward"})]})})})})},ut=_o;chunkSPUHJYDE_js.e();chunkSPUHJYDE_js.e();chunkSPUHJYDE_js.e();chunkSPUHJYDE_js.e();var be=e=>{let{videoElementSizeInfo:o}=chunk7T6VLIGJ_js.L.getState().videoData,{duration:l}=chunk7T6VLIGJ_js.L.getState().controller,i=e.clientX!==void 0?e.clientX:e.touches[0].clientX;if(i<=o.right&&i>0)return (i-o.left)/o.width*l},X=e=>{let{videoElementSizeInfo:o}=chunk7T6VLIGJ_js.L.getState().videoData,l=e.clientX!==void 0?e.clientX:e.touches[0].clientX;if(l<=o.right&&l>0)return l-o.left},j=e=>{e&&(e.style.opacity="0.0",e.style.pointerEvents="none",e.style.zIndex=-2);},qo=e=>{e.style.display="block",e.style.zIndex=5,e.style.opacity=chunk7T6VLIGJ_js.L.getState().videoData.details.vtt?"1.0":"0.6",e.style.pointerEvents="auto",e.style.transition="opacity 1s ease-out";},zo=(e,o)=>{let{videoElementSizeInfo:l}=chunk7T6VLIGJ_js.L.getState().videoData,i=document.getElementsByClassName("pl-progressTooltip")[0],r=document.getElementById("parent-player");i&&r&&(X(e)>i.getBoundingClientRect().width/2&&X(e)<l.right-l.left-i.getBoundingClientRect().width/2?o.style.left=`${X(e)-i.offsetWidth/2}px`:X(e)<(r.offsetLeft===0?i.offsetWidth:r.offsetLeft)?o.style.left="0px":chunk7T6VLIGJ_js.ca().offsetLeft+chunk7T6VLIGJ_js.ca().offsetWidth<X(e)+i.offsetWidth&&(o.style.left=`${chunk7T6VLIGJ_js.ca().offsetWidth-i.offsetWidth}px`));},Xo=(e,o,l)=>{o&&qo(o),chunk7T6VLIGJ_js.L.getState().videoData.details.vtt?zo(e,o):o.style.left=`${X(e)-30}px`,chunk7T6VLIGJ_js.L.dispatch(chunk7T6VLIGJ_js.q(Number(be(e)))),l.textContent=`${chunk7T6VLIGJ_js.O(be(e))}`;},we=(e,o=!1)=>{let{videoElementSizeInfo:l}=chunk7T6VLIGJ_js.L.getState().videoData,i=document.querySelector(".pl-progressTooltip"),r=document.querySelector(".pl-progressTimeTooltip"),p=e.clientX!==void 0?e.clientX:e.touches[0].clientX;i&&r&&p<=l.right&&p>l.left?(Xo(e,i,r),o&&setTimeout(()=>j(i),2e3)):j(i);},ht=e=>{let o=e.clientX!==void 0?e.clientX:e.touches[0].clientX;chunk7T6VLIGJ_js.ea()&&(o<=e.view.innerWidth&&o>0?chunk7T6VLIGJ_js.ea().style.width=`${X(e)}px`:o<=e.view.innerWidth?chunk7T6VLIGJ_js.ea().style.width=0:o>0&&(chunk7T6VLIGJ_js.ea().style.width="100%"));},vt=(e,o,l)=>{e.preventDefault(),e.stopPropagation(),l(!0);let i=chunk7T6VLIGJ_js.L.dispatch,r=e.clientX!==void 0?e.clientX:e.touches[0].clientX;r<=e.view.innerWidth&&r>0&&(i(chunk7T6VLIGJ_js.k(!0)),i(chunk7T6VLIGJ_js.l(!0)),sessionStorage.setItem("previousVideoTime",String(chunk7T6VLIGJ_js.ca().currentTime)),e.target.setPointerCapture(e.pointerId),o.length>0&&o.map(p=>clearTimeout(p)));},Te=e=>{e.preventDefault(),e.stopPropagation();let o=chunk7T6VLIGJ_js.L.dispatch,{activePointerProgressBar:l}=chunk7T6VLIGJ_js.L.getState().controller,{left:i}=chunk7T6VLIGJ_js.L.getState().videoData.videoElementSizeInfo,r=e.clientX!==void 0?e.clientX:e.touches[0].clientX,p=document.querySelector(".pl-progressTooltip");r>i?(p&&(p.style.display="block !important",p.style.pointerEvents="auto"),l&&(o(chunk7T6VLIGJ_js.l(!0)),we(e),ht(e),chunk7T6VLIGJ_js.ca().pause())):p&&(p.style.display="none !important",p.style.pointerEvents="none");},gt=(e,o,l,i)=>{i(!1),e.preventDefault(),e.stopPropagation();let r=chunk7T6VLIGJ_js.L.dispatch,{duration:p}=chunk7T6VLIGJ_js.L.getState().controller,{left:c,right:a}=chunk7T6VLIGJ_js.L.getState().videoData.videoElementSizeInfo;e.target.removeEventListener("pointermove",Te);let d=e.clientX!==void 0?e.clientX:e.touches[0].clientX,m=0;d>c&&d<a?m=be(e):d<c?m=0:d>0&&(m=p),chunk7T6VLIGJ_js.$("isStaticFormat")||chunkUQTAWRFP_js.h(chunk7T6VLIGJ_js.ca().currentTime,m),chunk7T6VLIGJ_js.ca().currentTime=m,chunk7T6VLIGJ_js.L.getState().controller.activePointerProgressBar&&(r(chunk7T6VLIGJ_js.k(!1)),r(chunk7T6VLIGJ_js.l(!1)),chunk7T6VLIGJ_js.ca().play(),we(e,!0),sessionStorage.setItem("current-time",String(m)),ht(e),Ro(e,r,o,l));},Ro=(e,o,l,i)=>{let r=i,p=setTimeout(()=>{let{settingPopover:c}=chunk7T6VLIGJ_js.L.getState().popovers,{delayTurnOffControlbar:a}=chunk7T6VLIGJ_js.L.getState().controller;e.pointerType==="touch"&&!c&&a&&o(chunk7T6VLIGJ_js.f(!1));},chunkESB3FO2C_js.a);r.push(p),l(r);},St=()=>{let e=Date.now();chunk7T6VLIGJ_js.ca().play().then(()=>chunk7T6VLIGJ_js.xa(chunk7T6VLIGJ_js.ka(Date.now()-e)));},xt=e=>we(e),yt=()=>{let e=document.querySelector(".pl-progressTooltip");j(e);},Ho=e=>{let o=e.split("."),i=o[0].split(":");return {milliseconds:parseInt(o[1],10)||0,seconds:parseInt(i.pop(),10)||0,minutes:parseInt(i.pop(),10)||0,hours:parseInt(i.pop(),10)||0}},ft=e=>{let o=Ho(e);return parseInt(o.hours*(60*60)+o.minutes*60+o.seconds+o.milliseconds/1e3,10)},Vo=e=>{let o=e.split(/#xywh=/i),l=o[0],r=o[1].match(/[0-9]+/gi);return {x:r[0],y:r[1],w:r[2],h:r[3],image:l}},Uo=(e,o)=>e.indexOf("//")>=0?e:o.indexOf("//")===0?[o.replace(/\/$/gi,""),e.trim()].join("/"):o.indexOf("//")>0?[o.trim(),e.trim()].join("/"):e,Qo=(e,o)=>{let l={},i=o.split(/\/\w+\.vtt\s?/)[0];if(e=Uo(e,i),!e.match(/#xywh=/i))return l.background='url("'+e+o.split(/\/\w+\.vtt\s?/)[1]+'")',l;let r=Vo(e);return l.background='url("'+r.image+o.split(/\/\w+\.vtt\s?/)[1]+'") no-repeat -'+r.x+"px -"+r.y+"px",l.width=r.w+"px",l.height=r.h+"px",l.url=r.image,l},bt=(e,o)=>{fetch(e).then(l=>{if(!l.ok)throw chunk7T6VLIGJ_js.L.dispatch(chunk7T6VLIGJ_js.r({...chunk7T6VLIGJ_js.L.getState().videoData.details,vtt:void 0,vtt_mobile:void 0})),new Error("Network response was not ok");return l.text()}).then(l=>{let i=[];l.split(/[\r\n][\r\n]/i).forEach(p=>{if(p.match(/([0-9]{2}:)?([0-9]{2}:)?[0-9]{2}(.[0-9]{3})?( ?--> ?)([0-9]{2}:)?([0-9]{2}:)?[0-9]{2}(.[0-9]{3}).*/gi)){let c=p.split(/[\r\n]/i),d=c[0].split(/ ?--> ?/i),m=d[0],b=d[1],u=c[1],g=Qo(u,e);i.push({start:ft(m),end:ft(b),css:g});}}),o(i);}).catch(l=>{console.error("Error fetching file:",l);});},wt=(e,o,l)=>{for(let i=0;i<o.length;++i){let r=o[i];if(e>=r.start&&e<r.end){if(r.css.url&&!l[r.css.url]){let p={background:r.css.background,width:r.css.width,height:r.css.height};return l[r.css.url]=p,p}else if(r.css.url)return l[r.css.url]}}};var Go=()=>{let{details:e}=chunk7T6VLIGJ_js.ba(({videoData:{details:a}})=>({details:a}),reactRedux.shallowEqual),{tooltipTime:o}=chunk7T6VLIGJ_js.ba(({controller:{tooltipTime:a,activeElements:d,isFullScreen:m}})=>({tooltipTime:a,activeElements:d,isFullScreen:m}),reactRedux.shallowEqual),l={},[i,r]=react.useState(void 0),[p,c]=react.useState(chunk7T6VLIGJ_js.$("isTouchScreen")?e.vtt_mobile:e.vtt);return react.useEffect(()=>{c(e.vtt_mobile);},[e.vtt_mobile]),react.useEffect(()=>{p&&bt(e.vtt_mobile,r);},[p]),chunk7T6VLIGJ_js.$("isActiveElements")?jsxRuntime.jsxs("div",{className:`pl-flex pl-flex-col pl-progressTooltip pl-absolute pl-bottom-[calc(100%+10px)] pl-px-[10px] pl-pt-[5px] pl-mr-[-25px] pl-text-white pl-text-[14px] ${p&&i?"":"pl-bg-z-gray-700"} pl-rounded-[6px] pl-opacity-0`,children:[p&&!!i&&jsxRuntime.jsx("div",{className:"pl-flex-1 pl-border pl-border-white pl-rounded-[8px] pl-mb-2",children:jsxRuntime.jsx("div",{className:"pl-rounded-[8px]",style:wt(o,i,l)})}),jsxRuntime.jsx("div",{className:"pl-flex pl-items-center pl-justify-center pl-progressTimeTooltip pl-text-white !pl-opacity-100"})]}):jsxRuntime.jsx(jsxRuntime.Fragment,{})},Nt=react.memo(Go);var Ko=()=>{let[e,o]=react.useState(!1);react.useEffect(()=>{j(document.querySelector(".progressTooltip"));},[]);let{duration:l,currentTime:i,bufferedTimeWidth:r}=chunk7T6VLIGJ_js.ba(({controller:{duration:a,currentTime:d,bufferedTimeWidth:m}})=>({duration:a,currentTime:d,bufferedTimeWidth:m}),reactRedux.shallowEqual);chunk7T6VLIGJ_js.ba(({videoData:{params:a,videoElementSizeInfo:d}})=>({params:a,videoElementSizeInfo:d}),reactRedux.shallowEqual);let[p,c]=react.useState([]);return jsxRuntime.jsxs("div",{className:`${chunk7T6VLIGJ_js.$("isTouchScreenPortrait")?"pl-order-1":"pl-order-none"} pl-relative`,children:[jsxRuntime.jsx("div",{className:"pl-relative",children:jsxRuntime.jsx(Nt,{})}),jsxRuntime.jsx("div",{className:"pl-w-full pl-flex pl-items-end",onPointerDown:a=>vt(a,p,o),onPointerMove:Te,onPointerUp:a=>gt(a,c,p,o),onMouseMove:xt,onMouseOut:yt,onClick:St,onDoubleClick:a=>a.stopPropagation(),children:jsxRuntime.jsxs("div",{id:"progress-area",className:"pl-w-full pl-absolute",children:[jsxRuntime.jsx("div",{className:"pl-w-full pl-h-[40px]"}),jsxRuntime.jsxs("div",{id:"time-progress-area",className:"!pl-w-full !pl-h-[5px] pl-transition-transform pl-duration-300 pl-m-auto pl-cursor-pointer !pl-bg-gray-highLight pl-rounded",style:{transform:e?"scaleY(1.8)":"unset"},children:[jsxRuntime.jsx("div",{id:"time-progress-buffer",className:"pl-absolute pl-h-[5px] pl-bg-z-gray-400/[0.7] pl-rounded",style:{width:`${r}%`}}),jsxRuntime.jsx("div",{id:"time-progress-bar",className:`pl-h-[5px] pl-rounded pl-relative pl-cursor-pointer pl-bg-primary before:pl-bg-primary before:pl-inline-block before:pl-w-4 before:pl-h-4 ${e&&"before:pl-w-7 before:pl-h-3"}`,style:{width:`${i/l*chunk7T6VLIGJ_js.fa()}px`}})]})]})})]})},kt=Ko;chunkSPUHJYDE_js.e();chunkSPUHJYDE_js.e();chunkSPUHJYDE_js.e();var jo=({title:e,className:o})=>jsxRuntime.jsx("span",{className:`pl-absolute pl-w-max pl-bg-paper pl-text-white/[0.9] ${chunk7T6VLIGJ_js.$("isFullScreen")?"pl-bottom-[300%]":"pl-bottom-[270%]"} pl-rounded-[8px] pl-text-[10px] pl-px-4 pl-py-[13px] pl-font-normal ${o}`,children:e}),E=jo;var rl=()=>{let{isFullScreen:e}=chunk7T6VLIGJ_js.ba(({controller:{firstPlay:r,isFullScreen:p}})=>({firstPlay:r,isFullScreen:p}),reactRedux.shallowEqual),[o,l]=react.useState(!1),i=chunk7T6VLIGJ_js.aa();return react.useEffect(()=>{chunk7T6VLIGJ_js.$("isFirstPlay")||i(chunk7T6VLIGJ_js.f(!1));},[e]),jsxRuntime.jsxs("div",{className:"pl-relative pl-flex pl-items-center",children:[jsxRuntime.jsx(te__default.default,{src:chunk7T6VLIGJ_js.$("isFullScreen")?chunkMJGU6VON_js.a.nonFullScreen:chunkMJGU6VON_js.a.fullScreen,alt:"fullScreen-icon",className:"pl-cursor-pointer",width:20,height:20,onMouseOver:()=>!chunk7T6VLIGJ_js.$("isTouchScreen")&&l(!0),onMouseLeave:()=>!chunk7T6VLIGJ_js.$("isTouchScreen")&&l(!1),onClick:()=>{chunkUQTAWRFP_js.e(),chunkUQTAWRFP_js.f();}}),o&&jsxRuntime.jsx(E,{title:`${chunk7T6VLIGJ_js.$("isFullScreen")?"\u062E\u0631\u0648\u062C \u0627\u0632":""} \u062A\u0645\u0627\u0645 \u0635\u0641\u062D\u0647`})]})},Ft=rl;chunkSPUHJYDE_js.e();var cl=()=>{let[e,o]=react.useState(!1),l=chunk7T6VLIGJ_js.aa(),{params:i,details:r}=chunk7T6VLIGJ_js.ba(({videoData:{params:p,details:c}})=>({params:p,details:c}),reactRedux.shallowEqual);return jsxRuntime.jsxs("div",{className:"pl-relative pl-flex pl-items-center",children:[jsxRuntime.jsx(te__default.default,{alt:"",onMouseOver:()=>!chunk7T6VLIGJ_js.$("isTouchScreen")&&o(!0),onMouseLeave:()=>!chunk7T6VLIGJ_js.$("isTouchScreen")&&o(!1),src:chunkMJGU6VON_js.a.pictureInPicture,width:20,height:20,className:"pl-flex pl-cursor-pointer",onClick:()=>{console.log(i.id),i.onClickMiniPlayerIcon&&(localStorage.removeItem("close-miniPlayer"),chunk7T6VLIGJ_js.ca().pause(),l(chunk7T6VLIGJ_js.a(!1)),i.onClickMiniPlayerIcon({video:r||void 0,id:i.type==="vod"?i.id:window.btoa(i.id),type:i.type,currentTime:chunk7T6VLIGJ_js.ca().currentTime}));}}),e&&jsxRuntime.jsx(E,{title:"\u062A\u0635\u0648\u06CC\u0631 \u062F\u0631 \u062A\u0635\u0648\u06CC\u0631"})]})},Mt=cl;chunkSPUHJYDE_js.e();var vl=()=>{let[e,o]=react.useState(!1),l=chunk7T6VLIGJ_js.aa(),{settings:i}=chunk7T6VLIGJ_js.ba(({user:{settings:a}})=>({settings:a}),reactRedux.shallowEqual),r=react.useRef(i.volume),p=()=>{if(r.current!==i.volume){let{settings:a}=chunk7T6VLIGJ_js.L.getState().user;chunk7T6VLIGJ_js.xa(chunk7T6VLIGJ_js.oa(r.current,a.volume)),r.current=a.volume,l(chunk7T6VLIGJ_js.F({...a,volume:a.volume}));}},c=a=>{let{settings:d}=chunk7T6VLIGJ_js.L.getState().user;a==="mute"?(chunkUQTAWRFP_js.c(0),chunk7T6VLIGJ_js.xa(chunk7T6VLIGJ_js.oa(d.volume,0))):(chunk7T6VLIGJ_js.xa(chunk7T6VLIGJ_js.oa(d.volume,100)),chunkUQTAWRFP_js.c(100));};return jsxRuntime.jsxs("div",{className:"pl-relative pl-inline-flex pl-items-center pl-gap-2 pl-sound-icon",children:[!chunk7T6VLIGJ_js.$("isTouchScreen")&&jsxRuntime.jsx("input",{onMouseUp:p,type:"range",min:"0",max:"100",value:i.volume,onChange:a=>chunkUQTAWRFP_js.c(+a.target.value),className:"pl-soundVolume pl-cursor-pointer rounded-full",style:{background:`linear-gradient(to right, white ${i.volume}%, rgba(255,255,255,0.3) 0)`}}),jsxRuntime.jsxs("div",{className:"pl-relative pl-flex pl-items-center",children:[jsxRuntime.jsx(te__default.default,{src:chunk7T6VLIGJ_js.$("hasSound")?chunkMJGU6VON_js.a.unMute:chunkMJGU6VON_js.a.mute,alt:chunk7T6VLIGJ_js.$("hasSound")?"unmute-icon":"mute-icon",className:"pl-flex pl-items-center pl-cursor-pointer",width:20,height:20,onClick:()=>chunk7T6VLIGJ_js.$("hasSound")?c("mute"):c("unmute"),onDoubleClick:a=>a.stopPropagation(),onMouseOver:()=>!chunk7T6VLIGJ_js.$("isTouchScreen")&&o(!0),onMouseLeave:()=>!chunk7T6VLIGJ_js.$("isTouchScreen")&&o(!1)}),e&&jsxRuntime.jsx(E,{className:"pl-left-0",title:"\u0635\u062F\u0627"})]})]})},Dt=vl;chunkSPUHJYDE_js.e();chunkSPUHJYDE_js.e();var Ot=react.forwardRef(({children:e,status:o,onClose:l,type:i,classNames:r,parentClassNames:p,styles:c,isBlurBackground:a,isFullHeight:d=!1,isHeader:m,isHasCatchUpLineOnTop:b=!1,animation:u,scrollbar:g=!1,isFocusOnInput:A=!1},B)=>{let[M,D]=react.useState(o),[_,Oe]=react.useState(0),[So,xo]=react.useState(0),{videoElementSizeInfo:Be}=chunk7T6VLIGJ_js.ba(({videoData:{videoElementSizeInfo:L}})=>({videoElementSizeInfo:L}),reactRedux.shallowEqual),ge=react.useRef(0);react.useEffect(()=>{let L;return o?D(!0):L=setTimeout(()=>{l(!1),Oe(0),D(!1);},500),()=>clearTimeout(L)},[o]);let yo=L=>{let wo=document.getElementById("popover-content");ge.current||(ge.current=window.innerHeight-Be.top-wo?.getBoundingClientRect().top),L.stopPropagation(),window.innerHeight-Be.top-L.touches[0].clientY<ge.current&&Oe(window.innerHeight-L.touches[0].clientY),xo(1000005);},bo=()=>{l();},qe=jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[a&&jsxRuntime.jsx("div",{className:`pl-bg-black/[0.5] pl-w-screen pl-h-screen pl-fixed pl-top-0 pl-right-0 animate__animated animate__faster ${o?"animate__fadeIn":"animate__fadeOut"}`,style:{zIndex:1000001}}),jsxRuntime.jsx("div",{className:`${i==="modal"&&"pl-fixed pl-top-0 pl-left-0 pl-flex pl-w-full pl-h-full pl-justify-center pl-items-end sm:pl-items-center"} ${p}`,style:{zIndex:d&&!A?So:1000004},children:jsxRuntime.jsx("div",{className:`pl-flex pl-flex-col pl-rounded-[8px] animate__animated animate__faster pl-bg-white/[0.9]
22
+ chunkSPUHJYDE_js.e();chunkSPUHJYDE_js.e();chunkSPUHJYDE_js.e();var Po=()=>{let{details:e,params:o}=chunkFP7YFRLU_js.ba(({videoData:{details:l,params:i}})=>({details:l,params:i}),reactRedux.shallowEqual);return jsxRuntime.jsx("div",{className:`pl-w-full pl-max-w-[80%] pl-truncate pl-text-left pl-ml-4 pl-text-[16px] pl-font-normal pl-text-white pl-break-words pl-self-start animate__animated animate__faster ${chunkFP7YFRLU_js.$("isActiveElements")?"animate__fadeIn pl-opacity-100":"pl-opacity-0 animate__fadeOut"}`,children:chunkFP7YFRLU_js.$("hasTitle")?e.title:o.id})},tt=Po;chunkSPUHJYDE_js.e();var Co=()=>jsxRuntime.jsxs("div",{className:`pl-relative animate__animated animate__faster ${chunkFP7YFRLU_js.$("isActiveElements")?"animate__fadeIn pl-pointer-events-auto":"animate__fadeOut pl-pointer-events-none"}`,children:[jsxRuntime.jsx(te__default.default,{src:chunkMJGU6VON_js.a.lock,alt:"lock-icon",width:20,height:20,onClick:()=>chunkVYQ6AKSK_js.h("unlock")}),!localStorage.getItem("unlock-click")&&jsxRuntime.jsx("p",{className:"pl-text-[10px] pl-text-black/[0.87] pl-bg-[#F7F7F7] pl-absolute pl-left-0 pl-px-4 pl-py-3 pl-rounded-[8px] pl-w-max",children:"\u0628\u0631\u0627\u06CC \u0628\u0627\u0632 \u06A9\u0631\u062F\u0646 \u0642\u0641\u0644\u060C \u06A9\u0644\u06CC\u06A9 \u06A9\u0646\u06CC\u062F"})]}),lt=Co;var Lo=()=>(chunkFP7YFRLU_js.ba(({controller:{lock:e,activeElements:o}})=>({lock:e,activeElements:o}),reactRedux.shallowEqual),jsxRuntime.jsxs("div",{className:`pl-flex pl-items-start pl-justify-end pl-mx-4 pl-mt-5 ${chunkFP7YFRLU_js.$("isTouchScreenPortrait")?"pl-h-[16px]":"pl-h-[60px]"}`,children:[chunkFP7YFRLU_js.$("showTitle")&&jsxRuntime.jsx(tt,{}),chunkFP7YFRLU_js.$("isLock")&&jsxRuntime.jsx(lt,{})]})),rt=Lo;chunkSPUHJYDE_js.e();chunkSPUHJYDE_js.e();var Mo=()=>(chunkFP7YFRLU_js.ba(({controller:{play:e}})=>({play:e}),reactRedux.shallowEqual),chunkFP7YFRLU_js.ba(({videoData:{videoElementSizeInfo:e,params:o}})=>({videoElementSizeInfo:e,params:o}),reactRedux.shallowEqual),jsxRuntime.jsx("div",{className:`${!chunkFP7YFRLU_js.$("isTouchScreen")&&"hover:pl-scale-125"} pl-transition-transform pl-ease-in-out pl-cursor-pointer`,onContextMenu:e=>e.preventDefault(),children:jsxRuntime.jsx(te__default.default,{alt:"",src:chunkFP7YFRLU_js.$("isPlay")?chunkMJGU6VON_js.a.bigPause:chunkMJGU6VON_js.a.bigPlay,width:40,height:40,onClick:e=>chunkVYQ6AKSK_js.a(e),onDoubleClick:e=>e.stopPropagation(),className:`${chunkFP7YFRLU_js.$("isPlay")?"pl-big-play-icon":"pl-big-pause-icon"}`})})),pt=Mo;chunkSPUHJYDE_js.e();var $o=()=>jsxRuntime.jsxs("div",{className:"loader-spinner pl-absolute pl-top-[50%] pl-left-[50%] pl-mt-[-50px] pl-ml-[-42px] pl-w-screen pl-h-full pl-overflow-hidden",children:[jsxRuntime.jsx("div",{className:"pl-bg-white"}),jsxRuntime.jsx("div",{className:"pl-bg-white"}),jsxRuntime.jsx("div",{className:"pl-bg-white"}),jsxRuntime.jsx("div",{className:"pl-bg-white"}),jsxRuntime.jsx("div",{className:"pl-bg-white"}),jsxRuntime.jsx("div",{className:"pl-bg-white"}),jsxRuntime.jsx("div",{className:"pl-bg-white"}),jsxRuntime.jsx("div",{className:"pl-bg-white"}),jsxRuntime.jsx("div",{className:"pl-bg-white"}),jsxRuntime.jsx("div",{className:"pl-bg-white"}),jsxRuntime.jsx("div",{className:"pl-bg-white"}),jsxRuntime.jsx("div",{className:"pl-bg-white"})]}),at=$o;var _o=()=>{let[e,o]=react.useState(!1),[l,i]=react.useState(!1);chunkFP7YFRLU_js.ba(({controller:{lock:c,firstPlay:a}})=>({lock:c,firstPlay:a}),reactRedux.shallowEqual);let{activeElements:r,isLoading:p}=chunkFP7YFRLU_js.ba(({controller:{activeElements:c,isLoading:a}})=>({activeElements:c,isLoading:a}),reactRedux.shallowEqual);return react.useEffect(()=>{let c=null;return chunkFP7YFRLU_js.$("isFirstPlay")||chunkFP7YFRLU_js.$("isActiveElements")?c=setTimeout(()=>i(!0),100):i(!1),()=>clearTimeout(c)},[r]),react.useEffect(()=>{let c;return chunkFP7YFRLU_js.$("isLoading")?c=setTimeout(()=>o(!0),chunkFP7YFRLU_js.$("isFirstPlay")?0:chunkESB3FO2C_js.b):o(!1),()=>{clearTimeout(c),o(!1);}},[p]),jsxRuntime.jsx("main",{className:"pl-flex-1 pl-mt-1",children:e?jsxRuntime.jsx(at,{}):jsxRuntime.jsx(jsxRuntime.Fragment,{children:l&&!chunkFP7YFRLU_js.$("isLock")&&jsxRuntime.jsx("div",{id:"main-content",className:`pl-h-full pl-flex pl-justify-center pl-items-center pl-text-center pl-relative ${chunkFP7YFRLU_js.$("isActiveElements")?"pl-pointer-events-auto":"pl-pointer-events-none"}`,children:jsxRuntime.jsxs("div",{className:"pl-flex pl-justify-center pl-gap-8 pl-items-center pl-w-max",style:{zIndex:3},children:[!chunkFP7YFRLU_js.$("isFirstPlay")&&jsxRuntime.jsx(chunkHT67MK6R_js.a,{type:"forward"}),jsxRuntime.jsx(pt,{}),!chunkFP7YFRLU_js.$("isFirstPlay")&&jsxRuntime.jsx(chunkHT67MK6R_js.a,{type:"backward"})]})})})})},ut=_o;chunkSPUHJYDE_js.e();chunkSPUHJYDE_js.e();chunkSPUHJYDE_js.e();chunkSPUHJYDE_js.e();var be=e=>{let{videoElementSizeInfo:o}=chunkFP7YFRLU_js.L.getState().videoData,{duration:l}=chunkFP7YFRLU_js.L.getState().controller,i=e.clientX!==void 0?e.clientX:e.touches[0].clientX;if(i<=o.right&&i>0)return (i-o.left)/o.width*l},X=e=>{let{videoElementSizeInfo:o}=chunkFP7YFRLU_js.L.getState().videoData,l=e.clientX!==void 0?e.clientX:e.touches[0].clientX;if(l<=o.right&&l>0)return l-o.left},j=e=>{e&&(e.style.opacity="0.0",e.style.pointerEvents="none",e.style.zIndex=-2);},qo=e=>{e.style.display="block",e.style.zIndex=5,e.style.opacity=chunkFP7YFRLU_js.L.getState().videoData.details.vtt?"1.0":"0.6",e.style.pointerEvents="auto",e.style.transition="opacity 1s ease-out";},zo=(e,o)=>{let{videoElementSizeInfo:l}=chunkFP7YFRLU_js.L.getState().videoData,i=document.getElementsByClassName("pl-progressTooltip")[0],r=document.getElementById("parent-player");i&&r&&(X(e)>i.getBoundingClientRect().width/2&&X(e)<l.right-l.left-i.getBoundingClientRect().width/2?o.style.left=`${X(e)-i.offsetWidth/2}px`:X(e)<(r.offsetLeft===0?i.offsetWidth:r.offsetLeft)?o.style.left="0px":chunkFP7YFRLU_js.ca().offsetLeft+chunkFP7YFRLU_js.ca().offsetWidth<X(e)+i.offsetWidth&&(o.style.left=`${chunkFP7YFRLU_js.ca().offsetWidth-i.offsetWidth}px`));},Xo=(e,o,l)=>{o&&qo(o),chunkFP7YFRLU_js.L.getState().videoData.details.vtt?zo(e,o):o.style.left=`${X(e)-30}px`,chunkFP7YFRLU_js.L.dispatch(chunkFP7YFRLU_js.q(Number(be(e)))),l.textContent=`${chunkFP7YFRLU_js.O(be(e))}`;},we=(e,o=!1)=>{let{videoElementSizeInfo:l}=chunkFP7YFRLU_js.L.getState().videoData,i=document.querySelector(".pl-progressTooltip"),r=document.querySelector(".pl-progressTimeTooltip"),p=e.clientX!==void 0?e.clientX:e.touches[0].clientX;i&&r&&p<=l.right&&p>l.left?(Xo(e,i,r),o&&setTimeout(()=>j(i),2e3)):j(i);},ht=e=>{let o=e.clientX!==void 0?e.clientX:e.touches[0].clientX;chunkFP7YFRLU_js.ea()&&(o<=e.view.innerWidth&&o>0?chunkFP7YFRLU_js.ea().style.width=`${X(e)}px`:o<=e.view.innerWidth?chunkFP7YFRLU_js.ea().style.width=0:o>0&&(chunkFP7YFRLU_js.ea().style.width="100%"));},vt=(e,o,l)=>{e.preventDefault(),e.stopPropagation(),l(!0);let i=chunkFP7YFRLU_js.L.dispatch,r=e.clientX!==void 0?e.clientX:e.touches[0].clientX;r<=e.view.innerWidth&&r>0&&(i(chunkFP7YFRLU_js.k(!0)),i(chunkFP7YFRLU_js.l(!0)),sessionStorage.setItem("previousVideoTime",String(chunkFP7YFRLU_js.ca().currentTime)),e.target.setPointerCapture(e.pointerId),o.length>0&&o.map(p=>clearTimeout(p)));},Te=e=>{e.preventDefault(),e.stopPropagation();let o=chunkFP7YFRLU_js.L.dispatch,{activePointerProgressBar:l}=chunkFP7YFRLU_js.L.getState().controller,{left:i}=chunkFP7YFRLU_js.L.getState().videoData.videoElementSizeInfo,r=e.clientX!==void 0?e.clientX:e.touches[0].clientX,p=document.querySelector(".pl-progressTooltip");r>i?(p&&(p.style.display="block !important",p.style.pointerEvents="auto"),l&&(o(chunkFP7YFRLU_js.l(!0)),we(e),ht(e),chunkFP7YFRLU_js.ca().pause())):p&&(p.style.display="none !important",p.style.pointerEvents="none");},gt=(e,o,l,i)=>{i(!1),e.preventDefault(),e.stopPropagation();let r=chunkFP7YFRLU_js.L.dispatch,{duration:p}=chunkFP7YFRLU_js.L.getState().controller,{left:c,right:a}=chunkFP7YFRLU_js.L.getState().videoData.videoElementSizeInfo;e.target.removeEventListener("pointermove",Te);let d=e.clientX!==void 0?e.clientX:e.touches[0].clientX,m=0;d>c&&d<a?m=be(e):d<c?m=0:d>0&&(m=p),chunkFP7YFRLU_js.$("isStaticFormat")||chunkVYQ6AKSK_js.i(chunkFP7YFRLU_js.ca().currentTime,m),chunkFP7YFRLU_js.ca().currentTime=m,chunkFP7YFRLU_js.L.getState().controller.activePointerProgressBar&&(r(chunkFP7YFRLU_js.k(!1)),r(chunkFP7YFRLU_js.l(!1)),chunkFP7YFRLU_js.ca().play(),we(e,!0),sessionStorage.setItem("current-time",String(m)),ht(e),Ro(e,r,o,l));},Ro=(e,o,l,i)=>{let r=i,p=setTimeout(()=>{let{settingPopover:c}=chunkFP7YFRLU_js.L.getState().popovers,{delayTurnOffControlbar:a}=chunkFP7YFRLU_js.L.getState().controller;e.pointerType==="touch"&&!c&&a&&o(chunkFP7YFRLU_js.f(!1));},chunkESB3FO2C_js.a);r.push(p),l(r);},St=()=>{let e=Date.now();chunkFP7YFRLU_js.ca().play().then(()=>chunkFP7YFRLU_js.xa(chunkFP7YFRLU_js.ka(Date.now()-e)));},xt=e=>we(e),yt=()=>{let e=document.querySelector(".pl-progressTooltip");j(e);},Ho=e=>{let o=e.split("."),i=o[0].split(":");return {milliseconds:parseInt(o[1],10)||0,seconds:parseInt(i.pop(),10)||0,minutes:parseInt(i.pop(),10)||0,hours:parseInt(i.pop(),10)||0}},ft=e=>{let o=Ho(e);return parseInt(o.hours*(60*60)+o.minutes*60+o.seconds+o.milliseconds/1e3,10)},Vo=e=>{let o=e.split(/#xywh=/i),l=o[0],r=o[1].match(/[0-9]+/gi);return {x:r[0],y:r[1],w:r[2],h:r[3],image:l}},Uo=(e,o)=>e.indexOf("//")>=0?e:o.indexOf("//")===0?[o.replace(/\/$/gi,""),e.trim()].join("/"):o.indexOf("//")>0?[o.trim(),e.trim()].join("/"):e,Qo=(e,o)=>{let l={},i=o.split(/\/\w+\.vtt\s?/)[0];if(e=Uo(e,i),!e.match(/#xywh=/i))return l.background='url("'+e+o.split(/\/\w+\.vtt\s?/)[1]+'")',l;let r=Vo(e);return l.background='url("'+r.image+o.split(/\/\w+\.vtt\s?/)[1]+'") no-repeat -'+r.x+"px -"+r.y+"px",l.width=r.w+"px",l.height=r.h+"px",l.url=r.image,l},bt=(e,o)=>{fetch(e).then(l=>{if(!l.ok)throw chunkFP7YFRLU_js.L.dispatch(chunkFP7YFRLU_js.r({...chunkFP7YFRLU_js.L.getState().videoData.details,vtt:void 0,vtt_mobile:void 0})),new Error("Network response was not ok");return l.text()}).then(l=>{let i=[];l.split(/[\r\n][\r\n]/i).forEach(p=>{if(p.match(/([0-9]{2}:)?([0-9]{2}:)?[0-9]{2}(.[0-9]{3})?( ?--> ?)([0-9]{2}:)?([0-9]{2}:)?[0-9]{2}(.[0-9]{3}).*/gi)){let c=p.split(/[\r\n]/i),d=c[0].split(/ ?--> ?/i),m=d[0],b=d[1],u=c[1],g=Qo(u,e);i.push({start:ft(m),end:ft(b),css:g});}}),o(i);}).catch(l=>{console.error("Error fetching file:",l);});},wt=(e,o,l)=>{for(let i=0;i<o.length;++i){let r=o[i];if(e>=r.start&&e<r.end){if(r.css.url&&!l[r.css.url]){let p={background:r.css.background,width:r.css.width,height:r.css.height};return l[r.css.url]=p,p}else if(r.css.url)return l[r.css.url]}}};var Go=()=>{let{details:e}=chunkFP7YFRLU_js.ba(({videoData:{details:a}})=>({details:a}),reactRedux.shallowEqual),{tooltipTime:o}=chunkFP7YFRLU_js.ba(({controller:{tooltipTime:a,activeElements:d,isFullScreen:m}})=>({tooltipTime:a,activeElements:d,isFullScreen:m}),reactRedux.shallowEqual),l={},[i,r]=react.useState(void 0),[p,c]=react.useState(chunkFP7YFRLU_js.$("isTouchScreen")?e.vtt_mobile:e.vtt);return react.useEffect(()=>{c(e.vtt_mobile);},[e.vtt_mobile]),react.useEffect(()=>{p&&bt(e.vtt_mobile,r);},[p]),chunkFP7YFRLU_js.$("isActiveElements")?jsxRuntime.jsxs("div",{className:`pl-flex pl-flex-col pl-progressTooltip pl-absolute pl-bottom-[calc(100%+10px)] pl-px-[10px] pl-pt-[5px] pl-mr-[-25px] pl-text-white pl-text-[14px] ${p&&i?"":"pl-bg-z-gray-700"} pl-rounded-[6px] pl-opacity-0`,children:[p&&!!i&&jsxRuntime.jsx("div",{className:"pl-flex-1 pl-border pl-border-white pl-rounded-[8px] pl-mb-2",children:jsxRuntime.jsx("div",{className:"pl-rounded-[8px]",style:wt(o,i,l)})}),jsxRuntime.jsx("div",{className:"pl-flex pl-items-center pl-justify-center pl-progressTimeTooltip pl-text-white !pl-opacity-100"})]}):jsxRuntime.jsx(jsxRuntime.Fragment,{})},Nt=react.memo(Go);var Ko=()=>{let[e,o]=react.useState(!1);react.useEffect(()=>{j(document.querySelector(".progressTooltip"));},[]);let{duration:l,currentTime:i,bufferedTimeWidth:r}=chunkFP7YFRLU_js.ba(({controller:{duration:a,currentTime:d,bufferedTimeWidth:m}})=>({duration:a,currentTime:d,bufferedTimeWidth:m}),reactRedux.shallowEqual);chunkFP7YFRLU_js.ba(({videoData:{params:a,videoElementSizeInfo:d}})=>({params:a,videoElementSizeInfo:d}),reactRedux.shallowEqual);let[p,c]=react.useState([]);return jsxRuntime.jsxs("div",{className:`${chunkFP7YFRLU_js.$("isTouchScreenPortrait")?"pl-order-1":"pl-order-none"} pl-relative`,children:[jsxRuntime.jsx("div",{className:"pl-relative",children:jsxRuntime.jsx(Nt,{})}),jsxRuntime.jsx("div",{className:"pl-w-full pl-flex pl-items-end",onPointerDown:a=>vt(a,p,o),onPointerMove:Te,onPointerUp:a=>gt(a,c,p,o),onMouseMove:xt,onMouseOut:yt,onClick:St,onDoubleClick:a=>a.stopPropagation(),children:jsxRuntime.jsxs("div",{id:"progress-area",className:"pl-w-full pl-absolute",children:[jsxRuntime.jsx("div",{className:"pl-w-full pl-h-[40px]"}),jsxRuntime.jsxs("div",{id:"time-progress-area",className:"!pl-w-full !pl-h-[5px] pl-transition-transform pl-duration-300 pl-m-auto pl-cursor-pointer !pl-bg-gray-highLight pl-rounded",style:{transform:e?"scaleY(1.8)":"unset"},children:[jsxRuntime.jsx("div",{id:"time-progress-buffer",className:"pl-absolute pl-h-[5px] pl-bg-z-gray-400/[0.7] pl-rounded",style:{width:`${r}%`}}),jsxRuntime.jsx("div",{id:"time-progress-bar",className:`pl-h-[5px] pl-rounded pl-relative pl-cursor-pointer pl-bg-primary before:pl-bg-primary before:pl-inline-block before:pl-w-4 before:pl-h-4 ${e&&"before:pl-w-7 before:pl-h-3"}`,style:{width:`${i/l*chunkFP7YFRLU_js.fa()}px`}})]})]})})]})},kt=Ko;chunkSPUHJYDE_js.e();chunkSPUHJYDE_js.e();chunkSPUHJYDE_js.e();var jo=({title:e,className:o})=>jsxRuntime.jsx("span",{className:`pl-absolute pl-w-max pl-bg-paper pl-text-white/[0.9] ${chunkFP7YFRLU_js.$("isFullScreen")?"pl-bottom-[300%]":"pl-bottom-[270%]"} pl-rounded-[8px] pl-text-[10px] pl-px-4 pl-py-[13px] pl-font-normal ${o}`,children:e}),E=jo;var rl=()=>{let{isFullScreen:e}=chunkFP7YFRLU_js.ba(({controller:{firstPlay:r,isFullScreen:p}})=>({firstPlay:r,isFullScreen:p}),reactRedux.shallowEqual),[o,l]=react.useState(!1),i=chunkFP7YFRLU_js.aa();return react.useEffect(()=>{chunkFP7YFRLU_js.$("isFirstPlay")||i(chunkFP7YFRLU_js.f(!1));},[e]),jsxRuntime.jsxs("div",{className:"pl-relative pl-flex pl-items-center",children:[jsxRuntime.jsx(te__default.default,{src:chunkFP7YFRLU_js.$("isFullScreen")?chunkMJGU6VON_js.a.nonFullScreen:chunkMJGU6VON_js.a.fullScreen,alt:"fullScreen-icon",className:"pl-cursor-pointer",width:20,height:20,onMouseOver:()=>!chunkFP7YFRLU_js.$("isTouchScreen")&&l(!0),onMouseLeave:()=>!chunkFP7YFRLU_js.$("isTouchScreen")&&l(!1),onClick:()=>{chunkVYQ6AKSK_js.f(),chunkVYQ6AKSK_js.g();}}),o&&jsxRuntime.jsx(E,{title:`${chunkFP7YFRLU_js.$("isFullScreen")?"\u062E\u0631\u0648\u062C \u0627\u0632":""} \u062A\u0645\u0627\u0645 \u0635\u0641\u062D\u0647`})]})},Ft=rl;chunkSPUHJYDE_js.e();var cl=()=>{let[e,o]=react.useState(!1),l=chunkFP7YFRLU_js.aa(),{params:i,details:r}=chunkFP7YFRLU_js.ba(({videoData:{params:p,details:c}})=>({params:p,details:c}),reactRedux.shallowEqual);return jsxRuntime.jsxs("div",{className:"pl-relative pl-flex pl-items-center",children:[jsxRuntime.jsx(te__default.default,{alt:"",onMouseOver:()=>!chunkFP7YFRLU_js.$("isTouchScreen")&&o(!0),onMouseLeave:()=>!chunkFP7YFRLU_js.$("isTouchScreen")&&o(!1),src:chunkMJGU6VON_js.a.pictureInPicture,width:20,height:20,className:"pl-flex pl-cursor-pointer",onClick:()=>{console.log(i.id),i.onClickMiniPlayerIcon&&(localStorage.removeItem("close-miniPlayer"),chunkFP7YFRLU_js.ca().pause(),l(chunkFP7YFRLU_js.a(!1)),i.onClickMiniPlayerIcon({video:r||void 0,id:i.type==="vod"?i.id:window.btoa(i.id),type:i.type,currentTime:chunkFP7YFRLU_js.ca().currentTime}));}}),e&&jsxRuntime.jsx(E,{title:"\u062A\u0635\u0648\u06CC\u0631 \u062F\u0631 \u062A\u0635\u0648\u06CC\u0631"})]})},Mt=cl;chunkSPUHJYDE_js.e();var vl=()=>{let[e,o]=react.useState(!1),l=chunkFP7YFRLU_js.aa(),{settings:i}=chunkFP7YFRLU_js.ba(({user:{settings:a}})=>({settings:a}),reactRedux.shallowEqual),r=react.useRef(i.volume),p=()=>{if(r.current!==i.volume){let{settings:a}=chunkFP7YFRLU_js.L.getState().user;chunkFP7YFRLU_js.xa(chunkFP7YFRLU_js.oa(r.current,a.volume)),r.current=a.volume,l(chunkFP7YFRLU_js.F({...a,volume:a.volume}));}},c=a=>{let{settings:d}=chunkFP7YFRLU_js.L.getState().user;a==="mute"?(chunkVYQ6AKSK_js.d(0),chunkFP7YFRLU_js.xa(chunkFP7YFRLU_js.oa(d.volume,0))):(chunkFP7YFRLU_js.xa(chunkFP7YFRLU_js.oa(d.volume,100)),chunkVYQ6AKSK_js.d(100));};return jsxRuntime.jsxs("div",{className:"pl-relative pl-inline-flex pl-items-center pl-gap-2 pl-sound-icon",children:[!chunkFP7YFRLU_js.$("isTouchScreen")&&jsxRuntime.jsx("input",{onMouseUp:p,type:"range",min:"0",max:"100",value:i.volume,onChange:a=>chunkVYQ6AKSK_js.d(+a.target.value),className:"pl-soundVolume pl-cursor-pointer rounded-full",style:{background:`linear-gradient(to right, white ${i.volume}%, rgba(255,255,255,0.3) 0)`}}),jsxRuntime.jsxs("div",{className:"pl-relative pl-flex pl-items-center",children:[jsxRuntime.jsx(te__default.default,{src:chunkFP7YFRLU_js.$("hasSound")?chunkMJGU6VON_js.a.unMute:chunkMJGU6VON_js.a.mute,alt:chunkFP7YFRLU_js.$("hasSound")?"unmute-icon":"mute-icon",className:"pl-flex pl-items-center pl-cursor-pointer",width:20,height:20,onClick:()=>chunkFP7YFRLU_js.$("hasSound")?c("mute"):c("unmute"),onDoubleClick:a=>a.stopPropagation(),onMouseOver:()=>!chunkFP7YFRLU_js.$("isTouchScreen")&&o(!0),onMouseLeave:()=>!chunkFP7YFRLU_js.$("isTouchScreen")&&o(!1)}),e&&jsxRuntime.jsx(E,{className:"pl-left-0",title:"\u0635\u062F\u0627"})]})]})},Dt=vl;chunkSPUHJYDE_js.e();chunkSPUHJYDE_js.e();var Ot=react.forwardRef(({children:e,status:o,onClose:l,type:i,classNames:r,parentClassNames:p,styles:c,isBlurBackground:a,isFullHeight:d=!1,isHeader:m,isHasCatchUpLineOnTop:b=!1,animation:u,scrollbar:g=!1,isFocusOnInput:A=!1},B)=>{let[M,D]=react.useState(o),[_,Oe]=react.useState(0),[So,xo]=react.useState(0),{videoElementSizeInfo:Be}=chunkFP7YFRLU_js.ba(({videoData:{videoElementSizeInfo:L}})=>({videoElementSizeInfo:L}),reactRedux.shallowEqual),ge=react.useRef(0);react.useEffect(()=>{let L;return o?D(!0):L=setTimeout(()=>{l(!1),Oe(0),D(!1);},500),()=>clearTimeout(L)},[o]);let yo=L=>{let wo=document.getElementById("popover-content");ge.current||(ge.current=window.innerHeight-Be.top-wo?.getBoundingClientRect().top),L.stopPropagation(),window.innerHeight-Be.top-L.touches[0].clientY<ge.current&&Oe(window.innerHeight-L.touches[0].clientY),xo(1000005);},bo=()=>{l();},qe=jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[a&&jsxRuntime.jsx("div",{className:`pl-bg-black/[0.5] pl-w-screen pl-h-screen pl-fixed pl-top-0 pl-right-0 animate__animated animate__faster ${o?"animate__fadeIn":"animate__fadeOut"}`,style:{zIndex:1000001}}),jsxRuntime.jsx("div",{className:`${i==="modal"&&"pl-fixed pl-top-0 pl-left-0 pl-flex pl-w-full pl-h-full pl-justify-center pl-items-end sm:pl-items-center"} ${p}`,style:{zIndex:d&&!A?So:1000004},children:jsxRuntime.jsx("div",{className:`pl-flex pl-flex-col pl-rounded-[8px] animate__animated animate__faster pl-bg-white/[0.9]
23
23
  ${d&&"pl-h-full"}
24
24
  ${u||(window.innerWidth>768&&i==="modal"?o?"animate__fadeIn":"animate__fadeOut":o?"animate__fadeInUp":"animate__fadeOutDown")}
25
- ${chunk7T6VLIGJ_js.$("isTouchScreenPortrait")?"!pl-fixed !pl-right-0 !pl-left-0 !pl-bottom-0 !pl-w-full !pl-mb-0 pl-rounded-[12px] !pl-rounded-b-none !pl-bg-white":"before:pl-hidden"}
25
+ ${chunkFP7YFRLU_js.$("isTouchScreenPortrait")?"!pl-fixed !pl-right-0 !pl-left-0 !pl-bottom-0 !pl-w-full !pl-mb-0 pl-rounded-[12px] !pl-rounded-b-none !pl-bg-white":"before:pl-hidden"}
26
26
  ${i!=="modal"&&"pl-absolute pl-bottom-[130%] pl-overflow-auto no-scrollbar"}
27
27
  ${r}
28
- `,style:{height:_||"max-content",maxHeight:"80vh",zIndex:1000004,...c},ref:B,id:"popover-content",children:jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[m&&jsxRuntime.jsx("div",{onTouchMove:b?yo:()=>{},onTouchEndCapture:b?bo:()=>{},className:"pl-py-4",children:b&&jsxRuntime.jsx("div",{className:"pl-absolute pl-top-[10px] pl-right-[50%] pl-mr-[-25px] pl-text-center pl-w-8 pl-h-1 pl-rounded-[20px] pl-bg-gray-highLight"})}),jsxRuntime.jsx("div",{className:`pl-overflow-y-auto pl-h-full pl-w-full ${!g&&"no-scrollbar"}`,onTouchMove:L=>L.stopPropagation(),children:e})]})})})]});return jsxRuntime.jsx(jsxRuntime.Fragment,{children:M&&jsxRuntime.jsx(jsxRuntime.Fragment,{children:i==="modal"?reactDom.createPortal(jsxRuntime.jsx(jsxRuntime.Fragment,{children:qe}),document.getElementById("dialog-react-root-videoPlayer")):jsxRuntime.jsx("div",{children:qe})})})});Ot.displayName="popover";var Q=Ot;chunkSPUHJYDE_js.e();chunkSPUHJYDE_js.e();var Tl=(e,o)=>{react.useEffect(()=>{let l=i=>{!e.current||e.current.contains(i.target)||o(i);};return document.addEventListener("mousedown",l),document.addEventListener("touchstart",l),()=>{document.removeEventListener("mousedown",l),document.removeEventListener("touchstart",l);}},[e,o]);},W=Tl;var Cl=({setSection:e,showQualityLevelsIcon:o})=>{let l=chunk7T6VLIGJ_js.aa(),{qualityLevels:i}=chunk7T6VLIGJ_js.ba(({controller:{qualityLevels:u,manualQuality:g,autoQuality:A}})=>({qualityLevels:u,manualQuality:g,autoQuality:A}),reactRedux.shallowEqual),{settings:r}=chunk7T6VLIGJ_js.ba(({user:{settings:u}})=>({settings:u}),reactRedux.shallowEqual),{qualityLevelsPopover:p}=chunk7T6VLIGJ_js.ba(({popovers:{qualityLevelsPopover:u}})=>({qualityLevelsPopover:u}),reactRedux.shallowEqual);chunk7T6VLIGJ_js.ba(({videoData:{params:u,videoElementSizeInfo:g}})=>({params:u,videoElementSizeInfo:g}),reactRedux.shallowEqual);let[c,a]=react.useState(!1);i=[-1,...i];let d=(u,g)=>chunk7T6VLIGJ_js.$("isAutoQuality")&&g===-1?!0:!chunk7T6VLIGJ_js.$("isAutoQuality")&&r.quality===u,m=react.useRef(null);W(m,()=>l(chunk7T6VLIGJ_js.D(!1)));let b=jsxRuntime.jsx("div",{id:"qualityLevels",className:"animate__animated animate__fadeIn pl-py-2",children:jsxRuntime.jsx("ul",{className:"pl-flex pl-flex-col pl-gap-2",children:i.map((u,g)=>jsxRuntime.jsxs("li",{className:`pl-flex pl-items-center pl-ps-[24.2px] pl-text-[14px] pl-font-medium pl-rounded-[4px] pl-relative pl-cursor-pointer ${d(g-1,u)&&"pl-bg-primary/[0.12] !pl-cursor-default"} ${chunk7T6VLIGJ_js.$("isTouchScreen")?"pl-py-[13.5px]":"pl-py-[9.5px]"}`,onClick:d(g-1,u)?()=>{}:()=>{chunk7T6VLIGJ_js.xa(chunk7T6VLIGJ_js.ja(u===-1?"auto":`${u}P`)),l(chunk7T6VLIGJ_js.f(!1)),l(chunk7T6VLIGJ_js.B(!1)),l(chunk7T6VLIGJ_js.D(!1)),l(chunk7T6VLIGJ_js.F({...r,quality:u===-1?-1:g-1})),e&&e("main");},children:[!chunk7T6VLIGJ_js.$("isTouchScreen")&&d(g-1,u)&&jsxRuntime.jsx("div",{className:"pl-absolute pl-right-[11.8px]",children:jsxRuntime.jsx(te__default.default,{src:chunkMJGU6VON_js.a.tick,alt:"",width:12,height:9})}),chunk7T6VLIGJ_js.$("isTouchScreen")&&jsxRuntime.jsx("div",{className:`pl-w-5 pl-h-5 pl-rounded-full pl-border pl-border-black/[0.5] pl-p-0.5 ${d(g-1,u)&&"pl-border-primary"}`,children:d(g-1,u)&&jsxRuntime.jsx("div",{className:"pl-w-full pl-h-full pl-rounded-full pl-bg-primary"})}),jsxRuntime.jsx("span",{className:`pl-w-full pl-text-[14px] pl-text-black/[0.87] ${chunk7T6VLIGJ_js.$("isTouchScreen")?"pl-pr-[21px]":"pl-pr-[10px]"}`,children:u===-1?jsxRuntime.jsxs("span",{children:[jsxRuntime.jsx("span",{children:"\u062E\u0648\u062F\u06A9\u0627\u0631 "}),jsxRuntime.jsx("span",{className:"pl-text-[10px] pl-font-normal pl-text-black/[0.5]",children:"(\u0628\u0631 \u0627\u0633\u0627\u0633 \u0633\u0631\u0639\u062A \u0627\u06CC\u0646\u062A\u0631\u0646\u062A \u0634\u0645\u0627)"})]}):`${u}p`})]},g))})});return jsxRuntime.jsx(jsxRuntime.Fragment,{children:o?jsxRuntime.jsxs("div",{className:"pl-relative pl-flex pl-items-center",ref:m,children:[jsxRuntime.jsx(te__default.default,{src:chunkMJGU6VON_js.a.qualitySetting1,alt:"speed-icon",width:20,height:20,onClick:()=>l(chunk7T6VLIGJ_js.D(!p)),onMouseOver:()=>!chunk7T6VLIGJ_js.$("isTouchScreen")&&!chunk7T6VLIGJ_js.$("showQualityLevelsPopover")&&a(!0),onMouseLeave:()=>!chunk7T6VLIGJ_js.$("isTouchScreen")&&a(!1),className:"pl-cursor-pointer"}),c&&jsxRuntime.jsx(E,{title:"\u06A9\u06CC\u0641\u06CC\u062A"}),jsxRuntime.jsx(Q,{classNames:`!pl-p-0 pl-overflow-hidden !pl-bg-white ${chunk7T6VLIGJ_js.$("isTouchScreen")?"!pl-fixed !pl-bottom-0 !pl-rounded-t-[20px] pl-rounded-b-none":"pl-right-0 pl-mb-[33px] !pl-rounded-[12px] pl-w-[230px]"} ${chunk7T6VLIGJ_js.$("isTouchScreenPortrait")&&"!pl-w-screen tablet:pl-max-w-[440px]"} ${chunk7T6VLIGJ_js.$("isTouchScreenLandscape")&&"pl-w-full pl-max-w-[440px]"}`,status:p,onClose:()=>l(chunk7T6VLIGJ_js.D(!1)),type:chunk7T6VLIGJ_js.$("isTouchScreen")?"modal":"popover",isBlurBackground:chunk7T6VLIGJ_js.$("isTouchScreenPortrait"),ref:chunk7T6VLIGJ_js.$("isTouchScreenPortrait")?m:void 0,isHeader:chunk7T6VLIGJ_js.$("isTouchScreen"),customHeader:jsxRuntime.jsx(jsxRuntime.Fragment,{}),isHasCatchUpLineOnTop:chunk7T6VLIGJ_js.$("isTouchScreen"),children:b})]}):jsxRuntime.jsx(jsxRuntime.Fragment,{children:b})})},de=react.memo(Cl);chunkSPUHJYDE_js.e();chunkSPUHJYDE_js.e();var Il=({className:e,onClick:o,onMouseOver:l,onMouseLeave:i})=>jsxRuntime.jsxs("svg",{width:"18",height:"15",viewBox:"0 0 18 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:e,onClick:o,onMouseOver:l,onMouseLeave:i,children:[jsxRuntime.jsx("path",{d:"M10.5488 1.53559C8.20532 1.02852 5.66339 1.68608 3.84359 3.50588C1.15649 6.19298 1.00481 10.4572 3.39041 13.3215C3.55135 13.5148 3.8176 13.6347 4.13036 13.6347H13.8687C14.1816 13.6347 14.4476 13.5149 14.6085 13.3217C16.0815 11.5533 16.5884 9.25027 16.1258 7.11249C16.0528 6.77512 16.2671 6.44245 16.6045 6.36945C16.9418 6.29645 17.2745 6.51077 17.3475 6.84814C17.8886 9.34866 17.2968 12.0474 15.569 14.1217C15.1326 14.6455 14.489 14.8847 13.8687 14.8847H4.13036C3.50995 14.8847 2.86616 14.6453 2.42991 14.1215C-0.36559 10.765 -0.188583 5.77029 2.95971 2.622C5.09241 0.489299 8.07189 -0.279272 10.8132 0.31386C11.1505 0.386857 11.3648 0.719527 11.2918 1.0569C11.2188 1.39427 10.8862 1.60859 10.5488 1.53559Z"}),jsxRuntime.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M14.9976 2.66523C15.2417 2.9093 15.2417 3.30503 14.9976 3.54911L10.7129 7.83399C10.8469 8.09798 10.9225 8.39667 10.9225 8.713C10.9225 9.78688 10.0519 10.6574 8.97805 10.6574C7.90417 10.6574 7.03362 9.78688 7.03362 8.713C7.03362 7.63912 7.90417 6.76856 8.97805 6.76856C9.27953 6.76856 9.56498 6.83718 9.81965 6.95963C9.82222 6.95697 9.82483 6.95432 9.82746 6.95168L14.1137 2.66525C14.3578 2.42116 14.7535 2.42115 14.9976 2.66523ZM9.67249 8.713C9.67249 9.09652 9.36158 9.40743 8.97805 9.40743C8.59453 9.40743 8.28362 9.09652 8.28362 8.713C8.28362 8.32947 8.59453 8.01856 8.97805 8.01856C9.36158 8.01856 9.67249 8.32947 9.67249 8.713Z"})]}),ue=Il;var $l=[.5,.75,1,1.25,1.5,1.75,2],Dl=({setSection:e,showSpeedIcon:o})=>{let l=chunk7T6VLIGJ_js.aa();chunk7T6VLIGJ_js.ba(({videoData:{videoElementSizeInfo:m,params:b}})=>({videoElementSizeInfo:m,params:b}),reactRedux.shallowEqual);let{speedPopover:i}=chunk7T6VLIGJ_js.ba(({popovers:{speedPopover:m}})=>({speedPopover:m}),reactRedux.shallowEqual),{settings:r}=chunk7T6VLIGJ_js.ba(({user:{settings:m}})=>({settings:m}),reactRedux.shallowEqual),p=react.useRef(null),[c,a]=react.useState(!1);W(p,()=>l(chunk7T6VLIGJ_js.C(!1))),react.useEffect(()=>{chunk7T6VLIGJ_js.ca()&&(chunk7T6VLIGJ_js.ca().playbackRate=r.speed);},[]);let d=jsxRuntime.jsx("div",{id:"speed",className:"animate__animated animate__fadeIn pl-py-2",children:jsxRuntime.jsx("ul",{className:"pl-flex pl-flex-col pl-gap-2",children:$l.map((m,b)=>jsxRuntime.jsxs("li",{className:`pl-flex pl-items-center pl-ps-[24.2px] pl-text-[14px] pl-font-medium pl-rounded-[4px] pl-relative pl-cursor-pointer ${r.speed===m&&"pl-bg-primary/[0.12] !pl-cursor-default"} ${chunk7T6VLIGJ_js.$("isTouchScreen")?"pl-py-[13.5px]":"pl-py-[9.5px]"}`,onClick:r.speed===m?()=>{}:()=>{chunk7T6VLIGJ_js.$("isStaticFormat")||chunk7T6VLIGJ_js.xa(chunk7T6VLIGJ_js.ia(m)),l(chunk7T6VLIGJ_js.f(!1)),l(chunk7T6VLIGJ_js.B(!1)),l(chunk7T6VLIGJ_js.C(!1)),l(chunk7T6VLIGJ_js.F({...r,speed:m})),chunk7T6VLIGJ_js.ca().playbackRate=m,e&&e("main");},children:[!chunk7T6VLIGJ_js.$("isTouchScreen")&&r.speed===m&&jsxRuntime.jsx("div",{className:"pl-absolute pl-right-[11.8px]",children:jsxRuntime.jsx(te__default.default,{src:chunkMJGU6VON_js.a.tick,alt:"",width:12,height:9})}),chunk7T6VLIGJ_js.$("isTouchScreen")&&jsxRuntime.jsx("div",{className:`pl-w-5 pl-h-5 pl-rounded-full pl-border pl-border-black/[0.5] pl-p-0.5 ${r.speed===m&&"pl-border-primary"}`,children:r.speed===m&&jsxRuntime.jsx("div",{className:"pl-w-full pl-h-full pl-rounded-full pl-bg-primary"})}),jsxRuntime.jsx("p",{className:`pl-w-full pl-flex pl-items-center pl-gap-2 pl-text-black/[0.87] ${chunk7T6VLIGJ_js.$("isTouchScreen")?"pl-pr-[21px]":"pl-pr-[10px]"}`,children:m})]},b))})});return jsxRuntime.jsx(jsxRuntime.Fragment,{children:o?jsxRuntime.jsxs("div",{className:"pl-relative pl-flex pl-items-center",ref:p,children:[jsxRuntime.jsx(ue,{className:"pl-size-5 pl-cursor-pointer size-5 pl-fill-white",onClick:()=>l(chunk7T6VLIGJ_js.C(!i)),onMouseOver:()=>!chunk7T6VLIGJ_js.$("isTouchScreen")&&!chunk7T6VLIGJ_js.$("showSpeedPopover")&&a(!0),onMouseLeave:()=>!chunk7T6VLIGJ_js.$("isTouchScreen")&&a(!1)}),c&&jsxRuntime.jsx(E,{title:"\u0633\u0631\u0639\u062A"}),jsxRuntime.jsx(Q,{classNames:`!pl-p-0 pl-overflow-hidden !pl-bg-white ${chunk7T6VLIGJ_js.$("isTouchScreen")?"!pl-fixed !pl-bottom-0 !pl-rounded-t-[20px] pl-rounded-b-none":"!pl-w-[230px] pl-right-0 pl-mb-[33px] !pl-rounded-[12px]"} ${chunk7T6VLIGJ_js.$("isTouchScreenPortrait")&&"!pl-w-screen tablet:!pl-max-w-[440px] tablet:!pl-mx-auto"} ${chunk7T6VLIGJ_js.$("isTouchScreenLandscape")&&"pl-w-full pl-max-w-[440px]"}`,status:i,onClose:()=>l(chunk7T6VLIGJ_js.C(!1)),type:chunk7T6VLIGJ_js.$("isTouchScreen")?"modal":"popover",isBlurBackground:chunk7T6VLIGJ_js.$("isTouchScreenPortrait"),ref:chunk7T6VLIGJ_js.$("isTouchScreenPortrait")?p:void 0,isHeader:chunk7T6VLIGJ_js.$("isTouchScreen"),customHeader:jsxRuntime.jsx(jsxRuntime.Fragment,{}),isHasCatchUpLineOnTop:chunk7T6VLIGJ_js.$("isTouchScreen"),children:d})]}):jsxRuntime.jsx(jsxRuntime.Fragment,{children:d})})},fe=Dl;chunkSPUHJYDE_js.e();var _l=({enabled:e,setEnabled:o})=>jsxRuntime.jsx("div",{className:`pl-relative pl-h-[22px] pl-w-[37px] pl-cursor-pointer pl-rounded-[15px] pl-transition-colors pl-duration-150 pl-ease-linear ${e?"pl-bg-primary pl-border pl-border-transparent":"pl-bg-secondary-200 pl-border pl-border-gray-highLight"}`,onClick:o,children:jsxRuntime.jsx("div",{className:`pl-absolute pl-left-1 pl-top-[2px] pl-w-[16px] pl-h-[16px] pl-rounded-full pl-transition-transform pl-duration-150 pl-ease-linear ${e?"pl-bg-white pl-translate-x-[13px]":"pl-bg-black/[0.16] -pl-translate-x-0.5"}`})}),Ht=_l;var ql=()=>{let e=chunk7T6VLIGJ_js.aa(),{selectedSubtitle:o}=chunk7T6VLIGJ_js.ba(({videoData:{params:d,subtitles:m,selectedSubtitle:b}})=>({params:d,subtitles:m,selectedSubtitle:b}),reactRedux.shallowEqual),{settingPopover:l}=chunk7T6VLIGJ_js.ba(({popovers:{settingPopover:d}})=>({settingPopover:d}),reactRedux.shallowEqual),[i,r]=react.useState("main"),[p,c]=react.useState(!1),a=react.useRef(null);return W(a,()=>{e(chunk7T6VLIGJ_js.B(!1)),setTimeout(()=>r("main"),500);}),jsxRuntime.jsxs("div",{className:`pl-inline-flex ${chunk7T6VLIGJ_js.$("isLandscape")&&"pl-relative"}`,ref:a,children:[jsxRuntime.jsxs("div",{className:"pl-flex pl-items-center pl-relative pl-cursor-pointer",onClick:()=>e(chunk7T6VLIGJ_js.B(!l)),onMouseOver:()=>!chunk7T6VLIGJ_js.$("isTouchScreen")&&!chunk7T6VLIGJ_js.$("showSettingPopover")&&c(!0),onMouseLeave:()=>!chunk7T6VLIGJ_js.$("isTouchScreen")&&c(!1),children:[jsxRuntime.jsx(te__default.default,{src:chunkMJGU6VON_js.a.settings,alt:"",width:20,height:20}),p&&jsxRuntime.jsx(E,{title:"\u062A\u0646\u0638\u06CC\u0645\u0627\u062A"})]}),jsxRuntime.jsx(Q,{classNames:`!pl-p-0 pl-overflow-hidden !pl-bg-white ${chunk7T6VLIGJ_js.$("isTouchScreen")?"!pl-fixed !pl-bottom-0 !pl-rounded-t-[20px] pl-rounded-b-none":"!pl-w-[230px] pl-right-0 pl-mb-[33px] !pl-rounded-[12px]"} ${chunk7T6VLIGJ_js.$("isTouchScreenPortrait")&&"!pl-w-screen tablet:!pl-max-w-[285px] tablet:!pl-mx-auto"} ${chunk7T6VLIGJ_js.$("isTouchScreenLandscape")&&"pl-w-full pl-max-w-[285px]"}`,status:l,onClose:()=>{e(chunk7T6VLIGJ_js.B(!1)),setTimeout(()=>r("main"),500);},type:chunk7T6VLIGJ_js.$("isTouchScreen")?"modal":"popover",isBlurBackground:chunk7T6VLIGJ_js.$("isTouchScreenPortrait"),ref:chunk7T6VLIGJ_js.$("isTouchScreenPortrait")?a:void 0,isHeader:chunk7T6VLIGJ_js.$("isTouchScreen"),customHeader:jsxRuntime.jsx(jsxRuntime.Fragment,{}),isHasCatchUpLineOnTop:chunk7T6VLIGJ_js.$("isTouchScreen"),children:jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[i==="main"&&jsxRuntime.jsxs("div",{id:"main",className:"pl-p-4 pl-rounded-[10px] pl-flex pl-flex-col pl-gap-5 animate__animated animate__fadeIn",children:[!chunk7T6VLIGJ_js.$("isStaticFormat")&&jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsxs("div",{className:"pl-flex pl-items-center pl-gap-[10px] pl-cursor-pointer",onClick:()=>r("qualityLevels"),children:[jsxRuntime.jsx(te__default.default,{src:chunkMJGU6VON_js.a.qualitySetting,alt:"",width:16,height:16}),jsxRuntime.jsx("p",{className:"pl-ml-auto pl-text-[12px] pl-font-medium pl-text-black/[0.87]",children:"\u06A9\u06CC\u0641\u06CC\u062A \u067E\u062E\u0634"}),jsxRuntime.jsx(te__default.default,{src:chunkMJGU6VON_js.a.chevronLeft,alt:"",width:16,height:16})]})}),jsxRuntime.jsxs("div",{className:"pl-flex pl-items-center pl-gap-[10px] pl-cursor-pointer",onClick:()=>r("speed"),children:[jsxRuntime.jsx(ue,{className:"size-5 pl-fill-black/[0.5]"}),jsxRuntime.jsx("p",{className:"pl-ml-auto pl-text-[12px] pl-font-medium pl-text-black/[0.87]",children:"\u0633\u0631\u0639\u062A"}),jsxRuntime.jsx(te__default.default,{src:chunkMJGU6VON_js.a.chevronLeft,alt:"",width:16,height:16})]}),chunk7T6VLIGJ_js.$("hasSubtitles")&&chunk7T6VLIGJ_js.$("isTouchScreenPortrait")&&jsxRuntime.jsxs("div",{className:"pl-flex pl-items-center pl-gap-[10px] pl-cursor-pointer",children:[jsxRuntime.jsx(te__default.default,{src:chunkMJGU6VON_js.a.subtitleOutlineGray,alt:"subtitle-icon",width:20,height:20}),jsxRuntime.jsx("p",{className:"pl-ml-auto pl-text-[12px] pl-font-medium pl-text-black/[0.87]",children:"\u0632\u06CC\u0631\u0646\u0648\u06CC\u0633"}),jsxRuntime.jsx(Ht,{enabled:!!o,setEnabled:chunkFONLDNI3_js.b})]})]}),i==="qualityLevels"&&jsxRuntime.jsx(de,{setSection:r}),i==="speed"&&jsxRuntime.jsx(fe,{setSection:r})]})})]})},Qt=react.memo(ql);chunkSPUHJYDE_js.e();var zl=()=>{let{duration:e,currentTime:o}=chunk7T6VLIGJ_js.ba(({controller:{duration:l,currentTime:i}})=>({duration:l,currentTime:i}),reactRedux.shallowEqual);return chunk7T6VLIGJ_js.ba(({videoData:{videoElementSizeInfo:l,params:i}})=>({videoElementSizeInfo:l,params:i}),reactRedux.shallowEqual),jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsxs("div",{className:`pl-mr-auto !pl-text-white pl-w-full pl-max-w-max pl-text-[12px] pl-font-bold ${chunk7T6VLIGJ_js.$("isFullScreen")?"pl-ml-8":"pl-ml-4"} ${chunk7T6VLIGJ_js.$("isTouchScreenPortrait")?"!pl-ml-0":"pl-absolute pl-left-0 pl-bottom-full pl-mb-[33px]"}`,children:[jsxRuntime.jsx("span",{children:chunk7T6VLIGJ_js.O(e)}),jsxRuntime.jsx("span",{children:" / "}),jsxRuntime.jsx("span",{children:chunk7T6VLIGJ_js.O(o)})]})})},ve=zl;chunkSPUHJYDE_js.e();var Vl=()=>jsxRuntime.jsx(te__default.default,{src:chunkMJGU6VON_js.a.unlock,alt:"unlock-icon",width:20,height:20,onClick:()=>chunkUQTAWRFP_js.g("lock")}),Gt=Vl;chunkSPUHJYDE_js.e();var Zl=()=>{let[e,o]=react.useState(!1);return chunk7T6VLIGJ_js.ba(({videoData:{selectedSubtitle:l,videoElementSizeInfo:i,params:r}})=>({selectedSubtitle:l,videoElementSizeInfo:i,params:r}),reactRedux.shallowEqual),jsxRuntime.jsxs("div",{className:"pl-relative pl-flex pl-items-center",children:[jsxRuntime.jsx(te__default.default,{alt:"subtitle-icon",src:chunk7T6VLIGJ_js.$("isSelectedSubtitle")?chunkMJGU6VON_js.a.subtitleFill:chunkMJGU6VON_js.a.subtitleOutline,className:"pl-cursor-pointer",width:20,height:20,onClick:chunkFONLDNI3_js.b,onDoubleClick:l=>l.stopPropagation(),onMouseOver:()=>!chunk7T6VLIGJ_js.$("isTouchScreen")&&o(!0),onMouseLeave:()=>!chunk7T6VLIGJ_js.$("isTouchScreen")&&o(!1)}),e&&jsxRuntime.jsx(E,{title:"\u0632\u06CC\u0631\u0646\u0648\u06CC\u0633"})]})},Yt=Zl;var Kl=()=>{chunk7T6VLIGJ_js.ba(({controller:{isFullScreen:o}})=>({isFullScreen:o}),reactRedux.shallowEqual),chunk7T6VLIGJ_js.ba(({videoData:{videoElementSizeInfo:o,params:l}})=>({videoElementSizeInfo:o,params:l}),reactRedux.shallowEqual);let e="";return chunk7T6VLIGJ_js.$("isTouchScreen")?chunk7T6VLIGJ_js.$("isFullScreen")?e="pl-mx-6":e="pl-mx-4":chunk7T6VLIGJ_js.$("isFullScreen")?e="pl-mx-8":e="pl-mx-4",jsxRuntime.jsxs("div",{id:"player-controllbar",className:`pl-flex pl-justify-between pl-items-center ${e}`,children:[jsxRuntime.jsxs("div",{className:"pl-flex pl-items-center pl-gap-5",children:[jsxRuntime.jsx(Ft,{}),chunk7T6VLIGJ_js.$("isTouchScreenLandscape")&&jsxRuntime.jsx(Gt,{}),chunk7T6VLIGJ_js.$("showPictureInPicture")&&jsxRuntime.jsx(Mt,{}),chunk7T6VLIGJ_js.$("showSettingIcon")&&jsxRuntime.jsx(Qt,{}),chunk7T6VLIGJ_js.$("isFullScreen")&&!chunk7T6VLIGJ_js.$("isStaticFormat")&&jsxRuntime.jsx(de,{showQualityLevelsIcon:!0}),(chunk7T6VLIGJ_js.$("isFullScreen")||chunk7T6VLIGJ_js.$("isStaticFormat"))&&jsxRuntime.jsx(fe,{showSpeedIcon:!0}),chunk7T6VLIGJ_js.$("hasSubtitles")&&!chunk7T6VLIGJ_js.$("isTouchScreenPortrait")&&jsxRuntime.jsx(Yt,{})]}),jsxRuntime.jsxs("div",{className:"pl-flex pl-items-center pl-gap-5",children:[chunk7T6VLIGJ_js.$("isTouchScreenPortrait")&&jsxRuntime.jsx(ve,{}),!chunk7T6VLIGJ_js.$("isIOS")&&jsxRuntime.jsx(Dt,{})]})]})},Kt=react.memo(Kl);chunkSPUHJYDE_js.e();var jl=()=>{let{subtitleText:e}=chunk7T6VLIGJ_js.ba(({videoData:{subtitleText:l,selectedSubtitle:i}})=>({subtitleText:l,selectedSubtitle:i}),reactRedux.shallowEqual);chunk7T6VLIGJ_js.ba(({controller:{isFullScreen:l}})=>({isFullScreen:l}),reactRedux.shallowEqual);let o=()=>{let l="";return chunk7T6VLIGJ_js.$("isLock")?l="pl-bottom-3":chunk7T6VLIGJ_js.$("isActiveElements")?chunk7T6VLIGJ_js.$("isTouchScreenPortrait")?l="pl-bottom-[45px]":chunk7T6VLIGJ_js.$("isFullScreen")?l="pl-bottom-[120px]":l="pl-bottom-[85px]":chunk7T6VLIGJ_js.$("isActiveElements")||(l="pl-bottom-3"),l};return jsxRuntime.jsx("div",{id:"subtitle-id",style:{direction:"ltr"},className:`pl-absolute pl-w-full pl-px-6 pl-text-center pl-text-[14px] ${chunk7T6VLIGJ_js.$("isFullScreen")&&"pl-text-[16px]"} pl-text-white pl-font-normal ${o()}`,children:chunk7T6VLIGJ_js._(e).map((l,i)=>jsxRuntime.jsx("p",{className:"pl-mx-auto",style:{textShadow:"0 0 4px #000000"},children:l},i))})},to=jl;var ei=()=>{chunk7T6VLIGJ_js.ba(({controller:{lock:o,isFullScreen:l,isLoading:i,activeElements:r}})=>({lock:o,isFullScreen:l,isLoading:i,activeElements:r}),reactRedux.shallowEqual),chunk7T6VLIGJ_js.ba(({videoData:{subtitles:o,selectedSubtitle:l}})=>({subtitles:o,selectedSubtitle:l}),reactRedux.shallowEqual);let e="";return chunk7T6VLIGJ_js.$("isTouchScreen")?chunk7T6VLIGJ_js.$("isFullScreen")?e="pl-gap-6 pl-mb-6":e="pl-gap-6 pl-mb-0":chunk7T6VLIGJ_js.$("isFullScreen")?e="pl-gap-6 pl-mb-8":e="pl-gap-4 pl-mb-3",jsxRuntime.jsx("div",{id:"footer",className:"pl-relative",style:{zIndex:4},children:jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[chunk7T6VLIGJ_js.$("showSubtitle")&&jsxRuntime.jsx(to,{}),!chunk7T6VLIGJ_js.$("isLock")&&jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsxs("div",{className:`pl-flex pl-flex-col pl-w-full pl-mx-auto animate__animated animate__faster ${e} ${chunk7T6VLIGJ_js.$("isActiveElements")&&!chunk7T6VLIGJ_js.$("isLoading")?"animate__fadeIn pl-pointer-events-auto":"animate__fadeOut pl-pointer-events-none"}`,children:[!chunk7T6VLIGJ_js.$("isTouchScreenPortrait")&&jsxRuntime.jsx(ve,{}),chunk7T6VLIGJ_js.$("showProgressbar")&&jsxRuntime.jsx(kt,{}),jsxRuntime.jsx(Kt,{})]})})]})})},ro=ei;chunkSPUHJYDE_js.e();var ti=no__default.default(()=>import('./staticVideoTag-Q7RHS35J.js')),oi=no__default.default(()=>import('./nonStaticVideoTag-FNVTSWAG.js')),li=()=>jsxRuntime.jsx(jsxRuntime.Fragment,{children:chunk7T6VLIGJ_js.$("isStaticFormat")?jsxRuntime.jsx(ti,{}):jsxRuntime.jsx(oi,{})}),so=li;chunkSPUHJYDE_js.e();var si=()=>{let e=chunk7T6VLIGJ_js.aa();chunk7T6VLIGJ_js.ba(({videoData:{params:o}})=>({params:o}),reactRedux.shallowEqual),react.useEffect(()=>{let o=()=>{document.fullscreenElement?e(chunk7T6VLIGJ_js.h(!0)):(e(chunk7T6VLIGJ_js.h(!1)),chunkUQTAWRFP_js.i(),chunk7T6VLIGJ_js.xa(chunk7T6VLIGJ_js.ma("exitFullScreen")));};document.addEventListener&&(document.addEventListener("webkitfullscreenchange",o,!1),document.addEventListener("mozfullscreenchange",o,!1),document.addEventListener("fullscreenchange",o,!1),document.addEventListener("MSFullscreenChange",o,!1));},[]);},po=si;chunkSPUHJYDE_js.e();var ai=(e,o)=>{let l=chunk7T6VLIGJ_js.aa(),{activeElements:i}=chunk7T6VLIGJ_js.ba(({controller:{activeElements:a}})=>({activeElements:a}),reactRedux.shallowEqual),r=react.useRef(null),p=react.useRef(e),c=react.useRef(o);react.useEffect(()=>{p.current=e;},[e]),react.useEffect(()=>{c.current=o;},[o]),react.useEffect(()=>{let a=!1,d=u=>{let{activeElements:g,isEnded:A}=chunk7T6VLIGJ_js.L.getState().controller;A?l(chunk7T6VLIGJ_js.f(!0)):u.pointerType==="mouse"&&(clearTimeout(r.current),g?["player-tag","main-content","player-controllbar","video-opacity","playerElements","touchBackward","touchForward"].includes(u.target.id)&&(a=!0):l(chunk7T6VLIGJ_js.f(!0)),r.current=setTimeout(()=>{let{settingPopover:B,speedPopover:M,qualityLevelsPopover:D}=chunk7T6VLIGJ_js.L.getState().popovers,{play:_}=chunk7T6VLIGJ_js.L.getState().controller;!B&&!M&&!D&&_&&a&&l(chunk7T6VLIGJ_js.f(!1));},chunkESB3FO2C_js.a));},m=u=>{setTimeout(()=>{let{activeElements:g,isEnded:A,firstPlay:B}=chunk7T6VLIGJ_js.L.getState().controller;if(clearTimeout(r.current),A)return l(chunk7T6VLIGJ_js.f(!0));chunk7T6VLIGJ_js.N()&&!B&&!p.current&&!c.current&&(["player-tag","main-content","video-opacity","touchBackward","touchForward"].includes(u.target.id)||chunk7T6VLIGJ_js.Q(u,"playerElements")?(l(chunk7T6VLIGJ_js.f(!g)),r.current=setTimeout(()=>{let{settingPopover:M,speedPopover:D,qualityLevelsPopover:_}=chunk7T6VLIGJ_js.L.getState().popovers;!M&&!D&&!_&&l(chunk7T6VLIGJ_js.f(!1));},chunkESB3FO2C_js.a)):r.current=setTimeout(()=>{let{settingPopover:M,speedPopover:D,qualityLevelsPopover:_}=chunk7T6VLIGJ_js.L.getState().popovers;!M&&!D&&!_&&l(chunk7T6VLIGJ_js.f(!1));},chunkESB3FO2C_js.a));},200);},b=()=>{clearTimeout(r.current),r.current=setTimeout(()=>{let{activeElements:u,isEnded:g}=chunk7T6VLIGJ_js.L.getState().controller,{settingPopover:A,speedPopover:B,qualityLevelsPopover:M}=chunk7T6VLIGJ_js.L.getState().popovers;g?l(chunk7T6VLIGJ_js.f(!0)):!A&&!B&&!M&&u&&!g&&l(chunk7T6VLIGJ_js.f(!u));},chunkESB3FO2C_js.a);};return document.getElementById("video-area").addEventListener("touchstart",m),document.getElementById("video-area").addEventListener("touchmove",b),document.getElementById("video-area").addEventListener("pointermove",d),()=>{let u=document.getElementById("video-area");u&&(u.removeEventListener("touchstart",m),u.removeEventListener("touchmove",b),u.removeEventListener("pointermove",d));}},[i,e,o]);},ao=ai;chunkSPUHJYDE_js.e();var di=()=>{let{firstPlay:e,isFullScreen:o}=chunk7T6VLIGJ_js.ba(({controller:{firstPlay:l,isFullScreen:i}})=>({firstPlay:l,isFullScreen:i}),reactRedux.shallowEqual);react.useEffect(()=>{if(chunk7T6VLIGJ_js.ca()){let l,i=()=>{l=setTimeout(()=>{chunkUQTAWRFP_js.i();},chunk7T6VLIGJ_js.N()?0:300);};return i(),window.addEventListener("resize",i),()=>{window.removeEventListener("resize",i),clearTimeout(l);}}},[e,o,chunk7T6VLIGJ_js.ca()]);},co=di;chunkSPUHJYDE_js.e();var fi=()=>{let{firstPlay:e}=chunk7T6VLIGJ_js.ba(({controller:{firstPlay:o}})=>({firstPlay:o}),reactRedux.shallowEqual);chunk7T6VLIGJ_js.ba(({videoData:{details:o}})=>({details:o}),reactRedux.shallowEqual),react.useEffect(()=>{chunk7T6VLIGJ_js.$("setSubtitleFirstPlay")&&chunkFONLDNI3_js.b();},[e]);},uo=fi;var vi=no__default.default(()=>import('./touchVolumeBrightness-3FDHY2VA.js')),vo=no__default.default(()=>import('./backwardForward-AWKGZCVB.js')),gi=()=>{let[e,o]=react.useState(!1),[l,i]=react.useState(!1),{details:r,params:p}=chunk7T6VLIGJ_js.ba(({videoData:{details:c,params:a,videoElementSizeInfo:d}})=>({details:c,params:a,videoElementSizeInfo:d}),reactRedux.shallowEqual);return chunk7T6VLIGJ_js.ba(({controller:{firstPlay:c,isFullScreen:a,isLoading:d,canPlayVideo:m}})=>({firstPlay:c,isFullScreen:a,isLoading:d,canPlayVideo:m}),reactRedux.shallowEqual),po(),co(),ao(e,l),uo(),jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsxs("div",{id:"video-area",style:{zIndex:chunk7T6VLIGJ_js.$("isFullScreen")?1e6:"unset"},onClick:c=>chunk7T6VLIGJ_js.$("isFirstPlay")&&chunkUQTAWRFP_js.a(c),onDoubleClick:c=>chunkUQTAWRFP_js.j(c),className:`!pl-bg-contain !pl-bg-center !pl-bg-no-repeat pl-h-full pl-bg-black pl-max-h-screen pl-aspect-video pl-flex pl-items-center ${!chunk7T6VLIGJ_js.$("isTouchScreen")&&!chunk7T6VLIGJ_js.$("isFullScreen")&&"!pl-rounded-[12px]"} ${chunk7T6VLIGJ_js.$("isFullScreen")&&"!pl-fixed !pl-w-screen dvh"} pl-w-full pl-relative ${!chunk7T6VLIGJ_js.$("isActiveElements")&&"pl-cursor-none"}`,children:[jsxRuntime.jsx("div",{id:"video-opacity",className:`pl-absolute pl-w-full pl-aspect-video pl-transition-all pl-duration-500 pl-bg-black ${!chunk7T6VLIGJ_js.$("isTouchScreen")&&!chunk7T6VLIGJ_js.$("isFullScreen")&&"!pl-rounded-[12px]"} ${chunk7T6VLIGJ_js.$("isActiveElements")?"pl-bg-opacity-50":"pl-bg-opacity-0"}`}),chunk7T6VLIGJ_js.$("showBanner")&&jsxRuntime.jsx("div",{className:"pl-absolute pl-w-full pl-h-full pl-flex pl-justify-center",children:jsxRuntime.jsx(te__default.default,{src:chunk7T6VLIGJ_js.$("isStaticFormat")?p.banner:r.banner,layout:"fill",alt:p.bannerAlt?p.bannerAlt:chunk7T6VLIGJ_js.$("isStaticFormat")?"\u0628\u0646\u0631 \u0648\u06CC\u062F\u06CC\u0648 \u067E\u0644\u06CC\u0631 \u06A9\u0627\u0641\u0647 \u0648\u06CC\u062F\u06CC\u0648":r.title,objectFit:"contain",className:`${!chunk7T6VLIGJ_js.$("isTouchScreen")&&!chunk7T6VLIGJ_js.$("isFullScreen")&&"pl-rounded-[12px]"}`})}),chunk7T6VLIGJ_js.$("showTouchVolumeBrightness")&&jsxRuntime.jsx(vi,{}),chunk7T6VLIGJ_js.$("showBackwardForward")&&jsxRuntime.jsxs("div",{className:"pl-absolute pl-top-0 pl-right-0 pl-w-full pl-h-full pl-overflow-hidden pl-flex pl-items-center",style:{zIndex:l||e?1000002:1},children:[jsxRuntime.jsx(vo,{type:"touchForward",isRightDoubleTouched:e,setIsRightDoubleTouched:o}),jsxRuntime.jsx(vo,{type:"touchBackward",isLeftDoubleTouched:l,setIsLeftDoubleTouched:i})]}),jsxRuntime.jsx(so,{}),jsxRuntime.jsx("div",{id:"playerElements",className:"pl-absolute pl-top-0 pl-right-0 pl-w-full pl-h-full",children:jsxRuntime.jsxs("div",{className:"pl-flex pl-flex-col pl-justify-between pl-w-full pl-h-full",children:[chunk7T6VLIGJ_js.$("showHeader")&&jsxRuntime.jsx(rt,{}),chunk7T6VLIGJ_js.$("showMain")&&jsxRuntime.jsx(ut,{}),chunk7T6VLIGJ_js.$("showFooter")&&jsxRuntime.jsx(ro,{})]})})]})})},Pc=gi;
28
+ `,style:{height:_||"max-content",maxHeight:"80vh",zIndex:1000004,...c},ref:B,id:"popover-content",children:jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[m&&jsxRuntime.jsx("div",{onTouchMove:b?yo:()=>{},onTouchEndCapture:b?bo:()=>{},className:"pl-py-4",children:b&&jsxRuntime.jsx("div",{className:"pl-absolute pl-top-[10px] pl-right-[50%] pl-mr-[-25px] pl-text-center pl-w-8 pl-h-1 pl-rounded-[20px] pl-bg-gray-highLight"})}),jsxRuntime.jsx("div",{className:`pl-overflow-y-auto pl-h-full pl-w-full ${!g&&"no-scrollbar"}`,onTouchMove:L=>L.stopPropagation(),children:e})]})})})]});return jsxRuntime.jsx(jsxRuntime.Fragment,{children:M&&jsxRuntime.jsx(jsxRuntime.Fragment,{children:i==="modal"?reactDom.createPortal(jsxRuntime.jsx(jsxRuntime.Fragment,{children:qe}),document.getElementById("dialog-react-root-videoPlayer")):jsxRuntime.jsx("div",{children:qe})})})});Ot.displayName="popover";var Q=Ot;chunkSPUHJYDE_js.e();chunkSPUHJYDE_js.e();var Tl=(e,o)=>{react.useEffect(()=>{let l=i=>{!e.current||e.current.contains(i.target)||o(i);};return document.addEventListener("mousedown",l),document.addEventListener("touchstart",l),()=>{document.removeEventListener("mousedown",l),document.removeEventListener("touchstart",l);}},[e,o]);},W=Tl;var Cl=({setSection:e,showQualityLevelsIcon:o})=>{let l=chunkFP7YFRLU_js.aa(),{qualityLevels:i}=chunkFP7YFRLU_js.ba(({controller:{qualityLevels:u,manualQuality:g,autoQuality:A}})=>({qualityLevels:u,manualQuality:g,autoQuality:A}),reactRedux.shallowEqual),{settings:r}=chunkFP7YFRLU_js.ba(({user:{settings:u}})=>({settings:u}),reactRedux.shallowEqual),{qualityLevelsPopover:p}=chunkFP7YFRLU_js.ba(({popovers:{qualityLevelsPopover:u}})=>({qualityLevelsPopover:u}),reactRedux.shallowEqual);chunkFP7YFRLU_js.ba(({videoData:{params:u,videoElementSizeInfo:g}})=>({params:u,videoElementSizeInfo:g}),reactRedux.shallowEqual);let[c,a]=react.useState(!1);i=[-1,...i];let d=(u,g)=>chunkFP7YFRLU_js.$("isAutoQuality")&&g===-1?!0:!chunkFP7YFRLU_js.$("isAutoQuality")&&r.quality===u,m=react.useRef(null);W(m,()=>l(chunkFP7YFRLU_js.D(!1)));let b=jsxRuntime.jsx("div",{id:"qualityLevels",className:"animate__animated animate__fadeIn pl-py-2",children:jsxRuntime.jsx("ul",{className:"pl-flex pl-flex-col pl-gap-2",children:i.map((u,g)=>jsxRuntime.jsxs("li",{className:`pl-flex pl-items-center pl-ps-[24.2px] pl-text-[14px] pl-font-medium pl-rounded-[4px] pl-relative pl-cursor-pointer ${d(g-1,u)&&"pl-bg-primary/[0.12] !pl-cursor-default"} ${chunkFP7YFRLU_js.$("isTouchScreen")?"pl-py-[13.5px]":"pl-py-[9.5px]"}`,onClick:d(g-1,u)?()=>{}:()=>{chunkFP7YFRLU_js.xa(chunkFP7YFRLU_js.ja(u===-1?"auto":`${u}P`)),l(chunkFP7YFRLU_js.f(!1)),l(chunkFP7YFRLU_js.B(!1)),l(chunkFP7YFRLU_js.D(!1)),l(chunkFP7YFRLU_js.F({...r,quality:u===-1?-1:g-1})),e&&e("main");},children:[!chunkFP7YFRLU_js.$("isTouchScreen")&&d(g-1,u)&&jsxRuntime.jsx("div",{className:"pl-absolute pl-right-[11.8px]",children:jsxRuntime.jsx(te__default.default,{src:chunkMJGU6VON_js.a.tick,alt:"",width:12,height:9})}),chunkFP7YFRLU_js.$("isTouchScreen")&&jsxRuntime.jsx("div",{className:`pl-w-5 pl-h-5 pl-rounded-full pl-border pl-border-black/[0.5] pl-p-0.5 ${d(g-1,u)&&"pl-border-primary"}`,children:d(g-1,u)&&jsxRuntime.jsx("div",{className:"pl-w-full pl-h-full pl-rounded-full pl-bg-primary"})}),jsxRuntime.jsx("span",{className:`pl-w-full pl-text-[14px] pl-text-black/[0.87] ${chunkFP7YFRLU_js.$("isTouchScreen")?"pl-pr-[21px]":"pl-pr-[10px]"}`,children:u===-1?jsxRuntime.jsxs("span",{children:[jsxRuntime.jsx("span",{children:"\u062E\u0648\u062F\u06A9\u0627\u0631 "}),jsxRuntime.jsx("span",{className:"pl-text-[10px] pl-font-normal pl-text-black/[0.5]",children:"(\u0628\u0631 \u0627\u0633\u0627\u0633 \u0633\u0631\u0639\u062A \u0627\u06CC\u0646\u062A\u0631\u0646\u062A \u0634\u0645\u0627)"})]}):`${u}p`})]},g))})});return jsxRuntime.jsx(jsxRuntime.Fragment,{children:o?jsxRuntime.jsxs("div",{className:"pl-relative pl-flex pl-items-center",ref:m,children:[jsxRuntime.jsx(te__default.default,{src:chunkMJGU6VON_js.a.qualitySetting1,alt:"speed-icon",width:20,height:20,onClick:()=>l(chunkFP7YFRLU_js.D(!p)),onMouseOver:()=>!chunkFP7YFRLU_js.$("isTouchScreen")&&!chunkFP7YFRLU_js.$("showQualityLevelsPopover")&&a(!0),onMouseLeave:()=>!chunkFP7YFRLU_js.$("isTouchScreen")&&a(!1),className:"pl-cursor-pointer"}),c&&jsxRuntime.jsx(E,{title:"\u06A9\u06CC\u0641\u06CC\u062A"}),jsxRuntime.jsx(Q,{classNames:`!pl-p-0 pl-overflow-hidden !pl-bg-white ${chunkFP7YFRLU_js.$("isTouchScreen")?"!pl-fixed !pl-bottom-0 !pl-rounded-t-[20px] pl-rounded-b-none":"pl-right-0 pl-mb-[33px] !pl-rounded-[12px] pl-w-[230px]"} ${chunkFP7YFRLU_js.$("isTouchScreenPortrait")&&"!pl-w-screen tablet:pl-max-w-[440px]"} ${chunkFP7YFRLU_js.$("isTouchScreenLandscape")&&"pl-w-full pl-max-w-[440px]"}`,status:p,onClose:()=>l(chunkFP7YFRLU_js.D(!1)),type:chunkFP7YFRLU_js.$("isTouchScreen")?"modal":"popover",isBlurBackground:chunkFP7YFRLU_js.$("isTouchScreenPortrait"),ref:chunkFP7YFRLU_js.$("isTouchScreenPortrait")?m:void 0,isHeader:chunkFP7YFRLU_js.$("isTouchScreen"),customHeader:jsxRuntime.jsx(jsxRuntime.Fragment,{}),isHasCatchUpLineOnTop:chunkFP7YFRLU_js.$("isTouchScreen"),children:b})]}):jsxRuntime.jsx(jsxRuntime.Fragment,{children:b})})},de=react.memo(Cl);chunkSPUHJYDE_js.e();chunkSPUHJYDE_js.e();var Il=({className:e,onClick:o,onMouseOver:l,onMouseLeave:i})=>jsxRuntime.jsxs("svg",{width:"18",height:"15",viewBox:"0 0 18 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:e,onClick:o,onMouseOver:l,onMouseLeave:i,children:[jsxRuntime.jsx("path",{d:"M10.5488 1.53559C8.20532 1.02852 5.66339 1.68608 3.84359 3.50588C1.15649 6.19298 1.00481 10.4572 3.39041 13.3215C3.55135 13.5148 3.8176 13.6347 4.13036 13.6347H13.8687C14.1816 13.6347 14.4476 13.5149 14.6085 13.3217C16.0815 11.5533 16.5884 9.25027 16.1258 7.11249C16.0528 6.77512 16.2671 6.44245 16.6045 6.36945C16.9418 6.29645 17.2745 6.51077 17.3475 6.84814C17.8886 9.34866 17.2968 12.0474 15.569 14.1217C15.1326 14.6455 14.489 14.8847 13.8687 14.8847H4.13036C3.50995 14.8847 2.86616 14.6453 2.42991 14.1215C-0.36559 10.765 -0.188583 5.77029 2.95971 2.622C5.09241 0.489299 8.07189 -0.279272 10.8132 0.31386C11.1505 0.386857 11.3648 0.719527 11.2918 1.0569C11.2188 1.39427 10.8862 1.60859 10.5488 1.53559Z"}),jsxRuntime.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M14.9976 2.66523C15.2417 2.9093 15.2417 3.30503 14.9976 3.54911L10.7129 7.83399C10.8469 8.09798 10.9225 8.39667 10.9225 8.713C10.9225 9.78688 10.0519 10.6574 8.97805 10.6574C7.90417 10.6574 7.03362 9.78688 7.03362 8.713C7.03362 7.63912 7.90417 6.76856 8.97805 6.76856C9.27953 6.76856 9.56498 6.83718 9.81965 6.95963C9.82222 6.95697 9.82483 6.95432 9.82746 6.95168L14.1137 2.66525C14.3578 2.42116 14.7535 2.42115 14.9976 2.66523ZM9.67249 8.713C9.67249 9.09652 9.36158 9.40743 8.97805 9.40743C8.59453 9.40743 8.28362 9.09652 8.28362 8.713C8.28362 8.32947 8.59453 8.01856 8.97805 8.01856C9.36158 8.01856 9.67249 8.32947 9.67249 8.713Z"})]}),ue=Il;var $l=[.5,.75,1,1.25,1.5,1.75,2],Dl=({setSection:e,showSpeedIcon:o})=>{let l=chunkFP7YFRLU_js.aa();chunkFP7YFRLU_js.ba(({videoData:{videoElementSizeInfo:m,params:b}})=>({videoElementSizeInfo:m,params:b}),reactRedux.shallowEqual);let{speedPopover:i}=chunkFP7YFRLU_js.ba(({popovers:{speedPopover:m}})=>({speedPopover:m}),reactRedux.shallowEqual),{settings:r}=chunkFP7YFRLU_js.ba(({user:{settings:m}})=>({settings:m}),reactRedux.shallowEqual),p=react.useRef(null),[c,a]=react.useState(!1);W(p,()=>l(chunkFP7YFRLU_js.C(!1))),react.useEffect(()=>{chunkFP7YFRLU_js.ca()&&(chunkFP7YFRLU_js.ca().playbackRate=r.speed);},[]);let d=jsxRuntime.jsx("div",{id:"speed",className:"animate__animated animate__fadeIn pl-py-2",children:jsxRuntime.jsx("ul",{className:"pl-flex pl-flex-col pl-gap-2",children:$l.map((m,b)=>jsxRuntime.jsxs("li",{className:`pl-flex pl-items-center pl-ps-[24.2px] pl-text-[14px] pl-font-medium pl-rounded-[4px] pl-relative pl-cursor-pointer ${r.speed===m&&"pl-bg-primary/[0.12] !pl-cursor-default"} ${chunkFP7YFRLU_js.$("isTouchScreen")?"pl-py-[13.5px]":"pl-py-[9.5px]"}`,onClick:r.speed===m?()=>{}:()=>{chunkFP7YFRLU_js.$("isStaticFormat")||chunkFP7YFRLU_js.xa(chunkFP7YFRLU_js.ia(m)),l(chunkFP7YFRLU_js.f(!1)),l(chunkFP7YFRLU_js.B(!1)),l(chunkFP7YFRLU_js.C(!1)),l(chunkFP7YFRLU_js.F({...r,speed:m})),chunkFP7YFRLU_js.ca().playbackRate=m,e&&e("main");},children:[!chunkFP7YFRLU_js.$("isTouchScreen")&&r.speed===m&&jsxRuntime.jsx("div",{className:"pl-absolute pl-right-[11.8px]",children:jsxRuntime.jsx(te__default.default,{src:chunkMJGU6VON_js.a.tick,alt:"",width:12,height:9})}),chunkFP7YFRLU_js.$("isTouchScreen")&&jsxRuntime.jsx("div",{className:`pl-w-5 pl-h-5 pl-rounded-full pl-border pl-border-black/[0.5] pl-p-0.5 ${r.speed===m&&"pl-border-primary"}`,children:r.speed===m&&jsxRuntime.jsx("div",{className:"pl-w-full pl-h-full pl-rounded-full pl-bg-primary"})}),jsxRuntime.jsx("p",{className:`pl-w-full pl-flex pl-items-center pl-gap-2 pl-text-black/[0.87] ${chunkFP7YFRLU_js.$("isTouchScreen")?"pl-pr-[21px]":"pl-pr-[10px]"}`,children:m})]},b))})});return jsxRuntime.jsx(jsxRuntime.Fragment,{children:o?jsxRuntime.jsxs("div",{className:"pl-relative pl-flex pl-items-center",ref:p,children:[jsxRuntime.jsx(ue,{className:"pl-size-5 pl-cursor-pointer size-5 pl-fill-white",onClick:()=>l(chunkFP7YFRLU_js.C(!i)),onMouseOver:()=>!chunkFP7YFRLU_js.$("isTouchScreen")&&!chunkFP7YFRLU_js.$("showSpeedPopover")&&a(!0),onMouseLeave:()=>!chunkFP7YFRLU_js.$("isTouchScreen")&&a(!1)}),c&&jsxRuntime.jsx(E,{title:"\u0633\u0631\u0639\u062A"}),jsxRuntime.jsx(Q,{classNames:`!pl-p-0 pl-overflow-hidden !pl-bg-white ${chunkFP7YFRLU_js.$("isTouchScreen")?"!pl-fixed !pl-bottom-0 !pl-rounded-t-[20px] pl-rounded-b-none":"!pl-w-[230px] pl-right-0 pl-mb-[33px] !pl-rounded-[12px]"} ${chunkFP7YFRLU_js.$("isTouchScreenPortrait")&&"!pl-w-screen tablet:!pl-max-w-[440px] tablet:!pl-mx-auto"} ${chunkFP7YFRLU_js.$("isTouchScreenLandscape")&&"pl-w-full pl-max-w-[440px]"}`,status:i,onClose:()=>l(chunkFP7YFRLU_js.C(!1)),type:chunkFP7YFRLU_js.$("isTouchScreen")?"modal":"popover",isBlurBackground:chunkFP7YFRLU_js.$("isTouchScreenPortrait"),ref:chunkFP7YFRLU_js.$("isTouchScreenPortrait")?p:void 0,isHeader:chunkFP7YFRLU_js.$("isTouchScreen"),customHeader:jsxRuntime.jsx(jsxRuntime.Fragment,{}),isHasCatchUpLineOnTop:chunkFP7YFRLU_js.$("isTouchScreen"),children:d})]}):jsxRuntime.jsx(jsxRuntime.Fragment,{children:d})})},fe=Dl;chunkSPUHJYDE_js.e();var _l=({enabled:e,setEnabled:o})=>jsxRuntime.jsx("div",{className:`pl-relative pl-h-[22px] pl-w-[37px] pl-cursor-pointer pl-rounded-[15px] pl-transition-colors pl-duration-150 pl-ease-linear ${e?"pl-bg-primary pl-border pl-border-transparent":"pl-bg-secondary-200 pl-border pl-border-gray-highLight"}`,onClick:o,children:jsxRuntime.jsx("div",{className:`pl-absolute pl-left-1 pl-top-[2px] pl-w-[16px] pl-h-[16px] pl-rounded-full pl-transition-transform pl-duration-150 pl-ease-linear ${e?"pl-bg-white pl-translate-x-[13px]":"pl-bg-black/[0.16] -pl-translate-x-0.5"}`})}),Ht=_l;var ql=()=>{let e=chunkFP7YFRLU_js.aa(),{selectedSubtitle:o}=chunkFP7YFRLU_js.ba(({videoData:{params:d,subtitles:m,selectedSubtitle:b}})=>({params:d,subtitles:m,selectedSubtitle:b}),reactRedux.shallowEqual),{settingPopover:l}=chunkFP7YFRLU_js.ba(({popovers:{settingPopover:d}})=>({settingPopover:d}),reactRedux.shallowEqual),[i,r]=react.useState("main"),[p,c]=react.useState(!1),a=react.useRef(null);return W(a,()=>{e(chunkFP7YFRLU_js.B(!1)),setTimeout(()=>r("main"),500);}),jsxRuntime.jsxs("div",{className:`pl-inline-flex ${chunkFP7YFRLU_js.$("isLandscape")&&"pl-relative"}`,ref:a,children:[jsxRuntime.jsxs("div",{className:"pl-flex pl-items-center pl-relative pl-cursor-pointer",onClick:()=>e(chunkFP7YFRLU_js.B(!l)),onMouseOver:()=>!chunkFP7YFRLU_js.$("isTouchScreen")&&!chunkFP7YFRLU_js.$("showSettingPopover")&&c(!0),onMouseLeave:()=>!chunkFP7YFRLU_js.$("isTouchScreen")&&c(!1),children:[jsxRuntime.jsx(te__default.default,{src:chunkMJGU6VON_js.a.settings,alt:"",width:20,height:20}),p&&jsxRuntime.jsx(E,{title:"\u062A\u0646\u0638\u06CC\u0645\u0627\u062A"})]}),jsxRuntime.jsx(Q,{classNames:`!pl-p-0 pl-overflow-hidden !pl-bg-white ${chunkFP7YFRLU_js.$("isTouchScreen")?"!pl-fixed !pl-bottom-0 !pl-rounded-t-[20px] pl-rounded-b-none":"!pl-w-[230px] pl-right-0 pl-mb-[33px] !pl-rounded-[12px]"} ${chunkFP7YFRLU_js.$("isTouchScreenPortrait")&&"!pl-w-screen tablet:!pl-max-w-[285px] tablet:!pl-mx-auto"} ${chunkFP7YFRLU_js.$("isTouchScreenLandscape")&&"pl-w-full pl-max-w-[285px]"}`,status:l,onClose:()=>{e(chunkFP7YFRLU_js.B(!1)),setTimeout(()=>r("main"),500);},type:chunkFP7YFRLU_js.$("isTouchScreen")?"modal":"popover",isBlurBackground:chunkFP7YFRLU_js.$("isTouchScreenPortrait"),ref:chunkFP7YFRLU_js.$("isTouchScreenPortrait")?a:void 0,isHeader:chunkFP7YFRLU_js.$("isTouchScreen"),customHeader:jsxRuntime.jsx(jsxRuntime.Fragment,{}),isHasCatchUpLineOnTop:chunkFP7YFRLU_js.$("isTouchScreen"),children:jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[i==="main"&&jsxRuntime.jsxs("div",{id:"main",className:"pl-p-4 pl-rounded-[10px] pl-flex pl-flex-col pl-gap-5 animate__animated animate__fadeIn",children:[!chunkFP7YFRLU_js.$("isStaticFormat")&&jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsxs("div",{className:"pl-flex pl-items-center pl-gap-[10px] pl-cursor-pointer",onClick:()=>r("qualityLevels"),children:[jsxRuntime.jsx(te__default.default,{src:chunkMJGU6VON_js.a.qualitySetting,alt:"",width:16,height:16}),jsxRuntime.jsx("p",{className:"pl-ml-auto pl-text-[12px] pl-font-medium pl-text-black/[0.87]",children:"\u06A9\u06CC\u0641\u06CC\u062A \u067E\u062E\u0634"}),jsxRuntime.jsx(te__default.default,{src:chunkMJGU6VON_js.a.chevronLeft,alt:"",width:16,height:16})]})}),jsxRuntime.jsxs("div",{className:"pl-flex pl-items-center pl-gap-[10px] pl-cursor-pointer",onClick:()=>r("speed"),children:[jsxRuntime.jsx(ue,{className:"size-5 pl-fill-black/[0.5]"}),jsxRuntime.jsx("p",{className:"pl-ml-auto pl-text-[12px] pl-font-medium pl-text-black/[0.87]",children:"\u0633\u0631\u0639\u062A"}),jsxRuntime.jsx(te__default.default,{src:chunkMJGU6VON_js.a.chevronLeft,alt:"",width:16,height:16})]}),chunkFP7YFRLU_js.$("hasSubtitles")&&chunkFP7YFRLU_js.$("isTouchScreenPortrait")&&jsxRuntime.jsxs("div",{className:"pl-flex pl-items-center pl-gap-[10px] pl-cursor-pointer",children:[jsxRuntime.jsx(te__default.default,{src:chunkMJGU6VON_js.a.subtitleOutlineGray,alt:"subtitle-icon",width:20,height:20}),jsxRuntime.jsx("p",{className:"pl-ml-auto pl-text-[12px] pl-font-medium pl-text-black/[0.87]",children:"\u0632\u06CC\u0631\u0646\u0648\u06CC\u0633"}),jsxRuntime.jsx(Ht,{enabled:!!o,setEnabled:chunk6RXFIWS4_js.b})]})]}),i==="qualityLevels"&&jsxRuntime.jsx(de,{setSection:r}),i==="speed"&&jsxRuntime.jsx(fe,{setSection:r})]})})]})},Qt=react.memo(ql);chunkSPUHJYDE_js.e();var zl=()=>{let{duration:e,currentTime:o}=chunkFP7YFRLU_js.ba(({controller:{duration:l,currentTime:i}})=>({duration:l,currentTime:i}),reactRedux.shallowEqual);return chunkFP7YFRLU_js.ba(({videoData:{videoElementSizeInfo:l,params:i}})=>({videoElementSizeInfo:l,params:i}),reactRedux.shallowEqual),jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsxs("div",{className:`pl-mr-auto !pl-text-white pl-w-full pl-max-w-max pl-text-[12px] pl-font-bold ${chunkFP7YFRLU_js.$("isFullScreen")?"pl-ml-8":"pl-ml-4"} ${chunkFP7YFRLU_js.$("isTouchScreenPortrait")?"!pl-ml-0":"pl-absolute pl-left-0 pl-bottom-full pl-mb-[33px]"}`,children:[jsxRuntime.jsx("span",{children:chunkFP7YFRLU_js.O(e)}),jsxRuntime.jsx("span",{children:" / "}),jsxRuntime.jsx("span",{children:chunkFP7YFRLU_js.O(o)})]})})},ve=zl;chunkSPUHJYDE_js.e();var Vl=()=>jsxRuntime.jsx(te__default.default,{src:chunkMJGU6VON_js.a.unlock,alt:"unlock-icon",width:20,height:20,onClick:()=>chunkVYQ6AKSK_js.h("lock")}),Gt=Vl;chunkSPUHJYDE_js.e();var Zl=()=>{let[e,o]=react.useState(!1);return chunkFP7YFRLU_js.ba(({videoData:{selectedSubtitle:l,videoElementSizeInfo:i,params:r}})=>({selectedSubtitle:l,videoElementSizeInfo:i,params:r}),reactRedux.shallowEqual),jsxRuntime.jsxs("div",{className:"pl-relative pl-flex pl-items-center",children:[jsxRuntime.jsx(te__default.default,{alt:"subtitle-icon",src:chunkFP7YFRLU_js.$("isSelectedSubtitle")?chunkMJGU6VON_js.a.subtitleFill:chunkMJGU6VON_js.a.subtitleOutline,className:"pl-cursor-pointer",width:20,height:20,onClick:chunk6RXFIWS4_js.b,onDoubleClick:l=>l.stopPropagation(),onMouseOver:()=>!chunkFP7YFRLU_js.$("isTouchScreen")&&o(!0),onMouseLeave:()=>!chunkFP7YFRLU_js.$("isTouchScreen")&&o(!1)}),e&&jsxRuntime.jsx(E,{title:"\u0632\u06CC\u0631\u0646\u0648\u06CC\u0633"})]})},Yt=Zl;var Kl=()=>{chunkFP7YFRLU_js.ba(({controller:{isFullScreen:o}})=>({isFullScreen:o}),reactRedux.shallowEqual),chunkFP7YFRLU_js.ba(({videoData:{videoElementSizeInfo:o,params:l}})=>({videoElementSizeInfo:o,params:l}),reactRedux.shallowEqual);let e="";return chunkFP7YFRLU_js.$("isTouchScreen")?chunkFP7YFRLU_js.$("isFullScreen")?e="pl-mx-6":e="pl-mx-4":chunkFP7YFRLU_js.$("isFullScreen")?e="pl-mx-8":e="pl-mx-4",jsxRuntime.jsxs("div",{id:"player-controllbar",className:`pl-flex pl-justify-between pl-items-center ${e}`,children:[jsxRuntime.jsxs("div",{className:"pl-flex pl-items-center pl-gap-5",children:[jsxRuntime.jsx(Ft,{}),chunkFP7YFRLU_js.$("isTouchScreenLandscape")&&jsxRuntime.jsx(Gt,{}),chunkFP7YFRLU_js.$("showPictureInPicture")&&jsxRuntime.jsx(Mt,{}),chunkFP7YFRLU_js.$("showSettingIcon")&&jsxRuntime.jsx(Qt,{}),chunkFP7YFRLU_js.$("isFullScreen")&&!chunkFP7YFRLU_js.$("isStaticFormat")&&jsxRuntime.jsx(de,{showQualityLevelsIcon:!0}),(chunkFP7YFRLU_js.$("isFullScreen")||chunkFP7YFRLU_js.$("isStaticFormat"))&&jsxRuntime.jsx(fe,{showSpeedIcon:!0}),chunkFP7YFRLU_js.$("hasSubtitles")&&!chunkFP7YFRLU_js.$("isTouchScreenPortrait")&&jsxRuntime.jsx(Yt,{})]}),jsxRuntime.jsxs("div",{className:"pl-flex pl-items-center pl-gap-5",children:[chunkFP7YFRLU_js.$("isTouchScreenPortrait")&&jsxRuntime.jsx(ve,{}),!chunkFP7YFRLU_js.$("isIOS")&&jsxRuntime.jsx(Dt,{})]})]})},Kt=react.memo(Kl);chunkSPUHJYDE_js.e();var jl=()=>{let{subtitleText:e}=chunkFP7YFRLU_js.ba(({videoData:{subtitleText:l,selectedSubtitle:i}})=>({subtitleText:l,selectedSubtitle:i}),reactRedux.shallowEqual);chunkFP7YFRLU_js.ba(({controller:{isFullScreen:l}})=>({isFullScreen:l}),reactRedux.shallowEqual);let o=()=>{let l="";return chunkFP7YFRLU_js.$("isLock")?l="pl-bottom-3":chunkFP7YFRLU_js.$("isActiveElements")?chunkFP7YFRLU_js.$("isTouchScreenPortrait")?l="pl-bottom-[45px]":chunkFP7YFRLU_js.$("isFullScreen")?l="pl-bottom-[120px]":l="pl-bottom-[85px]":chunkFP7YFRLU_js.$("isActiveElements")||(l="pl-bottom-3"),l};return jsxRuntime.jsx("div",{id:"subtitle-id",style:{direction:"ltr"},className:`pl-absolute pl-w-full pl-px-6 pl-text-center pl-text-[14px] ${chunkFP7YFRLU_js.$("isFullScreen")&&"pl-text-[16px]"} pl-text-white pl-font-normal ${o()}`,children:chunkFP7YFRLU_js._(e).map((l,i)=>jsxRuntime.jsx("p",{className:"pl-mx-auto",style:{textShadow:"0 0 4px #000000"},children:l},i))})},to=jl;var ei=()=>{chunkFP7YFRLU_js.ba(({controller:{lock:o,isFullScreen:l,isLoading:i,activeElements:r}})=>({lock:o,isFullScreen:l,isLoading:i,activeElements:r}),reactRedux.shallowEqual),chunkFP7YFRLU_js.ba(({videoData:{subtitles:o,selectedSubtitle:l}})=>({subtitles:o,selectedSubtitle:l}),reactRedux.shallowEqual);let e="";return chunkFP7YFRLU_js.$("isTouchScreen")?chunkFP7YFRLU_js.$("isFullScreen")?e="pl-gap-6 pl-mb-6":e="pl-gap-6 pl-mb-0":chunkFP7YFRLU_js.$("isFullScreen")?e="pl-gap-6 pl-mb-8":e="pl-gap-4 pl-mb-3",jsxRuntime.jsx("div",{id:"footer",className:"pl-relative",style:{zIndex:4},children:jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[chunkFP7YFRLU_js.$("showSubtitle")&&jsxRuntime.jsx(to,{}),!chunkFP7YFRLU_js.$("isLock")&&jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsxs("div",{className:`pl-flex pl-flex-col pl-w-full pl-mx-auto animate__animated animate__faster ${e} ${chunkFP7YFRLU_js.$("isActiveElements")&&!chunkFP7YFRLU_js.$("isLoading")?"animate__fadeIn pl-pointer-events-auto":"animate__fadeOut pl-pointer-events-none"}`,children:[!chunkFP7YFRLU_js.$("isTouchScreenPortrait")&&jsxRuntime.jsx(ve,{}),chunkFP7YFRLU_js.$("showProgressbar")&&jsxRuntime.jsx(kt,{}),jsxRuntime.jsx(Kt,{})]})})]})})},ro=ei;chunkSPUHJYDE_js.e();var ti=no__default.default(()=>import('./staticVideoTag-L3AWDN3V.js')),oi=no__default.default(()=>import('./nonStaticVideoTag-EBYDON7V.js')),li=()=>jsxRuntime.jsx(jsxRuntime.Fragment,{children:chunkFP7YFRLU_js.$("isStaticFormat")?jsxRuntime.jsx(ti,{}):jsxRuntime.jsx(oi,{})}),so=li;chunkSPUHJYDE_js.e();var si=()=>{let e=chunkFP7YFRLU_js.aa();chunkFP7YFRLU_js.ba(({videoData:{params:o}})=>({params:o}),reactRedux.shallowEqual),react.useEffect(()=>{let o=()=>{document.fullscreenElement?e(chunkFP7YFRLU_js.h(!0)):(e(chunkFP7YFRLU_js.h(!1)),chunkVYQ6AKSK_js.j(),chunkFP7YFRLU_js.xa(chunkFP7YFRLU_js.ma("exitFullScreen")));};document.addEventListener&&(document.addEventListener("webkitfullscreenchange",o,!1),document.addEventListener("mozfullscreenchange",o,!1),document.addEventListener("fullscreenchange",o,!1),document.addEventListener("MSFullscreenChange",o,!1));},[]);},po=si;chunkSPUHJYDE_js.e();var ai=(e,o)=>{let l=chunkFP7YFRLU_js.aa(),{activeElements:i}=chunkFP7YFRLU_js.ba(({controller:{activeElements:a}})=>({activeElements:a}),reactRedux.shallowEqual),r=react.useRef(null),p=react.useRef(e),c=react.useRef(o);react.useEffect(()=>{p.current=e;},[e]),react.useEffect(()=>{c.current=o;},[o]),react.useEffect(()=>{let a=!1,d=u=>{let{activeElements:g,isEnded:A}=chunkFP7YFRLU_js.L.getState().controller;A?l(chunkFP7YFRLU_js.f(!0)):u.pointerType==="mouse"&&(clearTimeout(r.current),g?["player-tag","main-content","player-controllbar","video-opacity","playerElements","touchBackward","touchForward"].includes(u.target.id)&&(a=!0):l(chunkFP7YFRLU_js.f(!0)),r.current=setTimeout(()=>{let{settingPopover:B,speedPopover:M,qualityLevelsPopover:D}=chunkFP7YFRLU_js.L.getState().popovers,{play:_}=chunkFP7YFRLU_js.L.getState().controller;!B&&!M&&!D&&_&&a&&l(chunkFP7YFRLU_js.f(!1));},chunkESB3FO2C_js.a));},m=u=>{setTimeout(()=>{let{activeElements:g,isEnded:A,firstPlay:B}=chunkFP7YFRLU_js.L.getState().controller;if(clearTimeout(r.current),A)return l(chunkFP7YFRLU_js.f(!0));chunkFP7YFRLU_js.N()&&!B&&!p.current&&!c.current&&(["player-tag","main-content","video-opacity","touchBackward","touchForward"].includes(u.target.id)||chunkFP7YFRLU_js.Q(u,"playerElements")?(l(chunkFP7YFRLU_js.f(!g)),r.current=setTimeout(()=>{let{settingPopover:M,speedPopover:D,qualityLevelsPopover:_}=chunkFP7YFRLU_js.L.getState().popovers;!M&&!D&&!_&&l(chunkFP7YFRLU_js.f(!1));},chunkESB3FO2C_js.a)):r.current=setTimeout(()=>{let{settingPopover:M,speedPopover:D,qualityLevelsPopover:_}=chunkFP7YFRLU_js.L.getState().popovers;!M&&!D&&!_&&l(chunkFP7YFRLU_js.f(!1));},chunkESB3FO2C_js.a));},200);},b=()=>{clearTimeout(r.current),r.current=setTimeout(()=>{let{activeElements:u,isEnded:g}=chunkFP7YFRLU_js.L.getState().controller,{settingPopover:A,speedPopover:B,qualityLevelsPopover:M}=chunkFP7YFRLU_js.L.getState().popovers;g?l(chunkFP7YFRLU_js.f(!0)):!A&&!B&&!M&&u&&!g&&l(chunkFP7YFRLU_js.f(!u));},chunkESB3FO2C_js.a);};return document.getElementById("video-area").addEventListener("touchstart",m),document.getElementById("video-area").addEventListener("touchmove",b),document.getElementById("video-area").addEventListener("pointermove",d),()=>{let u=document.getElementById("video-area");u&&(u.removeEventListener("touchstart",m),u.removeEventListener("touchmove",b),u.removeEventListener("pointermove",d));}},[i,e,o]);},ao=ai;chunkSPUHJYDE_js.e();var di=()=>{let{firstPlay:e,isFullScreen:o}=chunkFP7YFRLU_js.ba(({controller:{firstPlay:l,isFullScreen:i}})=>({firstPlay:l,isFullScreen:i}),reactRedux.shallowEqual);react.useEffect(()=>{if(chunkFP7YFRLU_js.ca()){let l,i=()=>{l=setTimeout(()=>{chunkVYQ6AKSK_js.j();},chunkFP7YFRLU_js.N()?0:300);};return i(),window.addEventListener("resize",i),()=>{window.removeEventListener("resize",i),clearTimeout(l);}}},[e,o,chunkFP7YFRLU_js.ca()]);},co=di;chunkSPUHJYDE_js.e();var fi=()=>{let{firstPlay:e}=chunkFP7YFRLU_js.ba(({controller:{firstPlay:o}})=>({firstPlay:o}),reactRedux.shallowEqual);chunkFP7YFRLU_js.ba(({videoData:{details:o}})=>({details:o}),reactRedux.shallowEqual),react.useEffect(()=>{chunkFP7YFRLU_js.$("setSubtitleFirstPlay")&&chunk6RXFIWS4_js.b();},[e]);},uo=fi;var vi=no__default.default(()=>import('./touchVolumeBrightness-CMH2CHTJ.js')),vo=no__default.default(()=>import('./backwardForward-ANENWZNK.js')),gi=()=>{let[e,o]=react.useState(!1),[l,i]=react.useState(!1),{details:r,params:p}=chunkFP7YFRLU_js.ba(({videoData:{details:c,params:a,videoElementSizeInfo:d}})=>({details:c,params:a,videoElementSizeInfo:d}),reactRedux.shallowEqual);return chunkFP7YFRLU_js.ba(({controller:{firstPlay:c,isFullScreen:a,isLoading:d,canPlayVideo:m}})=>({firstPlay:c,isFullScreen:a,isLoading:d,canPlayVideo:m}),reactRedux.shallowEqual),po(),co(),ao(e,l),uo(),jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsxs("div",{id:"video-area",style:{zIndex:chunkFP7YFRLU_js.$("isFullScreen")?1e6:"unset"},onClick:c=>chunkFP7YFRLU_js.$("isFirstPlay")&&chunkVYQ6AKSK_js.a(c),onDoubleClick:c=>chunkVYQ6AKSK_js.k(c),className:`!pl-bg-contain !pl-bg-center !pl-bg-no-repeat pl-h-full pl-bg-black pl-max-h-screen pl-aspect-video pl-flex pl-items-center ${!chunkFP7YFRLU_js.$("isTouchScreen")&&!chunkFP7YFRLU_js.$("isFullScreen")&&"!pl-rounded-[12px]"} ${chunkFP7YFRLU_js.$("isFullScreen")&&"!pl-fixed !pl-w-screen dvh"} pl-w-full pl-relative ${!chunkFP7YFRLU_js.$("isActiveElements")&&"pl-cursor-none"}`,children:[jsxRuntime.jsx("div",{id:"video-opacity",className:`pl-absolute pl-w-full pl-aspect-video pl-transition-all pl-duration-500 pl-bg-black ${!chunkFP7YFRLU_js.$("isTouchScreen")&&!chunkFP7YFRLU_js.$("isFullScreen")&&"!pl-rounded-[12px]"} ${chunkFP7YFRLU_js.$("isActiveElements")?"pl-bg-opacity-50":"pl-bg-opacity-0"}`}),chunkFP7YFRLU_js.$("showBanner")&&jsxRuntime.jsx("div",{className:"pl-absolute pl-w-full pl-h-full pl-flex pl-justify-center",children:jsxRuntime.jsx(te__default.default,{src:chunkFP7YFRLU_js.$("isStaticFormat")?p.banner:r.banner,layout:"fill",alt:p.bannerAlt?p.bannerAlt:chunkFP7YFRLU_js.$("isStaticFormat")?"\u0628\u0646\u0631 \u0648\u06CC\u062F\u06CC\u0648 \u067E\u0644\u06CC\u0631 \u06A9\u0627\u0641\u0647 \u0648\u06CC\u062F\u06CC\u0648":r.title,objectFit:"contain",className:`${!chunkFP7YFRLU_js.$("isTouchScreen")&&!chunkFP7YFRLU_js.$("isFullScreen")&&"pl-rounded-[12px]"}`})}),chunkFP7YFRLU_js.$("showTouchVolumeBrightness")&&jsxRuntime.jsx(vi,{}),chunkFP7YFRLU_js.$("showBackwardForward")&&jsxRuntime.jsxs("div",{className:"pl-absolute pl-top-0 pl-right-0 pl-w-full pl-h-full pl-overflow-hidden pl-flex pl-items-center",style:{zIndex:l||e?1000002:1},children:[jsxRuntime.jsx(vo,{type:"touchForward",isRightDoubleTouched:e,setIsRightDoubleTouched:o}),jsxRuntime.jsx(vo,{type:"touchBackward",isLeftDoubleTouched:l,setIsLeftDoubleTouched:i})]}),jsxRuntime.jsx(so,{}),jsxRuntime.jsx("div",{id:"playerElements",className:"pl-absolute pl-top-0 pl-right-0 pl-w-full pl-h-full",children:jsxRuntime.jsxs("div",{className:"pl-flex pl-flex-col pl-justify-between pl-w-full pl-h-full",children:[chunkFP7YFRLU_js.$("showHeader")&&jsxRuntime.jsx(rt,{}),chunkFP7YFRLU_js.$("showMain")&&jsxRuntime.jsx(ut,{}),chunkFP7YFRLU_js.$("showFooter")&&jsxRuntime.jsx(ro,{})]})})]})})},Pc=gi;
29
29
 
30
30
  exports.a = Pc;
31
31
  //# sourceMappingURL=out.js.map
32
- //# sourceMappingURL=chunk-AHMSFS2W.js.map
32
+ //# sourceMappingURL=chunk-7XCZYTE3.js.map
@@ -0,0 +1,39 @@
1
+ 'use strict';
2
+
3
+ var chunkVYQ6AKSK_js = require('./chunk-VYQ6AKSK.js');
4
+ var chunkFP7YFRLU_js = require('./chunk-FP7YFRLU.js');
5
+ var chunkSPUHJYDE_js = require('./chunk-SPUHJYDE.js');
6
+
7
+ chunkSPUHJYDE_js.e();var _=()=>{let t=chunkFP7YFRLU_js.L.dispatch,{params:e}=chunkFP7YFRLU_js.L.getState().videoData,a=r=>{r.requestFullScreen?r.requestFullScreen():r.mozRequestFullScreen?r.mozRequestFullScreen():r.webkitRequestFullScreen&&r.webkitRequestFullScreen();};t(chunkFP7YFRLU_js.E()),a(document.documentElement),t(chunkFP7YFRLU_js.h(e.fullscreen==="true"));},ue=()=>{let t=".ts",e=XMLHttpRequest.prototype.open;XMLHttpRequest.prototype.open=function(){arguments[1].endsWith(t)&&(arguments[1]=arguments[1]+"?uuid="+chunkFP7YFRLU_js.M()),e.apply(this,arguments);};},X=(t,e)=>{let a=chunkFP7YFRLU_js.L.dispatch;e.current=setInterval(()=>{let s=t.target.buffered.end(0)/chunkFP7YFRLU_js.ca().duration*100;a(chunkFP7YFRLU_js.i(s));},500);},ye=()=>{let t=chunkFP7YFRLU_js.R("mainPlayer");return {xhrSetup:(e,a)=>{a.split("m3u8")[1]||(a=`${a}${t}`),e.open("GET",a,!0);},startLevel:-1,debug:!1,enableWorker:!0,abrBandWidthUpFactor:.7,abrBandWidthFactor:.95,backBufferLength:1/0,maxBufferLength:30,maxMaxBufferLength:60,manifestLoadPolicy:{default:{maxTimeToFirstByteMs:1/0,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:10,retryDelayMs:5e3,maxRetryDelayMs:1e4},errorRetry:{maxNumRetry:10,retryDelayMs:5e3,maxRetryDelayMs:1e4}}},fragLoadPolicy:{default:{maxTimeToFirstByteMs:1e4,maxLoadTimeMs:12e4,timeoutRetry:{maxNumRetry:10,retryDelayMs:5e3,maxRetryDelayMs:1e4},errorRetry:{maxNumRetry:10,retryDelayMs:5e3,maxRetryDelayMs:1e4}}},playlistLoadPolicy:{default:{maxTimeToFirstByteMs:1e4,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:10,retryDelayMs:5e3,maxRetryDelayMs:1e4},errorRetry:{maxNumRetry:10,retryDelayMs:5e3,maxRetryDelayMs:1e4}}}}},pe=()=>{let t=chunkFP7YFRLU_js.R("miniPlayer");return {xhrSetup:(e,a)=>{a=`${a}${t}`,e.open("GET",a,!0);},startLevel:1,debug:!1,maxMaxBufferLength:60,playlistLoadPolicy:{default:{maxTimeToFirstByteMs:1e4,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:1e3,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:1e3,retryDelayMs:1e3,maxRetryDelayMs:1e3}}}}},J=(t,e)=>{let a=chunkFP7YFRLU_js.L.dispatch,r=[],s=[];t.levels.map(o=>{r.push(o.attrs.RESOLUTION.split("x")[1].trim()),s.push(o.attrs.RESOLUTION);}),t.autoLevelCapping=chunkFP7YFRLU_js.X(s,window.innerWidth,window.innerHeight),a(chunkFP7YFRLU_js.d(r)),["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","msfullscreenchange"].forEach(o=>document.addEventListener(o,c=>{chunkFP7YFRLU_js.$("isAutoQuality")&&(t.autoLevelCapping=chunkFP7YFRLU_js.X(s,window.innerWidth,window.innerHeight),t.nextLevel=-1);},!1));},me=(t,e)=>{let{params:a,details:r}=chunkFP7YFRLU_js.L.getState().videoData,s=r.stream_link;e.loadSource(s),e.on(t.Events.MANIFEST_PARSED,(o,c)=>J(e));},$=(t,e,a)=>{if(e.frag.type!=="audio"){let r=chunkFP7YFRLU_js.L.dispatch,{settings:s}=chunkFP7YFRLU_js.L.getState().user,{qualityLevels:o,manualQuality:c,autoQuality:f}=chunkFP7YFRLU_js.L.getState().controller;chunkFP7YFRLU_js.$("isAutoQuality")?chunkFP7YFRLU_js.$("isAutoQuality")&&f===void 0?(t.nextLevel=-1,a(o[e.frag.level]),r(chunkFP7YFRLU_js.e(e.frag.level))):chunkFP7YFRLU_js.$("isAutoQuality")&&(a(o[e.frag.level]),f!==e.frag.level&&r(chunkFP7YFRLU_js.e(e.frag.level))):(e.frag.level!==c&&(t.nextLevel=o[s.quality]?s.quality:-1),o[s.quality]?(r(chunkFP7YFRLU_js.m(s.quality)),r(chunkFP7YFRLU_js.e(void 0))):(a(o[e.frag.level]),r(chunkFP7YFRLU_js.e(e.frag.level)),r(chunkFP7YFRLU_js.F({...s,quality:-1}))));}},fe=t=>{let e=chunkFP7YFRLU_js.L.dispatch,r=t.mainForwardBufferInfo?.end/chunkFP7YFRLU_js.ca().duration*100;e(chunkFP7YFRLU_js.i(r));},he=(t,e,a)=>{let{params:r}=chunkFP7YFRLU_js.L.getState().videoData;r.type&&$(t,e,a);},ge=(t,e,a)=>{let{type:r}=chunkFP7YFRLU_js.L.getState().videoData.params;r&&$(t,e,a);},xe=(t,e)=>{if(e.event!=="hlsAudioTrackLoading")return {type:"HLS_"+e.type,message:e.error.message}},Se=(t,e)=>{let a=chunkFP7YFRLU_js.L.dispatch;t.preventDefault(),e.current=Date.now(),a(chunkFP7YFRLU_js.g(!0));},De=(t,e)=>{let a=chunkFP7YFRLU_js.L.dispatch;t.preventDefault(),e.current=0,a(chunkFP7YFRLU_js.g(!0));},ve=(t,e)=>{let a=chunkFP7YFRLU_js.L.dispatch,{videoSettings:r}=chunkFP7YFRLU_js.L.getState().user,{params:s}=chunkFP7YFRLU_js.L.getState().videoData;t.preventDefault(),e.current=Date.now(),a(chunkFP7YFRLU_js.a(!0)),chunkFP7YFRLU_js.$("hasOnPlayParams")&&s.onPlay(),chunkFP7YFRLU_js.$("isFirstPlay")&&(chunkFP7YFRLU_js.ca().currentTime=r.time,a(chunkFP7YFRLU_js.c(r.time)),chunkFP7YFRLU_js.$("hasFullScreenParams")&&_(),chunkFP7YFRLU_js.$("isFullScreen")&&chunkVYQ6AKSK_js.g(),a(chunkFP7YFRLU_js.w([Math.floor(chunkFP7YFRLU_js.ca().currentTime)]))),chunkFP7YFRLU_js.xa(chunkFP7YFRLU_js.ta(!0)),a(chunkFP7YFRLU_js.z(""));},Pe=(t,e,a,r,s,o,c,f)=>{let j=chunkFP7YFRLU_js.L.dispatch,{autoQuality:q,canPlayVideo:z,firstPlay:G,qualityLevels:k}=chunkFP7YFRLU_js.L.getState().controller,{settings:E}=chunkFP7YFRLU_js.L.getState().user,I=E.quality===-1&&q?k[q]:k[E.quality],h=0;c.current&&(h=Date.now()-c.current),G&&chunkFP7YFRLU_js.ca().played&&chunkFP7YFRLU_js.xa(chunkFP7YFRLU_js.ua(e.current,Date.now()-a.current,r.current-a.current,Date.now()-s.current,s)),j(chunkFP7YFRLU_js.j(!1)),z&&h>0&&I!==void 0&&(o.current=h,c.current=0,chunkFP7YFRLU_js.xa(chunkFP7YFRLU_js.va(h,I,s,t,f.current)),t.current=t.current+1,s.current=Date.now());},Te=t=>{let e=chunkFP7YFRLU_js.L.dispatch,{params:a}=chunkFP7YFRLU_js.L.getState().videoData;t.preventDefault(),chunkFP7YFRLU_js.xa(chunkFP7YFRLU_js.ta(!1)),e(chunkFP7YFRLU_js.a(!1)),chunkFP7YFRLU_js.$("hasOnPauseParams")&&a.onPause();},Le=t=>{let e=chunkFP7YFRLU_js.L.dispatch,{selectedSubtitle:a}=chunkFP7YFRLU_js.L.getState().videoData;t.preventDefault(),e(chunkFP7YFRLU_js.c(t.target.currentTime)),chunkFP7YFRLU_js.$("hasActiveCue")&&e(chunkFP7YFRLU_js.z(a.activeCues[0].text));},Me=t=>{let e=chunkFP7YFRLU_js.L.dispatch,{settings:a}=chunkFP7YFRLU_js.L.getState().user;if(t.preventDefault(),e(chunkFP7YFRLU_js.g(!1)),e(chunkFP7YFRLU_js.n(!0)),chunkFP7YFRLU_js.ca().volume=a.volume/100,e(chunkFP7YFRLU_js.b(t.target.duration)),chunkFP7YFRLU_js.$("isIOS")){let r=Object.values(t.target.textTracks);r&&r.length&&e(chunkFP7YFRLU_js.y(Object.values(r[0]).length?r:[]));}else e(chunkFP7YFRLU_js.y(Object.values(t.target.textTracks)));},Fe=t=>{let e=chunkFP7YFRLU_js.L.dispatch,{params:a}=chunkFP7YFRLU_js.L.getState().videoData;t.preventDefault(),e(chunkFP7YFRLU_js.p(!0)),e(chunkFP7YFRLU_js.f(!0)),chunkVYQ6AKSK_js.i(chunkFP7YFRLU_js.ca().duration),chunkFP7YFRLU_js.$("hasOnFinishedParams")&&a.onFinished();},Ve=(t,e)=>{let a=chunkFP7YFRLU_js.L.dispatch;t.preventDefault(),e.current=Date.now(),a(chunkFP7YFRLU_js.j(!1));},Re=()=>{let t=chunkFP7YFRLU_js.L.dispatch;t(chunkFP7YFRLU_js.g(!1));},be=t=>{let e=chunkFP7YFRLU_js.L.dispatch;t.preventDefault(),e(chunkFP7YFRLU_js.c(t.target.currentTime));},we=()=>{let t=chunkFP7YFRLU_js.L.dispatch,{params:e}=chunkFP7YFRLU_js.L.getState().videoData;t(chunkFP7YFRLU_js.p(!0)),t(chunkFP7YFRLU_js.f(!0)),chunkFP7YFRLU_js.$("hasOnFinishedParams")&&e.onFinished();},qe=t=>{let e=chunkFP7YFRLU_js.L.dispatch;t.preventDefault(),e(chunkFP7YFRLU_js.a(!1));},ke=(t,e)=>{let a=chunkFP7YFRLU_js.L.dispatch;t.preventDefault(),a(chunkFP7YFRLU_js.a(!0)),e.current=Date.now(),chunkFP7YFRLU_js.$("isFirstPlay")&&chunkFP7YFRLU_js.$("hasFullScreenParams")&&_(),chunkFP7YFRLU_js.$("isFullScreen")&&chunkVYQ6AKSK_js.g();},Ee=(t,e,a)=>{let r=chunkFP7YFRLU_js.L.dispatch,{firstPlay:s}=chunkFP7YFRLU_js.L.getState().controller;r(chunkFP7YFRLU_js.g(!1)),s&&chunkFP7YFRLU_js.ca().played&&chunkFP7YFRLU_js.xa(chunkFP7YFRLU_js.ua(Math.round(t.current),Date.now()-e.current,0,Date.now()-a.current,a)),r(chunkFP7YFRLU_js.j(!1));},Ie=t=>{let e=chunkFP7YFRLU_js.L.dispatch;t.preventDefault(),e(chunkFP7YFRLU_js.c(t.target.currentTime)),e(chunkFP7YFRLU_js.b(t.target.duration));},Oe=t=>{let e=chunkFP7YFRLU_js.L.dispatch;t.preventDefault(),e(chunkFP7YFRLU_js.g(!1)),e(chunkFP7YFRLU_js.n(!0));},Be=(t,e)=>{t.preventDefault(),X(t,e);};var Ae=async t=>{let{stream_link:e}=chunkFP7YFRLU_js.L.getState().miniPlayer.details;t.loadSource(e);},Ce=t=>{chunkVYQ6AKSK_js.i(chunkFP7YFRLU_js.ca().currentTime);};
8
+
9
+ exports.A = Be;
10
+ exports.B = Ae;
11
+ exports.C = Ce;
12
+ exports.a = ue;
13
+ exports.b = ye;
14
+ exports.c = pe;
15
+ exports.d = J;
16
+ exports.e = me;
17
+ exports.f = fe;
18
+ exports.g = he;
19
+ exports.h = ge;
20
+ exports.i = xe;
21
+ exports.j = Se;
22
+ exports.k = De;
23
+ exports.l = ve;
24
+ exports.m = Pe;
25
+ exports.n = Te;
26
+ exports.o = Le;
27
+ exports.p = Me;
28
+ exports.q = Fe;
29
+ exports.r = Ve;
30
+ exports.s = Re;
31
+ exports.t = be;
32
+ exports.u = we;
33
+ exports.v = qe;
34
+ exports.w = ke;
35
+ exports.x = Ee;
36
+ exports.y = Ie;
37
+ exports.z = Oe;
38
+ //# sourceMappingURL=out.js.map
39
+ //# sourceMappingURL=chunk-CS743TPP.js.map
@@ -0,0 +1,93 @@
1
+ 'use strict';
2
+
3
+ var chunkSPUHJYDE_js = require('./chunk-SPUHJYDE.js');
4
+ var toolkit = require('@reduxjs/toolkit');
5
+ var reactRedux = require('react-redux');
6
+ var ke = require('axios');
7
+
8
+ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
9
+
10
+ var ke__default = /*#__PURE__*/_interopDefault(ke);
11
+
12
+ var te=chunkSPUHJYDE_js.b((ar,ee)=>{chunkSPUHJYDE_js.e();ee.exports={baseUrl:"https://hamrahi.cloud",fluentdUrl:"https://hamrahi.cloud"};});var ae={};chunkSPUHJYDE_js.c(ae,{isNpmPackage:()=>Ie});var Ie,re=chunkSPUHJYDE_js.a(()=>{chunkSPUHJYDE_js.e();Ie=!1;});chunkSPUHJYDE_js.e();var Q={play:!1,isAutoPlay:!0,duration:0,currentTime:0,qualityLevels:[],manualQuality:void 0,autoQuality:void 0,activeElements:!0,isLoading:!1,isFullScreen:!1,bufferedTimeWidth:0,firstPlay:!0,activePointerProgressBar:!1,delayTurnOffControlbar:!1,canPlayVideo:!1,lock:!1,isEnded:!1,tooltipTime:0},U=toolkit.createSlice({name:"controller",initialState:Q,reducers:{setPlay:(t,e)=>{t.play=e.payload;},setIsAutoPlay:(t,e)=>{t.isAutoPlay=e.payload;},setDuration:(t,e)=>{t.duration=e.payload;},setCurrentTime:(t,e)=>{t.currentTime=e.payload;},setManualQuality:(t,e)=>{t.manualQuality=e.payload;},setAutoQuality:(t,e)=>{t.autoQuality=e.payload;},setQualityLevels:(t,e)=>{t.qualityLevels=e.payload;},setActiveElements:(t,e)=>{t.activeElements=e.payload;},setIsLoading:(t,e)=>{t.isLoading=e.payload;},setIsFullScreen:(t,e)=>{t.isFullScreen=e.payload;},setBufferedTimeWidth:(t,e)=>{t.bufferedTimeWidth=e.payload;},setFirstPlay:(t,e)=>{t.firstPlay=e.payload;},setActivePointerProgressBar:(t,e)=>{t.activePointerProgressBar=e.payload;},setDelayTurnOffControlbar:(t,e)=>{t.delayTurnOffControlbar=e.payload;},setCanPlayVideo:(t,e)=>{t.canPlayVideo=e.payload;},setLock:(t,e)=>{t.lock=e.payload;},setIsEnded:(t,e)=>{t.isEnded=e.payload;},setTooltipTime:(t,e)=>{t.tooltipTime=e.payload;},setClearControllerSlice:()=>Q}}),{setPlay:Ve,setIsAutoPlay:_e,setDuration:Qe,setCurrentTime:Ue,setQualityLevels:Ee,setAutoQuality:Be,setActiveElements:Re,setIsLoading:$e,setIsFullScreen:Ke,setBufferedTimeWidth:Oe,setFirstPlay:qe,setActivePointerProgressBar:He,setDelayTurnOffControlbar:We,setManualQuality:je,setCanPlayVideo:Xe,setLock:Ye,setIsEnded:Ge,setTooltipTime:Ce,setClearControllerSlice:E}=U.actions,B=U.reducer;chunkSPUHJYDE_js.e();var Se={details:{stream_link:"",type:"",banner:"",id:void 0,title:void 0,vtt:void 0,vtt_mobile:void 0,user_id:null,content_id:void 0,content_type:null,duration:0,subtitles:void 0},params:{type:"",id:"",bannerAlt:"",fullscreen:"",autoplay:"",banner:"",provider:"cafevdo",onFinished:void 0,onPlay:void 0,onPause:void 0,playStatus:void 0},videoElementSizeInfo:{bottom:0,top:0,right:0,left:0,width:0,height:0},isFetchDetails:!1,isValidAddress:!1,videoTimelines:[],isReady:!1,subtitles:[],selectedSubtitle:void 0,subtitleText:void 0},R=toolkit.createSlice({name:"videoData",initialState:Se,reducers:{setInfo:(t,e)=>{t.details=e.payload;},setPlayerParams:(t,e)=>{t.params=e.payload;},setVideoElementSizeInfo:(t,e)=>{t.videoElementSizeInfo=e.payload;},setIsFetchDetails:(t,e)=>{t.isFetchDetails=e.payload;},setIsValidAddress:(t,e)=>{t.isValidAddress=e.payload;},setVideoTimelines:(t,e)=>{t.videoTimelines=e.payload;},setIsReady:(t,e)=>{t.isReady=e.payload;},setSubtitles:(t,e)=>{t.subtitles=e.payload;},setSelectedSubtitle:(t,e)=>{t.selectedSubtitle=e.payload;},setSubtitleText:(t,e)=>{t.subtitleText=e.payload;},setClearVideoDataSlice:t=>{t.subtitles=[],t.selectedSubtitle=void 0,t.subtitleText=void 0;}}}),{setInfo:et,setPlayerParams:tt,setVideoElementSizeInfo:at,setIsFetchDetails:rt,setIsValidAddress:st,setVideoTimelines:it,setIsReady:ot,setSubtitles:nt,setSubtitleText:lt,setSelectedSubtitle:ct,setClearVideoDataSlice:$}=R.actions,K=R.reducer;chunkSPUHJYDE_js.e();var O={settings:{quality:-1,brightness:100,volume:100,speed:1},videoSettings:{time:0}},q=toolkit.createSlice({name:"user",initialState:O,reducers:{setUserSettings:(t,e)=>{t.settings=e.payload;},setVideoSettings:(t,e)=>{t.videoSettings=e.payload;},setClearUserSlice:()=>O}}),{setUserSettings:mt,setVideoSettings:gt,setClearUserSlice:H}=q.actions,W=q.reducer;chunkSPUHJYDE_js.e();chunkSPUHJYDE_js.e();chunkSPUHJYDE_js.e();var ve={settingPopover:!1,speedPopover:!1,qualityLevelsPopover:!1},j=toolkit.createSlice({name:"popover",initialState:ve,reducers:{setSettingPopover:(t,e)=>{t.settingPopover=e.payload;},setSpeedPopover:(t,e)=>{t.speedPopover=e.payload;},setQualityLevelsPopover:(t,e)=>{t.qualityLevelsPopover=e.payload;},setClearPopoversSlice:t=>{t.settingPopover=!1,t.speedPopover=!1,t.qualityLevelsPopover=!1;}}}),{setSettingPopover:wt,setSpeedPopover:At,setQualityLevelsPopover:xt,setClearPopoversSlice:X}=j.actions,Y=j.reducer;chunkSPUHJYDE_js.e();var G={params:{id:"0",type:"",currentTime:0,autoPlay:!1,onClose:()=>{}},details:{},play:!1},C=toolkit.createSlice({name:"user",initialState:G,reducers:{setMiniPlayerInfo:(t,e)=>{console.log(e.payload),t.params={...e.payload,id:e.payload.type==="static"?window.atob(e.payload.id):e.payload.id,banner:e.payload.banner?window.atob(e.payload.banner):void 0};},setDetailsMiniPlayer:(t,e)=>{t.details=e.payload;},setPlayMiniPlayer:(t,e)=>{t.play=e.payload;},setClearMiniPlayerSlice:t=>G}}),{setMiniPlayerInfo:Mt,setDetailsMiniPlayer:Ft,setPlayMiniPlayer:Vt,setClearMiniPlayerSlice:_t}=C.actions,J=C.reducer;var xe=toolkit.configureStore({reducer:{controller:B,videoData:K,popovers:Y,user:W,miniPlayer:J},devTools:!0,middleware:t=>t({serializableCheck:!1})}),s=xe;chunkSPUHJYDE_js.e();chunkSPUHJYDE_js.e();var u=t=>{let{params:e,details:a,isValidAddress:r,isFetchDetails:o,isReady:n,subtitles:d,selectedSubtitle:c}=s.getState().videoData,{firstPlay:l,lock:p,canPlayVideo:P,manualQuality:m,activeElements:v,isLoading:h,isEnded:g,isAutoPlay:ne,play:le,isFullScreen:x}=s.getState().controller,{settingPopover:V,speedPopover:ce,qualityLevelsPopover:ue}=s.getState().popovers,{settings:_}=s.getState().user,L=s.getState().miniPlayer;switch(t){case"showHeader":return !l&&P;case"showMain":return !p||l;case"showFooter":return !l&&P;case"showTouchVolumeBrightness":return !l&&T()&&!p&&!g;case"showBackwardForward":return !l&&f()&&!p;case"showTitle":return !w(e.type)&&x&&!p;case"showSettingPopover":return V;case"showSpeedPopover":return ce;case"showQualityLevelsPopover":return ue;case"showSettingIcon":return !w(e.type)&&!b()&&!x;case"showBanner":return l&&(a.banner||e.banner);case"showProgressbar":return !b();case"showPictureInPicture":return !b()&&!f();case"showSubtitle":return !!c;case"hidePopovers":return !V;case"isLandscape":return window.innerHeight<=window.innerWidth;case"isTouchScreen":return f();case"isTouchScreenPortrait":return z();case"isTouchScreenLandscape":return T();case"isActiveElements":return v;case"isPlay":return le;case"isPlayMiniPlayer":return L.play;case"isFirstPlay":return l;case"isLock":return p;case"isIOS":return b();case"isLoading":return h;case"isStaticFormat":return e.type==="static";case"isEnded":return g;case"isAutoPlay":return ne;case"isFullScreen":return x;case"isValidAddress":return r;case"isFetchDetails":return o;case"isAutoQuality":return _.quality===-1;case"isPressKeySpace":return !p;case"isPressKeyI":return !p&&!l;case"isPressKeyF":return !p&&!l;case"isPressKeyS":return !p&&!l;case"isPressKeyArrowRight":return !l&&!p;case"isPressKeyArrowLeft":return !l&&!p;case"isPressKeyM":return !l&&!p;case"isPressKeyC":return !p&&!l&&!!d&&d.length>0;case"isSendTimelineLog":return !w(e.type);case"isReady":return n;case"isSelectedSubtitle":return !!d&&d.length>0&&c;case"isMiniPlayerAndMainPlayerSame":return e.id===L.params.id;case"hasTitle":return a.title;case"hasBanner":return a.banner;case"hasStreamLink":return a.stream_link;case"hasManualQuality":return m!=null;case"hasSound":return !!_.volume;case"hasAutoPlay":return e.autoplay==="true";case"hasFullScreenParams":return e.fullscreen==="true";case"hasOnFinishedParams":return !!e.onFinished;case"hasSubtitles":return !!d&&d.length>0;case"hasSubtitlesInDetails":return a.subtitles&&a.subtitles.length>0;case"hasActiveCue":return c&&c.activeCues&&c.activeCues.length>0;case"hasOnPlayParams":return !!e.onPlay;case"hasOnPauseParams":return !!e.onPause;case"hasPlayStatusParams":return e.playStatus!==void 0;case"hasMiniPlayer":return L.params.id;case"getDetails":return !!e.type&&e.id;case"canPlayVideo":return P;case"setSubtitleFirstPlay":return a.subtitles&&a.subtitles.length>0&&!l&&!w(e.type);}};var N=t=>new Promise(e=>setTimeout(e,t*1e3)),S=()=>{let t=localStorage.getItem("hamrahiUUID");return t||(t=Le(),localStorage.setItem("hamrahiUUID",t)),t.toString()},Le=()=>{let t="xxxxxxxx-xxxx-Mxxx-Nxxx-x".replace(/[xMN]/g,e=>{let a;return e==="M"?a=Math.floor(1+Math.random()*5):e==="N"?a=Math.floor(8+Math.random()*4):a=Math.floor(Math.random()*16),a.toString(16)});return t+=Date.now().toString(16),t},f=()=>"ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch,T=()=>{let{isFullScreen:t}=s.getState().controller;return f()&&t},z=()=>{let{isFullScreen:t}=s.getState().controller;return f()&&!t},b=()=>["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document,A=t=>(t<10?"0":"")+t,aa=t=>{let e=Math.floor(t/3600),a=Math.floor(t%3600/60),r=Math.floor(t%3600%60);return e<1?`${A(a)}:${A(r)}`:`${A(e)}:${A(a)}:${A(r)}`},w=t=>["mp4","mkv","mov","m4v"].includes(t)?"mp4":t==="webm"||t==="flv"?t:["mp3","ogg"].includes(t)?"mp3":!1,ra=t=>{let e=new URL(t),a=t;return e.search.length?a+=`&uuid=${S()}`:a+=`?uuid=${S()}`},sa=(t,e)=>{try{return [t.target.id,t.target.parentNode.id,t.target.parentNode.parentNode.id,t.target.parentNode.parentNode.parentNode.id,t.target.parentNode.parentNode.parentNode.parentNode.id].includes(e)}catch{return !1}},ia=t=>{let e="";t==="mainPlayer"?e=s.getState().videoData.details.stream_link:e=s.getState().miniPlayer.details.stream_link;let a="";return e&&(a=e.split("m3u8")[1]),a?a=`${a}&uuid=${S()}`:a=`?uuid=${S()}`,a},oa=(t,e)=>{let a=document.getElementById(e),r=document.createElement("span");r.style.width=r.style.height="50px",r.style.left=`${t.touches[0].clientX-a.offsetLeft-25}px`,r.style.top=`${t.touches[0].clientY-a.offsetTop-25}px`,r.classList.add("pl-ripple");let o=a.getElementsByClassName("pl-ripple")[0];o&&o.remove(),a.appendChild(r);};var na=t=>t>=200&&t<300,la=()=>{let t=s.dispatch;t($()),t(E()),t(H()),t(X());},ca=t=>{let e,a=[];for(e=0;e<t.length;e++)a[e]=t[e].weight+(a[e-1]||0);let r=Math.random()*a[a.length-1];for(e=0;e<a.length&&!(a[e]>r);e++);return t[e].domain},ua=t=>{let e=0;performance&&performance.getEntriesByType("navigation")&&(e=performance.getEntriesByType("navigation")[0].duration),t.current=e;},da=(t,e,a)=>{let r=e*window.devicePixelRatio,o=a*window.devicePixelRatio,n=[];return u("isTouchScreenPortrait")?n=t.filter(d=>Number(d.split("x")[0].trim())<=r):n=t.filter(d=>Number(d.split("x")[0].trim())<=o||Number(d.split("x")[1].trim())<=r),n.indexOf(n[n.length-1])},D=(t,e)=>{let a={};for(let r in t){let o=e?`${e}_${r}`:r;typeof t[r]=="object"&&!Array.isArray(t[r])?a={...a,...D(t[r],o)}:a[o]=t[r];}return a},pa=t=>{let e={fa:1,en:2};return t.slice().sort((a,r)=>{let o=e[a.lang]||999,n=e[r.lang]||999;return o-n})},ya=t=>{let e;switch(t){case"fa":e="\u0641\u0627\u0631\u0633\u06CC";break;case"en":e="\u0627\u0646\u06AF\u0644\u06CC\u0633\u06CC";break;case"ar":e="\u0639\u0631\u0628\u06CC";break;case"tr":e="\u062A\u0631\u06A9\u06CC";break;}return e},ma=t=>t.split(/\r?\n|\r|\n/g);chunkSPUHJYDE_js.e();var fa=()=>reactRedux.useDispatch(),va=reactRedux.useSelector;chunkSPUHJYDE_js.e();var k=()=>document.getElementById("player-tag"),xa=()=>document.getElementById("mini-player-video-tag"),La=()=>document.getElementById("time-progress-bar"),Ta=()=>s.getState().videoData.videoElementSizeInfo.width-2;chunkSPUHJYDE_js.e();var Qa=t=>{let{params:e,details:a}=s.getState().videoData,{settings:r}=s.getState().user;return {category:"speedChange",previousSelectedSpeed:r.speed,selectedSpeed:t,id:Number(e.id),type:e.type,src:u("hasStreamLink")?a.stream_link:e.id,provider:e.provider}},Ua=t=>{let{params:e,details:a}=s.getState().videoData,{qualityLevels:r,manualQuality:o,autoQuality:n}=s.getState().controller;return {category:"qualityChangeRequest",currentPlayingQuality:`${r[u("isAutoQuality")?n??o:o]}P`,previousSelectedQuality:u("isAutoQuality")?"auto":`${r[o]}P`,selectedQuality:t,id:Number(e.id),type:e.type,src:u("hasStreamLink")?a.stream_link:e.id,provider:e.provider}},Ea=t=>{let{params:e,details:a}=s.getState().videoData,{qualityLevels:r,autoQuality:o}=s.getState().controller,{settings:n}=s.getState().user;return {category:"catchUpLoading",previousVideoTime:Number(sessionStorage.getItem("previousVideoTime")),currentVideoTime:k().currentTime,duration:t,quality:`${u("isAutoQuality")?r[o]:r[n.quality]}P`,isAutoQuality:u("isAutoQuality"),id:Number(e.id),type:e.type,src:u("hasStreamLink")?a.stream_link:e.id,provider:e.provider}},Ba=t=>{let{params:e,details:a}=s.getState().videoData;return {category:t==="backward"?"backward":"forward",id:Number(e.id),type:e.type,src:a.stream_link?a.stream_link:e.id,provider:e.provider}},Ra=t=>{let{params:e,details:a}=s.getState().videoData;return {category:t,id:Number(e.id),type:e.type,src:u("hasStreamLink")?a.stream_link:e.id}},$a=(t,e)=>{let{params:a,details:r}=s.getState().videoData;return {category:"brightnessChange",source:t,target:e,id:Number(a.id),type:a.type,src:u("hasStreamLink")?r.stream_link:a.id}},Ka=(t,e)=>{let{params:a,details:r}=s.getState().videoData;return {category:"volumeChange",source:t,target:e,id:Number(a.id),type:a.type,src:u("hasStreamLink")?r.stream_link:a.id}},Oa=t=>{let{params:e,details:a}=s.getState().videoData;return {category:t,id:Number(e.id),type:e.type,src:u("hasStreamLink")?a.stream_link:e.id}};var qa=(t,e)=>{let{params:a,details:r}=s.getState().videoData,{duration:o}=s.getState().controller;return {category:"video-timeline",video_id:+a.id,video_type:a.type,start:t,end:e,watchedDuration:e-t,video_duration:Math.floor(o),clientUUID:S(),user_id:r.user_id,content_type:r.content_type,content_id:r.content_id}},Ha=(t,e,a)=>{let{params:r,details:o}=s.getState().videoData;return {category:"autoQualityChange",sourceQuality:t,targetQuality:e,diffQuality:a,id:Number(r.id),type:r.type,src:u("hasStreamLink")?o.stream_link:r.id,provider:r.provider}},Wa=(t,e)=>{let{params:a,details:r}=s.getState().videoData;return {category:"pingpong",id:Number(a.id),type:a.type,src:u("hasStreamLink")?r.stream_link:a.id,PingPongDuration:Number((new Date().getTime()-t).toFixed(2)),PingPongSourceQuality:`${e[0]}P`,PingPongTargetQuality:`${e[1]}P`,provider:a.provider}},ja=t=>{let{params:e,details:a}=s.getState().videoData;return {category:t?"playVideo":"pauseVideo",id:Number(e.id),type:e.type,src:a.stream_link?a.stream_link:e.id,provider:e.provider}},Xa=(t,e,a,r,o)=>{let{params:n,details:d}=s.getState().videoData,c=Date.now()-o.current+t+e,l=window.performance.memory,p=JSON.parse(JSON.stringify(window.performance.timing));return {category:"initLog",id:Number(n.id),type:n.type,origin:new URL(u("hasStreamLink")?d.stream_link:n.id).origin,src:u("hasStreamLink")?d.stream_link:n.id,loading:t,bannerLoading:!u("hasBanner")||a<0?0:a,waiting:e,firstChunkPlaying:r<0?0:r,totalTime:c,provider:n.provider,performance:D({memory:l,timing:p},"performance"),userAgent:window.navigator.userAgent}},Ya=(t,e,a,r,o)=>{let{params:n,details:d}=s.getState().videoData,{settings:c}=s.getState().user,l=Date.now()-a.current;return {category:"loading",id:Number(n.id),type:n.type,src:u("hasStreamLink")?d.stream_link:n.id,duration:t,quality:`${e}P`,isAutoQuality:u("isAutoQuality"),previousLoaderDiff:l,counter:r.current,loadingPercentile:Number((t/l).toFixed(2)),videoTime:k().currentTime,videoEntranceTime:o,speed:c.speed,provider:n.provider}},Ga=t=>{let{params:e,details:a}=s.getState().videoData;return {category:"subtitle",language:t,id:Number(e.id),type:e.type,src:u("hasStreamLink")?a.stream_link:e.id}};chunkSPUHJYDE_js.e();chunkSPUHJYDE_js.e();var I=async({url:t,method:e="GET",data:a,headers:r,retryCount:o=1,maxRetryCount:n=0,errorMessage:d,retryPolicy:c,errorCallback:l,timeoutCount:p})=>{let P={url:t,method:e,headers:{...r,"Content-Type":"application/json"},timeout:p?p*1e3:void 0};a?e==="GET"?P={...P,params:{uuid:s.getState().videoData.params.uuid,provider:s.getState().videoData.params.provider==="unknown"?void 0:s.getState().videoData.params.provider,...a}}:P={...P,data:{uuid:s.getState().videoData.params.uuid,provider:s.getState().videoData.params.provider==="unknown"?void 0:s.getState().videoData.params.provider,...a}}:e==="GET"?P={...P,params:{uuid:s.getState().videoData.params.uuid,provider:s.getState().videoData.params.provider==="unknown"?void 0:s.getState().videoData.params.provider}}:P={...P,data:{uuid:s.getState().videoData.params.uuid,provider:s.getState().videoData.params.provider==="unknown"?void 0:s.getState().videoData.params.provider}};try{return await ke__default.default(P)}catch(m){if(!(m&&m.response&&m.response.status===401)){l&&l(m.response.status,m.response.message);let v=0,h=0;if(c!==void 0){for(let g=0;g<c.length;g++)if((c[g].codeAbove&&m.response.status>=c[g].codeAbove||c[g].codeBelow&&m.response.status<=c[g].codeBelow)&&(c[g].excludeCodes.length===0||!c[g].excludeCodes.includes(m.response.status))||c[g].includeCodes.length===0||c[g].includeCodes.includes(m.response.status)){h=c[g].count,v=c[g].delay;break}}else h=n,v=o+1;if(o<h)return await N(v),I({url:t,method:e,data:a,headers:r,retryCount:o+1,newMaxRetryCount:h,errorMessage:d,retryPolicy:c,errorCallback:l});if(m.response)return {data:m.response.data?m.response.data:{detail:"\u0639\u0645\u0644\u06CC\u0627\u062A \u0628\u0627 \u062E\u0637\u0627 \u0645\u0648\u0627\u062C\u0647 \u0634\u062F\u0647 \u0627\u0633\u062A."},status:m.response.status}}}};chunkSPUHJYDE_js.e();chunkSPUHJYDE_js.e();var se=te(),ie=(re(),chunkSPUHJYDE_js.d(ae)),M=()=>(ie?se.baseUrl:process.env.baseUrl)+"/live/api",F=()=>ie?se.fluentdUrl:process.env.fluentdUrl;var oe=()=>({vod:{getVodUrl:`${M()}/v1/live/details/vod/`},viewCount:t=>`${M()}/v1/viewed/content/${t}`,videoTimelineLog:`${F()}/video-timeline.log`,logs:`${F()}/drive-endpoint.log`});var mr=t=>{let{details:e}=s.getState().videoData,a={...t,timestamp:Date.now(),clientUUID:S(),uuid:S(),link:window.location.href,user_id:e.user_id,live_id:null,format:void 0,content_type:e.content_type,content_id:e.content_id};I({url:oe().logs,method:"post",data:a});};
13
+
14
+ exports.$ = u;
15
+ exports.A = ct;
16
+ exports.B = wt;
17
+ exports.C = At;
18
+ exports.D = xt;
19
+ exports.E = X;
20
+ exports.F = mt;
21
+ exports.G = gt;
22
+ exports.H = Mt;
23
+ exports.I = Ft;
24
+ exports.J = Vt;
25
+ exports.K = _t;
26
+ exports.L = s;
27
+ exports.M = S;
28
+ exports.N = f;
29
+ exports.O = aa;
30
+ exports.P = ra;
31
+ exports.Q = sa;
32
+ exports.R = ia;
33
+ exports.S = oa;
34
+ exports.T = na;
35
+ exports.U = la;
36
+ exports.V = ca;
37
+ exports.W = ua;
38
+ exports.X = da;
39
+ exports.Y = pa;
40
+ exports.Z = ya;
41
+ exports._ = ma;
42
+ exports.a = Ve;
43
+ exports.aa = fa;
44
+ exports.b = Qe;
45
+ exports.ba = va;
46
+ exports.c = Ue;
47
+ exports.ca = k;
48
+ exports.d = Ee;
49
+ exports.da = xa;
50
+ exports.e = Be;
51
+ exports.ea = La;
52
+ exports.f = Re;
53
+ exports.fa = Ta;
54
+ exports.g = $e;
55
+ exports.ga = I;
56
+ exports.h = Ke;
57
+ exports.ha = oe;
58
+ exports.i = Oe;
59
+ exports.ia = Qa;
60
+ exports.j = qe;
61
+ exports.ja = Ua;
62
+ exports.k = He;
63
+ exports.ka = Ea;
64
+ exports.l = We;
65
+ exports.la = Ba;
66
+ exports.m = je;
67
+ exports.ma = Ra;
68
+ exports.n = Xe;
69
+ exports.na = $a;
70
+ exports.o = Ye;
71
+ exports.oa = Ka;
72
+ exports.p = Ge;
73
+ exports.pa = Oa;
74
+ exports.q = Ce;
75
+ exports.qa = qa;
76
+ exports.r = et;
77
+ exports.ra = Ha;
78
+ exports.s = tt;
79
+ exports.sa = Wa;
80
+ exports.t = at;
81
+ exports.ta = ja;
82
+ exports.u = rt;
83
+ exports.ua = Xa;
84
+ exports.v = st;
85
+ exports.va = Ya;
86
+ exports.w = it;
87
+ exports.wa = Ga;
88
+ exports.x = ot;
89
+ exports.xa = mr;
90
+ exports.y = nt;
91
+ exports.z = lt;
92
+ //# sourceMappingURL=out.js.map
93
+ //# sourceMappingURL=chunk-FP7YFRLU.js.map