@hopeplayer/core 1.4.0 → 1.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (151) hide show
  1. package/dist/HopePlayerElement.d.ts +42 -2
  2. package/dist/HopePlayerElement.d.ts.map +1 -1
  3. package/dist/chunks/NativeEme-CXosVcw8.js +80 -0
  4. package/dist/chunks/NativeEme-CXosVcw8.js.map +1 -0
  5. package/dist/chunks/{accessibility-DeUIoAda.js → accessibility-DFx4CE0H.js} +9 -8
  6. package/dist/chunks/{accessibility-DeUIoAda.js.map → accessibility-DFx4CE0H.js.map} +1 -1
  7. package/dist/chunks/adTriggers-BIAWe8o4.js +419 -0
  8. package/dist/chunks/adTriggers-BIAWe8o4.js.map +1 -0
  9. package/dist/chunks/{ads-CdWbE9aD.js → ads-DlpHPpR9.js} +3 -3
  10. package/dist/chunks/ads-DlpHPpR9.js.map +1 -0
  11. package/dist/chunks/analytics-DEjTAJO9.js +281 -0
  12. package/dist/chunks/analytics-DEjTAJO9.js.map +1 -0
  13. package/dist/chunks/{cast-BQ-suTcF.js → cast-vHyi7oV_.js} +2 -2
  14. package/dist/chunks/{cast-BQ-suTcF.js.map → cast-vHyi7oV_.js.map} +1 -1
  15. package/dist/chunks/dash-CWjy-y7B.js +22 -0
  16. package/dist/chunks/dash-CWjy-y7B.js.map +1 -0
  17. package/dist/chunks/docPip-wybMVP1H.js +82 -0
  18. package/dist/chunks/docPip-wybMVP1H.js.map +1 -0
  19. package/dist/chunks/heatmap-Bb7neaYU.js +92 -0
  20. package/dist/chunks/heatmap-Bb7neaYU.js.map +1 -0
  21. package/dist/chunks/{history-DAbqEhNB.js → history-CwqLXiZi.js} +2 -2
  22. package/dist/chunks/{history-DAbqEhNB.js.map → history-CwqLXiZi.js.map} +1 -1
  23. package/dist/chunks/interactive-CgltIneu.js +189 -0
  24. package/dist/chunks/interactive-CgltIneu.js.map +1 -0
  25. package/dist/chunks/keySystems-CNzjRq6e.js +70 -0
  26. package/dist/chunks/keySystems-CNzjRq6e.js.map +1 -0
  27. package/dist/chunks/{loopSection-CvF4l5uf.js → loopSection-Bwk4W8vz.js} +16 -16
  28. package/dist/chunks/loopSection-Bwk4W8vz.js.map +1 -0
  29. package/dist/chunks/{markers-B04NMI79.js → markers-L69W3kj6.js} +53 -51
  30. package/dist/chunks/markers-L69W3kj6.js.map +1 -0
  31. package/dist/chunks/player-D2_HRzot.js +4351 -0
  32. package/dist/chunks/player-D2_HRzot.js.map +1 -0
  33. package/dist/chunks/{playlist-C6Mh9BE8.js → playlist-CHfStNbQ.js} +29 -21
  34. package/dist/chunks/playlist-CHfStNbQ.js.map +1 -0
  35. package/dist/chunks/plugin-style-CPJELe-i.js +17 -0
  36. package/dist/chunks/plugin-style-CPJELe-i.js.map +1 -0
  37. package/dist/chunks/pluginHost-cN2uGFeG.js +566 -0
  38. package/dist/chunks/pluginHost-cN2uGFeG.js.map +1 -0
  39. package/dist/chunks/redirectScreen-TIqLdvBY.js +239 -0
  40. package/dist/chunks/redirectScreen-TIqLdvBY.js.map +1 -0
  41. package/dist/chunks/{rewardedUnlock-CGhQyWOk.js → rewardedUnlock-DUqYwXTr.js} +2 -2
  42. package/dist/chunks/{rewardedUnlock-CGhQyWOk.js.map → rewardedUnlock-DUqYwXTr.js.map} +1 -1
  43. package/dist/chunks/segments-Ds-c1b5e.js +66 -0
  44. package/dist/chunks/segments-Ds-c1b5e.js.map +1 -0
  45. package/dist/chunks/{skipSegments-BbWzPpXz.js → skipSegments-ByNoF1qZ.js} +2 -2
  46. package/dist/chunks/{skipSegments-BbWzPpXz.js.map → skipSegments-ByNoF1qZ.js.map} +1 -1
  47. package/dist/chunks/{spriteThumbnails-B7oDZFTo.js → spriteThumbnails-Cr9UmkM9.js} +74 -51
  48. package/dist/chunks/spriteThumbnails-Cr9UmkM9.js.map +1 -0
  49. package/dist/chunks/{statsPanel-DSClIwA3.js → statsPanel-D0DtoFgS.js} +2 -2
  50. package/dist/chunks/statsPanel-D0DtoFgS.js.map +1 -0
  51. package/dist/chunks/{sticky-D_eLCNFk.js → sticky-BDStzjBM.js} +27 -26
  52. package/dist/chunks/sticky-BDStzjBM.js.map +1 -0
  53. package/dist/chunks/{story-BLBij82f.js → story-CodA2dfn.js} +2 -2
  54. package/dist/chunks/{story-BLBij82f.js.map → story-CodA2dfn.js.map} +1 -1
  55. package/dist/chunks/transcript-LG7E9UYE.js +186 -0
  56. package/dist/chunks/transcript-LG7E9UYE.js.map +1 -0
  57. package/dist/controls/ContextMenu.d.ts +1 -0
  58. package/dist/controls/ContextMenu.d.ts.map +1 -1
  59. package/dist/controls/ControlBar.d.ts +6 -0
  60. package/dist/controls/ControlBar.d.ts.map +1 -1
  61. package/dist/controls/SeekBar.d.ts +5 -2
  62. package/dist/controls/SeekBar.d.ts.map +1 -1
  63. package/dist/controls/SettingsMenu.d.ts +2 -1
  64. package/dist/controls/SettingsMenu.d.ts.map +1 -1
  65. package/dist/drm/NativeEme.d.ts +23 -0
  66. package/dist/drm/NativeEme.d.ts.map +1 -0
  67. package/dist/drm/keySystems.d.ts +18 -0
  68. package/dist/drm/keySystems.d.ts.map +1 -0
  69. package/dist/hls/SourceManager.d.ts +31 -5
  70. package/dist/hls/SourceManager.d.ts.map +1 -1
  71. package/dist/hls/dashEngine.d.ts +85 -0
  72. package/dist/hls/dashEngine.d.ts.map +1 -0
  73. package/dist/hls/sourceGroups.d.ts.map +1 -1
  74. package/dist/hope-player.js +1 -1
  75. package/dist/i18n/locales/en.d.ts.map +1 -1
  76. package/dist/i18n/locales/tr.d.ts.map +1 -1
  77. package/dist/i18n/types.d.ts +28 -0
  78. package/dist/i18n/types.d.ts.map +1 -1
  79. package/dist/index.d.ts +2 -2
  80. package/dist/index.d.ts.map +1 -1
  81. package/dist/keyboard/KeyboardController.d.ts +14 -0
  82. package/dist/keyboard/KeyboardController.d.ts.map +1 -1
  83. package/dist/plugin-api/PluginAds.d.ts +61 -0
  84. package/dist/plugin-api/PluginAds.d.ts.map +1 -0
  85. package/dist/plugin-api/PluginHost.d.ts +6 -0
  86. package/dist/plugin-api/PluginHost.d.ts.map +1 -1
  87. package/dist/plugin-api/types.d.ts +39 -0
  88. package/dist/plugin-api/types.d.ts.map +1 -1
  89. package/dist/plugins/accessibility/Accessibility.d.ts.map +1 -1
  90. package/dist/plugins/ad-triggers/AdTriggers.d.ts +5 -0
  91. package/dist/plugins/ad-triggers/AdTriggers.d.ts.map +1 -1
  92. package/dist/plugins/ads/AdsController.d.ts +2 -0
  93. package/dist/plugins/ads/AdsController.d.ts.map +1 -1
  94. package/dist/plugins/analytics/QoeTracker.d.ts +71 -0
  95. package/dist/plugins/analytics/QoeTracker.d.ts.map +1 -0
  96. package/dist/plugins/analytics/index.d.ts +6 -0
  97. package/dist/plugins/analytics/index.d.ts.map +1 -0
  98. package/dist/plugins/doc-pip/DocumentPip.d.ts +44 -0
  99. package/dist/plugins/doc-pip/DocumentPip.d.ts.map +1 -0
  100. package/dist/plugins/doc-pip/index.d.ts +5 -0
  101. package/dist/plugins/doc-pip/index.d.ts.map +1 -0
  102. package/dist/plugins/heatmap/Heatmap.d.ts +36 -0
  103. package/dist/plugins/heatmap/Heatmap.d.ts.map +1 -0
  104. package/dist/plugins/heatmap/index.d.ts +6 -0
  105. package/dist/plugins/heatmap/index.d.ts.map +1 -0
  106. package/dist/plugins/interactive/Interactive.d.ts +45 -0
  107. package/dist/plugins/interactive/Interactive.d.ts.map +1 -0
  108. package/dist/plugins/interactive/index.d.ts +6 -0
  109. package/dist/plugins/interactive/index.d.ts.map +1 -0
  110. package/dist/plugins/markers/MarkProgress.d.ts +3 -1
  111. package/dist/plugins/markers/MarkProgress.d.ts.map +1 -1
  112. package/dist/plugins/playlist/PlaylistRunner.d.ts +2 -0
  113. package/dist/plugins/playlist/PlaylistRunner.d.ts.map +1 -1
  114. package/dist/plugins/redirect-screen/RedirectScreen.d.ts +3 -1
  115. package/dist/plugins/redirect-screen/RedirectScreen.d.ts.map +1 -1
  116. package/dist/plugins/segments/Segments.d.ts +1 -0
  117. package/dist/plugins/segments/Segments.d.ts.map +1 -1
  118. package/dist/plugins/sprite-thumbnails/SpriteThumbnails.d.ts +9 -0
  119. package/dist/plugins/sprite-thumbnails/SpriteThumbnails.d.ts.map +1 -1
  120. package/dist/plugins/sticky/StickyManager.d.ts +2 -0
  121. package/dist/plugins/sticky/StickyManager.d.ts.map +1 -1
  122. package/dist/plugins/transcript/Transcript.d.ts +65 -0
  123. package/dist/plugins/transcript/Transcript.d.ts.map +1 -0
  124. package/dist/plugins/transcript/index.d.ts +6 -0
  125. package/dist/plugins/transcript/index.d.ts.map +1 -0
  126. package/dist/screens/ErrorScreen.d.ts +1 -1
  127. package/dist/screens/ErrorScreen.d.ts.map +1 -1
  128. package/dist/subtitles/attachTracks.d.ts +6 -0
  129. package/dist/subtitles/attachTracks.d.ts.map +1 -1
  130. package/dist/types/index.d.ts +320 -16
  131. package/dist/types/index.d.ts.map +1 -1
  132. package/dist/utils/plugin-style.d.ts +5 -0
  133. package/dist/utils/plugin-style.d.ts.map +1 -0
  134. package/package.json +2 -1
  135. package/dist/chunks/adTriggers-DXmtF4t2.js +0 -410
  136. package/dist/chunks/adTriggers-DXmtF4t2.js.map +0 -1
  137. package/dist/chunks/ads-CdWbE9aD.js.map +0 -1
  138. package/dist/chunks/loopSection-CvF4l5uf.js.map +0 -1
  139. package/dist/chunks/markers-B04NMI79.js.map +0 -1
  140. package/dist/chunks/player-D7WQxMzr.js +0 -3894
  141. package/dist/chunks/player-D7WQxMzr.js.map +0 -1
  142. package/dist/chunks/playlist-C6Mh9BE8.js.map +0 -1
  143. package/dist/chunks/pluginHost-DjvLmMYZ.js +0 -376
  144. package/dist/chunks/pluginHost-DjvLmMYZ.js.map +0 -1
  145. package/dist/chunks/redirectScreen-5HAVRtxe.js +0 -208
  146. package/dist/chunks/redirectScreen-5HAVRtxe.js.map +0 -1
  147. package/dist/chunks/segments-gCPrWRig.js +0 -63
  148. package/dist/chunks/segments-gCPrWRig.js.map +0 -1
  149. package/dist/chunks/spriteThumbnails-B7oDZFTo.js.map +0 -1
  150. package/dist/chunks/statsPanel-DSClIwA3.js.map +0 -1
  151. package/dist/chunks/sticky-D_eLCNFk.js.map +0 -1
@@ -1,3894 +0,0 @@
1
- var qe = Object.defineProperty;
2
- var Ve = (n, t, e) => t in n ? qe(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e;
3
- var s = (n, t, e) => Ve(n, typeof t != "symbol" ? t + "" : t, e);
4
- const _e = '/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-duration:initial}}}@layer theme{:root,:host{--hp-font-sans:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--hp-font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--hp-color-black:#000;--hp-color-white:#fff;--hp-spacing:.25rem;--hp-container-xs:20rem;--hp-text-xs:.75rem;--hp-text-xs--line-height:calc(1 / .75);--hp-text-sm:.875rem;--hp-text-sm--line-height:calc(1.25 / .875);--hp-text-base:1rem;--hp-text-base--line-height: 1.5 ;--hp-text-lg:1.125rem;--hp-text-lg--line-height:calc(1.75 / 1.125);--hp-text-xl:1.25rem;--hp-text-xl--line-height:calc(1.75 / 1.25);--hp-text-2xl:1.5rem;--hp-text-2xl--line-height:calc(2 / 1.5);--hp-font-weight-medium:500;--hp-font-weight-semibold:600;--hp-radius-lg:.5rem;--hp-animate-spin:spin 1s linear infinite;--hp-aspect-video:16 / 9;--hp-default-transition-duration:.15s;--hp-default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--hp-default-font-family:var(--hp-font-sans);--hp-default-mono-font-family:var(--hp-font-mono);--hp-color-accent:#fff;--hp-color-on-accent:#0a0a0a;--hp-color-surface:#0a0a0a;--hp-color-surface-elev:#1a1a1a;--hp-color-on-surface:#fff;--hp-color-on-surface-muted:#a3a3a3}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--hp-default-font-family,-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--hp-default-font-feature-settings,normal);font-variation-settings:var(--hp-default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--hp-default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--hp-default-mono-font-feature-settings,normal);font-variation-settings:var(--hp-default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring:where(:not(iframe)){outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.hp\\:pointer-events-auto{pointer-events:auto}.hp\\:pointer-events-none{pointer-events:none}.hp\\:absolute{position:absolute}.hp\\:relative{position:relative}.hp\\:sticky{position:sticky}.hp\\:inset-0{top:0;right:0;bottom:0;left:0}.hp\\:inset-x-0{inset-inline:0}.hp\\:inset-y-0{inset-block:0}.hp\\:top-0{top:0}.hp\\:top-1{top:var(--hp-spacing)}.hp\\:top-1\\/2{top:50%}.hp\\:right-0{right:0}.hp\\:right-1{right:var(--hp-spacing)}.hp\\:right-2{right:calc(var(--hp-spacing) * 2)}.hp\\:bottom-0{bottom:0}.hp\\:bottom-full{bottom:100%}.hp\\:left-1\\/2{left:50%}.hp\\:z-10{z-index:10}.hp\\:z-20{z-index:20}.hp\\:z-30{z-index:30}.hp\\:z-40{z-index:40}.hp\\:m-0{margin:0}.hp\\:my-1{margin-block:var(--hp-spacing)}.hp\\:mt-0\\.5{margin-top:calc(var(--hp-spacing) * .5)}.hp\\:mt-1{margin-top:var(--hp-spacing)}.hp\\:mt-2{margin-top:calc(var(--hp-spacing) * 2)}.hp\\:mt-8{margin-top:calc(var(--hp-spacing) * 8)}.hp\\:mb-1{margin-bottom:var(--hp-spacing)}.hp\\:mb-2{margin-bottom:calc(var(--hp-spacing) * 2)}.hp\\:mb-16{margin-bottom:calc(var(--hp-spacing) * 16)}.hp\\:ml-1{margin-left:var(--hp-spacing)}.hp\\:block{display:block}.hp\\:flex{display:flex}.hp\\:hidden{display:none}.hp\\:inline-block{display:inline-block}.hp\\:aspect-\\[9\\/16\\]{aspect-ratio:9/16}.hp\\:aspect-video{aspect-ratio:var(--hp-aspect-video)}.hp\\:h-0\\.5{height:calc(var(--hp-spacing) * .5)}.hp\\:h-1{height:var(--hp-spacing)}.hp\\:h-1\\/3{height:33.3333%}.hp\\:h-3{height:calc(var(--hp-spacing) * 3)}.hp\\:h-6{height:calc(var(--hp-spacing) * 6)}.hp\\:h-7{height:calc(var(--hp-spacing) * 7)}.hp\\:h-8{height:calc(var(--hp-spacing) * 8)}.hp\\:h-9{height:calc(var(--hp-spacing) * 9)}.hp\\:h-10{height:calc(var(--hp-spacing) * 10)}.hp\\:h-16{height:calc(var(--hp-spacing) * 16)}.hp\\:h-20{height:calc(var(--hp-spacing) * 20)}.hp\\:h-\\[var\\(--hp-ctrl-btn-size\\)\\]{height:var(--hp-ctrl-btn-size)}.hp\\:h-\\[var\\(--hp-seek-hit-h\\)\\]{height:var(--hp-seek-hit-h)}.hp\\:h-\\[var\\(--hp-seek-track-h\\)\\]{height:var(--hp-seek-track-h)}.hp\\:h-full{height:100%}.hp\\:max-h-64{max-height:calc(var(--hp-spacing) * 64)}.hp\\:max-h-80{max-height:calc(var(--hp-spacing) * 80)}.hp\\:w-0{width:0}.hp\\:w-0\\.5{width:calc(var(--hp-spacing) * .5)}.hp\\:w-1{width:var(--hp-spacing)}.hp\\:w-1\\.5{width:calc(var(--hp-spacing) * 1.5)}.hp\\:w-3{width:calc(var(--hp-spacing) * 3)}.hp\\:w-6{width:calc(var(--hp-spacing) * 6)}.hp\\:w-7{width:calc(var(--hp-spacing) * 7)}.hp\\:w-8{width:calc(var(--hp-spacing) * 8)}.hp\\:w-9{width:calc(var(--hp-spacing) * 9)}.hp\\:w-10{width:calc(var(--hp-spacing) * 10)}.hp\\:w-14{width:calc(var(--hp-spacing) * 14)}.hp\\:w-16{width:calc(var(--hp-spacing) * 16)}.hp\\:w-48{width:calc(var(--hp-spacing) * 48)}.hp\\:w-72{width:calc(var(--hp-spacing) * 72)}.hp\\:w-\\[var\\(--hp-ctrl-btn-size\\)\\]{width:var(--hp-ctrl-btn-size)}.hp\\:w-full{width:100%}.hp\\:max-w-\\[80\\%\\]{max-width:80%}.hp\\:max-w-\\[85\\%\\]{max-width:85%}.hp\\:max-w-full{max-width:100%}.hp\\:max-w-xs{max-width:var(--hp-container-xs)}.hp\\:min-w-0{min-width:0}.hp\\:flex-1{flex:1}.hp\\:flex-shrink-0,.hp\\:shrink-0{flex-shrink:0}.hp\\:animate-spin{animation:var(--hp-animate-spin)}.hp\\:cursor-pointer{cursor:pointer}.hp\\:touch-none{touch-action:none}.hp\\:list-none{list-style-type:none}.hp\\:flex-col{flex-direction:column}.hp\\:flex-wrap{flex-wrap:wrap}.hp\\:items-center{align-items:center}.hp\\:items-end{align-items:flex-end}.hp\\:justify-between{justify-content:space-between}.hp\\:justify-center{justify-content:center}.hp\\:gap-0\\.5{gap:calc(var(--hp-spacing) * .5)}.hp\\:gap-1{gap:var(--hp-spacing)}.hp\\:gap-1\\.5{gap:calc(var(--hp-spacing) * 1.5)}.hp\\:gap-2{gap:calc(var(--hp-spacing) * 2)}.hp\\:gap-3{gap:calc(var(--hp-spacing) * 3)}.hp\\:self-end{align-self:flex-end}.hp\\:truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.hp\\:overflow-hidden{overflow:hidden}.hp\\:overflow-y-auto{overflow-y:auto}.hp\\:rounded{border-radius:.25rem}.hp\\:rounded-full{border-radius:3.40282e38px}.hp\\:rounded-lg{border-radius:var(--hp-radius-lg)}.hp\\:border{border-style:var(--tw-border-style);border-width:1px}.hp\\:border-0{border-style:var(--tw-border-style);border-width:0}.hp\\:border-2{border-style:var(--tw-border-style);border-width:2px}.hp\\:border-\\[3px\\]{border-style:var(--tw-border-style);border-width:3px}.hp\\:border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.hp\\:border-on-surface\\/10{border-color:var(--hp-color-on-surface)}@supports (color:color-mix(in lab,red,red)){.hp\\:border-on-surface\\/10{border-color:color-mix(in oklab,var(--hp-color-on-surface) 10%,transparent)}}.hp\\:border-on-surface\\/20{border-color:var(--hp-color-on-surface)}@supports (color:color-mix(in lab,red,red)){.hp\\:border-on-surface\\/20{border-color:color-mix(in oklab,var(--hp-color-on-surface) 20%,transparent)}}.hp\\:border-on-surface\\/30{border-color:var(--hp-color-on-surface)}@supports (color:color-mix(in lab,red,red)){.hp\\:border-on-surface\\/30{border-color:color-mix(in oklab,var(--hp-color-on-surface) 30%,transparent)}}.hp\\:border-t-accent{border-top-color:var(--hp-color-accent)}.hp\\:bg-accent,.hp\\:bg-accent\\/15{background-color:var(--hp-color-accent)}@supports (color:color-mix(in lab,red,red)){.hp\\:bg-accent\\/15{background-color:color-mix(in oklab,var(--hp-color-accent) 15%,transparent)}}.hp\\:bg-black,.hp\\:bg-black\\/30{background-color:var(--hp-color-black)}@supports (color:color-mix(in lab,red,red)){.hp\\:bg-black\\/30{background-color:color-mix(in oklab,var(--hp-color-black) 30%,transparent)}}.hp\\:bg-black\\/40{background-color:var(--hp-color-black)}@supports (color:color-mix(in lab,red,red)){.hp\\:bg-black\\/40{background-color:color-mix(in oklab,var(--hp-color-black) 40%,transparent)}}.hp\\:bg-black\\/60{background-color:var(--hp-color-black)}@supports (color:color-mix(in lab,red,red)){.hp\\:bg-black\\/60{background-color:color-mix(in oklab,var(--hp-color-black) 60%,transparent)}}.hp\\:bg-black\\/70{background-color:var(--hp-color-black)}@supports (color:color-mix(in lab,red,red)){.hp\\:bg-black\\/70{background-color:color-mix(in oklab,var(--hp-color-black) 70%,transparent)}}.hp\\:bg-black\\/85{background-color:var(--hp-color-black)}@supports (color:color-mix(in lab,red,red)){.hp\\:bg-black\\/85{background-color:color-mix(in oklab,var(--hp-color-black) 85%,transparent)}}.hp\\:bg-on-surface,.hp\\:bg-on-surface\\/20{background-color:var(--hp-color-on-surface)}@supports (color:color-mix(in lab,red,red)){.hp\\:bg-on-surface\\/20{background-color:color-mix(in oklab,var(--hp-color-on-surface) 20%,transparent)}}.hp\\:bg-on-surface\\/25{background-color:var(--hp-color-on-surface)}@supports (color:color-mix(in lab,red,red)){.hp\\:bg-on-surface\\/25{background-color:color-mix(in oklab,var(--hp-color-on-surface) 25%,transparent)}}.hp\\:bg-on-surface\\/40{background-color:var(--hp-color-on-surface)}@supports (color:color-mix(in lab,red,red)){.hp\\:bg-on-surface\\/40{background-color:color-mix(in oklab,var(--hp-color-on-surface) 40%,transparent)}}.hp\\:bg-surface{background-color:var(--hp-color-surface)}.hp\\:bg-surface-elev{background-color:var(--hp-color-surface-elev)}.hp\\:bg-transparent{background-color:#0000}.hp\\:bg-white,.hp\\:bg-white\\/15{background-color:var(--hp-color-white)}@supports (color:color-mix(in lab,red,red)){.hp\\:bg-white\\/15{background-color:color-mix(in oklab,var(--hp-color-white) 15%,transparent)}}.hp\\:bg-white\\/30{background-color:var(--hp-color-white)}@supports (color:color-mix(in lab,red,red)){.hp\\:bg-white\\/30{background-color:color-mix(in oklab,var(--hp-color-white) 30%,transparent)}}.hp\\:bg-white\\/40{background-color:var(--hp-color-white)}@supports (color:color-mix(in lab,red,red)){.hp\\:bg-white\\/40{background-color:color-mix(in oklab,var(--hp-color-white) 40%,transparent)}}.hp\\:bg-gradient-to-t{--tw-gradient-position:to top in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.hp\\:from-black\\/80{--tw-gradient-from:var(--hp-color-black)}@supports (color:color-mix(in lab,red,red)){.hp\\:from-black\\/80{--tw-gradient-from:color-mix(in oklab, var(--hp-color-black) 80%, transparent)}}.hp\\:from-black\\/80{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.hp\\:to-transparent{--tw-gradient-to:transparent;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.hp\\:bg-cover{background-size:cover}.hp\\:bg-center{background-position:50%}.hp\\:object-cover{object-fit:cover}.hp\\:p-0{padding:0}.hp\\:p-1\\.5{padding:calc(var(--hp-spacing) * 1.5)}.hp\\:p-2{padding:calc(var(--hp-spacing) * 2)}.hp\\:p-3{padding:calc(var(--hp-spacing) * 3)}.hp\\:p-4{padding:calc(var(--hp-spacing) * 4)}.hp\\:px-1{padding-inline:var(--hp-spacing)}.hp\\:px-1\\.5{padding-inline:calc(var(--hp-spacing) * 1.5)}.hp\\:px-2{padding-inline:calc(var(--hp-spacing) * 2)}.hp\\:px-3{padding-inline:calc(var(--hp-spacing) * 3)}.hp\\:px-4{padding-inline:calc(var(--hp-spacing) * 4)}.hp\\:py-1{padding-block:var(--hp-spacing)}.hp\\:py-1\\.5{padding-block:calc(var(--hp-spacing) * 1.5)}.hp\\:py-2{padding-block:calc(var(--hp-spacing) * 2)}.hp\\:pt-6{padding-top:calc(var(--hp-spacing) * 6)}.hp\\:pb-2{padding-bottom:calc(var(--hp-spacing) * 2)}.hp\\:text-center{text-align:center}.hp\\:text-left{text-align:left}.hp\\:font-mono{font-family:var(--hp-font-mono)}.hp\\:text-2xl{font-size:var(--hp-text-2xl);line-height:var(--tw-leading,var(--hp-text-2xl--line-height))}.hp\\:text-base{font-size:var(--hp-text-base);line-height:var(--tw-leading,var(--hp-text-base--line-height))}.hp\\:text-lg{font-size:var(--hp-text-lg);line-height:var(--tw-leading,var(--hp-text-lg--line-height))}.hp\\:text-sm{font-size:var(--hp-text-sm);line-height:var(--tw-leading,var(--hp-text-sm--line-height))}.hp\\:text-xl{font-size:var(--hp-text-xl);line-height:var(--tw-leading,var(--hp-text-xl--line-height))}.hp\\:text-xs{font-size:var(--hp-text-xs);line-height:var(--tw-leading,var(--hp-text-xs--line-height))}.hp\\:text-\\[length\\:var\\(--hp-ctrl-icon-size\\)\\]{font-size:var(--hp-ctrl-icon-size)}.hp\\:leading-none{--tw-leading:1;line-height:1}.hp\\:font-medium{--tw-font-weight:var(--hp-font-weight-medium);font-weight:var(--hp-font-weight-medium)}.hp\\:font-semibold{--tw-font-weight:var(--hp-font-weight-semibold);font-weight:var(--hp-font-weight-semibold)}.hp\\:whitespace-nowrap{white-space:nowrap}.hp\\:text-accent{color:var(--hp-color-accent)}.hp\\:text-on-accent{color:var(--hp-color-on-accent)}.hp\\:text-on-surface{color:var(--hp-color-on-surface)}.hp\\:text-on-surface-muted{color:var(--hp-color-on-surface-muted)}.hp\\:text-white{color:var(--hp-color-white)}.hp\\:tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.hp\\:underline{text-decoration-line:underline}.hp\\:opacity-0{opacity:0}.hp\\:opacity-60{opacity:.6}.hp\\:opacity-70{opacity:.7}.hp\\:opacity-80{opacity:.8}.hp\\:opacity-90{opacity:.9}.hp\\:shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.hp\\:shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a), 0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.hp\\:drop-shadow{--tw-drop-shadow-size:drop-shadow(0 1px 2px var(--tw-drop-shadow-color,#0000001a)) drop-shadow(0 1px 1px var(--tw-drop-shadow-color,#0000000f));--tw-drop-shadow:drop-shadow(0 1px 2px #0000001a) drop-shadow(0 1px 1px #0000000f);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.hp\\:transition-\\[height\\]{transition-property:height;transition-timing-function:var(--tw-ease,var(--hp-default-transition-timing-function));transition-duration:var(--tw-duration,var(--hp-default-transition-duration))}.hp\\:transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--hp-default-transition-timing-function));transition-duration:var(--tw-duration,var(--hp-default-transition-duration))}.hp\\:transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--hp-default-transition-timing-function));transition-duration:var(--tw-duration,var(--hp-default-transition-duration))}.hp\\:duration-100{--tw-duration:.1s;transition-duration:.1s}.hp\\:duration-150{--tw-duration:.15s;transition-duration:.15s}.hp\\:duration-200{--tw-duration:.2s;transition-duration:.2s}.hp\\:duration-300{--tw-duration:.3s;transition-duration:.3s}.hp\\:will-change-\\[opacity\\]{will-change:opacity}.hp\\:select-none{-webkit-user-select:none;user-select:none}@media(hover:hover){.hp\\:group-hover\\:h-\\[var\\(--hp-seek-track-h-hover\\)\\]:is(:where(.hp\\:group):hover *){height:var(--hp-seek-track-h-hover)}.hp\\:hover\\:bg-on-surface\\/5:hover{background-color:var(--hp-color-on-surface)}@supports (color:color-mix(in lab,red,red)){.hp\\:hover\\:bg-on-surface\\/5:hover{background-color:color-mix(in oklab,var(--hp-color-on-surface) 5%,transparent)}}.hp\\:hover\\:bg-on-surface\\/10:hover{background-color:var(--hp-color-on-surface)}@supports (color:color-mix(in lab,red,red)){.hp\\:hover\\:bg-on-surface\\/10:hover{background-color:color-mix(in oklab,var(--hp-color-on-surface) 10%,transparent)}}.hp\\:hover\\:opacity-80:hover{opacity:.8}}.hp\\:data-\\[active\\=true\\]\\:bg-accent\\/15[data-active=true]{background-color:var(--hp-color-accent)}@supports (color:color-mix(in lab,red,red)){.hp\\:data-\\[active\\=true\\]\\:bg-accent\\/15[data-active=true]{background-color:color-mix(in oklab,var(--hp-color-accent) 15%,transparent)}}.hp\\:data-\\[active\\=true\\]\\:text-on-surface[data-active=true]{color:var(--hp-color-on-surface)}}.hp-icon{font-variant:normal;text-transform:none;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:hope-icons;font-style:normal;font-weight:400;line-height:1}.hp-icon-airplay:before{content:""}.hp-icon-cast-connected:before{content:""}.hp-icon-cast:before{content:""}.hp-icon-check:before{content:""}.hp-icon-chevron-left:before{content:""}.hp-icon-close:before{content:""}.hp-icon-fullscreen-enter:before{content:""}.hp-icon-fullscreen-exit:before{content:""}.hp-icon-grid:before{content:""}.hp-icon-loop:before{content:""}.hp-icon-pause:before{content:""}.hp-icon-pip:before{content:""}.hp-icon-play:before{content:""}.hp-icon-settings:before{content:""}.hp-icon-skip-back:before{content:""}.hp-icon-skip-forward:before{content:""}.hp-icon-volume-high:before{content:""}.hp-icon-volume-low:before{content:""}.hp-icon-volume-muted:before{content:""}.hp-icon-warning:before{content:""}:host{--hp-radius:8px;--hp-chip-bg:#ffffff14;--hp-chip-bg-hover:#ffffff2e;--hp-chip-bg-active:#ffffff42;--hp-chip-border:#ffffff29;--hp-chip-border-hover:#ffffff4d;--hp-chip-blur:14px;--hp-chip-shadow:0 4px 18px #00000047, inset 0 1px 0 #ffffff12;--hp-chip-radius:10px;--hp-chip-text:var(--hp-color-on-surface,#fff);--hp-chrome-scrim:linear-gradient(to top, #00000080 0%, #0000003d 50%, #0000 100%);--hp-chrome-scrim-height:min(150px, 45%);--hp-chip-backdrop-brightness:.78;--hp-ctrl-shadow:drop-shadow(0 1px 1.5px #0000008c);--hp-panel-bg:#ffffffb8;--hp-panel-blur:26px;--hp-panel-border:#0f11171a;--hp-panel-text:#15171c;--hp-panel-text-muted:#5b6270;--hp-panel-text-shadow:none;--hp-ctrl-btn-size:32px;--hp-ctrl-icon-size:16px;--hp-seek-hit-h:16px;--hp-seek-track-h:4px;--hp-seek-track-h-hover:6px;--hp-seek-thumb-size:12px;--hp-tooltip-bg:#ffffffe6;--hp-tooltip-text:#15171c;--hp-tooltip-key-bg:#0f11171a;--hp-tooltip-key-text:#15171c;--hp-caption-font-size:16px;--hp-caption-bg:#000000bf;--hp-caption-text:#fff;--hp-caption-radius:4px;background:var(--hp-color-surface,#0a0a0a);width:100%;color:var(--hp-color-on-surface,#fff);border-radius:var(--hp-radius);font-family:system-ui,-apple-system,sans-serif;line-height:1;display:block}.hp-chip{background:var(--hp-chip-bg);border:1px solid var(--hp-chip-border);border-radius:var(--hp-chip-radius);-webkit-backdrop-filter:blur(var(--hp-chip-blur)) saturate(160%);box-shadow:var(--hp-chip-shadow);color:var(--hp-chip-text);transition:background-color .16s,border-color .16s,box-shadow .16s,transform .12s}.hp-chip:hover{background:var(--hp-chip-bg-hover);border-color:var(--hp-chip-border-hover)}button.hp-chip:active{background:var(--hp-chip-bg-active);transform:scale(.94)}.hp-chip:focus-visible{outline:2px solid var(--hp-color-accent,#fff);outline-offset:2px}.hp-chip-panel,.hp-chip-panel:hover{background:var(--hp-panel-bg);border-color:var(--hp-panel-border);-webkit-backdrop-filter:blur(var(--hp-panel-blur)) saturate(160%);text-shadow:var(--hp-panel-text-shadow,none)}.hp-chip-panel{--hp-color-on-surface:var(--hp-panel-text);--hp-color-on-surface-muted:var(--hp-panel-text-muted);color:var(--hp-panel-text)}.hp-tooltip{background:var(--hp-tooltip-bg);color:var(--hp-tooltip-text);border-radius:calc(var(--hp-radius) * .75);-webkit-backdrop-filter:blur(12px)saturate(160%);font-weight:500;box-shadow:0 4px 14px #00000059}.hp-tooltip-key{background:var(--hp-tooltip-key-bg);min-width:16px;height:16px;color:var(--hp-tooltip-key-text);text-transform:uppercase;border-radius:4px;justify-content:center;align-items:center;padding:0 4px;font-size:10px;font-weight:700;line-height:16px;display:inline-flex}.hp-group{background:var(--hp-chip-bg);border:1px solid var(--hp-chip-border);-webkit-backdrop-filter:blur(var(--hp-chip-blur)) saturate(160%) brightness(var(--hp-chip-backdrop-brightness,1));box-shadow:var(--hp-chip-shadow);border-radius:9999px}.hp-group-left{position:relative}.hp-loading-ring{border-radius:inherit;pointer-events:none;opacity:0;filter:drop-shadow(0 0 3px var(--hp-color-accent,#fff));transition:opacity .22s;position:absolute;top:-1px;right:-1px;bottom:-1px;left:-1px}@supports (color:color-mix(in lab,red,red)){.hp-loading-ring{filter:drop-shadow(0 0 3px color-mix(in srgb,var(--hp-color-accent,#fff) 70%,transparent))}}.hp-loading-ring-mask{border-radius:inherit;-webkit-mask-composite:xor;padding:2px;position:absolute;top:0;right:0;bottom:0;left:0;overflow:hidden;-webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);-webkit-mask-composite:xor,source-over;mask:linear-gradient(#000 0 0) content-box exclude,linear-gradient(#000 0 0)}.hp-loading-ring-mask>span{aspect-ratio:1;background:conic-gradient(from 0deg,transparent 0deg 150deg,var(--hp-color-accent,#fff) 260deg,var(--hp-color-accent,#fff) 340deg,transparent 360deg);width:max(100%,160px);position:absolute;top:50%;left:50%;translate:-50% -50%}@supports (color:color-mix(in lab,red,red)){.hp-loading-ring-mask>span{background:conic-gradient(from 0deg,transparent 0deg 150deg,color-mix(in srgb,var(--hp-color-accent,#fff) 30%,transparent) 260deg,var(--hp-color-accent,#fff) 340deg,transparent 360deg)}}.hp-loading-ring-mask>span{animation:1.1s linear infinite paused hp-loading-ring-spin}.hp-group-left[data-loading]>.hp-loading-ring{opacity:1}.hp-group-left[data-loading]>.hp-loading-ring .hp-loading-ring-mask>span{animation-play-state:running}@keyframes hp-loading-ring-spin{to{rotate:360deg}}@media(prefers-reduced-motion:reduce){.hp-loading-ring-mask>span{background:var(--hp-color-accent,#fff);animation:none}.hp-group-left[data-loading]>.hp-loading-ring{animation:1.6s ease-in-out infinite hp-loading-ring-pulse}}@keyframes hp-loading-ring-pulse{50%{opacity:.35}}.hp-center-play>.hp-chip{-webkit-backdrop-filter:blur(var(--hp-chip-blur)) saturate(160%) brightness(var(--hp-chip-backdrop-brightness,1))}.hp-group .hp-icon,.hp-group [part=time-display],.hp-group .hp-live-badge,.hp-group [part=live-clock],.hp-group .hp-skip-num,.hp-center-play .hp-icon{filter:var(--hp-ctrl-shadow,none)}.hp-chrome:before{content:"";height:var(--hp-chrome-scrim-height);background:var(--hp-chrome-scrim);pointer-events:none;position:absolute;bottom:0;left:0;right:0}.video-area[data-compact]>.hp-chrome:after{content:"";background:var(--hp-chrome-scrim);opacity:.7;pointer-events:none;height:min(90px,30%);position:absolute;top:0;left:0;right:0;transform:scaleY(-1)}.hp-group button.hp-chip{box-shadow:none;-webkit-backdrop-filter:none;background:0 0;border-color:#0000}.hp-group button.hp-chip:hover{background:var(--hp-chip-bg-hover)}.hp-group button.hp-chip:active{background:var(--hp-chip-bg-active)}:host([data-theme=glass-dark]),:host([data-theme=neo-dark]),:host([data-theme=mono]){--hp-panel-bg:#0a0a0e8c;--hp-panel-border:#ffffff1a;--hp-panel-text:#fff;--hp-panel-text-muted:#a3a3a3;--hp-panel-text-shadow:0 1px 3px #000000a6;--hp-tooltip-bg:#0a0a0aeb;--hp-tooltip-text:#fff;--hp-tooltip-key-bg:#ffffff2e;--hp-tooltip-key-text:#fff}:host([data-theme=glass-dark]){--hp-chip-bg:#0a0a0e73;--hp-chip-bg-hover:#0a0a0e9e;--hp-chip-bg-active:#0a0a0ebf;--hp-chip-border:#ffffff14;--hp-chip-border-hover:#ffffff29;--hp-chip-shadow:0 4px 18px #0006, inset 0 1px 0 #ffffff0a;--hp-panel-bg:#08080cb8;--hp-chip-backdrop-brightness:1}:host([data-theme=neo-dark]){--hp-chip-bg:#24242a;--hp-chip-bg-hover:#2a2a31;--hp-chip-bg-active:#1e1e23;--hp-chip-border:transparent;--hp-chip-border-hover:transparent;--hp-chip-blur:0px;--hp-chip-shadow:5px 5px 10px #00000080, -4px -4px 9px #ffffff09;--hp-chip-radius:12px;--hp-color-surface:#1b1b20;--hp-panel-bg:#1e1e23;--hp-panel-text-shadow:none;--hp-chrome-scrim:none;--hp-chip-backdrop-brightness:1;--hp-ctrl-shadow:none}:host([data-theme=neo-dark]) button.hp-chip:active{box-shadow:inset 3px 3px 6px #00000080,inset -2px -2px 5px #ffffff08}:host([data-theme=mono]){--hp-chip-bg:#ffffff0a;--hp-chip-bg-hover:#ffffff1a;--hp-chip-border:#ffffff14;--hp-chip-border-hover:#ffffff24;--hp-chip-blur:0px;--hp-chip-shadow:none;--hp-panel-bg:#0a0a0aeb;--hp-panel-text-shadow:none}@media(pointer:coarse){:host{--hp-ctrl-btn-size:40px;--hp-ctrl-icon-size:18px;--hp-seek-hit-h:22px;--hp-seek-track-h:5px;--hp-seek-track-h-hover:7px;--hp-seek-thumb-size:14px;--hp-caption-font-size:19px}}:host(:is(:fullscreen,:-webkit-full-screen)){--hp-ctrl-btn-size:44px;--hp-ctrl-icon-size:20px;--hp-seek-hit-h:26px;--hp-seek-track-h:6px;--hp-seek-track-h-hover:8px;--hp-seek-thumb-size:18px;--hp-caption-font-size:22px}:host(:is(:fullscreen,:-webkit-full-screen)) [part=control-bar]{padding:28px 20px 18px}.video-area{width:100%;aspect-ratio:var(--hp-aspect-ratio,16 / 9);border-radius:var(--hp-radius);background:var(--hp-color-surface,#0a0a0a);position:relative;overflow:hidden}.video-area[data-compact]{--hp-caption-font-size:13px}.video-area[data-story]{aspect-ratio:9/16;max-width:49.5vh;max-height:88vh;margin:0 auto}:host(:is(:fullscreen,:-webkit-full-screen)){background:#000;border-radius:0}:host(:is(:fullscreen,:-webkit-full-screen)) .hp-root{height:100%}:host(:is(:fullscreen,:-webkit-full-screen)) .video-area{aspect-ratio:auto;background:#000;border-radius:0;width:100%;height:100%}:host(:is(:fullscreen,:-webkit-full-screen)) .video-area[data-story]{aspect-ratio:9/16;width:auto;max-width:100%;height:100%;max-height:none;margin:0 auto}.media-layer{position:absolute;top:0;right:0;bottom:0;left:0}.media-layer video{object-fit:contain;background:#000;width:100%;height:100%}.hp-center-x{transform:translate(-50%)}.hp-center-y{transform:translateY(-50%)}.hp-chip-panel[data-drop]{margin-top:8px;margin-bottom:0;top:100%;bottom:auto}.hp-top-bar{pointer-events:none;display:flex;position:absolute;top:8px;right:8px}.hp-top-bar>*{pointer-events:auto}.hp-story-list-btn{top:calc(8px + var(--hp-ctrl-btn-size) + 18px);right:12px}:host([data-cursor-hidden]),:host([data-cursor-hidden]) *{cursor:none!important}.hp-unmute-badge{z-index:25;background:var(--hp-tooltip-bg);color:var(--hp-tooltip-text);-webkit-backdrop-filter:blur(12px)saturate(160%);font:inherit;cursor:pointer;border:0;border-radius:9999px;align-items:center;gap:6px;padding:6px 12px 6px 10px;font-size:13px;font-weight:600;display:none;position:absolute;top:10px;left:10px;box-shadow:0 4px 14px #00000059}@media(hover:none)and (pointer:coarse){.hp-volume{display:none!important}.hp-unmute-badge[data-visible]{display:inline-flex}}.hp-error-screen{z-index:30;background:var(--hp-color-surface);justify-content:center;align-items:center;padding:12px;display:none;position:absolute;top:0;right:0;bottom:0;left:0}@supports (color:color-mix(in lab,red,red)){.hp-error-screen{background:color-mix(in srgb,var(--hp-color-surface) 94%,transparent)}}.hp-error-screen{-webkit-backdrop-filter:blur(16px)saturate(140%);color:var(--hp-color-on-surface);text-align:center;container-type:size}.hp-error-screen[data-visible]{animation:.22s hp-error-in;display:flex}@keyframes hp-error-in{0%{opacity:0}}.hp-error-card{flex-direction:column;align-items:center;gap:10px;max-width:340px;display:flex}.hp-error-icon{border:1px solid var(--hp-color-on-surface);border-radius:9999px;place-items:center;width:48px;height:48px;display:grid}@supports (color:color-mix(in lab,red,red)){.hp-error-icon{border:1px solid color-mix(in srgb,var(--hp-color-on-surface) 18%,transparent)}}.hp-error-icon{background:var(--hp-color-on-surface)}@supports (color:color-mix(in lab,red,red)){.hp-error-icon{background:color-mix(in srgb,var(--hp-color-on-surface) 8%,transparent)}}.hp-error-icon{margin-bottom:2px;font-size:22px}.hp-error-message{margin:0;font-size:14px;font-weight:600;line-height:1.45}.hp-error-code{color:var(--hp-color-on-surface-muted);font-variant-numeric:tabular-nums;margin:-4px 0 0;font-size:12px}.hp-error-retry{border:1px solid var(--hp-chip-border);background:var(--hp-chip-bg);color:var(--hp-color-on-surface);font:inherit;cursor:pointer;border-radius:9999px;align-items:center;gap:6px;margin-top:6px;padding:7px 14px 7px 12px;font-size:13px;font-weight:600;transition:background-color .15s,border-color .15s;display:inline-flex}.hp-error-retry:hover{background:var(--hp-chip-bg-hover);border-color:var(--hp-chip-border-hover)}.hp-error-retry:focus-visible{outline:2px solid var(--hp-color-accent);outline-offset:2px}@container (max-height:240px){.hp-error-card{gap:6px}.hp-error-icon{width:36px;height:36px;margin-bottom:0;font-size:16px}.hp-error-message{font-size:13px}.hp-error-code{margin-top:-2px;font-size:11px}.hp-error-retry{margin-top:2px;padding:5px 12px 5px 10px;font-size:12px}}.hp-context-menu,.hp-stats,.hp-debug{border:1px solid var(--hp-panel-border);background:var(--hp-panel-bg);-webkit-backdrop-filter:blur(var(--hp-panel-blur)) saturate(160%);color:var(--hp-panel-text);text-shadow:var(--hp-panel-text-shadow,none);border-radius:10px;position:absolute;box-shadow:0 8px 28px #00000059}.hp-context-menu{z-index:40;min-width:200px;padding:4px;font-size:13px;display:none}.hp-context-menu[data-open]{animation:.12s hp-context-menu-in;display:block}@keyframes hp-context-menu-in{0%{opacity:0;transform:scale(.97)}}.hp-context-menu-item{width:100%;color:inherit;font:inherit;text-align:left;cursor:pointer;background:0 0;border:0;border-radius:6px;justify-content:space-between;align-items:center;gap:16px;padding:8px 10px;display:flex}.hp-context-menu-item[data-info]{cursor:default;font-weight:600}button.hp-context-menu-item:hover,button.hp-context-menu-item:focus-visible{background:var(--hp-panel-text)}@supports (color:color-mix(in lab,red,red)){button.hp-context-menu-item:hover,button.hp-context-menu-item:focus-visible{background:color-mix(in srgb,var(--hp-panel-text) 10%,transparent)}}button.hp-context-menu-item:hover,button.hp-context-menu-item:focus-visible{outline:none}.hp-context-menu-item+.hp-context-menu-item{margin-top:2px}.hp-context-menu-meta{color:var(--hp-panel-text-muted);font-variant-numeric:tabular-nums;font-weight:500}.hp-stats{z-index:28;width:min(360px,100% - 20px);max-height:calc(100% - 20px);padding:8px 12px 10px;font-size:11.5px;top:10px;left:10px;overflow:auto}.hp-stats-header{justify-content:space-between;align-items:center;margin-bottom:6px;font-size:12px;font-weight:700;display:flex}.hp-stats-close{color:inherit;cursor:pointer;background:0 0;border:0;border-radius:9999px;padding:4px;display:inline-flex}.hp-stats-close:hover{background:var(--hp-panel-text)}@supports (color:color-mix(in lab,red,red)){.hp-stats-close:hover{background:color-mix(in srgb,var(--hp-panel-text) 12%,transparent)}}.hp-stats-body{grid-template-columns:auto 1fr;gap:3px 12px;margin:0;display:grid}.hp-stats-body dt{color:var(--hp-panel-text-muted);white-space:nowrap}.hp-stats-body dd{text-overflow:ellipsis;white-space:nowrap;font-variant-numeric:tabular-nums;margin:0;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;overflow:hidden}.hp-seek-fb{z-index:8;border:1px solid var(--hp-chip-border);background:var(--hp-chip-bg);-webkit-backdrop-filter:blur(var(--hp-chip-blur)) saturate(160%);box-shadow:var(--hp-chip-shadow);color:var(--hp-chip-text);pointer-events:none;opacity:0;border-radius:9999px;align-items:center;gap:10px;padding:12px 20px 12px 16px;transition:opacity .18s,translate .22s cubic-bezier(.2,.8,.2,1);display:flex;position:absolute;top:50%}.hp-seek-fb[data-side=forward]{right:7%;translate:14px -50%}.hp-seek-fb[data-side=back]{flex-direction:row-reverse;padding:12px 16px 12px 20px;left:7%;translate:-14px -50%}.hp-seek-fb[data-visible]{opacity:1;translate:0 -50%}.hp-seek-fb-chevrons{display:flex}.hp-seek-fb-chevrons svg{fill:currentColor;opacity:.25;width:16px;height:16px;margin:0 -3px;animation:.9s ease-in-out infinite hp-seek-fb-chevron}.hp-seek-fb[data-side=back] .hp-seek-fb-chevrons{transform:scaleX(-1)}.hp-seek-fb-chevrons svg:nth-child(2){animation-delay:.15s}.hp-seek-fb-chevrons svg:nth-child(3){animation-delay:.3s}@keyframes hp-seek-fb-chevron{0%,to{opacity:.25}40%{opacity:1}}.hp-seek-fb-value{white-space:nowrap;align-items:baseline;gap:3px;display:flex}.hp-seek-fb-num{font-variant-numeric:tabular-nums;font-size:20px;font-weight:700;line-height:1;display:inline-block}.hp-seek-fb-unit{opacity:.75;font-size:12px;font-weight:600}.hp-seek-fb-bump{animation:.26s cubic-bezier(.2,.8,.2,1) hp-seek-fb-bump}@keyframes hp-seek-fb-bump{0%{transform:scale(1.25)}to{transform:scale(1)}}.video-area[data-compact] .hp-seek-fb{padding:8px 12px}.video-area[data-compact] .hp-seek-fb[data-side=forward]{right:4%}.video-area[data-compact] .hp-seek-fb[data-side=back]{padding:8px 12px;left:4%}.video-area[data-compact] .hp-seek-fb-chevrons{display:none}.video-area[data-compact] .hp-seek-fb-num{font-size:16px}.hp-sr-only{clip-path:inset(50%);white-space:nowrap;width:1px;height:1px;position:absolute;overflow:hidden}@media(prefers-reduced-motion:reduce){.hp-seek-fb,.hp-seek-fb-chevrons svg,.hp-seek-fb-bump{transition:none;animation:none}.hp-seek-fb-chevrons svg{opacity:.8}}.hp-skip-btn{position:relative}.hp-skip-btn>.hp-icon{font-size:calc(var(--hp-ctrl-icon-size) * 1.45)}.hp-skip-num{padding-top:calc(var(--hp-ctrl-icon-size) * .14);font-size:calc(var(--hp-ctrl-icon-size) * .56);letter-spacing:-.02em;font-variant-numeric:tabular-nums;pointer-events:none;justify-content:center;align-items:center;font-weight:700;line-height:1;display:flex;position:absolute;top:0;right:0;bottom:0;left:0}.hp-skip-num[data-long]{font-size:calc(var(--hp-ctrl-icon-size) * .42)}.hp-skip-btn:disabled{opacity:.4;cursor:default}.hp-center-play>.hp-chip{z-index:7;position:relative}.video-area[data-center-play-shifted] .hp-center-play>.hp-chip{width:var(--hp-center-play-size);height:var(--hp-center-play-size);translate:var(--hp-center-play-shift-x,0px) var(--hp-center-play-shift)}.video-area[data-pause-ad-ready]>:is(.media-layer,.hp-chrome,.hp-center-play,.hp-caption-layer,.hp-error-screen,.hp-mini-progress){right:var(--hp-pause-ad-w,0px);transition:right .38s cubic-bezier(.2,.8,.2,1),opacity .2s}.video-area[data-pause-ad] .media-layer video{object-fit:cover}.hp-pause-ad{z-index:25;width:var(--hp-pause-ad-panel-w,332px);box-sizing:border-box;background:var(--hp-color-surface,#0a0a0a);color:var(--hp-color-on-surface,#fff);visibility:hidden;flex-direction:column;justify-content:center;gap:10px;padding:12px 16px;transition:transform .38s cubic-bezier(.2,.8,.2,1),visibility 0s linear .38s;display:flex;position:absolute;top:0;bottom:0;right:0;transform:translate(100%)}.hp-pause-ad[data-open]{visibility:visible;transition:transform .38s cubic-bezier(.2,.8,.2,1);transform:none}.hp-pause-ad-header{justify-content:space-between;align-items:center;gap:8px;display:flex}.hp-pause-ad-label{color:var(--hp-color-on-surface-muted,#ffffffb3);font-size:13px;font-weight:600}.hp-pause-ad-close{width:28px;height:28px;color:var(--hp-color-on-surface,#fff);cursor:pointer;background:0 0;border:0;border-radius:9999px;justify-content:center;align-items:center;padding:0;transition:background-color .15s;display:inline-flex}.hp-pause-ad-close:hover{background:var(--hp-chip-bg-hover)}.hp-pause-ad-body{border-radius:8px;justify-content:center;display:flex;overflow:hidden}.hp-pause-ad-resume{border:1px solid var(--hp-chip-border);background:var(--hp-chip-bg);color:var(--hp-color-on-surface,#fff);font:inherit;cursor:pointer;border-radius:9999px;align-self:stretch;padding:9px 14px;font-size:13px;font-weight:600;transition:background-color .15s,border-color .15s}.hp-pause-ad-resume:hover{background:var(--hp-chip-bg-hover);border-color:var(--hp-chip-border-hover)}.hp-pause-ad-close:focus-visible,.hp-pause-ad-resume:focus-visible{outline:2px solid var(--hp-color-accent);outline-offset:2px}@media(prefers-reduced-motion:reduce){.video-area[data-pause-ad-ready]>:is(.media-layer,.hp-chrome,.hp-center-play,.hp-caption-layer,.hp-error-screen,.hp-mini-progress),.hp-pause-ad,.hp-pause-ad[data-open]{transition:none}}.hp-seek-thumb{width:var(--hp-seek-thumb-size);height:var(--hp-seek-thumb-size);background:var(--hp-color-accent);will-change:translate,scale;pointer-events:none;z-index:2;border-radius:9999px;transition:scale .15s;position:absolute;left:0;scale:.5}.hp-seekbar:hover .hp-seek-thumb,.hp-seekbar:active .hp-seek-thumb,.hp-seekbar:focus-visible .hp-seek-thumb{scale:1}.hp-seekbar[data-no-duration] .hp-seek-thumb{display:none}.hp-seek-hover-dot{width:var(--hp-seek-track-h-hover);height:var(--hp-seek-track-h-hover);background:var(--hp-color-on-surface);opacity:0;pointer-events:none;z-index:1;border-radius:9999px;transition:opacity .12s;position:absolute;top:50%;left:0;box-shadow:0 0 0 1px #00000073}.hp-seek-hover-dot[data-visible]{opacity:.9}.hp-mini-progress{z-index:6;pointer-events:none;background:var(--hp-color-on-surface);height:1px;position:absolute;bottom:0;left:0;right:0}@supports (color:color-mix(in lab,red,red)){.hp-mini-progress{background:color-mix(in srgb,var(--hp-color-on-surface) 25%,transparent)}}.hp-mini-progress{opacity:0;transition:opacity .2s}.hp-mini-progress[data-visible]:not([data-disabled]){opacity:1}.hp-mini-progress-fill{transform-origin:0;will-change:transform;position:absolute;top:0;right:0;bottom:0;left:0;transform:scaleX(0)}.hp-mini-progress-buffered{background:var(--hp-color-on-surface)}@supports (color:color-mix(in lab,red,red)){.hp-mini-progress-buffered{background:color-mix(in srgb,var(--hp-color-on-surface) 40%,transparent)}}.hp-mini-progress-played{background:var(--hp-color-accent)}.hp-seek-time{border-radius:calc(var(--hp-radius) * .75);background:var(--hp-tooltip-bg);color:var(--hp-tooltip-text);-webkit-backdrop-filter:blur(12px)saturate(160%);font-variant-numeric:tabular-nums;white-space:nowrap;pointer-events:none;visibility:hidden;z-index:20;padding:3px 7px;font-size:12px;font-weight:500;position:absolute;bottom:calc(100% + 8px);left:0;box-shadow:0 4px 14px #00000059}.hp-seek-time[data-visible]{visibility:visible}.hp-sprite-tooltip{pointer-events:none;visibility:hidden;z-index:20;flex-direction:column;align-items:center;gap:4px;display:flex;position:absolute;bottom:calc(100% + 8px);left:0}.hp-sprite-tooltip[data-visible]{visibility:visible}.hp-sprite-image{border-radius:calc(var(--hp-radius) * .75);border:2px solid var(--hp-color-on-surface)}@supports (color:color-mix(in lab,red,red)){.hp-sprite-image{border:2px solid color-mix(in srgb,var(--hp-color-on-surface) 85%,transparent)}}.hp-sprite-image{background-color:#000;background-repeat:no-repeat;box-shadow:0 4px 14px #00000059}.hp-sprite-time{background:var(--hp-tooltip-bg);color:var(--hp-tooltip-text);font-variant-numeric:tabular-nums;white-space:nowrap;border-radius:4px;padding:2px 6px;font-size:12px}.hp-live-badge{height:var(--hp-ctrl-btn-size);color:var(--hp-color-on-surface);font:inherit;letter-spacing:.04em;white-space:nowrap;cursor:pointer;background:0 0;border:0;border-radius:9999px;align-items:center;gap:6px;padding:0 8px;font-size:12px;font-weight:600;display:inline-flex}.hp-live-badge:hover{background:var(--hp-chip-bg-hover)}.hp-live-badge:focus-visible,[part=time-display]:focus-visible{outline:2px solid var(--hp-color-accent,#fff);outline-offset:2px}.hp-live-dot{background:var(--hp-live-color,red);border-radius:50%;width:8px;height:8px;transition:background-color .16s}.hp-live-badge[data-behind]{color:var(--hp-color-on-surface-muted)}.hp-live-badge[data-behind] .hp-live-dot{background:var(--hp-color-on-surface)}@supports (color:color-mix(in lab,red,red)){.hp-live-badge[data-behind] .hp-live-dot{background:color-mix(in srgb,var(--hp-color-on-surface) 45%,transparent)}}.hp-chapters{pointer-events:none;inset-inline:0;align-items:center;gap:2px;display:flex;position:absolute;top:0;bottom:0}.hp-chapter{min-width:1px;height:var(--hp-seek-track-h);background:var(--hp-color-on-surface);border-radius:1px;position:relative;overflow:hidden}@supports (color:color-mix(in lab,red,red)){.hp-chapter{background:color-mix(in srgb,var(--hp-color-on-surface) 25%,transparent)}}.hp-chapter{transition:height .15s}.hp-seekbar:hover .hp-chapter{height:var(--hp-seek-track-h-hover)}.hp-seekbar .hp-chapter[data-hover]{height:calc(var(--hp-seek-track-h-hover) * 1.6)}.hp-chapter-fill{transform-origin:0;will-change:transform;position:absolute;top:0;right:0;bottom:0;left:0;transform:scaleX(0)}.hp-chapter-buffered{background:var(--hp-color-on-surface)}@supports (color:color-mix(in lab,red,red)){.hp-chapter-buffered{background:color-mix(in srgb,var(--hp-color-on-surface) 40%,transparent)}}.hp-chapter-played{background:var(--hp-color-accent)}.hp-chapter-tooltip{background:var(--hp-tooltip-bg);max-width:240px;color:var(--hp-tooltip-text);border-radius:calc(var(--hp-radius) * .75);-webkit-backdrop-filter:blur(12px)saturate(160%);text-align:center;pointer-events:none;white-space:nowrap;visibility:hidden;z-index:40;flex-direction:column;align-items:center;gap:2px;padding:4px 8px;font-size:12px;line-height:1.3;display:flex;position:absolute;bottom:calc(100% + 6px);left:0;box-shadow:0 4px 14px #00000059}.hp-chapter-tooltip[data-visible]{visibility:visible}.hp-chapter-tooltip-title{text-overflow:ellipsis;max-width:100%;font-weight:600;overflow:hidden}.hp-chapter-tooltip-time{opacity:.75;font-variant-numeric:tabular-nums}:host([data-sticky]){z-index:2147483000;border-radius:var(--hp-radius);box-shadow:0 8px 28px #00000073;width:min(360px,92vw)!important;aspect-ratio:var(--hp-aspect-ratio,16 / 9)!important;position:fixed!important}:host([data-sticky][data-sticky-corner=br]){inset:auto 16px 16px auto}:host([data-sticky][data-sticky-corner=bl]){inset:auto auto 16px 16px}:host([data-sticky][data-sticky-corner=tr]){inset:16px 16px auto auto}:host([data-sticky][data-sticky-corner=tl]){inset:16px auto auto 16px}.hp-caption-layer{z-index:5;pointer-events:none;position:absolute;top:0;right:0;bottom:0;left:0}.hp-caption-bubble{background:var(--hp-caption-bg);width:max-content;max-width:86%;color:var(--hp-caption-text);border-radius:var(--hp-caption-radius);font-size:calc(var(--hp-caption-font-size) * var(--hp-caption-size-multiplier,1));text-align:center;white-space:pre-line;cursor:grab;pointer-events:auto;touch-action:none;-webkit-user-select:none;user-select:none;padding:.3em .6em;line-height:1.4;transition:transform .24s cubic-bezier(.25,.8,.25,1);display:none;position:absolute;bottom:0;left:50%;transform:translate(-50%)}.hp-caption-bubble.hp-caption-visible{display:inline-block}.hp-caption-bubble.hp-caption-dragging,.hp-caption-bubble.hp-caption-no-transition{transition:none}.hp-caption-bubble.hp-caption-dragging{cursor:grabbing}[part=ad-layer][data-nonlinear]{top:auto;bottom:var(--hp-nonlinear-ad-offset,72px);height:var(--hp-nonlinear-ad-height,33%);pointer-events:none}[part=ad-layer][data-nonlinear] *{pointer-events:none}[part=ad-layer][data-nonlinear] :is(iframe,img,a,button){pointer-events:auto}.hp-debug{--hp-panel-text:#f1f1f4;--hp-panel-text-muted:#f1f1f49e;--hp-panel-border:#ffffff1f;text-shadow:none;z-index:30;background:#0e0e12f2;flex-direction:column;min-width:0;font-size:12px;line-height:1.45;display:flex;top:8px;right:8px;bottom:8px;left:8px;overflow:hidden}.hp-debug:focus{outline:none}.hp-debug-header{border-bottom:1px solid var(--hp-panel-border);flex-shrink:0;justify-content:space-between;align-items:center;gap:8px;padding:8px 8px 8px 12px;display:flex}.hp-debug-title{white-space:nowrap;align-items:center;gap:8px;min-width:0;font-size:13px;font-weight:700;display:flex}.hp-debug-count{font-variant-numeric:tabular-nums;background:#f8717138;border-radius:9999px;padding:1px 7px;font-size:11px}.hp-debug-count:empty{display:none}.hp-debug-actions{flex-shrink:0;align-items:center;gap:4px;display:flex}.hp-debug-btn{border:1px solid var(--hp-panel-border);color:inherit;font:inherit;cursor:pointer;background:0 0;border-radius:9999px;padding:4px 10px;font-size:11.5px}.hp-debug-btn:hover:not(:disabled){background:var(--hp-panel-text)}@supports (color:color-mix(in lab,red,red)){.hp-debug-btn:hover:not(:disabled){background:color-mix(in srgb,var(--hp-panel-text) 12%,transparent)}}.hp-debug-btn:disabled{opacity:.45;cursor:default}.hp-debug-list{overscroll-behavior:contain;flex:1;min-height:0;margin:0;padding:6px 12px 10px;list-style:none;overflow:hidden auto}.hp-debug-row{border-left:2px solid var(--hp-panel-text);padding:8px 0 8px 10px}@supports (color:color-mix(in lab,red,red)){.hp-debug-row{border-left:2px solid color-mix(in srgb,var(--hp-panel-text) 25%,transparent)}}.hp-debug-row{min-width:0}.hp-debug-row+.hp-debug-row{margin-top:6px}.hp-debug-row[data-fatal]{border-left-color:#f87171}.hp-debug-row-head{flex-wrap:wrap;align-items:center;gap:6px;margin-bottom:2px;display:flex}.hp-debug-time{color:var(--hp-panel-text-muted);font-variant-numeric:tabular-nums;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace}.hp-debug-source,.hp-debug-fatal{background:var(--hp-panel-text);border-radius:9999px;padding:1px 7px;font-size:10.5px;font-weight:600}@supports (color:color-mix(in lab,red,red)){.hp-debug-source,.hp-debug-fatal{background:color-mix(in srgb,var(--hp-panel-text) 12%,transparent)}}.hp-debug-source[data-source=ads]{background:#f5c4513d}.hp-debug-source[data-source=stream],.hp-debug-source[data-source=media]{background:#60a5fa3d}.hp-debug-fatal{background:#f8717147}.hp-debug-message{overflow-wrap:anywhere;font-weight:600}.hp-debug-repeat{color:var(--hp-panel-text-muted);font-weight:500}.hp-debug-details{grid-template-columns:max-content minmax(0,1fr);gap:1px 10px;margin:4px 0 0;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:11px;display:grid}.hp-debug-details dt{color:var(--hp-panel-text-muted)}.hp-debug-details dd{overflow-wrap:anywhere;min-width:0;margin:0}.hp-debug-empty{color:var(--hp-panel-text-muted);margin:auto;padding:16px}.hp-debug-empty[hidden]{display:none}.hp-ad-return{z-index:25;color:#fff;cursor:pointer;-webkit-tap-highlight-color:transparent;background:#0e0e12d1;border:1px solid #ffffff40;border-radius:999px;padding:10px 16px;font:600 14px/1.2 system-ui,-apple-system,sans-serif;animation:.2s ease-out hp-ad-return-in;position:absolute;bottom:64px;right:12px}@keyframes hp-ad-return-in{0%{opacity:0;transform:translateY(6px)}}:host([data-audio]) .hp-center-play{display:none}.hp-audio{z-index:1;text-align:left;pointer-events:none;color:#fff;background:linear-gradient(160deg,#2a1f2b,#0c0c10);background:radial-gradient(80% 90% at 20% 10%,var(--hp-color-accent,#e5484d),transparent 70%),linear-gradient(160deg,#1d1d24,#0c0c10);position:absolute;top:0;right:0;bottom:0;left:0;overflow:hidden}@supports (color:color-mix(in lab,red,red)){.hp-audio{background:radial-gradient(80% 90% at 20% 10%,color-mix(in srgb,var(--hp-color-accent,#e5484d) 38%,transparent),transparent 70%),linear-gradient(160deg,#1d1d24,#0c0c10)}}.hp-audio-backdrop{position:absolute;top:-8%;right:-8%;bottom:-8%;left:-8%}.hp-audio-backdrop img{object-fit:cover;filter:blur(28px)saturate(1.3)brightness(.55);width:100%;height:100%;transform:scale(1.08)}.hp-audio:not([data-cover]) .hp-audio-backdrop,.hp-audio:not([data-cover]) .hp-audio-sleeve img{display:none}.hp-audio-meta{z-index:3;text-shadow:0 1px 6px #0009;line-height:1.25;display:none;position:absolute;top:12px;left:14px;right:64px}.hp-audio[data-meta] .hp-audio-meta{display:block}.hp-audio-title{white-space:nowrap;text-overflow:ellipsis;font-size:15px;font-weight:700;overflow:hidden}.hp-audio-artist{opacity:.8;white-space:nowrap;text-overflow:ellipsis;margin-top:2px;font-size:12.5px;overflow:hidden}.hp-audio-area{inset:0 0 var(--hp-audio-bottom-space,66px) 0;justify-content:center;align-items:center;display:flex;position:absolute}.hp-audio[data-meta] .hp-audio-area{top:44px}.hp-audio-deck{height:var(--hp-deck-h,0px);flex:none;align-items:center;display:flex;position:relative}.hp-audio[data-position=left] .hp-audio-deck{flex-direction:row-reverse}.hp-audio-sleeve{z-index:2;width:var(--hp-deck-h,0px);height:var(--hp-deck-h,0px);background:radial-gradient(70% 70% at 30% 25%,#e5484d,#0000 75%),#26262d;background:radial-gradient(70% 70% at 30% 25%,var(--hp-color-accent,#e5484d),transparent 75%),#26262d;border-radius:6px;flex:none;position:relative;overflow:hidden}@supports (color:color-mix(in lab,red,red)){.hp-audio-sleeve{background:radial-gradient(70% 70% at 30% 25%,color-mix(in srgb,var(--hp-color-accent,#e5484d) 70%,#fff 0%),transparent 75%),#26262d}}.hp-audio-sleeve{box-shadow:0 18px 40px -12px #000000bf,0 0 0 1px #ffffff14}.hp-audio-sleeve img{object-fit:cover;width:100%;height:100%;display:block}.hp-audio-sleeve[hidden],.hp-vinyl[hidden],.hp-tonearm-holder[hidden]{display:none}.hp-vinyl{z-index:1;width:calc(var(--hp-deck-h,0px) * .96);height:calc(var(--hp-deck-h,0px) * .96);pointer-events:auto;touch-action:none;-webkit-tap-highlight-color:transparent;filter:drop-shadow(0 14px 26px #0009);border-radius:50%;outline:none;flex:none;transition:margin .45s cubic-bezier(.2,.8,.2,1);position:relative}.hp-audio[data-position=right] .hp-vinyl{margin-left:calc(var(--hp-deck-h) * -.56)}.hp-audio[data-position=left] .hp-vinyl{margin-right:calc(var(--hp-deck-h) * -.56)}.hp-audio[data-position=right][data-playing] .hp-vinyl{margin-left:calc(var(--hp-deck-h) * -.46)}.hp-audio[data-position=left][data-playing] .hp-vinyl{margin-right:calc(var(--hp-deck-h) * -.46)}.hp-audio:not([data-laid-out]) .hp-vinyl{transition:none}.hp-vinyl[data-scratch]:not([data-live]){cursor:grab}.hp-audio[data-scratching] .hp-vinyl{cursor:grabbing}.hp-vinyl:focus-visible{box-shadow:0 0 0 3px #ffffffb3;box-shadow:0 0 0 3px var(--hp-color-accent,#e5484d)}@supports (color:color-mix(in lab,red,red)){.hp-vinyl:focus-visible{box-shadow:0 0 0 3px color-mix(in srgb,var(--hp-color-accent,#e5484d) 80%,transparent)}}.hp-vinyl-disc{will-change:transform;position:absolute;top:0;right:0;bottom:0;left:0}.hp-vinyl-disc svg,.hp-tonearm svg{width:100%;height:100%;display:block}.hp-vinyl-sheen{pointer-events:none;background:conic-gradient(from 200deg,#0000,#ffffff21 22deg,#0000 48deg,#0000 180deg,#ffffff17 205deg,#0000 232deg);border-radius:50%;position:absolute;top:0;right:0;bottom:0;left:0;-webkit-mask:radial-gradient(circle,#0000 0 35%,#000 36% 99%,#0000 100%);mask:radial-gradient(circle,#0000 0 35%,#000 36% 99%,#0000 100%)}.hp-tonearm-holder{pointer-events:none;position:absolute;top:0;right:0;bottom:0;left:0}.hp-audio[data-position=left] .hp-tonearm-holder{transform:scaleX(-1)}.hp-tonearm{transform-origin:70% 11%;filter:drop-shadow(0 6px 8px #00000080);width:46%;height:92%;transition:transform .6s cubic-bezier(.3,.7,.2,1);position:absolute;top:-6%;right:-14%;transform:rotate(-26deg)}.hp-audio[data-playing] .hp-tonearm{transform:rotate(0)}@media(prefers-reduced-motion:reduce){.hp-vinyl,.hp-tonearm{transition:none}}.hp-audio[data-short][data-meta] .hp-audio-meta{display:none}.hp-audio[data-short][data-meta] .hp-audio-area{top:6px}[part=ad-layer][data-audio-ad]{background:0 0}[part=ad-layer][data-audio-ad] video{opacity:0}.hp-audio:after{content:"";pointer-events:none;z-index:2;background:linear-gradient(#0000,#00000047 45%,#0000009e);height:min(140px,45%);position:absolute;bottom:0;left:0;right:0}:host([data-audio-compact]) .video-area{aspect-ratio:auto;height:var(--hp-audio-bar-height,84px);overflow:visible}:host([data-audio-compact]) .hp-audio{border-radius:var(--hp-radius);background:linear-gradient(120deg,#24242c,#141418);background:linear-gradient(120deg,var(--hp-color-accent,#e5484d),transparent 60%),var(--hp-color-surface,#141418)}@supports (color:color-mix(in lab,red,red)){:host([data-audio-compact]) .hp-audio{background:linear-gradient(120deg,color-mix(in srgb,var(--hp-color-accent,#e5484d) 16%,transparent),transparent 60%),var(--hp-color-surface,#141418)}}:host([data-audio-compact]) .hp-audio>*,:host([data-audio-compact]) .hp-audio:after,:host([data-audio-compact]) .hp-caption-layer,:host([data-audio-compact]) .hp-loading-spinner,:host([data-audio-compact]) .hp-chrome:before,:host([data-audio-compact]) .hp-chrome:after{display:none}.hp-bar-meta{min-width:0;color:var(--hp-color-on-surface,#fff);pointer-events:none;align-items:center;gap:10px;padding:0 6px;display:flex}.hp-bar-meta[data-empty] .hp-bar-text{display:none}.hp-bar-text{flex-direction:column;min-width:0;line-height:1.25;display:flex}.hp-bar-title{white-space:nowrap;text-overflow:ellipsis;font-size:13px;font-weight:700;overflow:hidden}.hp-bar-sub{opacity:.72;white-space:nowrap;text-overflow:ellipsis;font-size:11.5px;overflow:hidden}.hp-bar-sub:empty{display:none}.hp-bar-eq{flex:none;align-items:flex-end;gap:2px;width:14px;height:14px;display:inline-flex}.hp-bar-eq i{background:var(--hp-color-accent,#fff);border-radius:1px;flex:1;height:30%;transition:height .2s}.hp-bar-meta[data-playing] .hp-bar-eq i{animation:.9s ease-in-out infinite alternate hp-bar-eq}.hp-bar-meta[data-playing] .hp-bar-eq i:nth-child(2){animation-duration:.7s;animation-delay:-.3s}.hp-bar-meta[data-playing] .hp-bar-eq i:nth-child(3){animation-duration:1.1s;animation-delay:-.6s}@keyframes hp-bar-eq{0%{height:25%}to{height:100%}}@media(prefers-reduced-motion:reduce){.hp-bar-meta[data-playing] .hp-bar-eq i{height:70%;animation:none}}.hp-lock{vertical-align:-2px;display:inline-block}.hp-rw-button{color:#fff;cursor:pointer;pointer-events:auto;-webkit-tap-highlight-color:transparent;background:#0c0c10b8;border:1px solid #ffffff38;border-radius:999px;align-items:center;gap:6px;padding:7px 12px;font:600 12.5px/1 system-ui,-apple-system,sans-serif;display:inline-flex;position:absolute;top:12px;left:12px;box-shadow:0 6px 18px -8px #000000b3}.hp-rw-button:hover{background:#0c0c10e0}.hp-rw-button[hidden]{display:none}.hp-rw-button .hp-lock{color:var(--hp-color-accent,#fff)}.hp-rw-dialog{z-index:45;color:#fff;text-align:center;background:#0000009e;justify-content:center;align-items:center;padding:12px;animation:.18s ease-out hp-rw-fade;display:flex;position:absolute;top:0;right:0;bottom:0;left:0}.hp-rw-card{background:#14141af5;border:1px solid #ffffff24;border-radius:14px;width:min(360px,100%);max-height:100%;padding:18px 18px 16px;overflow:auto;box-shadow:0 20px 50px -20px #000c}.hp-rw-icon{color:var(--hp-color-accent,#fff);background:#ffffff14;border-radius:50%;padding:9px;display:inline-flex}.hp-rw-icon .hp-lock{width:18px;height:18px}.hp-rw-title{margin-top:10px;font-size:15px;font-weight:700}.hp-rw-text{opacity:.82;margin-top:6px;font-size:13px;line-height:1.45}.hp-rw-actions{justify-content:center;gap:8px;margin-top:14px;display:flex}.hp-rw-actions:empty{display:none}.hp-rw-btn{color:#fff;cursor:pointer;background:0 0;border:1px solid #fff3;border-radius:999px;padding:8px 14px;font:600 13px/1 system-ui,-apple-system,sans-serif}.hp-rw-btn-primary{background:var(--hp-color-accent,#fff);color:var(--hp-color-on-accent,#0a0a0a);border-color:#0000}.hp-rw-spinner{border:2px solid #ffffff40;border-top-color:#fff;border-radius:50%;width:22px;height:22px;margin:4px auto 0;animation:.8s linear infinite hp-rw-spin}.hp-rw-toast{z-index:45;color:#fff;pointer-events:none;background:#0c0c10d9;border-radius:999px;padding:8px 14px;font:600 13px/1 system-ui,-apple-system,sans-serif;animation:.2s ease-out hp-rw-fade;position:absolute;top:12px;left:50%;transform:translate(-50%)}@keyframes hp-rw-fade{0%{opacity:0}}@keyframes hp-rw-spin{to{transform:rotate(360deg)}}.hp-settings-panel [data-locked],.hp-chip-panel [data-locked]{opacity:.85}.hp-sponsor-logo{z-index:21;width:var(--hp-sponsor-logo-w,96px);color:#fff;filter:drop-shadow(0 2px 6px #0000008c);flex-direction:column;align-items:center;gap:4px;text-decoration:none;transition:opacity .25s,right .35s cubic-bezier(.2,.8,.2,1),bottom .35s cubic-bezier(.2,.8,.2,1);animation:.4s ease-out hp-rw-fade;display:flex;position:absolute}.hp-sponsor-logo[data-position=top-left]{top:12px;left:12px}.hp-sponsor-logo[data-position=top-right]{top:12px;right:var(--hp-sponsor-avoid-right,12px)}.hp-sponsor-logo[data-position=bottom-left]{bottom:var(--hp-sponsor-avoid-bottom,76px);left:12px}.hp-sponsor-logo[data-position=bottom-right]{bottom:var(--hp-sponsor-avoid-bottom,76px);right:12px}.video-area[data-chrome-hidden] .hp-sponsor-logo[data-position=top-right]{right:12px}.video-area[data-chrome-hidden] .hp-sponsor-logo[data-position=bottom-left],.video-area[data-chrome-hidden] .hp-sponsor-logo[data-position=bottom-right]{bottom:12px}.hp-sponsor-logo img{width:100%;height:auto;display:block}.hp-sponsor-label{text-align:center;white-space:nowrap;text-overflow:ellipsis;letter-spacing:.08em;text-transform:uppercase;opacity:.85;max-width:100%;font:600 10px/1 system-ui,-apple-system,sans-serif;overflow:hidden}.video-area:has(.hp-rw-button:not([hidden])) .hp-sponsor-logo[data-position=top-left]{top:52px}.hp-sponsor-intro{z-index:22;color:#fff;pointer-events:none;background:#0c0c10d1;border-radius:999px;align-items:center;gap:10px;max-width:calc(100% - 32px);padding:8px 16px 8px 8px;font:600 14px/1.2 system-ui,-apple-system,sans-serif;transition:opacity .35s,transform .35s;animation:.45s cubic-bezier(.2,.8,.2,1) hp-sponsor-in;display:flex;position:absolute;bottom:84px;left:50%;transform:translate(-50%);box-shadow:0 12px 30px -12px #000c}.hp-sponsor-intro[data-leaving]{opacity:0;transform:translate(-50%,8px)}.hp-sponsor-intro img{border-radius:6px;width:auto;max-width:96px;height:28px}.hp-sponsor-intro span{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}@keyframes hp-sponsor-in{0%{opacity:0;transform:translate(-50%,12px)scale(.96)}}:host([data-sponsor-hidden]) .hp-sponsor-logo,:host([data-sponsor-hidden]) .hp-sponsor-intro{display:none}.hp-adtrigger{z-index:26;box-sizing:border-box;pointer-events:none;justify-content:center;align-items:center;padding:12px;display:none;position:absolute;top:0;right:0;bottom:0;left:0}.hp-adtrigger[data-open]{animation:.3s ease-out hp-adtrigger-in;display:flex}.hp-adtrigger[data-backdrop]{pointer-events:auto;background:#0000009e}.hp-adtrigger[data-layout=full]{padding:0}.hp-adtrigger[data-layout=none]{justify-content:flex-start;align-items:flex-start;padding:0}.hp-adtrigger[data-layout=none] .hp-adtrigger-frame{position:static}.hp-adtrigger[data-layout=top]{align-items:flex-start}.hp-adtrigger[data-layout=bottom]{align-items:flex-end;padding-bottom:72px}.hp-adtrigger[data-layout=top-left]{justify-content:flex-start;align-items:flex-start}.hp-adtrigger[data-layout=top-right]{justify-content:flex-end;align-items:flex-start}.hp-adtrigger[data-layout=bottom-left]{justify-content:flex-start;align-items:flex-end;padding-bottom:72px}.hp-adtrigger[data-layout=bottom-right]{justify-content:flex-end;align-items:flex-end;padding-bottom:72px}.hp-adtrigger-frame{pointer-events:auto;max-width:100%;max-height:100%;position:relative}.hp-adtrigger[data-layout=full] .hp-adtrigger-frame{width:100%;height:100%}.hp-adtrigger-frame[data-sized]{width:min(var(--hp-adtrigger-w),100%);height:min(var(--hp-adtrigger-h),100%)}.hp-adtrigger[data-layout=full] ::slotted(*),.hp-adtrigger-frame[data-sized] ::slotted(*){width:100%;height:100%;display:block}.hp-adtrigger-label{z-index:1;color:#fff;letter-spacing:.08em;text-transform:uppercase;pointer-events:none;background:#000000a8;border-radius:4px;padding:3px 7px;font:600 10px/1 system-ui,-apple-system,sans-serif;position:absolute;top:8px;left:8px}.hp-adtrigger-close{z-index:2;color:#fff;cursor:pointer;background:#000000b8;border:0;border-radius:999px;place-items:center;width:30px;height:30px;padding:0;display:grid;position:absolute;top:6px;right:6px}.hp-adtrigger-close[hidden]{display:none}.hp-adtrigger-close:focus-visible{outline:2px solid var(--hp-color-accent,#fff);outline-offset:2px}.hp-cast-overlay{z-index:12;color:#fff;text-align:center;pointer-events:none;background:radial-gradient(#14141adb,#060609f5);flex-direction:column;justify-content:center;align-items:center;gap:10px;padding:16px;font:600 15px/1.3 system-ui,-apple-system,sans-serif;display:none;position:absolute;top:0;right:0;bottom:0;left:0}.hp-cast-overlay[data-open]{display:flex}.hp-cast-overlay .hp-icon{color:var(--hp-color-accent,#fff);font-size:44px}.hp-cast-overlay-ad{background:#ffffff24;border-radius:999px;padding:4px 10px;font-size:12px;font-weight:600;display:none}.hp-cast-overlay[data-break] .hp-cast-overlay-ad{display:inline-block}.video-area[data-casting] video{visibility:hidden}[part=cast-button][data-connecting] .hp-icon{animation:1s ease-in-out infinite hp-cast-pulse}@keyframes hp-cast-pulse{50%{opacity:.35}}@keyframes hp-adtrigger-in{0%{opacity:0}}@media(prefers-reduced-motion:reduce){.hp-sponsor-intro,.hp-rw-dialog,.hp-rw-toast{animation:none}}@media(hover:none)and (pointer:coarse){.video-area:has(.hp-unmute-badge[data-visible]) .hp-rw-button,.video-area:has(.hp-unmute-badge[data-visible]) .hp-sponsor-logo[data-position=top-left]{top:52px}.video-area:has(.hp-unmute-badge[data-visible]):has(.hp-rw-button:not([hidden])) .hp-sponsor-logo[data-position=top-left]{top:92px}}.video-area[data-compact] .hp-rw-icon{display:none}.video-area[data-compact] .hp-rw-card{padding:12px 14px}.video-area[data-compact] .hp-rw-title{margin-top:0;font-size:14px}.video-area[data-compact] .hp-rw-text{font-size:12px;line-height:1.4}.video-area[data-compact] .hp-rw-actions{margin-top:10px}.hp-sponsor-logo[data-compact]{width:min(var(--hp-sponsor-logo-w,96px),48px);gap:2px}.hp-sponsor-logo[data-compact] .hp-sponsor-label{font-size:8.5px}:host([data-sponsor-intro]) .hp-sponsor-logo{pointer-events:none;opacity:0!important}.hp-redirect-thumb{aspect-ratio:16/9;background:#111;border-radius:8px;flex:none;display:block;position:relative;overflow:hidden}.hp-redirect-thumb img{object-fit:cover;width:100%;height:100%;transition:transform .3s;position:absolute;top:0;right:0;bottom:0;left:0}.hp-redirect-ring{filter:drop-shadow(0 2px 6px #0009);width:44px;height:44px;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)rotate(-90deg)}.hp-redirect-ring-track{fill:#00000073;stroke:#ffffff47;stroke-width:3px}.hp-redirect-ring-bar{fill:none;stroke:var(--hp-color-accent,#fff);stroke-width:3px;stroke-linecap:round;transition:stroke-dashoffset .3s linear}.hp-redirect-play{color:#fff;font-size:18px;line-height:1;position:absolute;top:50%;left:50%;transform:translate(-45%,-50%)}.hp-redirect-duration{color:#fff;background:#000000c7;border-radius:4px;padding:1px 5px;font:600 10px/1.4 system-ui,-apple-system,sans-serif;position:absolute;bottom:5px;right:5px}.hp-redirect-label{color:var(--hp-color-accent,#fff);letter-spacing:.1em;text-transform:uppercase;font:700 10px/1.2 system-ui,-apple-system,sans-serif}.hp-redirect-title{-webkit-line-clamp:2;-webkit-box-orient:vertical;font:600 13px/1.3 system-ui,-apple-system,sans-serif;display:-webkit-box;overflow:hidden}.hp-redirect-sub{white-space:nowrap;text-overflow:ellipsis;opacity:.7;font:500 11px/1.3 system-ui,-apple-system,sans-serif;overflow:hidden}.hp-redirect-card{z-index:24;color:#fff;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);background:#0e0e12e6;border-radius:12px;align-items:stretch;width:min(340px,100% - 24px);transition:bottom .25s,top .25s;animation:.35s cubic-bezier(.2,.8,.2,1) hp-redirect-in;display:flex;position:absolute;box-shadow:0 16px 36px -14px #000000d9}.hp-redirect-card[data-position=bottom-right]{bottom:76px;right:12px}.hp-redirect-card[data-position=bottom-left]{bottom:76px;left:12px}.hp-redirect-card[data-position=top-right]{top:12px;right:12px}.hp-redirect-card[data-position=top-left]{top:12px;left:12px}.video-area[data-chrome-hidden] .hp-redirect-card[data-position^=bottom]{bottom:12px}.hp-redirect-card-main{min-width:0;color:inherit;text-align:left;cursor:pointer;background:0 0;border:0;border-radius:12px;flex:1;align-items:center;gap:10px;padding:8px;display:flex}.hp-redirect-card-main .hp-redirect-thumb{width:42%}.hp-redirect-card-main:hover .hp-redirect-thumb img{transform:scale(1.04)}.hp-redirect-text{flex-direction:column;gap:3px;min-width:0;padding-right:22px;display:flex}.hp-redirect-close{color:#fff;cursor:pointer;background:#ffffff1f;border:0;border-radius:999px;place-items:center;width:24px;height:24px;padding:0;font-size:13px;display:grid;position:absolute;top:6px;right:6px}.hp-redirect-close:hover{background:#ffffff3d}.hp-redirect-card-main:focus-visible,.hp-redirect-close:focus-visible,.hp-redirect-poster:focus-visible,.hp-redirect-btn:focus-visible{outline:2px solid var(--hp-color-accent,#fff);outline-offset:2px}.video-area[data-compact] .hp-redirect-card{width:min(260px,100% - 16px)}.video-area[data-compact] .hp-redirect-card[data-position^=bottom]{bottom:56px}.video-area[data-compact][data-chrome-hidden] .hp-redirect-card[data-position^=bottom]{bottom:8px}.video-area[data-compact] .hp-redirect-card .hp-redirect-sub{display:none}.video-area[data-compact] .hp-redirect-card .hp-redirect-ring{width:34px;height:34px}.hp-redirect-screen{z-index:30;color:#fff;text-align:center;background:#060609e6;justify-content:center;align-items:center;padding:16px;animation:.3s ease-out hp-redirect-fade;display:flex;position:absolute;top:0;right:0;bottom:0;left:0;overflow:hidden}.hp-redirect-bg{object-fit:cover;opacity:.35;filter:blur(18px)saturate(1.2);width:calc(100% + 40px);height:calc(100% + 40px);position:absolute;top:-20px;right:-20px;bottom:-20px;left:-20px}.hp-redirect-panel{flex-direction:column;align-items:center;gap:8px;width:min(420px,100%);display:flex;position:relative}.hp-redirect-poster{cursor:pointer;background:0 0;border:0;border-radius:10px;width:min(320px,70%);padding:0;box-shadow:0 18px 40px -16px #000000e6}.hp-redirect-poster .hp-redirect-thumb{border-radius:10px;width:100%}.hp-redirect-poster .hp-redirect-ring{width:64px;height:64px}.hp-redirect-poster .hp-redirect-play{font-size:24px}.hp-redirect-screen .hp-redirect-title{font-size:16px}.hp-redirect-counter{opacity:.75;font:500 12px/1.4 system-ui,-apple-system,sans-serif}.hp-redirect-actions{gap:8px;margin-top:4px;display:flex}.hp-redirect-btn{color:#fff;cursor:pointer;background:#ffffff24;border:0;border-radius:999px;padding:7px 16px;font:600 13px/1 system-ui,-apple-system,sans-serif}.hp-redirect-btn:hover{background:#ffffff3d}.hp-redirect-btn-primary,.hp-redirect-btn-primary:hover{background:var(--hp-color-accent,#fff);color:var(--hp-color-on-accent,#000)}.video-area[data-compact] .hp-redirect-poster{width:min(200px,55%)}.video-area[data-compact] .hp-redirect-screen .hp-redirect-sub,.video-area[data-compact] .hp-redirect-counter{display:none}.hp-redirect-suggestions{z-index:30;background:#060609eb;grid-template-columns:repeat(auto-fill,minmax(160px,1fr));align-content:center;gap:12px;padding:16px;display:grid;position:absolute;top:0;right:0;bottom:0;left:0;overflow-y:auto}.hp-redirect-suggestion{color:#fff;flex-direction:column;gap:6px;text-decoration:none;display:flex}.hp-redirect-suggestion .hp-redirect-play{opacity:0;font-size:22px;transition:opacity .2s}.hp-redirect-suggestion:hover .hp-redirect-play,.hp-redirect-suggestion:focus-visible .hp-redirect-play{opacity:1}.hp-redirect-suggestion:hover .hp-redirect-thumb,.hp-redirect-suggestion:focus-visible .hp-redirect-thumb{outline:2px solid var(--hp-color-accent,#fff)}@keyframes hp-redirect-in{0%{opacity:0;transform:translateY(10px)scale(.97)}}@keyframes hp-redirect-fade{0%{opacity:0}}@media(prefers-reduced-motion:reduce){.hp-redirect-card,.hp-redirect-screen{animation:none}}.hp-skip-segment{z-index:23;color:#fff;letter-spacing:.01em;cursor:pointer;-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);background:#0e0e12b8;border:1px solid #ffffff8c;border-radius:8px;align-items:center;gap:8px;padding:10px 16px;font:600 14px/1.2 system-ui,-apple-system,sans-serif;transition:opacity .25s,bottom .25s,background-color .15s;animation:.3s cubic-bezier(.2,.8,.2,1) hp-redirect-in;display:inline-flex;position:absolute;overflow:hidden;box-shadow:0 10px 28px -12px #000c}.hp-skip-segment:hover{color:#111;background:#ffffffeb}.hp-skip-segment:focus-visible{outline:2px solid var(--hp-color-accent,#fff);outline-offset:2px}.hp-skip-segment>*{position:relative}.hp-skip-segment-icon{font-size:16px}.hp-skip-segment[data-auto]:before{content:"";transform-origin:0;transform:scaleX(var(--hp-skip-progress,0));background:#ffffff38;transition:transform .25s linear;position:absolute;top:0;right:0;bottom:0;left:0}.hp-skip-segment[data-position=bottom-right]{bottom:76px;right:16px}.hp-skip-segment[data-position=bottom-left]{bottom:76px;left:16px}.hp-skip-segment[data-position=top-right]{top:16px;right:16px}.hp-skip-segment[data-position=top-left]{top:16px;left:16px}.video-area[data-chrome-hidden] .hp-skip-segment[data-position^=bottom]{bottom:16px}.video-area[data-chrome-hidden] .hp-skip-segment[data-faded]{opacity:0;pointer-events:none}.video-area[data-compact] .hp-skip-segment{padding:7px 12px;font-size:12px}.video-area[data-compact] .hp-skip-segment[data-position^=bottom]{bottom:56px}.video-area[data-compact][data-chrome-hidden] .hp-skip-segment[data-position^=bottom]{bottom:10px}@media(prefers-reduced-motion:reduce){.hp-skip-segment{animation:none}}.hp-quality-badge{background:var(--hp-quality-badge-bg,var(--hp-color-accent,#fff));color:var(--hp-quality-badge-color,var(--hp-color-on-accent,#0a0a0a));letter-spacing:.02em;pointer-events:none;border-radius:3px;padding:0 2px;font:800 8px/1.3 system-ui,-apple-system,sans-serif;position:absolute;top:1px;right:-5px;box-shadow:0 1px 3px #00000073}.hp-quality-badge[hidden]{display:none}.video-area[data-compact] .hp-quality-badge{font-size:7px;top:0}.hp-quality-badge[data-low]{color:#0a0a0a;background:#ffffffb3}.hp-chevron-forward{font-size:11px;display:inline-block;transform:rotate(180deg)}:host([data-large-controls]){--hp-ctrl-btn-size:48px;--hp-ctrl-icon-size:22px;--hp-seek-hit-h:30px;--hp-seek-track-h:8px;--hp-seek-track-h-hover:10px;--hp-seek-thumb-size:20px;--hp-caption-font-size:24px}:host([data-large-controls]) .video-area[data-compact]{--hp-caption-font-size:17px}:host([data-zoomed]) video{cursor:grab}:host([data-zoomed]) video:active{cursor:grabbing}.hp-shortcuts{z-index:40;background:#0000008c;place-items:center;padding:12px;animation:.2s hp-redirect-fade;display:grid;position:absolute;top:0;right:0;bottom:0;left:0}.hp-shortcuts-box{color:#fff;background:#0e0e12f0;border-radius:12px;width:min(420px,100%);max-height:100%;padding:14px 16px 16px;font:400 13px/1.4 system-ui,-apple-system,sans-serif;overflow-y:auto;box-shadow:0 18px 40px -14px #000000e6}.hp-shortcuts-head{justify-content:space-between;align-items:center;margin-bottom:10px;display:flex}.hp-shortcuts-head h2{margin:0;font-size:15px;font-weight:700}.hp-shortcuts-close{color:#fff;cursor:pointer;background:#ffffff1f;border:0;border-radius:999px;place-items:center;width:30px;height:30px;padding:0;font-size:13px;display:grid}.hp-shortcuts-close:hover{background:#ffffff3d}.hp-shortcuts-close:focus-visible{outline:2px solid var(--hp-color-accent,#fff);outline-offset:2px}.hp-shortcuts-list{grid-template-columns:auto 1fr;align-items:center;gap:8px 14px;margin:0;display:grid}.hp-shortcuts-list dt{white-space:nowrap;flex-wrap:wrap;align-items:center;gap:4px;margin:0;display:flex}.hp-shortcuts-list dd{color:#ffffffd1;margin:0}.hp-shortcuts-list kbd{text-align:center;background:#ffffff14;border:1px solid #ffffff47;border-bottom-width:2px;border-radius:5px;min-width:22px;padding:2px 6px;font:600 11.5px/1.4 ui-monospace,SFMono-Regular,Menlo,monospace}.video-area[data-compact] .hp-shortcuts-box{padding:10px 12px 12px;font-size:12px}@media(prefers-reduced-motion:reduce){.hp-shortcuts{animation:none}}.hp-history-notice{z-index:23;color:#fff;-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);background:#0e0e12d1;border-radius:999px;align-items:center;gap:12px;max-width:calc(100% - 32px);padding:8px 8px 8px 14px;font:500 13px/1.3 system-ui,-apple-system,sans-serif;transition:bottom .25s;animation:.3s cubic-bezier(.2,.8,.2,1) hp-redirect-in;display:inline-flex;position:absolute;bottom:76px;left:16px;box-shadow:0 10px 28px -12px #000c}.video-area[data-chrome-hidden] .hp-history-notice{bottom:16px}.hp-history-restart{background:var(--hp-color-accent,#fff);color:var(--hp-color-on-accent,#0a0a0a);cursor:pointer;border:0;border-radius:999px;flex-shrink:0;padding:6px 12px;font:600 12.5px/1.2 system-ui,-apple-system,sans-serif}.hp-history-restart:focus-visible{outline:2px solid var(--hp-color-accent,#fff);outline-offset:2px}.video-area[data-compact] .hp-history-notice{gap:8px;padding:6px 6px 6px 10px;font-size:11.5px;bottom:56px;left:8px}.video-area[data-compact][data-chrome-hidden] .hp-history-notice{bottom:10px}@media(prefers-reduced-motion:reduce){.hp-history-notice{animation:none}}.hp-plugin-layer{z-index:5;transition:opacity .2s;position:absolute}.hp-plugin-layer[data-above]{z-index:30}.hp-plugin-layer[hidden]{display:none}.hp-plugin-layer:not([data-interactive]){pointer-events:none}.hp-plugin-layer:not([data-interactive]) :is(button,a,input,select,textarea,[data-interactive]){pointer-events:auto}.hp-plugin-layer[data-position=fill]{top:0;right:0;bottom:0;left:0}.hp-plugin-layer[data-position=top]{top:12px;left:50%;transform:translate(-50%)}.hp-plugin-layer[data-position=bottom]{bottom:76px;left:50%;transform:translate(-50%)}.hp-plugin-layer[data-position=center]{top:50%;left:50%;transform:translate(-50%,-50%)}.hp-plugin-layer[data-position=top-left]{top:12px;left:12px}.hp-plugin-layer[data-position=top-right]{top:12px;right:12px}.hp-plugin-layer[data-position=bottom-left]{bottom:76px;left:12px}.hp-plugin-layer[data-position=bottom-right]{bottom:76px;right:12px}.video-area[data-chrome-hidden] .hp-plugin-layer:is([data-position=bottom],[data-position=bottom-left],[data-position=bottom-right]){bottom:12px}.video-area[data-compact] .hp-plugin-layer:is([data-position=bottom],[data-position=bottom-left],[data-position=bottom-right]){bottom:56px}.video-area[data-chrome-hidden] .hp-plugin-layer[data-autohide]{opacity:0;pointer-events:none}.video-area[data-chrome-hidden] .hp-plugin-layer[data-autohide] *{pointer-events:none}.hp-plugin-btn svg{width:var(--hp-ctrl-icon-size);height:var(--hp-ctrl-icon-size)}.hp-plugin-btn[aria-pressed=true]{color:var(--hp-color-accent,#fff);background:var(--hp-color-accent,#fff)}@supports (color:color-mix(in lab,red,red)){.hp-plugin-btn[aria-pressed=true]{background:color-mix(in srgb,var(--hp-color-accent,#fff) 18%,transparent)}}.hp-plugin-toast{z-index:35;color:#fff;opacity:0;pointer-events:none;background:#0e0e12d9;border-radius:999px;max-width:calc(100% - 32px);padding:8px 14px;font:500 13px/1.3 system-ui,-apple-system,sans-serif;transition:opacity .2s,transform .2s;position:absolute;top:16px;left:50%;transform:translate(-50%,-6px)}.hp-plugin-toast[data-visible]{opacity:1;transform:translate(-50%)}@media(prefers-reduced-motion:reduce){.hp-plugin-layer,.hp-plugin-toast{transition:none}}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"<length-percentage>";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"<length-percentage>";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"<length-percentage>";inherits:false;initial-value:100%}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@keyframes spin{to{transform:rotate(360deg)}}';
5
- function Z(n) {
6
- return !!n && /MediaSinkAudio/i.test(n.message || "");
7
- }
8
- function Ue(n) {
9
- return !!n.error && !Z(n.error);
10
- }
11
- function se() {
12
- if (typeof navigator > "u") return !1;
13
- const n = navigator.userAgent, t = /iP(hone|od|ad)/.test(n) || navigator.platform === "MacIntel" && navigator.maxTouchPoints > 1, e = /^((?!chrome|chromium|android|crios|fxios|edg|opr).)*safari/i.test(n);
14
- return t || e;
15
- }
16
- function oe() {
17
- const n = window;
18
- return typeof n.MediaSource < "u" || typeof n.ManagedMediaSource < "u";
19
- }
20
- function Le(n, t) {
21
- var i;
22
- const e = (i = t == null ? void 0 : t.split(";")[0]) == null ? void 0 : i.trim().toLowerCase();
23
- return e === "application/vnd.apple.mpegurl" || e === "application/x-mpegurl" || /\.m3u8(?:$|[?#])/i.test(n) ? "hls" : e === "video/mp4" || /\.mp4(?:$|[?#])/i.test(n) ? "mp4" : "unknown";
24
- }
25
- class Ke {
26
- constructor(t, e) {
27
- s(this, "hls", null);
28
- s(this, "video");
29
- /** Son yüklenen kaynak — `reload()` (hata ekranındaki "Tekrar dene") için. */
30
- s(this, "last", null);
31
- /** Native HLS denemesi sürerken (ilk loadedmetadata'ya kadar) — başarısız olursa hls.js'e geçilir. */
32
- s(this, "nativeHlsProbe", null);
33
- s(this, "engineInfo", { engine: "native" });
34
- s(this, "hlsOptions", {});
35
- s(this, "streamTextTracks", /* @__PURE__ */ new Map());
36
- /** Safari native HLS ses izi dinleyicilerini kaldırır. */
37
- s(this, "nativeAudioCleanup", null);
38
- this.callbacks = e, this.video = t;
39
- }
40
- /** `options.hls` — sonraki `load()`'da uygulanır. */
41
- configure(t) {
42
- this.hlsOptions = t ?? {};
43
- }
44
- /** Bu kaynak zaten yüklü ve hatasız mı — aynı kaynak için yeniden yükleme (başa sarma) gerekmez. */
45
- isLoaded(t, e) {
46
- return !!this.last && this.last.src === t && this.last.type === e && !Ue(this.video) && this.video.readyState > 0;
47
- }
48
- async load(t, e) {
49
- this.last = { src: t, type: e }, this.destroy(), this.video.pause();
50
- const i = Le(t, e);
51
- if (this.callbacks.onLevelsChanged([], -1), this.callbacks.onAudioTracksChanged([], -1), this.streamTextTracks.clear(), this.callbacks.onTextTracksFound([]), i !== "hls") {
52
- this.engineInfo = { engine: "native" }, this.video.src = t;
53
- return;
54
- }
55
- const r = this.hlsOptions.engine ?? "auto", o = this.video.canPlayType("application/vnd.apple.mpegurl") !== "";
56
- if (r === "native" && o) {
57
- this.loadNativeHls(t, "option");
58
- return;
59
- }
60
- if (r !== "hls.js" && o && (se() || !oe())) {
61
- this.loadNativeHls(t, se() ? "apple-native" : "no-mse");
62
- return;
63
- }
64
- await this.attachHlsJs(t);
65
- }
66
- /** Şu anki oynatma yolu — docs demosu/entegratör teşhisi için (ör. CORS yüzünden native'e düşüldü mü). */
67
- get engine() {
68
- return this.engineInfo;
69
- }
70
- /** hls.js ile oynatılıyorsa instance (gelişmiş kullanım: olaylar, istatistik); değilse null. */
71
- get hlsInstance() {
72
- return this.hls;
73
- }
74
- loadNativeHls(t, e) {
75
- this.engineInfo = { engine: "native-hls", reason: e }, this.probeNativeHls(t), this.watchNativeAudioTracks(), this.video.src = t;
76
- }
77
- /** Native HLS denemesi sürüyor mu — ErrorScreen bu sırada gelen hatayı göstermez (hls.js'e geçilecek). */
78
- isRecovering() {
79
- return this.nativeHlsProbe !== null;
80
- }
81
- /**
82
- * Bazı ortamlar canPlayType'a "maybe" deyip HLS'i native oynatamıyor (bazı Android tarayıcıları/WebView'lar).
83
- * İlk metadata'dan önce kod 4 gelirse ve MSE varsa hls.js'e geç.
84
- */
85
- probeNativeHls(t) {
86
- if (!oe() || this.engineInfo.reason === "hlsjs-failed" || this.engineInfo.reason === "option") return;
87
- const e = () => r(), i = () => {
88
- var a, l;
89
- const o = ((a = this.video.error) == null ? void 0 : a.code) === 4;
90
- r(), o && ((l = this.nativeAudioCleanup) == null || l.call(this), this.attachHlsJs(t));
91
- }, r = () => {
92
- this.video.removeEventListener("loadedmetadata", e), this.video.removeEventListener("error", i), this.nativeHlsProbe = null;
93
- };
94
- this.video.addEventListener("loadedmetadata", e), this.video.addEventListener("error", i), this.nativeHlsProbe = r;
95
- }
96
- /** Safari native HLS: alternatif ses izleri `video.audioTracks`'te (diğer tarayıcılarda bu API yok). */
97
- watchNativeAudioTracks() {
98
- const t = this.video.audioTracks;
99
- if (!t) return;
100
- const e = () => {
101
- const i = Array.from(t, (r, o) => ({ index: o, label: r.label || r.language || `${o + 1}`, lang: r.language }));
102
- this.callbacks.onAudioTracksChanged(i, Array.from(t).findIndex((r) => r.enabled));
103
- };
104
- for (const i of ["addtrack", "removetrack", "change"]) t.addEventListener(i, e);
105
- this.nativeAudioCleanup = () => {
106
- for (const i of ["addtrack", "removetrack", "change"]) t.removeEventListener(i, e);
107
- this.nativeAudioCleanup = null;
108
- };
109
- }
110
- async attachHlsJs(t) {
111
- var g;
112
- const e = this.hlsOptions.build === "light" ? "light" : "full", { default: i } = e === "light" ? await import("./hlsLight-CCe_8eOw.js") : await import("./hls-DAtZkTUi.js");
113
- if (((g = this.last) == null ? void 0 : g.src) !== t) return;
114
- if (!i.isSupported()) {
115
- this.engineInfo = { engine: "native-hls", reason: "no-mse" }, this.video.src = t;
116
- return;
117
- }
118
- const r = new i(this.buildHlsConfig());
119
- this.hls = r, this.engineInfo = { engine: "hls.js", build: e };
120
- let o = !1, a = !1;
121
- r.on(i.Events.ERROR, (c, d) => {
122
- var f, x, v, y, k, C;
123
- if (this.hls === r) {
124
- const w = d;
125
- (C = (k = this.callbacks).onStreamError) == null || C.call(k, {
126
- type: String(d.type),
127
- details: String(d.details),
128
- fatal: !!d.fatal,
129
- url: w.url ?? ((f = w.frag) == null ? void 0 : f.url) ?? ((x = w.context) == null ? void 0 : x.url),
130
- httpStatus: (v = w.response) == null ? void 0 : v.code,
131
- reason: w.reason ?? ((y = w.error) == null ? void 0 : y.message)
132
- });
133
- }
134
- if (!d.fatal || this.hls !== r) return;
135
- const m = [i.ErrorDetails.MANIFEST_LOAD_ERROR, i.ErrorDetails.MANIFEST_LOAD_TIMEOUT].includes(d.details);
136
- if (!o && m && this.video.canPlayType("application/vnd.apple.mpegurl") !== "") {
137
- r.destroy(), this.hls = null, this.loadNativeHls(t, "hlsjs-failed");
138
- return;
139
- }
140
- if (d.type === i.ErrorTypes.MEDIA_ERROR && !a) {
141
- a = !0, r.recoverMediaError();
142
- return;
143
- }
144
- r.stopLoad(), this.callbacks.onFatalError(d.type === i.ErrorTypes.NETWORK_ERROR ? "network" : "media");
145
- });
146
- const l = () => r.levels.map((c, d) => ({ index: d, height: c.height, bitrate: c.bitrate }));
147
- r.on(i.Events.MANIFEST_PARSED, () => {
148
- o = !0, this.callbacks.onLevelsChanged(l(), r.currentLevel);
149
- }), r.on(i.Events.LEVEL_SWITCHED, (c, d) => {
150
- this.callbacks.onLevelsChanged(l(), r.autoLevelEnabled ? -1 : d.level);
151
- });
152
- const h = () => r.audioTracks.map((c, d) => ({ index: d, label: c.name || c.lang || `${d + 1}`, lang: c.lang ?? "" }));
153
- r.on(i.Events.AUDIO_TRACKS_UPDATED, () => this.callbacks.onAudioTracksChanged(h(), r.audioTrack)), r.on(i.Events.AUDIO_TRACK_SWITCHED, (c, d) => this.callbacks.onAudioTracksChanged(h(), d.id)), r.on(i.Events.NON_NATIVE_TEXT_TRACKS_FOUND, (c, d) => {
154
- var m;
155
- for (const f of d.tracks) {
156
- const x = f.subtitleTrack, v = x ? `sub:${x.id}` : `cc:${f._id ?? f.label}`, y = f.kind === "captions" ? "captions" : "subtitles";
157
- this.streamTextTracks.set(v, { id: v, kind: y, label: f.label, lang: (x == null ? void 0 : x.lang) ?? ((m = f.closedCaptions) == null ? void 0 : m.lang) ?? "" });
158
- }
159
- this.callbacks.onTextTracksFound([...this.streamTextTracks.values()]);
160
- }), r.on(i.Events.CUES_PARSED, (c, d) => {
161
- const m = d.type === "subtitles" && d.subtitleTrack ? `sub:${d.subtitleTrack.id}` : `cc:${d.track}`;
162
- this.callbacks.onCues(m, d.cues);
163
- }), r.attachMedia(this.video), r.loadSource(t);
164
- }
165
- buildHlsConfig() {
166
- const t = this.hlsOptions.config ?? {}, e = { enableWorker: !0, renderTextTracksNatively: !1, liveDurationInfinity: !0, ...t };
167
- if (this.hlsOptions.withCredentials) {
168
- const { xhrSetup: i, fetchSetup: r } = t;
169
- e.xhrSetup = (o, a, l) => (o.withCredentials = !0, i == null ? void 0 : i(o, a, l)), e.fetchSetup = (o, a) => {
170
- const l = { ...a, credentials: "include" };
171
- return r ? r(o, l) : new Request(o.url, l);
172
- };
173
- }
174
- return e;
175
- }
176
- /** Son kaynağı baştan yükler — hls.js ile oynayan kaynakta da çalışır (çıplak video.load() blob'u yeniden açamaz). */
177
- /** Son `load()` edilen kaynak (playlist/dublaj gibi eklentilerin yüklediği dahil). */
178
- get currentSrc() {
179
- var t;
180
- return ((t = this.last) == null ? void 0 : t.src) ?? null;
181
- }
182
- reload() {
183
- return this.last ? this.load(this.last.src, this.last.type) : Promise.resolve();
184
- }
185
- /** ABR'nin çıkabileceği en yüksek seviye (kalite kilidi); -1 = sınır yok. */
186
- setMaxLevel(t) {
187
- this.hls && this.hls.autoLevelCapping !== t && (this.hls.autoLevelCapping = t);
188
- }
189
- /** -1 = otomatik kalite (ABR). */
190
- setLevel(t) {
191
- this.hls && (this.hls.currentLevel = t);
192
- }
193
- setAudioTrack(t) {
194
- if (this.hls) {
195
- this.hls.audioTrack = t;
196
- return;
197
- }
198
- const e = this.video.audioTracks;
199
- e && (e[t] && (e[t].enabled = !0), Array.from(e).forEach((i, r) => {
200
- r !== t && (i.enabled = !1);
201
- }));
202
- }
203
- /**
204
- * Yayın altyazısı seçildi (null = yayın altyazısı yok). hls.js manifest altyazısının segmentlerini yalnızca
205
- * seçili `subtitleTrack` için indirir; CEA-608 cue'ları zaten video segmentlerinden sürekli gelir.
206
- */
207
- selectTextTrack(t) {
208
- if (!this.hls) return;
209
- const e = t != null && t.startsWith("sub:") ? Number(t.slice(4)) : NaN;
210
- this.hls.subtitleTrack = Number.isNaN(e) ? -1 : this.hls.subtitleTracks.findIndex((i) => i.id === e);
211
- }
212
- destroy() {
213
- var t, e;
214
- (t = this.nativeHlsProbe) == null || t.call(this), (e = this.nativeAudioCleanup) == null || e.call(this), this.hls && (this.hls.destroy(), this.hls = null);
215
- }
216
- }
217
- const Q = {
218
- mp4: "video/mp4",
219
- m4v: "video/mp4",
220
- webm: "video/webm",
221
- ogv: "video/ogg",
222
- ogg: "video/ogg",
223
- mov: "video/quicktime",
224
- mp3: "audio/mpeg",
225
- m4a: "audio/mp4",
226
- aac: "audio/aac",
227
- wav: "audio/wav",
228
- flac: "audio/flac"
229
- };
230
- function Pe(n) {
231
- var r, o;
232
- const t = Le(n.src, n.type);
233
- if (t !== "unknown") return t;
234
- const e = (o = (r = n.type) == null ? void 0 : r.split(";")[0]) == null ? void 0 : o.trim().toLowerCase();
235
- if (e) {
236
- const a = Object.keys(Q).find((l) => Q[l] === e);
237
- if (a) return a;
238
- }
239
- const i = /\.([a-z0-9]{2,5})(?:$|[?#])/i.exec(n.src);
240
- return i ? i[1].toLowerCase() : "other";
241
- }
242
- function je(n, t) {
243
- const e = [];
244
- for (const r of n) {
245
- const o = Pe(r), a = e.find((l) => l.format === o);
246
- a ? a.sources.push(r) : e.push({ format: o, sources: [r] });
247
- }
248
- if (!(t != null && t.length)) return e;
249
- const i = (r) => {
250
- const o = t.findIndex((a) => a.toLowerCase() === r);
251
- return o === -1 ? t.length : o;
252
- };
253
- return e.sort((r, o) => i(r.format) - i(o.format));
254
- }
255
- function $e(n, t) {
256
- var i;
257
- if (n.format === "hls") {
258
- const r = window;
259
- return !(typeof r.MediaSource < "u" || typeof r.ManagedMediaSource < "u") && t.canPlayType("application/vnd.apple.mpegurl") === "";
260
- }
261
- const e = ((i = n.sources.find((r) => r.type)) == null ? void 0 : i.type) ?? Q[n.format];
262
- return !!e && t.canPlayType(e) === "";
263
- }
264
- function P(n) {
265
- if (!Number.isFinite(n) || n < 0) return "0:00";
266
- const t = Math.floor(n), e = Math.floor(t / 3600), i = Math.floor(t % 3600 / 60), r = t % 60, o = e > 0 ? String(i).padStart(2, "0") : String(i), a = String(r).padStart(2, "0");
267
- return e > 0 ? `${e}:${o}:${a}` : `${o}:${a}`;
268
- }
269
- const ae = 0.05;
270
- function _(n, t) {
271
- const e = n.duration;
272
- return !Number.isFinite(e) || e <= ae * 2 ? t : Math.min(t, e - ae);
273
- }
274
- function Me(n, t) {
275
- const e = n.seekable.length ? n.seekable.start(0) : 0, i = Number.isFinite(n.duration) ? n.duration : n.seekable.length ? n.seekable.end(n.seekable.length - 1) : n.currentTime;
276
- n.currentTime = _(n, Math.max(e, Math.min(i, n.currentTime + t)));
277
- }
278
- const Qe = 10, We = 1, Be = 15;
279
- class Xe {
280
- constructor(t, e) {
281
- s(this, "el");
282
- s(this, "trackEl");
283
- s(this, "chaptersEl", null);
284
- s(this, "chapters", []);
285
- /** İmlecin üstündeki zaman (varsayılan, plugin gerektirmez) — kendi zamanını gösteren plugin'ler `suppressHoverTime` ile gizler. */
286
- s(this, "hoverTimeEl");
287
- s(this, "hoverTimeSuppressors", /* @__PURE__ */ new Set());
288
- s(this, "playedEl");
289
- s(this, "bufferedEl");
290
- s(this, "thumbEl");
291
- s(this, "hoverDotEl");
292
- s(this, "video");
293
- s(this, "labels");
294
- s(this, "dragging", !1);
295
- s(this, "markerEls", []);
296
- s(this, "trackWidth", 0);
297
- s(this, "resizeObserver");
298
- s(this, "rafId", null);
299
- /** Canlıda hover zamanını başka bir bileşen gösteriyor mu (live-wall-clock tooltip'i) — üst üste binmesin. */
300
- s(this, "liveHoverHandled", !1);
301
- /**
302
- * Canlıda oynatıcının hedef konumu (hls.js `liveSyncPosition` — yayını bilerek uçtan ~3 segment geride oynatır).
303
- * Seek bar'ın sağ ucu burasıdır; verilmezse seekable sonu.
304
- */
305
- s(this, "liveTarget", null);
306
- s(this, "onHoverMove", (t) => {
307
- const e = this.timeline(), i = this.ratioAtClientX(t.clientX);
308
- if (e && !this.dragging ? (this.hoverDotEl.style.transform = `translate(${this.xAtRatio(i)}px, -50%) translateX(-50%)`, this.hoverDotEl.setAttribute("data-visible", "")) : this.hoverDotEl.removeAttribute("data-visible"), this.hoverTimeSuppressors.size || !e || e.live && this.liveHoverHandled) {
309
- this.hoverTimeEl.removeAttribute("data-visible");
310
- return;
311
- }
312
- const r = e.start + i * (e.end - e.start);
313
- this.hoverTimeEl.textContent = e.live ? `-${P(e.end - r)}` : P(r), this.hoverTimeEl.setAttribute("data-visible", "");
314
- const o = this.hoverTimeEl.offsetWidth, a = Math.min(Math.max(this.layoutXAtClientX(t.clientX) - o / 2, 0), Math.max(this.trackWidth - o, 0));
315
- this.hoverTimeEl.style.transform = `translateX(${a}px)`;
316
- });
317
- s(this, "onHoverLeave", () => {
318
- this.hoverTimeEl.removeAttribute("data-visible"), this.hoverDotEl.removeAttribute("data-visible");
319
- });
320
- s(this, "onPointerDown", (t) => {
321
- this.dragging = !0, this.hoverDotEl.removeAttribute("data-visible"), this.el.setPointerCapture(t.pointerId), this.seekToRatio(this.ratioFromEvent(t)), this.el.addEventListener("pointermove", this.onPointerMove), this.el.addEventListener("pointerup", this.onPointerUp);
322
- });
323
- s(this, "onPointerMove", (t) => {
324
- this.dragging && this.seekToRatio(this.ratioFromEvent(t));
325
- });
326
- s(this, "onPointerUp", (t) => {
327
- this.dragging = !1, this.el.releasePointerCapture(t.pointerId), this.el.removeEventListener("pointermove", this.onPointerMove), this.el.removeEventListener("pointerup", this.onPointerUp);
328
- });
329
- /** Odaktayken ←/→ sarma süresi (sn) — player'ın klavye kısayoluyla aynı (options.keyboardSeekStep). */
330
- s(this, "keyboardStep", 5);
331
- /** Odaktayken ok tuşuyla sarıldığında (sn, negatif = geri) — sarma bildirimi için. */
332
- s(this, "onKeyboardSeek", null);
333
- s(this, "onKeyDown", (t) => {
334
- var i, r;
335
- const e = this.timeline();
336
- e && (t.key === "ArrowRight" ? (this.video.currentTime = _(this.video, Math.min(e.end, this.video.currentTime + this.keyboardStep)), (i = this.onKeyboardSeek) == null || i.call(this, this.keyboardStep), t.preventDefault()) : t.key === "ArrowLeft" && (this.video.currentTime = Math.max(e.start, this.video.currentTime - this.keyboardStep), (r = this.onKeyboardSeek) == null || r.call(this, -this.keyboardStep), t.preventDefault()));
337
- });
338
- s(this, "startLoop", () => {
339
- if (this.rafId !== null) return;
340
- const t = () => {
341
- this.render(), this.rafId = requestAnimationFrame(t);
342
- };
343
- this.rafId = requestAnimationFrame(t);
344
- });
345
- s(this, "stopLoop", () => {
346
- this.rafId !== null && (cancelAnimationFrame(this.rafId), this.rafId = null), this.render();
347
- });
348
- s(this, "render", () => {
349
- const t = this.timeline();
350
- if (this.el.toggleAttribute("data-no-duration", !t), this.el.toggleAttribute("data-live", !!(t != null && t.live)), !t) {
351
- this.hoverTimeEl.removeAttribute("data-visible"), this.hoverDotEl.removeAttribute("data-visible"), this.playedEl.style.transform = "scaleX(0)", this.thumbEl.style.translate = "-50% 0", this.bufferedEl.style.transform = "scaleX(0)";
352
- return;
353
- }
354
- const e = t.end - t.start, i = (l) => Math.min(1, Math.max(0, (l - t.start) / e)), r = t.live && this.atLiveEdge(t) ? 1 : i(this.video.currentTime);
355
- this.thumbEl.style.translate = `calc(${this.xAtRatio(r)}px - 50%) 0`;
356
- let o = 0;
357
- for (let l = 0; l < this.video.buffered.length; l++)
358
- this.video.buffered.start(l) <= this.video.currentTime && (o = Math.max(o, this.video.buffered.end(l)));
359
- const a = i(o);
360
- if (this.chapters.length)
361
- for (const l of this.chapters) {
362
- const h = l.end - l.start, g = (c) => h > 0 ? Math.min(1, Math.max(0, (c - l.start) / h)) : 0;
363
- l.playedEl.style.transform = `scaleX(${g(r)})`, l.bufferedEl.style.transform = `scaleX(${g(a)})`;
364
- }
365
- else
366
- this.playedEl.style.transform = `scaleX(${r})`, this.bufferedEl.style.transform = `scaleX(${a})`;
367
- this.el.setAttribute("aria-valuemin", String(Math.floor(t.start))), this.el.setAttribute("aria-valuemax", String(Math.floor(t.end))), this.el.setAttribute("aria-valuenow", String(Math.floor(this.video.currentTime)));
368
- });
369
- this.video = t, this.labels = e, this.el = document.createElement("div"), this.el.setAttribute("part", "seek-bar"), this.el.className = "hp-seekbar hp:relative hp:h-[var(--hp-seek-hit-h)] hp:flex hp:items-center hp:cursor-pointer hp:group hp:touch-none", this.el.setAttribute("role", "slider"), this.el.setAttribute("tabindex", "0"), this.el.setAttribute("aria-label", e.seekBar), this.el.setAttribute("aria-valuemin", "0");
370
- const i = document.createElement("div");
371
- i.className = "hp:absolute hp:inset-x-0 hp:h-[var(--hp-seek-track-h)] hp:rounded-full hp:bg-on-surface/25 hp:group-hover:h-[var(--hp-seek-track-h-hover)] hp:transition-[height] hp:duration-150", this.el.appendChild(i), this.trackEl = i, this.bufferedEl = document.createElement("div"), this.bufferedEl.className = "hp:absolute hp:inset-0 hp:rounded-full hp:bg-on-surface/40", this.bufferedEl.style.transformOrigin = "left", this.bufferedEl.style.willChange = "transform", i.appendChild(this.bufferedEl), this.playedEl = document.createElement("div"), this.playedEl.className = "hp:absolute hp:inset-0 hp:rounded-full hp:bg-accent", this.playedEl.style.transformOrigin = "left", this.playedEl.style.willChange = "transform", i.appendChild(this.playedEl), this.thumbEl = document.createElement("div"), this.thumbEl.className = "hp-seek-thumb", this.thumbEl.setAttribute("part", "seek-thumb"), this.el.appendChild(this.thumbEl), this.hoverDotEl = document.createElement("div"), this.hoverDotEl.className = "hp-seek-hover-dot", this.hoverDotEl.setAttribute("part", "seek-hover-dot"), this.el.appendChild(this.hoverDotEl), this.hoverTimeEl = document.createElement("div"), this.hoverTimeEl.className = "hp-seek-time", this.hoverTimeEl.setAttribute("part", "seek-time"), this.el.appendChild(this.hoverTimeEl), this.el.addEventListener("pointerdown", this.onPointerDown), this.el.addEventListener("pointermove", this.onHoverMove), this.el.addEventListener("pointerleave", this.onHoverLeave), this.el.addEventListener("keydown", this.onKeyDown), t.addEventListener("play", this.startLoop), t.addEventListener("pause", this.stopLoop), t.addEventListener("ended", this.stopLoop), t.addEventListener("timeupdate", this.render), t.addEventListener("progress", this.render), t.addEventListener("loadedmetadata", this.render), t.paused || this.startLoop(), this.resizeObserver = new ResizeObserver(() => {
372
- this.trackWidth = this.layoutWidth(), this.measureChapters(), this.render();
373
- }), this.resizeObserver.observe(this.el), this.trackWidth = this.layoutWidth();
374
- }
375
- /**
376
- * Seek bar'ın temsil ettiği zaman aralığı: VOD'da 0 → süre; canlıda (duration Infinity) yayının izin verdiği
377
- * geri sarma penceresi (seekable başı → canlı hedef konum). Pencere çok kısaysa (DVR yok) ya da süre bilinmiyorsa null.
378
- */
379
- timeline() {
380
- var l;
381
- const t = this.video.duration;
382
- if (Number.isFinite(t) && t > 0) return { start: 0, end: t, live: !1 };
383
- if (t !== 1 / 0) return null;
384
- const { seekable: e } = this.video;
385
- if (!e.length) return null;
386
- const i = e.start(0), r = e.end(e.length - 1), o = (l = this.liveTarget) == null ? void 0 : l.call(this), a = o != null && o > i && o <= r ? o : r;
387
- return a - i >= Qe ? { start: i, end: a, live: !0 } : null;
388
- }
389
- /** Canlıda izleyici canlı konumda mı — kontrol çubuğundaki "● CANLI" rozetiyle aynı ölçü. */
390
- atLiveEdge(t) {
391
- return t.end - this.video.currentTime <= Be;
392
- }
393
- /** Kendi zamanını gösteren plugin'ler (sprite/segments) varsayılan hover zamanını gizler — keyed set. */
394
- suppressHoverTime(t, e) {
395
- e ? this.hoverTimeSuppressors.add(t) : this.hoverTimeSuppressors.delete(t), e && this.hoverTimeEl.removeAttribute("data-visible");
396
- }
397
- ratioFromEvent(t) {
398
- return this.ratioAtClientX(t.clientX);
399
- }
400
- /** Ekran x koordinatını 0–1 zaman oranına çevirir — chapter modunda parça boşluklarını hesaba katar (segments plugin'inin hover popup'ı da bunu kullanıyor). */
401
- ratioAtClientX(t) {
402
- const e = this.layoutXAtClientX(t);
403
- if (!this.chapters.length) return this.trackWidth > 0 ? Math.min(1, Math.max(0, e / this.trackWidth)) : 0;
404
- for (let i = 0; i < this.chapters.length; i++) {
405
- const r = this.chapters[i], o = this.chapters[i + 1], a = o ? o.left : 1 / 0;
406
- if (e < a || !o) {
407
- const l = r.width > 0 ? Math.min(1, Math.max(0, (e - r.left) / r.width)) : 0;
408
- return r.start + l * (r.end - r.start);
409
- }
410
- }
411
- return 1;
412
- }
413
- /** 0–1 zaman oranının seek bar üzerindeki px konumu (thumb için). */
414
- xAtRatio(t) {
415
- if (!this.chapters.length) return t * this.trackWidth;
416
- const e = this.chapters.find((o) => t < o.end) ?? this.chapters[this.chapters.length - 1], i = e.end - e.start, r = i > 0 ? Math.min(1, Math.max(0, (t - e.start) / i)) : 0;
417
- return e.left + r * e.width;
418
- }
419
- /** Track'i sıralı, 0→1'i kesintisiz kapsayan oran aralıklarına göre ayrı parçalara böler. */
420
- setChapters(t) {
421
- if (this.clearChapters(), !t.length) return [];
422
- const e = document.createElement("div");
423
- return e.className = "hp-chapters", this.chapters = t.map((i) => {
424
- const r = document.createElement("div");
425
- r.className = "hp-chapter", r.setAttribute("part", "segment-band"), r.style.flex = `${Math.max(i.end - i.start, 0)} 1 0px`;
426
- const o = document.createElement("div");
427
- o.className = "hp-chapter-fill hp-chapter-buffered";
428
- const a = document.createElement("div");
429
- return a.className = "hp-chapter-fill hp-chapter-played", i.color && (a.style.background = i.color), r.append(o, a), e.appendChild(r), { ...i, el: r, bufferedEl: o, playedEl: a, left: 0, width: 0 };
430
- }), this.trackEl.style.display = "none", this.trackEl.after(e), this.chaptersEl = e, this.measureChapters(), this.render(), this.chapters.map((i) => i.el);
431
- }
432
- clearChapters() {
433
- var t;
434
- (t = this.chaptersEl) == null || t.remove(), this.chaptersEl = null, this.chapters = [], this.trackEl.style.display = "", this.render();
435
- }
436
- /**
437
- * Seek bar'ın DÜZEN genişliği (px). getBoundingClientRect() ata elementlerin CSS transform'undan etkilenir: player
438
- * ölçekli bir giriş animasyonuyla (ör. scale(0.985)) gösterilirken ölçülürse genişlik küçük kalıyor, animasyon
439
- * bitince düzen boyutu değişmediği için ResizeObserver tekrar tetiklenmiyor ve thumb dolu kısmın gerisinde kalıyordu.
440
- */
441
- /** Ekran x koordinatının seek bar içindeki DÜZEN px'i (ata transform'u ölçekliyorsa ona göre düzeltilmiş). */
442
- layoutXAtClientX(t) {
443
- const e = this.el.getBoundingClientRect();
444
- return e.width > 0 ? (t - e.left) * this.trackWidth / e.width : 0;
445
- }
446
- layoutWidth() {
447
- return parseFloat(getComputedStyle(this.el).width) || this.el.offsetWidth;
448
- }
449
- measureChapters() {
450
- if (!this.chapters.length) return;
451
- const t = this.el.getBoundingClientRect(), e = t.width > 0 ? this.trackWidth / t.width : 1;
452
- for (const i of this.chapters) {
453
- const r = i.el.getBoundingClientRect();
454
- i.left = (r.left - t.left) * e, i.width = r.width * e;
455
- }
456
- }
457
- seekToRatio(t) {
458
- const e = this.timeline();
459
- if (!e) return;
460
- const i = e.start + t * (e.end - e.start);
461
- this.video.currentTime = e.live ? Math.min(i, e.end - We) : _(this.video, i), this.render();
462
- }
463
- /** 0–1 arası oranda, seek bar üzerine ince bir işaret çizgisi ekler (ör. loop A/B noktaları). */
464
- addMarker(t, e = "") {
465
- const i = document.createElement("div");
466
- return i.className = `hp:absolute hp:top-0 hp:bottom-0 hp:w-0.5 hp:bg-on-surface hp:pointer-events-none ${e}`, i.style.left = `${Math.min(1, Math.max(0, t)) * 100}%`, this.el.appendChild(i), this.markerEls.push(i), i;
467
- }
468
- clearMarkers() {
469
- this.markerEls.forEach((t) => t.remove()), this.markerEls.length = 0;
470
- }
471
- refreshLabels() {
472
- this.el.setAttribute("aria-label", this.labels.seekBar);
473
- }
474
- destroy() {
475
- var t;
476
- this.rafId !== null && cancelAnimationFrame(this.rafId), this.resizeObserver.disconnect(), this.el.removeEventListener("pointermove", this.onHoverMove), this.el.removeEventListener("pointerleave", this.onHoverLeave), this.video.removeEventListener("play", this.startLoop), this.video.removeEventListener("pause", this.stopLoop), this.video.removeEventListener("ended", this.stopLoop), this.video.removeEventListener("timeupdate", this.render), this.video.removeEventListener("progress", this.render), this.video.removeEventListener("loadedmetadata", this.render), this.clearMarkers(), (t = this.chaptersEl) == null || t.remove();
477
- }
478
- }
479
- function M(n, t = "") {
480
- const e = document.createElement("i");
481
- return e.className = `hp-icon hp-icon-${n}${t ? ` ${t}` : ""}`, e.setAttribute("aria-hidden", "true"), e;
482
- }
483
- function N(n, t) {
484
- n.className = n.className.replace(/hp-icon-[\w-]+/, `hp-icon-${t}`);
485
- }
486
- const H = 0.05, Ye = 150;
487
- class Je {
488
- constructor(t, e, i) {
489
- s(this, "el");
490
- /** Dokunmatikte ses butonu gizli; sessiz oynarken görünen "Sesi aç" rozeti (chrome dışında monte edilir, otomatik gizlenmez). */
491
- s(this, "unmuteBadge");
492
- s(this, "unmuteText");
493
- s(this, "button");
494
- s(this, "iconEl");
495
- s(this, "slider");
496
- s(this, "sliderFill");
497
- s(this, "video");
498
- s(this, "labels");
499
- s(this, "adHooks");
500
- s(this, "dragging", !1);
501
- s(this, "hideTimer", null);
502
- s(this, "openNow", () => {
503
- this.hideTimer && (clearTimeout(this.hideTimer), this.hideTimer = null), this.slider.style.opacity = "1", this.slider.style.pointerEvents = "auto";
504
- });
505
- s(this, "scheduleHide", () => {
506
- this.hideTimer && clearTimeout(this.hideTimer), this.hideTimer = setTimeout(() => {
507
- this.hideTimer = null, this.slider.style.opacity = "0", this.slider.style.pointerEvents = "none";
508
- }, Ye);
509
- });
510
- s(this, "onWheel", (t) => {
511
- if (t.preventDefault(), this.adHooks.isAdActive()) {
512
- const r = this.adHooks.getVolume();
513
- this.adHooks.setVolume(Math.min(1, Math.max(0, r + (t.deltaY < 0 ? H : -H)))), this.render();
514
- return;
515
- }
516
- const e = this.video.muted ? 0 : this.video.volume, i = Math.min(1, Math.max(0, e + (t.deltaY < 0 ? H : -H)));
517
- this.video.volume = i, this.video.muted = i === 0;
518
- });
519
- s(this, "onToggleMute", () => {
520
- if (this.adHooks.isAdActive()) {
521
- this.adHooks.toggleMute(), this.render();
522
- return;
523
- }
524
- this.video.muted = !this.video.muted, !this.video.muted && this.video.volume === 0 && (this.video.volume = 0.5);
525
- });
526
- s(this, "onSliderPointerDown", (t) => {
527
- this.dragging = !0, this.slider.setPointerCapture(t.pointerId), this.setFromClientY(t.clientY), this.slider.addEventListener("pointermove", this.onSliderPointerMove), this.slider.addEventListener("pointerup", this.onSliderPointerUp);
528
- });
529
- s(this, "onSliderPointerMove", (t) => {
530
- this.dragging && this.setFromClientY(t.clientY);
531
- });
532
- s(this, "onSliderPointerUp", (t) => {
533
- this.dragging = !1, this.slider.releasePointerCapture(t.pointerId), this.slider.removeEventListener("pointermove", this.onSliderPointerMove), this.slider.removeEventListener("pointerup", this.onSliderPointerUp);
534
- });
535
- s(this, "onSliderKeyDown", (t) => {
536
- if (this.adHooks.isAdActive()) {
537
- if (t.key === "ArrowUp")
538
- this.adHooks.setVolume(Math.min(1, this.adHooks.getVolume() + 0.1)), t.preventDefault();
539
- else if (t.key === "ArrowDown")
540
- this.adHooks.setVolume(Math.max(0, this.adHooks.getVolume() - 0.1)), t.preventDefault();
541
- else
542
- return;
543
- this.render();
544
- return;
545
- }
546
- t.key === "ArrowUp" ? (this.video.volume = Math.min(1, this.video.volume + 0.1), this.video.muted = !1, t.preventDefault()) : t.key === "ArrowDown" && (this.video.volume = Math.max(0, this.video.volume - 0.1), t.preventDefault());
547
- });
548
- s(this, "render", () => {
549
- const t = this.adHooks.isAdActive() ? this.adHooks.getVolume() : this.video.muted ? 0 : this.video.volume;
550
- this.sliderFill.style.height = `${t * 100}%`, this.slider.setAttribute("aria-valuenow", String(Math.round(t * 100)));
551
- const e = t === 0 ? this.labels.unmute : this.labels.mute;
552
- this.button.setAttribute("aria-label", e);
553
- const i = this.adHooks.isAdActive() || !this.video.paused;
554
- this.unmuteBadge.toggleAttribute("data-visible", t === 0 && i), this.unmuteText.textContent = this.labels.unmute, t === 0 ? N(this.iconEl, "volume-muted") : t < 0.5 ? N(this.iconEl, "volume-low") : N(this.iconEl, "volume-high");
555
- });
556
- this.video = t, this.labels = e, this.adHooks = i, this.el = document.createElement("div"), this.el.className = "hp-volume hp:relative hp:flex hp:items-center", this.unmuteBadge = document.createElement("button"), this.unmuteBadge.type = "button", this.unmuteBadge.className = "hp-unmute-badge", this.unmuteBadge.setAttribute("part", "unmute-badge"), this.unmuteBadge.appendChild(M("volume-muted", "hp:text-base")), this.unmuteText = document.createElement("span"), this.unmuteText.textContent = e.unmute, this.unmuteBadge.appendChild(this.unmuteText), this.unmuteBadge.addEventListener("pointerdown", (o) => o.stopPropagation()), this.unmuteBadge.addEventListener("click", (o) => {
557
- o.stopPropagation(), this.unmute();
558
- }), this.button = document.createElement("button"), this.button.type = "button", this.button.setAttribute("part", "volume-button"), this.button.className = "hp-chip hp:flex hp:items-center hp:justify-center hp:w-[var(--hp-ctrl-btn-size)] hp:h-[var(--hp-ctrl-btn-size)] hp:cursor-pointer", this.button.setAttribute("aria-label", e.mute), this.button.dataset.shortcut = "M", this.iconEl = M("volume-high", "hp:text-[length:var(--hp-ctrl-icon-size)]"), this.button.appendChild(this.iconEl), this.el.appendChild(this.button), this.slider = document.createElement("div"), this.slider.setAttribute("part", "volume-slider"), this.slider.className = "hp-chip hp:absolute hp:bottom-full hp:left-1/2 hp-center-x hp:mb-2 hp:w-7 hp:h-20 hp:rounded-full hp:cursor-pointer hp:flex hp:items-end hp:justify-center hp:p-1.5 hp:pointer-events-none hp:transition-opacity hp:duration-150 hp:will-change-[opacity]", this.slider.style.opacity = "0", this.slider.style.borderRadius = "9999px", this.slider.setAttribute("role", "slider"), this.slider.setAttribute("tabindex", "0"), this.slider.setAttribute("aria-label", e.volume), this.slider.setAttribute("aria-orientation", "vertical"), this.slider.setAttribute("aria-valuemin", "0"), this.slider.setAttribute("aria-valuemax", "100");
559
- const r = document.createElement("div");
560
- r.className = "hp:relative hp:w-1.5 hp:h-full hp:rounded-full hp:bg-on-surface/25 hp:overflow-hidden", this.slider.appendChild(r), this.sliderFill = document.createElement("div"), this.sliderFill.className = "hp:absolute hp:inset-x-0 hp:bottom-0 hp:bg-accent", r.appendChild(this.sliderFill), this.el.appendChild(this.slider), this.button.addEventListener("click", this.onToggleMute), this.slider.addEventListener("pointerdown", this.onSliderPointerDown), this.slider.addEventListener("keydown", this.onSliderKeyDown), this.el.addEventListener("mouseenter", this.openNow), this.el.addEventListener("mouseleave", this.scheduleHide), this.el.addEventListener("focusin", this.openNow), this.el.addEventListener("focusout", this.scheduleHide), this.el.addEventListener("wheel", this.onWheel, { passive: !1 }), t.addEventListener("volumechange", this.render), t.addEventListener("play", this.render), t.addEventListener("pause", this.render), this.render();
561
- }
562
- /** "Sesi aç" rozeti: yalnızca AÇAR (toggle değil) — reklam sırasında reklamın sesini. */
563
- unmute() {
564
- if (this.adHooks.isAdActive()) {
565
- this.adHooks.getVolume() === 0 && this.adHooks.toggleMute(), this.render();
566
- return;
567
- }
568
- this.video.muted = !1, this.video.volume === 0 && (this.video.volume = 0.5);
569
- }
570
- /** Dikey çubukta: üst = tam ses (1), alt = sessiz (0) — Y ekseni ters çevrilir. */
571
- setFromClientY(t) {
572
- const e = this.slider.getBoundingClientRect(), i = e.height > 0 ? 1 - Math.min(1, Math.max(0, (t - e.top) / e.height)) : 0;
573
- if (this.adHooks.isAdActive()) {
574
- this.adHooks.setVolume(i), this.render();
575
- return;
576
- }
577
- this.video.volume = i, this.video.muted = i === 0;
578
- }
579
- refreshLabels() {
580
- this.slider.setAttribute("aria-label", this.labels.volume), this.render();
581
- }
582
- /** Reklam modu açılıp/kapanınca (`ControlBar.setAdMode`) görüntüyü hemen ad/içerik ses kaynağına göre tazeler — `volumechange` event'i beklemeden. */
583
- refreshForAdMode() {
584
- this.render();
585
- }
586
- destroy() {
587
- this.hideTimer && clearTimeout(this.hideTimer), this.el.removeEventListener("mouseenter", this.openNow), this.el.removeEventListener("mouseleave", this.scheduleHide), this.el.removeEventListener("focusin", this.openNow), this.el.removeEventListener("focusout", this.scheduleHide), this.el.removeEventListener("wheel", this.onWheel), this.video.removeEventListener("volumechange", this.render), this.video.removeEventListener("play", this.render), this.video.removeEventListener("pause", this.render), this.unmuteBadge.remove();
588
- }
589
- }
590
- const Ze = '<svg class="hp-lock" viewBox="0 0 24 24" width="14" height="14" aria-hidden="true"><path fill="currentColor" d="M12 2a5 5 0 0 0-5 5v3H6a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8a2 2 0 0 0-2-2h-1V7a5 5 0 0 0-5-5Zm-3 8V7a3 3 0 1 1 6 0v3H9Z"/></svg>', K = 8, B = 8, ne = 100, D = 256;
591
- function et(n) {
592
- return n.replace(/[&<>"']/g, (t) => `&#${t.charCodeAt(0)};`);
593
- }
594
- function tt(n, t) {
595
- if (!n || !t) return null;
596
- const e = Math.min(n, t), i = Math.max(n, t);
597
- return e >= 4e3 || i >= 7600 ? "8K" : e >= 2e3 || i >= 3800 ? "4K" : e >= 1400 || i >= 2500 ? "2K" : e >= 700 || i >= 1260 ? "HD" : String(it.reduce((r, o) => Math.abs(o - e) < Math.abs(r - e) ? o : r));
598
- }
599
- const it = [144, 240, 360, 480, 540, 576];
600
- class rt {
601
- constructor(t, e, i) {
602
- s(this, "el");
603
- s(this, "button");
604
- s(this, "badge");
605
- s(this, "quickSlot");
606
- /** Paneli en son açan hızlı erişim butonu — aynı butona tekrar basınca kapatmak için. */
607
- s(this, "quickOwner", null);
608
- s(this, "quickObserver");
609
- s(this, "badgeEnabled", !0);
610
- s(this, "panel");
611
- s(this, "video");
612
- s(this, "playbackRates");
613
- s(this, "labels");
614
- s(this, "qualities", []);
615
- s(this, "activeQualityLabel");
616
- s(this, "captions", []);
617
- s(this, "activeCaptionLabel");
618
- s(this, "captionAppearance", null);
619
- s(this, "qrResumeToggle", null);
620
- s(this, "open", !1);
621
- /** Menü açılıp kapanınca — HopePlayerElement açıkken kontrolleri otomatik gizlemez. */
622
- s(this, "onOpenChange", null);
623
- s(this, "panelObserver");
624
- s(this, "currentPanel", "main");
625
- s(this, "submenus", []);
626
- /** Eklenti aç / kapa satırları. */
627
- s(this, "toggles", /* @__PURE__ */ new Map());
628
- /**
629
- * Rozet gerçekten oynayan görüntüden okunur (`videoWidth` / `videoHeight`): menüde "Otomatik" seçiliyken de ABR'nin
630
- * o an indirdiği kaliteyi gösterir; MP4, hls.js ve Safari'nin kendi HLS oynatıcısında aynı çalışır. Dikey videoda
631
- * kısa kenar sayılır (1080×1920 → HD). Ses modu / görüntüsüz kaynakta rozet yok.
632
- */
633
- s(this, "updateBadge", () => {
634
- const t = this.badgeEnabled ? tt(this.video.videoWidth, this.video.videoHeight) : null;
635
- this.badge.textContent = t ?? "", this.badge.hidden = !t, t ? this.badge.setAttribute("data-quality", t) : this.badge.removeAttribute("data-quality"), this.badge.toggleAttribute("data-low", !!t && /^\d+$/.test(t));
636
- });
637
- /**
638
- * Yön + yükseklik player'a göre: kompakt düzende (buton üst bardaysa) aşağı açılır; her iki yönde de
639
- * yükseklik player içinde kalan alanla sınırlı — küçük player'da menü dışarı taşmaz, kendi içinde kayar.
640
- */
641
- s(this, "fitToPlayer", () => {
642
- var h;
643
- if (!this.open) return;
644
- const t = this.el.closest(".video-area");
645
- if (!t) return;
646
- if ((h = this.el.getRootNode().host) != null && h.hasAttribute("data-audio-compact")) {
647
- this.fitToViewport();
648
- return;
649
- }
650
- const e = t.getBoundingClientRect(), i = this.button.getBoundingClientRect(), r = this.el.getBoundingClientRect(), o = !!this.el.closest(".hp-top-bar");
651
- this.panel.toggleAttribute("data-drop", o), Object.assign(this.panel.style, { top: "", bottom: "", marginTop: "", marginBottom: "" });
652
- const a = this.panel.scrollHeight, l = (o ? e.bottom - i.bottom : i.top - e.top) - K - B;
653
- if (a <= l || l >= ne) {
654
- this.panel.style.maxHeight = `${Math.min(D, l)}px`;
655
- return;
656
- }
657
- this.panel.style.maxHeight = `${Math.min(D, e.height - 2 * B)}px`, o ? Object.assign(this.panel.style, { top: `${e.top + B - r.top}px`, marginTop: "0" }) : Object.assign(this.panel.style, { bottom: `${r.bottom - (e.bottom - B)}px`, marginBottom: "0" });
658
- });
659
- s(this, "onDocumentClick", (t) => {
660
- this.open && !t.composedPath().includes(this.el) && this.close();
661
- });
662
- /** İç içe alt menüde geri dönülecek üst menüler (en üstteki = açık olanın bir üstü). */
663
- s(this, "submenuStack", []);
664
- s(this, "backToCaptionSettings", () => {
665
- this.currentPanel = "captions-settings", this.renderCaptionSettings();
666
- });
667
- this.video = t, this.playbackRates = e, this.labels = i, this.activeQualityLabel = i.autoQuality, this.activeCaptionLabel = i.captionsOff, this.el = document.createElement("div"), this.el.className = "hp:relative", this.button = document.createElement("button"), this.button.type = "button", this.button.setAttribute("aria-label", i.settings), this.button.className = "hp-chip hp:flex hp:items-center hp:justify-center hp:w-[var(--hp-ctrl-btn-size)] hp:h-[var(--hp-ctrl-btn-size)] hp:cursor-pointer", this.button.appendChild(M("settings", "hp:text-[length:var(--hp-ctrl-icon-size)]")), this.badge = document.createElement("span"), this.badge.className = "hp-quality-badge", this.badge.setAttribute("part", "quality-badge"), this.badge.setAttribute("aria-hidden", "true"), this.badge.hidden = !0;
668
- for (const o of ["resize", "loadedmetadata", "emptied"]) t.addEventListener(o, this.updateBadge);
669
- this.panel = document.createElement("div"), this.panel.className = "hp-chip hp-chip-panel hp:hidden hp:absolute hp:bottom-full hp:right-0 hp:mb-2 hp:w-48 hp:max-h-64 hp:overflow-y-auto hp:text-sm hp:py-1", this.panelObserver = new MutationObserver(this.fitToPlayer), this.panelObserver.observe(this.panel, { childList: !0 });
670
- const r = document.createElement("span");
671
- r.className = "hp:relative hp:flex", r.appendChild(this.button), r.appendChild(this.badge), this.quickSlot = document.createElement("span"), this.quickSlot.className = "hp-quick-slot hp:flex hp:items-center hp:gap-1", this.quickSlot.hidden = !0, this.quickObserver = new MutationObserver(() => {
672
- this.quickSlot.hidden = this.quickSlot.childElementCount === 0, this.quickOwner && !this.quickOwner.isConnected && (this.quickOwner = null);
673
- }), this.quickObserver.observe(this.quickSlot, { childList: !0 }), this.el.className = "hp:relative hp:flex hp:items-center hp:gap-1", this.el.append(r, this.quickSlot, this.panel), this.button.addEventListener("click", (o) => {
674
- o.stopPropagation(), this.toggle();
675
- }), document.addEventListener("click", this.onDocumentClick, !0), this.renderMain();
676
- }
677
- /**
678
- * Ayarlar butonunun sağına hızlı erişim butonu ekler; `def` verilen alt menüyü doğrudan açar (aynı butona tekrar
679
- * basınca kapanır). `parents`: alt menüdeki "geri" satırının döneceği üst menüler. Kaldırmak için `btn.remove()`.
680
- */
681
- addQuickButton(t, e, i = () => []) {
682
- t.addEventListener("click", (r) => {
683
- r.stopPropagation();
684
- const o = e();
685
- if (this.open && this.currentPanel === `custom:${o.key}` && this.quickOwner === t) {
686
- this.close();
687
- return;
688
- }
689
- this.openSubmenu(o, i()), this.quickOwner = t;
690
- }), this.quickSlot.appendChild(t);
691
- }
692
- /** Menüyü doğrudan bir alt menüde açar (hızlı erişim butonları için). */
693
- openSubmenu(t, e = []) {
694
- var i;
695
- this.open || (this.open = !0, this.panel.classList.remove("hp:hidden"), (i = this.onOpenChange) == null || i.call(this, !0)), this.currentPanel = `custom:${t.key}`, this.renderSubmenu(t, e), this.fitToPlayer();
696
- }
697
- /**
698
- * `options.playbackRates` — menüdeki hızlar (sıralanır, tekrarlar atılır, geçersizler yok sayılır). Boş dizi: "Oynatma
699
- * hızı" satırı kalkar. Liste o anki hızı içermiyorsa ve 1 (normal) listedeyse hız 1'e döner — menüde seçili satır
700
- * olmayan bir hızda kalınmasın.
701
- */
702
- setPlaybackRates(t) {
703
- this.playbackRates = [...new Set(t.filter((e) => Number.isFinite(e) && e > 0 && e <= 16))].sort((e, i) => e - i), this.playbackRates.length && !this.playbackRates.includes(this.video.playbackRate) && this.playbackRates.includes(1) && (this.video.playbackRate = 1), this.open && (this.currentPanel === "main" || this.currentPanel === "speed") && this.renderMain();
704
- }
705
- /** `options.qualityBadge` — false ise rozet hiç gösterilmez. */
706
- setQualityBadgeEnabled(t) {
707
- this.badgeEnabled = t, this.updateBadge();
708
- }
709
- setQualities(t, e) {
710
- this.qualities = t, this.activeQualityLabel = e, (this.currentPanel === "main" || this.currentPanel === "quality") && this.render();
711
- }
712
- setCaptions(t, e) {
713
- this.captions = t, this.activeCaptionLabel = e, (this.currentPanel === "main" || this.currentPanel === "captions") && this.render();
714
- }
715
- /** Seçili altyazıyı dışarıdan günceller (ör. iOS native tam ekranda yapılan seçim) — seçenekler aynı kalır. */
716
- setActiveCaption(t) {
717
- this.activeCaptionLabel !== t && (this.activeCaptionLabel = t, (this.currentPanel === "main" || this.currentPanel === "captions") && this.render());
718
- }
719
- /** Altyazı AÇIKKEN "Altyazı" alt menüsüne eklenecek Boyut/Renk/Konum satırları — `null` kaldırır. */
720
- setCaptionAppearance(t) {
721
- this.captionAppearance = t, (this.currentPanel === "captions" || this.currentPanel === "captions-settings" || this.currentPanel === "captions-size" || this.currentPanel === "captions-bg" || this.currentPanel === "captions-text") && this.render();
722
- }
723
- /** Ana menüye tek aç/kapa satırı ekler (ör. QrResume). */
724
- setQrResumeToggle(t) {
725
- this.qrResumeToggle = t, this.currentPanel === "main" && this.renderMain();
726
- }
727
- /** Plugin'lerin (ör. dubbing) ana menüye kendi satır + alt menüsünü eklemesi için. */
728
- registerSubmenu(t) {
729
- this.submenus = this.submenus.filter((e) => e.key !== t.key), this.submenus.push(t), this.currentPanel === "main" && this.renderMain();
730
- }
731
- /** Aç / kapa satırı ekler (aynı anahtar yerine geçer). */
732
- registerToggle(t, e) {
733
- this.toggles.set(t, e), this.open && this.currentPanel === "main" && this.renderMain();
734
- }
735
- unregisterToggle(t) {
736
- this.toggles.delete(t) && this.open && this.currentPanel === "main" && this.renderMain();
737
- }
738
- unregisterSubmenu(t) {
739
- this.submenus = this.submenus.filter((e) => e.key !== t), this.currentPanel === "main" ? this.renderMain() : this.currentPanel === `custom:${t}` && this.renderMain();
740
- }
741
- toggle() {
742
- this.open ? this.close() : this.openMenu();
743
- }
744
- openMenu() {
745
- var t;
746
- this.open = !0, this.currentPanel = "main", this.panel.classList.remove("hp:hidden"), this.renderMain(), this.fitToPlayer(), (t = this.onOpenChange) == null || t.call(this, !0);
747
- }
748
- get isOpen() {
749
- return this.open;
750
- }
751
- /** Açıksa menü panelinin ekran dikdörtgeni (tooltip çakışma kontrolü için). */
752
- get panelRect() {
753
- return this.open ? this.panel.getBoundingClientRect() : null;
754
- }
755
- fitToViewport() {
756
- const t = this.button.getBoundingClientRect();
757
- Object.assign(this.panel.style, { top: "", bottom: "", marginTop: "", marginBottom: "" });
758
- const e = this.panel.scrollHeight, i = t.top - K - B, r = window.innerHeight - t.bottom - K - B, o = i < Math.min(e, D) && r > i;
759
- this.panel.toggleAttribute("data-drop", o), this.panel.style.maxHeight = `${Math.max(ne, Math.min(D, o ? r : i))}px`;
760
- }
761
- /** Düzen değişince (ör. kompakt ↔ normal) açık menüyü kapat — eski konumunda asılı kalmasın. */
762
- closeMenu() {
763
- this.open && this.close();
764
- }
765
- close() {
766
- var t;
767
- this.open = !1, this.quickOwner = null, this.panel.classList.add("hp:hidden"), (t = this.onOpenChange) == null || t.call(this, !1);
768
- }
769
- row(t, e, i) {
770
- const r = document.createElement("button");
771
- return r.type = "button", r.className = "hp:flex hp:items-center hp:justify-between hp:w-full hp:px-3 hp:py-2 hp:text-left hp:bg-transparent hp:border-0 hp:cursor-pointer hp:text-on-surface hp:hover:bg-on-surface/10", r.innerHTML = `<span>${t}</span><span class="hp:text-on-surface-muted hp:text-xs hp:flex hp:items-center hp:gap-1">${e}</span>`, r.addEventListener("click", i), r;
772
- }
773
- backRow(t, e) {
774
- const i = document.createElement("button");
775
- i.type = "button", i.className = "hp:flex hp:items-center hp:gap-2 hp:w-full hp:px-3 hp:py-2 hp:text-left hp:bg-transparent hp:border-0 hp:cursor-pointer hp:text-on-surface hp:font-medium hp:hover:bg-on-surface/10", i.appendChild(M("chevron-left", "hp:text-sm"));
776
- const r = document.createElement("span");
777
- return r.textContent = t, i.appendChild(r), i.addEventListener("click", e), i;
778
- }
779
- render() {
780
- if (this.currentPanel === "main") this.renderMain();
781
- else if (this.currentPanel === "speed") this.renderSpeed();
782
- else if (this.currentPanel === "quality") this.renderQuality();
783
- else if (this.currentPanel === "captions") this.renderCaptions();
784
- else if (this.currentPanel === "captions-settings") this.renderCaptionSettings();
785
- else if (this.currentPanel === "captions-size") this.renderCaptionsSize();
786
- else if (this.currentPanel === "captions-bg") this.renderCaptionColorPanel("bg");
787
- else if (this.currentPanel === "captions-text") this.renderCaptionColorPanel("text");
788
- else {
789
- const t = this.currentPanel.slice(7), e = this.submenus.find((i) => i.key === t);
790
- e ? this.renderSubmenu(e) : this.renderMain();
791
- }
792
- }
793
- renderMain() {
794
- this.currentPanel = "main", this.panel.innerHTML = "", this.playbackRates.length && this.panel.appendChild(
795
- this.row(this.labels.playbackSpeed, this.video.playbackRate === 1 ? this.labels.normal : `${this.video.playbackRate}x`, () => {
796
- this.currentPanel = "speed", this.renderSpeed();
797
- })
798
- ), this.qualities.length > 0 && this.panel.appendChild(
799
- this.row(this.labels.quality, this.activeQualityLabel, () => {
800
- this.currentPanel = "quality", this.renderQuality();
801
- })
802
- ), this.captions.length > 0 && this.panel.appendChild(
803
- this.row(this.labels.captions, this.activeCaptionLabel, () => {
804
- this.currentPanel = "captions", this.renderCaptions();
805
- })
806
- );
807
- for (const t of this.submenus)
808
- this.panel.appendChild(
809
- this.row(t.title, t.getValueLabel(), () => {
810
- this.currentPanel = `custom:${t.key}`, this.renderSubmenu(t);
811
- })
812
- );
813
- for (const t of this.toggles.values())
814
- this.panel.appendChild(
815
- this.row(t.label, t.getValueLabel(), () => {
816
- t.onToggle(), this.renderMain();
817
- })
818
- );
819
- if (this.qrResumeToggle) {
820
- const t = this.qrResumeToggle;
821
- this.panel.appendChild(
822
- this.row(t.label, t.getValueLabel(), () => {
823
- t.onToggle(), this.renderMain();
824
- })
825
- );
826
- }
827
- }
828
- renderSubmenu(t, e = []) {
829
- this.submenuStack = e, this.panel.innerHTML = "", this.panel.appendChild(
830
- this.backRow(t.title, () => {
831
- const i = e[e.length - 1];
832
- i ? this.renderSubmenu(i, e.slice(0, -1)) : this.renderMain();
833
- })
834
- );
835
- for (const i of t.getItems()) {
836
- const r = i.children ? '<i class="hp-icon hp-icon-chevron-left hp-chevron-forward"></i>' : i.active ? '<i class="hp-icon hp-icon-check"></i>' : "", o = this.row(i.label, i.value !== void 0 ? et(i.value) + (i.children ? r : "") : r, () => {
837
- if (i.children) {
838
- this.renderSubmenu(i.children(), [...e, t]);
839
- return;
840
- }
841
- i.onSelect(), i.keepOpen ? this.renderSubmenu(t, e) : this.close();
842
- });
843
- this.panel.appendChild(o);
844
- }
845
- }
846
- renderSpeed() {
847
- this.panel.innerHTML = "", this.panel.appendChild(this.backRow(this.labels.playbackSpeed, () => this.renderMain()));
848
- for (const t of this.playbackRates) {
849
- const e = this.video.playbackRate === t, i = this.row(t === 1 ? this.labels.normal : `${t}x`, e ? '<i class="hp-icon hp-icon-check"></i>' : "", () => {
850
- this.video.playbackRate = t, this.close();
851
- });
852
- this.panel.appendChild(i);
853
- }
854
- }
855
- renderQuality() {
856
- this.panel.innerHTML = "", this.panel.appendChild(this.backRow(this.labels.quality, () => this.renderMain()));
857
- for (const t of this.qualities) {
858
- const e = t.label === this.activeQualityLabel, i = this.row(t.label, t.locked ? Ze : e ? '<i class="hp-icon hp-icon-check"></i>' : "", () => {
859
- t.onSelect(), this.close();
860
- });
861
- t.locked && i.setAttribute("data-locked", ""), this.panel.appendChild(i);
862
- }
863
- }
864
- renderCaptions() {
865
- this.panel.innerHTML = "", this.panel.appendChild(this.backRow(this.labels.captions, () => this.renderMain()));
866
- for (const t of this.captions) {
867
- const e = t.label === this.activeCaptionLabel;
868
- this.panel.appendChild(
869
- this.row(t.label, e ? '<i class="hp-icon hp-icon-check"></i>' : "", () => {
870
- t.onSelect(), this.close();
871
- })
872
- );
873
- }
874
- if (this.captionAppearance && this.activeCaptionLabel !== this.labels.captionsOff) {
875
- const t = document.createElement("div");
876
- t.className = "hp:my-1 hp:border-t hp:border-on-surface/10", t.setAttribute("role", "separator"), this.panel.appendChild(t), this.panel.appendChild(
877
- this.row(this.labels.captionSettings, "", () => {
878
- this.currentPanel = "captions-settings", this.renderCaptionSettings();
879
- })
880
- );
881
- }
882
- }
883
- /** Altyazı → Altyazı ayarları: boyut, arka plan / yazı rengi, konumu sıfırla — her satırda o anki değer. */
884
- renderCaptionSettings() {
885
- var i, r, o;
886
- this.panel.innerHTML = "", this.panel.appendChild(
887
- this.backRow(this.labels.captionSettings, () => {
888
- this.currentPanel = "captions", this.renderCaptions();
889
- })
890
- );
891
- const t = this.captionAppearance;
892
- if (!t) return;
893
- const e = (a) => a ? `<span class="hp:inline-block hp:w-3 hp:h-3 hp:rounded-full hp:border hp:border-on-surface/30" style="background:${a}"></span>` : "";
894
- this.panel.appendChild(
895
- this.row(t.sizeLabel, ((i = t.getSizeOptions().find((a) => a.active)) == null ? void 0 : i.label) ?? "", () => {
896
- this.currentPanel = "captions-size", this.renderCaptionsSize();
897
- })
898
- ), this.panel.appendChild(
899
- this.row(t.bgColorLabel, e((r = t.getBgColorOptions().find((a) => a.active)) == null ? void 0 : r.value), () => {
900
- this.currentPanel = "captions-bg", this.renderCaptionColorPanel("bg");
901
- })
902
- ), this.panel.appendChild(
903
- this.row(t.textColorLabel, e((o = t.getTextColorOptions().find((a) => a.active)) == null ? void 0 : o.value), () => {
904
- this.currentPanel = "captions-text", this.renderCaptionColorPanel("text");
905
- })
906
- ), this.panel.appendChild(
907
- this.row(t.resetPositionLabel, "", () => {
908
- t.onResetPosition(), this.close();
909
- })
910
- );
911
- }
912
- renderCaptionsSize() {
913
- this.panel.innerHTML = "";
914
- const t = this.captionAppearance;
915
- if (this.panel.appendChild(this.backRow((t == null ? void 0 : t.sizeLabel) ?? this.labels.captionSize, this.backToCaptionSettings)), !!t)
916
- for (const e of t.getSizeOptions())
917
- this.panel.appendChild(
918
- this.row(e.label, e.active ? '<i class="hp-icon hp-icon-check"></i>' : "", () => {
919
- e.onSelect(), this.close();
920
- })
921
- );
922
- }
923
- /** "Arka Plan Rengi" / "Yazı Rengi" — düz metin satırları yerine renkli swatch grid'i (YouTube'un kendi altyazı renk seçici deseni). */
924
- renderCaptionColorPanel(t) {
925
- this.panel.innerHTML = "";
926
- const e = this.captionAppearance, i = t === "bg" ? (e == null ? void 0 : e.bgColorLabel) ?? this.labels.captionBgColor : (e == null ? void 0 : e.textColorLabel) ?? this.labels.captionTextColor;
927
- if (this.panel.appendChild(this.backRow(i, this.backToCaptionSettings)), !e) return;
928
- const r = document.createElement("div");
929
- r.className = "hp:flex hp:flex-wrap hp:gap-2 hp:px-3 hp:py-2";
930
- const o = t === "bg" ? e.getBgColorOptions() : e.getTextColorOptions();
931
- for (const a of o) {
932
- const l = document.createElement("button");
933
- l.type = "button", l.setAttribute("aria-label", a.ariaLabel), l.className = "hp:w-7 hp:h-7 hp:rounded-full hp:cursor-pointer hp:flex-shrink-0 hp:border hp:border-on-surface/20", l.style.background = a.value, l.style.outline = a.active ? "2px solid currentColor" : "2px solid transparent", l.style.outlineOffset = "2px", l.addEventListener("click", () => {
934
- a.onSelect(), this.render();
935
- }), r.appendChild(l);
936
- }
937
- this.panel.appendChild(r);
938
- }
939
- /** Dil sonradan değişince statik buton etiketini tazeler + mevcut panel zaten güncel `this.labels`'ı okuyarak yeniden render edilir. */
940
- refreshLabels() {
941
- this.button.setAttribute("aria-label", this.labels.settings), this.render();
942
- }
943
- destroy() {
944
- document.removeEventListener("click", this.onDocumentClick, !0);
945
- for (const t of ["resize", "loadedmetadata", "emptied"]) this.video.removeEventListener(t, this.updateBadge);
946
- this.panelObserver.disconnect(), this.quickObserver.disconnect();
947
- }
948
- }
949
- const st = 480, ot = 150, le = ["waiting", "seeking"], he = ["playing", "canplay", "canplaythrough", "seeked", "pause", "error", "emptied"];
950
- function pe(n, t) {
951
- const { btn: e } = F("", `skip-${n}`);
952
- e.classList.add("hp-skip-btn"), e.setAttribute("part", t);
953
- const i = document.createElement("span");
954
- return i.className = "hp-skip-num", i.setAttribute("aria-hidden", "true"), e.appendChild(i), e.style.display = "none", { btn: e, num: i };
955
- }
956
- function R(n, t) {
957
- n.setAttribute("aria-label", t);
958
- }
959
- function F(n, t, e) {
960
- const i = document.createElement("button");
961
- i.type = "button", R(i, n), e && (i.dataset.shortcut = e), i.className = "hp-chip hp:flex hp:items-center hp:justify-center hp:w-[var(--hp-ctrl-btn-size)] hp:h-[var(--hp-ctrl-btn-size)] hp:cursor-pointer hp:shrink-0";
962
- const r = M(t, "hp:text-[length:var(--hp-ctrl-icon-size)]");
963
- return i.appendChild(r), { btn: i, icon: r };
964
- }
965
- class at {
966
- constructor(t, e, i, r) {
967
- s(this, "el");
968
- s(this, "seekBar");
969
- s(this, "volumePanel");
970
- s(this, "settingsMenu");
971
- s(this, "video");
972
- s(this, "labels");
973
- s(this, "playButton");
974
- s(this, "playIcon");
975
- s(this, "pipButton");
976
- s(this, "skipBack");
977
- s(this, "skipForward");
978
- /** Etkin sarma süreleri (sn); null = buton gizli. */
979
- s(this, "skipSeconds", { back: null, forward: null });
980
- s(this, "seekingEnabled", !0);
981
- s(this, "leftGroup");
982
- s(this, "loadingTimer", null);
983
- /** Halkayı açık tutan sebepler: 'media' (buffer bekleniyor) ve player'ın verdikleri (ör. 'preroll'). */
984
- s(this, "loadingReasons", /* @__PURE__ */ new Set());
985
- /** Preroll beklenirken video duraklatılmış olsa da kullanıcı oynatmak istedi — buton "duraklat" görünür. */
986
- s(this, "pendingPlay", !1);
987
- /** Sarma butonuyla sarıldığında (sn, negatif = geri) — sarma bildirimi için. */
988
- s(this, "onSkip", null);
989
- s(this, "fullscreenButton");
990
- s(this, "fullscreenIcon");
991
- s(this, "timeLabel");
992
- /** Reklam sırasında süre etiketinin yerinde: "Reklam 2/3 · 0:12". */
993
- s(this, "adInfoEl");
994
- s(this, "showRemaining", !1);
995
- /** Kompakt düzende (player < 480px) sağ grubun taşındığı üst bar; tam ekran altta kalır. */
996
- s(this, "topEl");
997
- s(this, "bottomRow");
998
- s(this, "rightGroup");
999
- s(this, "fullscreenSlot");
1000
- s(this, "compact", !1);
1001
- /** İnce ses çubuğu (audio.layout: 'compact'): dar ekranda da tek satır — üst bar yok. */
1002
- s(this, "forceInline", !1);
1003
- /** İnce ses çubuğunda başlık / sanatçı (+ çalarken ekolayzır) — boşluk elemanının içinde. */
1004
- s(this, "barMetaEl", null);
1005
- s(this, "spacerEl");
1006
- s(this, "resizeObserver");
1007
- s(this, "liveBadge");
1008
- s(this, "liveText");
1009
- s(this, "adMode", !1);
1010
- s(this, "hideLiveSeekBar", !1);
1011
- /** Ses modu: tam ekran / PiP yok — dar düzende tam ekran kutusu da boş kalmasın. */
1012
- s(this, "audioMode", !1);
1013
- s(this, "showPipButton", !0);
1014
- s(this, "showFullscreenButton", !0);
1015
- s(this, "callbacks");
1016
- s(this, "row");
1017
- s(this, "extraButtonAnchor");
1018
- /** Süre etiketine tıklama: geçen süre ↔ kalan süre. */
1019
- s(this, "onTimeClick", (t) => {
1020
- t.stopPropagation(), this.toggleTimeMode();
1021
- });
1022
- s(this, "renderPlayState", () => {
1023
- var e;
1024
- const t = this.callbacks.isAdActive() ? this.callbacks.adIsPaused() : this.video.paused && !this.pendingPlay;
1025
- N(this.playIcon, t ? "play" : "pause"), R(this.playButton, t ? this.labels.play : this.labels.pause), (e = this.barMetaEl) == null || e.toggleAttribute("data-playing", !t && !this.callbacks.isAdActive());
1026
- });
1027
- s(this, "renderTime", () => {
1028
- var r, o;
1029
- const t = this.video.duration === 1 / 0;
1030
- if (this.applySeekBarVisibility(), this.timeLabel.style.display = this.adMode || t ? "none" : "", this.liveBadge.style.display = !this.adMode && t ? "" : "none", !t) {
1031
- const a = this.video.duration, l = this.video.currentTime;
1032
- if (this.showRemaining) {
1033
- const h = Number.isFinite(a) ? Math.floor(a) : 0, g = Math.max(0, h - Math.floor(l));
1034
- this.timeLabel.textContent = `-${P(g)} / ${P(a)}`;
1035
- } else
1036
- this.timeLabel.textContent = `${P(l)} / ${P(a)}`;
1037
- return;
1038
- }
1039
- const e = ((o = (r = this.callbacks).liveSyncPosition) == null ? void 0 : o.call(r)) ?? this.liveEdge(), i = e !== null && e - this.video.currentTime > Be;
1040
- this.liveBadge.toggleAttribute("data-behind", i);
1041
- });
1042
- /** Buffer bekleniyor (oynarken takılma ya da buffer'lanmamış bir yere atlama). */
1043
- s(this, "onLoadingStart", (t) => {
1044
- t.type === "seeking" && this.video.readyState >= HTMLMediaElement.HAVE_FUTURE_DATA || this.loadingTimer || this.loadingReasons.has("media") || (this.loadingTimer = setTimeout(() => {
1045
- this.loadingTimer = null, this.setLoading("media", !0);
1046
- }, ot));
1047
- });
1048
- s(this, "onLoadingEnd", (t) => {
1049
- t.type === "seeked" && this.video.readyState < HTMLMediaElement.HAVE_FUTURE_DATA && !this.video.paused || (this.loadingTimer && clearTimeout(this.loadingTimer), this.loadingTimer = null, this.setLoading("media", !1));
1050
- });
1051
- s(this, "goToLive", () => {
1052
- var i, r;
1053
- const t = (r = (i = this.callbacks).liveSyncPosition) == null ? void 0 : r.call(i), e = this.liveEdge();
1054
- e === null && t == null || (this.video.currentTime = t ?? Math.max(0, e - 1), this.video.paused && this.video.play().catch(() => {
1055
- }), this.renderTime());
1056
- });
1057
- this.video = t, this.callbacks = i, this.labels = r, this.el = document.createElement("div"), this.el.setAttribute("part", "control-bar"), this.el.className = "hp:absolute hp:inset-x-0 hp:bottom-0 hp:flex hp:flex-col hp:gap-1 hp:px-3 hp:pb-2 hp:pt-6 hp:pointer-events-none hp:transition-opacity hp:duration-200", this.seekBar = new Xe(t, r), this.seekBar.el.classList.add("hp:pointer-events-auto"), this.seekBar.liveTarget = () => {
1058
- var v, y;
1059
- return ((y = (v = this.callbacks).liveSyncPosition) == null ? void 0 : y.call(v)) ?? null;
1060
- }, this.el.appendChild(this.seekBar.el);
1061
- const o = document.createElement("div");
1062
- o.className = "hp:flex hp:items-center hp:gap-2", this.el.appendChild(o), this.bottomRow = o;
1063
- const a = document.createElement("div");
1064
- a.className = "hp-group hp-group-left hp:flex hp:items-center hp:gap-1 hp:px-1.5 hp:py-1 hp:shrink-0 hp:pointer-events-auto", o.appendChild(a), this.leftGroup = a;
1065
- const l = document.createElement("span");
1066
- l.className = "hp-loading-ring", l.setAttribute("aria-hidden", "true");
1067
- const h = document.createElement("span");
1068
- h.className = "hp-loading-ring-mask", h.appendChild(document.createElement("span")), l.appendChild(h), a.appendChild(l);
1069
- const g = F(r.play, "play", "K");
1070
- this.playButton = g.btn, this.playIcon = g.icon, this.playButton.setAttribute("part", "play-pause-button"), this.playButton.addEventListener("click", () => this.togglePlay()), a.appendChild(this.playButton), this.skipBack = pe("back", "skip-back-button"), this.skipBack.btn.addEventListener("click", () => this.skip(-(this.skipSeconds.back ?? 0))), this.skipForward = pe("forward", "skip-forward-button"), this.skipForward.btn.addEventListener("click", () => this.skip(this.skipSeconds.forward ?? 0)), a.append(this.skipBack.btn, this.skipForward.btn), this.volumePanel = new Je(t, r, i.adVolume), a.appendChild(this.volumePanel.el), this.timeLabel = document.createElement("button"), this.timeLabel.type = "button", this.timeLabel.setAttribute("part", "time-display"), this.timeLabel.className = "hp:text-xs hp:text-on-surface hp:tabular-nums hp:whitespace-nowrap hp:px-1 hp:bg-transparent hp:border-0 hp:cursor-pointer hp:select-none hp:p-0 hp:hover:opacity-80 hp:transition-opacity hp:rounded", this.timeLabel.textContent = "0:00 / 0:00", this.timeLabel.addEventListener("click", this.onTimeClick), a.appendChild(this.timeLabel), this.adInfoEl = document.createElement("span"), this.adInfoEl.setAttribute("part", "ad-countdown"), this.adInfoEl.className = "hp:text-xs hp:text-on-surface hp:tabular-nums hp:whitespace-nowrap hp:px-1 hp:select-none", this.adInfoEl.setAttribute("aria-live", "off"), this.adInfoEl.style.display = "none", this.liveBadge = document.createElement("button"), this.liveBadge.type = "button", this.liveBadge.className = "hp-live-badge", this.liveBadge.setAttribute("part", "live-badge"), this.liveBadge.setAttribute("aria-label", r.goToLive);
1071
- const c = document.createElement("span");
1072
- c.className = "hp-live-dot", this.liveText = document.createElement("span"), this.liveText.textContent = r.live, this.liveBadge.append(c, this.liveText), this.liveBadge.style.display = "none", this.liveBadge.addEventListener("click", this.goToLive), a.appendChild(this.liveBadge), a.appendChild(this.adInfoEl);
1073
- const d = document.createElement("div");
1074
- d.className = "hp:flex-1 hp:min-w-0", o.appendChild(d), this.spacerEl = d;
1075
- const m = document.createElement("div");
1076
- m.className = "hp-group hp:flex hp:items-center hp:gap-1 hp:px-1.5 hp:py-1 hp:shrink-0 hp:pointer-events-auto", o.appendChild(m), this.rightGroup = m, this.settingsMenu = new rt(t, e, r), m.appendChild(this.settingsMenu.el), this.extraButtonAnchor = this.settingsMenu.el, this.row = m;
1077
- const f = F(r.pip, "pip");
1078
- this.pipButton = f.btn, this.pipButton.addEventListener("click", () => this.togglePip()), m.appendChild(this.pipButton);
1079
- const x = F(r.fullscreenEnter, "fullscreen-enter", "F");
1080
- this.fullscreenButton = x.btn, this.fullscreenIcon = x.icon, this.fullscreenButton.addEventListener("click", () => this.toggleFullscreen()), m.appendChild(this.fullscreenButton), document.pictureInPictureEnabled || (this.pipButton.style.display = "none"), this.topEl = document.createElement("div"), this.topEl.className = "hp-top-bar", this.topEl.setAttribute("part", "top-bar"), this.fullscreenSlot = document.createElement("div"), this.fullscreenSlot.className = "hp-group hp:items-center hp:px-1.5 hp:py-1 hp:shrink-0 hp:pointer-events-auto", this.fullscreenSlot.style.display = "none", o.appendChild(this.fullscreenSlot), this.resizeObserver = new ResizeObserver(() => this.updateLayout()), this.resizeObserver.observe(this.el), t.addEventListener("play", this.renderPlayState), t.addEventListener("pause", this.renderPlayState), t.addEventListener("timeupdate", this.renderTime), t.addEventListener("loadedmetadata", this.renderTime), t.addEventListener("durationchange", this.renderTime), t.addEventListener("progress", this.renderTime), t.addEventListener("emptied", this.renderTime);
1081
- for (const v of le) t.addEventListener(v, this.onLoadingStart);
1082
- for (const v of he) t.addEventListener(v, this.onLoadingEnd);
1083
- this.renderPlayState(), this.renderTime();
1084
- }
1085
- /** Player genişliğine göre normal / kompakt (mobil) düzen arasında geçiş — yalnızca eşik geçilince DOM taşınır. */
1086
- updateLayout() {
1087
- var i;
1088
- const t = this.el.getBoundingClientRect().width;
1089
- if (t === 0) return;
1090
- const e = !this.forceInline && t < st;
1091
- e !== this.compact && (this.compact = e, this.settingsMenu.closeMenu(), this.el.toggleAttribute("data-compact", e), (i = this.el.closest(".video-area")) == null || i.toggleAttribute("data-compact", e), e ? (this.fullscreenSlot.appendChild(this.fullscreenButton), this.applyButtonVisibility(), this.topEl.appendChild(this.rightGroup)) : (this.rightGroup.appendChild(this.fullscreenButton), this.bottomRow.insertBefore(this.rightGroup, this.fullscreenSlot), this.fullscreenSlot.style.display = "none"));
1092
- }
1093
- /**
1094
- * İnce ses çubuğu: başlık / sanatçı kontrol satırının ortasında; dar ekranda da kompakt (üst bar) düzene geçilmez.
1095
- * `null` kaldırır.
1096
- */
1097
- setAudioBar(t) {
1098
- var e;
1099
- if (this.forceInline = !!t, t) {
1100
- if (!this.barMetaEl) {
1101
- const i = document.createElement("div");
1102
- i.className = "hp-bar-meta", i.setAttribute("part", "audio-bar-meta"), i.innerHTML = '<span class="hp-bar-eq" aria-hidden="true"><i></i><i></i><i></i></span><span class="hp-bar-text"><span class="hp-bar-title"></span><span class="hp-bar-sub"></span></span>', this.spacerEl.appendChild(i), this.barMetaEl = i;
1103
- }
1104
- this.barMetaEl.querySelector(".hp-bar-title").textContent = t.title, this.barMetaEl.querySelector(".hp-bar-sub").textContent = t.subtitle, this.barMetaEl.toggleAttribute("data-empty", !t.title && !t.subtitle);
1105
- } else
1106
- (e = this.barMetaEl) == null || e.remove(), this.barMetaEl = null;
1107
- this.renderPlayState(), this.updateLayout();
1108
- }
1109
- /** Ses modu: görüntü olmadığı için tam ekran ve PiP butonları gizlenir. */
1110
- setAudioMode(t) {
1111
- this.audioMode = t, this.applyButtonVisibility();
1112
- }
1113
- /** `options.pipButton` / `options.fullscreenButton` — false ise buton gösterilmez. */
1114
- setButtonsVisible({ pip: t, fullscreen: e }) {
1115
- this.showPipButton = t, this.showFullscreenButton = e, this.applyButtonVisibility();
1116
- }
1117
- /**
1118
- * Tam ekran ve PiP butonlarının görünürlüğü tek yerden: seçenek, ses modu (görüntü yok), reklam modu, tarayıcı
1119
- * desteği (PiP) ve kompakt düzende tam ekranın ayrı yuvası — hepsi birlikte değerlendirilir, biri diğerini açmasın.
1120
- */
1121
- applyButtonVisibility() {
1122
- const t = this.showFullscreenButton && !this.audioMode;
1123
- this.fullscreenButton.style.display = t ? "" : "none", this.compact && (this.fullscreenSlot.style.display = t && !this.adMode ? "flex" : "none"), this.pipButton.style.display = this.showPipButton && !this.audioMode && document.pictureInPictureEnabled ? "" : "none";
1124
- }
1125
- setFullscreenState(t) {
1126
- N(this.fullscreenIcon, t ? "fullscreen-exit" : "fullscreen-enter"), R(this.fullscreenButton, t ? this.labels.fullscreenExit : this.labels.fullscreenEnter);
1127
- }
1128
- /** Dil sonradan değişince (`options.locale`/`labels`) statik (reaktif olarak yeniden render edilmeyen) etiketleri tazeler. */
1129
- /** Geri/ileri sarma butonları — `null` süre o butonu gizler. */
1130
- setSkipButtons(t, e) {
1131
- this.skipSeconds = { back: t, forward: e }, this.renderSkipButtons();
1132
- }
1133
- /** DAI reklam arasında seek kapalıyken sarma butonları da devre dışı. */
1134
- setSeekingEnabled(t) {
1135
- this.seekingEnabled = t, this.skipBack.btn.disabled = !t, this.skipForward.btn.disabled = !t;
1136
- }
1137
- renderSkipButtons() {
1138
- const t = (e, i, r) => {
1139
- e.btn.style.display = i === null || this.adMode ? "none" : "", i !== null && (e.num.textContent = String(i), e.num.toggleAttribute("data-long", String(i).length > 2), R(e.btn, r(i)));
1140
- };
1141
- t(this.skipBack, this.skipSeconds.back, this.labels.skipBack), t(this.skipForward, this.skipSeconds.forward, this.labels.skipForward);
1142
- }
1143
- skip(t) {
1144
- var e;
1145
- !t || !this.seekingEnabled || (Me(this.video, t), (e = this.onSkip) == null || e.call(this, t));
1146
- }
1147
- refreshLabels() {
1148
- this.renderPlayState(), this.renderSkipButtons(), R(this.pipButton, this.labels.pip), R(this.liveBadge, this.labels.goToLive), this.liveText.textContent = this.labels.live, this.setFullscreenState(this.callbacks.isFullscreen()), this.seekBar.refreshLabels(), this.volumePanel.refreshLabels(), this.settingsMenu.refreshLabels();
1149
- }
1150
- /** Reklam modu: seek bar, süre ve sağ grup gizlenir; oynat/duraklat + ses kalır. */
1151
- setAdMode(t) {
1152
- const e = t ? "none" : "";
1153
- this.adMode = t, this.renderSkipButtons(), this.applySeekBarVisibility(), this.row.style.display = e, this.applyButtonVisibility(), this.renderTime(), t || this.setAdInfo(null), this.renderPlayState(), this.volumePanel.refreshForAdMode();
1154
- }
1155
- /**
1156
- * Reklam geri sayımı + pod göstergesi ("Reklam 2/3 · 0:12"). `null` → gizle. Pod tek reklamsa yalnızca "Reklam · 0:12";
1157
- * kalan süre bilinmiyorsa (bazı VPAID reklamları) yalnızca etiket.
1158
- */
1159
- setAdInfo(t) {
1160
- if (!t || !this.adMode) {
1161
- this.adInfoEl.style.display = "none", this.adInfoEl.textContent = "";
1162
- return;
1163
- }
1164
- const e = t.total > 1 ? ` ${t.position}/${t.total}` : "", i = t.remaining >= 0 ? ` · ${P(Math.ceil(t.remaining))}` : "";
1165
- this.adInfoEl.textContent = `${this.labels.adLabel}${e}${i}`, this.adInfoEl.style.display = "";
1166
- }
1167
- /** `AdsController`'ın IMA'nın KENDİ UI'ı üzerinden (ör. reklam video'suna tıklama) gelen PAUSED/RESUMED event'leri için — oynat/duraklat ikonunu tazeler. */
1168
- refreshAdPlayState() {
1169
- this.renderPlayState();
1170
- }
1171
- setQualities(t, e) {
1172
- this.settingsMenu.setQualities(t, e);
1173
- }
1174
- setCaptions(t, e) {
1175
- this.settingsMenu.setCaptions(t, e);
1176
- }
1177
- /** Plugin'lerin (loop-section vb.) kontrol çubuğuna kendi butonlarını eklemesi için — ayarlar menüsünden önce yerleştirilir. */
1178
- addButton(t, e, i) {
1179
- const { btn: r, icon: o } = F(t, e);
1180
- return r.addEventListener("click", i), this.row.insertBefore(r, this.extraButtonAnchor), { btn: r, icon: o };
1181
- }
1182
- toggleTimeMode() {
1183
- this.showRemaining = !this.showRemaining, this.renderTime();
1184
- }
1185
- setShowRemaining(t) {
1186
- this.showRemaining !== t && (this.showRemaining = t, this.renderTime());
1187
- }
1188
- getShowRemaining() {
1189
- return this.showRemaining;
1190
- }
1191
- /** Eklenti butonu: sol grubun sonu ya da ayarlardan önce. */
1192
- addPluginButton(t, e) {
1193
- e === "left" ? this.leftGroup.appendChild(t) : this.row.insertBefore(t, this.extraButtonAnchor);
1194
- }
1195
- /** Plugin'lerin (live-wall-clock vb.) kontrol çubuğuna buton olmayan bir element (ör. saat göstergesi) eklemesi için. */
1196
- addElement(t) {
1197
- this.row.insertBefore(t, this.extraButtonAnchor);
1198
- }
1199
- togglePlay() {
1200
- var t, e;
1201
- if ((e = (t = this.callbacks).interceptTogglePlay) != null && e.call(t)) {
1202
- this.renderPlayState();
1203
- return;
1204
- }
1205
- if (this.callbacks.isAdActive()) {
1206
- this.callbacks.adTogglePlay(), this.renderPlayState();
1207
- return;
1208
- }
1209
- this.video.paused ? this.video.play() : this.video.pause();
1210
- }
1211
- async togglePip() {
1212
- try {
1213
- document.pictureInPictureElement ? await document.exitPictureInPicture() : await this.video.requestPictureInPicture();
1214
- } catch {
1215
- }
1216
- }
1217
- toggleFullscreen() {
1218
- this.callbacks.isFullscreen() ? this.callbacks.onExitFullscreen() : this.callbacks.onRequestFullscreen();
1219
- }
1220
- /** Preroll beklemesi: video duraklatılmış ama oynatma istendi — buton "duraklat" görünsün. */
1221
- setPendingPlay(t) {
1222
- this.pendingPlay = t, this.renderPlayState();
1223
- }
1224
- /** Player'ın kendi bekleme durumları (ör. 'preroll') için yükleme halkası — medya takılmasından bağımsız. */
1225
- setLoading(t, e) {
1226
- e ? this.loadingReasons.add(t) : this.loadingReasons.delete(t), this.renderLoading();
1227
- }
1228
- get isLoading() {
1229
- return this.loadingReasons.size > 0;
1230
- }
1231
- renderLoading() {
1232
- var e, i;
1233
- const t = this.loadingReasons.size > 0;
1234
- t !== this.leftGroup.hasAttribute("data-loading") && (this.leftGroup.toggleAttribute("data-loading", t), (i = (e = this.callbacks).onLoadingChange) == null || i.call(e, t));
1235
- }
1236
- /** Canlı uç (media-time) — seekable sonu; native HLS'te DVR'sız canlıda seekable boş kalabildiği için buffered sonu (bkz. LiveWallClock.isLive notu). */
1237
- liveEdge() {
1238
- const { seekable: t, buffered: e } = this.video;
1239
- return t.length ? t.end(t.length - 1) : e.length ? e.end(e.length - 1) : null;
1240
- }
1241
- /** `options.liveSeekBar: false` — canlı yayında ilerleme çubuğu gizlenir. */
1242
- setLiveSeekBar(t) {
1243
- this.hideLiveSeekBar = !t, this.applySeekBarVisibility();
1244
- }
1245
- /** Reklamda ve (istenirse) canlı yayında seek bar gizli. */
1246
- applySeekBarVisibility() {
1247
- const t = this.adMode || this.hideLiveSeekBar && this.video.duration === 1 / 0;
1248
- this.seekBar.el.style.display = t ? "none" : "";
1249
- }
1250
- destroy() {
1251
- this.timeLabel.removeEventListener("click", this.onTimeClick), this.video.removeEventListener("play", this.renderPlayState), this.video.removeEventListener("pause", this.renderPlayState), this.video.removeEventListener("timeupdate", this.renderTime), this.video.removeEventListener("loadedmetadata", this.renderTime), this.video.removeEventListener("durationchange", this.renderTime), this.video.removeEventListener("progress", this.renderTime), this.video.removeEventListener("emptied", this.renderTime);
1252
- for (const t of le) this.video.removeEventListener(t, this.onLoadingStart);
1253
- for (const t of he) this.video.removeEventListener(t, this.onLoadingEnd);
1254
- this.loadingTimer && clearTimeout(this.loadingTimer), this.resizeObserver.disconnect(), this.topEl.remove(), this.seekBar.destroy(), this.settingsMenu.destroy();
1255
- }
1256
- }
1257
- const nt = 450, lt = 60, de = 8, j = 6, ht = /* @__PURE__ */ new Set(["seek-bar", "time-display"]);
1258
- function pt() {
1259
- return typeof window.matchMedia != "function" || window.matchMedia("(hover: hover)").matches;
1260
- }
1261
- class dt {
1262
- constructor(t) {
1263
- s(this, "el");
1264
- s(this, "labelEl");
1265
- s(this, "keyEl");
1266
- s(this, "showTimer", null);
1267
- s(this, "hideTimer", null);
1268
- s(this, "currentTarget", null);
1269
- s(this, "isOccluded", null);
1270
- /** Gösterim gecikmesi (SHOW_DELAY_MS) içinde bekleyen hedef — `currentTarget` yalnızca gerçekten gösterilince set ediliyor. */
1271
- s(this, "pendingTarget", null);
1272
- s(this, "onMouseOver", (t) => {
1273
- const e = this.matchTarget(t.target);
1274
- !e || e === this.currentTarget || this.scheduleShow(e);
1275
- });
1276
- s(this, "onMouseOut", (t) => {
1277
- const e = this.matchTarget(t.target);
1278
- if (!e || e !== this.currentTarget && e !== this.pendingTarget) return;
1279
- const i = t.relatedTarget;
1280
- i && e.contains(i) || this.scheduleHide();
1281
- });
1282
- s(this, "onFocusIn", (t) => {
1283
- const e = this.matchTarget(t.target);
1284
- e && this.show(e);
1285
- });
1286
- s(this, "onFocusOut", (t) => {
1287
- const e = this.matchTarget(t.target);
1288
- !e || e !== this.currentTarget || this.hideNow();
1289
- });
1290
- s(this, "hideNow", () => {
1291
- this.showTimer && (clearTimeout(this.showTimer), this.showTimer = null), this.pendingTarget = null, this.hideTimer && (clearTimeout(this.hideTimer), this.hideTimer = null), this.currentTarget && (this.currentTarget = null, this.el.style.opacity = "0", this.el.style.visibility = "hidden");
1292
- });
1293
- this.mountEl = t, this.el = document.createElement("div"), this.el.setAttribute("part", "tooltip"), this.el.setAttribute("role", "tooltip"), this.el.className = "hp-tooltip hp:absolute hp:z-40 hp:flex hp:items-center hp:gap-1.5 hp:px-2 hp:py-1 hp:rounded hp:text-xs hp:whitespace-nowrap hp:pointer-events-none hp:opacity-0 hp:transition-opacity hp:duration-100", this.el.style.visibility = "hidden", this.labelEl = document.createElement("span"), this.el.appendChild(this.labelEl), this.keyEl = document.createElement("span"), this.keyEl.className = "hp-tooltip-key", this.el.appendChild(this.keyEl), t.appendChild(this.el), t.addEventListener("mouseover", this.onMouseOver), t.addEventListener("mouseout", this.onMouseOut), t.addEventListener("focusin", this.onFocusIn), t.addEventListener("focusout", this.onFocusOut), t.addEventListener("pointerdown", this.hideNow);
1294
- }
1295
- destroy() {
1296
- this.showTimer && clearTimeout(this.showTimer), this.hideTimer && clearTimeout(this.hideTimer), this.mountEl.removeEventListener("mouseover", this.onMouseOver), this.mountEl.removeEventListener("mouseout", this.onMouseOut), this.mountEl.removeEventListener("focusin", this.onFocusIn), this.mountEl.removeEventListener("focusout", this.onFocusOut), this.mountEl.removeEventListener("pointerdown", this.hideNow), this.el.remove();
1297
- }
1298
- /**
1299
- * Tooltip'i örten bir katman (ör. açık ayarlar menüsü) varsa çakışan tooltip gösterilmez — menü kontrol katmanının
1300
- * (z-20) içinde olduğundan tooltip'i z-index ile menünün altına almak mümkün değil.
1301
- */
1302
- setOcclusionCheck(t) {
1303
- this.isOccluded = t, this.recheckOcclusion();
1304
- }
1305
- /** Örten katman açıldı/kapandı — görünen tooltip artık çakışıyorsa gizle. */
1306
- recheckOcclusion() {
1307
- var t;
1308
- this.currentTarget && this.el.style.visibility === "visible" && ((t = this.isOccluded) != null && t.call(this, this.el.getBoundingClientRect())) && this.hideNow();
1309
- }
1310
- matchTarget(t) {
1311
- var o;
1312
- const e = t, i = (o = e == null ? void 0 : e.closest) == null ? void 0 : o.call(e, 'button[aria-label], [role="slider"][aria-label]');
1313
- if (!i) return null;
1314
- const r = i.getAttribute("part");
1315
- return r && ht.has(r) || i.offsetParent === null && i !== document.activeElement ? null : i;
1316
- }
1317
- scheduleShow(t) {
1318
- this.hideTimer && (clearTimeout(this.hideTimer), this.hideTimer = null), this.showTimer && clearTimeout(this.showTimer), this.pendingTarget = t, this.showTimer = setTimeout(() => {
1319
- this.showTimer = null, this.pendingTarget = null, this.show(t);
1320
- }, nt);
1321
- }
1322
- scheduleHide() {
1323
- this.showTimer && (clearTimeout(this.showTimer), this.showTimer = null), this.pendingTarget = null, this.hideTimer && clearTimeout(this.hideTimer), this.hideTimer = setTimeout(() => this.hideNow(), lt);
1324
- }
1325
- show(t) {
1326
- if (!pt()) return;
1327
- const e = t.getAttribute("aria-label");
1328
- if (!e) return;
1329
- this.currentTarget = t, this.labelEl.textContent = e;
1330
- const i = t.dataset.shortcut;
1331
- i ? (this.keyEl.textContent = i, this.keyEl.style.display = "") : (this.keyEl.textContent = "", this.keyEl.style.display = "none"), this.el.style.visibility = "hidden", this.el.style.opacity = "0", this.el.style.left = "0px", this.el.style.top = "0px", requestAnimationFrame(() => {
1332
- var r;
1333
- this.currentTarget === t && (this.position(t), !((r = this.isOccluded) != null && r.call(this, this.el.getBoundingClientRect())) && (this.el.style.visibility = "visible", this.el.style.opacity = "1"));
1334
- });
1335
- }
1336
- position(t) {
1337
- const e = this.mountEl.getBoundingClientRect(), i = t.getBoundingClientRect(), r = this.el.getBoundingClientRect();
1338
- let o = i.top - e.top - r.height - de;
1339
- o < j && (o = i.bottom - e.top + de);
1340
- let a = i.left - e.left + i.width / 2 - r.width / 2;
1341
- const l = e.width - r.width - j;
1342
- a = Math.max(j, Math.min(a, l)), this.el.style.top = `${o}px`, this.el.style.left = `${a}px`;
1343
- }
1344
- }
1345
- class ct {
1346
- constructor(t, e, i) {
1347
- s(this, "host");
1348
- s(this, "video");
1349
- s(this, "toggleFullscreen");
1350
- /** ←/→ ve J/L ile sarma süresi (sn) — options.keyboardSeekStep. */
1351
- s(this, "seekStep", 5);
1352
- /** Klavyeyle sarıldığında (sn, negatif = geri) — sarma bildirimi için. */
1353
- s(this, "onSeek", null);
1354
- /** Space/K'den önce sorulur — true dönerse işlenmiştir (ör. preroll beklemesini iptal). */
1355
- s(this, "interceptTogglePlay", null);
1356
- s(this, "onKeyDown", (t) => {
1357
- var r, o, a;
1358
- if (t.defaultPrevented) return;
1359
- const e = t.composedPath()[0];
1360
- if ((t.key === " " || t.key === "Enter") && e instanceof HTMLButtonElement) return;
1361
- const i = this.video.duration;
1362
- switch (t.key) {
1363
- case " ":
1364
- case "k":
1365
- if ((r = this.interceptTogglePlay) != null && r.call(this)) {
1366
- t.preventDefault();
1367
- break;
1368
- }
1369
- this.video.paused ? this.video.play() : this.video.pause(), t.preventDefault();
1370
- break;
1371
- case "ArrowRight":
1372
- case "l":
1373
- Number.isFinite(i) && (this.video.currentTime = _(this.video, Math.min(i, this.video.currentTime + this.seekStep)), (o = this.onSeek) == null || o.call(this, this.seekStep)), t.preventDefault();
1374
- break;
1375
- case "ArrowLeft":
1376
- case "j":
1377
- this.video.currentTime = Math.max(0, this.video.currentTime - this.seekStep), (a = this.onSeek) == null || a.call(this, -this.seekStep), t.preventDefault();
1378
- break;
1379
- case "ArrowUp":
1380
- this.video.volume = Math.min(1, this.video.volume + 0.1), this.video.muted = !1, t.preventDefault();
1381
- break;
1382
- case "ArrowDown":
1383
- this.video.volume = Math.max(0, this.video.volume - 0.1), t.preventDefault();
1384
- break;
1385
- case "m":
1386
- this.video.muted = !this.video.muted, t.preventDefault();
1387
- break;
1388
- case "f":
1389
- this.toggleFullscreen(), t.preventDefault();
1390
- break;
1391
- }
1392
- });
1393
- this.host = t, this.video = e, this.toggleFullscreen = i, this.host.addEventListener("keydown", this.onKeyDown);
1394
- }
1395
- destroy() {
1396
- this.host.removeEventListener("keydown", this.onKeyDown);
1397
- }
1398
- }
1399
- class ut {
1400
- constructor(t) {
1401
- s(this, "el");
1402
- s(this, "video");
1403
- s(this, "show", () => this.el.classList.remove("hp:hidden"));
1404
- s(this, "hide", () => this.el.classList.add("hp:hidden"));
1405
- this.video = t, this.el = document.createElement("div"), this.el.className = "hp-loading-spinner hp:absolute hp:inset-0 hp:flex hp:items-center hp:justify-center hp:pointer-events-none hp:hidden", this.el.innerHTML = '<div class="hp:w-10 hp:h-10 hp:border-[3px] hp:border-on-surface/30 hp:border-t-accent hp:rounded-full hp:animate-spin"></div>', t.addEventListener("waiting", this.show), t.addEventListener("playing", this.hide), t.addEventListener("canplay", this.hide), t.addEventListener("pause", this.hide);
1406
- }
1407
- destroy() {
1408
- this.video.removeEventListener("waiting", this.show), this.video.removeEventListener("playing", this.hide), this.video.removeEventListener("canplay", this.hide), this.video.removeEventListener("pause", this.hide);
1409
- }
1410
- }
1411
- const gt = '<svg viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M20 11a8 8 0 1 0-2.3 5.7"/><path d="M20 4v7h-7"/></svg>';
1412
- class mt {
1413
- constructor(t, e) {
1414
- s(this, "el");
1415
- s(this, "video");
1416
- s(this, "labels");
1417
- s(this, "messageEl");
1418
- s(this, "codeEl");
1419
- s(this, "retryBtn");
1420
- s(this, "retryText");
1421
- s(this, "onRetry", null);
1422
- /** Ekran gerçekten açıldı (hp:error için) — kurtarılan hatalarda (yedek kaynak, native → hls.js) çağrılmaz. */
1423
- s(this, "onShown", null);
1424
- s(this, "shouldShow", () => !0);
1425
- /** showStreamError ile açılan hatanın kodu (video.error yokken). */
1426
- s(this, "streamErrorCode", 0);
1427
- s(this, "show", () => {
1428
- !this.video.getAttribute("src") && !this.video.querySelector("source") || Z(this.video.error) || this.shouldShow() && this.open();
1429
- });
1430
- this.video = t, this.labels = e, this.el = document.createElement("div"), this.el.setAttribute("part", "error-screen"), this.el.setAttribute("role", "alert"), this.el.className = "hp-error-screen";
1431
- const i = document.createElement("div");
1432
- i.className = "hp-error-card";
1433
- const r = document.createElement("div");
1434
- r.className = "hp-error-icon", r.appendChild(M("warning")), i.appendChild(r), this.messageEl = document.createElement("p"), this.messageEl.className = "hp-error-message", i.appendChild(this.messageEl), this.codeEl = document.createElement("p"), this.codeEl.className = "hp-error-code", i.appendChild(this.codeEl), this.retryBtn = document.createElement("button"), this.retryBtn.type = "button", this.retryBtn.className = "hp-error-retry", this.retryBtn.innerHTML = gt, this.retryText = document.createElement("span"), this.retryText.textContent = e.retry, this.retryBtn.appendChild(this.retryText), this.retryBtn.addEventListener("click", () => {
1435
- var o;
1436
- this.dismiss(), (o = this.onRetry) == null || o.call(this);
1437
- }), i.appendChild(this.retryBtn), this.el.appendChild(i), t.addEventListener("error", this.show);
1438
- }
1439
- setOnRetry(t) {
1440
- this.onRetry = t;
1441
- }
1442
- setOnShown(t) {
1443
- this.onShown = t;
1444
- }
1445
- open() {
1446
- var e, i;
1447
- const t = this.visible;
1448
- this.render(), this.el.setAttribute("data-visible", ""), t || (i = this.onShown) == null || i.call(this, { code: ((e = this.video.error) == null ? void 0 : e.code) ?? this.streamErrorCode, message: this.messageEl.textContent ?? "" });
1449
- }
1450
- /** false dönerse hata gösterilmez (ör. SourceManager native HLS'ten hls.js'e geçerken). */
1451
- setShouldShow(t) {
1452
- this.shouldShow = t;
1453
- }
1454
- /**
1455
- * hls.js'in ölümcül hataları `video.error` üretmez — player donmuş görünmesin diye ekran elle açılır.
1456
- * `code`: MediaError kodu (2 = ağ, 3 = çözümleme).
1457
- */
1458
- showStreamError(t) {
1459
- this.shouldShow() && (this.streamErrorCode = t, this.open());
1460
- }
1461
- /** Yeni kaynak yüklenirken önceki hatayı kapat. */
1462
- dismiss() {
1463
- this.streamErrorCode = 0, this.hide();
1464
- }
1465
- get visible() {
1466
- return this.el.hasAttribute("data-visible");
1467
- }
1468
- refreshLabels() {
1469
- this.retryText.textContent = this.labels.retry, this.visible && this.render();
1470
- }
1471
- render() {
1472
- var i;
1473
- const t = ((i = this.video.error) == null ? void 0 : i.code) ?? this.streamErrorCode, e = {
1474
- 1: this.labels.errorAborted,
1475
- 2: this.labels.errorNetwork,
1476
- 3: this.labels.errorDecode,
1477
- 4: this.labels.errorSrcNotSupported
1478
- };
1479
- this.messageEl.textContent = e[t] ?? this.labels.errorGeneric, this.codeEl.textContent = t ? `${this.labels.errorCode} ${t}` : "", this.codeEl.style.display = t ? "" : "none";
1480
- }
1481
- hide() {
1482
- this.el.removeAttribute("data-visible");
1483
- }
1484
- destroy() {
1485
- this.video.removeEventListener("error", this.show);
1486
- }
1487
- }
1488
- const W = /* @__PURE__ */ new WeakMap(), Re = /* @__PURE__ */ new WeakSet(), U = /* @__PURE__ */ new WeakMap();
1489
- function ft(n) {
1490
- return Re.has(n);
1491
- }
1492
- function ze(n, t, e, i, r) {
1493
- let o = W.get(n);
1494
- o || W.set(n, o = /* @__PURE__ */ new Map());
1495
- const a = `${t}\0${e}\0${i}\0${r}`;
1496
- let l = o.get(a);
1497
- return l || (l = n.addTextTrack(e, i, r), Re.add(l), o.set(a, l)), l;
1498
- }
1499
- function Oe(n, t) {
1500
- for (const [e, i] of W.get(n) ?? [])
1501
- if (e.startsWith(`${t}\0`)) {
1502
- i.mode = "hidden";
1503
- for (const r of Array.from(i.cues ?? [])) i.removeCue(r);
1504
- i.mode = "disabled";
1505
- }
1506
- }
1507
- function bt(n, t) {
1508
- Fe(n);
1509
- const e = U.get(n), i = [];
1510
- for (const r of t) {
1511
- const o = ze(n, "options", "subtitles", r.label, r.srclang);
1512
- o.mode = r.default ? "hidden" : "disabled", i.push({ label: r.label, track: o }), yt(n, o, r.src, e);
1513
- }
1514
- return i;
1515
- }
1516
- function Fe(n) {
1517
- U.set(n, (U.get(n) ?? 0) + 1), Oe(n, "options");
1518
- }
1519
- function vt(n, t) {
1520
- let e = null;
1521
- for (const { label: i, track: r } of n) {
1522
- const o = i === t;
1523
- r.mode = o ? "hidden" : "disabled", o && (e = r);
1524
- }
1525
- return e;
1526
- }
1527
- async function yt(n, t, e, i) {
1528
- let r;
1529
- try {
1530
- const o = await fetch(e);
1531
- if (!o.ok) throw new Error(`HTTP ${o.status}`);
1532
- r = await o.text();
1533
- } catch (o) {
1534
- console.warn("[HopePlayer] altyazı yüklenemedi:", e, o), n.dispatchEvent(new CustomEvent("hp-internal:subtitle-error", { detail: { src: e, message: String(o) } }));
1535
- return;
1536
- }
1537
- if (!(U.get(n) !== i || typeof VTTCue != "function"))
1538
- for (const o of kt(r)) {
1539
- const a = new VTTCue(o.start, o.end, o.text);
1540
- wt(a, o.settings), t.addCue(a);
1541
- }
1542
- }
1543
- const ce = "(?:\\d+:)?\\d{1,2}:\\d{2}(?:[.,]\\d{1,3})?", xt = new RegExp(`^(${ce})\\s+-->\\s+(${ce})(.*)$`);
1544
- function ue(n) {
1545
- return n.replace(",", ".").split(":").reduce((t, e) => t * 60 + Number(e), 0);
1546
- }
1547
- function kt(n) {
1548
- const t = [], e = n.replace(/^/, "").replace(/\r\n?/g, `
1549
- `).split(/\n{2,}/);
1550
- for (const i of e) {
1551
- const r = i.split(`
1552
- `), o = r.findIndex((h) => h.includes("-->"));
1553
- if (o < 0) continue;
1554
- const a = xt.exec(r[o].trim());
1555
- if (!a) continue;
1556
- const l = r.slice(o + 1).join(`
1557
- `);
1558
- l.trim() && t.push({ start: ue(a[1]), end: ue(a[2]), settings: a[3].trim(), text: l });
1559
- }
1560
- return t;
1561
- }
1562
- function wt(n, t) {
1563
- for (const e of t.split(/\s+/)) {
1564
- const [i, r] = e.split(":");
1565
- if (!i || !r) continue;
1566
- const [o] = r.split(",");
1567
- try {
1568
- i === "align" ? n.align = o : i === "vertical" ? n.vertical = o : i === "size" ? n.size = parseFloat(o) : i === "position" ? n.position = parseFloat(o) : i === "line" && (n.snapToLines = !o.endsWith("%"), n.line = parseFloat(o));
1569
- } catch {
1570
- }
1571
- }
1572
- }
1573
- const q = 6, Et = 20, Ct = 14, St = 6, Tt = 10, At = 3, Ne = "hope-caption-row", Ie = "hope-caption-font-size", ge = "hope-caption-bg-color", me = "hope-caption-text-color", Lt = {
1574
- small: 0.78,
1575
- normal: 1,
1576
- large: 1.35
1577
- }, fe = [
1578
- "rgba(0, 0, 0, 0.75)",
1579
- "rgba(0, 0, 0, 0)",
1580
- "rgba(255, 255, 255, 0.85)",
1581
- "rgba(183, 28, 28, 0.8)",
1582
- "rgba(13, 71, 161, 0.8)",
1583
- "rgba(27, 94, 32, 0.8)"
1584
- ], be = ["#ffffff", "#000000", "#ffeb3b", "#ff5252", "#18ffff", "#69f0ae"];
1585
- function Pt() {
1586
- try {
1587
- const n = window.localStorage.getItem(Ne), t = n === null ? 0 : Number(n);
1588
- return Number.isFinite(t) && t >= 0 && t < q ? t : 0;
1589
- } catch {
1590
- return 0;
1591
- }
1592
- }
1593
- function Mt() {
1594
- try {
1595
- const n = window.localStorage.getItem(Ie);
1596
- return n === "small" || n === "normal" || n === "large" ? n : "normal";
1597
- } catch {
1598
- return "normal";
1599
- }
1600
- }
1601
- function ve(n, t) {
1602
- const e = t[0] ?? "";
1603
- try {
1604
- const i = window.localStorage.getItem(n);
1605
- return i !== null && t.includes(i) ? i : e;
1606
- } catch {
1607
- return e;
1608
- }
1609
- }
1610
- class I {
1611
- constructor(t, e, i, r) {
1612
- s(this, "layerEl");
1613
- s(this, "bubbleEl");
1614
- s(this, "videoArea");
1615
- s(this, "seekBarEl");
1616
- s(this, "labels");
1617
- s(this, "activeTrack", null);
1618
- s(this, "fontSize", Mt());
1619
- s(this, "bgColor", ve(ge, fe));
1620
- s(this, "textColor", ve(me, be));
1621
- s(this, "rowIndex", Pt());
1622
- s(this, "dragging", !1);
1623
- /** Kontrol çubuğu görünür mü — görünürken altyazı seek bar'ın üstünde, değilken en altta. */
1624
- s(this, "chromeVisible", !0);
1625
- s(this, "dragStartClientY", 0);
1626
- s(this, "dragStartBottomPx", 0);
1627
- s(this, "dragMoved", !1);
1628
- s(this, "rafId", null);
1629
- s(this, "pendingDeltaPx", 0);
1630
- s(this, "resizeObserver");
1631
- s(this, "onCueChange", () => {
1632
- var e;
1633
- const t = (e = this.activeTrack) == null ? void 0 : e.activeCues;
1634
- if (!this.activeTrack || !t || t.length === 0) {
1635
- this.bubbleEl.classList.remove("hp-caption-visible"), this.bubbleEl.textContent = "";
1636
- return;
1637
- }
1638
- this.bubbleEl.textContent = "";
1639
- for (let i = 0; i < t.length; i++) {
1640
- i > 0 && this.bubbleEl.appendChild(document.createElement("br"));
1641
- const r = t[i];
1642
- typeof r.getCueAsHTML == "function" ? this.bubbleEl.appendChild(r.getCueAsHTML()) : this.bubbleEl.appendChild(document.createTextNode(r.text ?? ""));
1643
- }
1644
- this.bubbleEl.classList.add("hp-caption-visible");
1645
- });
1646
- s(this, "onPointerDown", (t) => {
1647
- t.button !== 0 && t.pointerType === "mouse" || (t.preventDefault(), this.dragging = !0, this.dragMoved = !1, this.dragStartClientY = t.clientY, this.dragStartBottomPx = this.pxForRow(this.rowIndex), this.bubbleEl.setPointerCapture(t.pointerId), this.bubbleEl.classList.add("hp-caption-dragging"), this.bubbleEl.addEventListener("pointermove", this.onPointerMove), this.bubbleEl.addEventListener("pointerup", this.onPointerUp), this.bubbleEl.addEventListener("pointercancel", this.onPointerUp));
1648
- });
1649
- s(this, "onPointerMove", (t) => {
1650
- this.dragging && (this.pendingDeltaPx = t.clientY - this.dragStartClientY, Math.abs(this.pendingDeltaPx) > At && (this.dragMoved = !0), this.rafId === null && (this.rafId = requestAnimationFrame(this.applyPendingDrag)));
1651
- });
1652
- s(this, "applyPendingDrag", () => {
1653
- if (this.rafId = null, !this.dragging) return;
1654
- const { min: t, max: e } = this.bounds(), i = Math.min(e, Math.max(t, this.dragStartBottomPx - this.pendingDeltaPx)), r = this.dragStartBottomPx - i;
1655
- this.bubbleEl.style.transform = `translateX(-50%) translateY(${r}px)`;
1656
- });
1657
- s(this, "onPointerUp", (t) => {
1658
- if (!this.dragging || (this.dragging = !1, this.bubbleEl.releasePointerCapture(t.pointerId), this.bubbleEl.removeEventListener("pointermove", this.onPointerMove), this.bubbleEl.removeEventListener("pointerup", this.onPointerUp), this.bubbleEl.removeEventListener("pointercancel", this.onPointerUp), this.rafId !== null && (cancelAnimationFrame(this.rafId), this.rafId = null), this.bubbleEl.classList.remove("hp-caption-dragging"), !this.dragMoved)) return;
1659
- const { min: e, max: i } = this.bounds(), r = Math.min(i, Math.max(e, this.dragStartBottomPx - this.pendingDeltaPx)), o = i > e ? (r - e) / (i - e) : 0, a = Math.round(o * (q - 1));
1660
- this.setRowIndex(a, !0);
1661
- });
1662
- this.videoArea = e, this.seekBarEl = i, this.labels = r, this.layerEl = document.createElement("div"), this.layerEl.className = "hp-caption-layer", this.layerEl.setAttribute("part", "caption-layer"), this.bubbleEl = document.createElement("div"), this.bubbleEl.className = "hp-caption-bubble", this.bubbleEl.setAttribute("part", "caption-bubble"), this.bubbleEl.setAttribute("role", "note"), this.bubbleEl.setAttribute("aria-label", r.captionDragHandle), this.bubbleEl.tabIndex = -1, this.applyFontSizeVar(), this.bubbleEl.style.setProperty("--hp-caption-bg", this.bgColor), this.bubbleEl.style.setProperty("--hp-caption-text", this.textColor), this.layerEl.appendChild(this.bubbleEl), this.bubbleEl.addEventListener("pointerdown", this.onPointerDown), this.resizeObserver = new ResizeObserver(() => this.recomputePosition()), this.resizeObserver.observe(this.videoArea), this.recomputePosition();
1663
- }
1664
- /** `applyOptions()`'tan — hangi track aktif (ya da null = kapalı). */
1665
- setActiveTrack(t) {
1666
- this.activeTrack && this.activeTrack.removeEventListener("cuechange", this.onCueChange), this.activeTrack = t, this.activeTrack && this.activeTrack.addEventListener("cuechange", this.onCueChange), this.onCueChange();
1667
- }
1668
- getFontSize() {
1669
- return this.fontSize;
1670
- }
1671
- setFontSize(t) {
1672
- this.fontSize = t, this.applyFontSizeVar(), this.recomputePosition();
1673
- try {
1674
- window.localStorage.setItem(Ie, t);
1675
- } catch {
1676
- }
1677
- }
1678
- getBgColor() {
1679
- return this.bgColor;
1680
- }
1681
- setBgColor(t) {
1682
- this.bgColor = t, this.bubbleEl.style.setProperty("--hp-caption-bg", t);
1683
- try {
1684
- window.localStorage.setItem(ge, t);
1685
- } catch {
1686
- }
1687
- }
1688
- getTextColor() {
1689
- return this.textColor;
1690
- }
1691
- setTextColor(t) {
1692
- this.textColor = t, this.bubbleEl.style.setProperty("--hp-caption-text", t);
1693
- try {
1694
- window.localStorage.setItem(me, t);
1695
- } catch {
1696
- }
1697
- }
1698
- /** Ayarlar menüsündeki "Konumu sıfırla". */
1699
- resetPosition() {
1700
- this.setRowIndex(0, !0);
1701
- }
1702
- /** Dil sonradan değişince aria-label'ı tazeler. */
1703
- refreshLabels(t) {
1704
- this.labels = t, this.bubbleEl.setAttribute("aria-label", t.captionDragHandle);
1705
- }
1706
- applyFontSizeVar() {
1707
- this.bubbleEl.style.setProperty("--hp-caption-size-multiplier", String(Lt[this.fontSize]));
1708
- }
1709
- bounds() {
1710
- const t = this.videoArea.getBoundingClientRect(), e = this.seekBarEl.getBoundingClientRect(), r = (this.bubbleEl.getBoundingClientRect().height || 32) + Et, o = Math.max(Tt, Math.round(t.height * 0.04)), a = this.chromeVisible && e.height > 0 ? Math.max(0, Math.round(t.bottom - e.top + (this.videoArea.hasAttribute("data-compact") ? St : Ct))) : o, l = Math.max(a, Math.round(t.height - r));
1711
- return { min: a, max: l };
1712
- }
1713
- pxForRow(t) {
1714
- const { min: e, max: i } = this.bounds(), r = t / (q - 1);
1715
- return Math.round(e + r * (i - e));
1716
- }
1717
- /**
1718
- * Balonun EKRANDA şu an durduğu konum (bottom, px): yazılı `bottom` + o anki transform'un dikey kayması.
1719
- * Sürükleme her karede bir kez çiziliyor — hızlı fırlatmada son hareket çizilmeden bırakılınca, son fare konumundan
1720
- * başlayan animasyon balonu önce oraya ışınlıyordu (zıplama). Süren bir kayma animasyonunun ortası da böyle okunur.
1721
- */
1722
- visualBottomPx() {
1723
- const t = parseFloat(this.bubbleEl.style.bottom || "0");
1724
- try {
1725
- const e = getComputedStyle(this.bubbleEl).transform;
1726
- return !e || e === "none" ? t : t - new DOMMatrixReadOnly(e).m42;
1727
- } catch {
1728
- return t;
1729
- }
1730
- }
1731
- /** FLIP: bottom anında yazılır, yalnızca transform animasyonlanır — bottom'u animasyonlamak bırakınca zıplatıyordu. */
1732
- setRowIndex(t, e) {
1733
- this.rowIndex = Math.min(q - 1, Math.max(0, t));
1734
- const i = this.pxForRow(this.rowIndex), r = this.visualBottomPx();
1735
- e && Math.abs(r - i) > 0.5 ? (this.bubbleEl.classList.add("hp-caption-no-transition"), this.bubbleEl.style.bottom = `${i}px`, this.bubbleEl.style.transform = `translateX(-50%) translateY(${i - r}px)`, this.bubbleEl.offsetHeight, this.bubbleEl.classList.remove("hp-caption-no-transition"), this.bubbleEl.style.transform = "translateX(-50%)") : (this.bubbleEl.classList.add("hp-caption-no-transition"), this.bubbleEl.style.transform = "translateX(-50%)", this.bubbleEl.style.bottom = `${i}px`, this.bubbleEl.offsetHeight, this.bubbleEl.classList.remove("hp-caption-no-transition"));
1736
- try {
1737
- window.localStorage.setItem(Ne, String(this.rowIndex));
1738
- } catch {
1739
- }
1740
- }
1741
- /** Boyut değişimi (ör. fullscreen'e giriş) sonrası AYNI satıra, YENİ sınırlara göre yeniden konumlan — animasyonsuz (boyut değişimi anlık olmalı). */
1742
- /** HopePlayerElement.setChromeOpacity'den — kontroller açılıp kapanınca balon yumuşakça yukarı/aşağı kayar (satır korunur). */
1743
- setChromeVisible(t) {
1744
- t !== this.chromeVisible && (this.chromeVisible = t, this.dragging || this.setRowIndex(this.rowIndex, !0));
1745
- }
1746
- recomputePosition() {
1747
- this.dragging || this.setRowIndex(this.rowIndex, !1);
1748
- }
1749
- destroy() {
1750
- this.activeTrack && this.activeTrack.removeEventListener("cuechange", this.onCueChange), this.resizeObserver.disconnect(), this.rafId !== null && cancelAnimationFrame(this.rafId), this.bubbleEl.removeEventListener("pointerdown", this.onPointerDown);
1751
- }
1752
- }
1753
- s(I, "BG_COLOR_PRESETS", fe), s(I, "TEXT_COLOR_PRESETS", be);
1754
- class Bt {
1755
- constructor(t) {
1756
- s(this, "el");
1757
- s(this, "bufferedEl");
1758
- s(this, "playedEl");
1759
- s(this, "visible", !1);
1760
- s(this, "rafId", null);
1761
- s(this, "sync", () => {
1762
- this.render(), this.visible && !this.video.paused ? this.start() : this.stop();
1763
- });
1764
- s(this, "render", () => {
1765
- const t = this.video.duration, e = Number.isFinite(t) && t > 0;
1766
- if (this.el.toggleAttribute("data-disabled", !e), !this.visible || !e) return;
1767
- this.playedEl.style.transform = `scaleX(${Math.min(1, this.video.currentTime / t)})`;
1768
- const { buffered: i } = this.video;
1769
- let r = 0;
1770
- for (let o = 0; o < i.length; o++)
1771
- i.start(o) <= this.video.currentTime && (r = Math.max(r, i.end(o)));
1772
- this.bufferedEl.style.transform = `scaleX(${Math.min(1, r / t)})`;
1773
- });
1774
- this.video = t, this.el = document.createElement("div"), this.el.className = "hp-mini-progress", this.el.setAttribute("part", "mini-progress"), this.el.setAttribute("aria-hidden", "true"), this.bufferedEl = document.createElement("div"), this.bufferedEl.className = "hp-mini-progress-fill hp-mini-progress-buffered", this.playedEl = document.createElement("div"), this.playedEl.className = "hp-mini-progress-fill hp-mini-progress-played", this.el.append(this.bufferedEl, this.playedEl), t.addEventListener("play", this.sync), t.addEventListener("pause", this.sync), t.addEventListener("timeupdate", this.render), t.addEventListener("progress", this.render), t.addEventListener("durationchange", this.render);
1775
- }
1776
- setVisible(t) {
1777
- t !== this.visible && (this.visible = t, this.el.toggleAttribute("data-visible", t), this.sync());
1778
- }
1779
- destroy() {
1780
- this.stop(), this.video.removeEventListener("play", this.sync), this.video.removeEventListener("pause", this.sync), this.video.removeEventListener("timeupdate", this.render), this.video.removeEventListener("progress", this.render), this.video.removeEventListener("durationchange", this.render), this.el.remove();
1781
- }
1782
- start() {
1783
- if (this.rafId !== null) return;
1784
- const t = () => {
1785
- this.render(), this.rafId = requestAnimationFrame(t);
1786
- };
1787
- this.rafId = requestAnimationFrame(t);
1788
- }
1789
- stop() {
1790
- this.rafId !== null && cancelAnimationFrame(this.rafId), this.rafId = null;
1791
- }
1792
- }
1793
- const Rt = 1e3, zt = 800, Ot = '<svg viewBox="0 0 24 24" aria-hidden="true"><path d="M9.3 5.3a1.2 1.2 0 0 1 1.7 0l5.8 5.8a1.2 1.2 0 0 1 0 1.8l-5.8 5.8a1.2 1.2 0 0 1-1.7-1.7l4.9-5-4.9-5a1.2 1.2 0 0 1 0-1.7z"/></svg>';
1794
- class Ft {
1795
- constructor(t) {
1796
- s(this, "el");
1797
- s(this, "valueEl");
1798
- s(this, "unitEl");
1799
- s(this, "liveEl");
1800
- s(this, "total", 0);
1801
- s(this, "lastAt", 0);
1802
- s(this, "hideTimer", null);
1803
- this.labels = t, this.el = document.createElement("div"), this.el.className = "hp-seek-fb", this.el.setAttribute("part", "seek-feedback");
1804
- const e = document.createElement("span");
1805
- e.className = "hp-seek-fb-chevrons", e.innerHTML = Ot.repeat(3);
1806
- const i = document.createElement("span");
1807
- i.className = "hp-seek-fb-value", this.valueEl = document.createElement("span"), this.valueEl.className = "hp-seek-fb-num", this.unitEl = document.createElement("span"), this.unitEl.className = "hp-seek-fb-unit", i.append(this.valueEl, this.unitEl), this.liveEl = document.createElement("span"), this.liveEl.className = "hp-sr-only", this.liveEl.setAttribute("aria-live", "polite"), this.el.append(e, i, this.liveEl);
1808
- }
1809
- /** `delta` saniye sarıldı (negatif = geri). */
1810
- show(t) {
1811
- if (!t) return;
1812
- const e = Date.now(), i = Math.sign(t) === Math.sign(this.total);
1813
- this.total = i && e - this.lastAt < Rt ? this.total + t : t, this.lastAt = e;
1814
- const r = Math.round(Math.abs(this.total) * 10) / 10, o = this.total > 0;
1815
- this.el.dataset.side = o ? "forward" : "back", this.valueEl.textContent = `${o ? "+" : "−"}${r}`, this.unitEl.textContent = this.labels.secondsShort, this.liveEl.textContent = (o ? this.labels.skipForward : this.labels.skipBack)(r), this.valueEl.classList.remove("hp-seek-fb-bump"), this.valueEl.offsetWidth, this.valueEl.classList.add("hp-seek-fb-bump"), this.el.setAttribute("data-visible", ""), this.hideTimer && clearTimeout(this.hideTimer), this.hideTimer = setTimeout(() => {
1816
- this.el.removeAttribute("data-visible"), this.total = 0;
1817
- }, zt);
1818
- }
1819
- destroy() {
1820
- this.hideTimer && clearTimeout(this.hideTimer), this.el.remove();
1821
- }
1822
- }
1823
- class Nt {
1824
- constructor(t) {
1825
- s(this, "el");
1826
- s(this, "open", !1);
1827
- s(this, "close", () => {
1828
- this.open && (this.open = !1, this.el.removeAttribute("data-open"), document.removeEventListener("pointerdown", this.onOutside, !0), document.removeEventListener("keydown", this.onKeyDown, !0), window.removeEventListener("blur", this.close), window.removeEventListener("resize", this.close), window.removeEventListener("scroll", this.close, !0));
1829
- });
1830
- s(this, "onOutside", (t) => {
1831
- t.composedPath().includes(this.el) || this.close();
1832
- });
1833
- s(this, "onKeyDown", (t) => {
1834
- t.key === "Escape" && (t.stopPropagation(), this.close());
1835
- });
1836
- this.container = t, this.el = document.createElement("div"), this.el.className = "hp-context-menu", this.el.setAttribute("part", "context-menu"), this.el.setAttribute("role", "menu"), this.el.addEventListener("contextmenu", (e) => e.preventDefault()), t.appendChild(this.el);
1837
- }
1838
- get isOpen() {
1839
- return this.open;
1840
- }
1841
- /** `clientX/Y` ekran koordinatı — menü player'ın içinde kalacak şekilde kaydırılır. */
1842
- show(t, e, i) {
1843
- var g;
1844
- this.el.replaceChildren(
1845
- ...i.map((c) => {
1846
- const d = document.createElement(c.onSelect ? "button" : "div");
1847
- d.className = "hp-context-menu-item", c.onSelect ? (d.type = "button", d.setAttribute("role", "menuitem"), d.addEventListener("click", () => {
1848
- this.close(), c.onSelect();
1849
- })) : d.setAttribute("data-info", "");
1850
- const m = document.createElement("span");
1851
- if (m.textContent = c.label, d.appendChild(m), c.meta) {
1852
- const f = document.createElement("span");
1853
- f.className = "hp-context-menu-meta", f.textContent = c.meta, d.appendChild(f);
1854
- }
1855
- return d;
1856
- })
1857
- ), this.el.setAttribute("data-open", ""), this.open = !0;
1858
- const r = this.container.getBoundingClientRect(), { width: o, height: a } = this.el.getBoundingClientRect(), l = Math.max(4, Math.min(t - r.left, r.width - o - 4)), h = Math.max(4, Math.min(e - r.top, r.height - a - 4));
1859
- this.el.style.left = `${l}px`, this.el.style.top = `${h}px`, (g = this.el.querySelector("button")) == null || g.focus({ preventScroll: !0 }), document.addEventListener("pointerdown", this.onOutside, !0), document.addEventListener("keydown", this.onKeyDown, !0), window.addEventListener("blur", this.close), window.addEventListener("resize", this.close), window.addEventListener("scroll", this.close, !0);
1860
- }
1861
- destroy() {
1862
- this.close(), this.el.remove();
1863
- }
1864
- }
1865
- const It = 3e3, ye = 200;
1866
- class Ht {
1867
- constructor() {
1868
- s(this, "list", []);
1869
- /** Kayıt eklenince / temizlenince (açık panel canlı güncellenir). */
1870
- s(this, "onChange", null);
1871
- }
1872
- get entries() {
1873
- return this.list;
1874
- }
1875
- add(t) {
1876
- var r, o;
1877
- const e = Date.now(), i = this.list[this.list.length - 1];
1878
- if (i && e - i.time < It && i.source === t.source && i.message === t.message && JSON.stringify(i.details ?? {}) === JSON.stringify(t.details ?? {})) {
1879
- i.count = (i.count ?? 1) + 1, i.time = e, (r = this.onChange) == null || r.call(this);
1880
- return;
1881
- }
1882
- this.list.push({ time: e, ...t }), this.list.length > ye && this.list.splice(0, this.list.length - ye), (o = this.onChange) == null || o.call(this);
1883
- }
1884
- clear() {
1885
- var t;
1886
- this.list.length = 0, (t = this.onChange) == null || t.call(this);
1887
- }
1888
- /** Destek ekibine yapıştırılabilir düz metin. */
1889
- toText() {
1890
- return this.list.map((t) => {
1891
- const e = Object.entries(t.details ?? {}).filter(([, r]) => r !== void 0 && r !== "").map(([r, o]) => `${r}=${o}`).join(" "), i = t.count && t.count > 1 ? ` (x${t.count})` : "";
1892
- return `${new Date(t.time).toISOString()} [${t.source}]${t.fatal ? " [fatal]" : ""} ${t.message}${i}${e ? ` | ${e}` : ""}`;
1893
- }).join(`
1894
- `);
1895
- }
1896
- }
1897
- const Dt = '@font-face{font-family:hope-icons;src:url(data:font/woff2;base64,d09GMgABAAAAAAuMAAsAAAAAIuAAAAs8AAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHFQGYACEegq1PK4ZATYCJANUCywABCAFhC4HggobTB4jESaVTgwydRbGzrR7EFKamp4EGD6+83WPOlVtFufKNoQP3FMw3+XD4QURPF85y/cFhm57sFsyDKE9ixwGQaUcQJ7ZIC+eQ8xnVOhGN8/3btY0zAxpnZKEriMToI4M0DphaJ13gQpdD9QMOzX/XVPOfcV/T/yaqq5tmHwMC1LiMW2M97StYfS0oH8OXi4E3rrH67vHaIoxiv5vLbUMRfxFY8K64ExmZwJ7cxtC3H3Z4wmC7KsikMCsgIVilHUVpsLGnRG+BsOtHVjBqsXBGhPUj7waBFAsZD3OLrsNDoOOU49i7NXwYEMF0upy6klW9QrzCLyK6kIBISd7TPlNbsMH2UWOB3YPX/k/VLkKHHwXdk4HHN81AV7PyHrl9fbrzJe/2aE7EfbuAD7gAjOKRcnF1Qnn4sb8TEgVL8FjD7p7D4Gst92GDB+rvSsQHFw8/Pl/8/IUKKLQlCjTQSdddNNDLwYkBxtcgltRaCDDBQQywIEMraPIAHiQAT5kQA4yIA8Z2kSRAShCBijIAA0ZUIIMKEMGdEAGdEIGdEEGdEMG9EAG9EIWgYG53XcDuAzUNaDHLMu7Exx8Y+LmFQ0Gny4D48WP8/C2nFvbdSu+yqveXpKqPK/CiEccUV4+iZ0pm2EUkqiKDXcd9PfPrB0YfnXh4qqKcW16GxGVhuMH0vYtGw6G4nLSKt1wP87cA1qLcsuOQt/4kLgbH1yC3vhqwo0fPBEd49tvjynxwTeL9NHc+M03BdRkMFrEDZxQ1HNsByFJ3d2k8dokTtujRGBuSgXmoZmNiDmoN5iwpLJ5J0Tr41F3pErSxE5r7YjXSQQscVd8q5terDHDs8Q8PgHLMj5LRBqlokk06lyJCkQ1ojKL8GTJbp+pRqUoUU3YINumkliJTsEUYbtUoiPRaLAIFK1z5cVTJ2ReUwR8/dQIb8cIaoW8a8qZCqJqhSxKWynJ4ylmWJAAS2N8Otkda/XeYRjsFyhj0rDRyoBBQSSChuwAMUpBS7oUr8QQgwZPTvyG6TaD70XE080iPLU+2UK0IxcuwsaqY13JWdvYED0erfTCAq89174mlFHPyjRL7uUwQdC6Trpcd+b0iOi29xiWL3InU0LkCsvsy6G9BA4lMzQOpQ8PBCjHTWhMMNGKKnOOoWJYhYrB2moLyoq2bngiCJQZM8R5IkifCJQ5goTQ5HlFwrAehhLUAupcD9ProQQUUUSfV2trx63V4WRIncdt+rjVIUUU0ecBYyrGYKuWLlNNAvfGvXUfXmTL52uuru/v7+ubca6k1O9vacwfGBgcXDDtrFSq1uzpaVl2zK5t1us1m8YES1N7ZGmJ1aCgJyYqtEUo6tqiYiGb1g02x7EmzTWBADFed7EHi/aCejQCJkJqXAo9F9IGgrPA18xCDZFjbGvRpqFhTCs+G8h5j++UWiY24kRj5t/5hLBemwd0qqZHf6ydh5oGW72xM1nxScV3a7RaScghJ5eiSkooPGUSol8PCjVLIA5YN0o9FVFaL3Y+a5idfc3M9VzXQ7dbJm7EYA4/tfK6bnB72X+HHeq71KJGf+n1/ua0g+3iSDY1Rn86/LDOC2c3NZeOeT1xWrvD+vlTXsJdzevs0NxhrrGpuSnhG3V7eG32QPcvb+iu61Tczs57l6Tb/uRmmtisNR96nzl3acMykuhQDOtjLCwhLIZZTFNjQ1RMTmDZxxKqFmU+GWGZhqOamghT+dB+JEnY6jEnjRraqlppEURabryN0YjkbUH5d5/AImVJfjkqY2Sn8jZJln/DPVimfaBMjqzXywJpN92LJHBqDKJ2REqL4L6B334DTt0UEimLqqpSfk+EBMoUVY0yKvz+b0YHUfpzE7MryTECgsHCr/9mtJFAPdD7v9agSRd4z9+LZRKKYRwLERmnLBt4vdmKpmEzFW2FXSB57eqpxzLFa9sNCvrqlNMDq31Vk3U1wsHWtoynt7uIK9EZc55RXHDa0dJjYzSKO25OG1+Hek2oHOjv57Gs4XctpvERXksqjMoi1kf0WCKUhRJaKpLSojFGBTvmr+cAB8u9BUbg1hXAO7Aei/KSJuspYpoeJuOkIrYLlMWixCYR2mwiYf3BSw8ZjtTv+eBg34Yj4zwZMPhOuCZsGzL8aKjs/qT2kxIV4efwKGow6iEEYWLzRoOq4vUKHTw74pnhoULdXpQQERAUSEixevMJnP54oFgsrgpQADMQgApOUbyMIFu4KKhCZ786rHvsvk9CtU2QTHrzETr4glMVFgNBBTRMx3JaVq71YATjOeUtwy4lF4erT6zOjdtleCvy6eMVAVuCALlfH9TIpauae+OT19779i7rrrfvvXYy3tu8qvR9zgffi6DDZnFfY3dda7EZqz7OfQ/05CSEdqvFkl5wJS1WzjSIrIvSmSB4uobXi8SjYDWTfWs2N+wjEBLfcG72lGQzKlY8RNTz4JudugpTpdutHXnbbDC80urqbLt8AtQFfs5ndVAZKvG4dK58zsDBNQ1Go8Uc/OTutMVoxA2rONFF39W5PCVDyuRs2WuBXMG3y6Zjca/1GGTSjrjdlQ2MdkXHf5KKh5DeEejunpjIZlJXXZXKZCcmursDjjzP8+4T+H8zL4jbQvuber5I5Ml85vxv6XXvC47pY+lz/LbI2svPdN2d//zIoTcnCh+LNDz218iT+SNd2CAk+oTTbnLNazuv99/CbMJRi8GGbIZhv8KZC8QlZLRwXAz87zmSf3Lkr8caIo8VTrx56Mjn+bu7zly+j2zjz6WPTTte8L4ubT4/M0/yiS96mvaHtokLufN60kEjqHR+g7ExRfM7IWiudeCmQrPCWcBwZQUzp0QpU+HkGOg8inUOqzXjcj515Lrrg/6cucK25SQU3kFzLui//rojar0rY7U6dLh4loZn51vrSkrq1shzN9OPLGN91Zvqvls6z84Oo0yEBNtZp3kFkJ6SwcnBdKYgrNSuHe88dNFFs6G/v7W2toT5+UGt6e9mbvZ60UNPvT8av1N1VnFclVO9Mz76fuNVHAU4jc5yTJ6PGofMXTW3tPSjw9Lxehm0nEUHpfeQrm/inU5vLd4EcHxjvCusBINKuCv+sr3XjiH0epKpwtHCVNLjhRCXb9LrY9BEWIpPMWJKS4Sl+TQjlYWuFyGxMXcUoaib2Qj0oPxPgDSZbf8PtH+XP2QjtNvhUiCPydpxiZww7i6Jln9eLhz3rJw/7mlpjbtUknHfyim72iT7QvsX+VG2W/x/MvRGmD2FuzDfVzgFll/mfyLnINPvBJsOuOzhIzrX/lrQDgCXjr81h721f5E/ZDtQ4FiCwL88AVl9f2z9f2k3JsdtggBWdvg1P88BlJ0NbVhSF++qQYVL0jiH/JyAd2OhG6aeZR18NOOQQ7EQFE1WH1vTy3FcxCsiGC60wKGDm8DFsN3Us3wUfALehByG70GR8Od30kzITu9wlEB6TVjewHZR5YKIPM8X5OIJxf1814GHcQSErBgacfqiPHtgNsIMteKVkCFGEmkogObKMaeHujbLv3Slqe05JAGSpxFUvPWA1YmUXNlqueFXD2SF326+sIjKnZTpkaLk4goDzZUf7UY4x5l1gDFDOF5GWsJuzTjkRRHN6Jn8PQVAYxXXIC95UNv6jCytBhZazV0F8GHPhBVHXPHEl5zkpSBFUaKlJGXpkE7pkm7pkV4xYiUgf1TlFNVto6Ow1IQImqEZZcuO9QL9v/LrnDOhjGCKP+hQgZ25MRadAVACMuTt7LSvnkd2fDOKTWmcoiswTJVGfRx6VpLZoy3zsn2SJ9U1js/JUL6o3CzPHbsWpPPWLeZZkS6rSZm2Y2imQjw2D+/1AAAAAA==) format("woff2");font-weight:400;font-style:normal;font-display:block}', xe = "hope-player-icon-font";
1898
- function Gt() {
1899
- if (typeof document > "u" || document.getElementById(xe)) return;
1900
- const n = document.createElement("style");
1901
- n.id = xe, n.textContent = Dt, document.head.appendChild(n);
1902
- }
1903
- function ai(n) {
1904
- if (!n || typeof n.name != "string" || !/^[\w.:-]+$/.test(n.name))
1905
- throw new TypeError('definePlugin: "name" is required (letters, digits, "-", "_", ".", ":")');
1906
- if (typeof n.setup != "function") throw new TypeError(`definePlugin(${n.name}): "setup" must be a function`);
1907
- return n;
1908
- }
1909
- const V = [], X = /* @__PURE__ */ new Set();
1910
- function qt(n, t) {
1911
- const e = [n, t];
1912
- return V.push(e), ke(), () => {
1913
- const i = V.indexOf(e);
1914
- i >= 0 && (V.splice(i, 1), ke());
1915
- };
1916
- }
1917
- function Vt() {
1918
- return V.slice();
1919
- }
1920
- function _t(n) {
1921
- return X.add(n), () => X.delete(n);
1922
- }
1923
- function ke() {
1924
- for (const n of X)
1925
- try {
1926
- n();
1927
- } catch {
1928
- }
1929
- }
1930
- function Ut() {
1931
- var i;
1932
- const t = (i = window.adTaxonomy) == null ? void 0 : i.keyValues;
1933
- if (!t || typeof t != "object") return "";
1934
- const e = [];
1935
- for (const [r, o] of Object.entries(t))
1936
- o == null || o === "" || e.push(`${r}=${o}`);
1937
- return e.join("&");
1938
- }
1939
- function $(n, t = {}) {
1940
- const e = encodeURIComponent(document.referrer || window.location.href), i = encodeURIComponent(window.location.href), r = Date.now();
1941
- let o = n;
1942
- const a = {
1943
- referrer_url: e,
1944
- description_url: i,
1945
- timestamp: r
1946
- };
1947
- for (const [l, h] of Object.entries(a)) {
1948
- const g = `[${l}]`;
1949
- if (o.includes(g))
1950
- o = o.replace(g, String(h));
1951
- else if (!new URLSearchParams(o.split("?")[1]).has(l)) {
1952
- const c = o.includes("?") ? "&" : "?";
1953
- o += `${c}${l}=${h}`;
1954
- }
1955
- }
1956
- try {
1957
- const l = new URL(o);
1958
- if (l.pathname.includes("/vmap/")) return n;
1959
- const g = [];
1960
- t.includeRefreshCount && g.push(`adrefreshCount=${t.adRefreshCount ?? 0}`);
1961
- const c = Ut();
1962
- if (c && g.push(c), g.length) {
1963
- const d = l.searchParams.get("cust_params");
1964
- l.searchParams.set("cust_params", d ? `${d}&${g.join("&")}` : g.join("&"));
1965
- }
1966
- return l.toString();
1967
- } catch {
1968
- return o;
1969
- }
1970
- }
1971
- function Y(n) {
1972
- const t = {};
1973
- if (!n) return t;
1974
- const e = typeof n == "string" ? [...new URLSearchParams(n.trim().replace(/^\?/, "")).entries()].map(([i, r]) => [i, r.split(",")]) : Object.entries(n);
1975
- for (const [i, r] of e) {
1976
- const o = (Array.isArray(r) ? r : [r]).filter((a) => a != null && a !== "").map(String);
1977
- i && o.length && (t[i] = o);
1978
- }
1979
- return t;
1980
- }
1981
- function Kt(n, t) {
1982
- const e = Object.entries(Y(t)).filter(([i]) => !i.startsWith("hb_")).map(([i, r]) => `${encodeURIComponent(i)}=${r.map(encodeURIComponent).join(",")}`);
1983
- if (!e.length) return n;
1984
- try {
1985
- const i = new URL(n), r = new Set(e.map((a) => a.slice(0, a.indexOf("=")))), o = (i.searchParams.get("cust_params") ?? "").split("&").filter((a) => a && !r.has(a.split("=")[0]));
1986
- return i.searchParams.set("cust_params", [...o, ...e].join("&")), i.toString();
1987
- } catch {
1988
- return n;
1989
- }
1990
- }
1991
- const He = {
1992
- play: "Oynat",
1993
- pause: "Duraklat",
1994
- mute: "Sessize al",
1995
- unmute: "Sesi aç",
1996
- volume: "Ses seviyesi",
1997
- seekBar: "Video konumu",
1998
- settings: "Ayarlar",
1999
- pip: "Resim içinde resim",
2000
- skipBack: (n) => `${n} saniye geri`,
2001
- skipForward: (n) => `${n} saniye ileri`,
2002
- secondsShort: "sn",
2003
- audioTrack: "Ses",
2004
- statsTitle: "İstatistikler",
2005
- statsClose: "İstatistikleri kapat",
2006
- statsEngine: "Motor",
2007
- statsResolution: "Video / ekran",
2008
- statsQuality: "Kalite",
2009
- statsCodecs: "Codec",
2010
- statsBandwidth: "Bant genişliği",
2011
- statsBuffer: "Buffer (ileri)",
2012
- statsDropped: "Düşen kare",
2013
- statsLatency: "Canlı gecikme",
2014
- statsSpeedVolume: "Hız / ses",
2015
- statsSource: "Kaynak",
2016
- statsVersion: "Sürüm",
2017
- debugTitle: "Hata ayıklama",
2018
- debugClose: "Hata ayıklamayı kapat",
2019
- debugCopy: "Kopyala",
2020
- debugCopied: "Kopyalandı",
2021
- debugClear: "Temizle",
2022
- debugEmpty: "Kayıtlı hata yok.",
2023
- debugFatal: "Oynatmayı durdurdu",
2024
- debugSourceMedia: "Medya",
2025
- debugSourceStream: "Yayın",
2026
- debugSourceAds: "Reklam",
2027
- debugSourceSubtitles: "Altyazı",
2028
- debugSourcePlayer: "Player",
2029
- adLabel: "Reklam",
2030
- adReturnFullscreen: "Tam ekrana dön",
2031
- adReturnPip: "Küçük pencereye dön",
2032
- audioVinyl: "Plak — ileri / geri sarmak için çevirin",
2033
- fullscreenEnter: "Tam ekran",
2034
- fullscreenExit: "Tam ekrandan çık",
2035
- playbackSpeed: "Oynatma Hızı",
2036
- normal: "Normal",
2037
- quality: "Kalite",
2038
- captions: "Altyazı",
2039
- captionsOff: "Kapalı",
2040
- captionSettings: "Altyazı ayarları",
2041
- rewardedButton: "{quality} kilidini aç",
2042
- rewardedTitle: "{quality} kalitesini aç",
2043
- rewardedBody: "Kısa bir reklam izleyin, {quality} kalitesi {duration} açık kalsın. Vazgeçerseniz video şu anki kalitede devam eder.",
2044
- rewardedWatch: "Reklamı izle",
2045
- rewardedDecline: "Vazgeç",
2046
- rewardedLoading: "Reklam hazırlanıyor…",
2047
- rewardedNoFill: "Şu an gösterilecek reklam yok. Biraz sonra tekrar deneyin.",
2048
- rewardedOk: "Tamam",
2049
- rewardedUnlocked: "{quality} açıldı",
2050
- rewardedUnlockedNoAd: "Şu an reklam yoktu — {quality} yine de açıldı",
2051
- rewardedForVideo: "bu video boyunca",
2052
- rewardedForSession: "bu oturum boyunca",
2053
- rewardedForMinutes: "{n} dakika boyunca",
2054
- sponsorPresents: "{name} sunar",
2055
- captionSize: "Yazı Boyutu",
2056
- captionSizeSmall: "Küçük",
2057
- captionSizeNormal: "Normal",
2058
- captionSizeLarge: "Büyük",
2059
- captionResetPosition: "Konumu sıfırla",
2060
- captionBgColor: "Arka Plan Rengi",
2061
- captionTextColor: "Yazı Rengi",
2062
- captionDragHandle: "Altyazı konumu — tutup sürükleyin",
2063
- autoQuality: "Oto",
2064
- loop: "Döngü",
2065
- close: "Kapat",
2066
- retry: "Tekrar Dene",
2067
- errorAborted: "Video yüklemesi iptal edildi.",
2068
- errorNetwork: "Ağ hatası — video yüklenemedi.",
2069
- errorDecode: "Video kodu çözülemedi.",
2070
- errorSrcNotSupported: "Bu video kaynağı desteklenmiyor.",
2071
- errorGeneric: "Video oynatılırken bir hata oluştu.",
2072
- errorCode: "Hata kodu",
2073
- countdownRemaining: "Kalan süre",
2074
- geoDefaultWarning: "Erişim engellendi.",
2075
- geoUnknownCountry: "Ülke bilgisi bulunamadı.",
2076
- redirectCancel: "İptal",
2077
- redirectPlayNow: "Şimdi Oynat",
2078
- redirectCountdown: (n) => `Sıradaki video ${n} saniye içinde oynatılacak.`,
2079
- redirectNowPlaying: "Video oynatılıyor...",
2080
- redirectUpNext: "Sıradaki",
2081
- redirectCancelCard: "Sıradakini iptal et",
2082
- skipIntro: "İntroyu atla",
2083
- skipRecap: "Özeti atla",
2084
- skipCredits: "Jeneriği atla",
2085
- skipSegment: "Atla",
2086
- a11yMenu: "Erişilebilirlik",
2087
- a11yZoom: "Yakınlaştırma",
2088
- a11yFilter: "Görüntü filtresi",
2089
- a11yFilterNone: "Doğal",
2090
- a11yFilterGrayscale: "Siyah-beyaz",
2091
- a11yFilterDaylight: "Gün ışığı",
2092
- a11yFilterNight: "Gece ışığı",
2093
- a11yFilterContrast: "Yüksek kontrast",
2094
- a11yFilterProtanopia: "Kırmızı körlüğü",
2095
- a11yFilterDeuteranopia: "Yeşil körlüğü",
2096
- a11yFilterTritanopia: "Mavi körlüğü",
2097
- a11yMono: "Mono ses",
2098
- a11yBoost: "Ses güçlendirme",
2099
- a11yLargeControls: "Büyük kontroller",
2100
- a11yShortcuts: "Klavye kısayolları",
2101
- a11yOn: "Açık",
2102
- a11yOff: "Kapalı",
2103
- a11yUnavailable: "Kullanılamaz",
2104
- a11yZoomReset: "Yakınlaştırmayı sıfırla",
2105
- a11yClose: "Kapat",
2106
- a11yKeyPlay: "Oynat / duraklat",
2107
- a11yKeySeek: (n) => `${n} sn geri / ileri`,
2108
- a11yKeyVolume: "Sesi aç / kıs",
2109
- a11yKeyMute: "Sesi kapat / aç",
2110
- a11yKeyFullscreen: "Tam ekran",
2111
- a11yKeyZoom: "Yakınlaştır / uzaklaştır, sıfırla",
2112
- a11yKeyPan: "Yakınlaştırılmış görüntüde gezin",
2113
- a11yKeyShortcuts: "Bu listeyi aç / kapat",
2114
- historyResumed: (n) => `Kaldığınız yerden devam: ${n}`,
2115
- historyRestart: "Baştan başla",
2116
- qrResumeTitle: "Devam etmek için kodu telefonunuzla okutun",
2117
- qrResumeDontShowAgain: "Bir daha gösterme",
2118
- qrResumeContinue: "Devam Et",
2119
- qrResumeMenuLabel: "QR ile Devam Et",
2120
- qrResumeOn: "Açık",
2121
- qrResumeOff: "Kapalı",
2122
- pauseAdLabel: "Sponsorlu",
2123
- pauseAdClose: "Reklamı kapat",
2124
- adTriggerLabel: "Reklam",
2125
- castButton: "TV'ye yayınla",
2126
- airplayButton: "AirPlay",
2127
- castPlayingOn: "{device} cihazında oynatılıyor",
2128
- castDeviceFallback: "TV",
2129
- castAdOnTv: "TV'de reklam oynatılıyor",
2130
- airplayPlaying: "AirPlay ile oynatılıyor",
2131
- pauseAdResume: "Videoya devam et",
2132
- markerLearnMore: "Daha fazla bilgi",
2133
- markerContinue: "Devam et",
2134
- playlistTitle: "Oynatma Listesi",
2135
- playlistPrev: "Önceki",
2136
- playlistNext: "Sonraki",
2137
- videoFallbackTitle: (n) => `Video ${n + 1}`,
2138
- storyPrev: "Önceki video",
2139
- storyNext: "Sonraki video",
2140
- storyAllVideos: "Tüm videolar",
2141
- dubbingTitle: "Ses / Dil",
2142
- liveClock: "Canlı saat",
2143
- live: "CANLI",
2144
- goToLive: "Canlıya git"
2145
- }, jt = {
2146
- play: "Play",
2147
- pause: "Pause",
2148
- mute: "Mute",
2149
- unmute: "Unmute",
2150
- volume: "Volume",
2151
- seekBar: "Seek",
2152
- settings: "Settings",
2153
- pip: "Picture-in-picture",
2154
- skipBack: (n) => `Back ${n} seconds`,
2155
- skipForward: (n) => `Forward ${n} seconds`,
2156
- secondsShort: "s",
2157
- audioTrack: "Audio",
2158
- statsTitle: "Stats",
2159
- statsClose: "Close stats",
2160
- statsEngine: "Engine",
2161
- statsResolution: "Video / viewport",
2162
- statsQuality: "Quality",
2163
- statsCodecs: "Codecs",
2164
- statsBandwidth: "Bandwidth",
2165
- statsBuffer: "Buffer (ahead)",
2166
- statsDropped: "Dropped frames",
2167
- statsLatency: "Live latency",
2168
- statsSpeedVolume: "Speed / volume",
2169
- statsSource: "Source",
2170
- statsVersion: "Version",
2171
- debugTitle: "Debug log",
2172
- debugClose: "Close debug log",
2173
- debugCopy: "Copy",
2174
- debugCopied: "Copied",
2175
- debugClear: "Clear",
2176
- debugEmpty: "No errors logged.",
2177
- debugFatal: "Stopped playback",
2178
- debugSourceMedia: "Media",
2179
- debugSourceStream: "Stream",
2180
- debugSourceAds: "Ads",
2181
- debugSourceSubtitles: "Subtitles",
2182
- debugSourcePlayer: "Player",
2183
- adLabel: "Ad",
2184
- adReturnFullscreen: "Back to full screen",
2185
- adReturnPip: "Back to picture-in-picture",
2186
- audioVinyl: "Record — turn it to scrub",
2187
- fullscreenEnter: "Fullscreen",
2188
- fullscreenExit: "Exit fullscreen",
2189
- playbackSpeed: "Playback speed",
2190
- normal: "Normal",
2191
- quality: "Quality",
2192
- captions: "Captions",
2193
- captionsOff: "Off",
2194
- captionSettings: "Subtitle settings",
2195
- rewardedButton: "Unlock {quality}",
2196
- rewardedTitle: "Unlock {quality}",
2197
- rewardedBody: "Watch a short ad to keep {quality} unlocked {duration}. If you skip it, the video keeps playing at the current quality.",
2198
- rewardedWatch: "Watch ad",
2199
- rewardedDecline: "No thanks",
2200
- rewardedLoading: "Loading ad…",
2201
- rewardedNoFill: "No ad is available right now. Please try again in a moment.",
2202
- rewardedOk: "OK",
2203
- rewardedUnlocked: "{quality} unlocked",
2204
- rewardedUnlockedNoAd: "No ad right now — {quality} unlocked anyway",
2205
- rewardedForVideo: "for this video",
2206
- rewardedForSession: "for this session",
2207
- rewardedForMinutes: "for {n} minutes",
2208
- sponsorPresents: "Presented by {name}",
2209
- captionSize: "Font Size",
2210
- captionSizeSmall: "Small",
2211
- captionSizeNormal: "Normal",
2212
- captionSizeLarge: "Large",
2213
- captionResetPosition: "Reset position",
2214
- captionBgColor: "Background Color",
2215
- captionTextColor: "Text Color",
2216
- captionDragHandle: "Caption position — drag to move",
2217
- autoQuality: "Auto",
2218
- loop: "Loop",
2219
- close: "Close",
2220
- retry: "Retry",
2221
- errorAborted: "Video loading was aborted.",
2222
- errorNetwork: "Network error — the video could not load.",
2223
- errorDecode: "The video could not be decoded.",
2224
- errorSrcNotSupported: "This video source is not supported.",
2225
- errorGeneric: "An error occurred while playing the video.",
2226
- errorCode: "Error code",
2227
- countdownRemaining: "Time remaining",
2228
- geoDefaultWarning: "Access denied.",
2229
- geoUnknownCountry: "No country information found.",
2230
- redirectCancel: "Cancel",
2231
- redirectPlayNow: "Play now",
2232
- redirectCountdown: (n) => `Next video will play in ${n} seconds.`,
2233
- redirectUpNext: "Up next",
2234
- redirectCancelCard: "Cancel up next",
2235
- skipIntro: "Skip intro",
2236
- skipRecap: "Skip recap",
2237
- skipCredits: "Skip credits",
2238
- skipSegment: "Skip",
2239
- a11yMenu: "Accessibility",
2240
- a11yZoom: "Zoom",
2241
- a11yFilter: "Picture filter",
2242
- a11yFilterNone: "Natural",
2243
- a11yFilterGrayscale: "Black and white",
2244
- a11yFilterDaylight: "Daylight",
2245
- a11yFilterNight: "Night light",
2246
- a11yFilterContrast: "High contrast",
2247
- a11yFilterProtanopia: "Red-blind",
2248
- a11yFilterDeuteranopia: "Green-blind",
2249
- a11yFilterTritanopia: "Blue-blind",
2250
- a11yMono: "Mono audio",
2251
- a11yBoost: "Volume boost",
2252
- a11yLargeControls: "Large controls",
2253
- a11yShortcuts: "Keyboard shortcuts",
2254
- a11yOn: "On",
2255
- a11yOff: "Off",
2256
- a11yUnavailable: "Unavailable",
2257
- a11yZoomReset: "Reset zoom",
2258
- a11yClose: "Close",
2259
- a11yKeyPlay: "Play / pause",
2260
- a11yKeySeek: (n) => `Back / forward ${n} s`,
2261
- a11yKeyVolume: "Volume up / down",
2262
- a11yKeyMute: "Mute / unmute",
2263
- a11yKeyFullscreen: "Fullscreen",
2264
- a11yKeyZoom: "Zoom in / out, reset",
2265
- a11yKeyPan: "Move around the zoomed picture",
2266
- a11yKeyShortcuts: "Open / close this list",
2267
- historyResumed: (n) => `Resumed at ${n}`,
2268
- historyRestart: "Start over",
2269
- redirectNowPlaying: "Now playing...",
2270
- qrResumeTitle: "Scan to continue watching on your phone",
2271
- qrResumeDontShowAgain: "Don't show again",
2272
- qrResumeContinue: "Continue",
2273
- qrResumeMenuLabel: "Continue via QR",
2274
- qrResumeOn: "On",
2275
- qrResumeOff: "Off",
2276
- pauseAdLabel: "Sponsored",
2277
- pauseAdClose: "Close ad",
2278
- adTriggerLabel: "Advertisement",
2279
- castButton: "Cast to TV",
2280
- airplayButton: "AirPlay",
2281
- castPlayingOn: "Playing on {device}",
2282
- castDeviceFallback: "TV",
2283
- castAdOnTv: "An ad is playing on the TV",
2284
- airplayPlaying: "Playing via AirPlay",
2285
- pauseAdResume: "Resume video",
2286
- markerLearnMore: "Learn more",
2287
- markerContinue: "Continue",
2288
- playlistTitle: "Playlist",
2289
- playlistPrev: "Previous",
2290
- playlistNext: "Next",
2291
- videoFallbackTitle: (n) => `Video ${n + 1}`,
2292
- storyPrev: "Previous video",
2293
- storyNext: "Next video",
2294
- storyAllVideos: "All videos",
2295
- dubbingTitle: "Audio / Language",
2296
- liveClock: "Live clock",
2297
- live: "LIVE",
2298
- goToLive: "Go to live"
2299
- }, $t = { tr: He, en: jt };
2300
- function De(n, t) {
2301
- return { ...$t[n ?? "tr"] ?? He, ...t };
2302
- }
2303
- function Qt(n, t, e) {
2304
- Object.assign(n, De(t, e));
2305
- }
2306
- const J = 8e3;
2307
- function Wt(n) {
2308
- var t;
2309
- return (t = n.live) != null && t.scte35 && !n.adTagPreroll && !n.adTagVmap ? !1 : !!(n.adTagPreroll || n.adTagVmap);
2310
- }
2311
- class Xt {
2312
- constructor(t) {
2313
- /** Kapı kurulu (preroll bekleniyor) mu. */
2314
- s(this, "armed", !1);
2315
- /** Kapı kuruluyken kullanıcı / autoplay oynatmak istedi mi. */
2316
- s(this, "playIntent", !1);
2317
- /** Kapının kendi pause() çağrısının ürettiği 'pause' olayı yutulsun. */
2318
- s(this, "swallowNextPause", !1);
2319
- s(this, "timeoutMs", J);
2320
- s(this, "timer", null);
2321
- /** İlk oynatma isteği (reklam plugin'i bekleyen preroll'u başlatır). */
2322
- s(this, "onPlayIntent", null);
2323
- /** Zaman aşımı — reklam plugin'i geç gelecek cevabı iptal eder. Kapı bundan sonra içeriği başlatarak açılır. */
2324
- s(this, "onTimeout", null);
2325
- /** "Preroll bekleniyor" durumu değişti (UI: yükleme halkası, merkez buton). */
2326
- s(this, "onWaitChange", null);
2327
- s(this, "onPlay", (t) => {
2328
- this.armed && (t.stopImmediatePropagation(), this.swallowNextPause = !0, this.video.pause(), this.registerIntent());
2329
- });
2330
- s(this, "onPause", (t) => {
2331
- this.swallowNextPause && (this.swallowNextPause = !1, t.stopImmediatePropagation());
2332
- });
2333
- this.video = t, t.addEventListener("play", this.onPlay), t.addEventListener("pause", this.onPause);
2334
- }
2335
- get isArmed() {
2336
- return this.armed;
2337
- }
2338
- /** Kapı kurulu ve oynatma istendi — kullanıcı preroll'u bekliyor. */
2339
- get isWaiting() {
2340
- return this.armed && this.playIntent;
2341
- }
2342
- get hasPlayIntent() {
2343
- return this.playIntent;
2344
- }
2345
- arm(t = J) {
2346
- this.clearTimer(), this.armed = !0, this.playIntent = !1, this.timeoutMs = t;
2347
- }
2348
- /**
2349
- * Elementin `play()`'i için: kapı kuruluysa videoya dokunmadan oynatma isteği kaydedilir (play() promise'i
2350
- * pause() ile reddedilip konsola "interrupted by a call to pause()" düşmesin). true → istek kapıda.
2351
- */
2352
- interceptPlay() {
2353
- return this.armed ? (this.registerIntent(), !0) : !1;
2354
- }
2355
- /** Bekleme sırasında kullanıcı vazgeçti (duraklat'a bastı). Kapı kurulu kalır; preroll geri döner ama başlatılmaz. */
2356
- cancelIntent() {
2357
- var t;
2358
- this.isWaiting && (this.playIntent = !1, this.clearTimer(), (t = this.onWaitChange) == null || t.call(this, !1));
2359
- }
2360
- /** Preroll sonuçlandı. `resume`: oynatma istenmişse içerik şimdi başlasın (reklam yok / hata / zaman aşımı). */
2361
- release(t) {
2362
- var i;
2363
- if (!this.armed) return;
2364
- const e = this.playIntent;
2365
- this.armed = !1, this.playIntent = !1, this.clearTimer(), e && ((i = this.onWaitChange) == null || i.call(this, !1)), t && e && this.video.play().catch(() => {
2366
- });
2367
- }
2368
- destroy() {
2369
- this.clearTimer(), this.video.removeEventListener("play", this.onPlay), this.video.removeEventListener("pause", this.onPause);
2370
- }
2371
- registerIntent() {
2372
- var t, e;
2373
- this.playIntent || (this.playIntent = !0, (t = this.onWaitChange) == null || t.call(this, !0), this.timer = setTimeout(() => {
2374
- var i;
2375
- this.timer = null, (i = this.onTimeout) == null || i.call(this), this.release(!0);
2376
- }, this.timeoutMs), (e = this.onPlayIntent) == null || e.call(this));
2377
- }
2378
- clearTimer() {
2379
- this.timer && clearTimeout(this.timer), this.timer = null;
2380
- }
2381
- }
2382
- const Yt = [
2383
- "https://imasdk.googleapis.com",
2384
- "https://pubads.g.doubleclick.net",
2385
- "https://securepubads.g.doubleclick.net",
2386
- "https://pagead2.googlesyndication.com"
2387
- ];
2388
- let we = !1;
2389
- function Jt() {
2390
- if (!(we || typeof document > "u")) {
2391
- we = !0;
2392
- for (const n of Yt) {
2393
- if (document.head.querySelector(`link[rel="preconnect"][href="${n}"]`)) continue;
2394
- const t = document.createElement("link");
2395
- t.rel = "preconnect", t.href = n, document.head.appendChild(t);
2396
- }
2397
- }
2398
- }
2399
- const Ee = [0.5, 0.75, 1, 1.25, 1.5, 2], Ce = 1200, Zt = 3e3, Se = 5e3, ei = 10, Te = 10, ti = 5, Ae = "stream-audio", G = "1.4.0", ii = {
2400
- hls: "application/x-mpegurl",
2401
- mp4: "video/mp4",
2402
- webm: "video/webm",
2403
- mp3: "audio/mpeg",
2404
- m4a: "audio/mp4",
2405
- aac: "audio/aac",
2406
- ogg: "audio/ogg",
2407
- wav: "audio/wav",
2408
- flac: "audio/flac"
2409
- }, ri = (
2410
- /* html */
2411
- `
2412
- <div class="video-area">
2413
- <div class="media-layer">
2414
- <video part="video" playsinline webkit-playsinline preload="metadata"></video>
2415
- <div part="ad-layer" class="hp:absolute hp:inset-0 hp:z-10 hp:hidden"></div>
2416
- </div>
2417
- </div>
2418
- `
2419
- );
2420
- function si(n) {
2421
- if (typeof n == "number") return Number.isFinite(n) && n > 0 ? String(n) : null;
2422
- if (typeof n != "string") return null;
2423
- const t = n.trim().match(/^(\d+(?:\.\d+)?)\s*(?:[:/]\s*(\d+(?:\.\d+)?))?$/);
2424
- return !t || Number(t[1]) <= 0 || t[2] !== void 0 && Number(t[2]) <= 0 ? null : t[2] !== void 0 ? `${t[1]} / ${t[2]}` : t[1];
2425
- }
2426
- class Ge extends HTMLElement {
2427
- constructor() {
2428
- super();
2429
- s(this, "root");
2430
- s(this, "videoArea");
2431
- s(this, "videoEl");
2432
- s(this, "adLayerEl");
2433
- s(this, "chromeEl");
2434
- s(this, "centerPlayButton");
2435
- s(this, "captionRenderer");
2436
- /** options.miniProgress açıkken kurulur. */
2437
- s(this, "miniProgress", null);
2438
- s(this, "chromeVisible", !0);
2439
- s(this, "sourceManager");
2440
- s(this, "controlBar");
2441
- s(this, "tooltip");
2442
- s(this, "keyboard");
2443
- s(this, "loadingSpinner");
2444
- /**
2445
- * Preroll kapısı — reklam plugin'i yüklenmeden önce kurulur ki autoplay / ilk play araya kaçmasın.
2446
- * Video'nun 'play'/'pause' dinleyicilerinin İLKİ olmalı (yuttuğu olayları UI ve hp:play görmesin).
2447
- */
2448
- s(this, "prerollGate");
2449
- /** Ads plugin kurulumu sürüyor — erken başlatılan kurulum ile sonraki bekleme aynı promise'i paylaşır. */
2450
- s(this, "adsInstall", null);
2451
- /** Yükleme halkası açık (medya takıldı / preroll bekleniyor) — kontroller bu sırada otomatik gizlenmez. */
2452
- s(this, "loadingActive", !1);
2453
- s(this, "errorScreen");
2454
- /** İleri/geri sarmada sağda/solda beliren anlık bildirim. */
2455
- s(this, "seekFeedback");
2456
- s(this, "contextMenu");
2457
- /** options.contextMenu çözülmüş hali — null = kapalı (tarayıcının kendi menüsü). */
2458
- s(this, "contextMenuConfig", { stats: !1 });
2459
- /** İlk açılışta yüklenir (plugins/stats). */
2460
- s(this, "statsPanel", null);
2461
- s(this, "debugPanel", null);
2462
- /** options.debug — sağ tık menüsündeki "Hata ayıklama" girişini açar. */
2463
- s(this, "debugEnabled", !1);
2464
- /** Player'ın tüm hataları (medya, yayın, reklam, altyazı) — her zaman tutulur; bkz. `errorLog`. */
2465
- s(this, "log", new Ht());
2466
- /** Son basılan işaretçi türü — sağ tık menüsü yalnızca fareyle (dokunmatikte uzun basma gesture'a ait). */
2467
- s(this, "lastPointerType", "mouse");
2468
- /** options.tapGestures kuruluysa (plugins/tap-gestures). */
2469
- s(this, "tapGestures", null);
2470
- /** Dokunmadan sonra tarayıcının ürettiği uyumluluk mouse olayları ikinci bir dokunuş sayılmasın. */
2471
- s(this, "lastTouchEndAt", 0);
2472
- /** Video alanı boyutu değişince merkez play butonunun yerini yeniden hesaplar. */
2473
- s(this, "centerPlayObserver", null);
2474
- s(this, "tapToPlay", "auto");
2475
- s(this, "adsController", null);
2476
- s(this, "gestureControls", null);
2477
- s(this, "loopSection", null);
2478
- s(this, "audioStage", null);
2479
- /** Kalite kilidi (rewardedUnlock eklentisi) — kilitliyse yüksek kaliteler menüde kilitli, HLS'te üst sınır var. */
2480
- s(this, "qualityGate", null);
2481
- s(this, "rewardedUnlock", null);
2482
- s(this, "sponsorship", null);
2483
- /** Son uygulanan MP4 kaynak listesi ve seçili etiket — kilit açılınca menü yeniden kurulur. */
2484
- /** Çalan biçim grubunun kaynakları (kalite menüsü bunlar) — bkz. `sourceGroups`. */
2485
- s(this, "currentSources", []);
2486
- /** `sources` biçime göre gruplu, `sourcePriority` sırasıyla; ölümcül hatada sıradakine geçilir. */
2487
- s(this, "sourceGroups", []);
2488
- s(this, "activeGroup", 0);
2489
- /** Sıradaki gruba geçiş başladı — aynı arızanın ikinci hata olayı hata ekranı açmasın. */
2490
- s(this, "fallbackPending", !1);
2491
- /** hls.js ölümcül hatasının MediaError karşılığı (video.error oluşmaz) — hp:sourcefallback detayı için. */
2492
- s(this, "streamErrorCode");
2493
- s(this, "activeSourceLabel", "");
2494
- s(this, "lastHlsLevels", []);
2495
- s(this, "lastHlsActive", -1);
2496
- /** options.audio — kapak + plak sahnesi, kontroller hep görünür, tam ekran yok. */
2497
- s(this, "audioMode", !1);
2498
- s(this, "inViewAutoplay", null);
2499
- s(this, "unregisterSticky", null);
2500
- s(this, "playlistRunner", null);
2501
- s(this, "hopeStory", null);
2502
- s(this, "markProgress", null);
2503
- s(this, "segments", null);
2504
- s(this, "spriteThumbnails", null);
2505
- s(this, "countdownScreen", null);
2506
- s(this, "geoChecker", null);
2507
- s(this, "redirectScreen", null);
2508
- s(this, "redirectKey", "");
2509
- /** Eklentileri çalıştıran taraf — yalnızca bir eklenti kullanılınca indirilir (plugin-api/PluginHost). */
2510
- s(this, "pluginHost", null);
2511
- /** `player.use()` ile çalışırken eklenenler. */
2512
- s(this, "runtimePlugins", []);
2513
- s(this, "offGlobalPlugins", null);
2514
- s(this, "accessibility", null);
2515
- s(this, "accessibilityKey", "");
2516
- s(this, "playbackHistory", null);
2517
- s(this, "historyKey", "");
2518
- s(this, "qrResume", null);
2519
- s(this, "pauseAd", null);
2520
- s(this, "adTriggers", null);
2521
- s(this, "castController", null);
2522
- /** İçerik Chromecast'te oynuyor (player kumanda) — yerel reklam / otomatik oynatma devre dışı. */
2523
- s(this, "casting", !1);
2524
- s(this, "dubbing", null);
2525
- s(this, "liveWallClock", null);
2526
- s(this, "daiController", null);
2527
- s(this, "instanceKey");
2528
- s(this, "subtitleTracks", []);
2529
- /** Altyazı seçiminin tek giriş noktası — iOS native tam ekrandan dönüşte de kullanılır. */
2530
- s(this, "selectCaption", null);
2531
- /** `applyOptions()`'ta aktif bir altyazı track'i seçiliyken `true` — dil değişince Boyut/Konum görünümünü tazelemek için. */
2532
- s(this, "captionTrackActive", !1);
2533
- /** `options.subtitles` izleri. */
2534
- s(this, "optionTracks", []);
2535
- /** Yayının izleri: hls.js'ten (havuzda, `sub:`/`cc:`) ya da tarayıcının native HLS in-band izleri (`native:`). */
2536
- s(this, "streamTracks", []);
2537
- /** hls.js aynı cue'yu (seek sonrası) yeniden gönderebilir — iz başına eklenenler. */
2538
- s(this, "streamCueKeys", /* @__PURE__ */ new Map());
2539
- /** Seçili altyazı — yayın izleri sonradan gelince seçim korunur. */
2540
- s(this, "activeCaptionLabel", null);
2541
- s(this, "streamAudio", { tracks: [], active: -1 });
2542
- /**
2543
- * countdownScreen varken gerçek init (kaynak + içerik plugin'leri) ertelenir; en güncel options snapshot'ı.
2544
- * onComplete kaydı tek sefer yapılır (bkz. playbackInitRegistered) — init birden fazla kez tetiklenmesin.
2545
- */
2546
- s(this, "pendingPlaybackOptions", null);
2547
- s(this, "playbackInitRegistered", !1);
2548
- /**
2549
- * countdownScreen gibi alanlar yalnızca .options ile gelir. connectedCallback'teki ilk (options'suz) geçiş chrome'u
2550
- * bir an açıp player'ı gösteriyordu; 'boot' bloklayıcısı gerçek options gelene kadar bekletir.
2551
- */
2552
- s(this, "bootResolved", !1);
2553
- s(this, "bootGraceTimer", null);
2554
- /**
2555
- * Son uygulanan `.options` nesnesi + attribute'lar. `.options` element sayfaya eklenmeden önce verilince
2556
- * connectedCallback AYNI seçenekleri yeniden uyguluyordu; değişen bir şey yoksa bu ikinci geçiş atlanır.
2557
- */
2558
- s(this, "lastSynced", null);
2559
- /**
2560
- * applyOptions'ın asenkron kısmı (plugin kurulumu + kaynak yükleme) aynı anda tek kez çalışır. İki geçiş
2561
- * üst üste binince `!this.adsController` gibi kontroller ikisinde de geçiyor, plugin (ör. IMA) iki kez kuruluyordu.
2562
- * Çalışırken gelen seçenekler bekletilir; bitince yalnızca en sonuncusu uygulanır.
2563
- */
2564
- s(this, "pluginApplyRun", null);
2565
- s(this, "pendingPluginOptions", null);
2566
- s(this, "_options", {});
2567
- s(this, "hideTimer", null);
2568
- s(this, "cursorTimer", null);
2569
- /** null = imleç hiç gizlenmez (options.cursorHideDelayMs: false). */
2570
- s(this, "cursorHideDelayMs", Se);
2571
- /** Fare kontrollerin (buton/seek bar) üzerinde mi — üzerindeyken otomatik gizlenmez; videonun üstünde hareketsizse gizlenir. */
2572
- s(this, "pointerOverControls", !1);
2573
- /** Kalite menüsünde şu an HLS seviyeleri mi var (kaynak değişince temizlemek için). */
2574
- s(this, "hlsQualitiesShown", !1);
2575
- /** Son uygulanan options.showRemainingTime — bkz. applyOptions. */
2576
- s(this, "appliedShowRemaining");
2577
- s(this, "autoHideDelayMs", Ce);
2578
- s(this, "tapCandidate", !1);
2579
- s(this, "tapStartX", 0);
2580
- s(this, "tapStartY", 0);
2581
- /** Tüm UI'ın paylaştığı tek, mutable sözlük — dil değişince referans değil alanlar güncellenir. */
2582
- s(this, "i18n", De("tr"));
2583
- /** IMA SDK'nın kendi ad-UI dili (skip butonu/sayaç metni) de aynı dili takip etsin diye — bkz. plugins/ads/AdsController. */
2584
- s(this, "localeCode", "tr");
2585
- s(this, "onMediaError", () => {
2586
- const e = this.videoEl.error;
2587
- if (!e) return;
2588
- const i = { 1: "MEDIA_ERR_ABORTED", 2: "MEDIA_ERR_NETWORK", 3: "MEDIA_ERR_DECODE", 4: "MEDIA_ERR_SRC_NOT_SUPPORTED" }, r = this.videoEl.currentSrc;
2589
- this.log.add({
2590
- source: "media",
2591
- message: e.message || i[e.code] || `MediaError ${e.code}`,
2592
- // Ses aygıtı yok (Firefox): video sessiz oynamaya devam ediyor — kayda düşer ama ölümcül değil.
2593
- fatal: !Z(e),
2594
- details: { code: e.code, name: i[e.code], src: r && !r.startsWith("blob:") ? r : r ? "MediaSource (hls.js)" : void 0 }
2595
- });
2596
- });
2597
- s(this, "onSubtitleError", (e) => {
2598
- const i = e.detail;
2599
- this.log.add({ source: "subtitles", message: `Subtitle file could not be loaded: ${i.message}`, details: { src: i.src } });
2600
- });
2601
- s(this, "onPointerTypeTrack", (e) => {
2602
- this.lastPointerType = e.pointerType;
2603
- });
2604
- /** Sağ tık: tarayıcı menüsü yerine player adı + sürüm (options.contextMenu). */
2605
- s(this, "onContextMenu", (e) => {
2606
- const i = this.contextMenuConfig;
2607
- !i || this.lastPointerType !== "mouse" || (e.preventDefault(), this.contextMenu.show(e.clientX, e.clientY, [
2608
- { label: "HopeCorePlayer", meta: `v${G}` },
2609
- ...i.stats ? [{ label: this.i18n.statsTitle, onSelect: () => void this.toggleStats(!0) }] : [],
2610
- // Yalnızca debug açıkken ve kayıtlı bir hata varsa.
2611
- ...this.debugEnabled && this.log.entries.length ? [{ label: this.i18n.debugTitle, meta: String(this.log.entries.length), onSelect: () => void this.showDebugLog() }] : []
2612
- ]));
2613
- });
2614
- s(this, "onStreamTextTracks", (e) => {
2615
- const i = this.streamTracks.filter((r) => r.id.startsWith("native:"));
2616
- if (!e.length)
2617
- Oe(this.videoEl, "stream"), this.streamCueKeys.clear(), this.streamTracks = i;
2618
- else {
2619
- const r = new Set([...this.optionTracks, ...i].map((o) => o.label));
2620
- this.streamTracks = [
2621
- ...i,
2622
- ...e.map((o) => {
2623
- const a = this.uniqueLabel(this.streamTrackLabel(o.label, o.lang) || o.id, o.kind === "captions" ? "CC" : o.lang || o.kind, r);
2624
- return { id: o.id, label: a, track: ze(this.videoEl, "stream", o.kind, a, o.lang) };
2625
- })
2626
- ];
2627
- }
2628
- this.rebuildCaptions(this.activeCaptionLabel);
2629
- });
2630
- s(this, "onStreamCues", (e, i) => {
2631
- var a;
2632
- const r = (a = this.streamTracks.find((l) => l.id === e)) == null ? void 0 : a.track;
2633
- if (!r) return;
2634
- let o = this.streamCueKeys.get(r);
2635
- o || this.streamCueKeys.set(r, o = /* @__PURE__ */ new Set());
2636
- for (const l of i) {
2637
- const h = `${l.startTime}|${l.endTime}|${l.text}`;
2638
- o.has(h) || (o.add(h), r.addCue(l));
2639
- }
2640
- });
2641
- /** Tarayıcının kendi (native HLS) altyazı izleri — bizim havuz izlerimiz ve metadata izleri hariç. */
2642
- s(this, "onNativeTextTracksChanged", () => {
2643
- const e = Array.from(this.videoEl.textTracks).filter((a) => (a.kind === "subtitles" || a.kind === "captions") && !ft(a)), i = this.streamTracks.some((a) => a.id.startsWith("native:"));
2644
- if (!e.length && !i) return;
2645
- const r = this.streamTracks.filter((a) => !a.id.startsWith("native:")), o = new Set([...this.optionTracks, ...r].map((a) => a.label));
2646
- this.streamTracks = [
2647
- ...r,
2648
- ...e.map((a, l) => ({
2649
- id: `native:${l}`,
2650
- label: this.uniqueLabel(a.label || a.language || `${this.i18n.captions} ${l + 1}`, a.language || String(l + 1), o),
2651
- track: a
2652
- }))
2653
- ], this.rebuildCaptions(this.activeCaptionLabel);
2654
- });
2655
- /** Yayında birden fazla ses izi varsa ayarlarda "Ses" alt menüsü (HLS alternatif ses / Safari audioTracks). */
2656
- s(this, "onStreamAudioTracks", (e, i) => {
2657
- this.streamAudio = { tracks: e, active: i };
2658
- const r = this.controlBar.settingsMenu, o = /* @__PURE__ */ new Set(), a = new Map(e.map((l) => [l.index, this.uniqueLabel(this.streamTrackLabel(l.label, l.lang), String(l.index + 1), o)]));
2659
- if (e.length <= 1) {
2660
- r.unregisterSubmenu(Ae);
2661
- return;
2662
- }
2663
- r.registerSubmenu({
2664
- key: Ae,
2665
- title: this.i18n.audioTrack,
2666
- getValueLabel: () => a.get(i) ?? "",
2667
- getItems: () => e.map((l) => ({ label: a.get(l.index), active: l.index === i, onSelect: () => this.sourceManager.setAudioTrack(l.index) }))
2668
- });
2669
- });
2670
- /** Playlist panelinin monte edileceği, .video-area'nın ALTINDAKİ (shadow root içi) kapsayıcı — ilk ihtiyaçta oluşturulur. */
2671
- s(this, "panelContainer", null);
2672
- s(this, "onHlsLevelsChanged", (e, i) => {
2673
- var l;
2674
- if (this.lastHlsLevels = e, this.lastHlsActive = i, e.length === 0 && this.hlsQualitiesShown) {
2675
- this.hlsQualitiesShown = !1, this.controlBar.setQualities([], "");
2676
- return;
2677
- }
2678
- if (e.length <= 1) return;
2679
- this.hlsQualitiesShown = !0;
2680
- const r = (h) => `${h.height}p`, o = this.qualityGate, a = (h) => !!(o != null && o.isLocked(h.height));
2681
- if (o) {
2682
- const h = e.filter((c) => !a(c)), g = h.length ? h : [e.reduce((c, d) => d.height < c.height ? d : c)];
2683
- this.sourceManager.setMaxLevel(g.reduce((c, d) => d.height > c.height ? d : c).index);
2684
- } else
2685
- this.sourceManager.setMaxLevel(-1);
2686
- this.controlBar.setQualities(
2687
- [
2688
- { label: this.i18n.autoQuality, onSelect: () => this.sourceManager.setLevel(-1) },
2689
- // Yüksekten düşüğe (hls.js artan sıralıyor) — l.index hls.js'teki gerçek seviye numarası, sıradan bağımsız.
2690
- ...[...e].sort((h, g) => g.height - h.height).map((h) => ({
2691
- label: r(h),
2692
- locked: a(h),
2693
- onSelect: a(h) ? () => o == null ? void 0 : o.requestUnlock() : () => this.sourceManager.setLevel(h.index)
2694
- }))
2695
- ],
2696
- i === -1 || !e[i] ? this.i18n.autoQuality : r(e[i])
2697
- ), (l = this.rewardedUnlock) == null || l.onQualitiesChanged();
2698
- });
2699
- s(this, "onFullscreenChange", (e) => {
2700
- this.controlBar.setFullscreenState(this.isFullscreenActive()), (e == null ? void 0 : e.type) === "webkitbeginfullscreen" ? this.showCaptionsNatively() : (e == null ? void 0 : e.type) === "webkitendfullscreen" && this.syncCaptionsFromNative();
2701
- });
2702
- // ── Oynatma durumuna göre merkez buton + otomatik gizlenme ──
2703
- // Değer: 'hidden' (tamamen gizle — countdown/geo) ya da 'reduced' (yalnızca oynat/duraklat + ses — ads).
2704
- s(this, "chromeBlockers", /* @__PURE__ */ new Map());
2705
- s(this, "onPlay", () => {
2706
- this.matches(":hover") && this.scheduleCursorHide(), this.isChromeBlocked || (this.centerPlayButton.style.opacity = "0", this.centerPlayButton.style.pointerEvents = "none", this.scheduleAutoHide()), this.dispatchEvent(new CustomEvent("hp:play"));
2707
- });
2708
- s(this, "onPause", () => {
2709
- this.hideTimer && clearTimeout(this.hideTimer), this.showCursor(), this.isChromeBlocked || (this.centerPlayButton.style.opacity = "1", this.centerPlayButton.style.pointerEvents = "auto", this.showChrome()), this.dispatchEvent(new CustomEvent("hp:pause"));
2710
- });
2711
- s(this, "onEnded", () => {
2712
- this.dispatchEvent(new CustomEvent("hp:ended"));
2713
- });
2714
- s(this, "onRateChange", () => {
2715
- this.dispatchEvent(new CustomEvent("hp:ratechange", { detail: { rate: this.videoEl.playbackRate } }));
2716
- });
2717
- s(this, "onPointerDownFocus", () => {
2718
- var e;
2719
- this.focus({ preventScroll: !0 }), (e = this.adsController) == null || e.initializeDisplayContainerOnce();
2720
- });
2721
- s(this, "onVideoPressStart", (e) => {
2722
- this.tapCandidate = !0;
2723
- const i = "touches" in e ? e.touches[0] : e;
2724
- i && (this.tapStartX = i.clientX, this.tapStartY = i.clientY);
2725
- });
2726
- s(this, "onVideoPressEnd", (e) => {
2727
- var l, h;
2728
- if (!this.tapCandidate || (this.tapCandidate = !1, this.isChromeBlocked) || (l = this.gestureControls) != null && l.isCurrentlyHolding()) return;
2729
- const i = "changedTouches" in e;
2730
- if (!i && Date.now() - this.lastTouchEndAt < 800) return;
2731
- i && (this.lastTouchEndAt = Date.now());
2732
- const r = i ? e.changedTouches[0] : e;
2733
- if (r && Math.hypot(r.clientX - this.tapStartX, r.clientY - this.tapStartY) > ei) {
2734
- i && !this.isChromeBlocked && this.scheduleAutoHide();
2735
- return;
2736
- }
2737
- const o = i ? "touch" : this.lastPointerType, a = () => this.onBackgroundTap(o, () => {
2738
- this.videoEl.paused ? this.videoEl.play().catch(() => {
2739
- }) : this.videoEl.pause();
2740
- });
2741
- r && ((h = this.tapGestures) != null && h.handleTap(r.clientX, o === "pen" ? "pen" : o, a)) || a();
2742
- });
2743
- s(this, "onVideoPressCancel", () => {
2744
- this.tapCandidate = !1;
2745
- });
2746
- s(this, "onPointerMove", (e) => {
2747
- if (e.pointerType !== "mouse") {
2748
- this.chromeVisible && this.scheduleAutoHide();
2749
- return;
2750
- }
2751
- this.pointerOverControls = e.composedPath().includes(this.chromeEl), this.scheduleAutoHide(), e.pointerType === "mouse" && this.scheduleCursorHide();
2752
- });
2753
- s(this, "onPointerLeave", (e) => {
2754
- e.pointerType === "mouse" && (this.pointerOverControls = !1, this.scheduleAutoHide(), this.showCursor());
2755
- });
2756
- s(this, "scheduleAutoHide", () => {
2757
- this.showChrome(), this.hideTimer && clearTimeout(this.hideTimer), !(this.videoEl.paused || this.loadingActive) && (this.audioMode || (this.hideTimer = setTimeout(() => {
2758
- this.audioMode || this.videoEl.paused || this.loadingActive || this.pointerOverControls || this.controlBar.settingsMenu.isOpen || this.setChromeOpacity("0");
2759
- }, this.lastPointerType === "mouse" ? this.autoHideDelayMs : Math.max(this.autoHideDelayMs, Zt))));
2760
- });
2761
- Gt(), this.root = this.attachShadow({ mode: "open" });
2762
- const e = document.createElement("style");
2763
- e.textContent = _e, this.root.appendChild(e);
2764
- const i = document.createElement("div");
2765
- i.className = "hp-root", i.innerHTML = ri, this.root.appendChild(i), this.videoArea = this.root.querySelector(".video-area"), this.videoEl = this.root.querySelector("video"), this.adLayerEl = this.root.querySelector('[part="ad-layer"]'), this.instanceKey = `hp-${Math.random().toString(36).slice(2, 10)}`, this.prerollGate = new Xt(this.videoEl), this.prerollGate.onWaitChange = (o) => this.onPrerollWaitChange(o), this.videoEl.addEventListener("error", this.onMediaError), this.videoEl.addEventListener("hp-internal:subtitle-error", this.onSubtitleError), this.loadingSpinner = new ut(this.videoEl), this.root.querySelector(".media-layer").appendChild(this.loadingSpinner.el), this.errorScreen = new mt(this.videoEl, this.i18n), this.errorScreen.setOnRetry(() => void this.retrySource()), this.errorScreen.setOnShown(({ code: o, message: a }) => this.dispatchEvent(new CustomEvent("hp:error", { detail: { message: a, code: o } }))), this.videoArea.appendChild(this.errorScreen.el), this.centerPlayButton = document.createElement("button"), this.centerPlayButton.type = "button", this.centerPlayButton.setAttribute("part", "center-play-button"), this.centerPlayButton.setAttribute("aria-label", this.i18n.play), this.centerPlayButton.className = "hp-center-play hp:absolute hp:inset-0 hp:flex hp:items-center hp:justify-center hp:bg-transparent hp:border-0 hp:cursor-pointer hp:text-on-surface hp:transition-opacity";
2766
- const r = document.createElement("span");
2767
- r.className = "hp-chip hp:flex hp:items-center hp:justify-center hp:w-16 hp:h-16", r.style.borderRadius = "9999px", r.appendChild(M("play", "hp:text-2xl")), this.centerPlayButton.appendChild(r), this.centerPlayButton.addEventListener("click", (o) => {
2768
- var c;
2769
- const a = () => {
2770
- this.videoEl.paused && this.videoEl.play();
2771
- }, l = this.lastPointerType === "pen" ? "pen" : this.lastPointerType === "touch" ? "touch" : null, g = o.composedPath().includes(r) ? a : () => this.onBackgroundTap(l ?? "mouse", a);
2772
- l && ((c = this.tapGestures) != null && c.handleTap(o.clientX, l, g)) || g();
2773
- }), this.videoArea.appendChild(this.centerPlayButton), this.centerPlayObserver = new ResizeObserver(() => requestAnimationFrame(() => this.layoutCenterPlay())), this.centerPlayObserver.observe(this.videoArea), this.chromeEl = document.createElement("div"), this.chromeEl.className = "hp-chrome hp:absolute hp:inset-0 hp:z-20 hp:pointer-events-none", this.videoArea.appendChild(this.chromeEl), this.sourceManager = new Ke(this.videoEl, {
2774
- onLevelsChanged: this.onHlsLevelsChanged,
2775
- onAudioTracksChanged: this.onStreamAudioTracks,
2776
- onTextTracksFound: this.onStreamTextTracks,
2777
- onCues: this.onStreamCues,
2778
- onFatalError: (o) => {
2779
- const a = o === "network" ? 2 : 3;
2780
- this.streamErrorCode = a, this.errorScreen.showStreamError(a);
2781
- },
2782
- onStreamError: (o) => this.log.add({
2783
- source: "stream",
2784
- message: `${o.type}: ${o.details}`,
2785
- fatal: o.fatal,
2786
- details: { url: o.url, httpStatus: o.httpStatus, reason: o.reason, engine: "hls.js" }
2787
- })
2788
- }), this.errorScreen.setShouldShow(() => !this.sourceManager.isRecovering() && !this.tryNextSourceGroup()), this.controlBar = new at(
2789
- this.videoEl,
2790
- Ee,
2791
- {
2792
- onRequestFullscreen: () => this.requestFullscreenCompat(),
2793
- liveSyncPosition: () => {
2794
- var o;
2795
- return ((o = this.sourceManager.hlsInstance) == null ? void 0 : o.liveSyncPosition) ?? null;
2796
- },
2797
- onExitFullscreen: () => this.exitFullscreenCompat(),
2798
- isFullscreen: () => this.isFullscreenActive(),
2799
- // adsController sonradan kurulur — closure'lar her çağrıda güncel this.adsController'ı okur.
2800
- isAdActive: () => this.isAdPlaying(),
2801
- interceptTogglePlay: () => this.cancelPrerollWait(),
2802
- onLoadingChange: (o) => this.onLoadingChange(o),
2803
- adTogglePlay: () => {
2804
- var o;
2805
- return (o = this.adsController) == null ? void 0 : o.toggleAdPlayPause();
2806
- },
2807
- adIsPaused: () => {
2808
- var o;
2809
- return ((o = this.adsController) == null ? void 0 : o.isAdPaused()) ?? !0;
2810
- },
2811
- adVolume: {
2812
- isAdActive: () => this.isAdPlaying(),
2813
- getVolume: () => {
2814
- var o;
2815
- return ((o = this.adsController) == null ? void 0 : o.getAdVolume()) ?? 1;
2816
- },
2817
- setVolume: (o) => {
2818
- var a;
2819
- return (a = this.adsController) == null ? void 0 : a.setAdVolume(o);
2820
- },
2821
- toggleMute: () => {
2822
- var o;
2823
- return (o = this.adsController) == null ? void 0 : o.toggleAdMute();
2824
- }
2825
- }
2826
- },
2827
- this.i18n
2828
- ), this.chromeEl.appendChild(this.controlBar.el), this.chromeEl.appendChild(this.controlBar.topEl), this.videoArea.appendChild(this.controlBar.volumePanel.unmuteBadge), this.captionRenderer = new I(this.videoEl, this.videoArea, this.controlBar.seekBar.el, this.i18n), this.videoArea.appendChild(this.captionRenderer.layerEl), this.keyboard = new ct(
2829
- this,
2830
- this.videoEl,
2831
- () => this.isFullscreenActive() ? this.exitFullscreenCompat() : this.requestFullscreenCompat()
2832
- ), this.tooltip = new dt(this.videoArea), this.contextMenu = new Nt(this.videoArea), this.seekFeedback = new Ft(this.i18n), this.videoArea.appendChild(this.seekFeedback.el), this.controlBar.onSkip = (o) => this.seekFeedback.show(o), this.keyboard.onSeek = (o) => this.seekFeedback.show(o), this.keyboard.interceptTogglePlay = () => this.cancelPrerollWait(), this.controlBar.seekBar.onKeyboardSeek = (o) => this.seekFeedback.show(o), this.blockChrome("boot");
2833
- }
2834
- static get observedAttributes() {
2835
- return ["src", "poster", "autoplay", "muted", "loop", "theme", "locale"];
2836
- }
2837
- connectedCallback() {
2838
- this.offGlobalPlugins ?? (this.offGlobalPlugins = _t(() => void this.syncPlugins())), this.hasAttribute("tabindex") || (this.tabIndex = 0), this.syncFromAttributes(), this.bootResolved || (this.bootGraceTimer = setTimeout(() => {
2839
- this.bootGraceTimer = null, this.bootResolved || (this.bootResolved = !0, this.syncFromAttributes());
2840
- }, 80)), this.videoEl.addEventListener("play", this.onPlay), this.videoEl.addEventListener("pause", this.onPause), this.videoEl.addEventListener("ended", this.onEnded), this.videoEl.addEventListener("ratechange", this.onRateChange), this.addEventListener("pointermove", this.onPointerMove), this.addEventListener("pointerleave", this.onPointerLeave), this.addEventListener("pointerdown", this.onPointerDownFocus), document.addEventListener("fullscreenchange", this.onFullscreenChange), document.addEventListener("webkitfullscreenchange", this.onFullscreenChange), this.videoEl.addEventListener("webkitbeginfullscreen", this.onFullscreenChange), this.videoEl.addEventListener("webkitendfullscreen", this.onFullscreenChange), this.addEventListener("contextmenu", this.onContextMenu), this.addEventListener("pointerdown", this.onPointerTypeTrack, !0), this.videoEl.textTracks.addEventListener("addtrack", this.onNativeTextTracksChanged), this.videoEl.textTracks.addEventListener("removetrack", this.onNativeTextTracksChanged), this.controlBar.settingsMenu.onOpenChange = (e) => {
2841
- e && this.hideTimer && clearTimeout(this.hideTimer), e || this.scheduleAutoHide(), this.tooltip.recheckOcclusion();
2842
- }, this.tooltip.setOcclusionCheck((e) => {
2843
- const i = this.controlBar.settingsMenu.panelRect;
2844
- return !!i && e.left < i.right && e.right > i.left && e.top < i.bottom && e.bottom > i.top;
2845
- }), this.videoEl.addEventListener("mousedown", this.onVideoPressStart), this.videoEl.addEventListener("mouseup", this.onVideoPressEnd), this.videoEl.addEventListener("mouseleave", this.onVideoPressCancel), this.videoEl.addEventListener("touchstart", this.onVideoPressStart, { passive: !0 }), this.videoEl.addEventListener("touchend", this.onVideoPressEnd), this.videoEl.addEventListener("touchcancel", this.onVideoPressCancel), queueMicrotask(() => {
2846
- this.isConnected && this.dispatchEvent(new CustomEvent("hp:ready"));
2847
- });
2848
- }
2849
- disconnectedCallback() {
2850
- var e, i, r, o, a, l, h, g, c, d, m, f, x, v, y, k, C, w, T, A, u, p, b, E, S, L, z, O, ee, te, ie, re;
2851
- (e = this.centerPlayObserver) == null || e.disconnect(), this.showCursor(), (i = this.miniProgress) == null || i.destroy(), this.miniProgress = null, this.videoEl.removeEventListener("play", this.onPlay), this.videoEl.removeEventListener("pause", this.onPause), this.videoEl.removeEventListener("ended", this.onEnded), this.videoEl.removeEventListener("ratechange", this.onRateChange), this.removeEventListener("pointermove", this.onPointerMove), this.removeEventListener("pointerleave", this.onPointerLeave), this.removeEventListener("pointerdown", this.onPointerDownFocus), this.controlBar.settingsMenu.onOpenChange = null, document.removeEventListener("fullscreenchange", this.onFullscreenChange), document.removeEventListener("webkitfullscreenchange", this.onFullscreenChange), this.videoEl.removeEventListener("webkitbeginfullscreen", this.onFullscreenChange), this.videoEl.removeEventListener("webkitendfullscreen", this.onFullscreenChange), this.removeEventListener("contextmenu", this.onContextMenu), this.removeEventListener("pointerdown", this.onPointerTypeTrack, !0), this.videoEl.textTracks.removeEventListener("addtrack", this.onNativeTextTracksChanged), this.videoEl.textTracks.removeEventListener("removetrack", this.onNativeTextTracksChanged), this.videoEl.removeEventListener("mousedown", this.onVideoPressStart), this.videoEl.removeEventListener("mouseup", this.onVideoPressEnd), this.videoEl.removeEventListener("mouseleave", this.onVideoPressCancel), this.videoEl.removeEventListener("touchstart", this.onVideoPressStart), this.videoEl.removeEventListener("touchend", this.onVideoPressEnd), this.videoEl.removeEventListener("touchcancel", this.onVideoPressCancel), this.controlBar.destroy(), this.captionRenderer.destroy(), this.keyboard.destroy(), this.tooltip.destroy(), this.loadingSpinner.destroy(), this.errorScreen.destroy(), this.seekFeedback.destroy(), this.contextMenu.destroy(), (r = this.statsPanel) == null || r.destroy(), (o = this.debugPanel) == null || o.destroy(), this.videoEl.removeEventListener("error", this.onMediaError), this.videoEl.removeEventListener("hp-internal:subtitle-error", this.onSubtitleError), (a = this.tapGestures) == null || a.destroy(), this.sourceManager.destroy(), (l = this.adsController) == null || l.destroy(), (h = this.gestureControls) == null || h.destroy(), (g = this.loopSection) == null || g.destroy(), (c = this.audioStage) == null || c.destroy(), this.audioStage = null, (d = this.rewardedUnlock) == null || d.destroy(), this.rewardedUnlock = null, (m = this.sponsorship) == null || m.destroy(), this.sponsorship = null, (f = this.adTriggers) == null || f.destroy(), this.adTriggers = null, (x = this.castController) == null || x.destroy(), this.castController = null, (v = this.inViewAutoplay) == null || v.destroy(), (y = this.unregisterSticky) == null || y.call(this), (k = this.playlistRunner) == null || k.destroy(), (C = this.hopeStory) == null || C.destroy(), (w = this.markProgress) == null || w.destroy(), (T = this.segments) == null || T.destroy(), (A = this.spriteThumbnails) == null || A.destroy(), (u = this.countdownScreen) == null || u.destroy(), (p = this.geoChecker) == null || p.destroy(), (b = this.redirectScreen) == null || b.destroy(), (E = this.pluginHost) == null || E.destroy(), this.pluginHost = null, (S = this.offGlobalPlugins) == null || S.call(this), this.offGlobalPlugins = null, (L = this.accessibility) == null || L.destroy(), this.accessibility = null, this.accessibilityKey = "", (z = this.playbackHistory) == null || z.destroy(), this.playbackHistory = null, this.historyKey = "", (O = this.qrResume) == null || O.destroy(), (ee = this.pauseAd) == null || ee.destroy(), this.pauseAd = null, (te = this.dubbing) == null || te.destroy(), (ie = this.liveWallClock) == null || ie.destroy(), (re = this.daiController) == null || re.destroy(), this.prerollGate.release(!1), this.hideTimer && clearTimeout(this.hideTimer), this.bootGraceTimer && clearTimeout(this.bootGraceTimer), this.lastSynced = null;
2852
- }
2853
- /** Reklam/consent-farkında plugin'lerin (gesture/sticky/in-view-autoplay) ortak sorgusu. */
2854
- isAdPlaying() {
2855
- return this.chromeBlockers.has("ads");
2856
- }
2857
- attributeChangedCallback() {
2858
- this.syncFromAttributes();
2859
- }
2860
- get options() {
2861
- return this._options;
2862
- }
2863
- set options(e) {
2864
- this._options = e ?? {}, this.bootGraceTimer && (clearTimeout(this.bootGraceTimer), this.bootGraceTimer = null), this.bootResolved = !0, this.lastSynced = null, this.syncFromAttributes();
2865
- }
2866
- play() {
2867
- return this.prerollGate.interceptPlay() ? Promise.resolve() : this.videoEl.play();
2868
- }
2869
- pause() {
2870
- this.videoEl.pause();
2871
- }
2872
- /** Şu anki oynatma yolu: `native` (MP4/WebM), `native-hls` (tarayıcının HLS'i) ya da `hls.js` — teşhis için. */
2873
- get playbackEngine() {
2874
- return this.sourceManager.engine;
2875
- }
2876
- /** Player'ın hata kaydı (medya, yayın, reklam, altyazı) — `options.debug` kapalıyken de tutulur. */
2877
- get errorLog() {
2878
- return this.log;
2879
- }
2880
- /** Hata ayıklama penceresini aç (sağ tık menüsündeki "Hata ayıklama" ile aynı). */
2881
- async showDebugLog() {
2882
- if (!this.debugPanel) {
2883
- const { installDebugPanel: e } = await import("./debugPanel-Bnc_7GOn.js");
2884
- this.debugPanel ?? (this.debugPanel = e({ containerEl: this.videoArea, i18n: this.i18n, log: this.log, version: G }));
2885
- }
2886
- this.debugPanel.show();
2887
- }
2888
- /**
2889
- * Açık reklam tetikleyici reklamını kapat (adTriggers). `layout: 'none'` kreatifleri kendi kodlarından çağırabilir:
2890
- * `window.top.document.querySelector('hope-player').closeAdTrigger()`.
2891
- */
2892
- closeAdTrigger() {
2893
- var e;
2894
- (e = this.adTriggers) == null || e.close("user");
2895
- }
2896
- /** Teknik istatistik panelini aç/kapat (`force`: true = aç, false = kapat). Sağ tık menüsündeki "İstatistikler" ile aynı. */
2897
- async toggleStats(e) {
2898
- if (!this.statsPanel) {
2899
- if (e === !1) return;
2900
- const { installStats: i } = await import("./statsPanel-DSClIwA3.js");
2901
- this.statsPanel ?? (this.statsPanel = i({
2902
- videoEl: this.videoEl,
2903
- containerEl: this.videoArea,
2904
- i18n: this.i18n,
2905
- version: G,
2906
- getEngine: () => this.sourceManager.engine,
2907
- getHls: () => this.sourceManager.hlsInstance
2908
- }));
2909
- }
2910
- this.statsPanel.toggle(e);
2911
- }
2912
- /** hls.js ile oynatılıyorsa hls.js instance'ı (olaylar, `bandwidthEstimate`, `levels`...); değilse `null`. */
2913
- get hls() {
2914
- return this.sourceManager.hlsInstance;
2915
- }
2916
- /** Eklenti ekler (sayfa yenilenene ya da `remove()` çağrılana kadar). */
2917
- use(e, i) {
2918
- const r = [e, i];
2919
- return this.runtimePlugins.push(r), this.syncPlugins(), {
2920
- name: typeof e == "function" ? "" : e.name,
2921
- remove: () => {
2922
- const o = this.runtimePlugins.indexOf(r);
2923
- o < 0 || (this.runtimePlugins.splice(o, 1), this.syncPlugins());
2924
- }
2925
- };
2926
- }
2927
- /** Eklentiyi sayfadaki tüm player'lara ekler. */
2928
- static use(e, i) {
2929
- return qt(e, i);
2930
- }
2931
- async syncPlugins() {
2932
- var o;
2933
- const e = this._options, i = (o = e.skipSegments) != null && o.length ? [[() => import("./skipSegments-BbWzPpXz.js").then((a) => a.skipSegmentsPlugin), e.skipSegments]] : [], r = [...Vt(), ...e.plugins ?? [], ...this.runtimePlugins];
2934
- if (!(!i.length && !r.length && !this.pluginHost)) {
2935
- if (!this.pluginHost) {
2936
- const { PluginHost: a } = await import("./pluginHost-DjvLmMYZ.js");
2937
- this.pluginHost ?? (this.pluginHost = new a({
2938
- element: this,
2939
- video: this.videoEl,
2940
- videoArea: this.videoArea,
2941
- chromeEl: this.chromeEl,
2942
- labels: this.i18n,
2943
- locale: () => this._options.locale ?? "tr",
2944
- currentSrc: () => this.sourceManager.currentSrc,
2945
- isAdPlaying: () => this.isAdPlaying(),
2946
- isFullscreen: () => this.isFullscreenActive(),
2947
- addControlButton: (l, h) => this.controlBar.addPluginButton(l, h),
2948
- settings: {
2949
- registerToggle: (l) => this.controlBar.settingsMenu.registerToggle(l.key, l),
2950
- unregisterToggle: (l) => this.controlBar.settingsMenu.unregisterToggle(l),
2951
- registerSubmenu: (l) => this.controlBar.settingsMenu.registerSubmenu(l),
2952
- unregisterSubmenu: (l) => this.controlBar.settingsMenu.unregisterSubmenu(l)
2953
- },
2954
- log: (l, h) => this.log.add({ source: "player", message: l, details: h })
2955
- }));
2956
- }
2957
- await this.pluginHost.sync(i, r);
2958
- }
2959
- }
2960
- /** `options.qrResume` kuruluysa "telefonundan devam et" QR ekranını manuel göster (ör. entegratörün kendi "telefona gönder" butonu) — otomatik gösterim kuralları (minElapsed/minRemaining) burada uygulanmaz. */
2961
- showQrResume() {
2962
- var e;
2963
- (e = this.qrResume) == null || e.show();
2964
- }
2965
- get showRemainingTime() {
2966
- return this.controlBar.getShowRemaining();
2967
- }
2968
- set showRemainingTime(e) {
2969
- this.controlBar.setShowRemaining(e);
2970
- }
2971
- toggleTimeDisplay() {
2972
- this.controlBar.toggleTimeMode();
2973
- }
2974
- syncFromAttributes() {
2975
- var r;
2976
- const e = {
2977
- src: this.getAttribute("src") ?? void 0,
2978
- poster: this.getAttribute("poster") ?? void 0,
2979
- autoplay: this.hasAttribute("autoplay"),
2980
- muted: this.hasAttribute("muted"),
2981
- loop: this.hasAttribute("loop"),
2982
- theme: this.getAttribute("theme") ?? void 0,
2983
- locale: this.getAttribute("locale") ?? void 0
2984
- }, i = JSON.stringify(e);
2985
- if (this.bootResolved) {
2986
- if (((r = this.lastSynced) == null ? void 0 : r.options) === this._options && this.lastSynced.attrs === i) return;
2987
- this.lastSynced = { options: this._options, attrs: i };
2988
- }
2989
- this.applyOptions({ ...e, ...this._options });
2990
- }
2991
- queuePluginApply(e) {
2992
- return this.pendingPluginOptions = e, this.pluginApplyRun || (this.pluginApplyRun = (async () => {
2993
- for (; this.pendingPluginOptions; ) {
2994
- const i = this.pendingPluginOptions;
2995
- this.pendingPluginOptions = null;
2996
- try {
2997
- await this.applyPluginsAndPlayback(i);
2998
- } catch (r) {
2999
- console.error("[hope-player] options could not be applied:", r);
3000
- }
3001
- }
3002
- })().finally(() => {
3003
- this.pluginApplyRun = null;
3004
- })), this.pluginApplyRun;
3005
- }
3006
- async applyOptions(e) {
3007
- var a, l, h, g, c, d, m, f, x, v, y, k, C, w, T, A, u, p, b, E, S, L;
3008
- e.poster && (this.videoEl.poster = e.poster), this.casting || (this.videoEl.autoplay = !!e.autoplay), this.videoEl.muted = !!e.muted, this.videoEl.loop = !!e.loop, this.videoEl.preload = e.preload ?? "metadata", this.videoEl.playsInline = !0, this.videoEl.setAttribute("webkit-playsinline", ""), this.autoHideDelayMs = e.autoHideDelayMs ?? Ce, this.tapToPlay = e.tapToPlay ?? "auto", this.cursorHideDelayMs = e.cursorHideDelayMs === !1 ? null : e.cursorHideDelayMs ?? Se, this.cursorHideDelayMs === null && this.showCursor(), this.controlBar.settingsMenu.setQualityBadgeEnabled(e.qualityBadge !== !1), this.controlBar.settingsMenu.setPlaybackRates(e.playbackRates ?? Ee), this.controlBar.setLiveSeekBar(e.liveSeekBar !== !1), this.controlBar.setButtonsVisible({ pip: e.pipButton !== !1, fullscreen: e.fullscreenButton !== !1 }), e.miniProgress && !this.miniProgress ? (this.miniProgress = new Bt(this.videoEl), this.videoArea.appendChild(this.miniProgress.el), this.updateMiniProgress()) : !e.miniProgress && this.miniProgress && (this.miniProgress.destroy(), this.miniProgress = null), this.debugEnabled = !!e.debug, this.debugEnabled || (a = this.debugPanel) == null || a.hide(), this.contextMenuConfig = e.contextMenu === !1 ? null : { stats: typeof e.contextMenu == "object" && e.contextMenu.stats === !0 }, this.contextMenuConfig || this.contextMenu.close();
3009
- const i = e.keyboardSeekStep && e.keyboardSeekStep > 0 ? e.keyboardSeekStep : ti;
3010
- this.keyboard.seekStep = i, this.controlBar.seekBar.keyboardStep = i;
3011
- const r = e.skipButtons === !0 ? {} : e.skipButtons || null;
3012
- this.controlBar.setSkipButtons(
3013
- r && r.back !== !1 ? r.back ?? Te : null,
3014
- r && r.forward !== !1 ? r.forward ?? Te : null
3015
- ), e.showRemainingTime !== void 0 && e.showRemainingTime !== this.appliedShowRemaining && (this.appliedShowRemaining = e.showRemainingTime, this.controlBar.setShowRemaining(e.showRemainingTime));
3016
- const o = si(e.aspectRatio);
3017
- o ? this.style.setProperty("--hp-aspect-ratio", o) : this.style.removeProperty("--hp-aspect-ratio"), e.theme ? this.setAttribute("data-theme", e.theme) : this.removeAttribute("data-theme"), this.localeCode = e.locale ?? "tr", Qt(this.i18n, e.locale, e.labels), this.centerPlayButton.setAttribute("aria-label", this.i18n.play), this.controlBar.refreshLabels(), this.captionRenderer.refreshLabels(this.i18n), this.captionTrackActive && this.controlBar.settingsMenu.setCaptionAppearance(this.buildCaptionAppearance()), this.errorScreen.refreshLabels(), (l = this.playlistRunner) == null || l.refreshLabels(), (h = this.hopeStory) == null || h.refreshLabels(), (g = this.countdownScreen) == null || g.refreshLabels(), (c = this.geoChecker) == null || c.refreshLabels(), (d = this.redirectScreen) == null || d.refreshLabels(), (m = this.pluginHost) == null || m.refreshLabels(), (f = this.accessibility) == null || f.refreshLabels(), (x = this.playbackHistory) == null || x.refreshLabels(), (v = this.qrResume) == null || v.refreshLabels(), (y = this.pauseAd) == null || y.refreshLabels(), (k = this.castController) == null || k.refreshLabels(), (C = this.dubbing) == null || C.refreshLabels(), this.onStreamAudioTracks(this.streamAudio.tracks, this.streamAudio.active), (w = this.statsPanel) == null || w.refreshLabels(), (T = this.debugPanel) == null || T.refreshLabels(), (A = this.liveWallClock) == null || A.refreshLabels(), (u = this.loopSection) == null || u.refreshLabels(), (p = this.audioStage) == null || p.refreshLabels(), (b = this.rewardedUnlock) == null || b.refreshLabels(), (E = this.markProgress) == null || E.refreshLabels(), (L = (S = this.unregisterSticky) == null ? void 0 : S.refreshLabels) == null || L.call(S), this.bootResolved && await this.queuePluginApply(e);
3018
- }
3019
- /** applyOptions'ın asenkron kısmı — yalnızca queuePluginApply üzerinden, sırayla çalışır. */
3020
- async applyPluginsAndPlayback(e) {
3021
- if (e.ads && !this.adsController) {
3022
- const r = e.ads === !0 ? {} : e.ads;
3023
- Wt(r) && !this.prerollGate.isArmed && this.prerollGate.arm(r.prerollTimeoutMs ?? J), Jt(), e.countdownScreen || this.installAdsOnce(e);
3024
- }
3025
- await this.applyAudioMode(e);
3026
- const i = () => ({
3027
- videoEl: this.videoEl,
3028
- overlayContainerEl: this.videoArea,
3029
- blockChrome: () => this.blockChrome("countdown-geo"),
3030
- unblockChrome: () => this.unblockChrome("countdown-geo"),
3031
- i18n: this.i18n
3032
- });
3033
- if (e.countdownScreen && !this.countdownScreen) {
3034
- const { installCountdownScreen: r } = await import("./countdownScreen-CI-u6jjA.js");
3035
- this.countdownScreen = r(i(), e.countdownScreen);
3036
- }
3037
- if (e.geoChecker && !this.geoChecker) {
3038
- const { installGeoChecker: r } = await import("./geoChecker-BRtvHwI-.js");
3039
- this.geoChecker = r(i(), e.geoChecker);
3040
- }
3041
- this.unblockChrome("boot"), this.countdownScreen && !this.countdownScreen.isComplete() ? (this.pendingPlaybackOptions = e, this.playbackInitRegistered || (this.playbackInitRegistered = !0, this.countdownScreen.onComplete(() => {
3042
- const r = this.pendingPlaybackOptions;
3043
- this.pendingPlaybackOptions = null, r && this.initPlayback(r);
3044
- }))) : await this.initPlayback(e);
3045
- }
3046
- async initPlayback(e) {
3047
- var m, f, x, v, y, k, C, w, T, A;
3048
- this.sourceManager.configure(e.hls), this.errorScreen.dismiss(), await this.applyRewardedUnlock(e);
3049
- const i = (m = e.sources) != null && m.length ? e.sources : e.src ? [{ src: e.src, label: this.i18n.autoQuality }] : [];
3050
- this.sourceGroups = je(i, e.sourcePriority);
3051
- const r = (u) => this.sourceManager.isLoaded(u.src, u.type) && !this.isSourceLocked(u), o = this.sourceGroups.findIndex((u) => u.sources.some(r));
3052
- this.activeGroup = o !== -1 ? o : this.firstPlayableGroup();
3053
- const a = ((f = this.sourceGroups[this.activeGroup]) == null ? void 0 : f.sources) ?? [];
3054
- this.currentSources = a, this.fallbackPending = !1;
3055
- const h = a.find(r) ?? this.pickInitialSource(a);
3056
- if (h && !this.sourceManager.isLoaded(h.src, h.type) && (a.length <= 1 && (this.controlBar.setQualities([], ""), this.hlsQualitiesShown = !1), await this.sourceManager.load(h.src, h.type), e.autoplay && this.videoEl.play().catch(() => {
3057
- })), h && (this.activeSourceLabel = h.label), this.renderSourceQualities(), await this.installAdsOnce(e), await this.applySponsorship(e), await this.applyAdTriggers(e), await this.applyCast(e), e.gesture && !this.gestureControls) {
3058
- const u = e.gesture === !0 ? {} : e.gesture, { installGesture: p } = await import("./gesture-BzPCgi87.js");
3059
- this.gestureControls = p(
3060
- { videoEl: this.videoEl, overlayContainerEl: this.videoArea, isAdActive: () => this.isAdPlaying() },
3061
- u
3062
- );
3063
- }
3064
- if (e.loopSection && !this.loopSection) {
3065
- const u = e.loopSection === !0 ? {} : e.loopSection, { installLoopSection: p } = await import("./loopSection-CvF4l5uf.js");
3066
- this.loopSection = p(
3067
- {
3068
- videoEl: this.videoEl,
3069
- seekBarEl: this.controlBar.seekBar.el,
3070
- markers: this.controlBar.seekBar,
3071
- addControlButton: (b, E, S) => this.controlBar.addButton(b, E, S),
3072
- i18n: this.i18n
3073
- },
3074
- u
3075
- );
3076
- }
3077
- if (e.inViewAutoplay && !this.inViewAutoplay) {
3078
- const u = e.inViewAutoplay === !0 ? {} : e.inViewAutoplay, { installInViewAutoplay: p } = await import("./inViewAutoplay-CRJe7GA4.js");
3079
- this.inViewAutoplay = p(
3080
- { videoEl: this.videoEl, observeEl: this, isAdActive: () => this.isAdPlaying() || this.casting },
3081
- u
3082
- );
3083
- }
3084
- if (e.sticky && !this.unregisterSticky) {
3085
- const u = e.sticky === !0 ? {} : e.sticky, { installSticky: p } = await import("./sticky-D_eLCNFk.js");
3086
- this.unregisterSticky = p(
3087
- {
3088
- key: this.instanceKey,
3089
- videoEl: this.videoEl,
3090
- hostEl: this,
3091
- wrapperEl: this,
3092
- closeButtonMountEl: this.videoArea,
3093
- isAdActive: () => this.isAdPlaying(),
3094
- i18n: this.i18n
3095
- },
3096
- u
3097
- );
3098
- }
3099
- if (e.playlist && !this.playlistRunner) {
3100
- const { installPlaylist: u } = await import("./playlist-C6Mh9BE8.js");
3101
- this.playlistRunner = u(
3102
- {
3103
- videoEl: this.videoEl,
3104
- hostEl: this,
3105
- panelEl: this.getOrCreatePanelContainer(),
3106
- loadSource: (p, b) => this.sourceManager.load(p, b),
3107
- setPoster: (p) => {
3108
- this.videoEl.poster = p;
3109
- },
3110
- requestFreshAd: (p) => {
3111
- var b;
3112
- return (b = this.adsController) == null ? void 0 : b.resetForNewItem(p);
3113
- },
3114
- i18n: this.i18n
3115
- },
3116
- e.playlist
3117
- );
3118
- }
3119
- if (e.story && !this.hopeStory) {
3120
- const { installStory: u } = await import("./story-BLBij82f.js");
3121
- this.hopeStory = u(
3122
- {
3123
- videoEl: this.videoEl,
3124
- hostEl: this,
3125
- videoAreaEl: this.videoArea,
3126
- playerBodyEls: [this.root.querySelector(".media-layer"), this.chromeEl, this.centerPlayButton],
3127
- loadSource: (p, b) => this.sourceManager.load(p, b),
3128
- setPoster: (p) => {
3129
- this.videoEl.poster = p;
3130
- },
3131
- requestFreshAd: (p) => {
3132
- var b;
3133
- return (b = this.adsController) == null ? void 0 : b.resetForNewItem(p);
3134
- },
3135
- i18n: this.i18n
3136
- },
3137
- e.story
3138
- );
3139
- }
3140
- if (e.markers && !this.markProgress) {
3141
- const { installMarkers: u } = await import("./markers-B04NMI79.js");
3142
- this.markProgress = u(
3143
- {
3144
- videoEl: this.videoEl,
3145
- overlayContainerEl: this.videoArea,
3146
- addSeekBarMarker: (p, b) => this.controlBar.seekBar.addMarker(p, b),
3147
- i18n: this.i18n
3148
- },
3149
- e.markers
3150
- );
3151
- }
3152
- if ((x = e.segments) != null && x.length && !this.segments) {
3153
- const { installSegments: u } = await import("./segments-gCPrWRig.js");
3154
- this.segments = u({ videoEl: this.videoEl, seekBar: this.controlBar.seekBar }, e.segments);
3155
- }
3156
- if (e.spriteThumbnails && !this.spriteThumbnails) {
3157
- const { installSpriteThumbnails: u } = await import("./spriteThumbnails-B7oDZFTo.js");
3158
- this.spriteThumbnails = u(
3159
- {
3160
- videoEl: this.videoEl,
3161
- seekBar: this.controlBar.seekBar,
3162
- playerWidth: () => this.videoArea.clientWidth
3163
- },
3164
- e.spriteThumbnails
3165
- );
3166
- }
3167
- const g = e.redirectScreen ? JSON.stringify(e.redirectScreen) : "";
3168
- if (g !== this.redirectKey && (this.redirectKey = g, (v = this.redirectScreen) == null || v.destroy(), this.redirectScreen = null, e.redirectScreen)) {
3169
- const { installRedirectScreen: u } = await import("./redirectScreen-5HAVRtxe.js");
3170
- this.redirectScreen = u(
3171
- { hostEl: this, videoEl: this.videoEl, overlayContainerEl: this.videoArea, isAdActive: () => this.isAdPlaying(), i18n: this.i18n },
3172
- e.redirectScreen
3173
- );
3174
- }
3175
- const c = e.accessibility ? JSON.stringify(e.accessibility) : "";
3176
- if (c !== this.accessibilityKey && (this.accessibilityKey = c, (y = this.accessibility) == null || y.destroy(), this.accessibility = null, e.accessibility)) {
3177
- const { installAccessibility: u } = await import("./accessibility-DeUIoAda.js");
3178
- this.accessibilityKey === c && (this.accessibility = u(
3179
- {
3180
- hostEl: this,
3181
- videoEl: this.videoEl,
3182
- videoAreaEl: this.videoArea,
3183
- i18n: this.i18n,
3184
- registerSubmenu: (p) => this.controlBar.settingsMenu.registerSubmenu(p),
3185
- unregisterSubmenu: (p) => this.controlBar.settingsMenu.unregisterSubmenu(p),
3186
- addQuickButton: (p, b, E) => this.controlBar.settingsMenu.addQuickButton(p, b, E),
3187
- seekStep: () => this.keyboard.seekStep,
3188
- extraShortcuts: () => {
3189
- var p;
3190
- return ((p = this.pluginHost) == null ? void 0 : p.shortcuts()) ?? [];
3191
- }
3192
- },
3193
- e.accessibility === !0 ? {} : e.accessibility
3194
- ));
3195
- }
3196
- await this.syncPlugins();
3197
- const d = e.history ? JSON.stringify(e.history) : "";
3198
- if (d !== this.historyKey && (this.historyKey = d, (k = this.playbackHistory) == null || k.destroy(), this.playbackHistory = null, e.history)) {
3199
- const u = e.qrResume ? e.qrResume.paramName ?? "vtime" : null, p = !!u && new URL(location.href).searchParams.has(u), { installHistory: b } = await import("./history-DAbqEhNB.js");
3200
- this.historyKey === d && (this.playbackHistory = b(
3201
- {
3202
- hostEl: this,
3203
- videoEl: this.videoEl,
3204
- overlayContainerEl: this.videoArea,
3205
- i18n: this.i18n,
3206
- currentSrc: () => this.sourceManager.currentSrc,
3207
- isAdActive: () => this.isAdPlaying(),
3208
- mutedRequested: () => !!this._options.muted,
3209
- linkTimePresent: p
3210
- },
3211
- e.history === !0 ? {} : e.history
3212
- ));
3213
- }
3214
- if (e.qrResume && !this.qrResume) {
3215
- const { installQrResume: u } = await import("./qrResume-DXwD3oSA.js");
3216
- this.qrResume = u({ videoEl: this.videoEl, overlayContainerEl: this.videoArea, i18n: this.i18n }, e.qrResume);
3217
- }
3218
- if (this.qrResume) {
3219
- const u = this.qrResume;
3220
- this.controlBar.settingsMenu.setQrResumeToggle({
3221
- label: this.i18n.qrResumeMenuLabel,
3222
- getValueLabel: () => u.isEnabled() ? this.i18n.qrResumeOn : this.i18n.qrResumeOff,
3223
- onToggle: () => u.setEnabled(!u.isEnabled())
3224
- });
3225
- }
3226
- if (e.tapGestures && !this.tapGestures) {
3227
- const { installTapGestures: u } = await import("./tapGestures-DrC42DiI.js");
3228
- this.tapGestures = u(
3229
- {
3230
- areaEl: this.videoArea,
3231
- seekBy: (p) => {
3232
- this.controlBar.seekBar.el.style.pointerEvents !== "none" && (Me(this.videoEl, p), this.seekFeedback.show(p));
3233
- },
3234
- togglePlay: () => this.videoEl.paused ? void this.videoEl.play().catch(() => {
3235
- }) : this.videoEl.pause(),
3236
- toggleFullscreen: () => this.isFullscreenActive() ? this.exitFullscreenCompat() : this.requestFullscreenCompat(),
3237
- toggleMute: () => {
3238
- this.videoEl.muted = !this.videoEl.muted;
3239
- }
3240
- },
3241
- []
3242
- );
3243
- }
3244
- if (this.tapGestures) {
3245
- const { DEFAULT_TAP_GESTURES: u } = await import("./tapGestures-DrC42DiI.js");
3246
- this.tapGestures.setGestures(e.tapGestures === !0 ? u : e.tapGestures || []);
3247
- }
3248
- if ((C = e.pauseAd) != null && C.adUnitPath && !this.pauseAd) {
3249
- const { installPauseAd: u } = await import("./pauseAd-BQQe21X4.js");
3250
- this.pauseAd = u(
3251
- { videoEl: this.videoEl, hostEl: this, videoArea: this.videoArea, i18n: this.i18n, isBlocked: () => this.isChromeBlocked },
3252
- e.pauseAd
3253
- );
3254
- }
3255
- if (e.dubbing && !this.dubbing) {
3256
- const { installDubbing: u } = await import("./dubbing-kNMPpyHl.js");
3257
- this.dubbing = u(
3258
- {
3259
- videoEl: this.videoEl,
3260
- loadSource: (p, b) => this.sourceManager.load(p, b),
3261
- registerSubmenu: (p) => this.controlBar.settingsMenu.registerSubmenu(p),
3262
- unregisterSubmenu: (p) => this.controlBar.settingsMenu.unregisterSubmenu(p),
3263
- i18n: this.i18n
3264
- },
3265
- e.dubbing
3266
- );
3267
- }
3268
- if (e.liveWallClock && !this.liveWallClock) {
3269
- const u = e.liveWallClock === !0 ? {} : e.liveWallClock, { installLiveWallClock: p } = await import("./liveWallClock-ChUTtzLD.js");
3270
- this.liveWallClock = p(
3271
- {
3272
- videoEl: this.videoEl,
3273
- seekBarEl: this.controlBar.seekBar.el,
3274
- addControlElement: (b) => this.controlBar.addElement(b),
3275
- i18n: this.i18n,
3276
- getPlayingDate: () => {
3277
- var L, z, O;
3278
- const b = (L = this.sourceManager.hlsInstance) == null ? void 0 : L.playingDate;
3279
- if (b) return b;
3280
- const E = (O = (z = this.videoEl).getStartDate) == null ? void 0 : O.call(z), S = (E == null ? void 0 : E.getTime()) ?? NaN;
3281
- return Number.isFinite(S) && S > 0 ? new Date(S + this.videoEl.currentTime * 1e3) : null;
3282
- }
3283
- },
3284
- u
3285
- ), this.controlBar.seekBar.liveHoverHandled = !0;
3286
- }
3287
- if (e.dai && !this.daiController) {
3288
- const { installDai: u } = await import("./dai-B9Tth1Iv.js");
3289
- this.daiController = await u(
3290
- {
3291
- videoEl: this.videoEl,
3292
- hostEl: this,
3293
- adUiEl: this.adLayerEl,
3294
- loadStreamUrl: (p) => this.sourceManager.load(p),
3295
- disableSeeking: () => this.disableSeeking(),
3296
- enableSeeking: () => this.enableSeeking()
3297
- },
3298
- e.dai
3299
- );
3300
- }
3301
- (w = e.subtitles) != null && w.length ? this.optionTracks = bt(this.videoEl, e.subtitles) : (Fe(this.videoEl), this.optionTracks = []), this.rebuildCaptions(((A = (T = e.subtitles) == null ? void 0 : T.find((u) => u.default)) == null ? void 0 : A.label) ?? null);
3302
- }
3303
- /** Altyazı menüsünü `options.subtitles` + yayın izlerinden kurar; `activeLabel` varsa onu seçer. */
3304
- rebuildCaptions(e) {
3305
- if (this.subtitleTracks = [...this.optionTracks, ...this.streamTracks], !this.subtitleTracks.length) {
3306
- this.selectCaption = null, this.activeCaptionLabel = null, this.controlBar.setCaptions([], this.i18n.captionsOff), this.captionRenderer.setActiveTrack(null), this.captionTrackActive = !1, this.controlBar.settingsMenu.setCaptionAppearance(null), this.sourceManager.selectTextTrack(null);
3307
- return;
3308
- }
3309
- const i = (o) => {
3310
- var l;
3311
- const a = vt(this.subtitleTracks, o);
3312
- this.activeCaptionLabel = a ? o : null, this.sourceManager.selectTextTrack(((l = this.streamTracks.find((h) => h.label === o)) == null ? void 0 : l.id) ?? null), this.captionRenderer.setActiveTrack(a), this.captionTrackActive = a !== null, this.controlBar.settingsMenu.setActiveCaption(a ? o : this.i18n.captionsOff), this.controlBar.settingsMenu.setCaptionAppearance(a !== null ? this.buildCaptionAppearance() : null);
3313
- };
3314
- this.selectCaption = i;
3315
- const r = e && this.subtitleTracks.some((o) => o.label === e) ? e : null;
3316
- this.controlBar.setCaptions(
3317
- [
3318
- { label: this.i18n.captionsOff, onSelect: () => i(null) },
3319
- ...this.subtitleTracks.map(({ label: o }) => ({ label: o, onSelect: () => i(o) }))
3320
- ],
3321
- r ?? this.i18n.captionsOff
3322
- ), i(r);
3323
- }
3324
- /**
3325
- * Yayın izinin menü adı: manifestteki ad teknik/boşsa ("stream_5", "und", dil kodunun kendisi) dil kodundan
3326
- * player diliyle dil adı üretilir ("en" → "İngilizce" / "English").
3327
- */
3328
- streamTrackLabel(e, i) {
3329
- if (!(!e || e.toLowerCase() === i.toLowerCase() || /^(stream|audio|track|text|sub|subtitle|und)[\s_-]*\d*$/i.test(e)) || !i || i === "und") return e || i;
3330
- try {
3331
- const o = new Intl.DisplayNames([this.localeCode], { type: "language" }).of(i);
3332
- if (o) return o.charAt(0).toLocaleUpperCase(this.localeCode) + o.slice(1);
3333
- } catch {
3334
- }
3335
- return e || i;
3336
- }
3337
- /** Aynı adlı iz varsa (ör. options.subtitles'ta da "English") dil/sırayla ayırt edilir. */
3338
- uniqueLabel(e, i, r) {
3339
- const o = r.has(e) ? `${e} (${i})` : e;
3340
- return r.add(o), o;
3341
- }
3342
- /** Ayarlar menüsünün "Altyazı" alt menüsüne eklenen Boyut/Renk/Konum satırları — her zaman GÜNCEL `this.i18n`'i okur (dil sonradan değişse bile). */
3343
- buildCaptionAppearance() {
3344
- const e = ["small", "normal", "large"], i = (r, o, a, l) => r.map((h, g) => ({
3345
- value: h,
3346
- active: o() === h,
3347
- ariaLabel: `${l} ${g + 1}`,
3348
- onSelect: () => a(h)
3349
- }));
3350
- return {
3351
- sizeLabel: this.i18n.captionSize,
3352
- getSizeOptions: () => e.map((r) => ({
3353
- label: r === "small" ? this.i18n.captionSizeSmall : r === "large" ? this.i18n.captionSizeLarge : this.i18n.captionSizeNormal,
3354
- active: this.captionRenderer.getFontSize() === r,
3355
- onSelect: () => this.captionRenderer.setFontSize(r)
3356
- })),
3357
- bgColorLabel: this.i18n.captionBgColor,
3358
- getBgColorOptions: () => i(
3359
- I.BG_COLOR_PRESETS,
3360
- () => this.captionRenderer.getBgColor(),
3361
- (r) => this.captionRenderer.setBgColor(r),
3362
- this.i18n.captionBgColor
3363
- ),
3364
- textColorLabel: this.i18n.captionTextColor,
3365
- getTextColorOptions: () => i(
3366
- I.TEXT_COLOR_PRESETS,
3367
- () => this.captionRenderer.getTextColor(),
3368
- (r) => this.captionRenderer.setTextColor(r),
3369
- this.i18n.captionTextColor
3370
- ),
3371
- resetPositionLabel: this.i18n.captionResetPosition,
3372
- onResetPosition: () => this.captionRenderer.resetPosition()
3373
- };
3374
- }
3375
- getOrCreatePanelContainer() {
3376
- return this.panelContainer || (this.panelContainer = document.createElement("div"), this.root.appendChild(this.panelContainer)), this.panelContainer;
3377
- }
3378
- // ── Kalite kilidi (ödüllü reklam) ─────────────────────────────────────
3379
- /** Kaynağın yüksekliği: `height` ya da etiketten ("1080p" → 1080); bilinmiyorsa null. */
3380
- sourceHeight(e) {
3381
- if (typeof e.height == "number" && e.height > 0) return e.height;
3382
- const i = /(\d{3,4})\s*p\b/i.exec(e.label);
3383
- return i ? Number(i[1]) : null;
3384
- }
3385
- isSourceLocked(e) {
3386
- var i;
3387
- return !!((i = this.qualityGate) != null && i.isLocked(this.sourceHeight(e)));
3388
- }
3389
- /** Başlangıç kaynağı: `selected` (ya da ilk); kilitliyse serbest kaynakların en yükseği. */
3390
- pickInitialSource(e) {
3391
- const i = e.find((o) => o.selected) ?? e[0];
3392
- if (!i || !this.isSourceLocked(i)) return i;
3393
- const r = e.filter((o) => !this.isSourceLocked(o));
3394
- return r.length ? r.reduce((o, a) => (this.sourceHeight(a) ?? 0) > (this.sourceHeight(o) ?? 0) ? a : o) : i;
3395
- }
3396
- renderSourceQualities() {
3397
- const e = this.currentSources;
3398
- e.length <= 1 || this.controlBar.setQualities(
3399
- e.map((i) => {
3400
- const r = this.isSourceLocked(i);
3401
- return {
3402
- label: i.label,
3403
- locked: r,
3404
- onSelect: r ? () => {
3405
- var o;
3406
- return (o = this.qualityGate) == null ? void 0 : o.requestUnlock();
3407
- } : () => void this.switchQualitySource(i)
3408
- };
3409
- }),
3410
- this.activeSourceLabel || e[0].label
3411
- );
3412
- }
3413
- /** Kilitli kalite var mı (ödüllü reklam butonu yalnızca o zaman görünür) ve en yükseğinin etiketi. */
3414
- lockedQualityLabel() {
3415
- if (!this.qualityGate) return null;
3416
- const e = [];
3417
- if (this.lastHlsLevels.length > 1)
3418
- for (const i of this.lastHlsLevels) this.qualityGate.isLocked(i.height) && e.push(i.height);
3419
- else
3420
- for (const i of this.currentSources) {
3421
- const r = this.sourceHeight(i);
3422
- this.currentSources.length > 1 && this.qualityGate.isLocked(r) && e.push(r ?? 0);
3423
- }
3424
- return e.length ? `${Math.max(...e)}p` : null;
3425
- }
3426
- /** Kilit durumu değişti: menüleri yeniden kur, HLS üst sınırını güncelle; `upgrade` ise en iyi kaliteye geç. */
3427
- refreshQualityGate(e) {
3428
- var i;
3429
- if (this.lastHlsLevels.length > 1)
3430
- this.onHlsLevelsChanged(this.lastHlsLevels, e ? -1 : this.lastHlsActive), e && this.sourceManager.setLevel(-1);
3431
- else if (this.currentSources.length > 1) {
3432
- const r = e ? this.currentSources.filter((l) => !this.isSourceLocked(l)).reduce((l, h) => !l || (this.sourceHeight(h) ?? 0) > (this.sourceHeight(l) ?? 0) ? h : l, null) : null, o = this.currentSources.find((l) => l.label === this.activeSourceLabel), a = r ?? (o && this.isSourceLocked(o) ? this.pickInitialSource(this.currentSources) : null);
3433
- a && a.label !== this.activeSourceLabel ? this.switchQualitySource(a) : this.renderSourceQualities();
3434
- }
3435
- (i = this.rewardedUnlock) == null || i.onQualitiesChanged();
3436
- }
3437
- async applyRewardedUnlock(e) {
3438
- const i = e.rewardedUnlock;
3439
- if (!i) {
3440
- this.rewardedUnlock && (this.rewardedUnlock.destroy(), this.rewardedUnlock = null, this.qualityGate = null, this.refreshQualityGate(!1));
3441
- return;
3442
- }
3443
- if (this.rewardedUnlock)
3444
- this.rewardedUnlock.update(i);
3445
- else {
3446
- const { installRewardedUnlock: r } = await import("./rewardedUnlock-CGhQyWOk.js");
3447
- this.rewardedUnlock ?? (this.rewardedUnlock = r(
3448
- {
3449
- hostEl: this,
3450
- videoEl: this.videoEl,
3451
- overlayEl: this.videoArea,
3452
- chromeEl: this.chromeEl,
3453
- i18n: this.i18n,
3454
- log: (o) => this.log.add({ source: "ads", ...o }),
3455
- play: () => void this.play().catch(() => {
3456
- }),
3457
- exitFullscreen: () => {
3458
- this.isFullscreenActive() && this.exitFullscreenCompat();
3459
- },
3460
- lockedQualityLabel: () => this.lockedQualityLabel(),
3461
- // Kalite dosyası değil içerik: aynı videonun 240p ↔ 720p geçişi (ya da HLS → MP4 yedeği) kilidi kapatmasın.
3462
- contentKey: () => this.contentKey(),
3463
- onLockChange: (o) => this.refreshQualityGate(o)
3464
- },
3465
- i
3466
- )), this.qualityGate = this.rewardedUnlock;
3467
- }
3468
- }
3469
- /**
3470
- * İçerik kimliği: `sources` çalıyorsa tüm kaynakları (kalite değişimi / yedek kaynak aynı içerik), eklentinin
3471
- * yüklediği medya (playlist, hikâye, dublaj) çalıyorsa onun adresi.
3472
- */
3473
- contentKey() {
3474
- const e = this.sourceGroups.flatMap((r) => r.sources.map((o) => o.src)), i = this.sourceManager.currentSrc ?? "";
3475
- return !i || e.includes(i) ? e.join("|") : i;
3476
- }
3477
- async applyCast(e) {
3478
- var r;
3479
- const i = e.cast;
3480
- if (!(i != null && i.chromecast) && !(i != null && i.airplay) && !(i != null && i.remotePlayback)) {
3481
- (r = this.castController) == null || r.destroy(), this.castController = null;
3482
- return;
3483
- }
3484
- if (this.castController)
3485
- this.castController.update(i);
3486
- else {
3487
- const { installCast: o } = await import("./cast-BQ-suTcF.js");
3488
- this.castController ?? (this.castController = o(
3489
- {
3490
- hostEl: this,
3491
- videoEl: this.videoEl,
3492
- overlayEl: this.videoArea,
3493
- i18n: this.i18n,
3494
- log: (a) => this.log.add({ source: "player", ...a }),
3495
- addButton: (a, l, h) => this.controlBar.addButton(a, l, h),
3496
- getMedia: () => this.castMedia(),
3497
- isAdPlaying: () => this.isAdPlaying(),
3498
- isMse: () => this.sourceManager.engine.engine === "hls.js",
3499
- contentKey: () => this.contentKey(),
3500
- onRemoteChange: (a) => {
3501
- var l;
3502
- this.casting = a, (l = this.adsController) == null || l.setRemote(a), a && this.prerollGate.release(!1);
3503
- }
3504
- },
3505
- i
3506
- ));
3507
- }
3508
- }
3509
- /** TV'ye gönderilecek içerik: o an çalan kaynak (ya da `cast.source`), başlık / kapak, altyazılar, reklam tag'leri. */
3510
- castMedia() {
3511
- var C, w, T, A, u;
3512
- const e = this._options, i = e.cast ?? {}, r = this.sourceManager.currentSrc;
3513
- if (!r) return null;
3514
- const o = (C = this.currentSources.find((p) => p.src === r)) == null ? void 0 : C.type, a = typeof i.source == "function" ? i.source({ src: r, type: o }) : i.source ?? { src: r, type: o }, l = typeof a == "string" ? { src: a, type: void 0 } : a, h = (p) => new URL(p, document.baseURI).href, g = Pe({ src: l.src, type: l.type }), c = typeof e.audio == "object" ? e.audio : null, d = ((w = i.metadata) == null ? void 0 : w.image) ?? (c == null ? void 0 : c.cover) ?? e.poster, m = typeof e.ads == "object" ? e.ads : null, f = m == null ? void 0 : m.prebid, x = f == null ? void 0 : f.custParams, v = f ? { ...Y(f.custParams), ...Y((T = f.midroll) == null ? void 0 : T.custParams) } : void 0, y = (p, b) => {
3515
- const E = Array.isArray(p) ? p[0] : p;
3516
- return E ? Kt($(E), b) : void 0;
3517
- }, k = i.ads === !1 ? null : typeof i.ads == "object" ? {
3518
- vmap: i.ads.vmap ? $(i.ads.vmap) : void 0,
3519
- preroll: y(i.ads.preroll),
3520
- midroll: y(i.ads.midroll),
3521
- midrollIntervalSeconds: i.ads.midrollIntervalSeconds,
3522
- postroll: y(i.ads.postroll)
3523
- } : m ? {
3524
- vmap: m.adTagVmap ? $(m.adTagVmap) : void 0,
3525
- preroll: y(m.adTagPreroll, x),
3526
- midroll: y(m.adTagMidroll, v),
3527
- midrollIntervalSeconds: m.midrollIntervalSeconds,
3528
- postroll: y(m.adTagPostroll)
3529
- } : null;
3530
- return {
3531
- src: h(l.src),
3532
- contentType: l.type || ii[g] || "video/mp4",
3533
- live: this.videoEl.duration === 1 / 0,
3534
- title: ((A = i.metadata) == null ? void 0 : A.title) ?? (c == null ? void 0 : c.title),
3535
- subtitle: ((u = i.metadata) == null ? void 0 : u.subtitle) ?? (c == null ? void 0 : c.artist),
3536
- image: d ? h(d) : void 0,
3537
- music: !!e.audio,
3538
- subtitles: (e.subtitles ?? []).map((p) => ({ src: h(p.src), label: p.label, lang: p.srclang, default: p.default })),
3539
- ads: k && (k.vmap || k.preroll || k.midroll || k.postroll) ? k : null
3540
- };
3541
- }
3542
- async applyAdTriggers(e) {
3543
- var r;
3544
- const i = e.adTriggers;
3545
- if (!(i != null && i.endpoint) && !(i != null && i.config)) {
3546
- (r = this.adTriggers) == null || r.destroy(), this.adTriggers = null;
3547
- return;
3548
- }
3549
- if (this.adTriggers)
3550
- this.adTriggers.update(i);
3551
- else {
3552
- const { installAdTriggers: o } = await import("./adTriggers-DXmtF4t2.js");
3553
- this.adTriggers ?? (this.adTriggers = o(
3554
- {
3555
- hostEl: this,
3556
- videoEl: this.videoEl,
3557
- overlayEl: this.videoArea,
3558
- i18n: this.i18n,
3559
- log: (a) => this.log.add({ source: "ads", ...a }),
3560
- isBlocked: () => this.isChromeBlocked || this.isAdPlaying() || this.casting,
3561
- isFullscreen: () => this.isFullscreenActive(),
3562
- isNativeFullscreen: () => !!this.iosVideo.webkitDisplayingFullscreen,
3563
- contentKey: () => this.contentKey()
3564
- },
3565
- i
3566
- ));
3567
- }
3568
- }
3569
- async applySponsorship(e) {
3570
- var r;
3571
- const i = e.sponsorship;
3572
- if (!(i != null && i.endpoint)) {
3573
- (r = this.sponsorship) == null || r.destroy(), this.sponsorship = null;
3574
- return;
3575
- }
3576
- if (this.sponsorship)
3577
- this.sponsorship.update(i);
3578
- else {
3579
- const { installSponsorship: o } = await import("./sponsorship-BT21uwN5.js");
3580
- this.sponsorship ?? (this.sponsorship = o(
3581
- {
3582
- hostEl: this,
3583
- videoEl: this.videoEl,
3584
- overlayEl: this.videoArea,
3585
- i18n: this.i18n,
3586
- log: (a) => this.log.add({ source: "player", ...a })
3587
- },
3588
- i
3589
- ));
3590
- }
3591
- }
3592
- /** Kalite değişirken oynatma konumunu ve play/pause durumunu korur. */
3593
- async switchQualitySource(e) {
3594
- this.activeSourceLabel = e.label, this.renderSourceQualities();
3595
- const i = this.videoEl.currentTime, r = !this.videoEl.paused;
3596
- await this.sourceManager.load(e.src, e.type), this.videoEl.currentTime = i, r && this.videoEl.play().catch(() => {
3597
- }), this.dispatchEvent(new CustomEvent("hp:qualitychange", { detail: { label: e.label } }));
3598
- }
3599
- /** `from`'dan itibaren tarayıcının oynatabileceği ilk grup (oynatamadıkları atlanır); hiçbiri yoksa -1 (from 0'sa 0 — yine de dene). */
3600
- firstPlayableGroup(e = 0) {
3601
- var i;
3602
- for (let r = e; r < this.sourceGroups.length; r++) {
3603
- const o = this.sourceGroups[r];
3604
- if (!$e(o, this.videoEl)) {
3605
- if (r > e) {
3606
- const a = this.sourceGroups[e].format;
3607
- this.dispatchEvent(new CustomEvent("hp:sourcefallback", { detail: { from: a, to: o.format, code: 4, skipped: !0 } }));
3608
- }
3609
- return r;
3610
- }
3611
- this.log.add({ source: "player", message: `Source format "${o.format}" is not playable in this browser — skipped`, details: { src: (i = o.sources[0]) == null ? void 0 : i.src } });
3612
- }
3613
- return e === 0 ? 0 : -1;
3614
- }
3615
- /**
3616
- * Ölümcül hata: sıradaki biçim grubuna geç (konum ve oynatma durumu korunur).
3617
- * true = geçiliyor, hata ekranı gösterilmez. Hata ekranının `shouldShow`'undan çağrılır.
3618
- */
3619
- tryNextSourceGroup() {
3620
- var l;
3621
- if (this.fallbackPending) return !0;
3622
- const e = this.sourceGroups[this.activeGroup];
3623
- if (!e || this.sourceGroups.length < 2 || !e.sources.some((h) => h.src === this.sourceManager.currentSrc)) return !1;
3624
- const i = ((l = this.videoEl.error) == null ? void 0 : l.code) ?? this.streamErrorCode;
3625
- if (this.streamErrorCode = void 0, i === 1) return !1;
3626
- const r = this.firstPlayableGroup(this.activeGroup + 1);
3627
- if (r === -1) return !1;
3628
- this.fallbackPending = !0;
3629
- const o = Number.isFinite(this.videoEl.duration) ? this.videoEl.currentTime : 0, a = !this.videoEl.paused || !!this._options.autoplay;
3630
- return this.log.add({
3631
- source: "player",
3632
- message: `Source "${e.format}" failed — falling back to "${this.sourceGroups[r].format}"`,
3633
- details: { code: i, src: this.sourceManager.currentSrc ?? void 0 }
3634
- }), this.dispatchEvent(new CustomEvent("hp:sourcefallback", { detail: { from: e.format, to: this.sourceGroups[r].format, code: i } })), queueMicrotask(() => void this.activateSourceGroup(r, o, a)), !0;
3635
- }
3636
- async activateSourceGroup(e, i, r) {
3637
- var l;
3638
- const o = this.sourceGroups[e];
3639
- if (!o) return;
3640
- this.activeGroup = e, this.currentSources = o.sources;
3641
- const a = this.pickInitialSource(o.sources);
3642
- this.errorScreen.dismiss(), this.controlBar.setQualities([], ""), this.hlsQualitiesShown = !1, this.activeSourceLabel = a.label, i > 0 && this.videoEl.addEventListener("loadedmetadata", () => this.videoEl.currentTime = i, { once: !0 });
3643
- try {
3644
- await this.sourceManager.load(a.src, a.type);
3645
- } finally {
3646
- this.fallbackPending = !1;
3647
- }
3648
- this.renderSourceQualities(), (l = this.rewardedUnlock) == null || l.onQualitiesChanged(), r && this.videoEl.play().catch(() => {
3649
- });
3650
- }
3651
- /** Hata ekranındaki "Tekrar dene": birden fazla grup varsa en öncelikli gruptan baştan başla. */
3652
- async retrySource() {
3653
- const e = this.sourceGroups.some((r) => r.sources.some((o) => o.src === this.sourceManager.currentSrc));
3654
- if (this.sourceGroups.length < 2 || !e) return this.sourceManager.reload();
3655
- const i = Number.isFinite(this.videoEl.duration) ? this.videoEl.currentTime : 0;
3656
- this.fallbackPending = !0, await this.activateSourceGroup(this.firstPlayableGroup(), i, !0);
3657
- }
3658
- // ── Fullscreen (vendor-prefix uyumlu) ───────────────────────────────
3659
- /** iPhone Safari element tam ekranını desteklemiyor — yalnızca <video>'nun kendi (native kontrollü) tam ekranı. */
3660
- get iosVideo() {
3661
- return this.videoEl;
3662
- }
3663
- requestFullscreenCompat() {
3664
- if (this.audioMode) return;
3665
- const e = this, i = () => {
3666
- var r, o;
3667
- return (o = (r = this.iosVideo).webkitEnterFullscreen) == null ? void 0 : o.call(r);
3668
- };
3669
- e.requestFullscreen ? e.requestFullscreen().catch(i) : e.webkitRequestFullscreen ? e.webkitRequestFullscreen() : i();
3670
- }
3671
- exitFullscreenCompat() {
3672
- var i, r;
3673
- if (this.iosVideo.webkitDisplayingFullscreen) {
3674
- (r = (i = this.iosVideo).webkitExitFullscreen) == null || r.call(i);
3675
- return;
3676
- }
3677
- const e = document;
3678
- document.exitFullscreen ? document.exitFullscreen() : e.webkitExitFullscreen && e.webkitExitFullscreen();
3679
- }
3680
- isFullscreenActive() {
3681
- const e = document;
3682
- return document.fullscreenElement === this || e.webkitFullscreenElement === this || !!this.iosVideo.webkitDisplayingFullscreen;
3683
- }
3684
- /**
3685
- * iPhone native tam ekranında bizim altyazı katmanımız görünmez — seçili izi 'showing' yapıp iOS'un çizmesine bırakırız.
3686
- */
3687
- showCaptionsNatively() {
3688
- for (const { track: e } of this.subtitleTracks) e.mode === "hidden" && (e.mode = "showing");
3689
- }
3690
- /**
3691
- * Native tam ekrandan dönüş: iOS menüsünde seçilen iz 'showing' kalır ve kendi katmanımızla çift altyazı çizilir.
3692
- * Seçimi bizim tarafa aktarıp izi tekrar 'hidden' yaparız (hiçbiri showing değilse kullanıcı kapatmıştır).
3693
- */
3694
- syncCaptionsFromNative() {
3695
- if (!this.selectCaption) return;
3696
- const e = this.subtitleTracks.find(({ track: i }) => i.mode === "showing");
3697
- this.selectCaption((e == null ? void 0 : e.label) ?? null);
3698
- }
3699
- get isChromeBlocked() {
3700
- return this.chromeBlockers.size > 0;
3701
- }
3702
- get isChromeFullyHidden() {
3703
- for (const e of this.chromeBlockers.values()) if (e === "hidden") return !0;
3704
- return !1;
3705
- }
3706
- /**
3707
- * Dar player'da kontrol çubuğu (alt satır + seek bar) yüksekliğin yarısını kaplıyor ve seek bar ortadaki play
3708
- * butonunun içinden geçiyordu — butonun ortasına dokunmak videoyu sarıyordu. Buton seek bar'ın üstündeki boş
3709
- * alanın ortasına alınır, sığmazsa küçülür (en az 40px).
3710
- */
3711
- layoutCenterPlay() {
3712
- const e = this.videoArea, i = e.getBoundingClientRect(), r = this.controlBar.seekBar.el.getBoundingClientRect(), o = () => {
3713
- e.removeAttribute("data-center-play-shifted"), e.style.removeProperty("--hp-center-play-size"), e.style.removeProperty("--hp-center-play-shift"), e.style.removeProperty("--hp-center-play-shift-x");
3714
- };
3715
- if (!i.height || !r.height || !e.hasAttribute("data-compact")) return o();
3716
- const a = 64, l = r.top - i.top - 8;
3717
- if (i.height / 2 + a / 2 <= l) return o();
3718
- const h = Math.max(40, Math.min(56, l - 12)), g = Math.max(h / 2 + 6, l - h / 2), c = Math.round(g - i.height / 2);
3719
- let d = 0;
3720
- const m = this.controlBar.topEl.getBoundingClientRect();
3721
- if (m.width > 0 && g - h / 2 < m.bottom - i.top) {
3722
- const f = m.left - i.left - 8 - h / 2;
3723
- i.width / 2 > f && (d = Math.round(Math.max(h / 2 + 8, f) - i.width / 2));
3724
- }
3725
- e.setAttribute("data-center-play-shifted", ""), e.style.setProperty("--hp-center-play-shift-x", `${d}px`), e.style.setProperty("--hp-center-play-size", `${h}px`), e.style.setProperty("--hp-center-play-shift", `${c}px`);
3726
- }
3727
- /** Dar player'da dokunmatikte oynat/duraklat yerine kontrolleri göster/gizle (options.tapToPlay). */
3728
- tapTogglesPlay(e) {
3729
- return this.tapToPlay !== "auto" ? this.tapToPlay : e === "mouse" ? !0 : !this.videoArea.hasAttribute("data-compact") || this.isFullscreenActive();
3730
- }
3731
- /** Videonun boş alanına tek dokunuş/tık: ya `togglePlay` ya da (dar player'da) kontrolleri aç/kapa. */
3732
- onBackgroundTap(e, i) {
3733
- if (this.tapTogglesPlay(e)) {
3734
- i();
3735
- return;
3736
- }
3737
- this.chromeVisible && !this.videoEl.paused ? (this.hideTimer && clearTimeout(this.hideTimer), this.setChromeOpacity("0")) : this.scheduleAutoHide();
3738
- }
3739
- showChrome() {
3740
- this.setChromeOpacity("1");
3741
- }
3742
- /** Chrome görünürlüğünün tek giriş noktası — altyazı da haberdar olur (kontroller gizlenince en alta iner). */
3743
- setChromeOpacity(e) {
3744
- var i, r;
3745
- this.chromeEl.style.opacity = e, this.chromeVisible = e === "1", (i = this.videoArea) == null || i.toggleAttribute("data-chrome-hidden", !this.chromeVisible), (r = this.captionRenderer) == null || r.setChromeVisible(this.chromeVisible), this.updateMiniProgress();
3746
- }
3747
- /** İnce ilerleme çizgisi: yalnızca kontroller gizliyken; reklam/giriş ekranı (chrome bloklu) sırasında değil. */
3748
- updateMiniProgress() {
3749
- var e;
3750
- (e = this.miniProgress) == null || e.setVisible(!this.chromeVisible && !this.isChromeBlocked);
3751
- }
3752
- /**
3753
- * Plugin (ads/countdown/geo) chrome'u kendi key'iyle gizler; unblockChrome aynı key'le açar.
3754
- * 'reduced' (ads): yalnızca oynat/duraklat + ses kalır. Merkez buton her modda gizli.
3755
- */
3756
- blockChrome(e, i = "hidden") {
3757
- this.chromeBlockers.set(e, i), this.updateMiniProgress(), this.hideTimer && clearTimeout(this.hideTimer), this.centerPlayButton.style.opacity = "0", this.centerPlayButton.style.pointerEvents = "none", this.isChromeFullyHidden ? (this.setChromeOpacity("0"), this.chromeEl.style.pointerEvents = "none") : this.setChromeOpacity("1"), this.controlBar.setAdMode(this.chromeBlockers.get("ads") === "reduced");
3758
- }
3759
- /** Bloklayan plugin işini bitirince çağırır — başka bir blocker hâlâ aktifse chrome açılmaz. */
3760
- unblockChrome(e) {
3761
- if (this.chromeBlockers.delete(e), this.updateMiniProgress(), this.controlBar.setAdMode(this.chromeBlockers.get("ads") === "reduced"), this.isChromeBlocked) {
3762
- this.isChromeFullyHidden ? (this.setChromeOpacity("0"), this.chromeEl.style.pointerEvents = "none") : (this.setChromeOpacity("1"), this.chromeEl.style.pointerEvents = "");
3763
- return;
3764
- }
3765
- this.chromeEl.style.pointerEvents = "", this.videoEl.paused ? (this.centerPlayButton.style.opacity = "1", this.centerPlayButton.style.pointerEvents = "auto", this.showChrome()) : this.scheduleAutoHide();
3766
- }
3767
- /** DAI reklam arası boyunca kullanıcı reklamın İÇİNE seek edemesin diye (sunucu taraflı eklenen reklamlar seekable aralığın parçası). */
3768
- disableSeeking() {
3769
- this.controlBar.setSeekingEnabled(!1), this.controlBar.seekBar.el.style.pointerEvents = "none", this.controlBar.seekBar.el.style.opacity = "0.5";
3770
- }
3771
- enableSeeking() {
3772
- this.controlBar.setSeekingEnabled(!0), this.controlBar.seekBar.el.style.pointerEvents = "", this.controlBar.seekBar.el.style.opacity = "";
3773
- }
3774
- /** Fare kıpırdadı: imleci göster, hareketsiz kalırsa gizlemek için sayacı yeniden kur (tailwind.css `:host([data-cursor-hidden])`). */
3775
- scheduleCursorHide() {
3776
- this.showCursor(), this.cursorHideDelayMs !== null && (this.cursorTimer = setTimeout(() => {
3777
- this.cursorTimer = null, !(this.videoEl.paused || this.pointerOverControls || this.controlBar.settingsMenu.isOpen) && this.setAttribute("data-cursor-hidden", "");
3778
- }, this.cursorHideDelayMs));
3779
- }
3780
- showCursor() {
3781
- this.cursorTimer && clearTimeout(this.cursorTimer), this.cursorTimer = null, this.removeAttribute("data-cursor-hidden");
3782
- }
3783
- /** options.audio: sahneyi kurar, günceller (konum / boyut / devir canlı değişebilir) ya da kaldırır. */
3784
- async applyAudioMode(e) {
3785
- var r;
3786
- const i = e.audio ? e.audio === !0 ? {} : e.audio : null;
3787
- if (this.audioMode = !!i, this.toggleAttribute("data-audio", !!i), this.controlBar.setAudioMode(!!i), this.toggleAttribute("data-audio-compact", (i == null ? void 0 : i.layout) === "compact"), !i) {
3788
- this.controlBar.setAudioBar(null), (r = this.audioStage) == null || r.destroy(), this.audioStage = null;
3789
- return;
3790
- }
3791
- if (this.hideTimer && clearTimeout(this.hideTimer), this.hideTimer = null, this.isChromeBlocked || this.showChrome(), this.audioStage)
3792
- this.audioStage.update(i);
3793
- else {
3794
- const { installAudioStage: o } = await import("./audio-LkYgd5Wq.js");
3795
- if (!this.audioMode) return;
3796
- this.audioStage ?? (this.audioStage = o(
3797
- {
3798
- videoEl: this.videoEl,
3799
- layerEl: this.root.querySelector(".media-layer"),
3800
- poster: () => this._options.poster ?? this.getAttribute("poster") ?? void 0,
3801
- togglePlay: () => this.videoEl.paused ? void this.play().catch(() => {
3802
- }) : this.videoEl.pause(),
3803
- play: () => void this.play().catch(() => {
3804
- }),
3805
- i18n: this.i18n,
3806
- setBarMeta: (a) => this.controlBar.setAudioBar(a)
3807
- },
3808
- i
3809
- ));
3810
- }
3811
- }
3812
- /** Ads plugin'ini bir kez kurar; erken (paralel) başlatılan kurulum varsa onu bekler. */
3813
- installAdsOnce(e) {
3814
- if (!e.ads || this.adsController) return Promise.resolve();
3815
- if (!this.adsInstall) {
3816
- const i = e.ads === !0 ? {} : e.ads;
3817
- this.adsInstall = (async () => {
3818
- const { installAds: r } = await import("./ads-CdWbE9aD.js");
3819
- this.adsController = await r(
3820
- {
3821
- videoEl: this.videoEl,
3822
- hostEl: this,
3823
- adLayerEl: this.adLayerEl,
3824
- hideChrome: () => this.blockChrome("ads", "reduced"),
3825
- showChrome: () => this.unblockChrome("ads"),
3826
- // IMA'nın KENDİ UI'ı üzerinden (ör. reklam video'suna
3827
- // tıklama) duraklatılır/devam ettirilirse toolbar'ımızın
3828
- // ikonu da senkron kalsın diye.
3829
- onAdPlayStateChange: () => this.controlBar.refreshAdPlayState(),
3830
- locale: this.localeCode,
3831
- prerollGate: this.prerollGate,
3832
- log: (o) => this.log.add({ source: "ads", ...o }),
3833
- onAdProgress: (o) => this.controlBar.setAdInfo(o),
3834
- // Sürekli oynatma (vconp): playlist / story bir sonraki içeriği kendiliğinden başlatıyorsa.
3835
- isContinuousPlayback: () => {
3836
- const o = this._options, a = (l) => !!l && l.autoplayNext !== !1;
3837
- return a(o.playlist) || a(o.story);
3838
- },
3839
- audioPoster: (() => {
3840
- if (!e.audio) return;
3841
- const o = e.audio === !0 ? {} : e.audio;
3842
- return o.adPoster ? new URL(o.adPoster, document.baseURI).href : void 0;
3843
- })(),
3844
- surface: {
3845
- videoEl: this.videoEl,
3846
- containerEl: this.videoArea,
3847
- enterFullscreen: () => this.requestFullscreenCompat(),
3848
- labels: () => this.i18n
3849
- }
3850
- },
3851
- i
3852
- );
3853
- })().catch((r) => {
3854
- this.prerollGate.release(!0), this.adsInstall = null, this.dispatchEvent(new CustomEvent("hp:aderror", { detail: { message: String(r) } }));
3855
- });
3856
- }
3857
- return this.adsInstall;
3858
- }
3859
- /** Preroll beklemesi başladı / bitti: halka döner, toolbar görünür kalır, oynat butonu "duraklat" görünür. */
3860
- onPrerollWaitChange(e) {
3861
- if (this.controlBar.setPendingPlay(e), this.controlBar.setLoading("preroll", e), this.isChromeBlocked) return;
3862
- const i = !e && this.videoEl.paused;
3863
- this.centerPlayButton.style.opacity = i ? "1" : "0", this.centerPlayButton.style.pointerEvents = i ? "auto" : "none";
3864
- }
3865
- /** Preroll beklenirken basılan oynat/duraklat (buton, Space/K) beklemeyi iptal eder. */
3866
- cancelPrerollWait() {
3867
- return this.prerollGate.isWaiting ? (this.prerollGate.cancelIntent(), !0) : !1;
3868
- }
3869
- /** Yükleme halkası açılınca kontroller görünür kalır ve gizlenmez; kapanınca normal otomatik gizleme sürer. */
3870
- onLoadingChange(e) {
3871
- this.loadingActive = e, e ? (this.hideTimer && clearTimeout(this.hideTimer), this.hideTimer = null, this.isChromeFullyHidden || this.showChrome()) : !this.videoEl.paused && !this.isChromeBlocked && this.scheduleAutoHide();
3872
- }
3873
- }
3874
- /** Paket sürümü (ör. "1.0.4"). */
3875
- s(Ge, "version", G);
3876
- const ni = 1;
3877
- typeof window < "u" && !customElements.get("hope-player") && customElements.define("hope-player", Ge);
3878
- export {
3879
- G as H,
3880
- Ze as L,
3881
- ni as P,
3882
- Ge as a,
3883
- M as c,
3884
- ai as d,
3885
- P as f,
3886
- $ as g,
3887
- Z as i,
3888
- Kt as m,
3889
- qt as r,
3890
- N as s,
3891
- Y as t,
3892
- _ as v
3893
- };
3894
- //# sourceMappingURL=player-D7WQxMzr.js.map