cafe-video-player 2.8.1 → 2.8.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.
@@ -1,3 +1,3 @@
1
- 'use strict';var chunkU4J4R2AO_js=require('./chunk-U4J4R2AO.js'),chunkWO4IQUGO_js=require('./chunk-WO4IQUGO.js'),M=require('axios');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var M__default=/*#__PURE__*/_interopDefault(M);chunkWO4IQUGO_js.e();chunkWO4IQUGO_js.e();var L=t=>{let{params:s}=chunkU4J4R2AO_js.R.getState().videoData;return chunkU4J4R2AO_js.la().vod.getVodUrl+(t||s.id)},a={url:"",maxRetryCount:0,headers:{},retryPolicy:[],errorCallback:void 0},F=t=>(a.url=L(t),a.maxRetryCount=3,a.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}],a),A=t=>(F(t),a);var it=async t=>{let s=chunkU4J4R2AO_js.R.dispatch;try{let e=await chunkU4J4R2AO_js.Ia({...A(t)});if(chunkU4J4R2AO_js.Z(e.status)){if(await M__default.default.head("https://"+chunkU4J4R2AO_js.$(e.data.hls_links)+e.data.path),t)return s(chunkU4J4R2AO_js.O(e.data));N(e.data),!chunkU4J4R2AO_js.ha("hasRawSubtitles")&&e?.data?.subtitles&&U(e.data.subtitles);}else throw new Error(JSON.stringify({status:e.status,message:e.data}))}catch{s(chunkU4J4R2AO_js.u(true)),s(chunkU4J4R2AO_js.v(false));}},N=async t=>{let s=chunkU4J4R2AO_js.R.dispatch,e={...t,subtitles:void 0,stream_link:!!t.stream_link&&chunkU4J4R2AO_js.V("https://"+chunkU4J4R2AO_js.$(t.hls_links)+t.path)};chunkU4J4R2AO_js.ha("hasSubtitlesInParams"),s(chunkU4J4R2AO_js.r(e)),s(chunkU4J4R2AO_js.u(true)),s(chunkU4J4R2AO_js.v(true));},U=async t=>{let s=chunkU4J4R2AO_js.R.dispatch,e=await G(t);s(chunkU4J4R2AO_js.y(e));},at=t=>{let s=chunkU4J4R2AO_js.R.dispatch,{subtitles:e,selectedSubtitle:l,params:r}=chunkU4J4R2AO_js.R.getState().videoData,i=chunkU4J4R2AO_js.na();if(!i)return;let k=()=>{let o=Array.from(i.textTracks).find(u=>u.mode==="showing");o&&(o.mode="disabled");},S=(o,u)=>{let _=chunkU4J4R2AO_js.R.getState().videoData.rawSubtitles;r.onSubtitleStatusChange?.(o?_?.find(B=>B.lang===o)??null:null,u);},P=o=>{o&&(o.mode="showing",s(chunkU4J4R2AO_js.B(o)),chunkU4J4R2AO_js.ma(chunkU4J4R2AO_js.Fa(o.language)),S(o.language,true));};if(l&&!t){k(),s(chunkU4J4R2AO_js.B(void 0)),chunkU4J4R2AO_js.ma(chunkU4J4R2AO_js.Fa("empty")),S(null,false);return}let V=t??"fa",R=e.find(o=>o.language===V)??i.textTracks[0];P(R);},G=async t=>{let s=t.map(async r=>{try{return (await fetch(r.url,{method:"HEAD"})).ok?r:null}catch(i){return console.error("Error fetching subtitle:",r.url,i),null}}),l=(await Promise.all(s)).filter(r=>r!==null);return l.length?l:null};
2
- exports.a=it;exports.b=at;exports.c=G;//# sourceMappingURL=chunk-4I7KBOKP.js.map
3
- //# sourceMappingURL=chunk-4I7KBOKP.js.map
1
+ 'use strict';var chunkU4J4R2AO_js=require('./chunk-U4J4R2AO.js'),chunkWO4IQUGO_js=require('./chunk-WO4IQUGO.js'),M=require('axios');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var M__default=/*#__PURE__*/_interopDefault(M);chunkWO4IQUGO_js.e();chunkWO4IQUGO_js.e();var L=t=>{let{params:s}=chunkU4J4R2AO_js.R.getState().videoData;return chunkU4J4R2AO_js.la().vod.getVodUrl+(t||s.id)},a={url:"",maxRetryCount:0,headers:{},retryPolicy:[],errorCallback:void 0},F=t=>(a.url=L(t),a.maxRetryCount=3,a.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}],a),A=t=>(F(t),a);var it=async t=>{let s=chunkU4J4R2AO_js.R.dispatch;try{let e=await chunkU4J4R2AO_js.Ia({...A(t)});if(chunkU4J4R2AO_js.Z(e.status)){if(await M__default.default.head("https://"+chunkU4J4R2AO_js.$(e.data.hls_links)+e.data.path),t)return s(chunkU4J4R2AO_js.O(e.data));N(e.data),!chunkU4J4R2AO_js.ha("hasRawSubtitles")&&e?.data?.subtitles&&U(e.data.subtitles);}else throw new Error(JSON.stringify({status:e.status,message:e.data}))}catch{s(chunkU4J4R2AO_js.u(true)),s(chunkU4J4R2AO_js.v(false));}},N=async t=>{let s=chunkU4J4R2AO_js.R.dispatch,e={...t,subtitles:void 0,stream_link:!!t.stream_link&&chunkU4J4R2AO_js.V("https://"+chunkU4J4R2AO_js.$(t.hls_links)+t.path)};chunkU4J4R2AO_js.ha("hasSubtitlesInParams"),s(chunkU4J4R2AO_js.r(e)),s(chunkU4J4R2AO_js.u(true)),s(chunkU4J4R2AO_js.v(true));},U=async t=>{let s=chunkU4J4R2AO_js.R.dispatch,e=await G(t);s(chunkU4J4R2AO_js.y(e));},at=t=>{let s=chunkU4J4R2AO_js.R.dispatch,{subtitles:e,selectedSubtitle:l,params:r}=chunkU4J4R2AO_js.R.getState().videoData,i=chunkU4J4R2AO_js.na(),k=()=>{let o=Array.from(i.textTracks).find(u=>u.mode==="showing");o&&(o.mode="disabled");},S=(o,u)=>{let _=chunkU4J4R2AO_js.R.getState().videoData.rawSubtitles;r.onSubtitleStatusChange?.(o?_?.find(B=>B.lang===o)??null:null,u);},P=o=>{o&&(o.mode="showing",s(chunkU4J4R2AO_js.B(o)),chunkU4J4R2AO_js.ma(chunkU4J4R2AO_js.Fa(o.language)),S(o.language,true));};if(l&&!t){k(),s(chunkU4J4R2AO_js.B(void 0)),chunkU4J4R2AO_js.ma(chunkU4J4R2AO_js.Fa("empty")),S(null,false);return}let V=t??"fa",R=e.find(o=>o.language===V)??i.textTracks[0];P(R);},G=async t=>{let s=t.map(async r=>{try{return (await fetch(r.url,{method:"HEAD"})).ok?r:null}catch(i){return console.error("Error fetching subtitle:",r.url,i),null}}),l=(await Promise.all(s)).filter(r=>r!==null);return l.length?l:null};
2
+ exports.a=it;exports.b=at;exports.c=G;//# sourceMappingURL=chunk-7VRL2XF3.js.map
3
+ //# sourceMappingURL=chunk-7VRL2XF3.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/videoPlayerLibrary/helpers/redux/actions/videoData.actions.ts","../src/videoPlayerLibrary/helpers/getDetailsConfigs.ts"],"names":["init_cjs_shims","detailAPI","id","params","store_default","API","detailsConfig","vodDetailsConfig","videoId","handleDetailsConfig","getVodDetails","dispatch","d","apiCaller","responseValidator","axios","weighted_random","setDetailsMiniPlayer","detailSetter","conditions","handleRawSubtitles","setIsFetchDetails","setIsValidAddress","data","info","addUuidToSrc","setInfo","subtitles","validSubtitles","filterValidSubtitles","setRawSubtitles","handleSubtitle","activeSubtitle","selectedSubtitle","videoTag","mainPlayerVideoTag","disableCurrentSubtitle","activeTrack","track","notifyStatusChange","lang","enabled","sub","showSubtitle","setSelectedSubtitle","sendFluentLog","subtitleLog","targetLang","subtitleToShow","s","checks","subtitle","err"],"mappings":"oPAAAA,kBAAAA,EAAAA,CCAAA,kBAAAA,EAAAA,CAIO,IAAMC,EAAaC,CAAAA,EAAgB,CACtC,GAAM,CAAE,MAAA,CAAAC,CAAO,EAAIC,kBAAAA,CAAM,QAAA,EAAS,CAAE,SAAA,CACpC,OAAOC,mBAAAA,GAAM,GAAA,CAAI,SAAA,EAAaH,CAAAA,EAAUC,CAAAA,CAAO,EAAA,CACnD,CAAA,CAEMG,EAAgC,CAClC,GAAA,CAAK,EAAA,CACL,aAAA,CAAe,CAAA,CACf,OAAA,CAAS,EAAC,CACV,WAAA,CAAa,EAAC,CACd,aAAA,CAAe,MACnB,EAEMC,CAAAA,CAAoBC,CAAAA,GACtBF,CAAAA,CAAc,GAAA,CAAML,CAAAA,CAAUO,CAAO,CAAA,CACrCF,CAAAA,CAAc,aAAA,CAAgB,CAAA,CAC9BA,CAAAA,CAAc,WAAA,CAAc,CACxB,CACI,UAAW,GAAA,CACX,SAAA,CAAW,IAAA,CACX,YAAA,CAAc,EAAC,CACf,aAAc,CAAC,GAAG,CAAA,CAClB,KAAA,CAAO,CAAA,CACP,KAAA,CAAO,CACX,CAAA,CACA,CACI,SAAA,CAAW,IAAA,CACX,SAAA,CAAW,GAAA,CACX,aAAc,CAAC,GAAA,CAAK,GAAA,CAAK,GAAA,CAAK,GAAG,CAAA,CACjC,aAAc,EAAC,CACf,KAAA,CAAO,EAAA,CACP,KAAA,CAAO,CACX,CACJ,CAAA,CACOA,CAAAA,CAAAA,CAIEG,CAAAA,CAAuBD,CAAAA,GAChCD,CAAAA,CAAiBC,CAAO,EACjBF,CAAAA,CAAAA,CD9BJ,IAAMI,EAAAA,CAAgB,MAAOF,CAAAA,EAAqB,CACvD,IAAMG,CAAAA,CAAWP,kBAAAA,CAAM,QAAA,CACvB,GAAI,CACF,IAAMQ,CAAAA,CAAI,MAAMC,mBAAAA,CAAU,CAAE,GAAGJ,CAAAA,CAAoBD,CAAO,CAAE,CAAC,CAAA,CAC7D,GAAIM,kBAAAA,CAAkBF,CAAAA,CAAE,MAAM,CAAA,CAAG,CAE/B,GADA,MAAMG,kBAAAA,CAAM,IAAA,CAAK,UAAA,CAAaC,kBAAAA,CAAgBJ,EAAE,IAAA,CAAK,SAAS,CAAA,CAAIA,CAAAA,CAAE,IAAA,CAAK,IAAI,EACzEJ,CAAAA,CAAS,OAAOG,CAAAA,CAASM,kBAAAA,CAAqBL,CAAAA,CAAE,IAAI,CAAC,CAAA,CACzDM,CAAAA,CAAaN,CAAAA,CAAE,IAAI,CAAA,CACf,CAACO,qCAAwC,CAAA,EAAKP,CAAAA,EAAG,IAAA,EAAM,SAAA,EAAWQ,CAAAA,CAAmBR,CAAAA,CAAE,IAAA,CAAK,SAAS,EAC3G,CAAA,KAAO,MAAM,IAAI,KAAA,CAAM,IAAA,CAAK,UAAU,CAAE,MAAA,CAAQA,CAAAA,CAAE,MAAA,CAAQ,OAAA,CAASA,CAAAA,CAAE,IAAK,CAAC,CAAC,CAC9E,CAAA,KAAqB,CACnBD,CAAAA,CAASU,mBAAkB,IAAI,CAAC,CAAA,CAChCV,CAAAA,CAASW,kBAAAA,CAAkB,KAAK,CAAC,EACnC,CACF,CAAA,CAEaJ,CAAAA,CAAe,MAAOK,CAAAA,EAAc,CAC/C,IAAMZ,CAAAA,CAAWP,kBAAAA,CAAM,QAAA,CACnBoB,CAAAA,CAAO,CACT,GAAGD,CAAAA,CACH,SAAA,CAAW,MAAA,CACX,WAAA,CAAa,CAAC,CAACA,EAAK,WAAA,EAAeE,kBAAAA,CAAa,UAAA,CAAaT,kBAAAA,CAAgBO,CAAAA,CAAK,SAAS,CAAA,CAAIA,CAAAA,CAAK,IAAI,CAC1G,CAAA,CACKJ,mBAAAA,CAAAA,sBAA6C,CAAA,CAElDR,CAAAA,CAASe,mBAAQF,CAAI,CAAC,CAAA,CACtBb,CAAAA,CAASU,kBAAAA,CAAkB,IAAI,CAAC,CAAA,CAChCV,CAAAA,CAASW,kBAAAA,CAAkB,IAAI,CAAC,EAClC,EAEMF,CAAAA,CAAqB,MAAOO,CAAAA,EAA2B,CAC3D,IAAMhB,CAAAA,CAAWP,mBAAM,QAAA,CACjBwB,CAAAA,CAAiB,MAAMC,CAAAA,CAAqBF,CAAS,CAAA,CAC3DhB,EAASmB,kBAAAA,CAAgBF,CAAc,CAAC,EAC1C,CAAA,CAEaG,EAAAA,CAAkBC,GAA4B,CACzD,IAAMrB,CAAAA,CAAWP,kBAAAA,CAAM,QAAA,CACjB,CAAE,UAAAuB,CAAAA,CAAW,gBAAA,CAAAM,CAAAA,CAAkB,MAAA,CAAA9B,CAAO,CAAA,CAAIC,kBAAAA,CAAM,QAAA,EAAS,CAAE,SAAA,CAC3D8B,CAAAA,CAAWC,mBAAAA,EAAmB,CAE9BC,CAAAA,CAAyB,IAAM,CACnC,IAAMC,CAAAA,CAAc,KAAA,CAAM,IAAA,CAAKH,CAAAA,CAAS,UAAU,CAAA,CAAE,IAAA,CAAMI,CAAAA,EAAUA,CAAAA,CAAM,IAAA,GAAS,SAAS,EACxFD,CAAAA,GAAaA,CAAAA,CAAY,IAAA,CAAO,UAAA,EACtC,CAAA,CAEME,CAAAA,CAAqB,CAACC,CAAAA,CAAqBC,CAAAA,GAAqB,CACpE,IAAMd,CAAAA,CAAYvB,kBAAAA,CAAM,UAAS,CAAE,SAAA,CAAU,YAAA,CAC7CD,CAAAA,CAAO,sBAAA,GAAyBqC,CAAAA,CAAOb,GAAW,IAAA,CAAMe,CAAAA,EAAQA,CAAAA,CAAI,IAAA,GAASF,CAAI,CAAA,EAAK,KAAO,IAAA,CAAMC,CAAO,EAC5G,CAAA,CAEME,CAAAA,CAAgBL,CAAAA,EAAiC,CAChDA,CAAAA,GACLA,CAAAA,CAAM,IAAA,CAAO,SAAA,CACb3B,CAAAA,CAASiC,kBAAAA,CAAoBN,CAAK,CAAC,CAAA,CACnCO,mBAAAA,CAAcC,mBAAAA,CAAYR,CAAAA,CAAM,QAAQ,CAAC,EACzCC,CAAAA,CAAmBD,CAAAA,CAAM,QAAA,CAAU,IAAI,CAAA,EACzC,CAAA,CACA,GAAIL,CAAAA,EAAoB,CAACD,CAAAA,CAAgB,CACvCI,CAAAA,EAAuB,CACvBzB,EAASiC,kBAAAA,CAAoB,MAAS,CAAC,CAAA,CACvCC,mBAAAA,CAAcC,mBAAAA,CAAY,OAAO,CAAC,CAAA,CAClCP,CAAAA,CAAmB,IAAA,CAAM,KAAK,CAAA,CAC9B,MACF,CAEA,IAAMQ,CAAAA,CAAaf,CAAAA,EAAkB,IAAA,CAE/BgB,CAAAA,CADgBrB,EAAU,IAAA,CAAMsB,CAAAA,EAAMA,CAAAA,CAAE,QAAA,GAAaF,CAAU,CAAA,EAC5Bb,CAAAA,CAAS,UAAA,CAAW,CAAC,CAAA,CAE9DS,CAAAA,CAAaK,CAAc,EAC7B,CAAA,CAEanB,EAAuB,MAAOF,CAAAA,EAAwD,CACjG,IAAMuB,CAAAA,CAASvB,CAAAA,CAAU,IAAI,MAAOwB,CAAAA,EAAa,CAC/C,GAAI,CAEF,OAAA,CADiB,MAAM,KAAA,CAAMA,CAAAA,CAAS,GAAA,CAAK,CAAE,MAAA,CAAQ,MAAO,CAAC,CAAA,EAChD,EAAA,CAAWA,CAAAA,CACZ,IACd,CAAA,MAASC,CAAAA,CAAK,CACZ,OAAA,OAAA,CAAQ,KAAA,CAAM,0BAAA,CAA4BD,CAAAA,CAAS,GAAA,CAAKC,CAAG,EACpD,IACT,CACF,CAAC,CAAA,CAGKxB,CAAAA,CAAAA,CADU,MAAM,QAAQ,GAAA,CAAIsB,CAAM,CAAA,EACT,MAAA,CAAQD,CAAAA,EAAsBA,CAAAA,GAAM,IAAI,CAAA,CACvE,OAAOrB,CAAAA,CAAe,MAAA,CAASA,CAAAA,CAAiB,IAClD","file":"chunk-7VRL2XF3.js","sourcesContent":["import { apiCaller, getAll } from \"../../services/apiCaller\";\r\nimport { setInfo, setIsFetchDetails, setIsValidAddress, setRawSubtitles, setSelectedSubtitle } from \"../slices/videoDataSlice\";\r\nimport store from \"../store\";\r\nimport { addUuidToSrc, responseValidator, weighted_random } from \"../../helpers\";\r\nimport axios from \"axios\";\r\nimport { handleDetailsConfig } from \"../../getDetailsConfigs\";\r\nimport { subtitleLog } from \"../../logs/logs\";\r\nimport { sendFluentLog } from \"../../logs/fluentdLogger\";\r\nimport { mainPlayerVideoTag } from \"../../constants\";\r\nimport { setDetailsMiniPlayer } from \"../slices/miniPlayerSlice\";\r\nimport { conditions } from \"../../conditions/conditions\";\r\nimport { ConditionName } from \"../../interfaces/enums\";\r\nimport { ISubtitle } from \"../../interfaces/interfaces\";\r\n\r\nexport const getVodDetails = async (videoId?: string) => {\r\n const dispatch = store.dispatch;\r\n try {\r\n const d = await apiCaller({ ...handleDetailsConfig(videoId) });\r\n if (responseValidator(d.status)) {\r\n await axios.head(\"https://\" + weighted_random(d.data.hls_links) + d.data.path);\r\n if (videoId) return dispatch(setDetailsMiniPlayer(d.data));\r\n detailSetter(d.data);\r\n if (!conditions(ConditionName.hasRawSubtitles) && d?.data?.subtitles) handleRawSubtitles(d.data.subtitles);\r\n } else throw new Error(JSON.stringify({ status: d.status, message: d.data }));\r\n } catch (error: any) {\r\n dispatch(setIsFetchDetails(true));\r\n dispatch(setIsValidAddress(false));\r\n }\r\n};\r\n\r\nexport const detailSetter = async (data: any) => {\r\n const dispatch = store.dispatch;\r\n let info = {\r\n ...data,\r\n subtitles: undefined,\r\n stream_link: !!data.stream_link && addUuidToSrc(\"https://\" + weighted_random(data.hls_links) + data.path),\r\n };\r\n if (!conditions(ConditionName.hasSubtitlesInParams)) {\r\n }\r\n dispatch(setInfo(info));\r\n dispatch(setIsFetchDetails(true));\r\n dispatch(setIsValidAddress(true));\r\n};\r\n\r\nconst handleRawSubtitles = async (subtitles: ISubtitle[]) => {\r\n const dispatch = store.dispatch;\r\n const validSubtitles = await filterValidSubtitles(subtitles);\r\n dispatch(setRawSubtitles(validSubtitles));\r\n};\r\n\r\nexport const handleSubtitle = (activeSubtitle?: string) => {\r\n const dispatch = store.dispatch;\r\n const { subtitles, selectedSubtitle, params } = store.getState().videoData;\r\n const videoTag = mainPlayerVideoTag();\r\n\r\n const disableCurrentSubtitle = () => {\r\n const activeTrack = Array.from(videoTag.textTracks).find((track) => track.mode === \"showing\");\r\n if (activeTrack) activeTrack.mode = \"disabled\";\r\n };\r\n\r\n const notifyStatusChange = (lang: string | null, enabled: boolean) => {\r\n const subtitles = store.getState().videoData.rawSubtitles;\r\n params.onSubtitleStatusChange?.(lang ? subtitles?.find((sub) => sub.lang === lang) ?? null : null, enabled);\r\n };\r\n\r\n const showSubtitle = (track: TextTrack | undefined) => {\r\n if (!track) return;\r\n track.mode = \"showing\";\r\n dispatch(setSelectedSubtitle(track));\r\n sendFluentLog(subtitleLog(track.language));\r\n notifyStatusChange(track.language, true);\r\n };\r\n if (selectedSubtitle && !activeSubtitle) {\r\n disableCurrentSubtitle();\r\n dispatch(setSelectedSubtitle(undefined));\r\n sendFluentLog(subtitleLog(\"empty\"));\r\n notifyStatusChange(null, false);\r\n return;\r\n }\r\n\r\n const targetLang = activeSubtitle ?? \"fa\";\r\n const foundSubtitle = subtitles.find((s) => s.language === targetLang);\r\n const subtitleToShow = foundSubtitle ?? (videoTag.textTracks[0] as TextTrack | undefined);\r\n\r\n showSubtitle(subtitleToShow);\r\n};\r\n\r\nexport const filterValidSubtitles = async (subtitles: ISubtitle[]): Promise<ISubtitle[] | null> => {\r\n const checks = subtitles.map(async (subtitle) => {\r\n try {\r\n const response = await fetch(subtitle.url, { method: \"HEAD\" });\r\n if (response.ok) return subtitle;\r\n else return null;\r\n } catch (err) {\r\n console.error(`Error fetching subtitle:`, subtitle.url, err);\r\n return null;\r\n }\r\n });\r\n\r\n const results = await Promise.all(checks);\r\n const validSubtitles = results.filter((s): s is ISubtitle => s !== null);\r\n return validSubtitles.length ? validSubtitles : null;\r\n};\r\n\r\nexport const getAllGeneralMarker = async (url: string) => {\r\n const response: any = await getAll(url, [\r\n {\r\n codeAbove: 400,\r\n codeBelow: null,\r\n excludeCodes: [],\r\n includeCodes: [],\r\n delay: 2,\r\n count: 3,\r\n },\r\n ]);\r\n return response;\r\n};\r\n","import { IDetailsConfig } from \"./interfaces/interfaces\";\r\nimport store from \"./redux/store\";\r\nimport { API } from \"./services/services\";\r\n\r\nexport const detailAPI = (id?: string) => {\r\n const { params } = store.getState().videoData;\r\n return API().vod.getVodUrl + (id ? id : params.id);\r\n};\r\n\r\nconst detailsConfig: IDetailsConfig = {\r\n url: \"\",\r\n maxRetryCount: 0,\r\n headers: {},\r\n retryPolicy: [],\r\n errorCallback: undefined\r\n};\r\n\r\nconst vodDetailsConfig = (videoId?:string) => {\r\n detailsConfig.url = detailAPI(videoId);\r\n detailsConfig.maxRetryCount = 3;\r\n detailsConfig.retryPolicy = [\r\n {\r\n codeAbove: 500,\r\n codeBelow: null,\r\n excludeCodes: [],\r\n includeCodes: [409],\r\n delay: 1,\r\n count: 3\r\n },\r\n {\r\n codeAbove: null,\r\n codeBelow: 404,\r\n excludeCodes: [403, 402, 401, 400],\r\n includeCodes: [],\r\n delay: 10,\r\n count: 6\r\n }\r\n ];\r\n return detailsConfig;\r\n};\r\n\r\n\r\nexport const handleDetailsConfig = (videoId?: string) => {\r\n vodDetailsConfig(videoId);\r\n return detailsConfig;\r\n};\r\n"]}
@@ -1,9 +1,9 @@
1
- 'use strict';var chunkSSP53RHG_js=require('./chunk-SSP53RHG.js'),chunkIBFNXFB7_js=require('./chunk-IBFNXFB7.js'),chunk4I7KBOKP_js=require('./chunk-4I7KBOKP.js'),chunk2EYLIYZS_js=require('./chunk-2EYLIYZS.js'),chunkMDGSHW2K_js=require('./chunk-MDGSHW2K.js'),chunkQHZJEU27_js=require('./chunk-QHZJEU27.js'),chunkLBYZQ7HZ_js=require('./chunk-LBYZQ7HZ.js'),chunk3VH6NKXH_js=require('./chunk-3VH6NKXH.js'),chunkU4J4R2AO_js=require('./chunk-U4J4R2AO.js'),chunkWO4IQUGO_js=require('./chunk-WO4IQUGO.js'),react=require('react'),reactRedux=require('react-redux'),jsxRuntime=require('react/jsx-runtime'),G=require('next/legacy/image'),reactDom=require('react-dom'),zo=require('next/dynamic');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var G__default=/*#__PURE__*/_interopDefault(G);var zo__default=/*#__PURE__*/_interopDefault(zo);chunkWO4IQUGO_js.e();chunkWO4IQUGO_js.e();chunkWO4IQUGO_js.e();var Yo=()=>{let{details:t,params:l}=chunkU4J4R2AO_js.ja(({videoData:{details:o,params:i}})=>({details:o,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 ${chunkU4J4R2AO_js.ha("isActiveElements")?"animate__fadeIn pl-opacity-100":"pl-opacity-0 animate__fadeOut"}`,children:chunkU4J4R2AO_js.ha("hasTitle")?t.title:l.id})},Lt=Yo;chunkWO4IQUGO_js.e();var jo=()=>jsxRuntime.jsxs("div",{className:`pl-relative animate__animated animate__faster ${chunkU4J4R2AO_js.ha("isActiveElements")?"animate__fadeIn pl-pointer-events-auto":"animate__fadeOut pl-pointer-events-none"}`,children:[jsxRuntime.jsx(G__default.default,{src:chunk3VH6NKXH_js.a.lock,alt:"lock-icon",width:20,height:20,onClick:()=>chunkLBYZQ7HZ_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"})]}),$t=jo;var ol=()=>(chunkU4J4R2AO_js.ja(({controller:{lock:t,activeElements:l}})=>({lock:t,activeElements:l}),reactRedux.shallowEqual),jsxRuntime.jsxs("div",{className:`pl-flex pl-items-start pl-justify-end pl-mx-8 pl-pt-8 ${chunkU4J4R2AO_js.ha("isTouchScreenPortrait")?"pl-h-[16px]":"pl-h-[60px]"}`,children:[chunkU4J4R2AO_js.ha("showTitle")&&jsxRuntime.jsx(Lt,{}),chunkU4J4R2AO_js.ha("isLock")&&jsxRuntime.jsx($t,{})]})),Dt=ol;chunkWO4IQUGO_js.e();var il=()=>{let[t,l]=react.useState(false),[o,i]=react.useState(false),{firstPlay:r}=chunkU4J4R2AO_js.ja(({controller:{lock:c,firstPlay:h}})=>({lock:c,firstPlay:h}),reactRedux.shallowEqual),{activeElements:p,isLoading:a}=chunkU4J4R2AO_js.ja(({controller:{activeElements:c,isLoading:h}})=>({activeElements:c,isLoading:h}),reactRedux.shallowEqual);return react.useEffect(()=>{let c=null;return chunkU4J4R2AO_js.ha("isFirstPlay")||chunkU4J4R2AO_js.ha("isActiveElements")?c=setTimeout(()=>i(true),100):i(false),()=>clearTimeout(c)},[p]),react.useEffect(()=>{let c;return chunkU4J4R2AO_js.ha("isLoading")?c=setTimeout(()=>l(true),chunkU4J4R2AO_js.ha("isFirstPlay")?0:chunkQHZJEU27_js.b):l(false),()=>{clearTimeout(c),l(false);}},[a,r]),jsxRuntime.jsx("main",{className:"pl-flex-1 pl-mt-1",children:t?jsxRuntime.jsx(chunkIBFNXFB7_js.a,{}):jsxRuntime.jsx(jsxRuntime.Fragment,{children:o&&!chunkU4J4R2AO_js.ha("isLock")&&jsxRuntime.jsx("div",{id:"main-content",className:`pl-h-full pl-flex pl-justify-center pl-items-center pl-text-center pl-relative ${chunkU4J4R2AO_js.ha("isActiveElements")?"pl-pointer-events-auto":"pl-pointer-events-none"}`,children:jsxRuntime.jsxs("div",{onClick:c=>c.stopPropagation(),className:"pl-flex pl-justify-center pl-gap-8 pl-items-center pl-w-max",style:{zIndex:3},children:[!chunkU4J4R2AO_js.ha("isFirstPlay")&&jsxRuntime.jsx(chunkMDGSHW2K_js.a,{type:"forward"}),jsxRuntime.jsx(chunkIBFNXFB7_js.b,{}),!chunkU4J4R2AO_js.ha("isFirstPlay")&&jsxRuntime.jsx(chunkMDGSHW2K_js.a,{type:"backward"})]})})})})},Bt=il;chunkWO4IQUGO_js.e();chunkWO4IQUGO_js.e();chunkWO4IQUGO_js.e();chunkWO4IQUGO_js.e();var We=t=>{let{videoElementSizeInfo:l}=chunkU4J4R2AO_js.R.getState().videoData,{duration:o}=chunkU4J4R2AO_js.R.getState().controller,i=t.clientX!==void 0?t.clientX:t.touches[0].clientX;if(i<=l.right&&i>0)return (i-l.left)/l.width*o},te=t=>{let{videoElementSizeInfo:l}=chunkU4J4R2AO_js.R.getState().videoData,o=t.clientX!==void 0?t.clientX:t.touches[0].clientX;if(o<=l.right&&o>0)return o-l.left},Ht=t=>{let{duration:l}=chunkU4J4R2AO_js.R.getState().controller;return t*chunkU4J4R2AO_js.qa()/l},Se=t=>{t&&(t.style.opacity="0.0",t.style.pointerEvents="none",t.style.zIndex=-2);},sl=t=>{t.style.display="block",t.style.zIndex=5,t.style.opacity=chunkU4J4R2AO_js.R.getState().videoData.details.vtt?"1.0":"0.6",t.style.pointerEvents="auto",t.style.transition="opacity 1s ease-out";},nl=(t,l)=>{let{videoElementSizeInfo:o}=chunkU4J4R2AO_js.R.getState().videoData,i=document.getElementsByClassName("pl-progressTooltip")[0],r=document.getElementById("parent-player");i&&r&&(te(t)>i.getBoundingClientRect().width/2&&te(t)<o.right-o.left-i.getBoundingClientRect().width/2?l.style.left=`${te(t)-i.offsetWidth/2}px`:te(t)<(r.offsetLeft===0?i.offsetWidth:r.offsetLeft)?l.style.left="0px":chunkU4J4R2AO_js.na().offsetLeft+chunkU4J4R2AO_js.na().offsetWidth<te(t)+i.offsetWidth&&(l.style.left=`${chunkU4J4R2AO_js.na().offsetWidth-i.offsetWidth}px`));},al=(t,l,o)=>{l&&sl(l),chunkU4J4R2AO_js.R.getState().videoData.details.vtt?nl(t,l):l.style.left=`${te(t)-30}px`,chunkU4J4R2AO_js.R.dispatch(chunkU4J4R2AO_js.q(Number(We(t)))),o.textContent=`${chunkU4J4R2AO_js.U(We(t))}`;},be=(t,l=false)=>{let{videoElementSizeInfo:o}=chunkU4J4R2AO_js.R.getState().videoData,i=document.querySelector(".pl-progressTooltip"),r=document.querySelector(".pl-progressTimeTooltip"),p=t.clientX!==void 0?t.clientX:t.touches[0].clientX;i&&r&&p<=o.right&&p>o.left?(al(t,i,r),l&&setTimeout(()=>Se(i),2e3)):Se(i);},qt=t=>{let l=t.clientX!==void 0?t.clientX:t.touches[0].clientX;chunkU4J4R2AO_js.pa()&&(l<=t.view.innerWidth&&l>0?chunkU4J4R2AO_js.pa().style.width=`${te(t)}px`:l<=t.view.innerWidth?chunkU4J4R2AO_js.pa().style.width=0:l>0&&(chunkU4J4R2AO_js.pa().style.width="100%"));},Xt=(t,l,o)=>{t.preventDefault(),t.stopPropagation(),o(true);let i=chunkU4J4R2AO_js.R.dispatch,r=t.clientX!==void 0?t.clientX:t.touches[0].clientX;r<=t.view.innerWidth&&r>0&&(i(chunkU4J4R2AO_js.k(true)),i(chunkU4J4R2AO_js.l(true)),sessionStorage.setItem("previousVideoTime",String(chunkU4J4R2AO_js.na().currentTime)),t.target.setPointerCapture(t.pointerId),l.length>0&&l.map(p=>clearTimeout(p)));},Qe=t=>{t.preventDefault(),t.stopPropagation();let l=chunkU4J4R2AO_js.R.dispatch,{activePointerProgressBar:o}=chunkU4J4R2AO_js.R.getState().controller,{left:i}=chunkU4J4R2AO_js.R.getState().videoData.videoElementSizeInfo,r=t.clientX!==void 0?t.clientX:t.touches[0].clientX,p=document.querySelector(".pl-progressTooltip");r>i?(p&&(p.style.display="block !important",p.style.pointerEvents="auto"),o&&(l(chunkU4J4R2AO_js.l(true)),be(t),qt(t),chunkU4J4R2AO_js.na()?.pause())):p&&(p.style.display="none !important",p.style.pointerEvents="none");},Rt=(t,l,o,i)=>{i(false),t.preventDefault(),t.stopPropagation();let r=chunkU4J4R2AO_js.R.dispatch,{duration:p}=chunkU4J4R2AO_js.R.getState().controller,{left:a,right:c}=chunkU4J4R2AO_js.R.getState().videoData.videoElementSizeInfo,h=chunkU4J4R2AO_js.R.getState().videoData.params;t.target.removeEventListener("pointermove",Qe);let v=t.clientX!==void 0?t.clientX:t.touches[0].clientX,g=0;v>a&&v<c?g=We(t):v<a?g=0:v>0&&(g=p),chunkU4J4R2AO_js.ha("isStaticFormat")||chunkLBYZQ7HZ_js.i(chunkU4J4R2AO_js.na().currentTime,g),chunkU4J4R2AO_js.na().currentTime=g,chunkU4J4R2AO_js.ha("hasOnChangeCurrentTime")&&h.onChangeCurrentTime(g),chunkU4J4R2AO_js.R.getState().controller.activePointerProgressBar&&(r(chunkU4J4R2AO_js.k(false)),r(chunkU4J4R2AO_js.l(false)),chunkU4J4R2AO_js.na().play(),be(t,true),sessionStorage.setItem("current-time",String(g)),qt(t),cl(t,r,l,o));},cl=(t,l,o,i)=>{let r=i,p=setTimeout(()=>{let{settingPopover:a}=chunkU4J4R2AO_js.R.getState().popovers,{delayTurnOffControlbar:c}=chunkU4J4R2AO_js.R.getState().controller;t.pointerType==="touch"&&!a&&c&&l(chunkU4J4R2AO_js.f(false));},chunkQHZJEU27_js.a);r.push(p),o(r);},Ut=()=>{let t=Date.now();chunkU4J4R2AO_js.na().play().then(()=>chunkU4J4R2AO_js.ma(chunkU4J4R2AO_js.ta(Date.now()-t)));},Wt=t=>be(t),Qt=()=>{let t=document.querySelector(".pl-progressTooltip");Se(t);},ml=t=>{let l=t.split("."),i=l[0].split(":");return {milliseconds:parseInt(l[1],10)||0,seconds:parseInt(i.pop(),10)||0,minutes:parseInt(i.pop(),10)||0,hours:parseInt(i.pop(),10)||0}},Vt=t=>{let l=ml(t);return parseInt(l.hours*3600+l.minutes*60+l.seconds+l.milliseconds/1e3,10)},dl=t=>{let l=t.split(/#xywh=/i),o=l[0],r=l[1].match(/[0-9]+/gi);return {x:r[0],y:r[1],w:r[2],h:r[3],image:o}},ul=(t,l)=>t.indexOf("//")>=0?t:l.indexOf("//")===0?[l.replace(/\/$/gi,""),t.trim()].join("/"):l.indexOf("//")>0?[l.trim(),t.trim()].join("/"):t,fl=(t,l)=>{let o={},i=l.split(/\/\w+\.vtt\s?/)[0];if(t=ul(t,i),!t.match(/#xywh=/i))return o.background='url("'+t+l.split(/\/\w+\.vtt\s?/)[1]+'")',o;let r=dl(t);return o.background='url("'+r.image+l.split(/\/\w+\.vtt\s?/)[1]+'") no-repeat -'+r.x+"px -"+r.y+"px",o.width=r.w+"px",o.height=r.h+"px",o.url=r.image,o},Gt=(t,l)=>{fetch(t).then(o=>{if(!o.ok)throw chunkU4J4R2AO_js.R.dispatch(chunkU4J4R2AO_js.r({...chunkU4J4R2AO_js.R.getState().videoData.details,vtt:void 0,vtt_mobile:void 0})),new Error("Network response was not ok");return o.text()}).then(o=>{let i=[];o.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 a=p.split(/[\r\n]/i),h=a[0].split(/ ?--> ?/i),v=h[0],g=h[1],d=a[1],u=fl(d,t);i.push({start:Vt(v),end:Vt(g),css:u});}}),l(i);}).catch(o=>{console.error("Error fetching file:",o);});},Zt=(t,l,o)=>{for(let i=0;i<l.length;++i){let r=l[i];if(t>=r.start&&t<r.end){if(r.css.url&&!o[r.css.url]){let p={background:r.css.background,width:r.css.width,height:r.css.height};return o[r.css.url]=p,p}else if(r.css.url)return o[r.css.url]}}};var vl=()=>{let{details:t}=chunkU4J4R2AO_js.ja(({videoData:{details:c}})=>({details:c}),reactRedux.shallowEqual),{tooltipTime:l}=chunkU4J4R2AO_js.ja(({controller:{tooltipTime:c,activeElements:h,isFullScreen:v}})=>({tooltipTime:c,activeElements:h,isFullScreen:v}),reactRedux.shallowEqual),o={},[i,r]=react.useState(void 0),[p,a]=react.useState(chunkU4J4R2AO_js.ha("isTouchScreen")?t.vtt_mobile:t.vtt);return react.useEffect(()=>{a(t.vtt_mobile);},[t.vtt_mobile]),react.useEffect(()=>{p&&Gt(t.vtt_mobile,r);},[p]),chunkU4J4R2AO_js.ha("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:Zt(l,i,o)})}),jsxRuntime.jsx("div",{className:"pl-flex pl-items-center pl-justify-center pl-progressTimeTooltip pl-text-white !pl-opacity-100"})]}):jsxRuntime.jsx(jsxRuntime.Fragment,{})},jt=react.memo(vl);chunkWO4IQUGO_js.e();chunkWO4IQUGO_js.e();var bl=(t,l)=>{react.useEffect(()=>{let o=i=>{!t.current||t.current.contains(i.target)||l(i);};return document.addEventListener("mousedown",o),document.addEventListener("touchstart",o),()=>{document.removeEventListener("mousedown",o),document.removeEventListener("touchstart",o);}},[t,l]);},_=bl;chunkWO4IQUGO_js.e();var yl=({name:t,className:l,dataMarker:o})=>jsxRuntime.jsx("img",{"data-marker":o,src:`${chunkU4J4R2AO_js.ka()}/${t}.png`,alt:t,className:l}),ye=yl;var Cl=()=>{chunkU4J4R2AO_js.ia();let {duration:l,activeElements:o}=chunkU4J4R2AO_js.ja(({controller:{duration:m,activeElements:b,isFullScreen:le}})=>({duration:m,activeElements:b,isFullScreen:le}),reactRedux.shallowEqual),{markers:i}=chunkU4J4R2AO_js.ja(({videoData:{markers:m,videoElementSizeInfo:b}})=>({markers:m,videoElementSizeInfo:b}),reactRedux.shallowEqual),[r,p]=react.useState(void 0),[a,c]=react.useState([]),[h,v]=react.useState({}),[g,d]=react.useState(false),u=m=>l?chunkU4J4R2AO_js.qa()*m/l:0,T=(m,b,le,de,ue,ie,O,Xe)=>{m.stopPropagation();let V=24*b/(chunkU4J4R2AO_js.qa()+5),re=[],pe=0;Xe.map(R=>{R.time>b-V&&R.time<b+V&&(re.push(R),pe+=R.time);}),re.length>1?c(re):(re=[],c([]),f(m,b,le,de,ue,ie,O));},f=(m,b,le,de,ue,ie,O)=>{m.stopPropagation(),be(m,O),chunkLBYZQ7HZ_js.i(chunkU4J4R2AO_js.na().currentTime,b),chunkU4J4R2AO_js.na().currentTime=b,chunkU4J4R2AO_js.pa()&&(chunkU4J4R2AO_js.pa().style.width=u(b)),chunkU4J4R2AO_js.ma(chunkU4J4R2AO_js.Ga(le,b,de,ue,ie));};react.useEffect(()=>{chunkU4J4R2AO_js.ha("isActiveElements")||c([]);},[o]);let k=react.useRef(null);_(k,()=>c([])),react.useEffect(()=>{if(a.length>0){let m=chunkU4J4R2AO_js.fa(document.getElementsByClassName("pl-overlapMarkers")[0]);if(m==="inViewport")return d(true),v({left:u(a[0].time)});if(m==="OutViewPortFromLeft")return d(false),v({left:0});if(m==="OutViewPortFromRight")return d(false),v({right:0})}},[a,document.getElementsByClassName("pl-overlapMarkers")[0]]);let E=m=>{m.preventDefault(),chunkU4J4R2AO_js.ha("isTouchScreen")&&p(Number(m.target.getAttribute("data-marker")));};return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[i.map(m=>jsxRuntime.jsx("div",{onContextMenu:E,"data-marker":m.time,onClick:b=>T(b,m.time,m.id,m.title,m.description,m.sticker,true,i),onDoubleClick:b=>b.stopPropagation(),children:jsxRuntime.jsxs("div",{className:`pl-emoji-image pl-absolute pl-bottom-[200%] pl-bg-z-gray-700/[0.4] pl-rounded-[6px] pl-p-1 ${chunkU4J4R2AO_js.ha("isTouchScreenPortrait"),"pl-mb-5"} pl-ml-[-12px] pl-cursor-pointer`,style:{left:u(m.time),zIndex:6},"data-marker":m.time,children:[m.isPersonal!==null&&m.isPersonal!==void 0&&jsxRuntime.jsx("div",{className:"pl-absolute pl-rounded-full pl-top-[-2px] pl-right-[-1px] pl-bg-main pl-w-2 pl-h-2"}),jsxRuntime.jsx(ye,{dataMarker:m.time,name:m.sticker,className:"pl-w-[16px] pl-h-[16px] !pl-max-w-max"})]})},m.id)),a.length>0&&jsxRuntime.jsx("div",{className:`pl-overlapMarkers ${g?"pl-overlayMarkersInViewport":"pl-overlayMarkersOutViewport"} pl-absolute pl-bottom-[45px] pl-px-1 pl-py-2 pl-flex pl-gap-3 pl-flex-row-reverse pl-justify-end pl-bg-z-gray-700/[0.4] pl-rounded-[6px] pl-ml-[-10px] animate__animated animate__fadeInUp pl-opacity-100`,ref:k,style:h,children:a.map(m=>jsxRuntime.jsx("div",{className:"pl-emoji-image pl-rounded-[6px] pl-cursor-pointer","data-marker":m.time,onClick:b=>f(b,m.time,m.id,m.title,m.description,m.sticker,true),onDoubleClick:b=>b.stopPropagation(),children:jsxRuntime.jsx(ye,{dataMarker:m.time,name:m.sticker,className:"pl-w-[24px] pl-h-[24px] !pl-max-w-max"})},m.id))})]})},lo=react.memo(Cl);var Nl=()=>{let[t,l]=react.useState(false);react.useEffect(()=>{Se(document.querySelector(".progressTooltip"));},[]);let{duration:o,currentTime:i,bufferedTimeWidth:r}=chunkU4J4R2AO_js.ja(({controller:{duration:c,currentTime:h,bufferedTimeWidth:v}})=>({duration:c,currentTime:h,bufferedTimeWidth:v}),reactRedux.shallowEqual);chunkU4J4R2AO_js.ja(({videoData:{params:c,videoElementSizeInfo:h}})=>({params:c,videoElementSizeInfo:h}),reactRedux.shallowEqual);let[p,a]=react.useState([]);return jsxRuntime.jsxs("div",{className:`${chunkU4J4R2AO_js.ha("isTouchScreenPortrait")?"pl-order-1":"pl-order-none"} pl-relative`,children:[jsxRuntime.jsxs("div",{className:"pl-relative",children:[jsxRuntime.jsx(jt,{}),jsxRuntime.jsx(lo,{})]}),jsxRuntime.jsx("div",{className:"pl-w-full pl-flex pl-items-end",onPointerDown:c=>Xt(c,p,l),onPointerMove:Qe,onPointerUp:c=>Rt(c,a,p,l),onMouseMove:Wt,onMouseOut:Qt,onClick:Ut,onDoubleClick:c=>c.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:t?"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 ${t&&"before:pl-w-7 before:pl-h-3"}`,style:{width:`${i/o*chunkU4J4R2AO_js.qa()}px`}})]})]})})]})},po=Nl;chunkWO4IQUGO_js.e();chunkWO4IQUGO_js.e();var Al=()=>{let[t,l]=react.useState(false),o=chunkU4J4R2AO_js.ia(),{params:i,details:r}=chunkU4J4R2AO_js.ja(({videoData:{params:p,details:a}})=>({params:p,details:a}),reactRedux.shallowEqual);return jsxRuntime.jsxs("div",{className:"pl-relative pl-flex pl-items-center",children:[jsxRuntime.jsx(G__default.default,{alt:"",onMouseOver:()=>!chunkU4J4R2AO_js.ha("isTouchScreen")&&l(true),onMouseLeave:()=>!chunkU4J4R2AO_js.ha("isTouchScreen")&&l(false),src:chunk3VH6NKXH_js.a.pictureInPicture,width:20,height:20,className:"pl-flex pl-cursor-pointer",onClick:()=>{i.onClickMiniPlayerIcon&&(localStorage.removeItem("close-miniPlayer"),chunkU4J4R2AO_js.na()?.pause(),o(chunkU4J4R2AO_js.a(false)),i.onClickMiniPlayerIcon({video:r||void 0,id:i.type==="vod"?i.id:window.btoa(i.id),type:i.type,currentTime:chunkU4J4R2AO_js.na().currentTime}));}}),t&&jsxRuntime.jsx(chunk2EYLIYZS_js.a,{title:"\u062A\u0635\u0648\u06CC\u0631 \u062F\u0631 \u062A\u0635\u0648\u06CC\u0631 "})]})},no=Al;chunkWO4IQUGO_js.e();chunkWO4IQUGO_js.e();zo__default.default(()=>import('./closeIcon-J2PRZHPF.js'));var co=react.forwardRef(({children:t,status:l,onClose:o,type:i,classNames:r,parentClassNames:p,styles:a,isBlurBackground:c,isFullHeight:h=false,isFullScreen:v,isHeader:g,headerTitle:d="",customHeader:u,headerClassName:T,isHasCatchUpLineOnTop:f=false,animation:k,scrollbar:E=false,isFocusOnInput:m=false,showCloseIcon:b=true,pinContent:le},de)=>{let[ue,ie]=react.useState(l),[O,Xe]=react.useState(0),[Z,V]=react.useState(0),[re,pe]=react.useState(0),{videoElementSizeInfo:R}=chunkU4J4R2AO_js.ja(({videoData:{videoElementSizeInfo:U}})=>({videoElementSizeInfo:U}),reactRedux.shallowEqual);react.useEffect(()=>{let U;return l?ie(true):U=setTimeout(()=>{o(false),V(0),ie(false);},500),()=>clearTimeout(U)},[l]);let Qo=U=>{U.touches[0].clientY>=R.top?V(window.innerHeight-U.touches[0].clientY):V(window.innerHeight-R.top),pe(1005);},Go=()=>{Z!==0&&(Z>O?Z-O>(window.innerHeight-R.top-O)/2?(V(window.innerHeight-R.top),pe(1005)):(V(0),setTimeout(()=>pe(0),500)):(Z>O/2?V(O):(V(0),Xe(0),o()),pe(0)));},st=jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[c&&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 ${l?"animate__fadeIn":"animate__fadeOut"}`,style:{zIndex:1001,backdropFilter:"blur(4px)"}}),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:h&&!m?re:1004},children:jsxRuntime.jsx("div",{className:`pl-flex pl-flex-col pl-rounded-[8px] animate__animated animate__faster pl-bg-white/[0.9] dark:pl-bg-black/[0.7]
1
+ 'use strict';var chunkSSP53RHG_js=require('./chunk-SSP53RHG.js'),chunkIBFNXFB7_js=require('./chunk-IBFNXFB7.js'),chunk7VRL2XF3_js=require('./chunk-7VRL2XF3.js'),chunk2EYLIYZS_js=require('./chunk-2EYLIYZS.js'),chunkMDGSHW2K_js=require('./chunk-MDGSHW2K.js'),chunkQHZJEU27_js=require('./chunk-QHZJEU27.js'),chunkLBYZQ7HZ_js=require('./chunk-LBYZQ7HZ.js'),chunk3VH6NKXH_js=require('./chunk-3VH6NKXH.js'),chunkU4J4R2AO_js=require('./chunk-U4J4R2AO.js'),chunkWO4IQUGO_js=require('./chunk-WO4IQUGO.js'),react=require('react'),reactRedux=require('react-redux'),jsxRuntime=require('react/jsx-runtime'),G=require('next/legacy/image'),reactDom=require('react-dom'),zo=require('next/dynamic');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var G__default=/*#__PURE__*/_interopDefault(G);var zo__default=/*#__PURE__*/_interopDefault(zo);chunkWO4IQUGO_js.e();chunkWO4IQUGO_js.e();chunkWO4IQUGO_js.e();var Yo=()=>{let{details:t,params:l}=chunkU4J4R2AO_js.ja(({videoData:{details:o,params:i}})=>({details:o,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 ${chunkU4J4R2AO_js.ha("isActiveElements")?"animate__fadeIn pl-opacity-100":"pl-opacity-0 animate__fadeOut"}`,children:chunkU4J4R2AO_js.ha("hasTitle")?t.title:l.id})},Lt=Yo;chunkWO4IQUGO_js.e();var jo=()=>jsxRuntime.jsxs("div",{className:`pl-relative animate__animated animate__faster ${chunkU4J4R2AO_js.ha("isActiveElements")?"animate__fadeIn pl-pointer-events-auto":"animate__fadeOut pl-pointer-events-none"}`,children:[jsxRuntime.jsx(G__default.default,{src:chunk3VH6NKXH_js.a.lock,alt:"lock-icon",width:20,height:20,onClick:()=>chunkLBYZQ7HZ_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"})]}),$t=jo;var ol=()=>(chunkU4J4R2AO_js.ja(({controller:{lock:t,activeElements:l}})=>({lock:t,activeElements:l}),reactRedux.shallowEqual),jsxRuntime.jsxs("div",{className:`pl-flex pl-items-start pl-justify-end pl-mx-8 pl-pt-8 ${chunkU4J4R2AO_js.ha("isTouchScreenPortrait")?"pl-h-[16px]":"pl-h-[60px]"}`,children:[chunkU4J4R2AO_js.ha("showTitle")&&jsxRuntime.jsx(Lt,{}),chunkU4J4R2AO_js.ha("isLock")&&jsxRuntime.jsx($t,{})]})),Dt=ol;chunkWO4IQUGO_js.e();var il=()=>{let[t,l]=react.useState(false),[o,i]=react.useState(false),{firstPlay:r}=chunkU4J4R2AO_js.ja(({controller:{lock:c,firstPlay:h}})=>({lock:c,firstPlay:h}),reactRedux.shallowEqual),{activeElements:p,isLoading:a}=chunkU4J4R2AO_js.ja(({controller:{activeElements:c,isLoading:h}})=>({activeElements:c,isLoading:h}),reactRedux.shallowEqual);return react.useEffect(()=>{let c=null;return chunkU4J4R2AO_js.ha("isFirstPlay")||chunkU4J4R2AO_js.ha("isActiveElements")?c=setTimeout(()=>i(true),100):i(false),()=>clearTimeout(c)},[p]),react.useEffect(()=>{let c;return chunkU4J4R2AO_js.ha("isLoading")?c=setTimeout(()=>l(true),chunkU4J4R2AO_js.ha("isFirstPlay")?0:chunkQHZJEU27_js.b):l(false),()=>{clearTimeout(c),l(false);}},[a,r]),jsxRuntime.jsx("main",{className:"pl-flex-1 pl-mt-1",children:t?jsxRuntime.jsx(chunkIBFNXFB7_js.a,{}):jsxRuntime.jsx(jsxRuntime.Fragment,{children:o&&!chunkU4J4R2AO_js.ha("isLock")&&jsxRuntime.jsx("div",{id:"main-content",className:`pl-h-full pl-flex pl-justify-center pl-items-center pl-text-center pl-relative ${chunkU4J4R2AO_js.ha("isActiveElements")?"pl-pointer-events-auto":"pl-pointer-events-none"}`,children:jsxRuntime.jsxs("div",{onClick:c=>c.stopPropagation(),className:"pl-flex pl-justify-center pl-gap-8 pl-items-center pl-w-max",style:{zIndex:3},children:[!chunkU4J4R2AO_js.ha("isFirstPlay")&&jsxRuntime.jsx(chunkMDGSHW2K_js.a,{type:"forward"}),jsxRuntime.jsx(chunkIBFNXFB7_js.b,{}),!chunkU4J4R2AO_js.ha("isFirstPlay")&&jsxRuntime.jsx(chunkMDGSHW2K_js.a,{type:"backward"})]})})})})},Bt=il;chunkWO4IQUGO_js.e();chunkWO4IQUGO_js.e();chunkWO4IQUGO_js.e();chunkWO4IQUGO_js.e();var We=t=>{let{videoElementSizeInfo:l}=chunkU4J4R2AO_js.R.getState().videoData,{duration:o}=chunkU4J4R2AO_js.R.getState().controller,i=t.clientX!==void 0?t.clientX:t.touches[0].clientX;if(i<=l.right&&i>0)return (i-l.left)/l.width*o},te=t=>{let{videoElementSizeInfo:l}=chunkU4J4R2AO_js.R.getState().videoData,o=t.clientX!==void 0?t.clientX:t.touches[0].clientX;if(o<=l.right&&o>0)return o-l.left},Ht=t=>{let{duration:l}=chunkU4J4R2AO_js.R.getState().controller;return t*chunkU4J4R2AO_js.qa()/l},Se=t=>{t&&(t.style.opacity="0.0",t.style.pointerEvents="none",t.style.zIndex=-2);},sl=t=>{t.style.display="block",t.style.zIndex=5,t.style.opacity=chunkU4J4R2AO_js.R.getState().videoData.details.vtt?"1.0":"0.6",t.style.pointerEvents="auto",t.style.transition="opacity 1s ease-out";},nl=(t,l)=>{let{videoElementSizeInfo:o}=chunkU4J4R2AO_js.R.getState().videoData,i=document.getElementsByClassName("pl-progressTooltip")[0],r=document.getElementById("parent-player");i&&r&&(te(t)>i.getBoundingClientRect().width/2&&te(t)<o.right-o.left-i.getBoundingClientRect().width/2?l.style.left=`${te(t)-i.offsetWidth/2}px`:te(t)<(r.offsetLeft===0?i.offsetWidth:r.offsetLeft)?l.style.left="0px":chunkU4J4R2AO_js.na().offsetLeft+chunkU4J4R2AO_js.na().offsetWidth<te(t)+i.offsetWidth&&(l.style.left=`${chunkU4J4R2AO_js.na().offsetWidth-i.offsetWidth}px`));},al=(t,l,o)=>{l&&sl(l),chunkU4J4R2AO_js.R.getState().videoData.details.vtt?nl(t,l):l.style.left=`${te(t)-30}px`,chunkU4J4R2AO_js.R.dispatch(chunkU4J4R2AO_js.q(Number(We(t)))),o.textContent=`${chunkU4J4R2AO_js.U(We(t))}`;},be=(t,l=false)=>{let{videoElementSizeInfo:o}=chunkU4J4R2AO_js.R.getState().videoData,i=document.querySelector(".pl-progressTooltip"),r=document.querySelector(".pl-progressTimeTooltip"),p=t.clientX!==void 0?t.clientX:t.touches[0].clientX;i&&r&&p<=o.right&&p>o.left?(al(t,i,r),l&&setTimeout(()=>Se(i),2e3)):Se(i);},qt=t=>{let l=t.clientX!==void 0?t.clientX:t.touches[0].clientX;chunkU4J4R2AO_js.pa()&&(l<=t.view.innerWidth&&l>0?chunkU4J4R2AO_js.pa().style.width=`${te(t)}px`:l<=t.view.innerWidth?chunkU4J4R2AO_js.pa().style.width=0:l>0&&(chunkU4J4R2AO_js.pa().style.width="100%"));},Xt=(t,l,o)=>{t.preventDefault(),t.stopPropagation(),o(true);let i=chunkU4J4R2AO_js.R.dispatch,r=t.clientX!==void 0?t.clientX:t.touches[0].clientX;r<=t.view.innerWidth&&r>0&&(i(chunkU4J4R2AO_js.k(true)),i(chunkU4J4R2AO_js.l(true)),sessionStorage.setItem("previousVideoTime",String(chunkU4J4R2AO_js.na().currentTime)),t.target.setPointerCapture(t.pointerId),l.length>0&&l.map(p=>clearTimeout(p)));},Qe=t=>{t.preventDefault(),t.stopPropagation();let l=chunkU4J4R2AO_js.R.dispatch,{activePointerProgressBar:o}=chunkU4J4R2AO_js.R.getState().controller,{left:i}=chunkU4J4R2AO_js.R.getState().videoData.videoElementSizeInfo,r=t.clientX!==void 0?t.clientX:t.touches[0].clientX,p=document.querySelector(".pl-progressTooltip");r>i?(p&&(p.style.display="block !important",p.style.pointerEvents="auto"),o&&(l(chunkU4J4R2AO_js.l(true)),be(t),qt(t),chunkU4J4R2AO_js.na()?.pause())):p&&(p.style.display="none !important",p.style.pointerEvents="none");},Rt=(t,l,o,i)=>{i(false),t.preventDefault(),t.stopPropagation();let r=chunkU4J4R2AO_js.R.dispatch,{duration:p}=chunkU4J4R2AO_js.R.getState().controller,{left:a,right:c}=chunkU4J4R2AO_js.R.getState().videoData.videoElementSizeInfo,h=chunkU4J4R2AO_js.R.getState().videoData.params;t.target.removeEventListener("pointermove",Qe);let v=t.clientX!==void 0?t.clientX:t.touches[0].clientX,g=0;v>a&&v<c?g=We(t):v<a?g=0:v>0&&(g=p),chunkU4J4R2AO_js.ha("isStaticFormat")||chunkLBYZQ7HZ_js.i(chunkU4J4R2AO_js.na().currentTime,g),chunkU4J4R2AO_js.na().currentTime=g,chunkU4J4R2AO_js.ha("hasOnChangeCurrentTime")&&h.onChangeCurrentTime(g),chunkU4J4R2AO_js.R.getState().controller.activePointerProgressBar&&(r(chunkU4J4R2AO_js.k(false)),r(chunkU4J4R2AO_js.l(false)),chunkU4J4R2AO_js.na().play(),be(t,true),sessionStorage.setItem("current-time",String(g)),qt(t),cl(t,r,l,o));},cl=(t,l,o,i)=>{let r=i,p=setTimeout(()=>{let{settingPopover:a}=chunkU4J4R2AO_js.R.getState().popovers,{delayTurnOffControlbar:c}=chunkU4J4R2AO_js.R.getState().controller;t.pointerType==="touch"&&!a&&c&&l(chunkU4J4R2AO_js.f(false));},chunkQHZJEU27_js.a);r.push(p),o(r);},Ut=()=>{let t=Date.now();chunkU4J4R2AO_js.na().play().then(()=>chunkU4J4R2AO_js.ma(chunkU4J4R2AO_js.ta(Date.now()-t)));},Wt=t=>be(t),Qt=()=>{let t=document.querySelector(".pl-progressTooltip");Se(t);},ml=t=>{let l=t.split("."),i=l[0].split(":");return {milliseconds:parseInt(l[1],10)||0,seconds:parseInt(i.pop(),10)||0,minutes:parseInt(i.pop(),10)||0,hours:parseInt(i.pop(),10)||0}},Vt=t=>{let l=ml(t);return parseInt(l.hours*3600+l.minutes*60+l.seconds+l.milliseconds/1e3,10)},dl=t=>{let l=t.split(/#xywh=/i),o=l[0],r=l[1].match(/[0-9]+/gi);return {x:r[0],y:r[1],w:r[2],h:r[3],image:o}},ul=(t,l)=>t.indexOf("//")>=0?t:l.indexOf("//")===0?[l.replace(/\/$/gi,""),t.trim()].join("/"):l.indexOf("//")>0?[l.trim(),t.trim()].join("/"):t,fl=(t,l)=>{let o={},i=l.split(/\/\w+\.vtt\s?/)[0];if(t=ul(t,i),!t.match(/#xywh=/i))return o.background='url("'+t+l.split(/\/\w+\.vtt\s?/)[1]+'")',o;let r=dl(t);return o.background='url("'+r.image+l.split(/\/\w+\.vtt\s?/)[1]+'") no-repeat -'+r.x+"px -"+r.y+"px",o.width=r.w+"px",o.height=r.h+"px",o.url=r.image,o},Gt=(t,l)=>{fetch(t).then(o=>{if(!o.ok)throw chunkU4J4R2AO_js.R.dispatch(chunkU4J4R2AO_js.r({...chunkU4J4R2AO_js.R.getState().videoData.details,vtt:void 0,vtt_mobile:void 0})),new Error("Network response was not ok");return o.text()}).then(o=>{let i=[];o.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 a=p.split(/[\r\n]/i),h=a[0].split(/ ?--> ?/i),v=h[0],g=h[1],d=a[1],u=fl(d,t);i.push({start:Vt(v),end:Vt(g),css:u});}}),l(i);}).catch(o=>{console.error("Error fetching file:",o);});},Zt=(t,l,o)=>{for(let i=0;i<l.length;++i){let r=l[i];if(t>=r.start&&t<r.end){if(r.css.url&&!o[r.css.url]){let p={background:r.css.background,width:r.css.width,height:r.css.height};return o[r.css.url]=p,p}else if(r.css.url)return o[r.css.url]}}};var vl=()=>{let{details:t}=chunkU4J4R2AO_js.ja(({videoData:{details:c}})=>({details:c}),reactRedux.shallowEqual),{tooltipTime:l}=chunkU4J4R2AO_js.ja(({controller:{tooltipTime:c,activeElements:h,isFullScreen:v}})=>({tooltipTime:c,activeElements:h,isFullScreen:v}),reactRedux.shallowEqual),o={},[i,r]=react.useState(void 0),[p,a]=react.useState(chunkU4J4R2AO_js.ha("isTouchScreen")?t.vtt_mobile:t.vtt);return react.useEffect(()=>{a(t.vtt_mobile);},[t.vtt_mobile]),react.useEffect(()=>{p&&Gt(t.vtt_mobile,r);},[p]),chunkU4J4R2AO_js.ha("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:Zt(l,i,o)})}),jsxRuntime.jsx("div",{className:"pl-flex pl-items-center pl-justify-center pl-progressTimeTooltip pl-text-white !pl-opacity-100"})]}):jsxRuntime.jsx(jsxRuntime.Fragment,{})},jt=react.memo(vl);chunkWO4IQUGO_js.e();chunkWO4IQUGO_js.e();var bl=(t,l)=>{react.useEffect(()=>{let o=i=>{!t.current||t.current.contains(i.target)||l(i);};return document.addEventListener("mousedown",o),document.addEventListener("touchstart",o),()=>{document.removeEventListener("mousedown",o),document.removeEventListener("touchstart",o);}},[t,l]);},_=bl;chunkWO4IQUGO_js.e();var yl=({name:t,className:l,dataMarker:o})=>jsxRuntime.jsx("img",{"data-marker":o,src:`${chunkU4J4R2AO_js.ka()}/${t}.png`,alt:t,className:l}),ye=yl;var Cl=()=>{chunkU4J4R2AO_js.ia();let {duration:l,activeElements:o}=chunkU4J4R2AO_js.ja(({controller:{duration:m,activeElements:b,isFullScreen:le}})=>({duration:m,activeElements:b,isFullScreen:le}),reactRedux.shallowEqual),{markers:i}=chunkU4J4R2AO_js.ja(({videoData:{markers:m,videoElementSizeInfo:b}})=>({markers:m,videoElementSizeInfo:b}),reactRedux.shallowEqual),[r,p]=react.useState(void 0),[a,c]=react.useState([]),[h,v]=react.useState({}),[g,d]=react.useState(false),u=m=>l?chunkU4J4R2AO_js.qa()*m/l:0,T=(m,b,le,de,ue,ie,O,Xe)=>{m.stopPropagation();let V=24*b/(chunkU4J4R2AO_js.qa()+5),re=[],pe=0;Xe.map(R=>{R.time>b-V&&R.time<b+V&&(re.push(R),pe+=R.time);}),re.length>1?c(re):(re=[],c([]),f(m,b,le,de,ue,ie,O));},f=(m,b,le,de,ue,ie,O)=>{m.stopPropagation(),be(m,O),chunkLBYZQ7HZ_js.i(chunkU4J4R2AO_js.na().currentTime,b),chunkU4J4R2AO_js.na().currentTime=b,chunkU4J4R2AO_js.pa()&&(chunkU4J4R2AO_js.pa().style.width=u(b)),chunkU4J4R2AO_js.ma(chunkU4J4R2AO_js.Ga(le,b,de,ue,ie));};react.useEffect(()=>{chunkU4J4R2AO_js.ha("isActiveElements")||c([]);},[o]);let k=react.useRef(null);_(k,()=>c([])),react.useEffect(()=>{if(a.length>0){let m=chunkU4J4R2AO_js.fa(document.getElementsByClassName("pl-overlapMarkers")[0]);if(m==="inViewport")return d(true),v({left:u(a[0].time)});if(m==="OutViewPortFromLeft")return d(false),v({left:0});if(m==="OutViewPortFromRight")return d(false),v({right:0})}},[a,document.getElementsByClassName("pl-overlapMarkers")[0]]);let E=m=>{m.preventDefault(),chunkU4J4R2AO_js.ha("isTouchScreen")&&p(Number(m.target.getAttribute("data-marker")));};return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[i.map(m=>jsxRuntime.jsx("div",{onContextMenu:E,"data-marker":m.time,onClick:b=>T(b,m.time,m.id,m.title,m.description,m.sticker,true,i),onDoubleClick:b=>b.stopPropagation(),children:jsxRuntime.jsxs("div",{className:`pl-emoji-image pl-absolute pl-bottom-[200%] pl-bg-z-gray-700/[0.4] pl-rounded-[6px] pl-p-1 ${chunkU4J4R2AO_js.ha("isTouchScreenPortrait"),"pl-mb-5"} pl-ml-[-12px] pl-cursor-pointer`,style:{left:u(m.time),zIndex:6},"data-marker":m.time,children:[m.isPersonal!==null&&m.isPersonal!==void 0&&jsxRuntime.jsx("div",{className:"pl-absolute pl-rounded-full pl-top-[-2px] pl-right-[-1px] pl-bg-main pl-w-2 pl-h-2"}),jsxRuntime.jsx(ye,{dataMarker:m.time,name:m.sticker,className:"pl-w-[16px] pl-h-[16px] !pl-max-w-max"})]})},m.id)),a.length>0&&jsxRuntime.jsx("div",{className:`pl-overlapMarkers ${g?"pl-overlayMarkersInViewport":"pl-overlayMarkersOutViewport"} pl-absolute pl-bottom-[45px] pl-px-1 pl-py-2 pl-flex pl-gap-3 pl-flex-row-reverse pl-justify-end pl-bg-z-gray-700/[0.4] pl-rounded-[6px] pl-ml-[-10px] animate__animated animate__fadeInUp pl-opacity-100`,ref:k,style:h,children:a.map(m=>jsxRuntime.jsx("div",{className:"pl-emoji-image pl-rounded-[6px] pl-cursor-pointer","data-marker":m.time,onClick:b=>f(b,m.time,m.id,m.title,m.description,m.sticker,true),onDoubleClick:b=>b.stopPropagation(),children:jsxRuntime.jsx(ye,{dataMarker:m.time,name:m.sticker,className:"pl-w-[24px] pl-h-[24px] !pl-max-w-max"})},m.id))})]})},lo=react.memo(Cl);var Nl=()=>{let[t,l]=react.useState(false);react.useEffect(()=>{Se(document.querySelector(".progressTooltip"));},[]);let{duration:o,currentTime:i,bufferedTimeWidth:r}=chunkU4J4R2AO_js.ja(({controller:{duration:c,currentTime:h,bufferedTimeWidth:v}})=>({duration:c,currentTime:h,bufferedTimeWidth:v}),reactRedux.shallowEqual);chunkU4J4R2AO_js.ja(({videoData:{params:c,videoElementSizeInfo:h}})=>({params:c,videoElementSizeInfo:h}),reactRedux.shallowEqual);let[p,a]=react.useState([]);return jsxRuntime.jsxs("div",{className:`${chunkU4J4R2AO_js.ha("isTouchScreenPortrait")?"pl-order-1":"pl-order-none"} pl-relative`,children:[jsxRuntime.jsxs("div",{className:"pl-relative",children:[jsxRuntime.jsx(jt,{}),jsxRuntime.jsx(lo,{})]}),jsxRuntime.jsx("div",{className:"pl-w-full pl-flex pl-items-end",onPointerDown:c=>Xt(c,p,l),onPointerMove:Qe,onPointerUp:c=>Rt(c,a,p,l),onMouseMove:Wt,onMouseOut:Qt,onClick:Ut,onDoubleClick:c=>c.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:t?"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 ${t&&"before:pl-w-7 before:pl-h-3"}`,style:{width:`${i/o*chunkU4J4R2AO_js.qa()}px`}})]})]})})]})},po=Nl;chunkWO4IQUGO_js.e();chunkWO4IQUGO_js.e();var Al=()=>{let[t,l]=react.useState(false),o=chunkU4J4R2AO_js.ia(),{params:i,details:r}=chunkU4J4R2AO_js.ja(({videoData:{params:p,details:a}})=>({params:p,details:a}),reactRedux.shallowEqual);return jsxRuntime.jsxs("div",{className:"pl-relative pl-flex pl-items-center",children:[jsxRuntime.jsx(G__default.default,{alt:"",onMouseOver:()=>!chunkU4J4R2AO_js.ha("isTouchScreen")&&l(true),onMouseLeave:()=>!chunkU4J4R2AO_js.ha("isTouchScreen")&&l(false),src:chunk3VH6NKXH_js.a.pictureInPicture,width:20,height:20,className:"pl-flex pl-cursor-pointer",onClick:()=>{i.onClickMiniPlayerIcon&&(localStorage.removeItem("close-miniPlayer"),chunkU4J4R2AO_js.na()?.pause(),o(chunkU4J4R2AO_js.a(false)),i.onClickMiniPlayerIcon({video:r||void 0,id:i.type==="vod"?i.id:window.btoa(i.id),type:i.type,currentTime:chunkU4J4R2AO_js.na().currentTime}));}}),t&&jsxRuntime.jsx(chunk2EYLIYZS_js.a,{title:"\u062A\u0635\u0648\u06CC\u0631 \u062F\u0631 \u062A\u0635\u0648\u06CC\u0631 "})]})},no=Al;chunkWO4IQUGO_js.e();chunkWO4IQUGO_js.e();zo__default.default(()=>import('./closeIcon-J2PRZHPF.js'));var co=react.forwardRef(({children:t,status:l,onClose:o,type:i,classNames:r,parentClassNames:p,styles:a,isBlurBackground:c,isFullHeight:h=false,isFullScreen:v,isHeader:g,headerTitle:d="",customHeader:u,headerClassName:T,isHasCatchUpLineOnTop:f=false,animation:k,scrollbar:E=false,isFocusOnInput:m=false,showCloseIcon:b=true,pinContent:le},de)=>{let[ue,ie]=react.useState(l),[O,Xe]=react.useState(0),[Z,V]=react.useState(0),[re,pe]=react.useState(0),{videoElementSizeInfo:R}=chunkU4J4R2AO_js.ja(({videoData:{videoElementSizeInfo:U}})=>({videoElementSizeInfo:U}),reactRedux.shallowEqual);react.useEffect(()=>{let U;return l?ie(true):U=setTimeout(()=>{o(false),V(0),ie(false);},500),()=>clearTimeout(U)},[l]);let Qo=U=>{U.touches[0].clientY>=R.top?V(window.innerHeight-U.touches[0].clientY):V(window.innerHeight-R.top),pe(1005);},Go=()=>{Z!==0&&(Z>O?Z-O>(window.innerHeight-R.top-O)/2?(V(window.innerHeight-R.top),pe(1005)):(V(0),setTimeout(()=>pe(0),500)):(Z>O/2?V(O):(V(0),Xe(0),o()),pe(0)));},st=jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[c&&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 ${l?"animate__fadeIn":"animate__fadeOut"}`,style:{zIndex:1001,backdropFilter:"blur(4px)"}}),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:h&&!m?re:1004},children:jsxRuntime.jsx("div",{className:`pl-flex pl-flex-col pl-rounded-[8px] animate__animated animate__faster pl-bg-white/[0.9] dark:pl-bg-black/[0.7]
2
2
  ${h&&"pl-h-full"}
3
3
  ${k||(window.innerWidth>768&&i==="modal"?l?"animate__fadeIn":"animate__fadeOut":l?"animate__fadeInUp":"animate__fadeOutDown")}
4
4
  before:pl-hidden
5
5
  ${i!=="modal"&&"pl-absolute pl-bottom-[130%] pl-overflow-auto no-scrollbar"}
6
6
  ${r}
7
- `,style:{maxHeight:v?"unset":Z||O||"",zIndex:1004,...a},ref:de,id:"popover-content",children:jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[g&&jsxRuntime.jsx("div",{onTouchMove:f?Qo:()=>{},onTouchEndCapture:f?Go:()=>{},className:"pl-py-4",children:f&&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",{id:"popover-content",className:`pl-overflow-y-auto pl-h-full pl-w-full ${!E&&"no-scrollbar"}`,onTouchMove:U=>U.stopPropagation(),children:t})]})})})]});return jsxRuntime.jsx(jsxRuntime.Fragment,{children:ue&&jsxRuntime.jsx(jsxRuntime.Fragment,{children:i==="modal"?reactDom.createPortal(jsxRuntime.jsx(jsxRuntime.Fragment,{children:st}),document.getElementById("dialog-react-root-videoPlayer")):jsxRuntime.jsx("div",{id:"player-popover",children:st})})})});co.displayName="popover";var q=co;chunkWO4IQUGO_js.e();var ql=({setSection:t,showQualityLevelsIcon:l})=>{let o=chunkU4J4R2AO_js.ia(),{qualityLevels:i}=chunkU4J4R2AO_js.ja(({controller:{qualityLevels:u,manualQuality:T,autoQuality:f}})=>({qualityLevels:u,manualQuality:T,autoQuality:f}),reactRedux.shallowEqual),{settings:r}=chunkU4J4R2AO_js.ja(({user:{settings:u}})=>({settings:u}),reactRedux.shallowEqual),{qualityLevelsPopover:p}=chunkU4J4R2AO_js.ja(({popovers:{qualityLevelsPopover:u}})=>({qualityLevelsPopover:u}),reactRedux.shallowEqual),{videoElementSizeInfo:a}=chunkU4J4R2AO_js.ja(({videoData:{params:u,videoElementSizeInfo:T}})=>({params:u,videoElementSizeInfo:T}),reactRedux.shallowEqual),[c,h]=react.useState(false);i=[-1,...i];let v=(u,T)=>chunkU4J4R2AO_js.ha("isAutoQuality")&&T===-1?true:!chunkU4J4R2AO_js.ha("isAutoQuality")&&r.quality===u,g=react.useRef(null);_(g,()=>o(chunkU4J4R2AO_js.H(false)));let d=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,T)=>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 ${v(T-1,u)&&"pl-bg-primary/[0.12] !pl-cursor-default"} ${chunkU4J4R2AO_js.ha("isTouchScreen")?"pl-py-[13.5px]":"pl-py-[9.5px]"}`,onClick:v(T-1,u)?()=>{}:()=>{chunkU4J4R2AO_js.ma(chunkU4J4R2AO_js.sa(u===-1?"auto":`${u}P`)),o(chunkU4J4R2AO_js.f(false)),o(chunkU4J4R2AO_js.F(false)),o(chunkU4J4R2AO_js.H(false)),o(chunkU4J4R2AO_js.L({...r,quality:u===-1?-1:T-1})),t&&t("main");},children:[!chunkU4J4R2AO_js.ha("isTouchScreen")&&v(T-1,u)&&jsxRuntime.jsx("div",{className:"pl-absolute pl-right-[11.8px]",children:jsxRuntime.jsx(G__default.default,{src:chunk3VH6NKXH_js.a.tick,alt:"",width:12,height:9})}),chunkU4J4R2AO_js.ha("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 ${v(T-1,u)&&"pl-border-primary"}`,children:v(T-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] ${chunkU4J4R2AO_js.ha("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`})]},T))})});return jsxRuntime.jsx(jsxRuntime.Fragment,{children:l?jsxRuntime.jsxs("div",{className:"pl-relative pl-flex pl-items-center",ref:g,children:[jsxRuntime.jsx(G__default.default,{src:chunk3VH6NKXH_js.a.qualitySetting1,alt:"speed-icon",width:20,height:20,onClick:()=>o(chunkU4J4R2AO_js.H(!p)),onMouseOver:()=>!chunkU4J4R2AO_js.ha("isTouchScreen")&&!chunkU4J4R2AO_js.ha("showQualityLevelsPopover")&&h(true),onMouseLeave:()=>!chunkU4J4R2AO_js.ha("isTouchScreen")&&h(false),className:"pl-cursor-pointer"}),c&&jsxRuntime.jsx(chunk2EYLIYZS_js.a,{title:"\u06A9\u06CC\u0641\u06CC\u062A"}),jsxRuntime.jsx(q,{classNames:`!pl-p-0 pl-overflow-hidden !pl-bg-white ${chunkU4J4R2AO_js.ha("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]"} ${chunkU4J4R2AO_js.ha("isTouchScreenPortrait")&&"!pl-w-screen tablet:pl-max-w-[440px]"} ${chunkU4J4R2AO_js.ha("isTouchScreenLandscape")&&"pl-w-full pl-max-w-[440px]"}`,status:p,onClose:()=>o(chunkU4J4R2AO_js.H(false)),type:chunkU4J4R2AO_js.ha("isTouchScreen")?"modal":"popover",isBlurBackground:chunkU4J4R2AO_js.ha("isTouchScreenPortrait"),ref:chunkU4J4R2AO_js.ha("isTouchScreen")?g:void 0,isHeader:chunkU4J4R2AO_js.ha("isTouchScreen"),customHeader:jsxRuntime.jsx(jsxRuntime.Fragment,{}),isHasCatchUpLineOnTop:chunkU4J4R2AO_js.ha("isTouchScreen"),styles:{maxHeight:!chunkU4J4R2AO_js.ha("isTouchScreenPortrait")&&a.height-(chunkU4J4R2AO_js.ha("isTouchScreenLandscape")?120:75)},children:d})]}):jsxRuntime.jsx(jsxRuntime.Fragment,{children:d})})},De=react.memo(ql);chunkWO4IQUGO_js.e();chunkWO4IQUGO_js.e();var Xl=({className:t,onClick:l,onMouseOver:o,onMouseLeave:i})=>jsxRuntime.jsxs("svg",{width:"18",height:"15",viewBox:"0 0 18 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,onClick:l,onMouseOver:o,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"})]}),_e=Xl;var Zl=[.5,.75,1,1.25,1.5,1.75,2],Yl=({setSection:t,showSpeedIcon:l})=>{let o=chunkU4J4R2AO_js.ia(),{videoElementSizeInfo:i,params:r}=chunkU4J4R2AO_js.ja(({videoData:{videoElementSizeInfo:d,params:u}})=>({videoElementSizeInfo:d,params:u}),reactRedux.shallowEqual),{speedPopover:p}=chunkU4J4R2AO_js.ja(({popovers:{speedPopover:d}})=>({speedPopover:d}),reactRedux.shallowEqual),{settings:a}=chunkU4J4R2AO_js.ja(({user:{settings:d}})=>({settings:d}),reactRedux.shallowEqual),c=react.useRef(null),[h,v]=react.useState(false);_(c,()=>o(chunkU4J4R2AO_js.G(false))),react.useEffect(()=>{chunkU4J4R2AO_js.na()&&(chunkU4J4R2AO_js.na().playbackRate=a.speed);},[]);let g=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:Zl.map((d,u)=>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 ${a.speed===d&&"pl-bg-primary/[0.12] !pl-cursor-default"} ${chunkU4J4R2AO_js.ha("isTouchScreen")?"pl-py-[13.5px]":"pl-py-[9.5px]"}`,onClick:a.speed===d?()=>{}:()=>{chunkU4J4R2AO_js.ha("isStaticFormat")||chunkU4J4R2AO_js.ma(chunkU4J4R2AO_js.ra(d)),o(chunkU4J4R2AO_js.f(false)),o(chunkU4J4R2AO_js.F(false)),o(chunkU4J4R2AO_js.G(false)),o(chunkU4J4R2AO_js.L({...a,speed:d})),chunkU4J4R2AO_js.na().playbackRate=d,t&&t("main"),r.onSpeedChange&&r.onSpeedChange(a.speed,d);},children:[!chunkU4J4R2AO_js.ha("isTouchScreen")&&a.speed===d&&jsxRuntime.jsx("div",{className:"pl-absolute pl-right-[11.8px]",children:jsxRuntime.jsx(G__default.default,{src:chunk3VH6NKXH_js.a.tick,alt:"",width:12,height:9})}),chunkU4J4R2AO_js.ha("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 ${a.speed===d&&"pl-border-primary"}`,children:a.speed===d&&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] ${chunkU4J4R2AO_js.ha("isTouchScreen")?"pl-pr-[21px]":"pl-pr-[10px]"}`,children:d})]},u))})});return jsxRuntime.jsx(jsxRuntime.Fragment,{children:l?jsxRuntime.jsxs("div",{className:"pl-relative pl-flex pl-items-center",ref:c,children:[jsxRuntime.jsx(_e,{className:"pl-size-5 pl-cursor-pointer size-5 pl-fill-white",onClick:()=>o(chunkU4J4R2AO_js.G(!p)),onMouseOver:()=>!chunkU4J4R2AO_js.ha("isTouchScreen")&&!chunkU4J4R2AO_js.ha("showSpeedPopover")&&v(true),onMouseLeave:()=>!chunkU4J4R2AO_js.ha("isTouchScreen")&&v(false)}),h&&jsxRuntime.jsx(chunk2EYLIYZS_js.a,{title:"\u0633\u0631\u0639\u062A"}),jsxRuntime.jsx(q,{classNames:`!pl-p-0 pl-overflow-hidden !pl-bg-white ${chunkU4J4R2AO_js.ha("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]"} ${chunkU4J4R2AO_js.ha("isTouchScreenPortrait")&&"!pl-w-screen tablet:!pl-max-w-[440px] tablet:!pl-mx-auto"} ${chunkU4J4R2AO_js.ha("isTouchScreenLandscape")&&"pl-w-full pl-max-w-[440px]"} !pl-z-[100000]`,status:p,onClose:()=>o(chunkU4J4R2AO_js.G(false)),type:chunkU4J4R2AO_js.ha("isTouchScreen")?"modal":"popover",isBlurBackground:chunkU4J4R2AO_js.ha("isTouchScreenPortrait"),ref:chunkU4J4R2AO_js.ha("isTouchScreen")?c:void 0,isHeader:chunkU4J4R2AO_js.ha("isTouchScreen"),customHeader:jsxRuntime.jsx(jsxRuntime.Fragment,{}),isHasCatchUpLineOnTop:chunkU4J4R2AO_js.ha("isTouchScreen"),styles:{maxHeight:!chunkU4J4R2AO_js.ha("isTouchScreenPortrait")&&i.height-(chunkU4J4R2AO_js.ha("isTouchScreenLandscape")?120:75)},children:g})]}):jsxRuntime.jsx(jsxRuntime.Fragment,{children:g})})},Oe=Yl;chunkWO4IQUGO_js.e();var Jl=({enabled:t,setEnabled:l})=>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 ${t?"pl-bg-primary pl-border pl-border-transparent":"pl-bg-secondary-200 pl-border pl-border-gray-highLight"}`,onClick:l,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 ${t?"pl-bg-white pl-translate-x-[13px]":"pl-bg-black/[0.16] -pl-translate-x-0.5"}`})}),vo=Jl;chunkWO4IQUGO_js.e();var ti=({setSection:t})=>{let l=chunkU4J4R2AO_js.ia(),{subtitles:o,selectedSubtitle:i}=chunkU4J4R2AO_js.ja(({videoData:{subtitles:r,selectedSubtitle:p}})=>({subtitles:r,selectedSubtitle:p}),reactRedux.shallowEqual);return jsxRuntime.jsx("div",{id:"subtitles",className:"animate__animated animate__fadeIn pl-py-2",children:jsxRuntime.jsx("ul",{className:"pl-flex pl-flex-col pl-gap-2",children:o.map((r,p)=>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 ${i&&i.language===r.language&&"pl-bg-primary/[0.12] !pl-cursor-default"} ${chunkU4J4R2AO_js.ha("isTouchScreen")?"pl-py-[13.5px]":"pl-py-[9.5px]"}`,onClick:()=>{l(chunkU4J4R2AO_js.f(false)),l(chunkU4J4R2AO_js.F(false)),l(chunkU4J4R2AO_js.B(r)),chunkU4J4R2AO_js.na().textTracks[p].mode="showing",t(chunkU4J4R2AO_js.ha("isFullScreen")||chunkU4J4R2AO_js.ha("isStaticFormat")&&!chunkU4J4R2AO_js.ha("isTouchScreenPortrait")?"subtitles":"main"),chunkU4J4R2AO_js.ma(chunkU4J4R2AO_js.Fa(r.language));},children:[!chunkU4J4R2AO_js.ha("isTouchScreen")&&i&&i.language===r.language&&jsxRuntime.jsx("div",{className:"pl-absolute pl-right-[11.8px]",children:jsxRuntime.jsx(G__default.default,{src:chunk3VH6NKXH_js.a.tick,alt:"",width:12,height:9})}),chunkU4J4R2AO_js.ha("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 ${i&&i.language===r.language&&"pl-border-primary"}`,children:i&&i.language===r.language&&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] ${chunkU4J4R2AO_js.ha("isTouchScreen")?"pl-pr-[21px]":"pl-pr-[10px]"}`,children:r.label})]},p))})})},go=react.memo(ti);chunkWO4IQUGO_js.e();var li=({className:t,onClick:l,onMouseOver:o,onMouseLeave:i})=>jsxRuntime.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,onClick:l,onMouseOver:o,onMouseLeave:i,children:[jsxRuntime.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M10 2.29395C10.3314 2.29395 10.6 2.56257 10.6 2.89395V17.1052C10.6 17.4366 10.3314 17.7052 10 17.7052C9.66866 17.7052 9.40002 17.4366 9.40002 17.1052V2.89395C9.40002 2.56257 9.66866 2.29395 10 2.29395Z"}),jsxRuntime.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M6.41258 4.95498C6.74396 4.95498 7.01258 5.22361 7.01258 5.55498V14.5565C7.01258 14.8879 6.74396 15.1565 6.41258 15.1565C6.08121 15.1565 5.81258 14.8879 5.81258 14.5565V5.55498C5.81258 5.22361 6.08121 4.95498 6.41258 4.95498Z"}),jsxRuntime.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M13.5858 4.84247C13.9172 4.84247 14.1858 5.1111 14.1858 5.44247V14.444C14.1858 14.7754 13.9172 15.044 13.5858 15.044C13.2545 15.044 12.9858 14.7754 12.9858 14.444V5.44247C12.9858 5.1111 13.2545 4.84247 13.5858 4.84247Z"}),jsxRuntime.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M17.1735 7.60177C17.5048 7.60177 17.7735 7.8704 17.7735 8.20177V11.5709C17.7735 11.9023 17.5048 12.1709 17.1735 12.1709C16.8421 12.1709 16.5735 11.9023 16.5735 11.5709V8.20177C16.5735 7.8704 16.8421 7.60177 17.1735 7.60177Z"}),jsxRuntime.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M2.82656 7.82841C3.15794 7.82841 3.42656 8.09703 3.42656 8.42844V11.7976C3.42656 12.1289 3.15794 12.3976 2.82656 12.3976C2.49519 12.3976 2.22656 12.1289 2.22656 11.7976V8.42844C2.22656 8.09703 2.49519 7.82841 2.82656 7.82841Z"})]}),ze=li;chunkWO4IQUGO_js.e();var ai=({setSection:t,showMultiAudioIcon:l})=>{let o=chunkU4J4R2AO_js.ia(),{multiAudioPopover:i}=chunkU4J4R2AO_js.ja(({popovers:{multiAudioPopover:d}})=>({multiAudioPopover:d}),reactRedux.shallowEqual),[r,p]=react.useState(false),a=react.useRef(null),{multiAudio:c,selectedAudioId:h,videoElementSizeInfo:v}=chunkU4J4R2AO_js.ja(({videoData:{multiAudio:d,selectedAudioId:u,videoElementSizeInfo:T}})=>({multiAudio:d,selectedAudioId:u,videoElementSizeInfo:T}),reactRedux.shallowEqual);_(a,()=>o(chunkU4J4R2AO_js.J(false)));let g=jsxRuntime.jsx("ul",{className:`pl-flex pl-flex-col pl-m-0 !pl-py-2 ${chunkU4J4R2AO_js.ha("isTouchScreen")?"pl-pb-4 pl-gap-2":"pl-gap-1"}`,children:chunkU4J4R2AO_js.ha("hasMultiAudio")&&c.map((d,u)=>jsxRuntime.jsxs("li",{className:`pl-flex pl-items-center pl-rounded-[4px] pl-relative pl-cursor-pointer pl-leading-6 ${chunkU4J4R2AO_js.ha("isTouchScreen")?"pl-pr-[26px] pl-gap-[18px] pl-py-3 pl-text-[14px]":"pl-pr-2 pl-gap-2 pl-py-2 pl-text-[12px] pl-font-medium"} ${h===u&&"pl-bg-primary/[0.08]"}`,onClick:()=>{o(chunkU4J4R2AO_js.D(u)),o(chunkU4J4R2AO_js.f(false)),o(chunkU4J4R2AO_js.F(false)),o(chunkU4J4R2AO_js.J(false)),t&&t("main");},children:[jsxRuntime.jsxs("div",{className:`${chunkU4J4R2AO_js.ha("isTouchScreen")?"pl-size-5":"pl-size-3"} pl-flex pl-items-center`,children:[!chunkU4J4R2AO_js.ha("isTouchScreen")&&h===u&&jsxRuntime.jsx(G__default.default,{src:chunk3VH6NKXH_js.a.tick,alt:"",width:12,height:9}),chunkU4J4R2AO_js.ha("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 ${h===u&&"pl-border-primary"}`,children:h===u&&jsxRuntime.jsx("div",{className:"pl-w-full pl-h-full pl-rounded-full pl-bg-primary"})})]}),jsxRuntime.jsxs("span",{children:["\u0632\u0628\u0627\u0646 ",d.name]})]},d.id))});return jsxRuntime.jsx(jsxRuntime.Fragment,{children:l?jsxRuntime.jsxs("div",{className:"pl-relative pl-flex pl-items-center",ref:a,children:[jsxRuntime.jsx(ze,{className:"pl-size-5 pl-fill-white pl-cursor-pointer",onClick:()=>o(chunkU4J4R2AO_js.J(!i)),onMouseOver:()=>!chunkU4J4R2AO_js.ha("isTouchScreen")&&p(true),onMouseLeave:()=>!chunkU4J4R2AO_js.ha("isTouchScreen")&&p(false)}),r&&jsxRuntime.jsx(chunk2EYLIYZS_js.a,{title:"\u062A\u063A\u06CC\u06CC\u0631 \u0635\u062F\u0627"}),jsxRuntime.jsx(q,{classNames:`!pl-px-0 pl-overflow-hidden !pl-bg-white !pl-pb-0 ${chunkU4J4R2AO_js.ha("isTouchScreen")?"!pl-fixed !pl-bottom-0 !pl-rounded-t-[20px] pl-rounded-b-none":"!pl-w-[200px] pl-right-0 pl-mb-[33px] !pl-rounded-[12px]"} ${chunkU4J4R2AO_js.ha("isTouchScreenPortrait")&&"!pl-w-screen tablet:!pl-max-w-[440px] tablet:!pl-mx-auto"} ${chunkU4J4R2AO_js.ha("isTouchScreenLandscape")&&"pl-w-full pl-max-w-[440px]"}`,status:i,onClose:()=>o(chunkU4J4R2AO_js.J(false)),type:chunkU4J4R2AO_js.ha("isTouchScreen")?"modal":"popover",isBlurBackground:chunkU4J4R2AO_js.ha("isTouchScreenPortrait"),ref:chunkU4J4R2AO_js.ha("isTouchScreen")?a:void 0,isHeader:chunkU4J4R2AO_js.ha("isTouchScreen"),isHasCatchUpLineOnTop:chunkU4J4R2AO_js.ha("isTouchScreen"),styles:{maxHeight:!chunkU4J4R2AO_js.ha("isTouchScreenPortrait")&&v.height-(chunkU4J4R2AO_js.ha("isTouchScreenLandscape")?120:75)},children:g})]}):jsxRuntime.jsx(jsxRuntime.Fragment,{children:g})})},Ve=react.memo(ai);var ui=()=>{let t=chunkU4J4R2AO_js.ia(),{selectedSubtitle:l,videoElementSizeInfo:o}=chunkU4J4R2AO_js.ja(({videoData:{params:g,selectedSubtitle:d,videoElementSizeInfo:u}})=>({params:g,selectedSubtitle:d,videoElementSizeInfo:u}),reactRedux.shallowEqual),{isFullScreen:i}=chunkU4J4R2AO_js.ja(({controller:{isFullScreen:g}})=>({isFullScreen:g}),reactRedux.shallowEqual),{settingPopover:r}=chunkU4J4R2AO_js.ja(({popovers:{settingPopover:g}})=>({settingPopover:g}),reactRedux.shallowEqual),[p,a]=react.useState(chunkU4J4R2AO_js.ha("isStaticFormat")&&!chunkU4J4R2AO_js.ha("isTouchScreenPortrait")?"subtitles":"main"),[c,h]=react.useState(false),v=react.useRef(null);return react.useEffect(()=>{chunkU4J4R2AO_js.ha("isFullScreen")&&a("subtitles");},[i]),_(v,()=>{t(chunkU4J4R2AO_js.F(false)),setTimeout(()=>{a(chunkU4J4R2AO_js.R.getState().controller.isFullScreen||chunkU4J4R2AO_js.ha("isStaticFormat")&&!chunkU4J4R2AO_js.ha("isTouchScreenPortrait")?"subtitles":"main");},500);}),jsxRuntime.jsxs("div",{className:`pl-inline-flex ${chunkU4J4R2AO_js.ha("isLandscape")&&"pl-relative"}`,ref:v,children:[jsxRuntime.jsxs("div",{className:"pl-flex pl-items-center pl-relative pl-cursor-pointer",onClick:()=>t(chunkU4J4R2AO_js.F(!r)),onMouseOver:()=>!chunkU4J4R2AO_js.ha("isTouchScreen")&&!chunkU4J4R2AO_js.ha("showSettingPopover")&&h(true),onMouseLeave:()=>!chunkU4J4R2AO_js.ha("isTouchScreen")&&h(false),children:[jsxRuntime.jsx(G__default.default,{src:chunk3VH6NKXH_js.a.settings,alt:"",width:20,height:20}),c&&jsxRuntime.jsx(chunk2EYLIYZS_js.a,{title:"\u062A\u0646\u0638\u06CC\u0645\u0627\u062A "})]}),jsxRuntime.jsx(q,{classNames:`!pl-p-0 pl-overflow-hidden !pl-bg-white ${chunkU4J4R2AO_js.ha("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]"} ${chunkU4J4R2AO_js.ha("isTouchScreenPortrait")&&"!pl-w-screen tablet:!pl-max-w-[440px] tablet:!pl-mx-auto"} ${chunkU4J4R2AO_js.ha("isTouchScreenLandscape")&&"pl-w-full pl-max-w-[285px]"} !overflow-auto`,styles:{maxHeight:!chunkU4J4R2AO_js.ha("isTouchScreenPortrait")&&o.height-75},status:r,onClose:()=>{t(chunkU4J4R2AO_js.F(false)),setTimeout(()=>a(chunkU4J4R2AO_js.ha("isFullScreen")||chunkU4J4R2AO_js.ha("isStaticFormat")&&!chunkU4J4R2AO_js.ha("isTouchScreenPortrait")?"subtitles":"main"),500);},type:chunkU4J4R2AO_js.ha("isTouchScreen")?"modal":"popover",isBlurBackground:chunkU4J4R2AO_js.ha("isTouchScreenPortrait"),ref:chunkU4J4R2AO_js.ha("isTouchScreen")?v:void 0,isHeader:chunkU4J4R2AO_js.ha("isTouchScreen"),customHeader:jsxRuntime.jsx(jsxRuntime.Fragment,{}),isHasCatchUpLineOnTop:chunkU4J4R2AO_js.ha("isTouchScreen"),children:jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[p==="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:[!chunkU4J4R2AO_js.ha("isStaticFormat")&&!chunkU4J4R2AO_js.ha("isFullScreen")&&!chunkU4J4R2AO_js.ha("isIOS")&&jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsxs("div",{className:"pl-flex pl-items-center pl-gap-[10px] pl-cursor-pointer",onClick:()=>a("qualityLevels"),children:[jsxRuntime.jsx(G__default.default,{src:chunk3VH6NKXH_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(G__default.default,{src:chunk3VH6NKXH_js.a.chevronLeft,alt:"",width:16,height:16})]})}),!chunkU4J4R2AO_js.ha("isStaticFormat")&&!chunkU4J4R2AO_js.ha("isFullScreen")&&jsxRuntime.jsxs("div",{className:"pl-flex pl-items-center pl-gap-[10px] pl-cursor-pointer",onClick:()=>a("speed"),children:[jsxRuntime.jsx(_e,{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(G__default.default,{src:chunk3VH6NKXH_js.a.chevronLeft,alt:"",width:16,height:16})]}),chunkU4J4R2AO_js.ha("hasMultipleSubtitles")&&jsxRuntime.jsxs("div",{className:"pl-flex pl-items-center pl-gap-[10px] pl-cursor-pointer",onClick:()=>a("subtitles"),children:[jsxRuntime.jsx(G__default.default,{src:chunk3VH6NKXH_js.a.subtitle,width:20,height:20,alt:"subtitle-icon"}),jsxRuntime.jsx("p",{className:"pl-ml-auto pl-text-[12px] pl-font-medium pl-text-black/[0.87]",children:"\u0632\u0628\u0627\u0646 \u0632\u06CC\u0631\u0646\u0648\u06CC\u0633"}),jsxRuntime.jsx(G__default.default,{src:chunk3VH6NKXH_js.a.chevronLeft,alt:"",width:16,height:16})]}),chunkU4J4R2AO_js.ha("hasSubtitles")&&chunkU4J4R2AO_js.ha("isTouchScreenPortrait")&&jsxRuntime.jsxs("div",{className:"pl-flex pl-items-center pl-gap-[10px] pl-cursor-pointer",children:[jsxRuntime.jsx(G__default.default,{src:chunk3VH6NKXH_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(vo,{enabled:!!l,setEnabled:chunk4I7KBOKP_js.b})]}),chunkU4J4R2AO_js.ha("hasMultiAudio")&&chunkU4J4R2AO_js.ha("isTouchScreenPortrait")&&jsxRuntime.jsxs("div",{className:"pl-flex pl-items-center pl-gap-[10px] pl-cursor-pointer",onClick:()=>a("multiAudio"),children:[jsxRuntime.jsx(ze,{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:"\u062A\u063A\u06CC\u06CC\u0631 \u0635\u062F\u0627"}),jsxRuntime.jsx(G__default.default,{src:chunk3VH6NKXH_js.a.chevronLeft,alt:"",width:16,height:16})]})]}),p==="qualityLevels"&&jsxRuntime.jsx(De,{setSection:a}),p==="speed"&&jsxRuntime.jsx(Oe,{setSection:a}),p==="subtitles"&&jsxRuntime.jsx(go,{setSection:a}),p==="multiAudio"&&jsxRuntime.jsx(Ve,{setSection:a})]})})]})},yo=react.memo(ui);chunkWO4IQUGO_js.e();var fi=()=>{let{duration:t,currentTime:l}=chunkU4J4R2AO_js.ja(({controller:{duration:o,currentTime:i}})=>({duration:o,currentTime:i}),reactRedux.shallowEqual);return chunkU4J4R2AO_js.ja(({videoData:{videoElementSizeInfo:o,params:i}})=>({videoElementSizeInfo:o,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 ${chunkU4J4R2AO_js.ha("isFullScreen")?"pl-ml-8":"pl-ml-4"} ${chunkU4J4R2AO_js.ha("isTouchScreenPortrait")?"!pl-ml-0":"pl-absolute pl-left-0 pl-bottom-full pl-mb-[33px]"}`,children:[jsxRuntime.jsx("span",{children:chunkU4J4R2AO_js.U(t||0)}),jsxRuntime.jsx("span",{children:" / "}),jsxRuntime.jsx("span",{children:chunkU4J4R2AO_js.U(l||0)})]})})},qe=fi;chunkWO4IQUGO_js.e();var xi=()=>jsxRuntime.jsx(G__default.default,{src:chunk3VH6NKXH_js.a.unlock,alt:"unlock-icon",width:20,height:20,onClick:()=>chunkLBYZQ7HZ_js.h("lock")}),To=xi;chunkWO4IQUGO_js.e();var Ti=()=>{let[t,l]=react.useState(false);return chunkU4J4R2AO_js.ja(({videoData:{selectedSubtitle:o,videoElementSizeInfo:i,params:r}})=>({selectedSubtitle:o,videoElementSizeInfo:i,params:r}),reactRedux.shallowEqual),jsxRuntime.jsxs("div",{className:"pl-relative pl-flex pl-items-center",children:[jsxRuntime.jsx(G__default.default,{alt:"subtitle-icon",src:chunkU4J4R2AO_js.ha("isSelectedSubtitle")?chunk3VH6NKXH_js.a.subtitleFill:chunk3VH6NKXH_js.a.subtitleOutline,className:"pl-cursor-pointer",width:20,height:20,onClick:()=>chunk4I7KBOKP_js.b(),onDoubleClick:o=>o.stopPropagation(),onMouseOver:()=>!chunkU4J4R2AO_js.ha("isTouchScreen")&&l(true),onMouseLeave:()=>!chunkU4J4R2AO_js.ha("isTouchScreen")&&l(false)}),t&&jsxRuntime.jsx(chunk2EYLIYZS_js.a,{title:"\u0632\u06CC\u0631\u0646\u0648\u06CC\u0633"})]})},Co=Ti;chunkWO4IQUGO_js.e();chunkWO4IQUGO_js.e();var ki=t=>(chunkU4J4R2AO_js.ja(({videoData:{videoElementSizeInfo:l,params:o}})=>({videoElementSizeInfo:l,params:o}),reactRedux.shallowEqual),jsxRuntime.jsxs("svg",{width:20,height:20,viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t,children:[jsxRuntime.jsx("rect",{x:"3",y:"3",width:"4",height:"4",rx:"1.5"}),jsxRuntime.jsx("rect",{x:"3",y:"9",width:"4",height:"4",rx:"1.5"}),jsxRuntime.jsx("rect",{x:"3",y:"15",width:"4",height:"4",rx:"1.5"}),jsxRuntime.jsx("rect",{x:"8",y:"16",width:"11",height:"2",rx:"1"}),jsxRuntime.jsx("rect",{x:"8",y:"10",width:"11",height:"2",rx:"1"}),jsxRuntime.jsx("rect",{x:"8",y:"4",width:"11",height:"2",rx:"1"})]})),ko=ki;var Mi=()=>{let [t,l]=react.useState(0),[o,i]=react.useState(void 0),[r,p]=react.useState(false),{markers:a,params:c}=chunkU4J4R2AO_js.ja(({videoData:{markers:f,params:k,videoElementSizeInfo:E}})=>({markers:f,params:k,videoElementSizeInfo:E}),reactRedux.shallowEqual),{markersListPopover:h}=chunkU4J4R2AO_js.ja(({popovers:{markersListPopover:f}})=>({markersListPopover:f}),reactRedux.shallowEqual),v=react.useRef(null),g=chunkU4J4R2AO_js.ia();_(v,()=>g(chunkU4J4R2AO_js.I(false)));let u=(f,k,E,m,b)=>{chunkU4J4R2AO_js.pa()&&(chunkU4J4R2AO_js.pa().style.width=`${Ht(f)}px`),chunkLBYZQ7HZ_js.i(chunkU4J4R2AO_js.na().currentTime,f),chunkU4J4R2AO_js.na().currentTime=f,g(chunkU4J4R2AO_js.I(false)),chunkU4J4R2AO_js.ma(chunkU4J4R2AO_js.Ga(k,f,E,m,b));},T=()=>{g(chunkU4J4R2AO_js.I(!h));};return jsxRuntime.jsxs("div",{className:`pl-flex pl-items-center pl-p-1 pl-relative ${chunkU4J4R2AO_js.ha("showMarkerListPopover")&&"pl-bg-secondary-50/[0.4] pl-rounded-[4px]"}`,ref:v,children:[jsxRuntime.jsx(ko,{className:"pl-cursor-pointer pl-fill-dark-5",onClick:T,onMouseOver:()=>!chunkU4J4R2AO_js.ha("isTouchScreen")&&p(true),onMouseLeave:()=>!chunkU4J4R2AO_js.ha("isTouchScreen")&&p(false)}),r&&jsxRuntime.jsx(chunk2EYLIYZS_js.a,{title:"\u0644\u06CC\u0633\u062A \u0646\u0634\u0627\u0646\u06AF\u0631\u0647\u0627 (e)",className:"!pl-bottom-[180%] !pl-right-[-48px]"}),jsxRuntime.jsx(q,{classNames:"!pl-p-0 pl-left-0 !pl-bg-white dark:!pl-bg-dark-13 !pl-rounded-[4px] pl-mb-[33px]",status:chunkU4J4R2AO_js.ha("showMarkerListPopover"),onClose:()=>{g(chunkU4J4R2AO_js.I(false));},headerTitle:"\u0646\u0634\u0627\u0646\u06AF\u0631\u0647\u0627",isHeader:true,type:"popover",children:jsxRuntime.jsx("div",{className:"pl-flex pl-flex-col pl-gap-6 pl-mx-2 pl-mt-2",children:jsxRuntime.jsx("div",{className:"pl-flex pl-flex-col pl-gap-2 pl-pb-2",children:a.map(f=>jsxRuntime.jsx("div",{onClick:()=>u(f.time,f.id,f.title,f.description,f.sticker),className:"odd:dark:pl-bg-dark-1 odd:pl-bg-main/[0.1] hover:pl-bg-main/[0.1] hover:dark:bg-white/[0.25] pl-rounded-[8px]",children:jsxRuntime.jsxs("div",{className:"pl-flex pl-item-center pl-gap-2 pl-cursor-pointer pl-rounded-[4px] pl-relative pl-p-2 pl-mx-2",children:[f.banner||!f.sticker?jsxRuntime.jsx(G__default.default,{src:f.banner?f.banner:"IMAGES.defaultMarkersListItemIcon",width:40,height:40,alt:f.title}):jsxRuntime.jsx("div",{className:"pl-w-[40px] pl-h-[40px] pl-bg-secondary dark:pl-bg-secondary-50 pl-rounded-[6px] pl-flex pl-items-center",children:jsxRuntime.jsx(ye,{name:f.sticker,className:"pl-w-[20px] pl-h-[20px] pl-mx-auto"})}),jsxRuntime.jsxs("div",{className:"pl-text-gray-800 dark:pl-text-white",children:[jsxRuntime.jsx("p",{className:"pl-flex pl-items-center pl-mb-1 pl-text-[14px] pl-font-bold pl-w-[130px] pl-whitespace-nowrap pl-overflow-hidden pl-text-ellipsis",children:jsxRuntime.jsx("div",{children:f.title})}),jsxRuntime.jsx("p",{className:"pl-text-[13px] pl-font-normal pl-w-[200px] pl-whitespace-nowrap pl-overflow-hidden pl-text-ellipsis",children:f.description})]}),jsxRuntime.jsx("span",{className:"pl-absolute pl-left-9 pl-top-2 pl-text-[12px] pl-font-bold pl-bg-secondary/[0.3] dark:pl-bg-secondary/[0.6] pl-text-gray-800 dark:pl-text-white pl-rounded-[4px] pl-p-[3px]",children:chunkU4J4R2AO_js.U(f.time)})]})},f.id))})})})]})},No=Mi;var Ai=()=>{chunkU4J4R2AO_js.ja(({controller:{isFullScreen:l}})=>({isFullScreen:l}),reactRedux.shallowEqual),chunkU4J4R2AO_js.ja(({videoData:{videoElementSizeInfo:l,params:o,subtitles:i}})=>({videoElementSizeInfo:l,params:o,subtitles:i}),reactRedux.shallowEqual);let t="";return chunkU4J4R2AO_js.ha("isTouchScreen")?chunkU4J4R2AO_js.ha("isFullScreen")?t="pl-mx-4 tablet:pl-mx-6":t="pl-mx-4":chunkU4J4R2AO_js.ha("isFullScreen")?t="pl-mx-8":t="pl-mx-4",jsxRuntime.jsxs("div",{id:"player-controllbar",className:`pl-flex pl-justify-between pl-items-center ${t}`,children:[jsxRuntime.jsxs("div",{className:"pl-flex pl-items-center pl-gap-5",children:[jsxRuntime.jsx(chunk2EYLIYZS_js.c,{}),chunkU4J4R2AO_js.ha("isTouchScreenLandscape")&&jsxRuntime.jsx(To,{}),chunkU4J4R2AO_js.ha("showPictureInPicture")&&jsxRuntime.jsx(no,{}),chunkU4J4R2AO_js.ha("showSettingIcon")&&jsxRuntime.jsx(yo,{}),chunkU4J4R2AO_js.ha("isFullScreen")&&!chunkU4J4R2AO_js.ha("isStaticFormat")&&jsxRuntime.jsx(De,{showQualityLevelsIcon:true}),(chunkU4J4R2AO_js.ha("isFullScreen")||chunkU4J4R2AO_js.ha("isStaticFormat"))&&jsxRuntime.jsx(Oe,{showSpeedIcon:true}),chunkU4J4R2AO_js.ha("hasSubtitles")&&!chunkU4J4R2AO_js.ha("isTouchScreenPortrait")&&jsxRuntime.jsx(Co,{}),chunkU4J4R2AO_js.ha("hasMultiAudio")&&!chunkU4J4R2AO_js.ha("isTouchScreenPortrait")&&jsxRuntime.jsx(Ve,{showMultiAudioIcon:true})]}),jsxRuntime.jsxs("div",{className:"pl-flex pl-items-center pl-gap-5",children:[chunkU4J4R2AO_js.ha("isTouchScreenPortrait")&&jsxRuntime.jsx(qe,{}),!chunkU4J4R2AO_js.ha("isIOS")&&jsxRuntime.jsx(chunk2EYLIYZS_js.b,{}),chunkU4J4R2AO_js.ha("hasMarkers")&&jsxRuntime.jsx(No,{})]})]})},Mo=react.memo(Ai);chunkWO4IQUGO_js.e();var $i=()=>{let{subtitleText:t}=chunkU4J4R2AO_js.ja(({videoData:{subtitleText:o,selectedSubtitle:i}})=>({subtitleText:o,selectedSubtitle:i}),reactRedux.shallowEqual);return chunkU4J4R2AO_js.ja(({controller:{isFullScreen:o}})=>({isFullScreen:o}),reactRedux.shallowEqual),jsxRuntime.jsx("div",{id:"subtitle-id",style:{direction:"ltr"},className:`pl-z-0 pl-absolute pl-w-full pl-text-center pl-text-[18px] pl-px-4 pl-text-white pl-font-medium ${(()=>{let o="";return chunkU4J4R2AO_js.ha("isLock")?o="pl-bottom-4":chunkU4J4R2AO_js.ha("isActiveElements")?chunkU4J4R2AO_js.ha("isTouchScreenPortrait")?o="pl-bottom-4 tablet:pl-bottom-[65px]":chunkU4J4R2AO_js.ha("isFullScreen")?o="pl-bottom-[104px] tablet:pl-bottom-[137px] desktop:pl-bottom-[146px]":o="pl-bottom-[120px]":chunkU4J4R2AO_js.ha("isActiveElements")||(o="pl-bottom-4"),o})()}`,children:chunkU4J4R2AO_js.ea(t).map((o,i)=>jsxRuntime.jsx("p",{className:`pl-mx-auto pl-bg-Common-black-overlay-2 ${chunkU4J4R2AO_js.ha("isTouchScreen")&&chunkU4J4R2AO_js.ha("isActiveElements")&&"pl-opacity-50 tablet:pl-opacity-100"} pl-text-wrap pl-max-w-full pl-w-max pl-px-1`,children:chunkU4J4R2AO_js.ga(o)},i))})},$o=$i;var Fi=()=>{chunkU4J4R2AO_js.ja(({controller:{lock:l,isFullScreen:o,isLoading:i,activeElements:r}})=>({lock:l,isFullScreen:o,isLoading:i,activeElements:r}),reactRedux.shallowEqual),chunkU4J4R2AO_js.ja(({videoData:{subtitles:l,selectedSubtitle:o}})=>({subtitles:l,selectedSubtitle:o}),reactRedux.shallowEqual);let t="";return chunkU4J4R2AO_js.ha("isTouchScreen")?chunkU4J4R2AO_js.ha("isFullScreen")?t="pl-gap-4 table:pl-gap-6 pl-mb-4 tablet:pl-mb-6 ":t="pl-gap-6 pl-mb-0":chunkU4J4R2AO_js.ha("isFullScreen")?t="pl-gap-6 pl-mb-8":t="pl-gap-4 pl-mb-3",jsxRuntime.jsx("div",{id:"footer",className:"pl-relative",style:{zIndex:4},onClick:l=>l.stopPropagation(),children:jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[chunkU4J4R2AO_js.ha("showSubtitle")&&jsxRuntime.jsx($o,{}),!chunkU4J4R2AO_js.ha("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 ${t} ${chunkU4J4R2AO_js.ha("isActiveElements")&&!chunkU4J4R2AO_js.ha("isLoading")?"animate__fadeIn pl-pointer-events-auto":"animate__fadeOut pl-pointer-events-none"}`,children:[!chunkU4J4R2AO_js.ha("isTouchScreenPortrait")&&jsxRuntime.jsx(qe,{}),chunkU4J4R2AO_js.ha("showProgressbar")&&jsxRuntime.jsx(po,{}),jsxRuntime.jsx(Mo,{})]})})]})})},Oo=Fi;chunkWO4IQUGO_js.e();var Di=zo__default.default(()=>import('./staticVideoTag-TZFKVQQ7.js')),_i=zo__default.default(()=>import('./nonStaticVideoTag-WI32AYRX.js')),Oi=()=>jsxRuntime.jsx(jsxRuntime.Fragment,{children:chunkU4J4R2AO_js.ha("isStaticFormat")?jsxRuntime.jsx(Di,{}):jsxRuntime.jsx(_i,{})}),Bo=Oi;chunkWO4IQUGO_js.e();var Vi=(t,l)=>{let o=chunkU4J4R2AO_js.ia(),{activeElements:i}=chunkU4J4R2AO_js.ja(({controller:{activeElements:c}})=>({activeElements:c}),reactRedux.shallowEqual),r=react.useRef(null),p=react.useRef(t),a=react.useRef(l);react.useEffect(()=>{p.current=t;},[t]),react.useEffect(()=>{a.current=l;},[l]),react.useEffect(()=>{let c=false,h=d=>{let{activeElements:u,isEnded:T}=chunkU4J4R2AO_js.R.getState().controller;T?o(chunkU4J4R2AO_js.f(true)):d.pointerType==="mouse"&&(clearTimeout(r.current),u?["player-tag","main-content","player-controllbar","video-opacity","playerElements","touchBackward","touchForward"].includes(d.target.id)&&(c=true):o(chunkU4J4R2AO_js.f(true)),r.current=setTimeout(()=>{let{settingPopover:f,speedPopover:k,qualityLevelsPopover:E,multiAudioPopover:m}=chunkU4J4R2AO_js.R.getState().popovers,{play:b}=chunkU4J4R2AO_js.R.getState().controller;!f&&!k&&!E&&!m&&b&&c&&o(chunkU4J4R2AO_js.f(false));},chunkQHZJEU27_js.a));},v=d=>{setTimeout(()=>{let{activeElements:u,isEnded:T,firstPlay:f}=chunkU4J4R2AO_js.R.getState().controller;if(clearTimeout(r.current),T)return o(chunkU4J4R2AO_js.f(true));chunkU4J4R2AO_js.T()&&!f&&!p.current&&!a.current&&(["player-tag","main-content","video-opacity","touchBackward","touchForward"].includes(d.target.id)||chunkU4J4R2AO_js.W(d,"playerElements")?(o(chunkU4J4R2AO_js.f(!u)),r.current=setTimeout(()=>{let{settingPopover:k,speedPopover:E,qualityLevelsPopover:m,multiAudioPopover:b}=chunkU4J4R2AO_js.R.getState().popovers;!k&&!E&&!m&&!b&&o(chunkU4J4R2AO_js.f(false));},chunkQHZJEU27_js.a)):r.current=setTimeout(()=>{let{settingPopover:k,speedPopover:E,qualityLevelsPopover:m,multiAudioPopover:b}=chunkU4J4R2AO_js.R.getState().popovers;!k&&!E&&!m&&!b&&o(chunkU4J4R2AO_js.f(false));},chunkQHZJEU27_js.a));},200);},g=()=>{clearTimeout(r.current),r.current=setTimeout(()=>{let{activeElements:d,isEnded:u}=chunkU4J4R2AO_js.R.getState().controller,{settingPopover:T,speedPopover:f,qualityLevelsPopover:k}=chunkU4J4R2AO_js.R.getState().popovers;u?o(chunkU4J4R2AO_js.f(true)):!T&&!f&&!k&&d&&!u&&o(chunkU4J4R2AO_js.f(!d));},chunkQHZJEU27_js.a);};return document.getElementById("video-area").addEventListener("touchstart",v),document.getElementById("video-area").addEventListener("touchmove",g),document.getElementById("video-area").addEventListener("pointermove",h),()=>{let d=document.getElementById("video-area");d&&(d.removeEventListener("touchstart",v),d.removeEventListener("touchmove",g),d.removeEventListener("pointermove",h));}},[i,t,l]);},Vo=Vi;chunkWO4IQUGO_js.e();var Xi=()=>{let{firstPlay:t,isFullScreen:l}=chunkU4J4R2AO_js.ja(({controller:{firstPlay:o,isFullScreen:i}})=>({firstPlay:o,isFullScreen:i}),reactRedux.shallowEqual);react.useEffect(()=>{if(chunkU4J4R2AO_js.na()){let o,i=()=>{o=setTimeout(()=>{chunkLBYZQ7HZ_js.j();},chunkU4J4R2AO_js.T()?0:300);};return i(),window.addEventListener("resize",i),()=>{window.removeEventListener("resize",i),clearTimeout(o);}}},[t,l,chunkU4J4R2AO_js.na()]);},Ho=Xi;chunkWO4IQUGO_js.e();var Wi=()=>{let{firstPlay:t,activeSubtitle:l}=chunkU4J4R2AO_js.ja(({controller:o,videoData:i})=>({firstPlay:o.firstPlay,activeSubtitle:i.params?.activeSubtitle}),reactRedux.shallowEqual);react.useEffect(()=>{chunkU4J4R2AO_js.ha("setSubtitleFirstPlay")&&chunk4I7KBOKP_js.b(),chunkU4J4R2AO_js.ha("hasActiveSubtitleInParams")&&setTimeout(()=>chunk4I7KBOKP_js.b(l),500);},[t,l]);},qo=Wi;var Qi=zo__default.default(()=>import('./touchVolumeBrightness-YEGKEXDE.js')),Uo=zo__default.default(()=>import('./backwardForward-W2MK6XN6.js')),Gi=()=>{let[t,l]=react.useState(false),[o,i]=react.useState(false);return chunkU4J4R2AO_js.ja(({videoData:{details:r,params:p,videoElementSizeInfo:a}})=>({details:r,params:p,videoElementSizeInfo:a}),reactRedux.shallowEqual),chunkU4J4R2AO_js.ja(({controller:{firstPlay:r,isFullScreen:p,isLoading:a,canPlayVideo:c}})=>({firstPlay:r,isFullScreen:p,isLoading:a,canPlayVideo:c}),reactRedux.shallowEqual),chunkSSP53RHG_js.a(),Ho(),Vo(t,o),qo(),jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsxs("div",{id:"video-area",style:{zIndex:chunkU4J4R2AO_js.ha("isFullScreen")?1e3:"unset"},onClick:r=>{let p=document.getElementById("player-popover");(chunkU4J4R2AO_js.ha("isFirstPlay")||!chunkU4J4R2AO_js.ha("isTouchScreen")&&!p)&&chunkLBYZQ7HZ_js.a(r);},onDoubleClick:r=>chunkLBYZQ7HZ_js.k(r),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 ${!chunkU4J4R2AO_js.ha("isTouchScreen")&&!chunkU4J4R2AO_js.ha("isFullScreen")&&"!pl-rounded-[12px]"} ${chunkU4J4R2AO_js.ha("isFullScreen")&&"!pl-fixed !pl-w-screen dvh"} pl-w-full pl-relative ${!chunkU4J4R2AO_js.ha("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 ${!chunkU4J4R2AO_js.ha("isTouchScreen")&&!chunkU4J4R2AO_js.ha("isFullScreen")&&"!pl-rounded-[12px]"} ${chunkU4J4R2AO_js.ha("isActiveElements")?"pl-bg-opacity-50":"pl-bg-opacity-0"}`}),chunkU4J4R2AO_js.ha("showTouchVolumeBrightness")&&jsxRuntime.jsx(Qi,{}),chunkU4J4R2AO_js.ha("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:o||t?1002:1},children:[jsxRuntime.jsx(Uo,{type:"touchForward",isRightDoubleTouched:t,setIsRightDoubleTouched:l}),jsxRuntime.jsx(Uo,{type:"touchBackward",isLeftDoubleTouched:o,setIsLeftDoubleTouched:i})]}),jsxRuntime.jsx(Bo,{}),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:[chunkU4J4R2AO_js.ha("showHeader")&&jsxRuntime.jsx(Dt,{}),chunkU4J4R2AO_js.ha("showMain")&&jsxRuntime.jsx(Bt,{}),chunkU4J4R2AO_js.ha("showFooter")&&jsxRuntime.jsx(Oo,{})]})})]})})},$m=Gi;
8
- exports.a=$m;//# sourceMappingURL=chunk-2CPPQIOZ.js.map
9
- //# sourceMappingURL=chunk-2CPPQIOZ.js.map
7
+ `,style:{maxHeight:v?"unset":Z||O||"",zIndex:1004,...a},ref:de,id:"popover-content",children:jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[g&&jsxRuntime.jsx("div",{onTouchMove:f?Qo:()=>{},onTouchEndCapture:f?Go:()=>{},className:"pl-py-4",children:f&&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",{id:"popover-content",className:`pl-overflow-y-auto pl-h-full pl-w-full ${!E&&"no-scrollbar"}`,onTouchMove:U=>U.stopPropagation(),children:t})]})})})]});return jsxRuntime.jsx(jsxRuntime.Fragment,{children:ue&&jsxRuntime.jsx(jsxRuntime.Fragment,{children:i==="modal"?reactDom.createPortal(jsxRuntime.jsx(jsxRuntime.Fragment,{children:st}),document.getElementById("dialog-react-root-videoPlayer")):jsxRuntime.jsx("div",{id:"player-popover",children:st})})})});co.displayName="popover";var q=co;chunkWO4IQUGO_js.e();var ql=({setSection:t,showQualityLevelsIcon:l})=>{let o=chunkU4J4R2AO_js.ia(),{qualityLevels:i}=chunkU4J4R2AO_js.ja(({controller:{qualityLevels:u,manualQuality:T,autoQuality:f}})=>({qualityLevels:u,manualQuality:T,autoQuality:f}),reactRedux.shallowEqual),{settings:r}=chunkU4J4R2AO_js.ja(({user:{settings:u}})=>({settings:u}),reactRedux.shallowEqual),{qualityLevelsPopover:p}=chunkU4J4R2AO_js.ja(({popovers:{qualityLevelsPopover:u}})=>({qualityLevelsPopover:u}),reactRedux.shallowEqual),{videoElementSizeInfo:a}=chunkU4J4R2AO_js.ja(({videoData:{params:u,videoElementSizeInfo:T}})=>({params:u,videoElementSizeInfo:T}),reactRedux.shallowEqual),[c,h]=react.useState(false);i=[-1,...i];let v=(u,T)=>chunkU4J4R2AO_js.ha("isAutoQuality")&&T===-1?true:!chunkU4J4R2AO_js.ha("isAutoQuality")&&r.quality===u,g=react.useRef(null);_(g,()=>o(chunkU4J4R2AO_js.H(false)));let d=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,T)=>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 ${v(T-1,u)&&"pl-bg-primary/[0.12] !pl-cursor-default"} ${chunkU4J4R2AO_js.ha("isTouchScreen")?"pl-py-[13.5px]":"pl-py-[9.5px]"}`,onClick:v(T-1,u)?()=>{}:()=>{chunkU4J4R2AO_js.ma(chunkU4J4R2AO_js.sa(u===-1?"auto":`${u}P`)),o(chunkU4J4R2AO_js.f(false)),o(chunkU4J4R2AO_js.F(false)),o(chunkU4J4R2AO_js.H(false)),o(chunkU4J4R2AO_js.L({...r,quality:u===-1?-1:T-1})),t&&t("main");},children:[!chunkU4J4R2AO_js.ha("isTouchScreen")&&v(T-1,u)&&jsxRuntime.jsx("div",{className:"pl-absolute pl-right-[11.8px]",children:jsxRuntime.jsx(G__default.default,{src:chunk3VH6NKXH_js.a.tick,alt:"",width:12,height:9})}),chunkU4J4R2AO_js.ha("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 ${v(T-1,u)&&"pl-border-primary"}`,children:v(T-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] ${chunkU4J4R2AO_js.ha("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`})]},T))})});return jsxRuntime.jsx(jsxRuntime.Fragment,{children:l?jsxRuntime.jsxs("div",{className:"pl-relative pl-flex pl-items-center",ref:g,children:[jsxRuntime.jsx(G__default.default,{src:chunk3VH6NKXH_js.a.qualitySetting1,alt:"speed-icon",width:20,height:20,onClick:()=>o(chunkU4J4R2AO_js.H(!p)),onMouseOver:()=>!chunkU4J4R2AO_js.ha("isTouchScreen")&&!chunkU4J4R2AO_js.ha("showQualityLevelsPopover")&&h(true),onMouseLeave:()=>!chunkU4J4R2AO_js.ha("isTouchScreen")&&h(false),className:"pl-cursor-pointer"}),c&&jsxRuntime.jsx(chunk2EYLIYZS_js.a,{title:"\u06A9\u06CC\u0641\u06CC\u062A"}),jsxRuntime.jsx(q,{classNames:`!pl-p-0 pl-overflow-hidden !pl-bg-white ${chunkU4J4R2AO_js.ha("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]"} ${chunkU4J4R2AO_js.ha("isTouchScreenPortrait")&&"!pl-w-screen tablet:pl-max-w-[440px]"} ${chunkU4J4R2AO_js.ha("isTouchScreenLandscape")&&"pl-w-full pl-max-w-[440px]"}`,status:p,onClose:()=>o(chunkU4J4R2AO_js.H(false)),type:chunkU4J4R2AO_js.ha("isTouchScreen")?"modal":"popover",isBlurBackground:chunkU4J4R2AO_js.ha("isTouchScreenPortrait"),ref:chunkU4J4R2AO_js.ha("isTouchScreen")?g:void 0,isHeader:chunkU4J4R2AO_js.ha("isTouchScreen"),customHeader:jsxRuntime.jsx(jsxRuntime.Fragment,{}),isHasCatchUpLineOnTop:chunkU4J4R2AO_js.ha("isTouchScreen"),styles:{maxHeight:!chunkU4J4R2AO_js.ha("isTouchScreenPortrait")&&a.height-(chunkU4J4R2AO_js.ha("isTouchScreenLandscape")?120:75)},children:d})]}):jsxRuntime.jsx(jsxRuntime.Fragment,{children:d})})},De=react.memo(ql);chunkWO4IQUGO_js.e();chunkWO4IQUGO_js.e();var Xl=({className:t,onClick:l,onMouseOver:o,onMouseLeave:i})=>jsxRuntime.jsxs("svg",{width:"18",height:"15",viewBox:"0 0 18 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,onClick:l,onMouseOver:o,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"})]}),_e=Xl;var Zl=[.5,.75,1,1.25,1.5,1.75,2],Yl=({setSection:t,showSpeedIcon:l})=>{let o=chunkU4J4R2AO_js.ia(),{videoElementSizeInfo:i,params:r}=chunkU4J4R2AO_js.ja(({videoData:{videoElementSizeInfo:d,params:u}})=>({videoElementSizeInfo:d,params:u}),reactRedux.shallowEqual),{speedPopover:p}=chunkU4J4R2AO_js.ja(({popovers:{speedPopover:d}})=>({speedPopover:d}),reactRedux.shallowEqual),{settings:a}=chunkU4J4R2AO_js.ja(({user:{settings:d}})=>({settings:d}),reactRedux.shallowEqual),c=react.useRef(null),[h,v]=react.useState(false);_(c,()=>o(chunkU4J4R2AO_js.G(false))),react.useEffect(()=>{chunkU4J4R2AO_js.na()&&(chunkU4J4R2AO_js.na().playbackRate=a.speed);},[]);let g=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:Zl.map((d,u)=>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 ${a.speed===d&&"pl-bg-primary/[0.12] !pl-cursor-default"} ${chunkU4J4R2AO_js.ha("isTouchScreen")?"pl-py-[13.5px]":"pl-py-[9.5px]"}`,onClick:a.speed===d?()=>{}:()=>{chunkU4J4R2AO_js.ha("isStaticFormat")||chunkU4J4R2AO_js.ma(chunkU4J4R2AO_js.ra(d)),o(chunkU4J4R2AO_js.f(false)),o(chunkU4J4R2AO_js.F(false)),o(chunkU4J4R2AO_js.G(false)),o(chunkU4J4R2AO_js.L({...a,speed:d})),chunkU4J4R2AO_js.na().playbackRate=d,t&&t("main"),r.onSpeedChange&&r.onSpeedChange(a.speed,d);},children:[!chunkU4J4R2AO_js.ha("isTouchScreen")&&a.speed===d&&jsxRuntime.jsx("div",{className:"pl-absolute pl-right-[11.8px]",children:jsxRuntime.jsx(G__default.default,{src:chunk3VH6NKXH_js.a.tick,alt:"",width:12,height:9})}),chunkU4J4R2AO_js.ha("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 ${a.speed===d&&"pl-border-primary"}`,children:a.speed===d&&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] ${chunkU4J4R2AO_js.ha("isTouchScreen")?"pl-pr-[21px]":"pl-pr-[10px]"}`,children:d})]},u))})});return jsxRuntime.jsx(jsxRuntime.Fragment,{children:l?jsxRuntime.jsxs("div",{className:"pl-relative pl-flex pl-items-center",ref:c,children:[jsxRuntime.jsx(_e,{className:"pl-size-5 pl-cursor-pointer size-5 pl-fill-white",onClick:()=>o(chunkU4J4R2AO_js.G(!p)),onMouseOver:()=>!chunkU4J4R2AO_js.ha("isTouchScreen")&&!chunkU4J4R2AO_js.ha("showSpeedPopover")&&v(true),onMouseLeave:()=>!chunkU4J4R2AO_js.ha("isTouchScreen")&&v(false)}),h&&jsxRuntime.jsx(chunk2EYLIYZS_js.a,{title:"\u0633\u0631\u0639\u062A"}),jsxRuntime.jsx(q,{classNames:`!pl-p-0 pl-overflow-hidden !pl-bg-white ${chunkU4J4R2AO_js.ha("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]"} ${chunkU4J4R2AO_js.ha("isTouchScreenPortrait")&&"!pl-w-screen tablet:!pl-max-w-[440px] tablet:!pl-mx-auto"} ${chunkU4J4R2AO_js.ha("isTouchScreenLandscape")&&"pl-w-full pl-max-w-[440px]"} !pl-z-[100000]`,status:p,onClose:()=>o(chunkU4J4R2AO_js.G(false)),type:chunkU4J4R2AO_js.ha("isTouchScreen")?"modal":"popover",isBlurBackground:chunkU4J4R2AO_js.ha("isTouchScreenPortrait"),ref:chunkU4J4R2AO_js.ha("isTouchScreen")?c:void 0,isHeader:chunkU4J4R2AO_js.ha("isTouchScreen"),customHeader:jsxRuntime.jsx(jsxRuntime.Fragment,{}),isHasCatchUpLineOnTop:chunkU4J4R2AO_js.ha("isTouchScreen"),styles:{maxHeight:!chunkU4J4R2AO_js.ha("isTouchScreenPortrait")&&i.height-(chunkU4J4R2AO_js.ha("isTouchScreenLandscape")?120:75)},children:g})]}):jsxRuntime.jsx(jsxRuntime.Fragment,{children:g})})},Oe=Yl;chunkWO4IQUGO_js.e();var Jl=({enabled:t,setEnabled:l})=>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 ${t?"pl-bg-primary pl-border pl-border-transparent":"pl-bg-secondary-200 pl-border pl-border-gray-highLight"}`,onClick:l,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 ${t?"pl-bg-white pl-translate-x-[13px]":"pl-bg-black/[0.16] -pl-translate-x-0.5"}`})}),vo=Jl;chunkWO4IQUGO_js.e();var ti=({setSection:t})=>{let l=chunkU4J4R2AO_js.ia(),{subtitles:o,selectedSubtitle:i}=chunkU4J4R2AO_js.ja(({videoData:{subtitles:r,selectedSubtitle:p}})=>({subtitles:r,selectedSubtitle:p}),reactRedux.shallowEqual);return jsxRuntime.jsx("div",{id:"subtitles",className:"animate__animated animate__fadeIn pl-py-2",children:jsxRuntime.jsx("ul",{className:"pl-flex pl-flex-col pl-gap-2",children:o.map((r,p)=>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 ${i&&i.language===r.language&&"pl-bg-primary/[0.12] !pl-cursor-default"} ${chunkU4J4R2AO_js.ha("isTouchScreen")?"pl-py-[13.5px]":"pl-py-[9.5px]"}`,onClick:()=>{l(chunkU4J4R2AO_js.f(false)),l(chunkU4J4R2AO_js.F(false)),l(chunkU4J4R2AO_js.B(r)),chunkU4J4R2AO_js.na().textTracks[p].mode="showing",t(chunkU4J4R2AO_js.ha("isFullScreen")||chunkU4J4R2AO_js.ha("isStaticFormat")&&!chunkU4J4R2AO_js.ha("isTouchScreenPortrait")?"subtitles":"main"),chunkU4J4R2AO_js.ma(chunkU4J4R2AO_js.Fa(r.language));},children:[!chunkU4J4R2AO_js.ha("isTouchScreen")&&i&&i.language===r.language&&jsxRuntime.jsx("div",{className:"pl-absolute pl-right-[11.8px]",children:jsxRuntime.jsx(G__default.default,{src:chunk3VH6NKXH_js.a.tick,alt:"",width:12,height:9})}),chunkU4J4R2AO_js.ha("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 ${i&&i.language===r.language&&"pl-border-primary"}`,children:i&&i.language===r.language&&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] ${chunkU4J4R2AO_js.ha("isTouchScreen")?"pl-pr-[21px]":"pl-pr-[10px]"}`,children:r.label})]},p))})})},go=react.memo(ti);chunkWO4IQUGO_js.e();var li=({className:t,onClick:l,onMouseOver:o,onMouseLeave:i})=>jsxRuntime.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,onClick:l,onMouseOver:o,onMouseLeave:i,children:[jsxRuntime.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M10 2.29395C10.3314 2.29395 10.6 2.56257 10.6 2.89395V17.1052C10.6 17.4366 10.3314 17.7052 10 17.7052C9.66866 17.7052 9.40002 17.4366 9.40002 17.1052V2.89395C9.40002 2.56257 9.66866 2.29395 10 2.29395Z"}),jsxRuntime.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M6.41258 4.95498C6.74396 4.95498 7.01258 5.22361 7.01258 5.55498V14.5565C7.01258 14.8879 6.74396 15.1565 6.41258 15.1565C6.08121 15.1565 5.81258 14.8879 5.81258 14.5565V5.55498C5.81258 5.22361 6.08121 4.95498 6.41258 4.95498Z"}),jsxRuntime.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M13.5858 4.84247C13.9172 4.84247 14.1858 5.1111 14.1858 5.44247V14.444C14.1858 14.7754 13.9172 15.044 13.5858 15.044C13.2545 15.044 12.9858 14.7754 12.9858 14.444V5.44247C12.9858 5.1111 13.2545 4.84247 13.5858 4.84247Z"}),jsxRuntime.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M17.1735 7.60177C17.5048 7.60177 17.7735 7.8704 17.7735 8.20177V11.5709C17.7735 11.9023 17.5048 12.1709 17.1735 12.1709C16.8421 12.1709 16.5735 11.9023 16.5735 11.5709V8.20177C16.5735 7.8704 16.8421 7.60177 17.1735 7.60177Z"}),jsxRuntime.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M2.82656 7.82841C3.15794 7.82841 3.42656 8.09703 3.42656 8.42844V11.7976C3.42656 12.1289 3.15794 12.3976 2.82656 12.3976C2.49519 12.3976 2.22656 12.1289 2.22656 11.7976V8.42844C2.22656 8.09703 2.49519 7.82841 2.82656 7.82841Z"})]}),ze=li;chunkWO4IQUGO_js.e();var ai=({setSection:t,showMultiAudioIcon:l})=>{let o=chunkU4J4R2AO_js.ia(),{multiAudioPopover:i}=chunkU4J4R2AO_js.ja(({popovers:{multiAudioPopover:d}})=>({multiAudioPopover:d}),reactRedux.shallowEqual),[r,p]=react.useState(false),a=react.useRef(null),{multiAudio:c,selectedAudioId:h,videoElementSizeInfo:v}=chunkU4J4R2AO_js.ja(({videoData:{multiAudio:d,selectedAudioId:u,videoElementSizeInfo:T}})=>({multiAudio:d,selectedAudioId:u,videoElementSizeInfo:T}),reactRedux.shallowEqual);_(a,()=>o(chunkU4J4R2AO_js.J(false)));let g=jsxRuntime.jsx("ul",{className:`pl-flex pl-flex-col pl-m-0 !pl-py-2 ${chunkU4J4R2AO_js.ha("isTouchScreen")?"pl-pb-4 pl-gap-2":"pl-gap-1"}`,children:chunkU4J4R2AO_js.ha("hasMultiAudio")&&c.map((d,u)=>jsxRuntime.jsxs("li",{className:`pl-flex pl-items-center pl-rounded-[4px] pl-relative pl-cursor-pointer pl-leading-6 ${chunkU4J4R2AO_js.ha("isTouchScreen")?"pl-pr-[26px] pl-gap-[18px] pl-py-3 pl-text-[14px]":"pl-pr-2 pl-gap-2 pl-py-2 pl-text-[12px] pl-font-medium"} ${h===u&&"pl-bg-primary/[0.08]"}`,onClick:()=>{o(chunkU4J4R2AO_js.D(u)),o(chunkU4J4R2AO_js.f(false)),o(chunkU4J4R2AO_js.F(false)),o(chunkU4J4R2AO_js.J(false)),t&&t("main");},children:[jsxRuntime.jsxs("div",{className:`${chunkU4J4R2AO_js.ha("isTouchScreen")?"pl-size-5":"pl-size-3"} pl-flex pl-items-center`,children:[!chunkU4J4R2AO_js.ha("isTouchScreen")&&h===u&&jsxRuntime.jsx(G__default.default,{src:chunk3VH6NKXH_js.a.tick,alt:"",width:12,height:9}),chunkU4J4R2AO_js.ha("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 ${h===u&&"pl-border-primary"}`,children:h===u&&jsxRuntime.jsx("div",{className:"pl-w-full pl-h-full pl-rounded-full pl-bg-primary"})})]}),jsxRuntime.jsxs("span",{children:["\u0632\u0628\u0627\u0646 ",d.name]})]},d.id))});return jsxRuntime.jsx(jsxRuntime.Fragment,{children:l?jsxRuntime.jsxs("div",{className:"pl-relative pl-flex pl-items-center",ref:a,children:[jsxRuntime.jsx(ze,{className:"pl-size-5 pl-fill-white pl-cursor-pointer",onClick:()=>o(chunkU4J4R2AO_js.J(!i)),onMouseOver:()=>!chunkU4J4R2AO_js.ha("isTouchScreen")&&p(true),onMouseLeave:()=>!chunkU4J4R2AO_js.ha("isTouchScreen")&&p(false)}),r&&jsxRuntime.jsx(chunk2EYLIYZS_js.a,{title:"\u062A\u063A\u06CC\u06CC\u0631 \u0635\u062F\u0627"}),jsxRuntime.jsx(q,{classNames:`!pl-px-0 pl-overflow-hidden !pl-bg-white !pl-pb-0 ${chunkU4J4R2AO_js.ha("isTouchScreen")?"!pl-fixed !pl-bottom-0 !pl-rounded-t-[20px] pl-rounded-b-none":"!pl-w-[200px] pl-right-0 pl-mb-[33px] !pl-rounded-[12px]"} ${chunkU4J4R2AO_js.ha("isTouchScreenPortrait")&&"!pl-w-screen tablet:!pl-max-w-[440px] tablet:!pl-mx-auto"} ${chunkU4J4R2AO_js.ha("isTouchScreenLandscape")&&"pl-w-full pl-max-w-[440px]"}`,status:i,onClose:()=>o(chunkU4J4R2AO_js.J(false)),type:chunkU4J4R2AO_js.ha("isTouchScreen")?"modal":"popover",isBlurBackground:chunkU4J4R2AO_js.ha("isTouchScreenPortrait"),ref:chunkU4J4R2AO_js.ha("isTouchScreen")?a:void 0,isHeader:chunkU4J4R2AO_js.ha("isTouchScreen"),isHasCatchUpLineOnTop:chunkU4J4R2AO_js.ha("isTouchScreen"),styles:{maxHeight:!chunkU4J4R2AO_js.ha("isTouchScreenPortrait")&&v.height-(chunkU4J4R2AO_js.ha("isTouchScreenLandscape")?120:75)},children:g})]}):jsxRuntime.jsx(jsxRuntime.Fragment,{children:g})})},Ve=react.memo(ai);var ui=()=>{let t=chunkU4J4R2AO_js.ia(),{selectedSubtitle:l,videoElementSizeInfo:o}=chunkU4J4R2AO_js.ja(({videoData:{params:g,selectedSubtitle:d,videoElementSizeInfo:u}})=>({params:g,selectedSubtitle:d,videoElementSizeInfo:u}),reactRedux.shallowEqual),{isFullScreen:i}=chunkU4J4R2AO_js.ja(({controller:{isFullScreen:g}})=>({isFullScreen:g}),reactRedux.shallowEqual),{settingPopover:r}=chunkU4J4R2AO_js.ja(({popovers:{settingPopover:g}})=>({settingPopover:g}),reactRedux.shallowEqual),[p,a]=react.useState(chunkU4J4R2AO_js.ha("isStaticFormat")&&!chunkU4J4R2AO_js.ha("isTouchScreenPortrait")?"subtitles":"main"),[c,h]=react.useState(false),v=react.useRef(null);return react.useEffect(()=>{chunkU4J4R2AO_js.ha("isFullScreen")&&a("subtitles");},[i]),_(v,()=>{t(chunkU4J4R2AO_js.F(false)),setTimeout(()=>{a(chunkU4J4R2AO_js.R.getState().controller.isFullScreen||chunkU4J4R2AO_js.ha("isStaticFormat")&&!chunkU4J4R2AO_js.ha("isTouchScreenPortrait")?"subtitles":"main");},500);}),jsxRuntime.jsxs("div",{className:`pl-inline-flex ${chunkU4J4R2AO_js.ha("isLandscape")&&"pl-relative"}`,ref:v,children:[jsxRuntime.jsxs("div",{className:"pl-flex pl-items-center pl-relative pl-cursor-pointer",onClick:()=>t(chunkU4J4R2AO_js.F(!r)),onMouseOver:()=>!chunkU4J4R2AO_js.ha("isTouchScreen")&&!chunkU4J4R2AO_js.ha("showSettingPopover")&&h(true),onMouseLeave:()=>!chunkU4J4R2AO_js.ha("isTouchScreen")&&h(false),children:[jsxRuntime.jsx(G__default.default,{src:chunk3VH6NKXH_js.a.settings,alt:"",width:20,height:20}),c&&jsxRuntime.jsx(chunk2EYLIYZS_js.a,{title:"\u062A\u0646\u0638\u06CC\u0645\u0627\u062A "})]}),jsxRuntime.jsx(q,{classNames:`!pl-p-0 pl-overflow-hidden !pl-bg-white ${chunkU4J4R2AO_js.ha("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]"} ${chunkU4J4R2AO_js.ha("isTouchScreenPortrait")&&"!pl-w-screen tablet:!pl-max-w-[440px] tablet:!pl-mx-auto"} ${chunkU4J4R2AO_js.ha("isTouchScreenLandscape")&&"pl-w-full pl-max-w-[285px]"} !overflow-auto`,styles:{maxHeight:!chunkU4J4R2AO_js.ha("isTouchScreenPortrait")&&o.height-75},status:r,onClose:()=>{t(chunkU4J4R2AO_js.F(false)),setTimeout(()=>a(chunkU4J4R2AO_js.ha("isFullScreen")||chunkU4J4R2AO_js.ha("isStaticFormat")&&!chunkU4J4R2AO_js.ha("isTouchScreenPortrait")?"subtitles":"main"),500);},type:chunkU4J4R2AO_js.ha("isTouchScreen")?"modal":"popover",isBlurBackground:chunkU4J4R2AO_js.ha("isTouchScreenPortrait"),ref:chunkU4J4R2AO_js.ha("isTouchScreen")?v:void 0,isHeader:chunkU4J4R2AO_js.ha("isTouchScreen"),customHeader:jsxRuntime.jsx(jsxRuntime.Fragment,{}),isHasCatchUpLineOnTop:chunkU4J4R2AO_js.ha("isTouchScreen"),children:jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[p==="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:[!chunkU4J4R2AO_js.ha("isStaticFormat")&&!chunkU4J4R2AO_js.ha("isFullScreen")&&!chunkU4J4R2AO_js.ha("isIOS")&&jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsxs("div",{className:"pl-flex pl-items-center pl-gap-[10px] pl-cursor-pointer",onClick:()=>a("qualityLevels"),children:[jsxRuntime.jsx(G__default.default,{src:chunk3VH6NKXH_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(G__default.default,{src:chunk3VH6NKXH_js.a.chevronLeft,alt:"",width:16,height:16})]})}),!chunkU4J4R2AO_js.ha("isStaticFormat")&&!chunkU4J4R2AO_js.ha("isFullScreen")&&jsxRuntime.jsxs("div",{className:"pl-flex pl-items-center pl-gap-[10px] pl-cursor-pointer",onClick:()=>a("speed"),children:[jsxRuntime.jsx(_e,{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(G__default.default,{src:chunk3VH6NKXH_js.a.chevronLeft,alt:"",width:16,height:16})]}),chunkU4J4R2AO_js.ha("hasMultipleSubtitles")&&jsxRuntime.jsxs("div",{className:"pl-flex pl-items-center pl-gap-[10px] pl-cursor-pointer",onClick:()=>a("subtitles"),children:[jsxRuntime.jsx(G__default.default,{src:chunk3VH6NKXH_js.a.subtitle,width:20,height:20,alt:"subtitle-icon"}),jsxRuntime.jsx("p",{className:"pl-ml-auto pl-text-[12px] pl-font-medium pl-text-black/[0.87]",children:"\u0632\u0628\u0627\u0646 \u0632\u06CC\u0631\u0646\u0648\u06CC\u0633"}),jsxRuntime.jsx(G__default.default,{src:chunk3VH6NKXH_js.a.chevronLeft,alt:"",width:16,height:16})]}),chunkU4J4R2AO_js.ha("hasSubtitles")&&chunkU4J4R2AO_js.ha("isTouchScreenPortrait")&&jsxRuntime.jsxs("div",{className:"pl-flex pl-items-center pl-gap-[10px] pl-cursor-pointer",children:[jsxRuntime.jsx(G__default.default,{src:chunk3VH6NKXH_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(vo,{enabled:!!l,setEnabled:chunk7VRL2XF3_js.b})]}),chunkU4J4R2AO_js.ha("hasMultiAudio")&&chunkU4J4R2AO_js.ha("isTouchScreenPortrait")&&jsxRuntime.jsxs("div",{className:"pl-flex pl-items-center pl-gap-[10px] pl-cursor-pointer",onClick:()=>a("multiAudio"),children:[jsxRuntime.jsx(ze,{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:"\u062A\u063A\u06CC\u06CC\u0631 \u0635\u062F\u0627"}),jsxRuntime.jsx(G__default.default,{src:chunk3VH6NKXH_js.a.chevronLeft,alt:"",width:16,height:16})]})]}),p==="qualityLevels"&&jsxRuntime.jsx(De,{setSection:a}),p==="speed"&&jsxRuntime.jsx(Oe,{setSection:a}),p==="subtitles"&&jsxRuntime.jsx(go,{setSection:a}),p==="multiAudio"&&jsxRuntime.jsx(Ve,{setSection:a})]})})]})},yo=react.memo(ui);chunkWO4IQUGO_js.e();var fi=()=>{let{duration:t,currentTime:l}=chunkU4J4R2AO_js.ja(({controller:{duration:o,currentTime:i}})=>({duration:o,currentTime:i}),reactRedux.shallowEqual);return chunkU4J4R2AO_js.ja(({videoData:{videoElementSizeInfo:o,params:i}})=>({videoElementSizeInfo:o,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 ${chunkU4J4R2AO_js.ha("isFullScreen")?"pl-ml-8":"pl-ml-4"} ${chunkU4J4R2AO_js.ha("isTouchScreenPortrait")?"!pl-ml-0":"pl-absolute pl-left-0 pl-bottom-full pl-mb-[33px]"}`,children:[jsxRuntime.jsx("span",{children:chunkU4J4R2AO_js.U(t||0)}),jsxRuntime.jsx("span",{children:" / "}),jsxRuntime.jsx("span",{children:chunkU4J4R2AO_js.U(l||0)})]})})},qe=fi;chunkWO4IQUGO_js.e();var xi=()=>jsxRuntime.jsx(G__default.default,{src:chunk3VH6NKXH_js.a.unlock,alt:"unlock-icon",width:20,height:20,onClick:()=>chunkLBYZQ7HZ_js.h("lock")}),To=xi;chunkWO4IQUGO_js.e();var Ti=()=>{let[t,l]=react.useState(false);return chunkU4J4R2AO_js.ja(({videoData:{selectedSubtitle:o,videoElementSizeInfo:i,params:r}})=>({selectedSubtitle:o,videoElementSizeInfo:i,params:r}),reactRedux.shallowEqual),jsxRuntime.jsxs("div",{className:"pl-relative pl-flex pl-items-center",children:[jsxRuntime.jsx(G__default.default,{alt:"subtitle-icon",src:chunkU4J4R2AO_js.ha("isSelectedSubtitle")?chunk3VH6NKXH_js.a.subtitleFill:chunk3VH6NKXH_js.a.subtitleOutline,className:"pl-cursor-pointer",width:20,height:20,onClick:()=>chunk7VRL2XF3_js.b(),onDoubleClick:o=>o.stopPropagation(),onMouseOver:()=>!chunkU4J4R2AO_js.ha("isTouchScreen")&&l(true),onMouseLeave:()=>!chunkU4J4R2AO_js.ha("isTouchScreen")&&l(false)}),t&&jsxRuntime.jsx(chunk2EYLIYZS_js.a,{title:"\u0632\u06CC\u0631\u0646\u0648\u06CC\u0633"})]})},Co=Ti;chunkWO4IQUGO_js.e();chunkWO4IQUGO_js.e();var ki=t=>(chunkU4J4R2AO_js.ja(({videoData:{videoElementSizeInfo:l,params:o}})=>({videoElementSizeInfo:l,params:o}),reactRedux.shallowEqual),jsxRuntime.jsxs("svg",{width:20,height:20,viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t,children:[jsxRuntime.jsx("rect",{x:"3",y:"3",width:"4",height:"4",rx:"1.5"}),jsxRuntime.jsx("rect",{x:"3",y:"9",width:"4",height:"4",rx:"1.5"}),jsxRuntime.jsx("rect",{x:"3",y:"15",width:"4",height:"4",rx:"1.5"}),jsxRuntime.jsx("rect",{x:"8",y:"16",width:"11",height:"2",rx:"1"}),jsxRuntime.jsx("rect",{x:"8",y:"10",width:"11",height:"2",rx:"1"}),jsxRuntime.jsx("rect",{x:"8",y:"4",width:"11",height:"2",rx:"1"})]})),ko=ki;var Mi=()=>{let [t,l]=react.useState(0),[o,i]=react.useState(void 0),[r,p]=react.useState(false),{markers:a,params:c}=chunkU4J4R2AO_js.ja(({videoData:{markers:f,params:k,videoElementSizeInfo:E}})=>({markers:f,params:k,videoElementSizeInfo:E}),reactRedux.shallowEqual),{markersListPopover:h}=chunkU4J4R2AO_js.ja(({popovers:{markersListPopover:f}})=>({markersListPopover:f}),reactRedux.shallowEqual),v=react.useRef(null),g=chunkU4J4R2AO_js.ia();_(v,()=>g(chunkU4J4R2AO_js.I(false)));let u=(f,k,E,m,b)=>{chunkU4J4R2AO_js.pa()&&(chunkU4J4R2AO_js.pa().style.width=`${Ht(f)}px`),chunkLBYZQ7HZ_js.i(chunkU4J4R2AO_js.na().currentTime,f),chunkU4J4R2AO_js.na().currentTime=f,g(chunkU4J4R2AO_js.I(false)),chunkU4J4R2AO_js.ma(chunkU4J4R2AO_js.Ga(k,f,E,m,b));},T=()=>{g(chunkU4J4R2AO_js.I(!h));};return jsxRuntime.jsxs("div",{className:`pl-flex pl-items-center pl-p-1 pl-relative ${chunkU4J4R2AO_js.ha("showMarkerListPopover")&&"pl-bg-secondary-50/[0.4] pl-rounded-[4px]"}`,ref:v,children:[jsxRuntime.jsx(ko,{className:"pl-cursor-pointer pl-fill-dark-5",onClick:T,onMouseOver:()=>!chunkU4J4R2AO_js.ha("isTouchScreen")&&p(true),onMouseLeave:()=>!chunkU4J4R2AO_js.ha("isTouchScreen")&&p(false)}),r&&jsxRuntime.jsx(chunk2EYLIYZS_js.a,{title:"\u0644\u06CC\u0633\u062A \u0646\u0634\u0627\u0646\u06AF\u0631\u0647\u0627 (e)",className:"!pl-bottom-[180%] !pl-right-[-48px]"}),jsxRuntime.jsx(q,{classNames:"!pl-p-0 pl-left-0 !pl-bg-white dark:!pl-bg-dark-13 !pl-rounded-[4px] pl-mb-[33px]",status:chunkU4J4R2AO_js.ha("showMarkerListPopover"),onClose:()=>{g(chunkU4J4R2AO_js.I(false));},headerTitle:"\u0646\u0634\u0627\u0646\u06AF\u0631\u0647\u0627",isHeader:true,type:"popover",children:jsxRuntime.jsx("div",{className:"pl-flex pl-flex-col pl-gap-6 pl-mx-2 pl-mt-2",children:jsxRuntime.jsx("div",{className:"pl-flex pl-flex-col pl-gap-2 pl-pb-2",children:a.map(f=>jsxRuntime.jsx("div",{onClick:()=>u(f.time,f.id,f.title,f.description,f.sticker),className:"odd:dark:pl-bg-dark-1 odd:pl-bg-main/[0.1] hover:pl-bg-main/[0.1] hover:dark:bg-white/[0.25] pl-rounded-[8px]",children:jsxRuntime.jsxs("div",{className:"pl-flex pl-item-center pl-gap-2 pl-cursor-pointer pl-rounded-[4px] pl-relative pl-p-2 pl-mx-2",children:[f.banner||!f.sticker?jsxRuntime.jsx(G__default.default,{src:f.banner?f.banner:"IMAGES.defaultMarkersListItemIcon",width:40,height:40,alt:f.title}):jsxRuntime.jsx("div",{className:"pl-w-[40px] pl-h-[40px] pl-bg-secondary dark:pl-bg-secondary-50 pl-rounded-[6px] pl-flex pl-items-center",children:jsxRuntime.jsx(ye,{name:f.sticker,className:"pl-w-[20px] pl-h-[20px] pl-mx-auto"})}),jsxRuntime.jsxs("div",{className:"pl-text-gray-800 dark:pl-text-white",children:[jsxRuntime.jsx("p",{className:"pl-flex pl-items-center pl-mb-1 pl-text-[14px] pl-font-bold pl-w-[130px] pl-whitespace-nowrap pl-overflow-hidden pl-text-ellipsis",children:jsxRuntime.jsx("div",{children:f.title})}),jsxRuntime.jsx("p",{className:"pl-text-[13px] pl-font-normal pl-w-[200px] pl-whitespace-nowrap pl-overflow-hidden pl-text-ellipsis",children:f.description})]}),jsxRuntime.jsx("span",{className:"pl-absolute pl-left-9 pl-top-2 pl-text-[12px] pl-font-bold pl-bg-secondary/[0.3] dark:pl-bg-secondary/[0.6] pl-text-gray-800 dark:pl-text-white pl-rounded-[4px] pl-p-[3px]",children:chunkU4J4R2AO_js.U(f.time)})]})},f.id))})})})]})},No=Mi;var Ai=()=>{chunkU4J4R2AO_js.ja(({controller:{isFullScreen:l}})=>({isFullScreen:l}),reactRedux.shallowEqual),chunkU4J4R2AO_js.ja(({videoData:{videoElementSizeInfo:l,params:o,subtitles:i}})=>({videoElementSizeInfo:l,params:o,subtitles:i}),reactRedux.shallowEqual);let t="";return chunkU4J4R2AO_js.ha("isTouchScreen")?chunkU4J4R2AO_js.ha("isFullScreen")?t="pl-mx-4 tablet:pl-mx-6":t="pl-mx-4":chunkU4J4R2AO_js.ha("isFullScreen")?t="pl-mx-8":t="pl-mx-4",jsxRuntime.jsxs("div",{id:"player-controllbar",className:`pl-flex pl-justify-between pl-items-center ${t}`,children:[jsxRuntime.jsxs("div",{className:"pl-flex pl-items-center pl-gap-5",children:[jsxRuntime.jsx(chunk2EYLIYZS_js.c,{}),chunkU4J4R2AO_js.ha("isTouchScreenLandscape")&&jsxRuntime.jsx(To,{}),chunkU4J4R2AO_js.ha("showPictureInPicture")&&jsxRuntime.jsx(no,{}),chunkU4J4R2AO_js.ha("showSettingIcon")&&jsxRuntime.jsx(yo,{}),chunkU4J4R2AO_js.ha("isFullScreen")&&!chunkU4J4R2AO_js.ha("isStaticFormat")&&jsxRuntime.jsx(De,{showQualityLevelsIcon:true}),(chunkU4J4R2AO_js.ha("isFullScreen")||chunkU4J4R2AO_js.ha("isStaticFormat"))&&jsxRuntime.jsx(Oe,{showSpeedIcon:true}),chunkU4J4R2AO_js.ha("hasSubtitles")&&!chunkU4J4R2AO_js.ha("isTouchScreenPortrait")&&jsxRuntime.jsx(Co,{}),chunkU4J4R2AO_js.ha("hasMultiAudio")&&!chunkU4J4R2AO_js.ha("isTouchScreenPortrait")&&jsxRuntime.jsx(Ve,{showMultiAudioIcon:true})]}),jsxRuntime.jsxs("div",{className:"pl-flex pl-items-center pl-gap-5",children:[chunkU4J4R2AO_js.ha("isTouchScreenPortrait")&&jsxRuntime.jsx(qe,{}),!chunkU4J4R2AO_js.ha("isIOS")&&jsxRuntime.jsx(chunk2EYLIYZS_js.b,{}),chunkU4J4R2AO_js.ha("hasMarkers")&&jsxRuntime.jsx(No,{})]})]})},Mo=react.memo(Ai);chunkWO4IQUGO_js.e();var $i=()=>{let{subtitleText:t}=chunkU4J4R2AO_js.ja(({videoData:{subtitleText:o,selectedSubtitle:i}})=>({subtitleText:o,selectedSubtitle:i}),reactRedux.shallowEqual);return chunkU4J4R2AO_js.ja(({controller:{isFullScreen:o}})=>({isFullScreen:o}),reactRedux.shallowEqual),jsxRuntime.jsx("div",{id:"subtitle-id",style:{direction:"ltr"},className:`pl-z-0 pl-absolute pl-w-full pl-text-center pl-text-[18px] pl-px-4 pl-text-white pl-font-medium ${(()=>{let o="";return chunkU4J4R2AO_js.ha("isLock")?o="pl-bottom-4":chunkU4J4R2AO_js.ha("isActiveElements")?chunkU4J4R2AO_js.ha("isTouchScreenPortrait")?o="pl-bottom-4 tablet:pl-bottom-[65px]":chunkU4J4R2AO_js.ha("isFullScreen")?o="pl-bottom-[104px] tablet:pl-bottom-[137px] desktop:pl-bottom-[146px]":o="pl-bottom-[120px]":chunkU4J4R2AO_js.ha("isActiveElements")||(o="pl-bottom-4"),o})()}`,children:chunkU4J4R2AO_js.ea(t).map((o,i)=>jsxRuntime.jsx("p",{className:`pl-mx-auto pl-bg-Common-black-overlay-2 ${chunkU4J4R2AO_js.ha("isTouchScreen")&&chunkU4J4R2AO_js.ha("isActiveElements")&&"pl-opacity-50 tablet:pl-opacity-100"} pl-text-wrap pl-max-w-full pl-w-max pl-px-1`,children:chunkU4J4R2AO_js.ga(o)},i))})},$o=$i;var Fi=()=>{chunkU4J4R2AO_js.ja(({controller:{lock:l,isFullScreen:o,isLoading:i,activeElements:r}})=>({lock:l,isFullScreen:o,isLoading:i,activeElements:r}),reactRedux.shallowEqual),chunkU4J4R2AO_js.ja(({videoData:{subtitles:l,selectedSubtitle:o}})=>({subtitles:l,selectedSubtitle:o}),reactRedux.shallowEqual);let t="";return chunkU4J4R2AO_js.ha("isTouchScreen")?chunkU4J4R2AO_js.ha("isFullScreen")?t="pl-gap-4 table:pl-gap-6 pl-mb-4 tablet:pl-mb-6 ":t="pl-gap-6 pl-mb-0":chunkU4J4R2AO_js.ha("isFullScreen")?t="pl-gap-6 pl-mb-8":t="pl-gap-4 pl-mb-3",jsxRuntime.jsx("div",{id:"footer",className:"pl-relative",style:{zIndex:4},onClick:l=>l.stopPropagation(),children:jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[chunkU4J4R2AO_js.ha("showSubtitle")&&jsxRuntime.jsx($o,{}),!chunkU4J4R2AO_js.ha("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 ${t} ${chunkU4J4R2AO_js.ha("isActiveElements")&&!chunkU4J4R2AO_js.ha("isLoading")?"animate__fadeIn pl-pointer-events-auto":"animate__fadeOut pl-pointer-events-none"}`,children:[!chunkU4J4R2AO_js.ha("isTouchScreenPortrait")&&jsxRuntime.jsx(qe,{}),chunkU4J4R2AO_js.ha("showProgressbar")&&jsxRuntime.jsx(po,{}),jsxRuntime.jsx(Mo,{})]})})]})})},Oo=Fi;chunkWO4IQUGO_js.e();var Di=zo__default.default(()=>import('./staticVideoTag-TZFKVQQ7.js')),_i=zo__default.default(()=>import('./nonStaticVideoTag-WI32AYRX.js')),Oi=()=>jsxRuntime.jsx(jsxRuntime.Fragment,{children:chunkU4J4R2AO_js.ha("isStaticFormat")?jsxRuntime.jsx(Di,{}):jsxRuntime.jsx(_i,{})}),Bo=Oi;chunkWO4IQUGO_js.e();var Vi=(t,l)=>{let o=chunkU4J4R2AO_js.ia(),{activeElements:i}=chunkU4J4R2AO_js.ja(({controller:{activeElements:c}})=>({activeElements:c}),reactRedux.shallowEqual),r=react.useRef(null),p=react.useRef(t),a=react.useRef(l);react.useEffect(()=>{p.current=t;},[t]),react.useEffect(()=>{a.current=l;},[l]),react.useEffect(()=>{let c=false,h=d=>{let{activeElements:u,isEnded:T}=chunkU4J4R2AO_js.R.getState().controller;T?o(chunkU4J4R2AO_js.f(true)):d.pointerType==="mouse"&&(clearTimeout(r.current),u?["player-tag","main-content","player-controllbar","video-opacity","playerElements","touchBackward","touchForward"].includes(d.target.id)&&(c=true):o(chunkU4J4R2AO_js.f(true)),r.current=setTimeout(()=>{let{settingPopover:f,speedPopover:k,qualityLevelsPopover:E,multiAudioPopover:m}=chunkU4J4R2AO_js.R.getState().popovers,{play:b}=chunkU4J4R2AO_js.R.getState().controller;!f&&!k&&!E&&!m&&b&&c&&o(chunkU4J4R2AO_js.f(false));},chunkQHZJEU27_js.a));},v=d=>{setTimeout(()=>{let{activeElements:u,isEnded:T,firstPlay:f}=chunkU4J4R2AO_js.R.getState().controller;if(clearTimeout(r.current),T)return o(chunkU4J4R2AO_js.f(true));chunkU4J4R2AO_js.T()&&!f&&!p.current&&!a.current&&(["player-tag","main-content","video-opacity","touchBackward","touchForward"].includes(d.target.id)||chunkU4J4R2AO_js.W(d,"playerElements")?(o(chunkU4J4R2AO_js.f(!u)),r.current=setTimeout(()=>{let{settingPopover:k,speedPopover:E,qualityLevelsPopover:m,multiAudioPopover:b}=chunkU4J4R2AO_js.R.getState().popovers;!k&&!E&&!m&&!b&&o(chunkU4J4R2AO_js.f(false));},chunkQHZJEU27_js.a)):r.current=setTimeout(()=>{let{settingPopover:k,speedPopover:E,qualityLevelsPopover:m,multiAudioPopover:b}=chunkU4J4R2AO_js.R.getState().popovers;!k&&!E&&!m&&!b&&o(chunkU4J4R2AO_js.f(false));},chunkQHZJEU27_js.a));},200);},g=()=>{clearTimeout(r.current),r.current=setTimeout(()=>{let{activeElements:d,isEnded:u}=chunkU4J4R2AO_js.R.getState().controller,{settingPopover:T,speedPopover:f,qualityLevelsPopover:k}=chunkU4J4R2AO_js.R.getState().popovers;u?o(chunkU4J4R2AO_js.f(true)):!T&&!f&&!k&&d&&!u&&o(chunkU4J4R2AO_js.f(!d));},chunkQHZJEU27_js.a);};return document.getElementById("video-area").addEventListener("touchstart",v),document.getElementById("video-area").addEventListener("touchmove",g),document.getElementById("video-area").addEventListener("pointermove",h),()=>{let d=document.getElementById("video-area");d&&(d.removeEventListener("touchstart",v),d.removeEventListener("touchmove",g),d.removeEventListener("pointermove",h));}},[i,t,l]);},Vo=Vi;chunkWO4IQUGO_js.e();var Xi=()=>{let{firstPlay:t,isFullScreen:l}=chunkU4J4R2AO_js.ja(({controller:{firstPlay:o,isFullScreen:i}})=>({firstPlay:o,isFullScreen:i}),reactRedux.shallowEqual);react.useEffect(()=>{if(chunkU4J4R2AO_js.na()){let o,i=()=>{o=setTimeout(()=>{chunkLBYZQ7HZ_js.j();},chunkU4J4R2AO_js.T()?0:300);};return i(),window.addEventListener("resize",i),()=>{window.removeEventListener("resize",i),clearTimeout(o);}}},[t,l,chunkU4J4R2AO_js.na()]);},Ho=Xi;chunkWO4IQUGO_js.e();var Wi=()=>{let{firstPlay:t,activeSubtitle:l}=chunkU4J4R2AO_js.ja(({controller:o,videoData:i})=>({firstPlay:o.firstPlay,activeSubtitle:i.params?.activeSubtitle}),reactRedux.shallowEqual);react.useEffect(()=>{chunkU4J4R2AO_js.ha("setSubtitleFirstPlay")&&chunk7VRL2XF3_js.b(),chunkU4J4R2AO_js.ha("hasActiveSubtitleInParams")&&setTimeout(()=>chunk7VRL2XF3_js.b(l),500);},[t,l]);},qo=Wi;var Qi=zo__default.default(()=>import('./touchVolumeBrightness-YEGKEXDE.js')),Uo=zo__default.default(()=>import('./backwardForward-W2MK6XN6.js')),Gi=()=>{let[t,l]=react.useState(false),[o,i]=react.useState(false);return chunkU4J4R2AO_js.ja(({videoData:{details:r,params:p,videoElementSizeInfo:a}})=>({details:r,params:p,videoElementSizeInfo:a}),reactRedux.shallowEqual),chunkU4J4R2AO_js.ja(({controller:{firstPlay:r,isFullScreen:p,isLoading:a,canPlayVideo:c}})=>({firstPlay:r,isFullScreen:p,isLoading:a,canPlayVideo:c}),reactRedux.shallowEqual),chunkSSP53RHG_js.a(),Ho(),Vo(t,o),qo(),jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsxs("div",{id:"video-area",style:{zIndex:chunkU4J4R2AO_js.ha("isFullScreen")?1e3:"unset"},onClick:r=>{let p=document.getElementById("player-popover");(chunkU4J4R2AO_js.ha("isFirstPlay")||!chunkU4J4R2AO_js.ha("isTouchScreen")&&!p)&&chunkLBYZQ7HZ_js.a(r);},onDoubleClick:r=>chunkLBYZQ7HZ_js.k(r),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 ${!chunkU4J4R2AO_js.ha("isTouchScreen")&&!chunkU4J4R2AO_js.ha("isFullScreen")&&"!pl-rounded-[12px]"} ${chunkU4J4R2AO_js.ha("isFullScreen")&&"!pl-fixed !pl-w-screen dvh"} pl-w-full pl-relative ${!chunkU4J4R2AO_js.ha("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 ${!chunkU4J4R2AO_js.ha("isTouchScreen")&&!chunkU4J4R2AO_js.ha("isFullScreen")&&"!pl-rounded-[12px]"} ${chunkU4J4R2AO_js.ha("isActiveElements")?"pl-bg-opacity-50":"pl-bg-opacity-0"}`}),chunkU4J4R2AO_js.ha("showTouchVolumeBrightness")&&jsxRuntime.jsx(Qi,{}),chunkU4J4R2AO_js.ha("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:o||t?1002:1},children:[jsxRuntime.jsx(Uo,{type:"touchForward",isRightDoubleTouched:t,setIsRightDoubleTouched:l}),jsxRuntime.jsx(Uo,{type:"touchBackward",isLeftDoubleTouched:o,setIsLeftDoubleTouched:i})]}),jsxRuntime.jsx(Bo,{}),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:[chunkU4J4R2AO_js.ha("showHeader")&&jsxRuntime.jsx(Dt,{}),chunkU4J4R2AO_js.ha("showMain")&&jsxRuntime.jsx(Bt,{}),chunkU4J4R2AO_js.ha("showFooter")&&jsxRuntime.jsx(Oo,{})]})})]})})},$m=Gi;
8
+ exports.a=$m;//# sourceMappingURL=chunk-CGRRDO3H.js.map
9
+ //# sourceMappingURL=chunk-CGRRDO3H.js.map